Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to improve the fft resolution at low frequencies

3 views
Skip to first unread message

Ahmed

unread,
Nov 23, 2009, 5:48:04 AM11/23/09
to
Currently, I’m collecting my data from a Simulink model. My code is as follow:

Fs = 50; % Sampling frequency
Ts = 1/Fs; % Sample time
L = 200; % Time Length of signal (sec)
t = 0:Ts:L-Ts; t = t'; % time
n = L/Ts; % number of samples
NFFT = 2^nextpow2(n); % Next power of 2 from length of y
f = Fs/2*linspace(0,1,NFFT/2+1); f=f'; % frequency vector
w = 2*pi*f; %rad/s
sim Model_ID.mdl
win = hann(n);
Y0 = fft(y0.*win,NFFT);
U0 = fft(u0.*win,NFFT);
G0 = Y0./U0;

When I looked at the frequency response of the model coming from (G0) and compared it with the actual frequency response, I found that the accuracy of the frequency response of those frequencies lower than 1Hz are very poor.

Could you please give me any advice to improve the low frequency resolution?

Dave Robinson

unread,
Nov 23, 2009, 8:29:05 AM11/23/09
to
"Ahmed " <fahm...@yahoo.com> wrote in message <hedp93$ehe$1...@fred.mathworks.com>...

Sample for a longer period of time. Your frequency resolution is equal to the reciprical of the time taken to acquire the signal that you are applying your FFT on.

Hope that helps

Dave Robinson

Lorenzo Guerrasio

unread,
Nov 23, 2009, 9:48:23 AM11/23/09
to
"Ahmed " <fahm...@yahoo.com> wrote in message <hedp93$ehe$1...@fred.mathworks.com>...

It is not clear to me why you multply input and output by a window. Did you awnt to do perodogram estimation?in that case you should use the periodogram command.

Ahmed

unread,
Nov 23, 2009, 5:13:19 PM11/23/09
to
"Lorenzo Guerrasio" <lorenzo....@email.it> wrote in message <hee7bn$l3u$1...@fred.mathworks.com>...

Dear Lorenzo;
Thank you very much for your help. I&#8217;m using window function to smooth the fft. As far as I know, periodogram command interested in the magnitude only. I&#8217;m not sure from where we can get the phase if we use periodogram to calculate the FRF. Could you please write what you mean in as a short code?

Lorenzo Guerrasio

unread,
Nov 23, 2009, 6:15:20 PM11/23/09
to
"Ahmed " <fahm...@yahoo.com> wrote in message <hef1dv$ceb$1...@fred.mathworks.com>...


Hallo,
Unfortunaltely my memories of signal spectral analysis are quite old.
As far as I remember, if you estimate the spectrum from the time series you have two problems i.e., spectral bias and variance of the spectrum. While the bias of the spectrum might be solved by your smoothing, in order to reduce variance you have to average several estimation of the spectrum. You'll lose resultuion, you'll gain recision. therefore I'd suggest you to look at the Bartlett's or the Welch's method if you have a problem of precision (and not of resolution, which I reckon can be solved adding more sample, or eventually zero padding).
All of this regards power spectrum, not the phase. I'm sorry, but I don't know much aobut phase spectrum estimation.Besides, in your code the phase problems does not appear to be treated (Am I wrong).
i hope you could find the help you need. Eventually write a second,more specific question, if more expert people does not contribute to this more general request.
All best
L

Rune Allnor

unread,
Nov 23, 2009, 6:21:12 PM11/23/09
to
On 23 Nov, 11:48, "Ahmed " <fahmy...@yahoo.com> wrote:

> Could you please give me any advice to improve the low frequency resolution?

The only way is to use a longer observation. It's as
simple as that. This is a fundamental property of any
methods that are based on the DFT.

Rune

dbd

unread,
Nov 23, 2009, 9:31:48 PM11/23/09
to

Getting more samples is almost always the easiest way. There has been
some work on algorithmic techniques. See:

http://www.aes.org/e-lib/browse.cfm?elib=13768

Dale B. Dalrymple

0 new messages