22-Elec-B1 Digital Signal Processing · May 2014
Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)
Paper format. National Exams May 2014, 07-Elec-B1 Digital Signal Processing — 3 hours, open book, any non-communicating calculator permitted. Seven questions are printed; five constitute a complete paper and the first five appearing in the answer book are marked. All questions are of equal value (20 marks each; the printed marking scheme gives the sub-part split). A table of symbols, trigonometric identities, DFT definitions, DTFT tables and z-transform tables is supplied at the back of the paper. All seven questions are solved below, so the set works as a complete study resource.
Reference texts. Proakis & Manolakis, Digital Signal Processing, 4th ed. (z-transform and ROC, Ch. 3; DFT and FFT, Ch. 7; filter structures, Ch. 9); Oppenheim & Schafer, Discrete-Time Signal Processing, 3rd ed. (the DTFT symmetry and transform tables reproduced at the back of this paper are Tables 2.1–2.3 of that text); B. P. Lathi, Linear Systems and Signals, 2nd ed. (discrete-time convolution and system response).
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. A first-order recursive system $y[n] = \tfrac{1}{2}y[n-1] + x[n] + \tfrac{1}{2}x[n-1]$, known to be causal and stable; in part (c) the input is the everlasting sinusoid $x[n] = \cos\!\left(\tfrac{\pi}{2}n + \tfrac{\pi}{4}\right)$.
Find. The closed-form impulse response, the frequency response function, and the steady-state output sinusoid — amplitude and phase — at $\omega_0 = \pi/2$.
Approach. Transform the difference equation to get $H(z)$, invert it after a long division (the transfer function is not strictly proper), evaluate on the unit circle, and finish with the eigenfunction property of LTI systems, which turns part (c) into a single complex evaluation.
with a pole at $z = \tfrac{1}{2}$ and a zero at $z = -\tfrac{1}{2}$; the pole is inside the unit circle, consistent with the stated stability. Numerator and denominator have the same degree, so a division is needed before partial fractions. Writing $1 + \tfrac{1}{2}z^{-1} = -\left(1 - \tfrac{1}{2}z^{-1}\right) + 2$,
$$H(z) = -1 + \frac{2}{1 - \tfrac{1}{2}z^{-1}} \;\Rightarrow\; \boxed{h[n] = -\delta[n] + 2\left(\tfrac{1}{2}\right)^{n} u[n].}$$Equivalently $h[0] = 1$ and $h[n] = 2(1/2)^{n}$ for $n \ge 1$. The check against the recursion is immediate: $h[0] = 1$, $h[1] = \tfrac{1}{2}(1) + \tfrac{1}{2} = 1$, $h[2] = \tfrac{1}{2}(1) = 0.5$. Omitting the $-\delta[n]$ term is the standard error here — it would make $h[0] = 2$, which the recursion flatly contradicts.
Multiplying each factor by its conjugate gives a compact magnitude formula:
$$\left|H(e^{j\omega})\right|^{2} = \frac{1 + \cos\omega + \tfrac{1}{4}}{1 - \cos\omega + \tfrac{1}{4}} = \frac{1.25 + \cos\omega}{1.25 - \cos\omega}.$$This is a shelving low-pass characteristic: $\left|H(e^{j0})\right| = 3$ at d.c., falling monotonically to $\left|H(e^{j\pi})\right| = 1/3$ at the Nyquist frequency — a total swing of $9$, or $19.1$ dB. The phase is
$$\arg H(e^{j\omega}) = -\arctan\!\left(\frac{\tfrac{1}{2}\sin\omega}{1 + \tfrac{1}{2}\cos\omega}\right) - \arctan\!\left(\frac{\tfrac{1}{2}\sin\omega}{1 - \tfrac{1}{2}\cos\omega}\right),$$which is zero at both $\omega = 0$ and $\omega = \pi$ (as it must be for a real system whose response is real at those frequencies) and dips to roughly $-53^{\circ}$ in between.
Numerator and denominator are complex conjugates of one another, so their magnitudes are equal and the gain is exactly one — consistent with the magnitude formula, since $\cos(\pi/2) = 0$ makes numerator and denominator both $1.25$. The phase is twice the angle of the denominator, with a sign change:
$$\left|H\right| = 1, \qquad \arg H = -2\arctan\!\left(\tfrac{1}{2}\right) = -0.92730 \text{ rad} = -53.13^{\circ}.$$Applying the gain and phase to the input,
$$\boxed{y[n] = \cos\!\left(\frac{\pi}{2}n + \frac{\pi}{4} - 0.92730\right) = \cos\!\left(\frac{\pi}{2}n - 0.14190\right) = \cos\!\left(\frac{\pi}{2}n - 8.13^{\circ}\right).}$$The system passes this particular tone at full amplitude and merely retards it by $8.13^{\circ}$, i.e. by $0.0452$ of a sample period. Because the input is stated without a $u[n]$, it has been present for all time and the answer above is the complete response — there is no transient to add.
| Part | Quantity | Result |
|---|---|---|
| (a) | $H(z)$ | $\dfrac{1 + \frac{1}{2}z^{-1}}{1 - \frac{1}{2}z^{-1}}$, $|z| \gt \frac{1}{2}$ |
| (a) | $h[n]$ | $-\delta[n] + 2(1/2)^{n}u[n]$ (i.e. $1, 1, 0.5, 0.25, \ldots$) |
| (b) | $H(e^{j\omega})$ | $\dfrac{1 + \frac{1}{2}e^{-j\omega}}{1 - \frac{1}{2}e^{-j\omega}}$ |
| (b) | $|H|^{2}$ | $\dfrac{1.25 + \cos\omega}{1.25 - \cos\omega}$; $|H(0)| = 3$, $|H(\pi)| = 1/3$ |
| (c) | Gain and phase at $\omega_0 = \pi/2$ | $|H| = 1$, $\arg H = -53.13^{\circ}$ |
| (c) | Output | $y[n] = \cos\left(\frac{\pi}{2}n - 8.13^{\circ}\right)$ |