I am generating signal consisting of 4 frequencies 380,460,500,580 Hz using 20500 as Fs. I generate this signal for different durations of 0.004s,0.008s,0.02s,0.04s.
Fs=20500;
values=0:1/Fs:duration;
sig1=sin(2*pi*FREQ*values); % FREQ can be 380,460,500,580
sig2 , sig3, sig4
sigt=normr(sig1+sig2+sig3+sig4);
When I take FFT I get different results for different time durations.
NFFT=2^nextpow2(length(sigt));
Y=fft(sigt,NFFT)/length(sigt);
f=Fs/2*linspace(0,1,NFFT/2+1);
figure, plot(f,2*abs(Y(1:NFFT/2+1)),'r')
- for 0.004s, I get one peak at 480.5 Hz
- for 0.008s , I get one peak at 480.5 and two lower side peak at 320.3 and 640.6.
- for 0.02s ,I get four peaks at 360.4,440.4,520.5,600.6
- for 0.04s , I get four Peaks at 380.4, 460.4,500.5,580.6
All frequencies have time period less than any of above durations. Is there any specific criteria that signal must be in some length so that FFT can detect its frequency. Is there any other method exist which can measure frequency for such short durations? Please share any knowledge.