Fourier Analysis

Most of the people in the tech field have already heard about Fourier analysis by now. Some of them love it, some of them hate it and the remaining few are just not sure what it is! Fourier analysis is one of the most fundamental tools in the field of engineering and technology. In fact, it is as fundamental as addition or multiplication. It is heavily used in signal processing, physics, speech analysis, image processing, cryptography and many more fields. Whenever people try to read and understand it, they are always hindered by all the mathematical equations. The actual explanation is drowned somewhere. Let’s see if we can fix that here.  

Why Fourier analysis?

Fourier analysis takes a signal and decomposes it into simpler pieces. It’s like you are given a big number and you don’t understand it. So you express it as a sum of smaller numbers. It’s not exactly like that, but let’s say it is for now. In real life, we get complex signals like speech, image, sonar waves etc. We cannot just look at them and understand what’s inside them. So we need a tool which can decompose those signals so that humans can understand what those signals contain.

How to do it?

In Fourier analysis, the sine wave is like the fundamental signal. The figure to the left represents a sine wave. Every signal can be expressed as a sum of many sine waves of different amplitudes and phases. Ok now what does that mean? It’s like how we can express any number as a weighted combination of 1 and 2. Consider 17 for example. It can be written as 17 = 7*1 + 5*2. Here 7 and 5 correspond to ‘amplitudes’. I will talk about phase later. There are other ways to express the number (1*1 + 8*2), but in Fourier analysis, there is only one way to decompose a signal. The numbers example is too simple to explain the complexity of Fourier analysis in its entirety, but it captures the gist of what I’m trying to say here.

Where do we use it in real life?

Let’s see how Fourier analysis is used in real life. We have all used music software one time or the other. We have seen those bars which do “equalization”. What exactly is that? An audio signal consists of different frequencies. Different singers, instruments, background etc combine together to form a musical piece. Now some frequencies tend to be dominant and some are not so dominant. We don’t want such inequalities. Fourier analysis decomposes the audio signal into different frequencies. We can then change those “amplitude” values and then reconstruct the audio signal using these new values. In our example, if we don’t want any ‘2’s, then instead of 7*1 + 5*2, we can do 7*1 + 0*2. This way we are suppressing all the ‘2’ components. If we reconstruct the number based on these new amplitudes, we get ‘7’. If you do this in audio, you will get an output which will not contain that particular frequency.

We are basically taking a time domain signal and transforming it into frequency domain. Time domain signal refers to a signal expressed in time scale where we can see what the value is at any given point of time. Frequency domain signal refers to the signal being expressed in the frequency scale where we can see all possible frequencies contained in the signal. When we consider image analysis, Fourier analysis can used to remove high frequency components, image compression, remove artifacts etc.

What is phase?

Remember we talked about phase earlier? It’s kinda difficult to understand the concept of phase unless you have dealt with signals and systems. Let me see if I can explain it here. If you consider the numbers example, phase refers to the amount of negativity. For example, we have 3 and -3. These are opposite numbers. If you add them, you will get 0. This is an example of two things being completely out of phase. In signals, we have control over the amount of negativity. We can place two signals in such a way that when you add them, they will cancel each other out. But, we can also place them in such a way that one signal will partially hinder the other one. This particular thing is useful when we want to produce a wave which lies somewhere in between the two given waves. Using 3 and -3, we cannot produce -1 or 2. In signals, we can do this by creating phase difference between the signals. This is critical because we cannot always just directly add two waves and get the third one.

Fourier analysis is a very deep field encompassing a vast region in mathematics. Fourier analysis is directly used in many different fields. The idea behind Fourier analysis is extended to create many different algorithms and techniques to analyze signals. When Joseph Fourier first came up with this more than 200 years ago, he was using this to understand heat propagation. Little did he know that this will become one of the fundamental building blocks of science, engineering and technology!







6 thoughts on “Fourier Analysis

  1. Any tutorial about how to do it in python? There are various examples in Scipy’s Documentation but they all take random numbers? If you could point to some real-life data example.

    Regarding your article, Much appreciated Prateek

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s