Calculations of spectres by computers
Discreet Fourier Transform (DFT) & Fast Fourier Transform (FFT)
When one wishes to calculate the Fourier Transform by computer or by way of a module of calculation FFT, it is necessary to find an expression of Fourier transform which gives not a continuous expression of variable f (impossible to make on a computer) but a continuation (suite) of samples of this Fourier's transformed: it is the TFD/DFT (Transformée de Fourier Discrète / Discrete Fourier Transform) or the TFR/FFT (transformée de Fourier Rapide / Fast Fourier Transform). The TFR/FFT is in fact a more effective optimized algorithm for the calculation of the TFD / DFT.
1. Discrete Fourier Transform (DFT)
The principle of the TFD consists, from M samples of the signal s_{0}, s_{1}, ..., s_{k}, ..., s_{M1} to determine M samples of the TFD: S_{0}, S_{1}, ..., S_{n}, ..., S_{M1}. M samples of the transformed represent one period of this tranformée, either taken between : and (That is among and ), or between 0 and Fe.
The mathematical expression of the TFD is the following one :
or
where; s(kT_{e})=s_{k} Represent the k^{th} sample of the temporal signal,
S(nf_{i})=S(n/M)=S_{n} the n^{tn} sample of the TFD,
k is the temporal indication,
n est the frequency indication,
M is the total number of samples of the signal as well as that of the TFD (typically on 1024),
f_{i} is called the step fréquentiel and represent distance between two samples of the spectre,
this value is so such as .
Ex : for M=11


Exercice :
Is the sampled signal; {s_{k}} : s_{k}= 1 pour k = 0 et k = 1.
s_{k} = 0 ailleurs.
To calculate the TFD of order 4 of {s_{k}} and to represent the module of the spectre.
Solution :
1) Calculation of the TFD on 4 samples (4 samples of the TFD from 4 samples of the signal)
pour n=0, 1 , ... , M1 et M=4
Modules of these 4 samples:
Arguments of these 4 samples:
2. Inversed Discreet Fourier Transform (TFID)
TABLE OF DISCREET FOURIER TRANSFORM
(T_{e} is the period of sampling)
s(kT_{e}) = s_{k} 
Properties or theorems 
Temporal domain 
Frequency Domain 
Linearity  {xk + yk} {A.sk} {0} 
Xn + Yn A.Sn 0 
Theorem of the delay  {} 

{} 

3. Problems of fenêtrage ( apodisation )
Windows below were calculated by MATLAB with N = 64
Opposite temporal domain: 

This window is defined by:
The frequency expression is:

Opposite the frequency domain :
To the left, linear scale To the right, ordered in dB 


Opposite temporal domain: 

This window is defined by:
The frequency expression is:

Opposite frequency domain :
To the left, linear scale To the right, ordered in dB 


Opposite temporal domain: 

Hann's window (or Hanning) is the particular case of Hamming's window generalized fora = 0,5. The windows of the family Hamming are characterized by a central peak of double width of the oblong window but an enfeeblement of oscillations appreciably more important. Representation fréquentielle of the window of generalized Hamming has for equation :

Opposite frequency domain :
To the left, linear scale To the right, ordered in dB



Opposite temporal domain : 
The window with exponential answer is useful for the measure of passing signals (of type impulse). 
The beginning of the signal is not disrupted, but the end of the temporal recording is forced to zero. The exponential window agrees only for the measure of passing signals. This window is defined by :
The frequency expression is :

Problem of leaks of spectra
This problem intervenes when the transformed of fast Fourier is not calculated on an integer of periods. Motive repeated to create the periodic very signal is not in that case waited. Indeed, in that case, the spectre obtained by FFT is not a good estimate of the spectre of the signal. Given that the user often has no control on the location of the signal in the temporal recording, he is necessary generally to envisage the possible existence of a discontinuity. This effect, known under the name of leaks ( leakage ) is obvious in the domain fréquentiel. This discontinuity provokes, by effect of passing, a extension of the line spectrale (which should seem very fine). The use of a window typifies Hanning or Blackman will have the effect, by filtering strongly the extremities of the motive in the temporal domain, of easing the effect of leaks. It will also be able to be if need be sensible to try, when it is possible, to synchronize the analyzer of spectre (FFT module) on an integer of periods of sampling of the periodic signal to be analyzed. On the other hand, the resolution of the analyzer (smaller frequency between two lines) is equal in 1/T_{e}.
Curves below concern a sinusoïde of f = 50 Hz and of amplitude 1 sampled in f_{e} = 1000