Classical Algorithm Research series: Ten, from beginning to end thoroughly understand the Fourier transform algorithm, the next
Author: July, Dznlong February 22, 2011
Recommended reading: Thescientist and Engineer ' s Guide to Digital Signal processing, by Steven W. Smith, Ph.D. This book address : http://www.dspguide.com/pdfbook.htm.
------------
Fully understand the Fourier transform algorithm from beginning to end,
Objective
The first part, DFT
The origin of the first chapter and Fourier transform
Second chapter, real-form discrete Fourier transform (real DFT)
fully understand the Fourier transform algorithm from beginning to end,
Chapter III, plural
The fourth chapter, the plural form discrete Fourier transform
Early review, in the previous article: 10, from beginning to end thoroughly understand the Fourier transform algorithm, we talked about the origin of Fourier transform, and real form discrete Fourier transform (real DFT) two problems,
In this paper, we focus on the complex and complex forms of discrete Fourier transform.
chapter III, plural
The plural expands the concept of numbers that we can generally understand, and the complex numbers contain both real and imaginary parts, and in the form of complex numbers, the expressions represented by two variables can be expressed by a variable (complex variable), making it more natural and convenient to deal with them.
We know that the results of the Fourier transform are made up of two parts, using the plural form to shorten the transformation expression, so that we can deal with a variable individually (which we can know more exactly in the later description), and that the fast Fourier transform is based on the plural form, So almost all of the described Fourier transform forms are in the form of complex numbers.
But the concept of plural is more than we can understand in our daily life, it is difficult to understand complex numbers, so it is very important to review the knowledge of complex numbers before we understand the complex Fourier transform.
The proposal of a plural
Here, let's look at a physics experiment: throw a ball up from a certain point, and then calculate the height of the ball based on the initial velocity and time, this method can be calculated according to the following formula:
Where h is the height, G represents the acceleration of gravity (9.8M/S2), v represents the initial velocity, and t represents the time. Now, in turn, if you know the height and the time required to calculate to this height, then we can calculate it by the following formula:
(thank Jerry_pri for his offer:
1, according to the formula h=-(GT2/2) +VT (the GT behind the 2 represents the square of T), we can discuss the final situation, that is, the ball movement to the highest point, V=GT, so you can get T=SQT (2h/g)
And in the formula you give, the square root is the/g (2h), the fraction form is (G-2H)/g,g and H can not directly do the addition and subtraction operation. 2, G is the acceleration of gravity, units are m/s2,h units is m, they subtract the words in the physical meaningless, and use the formula you gave back to the h=-(GT2/2) +gt AH (GT behind the 2 represents the square of T). 3, directly push to can be obtained T=V/G±SQT ((V2-2HG)/g2) (V and G after the 2 are square), then that is, when the V2<2HG will produce a complex number, but if from the actual v2 is not less than 2hg, so I feel that the plural can not be pushed from the actual start, Can only be explained from an abstract point of view.
)
After calculation we can know that when the height is 3 meters, there are two points of time to reach the height: the ball upward motion time is 0.38 seconds, the ball downward movement time is 1.62 seconds. But if the height equals 10 o'clock, what is the result? Based on the above equation, we can see that there is a square operation of negative numbers, and we know that this is definitely unrealistic.
The first person to use this unusual formula is the Italian mathematician Girolamo Cardano (1501-1576), two centuries after the German great mathematician Carl Friedrich Gause (1777-1855) proposed the plural concept, Paving the way for later applications, he says of the plural: the plural consists of real and imaginary (imaginary), and the square root negative 1 in the imaginary number is denoted by I (here we use J to denote the meaning of the current in the electrical science).
We can show the horizontal axis narimi number, the ordinate is expressed as imaginary, then the coordinates of each point of the vector can be expressed in complex numbers, as shown below:
The ABC three vectors in the image above can be expressed as follows:
A = 2 + 6j
B = -4–1.5j
C = 3–7j
This is to express the convenience of the use of a symbol can be two of the original difficult to link together, inconvenient is that we have to distinguish which is the real number and which is the imaginary, we generally use RE () and IM () to represent real and imaginary two parts, such as:
Re A = 2 Im a = 6
Re B =-4 Im b = 1.5
Re C = 3 Im c =-7
Subtraction operations can also be performed between complex numbers:
Here's a special place where the J2 equals-1, and the fourth is calculated by multiplying both the numerator and the denominator by C–DJ, thus eliminating j in the denominator.
The plural also conforms to the commutative law, the binding law and the distributive law in algebraic operations:
A B = b A
(A + b) + c = A + (b + c)
A (B + C) = AB + AC
the polar representation of a complex number
The above mentioned is the use of rectangular coordinates to represent complex numbers, in fact, more commonly used is the polar representation of the method, as shown below:
The M in the image above is the quantity product (magnitude), which represents the distance from the origin to the coordinate point, θ is the phase angle (phase angle), which represents the angle from the positive direction of the x-axis to a vector, and the following four formulas are the calculation methods:
We can also convert polar to rectangular coordinates using the following equation:
A + JB = M (cosθ+ j sinθθ)
In this equation, the left side is a Cartesian expression, and the right is a polar coordinate expression.
There is also a more important equation-the Euler equation (Euler, the famous Swiss mathematician, Leonhard euler,1707-1783):
ejx = cos x + j sin x
This equation can be proven in the following series transformations:
The two formulas on the right are the Taylor series of cos (x) and sin (x), respectively.
In this way, we can represent the expression of the plural as an exponential form:
A + JB = M ejθ (This is the two-expression of the plural)
The exponential form is the backbone of mathematical methods in digital signal processing, perhaps because the multiplication operation of complex numbers in exponential form is extremely simple:
The plural is a tool in mathematical analysis
Why use complex numbers? In fact, it's just a tool, like a nail and a hammer, the plural is like the hammer, as a tool to use. We express the problem to be solved in the form of plural (because some problems are more convenient in the form of complex numbers), then the complex numbers are calculated and then converted back to get the results we need.
There are two ways to use complex numbers, one to make simple substitutions with complex numbers, such as the previous vector expression method and the real domain DFT we discussed in the previous section, and the more advanced Method: Mathematical equivalence (mathematical equivalence), The Fourier transform of the plural is the mathematical equivalent, but here we are not going to discuss this approach, so let's take a look at the problem of replacing with complex numbers.
The basic idea of replacing with complex numbers is that the physical problem to be analyzed is converted into a plural form, which simply adds a complex number to the symbol J, and when it returns to the original physical problem, it simply removes the symbol J.
One thing to understand is that not all problems can be expressed in complex numbers, and it is important to see whether the analysis is applicable using complex numbers, and there is an example of the obvious fallacy of replacing the original problem with complex numbers: Suppose a box of apples is $5, a box of oranges is $10, so we represent it as 5 + 10j, One weeks you bought 6 boxes of apples and 2 boxes of oranges, and we represented it as 6 + 2j, and finally the total cost of the calculation was (5 + 10j) (6 + 2j) = ten + 70j, and the result was an apple cost of $10, an orange cost of $70, and the result was obviously wrong, Therefore, the plural form is not suitable for solving this problem.
The expression of the positive cosine function by the plural
For like M cos (ωt +φ) and a cos (ωt) + B sin (ωt) expressions, expressed in complex numbers, can become very concise, for the Cartesian form can be converted as follows:
The upper cosine amplitude A is transformed to generate a, the inverse number of the sine amplitude B is transformed to generate b:a <=> a,b<=>-B, but note that this is not an equation, just a substitution form.
For polar coordinates, the conversion can be as follows:
Above, M <=> m,θ<=>φ.
In this case, the part of the imaginary number is used in the form of negative numbers in order to be consistent with the complex Fourier transform expression, and for this substitution method to represent the positive cosine, the symbolic transformation has no advantage, but the substitution is always changed to maintain the formal consistency with the higher equivalence transformation.
In discrete signal processing, the use of complex forms to denote positive cosine wave is a common technique, because the results of various operations using complex numbers are consistent with the results of the original cosine operation, but we have to be careful with complex operations such as addition, subtraction, multiplication, and addition, some operations are not available, such as two sine signal addition, The result is the same as the result of the direct addition before the substitution, but if the two sine signals are multiplied, the result is different in the plural form. Fortunately, we have strictly defined the operation conditions of the sine cosine complex form:
1. The frequency of all positive cosine of the operation must be the same;
2, the operation must be linear, such as two sinusoidal signals can be added and reduced, but not multiplication, such as signal amplification, attenuation, high and low-pass filtering systems are linear, like the square, shorten, take the limit, etc. is not linear. Remember that convolution and Fourier analysis are only possible with linear operations.
The following figure is an example of a phasor transformation (we turn a sine or cosine wave into a complex form called phasor transformation, Phasor Transform), and a continuous signal wave generates another signal wave through a linear processing system, and from the computational process we can see that the computational changes are very concise by using the plural form:
In the second chapter we describe the real-form Fourier transform is also a substitution form of the complex transformation, but note that it is not a complex Fourier transform, but only a substitute way. In the next chapter, that is, the fourth chapter, we will know that the complex Fourier transform is a more advanced transformation than this simple substitution form.
The fourth chapter, the plural form discrete Fourier transform
The complex form of the discrete Fourier transform is a very clever use of the method of complex numbers, making the Fourier transform transformation more natural and concise, it is not simply to use the substitution method to use complex numbers, but completely from the perspective of complex numbers to analyze the problem, which is completely different from the real DFT.
The form of a positive cosine function as a plural
By Euler equation, the positive cosine function can be represented as a plural form:
cos (x) = Ejx E J (-X) +
Sin (x) = J (Ejx e J (-X)----)
As can be seen from this equation, if the positive cosine function is represented as a complex number, they become positive cosine wave consisting of positive and negative frequencies, and conversely, a positive cosine wave consisting of positive and negative frequencies, which can be expressed in the form of complex numbers.
We know that in the real Fourier transform, its spectrum is 0 ~π (0 ~ n/2), but cannot represent the spectrum of-π~ 0, it can be foreseen that if the positive cosine is expressed in the plural form, it can be included in the negative frequency.
Second, the variables before and after the transformation are considered plural forms
The complex form Fourier transform the original signal x[n] as a signal is represented by a complex number, where the real part of the original signal value, the imaginary part is divided into 0, the transformation result X[k] is also a plural form, but here the imaginary part is a value.
In order to see the original signal in the plural point of view, it is the key to understand the Fourier transform of the plural form (if you have learned the complex function it may be better understood that the x[n] is considered a complex variable, and then the complex variable is transformed as if it were a real number).
Iii. correlation algorithm for complex numbers (forward Fourier transform)
It is known from the real Fourier transform that we can multiply the original signal by multiplying it by an orthogonal function, and then we can get the sum of the orthogonal function signals contained in the original signal.
Now that our original signal has become a complex number, what we are going to get is the signal component of the plural, can we multiply it by a complex form of orthogonal function? The answer is yes, the sine cosine function is an orthogonal function, the following form of the complex number, is still an orthogonal function (the definition from the orthogonal function can be easily proved):
Cos x + j sin x, cos x–j sin x, ...
Here we use the second formula above for the correlation summation, why use the second formula?, we will know in the future, the sine function in the imaginary number of the transformation is a negative sine function, here we add a minus sign, so that the final result is a positive sine wave, According to this, we can easily get the DfT forward transformation equation in the plural form:
It's easy to get the Euler transformation equation:
In fact, we are in order to express the convenience of using Euler transformation, in solving the problem we still more use of the positive cosine expression.
For the above equation, we need to understand the following aspects (also different from the real-number DfT):
1, X[k], x[n] are complex, but the imaginary part of X[n] is composed of 0, the real part represents the original signal;
2, K of the value range is 0 ~ N-1 (can also be expressed as 0 ~ 2π), where 0 ~ n/2 (or 0 ~π) is the positive frequency portion,
N/2 ~ N-1 (π~ 2π) is the negative frequency part, because of the symmetry of the positive cosine function, so we put –π~ 0 as π~ 2π, which is for the convenience of calculation.
3, wherein J is an inseparable component, like a variable in an equation, can not be arbitrarily removed, the meaning is completely different after removal, but we know that in the real DFT, J is only a symbol, j removed, the meaning of the whole equation is unchanged;
4, the following figure is a continuous signal spectrum, but the discrete spectrum is similar to this, so does not affect our analysis of the problem:
The spectrum chart above puts the negative frequency on the left to cater to our thinking habits, but in practical
In the present, we usually move it to the back of the positive spectrum.
As can be seen from the above figure, the positive cosine wave in the time domain (the positive cosine wave used to form the original signal) is divided into two components of the positive and negative frequencies in the spectrum of the complex DfT, based on the 1/n (or 1/2π) of the preceding scale factor, rather than 2/n, because the spectrum is now extended to 2π, But the addition of the plus and minus two frequencies has been 2/n and reverted to the form of the real DFT, which can be seen more clearly in the following description.
Since the complex DFT generates a complete spectrum, each point in the original signal is composed of positive and negative two frequencies, so the bandwidth of each point in the spectrum is the same, it is 1/n, relative to the real DFT, and the bandwidth of the two ends is less than half the bandwidth of the other points; the spectral characteristics of the complex DFT are periodic:-N /2 ~ 0 is the same as N/2 ~ N-1, the real-domain spectrum is even symmetric (representing the cosine wave spectrum), and the virtual domain spectrum is singularly symmetric (representing the sine wave spectrum).
iv. Inverse Fourier transform
Suppose we have obtained the plural form of the spectrum X[k], now to restore it to the plural form of the original signal x[n], of course, should be the x[k] multiplied by a complex number, and then summed, and finally get the original signal x[n], this with x[k] The multiplication of complex numbers first reminds us of the complex number above which the correlation is calculated:
cos (2πkn/n) –j si (2πkn/n),
But the minus sign in fact is to make the inverse Fourier transform the sine function into a positive sign, because the arithmetic of the imaginary J, so that the original should be positive sine function into a negative sine function (we will see this from the derivation later), so here the minus is just to correct the role of the symbol, In reverse DFT, we can remove the minus sign, so we get the inverse DFT transformation equation:
X[n] = x[k] (cos (2πkn/n) + j sin (2πkn/n))
Now we're going to analyze this equation, and we'll see that this formula actually has the same result as the real Fourier transform. Let's change the x[k] a bit first:
X[k] = Re X[k] + j Im X[k]
This allows us to transform the x[n] again, such as:
X[n] = (Re x[k] + j Im x[k]) (cos (2πkn/n) + j sin (2πkn/n))
= (Re x[k] cos (2πkn/n) + j Im x[k] cos (2πkn/n) +j Re x[k] sin (2πkn/n)-Im x[k] sin (2πkn/n))
= (Re x[k] (cos (2πkn/n) + j sin (2πkn/n)) +---------------------(1)
Im x[k] (-sin (2πkn/n) + j cos (2πkn/n)))---------------(2)
Then we divide the original equation into two parts, the first part is multiplied by the spectrum in the real domain, the second part is multiplied by the spectrum in the virtual domain, and according to the spectrogram we know that Re X[k] is an even symmetric variable, and Im x[k] is an odd symmetric variable, namely
Re x[k] = re x[-K]
Im x[k] =-Im x[-k]
But the range of K is 0 ~ n-1,0~n/2 for positive frequency, n/2~n-1 for the negative frequency, in order to express the convenience we put n/2~n-1 with-K to express, so that in the summation from 0 to N-1 for (1) and (2) respectively, there are n/2 pairs of k and K and, for (1) formula is:
Re x[k] (cos (2πkn/n) + j sin (2πkn/n)) + Re x[-K] (cos (-2πkn/n) + j sin ( -2πkn/n))
According to the properties of the even symmetry and trigonometric functions, the method of simplification is obtained:
Re x[k] (cos (2πkn/n) + j sin (2πkn/n)) + Re x[K] (cos (2πkn/n)-J sin (2πkn/n))
The final result of this equation is:
2 Re x[K] cos (2πkn/n).
Consider the re x[K] equation with a scale factor 1/n, multiply the 1/n by 2, so the result is not the same as the real DFT.
For the (2) formula, we can also get the result in the same way:
-2 Im x[k] sin (2πkn/n)
Note that there is a negative sign in front of the type, this is due to the particularity of the imaginary transformation, of course, we certainly can not add the sine function of negative sign with cosines, fortunately, we are using cos (2πkn/n) –j sin (2πkn/n) for correlation calculation, the resulting IM x[k] has a negative symbol , so the final result is that there is no negative sign in the sine function, which is why it is necessary to use the negative symbol for the imaginary part in the correlation calculation (I think this may be a part of the complex form of DFT, which makes people have a patchwork feeling).
From the above analysis, it can be seen that the real Fourier transform with the complex Fourier transform, in the inverse transformation of the results obtained is the same, but the same as the same. The end of this article. (July, Dznlong)
I July all the articles, content and materials of this blog to enjoy copyright.
Reprint must indicate the author himself and the source, and inform himself. February 22, 2011.