Worksheet 5#
To accompany Unit 3.4 Applications of Line Spectra#
Colophon#
This worksheet can be downloaded as a PDF file. We will step through this worksheet in class.
An annotatable copy of the notes for this presentation will be distributed before the second class meeting as Worksheet 5 in the Week 4: Classroom Activities section of the Canvas site. I will also distribute a copy to your personal Worksheets section of the OneNote Class Notebook so that you can add your own notes using OneNote.
You are expected to have at least watched the video presentation of Unit 3.4: Applications of Line Spectra of the notes before coming to class. If you haven’t watch it afterwards!
After class, the lecture recording and the annotated version of the worksheets will be made available through Canvas.
Power in Periodic Signals#
In your previous courses you may have come across the definitions of Signal Energy, Average Signal Power and Root Mean Square Power:
Parseval’s Theorem#
Parseval’s Theorem states that the total average power of a periodic signal
The power in the
Since
You should note that
Parseval’s theorem states that
RMS Power#
By a similar argument:
Example 6#
Compute the average power of a pulse train for which the pulse width is
as your starting point.
Solution#
Example 7: Power Spectrum#
Compute and display the power spectrum for the signal of Example 6.
clear all
cd ../matlab
format compact;
setappdata(0, "MKernel_plot_format", 'svg')
A = 1; w = 10;
[f,omega] = pulse_fs(A,w,15);
Power spectrum
stem(omega,abs(f).^2)
title('Power Spectrum for pulse width T/2')
ylabel('|C_k|^2')
xlabel('\Omega_0 [rad/s]')
Note that most of the power is concentrated at DC and in the first five harmonic components. That is in the frequency range
Total Harmonic Distortion#
Suppose that a signal that is supposed to be a pure sine wave of amplitude A is distorted as shown below

This can occur in the line voltages of an industrial plant that makes heavy use of nonlineear loads such as electric arc furnaces, solid state relays, motor drives, etc (E.g. Tata Steel!)
THD Defined#
Clearly, some of the harmonics for
If the signal is real and based on a sine wave (that is odd), then
and we can define the THD as the ratio of the RMS value for all the harmonics for
Computation of THD#

Example 8: THD in a square-wave#
Given that the exponential fourier series coefficients for a square wave are
compute the total harmonic distortion represented by the first 7 harmonics of the square-wave.
Solution#
Example 9: THD in a triangle wave#
Given that the exponential fourier series coefficients for a triangle wave with even symmetry is
compute the total harmonic distortion represented by the first 7 harmonics of the triangle-wave.
Steady-State Response of an LTI System to a Periodic Signal#
As shown in Eigenfunctions of Continuous-Time LTI Systems, the response of a continuous-time LTI system with impulse response
In particular, for
The complex functions
By superposition#
The output of an LTI system to a periodic function with period
where
Thus
Illustration#
This picture below shows the effect of an LTI system on a periodic input in the frequency domain.

Application to signal processing#
A consequence of the previous result is that we can design a system that has a desirable frequency spectrum
Filter attenuation#
The effect of an LTI system on a periodic input signal is to modify its Fourier series through a multiplication by its frequency response evaluated at the harmonic frequencies.
So what does
[change this to an RC circuit filter]
As an example, consider the simple first-order Butterworth low-pass (LP) filter with cut-off frequency
For this filter
Let us say that we wish to compute the attenuation and phase of this filter at
To compute the magnitude:
We note that is
The phase will be given by
where
Phases are additive so
By doing such analysis, we can examine the effect of a filter on a periodic signal, just by considering how the coefficients of the harmonic terms are changed (attenuated in magnitude and shifted in phase) by the filter.
Example 10: Low-pass filter#
This is an examination level question.
This example represents the low-pass filter used in the signal generator project for EG-152: Analogue Design.
Note
Use MATLAB to complete this example.
a) A triangle waveform

Fig. 27 A triangle waveform#
Determine the exponential Fourier series coefficients
which, for the first seven harmonic frequencies, is given as
Solution#
b) In the signal generator, the block diagram for which is given in Fig. 28, a triangle wavefom with
where

Fig. 28 A signal generator#
i) Determine the frequency response
Solution#
ii) Compute the cut-off frequency
Solution#
iii) Use equation (64) and the result of a) to determine the attenuation in the first 7 harmonics of the triangle waveform.
Solution#
iv) The filter is intended to generate a sinewave from the triangle wave. Determine the value of the recovery gain
Solution#
Solution#
v) Use these results to determine the THD (in dB) of the filtered waveform.
Solution#
vi) Use the attached Simulink model (ex19_5.slx) of the the filter to validate the results. Comment on the quality of the design.
cd ../matlab
% For Simulink model
R = 8.2e3; % 8.2 kOhm
C = 10e-9; % 10 nF
a = (1/(R*C)); % filter coefficient
K = 1 % replace wthis value with the value computed in Exercise 10(b)(iv)
Hs = tf(a^2,[1 3*a a^2])
bode(Hs),grid
K =
1
Hs =
1.487e08
---------------------------
s^2 + 3.659e04 s + 1.487e08
Continuous-time transfer function.
ex19_5