Outline
13.1 Filter Design Specifications
13.2 Analog Filter Design
13.3 Digital Filters from Analog Prototypes
13.4 MATLAB & Other Shapes
13.5 Summary
Exercises
DSP Study Guide · Chapter 13

IIR Filter Design

From tolerance specifications through analog prototypes (Butterworth, Chebyshev, elliptic) to digital IIR filters via impulse invariance and the bilinear transformation

13.1 Filter Design Specifications

Filter design starts not from a transfer function but from a specification(規格): how much the passband may ripple, how much the stopband must be attenuated, and how wide the transition band may be. The designer's job is to find a realizable, stable, causal rational system function $H(z)$ whose frequency response stays inside the allowed tolerance region with the lowest possible cost (filter order).

13.1.1 The Tolerance Scheme

An ideal lowpass response — unity gain up to a cutoff, zero beyond — is unrealizable: it is noncausal and has infinite-length impulse response with no rational $H(z)$. Practical specifications therefore relax the ideal into a tolerance scheme (容忍度規格圖) with three regions:

1 1−δₚ δₛ 0 |H(e^jω)| ωₚ ωₛ π ω passband 通帶 transition 過渡帶 stopband 阻帶
Fig. 13-1 — Lowpass tolerance scheme: the realized response (red) must thread the passband ripple strip and stay below the stopband ceiling; the transition band is unconstrained. (紅色曲線必須穿過通帶容許帶並壓在阻帶上限以下,過渡帶為不設限區域。)
Four numbers define a lowpass spec
$\omega_p$ (passband edge), $\omega_s$ (stopband edge), $\delta_p$ (passband ripple 通帶漣波), $\delta_s$ (stopband ripple 阻帶漣波). Tightening any of them — smaller ripples or a narrower transition band $\Delta\omega = \omega_s-\omega_p$ — raises the required filter order $N$.

13.1.2 Ripple Specifications in dB

Specifications are usually quoted logarithmically. The passband ripple $R_p$ and the minimum stopband attenuation $A_s$ (both positive dB numbers) relate to the linear tolerances as:

dB ↔ linear ripple $$R_p = -20\log_{10}(1-\delta_p) \;\text{dB}, \qquad A_s = -20\log_{10}(\delta_s)\;\text{dB}$$

Typical values: $R_p = 1$ dB means $1-\delta_p = 10^{-1/20} = 0.8913$; $A_s = 40$ dB means $\delta_s = 10^{-40/20} = 0.01$. A useful intermediate quantity is the discrimination ratio built from $\varepsilon_p^2 = 10^{R_p/10}-1$ (passband) and $10^{A_s/10}-1$ (stopband); it appears in every order formula in this chapter.

Watch the ripple convention
Some texts (and MATLAB) define the passband as $1-\delta_p \le |H| \le 1$ (peak gain normalized to 1, all ripple below 1); others use $1-\delta_1 \le |H| \le 1+\delta_1$. The dB conversions differ accordingly. MATLAB's buttord/cheby1 use $R_p$ measured from a peak of 0 dB — state your convention before computing $N$, or your order can be off by one.

13.1.3 FIR vs. IIR: Choosing the Filter Type

Before designing, choose the filter class. The lecture's comparison:

PropertyFIR(有限脈衝響應)IIR(無限脈衝響應)
PhaseExactly linear phase possible (symmetric $h[n]$)Nonlinear phase; only approximately linear in passband
StabilityAlways stable (no feedback poles)Must keep all poles inside $|z|=1$
Order for a sharp specHigh (often 10× the IIR order)Low — sharp cutoffs with few coefficients
Computational costHigher per sample (long taps), but FFT block convolution helpsLow per sample (recursive)
Coefficient sensitivityRobust to quantizationSensitive; poles near $|z|=1$ may go unstable
Design routeDirect digital (windows, Parks–McClellan)Usually via an analog prototype
Why design IIR filters from analog prototypes?
Closed-form analog filter theory (Butterworth, Chebyshev, elliptic) has been mature since the 1930s: given a spec, formulas yield the minimum order and exact pole locations. The classical IIR design recipe reuses this art: design a continuous-time prototype $H_c(s)$ that meets a (translated) analog spec, then map $s \to z$ so that the good properties survive. The two standard maps are impulse invariance(脈衝響應不變法) and the bilinear transformation(雙線性轉換), covered in §13.3.
直觀解釋(點擊展開)
濾波器設計就像訂做衣服:規格圖(tolerance scheme)是身材尺寸,濾波器階數 $N$ 是布料成本。 通帶漣波越小、阻帶衰減越大、過渡帶越窄,需要的階數就越高。IIR 濾波器用「遞迴」(回授)結構, 所以同樣銳利的截止特性只需要 FIR 十分之一左右的係數,代價是相位不再線性、而且要小心極點跑出單位圓造成不穩定。 經典 IIR 設計不直接在數位域硬算,而是先借用類比濾波器(巴特沃斯、柴比雪夫、橢圓)的現成公式設計 $H_c(s)$,再用映射把 $s$ 平面搬到 $z$ 平面。

13.2 Analog Filter Design

13.2.1 Analog Filter Families at a Glance

All classical analog lowpass prototypes share the squared-magnitude template $|H_c(j\Omega)|^2 = \dfrac{1}{1+V_N^2(\Omega)}$ where $V_N$ is a polynomial or rational function of order $N$ that is small in the passband and large in the stopband. The four families differ in where they spend their approximation error:

FamilyPassbandStopbandRoll-off / order neededPhase linearity
Butterworth(巴特沃斯)Maximally flat, monotonicMonotonicSlowest → highest $N$Best of the four
Chebyshev I(柴比雪夫一型)EquirippleMonotonicFaster → moderate $N$Worse
Chebyshev II(柴比雪夫二型)Monotonic (flat)EquirippleSame $N$ as Type IModerate
Elliptic / Cauer(橢圓)EquirippleEquirippleFastest → minimum $N$Worst (very nonlinear)

13.2.2 Butterworth Filters

The Butterworth lowpass of order $N$ with 3-dB cutoff $\Omega_c$ is defined by its squared magnitude:

Butterworth magnitude $$|H_c(j\Omega)|^2 \;=\; \frac{1}{1+\left(\dfrac{\Omega}{\Omega_c}\right)^{2N}}$$

Its defining property is maximal flatness(最大平坦): the first $2N-1$ derivatives of $|H_c(j\Omega)|^2$ are zero at $\Omega = 0$. Consequences visible in Fig. 13-2:

2026-06-12T22:36:32.960138 image/svg+xml Matplotlib v3.10.8, https://matplotlib.org/ 0.0 0.5 1.0 1.5 2.0 2.5 3.0 Ω / Ω_c 0.0 0.2 0.4 0.6 0.8 1.0 |H_c(jΩ)| 1/√2 (−3 dB) Butterworth magnitude response — maximally flat, all orders pass through −3 dB at Ω_c N = 1 N = 2 N = 4 N = 8 N = 16
Fig. 13-2 — Butterworth magnitude responses for $N$ = 1, 2, 4, 8, 16. All orders are maximally flat at $\Omega=0$ and cross $1/\sqrt2$ at $\Omega=\Omega_c$; larger $N$ approaches the ideal brick wall.(不論階數,$\Omega_c$ 處皆為 −3 dB;階數越高越接近理想磚牆。)

Poles of the Butterworth filter

Substituting $\Omega = s/j$ gives $H_c(s)H_c(-s) = \dfrac{1}{1+(s/j\Omega_c)^{2N}}$, whose $2N$ poles are equally spaced on a circle of radius $\Omega_c$:

Butterworth poles $$s_k \;=\; \Omega_c\, e^{\,j\pi(2k+N+1)/(2N)}, \qquad k = 0,1,\dots,2N-1$$

The poles come in pairs $\pm s_k$, none on the $j\Omega$ axis, separated by angle $\pi/N$. To build the stable, causal $H_c(s)$ we assign the $N$ left-half-plane poles to $H_c(s)$ and the mirror images to $H_c(-s)$.

Example 13.1 — First-order Butterworth = the RC lowpass (from the slides)

A first-order Butterworth filter is just the RC circuit on slide 14: with $R = 100\,\text{k}\Omega$ and $C = 0.001\,\mu\text{F}$,

$$H_c(s) = \frac{1}{1+sRC} = \frac{\Omega_c}{s+\Omega_c},\qquad \Omega_c = \frac{1}{RC},\qquad |H_c(j\Omega)|^2 = \frac{1}{1+(\Omega/\Omega_c)^2}$$
The 3-dB cutoff frequency is $$f_{3\text{dB}} = \frac{1}{2\pi RC} = \frac{1}{2\pi\,(10^5)(10^{-9})} \approx 1.59\ \text{kHz}.$$ This matches the general template with $N=1$: a single pole at $s=-\Omega_c$, roll-off $-20$ dB/decade.

Choosing the order from a spec

Requiring $|H_c(j\Omega_p)|^2 \ge (1-\delta_p)^2 = 10^{-R_p/10}$ and $|H_c(j\Omega_s)|^2 \le \delta_s^2 = 10^{-A_s/10}$ and solving the two equations of $(\Omega/\Omega_c)^{2N}$ gives:

Butterworth order formula $$N \;\ge\; \frac{\log_{10}\!\left[\dfrac{10^{A_s/10}-1}{10^{R_p/10}-1}\right]} {2\,\log_{10}(\Omega_s/\Omega_p)} \qquad\text{(round up to the next integer)}$$

With the integer $N$, $\Omega_c$ can be placed anywhere between the value that meets the passband exactly, $\Omega_c = \Omega_p\,(10^{R_p/10}-1)^{-1/2N}$, and the value that meets the stopband exactly, $\Omega_c = \Omega_s\,(10^{A_s/10}-1)^{-1/2N}$. The slack exists because $N$ was rounded up.

13.2.3 Butterworth Design Example

Example 13.2 — Analog Butterworth from a spec

Spec: passband edge $\Omega_p = 1$ rad/s with $R_p = 1$ dB; stopband edge $\Omega_s = 2$ rad/s with $A_s = 40$ dB. Find $N$ and $\Omega_c$.

Step 1 — discrimination numbers. $10^{R_p/10}-1 = 10^{0.1}-1 = 0.2589$; $\;10^{A_s/10}-1 = 10^{4}-1 = 9999$.
Step 2 — order. $$N \ge \frac{\log_{10}(9999/0.2589)}{2\log_{10}(2)} = \frac{4.587}{0.602} = 7.62 \;\Rightarrow\; N = 8.$$
Step 3 — cutoff. Meeting the passband exactly: $\Omega_c = 1\cdot(0.2589)^{-1/16} = 1.088$ rad/s; the stopband is then exceeded (slack from rounding $N$ up). Any $\Omega_c\in[1.088,\;1.126]$ works.
Step 4 — poles. The 8 left-half-plane poles sit on the circle $|s| = \Omega_c$ at angles $\pi/2 + (2k+1)\pi/16$, $k=0,\dots,7$; $H_c(s) = \Omega_c^8 \big/ \prod_k (s-s_k)$.

13.2.4 Chebyshev Type I Filters

The Chebyshev Type I filter trades passband flatness for a sharper knee: it is equiripple in the passband(通帶等漣波) and monotonic in the stopband.

Chebyshev I magnitude $$|H_c(j\Omega)|^2 = \frac{1}{1+\varepsilon^2 T_N^2(\Omega/\Omega_p)}, \qquad T_N(x) = \begin{cases}\cos(N\cos^{-1}x), & |x|\le 1\\[4pt] \cosh(N\cosh^{-1}x), & |x|>1\end{cases}$$

$T_N$ is the order-$N$ Chebyshev polynomial: it oscillates between $\pm1$ for $|x|\le 1$ (hence equal ripple between $1$ and $1/\sqrt{1+\varepsilon^2}$ in the passband) and grows like $\cosh$ — much faster than $x^N$ — outside, giving rapid attenuation. Properties:

13.2.5 Chebyshev Type II Filters

Chebyshev Type II (inverse Chebyshev) flips the trade: monotonic, maximally-flat-like passband and equiripple stopband(阻帶等漣波), achieved by placing transmission zeros on the $j\Omega$ axis in the stopband:

Chebyshev II magnitude $$|H_c(j\Omega)|^2 = \frac{1}{1+\left[\varepsilon^2\,T_N^2(\Omega_s/\Omega)\right]^{-1}}, \qquad \delta_s^2 = \frac{\varepsilon^2}{1+\varepsilon^2}$$

It needs the same order as Type I for a given spec, but has no passband ripple — useful when the passband carries a signal whose amplitude must not be distorted. Cost: a rational (not polynomial) transfer function with finite zeros, and the response no longer decays monotonically to zero at high frequency (it returns to the ripple ceiling $\delta_s$).

13.2.6 Elliptic (Cauer) Filters

Elliptic filters are equiripple in both bands, replacing $T_N$ with the Jacobi elliptic rational function $R_N$:

Elliptic magnitude $$|H_c(j\Omega)|^2 = \frac{1}{1+\varepsilon^2 R_N^2(\Omega/\Omega_p)}$$

By the Chebyshev approximation theorem, distributing the error equally over both bands is optimal: for given $(\delta_p,\delta_s,\Omega_p,\Omega_s)$ the elliptic filter achieves the spec with the minimum possible order(最小階數) of any rational filter. The price is the most nonlinear phase and strong group-delay peaking near the band edge.

2026-06-12T22:36:33.493081 image/svg+xml Matplotlib v3.10.8, https://matplotlib.org/ 0.0 0.5 1.0 1.5 2.0 2.5 3.0 Ω (rad/s) −70 −60 −50 −40 −30 −20 −10 0 20 log₁₀|H_c(jΩ)| (dB) Same spec (Ω_p=1, Ω_s=1.5, R_p=1 dB, A_s=40 dB): order needed by each family Butterworth (N = 14) Chebyshev I (N = 7) Chebyshev II (N = 7) Elliptic (N = 5)
Fig. 13-3 — All four families designed (scipy) to the same analog spec $\Omega_p=1$, $\Omega_s=1.5$, $R_p=1$ dB, $A_s=40$ dB. Required orders: Butterworth 14, Chebyshev I/II 7, elliptic 5. Shaded regions are forbidden by the tolerance scheme. (同一規格下各家族所需階數:橢圓最省,巴特沃斯最高。)
Order ranking (memorize)
For the same tolerance scheme: $\;N_\text{elliptic} \le N_\text{Cheb I} = N_\text{Cheb II} \le N_\text{Butterworth}$. Phase linearity ranks exactly the other way. Choose Butterworth when waveform fidelity (phase) matters, elliptic when coefficients/order are at a premium, Chebyshev as the compromise.

13.2.7 Analog Frequency Transformations

All formulas above are for a lowpass prototype. Other shapes come from algebraic substitutions on $s$ (here the prototype has cutoff 1 rad/s):

TargetSubstitution $s \to$Effect
Lowpass, cutoff $\Omega_c$$s/\Omega_c$Scales the cutoff
Highpass, cutoff $\Omega_c$$\Omega_c/s$Swaps $\Omega=0$ and $\Omega=\infty$
Bandpass, edges $\Omega_1,\Omega_2$$\dfrac{s^2+\Omega_1\Omega_2}{s(\Omega_2-\Omega_1)}$Order doubles ($N \to 2N$)
Bandstop, edges $\Omega_1,\Omega_2$$\dfrac{s(\Omega_2-\Omega_1)}{s^2+\Omega_1\Omega_2}$Order doubles

In digital IIR design the same idea can be applied either in the analog domain (before the $s\to z$ map) or directly in the $z$-domain with all-pass substitutions; MATLAB's butter(N, Wn, 'high') etc. handle this automatically (§13.4).

13.3 Digital Filters from Analog Prototypes

13.3.1 What a Good s→z Mapping Must Do

We have a good $H_c(s)$; we need $H(z)$. Any useful transformation from the $s$-plane to the $z$-plane must satisfy two requirements:

  1. Frequency axis maps to the unit circle: the essential frequency-selective behavior on the $j\Omega$ axis must appear on $z = e^{j\omega}$ (possibly with a distorted frequency axis).
  2. Stability is preserved: the left half-plane $\operatorname{Re}\{s\}<0$ must map inside the unit circle $|z|<1$, so a stable, causal $H_c(s)$ yields a stable, causal $H(z)$.

Two classical mappings satisfy both: impulse invariance and the bilinear transformation.

13.3.2 Impulse Invariance

The impulse invariance method(脈衝響應不變法) defines the digital filter by sampling the analog impulse response:

Impulse invariance $$h[n] \;=\; T\,h_c(nT) \qquad\Longrightarrow\qquad H(e^{j\omega}) \;=\; \sum_{k=-\infty}^{\infty} H_c\!\left(j\frac{\omega}{T} - j\frac{2\pi k}{T}\right)$$

This is exactly the sampling theorem applied to $h_c(t)$ (the factor $T$ normalizes the gain so that $H(e^{j0}) \approx H_c(j0)$). Two consequences:

Implementation via partial fractions

In practice nobody samples $h_c(t)$ literally; the pole mapping is done algebraically. Expand the (simple-pole) prototype and map each term:

Pole-by-pole mapping $$H_c(s) = \sum_{k=1}^{N}\frac{A_k}{s-s_k} \;\;\xrightarrow{\;h[n]=T h_c(nT)\;}\;\; H(z) = \sum_{k=1}^{N}\frac{T A_k}{1-e^{s_k T} z^{-1}}$$

Each analog pole $s_k$ becomes a digital pole at $z_k = e^{s_k T}$. Since $\operatorname{Re}\{s_k\}<0 \Rightarrow |z_k| = e^{\operatorname{Re}\{s_k\}T} < 1$, stability is preserved. Note that zeros do not map this way — only poles.

Where impulse invariance fails
Because of aliasing, impulse invariance is only suitable for filters that are already essentially bandlimited: lowpass and bandpass designs with strong stopband decay. It cannot be used for highpass or bandstop filters — their response near $\Omega\to\infty$ aliases straight into the band of interest. Also, if $H_c(s)$ has numerator order $M = N-1$ (e.g. Chebyshev II, elliptic), $h_c(t)$ contains fast-decaying terms whose sampling aliases badly; the method works best with all-pole prototypes (Butterworth, Chebyshev I).
2026-06-12T22:36:33.852180 image/svg+xml Matplotlib v3.10.8, https://matplotlib.org/ 0.0 0.2 0.4 0.6 0.8 1.0 ω / π −80 −70 −60 −50 −40 −30 −20 −10 0 Magnitude (dB) Butterworth N=3, Ω_c=1, T=1: aliasing floor of impulse invariance vs bilinear analog |H_c(jω/T)| (target) impulse invariance bilinear transform
Fig. 13-5 — A 3rd-order Butterworth prototype ($\Omega_c=1$, $T=1$) mapped both ways. Impulse invariance (red) tracks the analog target (dashed) at low frequency but its stopband flattens near $\omega=\pi$ due to aliased tails; the bilinear transform (green) keeps deepening because the entire analog axis is squeezed into $[0,\pi)$.(紅色曲線在高頻被混疊「墊高」;綠色雙線性轉換則持續下降。)

13.3.3 The Bilinear Transformation

The bilinear transformation(雙線性轉換) avoids aliasing entirely by using an algebraic, one-to-one map between the $s$-plane and the $z$-plane:

Bilinear transformation $$s = \frac{2}{T}\,\frac{1-z^{-1}}{1+z^{-1}} \qquad\Longleftrightarrow\qquad z = \frac{1+ (T/2)\,s}{1- (T/2)\,s}, \qquad H(z) = H_c(s)\Big|_{s=\frac{2}{T}\frac{1-z^{-1}}{1+z^{-1}}}$$

(It derives from the trapezoidal-rule discretization of the integrator $1/s$.) Mapping properties — check them by substituting $s = \sigma + j\Omega$:

13.3.4 Frequency Warping and Prewarping

Setting $z = e^{j\omega}$ in the bilinear map gives $s = \frac{2}{T}\,\frac{1-e^{-j\omega}}{1+e^{-j\omega}} = j\frac{2}{T}\tan(\omega/2)$, i.e. the frequency axes are related nonlinearly:

Frequency warping $$\Omega = \frac{2}{T}\tan\!\frac{\omega}{2} \qquad\Longleftrightarrow\qquad \omega = 2\arctan\!\frac{\Omega T}{2}$$
2026-06-12T22:36:33.675067 image/svg+xml Matplotlib v3.10.8, https://matplotlib.org/ 0 2 4 6 8 10 12 ΩT (analog frequency × T) 0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 ω / π (digital frequency) ω = π (Nyquist) Bilinear frequency warping: entire analog axis compressed into |ω| < π ω = 2 arctan(ΩT/2) (bilinear) ω = ΩT (impulse invariance, linear)
Fig. 13-4 — Bilinear warping curve $\omega = 2\arctan(\Omega T/2)$ vs. the linear map $\omega=\Omega T$ of impulse invariance. Near DC the two agree ($\tan x \approx x$); at high analog frequency the bilinear map saturates at $\omega=\pi$.(低頻近似線性,高頻被壓縮到 $\pi$ 之前 — 這就是頻率翹曲。)

For small $\omega$, $\Omega \approx \omega/T$ (the map is locally linear), but band edges at higher frequencies are warped. The fix is prewarping(預翹曲): translate every critical digital frequency into the analog domain using the exact warping formula before designing the prototype:

Prewarping the spec $$\Omega_p = \frac{2}{T}\tan\!\frac{\omega_p}{2}, \qquad \Omega_s = \frac{2}{T}\tan\!\frac{\omega_s}{2}$$

Then after the bilinear map the digital filter hits $\omega_p,\omega_s$ exactly. Note $T$ cancels out of the final $H(z)$ — the spec is prewarped by $T$ and warped back by $1/T$ — so one conventionally sets $T=1$ (or $T=2$) for convenience.

Warping distorts shapes, not just edges
Prewarping fixes isolated critical frequencies, but the shape of the response between them is still warped: an analog differentiator's straight-line $|H|\propto\Omega$ does not stay straight after the bilinear map, and equally-spaced analog ripples bunch up near $\omega=\pi$. Piecewise-constant specs (lowpass/highpass/bandpass masks) survive perfectly — which is why the bilinear transform is the standard method for frequency-selective IIR filters, including highpass/bandstop (where impulse invariance fails).
直觀解釋:兩種映射的取捨(點擊展開)
脈衝響應不變法像「拍照取樣」:直接對 $h_c(t)$ 取樣,頻率軸完全不變形($\omega=\Omega T$), 但取樣必然帶來混疊,高頻尾巴會疊回來把阻帶墊高,所以只能用於本來就近似帶限的低通/帶通。 雙線性轉換像「把無限長的尺子捲到圓上」:整條 $j\Omega$ 軸一對一塞進單位圓一圈,完全沒有混疊, 但尺子被不均勻壓縮 — 越高頻壓得越扁($\omega=2\arctan(\Omega T/2)$)。 解法是先「預翹曲」:把想要的數位band edge先用 $\Omega=(2/T)\tan(\omega/2)$ 換算成類比規格再設計, 轉換回來後 band edge 就會落在正確位置。

13.3.5 Complete Design Procedure

IIR design recipe (bilinear route)
  1. Start from the digital spec: $\omega_p, \omega_s, R_p, A_s$.
  2. Prewarp the edges: $\Omega_{p,s} = \frac{2}{T}\tan(\omega_{p,s}/2)$, with $T=1$.
  3. Pick a family; compute the order $N$ and the prototype parameter ($\Omega_c$ or $\varepsilon$) from the analog formulas of §13.2.
  4. Build $H_c(s)$ from its poles (and zeros).
  5. Substitute $s = \frac{2}{T}\frac{1-z^{-1}}{1+z^{-1}}$ and simplify to $H(z)$.
  6. Verify $|H(e^{j\omega})|$ against the tolerance scheme.

For the impulse-invariance route, replace steps 2 and 5 by the linear translation $\Omega_{p,s} = \omega_{p,s}/T$ and the pole-by-pole map of Eq. (13.3.2) — and over-design the stopband slightly to absorb aliasing.

Example 13.3 — One spec, both methods (Butterworth)

Digital spec: $\omega_p = 0.2\pi$ with $R_p = 1$ dB ($|H|\ge 0.8913$), $\omega_s = 0.3\pi$ with $A_s = 15$ dB ($|H|\le 0.1778$). Take $T=1$.

Impulse invariance. Edges translate linearly: $\Omega_p = 0.2\pi$, $\Omega_s = 0.3\pi$. Order: $$N \ge \frac{\log_{10}\!\big[(10^{1.5}-1)/(10^{0.1}-1)\big]}{2\log_{10}(0.3\pi/0.2\pi)} = \frac{\log_{10}(30.62/0.2589)}{2\log_{10} 1.5} = 5.89 \Rightarrow N = 6.$$ Choose $\Omega_c$ from the stopband (leave passband slack to absorb aliasing): $\Omega_c = 0.3\pi\,(30.62)^{-1/12} = 0.7087$. Then expand $H_c(s)=\sum_k A_k/(s-s_k)$ over the 6 LHP poles ($|s_k| = \Omega_c$) and map each to $TA_k/(1-e^{s_k}z^{-1})$.
Bilinear. Prewarp: $\Omega_p = 2\tan(0.1\pi) = 0.6498$, $\Omega_s = 2\tan(0.15\pi) = 1.0191$. Order: $$N \ge \frac{\log_{10}(30.62/0.2589)}{2\log_{10}(1.0191/0.6498)} = 5.30 \Rightarrow N = 6.$$ Meeting the stopband exactly: $\Omega_c = 1.0191\,(30.62)^{-1/12} = 0.7662$. Build the 6-pole Butterworth $H_c(s)$ and substitute $s = 2(1-z^{-1})/(1+z^{-1})$; the result has a 6th-order zero at $z=-1$ and exceeds the stopband spec for all $\omega \ge 0.3\pi$ (no aliasing).
Compare. Same order here, but: the bilinear design's stopband keeps improving toward $\omega=\pi$ (where $|H|=0$), while the impulse-invariant design levels off at its aliasing floor — visible in Fig. 13-5. The bilinear prewarped edges hit the spec exactly; impulse invariance needed stopband over-design.

13.4 Design in MATLAB and Other Filter Shapes

MATLAB (Signal Processing Toolbox) wraps this whole chapter in two calls per family: an order-selection function and a design function. Digital frequencies are normalized so that $1.0$ means the Nyquist frequency $\pi$ rad/sample:

FamilyOrder selectionDesign callNotes
Butterworth[N,Wn] = buttord(wp,ws,Rp,As)[b,a] = butter(N,Wn)maximally flat
Chebyshev I[N,Wp] = cheb1ord(wp,ws,Rp,As)[b,a] = cheby1(N,Rp,Wp)passband ripple $R_p$
Chebyshev II[N,Ws] = cheb2ord(wp,ws,Rp,As)[b,a] = cheby2(N,As,Ws)stopband ripple $A_s$
Elliptic[N,Wp] = ellipord(wp,ws,Rp,As)[b,a] = ellip(N,Rp,As,Wp)minimum order
Manual s→z[bz,az] = bilinear(b,a,fs), impinvar(b,a,fs)map your own $H_c(s)$

Other shapes ("Other Filter Shapes", slide 31): pass 'high', 'stop', or a two-element Wn = [w1 w2] for bandpass — MATLAB applies the frequency transformations of §13.2.7 to the lowpass prototype internally, then the bilinear transform with built-in prewarping:

% lowpass meeting wp=0.4pi, ws=0.6pi, Rp=1 dB, As=40 dB
[N, Wn] = buttord(0.4, 0.6, 1, 40);     % -> N = 9, Wn = 0.4230
[b, a]  = butter(N, Wn);                % digital LPF via bilinear (prewarped)

[b, a] = butter(6, 0.7, 'high');        % highpass, cutoff 0.7*pi
[b, a] = ellip(4, 0.5, 50, [0.25 0.45]);% bandpass (order doubles to 8)
[b, a] = cheby2(5, 40, [0.3 0.5], 'stop'); % bandstop
freqz(b, a, 2048)                       % always verify against the mask
2026-06-12T22:36:34.019846 image/svg+xml Matplotlib v3.10.8, https://matplotlib.org/ 0.0 0.2 0.4 0.6 0.8 1.0 ω / π −80 −60 −40 −20 0 Magnitude (dB) forbidden forbidden buttord/butter design meeting ω_p=0.4π, ω_s=0.6π, R_p=1 dB, A_s=40 dB digital Butterworth, N = 9, ω_c = 0.423π
Fig. 13-6buttord/butter digital design ($N=9$, $\omega_c = 0.423\pi$) verified against the spec mask $\omega_p=0.4\pi$, $\omega_s=0.6\pi$, $R_p=1$ dB, $A_s=40$ dB. The curve threads the unshaded corridor.(設計結果疊上規格遮罩驗證。)
Practical tips
  • MATLAB's digital butter/cheby1/ellip already do prewarping + bilinear internally — never prewarp the arguments yourself.
  • For orders above ~10, the transfer-function form [b,a] is numerically fragile; use [z,p,k] = butter(...) with zp2sos and filter with second-order sections(二階節).
  • impinvar exists but refuses improper $H_c(s)$; remember it is only sensible for lowpass/bandpass prototypes.

13.5 Chapter Summary

Tolerance scheme
Spec = $\{\omega_p,\omega_s,\delta_p,\delta_s\}$; $R_p = -20\log_{10}(1-\delta_p)$, $A_s = -20\log_{10}\delta_s$. Tighter spec → higher order.
Butterworth
$|H_c|^2 = [1+(\Omega/\Omega_c)^{2N}]^{-1}$; maximally flat, monotonic; $-3$ dB at $\Omega_c$ for all $N$; $2N$ poles equally spaced on circle of radius $\Omega_c$; keep the $N$ LHP poles.
Chebyshev I / II
I: equiripple passband, $|H_c|^2=[1+\varepsilon^2T_N^2(\Omega/\Omega_p)]^{-1}$. II: flat passband, equiripple stopband, zeros on $j\Omega$. Same order, about half of Butterworth's.
Elliptic (Cauer)
Equiripple in both bands; provably minimum order for a given spec; worst phase. Order ranking: elliptic ≤ Chebyshev ≤ Butterworth.
Impulse invariance
$h[n]=Th_c(nT)$; $\omega = \Omega T$ linear; pole map $s_k \to e^{s_kT}$ via partial fractions. Aliasing raises the stopband floor; lowpass/bandpass only.
Bilinear transform
$s=\frac{2}{T}\frac{1-z^{-1}}{1+z^{-1}}$; one-to-one, no aliasing, stability preserved, order preserved. Warping $\Omega=\frac{2}{T}\tan\frac{\omega}{2}$ → prewarp the band edges.

Exercises

Exercise 1 — Reading a tolerance scheme

Problem: A digital lowpass filter must satisfy $0.9441 \le |H(e^{j\omega})| \le 1$ for $0 \le \omega \le 0.35\pi$ and $|H(e^{j\omega})| \le 0.0032$ for $0.5\pi \le \omega \le \pi$. (a) Identify $\omega_p,\omega_s,\delta_p,\delta_s$ and convert the ripples to $R_p$ and $A_s$ in dB. (b) If this filter is to be designed by the bilinear transformation with $T = 1$, compute the prewarped analog band edges. (c) Which analog families could meet this spec with monotonic passband response?

Click to reveal solution

(a) $\omega_p = 0.35\pi$, $\omega_s = 0.5\pi$, $\delta_p = 1-0.9441 = 0.0559$, $\delta_s = 0.0032$.

$$R_p = -20\log_{10}(0.9441) = 0.5\ \text{dB},\qquad A_s = -20\log_{10}(0.0032) \approx 50\ \text{dB}.$$

(b) Prewarping with $\Omega = 2\tan(\omega/2)$:

$$\Omega_p = 2\tan(0.175\pi) = 2\tan(31.5^\circ) = 1.226\ \text{rad/s},\qquad \Omega_s = 2\tan(0.25\pi) = 2\ \text{rad/s}.$$

Note the warped edge ratio $\Omega_s/\Omega_p = 1.632$ is larger than $\omega_s/\omega_p = 1.429$ — the warping has slightly relaxed the transition ratio, which lowers the required order. This is typical for edges below $\pi/2$.

(c) Monotonic passband → Butterworth or Chebyshev Type II. (Chebyshev I and elliptic are equiripple in the passband.) Chebyshev II would need a far lower order; Butterworth additionally gives a monotonic stopband and the best phase.

Exercise 2 — Analog Butterworth design

Problem: Design the analog Butterworth prototype (find $N$, the range of valid $\Omega_c$, and for $N = 3$, $\Omega_c = 1$ list the poles and $H_c(s)$) for the spec: at most 1 dB attenuation at $\Omega_p = 1$ rad/s and at least 40 dB at $\Omega_s = 2$ rad/s.

Click to reveal solution

Order. With $10^{R_p/10}-1 = 10^{0.1}-1 = 0.2589$ and $10^{A_s/10}-1 = 9999$:

$$N \ge \frac{\log_{10}(9999/0.2589)}{2\log_{10}(2/1)} = \frac{4.587}{0.602} = 7.62 \;\Rightarrow\; \boxed{N = 8}.$$

Cutoff range. Passband met exactly: $\Omega_c = 1\cdot(0.2589)^{-1/16} = 1.088$. Stopband met exactly: $\Omega_c = 2\cdot(9999)^{-1/16} = 1.126$. Any $\Omega_c \in [1.088,\,1.126]$ satisfies both; choosing the lower end gives maximum stopband margin, the upper end maximum passband margin.

Pole geometry for $N=3$, $\Omega_c=1$ (illustration). The 6 poles of $H_c(s)H_c(-s)$ sit at angles $\pi(2k+4)/6$, i.e. every $60^\circ$ on the unit circle, none on the $j\Omega$ axis. The three LHP poles are

$$s = -1,\qquad s = -\tfrac12 \pm j\tfrac{\sqrt3}{2},$$

so

$$H_c(s) = \frac{1}{(s+1)\left(s^2+s+1\right)} = \frac{1}{s^3+2s^2+2s+1}.$$

Check: $|H_c(j1)|^2 = 1/(1+1^{6}) = 1/2$ — exactly $-3$ dB at $\Omega_c$, as required.

Exercise 3 — Chebyshev vs. Butterworth order

Problem: For the spec of Exercise 2 ($\Omega_p=1$, $\Omega_s=2$, $R_p = 1$ dB, $A_s = 40$ dB), compute the required order of a Chebyshev Type I filter and compare it with the Butterworth result. What is the passband ripple parameter $\varepsilon$, and what is $|H_c(j0)|$ if the resulting $N$ is odd?

Click to reveal solution

Ripple parameter. $\varepsilon = \sqrt{10^{R_p/10}-1} = \sqrt{0.2589} = 0.5088$.

Order.

$$N \;\ge\; \frac{\cosh^{-1}\sqrt{\dfrac{10^{4}-1}{10^{0.1}-1}}}{\cosh^{-1}(2)} = \frac{\cosh^{-1}(196.5)}{\cosh^{-1}(2)} = \frac{5.974}{1.317} = 4.54 \;\Rightarrow\; \boxed{N = 5}.$$

Versus $N = 8$ for Butterworth: the equiripple passband buys a 37% order reduction on the same spec. (An elliptic design would need $N = 4$.)

DC gain. $T_N(0) = 0$ for odd $N$, so $|H_c(j0)| = 1/\sqrt{1+\varepsilon^2 T_5^2(0)} = 1$. The passband magnitude oscillates $N$ times between $1$ and $1/\sqrt{1+\varepsilon^2} = 0.8913$, ending at the band edge $\Omega_p$ at the ripple minimum.

Exercise 4 — Impulse invariance by partial fractions

Problem: Apply impulse invariance with sampling interval $T$ to

$$H_c(s) = \frac{2}{(s+1)(s+2)}.$$

(a) Find $h_c(t)$, $h[n]$, and $H(z)$. (b) Where are the digital poles, and why is $H(z)$ guaranteed stable for every $T > 0$? (c) Explain why the digital zero locations are not $e^{s_0T}$ images of the analog zeros.

Click to reveal solution

(a) Partial fractions:

$$H_c(s) = \frac{2}{s+1} - \frac{2}{s+2} \;\Rightarrow\; h_c(t) = \left(2e^{-t} - 2e^{-2t}\right)u(t).$$

Sampling, $h[n] = T\,h_c(nT) = 2T\left(e^{-nT} - e^{-2nT}\right)u[n]$, and term-by-term z-transform:

$$H(z) = \frac{2T}{1-e^{-T}z^{-1}} - \frac{2T}{1-e^{-2T}z^{-1}} = \frac{2T\left(e^{-T}-e^{-2T}\right)z^{-1}} {\left(1-e^{-T}z^{-1}\right)\left(1-e^{-2T}z^{-1}\right)}.$$

(b) Poles at $z = e^{-T}$ and $z = e^{-2T}$. For any $T>0$ these are positive reals strictly inside the unit circle, since the analog poles $s=-1,-2$ have negative real parts and $|e^{s_kT}| = e^{\operatorname{Re}(s_k)T} < 1$. The mapping $s_k \to e^{s_kT}$ always carries the LHP into the unit disc.

(c) Impulse invariance maps only the poles exponentially; the numerator of $H(z)$ comes out of recombining the mapped partial-fraction terms. Here $H_c(s)$ has both zeros at $s=\infty$, yet $H(z)$ has a finite zero at $z=0$ (and one at infinity). Zeros are not invariant because sampling $h_c(t)$ is a time-domain operation — only the modal (pole) structure $e^{s_kt}$ survives sampling as $e^{s_kT n}$.

Exercise 5 — First-order bilinear design with prewarping

Problem: Using the bilinear transformation with $T=1$, design a first-order digital lowpass filter whose $-3$ dB frequency is exactly $\omega_c = 0.25\pi$, starting from the analog prototype $H_c(s) = \Omega_c/(s+\Omega_c)$. Give the difference equation and verify the gain at $\omega_c$. What $-3$ dB frequency would you have gotten without prewarping (i.e. naively setting $\Omega_c = 0.25\pi$)?

Click to reveal solution

Prewarp. $\Omega_c = 2\tan(\omega_c/2) = 2\tan(0.125\pi) = 0.8284$ rad/s.

Transform. Substitute $s = 2\frac{1-z^{-1}}{1+z^{-1}}$:

$$H(z) = \frac{\Omega_c}{2\frac{1-z^{-1}}{1+z^{-1}}+\Omega_c} = \frac{\Omega_c\left(1+z^{-1}\right)}{(2+\Omega_c) - (2-\Omega_c)z^{-1}} = \frac{0.2929\,(1+z^{-1})}{1 - 0.4142\,z^{-1}}.$$

Difference equation:

$$y[n] = 0.4142\,y[n-1] + 0.2929\,x[n] + 0.2929\,x[n-1].$$

Note the zero at $z=-1$: the analog zero at $\Omega=\infty$ landed at $\omega=\pi$, so the digital filter has a true null at Nyquist.

Verification. At $\omega = 0.25\pi$: $|H(e^{j0.25\pi})| = 0.7071 = 1/\sqrt2$ exactly ($-3.01$ dB) — the prewarped edge maps back to precisely $0.25\pi$.

Without prewarping, $\Omega_c = 0.25\pi = 0.7854$ and the realized $-3$ dB point lands at

$$\omega = 2\arctan(\Omega_c/2) = 2\arctan(0.3927) = 0.7468\ \text{rad} = 0.2377\pi,$$

about 5% low — the warping error, which would grow rapidly for edges nearer $\pi$.

Exercise 6 — MATLAB: minimum-order elliptic design

Problem: A digital lowpass filter must meet $\omega_p = 0.3\pi$, $\omega_s = 0.4\pi$, $R_p = 0.5$ dB, $A_s = 50$ dB. (a) Write MATLAB code that finds the minimum order for Butterworth, Chebyshev I and elliptic designs and realizes the elliptic one. (b) State the three orders and explain the ranking. (c) Sketch/verify the elliptic response against the spec mask.

Click to reveal solution

(a) MATLAB (frequencies normalized to Nyquist = 1):

wp = 0.3;  ws = 0.4;          % band edges / pi
Rp = 0.5;  As = 50;           % dB

[Nb, ~ ] = buttord (wp, ws, Rp, As);   % Nb = 20
[Nc, ~ ] = cheb1ord(wp, ws, Rp, As);   % Nc = 9
[Ne, Wn] = ellipord(wp, ws, Rp, As);   % Ne = 6

[b, a] = ellip(Ne, Rp, As, Wn);        % minimum-order realization
[H, w] = freqz(b, a, 2048);
plot(w/pi, 20*log10(abs(H))); grid on
xlabel('\omega/\pi'); ylabel('|H| (dB)'); axis([0 1 -100 5])
hold on                                 % spec mask
plot([0 wp],[-Rp -Rp],'r--', [ws 1],[-As -As],'r--')

(b) Orders: Butterworth $N=20$, Chebyshev I $N=9$, elliptic $N=6$ (Chebyshev II also gives 9). The transition band is narrow ($0.1\pi$) with a deep stopband, so the monotonic Butterworth pays heavily; allowing ripple in one band (Chebyshev) roughly halves the order; allowing it in both bands (elliptic) is optimal — at the cost of the most nonlinear phase.

(c) Regenerated result (scipy ellipord/ellip, identical algorithm):

2026-06-12T22:36:34.172838 image/svg+xml Matplotlib v3.10.8, https://matplotlib.org/ 0.0 0.2 0.4 0.6 0.8 1.0 ω / π −100 −80 −60 −40 −20 0 Magnitude (dB) Exercise: ellip design, ω_p=0.3π, ω_s=0.4π, R_p=0.5 dB, A_s=50 dB elliptic, N = 6
Fig. 13-7 — Elliptic $N=6$ design vs. the spec mask: equiripple in the passband (0.5 dB) and stopband (−50 dB floor), with the characteristic $j\omega$-axis transmission zeros producing the deep notches.(通帶與阻帶皆等漣波,阻帶可見傳輸零點造成的深陷波。)