FFT for non-periodic signal
Afficher commentaires plus anciens
Assume that I have a sequence of N different samples, so my signal is non-periodic. Is it ok I take the FFT for the whole sequence at a time after using a Hanning window which length is also N? Is the result different if I use part of my signal and 'make' it periodic?
Réponse acceptée
Plus de réponses (2)
Ngoc
le 19 Déc 2013
0 votes
Wayne King
le 19 Déc 2013
Modifié(e) : Wayne King
le 19 Déc 2013
Ngoc, you have to compensate for the effect of the window. Do you have the Signal Processing Toolbox? If so, let periodogram() with the 'power' option take care of that for you
Fs = 1000;
t = 0:1/Fs:1-1/Fs;
x = 2*cos(2*pi*100*t);
[Sxx,F] = periodogram(x,flattopwin(length(x)),length(x),Fs,'power');
plot(F,Sxx)
Note the power is correctly reported as 2, which is A^2/2
If you have non-periodic data,then periodogram() with the 'power' option defaults to 'psd', which is more appropriate.
In other words, the 'power' option is appropriate when you have a line spectrum consisting of sinusoidal components.
1 commentaire
Ngoc
le 23 Déc 2013
Catégories
En savoir plus sur Discrete Fourier and Cosine Transforms dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
