NivaarExam PrepOfficial exam papers ↗

22-Elec-B1 Digital Signal Processing · May 2015

Question 6 of 6: IIR design by transformation and the four linear-phase FIR types (12 marks)

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

Notes on this paper

Paper format. National Exams, May 2015 — 07-Elec-B1 Digital Signal Processing. Three hours, closed book; candidates may use one approved Casio or Sharp calculator and one aid sheet written on both sides. Six questions are printed and five constitute a complete exam, each worth 12 marks (72 printed, 60 counted). Every question and sub-part is worked below, because this set is intended as a study resource rather than an exam script. The tables of z-transform pairs and DFT properties bound into the back of the paper are reproduced from Oppenheim & Schafer and are quoted where used.

Reference texts.

  • A. V. Oppenheim and R. W. Schafer, Discrete-Time Signal Processing, 3rd ed., Pearson — Ch. 2 (LTI systems and the DTFT), Ch. 3 (the z-transform, Tables 3.1 and 3.2), Ch. 4 (sampling), Ch. 6 (filter structures), Ch. 7 (IIR and FIR design), Ch. 8 (the DFT and circular convolution), Ch. 9 (the FFT). This is the text the printed appendix tables are taken from.
  • J. G. Proakis and D. G. Manolakis, Digital Signal Processing: Principles, Algorithms and Applications, 4th ed., Pearson — Ch. 5 (DFT), Ch. 8 (IIR design), Ch. 10 (FIR design).
  • A. V. Oppenheim and A. S. Willsky, Signals and Systems, 2nd ed., Prentice Hall — Ch. 3 (Fourier series), Ch. 7 (sampling).

Question 6: IIR design by transformation and the four linear-phase FIR types (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. Three independent design situations: a set of twelve squared-magnitude poles from a Butterworth prototype, a pair of unrounded Butterworth parameters, and the four linear-phase FIR types.

Given data
(a) Pole radius$0.71$ (all twelve)
(a) Pole angles$\theta_k=\dfrac{(2k-1)\pi}{12}$, $k=1,\dots,12$ — twelve poles spaced $30^{\circ}$ apart
(b) Butterworth cut-off$\Omega_c=0.815$
(b) Butterworth order$N=5.305$ (not an integer)
(c) Filter familiesTypes I–IV against lowpass, highpass, bandpass, bandstop

Find. (a-i) the pole subset that forms $H(s)$ and the reason; (a-ii) the mapping from $H(s)$ to $H(z)$; (b-i) the next design step; (b-ii) which of the two corner-frequency specifications to meet exactly, with justification; (c) the completed feasibility table with a zero-location justification for every impossible entry.

Approach. Part (a) is spectral factorisation of $H(s)H(-s)$; part (b) turns on the fact that an order must be an integer and on the direction in which impulse-invariance aliasing degrades the response; part (c) follows from the structural zeros that symmetry forces onto $H(z)$ at $z=\pm 1$.

  1. Recognise where the twelve poles come from (part a-i). The squared magnitude of a Butterworth filter of order $N$ is $$\left|H(j\Omega)\right|^{2}=H(s)H(-s)\big|_{s=j\Omega}=\frac{1}{1+\left(\Omega/\Omega_c\right)^{2N}} ,$$ and its poles are the $2N$ roots of $1+(s/j\Omega_c)^{2N}=0$, which lie equally spaced on a circle of radius $\Omega_c$. Twelve poles were listed, so $2N=12$ and the design order is $N=6$; the radius confirms $\Omega_c=0.71$. Because $H(s)H(-s)$ is symmetric about the imaginary axis, the poles come in mirror pairs and exactly half of them must be assigned to $H(s)$.
  2. Select the left-half-plane poles (part a-i). A stable and causal analogue prototype must have all of its poles in the open left half plane, i.e. $\operatorname{Re}\{s\} \lt 0$, which means the angle must lie between $90^{\circ}$ and $270^{\circ}$. Testing the listed angles $15^{\circ},45^{\circ},\dots,345^{\circ}$, the ones that qualify are $105^{\circ},135^{\circ},165^{\circ},195^{\circ},225^{\circ},255^{\circ}$: $$\boxed{\,H(s)\ \text{is formed from}\ p_4,\ p_5,\ p_6,\ p_7,\ p_8,\ p_9\,}$$ These six form three conjugate pairs ($p_4$ with $p_9$, $p_5$ with $p_8$, $p_6$ with $p_7$), so $H(s)$ has real coefficients as it must, and the rightmost of them sits at $\operatorname{Re}\{s\}=-0.1838$, safely inside the left half plane. The discarded six are the mirror images belonging to $H(-s)$; taking any of them would give the same magnitude response but an unstable filter.
left half-planeRe{s}Im{s}p1p2p3p4p5p6p7p8p9p10p11p12The 12 poles of |H(jOmega)|^2, radius 0.71green = kept for H(s); red = discarded (right half-plane)
Figure 6.1 — the twelve poles of |H(jOmega)|^2 on the circle of radius 0.71. The six in the shaded left half plane (green) form H(s); the six mirror images (red) belong to H(-s) and are discarded.
  1. Map the prototype to the digital domain (part a-ii). Having assembled $$H(s)=\frac{\Omega_c^{\,6}}{\prod_{k=4}^{9}\left(s-p_k\right)} ,$$ the bilinear transformation replaces $s$ everywhere by $$\boxed{\,H(z)=H(s)\Big|_{\,s=\frac{2}{T_d}\cdot\frac{1-z^{-1}}{1+z^{-1}}}\,}$$ This maps the entire $j\Omega$ axis onto the unit circle exactly once and the whole left half plane into the interior of the unit circle, so stability is preserved and no aliasing is possible. The price is the non-linear frequency warping $$\Omega=\frac{2}{T_d}\tan\!\left(\frac{\omega}{2}\right) ,$$ so in a complete design the critical analogue frequencies are pre-warped by this relation before $H(s)$ is built, which makes the digital corner frequencies land where they were specified. The constant $T_d$ cancels out of the final $H(z)$ and is conventionally set to 1.
  2. Round the order up (part b-i). The two spec equations returned $N=5.305$, but a filter order counts poles and must be a positive integer, and rounding down would violate at least one of the two specifications. The next step is therefore $$\boxed{\,N=\left\lceil 5.305\right\rceil = 6\,}$$ and then to recompute $\Omega_c$ at that order from one of the two spec equations, place the six left-half-plane poles on the new circle to form $H(s)$, expand it in partial fractions, and finally apply impulse invariance, $h[n]=T_d\,h_c(nT_d)$, which term by term becomes $$H(z)=\sum_{k=1}^{6}\frac{T_d A_k}{1-e^{s_k T_d}z^{-1}} \qquad\text{from}\qquad H(s)=\sum_{k=1}^{6}\frac{A_k}{s-s_k} .$$
  3. Decide which specification to meet exactly (part b-ii). With $N$ rounded up from 5.305 to 6 the filter is better than required, so the two spec equations no longer agree on $\Omega_c$: solving $$1+\left(\Omega_p/\Omega_c\right)^{2N}=\frac{1}{\delta_1^{2}}\qquad\text{and}\qquad 1+\left(\Omega_s/\Omega_c\right)^{2N}=\frac{1}{\delta_2^{2}}$$ gives two different values, and any $\Omega_c$ between them satisfies both specs. Choosing the smaller (passband-exact) value shrinks the passband edge to exactly where it was asked for and leaves the stopband attenuation better than required; choosing the larger does the opposite. For impulse invariance the choice is not symmetric, because the transformation aliases: the digital response is $$H\!\left(e^{j\omega}\right)=\sum_{r=-\infty}^{\infty}H_c\!\left(j\frac{\omega+2\pi r}{T_d}\right) ,$$ so the analogue tail beyond the folding frequency folds back and adds to the response where it is smallest — in the stopband. The stopband is therefore the specification that will be degraded, and it is the one that needs margin: $$\boxed{\,\text{Meet the PASSBAND corner exactly; over-satisfy the stopband, because impulse-invariance aliasing raises the stopband response}\,}$$ A worked illustration makes the size of the margin concrete. Taking a representative specification consistent with the given numbers — $\delta_1=0.8913$ ($-1$ dB) and $\delta_2=0.1778$ ($-15$ dB) — the given $\Omega_c=0.815$ and $N=5.305$ correspond to corner frequencies $\Omega_p=0.7175$ and $\Omega_s=1.1252$ rad/s. Re-solving at $N=6$: $$\Omega_c\big|_{\text{passband}}=0.8031,\qquad \Omega_c\big|_{\text{stopband}}=0.8460 .$$ Adopting the passband-exact value $\Omega_c=0.8031$ yields a stopband magnitude of $0.1310$, i.e. $-17.65$ dB against the $-15$ dB required — a margin of $2.65$ dB held in reserve against aliasing. The mirror choice would place the passband at $0.9372$ instead of the required $0.8913$, spending the margin in the band where impulse invariance does not need it.

Check: the exam supplies only the resulting Butterworth parameters $\Omega_c=0.815$ and $N=5.305$, not the underlying tolerance specification. The corner frequencies and decibel margins quoted above are computed from a representative $-1$ dB / $-15$ dB specification that reproduces those two parameters exactly, and they are given to show the direction and typical size of the trade-off. The graded answer — round $N$ up to 6, then meet the passband exactly because impulse-invariance aliasing degrades the stopband — does not depend on that choice.

Part (c): which linear-phase FIR types can realise which selective responses. Linear phase forces the impulse response of an order-$M$ FIR filter to be either symmetric, $h[n]=h[M-n]$, or antisymmetric, $h[n]=-h[M-n]$. Combining each with an even or odd length gives the four standard types, and each symmetry forces zeros of $H(z)$ at specific points on the unit circle.

  1. Derive the forced zeros. Substituting the symmetry into $H(z)=\sum_{n=0}^{M}h[n]z^{-n}$ gives $$H(z)=\pm z^{-M}H\!\left(z^{-1}\right),$$ with $+$ for symmetric and $-$ for antisymmetric $h$. Evaluating at $z=1$ and $z=-1$:
    • Antisymmetric (Types III and IV): $H(1)=-H(1)$, so $H(1)=0$ — a forced zero at $z=1$, i.e. at $\omega=0$.
    • Symmetric with $M$ odd (Type II): $H(-1)=(-1)^{-M}H(-1)=-H(-1)$, so $H(-1)=0$ — a forced zero at $z=-1$, i.e. at $\omega=\pi$.
    • Antisymmetric with $M$ even (Type III): both conditions apply, so $H(1)=H(-1)=0$.
    • Symmetric with $M$ even (Type I): neither condition applies, so no zero is forced anywhere.
    These were confirmed by building a symmetric and an antisymmetric impulse response of each length and evaluating $H(1)$ and $H(-1)$.
  2. Match the forced zeros against what each band needs. A lowpass filter must pass $\omega=0$, so it cannot tolerate a zero at $z=1$; a highpass filter must pass $\omega=\pi$, so it cannot tolerate a zero at $z=-1$; a bandstop filter must pass both extremes, so it tolerates neither; a bandpass filter needs neither extreme and so is compatible with every type. Applying that rule fills the table with seven impossible entries.
z = -1Type II (even length, symmetric)H(-1) = 0z = +1z = -1Type III (odd length, antisym.)H(1) = 0 and H(-1) = 0z = +1Type IV (even length, antisym.)H(1) = 0Forced (structural) zeros of the linear-phase FIR typesType I forces no zero at all, so it can realise every selective response
Figure 6.2 — the structural zeros. Type II carries a forced zero at z = -1, Type IV at z = +1, Type III at both; Type I carries none.
Completed table — X marks an implementation that is not possible
FIR filterLowpassHighpassBandpassBandstopForced zeros
Type I (symmetric, $M$ even, odd length)✓✓✓✓none
Type II (symmetric, $M$ odd, even length)✓X✓X$z=-1$
Type III (antisymmetric, $M$ even, odd length)XX✓X$z=+1$ and $z=-1$
Type IV (antisymmetric, $M$ odd, even length)X✓✓X$z=+1$

Stated as justifications, one line per impossible cell: Type II cannot be highpass or bandstop because its forced zero at $z=-1$ drives the response to zero at $\omega=\pi$, which both of those responses must pass. Type IV cannot be lowpass or bandstop because its forced zero at $z=+1$ drives the response to zero at $\omega=0$. Type III inherits both zeros and so can only be bandpass — which is precisely why Types III and IV are the natural choices for differentiators and Hilbert transformers, whose ideal responses genuinely vanish at those frequencies.

Final results
PartQuantityResult
(a-i)Poles chosen for $H(s)$$p_4,p_5,p_6,p_7,p_8,p_9$ — the six with $\operatorname{Re}\{s\} \lt 0$; order $N=6$, $\Omega_c=0.71$
(a-ii)Mapping to $H(z)$Bilinear substitution $s=\dfrac{2}{T_d}\dfrac{1-z^{-1}}{1+z^{-1}}$, with the critical frequencies pre-warped by $\Omega=\tfrac{2}{T_d}\tan(\omega/2)$
(b-i)Next stepRound the order up to $N=6$, recompute $\Omega_c$, form $H(s)$ from its six LHP poles and apply $h[n]=T_d h_c(nT_d)$
(b-ii)Specification met exactlyThe passband corner — impulse-invariance aliasing raises the stopband, so the stopband needs the margin
(b-ii)Illustrative numbers$\Omega_c=0.8031$ (passband-exact) versus $0.8460$ (stopband-exact); achieved stopband $-17.65$ dB against $-15$ dB required
(c)Impossible implementationsSeven cells: Type II highpass and bandstop; Type III lowpass, highpass and bandstop; Type IV lowpass and bandstop
Back to the paper →