NivaarExam PrepOfficial exam papers ↗

22-Elec-B1 Digital Signal Processing · December 2019

Question 5 of 6: Kaiser Window Design of a Three-Band FIR Filter

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

Notes on this paper

Paper format. National Exams, December 2019 — 16-Elec-B1, Digital Signal Processing. Closed book, 3 hours. Six questions, each worth 12 marks; the rubric states that five questions constitute a complete paper. All six are solved here, because the set is a study resource rather than an exam script.

Reference texts. A. V. Oppenheim and R. W. Schafer, Discrete-Time Signal Processing, 3rd ed. (Pearson) — the syllabus text for this code; J. G. Proakis and D. G. Manolakis, Digital Signal Processing: Principles, Algorithms and Applications, 4th ed.; S. K. Mitra, Digital Signal Processing: A Computer-Based Approach. Formula sheets supplied with the paper (DTFT/DFT/z-transform tables) are reproduced only where a step uses them.

Question 3 system function. The printed system function for Question 3 is $H(z)=(1-z^{-1})/\left(1+\tfrac{3}{4}z^{-1}\right)$, and all work below follows it.

Question 5: Kaiser Window Design of a Three-Band FIR Filter (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 three-band tolerance scheme — unity gain, then a stop band, then a gain of two — together with the Kaiser $\beta$ and order formulas.

Given data
BandFrequency rangeNominal gainAbsolute tolerance
Lower pass band$0\le\omega\le0.2\pi$1$\pm0.05$
Stop band$0.3\pi\le\omega\le0.475\pi$0$0.06$
Upper pass band$0.525\pi\le\omega\le\pi$2$\pm0.05$
Transition bands$0.2\pi\to0.3\pi$ and $0.475\pi\to0.525\pi$—widths $0.1\pi$ and $0.05\pi$

Find. The largest admissible ripple parameter, the resulting $\beta$, the transition width that governs the design, the shortest admissible impulse response, its delay, and the ideal response to be windowed.

|H(e^jw)|w0121 +- 0.05|H| <= 0.062 +- 0.050.2pi0.3pi0.475pi0.525pipi
Figure 5.1 — the tolerance scheme. The discontinuity at the lower band edge has height 1; the one at the upper band edge has height 2, which doubles the approximation error there.

Approach. Treat the design as one window applied to a piecewise-constant ideal response, remember that the window error scales with the size of each discontinuity it smooths, and take the worst case over all bands for $\delta$ and the narrowest transition for $\Delta\omega$.

  1. Part (a): scale the tolerance by the size of each jump. Windowing convolves the ideal response with the window spectrum, so the approximation error near a discontinuity of height $J$ is $J\delta$, where $\delta$ is the ripple of the underlying unit-height design. Here the ideal response jumps by 1 at the lower band edge and by 2 at the upper one. Each specification therefore constrains $\delta$ differently: $$1\cdot\delta\le0.05,\qquad 2\cdot\delta\le0.06,\qquad 2\cdot\delta\le0.05 .$$
  2. Take the binding constraint. The three bounds are $0.05$, $0.03$ and $0.025$, so the upper pass band governs: $$\boxed{\delta_{\max}=\frac{0.05}{2}=0.025}$$ The upper band is the tightest even though its absolute tolerance equals that of the lower band, because it must hold a gain of 2 to the same absolute accuracy.
  3. Part (b): convert to stop-band attenuation and read off $\beta$. $$A=-20\log_{10}(0.025)=20\log_{10}40=32.04\ \text{dB},$$ which falls in the middle branch $21\le A\le50$, so $$\beta=0.5842(32.04-21)^{0.4}+0.07886(32.04-21)=1.5268+0.8707=\boxed{\beta=2.398}$$
  4. Part (c): one window must serve the narrower transition. A single Kaiser window produces one main-lobe width, and that width has to fit inside both transition bands. The available widths are $0.3\pi-0.2\pi=0.1\pi$ and $0.525\pi-0.475\pi=0.05\pi$, so $$\boxed{\Delta\omega_{\max}=0.05\pi=0.1571\ \text{rad/sample}}$$ Designing for the wider $0.1\pi$ would leave the upper transition unmet.
  5. Part (d): apply the order formula. $$M=\frac{A-8}{2.285\,\Delta\omega}=\frac{32.04-8}{2.285\times0.05\pi}=\frac{24.04}{0.3589}=66.98\ \Rightarrow\ M=67 .$$
  6. Correct the order for the required symmetry type. This is the graded point of the question. With $M=67$ the length $M+1=68$ is even, so a symmetric impulse response would be a Type II filter, whose amplitude response is forced to zero at $\omega=\pi$. The specification demands a gain of 2 there, so Type II is inadmissible: $M$ must be even. Taking the next even value, $$\boxed{M=68\ \Rightarrow\ \text{length}=M+1=69\ \text{coefficients (Type I)}}$$ Increasing $M$ only narrows the achieved transition band (to $0.0493\pi$), so every other specification is still satisfied — rounding up is always safe in this method.
  7. Part (e): read the delay from the symmetry point. A Type I linear-phase filter of order $M$ is symmetric about $n=M/2$ and has phase $-\omega M/2$, so the group delay is constant: $$\boxed{\text{delay}=\frac{M}{2}=34\ \text{samples}}$$
  8. Part (f): build the ideal response. The windowed prototype cutoffs sit at the midpoints of the transition bands: $$\omega_{c1}=\frac{0.2\pi+0.3\pi}{2}=0.25\pi,\qquad \omega_{c2}=\frac{0.475\pi+0.525\pi}{2}=0.5\pi .$$ Writing the desired amplitude as a low-pass of gain 1 with cutoff $\omega_{c1}$ plus a high-pass of gain 2 with cutoff $\omega_{c2}$, and delaying by $M/2=34$, $$\boxed{h_d[n]=\frac{\sin\left(0.25\pi(n-34)\right)}{\pi(n-34)}+2\delta[n-34]-\frac{2\sin\left(0.5\pi(n-34)\right)}{\pi(n-34)}}$$ with the removable value $h_d[34]=0.25+2-1=1.25$. The Kaiser window $w[n]$ with $\beta=2.398$ and length 69 is then applied: $h[n]=h_d[n]w[n]$ for $0\le n\le68$. This ideal response is symmetric about $n=34$, as a Type I design requires.
Question 5 — final results
PartResult
(a) tolerance$\delta=0.025$ (set by the gain-2 band: $0.05/2$)
(b) attenuation and shape factor$A=32.04$ dB, $\beta=2.398$
(c) transition width$\Delta\omega=0.05\pi=0.1571$ rad/sample
(d) order and lengthformula gives $M=66.98\to67$; parity forces $M=68$, length 69
(e) delay34 samples
(f) cutoffs$\omega_{c1}=0.25\pi$, $\omega_{c2}=0.5\pi$, $h_d[34]=1.25$