# Conceptual question on FFT and chirp signal

If I take the FFT of a sinusoid I will get a plot whit all the energy of the signal concentrated at the sinusoid frequency. But what happens if I have a signal in which the frequency keeps changing?(like the chirp: linear and exponential)

Is it possible to compute the FFT of a chirp signal? And what should I expect as result?

I tried to do it in Matlab creating a chirp using the matlab function and then passing it to the FFT function but I do not know if this makes any sense and how to 'read ' the result I get.

Could you also suggest me some readings (papers, books) on the topic?

• A chirp is a form of frequency modulation. You can look up what kinds of spectrum sidebands are formed around a carrier sinusoid by various forms of modulation. – hotpaw2 Nov 17 '14 at 17:04
• Sorry but I am quite new to this kind of topics and I think I do not really get what you mean – Rhei Nov 17 '14 at 17:10
• Linear chirps are closely related to the theory of the fractional Fourier transform. With the mathematical tools developed there you can calculate the Fourier transform of such a chirp relatively easily. – Jazzmaniac Nov 17 '14 at 20:26

FFT is an fast algorithm to compute DFT

So it works on finite length of samples. This fact has some side effects on the spectrum that it will generate for signal, but generally it consist only signal frequencies that it includes on its time window of length nfft.

When u sweep frequency in your sinusoidal, in fact you are doing some sort of frequency modulation. when you calculate FFT of this signal. You would see power in all frequencies that sinusoidal has been modulated to in the window that you calculate your FFT.

Consider following example I wrote in Matlab:

fs = 48e3;
t = 0:1/fs:20e-3;
x = sin(2.*pi.*(10e3 - (2e3 .*(abs(t-10e-3)/10e-3))).*t);


This signal would sweep frequency from 8K to 10K in [0 , 10ms] and from 10K to 8K in [10ms, 20ms] and has been sampled by 48KHz frequency. To calculate its FFT:

L = length(x);
xf = fft(x)/L;
xf_s = fftshift(xf);
f = Fs/2 * linspace(-1,1-2/L,L);


Then you can plot its DFT spectrum representation using

plot(f,abs(xf_s));


and: Just like most of frequency modulated signals. Note that here we calculated FFT for full length of signal, if we calculate it for only some portion of signal we would have frequencies power for that portion.

• But the DFT is for equally spaced samples right? How can this requirement be met by an exponential chirp signal where the spacing between samples is not always the same? – Rhei Nov 18 '14 at 16:28
• Wait...the samples must be equally spaced in the time domain...so it is enough to have a constant sampling frequency...I think... – Rhei Nov 18 '14 at 16:54
• Yes, the DFT and FFT both are for equally spaced samples. This means that analog signal (in real world everything is analog) should be sampled in integer multiplies of sampling period, say t0, that t0=1/fs, So yes equally spaced samples means constant sampling frequency. But this has nothing to do with the function that changes signal amplitude. Frequency sweep of sinusoidal or any other function of time, just changes amplitude of signal with respect of time. See this link: Sampling – 2i3r Nov 18 '14 at 18:01
• Another thing: if I have data in the frequency domain of a chirp signal (therefore I have a vector of amplitudes and a vector of frequency values), can I obtain the signal in the time domain by applying the inverse-FFT? What issues could I find? – Rhei Nov 20 '14 at 6:01
• Generally you must have two vectors: 1-frequencies (which defines sampling frequency for time domain) and 2-complex values (not just amplitude but also we need phases). Then you can simply do iFFT on values and create time vector based on sampling frequency obtained from frequency vector and presumed t0 (time vector offset). It may seems weird but your signal would be regenerated as it was before. – 2i3r Nov 21 '14 at 8:27

Your question is deeper than you think. For signals whose spectra is time varying,like your chirp signal, you lose this spectral variation information in simple Fourier transforms. You must consult time-frequency analysis to retain the full information of both time variation and spectral variations.

Consider using "specgram()" function of matlab which computes and plots time-frequency spectograms of signals.

Consider the following code from matlab:

  t=[0 0.5 1.0 1.5 2.0]; % time breakpoints
f=[0 200 100 150 300];  % instantaneous frequency breakpoints
p=polyfit(t,f,4);      % fit 4th order polynomial over time
t=0:0.001:2;           % 2 secs @ 1kHz sample rate
y=chirp(t,p);
figure,specgram(y,128,1E3,128,120); % 2D time-frequency display


On the contrary a single FFT of the complete signal, which includes all the frequencies, nevertheless, loses their time variation information.

• So the spectrogram allows me to see at what time a particular frequency is reached, right? – Rhei Jan 11 '15 at 9:37
• And another thing, if I have the spectrogram of a signal, how can I get back the time signal? – Rhei Jan 11 '15 at 13:37
• Yes you are right. It gives what frequency is present in a signal at different times (of course within some precision limits which is deeply tied to uncertainity principle such that you cannot tell both of them simultaneously at arbitrary precision, when one is more precise the other must be below some max precision attainable) – Fat32 Jan 11 '15 at 14:35
• Regarding the conversion from specgram, Please refer to Discrete-Time Signal Processing, 2e, A.Oppenheim, CH:10 for quite nice description of practical utilization of both DFT and TF analysis... – Fat32 Jan 11 '15 at 14:45
• If I understood well, since the spectrogram is computed as $spectr(t,\omega) = |STFT(t,\omega)|^2$ (STFT is the short time fourier transform) the information about the phase of the signal is lost, therefore it is not possible to reverse the process to obtain the time signal from the spectrogram. Am I right? – Rhei Jan 11 '15 at 16:03

If you were talking about a Laplace (or Fourier) transform then any function with time varying coefficients has a valid transform. But you have to do the analog/continuous calculation. I would imagine that the same holds true for z transforms except for aliasing; which is not trivial. My experience is that this problem,chirp, is a standard example in Wavelet analysis.

Some internet references:

In some detail: http://perso.ens-lyon.fr/patrick.flandrin/SPIE01_PF.pdf

Practical application?: http://www.phys.ufl.edu/ireu/IREU2014/pdf_reports/Eve_Report.pdf

If you become interested is line of analysis try: @book{meyer1992wavelets, title={Wavelets and applications}, author={Meyer, Yves}, year={1992}, publisher={Paris [etc.]: Masson; Berlin [etc.]: Springer-Verlag} }

Quite dated but understandable since they were still in the justification phase. Section 1a. A comparison with short term Fourier analysis is 1b. Except amazon lists \$83 new; looking at my copy I paid$7.50. I really don't understand technical book pricing.

• Can you provide some link about chirp and wavelet analysis? I do not know how wavelets works but what you said seems pretty interesting – Rhei Nov 18 '14 at 21:48