From: Lucila on
Hello,
I am generating a random process by passing white noise throught a second order system.
a/(s^2+2*z*wn*s+wn^2)
The autocorrelation function calculated using xcorr gives me what I expected, but the psd (calculated using fft) does not.
I expected to see a decreasing line with slope -4 (loglog-Plot)
If I increase the number of samples or the magnitude of the natural frequency (wn), I can see the correct slope.
Why?
Thank you and Regards,
Lucy
From: Wayne King on
"Lucila " <lucpatrod(a)gmail.com> wrote in message <i40flt$7nl$1(a)fred.mathworks.com>...
> Hello,
> I am generating a random process by passing white noise throught a second order system.
> a/(s^2+2*z*wn*s+wn^2)
> The autocorrelation function calculated using xcorr gives me what I expected, but the psd (calculated using fft) does not.
> I expected to see a decreasing line with slope -4 (loglog-Plot)
> If I increase the number of samples or the magnitude of the natural frequency (wn), I can see the correct slope.
> Why?
> Thank you and Regards,
> Lucy

Hi Lucila, Please provide us with the MATLAB code that you are using to generate realizations of your system. It's not clear from your expression above what system you are trying to represent. Is this a discrete-time 2nd order difference equation? I'm guessing not because there would be no squaring of what I'm assuming is a white noise input, wn. A general 2nd order difference equation would be:

y(n)-a(1)*y(n-1)-a(2)*y(n-2)= x(n)+b(1)*x(n-1)+b(2)*x(n-1)

where y(n) is the output at time n and x(n) is a white noise input.

Wayne