Fourier Transform Analysis

Author: Han Hao

Zhihu: Heinrich

Weibo: @peanut oil worker

Zhihu column: Stories that have nothing to do with time

I would like to present this document to Mr. Wu Nan, Mr. Liu Xiaoming, Mr. Wang Xinnian and Mr. Zhang Jingbo of Dalian Maritime University.

Reprinted students please keep the above sentence, thank you. It would be even more grateful if the source of the article can be preserved.

——Updated on June 6, 2014, students who want to read the update directly can skip to Chapter 4———

I guarantee that this article is different from all the articles you have read before. This article was written when I was still in the shell in 2012, but I went abroad before I could finish it... So it dragged on for two years, um, I am Procrastinator...
The core idea of ​​this article is:

Let the reader understand Fourier analysis without looking at any mathematical formulas.

Fourier analysis is not only a mathematical tool, but also a thinking mode that can completely subvert a person's previous worldview. But unfortunately, the formula of Fourier analysis seems too complicated, so many freshmen are confused and hate it since then. Honestly, it's too serious to have to blame the people who wrote the textbook for something so interesting to become a killer course in college. (Will you die if you write the textbook more fun? Will you die?) So I have always wanted to write an interesting article to explain Fourier analysis, if possible, the kind that high school students can understand. So, no matter what kind of work you are doing after reading this, I guarantee that you can understand it, and you will definitely experience the thrill of seeing the world another way through Fourier analysis. As for friends who already have a certain foundation, I also hope that you don’t have to turn back in a hurry when you see the meeting. If you read it carefully, you will definitely find new discoveries.

———The above is the setting poem———

Let's get to the point:

Sorry, I still have to say something long-winded: In fact, learning is not easy. My original intention of writing this article is also to hope that everyone can learn more easily and full of fun. But please! Don't bookmark this article, or save the address, thinking in your heart: read it later when you have time. There are so many examples like this, maybe you don't open this page again in a few years. Anyway, be patient and read on. This article is much easier and more enjoyable than reading a textbook...

ps In this paper, whether it is cos or sin, the term "sine wave" (Sine Wave) is used to represent simple harmonics.

1. What is the frequency domain

Since we were born, the world we see runs through time, and the trend of stocks, the height of people, and the trajectory of cars will all change with time. This method of observing the dynamic world with time as a reference is called temporal analysis. And we also take it for granted that everything in the world is constantly changing with time and will never stand still. But if I tell you that if you look at the world in another way, you will find that the world is eternal, will you think I am crazy? I'm not crazy, this static world is called the frequency domain.

Let me give you an example that is not very appropriate in terms of formula, but is more appropriate in meaning:

In your understanding, what is a piece of music?
insert image description here
This is our most common understanding of music, a vibration that changes over time. But I believe that for young instrumentalists, a more intuitive understanding of music is this:
insert image description here
OK! get out of class is over, goodbye, classmates.

Yes, in fact, this paragraph can be finished here. The top image is what the music looks like in the time domain, and the bottom image is what the music looks like in the frequency domain. So the concept of frequency domain is never unfamiliar to everyone, but they have never realized it.

Now we can go back and look at the idiot's dreamlike sentence at the beginning: the world is eternal.

Simplify the above two diagrams:

Time domain:
insert image description here
Frequency domain:
insert image description here
In the time domain, we observe that the piano strings swing up and down for a while, just like the trend of a stock; while in the frequency domain, there is only that one eternal note.

so

In your eyes, it seems that the fallen leaves are flying and the ever-changing world is actually just a piece of music that has already been composed in the arms of God.

Sorry, this is not a chicken soup text, but a conclusive formula on the blackboard: Mr. Fourier told us that any periodic function can be regarded as the superposition of sine waves with different amplitudes and different phases. In the first example, we can understand that any piece of music can be combined by tapping on different keys with different strengths and at different time points.

One of the methods that runs through the time domain and the frequency domain is the legendary Fourier analysis. Fourier analysis can be divided into Fourier series (Fourier Serie) and Fourier transformation (Fourier Transformation), let's start with a simple one.

2. Spectrum of Fourier Series

It is better to give a chestnut and have a picture and the truth to understand.

Would you believe me if I said that I could superimpose a rectangular wave with a 90-degree angle by using the sine wave mentioned above? You won't, just like me back then. But look at the picture below:
insert image description here
the first picture is a depressing sine wave cos(x)

The second picture is the superposition of 2 cute sine waves cos(x)+a.cos(3x)

The third picture is the superposition of 4 springing sine waves

The fourth picture is the superposition of 10 constipation sine waves

As the number of sine waves gradually increases, they will eventually superimpose into a standard rectangle. What do you understand from this?

(As long as you work hard, you can straighten any bends!)

As the superposition increases, the rising part of all the sine waves gradually makes the originally slowly increasing curve steeper, and the falling part of all the sine waves cancels out the part that continues to rise when it rises to the highest point, making it a horizontal line. A rectangle is superimposed in this way. But how many sine waves are added to form a standard 90-degree square wave? Unfortunately, to tell you, the answer is infinitely many. (God: Can I make you guess me?)

Not just rectangles, any waveform you can think of can be superimposed with sine waves in this way. This is
the first intuitive difficulty for people who have not been exposed to Fourier analysis, but once such a setting is accepted, the game begins to be interesting.

The sine waves in the above figure are still accumulated to form a rectangular wave. Let’s look at it from another angle:
insert image description here
In these figures, the black line at the front is the sum of all the sine waves superimposed, which is getting closer and closer to the rectangular wave. that graphic. The sine waves arranged in different colors are the components that are combined into rectangular waves. These sine waves are arranged front to back in order of frequency from low to high, and each wave has a different amplitude. Careful readers must have discovered that there is a straight line between every two sine waves, which is not a dividing line, but a sine wave with an amplitude of 0! That is to say, in order to form a special curve, some sine wave components are not needed.

Here, sine waves of different frequencies we call frequency components.

Well, here comes the key point! !

If we regard the first frequency component with the lowest frequency as "1", we have the most basic unit for constructing the frequency domain.

For our most common rational number axis, the number "1" is the basic unit of the rational number axis.

The basic unit of the time domain is "1 second". If we regard a sine wave cos(t) with angular frequency as the basis, then the basic unit of the frequency domain is.

With "1", there must be "0" to form the world, so what is the "0" in the frequency domain? cos(0t) is a sine wave with an infinite period, that is, a straight line! So in the frequency domain, the 0 frequency is also called the DC component. In the superposition of the Fourier series, it only affects the entire waveform relative to the number axis as a whole up or down without changing the shape of the wave.

Next, let's go back to junior high school and recall the dead Bajie, ah no, how did the dead teacher define a sine wave.

insert image description here
A sine wave is the projection of a circular motion onto a straight line. Therefore, the basic unit in the frequency domain can also be understood as a circle that is always rotating.
insert image description here
It is a pity that Zhihu cannot transmit dynamic pictures...

Students who want to see the animation please click here:

File:Fourier series square wave circles animation.gif

insert image description here

and here:
File:Fourier series sawtooth wave circles animation.gif

Friends who click out should not be abducted by the wiki, the articles written by the wiki are so unscrupulous, right?

After introducing the basic components of the frequency domain, we can take a look at another appearance of a rectangular wave in the frequency domain:
insert image description here
what is this strange thing?

This is what a rectangular wave looks like in the frequency domain, is it completely unrecognizable? Textbooks generally end here and leave readers with endless reverie and endless complaints. In fact, it is enough to add a picture in the textbook: frequency domain image, also known as spectrum, is—to be clearer: you
insert image description here
can
insert image description here
find , in the frequency spectrum, the amplitudes of the even items are all 0, which corresponds to the colored straight line in the figure. A sine wave with amplitude 0.

Please click on the animation:

File:Fourier series and transform.gif

To be honest, when I was learning Fourier transform, the picture in Wikipedia hadn’t appeared yet, and I thought of this expression method at that time, and I will add another spectrum that Wikipedia didn’t show—the phase spectrum.

But before we talk about the phase spectrum, let's review what the example just now means. Remember the phrase "the world is static" I said earlier? It is estimated that many people have complained about this sentence for a long time. Imagine that every seemingly chaotic appearance in the world is actually an irregular curve on the time axis, but these curves are actually composed of these endless sine waves. What we seem to be irregular is the projection of a regular sine wave in the time domain, and the sine wave is the projection of a rotating circle on a straight line. So what picture does it create in your mind?

The world in our eyes is like the big curtain of a shadow puppet show. Behind the curtain are countless gears. The big gear drives the small gear, and the small gear drives the smaller ones. On the outermost pinion there's a little person - that's us. We only see this villain performing irregularly in front of the curtain, but we cannot predict where he will go next. But the gears behind the curtain are always spinning like that, never stopping. That sounds a bit fatalistic. To be honest, this description of life was lamented by a friend of mine when we were both high school students. At that time, I didn’t understand it when I thought about it, until one day I learned Fourier series...

3. Phase Spectrum of Fourier Series

The key words of the last chapter are: from the side. The key words of this chapter are: look from below.

At the beginning of this chapter, I want to answer a question that many people ask: What is Fourier analysis for? This section is relatively boring, and students who already know it can skip directly to the next dividing line.

Let me talk about the most direct use first. Whether listening to the radio or watching TV, we must be familiar with a word - channel. Channel A channel is a channel of frequencies. Different channels use different frequencies as a channel to transmit information. Let's try one thing:

First draw a sin(x) on the paper, it doesn't have to be standard, the meaning is about the same. It's not that hard.

Ok, let's draw a sin(3x)+sin(5x) graph.

Don't say the standard is not standard, you don't necessarily draw when the curve rises and when it falls, right?

Well, it doesn’t matter if you can’t draw it, I will give you the curve of sin(3x)+sin(5x), but the premise is that you don’t know the equation of this curve, now you need to give me sin(5x) and take it out of the picture , and see what's left. This is basically impossible.

But what about in the frequency domain? It is very simple, nothing more than a few vertical lines.

So many mathematical operations that seem impossible in the time domain are very easy in the frequency domain. This is where the Fourier transform is needed. Especially removing some specific frequency components from a certain curve, which is called filtering in engineering, is one of the most important concepts in signal processing, and can only be easily done in the frequency domain.

Let me talk about a more important, but slightly more complicated use-solving differential equations. (This section is a bit difficult, you can skip this section if you don't understand it) I don't need to introduce too much about the importance of differential equations. All walks of life are used to. But solving differential equations is a rather cumbersome thing. Because in addition to calculating addition, subtraction, multiplication and division, you also need to calculate differential integrals. The Fourier transform can turn differentiation and integration into multiplication and division in the frequency domain, and college mathematics instantly changes to primary school arithmetic.

Of course, Fourier analysis has other more important uses, and we will mention it as we talk.

————————————————————————————————————

Let's continue to talk about the phase spectrum:

Through the transformation from the time domain to the frequency domain, we get a spectrum viewed from the side, but this spectrum does not contain all the information in the time domain. Because the spectrum only represents the amplitude of each corresponding sine wave, without mentioning the phase. In the basic sine wave A.sin(wt+θ), amplitude, frequency, and phase are indispensable, and different phases determine the position of the wave. Therefore, for frequency domain analysis, only the spectrum (amplitude spectrum) is not enough. We also have A phase spectrum is required. So where is this phase spectrum? Let's look at the picture below. This time, in order to avoid the picture being too confusing, we use a picture superimposed by 7 waves.
insert image description here
Since sine waves are periodic, we need to set something that marks the position of the sine wave. In the picture are those little red dots. The little red dot is the peak closest to the frequency axis, and how far is this peak from the frequency axis? In order to see it more clearly, we project the red point to the lower plane, and we use the pink point to represent the projected point. Of course, these pink dots only mark the distance of the peak from the frequency axis, not the phase.
insert image description here
A concept needs to be corrected here: the time difference is not the phase difference. If the entire cycle is regarded as 2Pi or 360 degrees, the phase difference is the proportion of the time difference in one cycle. We divide the time difference by the period and multiply by 2Pi to get the phase difference.

In the complete stereogram, we divide the time difference obtained by the projection by the period of the frequency in turn to obtain the bottom phase spectrum. So, the spectrum is viewed from the side, and the phase spectrum is viewed from below.

Note that the phase in the phase spectrum is Pi except for 0. Because cos(t+Pi)=-cos(t), the wave whose phase is Pi is actually just flipped upside down. For the Fourier series of periodic square waves, such a phase spectrum is already very simple. It is also worth noting that since cos(t+2Pi)=cos(t), the phase difference is periodic, and pi and 3pi, 5pi, and 7pi are all the same phase. The value range of the artificially defined phase spectrum is (-pi, pi], so the phase difference in the figure is Pi.

Finally, a big collection:
insert image description here

4. Fourier Transformation

I believe that through the first three chapters, everyone has a new understanding of frequency domain and Fourier series. But I said at the beginning of the article about the example of the piano score that this chestnut is a formula error, but a typical example of the concept. Where is the so-called formula error?

The essence of Fourier series is to decompose a periodic signal into infinitely many separate (discrete) sine waves, but the universe does not seem to be periodic. I once wrote a doggerel when I was studying digital signal processing:

The past is continuous and non-periodic, and
the memory cycle is not continuous.
You can't go back to ZT or DFT if you
want to restore it.

(Please ignore my scumbag literary level...)

In this world, some things happen once and for a while, and will never come again, and time has never stopped marking those unforgettable pasts on time points continuously. But these things often become our extraordinarily precious memories, which pop up periodically in our brains after a period of time. Unfortunately, these memories are scattered fragments, often only the happiest memories, while the plain memories are gradually forgotten by us. Because the past is a continuous non-periodic signal, but memory is a periodic discrete signal.

Is there a mathematical tool to transform a continuous non-periodic signal into a periodic discrete signal? Sorry, not really.

For example, the Fourier series is a periodic and continuous function in the time domain, while it is a non-periodic discrete function in the frequency domain. This sentence is a bit of a mouthful, but I can simply recall the pictures in the first chapter after looking at the trouble.

The Fourier transform we will talk about next is to convert a non-periodic continuous signal in the time domain into a non-periodic continuous signal in the frequency domain.

Forget it, let’s make the last picture easier for everyone to understand:
insert image description here
Or we can understand it from another angle: Fourier transform is actually a Fourier transform of a function with an infinite period.

Therefore, the piano score is actually not a continuous spectrum, but many discrete frequencies in time, but it is really difficult to find a second one for such an appropriate metaphor.

Therefore, the Fourier transform changes from a discrete spectrum to a continuous spectrum in the frequency domain. So what does the continuum look like?

Have you ever seen the sea?

In order to facilitate your comparison, we look at the spectrum from another angle this time, which is the picture most used in the Fourier series, and we look at it from the direction of higher frequency.
insert image description here
The above is a discrete spectrum, so what does a continuous spectrum look like?

Use your imagination to your heart's content, imagine these discrete sine waves getting closer and closer, gradually becoming continuous...

Until it becomes like the undulating sea:
insert image description here
Sorry, in order to make these waves more clearly visible, I did not choose the correct calculation parameters, but chose some parameters to make the picture more beautiful, otherwise the picture would look like Shit is the same.

However, by comparing these two pictures, everyone should be able to understand how to change from a discrete spectrum to a continuous spectrum, right? The superposition of the original discrete spectrum has become the accumulation of the continuous spectrum. Therefore, the calculation has also changed from the summation sign to the integral sign.

However, this story is not finished yet. Next, I promise you to see a more beautiful and spectacular picture than the one above, but here we need to introduce a mathematical tool to continue the story. This tool is——

5. The first formula for being handsome in the universe: Euler's formula

Everyone has come into contact with the concept of imaginary number i in high school, but at that time we only knew that it is the square root of -1, but what is its real meaning? At the same time,
insert image description here
we obtained a vertical imaginary number axis. The real number axis and the imaginary number axis together form a plane of complex numbers, also known as the complex plane. In this way, we understand that multiplying a function of the imaginary number i-rotation.

Now, there is the grand debut of Euler's formula, the first handsome formula in the universe——

insert image description here

The significance of this formula in the field of mathematics is far greater than that of Fourier analysis, but it is the first handsome formula in the universe because of its special form-when x is equal to Pi.

insert image description here

Often, science and engineering students use this formula to explain the beauty of mathematics to their girls in order to show their academic skills: "Sister Pomegranate, look, this formula includes the natural base e, the natural numbers 1 and 0, the imaginary number i, and pi pi, it's so simple and beautiful!" But girls often only have one sentence in their hearts: "Stinky dick..."

The key function of this formula is to unify the sine wave into a simple exponential form. Let's take a look at the meaning of the image:
insert image description here
what Euler's formula depicts is a point that moves in a circle on the complex plane as time changes, and becomes a spiral on the time axis as time changes. If you only look at its real number part, that is, the projection of the spiral on the left side, it is the most basic cosine function. The projection on the right is a sine function.

For a deeper understanding of complex numbers, you can refer to:

What is the physical meaning of complex numbers?

It doesn't need to be too complicated here, just enough for everyone to understand the content behind it.

6. Exponential Fourier Transform

With the help of Euler's formula, we know that the superposition of sine waves can also be understood as the projection of the superposition of spirals in real number space. And what is the superposition of spiral lines if we use an image of a chestnut to understand it?

light wave

We learned in high school that natural light is made up of superimposed lights of different colors, and the most famous experiment is Master Newton’s prism experiment: so
insert image description here
we actually came into contact with the spectrum of light very early, but we didn’t understand that the spectrum is more important meaning.

But the difference is that the spectrum obtained by Fourier transform is not only the superposition of a limited frequency range such as visible light, but the combination of all frequencies from 0 to infinity.

Here, we can understand sine waves in two ways:

The first kind has been mentioned before, which is the projection of the helix on the real axis.

The other needs to be understood with another form of Euler's formula:

insert image description here

Add the above two equations and divide by 2 to get:

insert image description here

How can this formula be understood?

As we just said, e (it) can be understood as a spiral that rotates counterclockwise, and e (-it) can be understood as a spiral that rotates clockwise. And cos(t) is half of the superposition of these two spirals with different rotation directions, because the imaginary parts of these two spirals cancel each other out!

For example, two beams of light waves with different polarization directions, the magnetic field cancels, and the electric field doubles.

Here, the anticlockwise rotation is called positive frequency, and the clockwise rotation is called negative frequency (note that it is not complex frequency).

Well, we have just seen the sea - the continuous Fourier transform spectrum, now think about what a continuous spiral would look like:

Imagine scrolling down further:

|

|

|

|

|

|

|

|

|
insert image description here
Isn't it beautiful?

Can you guess what this graph looks like in the time domain?
insert image description here
Haha, do you feel like you were slapped hard? Mathematics is such a thing that makes simple problems very complicated.

By the way, for the convenience of viewing the big conch-like picture, I only show the positive frequency part, and the negative frequency part is not shown.

If you look carefully, each spiral on the conch diagram can be clearly seen, and each spiral has a different amplitude (radius of rotation), frequency (period of rotation) and phase. And connecting all the spiral lines into a plane is the picture of the conch.

Well, at this point, I believe that everyone has a vivid understanding of Fourier transform and Fourier series. Let's finally use a picture to summarize: Well, the
insert image description here
story of Fourier is finally finished , Let me tell my story:

You will never guess where this article was written for the first time, it was on a paper for the high mathematics exam. At that time, I retook the advanced mathematics (Part 1) in order to score points, but later I didn’t review at all due to time constraints, so I went to the examination room with the mentality of taking the exam naked. But when I arrived at the exam room, I suddenly realized that I would never do better than the last exam anyway, so I just wrote some of my thoughts on mathematics. So it took about an hour to write the first draft of this article on the test paper.

Guess how many points I got?

6 points

That's right, that's the number. And the score of 6 points is because I was really bored in the end, so I filled in all the multiple choice questions with C. I should have scored two questions and got this precious 6 points. To be honest, I really hope that paper is still there, but it should be unlikely.

So guess how many points I scored in the first signal and system test?

45 points

That's right, just enough to take the make-up exam. But I decided not to take the exam and decided to retake it. Because I was busy with other things that semester, my studies were really left behind. But I know this is a very important class, and I have to understand it anyway. To be honest, the course of signals and systems is almost the foundation of most engineering courses, especially communication majors.

In the process of rebuilding, I carefully analyzed each formula, trying to give this formula an intuitive understanding. Although I know that for people who study mathematics, such a learning method has no future at all, because as the concept becomes more abstract and the dimension becomes higher and higher, this kind of image or model understanding method will completely lose its effect. But for an engineering student, enough.

Later, when I came to Germany, when the school here asked me to rebuild the signal and system, I was completely speechless. But there is no way, Germans sometimes have a kind of contempt for Chinese people, thinking that your education is unreliable. So there is no way, let's do it again.

This time, I got full marks in the test, but the pass rate was only half.

To be honest, mathematical tools have completely different meanings for engineering students and science students. It is enough for engineering students to understand, use, and check. But many colleges and universities teach these important mathematics courses to teachers in the mathematics department. In this way, a problem arises. The math teacher talks about the hype, reasoning and proof, but there is only one sentence in the student's mind: What is the use of learning this stuff?

Education without purpose is a complete failure.

When starting to learn a mathematical tool, students do not know the function and practical meaning of this tool at all. However, in the textbooks, there are only obscure and difficult concepts, the attributives are only about two dozen words, and the formulas that make the eyes dizzy after reading them. It's strange to be interested in learning!

Fortunately, I was very lucky to meet Mr. Wu Nan from Dalian Maritime University. Throughout his class, there are two clues, one from top to bottom and one from bottom to top. First talk about the meaning of this course, and then point out what kind of problems will be encountered in this course, so that students can know the role of a certain knowledge they have learned in reality. Then start from the basics, sort out the knowledge tree, until it extends to the questions raised in another clue, and they are perfectly connected together!

I think this kind of teaching mode should appear in universities.

Finally, write to all the students who have liked me and left messages. Thank you so much for your support, and sorry for not being able to reply to everyone. Because the comments in the Zhihu column have to be loaded one by one, in order to see the last point, load it many times. Of course, I insisted on reading all of them, but I couldn't reply one by one.

This article only introduces a novel understanding method of Fourier analysis. For studying, you still have to figure out the formulas and concepts in a down-to-earth manner. There is really no shortcut to learning. But at least through this article, I hope to make this long road a little bit more interesting.

Finally, I wish you all the fun in your studies.

Guess you like

Origin blog.csdn.net/yanceyxin/article/details/126116774
Recommended