NivaarExam PrepOfficial exam papers ↗

22-Elec-B1 Digital Signal Processing · Undated paper

Question 6 of 6: Kaiser-window design of a linear-phase bandpass filter

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

Notes on this paper

Paper format. National Exam, May 2019 — 16-Elec-B1 Digital Signal Processing. Three hours, closed book; two approved calculators (Casio or Sharp) and one double-sided aid sheet are permitted. Six questions, each worth 12 marks; the printed rubric states that any five of the six constitute a complete paper. Marking scheme as printed: Q1 (a) 6 (b) 6; Q2 (a) 6 (b) 6; Q3 (a) 6 (b) 6; Q4 (a) 7 (b) 5; Q5 (a) 3 (b) 2 (c) 2 (d) 3 (e) 2; Q6 (a) 5 (b) 3 (c) 4. All six questions 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. — the standard EGBC reference for this subject (sampling Ch. 4, the z-transform Ch. 3, the DFS/DFT Ch. 8, filter structures Ch. 6, FIR design by windowing Ch. 7). Supporting: J. G. Proakis and D. G. Manolakis, Digital Signal Processing: Principles, Algorithms and Applications, 4th ed.; A. V. Oppenheim and A. S. Willsky, Signals and Systems, 2nd ed. The paper supplies its own aid sheet (DTFT analysis/synthesis pair, Parseval, a table of z-transform properties, a table of common z-transform pairs including the finite-length geometric pair, the geometric sum and series, the DFT/CTFT/DTFT property table, and the Kaiser design formulas), and the solutions below use only those.

Source-quality disclosure. Two places where the paper itself is still partly illegible are flagged in check notes at the questions concerned (Q4(b) numerator coefficient, Q5 expanded denominator); in both cases the printed information elsewhere in the same expression fixes the value uniquely. Readers comparing against another copy of the paper should treat those two items as reconstructed.

Question 6: Kaiser-window design of a linear-phase bandpass 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 bandpass tolerance scheme with the following numbers.

Given data — bandpass tolerance scheme
BandFrequency rangeTolerance
Lower stopband$0 \le |\omega| \le 0.25\pi$$|H| \le 0.01$
Passband$0.35\pi \le |\omega| \le 0.60\pi$$0.95 \le |H| \le 1.05$
Upper stopband$0.65\pi \le |\omega| \le \pi$$|H| \le 0.01$
Lower transition$0.25\pi \to 0.35\pi$width $0.10\pi$
Upper transition$0.60\pi \to 0.65\pi$width $0.05\pi$

Find. (a) the smallest $M$ and hence the length $M+1$, plus the Kaiser parameter $\beta$; (b) the group delay the design introduces; (c) the ideal impulse response that the window multiplies.

w|H(e^jw)|10.25pi0.35pi0.60pi0.65pipidw1dw2stopband, d = 0.01passband, 1 +/- 0.05stopband, d = 0.01
The printed tolerance scheme. The two transition bands have different widths, and the narrower one governs the design.

Approach. The Kaiser recipe uses a single ripple parameter $\delta$ and a single transition width $\Delta\omega$, so take the worst of each: the smallest tolerance across all three bands and the narrowest transition. Then $A$, $\beta$ and $M$ follow from the printed formulas, the delay is $M/2$, and the ideal response is the difference of two ideal lowpass responses with cutoffs at the midpoints of the transition bands.

  1. Choose the design ripple. The window method produces one ripple magnitude that appears in every band, so it must satisfy the tightest requirement. The passband allows $\delta_1 = 0.05$ and the stopbands allow $\delta_2 = 0.01$, hence $$\delta = \min(\delta_1,\delta_2) = \min(0.05,\ 0.01) = 0.01.$$

    Because both stopbands demand the same 0.01, no further discrimination between them is needed.

  2. Convert to the stopband attenuation $A$ and get $\beta$. $$A = -20\log_{10}\delta = -20\log_{10}(0.01) = 40\ \text{dB}.$$

    Since $21 \le A \le 50$, the middle branch of the printed formula applies:

    $$\beta = 0.5842(A-21)^{0.4} + 0.07886(A-21) = 0.5842(19)^{0.4} + 0.07886(19).$$

    With $19^{0.4} = 3.2470$ the two terms are $1.8969$ and $1.4983$, so

    $$\boxed{\ \beta = 3.3953 \ }$$
  3. Choose the governing transition width. The two transitions are $$\Delta\omega_1 = 0.35\pi - 0.25\pi = 0.10\pi, \qquad \Delta\omega_2 = 0.65\pi - 0.60\pi = 0.05\pi.$$

    A window design has one transition width, so it must be the narrower of the two: $\Delta\omega = 0.05\pi = 0.15708$ rad. Using the wider one would give a filter roughly half as long that misses the upper transition badly — this is the single most common error in the question.

  4. Compute the order and the length, part (a). $$M = \frac{A-8}{2.285\,\Delta\omega} = \frac{40-8}{2.285(0.05\pi)} = \frac{32}{0.35893} = 89.15,$$

    which must be rounded up to an integer, giving $M = 90$ and hence

    $$\boxed{\ M = 90, \qquad \text{length } M+1 = 91 \ }$$

    $M = 90$ is even, so the length is odd and the design is a Type I linear-phase FIR filter. That matters: a Type II filter (odd $M$) is forced to have $|H(e^{j\pi})| = 0$, which here would be harmless because $\omega = \pi$ is in a stopband, but Type I imposes no forced zero anywhere and is the safe choice.

  5. State the delay, part (b). A symmetric impulse response of length $M+1$ has the linear phase $\angle H(e^{j\omega}) = -\omega M/2$, so the group delay is constant at $$\boxed{\ \tau = \frac{M}{2} = \frac{90}{2} = 45\ \text{samples} \ }$$

    an integer because $M$ is even, so the filter delays every in-band component by a whole number of samples and introduces no fractional-sample interpolation.

  6. Place the ideal cutoffs, part (c). The windowed design centres its transition on the ideal cutoff, so each cutoff is the midpoint of its transition band: $$\omega_{c1} = \frac{0.25\pi + 0.35\pi}{2} = 0.30\pi, \qquad \omega_{c2} = \frac{0.60\pi + 0.65\pi}{2} = 0.625\pi.$$

    Placing them at the band edges instead would push half of each transition into a band where the tolerance must already be met.

  7. Write the ideal impulse response, part (c). An ideal bandpass with unit gain and delay $M/2$ is the difference of two ideal lowpass responses, so inverting $H_d(e^{j\omega}) = e^{-j\omega M/2}$ over $\omega_{c1} \lt |\omega| \lt \omega_{c2}$ gives $$\boxed{\ h_d[n] = \frac{\sin\bigl(0.625\pi\,(n-45)\bigr) - \sin\bigl(0.30\pi\,(n-45)\bigr)}{\pi\,(n-45)}, \qquad n \ne 45 \ }$$

    and at the centre of symmetry the limit is

    $$h_d[45] = \frac{\omega_{c2}-\omega_{c1}}{\pi} = 0.625 - 0.30 = 0.325.$$

    The Kaiser window $w[n] = I_0\bigl(\beta\sqrt{1-((n-45)/45)^2}\bigr)/I_0(\beta)$ with $\beta = 3.3953$ then multiplies this, sample by sample, for $0 \le n \le 90$.

  8. nhd[n] near the centre of symmetry n = 45380.02839-0.0063400.0393410.126442-0.073443-0.2639440.0366450.325460.036647-0.263948-0.0734490.1264500.039351-0.0063520.028
    The ideal impulse response near its centre of symmetry n = 45; the peak value is exactly (wc2 - wc1)/pi = 0.325.
  9. Confirm the design meets the printed tolerances. Evaluating $H(e^{j\omega}) = \sum_{n=0}^{90} h_d[n]w[n]e^{-j\omega n}$ on a dense grid gives a maximum stopband magnitude of about $0.0093$ in both stopbands and a passband that stays inside $1 \pm 0.019$ — comfortably within the required $0.01$ and $\pm0.05$. The Kaiser formulas are estimates, so this check is not optional; when a design lands marginally outside, the standard remedy is to increase $M$ by 2 and leave $\beta$ alone.

w|H(e^jw)|00.25pi0.35pi0.60pi0.65pipi00.51.0
Magnitude response of the completed design (M = 90, beta = 3.3953). The dashed verticals mark the four band edges.
Question 6 — final results
QuantityValue
Design ripple $\delta$0.01 (the stopband tolerance governs)
Attenuation $A$40 dB
Kaiser parameter $\beta$3.3953
Governing transition $\Delta\omega$$0.05\pi$ = 0.15708 rad
(a) Order and length$M = 90$ (from 89.15), length $M+1 = 91$
(b) Delay45 samples
(c) Ideal cutoffs$\omega_{c1} = 0.30\pi$, $\omega_{c2} = 0.625\pi$
(c) $h_d[45]$0.325
Back to the paper →