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?
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
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.
Dear Lorenzo;
Thank you very much for your help. I’m using window function to smooth the fft. As far as I know, periodogram command interested in the magnitude only. I’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?
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
> 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
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