3
$\begingroup$

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?

$\endgroup$
  • 1
    $\begingroup$ 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. $\endgroup$ – hotpaw2 Nov 17 '14 at 17:04
  • 1
    $\begingroup$ Sorry but I am quite new to this kind of topics and I think I do not really get what you mean $\endgroup$ – Rhei Nov 17 '14 at 17:10
  • 1
    $\begingroup$ 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. $\endgroup$ – Jazzmaniac Nov 17 '14 at 20:26
1
$\begingroup$

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:

enter image description here

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.

$\endgroup$
  • $\begingroup$ 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? $\endgroup$ – Rhei Nov 18 '14 at 16:28
  • $\begingroup$ Wait...the samples must be equally spaced in the time domain...so it is enough to have a constant sampling frequency...I think... $\endgroup$ – Rhei Nov 18 '14 at 16:54
  • $\begingroup$ 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 $\endgroup$ – 2i3r Nov 18 '14 at 18:01
  • $\begingroup$ 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? $\endgroup$ – Rhei Nov 20 '14 at 6:01
  • $\begingroup$ 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. $\endgroup$ – 2i3r Nov 21 '14 at 8:27
3
$\begingroup$

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.

$\endgroup$
  • $\begingroup$ So the spectrogram allows me to see at what time a particular frequency is reached, right? $\endgroup$ – Rhei Jan 11 '15 at 9:37
  • $\begingroup$ And another thing, if I have the spectrogram of a signal, how can I get back the time signal? $\endgroup$ – Rhei Jan 11 '15 at 13:37
  • $\begingroup$ 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) $\endgroup$ – Fat32 Jan 11 '15 at 14:35
  • $\begingroup$ 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... $\endgroup$ – Fat32 Jan 11 '15 at 14:45
  • $\begingroup$ 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? $\endgroup$ – Rhei Jan 11 '15 at 16:03
1
$\begingroup$

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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.