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 \(f(t)\) is equal to the sum of the average powers of all its harmonic components.
The power in the \(k\)th harmonic \(C_ke^{jk\Omega_0 t}\) is given by
Since \(P_k = P_{-k}\), the total power of the \(k\)th harmomic is \(2P_k\).
You should note that \(|C_k| = \sqrt{C_k C_k^*}\) so \(|C_k|^2 = C_k C_k^*\).
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. 7 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 \(k\ne \pm 1\) are nonzero. One way to characterize the distortion is to compute the ratio of average power in all the harmonics that “should not be present”, that is for \(k > 1\), to the total average power of the distorted sine wave. The square-root of this ratio is called the total harmonic distortion (THD) of the signal.
If the signal is real and based on a sine wave (that is odd), then \(C_0=0\) and
and we can define the THD as the ratio of the RMS value for all the harmonics for \(K>1\) (the distortion) to the RMS of the fundamental which is
Computation of THD#
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 \(h(t)\) to a complex exponential signal \(e^{st}\) is the same complex exponential multiplied by a complex gain: \(y(t) = H(s)e^{st}\), where:
In particular, for \(s = j\omega\), the output is simply \(y(t)=H(j\omega)e^{j\omega t}\).
The complex functions \(H(s)\) and \(H(j\omega)\) are called the system’s transfer function and frequency response, respectively.
By superposition#
The output of a continuous-time LTI system to a periodic function with period \(T\) represented by a Fourier series is given by:
where \(\Omega_0 = 2\pi/T\) is the fundamental frequency.
Thus \(y(t)\) is a Fourier series itself with coefficients \(D_k\):
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 \(H(jk\Omega_0)\) that retains certain frequencies and cuts off others.
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 \(H(jk\Omega_0)\) looks like.
[change this to an RC circuit filter]
As an example, consider the simple first-order Butterworth low-pass (LP) filter with cut-off frequency \(\omega_c\):
For this filter
Let us say that we wish to compute the attenuation and phase of this filter at \(\omega = \Omega_0\).
To compute the magnitude:
We note that is \(\left|H(j\Omega_0\right| \lt 1\) so the filter will attenuate the incoming harmonic frequency. This will be true for all harmonics, so in general, for a LP filter:
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 \(T/2\) (duty cycle 50%). Use the result:
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
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 \(x(t)\) with frequency \(\Omega_0 = 2\pi/T\) is shown below
Determine the exponential Fourier series coefficients \(C_k\) for this waveform and use this result to show that the trigonomentric Fourier series for a triangle waveform is
which, for the first seven harmonic frequencies, is given as
b) In the signal generator, the block diagram for which is given in Fig. 10, a triangle wavefom with \(A = 10\) and frequency \(f = 1/T = 2.5\) kHz, is filtered by the low-pass filter with transfer function
where \(a = 1/(RC)\) and \(RC\) is the time constant of an RC circuit with \(R = 8.2\) kΩ and \(C = 10\) nF.
i) Determine the frequency response \(H(j\omega)\) of the filter.
ii) Compute the cut-off frequency \(\omega_c\) of the filter. Note the value of the cut-off frequency this is the frequency for which the filter transmits half-the power or
iii) Use equation (14) 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 \(K\) to ensure that the attenuation is 0 dB at 2.5 kHz. Recompute the harmonic attenuation given the presence of \(K\).
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
K =
1
Hs =
1.487e08
---------------------------
s^2 + 3.659e04 s + 1.487e08
Continuous-time transfer function.
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 \(x(t) = x(t + nT)\) from its eponential Fourier series coefficients. The average Paower in a signale \(x(t)\) is given by Eq. (6) and RMS power is given by Eq. (8).
The power spectrum of signal is the sequence of average powers in each complex harmonic: \(|C_k|^2.\) 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. (11).
The steady-state frequency response of a continuous-time LTI system with impulse response \(h(t)\) to a periodic signal \(x(t) = xTt + nT)\) with exponential Fourier series components \(C_k\) is a Fourier series \(y(t)\) with coefficients \(D_k = C_k H(jk\Omega_0)\). (Where \(H(s)\) is the Laplace transform of \(h(t)\)). 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#
\(w = 2\) so:
Write down an expression for \(P\) using Parseval’s Theorem
P#
sinc\((k\pi/2) = 0\) for \(k\) even (\(k=0,2,4,6,\ldots\)) so…?
P for k odd#
\(\sin(k\pi/2) = 1\) for \(k\) odd (\(k=1,3,5,7,\ldots\)) so…?