Unit 3.4: Applications of Line Spectra#
The preparatory reading for this section is Chapter 7.10 of [Karris, 2012].
This section concludes our introduction to Fourier Series.
In Unit 3.3: Computing Line Spectra we saw that we could represent continuous-time periodic waveforms as line spectra in the frequency domain.
In this section we discuss how we can use these line spectra for the calculation of power for signals with harmonics, computation of total harmanic distortion and we conclude with an introduction to filters.
Colophon#
An annotatable worksheet for this presentation is available as Worksheet 5.
The source code for this page is fourier_series/4/exp_fs3.md.
You can view the notes for this presentation as a webpage (Unit 3.4: Applications of Line Spectra).
This page is downloadable as a PDF file.
Agenda#
Power in Periodic Signals#
In Unit 2.2 of EG-150 Signals and Systems we defined Signal Energy, Average Signal Power and Root Mean Square Power which for periodic signals will be defined as shown below:
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:
Power Spectrum#
The power spectrum of signal is the sequence of average powers in each complex harmonic:
For real periodic signals the power spectrum is a real even sequence as
Total Harmonic Distortion#
Suppose that a signal that is supposed to be a pure sine wave of amplitude A is distorted as shown in Fig. 8 below

Fig. 8 A sinusoid with harmomic distortion#
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#

Fig. 9 Computation of THD from the signal power spectrum#
Steady-State Response of a Continuous-Time 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 a continuous-time 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.
Examples#
The recurrent rectangular pulse is used extensively in digital communication systems. To determine how faithfully such pulses will be transmitted, it is necessary to know the power in the frequency components.
Example 6: Average Power#
Compute the average power of a pulse train for which the pulse width is
as your starting point.
Example 7: Power Spectrum#
Compute and display the power spectrum for the signal of Example 6: Average Power.
clear all
cd ../matlab
format compact; setappdata(0, "MKernel_plot_format", 'svg')
A = 1; w = 2; [f,omega] = pulse_fs(A,w,15);
Power spectrum#
ps = abs(f).^2;
fprintf('Omega (rad/s)\tPower (W)\n')
for i = 1:length(ps)
fprintf('%d\t\t%f\n',omega(i),ps(i))
end
Omega (rad/s) Power (W)
-15 0.000450
-14 0.000000
-13 0.000600
-12 0.000000
-11 0.000837
-10 0.000000
-9 0.001251
-8 0.000000
-7 0.002068
-6 0.000000
-5 0.004053
-4 0.000000
-3 0.011258
-2 0.000000
-1 0.101321
0 0.250000
1 0.101321
2 0.000000
3 0.011258
4 0.000000
5 0.004053
6 0.000000
7 0.002068
8 0.000000
9 0.001251
10 0.000000
11 0.000837
12 0.000000
13 0.000600
14 0.000000
15 0.000450
Plot#
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.
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.
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.
Example 10: Low-pass filter#
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. 10 A triangle waveform#
Determine the exponential Fourier series coefficients
which, for the first seven harmonic frequencies, is given as
b) In the signal generator, the block diagram for which is given in Fig. 11, a triangle wavefom with
where

Fig. 11 A signal generator#
i) Determine the frequency response
ii) Compute the cut-off frequency
iii) Use equation (13) and the result of a) to determine the attenuation in the first 7 harmonics of the triangle waveform.
iv) The filter is intended to generate a sinewave from the triangle wave. Determine the value of the recovery gain
v) Use these results to determine the THD (in dB) of the filtered waveform.
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
ex19_5
Summary#
We concluded our study of Fourier series by reviewing the following topics
Unit 3.4 Takeaways#
Parseval’s theorem allows us to compute the average power of of periodic signal
from its eponential Fourier series coefficients. The average Paower in a signale is given by Eq. (5) and RMS power is given by Eq. (7).The power spectrum of signal is the sequence of average powers in each complex harmonic:
which for real periodic signals is a real even sequence.Total harmonic distortion is a measure of how much a periodic signal is different from a sine wave. It is defined in Eq. (10).
The steady-state frequency response of a continuous-time LTI system with impulse response
to a periodic signal with exponential Fourier series components is a Fourier series with coefficients . (Where is the Laplace transform of ). This result can be used to determine the filtering affect of any continuous-time LTI system on any periodic signal. As an example of this you should review the theory for the harmonic filter studied in Session 4 of EG-152 Analogue Design and which is reviewed in Example 10: Low-pass filter.
Coming next#
We will continue our study of signals and system by introducing the Fourier Transform, discrete-time signals and systems, discrete Fourier transform and filter design.
Answers to selected examples#
Solution to Example 1#
Write down an expression for
P#
sinc