FFT principle

Efficient algorithm of DFT
Collection
zero Useful+1
zero
synonym fast Fourier transform (The calculation method of computing discrete Fourier transform by computer is generally referred to as FFT principle)
FFT is an efficient algorithm of DFT, called fast Fourier transform. Fourier transform It is one of the most basic methods in time-frequency transformation analysis. Applied in the field of digital processing Discrete Fourier Transform (DFT: Discrete Fourier Transform) is the basis of many digital signal processing methods [1]
Chinese name
FFT principle
Foreign name
fast Fourier transform
Definition
An Efficient DFT Algorithm
Field
Mathematical Science
Classification
Time decimation and frequency decimation

Principle Introduction

Announce
edit
Due to the rapid development of computer technology, in the mid-1970s, some electronic equipment enterprises in the United States and Japan began to design and produce digital Fourier analyzer , but because Discrete Fourier Transform The computational complexity of DFT is large, and the finite discrete Fourier transform (DFT) was really applied widely until the fast algorithm (FFT) of DFT was found [2]
FFT is an efficient algorithm of DFT, called fast Fourier transform. FFT algorithm can be divided into decimation by time algorithm and decimation by frequency algorithm. Starting from DFT operation, the basic principle of FFT is explained.
The operation of DFT is:
Figure 1
Where
DFT is calculated by this method. For each K value of X (K), 4N times of real number multiplication and (4N-2) times of addition are required. For N k values, N * N times of real number multiplication and N (4N-2) times of real number addition are required. Improve the DFT algorithm to reduce its computational load
The periodicity and symmetry of DFT make the whole DFT calculation become a series of iteration The basic idea of FFT is that operation can greatly improve the operation process and amount.

classification

Announce
edit
FFT can be basically divided into two categories, time decimation method and frequency decimation method, while the general time decimation method and frequency decimation method can only handle the length N=2 M In addition, the combination number base four FFT is used to process the FFT of general length.
The so-called selection is the process of dividing a long sequence into short sequences, which can be carried out in the time domain or frequency domain. The most common time-domain selection method is to continuously change the long sequence into short sequence according to parity, resulting in the input sequence being in reverse order and the output sequence being in order. This is Coolly Tukey algorithm [3]
Time extraction
Let N point sequence x (n),
, group x (n) by parity, and the formula is shown in Figure 2:
Figure 2
Rewrite as:
Figure 3
One N point DFT is decomposed into two N/2 point DFTs,
Figure 4
Continue decomposition, iteration The calculation amount is about
Figure 5
The algorithm has the following rules:
Two 4-point 8-point DFT:
Butterfly algorithm
Eight point DFT consisting of four two points:
8-point DFT sampled by time:
In situ calculation
When the data is input into the memory, the results of each level of operation are still stored in the same group of memory until the final output, and no other memory is needed in the middle.
Ordinal rearrangement
For the in situ operation structure that extracts FFT by time, when the operation is completed, X (0), X (1), X (2),..., X (7) are stored in the storage unit A (1), A (2),..., A (8) of this structure in exact order, so it can be directly output in order, but the input x (n) of this in situ operation cannot be stored in the storage unit in this natural order, but is stored in X (0), X (4), X (2), X (6), The order of X (7) is stored in the storage unit. This order looks very messy, but it is also regular. When this order is expressed in binary, it is exactly the order of "code bit inversion".
The butterfly type increases exponentially with the number of iterations.
The butterfly type of each iteration is twice that of the previous iteration, and the data point interval is also doubled.
Frequency decimation
The frequency decimation 2FFT algorithm is an algorithm that decimates by frequency.
Set N=2 M , decompose x (n) according to the front and rear parts,
DFT transformation formula
Divided into two groups according to the parity of K, namely
FFT principle
The DFT operation of two N/2 points is obtained. This decomposition, and iteration The total amount of computation is the same as the decimation of time (DIT) based 2FFT algorithm.
The algorithm rule is as follows:
The butterfly structure is different from the time extraction, but the number of butterflies is the same. It also has the rule of in situ calculation, and the number of iterations decreases exponentially.
Combinatorial number base four FFT
N≠2 M You can use zero filling to make it N=2, or first decompose it into two sequences of p and q, where p * q=N, and then calculate.
Chirp-z transformation
As mentioned earlier, the FFT algorithm can quickly calculate all the N point DFT values, that is, all the equispaced sampling values of the z-transform X (z) on the unit circle of the z-plane. In practice, perhaps ① it is not necessary to calculate the sampling of the z-transform on the whole unit circle, for example, for narrowband signals, it is only necessary to analyze the band in which the signal is located. At this time, it is hoped that the sampling of the spectrum will be concentrated in this band to obtain higher resolution, while the parts outside the band can be ignored, ② or it is interested in the z-transform sampling of other contours, For example, in speech signal processing, it is necessary to know the frequency of the poles of the z-transform. If the pole position is far away from the unit circle, the frequency spectrum on the unit circle is very smooth. At this time, it is difficult to identify the frequency of the poles. If sampling is not along the unit circle but along an arc close to these poles, there will be obvious peaks in the frequency spectrum of the poles, Thus, the pole frequency can be measured more accurately. ③ Or it is required to be able to effectively calculate the DFT of the sequence when N is a prime number, so it is very meaningful to improve the flexibility of DFT calculation.
Helix sampling is a transformation suitable for this need, and FFT can be used for fast calculation. This transformation is also called Chirp-z transformation.

application

Announce
edit
FFT calculation IDFT
DFT transformation shows that for signals with limited time (finite length sequence), frequency domain sampling can also be carried out without losing any information. Therefore, as long as the time series is long enough and the sampling is dense enough, the frequency domain sampling can better reflect the spectrum trend of the signal, so FFT can be used for spectrum analysis of continuous signals.
Of course, several approximations are made here:
1. The Fourier transform of discrete sampling signal is used to replace the spectrum of continuous signal. Only when the sampling theorem is strictly met, the spectrum will not be distorted, otherwise it is only approximate;
2. The infinite length discrete sampling signal is replaced by a finite length sequence.
FFT calculation linear convolution
Linear convolution is one of the main methods to calculate the response of discrete systems, and many important applications are based on this theory, such as convolution filtering.
The method of calculating linear convolution with circular convolution has been discussed previously, which can be summarized as follows:
Will be N long two The sequence x (n) of is extended to L and supplemented with L-N two Zeros
Will be N long one The sequence h (n) of is extended to L and supplemented with L-N one Zeros
If L ≥ N one +N two -1. Then the circumferential convolution is equal to the linear convolution. At this time, FFT can be used to calculate the linear convolution. The method is as follows:
a. Calculate X (k)=FFT [x (n)]
b. Find H (k)=FFT [h (n)]
c. Find Y (k)=H (k) Y (k) k=0 ~ L-1
d. Find y (n)=IFFT [Y (k)] n=0 ~ L-1
It can be seen that once the second FFT is performed, the first IFFT can complete the linear convolution calculation. The calculation shows that when L>32, the above method for calculating linear convolution has obvious advantages over direct calculation of line convolution. Therefore, the above circular convolution method is also called Fast convolution method
FFT calculation correlation function
Interrelation and Autocorrelation function The calculation of can be realized by FFT. Because the discrete Fourier transform implies periodicity, it is also suitable for periodic sequences to calculate discrete correlation functions with FFT. Making N-point FFT directly is equivalent to making periodic continuation of two N-point sequences x (n) and y (n), making correlation and then taking principal value (similar to circular convolution). In fact, what is generally required is the linear correlation of two finite length sequences. To avoid confusion, it is necessary to use a method similar to that of circular convolution to solve linear convolution. First, the sequence is extended and filled with 0, and then the above method is used.
Real sequence FFT
The signal is a real number sequence, and any real number can be regarded as a complex number whose imaginary part is zero. For example, to find the complex spectrum of a real signal y (n) can be regarded as adding the imaginary part of the real signal with zero value to become a complex signal (x (n)+j0), and then FFT can be used to find its discrete Fourier transform. This method is very uneconomical, because the memory will be doubled if the real sequence is changed into the complex sequence, and when the computer is running, even if the imaginary part is zero, the operation involving the imaginary part will be carried out, which wastes the amount of calculation. The reasonable solution is to use complex data FFT to effectively calculate the real data. The method is described below.
One N-point FFT calculates the DFT of two N-point real sequences simultaneously
Set x one (n),x two (n) Are two independent N-point real sequences, and X one (k)=DFT[x1(n)],X two (k)=DFT[x2(n)]
X can be obtained simultaneously through one FFT operation one (k),X two (k)。 The algorithm is as follows:
First place x one (n),x two (n) As the real part and imaginary part of a complex sequence, let
x(n)=x one (n)+jx two (n)
The DFT value of x (n) can be obtained by FFT operation X (k)=DFT [x1 (n)]+jDFT [x2 (n)]=X one (k)+jX two (k)
Using conjugate symmetry of discrete fourier transform
X one (K) =1/2 * [X (k)+[X (N-k) conjugate]]
X two (K) =1/2 * [X (k) - [X (N-k) conjugate]]
With the FFT operation result X (k) of x (n), X can be obtained from the above formula one (k),X two (k) The value of.