COMPUTING II: COURSEWORK 3

Fourier Series

Your coursework should be handed in at the beginning of next week’s computing lab. session. . Make sure you write your name on all work you hand in and include a plagiarism statement.

 

In this week’s lab. session your task was to generate a waveform, v(t), (a square wave) from a Fourier series representation, i.e. from the combination of sinusoid components. The formulae for the Fourier series coefficients An and Bn for a square wave were given. Conversely, if we know v(t) and wish to break the waveform down into its constituent sinusoids we need to evaluate the integrals in Eqns. 7.5 and 7.6 on p.69 of the lecture notes. This can be done either analytically or numerically.

 

3.1 (a) Using the following definition of the waveform (a square wave):

v(t)      =  1     ( t < T/4)

                        = -1     (T/4 < t < 3T/4)

            = 1      (3T/4 < t < T)

 

analytically integrate equation 7.5 (p. 50) and thus show that the coefficients An are given by the formulae you used in this week’s lab. session. [5]

 

3.1 (b)  The values of the coefficients can alternatively be determined numerically using a short program. Use the multiple application trapezoidal rule (Eqn. 4.1, p.39) to evaluate the integral in Eqn. 7.5 and thus determine An for n =1 to 7. Compare your results with those given by the formulae for An  that you used in this week’s lab. session and evaluated in Q. 7.1(a) above. [5]