How many periods it is needed for fft to give us a proper estimate over frequency?
24 ビュー (過去 30 日間)
古いコメントを表示
Dear all,
I have a basic question. Imagine a simple sinusoidal defined as below:
Fs = 150;
t = 0:1/Fs:0.2;
f = 5;
x = sin(2*pi*t*f);
nfft = 1024;
X = fft(x,nfft);
X = X(1:nfft/2);
MX = abs(X);
f = (0:nfft/2-1)*Fs/nfft;
plot(f,MX)
The period of signal(lambda) is 0.2 (f=5). Now, if I change this expression(t = 0:1/Fs:0.2;) any time before plotting, from a half sine (t = 0:1/Fs:0.1;) to 5 repeated periods (t = 0:1/Fs:1;), only after when two full periods are at least used for calculating fft, fft gives us a good estimate(something around 5) of the signal frequency. Why?
0 件のコメント
回答 (2 件)
Wayne King
2013 年 11 月 5 日
It's not that simple. You can get a good estimate with just one period depending on the frequency spacing in the DFT.
Fs = 500;
t = 0:1/Fs:0.2-1/Fs;
x = cos(2*pi*5*t);
xdft = fft(x);
xdft = xdft(1:length(x)/2+1);
df = Fs/length(x);
freqvec = 0:df:250;
stem(freqvec,abs(xdft),'markerfacecolor',[0 0 1])
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Fourier Analysis and Filtering についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!