NivaarExam PrepOfficial exam papers ↗

22-Elec-B1 Digital Signal Processing · May 2016

Question 2 of 6: Continuous-time filtering by a discrete-time lowpass filter at three sampling-rate pairs

Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)

Notes on this paper

Paper format. National Exams, May 2016 — 07-Elec-B1 Digital Signal Processing. Three hours, closed book; one approved calculator (Casio or Sharp) and one two-sided aid sheet of tables and formulas are permitted. Six questions are printed and any five constitute a complete exam; all questions carry 12 marks, for 60 marks total. Tables of z-transform pairs and properties, the DTFT synthesis/analysis pair, Parseval's relation and the DFT property list are bound into the paper (pages 8–10). All six questions are solved below, because the set is a study resource rather than a timed attempt.

Reference texts (22-Elec-B1).

Question 2: Continuous-time filtering by a discrete-time lowpass filter at three sampling-rate pairs (12 marks)

Question text not reproduced: the examination questions are © Engineers and Geoscientists BC. Open the official past paper (linked at the top of this page) to read the question, then follow the worked solution below.

Given. The chain $x_{c}(t) \to \text{C/D}(T_{1}) \to x[n] \to H(e^{j\omega}) \to y[n] \to \text{D/C}(T_{2}) \to y_{c}(t)$, with an ideal discrete-time lowpass filter of cutoff $\omega_{c} = \pi/5$ and a triangular input spectrum $X_{c}(j\Omega)$ of unit height that falls linearly to zero at $\Omega_{0} = 2\pi\times 5\times 10^{3}\ \text{rad/s}$ (a 5 kHz bandwidth).

effective Hc(jOmega)C/DH(e^jw)D/Cxc(t)x[n]y[n]yc(t)T1T2
The C/D — discrete-time lowpass — D/C chain of the paper. The dashed box behaves as one continuous-time system only when T1 = T2.
-2pi(5k)02pi(5k)1Omega [rad/s]Xc(jOmega)
The given input spectrum Xc(jOmega): a unit-height triangle of half-width Omega0 = 2pi x 5 kHz.

Find. Labelled sketches of $X(e^{j\omega})$, $Y(e^{j\omega})$ and $Y_{c}(j\Omega)$ for each of the three rate pairs, including every amplitude and every band edge.

Approach. Use the three standard relations once and then tabulate: C/D sampling replicates and rescales the spectrum, the ideal filter truncates it, and D/C reconstruction rescales the frequency axis by $T_{2}$. Only two derived quantities decide each sketch — the normalised band edge $\omega_{0} = \Omega_{0}T_{1}$ and the ratio $T_{2}/T_{1}$.

  1. Write down the three governing relations. Sampling at $T_{1}$ gives $$X\!\left(e^{j\omega}\right) = \frac{1}{T_{1}} \sum_{k=-\infty}^{\infty} X_{c}\!\left(j\frac{\omega - 2\pi k}{T_{1}}\right),$$ so the triangle is replicated every $2\pi$, scaled in height by $1/T_{1}$, and its edge lands at the normalised frequency $\omega_{0} = \Omega_{0}T_{1}$. Filtering gives $Y(e^{j\omega}) = H(e^{j\omega})X(e^{j\omega})$, which simply truncates each replica to $|\omega| \lt \omega_{c}$. Ideal bandlimited reconstruction at $T_{2}$ gives $$Y_{c}(j\Omega) = T_{2}\,Y\!\left(e^{j\Omega T_{2}}\right), \qquad |\Omega| \lt \pi/T_{2}.$$
  2. Note the one general consequence, before any numbers. Chaining the three scalings, whenever there is no aliasing, $$Y_{c}(j\Omega) = \frac{T_{2}}{T_{1}}\, X_{c}\!\left(j\Omega\frac{T_{2}}{T_{1}}\right) \quad\text{on the retained band},$$ whose inverse transform is $$\boxed{\,y_{c}(t) = x_{c,\text{lp}}\!\left(t\,\frac{T_{1}}{T_{2}}\right)\,}$$ a pure time scaling of the lowpass-filtered input. The spectral height is multiplied by $T_{2}/T_{1}$, but the time-domain amplitude is unchanged — the taller spectrum is produced by stretching the waveform, not by amplifying it. Only when $T_{1} = T_{2}$ is the overall system a genuine continuous-time LTI filter of cutoff $\Omega_{c} = \omega_{c}/T$.
  3. Case (a): $1/T_{1} = 1/T_{2} = 2\times 10^{4}$. Then $T_{1} = T_{2} = 5\times 10^{-5}\ \text{s}$ and $$\omega_{0} = \Omega_{0}T_{1} = 2\pi(5\times10^{3})(5\times10^{-5}) = \frac{\pi}{2} \lt \pi ,$$ so sampling at 20 kHz on a 5 kHz signal is comfortably above the Nyquist rate and there is no aliasing. The replicas of $X(e^{j\omega})$ are triangles of height $1/T_{1} = 2\times 10^{4}$ and half-width $\pi/2$, centred at every multiple of $2\pi$. Since $\omega_{c} = \pi/5 \lt \omega_{0} = \pi/2$, the filter cuts into the triangle; the retained edge height is $$\frac{1}{T_{1}}\left(1 - \frac{\omega_{c}}{\omega_{0}}\right) = 2\times10^{4}\left(1 - \tfrac{2}{5}\right) = 1.2\times 10^{4}.$$ Reconstructing with $T_{2} = T_{1}$ leaves the peak at $T_{2}/T_{1} = 1$ and the band edge at $\Omega = \omega_{c}/T_{2} = 2\pi\times 2\times 10^{3}$, i.e. $$\boxed{Y_{c}(j\Omega)\ \text{is}\ X_{c}\ \text{ideally lowpassed at}\ 2\ \text{kHz},\ \text{peak}=1,\ \text{edge}=0.6 }$$
-2pi-pi0pi2pi20000band edge w0 = pi/2w [rad/sample]X(e^jw)case (a) 1/T1 = 1/T2 = 2e4-2pi-pi0pi2pi2000012000pi/5w [rad/sample]Y(e^jw)-2pi(2k)02pi(2k)10.6peak = T2/T1 = 1 ; yc(t) = xlp(t T1/T2)Omega [rad/s]Yc(jOmega)
Case (a): X(e^jw) replicas of height 2e4 and half-width pi/2; Y(e^jw) truncated at pi/5 with edge height 1.2e4; Yc(jOmega) is the input triangle lowpassed at 2 kHz with unit peak.

Case (a) is the benchmark: because the two rates agree, the dashed box really is a continuous-time lowpass filter, and its cutoff is $\Omega_{c} = \omega_{c}/T = (\pi/5)(2\times10^{4})/\pi = 2\ \text{kHz}$, i.e. one tenth of the sampling rate. The next two cases break that equivalence.

  1. Case (b): $1/T_{1} = 4\times10^{4}$, $1/T_{2} = 10^{4}$. Now $T_{1} = 2.5\times10^{-5}$, $T_{2} = 10^{-4}$, and $$\omega_{0} = 2\pi(5\times10^{3})(2.5\times10^{-5}) = \frac{\pi}{4} \lt \pi \quad\text{(no aliasing).}$$ The replicas have height $1/T_{1} = 4\times10^{4}$ and half-width $\pi/4$; the filter at $\pi/5$ again clips them, leaving edge height $4\times10^{4}(1 - \tfrac{4}{5}) = 8\times 10^{3}$. Reconstruction at the four-times-longer $T_{2}$ scales the peak to $T_{2}/T_{1} = 4$ and compresses the frequency axis by four, so the output band edge is $\omega_{c}/T_{2} = 2\pi\times 10^{3}$: $$\boxed{\ \text{peak } Y_{c} = 4,\quad \text{band edge } 1\ \text{kHz}, \quad y_{c}(t) = x_{c,\text{lp}}(t/4)\ }$$ Here the discrete-time cutoff maps back to $\omega_{c}/T_{1} = 2\pi\times 4\ \text{kHz}$ on the original signal, so the output is the 4 kHz-lowpassed input played back four times more slowly — which is why its band edge lands at $4/4 = 1\ \text{kHz}$. Its peak value in time is unchanged.
-2pi-pi0pi2pi40000band edge w0 = pi/4w [rad/sample]X(e^jw)case (b) 1/T1 = 4e4, 1/T2 = 1e4-2pi-pi0pi2pi400008000pi/5w [rad/sample]Y(e^jw)-2pi(1k)02pi(1k)40.8peak = T2/T1 = 4 ; yc(t) = xlp(t T1/T2)Omega [rad/s]Yc(jOmega)
Case (b): the same clipping at pi/5, but reconstruction at the four-times-longer T2 stretches the waveform by 4, which scales the spectral peak to 4 and moves the band edge down to 1 kHz.
  1. Case (c): $1/T_{1} = 10^{4}$, $1/T_{2} = 3\times10^{4}$. Here $T_{1} = 10^{-4}$ and $$\omega_{0} = 2\pi(5\times10^{3})(10^{-4}) = \pi \quad\text{exactly.}$$ This is critical sampling: $1/T_{1} = 10^{4} = 2\times(5\times10^{3})$ is precisely the Nyquist rate. The replicas therefore meet at $\omega = \pm\pi$ — but the triangle has already fallen to zero there, so the replicas touch at zero amplitude and there is no aliasing error. $X(e^{j\omega})$ is a continuous triangular wave of peak $1/T_{1} = 10^{4}$ reaching zero at every odd multiple of $\pi$. The filter clips it at $\pi/5$, leaving edge height $10^{4}(1 - \tfrac{1}{5}) = 8\times10^{3}$. Reconstruction at the three-times-shorter $T_{2} = 1/(3\times10^{4})$ scales the peak by $T_{2}/T_{1} = 1/3$ and expands the frequency axis by three, so the band edge sits at $\omega_{c}/T_{2} = 2\pi\times 3\times10^{3}$: $$\boxed{\ \text{peak } Y_{c} = \tfrac{1}{3},\quad \text{edge height } \tfrac{4}{15},\quad \text{band edge } 3\ \text{kHz},\quad y_{c}(t) = x_{c,\text{lp}}(3t)\ }$$
-2pi-pi0pi2pi10000band edge w0 = piw [rad/sample]X(e^jw)case (c) 1/T1 = 1e4, 1/T2 = 3e4-2pi-pi0pi2pi100008000pi/5w [rad/sample]Y(e^jw)-2pi(3k)02pi(3k)1/34/15peak = T2/T1 = 1/3 ; yc(t) = xlp(t T1/T2)Omega [rad/s]Yc(jOmega)
Case (c): critical sampling puts the band edge exactly at w = pi, where the triangle is already zero — the replicas touch without aliasing. Reconstruction at the shorter T2 compresses the waveform by 3, scaling the spectral peak to 1/3.

The three cases separate two effects that students routinely conflate. What the discrete-time filter removes depends only on $\omega_{c}$ compared with $\omega_{0} = \Omega_{0}T_{1}$, so it is set by the input rate alone; here $\omega_{c} = \pi/5$ is below $\omega_{0}$ in all three cases and the triangle is always clipped. What happens to the time axis depends only on the ratio $T_{2}/T_{1}$, and it is a stretch, not a gain.

Check: the sketches assume ideal band-limited C/D and D/C conversion and an exactly ideal (brick-wall) $H(e^{j\omega})$, as the question states. Case (c) sits exactly at the Nyquist rate; the conclusion "no aliasing error" relies on $X_{c}(j\Omega_{0}) = 0$, which the given triangle satisfies. Any real anti-alias filter with a finite roll-off would leave a small overlap there.

Question 2 — every labelled quantity, by case
Quantity(a) 2e4 / 2e4(b) 4e4 / 1e4 (c) 1e4 / 3e4
$T_{1}$ [s]$5\times10^{-5}$$2.5\times10^{-5}$ $10^{-4}$
$T_{2}$ [s]$5\times10^{-5}$$10^{-4}$ $3.33\times10^{-5}$
band edge $\omega_{0}=\Omega_{0}T_{1}$$\pi/2$ $\pi/4$$\pi$ (critical)
aliasing?nono no (replicas meet at zero)
$X(e^{j\omega})$ peak$2\times10^{4}$ $4\times10^{4}$$10^{4}$
$Y(e^{j\omega})$ edge height at $\omega_{c}$ $1.2\times10^{4}$$8\times10^{3}$ $8\times10^{3}$
$Y_{c}(j\Omega)$ peak $=T_{2}/T_{1}$14 $1/3$
$Y_{c}$ edge height$0.6$$0.8$ $4/15$
$Y_{c}$ band edge $\omega_{c}/T_{2}$ $2\pi\times 2\ \text{kHz}$$2\pi\times 1\ \text{kHz}$ $2\pi\times 3\ \text{kHz}$
time-domain effect2 kHz lowpass, no scaling $4\times$ slower$3\times$ faster