ELEC6218 · Signal Processing Tutorial · Worked Problems
Signal Processing · Lecture notes Prof. Çelik
ELEC6218 · Signal Processing
Lecture 9

Tutorial: Worked Problems

This tutorial works through exam-style problems on the material of Lectures 5 to 8. Each problem gives the full question, then a step-by-step solution.

InstructorProf. Abdulkadir Çelik (https://akadircelik.com) ModuleELEC6218 TopicsButterworth high-pass design · prewarping · low-pass to high-pass transformation · bilinear transform · design verification
▸ Prewarp the digital edges ▸ Transform to a low-pass prototype ▸ Bilinear transform, then verify
Lecture 9

Contents

Each section is one problem. Attempt it before opening the solution.

9.1  Low-pass IIR filter design by the bilinear transform

This problem applies the bilinear-transform design of Section 8.3 to a low-pass specification, using the Butterworth design equations of Lecture 5 (Eqs. 5.4 to 5.7). It follows the same steps as Example 8.2.

PROBLEM 9.1

Low-pass IIR filter design

A digital Butterworth low-pass filter is required. Its frequency response must satisfy

$$\begin{aligned}\left|H\!\left(e^{j\omega}\right)\right| &\geq 0.89125, &&0\leq\omega\leq 0.3\pi,\\ \left|H\!\left(e^{j\omega}\right)\right| &\leq 0.001, &&0.6\pi\leq\omega\leq\pi.\end{aligned}$$

The sampling period is \(T=1\). Design the filter using a Butterworth low-pass prototype and the bilinear transform (BLT). Numerical values are required for the prewarped edges, filter order and cutoff frequency. However, the transfer functions \(H_{LP}(s)\) and \(H(z)\) may be left in clearly defined symbolic form; numerical coefficient expansion is not required.

  1. Start from a low-pass prototype. State the Butterworth low-pass prototype model and define the symbols that you will use for its poles or polynomial coefficients.
  2. Prewarp the digital edges. Use \(\displaystyle \Omega=\frac{2}{T}\tan\!\left(\frac{\omega}{2}\right)\) to calculate the analogue passband and stopband edges corresponding to the two specified digital edges.
  3. Design the analogue low-pass filter. Use the prewarped requirements to determine the minimum order and cutoff frequency, and express \(H_{LP}(s)\) symbolically.
  4. Apply the bilinear transform. Use \(\displaystyle s=\frac{2}{T}\frac{1-z^{-1}}{1+z^{-1}}\) to give \(H(z)\) as one symbolic rational function of \(z^{-1}\). You do not need to calculate or expand its numerical coefficients.
  5. Verify the design. Determine whether the digital filter satisfies the original passband and stopband requirements. Support your verification with a suitable magnitude-response drawing.
(a) Start from a low-pass prototype
1
State the Butterworth low-pass model

The order-\(N\) Butterworth low-pass filter with cutoff \(\Omega_c\) has the squared magnitude of Eq. (5.4),

$$|H_{LP}(j\Omega)|^2=\frac{1}{1+(\Omega/\Omega_c)^{2N}},$$

and its \(N\) left-half-plane poles, Eq. (5.7), lie on a circle of radius \(\Omega_c\):

$$p_k=\Omega_c\,e^{j\left(\frac{\pi}{2}+\frac{(2k-1)\pi}{2N}\right)},\quad k=1,\dots,N,\qquad H_{LP}(s)=\frac{\Omega_c^N}{\prod_{k=1}^{N}(s-p_k)}.$$

Here \(N\) is the order, \(\Omega_c\) the \(-3\,\text{dB}\) cutoff and \(p_k\) the poles. No frequency transformation is needed: the prototype is designed directly at the prewarped edges.

(b) Prewarp the digital edges
2
Read the specification

The two bounds are the linear passband and stopband gains, equivalent to \(G_p=-1\,\text{dB}\) and \(G_s=-60\,\text{dB}\):

$$\omega_p=0.3\pi,\quad A_p=10^{G_p/20}=10^{-1/20}\approx0.89125,\qquad \omega_s=0.6\pi,\quad A_s=10^{G_s/20}=10^{-60/20}=0.001.$$
3
Prewarp both edges

With \(T=1\), Eq. (8.11) gives

$$\Omega_p=2\tan(0.15\pi)\approx1.0191\ \text{rad/s},\qquad \Omega_s=2\tan(0.3\pi)\approx2.7528\ \text{rad/s}.$$

The naive values \(\omega/T\) would be 0.9425 and 1.8850; the stopband edge moves much further because \(\tan\) grows faster than linearly.

(c) Design the analogue low-pass filter
4
Minimum order

The minimum Butterworth order, Eq. (5.5), is

$$N=\left\lceil \frac{\ln\!\big[(1/A_s^2-1)/(1/A_p^2-1)\big]}{2\ln(\Omega_s/\Omega_p)} \right\rceil.$$

With \(1/A_p^2-1\approx0.2589\), \(1/A_s^2-1=10^{6}-1\approx10^6\) and \(\Omega_s/\Omega_p=\tan(0.3\pi)/\tan(0.15\pi)\approx2.7013\):

$$N_{\text{real}}=\frac{\ln(10^{6}/0.2589)}{2\ln2.7013}=\frac{15.17}{1.987}\approx7.63\ \Longrightarrow\ \boxed{N=8}$$
5
Cutoff frequency

The cutoff that meets the passband edge exactly, Eq. (5.6), is

$$\Omega_c=\Omega_p\left(\frac{1}{A_p^2}-1\right)^{-1/(2N)}.$$

With \(N=8\):

$$\Omega_c=1.0191\,(0.2589)^{-1/16}\approx1.0191\times1.0881\approx\boxed{1.1088\ \text{rad/s}}$$
6
Analog transfer function

Substitute \(N=8\) and \(\Omega_c=1.1088\ \text{rad/s}\) into Eq. (5.4):

$$|H_{LP}(j\Omega)|^2=\frac{1}{1+(\Omega/1.1088)^{16}}.$$

With \(N=8\), Eq. (5.7) places the eight left-half-plane poles at

$$p_k=1.1088\,e^{j\left(\frac{\pi}{2}+\frac{(2k-1)\pi}{16}\right)},\qquad k=1,\dots,8,$$

so that

$$H_{LP}(s)=\frac{1.1088^{8}}{\prod_{k=1}^{8}(s-p_k)}.$$
(d) Apply the bilinear transform
7
Write H(z)

Substitute the bilinear transform with \(T=1\) into \(H_{LP}(s)\) from Step 6:

$$H(z)=\left.\frac{1.1088^{8}}{\prod_{k=1}^{8}(s-p_k)}\right|_{s=2\frac{1-z^{-1}}{1+z^{-1}}},\qquad p_k=1.1088\,e^{j\left(\frac{\pi}{2}+\frac{(2k-1)\pi}{16}\right)},\quad k=1,\dots,8.$$
(e) Verify the design
8
Evaluate at the band edges

On the unit circle, \(z=e^{j\omega}\) and the bilinear transform gives \(s=j\Omega\) with \(\Omega=2\tan(\omega/2)\). The digital response therefore equals the analog response of Step 6 at the warped frequency:

$$|H(e^{j\omega})|^2=|H_{LP}(j\Omega)|^2=\frac{1}{1+(\Omega/1.1088)^{16}},\qquad \Omega=2\tan(\omega/2).$$

Passband edge, \(\omega=0.3\pi\)

$$\Omega=2\tan(0.15\pi)=1.0191,\qquad \frac{\Omega}{\Omega_c}=\frac{1.0191}{1.1088}=0.9190,\qquad \left(0.9190\right)^{16}=0.2589$$
$$|H(e^{j0.3\pi})|=\frac{1}{\sqrt{1+0.2589}}=\frac{1}{\sqrt{1.2589}}=0.8913\quad\Longrightarrow\quad 20\log_{10}0.8913=-1.00\ \text{dB}.$$

\(0.8913\ge0.89125\): the passband requirement is met, exactly at the limit, because Step 5 chose \(\Omega_c\) to make \((\Omega_p/\Omega_c)^{16}=1/A_p^2-1\).

Stopband edge, \(\omega=0.6\pi\)

$$\Omega=2\tan(0.3\pi)=2.7528,\qquad \frac{\Omega}{\Omega_c}=\frac{2.7528}{1.1088}=2.4825,\qquad \left(2.4825\right)^{16}\approx2.081\times10^{6}$$
$$|H(e^{j0.6\pi})|=\frac{1}{\sqrt{1+2.081\times10^{6}}}\approx\frac{1}{1443}=6.93\times10^{-4}\quad\Longrightarrow\quad 20\log_{10}(6.93\times10^{-4})=-63.18\ \text{dB}.$$

\(6.93\times10^{-4}\le0.001\): the stopband requirement is met with a margin of \(3.2\ \text{dB}\).

9
Check the complete bands

The response decreases monotonically from 0 dB at \(\omega=0\), so it stays above \(-1\,\text{dB}\) for \(0\le\omega\le0.3\pi\) and below \(-63.2\,\text{dB}\) for \(0.6\pi\le\omega\le\pi\). Both requirements are met: the passband exactly, the stopband with a 3.2 dB margin. The \(-3\,\text{dB}\) point is at \(\omega_c=2\arctan(\Omega_c/2)\approx0.322\pi\). Figure 9.1 draws the gain against the mask.

−1.0 dB at 0.3π−63.2 dB at 0.6π ≤ −60 dB00.2π0.3π0.4π0.6π0.8ππω0−20−40−60−80−100Gain (dB)passband limitstopband limit
Figure 9.1. Problem 9.1, part (e). Gain \(20\log_{10}|H(e^{j\omega})|\) of the eighth-order Butterworth low-pass filter, computed from Step 8 and clipped at \(-100\,\text{dB}\). The hatched regions are excluded by the specification. The gain is exactly \(-1\,\text{dB}\) at \(0.3\pi\) and -63.2 dB at \(0.6\pi\), and falls to \(-\infty\) at \(\omega=\pi\) because of the eight zeros at \(z=-1\).

Compared with Example 8.2 (\(0.2\pi\) to \(0.4\pi\), \(-40\,\text{dB}\), \(N=7\)), the transition ratio \(\Omega_s/\Omega_p\) here is wider, but the extra 20 dB of stopband attenuation still needs one more order.

9.2  High-pass IIR filter design by the bilinear transform

This problem uses the Butterworth design equations of Lecture 5 (Eqs. 5.4 to 5.7), the low-pass to high-pass transformation of Eq. (8.3.b), and the bilinear transform with prewarping of Section 8.3. Problem 9.1 is the low-pass version of the same procedure; this problem adds the low-pass to high-pass transformation.

PROBLEM 9.2

High-pass IIR filter design

A digital Butterworth high-pass filter is required. Its frequency response must satisfy

$$\begin{aligned}\left|H\!\left(e^{j\omega}\right)\right| &\leq 0.1, &&0\leq\omega\leq 0.2\pi,\\ \left|H\!\left(e^{j\omega}\right)\right| &\geq 0.89125, &&0.4\pi\leq\omega\leq\pi.\end{aligned}$$

The sampling period is \(T=1\). Design the filter using a Butterworth low-pass prototype and the bilinear transform (BLT). Numerical values are required for the prewarped edges, filter order and cutoff frequency. However, the transfer functions \(H_{LP}(s)\), \(H_{HP}(s)\) and \(H(z)\) may be left in clearly defined symbolic form; numerical coefficient expansion is not required.

  1. Start from a low-pass prototype. State the Butterworth low-pass prototype model and define the symbols that you will use for its poles or polynomial coefficients.
  2. Prewarp the digital edges. Use \(\displaystyle \Omega=\frac{2}{T}\tan\!\left(\frac{\omega}{2}\right)\) to calculate the analogue stopband and passband edges corresponding to the two specified digital edges.
  3. Apply the analogue frequency transformation. Transform the prewarped high-pass requirements to the low-pass prototype, determine the minimum order and cutoff frequency, and express \(H_{LP}(s)\) and \(H_{HP}(s)\) symbolically.
  4. Apply the bilinear transform. Use \(\displaystyle s=\frac{2}{T}\frac{1-z^{-1}}{1+z^{-1}}\) to give \(H(z)\) as one symbolic rational function of \(z^{-1}\). You do not need to calculate or expand its numerical coefficients.
  5. Verify the design. Determine whether the digital filter satisfies the original stopband and passband requirements. Support your verification with a suitable magnitude-response drawing.
(a) Start from a low-pass prototype
1
State the Butterworth low-pass prototype

Primes mark prototype quantities. The order-\(N\) Butterworth low-pass prototype with cutoff \(\Omega_c'\) has the squared magnitude of Eq. (5.4),

$$|H_{LP}(j\Omega)|^2=\frac{1}{1+(\Omega/\Omega_c')^{2N}},$$

and its \(N\) left-half-plane poles, Eq. (5.7), lie on a circle of radius \(\Omega_c'\):

$$p_k=\Omega_c'\,e^{j\left(\frac{\pi}{2}+\frac{(2k-1)\pi}{2N}\right)},\quad k=1,\dots,N,\qquad H_{LP}(s)=\frac{(\Omega_c')^N}{\prod_{k=1}^{N}(s-p_k)}.$$

Here \(N\) is the order, \(\Omega_c'\) the \(-3\,\text{dB}\) cutoff and \(p_k\) the poles.

(b) Prewarp the digital edges
2
Read the specification

For a high-pass filter the stopband is the low band and the passband the high band. The two bounds are the linear gains, equivalent to \(G_s=-20\,\text{dB}\) and \(G_p=-1\,\text{dB}\):

$$\omega_s=0.2\pi,\quad A_s=0.1,\qquad \omega_p=0.4\pi,\quad A_p=0.89125.$$
3
Prewarp both edges

With \(T=1\), Eq. (8.11) gives

$$\Omega_s=2\tan(0.1\pi)\approx0.6498\ \text{rad/s},\qquad \Omega_p=2\tan(0.2\pi)\approx1.4531\ \text{rad/s}.$$
(c) Apply the analogue frequency transformation
4
Transform the edges to the low-pass prototype

The low-pass to high-pass transformation of Eq. (8.3.b), with the scaling constant set to the passband edge, is \(s\to\Omega_p/s\). On the \(j\Omega\) axis it maps \(\Omega\) to \(\Omega'=\Omega_p/\Omega\):

$$\Omega_p'=\frac{\Omega_p}{\Omega_p}=1,\qquad \Omega_s'=\frac{\Omega_p}{\Omega_s}=\frac{1.4531}{0.6498}\approx2.2361.$$

The gains \(A_p\) and \(A_s\) are unchanged.

5
Minimum order

The minimum Butterworth order, Eq. (5.5), is

$$N=\left\lceil \frac{\ln\!\big[(1/A_s^2-1)/(1/A_p^2-1)\big]}{2\ln(\Omega_s'/\Omega_p')} \right\rceil.$$

With \(1/A_p^2-1\approx0.2589\), \(1/A_s^2-1=99\) and \(\Omega_s'/\Omega_p'=2.2361\):

$$N_{\text{real}}=\frac{\ln(99/0.2589)}{2\ln2.2361}=\frac{5.946}{1.609}\approx3.69\ \Longrightarrow\ \boxed{N=4}$$
6
Cutoff frequency

The cutoff that meets the passband edge exactly, Eq. (5.6), is

$$\Omega_c'=\Omega_p'\left(\frac{1}{A_p^2}-1\right)^{-1/(2N)}.$$

With \(\Omega_p'=1\) and \(N=4\):

$$\Omega_c'=(0.2589)^{-1/8}\approx\boxed{1.1840}$$

Mapped back with \(\Omega=\Omega_p/\Omega'\), the high-pass \(-3\,\text{dB}\) cutoff is

$$\Omega_c=\frac{\Omega_p}{\Omega_c'}=\frac{1.4531}{1.1840}\approx\boxed{1.2273\ \text{rad/s}}$$
7
Analog transfer functions

Substitute \(N=4\) and \(\Omega_c'=1.1840\) into Eq. (5.4):

$$|H_{LP}(j\Omega)|^2=\frac{1}{1+(\Omega/1.1840)^{8}}.$$

With \(N=4\), Eq. (5.7) places the four left-half-plane poles at

$$p_k=1.1840\,e^{j\left(\frac{\pi}{2}+\frac{(2k-1)\pi}{8}\right)},\qquad k=1,\dots,4,$$

so that

$$H_{LP}(s)=\frac{1.1840^{4}}{\prod_{k=1}^{4}(s-p_k)}.$$

The high-pass filter follows from \(s\to\Omega_p/s\):

$$H_{HP}(s)=H_{LP}\!\left(\frac{1.4531}{s}\right)=\frac{1.1840^{4}\,s^4}{\prod_{k=1}^{4}\left(1.4531-p_ks\right)}.$$
(d) Apply the bilinear transform
8
Write H(z)

Substitute the bilinear transform with \(T=1\) into \(H_{HP}(s)\) from Step 7:

$$H(z)=\left.\frac{1.1840^{4}\,s^4}{\prod_{k=1}^{4}\left(1.4531-p_ks\right)}\right|_{s=2\frac{1-z^{-1}}{1+z^{-1}}},\qquad p_k=1.1840\,e^{j\left(\frac{\pi}{2}+\frac{(2k-1)\pi}{8}\right)},\quad k=1,\dots,4.$$

The four zeros at \(s=0\) map to four zeros at \(z=1\) (\(\omega=0\)).

(e) Verify the design
9
Evaluate at the band edges

On the unit circle, \(z=e^{j\omega}\) and the bilinear transform gives \(s=j\Omega\) with \(\Omega=2\tan(\omega/2)\). With \(\Omega'=\Omega_p/\Omega\) in \(|H_{LP}|^2\), the high-pass response is

$$|H(e^{j\omega})|^2=|H_{HP}(j\Omega)|^2=\frac{1}{1+(\Omega_c/\Omega)^{8}},\qquad \Omega_c=1.2273,\quad \Omega=2\tan(\omega/2).$$

Stopband edge, \(\omega=0.2\pi\)

$$\Omega=2\tan(0.1\pi)=0.6498,\qquad \frac{\Omega_c}{\Omega}=\frac{1.2273}{0.6498}=1.8886,\qquad \left(1.8886\right)^{8}=161.8$$
$$|H(e^{j0.2\pi})|=\frac{1}{\sqrt{1+161.8}}=\frac{1}{\sqrt{162.8}}=0.0784\quad\Longrightarrow\quad 20\log_{10}0.0784=-22.12\ \text{dB}.$$

\(0.0784\le0.1\): the stopband requirement is met with a margin of \(2.1\ \text{dB}\).

Passband edge, \(\omega=0.4\pi\)

$$\Omega=2\tan(0.2\pi)=1.4531,\qquad \frac{\Omega_c}{\Omega}=\frac{1.2273}{1.4531}=0.8446,\qquad \left(0.8446\right)^{8}=0.2589$$
$$|H(e^{j0.4\pi})|=\frac{1}{\sqrt{1+0.2589}}=\frac{1}{\sqrt{1.2589}}=0.8913\quad\Longrightarrow\quad 20\log_{10}0.8913=-1.00\ \text{dB}.$$

\(0.8913\ge0.89125\): the passband requirement is met, exactly at the limit, because Step 6 chose \(\Omega_c'\) to make \((\Omega_c/\Omega_p)^{8}=1/A_p^2-1\).

10
Check the complete bands

\(|H(e^{j\omega})|\) increases monotonically from 0 at \(\omega=0\) to 1 at \(\omega=\pi\), because \(\tan(\omega/2)\) increases monotonically on \(0\le\omega<\pi\). The response is therefore below 0.0784 throughout \(0\le\omega\le0.2\pi\) and above 0.89125 throughout \(0.4\pi\le\omega\le\pi\). The \(-3\,\text{dB}\) point is at \(\omega_c=2\arctan(\Omega_c/2)\approx0.350\pi\). Figure 9.2 draws the response against the mask.

0.0784 (−22.1 dB) ≤ 0.10.8913 (−1.0 dB) ≥ 0.89125−3 dB at 0.350π00.2π0.4π0.6π0.8ππω00.10.50.7070.8911|H(ejω)|stopbandlimitpassband limit
Figure 9.2. Problem 9.2, part (e). Magnitude response \(|H(e^{j\omega})|\) of the fourth-order Butterworth high-pass filter, computed from Step 9. The hatched regions are excluded by the specification. The response passes below the stopband limit at \(0.2\pi\) (0.0784) and through the passband limit exactly at \(0.4\pi\) (0.89125); the dashed lines mark the \(-3\,\text{dB}\) point at \(0.350\pi\).

The order of operations is the one in Section 8.1.3: prewarp, transform to the low-pass prototype, design, transform back, then apply the bilinear transform. Because the bilinear transform has no aliasing, it suits a high-pass filter, whose response stays near 1 up to \(\omega=\pi\) (Problem 8.3).

9.3  FIR low-pass filter for sample-rate conversion

This problem designs the FIR filter of a rational sample-rate converter by the window method of Lecture 7, first with a fixed window and then with a Kaiser window (Eqs. 7.15 to 7.22).

PROBLEM 9.3

FIR low-pass filter for sample-rate conversion

The system in Figure 9.3.a changes the sampling rate by first upsampling by \(U=2\) and then downsampling by \(D=3\). The input is bandlimited to \(|\omega|\leq \pi/3\) and has unity peak magnitude, \(X(e^{j0})=1\). At every point in the system, \(\omega\) denotes digital angular frequency in rad/sample, normalized to the sampling rate at that point.

Design the low-pass FIR filter \(H(z)\) for a passband ripple of \(A_p=0.1\,\mathrm{dB}\) and a minimum stopband attenuation of \(A_s=60\,\mathrm{dB}\). The nominal passband gain must be \(G=U=2\), so that the complete converter preserves the time-domain amplitude of the reconstructed signal.

x[n]↑ 2y1[n]FIR LPFH(z)y2[n]↓ 3z[n]−π−π/30π/3π1X(ejω)ω
Figure 9.3.a. Sample-rate converter and the non-zero part of the input spectrum over one \(2\pi\) interval.
  1. State the overall sampling-rate conversion factor and determine the largest output angular frequency occupied by the converted signal.
  2. Starting with the supplied \(X(e^{j\omega})\), draw the complete spectrum evolution through the system: \(Y_1(e^{j\omega})\) after upsampling, the low-pass magnitude mask \(|H(e^{j\omega})|\), \(Y_2(e^{j\omega})\) after filtering, and \(Z(e^{j\omega})\) after downsampling. From the desired baseband copy and the nearest image, determine \(\omega_p\), \(\omega_s\), \(\Delta\omega\) and a suitable ideal cutoff \(\omega_c\). Label the peak magnitude at every stage of the drawing.
  3. Use the fixed-window table below to select the best window from rectangular, Bartlett, Hann, Hamming, Blackman. Determine the FIR order \(M\), length \(L=M+1\), filter type and group delay. Indicate the selected window shape.
  4. Repeat the design using a Kaiser window. Calculate the linear tolerances, \(\beta\), \(M\), \(L\), filter type and group delay.
  5. Compare the two designs in terms of coefficient count and delay.
Window
Side lobe
Main lobe
\(K\)
\(G_p\) (dB)
\(G_s\) (dB)
Rectangular
−13 dB
\(4\pi/L\)
4
−0.81
−21
Bartlett
−25 dB
\(8\pi/L\)
8
−0.45
−26
Hann
−31 dB
\(8\pi/L\)
8
−0.055
−44
Hamming
−41 dB
\(8\pi/L\)
8
−0.019
−53
Blackman
−57 dB
\(12\pi/L\)
12
−0.0017
−74

Fixed-window table (Lecture 7, Table 7.4). Main-lobe width \(K\pi/L\) with \(L=M+1\) taps; \(G_p\) and \(G_s\) are the passband and stopband gains of a window-designed low-pass filter.

Kaiser window (Lecture 7, Eqs. 7.16 and 7.17)
$$w_K[n]=\frac{I_0\!\Big(\beta\sqrt{1-(2n/M-1)^2}\Big)}{I_0(\beta)},\qquad 0\le n\le M$$
$$\beta\approx\begin{cases}0.1102\,(-G_s-8.7), & -G_s>50\\ 0.5842\,(-G_s-21)^{0.4}+0.07886\,(-G_s-21), & 21\le -G_s\le50\\ 0, & -G_s<21\end{cases}\qquad M\approx\frac{-G_s-8}{2.285\,\Delta\omega}$$
(a) Conversion factor and output bandwidth
1
Overall conversion factor

Upsampling by \(U\) raises the rate by 2 and downsampling by \(D\) lowers it by 3, so

$$F_z=\frac{U}{D}F_x=\frac{2}{3}F_x.$$
2
Largest output frequency

Upsampling divides every digital frequency by \(U\); downsampling multiplies it by \(D\). The input edge \(\pi/3\) therefore moves to

$$\omega_{z,\max}=\frac{D}{U}\cdot\frac{\pi}{3}=\frac{3}{2}\cdot\frac{\pi}{3}=\frac{\pi}{2}.$$

This is below \(\pi\), so the converted signal fits in the output band without aliasing.

(b) Spectrum evolution and band edges
3
After upsampling

Inserting \(U-1=1\) zero between samples compresses the spectrum by 2:

$$Y_1(e^{j\omega})=X(e^{j2\omega}).$$

Within \(-\pi\le\omega\le\pi\) there are two kinds of copy, each of peak 1: the baseband copy on \(|\omega|\le\pi/6\), and the image centred at \(\pm\pi\), occupying \(5\pi/6\le|\omega|\le\pi\).

4
Band edges of the filter

The filter must keep the baseband copy and remove the nearest image. The passband edge is the baseband edge, and the stopband edge is where the image begins:

$$\omega_p=\frac{\pi}{6},\qquad \omega_s=\pi-\frac{\pi}{6}=\frac{5\pi}{6},\qquad \Delta\omega=\omega_s-\omega_p=\frac{2\pi}{3}\approx2.094\ \text{rad/sample}.$$

The ideal cutoff sits at the centre of the transition band, Eq. (7.20):

$$\omega_c=\frac{\omega_p+\omega_s}{2}=\frac{\pi}{2}.$$

After filtering, the signal occupies \(|\omega|\le\pi/6<\pi/D=\pi/3\), so the downsampler does not alias it. The transition band \(\pi/6<|\omega|<5\pi/6\) contains no signal, so its shape does not matter.

5
After filtering

The filter has gain \(G=U=2\) in the passband and removes the image:

$$Y_2(e^{j\omega})=H(e^{j\omega})Y_1(e^{j\omega})=2X(e^{j2\omega}),\qquad |\omega|\le\frac{\pi}{6},$$

with peak 2. The image remains only at the stopband level, at most \(2\delta_s\); Step 7 makes this meet the specification.

6
After downsampling

Keeping every third sample stretches the spectrum by 3 and scales it by \(1/D\):

$$Z(e^{j\omega})=\frac{1}{3}\sum_{k=0}^{2}Y_2\!\left(e^{j(\omega-2\pi k)/3}\right)=\frac{2}{3}X\!\left(e^{j2\omega/3}\right),\qquad |\omega|\le\frac{\pi}{2},$$

with peak \(2/3\). The gain of 2 restores the time-domain amplitude: the area under one period of the spectrum is \(\tfrac{1}{2}\cdot\tfrac{2\pi}{3}\cdot1=\tfrac{\pi}{3}\) for \(X\) and \(\tfrac{1}{2}\cdot\pi\cdot\tfrac{2}{3}=\tfrac{\pi}{3}\) for \(Z\), so \(z[0]=x[0]=1/6\). Figure 9.3.b draws all four stages.

Xω1−π−π/30π/3πY1ω111−π−5π/6−π/60π/65π/6π|H|ωG = 2≤ 2δs≤ 2δs−5π/6−π/60π/65π/6−ωc = −π/2−π/2ωc = π/2π/2Y2ω2−π−π/60π/6πZω2/3−π−π/20π/2π
Figure 9.3.b. Problem 9.3, part (b). Spectrum evolution through the converter over \(-\pi\le\omega\le\pi\), with the peak magnitude labelled at every stage; heights are not to a common scale. \(X\): the input, peak 1. \(Y_1\): compressed by 2, with images centred at \(\pm\pi\), all of peak 1. \(|H|\): the magnitude mask, flat at \(G=2\) in the passband \(|\omega|\le\pi/6\) (green) and at most \(2\delta_s\) in the stopband \(|\omega|\ge5\pi/6\) (purple), with the ideal cutoff \(\pm\omega_c=\pm\pi/2\) in the transition band. \(Y_2\): only the baseband copy remains, peak 2. \(Z\): stretched by 3 to \(\pm\pi/2\) and scaled by \(1/3\), peak \(2/3\).
(c) Fixed-window design
7
Linear tolerances, including the passband gain

Follow the recipe of Section 7.5.1. The ripple and attenuation are given as positive dB numbers, so \(G_p=-0.1\,\text{dB}\) and \(G_s=-60\,\text{dB}\). Eq. (7.18) gives

$$\delta_p=1-10^{G_p/20}=1-10^{-0.1/20}\approx0.0114,\qquad 10^{G_s/20}=10^{-60/20}=0.001.$$

A window design produces a unit-gain filter within \(1\pm\delta_p\) in the passband and below \(\delta_s\) in the stopband. Multiplying the coefficients by \(G=2\) scales both deviations by 2. The passband ripple is relative to the nominal gain, so \(\delta_p\) is unchanged. The stopband limit is an absolute level, so the unit-gain design must satisfy \(2\delta_s\le0.001\):

$$\delta_s=\frac{0.001}{2}=0.0005.$$

The window must meet the tighter tolerance, Eq. (7.22):

$$\delta=\min(\delta_p,\delta_s)=\min(0.0114,\,0.0005)=0.0005,\qquad 20\log_{10}\delta\approx-66.02\ \text{dB}.$$

This is the stopband gain the window must reach, \(G_s\approx-66.02\,\text{dB}\).

8
Select the window

From the table, the stopband gains are \(-21\) (rectangular), \(-26\) (Bartlett), \(-44\) (Hann) and \(-53\,\text{dB}\) (Hamming): none reaches \(-66.0\,\text{dB}\). Blackman gives \(G_s=-74\,\text{dB}\le-66.0\,\text{dB}\) and \(G_p=-0.0017\,\text{dB}\ge-0.1\,\text{dB}\), so it is the first window that meets both. Blackman has \(K=12\).

9
Order, length, type and delay

Eq. (7.15) sets the main-lobe width \(K\pi/L\) equal to \(\Delta\omega\):

$$L\approx\frac{K\pi}{\Delta\omega}=\frac{12\pi}{2\pi/3}=18\quad\Longrightarrow\quad M=L-1=17.$$

Choose a Type I filter: round \(M\) up to the next even integer, so that the impulse response has a centre sample and an integer group delay.

$$\boxed{M=18,\ L=19,\ \text{Type I}},\qquad \tau=\frac{M}{2}=9\ \text{samples}$$

at the filter's sampling rate \(2F_x\).

(d) Kaiser-window design
10
Shape parameter

The linear tolerances are those of Step 7, \(\delta_p\approx0.0114\) and \(\delta_s=0.0005\), so \(-G_s=66.02\,\text{dB}\). Since \(-G_s>50\), the top case of Eq. (7.17) applies:

$$\beta=0.1102\,(66.02-8.7)=0.1102\times57.32\approx\boxed{6.32}$$
11
Order, length, type and delay
$$M\approx\frac{-G_s-8}{2.285\,\Delta\omega}=\frac{66.02-8}{2.285\times2\pi/3}=\frac{58.02}{4.7857}\approx12.12$$

Round up to the next even integer for a Type I filter:

$$\boxed{M=14,\ L=15,\ \text{Type I}},\qquad \tau=\frac{M}{2}=7\ \text{samples}.$$

The coefficients are \(h[n]=2\,\dfrac{\sin(\omega_c(n-7))}{\pi(n-7)}\,w_K[n]\), \(0\le n\le14\), with \(w_K[n]\) from Eq. (7.16) at \(\beta=6.32\). After scaling by 2, the stopband stays below \(2\times0.0005=0.001\), as required.

(e) Comparison
12
Coefficient count and delay

The Kaiser design uses \(L=15\) coefficients against Blackman's 19, which is 4 fewer (21% fewer). Both are symmetric Type I filters, so the number of distinct multipliers is \((L+1)/2\): 8 against 10. The delay falls from 9 to 7 samples at the rate \(2F_x\), that is, from 4.5 to 3.5 input sample periods. Blackman is longer because its fixed \(-74\,\text{dB}\) stopband exceeds the \(-66.0\,\text{dB}\) requirement, while \(\beta\) tunes the Kaiser window to the requirement.

The same comparison appears in Examples 7.7 and 7.8; here the specification comes from the upsampler image rather than being given directly.

Summary and key formulas

The reference sheet: the formulas used in this tutorial, in the order they are applied. The last row covers the FIR design of Problem 9.3.

Prewarping · Eq. (8.11)
$$\Omega=\dfrac{2}{T}\tan(\omega/2)$$
Low-pass to high-pass · Eq. (8.3.b)
$$s\to\dfrac{\Omega_p}{s},\quad \Omega_s'=\dfrac{\Omega_p}{\Omega_s}$$
Butterworth order · Eq. (5.5)
$$N=\left\lceil\dfrac{\ln\frac{1/A_s^2-1}{1/A_p^2-1}}{2\ln(\Omega_s'/\Omega_p')}\right\rceil$$
Cutoff · Eq. (5.6)
$$\Omega_c'=\Omega_p'\Big(\dfrac{1}{A_p^2}-1\Big)^{-\frac{1}{2N}}$$
Bilinear transform · Eq. (8.7)
$$s=\dfrac{2}{T}\dfrac{1-z^{-1}}{1+z^{-1}}$$
Verification
$$|H(e^{j\omega})|=\big|H_{HP}\big(j\tfrac{2}{T}\tan\tfrac{\omega}{2}\big)\big|$$
Up- and downsampling
$$Y_1=X(e^{jU\omega}),\quad Z=\tfrac{1}{D}\textstyle\sum_k Y_2(e^{j(\omega-2\pi k)/D})$$
Fixed-window length · Eq. (7.15)
$$L\approx\dfrac{K\pi}{\Delta\omega},\quad M=L-1$$
Kaiser window · Eq. (7.17)
$$\beta=0.1102(-G_s-8.7),\quad M\approx\dfrac{-G_s-8}{2.285\,\Delta\omega}$$