Fourier Analysis is a very powerful tool that comes into play when we discuss periodic signals. Colloquially, a periodic signal repeats.
Mathematically a signal is periodic if there exists a positive constant such that: for all values of . The smallest value of for which this is true is called the fundamental period and is denoted . The corresponding fundamental frequency is . If is in seconds, then is in Hertz (Hz). The fundamental angular frequency is and is measured in rad/sec.
A Fourier series is an expansion of a periodic function f(x) in terms of an infinite sum of sines and cosines. The computation and study of Fourier series is known as harmonic analysis and is extremely useful as a way to break up an arbitrary periodic function into a set of simple terms that can be plugged in, solved individually, and then recombined to obtain the solution to the original problem or an approximation to it to whatever accuracy is desired or practical. 1
Mathematically in a simple sense an arbitrary function can be decomposed as:
We shall explore this concept by making two waveforms using sinosoids:
From Lab 1, we have the function generator. We use that to make a square wave of amplitude = 1.
Mathematically it can be written as:
Which has a period of . For an arbitrary period P:
The corresponding Fourier series of the square wave with period
and for arbirary period P:
Use more and more sources to add additional sinusoids and see what waveform you get after each added term. How many terms until you’re square wave looks good? 5? 10?
It should look similar to this:
This type of analysis is important for digital design in the sense that most digital signals are square waves, representing either a 1 or a zero. So if your signal is at 10MHz, how fast should the electronics and design work?
The triangular wave is defined as:
Its corresponding fourier series is:
Make a flowgraph out of the expanded terms above and check the output after each operation. Do you need more or fewer components to begin looking like a triangle wave as compared to a square wave? Why do you think that is?
It should give an output like this:
Now mathematically define a sawtooth wave and find it’s Fourier series expansion. Then create its flow-graph, again with more and more Fourier components. Again, do you need more/less Fourier components as compared to a square or triangle wave?
We segue into the concept of Fourier transforms directly by seeing how they relate to fourier series. First some mathematics to associate familiarity, the Fourier transform of is given by:
When x(t) is periodic and has a Fourier series expansion, this integral is pulling out those sines and cosines in the expansion.
In more detail: For the complex representation of a Fourier series of a periodic function :
The co-effecients, of (which has the period is given by the relation:
where is the Fourier transform and
In summary, the Fourier series of a signal is a sum of sines and cosines. And, the Fourier transform decomposes the signal into it’s its frequency components with their relative strength. This can be visually seen in a neat animation as shown below ( credit: wikipedia ) and in the next section
First use a
signal source block to make a square wave and feed the signal into a
QT frequency sink
The Frequency Sink takes the Fourier Transform of the incoming signal and plots the output of the fourier transform
QT Frequency Sink and change the number of inputs to the number of Fourier series sinusoids you have in your flowgraph and feed all the sinusoids (vis-a-vis the individual Fourier series terms) into the frequency sink
The output looks like this:
The colored peaks are the Fourier transforms of the individual sinusoids. Do they align with the Fourier Transform of the pure square wave? If you add more terms of the Fourier series to the sink, how do they compare?
Repeat this exercise for the triangle wave.
We’ve been taking Fourier transform of the signal every time we see a plot with frequency in the time axes.
We shall visit Fourier transforms in detail again that in Lab 5.
We can also think of this to use gnuradio-companion to graphically get the Fourier components of a signal using a Fourier transform. Create a flow-graph with a signal source->FFT(Fourier transform)-> complex to real/imag -> vector sinks. The output of the real-part contains the cosine components of the transform. The imaginary part contains the sine components of the Fourier expansion.
It is also helpful to plot the time series to see what your input is and the frequency sink to make it easier to just read off the frequency of the components.
An example flowgraph looks like:
The FFT block is a special block which does the Fourier transform really fast. Play around with the FFT block and your general waveform generator from Lab 1 to take their Fourier transform. Use this to read off the Fourier series coefficients. This can still be used with a periodic signal with much less obvious structure.
Let us revisit Fourier transform by exploring the concept through their various properties. Refer to this Table of Fourier Transform Pairs and Properties and implement in gnuradio the following :
Forward/ReverseOption. Hint: The output should be a triangle wave
Try to implement other properties from the link of fourier transform pairs and properties as well.
NOTE: Use the
FFT Block for the above exercises. Use complex sources. The
FFT block takes an input vector and outputs a complex vector. Use to appropriate stream to vector and complex to real/imaginary convertor blocks where necessary
The power of the FFT output is given by multiplying the complex output of the FFT by its complex conjugate
Use vector sinks for signals that ‘vectors’ i.e. data comes out in chunks of a particular matrix size(vector length)