Tiberia Todeila

Categories

Complex numbers are an important aspect of Fourier transform algorithm. The complex numbers can be expressed as **z = a + bi**, where **a** & **b**: real numbers; **i**: an imaginary number which represents the solution for the x2= -1 (this is considered as imaginary number since none of the real numbers can have that solution).

A graph below shows how you can represent complex numbers on a diagram. **Argand diagram** allows you to have a geometric representation of complex numbers; we have the real part of the complex numbers on on the x-axis and the imaginary part on the y-axis.

Every component from the time domain and the frequency domain is described by signals which contain N complex points. Each of these points are formed by real and imaginary parts that describe the signal components. One of the real-world examples can be found in electrical engineering, where using Fourier transform helps us analyze voltages and currents that have variations.

Figure 7: Representing the real and imaginary parts used in Fourier Transform

The Fast Fourier Transform (FFT) operates by decomposing an *N* point time domain signal into *N* time domain signals, each composed of a single point. The second step is to calculate the *N* frequency spectra corresponding to these *N* time domain signals. Lastly, the *N* spectra are synthesized into a single frequency spectrum.

More details regarding the Fourier Transform can be found here.

A few important rules when you are using Fourier transform are as as follows:

- The number of points in the time domain is equal to the number of points in the frequency domain.
- Assuming you have a
**sine wave**with a DC value – the first point in the spectrum would be at the zero frequency value (DC value) and the next one is at the sine frequency. - When domains are transformed from time to frequency, plotting can be done using frequency of the nth point: f = (n-1) SR/N; where N is the number of points.
- The frequency represents f = 1/T; where T is the period.

Let’s look at the code below and see how you can apply Fourier transform in MATLAB.

*t = 0:1/1000:1-1/1000;*

*x = sin(2*pi*30*t);*

*plot(t,x)*

As you can observe from **vector t**, point sampling was done at the 1/1000 range, resulting in sampling frequency of 1000 Hz (1000 1sor s-1). Do you remember from the previous articles that sampling frequency should be twice as much as the signal frequency?

The sine wave below has the frequency of 30Hz.

When we apply the Fourier transform, we use command fft(x).

*y = fft(x);*

*f = (0:length(y)-1)*1000/length(y);*

*plot(f,abs(y)) *

When we are plotting in frequency domain, the x-axis will be divided by 2.

With Fourier transform, we only need half of the sampling frequency in order to observe the spectral components of the signal.

When FFT was applied over the sinusoid signal, its only property is the spectral component corresponding to the frequency point described in the time domain, which is 30 Hz in our case.

If we apply length command to vector t, it returns

**>> length(t)**

**ans =**

** 1000**

As you can see in **Figure 11**, when we plot all the points, we can observe an interesting phenomenon: one more spectral component at **970 Hz**(1000-30 Hz). This means that the y-axis is mirrored around the **500 Hz**, corresponding to sampling frequency divided by 2.

If you have made this far, well, we are almost there. Continue to the next article to see how you can add distortion filter to distort the signal. We will then move on to process our voice signal on our own GUI created using MATLAB.

1 2

Tiberia is currently in her final year of electrical engineering at Politehnica University of Bucharest. She is very passionate about designing and developing Smart Home devices that make our everyday lives easier.

Receive update on new postsPrivacy Policy