Question 1 of 5: First-Order RC Low-Pass Filter Driven by a Square Wave
Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)
Notes on this paper
Paper format. Professional Engineers Ontario / Engineers Canada national examination
16-Elec-A3 — Signals and Communications, May 2017. Closed book (one non-programmable
calculator permitted), 3 hours, 4 pages. Five questions, all compulsory, all of equal value
(20 marks each). All five are solved in full below.
Reference texts. B. P. Lathi & Z. Ding, Modern Digital and Analog Communication
Systems, 5th ed. (AM/DSB power and efficiency, PCM, FM/Carson); B. P. Lathi, Linear Systems and
Signals, 2nd ed. (Fourier series, filtering, average power); A. V. Oppenheim & A. S. Willsky,
Signals and Systems, 2nd ed. (LTI convolution, BIBO stability); J. G. Proakis & D. G. Manolakis,
Digital Signal Processing, 4th ed. (FIR structures, transfer functions); C. K. Alexander &
M. N. O. Sadiku, Fundamentals of Electric Circuits, 7th ed. (first-order RC response).
Question 1: First-Order RC Low-Pass Filter Driven by a Square Wave (20 marks)
Find. The Fourier series of x(t); the output y(t) in the time and frequency domains; the
40 dB bandwidth of y(t); and the average power of both the input and the output.
Figure Q1.1 - First-order RC low-pass filter; output taken across the capacitor.
Approach. Expand the even square wave in a cosine Fourier series, multiply each harmonic
by the RC filter's frequency response $H(f)=1/(1+jf/f_c)$ evaluated at that harmonic, then read the
bandwidth off the resulting line spectrum and obtain both powers from Parseval's theorem.
Fix the filter time constant and cut-off frequency. The capacitance is deliberately
written as $C=\dfrac{1}{2\pi}\ \text{nF}$ so that the corner frequency comes out round:
$$\tau = RC = (10\times10^{3})\left(\frac{10^{-9}}{2\pi}\right) = 1.5915\ \mu\text{s},
\qquad f_c=\frac{1}{2\pi RC}$$
$$\boxed{f_c = 100\ \text{kHz} = 2f_0}$$
The corner therefore sits exactly two harmonics up from the fundamental, so the filter is gentle: it
attenuates the fundamental only slightly and rolls the high harmonics off at 20 dB/decade.
Fourier series of the input. The wave swings between 0 V and 2 V, so it has a dc level
of 1 V and an alternating part of amplitude 1 V. Because it is even with its maximum at the origin, only
cosine terms survive and the classical odd-harmonic square-wave series applies:
$$\boxed{x(t) = 1 + \frac{4}{\pi}\sum_{n\ \text{odd}}\frac{(-1)^{(n-1)/2}}{n}\cos\!\left(2\pi n f_0 t\right)\ \text{V}}$$
with $f_0=50$ kHz. The first few amplitudes are $a_1=4/\pi=1.2732$, $a_3=-0.4244$, $a_5=0.2546$,
$a_7=-0.1819$ V; the alternating signs are what place the maximum at $t=0$.
Frequency response of the RC section. With the output taken across the capacitor,
$$H(f)=\frac{1/j2\pi fC}{R+1/j2\pi fC}=\frac{1}{1+j f/f_c},\qquad
|H| = \frac{1}{\sqrt{1+(f/f_c)^{2}}},\qquad \angle H = -\tan^{-1}\!\frac{f}{f_c}$$
Since $f_c=2f_0$, the $n$-th harmonic sees $f/f_c = n/2$, so $|H_n| = 1/\sqrt{1+n^{2}/4}$ and
$\angle H_n = -\tan^{-1}(n/2)$. Numerically:
n
an (V)
|Hn|
|Yn| (V)
∠Hn
rel. to fundamental
0 (dc)
1.0000
1.0000
1.0000
0°
—
1
1.2732
0.8944
1.1388
−26.57°
0 dB
3
−0.4244
0.5547
0.2354
−56.31°
−13.69 dB
5
0.2546
0.3714
0.09457
−68.20°
−21.61 dB
7
−0.1819
0.2747
0.04997
−74.05°
−27.16 dB
9
0.1415
0.2169
0.03069
−77.47°
−31.39 dB
11
−0.1157
0.1789
0.02071
−79.69°
−34.81 dB
13
0.0979
0.1521
0.01489
−81.25°
−37.67 dB
15
−0.0849
0.1322
0.01122
−82.41°
−40.13 dB
The dc term passes unattenuated because a capacitor is an open circuit at zero frequency.
(a) Output in the time domain. Each harmonic is scaled by $|H_n|$ and delayed by
$\angle H_n$:
$$\boxed{y(t) = 1 + \sum_{n\ \text{odd}}\frac{4(-1)^{(n-1)/2}}{n\pi\sqrt{1+n^{2}/4}}
\cos\!\left(2\pi n f_0 t - \tan^{-1}\frac{n}{2}\right)\ \text{V}}$$
Written out to the seventh harmonic,
$$y(t)\approx 1 + 1.1388\cos(\omega_0 t-26.57^\circ) - 0.2354\cos(3\omega_0 t-56.31^\circ)
+ 0.0946\cos(5\omega_0 t-68.20^\circ) - 0.0500\cos(7\omega_0 t-74.05^\circ)+\cdots$$
with $\omega_0 = 2\pi(50\ \text{kHz})$. The same result can be obtained directly in the time domain by
solving the first-order differential equation over each half period; the exponential segments reach
1.9963 V just before the falling edge, which the harmonic sum reproduces.
Figure Q1.2 - Input square wave (grey, dashed) and the steady-state RC output y(t) (blue).
(b) Output in the frequency domain. For a periodic signal the spectrum is a line
spectrum. Using the two-sided exponential form $x(t)=\sum_n c_n e^{j2\pi nf_0t}$ with $c_0=1$ and
$c_n=a_{|n|}/2$ for odd $n$,
$$\boxed{Y(f)=\delta(f)+\sum_{n\ \text{odd}}\frac{2(-1)^{(|n|-1)/2}}{|n|\pi}\,
\frac{1}{1+jn/2}\ \delta(f-nf_0)}$$
i.e. an impulse of area 1 at dc plus impulse pairs at $\pm 50,\pm150,\pm250,\ldots$ kHz whose areas are
the tabulated $|Y_n|/2$ with the tabulated phases. The one-sided amplitude spectrum is plotted below.
Figure Q1.3 - One-sided amplitude spectrum of y(t); the dashed line is the -40 dB threshold.
(c) 40 dB bandwidth. The "main AC in-band component" is the fundamental, of amplitude
1.1388 V. A component is in band while it is no more than 40 dB below that, i.e. while
$$|Y_n| \ge 10^{-40/20}\,(1.1388) = 0.011388\ \text{V}$$
From the table $|Y_{13}|=0.01489$ V ($-37.67$ dB) still qualifies, while $|Y_{15}|=0.01122$ V is
$-40.13$ dB and falls outside. The highest in-band harmonic is therefore the 13th:
$$\boxed{B = 13 f_0 = 650\ \text{kHz}}$$
measured from dc, since the output is a baseband (low-pass) signal. Note how close the decision is —
the 15th harmonic misses the threshold by only 0.13 dB, so the levels must be computed rather than
estimated from the $1/n$ envelope alone.
(d) Average power of the input. The square wave spends half of each period at 2 V and
half at 0 V, so no integration is needed:
$$P_x=\frac{1}{T}\int_T x^{2}(t)\,dt=\frac{(2)^{2}+(0)^{2}}{2}=\boxed{P_x = 2\ \text{W}}$$
(that is, 2 W into a 1 Ω reference, or equivalently a mean-square value of 2 V2). Parseval
gives the same figure: $1^2+\tfrac12\sum a_n^2 = 1 + \tfrac12(8/\pi^2)\!\sum_{n\,\text{odd}}\!n^{-2}\cdot 2 = 2$.
(e) Average power of the output. Parseval's theorem for a periodic signal adds the dc
power to half the square of every harmonic amplitude:
$$P_y = c_{0}^{2}+\frac{1}{2}\sum_{n\ \text{odd}}|Y_n|^{2}
= 1 + \tfrac12\left(1.1388^{2}+0.2354^{2}+0.09457^{2}+\cdots\right)$$
$$P_y = 1 + 0.6484+0.0277+0.00447+0.00125+0.00047+\cdots$$
$$\boxed{P_y = 1.683\ \text{W}}$$
The series converges quickly because the terms fall off as $n^{-4}$ once $n\gg 2$. As an independent
check, integrating the exact exponential waveform of Step 4 over one period gives 1.68288 W, agreeing to
five figures. About 16 % of the input power is dissipated in the resistor.
Result
Value
Filter time constant / cut-off
τ = 1.5915 µs, fc = 100 kHz
Input Fourier series
x(t) = 1 + (4/π)∑n odd [(−1)(n−1)/2/n] cos(2πnf0t) V