NivaarExam PrepOfficial exam papers ↗

22-Elec-B1 Digital Signal Processing · May 2016

Question 6 of 6: Kaiser-window highpass design — recovering the specifications and repairing the error at $\omega=\pi$

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 6: Kaiser-window highpass design — recovering the specifications and repairing the error at $\omega=\pi$ (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. A Kaiser-window highpass design with $\omega_{c} = 0.6\pi$ rad/sample, $\beta = 3.86$ and $M = 51$, the two Kaiser design formulas above, and the observation that the design meets its specifications everywhere except near $\omega = \pi$.

Find. (a) $\delta$, $\omega_{s}$ and $\omega_{p}$ — i.e. the specification set that produced these two numbers; and (b) what must change so the final design meets the specification at every frequency, with the reason.

Approach. Run both Kaiser formulas backwards: invert the $\beta$ formula for $A$, hence $\delta$; invert the $M$ formula for $\Delta\omega$; then place the two corner frequencies symmetrically about $\omega_{c}$. For (b), test the parity of $M$ against the four types of generalized linear-phase FIR filter.

  1. Recover $A$ from $\beta$. Since $0 \lt \beta = 3.86$, the middle branch applies. Solving $$0.5842\,(A-21)^{0.4} + 0.07886\,(A-21) = 3.86$$ numerically gives $A - 21 = 22.99$, i.e. $$\boxed{A \approx 44\ \text{dB}}$$ (check: $A = 44$ returns $0.5842(23)^{0.4} + 0.07886(23) = 3.861$, matching the quoted $\beta = 3.86$ to three figures). Because $A = 44 \le 50$, the branch choice is self-consistent.
  2. Convert $A$ to the tolerance $\delta$. From $A = -20\log_{10}\delta$, $$\boxed{\delta = 10^{-A/20} = 10^{-2.2} = 6.31\times 10^{-3}}$$ Note that the Kaiser method uses one number for both bands: the passband ripple and the stopband ripple are equal, $\delta_{1} = \delta_{2} = \delta$.
  3. Recover the transition width $\Delta\omega$ from $M$. Rearranging the order formula, $$\Delta\omega = \frac{A - 8}{2.285\,M} = \frac{44 - 8}{2.285 \times 51} = \frac{36}{116.5} = 0.3088\ \text{rad/sample} = 0.0983\pi .$$
  4. Place the corner frequencies. In the Kaiser (windowed ideal-filter) method the cutoff of the ideal prototype sits at the centre of the transition band, so $\omega_{s} = \omega_{c} - \Delta\omega/2$ and $\omega_{p} = \omega_{c} + \Delta\omega/2$ — and for a highpass filter the stopband is the lower band. Hence $$\boxed{\omega_{s} = 0.6\pi - 0.1544 = 1.7305\ \text{rad} = 0.551\pi}$$ $$\boxed{\omega_{p} = 0.6\pi + 0.1544 = 2.0394\ \text{rad} = 0.649\pi}$$ and $\omega_{p} - \omega_{s} = \Delta\omega$ as required.
  5. (a) State the full specification. The design targets $$\left|H(e^{j\omega})\right| \le 6.31\times 10^{-3} \qquad 0 \le |\omega| \le 0.551\pi \quad\text{(stopband)},$$ $$1 - 6.31\times10^{-3} \le \left|H(e^{j\omega})\right| \le 1 + 6.31\times10^{-3} \qquad 0.649\pi \le |\omega| \le \pi \quad\text{(passband)},$$ with no constraint in the transition band $0.551\pi \lt |\omega| \lt 0.649\pi$; equivalently 44 dB stopband attenuation and $\pm 0.055$ dB passband ripple.
w [rad/sample]|H(e^jw)|01ws = 0.551piwc = 0.6piwp = 0.649pipistopband: |H| <= dpassband: 1 - d <= |H| <= 1 + dtransition
Part (a): the recovered highpass tolerance scheme. Stopband |H| ≤ d = 6.31e-3 up to ws = 0.551pi, passband 1 +- d from wp = 0.649pi to pi, and a free transition band of width 0.0983pi centred on wc = 0.6pi. Ripple bands are drawn exaggerated for visibility.
  1. (b) Diagnose the failure at $\omega = \pi$. With $M = 51$ the impulse response occupies $0 \le n \le M$, so its length is $M+1 = 52$, an even number, and the symmetry point sits at $M/2 = 25.5$ — halfway between two samples. A window-designed filter inherits the symmetry $h[n] = h[M-n]$ of the ideal prototype, so an even-length symmetric response is a Type II generalized linear-phase FIR filter. Every Type II filter has a structural zero at $z = -1$: $$H\!\left(e^{j\pi}\right) = \sum_{n=0}^{M}h[n](-1)^{n} = 0 \qquad\text{identically, for any } h[n]=h[M-n] \text{ with } M \text{ odd},$$ because the samples pair up as $h[n]$ and $h[M-n]$ with opposite signs of $(-1)^{n}$ (the exponents $n$ and $M-n$ have opposite parity when $M$ is odd) and cancel exactly. A highpass filter, however, is required to have $\left|H(e^{j\pi})\right| \approx 1$. The response is therefore forced to zero at the very frequency where it must be unity, which is precisely the reported symptom: the error grows rapidly in the neighbourhood of $\pi$ and violates the tolerance no matter how large $\beta$ or $M$ is made. It is a structural defect, not a windowing accuracy problem.
  2. (b) The repair: make $M$ even. What else is required is therefore a change of parity, not a change of window: $$\boxed{\text{take } M \text{ even — the next value is } M = 52 \text{ (length } 53) \text{, keeping } \beta = 3.86 }$$ Then $M/2 = 26$ is an integer, the symmetry point falls on a sample, and the design is a Type I filter, whose amplitude response is unconstrained at both $\omega = 0$ and $\omega = \pi$. Nothing else needs to move: the order formula with $M = 52$ gives $\Delta\omega = 36/(2.285\times 52) = 0.3029$ rad, slightly narrower than required, so the transition-band and stopband specifications remain satisfied with a little margin, and the realised $\left|H(e^{j\pi})\right|$ comes out within the $\pm\delta$ passband tolerance. Equivalently, one may design a lowpass prototype and use the spectral-inversion identity $h_{hp}[n] = \delta[n - M/2] - h_{lp}[n]$, which is only defined for even $M$ — the same requirement seen from the other side.
  3. Confirm the fix. Evaluating both designs on the unit circle: the $M = 51$ (Type II) response falls monotonically to exactly zero at $\omega = \pi$, whereas the $M = 52$ (Type I) response holds $\left|H(e^{j\pi})\right| = 1.0001$, inside the specification. Across the stopband $0 \le \omega \le 0.551\pi$ the $M = 52$ design stays below $\delta$, and its passband ripple over $0.649\pi \le \omega \le \pi$ stays within $\pm\delta$, so all specifications are met at every $\omega$.
w [rad/sample]|H(e^jw)|00.510.5pi0.6pi0.7pi0.8pi0.9pipiM = 51 (length 52, Type II)M = 52 (length 53, Type I)the Type II design is forced to |H(e^jpi)| = 0; the Type I design is not
Part (b): magnitude response near pi. The M = 51 (length 52, Type II) design is forced to |H| = 0 at w = pi and cannot meet the passband tolerance there; the M = 52 (length 53, Type I) design holds |H| = 1 and satisfies the specification for all w.

Check: the paper states $\beta$ and $M$ but not $\delta$, $\omega_{s}$ or $\omega_{p}$, so part (a) recovers them by inverting the two design formulas — a well-posed inversion, but the recovered numbers inherit the rounding in the printed $\beta = 3.86$ and the integer $M = 51$. Reading $\beta = 3.86$ to three figures gives $A = 43.99$ dB, which is evidently the designer's $A = 44$ dB, and $M$ was obtained by rounding $(A-8)/(2.285\Delta\omega)$ up to an integer, so the true design $\Delta\omega$ may have been marginally wider than the $0.0983\pi$ recovered here. The graded conclusions — $\delta \approx 6.3\times10^{-3}$, a transition band of roughly $0.098\pi$ centred on $0.6\pi$, and the Type II parity defect — do not depend on that rounding.

Question 6 — recovered specifications and the required change
QuantityValueWhere it comes from
Stopband attenuation $A$44 dB inverting $\beta = 0.5842(A-21)^{0.4}+0.07886(A-21) = 3.86$
Tolerance $\delta$ ($=\delta_{1}=\delta_{2}$) $6.31\times10^{-3}$$\delta = 10^{-A/20}$
Transition width $\Delta\omega$ $0.3088$ rad $= 0.0983\pi$ $\Delta\omega = (A-8)/(2.285M)$ with $M=51$
Stopband corner $\omega_{s}$ $1.7305$ rad $= 0.551\pi$ $\omega_{c} - \Delta\omega/2$
Passband corner $\omega_{p}$ $2.0394$ rad $= 0.649\pi$ $\omega_{c} + \Delta\omega/2$
Cause of the error near $\pi$ $M=51$ odd $\Rightarrow$ length 52 even $\Rightarrow$ Type II $\Rightarrow H(e^{j\pi})=0$ identically symmetry $h[n]=h[M-n]$ with $M$ odd
What else is required an even $M$: use $M=52$ (length 53, Type I), same $\beta=3.86$ $M/2$ integer $\Rightarrow$ no forced zero at $z=-1$; $\Delta\omega$ shrinks to $0.3029$ rad, so the other specs still hold
Back to the paper →