I am trying to understand intuitively the fft of a signal that changes in frequency in time.
Suppose I have the fft of a linear chirp signal sampled at 1 kHz for 2 seconds. The instantaneous frequency is 100 Hz at t = 0 and crosses 200 Hz at t = 1 second.
Using matlab, I have the following magnitude spectrum plot:
t1 = 0;
t2 = 1;
Fs = 1; %1khZ
f0 = 100;
f1 = 200;
T = 2;
figure;
subplot(2,2,[1,2]);
t = 0:0.001:T;
y = chirp(t,f0,t2,f1); %generate chirp signal
Y=fft(y); %apply DFT on the signal
F=linspace(0,1e3,length(y)); %create x-axis for plotting the spectrum
plot(F,abs(Y)./length(y)*2); %plot the magnitude spectrum
I then truncate the signal by getting only the first 100 samples. Now I have:
I have some questions.
- Are the plots correct?
- Is it correct to say that by truncating, the ripples produced during transform are minimized hence the peak at 100Hz can be easily distinguished?