1.1.    Small reminders on the Fourier transform

 

The literature on the Fourier transform is abundant and diverse. What is given here is a simple basic reminder of what one needs to know for the calculation of spectrum or spectrogram.

 

1.1.1   The Fourier transform in the mathematical sense

The Fourier transform (TF) makes it possible to go from the “ time domain , that is to say of a function dependent on time x (t), which is also called “ waveform ”, to the “ frequency ” domain. ", That is to say a function dependent on the frequency X (f), which is called" spectrum ".         

For this to be possible, the function x (t) must be integrable on the real R.

This operation is done by the formula : 

 

From the spectrum X (f) we can return to the waveform by : 

 

Of course, in practice we never know a signal x (t) over an infinite duration. If we assume the function x (t) to be periodic, and of period T, we can calculate its spectrum by : 

 

Which already brings us a little closer to the real case. But with the assumptions of periodicity, beware of side effects ! You should know that an abrupt truncation will cause noise over the entire frequency range which will have no meaning (see Figure 3 of the chapter 1.1.3 page 2).

In practice, the signals are sampled and the discrete TF is used.

 

1.1.2   The discrete Fourier transform

In digital signal processing, the function x (t) is sampled at the frequency f e , called “ sampling frequency”, and the function x (t) becomes a set of values x n . In this case, if the point n = 0 is the origin of the times, the point n is located at the time with 

Note that the frequency f e must be chosen in such a way (Shannon's theorem) that there are no frequencies greater than f e / 2 in the original signal x (t). In practice, when digitizing by CAD (Analog / Digital Converter), an anti-aliasing filter is installed in the hardware to avoid this problem. 

The discrete Fourier transform is then expressed by : 

X k is then the spectrum of the waveform x n . As the spectrum is discrete, we also speak of a line spectrum.

The inverse transform is of course : 

 

1.1.3   The " Fast Fourier Transform "  

It is a fast algorithm for computing the discrete Fourier transform. The one used in RCLs is of the “ Cooley-Tukey ” type named after its inventors. It uses the so-called " butterfly " algorithm and remains an extremely fast FFT. Its only defect is to operate on a number of point which is of the form , with m integer.    

This algorithm was used to write the deconvolution subroutine deconvo_C3 used in the continuous calibration program (see chaptersError: source of reference not found and Error: source of reference not found).

Negative and positive frequencies

In FFT calculation programs, we generally introduce an input-output argument Sn which is a complex array of dimension N. As input it corresponds to a waveform (which can be complex) x n , and as output it corresponds to the complex spectrum X k .

The lines of the output spectrum are generally classified according to the figure Figure 1below : 

 

FFT.png

Figure 1:  Order of the lines of the spectrum at the output of FFT

 

Some useful relationships : 

t : sampling period, f : spectral resolution, T : Length of the window of N points.       

 

            

 

Fmax, the highest frequency of the spectrum, is called the Nyquist frequency.

 

Normalization test of an FFT

If we take a real function as an input signal, the spectrum must be symmetrical and conjugate, which means that the amplitude on the negative and positive frequencies must be the same, and the phases reversed. To check that an FFT is well normalized, it suffices to take as input signal a pure sine wave, of amplitude a = 0.5 as in the example ofFigure 2 below (the amplitude of the spectrum is given in linear and logarithmic scale.

p_test_fft_int.png

Figure 2 : Spectrum of a pure sine wave whose frequency is a multiple of f

 

If we take the precaution of taking a test frequency f which is multiple of f, we respect the hypothesis according to which the signal is periodic (if we repeat it from one window to another, there is continuity). 

In this case we obtain two pure lines, at ±  f, of the same amplitude equal to a / 2. We can verify that the energy in time as in frequency is well conserved : in time, the effective amplitude of a sinusoid is either an energy of . 

In frequency, we get either good . This is Parseval's theorem : 

Parseval.png

This theorem is sometimes very useful to verify the conservation of energy during complex processing. In this example, we have chosen f test = 5 · f = 5 · 0.048828125 = 0.2441406 Hz and an amplitude of 0.5 nT, and we can check on the  Figure 2 that we get 2 lines at 0.25 nT.

In this case the phase calculation (which can be verified) also gives the exact original value. This is how the despin software is designed : we use an FFT on a single line (the spin frequency) and we take as sample length a number of points corresponding exactly to a spin period. We can thus calculate the amplitude and the phase of the spin sinusoid. 

 

Edge effects

If we repeat the above test, with a frequency close to but not a multiple of df, the signal periodicity hypothesis is no longer verified, and there are “ breaks ” of the signal from one window to another. The main consequence is that, on the one hand, the energy is distributed over all the frequencies, and that on the other hand the spectrum that we obtain is no longer exactly what we expected, as shown in    Figure 3  below. However, in all cases the total energy of the signal is always conserved, which means that the amplitude of the lines is reduced.

p_test_fft_flt.png

Figure 3 : Spectrum of a pure sine wave whose frequency is not a multiple of f

 

1.2.