Title:

Fourier Analysis

Intro:

In this practical, we deal only with periodic signals. We’ll use Fourier Analysis to investigate these signals.

Any periodic function f(t), with period T = 2  /  can be represented as a Fourier series:

.f(t) = a0 + n=1 ( an cos(nt) + bn sin(nt) eqn(1)

The sine and cosine functions are harmonic functions and the series (1) contains a possibly infinite set of harmonic functions with discrete frequencies.

The frequency 1 =  is known as the fundamental frequency and n , n>1, are the harmonics.

The coefficients an and bn measure the amount of cos(nt) and sin(nt) present in the function f(t). The result of Fourier analysing a signal is a set of values for these coefficients for all n.

Method:

A Fourier analysis programme must perform the integrations, for any function f(t) of interest. Simpson’s rule will be used for this.

Exercises 1.1

This programme was written and compiled. (sheet alpha)

The function f(t) = t2 was evaluated from zero to ten and the programme returned a value of 333.33333 which agrees with the analytical solution.

Exercises 1.2

The numerical solution corresponded to the analytical solution for both

.f(t) = sin(t) where =2 / T

.f(t) = exp(t) from t=0 to 10 using 100 steps.

The latter solution was 22026.42983 and the analytical solution was 22026.46579 which indicates that the numerical solution was 0.0359 away from the exact answer after the integral was broken into 100 steps according to Simpson’s rule.

When the number of steps was increased, the accuracy improved.

Exercises 1.3:

The programme was modified to calculate the Fourier coefficients ak and bk and a table of results was printed out.

Exercises 1.4:

.f(t) = sin t - the programme for this is exe1a_sin.c.

Compiling instructions are also provided along with the print out results (FF1.dat)

.f(t) = cos t + 3cos 2t – 4 cos 3t – the programme for this is exe1a_fn2.c

Compiling instructions are also provided along with the results obtained (FF2.dat)

.f(t) = sin t + 3 sin 3t + 5 sin 5t - the programme for this is exe1a_fn3.c

Compiling instructions are also provided along with the results obtained (FF3.dat)

.f(t) = sin t + 2 cos 3t + 3 sin 5t - the programme for this is exe1a_fn4.c

Compiling instructions are also provided along with the results obtained (FF4.dat)

The programme passed the test successfully!

Exercises 2 – Fourier Analysis of Signals

The frequency spectrum was plotted.

The square wave was also plotted.

Conclusion:

Unfortunately, I was unable to finish this experiment.

------

Paul Walsh – 2001