Fourier transform

In 1807, Fourier put forward the concept
open 2 entries with the same name
Collection
zero Useful+1
zero
This entry is made by China Science and Technology Information Magazine Participate in editing and review Science Popularization China · Science Encyclopedia authentication.
Fourier transform, which means that a function satisfying certain conditions can be expressed as trigonometric function sine And/or cosine function )Or a linear combination of their integrals.
In different research fields, Fourier transform has many different variants, such as Continuous Fourier transform and Discrete Fourier Transform At first, Fourier analysis was proposed as a tool for analytical analysis of thermal processes.
Chinese name
Fourier transform
Foreign name
Fourier Transform
Alias
Fourier expansion
Presenter
Fourier
Proposed time
1807
Applied discipline
digital signal processing

definition

Announce
edit
Let f ∈
, then Fourier transform
by
On function , defined as
And
be called Fourier series [6]

nature

Announce
edit

astringency

F to
Fourier of mapping by
, and
, and of f Fourier series In L two norm lower convergence At f. [6]

Symmetry property

if
, then

Parity property

if
, and
, where
express
The real part of,
express
The imaginary part of, then
It's about
Of Even function
Module of
It's about
Even function of, Radial angle
It's about
Odd function of.

Linear property

if
, then
Where α and β are constants.

Time shift property

if
, then

Frequency shift property

if
, then
[5]

Scaling property

if
, then

Convolution theorem

Time domain convolution theorem: if
, then
Frequency domain convolution theorem: if
, then

Time domain calculus

Differential property: if
, then
Integral property: if
, then

Frequency domain calculus

Differential property: if
, then
Integral property: if
, then
[7 ]

application

Announce
edit
Although initially Fourier analysis As a tool for analytical analysis of thermal processes, its thinking method still has the characteristics of typical reductionism and analytism. "Any" function can be expressed in the form of linear combination of sine functions through certain decomposition, and sine functions are relatively simple functions that have been fully studied in physics. This idea is very similar to the idea of atomic theory in chemistry. Strangely, modern mathematics finds that Fourier transform has very good properties, making it so useful and useful that people have to exclaim the magic of creation:
  1. one
    Fourier transform is a linear operator, if given appropriate norms, it is still a unitary operator;
  2. two
    The inverse transform of Fourier transform is easy to find, and its form is very similar to the forward transform;
  3. three
    Sinusoidal basis function is differential operation Eigenfunction So that linear differential equation The solution of can be converted into constant coefficient Solution of algebraic equations based on. invariant in linear time physical system The frequency is an invariable property, so the response of the system to complex excitation can be obtained by combining its responses to sinusoidal signals with different frequencies;
  4. four
    famous Convolution theorem It is pointed out that Fourier transform can transform complex convolution operation into simple product operation, thus providing a simple means to calculate convolution;
  5. five
    Discrete Fourier transform can be quickly calculated by digital computer (its algorithm is called fast Fourier transform Algorithm (FFT))
It is precisely because of the above good properties that the Fourier transform is used in physics number theory , combinatorial mathematics, signal processing, probability, statistics, cryptography, acoustics, optics and other fields have a wide range of applications.
FPGA Implementation of Fourier Transform
Fourier transform is a basic operation in digital signal processing, which is widely used to describe and analyze discrete time-domain signals. However, because its operation amount is proportional to the square of the number of transformation points N, it is impractical to directly apply DFT algorithm to spectral transformation when N is large. However, the appearance of fast Fourier transform technology has fundamentally changed the situation. This paper mainly describes the design method of using FPGA to realize 2k/4k/8k point FFT.

Overall structure

In general, the Fourier transform pair of point N is:
Where, WN=exp (- 2pi/N). X (k) and x (n) are both complex In contrast, there are many kinds of fast Fourier transforms, such as DIT (time domain decimation), DIF( frequency domain Extraction method), Cooley Tukey, Winograd, etc. For 2n Fourier transform, the Cooley Tukey algorithm can derive DIT and DIF algorithms. The basic idea used in this paper is the Cooley Tukey algorithm, that is, the high point Fourier transform is realized by multiple low point Fourier transforms. Although there are differences between DIT and DIF, they are essentially algorithms based on label decomposition, so they are exactly the same in terms of computational load and algorithm complexity, and there is no difference in performance. Therefore, you can choose either one as needed. This paper mainly discusses DIT methods.
The operation expression of DFT at point N=8192 is:
Where, m=(4n1+n2) (2048k1+k2) (n=4n1+n2, k=2048k1+k2), where n1 and k2 can be 0,1,..., 2047, and k1 and n2 can be 0,1,2,3.
According to formula (3), 8k Fourier transform can be composed of 4 × 2k Fourier transform. Similarly, 4k Fourier transform can be composed of 2 × 2k Fourier transform. The 2k Fourier transform can be composed of 128 × 16 Fourier transforms. 128 Fourier transform can be further composed of 16 × 8 Fourier transform. In the final analysis, the whole Fourier transform can be composed of base 2. Fourier transform of radix 4. 2k FFT can be realized by five radix-4 and one radix-2 transformations; 4k FFT transform can be realized by 6 bases and 4 transforms; 8k FFT can be realized by six radix-4 and one radix-2 transformations. That is to say, the basic structure of FFT can be divided into base 2/4 module, complex multiplier Storage unit And memory control module, and its overall structure is shown in Figure 1.
In Figure 1, RAM is used to store input data, intermediate results during operation and data after operation, and ROM is used to store rotation factor table. The butterfly operation unit is the base 2/4 module. The control module can be used to generate control timing and address signals to control the intermediate operation process and the final output results.

Butterfly solver

The signal flow of base 4 and base 2 is shown in Figure 2. In the figure, if A=r0+j * i0, B=r1+j * i1, C=r2+j * i2, D=r3+j * i3 is the signal to be transformed, Wk0=c0+j * s0=1, Wk1=c1+j * s1, Wk2=c2+j * s2, Wk3=c3+j * s3 is the rotation factor, and it is substituted into the base 4 butterfly operation unit in Figure 2 respectively, then there are:
A′=[r0+(r1×c1-i1×s1)+(r2×c2-i2×s2)+(r3×c3-i3×s3)]+j[i0+(i1×c1+r1×s1)+(i2×c2+r2×s2)+(i3×c3+r3×s3)]? (4)
B′=[r0+(i1×c1+r1×s1)-(r2×c2-i2×s2)-(i3×c3+r3×s3)]+j[i0-(r1×c1-i1×s1)-(i2×c2+r2×s2)+(r3×c3-i3×s3)] (5)
C′=[r0-(r1×c1-i1×s1)+(r2×c2-i2×s2)-(r3×c3-i3×s3)]+j[i0-(i1×c1+r1×s1)+(i2×c2+r2×s2)-(i3×c3+r3×s3)] (6)
D′=[r0-(i1×c1+r1×s1)-(r2×c2-i2×s2)+(i3×c3+r3×s3)]+j[i0+(r1×c1-i1×s1)-(i2×c2+r2×s2)-(r3×c3-i3×s3)]? (7)
In the base 2 butterfly, the values of Wk0 and Wk2 are both 1. In this way, if the expressions of A, B, C and D are substituted into the four equations of the base 2 operation in Figure 2, then:
A′=r0+(r1×c1-i1×s1)+j[i0+(i1×c1+r1×s1)]? (8)
B′=r0- (r1×c1-i1×s1)+j[i0-(i1×c1+r1×s1)] (9)
C′=r2+(r3×c3-i3×s3)+j[i0+(i3×c3+r3×s3)]? (10)
D′=r2-(r3×c3-i3×s3)+j[i0-(i3×c3+r3×s3)]? (11)
There are many similar terms in the above equations (4) to (11), such as i1 × c1+r1 × s1 and r1 × c1-i1 × s1. They are only different from each other in addition and subtraction signs, and their structures and operations are similar, which makes it possible to simplify the circuit. At the same time, in butterfly operations, complex multiplication can be performed by real number Multiplication is expressed in a certain format, which also provides a way to design complex multiplier.
Take base 4 as an example. In its operation unit, only three complex Multiplication operation, that is, only the values of BWk1, CWk2 and DWk3 need to be calculated. In this way, in a base 4 butterfly cell, only three complex multipliers are needed at most. In practice, without increasing the clock frequency, just control the timing well? The pipeline technology can be used to complete these three complex multiplications with only one complex multiplier, which greatly saves hardware resources.
Figure 2 Signal Flow Diagram of Base 2 and Base 4 Butterfly Algorithm

Address of FFT

The output of FFT is usually a specific reverse order. Therefore, the address control after several levels of transformation must be accurate.
The rule of reverse order is closely related to the way of decomposition. Taking base 8 as an example, the basic reverse order rule is as follows:
Base 8 can be represented by 2 × 2 × 2 three-level base 2 transformation, and its input order can be represented by binary sequence (n1 n2 n3). After transformation, its order will change to (n3 n2 n1), such as: X? 011 → x? 110, that is, the input sequence is 3, and the output sequence becomes 6.
Furthermore, the transformation of base 16 can be composed of 2 × 2 × 2 × 2, 4 × 4, 4 × 2 × 2 and other forms. Compared with different decomposition forms, there are often different reverse orders. Take 4 × 4 as an example, its input sequence can be Binary The sequence (n1 n2 n3n4) can be changed to ((n3 n4) (n1 n2)), such as X? 0111 → x? 1101 。 That is, the input sequence is 7 and the output sequence is 13.
At 2k/4k/8k Fourier In the transformation, since the operation of radix 4 and radix 2 must be performed for many times, the results of the operation should be reversed from the completion of each operation to the next operation to ensure the correctness of the operation.

Rotation factor

The rotation factor of N-point Fourier transform has obvious periodicity and symmetry. Its cyclical performance is as follows:
The reason why FFT can improve the operation efficiency is that it uses symmetry and periodicity to decompose the DFT of a long sequence into DFTs of several sequences step by step, and finally realizes the long point transformation with short point transformation.
According to the symmetry and periodicity of the rotation factor Rotation factor When reading, only a part of the rotation factor table can be stored, and the control of reading address and symbol can be added, so that FFT can be realized correctly. Therefore, making full use of the nature of the rotation factor can save more than 70% of the storage cells.
In fact, since the rotation factor can be decomposed into a combination of sine and cosine functions ROM The value stored in is a combination of sine and cosine function values. For the 2k/4k/8k Fourier transform, only one cycle is divided differently. Since the rotation factor of 8k transform includes all the factors of 2k/4k, the universal 2k/4k/8k transform can be realized by controlling the address of ROM reading.

Memory control

Because FFT is Sequential circuit Therefore, the control signal shall include the timing control signal and the memory read/write address, and generate various auxiliary indication signals. At the same time, in order to ensure high speed, all multipliers must always maintain a high utilization rate inside the calculation module. This means that when each clock comes, new operands must be input to these units, and all these need close cooperation of control signals.
In order to realize the manifold operation of FFT, the memory also needs to receive data during the operation. This can be done by ping-pong RAM. This method determines the maximum time to implement FFT operations. For 4k operation, the receiving time is 4096 data cycles, so the maximum operation time of FFT is 4096 data cycles. In addition, since the input data is input in turn with a certain clock as a cycle, a higher internal clock can be used for internal calculation, and then stored in RAM for output in turn.
In order to save resources, the method of reading and writing the stored data RAM to the original address can be used, that is, the results should be written back to the RAM memory of the read data while the next level of transformation is carried out; For ROM, the value of rotation factor in the memory should be read out by the method corresponding to the calculated data.
In 2k/4k/8k fourier transform, the controller is the most important module to achieve universality. 2k, 4k and 8k transformations have different internal operation times and memory addresses. In the design, different memory access addresses should be designed for different points. At the same time, after the transformation is completed, the time when useful signals start to be output should be indicated.

brief introduction

Announce
edit
Fourier transform or Transformée de Fourier There are several Chinese translations, and the common ones are“ Fourier transform ”、“ fourier transform ”、“ Fourier Transform ”、“ Fourier transform ”、“ Fourier transform ”,, and so on.
Fourier transform is a method of analyzing signals. It can analyze the components of signals and synthesize signals with these components. Many waveforms can be used as components of signals, such as sine wave square wave Sawtooth wave Fourier transform uses sine wave as the component of signal.
F (t) is t Periodic function , if t meets Dirichlet condition : f (X) is continuous or only limited in a period of 2T Type I breakpoint , if f (x) is monotone or can be divided into finite monotone intervals, then the Fourier series of F (x) with 2T as the period converges, and the function S (x) is also a periodic function with 2T as the period, and at these discontinuity points, function Is a finite value; There are finite extreme points in a period; It is absolutely integrable. Then the formula ① in the following figure holds. Called integral operation f (t) Fourier transform
② The integral operation of formula is called F (ω) Inverse Fourier transform F (ω) is called f (t) Image function , f (t) is called
F (ω) Image primitive function F (ω) is the image of f (t). F (t) is the F (ω) primal image.
① Fourier transform
② Inverse Fourier transform
Fourier transform is used in physics, electronics number theory , combinatorial mathematics, signal processing, probability theory, statistics, cryptography, acoustics, optics, oceanography, structural dynamics and other fields have a wide range of applications (for example, in signal processing, the typical use of Fourier transform is to decompose the signal into frequency spectrum - display the magnitude corresponding to the frequency).

relevant

Announce
edit
*Fourier transform belongs to harmonic analysis.
*The inverse transform of Fourier transform is easy to find, and its form is very similar to the forward transform;
*Sinusoidal basis function is differential operation Eigenfunction So that linear differential equation The solution of can be converted into constant coefficient Solution of algebraic equations based on. invariant in linear time physical system The frequency is an invariable property, so the response of the system to complex excitation can be obtained by combining its responses to sinusoidal signals with different frequencies;
* Convolution theorem It is pointed out that Fourier transform can transform complex convolution operation into simple product operation, thus providing a simple means to calculate convolution;
*Discrete Fourier transform can be used digital computer The algorithm is called fast Fourier transform Algorithm (FFT)) [1]

Special transformation

Announce
edit
Continuous Fourier transform
In general, if the word "Fourier transform" is not preceded by any qualifier, it refers to“ Continuous Fourier transform ”。 "Continuous Fourier Transform" is a function whose square is integrable
The integral form expressed as a complex exponential function:
Continuous Fourier transform
The above formula actually represents the inverse transform of continuous Fourier transform, namely Time domain The function of is expressed as Frequency domain Function of
Integration of. Conversely, its positive transformation is just a function of the frequency domain
Expressed as Time domain Function of
The integral form of. General Weighable Function
Is the original function, but is called the function
It is the image function of Fourier transform. The original function and image function form a Fourier transform pair.
When
When it is an odd function (or even function), its cosine (or sine) component is zero, and the transformation at this time can be called cosine transform (or sine transform).
Fourier series
Main entry: Fourier series
The continuous form of Fourier transform is actually a generalization of Fourier series, because integral is actually a limit Formal summation operator. about Periodic function , its Fourier series representation is defined as:
among
Is the period of the function,
Are Fourier expansion coefficients, which are equal to
about Real valued function , Fourier series of function can be written as:
among
and
Is the amplitude of the real frequency component.
Discrete time Fourier transform
Discrete time Fourier transform (DTFT) is aimed at the number sequence whose definition domain is Z. set up
Is a sequence, its DTFT is defined as
The corresponding inverse transformation is
DTFT is discrete in time domain and periodic in frequency domain. It is generally used for spectrum analysis of discrete time signals. DTFT can be regarded as the inverse of Fourier series.
Discrete Fourier Transform
In order to use computers to carry out Fourier transform in the fields of scientific computing and digital signal processing, functions must be defined at discrete points rather than in the continuous domain, and must meet the finite or periodic conditions. In this case, the sequence
Of Discrete Fourier Transform (discrete Fourier transform, DFT) is
Its inverse transformation is
The calculation complexity directly calculated by using the definition of DFT is
, and fast Fourier transform (FFT) can improve the complexity to
The reduction of computational complexity and the development of computing power of digital circuits make DFT a very practical and important method in the field of signal processing.
Unified Description on Abelian Group
The above Fourier transforms can be more uniformly expressed as arbitrary locally compact Abelian group Fourier transform on. This problem belongs to harmonic analysis Category of. In harmonic analysis, a transformation changes from a group to its dual group. In addition, the convolution theorem, which links Fourier transform with convolution, has similar conclusions in harmonic analysis.
Fourier transform family
The following table lists the members of the Fourier transform family. It is easy to find that the dispersion of a function in the time (frequency) domain corresponds to the periodicity of its image function in the frequency (time) domain, whereas continuity means the aperiodicity of the signal in the corresponding domain.
Transformation proposal
Fourier [2] It is the name of a French mathematician and physicist. Its original English name is Jean Baptiste Joseph Fourier (1768-1830), Fourier was very interested in heat transfer and published a paper on the French Science Society in 1807, which described the temperature distribution using sine curves. There was a controversial decision in the paper at that time: any continuous periodic signal can be composed of a group of appropriate sine curves. At that time, two of the people who examined this paper were famous mathematicians in history Lagrange (Joseph Louis Lagrange, 1736-1813) and Laplace (Pierre Simon de Laplace, 1749-1827). When Laplace and other reviewers voted to publish this paper, Lagrange firmly opposed it. In the six years of his life after that, Lagrange insisted that Fourier's method could not represent signals with edges and corners, such as discontinuous change slopes in square waves. The French Academy of Sciences succumbed to Lagrange's prestige and rejected Fourier's work. Fortunately, Fourier had other things to do. He took part in the political movement and went on an expedition to Egypt with Napoleon. After the French Revolution, he had been fleeing because he would be pushed to the guillotine. It was not until 15 years after Lagrange's death that the paper was published.
Lagrange is right: sinusoidal curves cannot be combined into a signal with edges and corners. However, it can be represented very closely by a sine curve, and there is no energy difference between the two representations. Based on this, Fourier is right.
The reason why sinusoidal curve is used instead of square wave or triangular wave is that the method of signal decomposition is infinite, but the purpose of signal decomposition is to process the original signal more simply. It is simpler to use sine and cosine to represent the original signal, because sine and cosine have a property that the original signal does not have: sine curve fidelity. After a sine curve signal is input, the output is still a sine curve, only the amplitude and phase It may change, but the frequency and wave shape are still the same. And only the sine curve has such a property, which is why it is not represented by square wave or triangular wave.
Why use trigonometric function to expand
[3]
Why? [3] It should be explained from the angle of characteristic signal of physical system that trigonometric function is chosen instead of other functions for decomposition. Many phenomena in nature can be abstracted into one Linear time invariant system Whether it is described by differential equation, transfer function or state space. The linear time invariant system can be understood as follows: the input and output signals meet the linear relationship, and the system parameters do not change with time. For many systems in nature, after a sinusoidal signal is input, the output is still a sinusoidal curve. Only the amplitude and phase may change, but the frequency and wave shape are still the same. That is to say, the sine signal is systematic feature vector Of course, the exponential signal is also the eigenvector of the system, representing the attenuation or accumulation of energy. Most of the attenuation or diffusion phenomena in nature are exponential, or have both fluctuations and exponential attenuation (complex exponential
Therefore, the basis function with characteristics changes from trigonometric function to complex exponential function. However, if the input is a square wave, a triangle wave or some other waveform, the output may not be what it looks like. Therefore, all waveforms except exponential signals and sinusoidal signals are not characteristic signals of linear systems.
Continuous Fourier transform
The reason why the original curve is replaced by a sine curve instead of square wave, triangular wave or other functions is that the sine signal is just the eigenvector of many linear time invariant systems. Then there is the Fourier transform. For more general linear time invariant systems, the complex exponential signal (representing dissipation or attenuation) is the "eigenvector" of the system. So there it is Laplace transform The same is true for z transformation discrete system The Eigenvector of the. There is no distinction between the concept of eigenfunction and eigenvector here. The main idea is to express that they are the same, except that one is a finite dimensional vector and the other is an infinite dimensional function.
Fourier series and Fourier transform are actually the problems of eigenvalues and eigenvectors discussed previously. The method of signal decomposition is infinite, but the purpose of signal decomposition is to process the original signal more simply. In this way, it is simpler to use sine and cosine to represent the original signal, because sine and cosine have a property that the original signal does not have: sine curve fidelity. And only the sine curve has such properties.
This also explains why when we encounter a signal, we try to express it in the form of sine quantity or complex exponential quantity; Why is square wave or triangular wave so "simple", and we have to start so "troublesome"; Why is it that for an irregular "aperiodic" signal, we have racked our brains to expand it with sine quantity. Because the sine quantity (or complex exponent) is the eigenvector.
Time domain and frequency domain
The concept of time domain starts from the birth of a person, and the world you see runs through time. The trend of stocks, the height of people, and the trajectory of cars will change with time. This method of observing the dynamic world with time as a reference is called time-domain analysis. Humans also take it for granted that everything in the world is changing constantly with time and will never be static.
frequency domain Frequency domain is a coordinate system used to describe the frequency characteristics of signals. The language of linear algebra is the space containing the sine function. The most important property of frequency domain is that it is not real, but a mathematical structure. Frequency domain is a mathematical category that follows specific rules. Sine wave is the only waveform in the frequency domain, which is the most important rule in the frequency domain, that is, sine wave is the description of the frequency domain, because any waveform in the time domain can be synthesized by sine wave.
For a signal, the change rule of signal strength with time is the time domain characteristic, and the signal is composed of which single frequency signals is the frequency domain characteristic. [3]
Time domain analysis and frequency domain analysis are right signal The two viewing surfaces of the. Time domain analysis uses the time axis as the coordinate to express the relationship between dynamic signals; Frequency domain analysis is to change the signal to be expressed with the frequency axis as the coordinate. Generally speaking, the time domain representation is more vivid and intuitive, while the frequency domain analysis is more concise, and the analysis of problems is more profound and convenient. The trend of signal analysis is from time domain to frequency domain. However, they are interrelated, indispensable and complementary. One of the methods that run through the time and frequency domains is the legendary Fourier analysis. Fourier analysis can be divided into Fourier Series and Fourier Transformation.
Transformation classification
According to different types of original signals, Fourier transform can be divided into four categories:
1 Fourier Transform of aperiodic continuous signal
2 Fourier Series of periodic continuous signal
3 Discrete Time Fourier Transform of aperiodic discrete signal
4 Discrete Fourier Transform of periodic discrete signal
The following figure is the legend of four original signals:
Transformation classification
These four Fourier transforms are all for signals with positive infinity and negative infinity, that is, the length of the signal is infinite. We know that this is impossible for computer processing, and there is no Fourier transform with limited length. Because sine and cosine waves are defined from negative infinity to positive infinity, it is impossible to combine a signal with infinite length into a signal with finite length. In the face of this difficulty, the method is to represent the signal with finite length as the signal with infinite growth. The signal can be extended infinitely from left to right, and the extended part can be represented by zero. In this way, the signal can be regarded as a non periodic discrete signal, and the discrete time-domain Fourier transform method can be used. In addition, the signal can also be extended by copying, so that the signal becomes a periodic discrete signal, and then we can use the discrete Fourier transform method to transform. What we need to learn here is discrete signals, and we will not discuss continuous signals, because computers can only process discrete numerical signals, and the ultimate goal is to use computers to process signals.
But for non periodic signals, we need to use an infinite number of sine curves with different frequencies to express them, which is impossible for computers to achieve. Therefore, only the discrete Fourier transform (DFT) can be applied to the transformation of discrete signals, only discrete and finite length data can be processed for computers, and other transformation types can only be used in mathematical calculus. In front of computers, we can only use the DFT method, and what we want to understand later is DFT method. What we should understand here is that we use periodic signals to solve problems with mathematical methods. It is meaningless to consider where or how periodic signals are obtained.
Each Fourier transform is divided into two methods: real number method and complex number method. Real number method is best understood, but complex number method is much more complex and requires theoretical knowledge about complex number. However, if we understand real discrete Fourier transform (real DFT), it is easier to understand complex Fourier, so we first put complex Fourier aside, First, we will understand the real Fourier transform. Later, we will first talk about the basic theory of complex numbers, and then we will understand the complex Fourier transform on the basis of understanding the real Fourier transform.
As shown in the figure above, the four transformations of real signal are represented in time domain and frequency domain.
Representation of four transformations of real signal in time domain and frequency domain
Moreover, although the transformation we are talking about here is a mathematical transformation, it is different from the function transformation. The function transformation conforms to the one-to-one mapping criterion. For discrete digital signal processing (DSP), there are many transformations: Fourier transform, Laplace transform, Z transform, Hilbert transform discrete cosine transform These expand the definition of function transformation, allowing multiple values for input and output. In short, transformation is a method of transforming one heap of data into another.
Transformational meaning
Fourier transform is a very important algorithm in the field of digital signal processing. To understand the meaning of Fourier transform algorithm, we must first understand the meaning of Fourier principle. Fourier principle shows that any time sequence or signal measured continuously can be expressed as an infinite superposition of sine wave signals with different frequencies. The Fourier transform algorithm based on this principle uses the original signal directly measured to calculate the frequency, amplitude and phase of different sine wave signals in the signal in an accumulative manner.
Corresponding to Fourier transform algorithm is inverse Fourier transform algorithm. In essence, the inverse transform is also a kind of accumulation processing, so that the sine wave signal that is changed separately can be converted into a signal. Therefore, it can be said that Fourier transform transforms the time-domain signals that are difficult to process into frequency domain signals (signal spectrum) that are easy to analyze, and some tools can be used to process and process these frequency domain signals. Finally, these frequency domain signals can be converted into time domain signals using inverse Fourier transform.
From the perspective of modern mathematics, Fourier transform is a special integral transform. It can express a certain function satisfying certain conditions as a linear combination or integral of sine basis functions. In different research fields, Fourier transform has many different variants, such as continuous Fourier transform and discrete Fourier transform.
In the field of mathematics, although Fourier analysis was originally used as an analytical tool for thermal processes, its thinking method still has the characteristics of typical reductionism and analytism. "Any" function can be expressed in the form of linear combination of sine functions through certain decomposition, and sine functions are relatively simple functions that have been fully studied in physics: 1 Fourier transform is a linear operator, if given appropriate norms, it is still a unitary operator; 2. The inverse transform of Fourier transform is easy to find, and the form is very similar to the forward transform; 3. The sine basis function is differential So that the solution of linear differential equations can be transformed into the solution of algebraic equations with constant coefficients. In linear time, the complex convolution operation is a simple product operation, which provides a simple means to calculate convolution; 4. In the discrete Fourier physical system, the frequency is a constant property, so the response of the system to complex excitation can be obtained by combining its response to sinusoidal signals with different frequencies; 5. The famous convolution theorem points out that Fourier transform can be transformed into complex transform, which can be quickly calculated by digital computer (its algorithm is called fast Fourier transform algorithm (FFT)).
Because of the above good properties, Fourier transform has a wide range of applications in physics, number theory, combinatorial mathematics, signal processing, probability, statistics, cryptography, acoustics, optics and other fields.
Fourier transform of image
The frequency of the image represents that Grayscale The index of intensity of change is the gradient of gray level in plane space. For example, a large area of desert in the image is a slow gray change area, and the corresponding frequency value is very low; However, the edge region with intense surface attribute transformation is a region with intense gray level change in the image, and the corresponding frequency value is higher. Fourier transform has very obvious physical significance in practice. If f is an analog signal with limited energy, its Fourier transform represents the spectrum of f. In a purely mathematical sense, Fourier transform transforms a function into a series of periodic functions. In terms of physical effect, Fourier transform transforms the image from spatial domain to frequency domain, and its inverse transform transforms the image from frequency domain to spatial domain. In other words, the physical meaning of Fourier transform is to transform the grayscale distribution function of the image into the frequency distribution function of the image, and the inverse Fourier transform is to transform the frequency distribution function of the image into the grayscale distribution function.
Before Fourier transform, image (uncompressed bitmap )It is the collection of a series of points obtained by sampling in a continuous space (real space). We are accustomed to using a two-dimensional matrix to represent the points in the space, then the image can be represented by z=f (x, y). Since space is three-dimensional and image is two-dimensional, the relationship of objects in another dimension in space is represented by gradient, so we can know the corresponding relationship of objects in three-dimensional space by observing images. Why mention gradient The reason is that in fact, the two-dimensional Fourier transform is performed on the image to obtain the spectrum map, which is the distribution map of the image gradient. Of course, there is no one-to-one correspondence between the points on the spectrum map and the points on the image, even if the frequency is not shifted. In fact, the difference between a certain point on the image and its neighborhood points is the magnitude of the gradient, that is, the size of the frequency of the point (it can be understood that the low-frequency part of the image refers to the low gradient point, while the high-frequency part is the opposite). Generally speaking, if the gradient is large, the brightness of the point will be strong, otherwise the brightness will be weak. In this way, by observing the Fourier transform spectrum, also known as the power map, we can first see that the energy distribution of the image, if there are more dark points in the spectrum map, then the actual image is relatively soft (because there is little difference between each point and the neighborhood, and the gradient is relatively small). On the contrary, if there are more bright points in the spectrum map, then the actual image must be sharp, Well defined and on both sides of the boundary pixel The difference is large. After the frequency spectrum is shifted to the origin, it can be seen that the frequency distribution of the image is symmetrical with the origin as the center. Shifting the frequency spectrum to the center of the circle can not only clearly see the frequency distribution of the image, but also has the advantage that it can separate the interference signals with periodic laws, such as sinusoidal interference. A pair of sinusoidal interference can be seen on the spectrum diagram with the frequency shifted to the origin. In addition to the center, there is also a collection of symmetrically distributed bright spots centered on a certain point, This set is generated by interference noise. At this time, you can intuitively place a band stop at this position wave filter Eliminate interference.
In addition, the following points are explained:
1. After two-dimensional Fourier transform, the transformation coefficient matrix of the image shows that:
If the origin of the transformation matrix Fn is set at the center, its spectral energy is concentrated near the center of the transformation coefficient short matrix (shadow area in the figure). If the origin of the two-dimensional Fourier transform matrix Fn used is set at the upper left corner, the image signal energy will be concentrated on the four corners of the coefficient matrix. This is determined by the nature of two-dimensional Fourier transform itself. It also indicates that a stream of image energy is concentrated in the low-frequency area.
2. The four corners of the transformed image are low-frequency and brightest before the origin translation, and the middle part is low-frequency and brightest after the translation. The large brightness indicates that the low-frequency energy is large (the argument is relatively large).
Generalization of Fourier Transform
By extending its development, other forms of integral transformation have been constructed: [4]
Generalization of Fourier Transform
To understand integral transformation from a mathematical point of view is to change one function into another through integral operation. It can also be understood as "yes" inner product Then it becomes the projection of one function to another:
Kernel of K (s, t) integral transformation. When selecting different Integral domain When and transform the kernel, we can get the integral transform with different names. Academically speaking, it is to project into the nuclear space and transform the original problem into the nuclear space. The so-called nuclear space means that the space is filled with nuclear functions. The following table lists common transformations and their kernels:
Common transformations and their kernel functions
Of course, the choice of core depends on the characteristics of the problem you are facing. Different problems have different characteristics, which will correspond to specific kernel functions. Take the kernel function as the basis function. If the current coordinates are projected into the kernel space, the problem will be simplified. It is called nuclear because it is the core. Why are you only familiar with Fourier transform and Laplace transform when you haven't heard of other transforms? Because complex exponential signals are the characteristic functions that describe the world. [3]

example

Announce
edit
An Example of Real Discrete Fourier Transform (Real DFT)
Let's take a transformation example. The length of an original signal is 16, Then the signal can be decomposed into 9 cosine waves and 9 sine waves (A signal with length N can be decomposed into N/2+1 sine and cosine signals, because: combined with the following 18 sine and cosine graphs, I think it is not difficult to understand from the computer processing accuracy. A signal with length N can only have N/2+1 different frequencies at most, and any more frequencies will exceed the accuracy range that the computer can process), as shown in the following figure:
9 sine signals:
9 sine signals
9 cosine signals:
9 cosine signals
Add all the above signals to get the original signal. As for how to transform 9 different frequency signals respectively, let's not worry. Let's see how the above transformation results are represented in the program. Let's take a look at the following example:
Example Diagram
In the figure above, the left represents the signal in the time domain, the right represents the signal in the frequency domain, the left to right represents forward DFT, the right to left represents reverse DFT, the lower case x [] represents the amplitude value array of the signal at each time point, and the upper case X [] represents the amplitude value array of each frequency. Since there are N/2+1 frequencies, the array length is N/2+1, The X [] array can be divided into two types: Re X [] for different frequency amplitude values of the cosine wave, and Im X [] for different frequency amplitude values of the sine wave. Re means real, Im is an imaginary number, and the sine and cosine waves are combined in the complex representation method. But here we don't consider other functions of complex numbers, just remember that it is a combination method, for the purpose of easy expression (as we will know later, the length of Fourier transform in the complex form is N, not N/2+1).
Fourier transform with Matlab
FFT is a fast algorithm of discrete Fourier transform, which can transform a signal into frequency domain. It is difficult to see the characteristics of some signals in the time domain, but if they are transformed into the frequency domain, it is easy to see the characteristics. This is why many signal analysis uses FFT transform. In addition, FFT can extract the spectrum of a signal, which is often used in spectrum analysis.
Physical meaning of FFT results. An analog signal becomes a digital signal after ADC sampling. The sampling theorem tells us that the sampling frequency should be more than twice the signal frequency.
The sampled digital signal can be FFT transformed. The FFT results of N sampling points can be obtained after FFT. In order to facilitate FFT operation, N is usually taken to the integer power of 2.
Assume that the sampling frequency is Fs, the signal frequency is F, and the number of sampling points is N. Then the result after FFT is a complex number of N points. Each point corresponds to a frequency point. The modulus of this point is the amplitude characteristic at this frequency value. What is the specific relationship with the amplitude of the original signal? Assuming that the peak value of the original signal is A, the modulus of each point (except the DC component of the first point) of the FFT result is N/2 times of A. The first point is the DC component, and its modulus is N times of the DC component. The phase of each point is the phase of the signal at that frequency. The first point represents the DC component (i.e., 0Hz), while the next point of the last point N (actually this point does not exist, here is the hypothetical N+1 point, which can also be seen as dividing the first point into two halves, and moving the other half to the last) represents the sampling frequency Fs, which is divided into N equal parts by N-1 points, and the frequency of each point increases in turn. For example, the frequency represented by a point n is: Fn=(n-1) * Fs/N. It can be seen from the above formula that the frequency Fn can distinguish is Fs/N. If the sampling frequency Fs is 1024Hz and the number of sampling points is 1024, then 1Hz can be distinguished. The sampling rate of 1024Hz samples 1024 points, which is exactly 1 second. That is to say, if you sample a signal for 1 second and do FFT, the result can be analyzed to 1Hz. If you sample a signal for 2 seconds and do FFT, the result can be analyzed to 0.5Hz. If we want to improve the frequency resolution, we must increase the number of sampling points, that is, the sampling time. The relationship between frequency resolution and sampling time is reciprocal.
Suppose that a point n after FFT is represented by a complex number a+bi, then the module of this complex number is An=root sign a * a+b * b, and the phase is Pn=atan2 (b, a). According to the above results, we can calculate the expression of the signal corresponding to n points (n ≠ 1, and n<=N/2): An/(N/2) * cos (2 * pi * Fn * t+Pn), that is, 2 * An/N * cos (2 * pi * Fn * t+Pn). For the signal at point n=1, it is the DC component, and the amplitude is A1/N. Due to the symmetry of FFT results, we usually only use the first half of the results, that is, the results less than half of the sampling frequency.
Here is an actual signal. Suppose we have a signal, which contains a 2V DC component, an AC signal with a frequency of 50Hz, a phase of - 30 degrees and an amplitude of 3V, and an AC signal with a frequency of 75Hz, a phase of 90 degrees and an amplitude of 1.5V. The mathematical expression is as follows: S=2+3 * cos (2 * pi * 50 * t-pi * 30/180)+1.5 * cos (2 * pi * 75 * t+pi * 90/180). In the formula, cos parameter is radian, so - 30 ° and 90 ° should be converted into radian respectively. We use 256Hz sampling rate This signal is sampled for 256 points in total. According to our analysis above, Fn=(n-1) * Fs/N, we can know that the distance between every two points is 1Hz, and the frequency of the nth point is n-1. Our signal has three frequencies: 0Hz, 50Hz and 75Hz. The peak value should appear at the first point, the 51st point and the 76th point respectively, and the other points should be close to 0. What is the actual situation? Let's see the modulus of FFT results as shown in the figure.
From the figure, we can see that there are relatively large values near points 1, 51, and 76. Let's take a closer look at the data near these three points:
Example Diagram
1 point: 512+0i
2 points: -2.6195E-14 - 1.4162E-13i
3 points: -2.8586E-14 - 1.1898E-13i
50 points: -6.2076E-13 - 2.1713E-12i
51: 332.55 - 192i
52 points: -1.6707E-12 - 1.5241E-12i
75 points: -2.2199E-13 -1.0076E-12i
76 points: 3.4315E-12+192i
77 points: -3.0263E-14+7.5609E-13i
Obviously, the values of points 1, 51 and 76 are relatively large, and the values of points near them are very small, which can be considered as 0, that is, the signal amplitude at those frequency points is 0. Next, let's calculate the amplitude of each point. The modulus values of these three points are calculated respectively, and the results are as follows:
1 point: 512
51:00: 384
76: 192
According to the formula, the DC component can be calculated as: 512/N=512/256=2; Amplitude of 50Hz signal: 384/(N/2)=384/(256/2)=3; The amplitude of 75Hz signal is 192/(N/2)=192/(256/2)=1.5. It can be seen that the amplitude from the spectrum analysis is correct.
Then calculate the phase information. DC signal has no phase, so don't worry about it. First, calculate the phase of the 50Hz signal, atan2 (- 192, 332.55)=-0.5236, and the result is radians. When converted to an angle, it is 180 * (-0.5236)/pi=-30.0001. Then calculate the phase of the 75Hz signal, atan2 (192, 3.4315E-12)=1.5708 radians, which is converted into an angle of 180 * 1.5708/pi=90.0002. It can be seen that the phase is also correct. According to the FFT results and the above analysis and calculation, we can write the signal expression, which is the signal we started to provide.
Summary: Assuming that the sampling frequency is Fs and the number of sampling points is N, after FFT, the frequency represented by a point n (n starts from 1) is: Fn=(n-1) * Fs/N; The modulus of the point divided by N/2 is the amplitude of the signal at the corresponding frequency (divided by N for DC signals); The phase of this point is the phase of the signal at the corresponding frequency. The phase can be calculated with function atan2 (b, a). Atan2 (b, a) is the angle value of the point whose coordinates are (a, b), ranging from - pi to pi. To be accurate to xHz, it is necessary to sample the signal with a length of 1/x second and do FFT. To increase the frequency resolving power , you need to increase the number of sampling points, which is unrealistic in some practical applications, and you need to complete the analysis in a relatively short time. The solution to this problem is the frequency subdivision method. The simpler method is to sample a relatively short time signal, then add a certain number of zeros to make its length reach the required number of points, and then do FFT, which can improve the frequency resolution to a certain extent. Specific frequency subdivision method can refer to relevant literature.