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).濾波器設計的起點不是轉移函數,而是一份規格:通帶可以有多少漣波、阻帶必須壓低多少、過渡帶可以多寬。設計者的工作,是找出一個可實現、穩定、因果的有理系統函數 $H(z)$,讓它的頻率響應落在容許區域之內,而且成本(濾波器階數)盡可能低。フィルタ設計の出発点は伝達関数ではなく、仕様である。通過帯域にどれだけリップルを許すか、阻止帯域をどれだけ減衰させるか、遷移帯域をどれだけ広くとれるか。設計者の仕事は、実現可能で安定かつ因果的な有理システム関数 $H(z)$ を見つけ、その周波数応答を許容領域の内側に収めたうえで、コスト(フィルタの次数)を可能なかぎり小さくすることである。
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、以上為 0——是無法實現的:它非因果,脈衝響應無限長,也沒有有理的 $H(z)$。因此實務規格把理想放寬成一張容忍度規格圖,分成三個區域:理想の低域通過応答——遮断周波数まで利得 1、その先は 0——は実現できない。非因果的であり、インパルス応答は無限長で、有理な $H(z)$ をもたない。そこで実務の仕様は、理想を緩めた許容仕様図を用い、次の三つの領域に分ける。
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:規格通常以對數表示。通帶漣波 $R_p$ 與最小阻帶衰減 $A_s$(兩者都是正的 dB 值)和線性容忍度的關係是:仕様は通常、対数で与えられる。通過帯域リップル $R_p$ と最小阻止帯域減衰量 $A_s$(どちらも正の 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.典型值:$R_p = 1$ dB 表示 $1-\delta_p = 10^{-1/20} = 0.8913$;$A_s = 40$ dB 表示 $\delta_s = 10^{-40/20} = 0.01$。一個好用的中間量是由 $\varepsilon_p^2 = 10^{R_p/10}-1$(通帶)與 $10^{A_s/10}-1$(阻帶)組成的鑑別比;本章每一條階數公式都會用到它。典型的な値を挙げると、$R_p = 1$ dB は $1-\delta_p = 10^{-1/20} = 0.8913$ を、$A_s = 40$ dB は $\delta_s = 10^{-40/20} = 0.01$ を意味する。便利な中間量が、$\varepsilon_p^2 = 10^{R_p/10}-1$(通過帯域)と $10^{A_s/10}-1$(阻止帯域)から作られる判別比である。本章の次数公式にはすべてこれが現れる。
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.有些教科書(以及 MATLAB)把通帶定義為 $1-\delta_p \le |H| \le 1$(峰值增益歸一化為 1,漣波全部在 1 以下);另一些則用 $1-\delta_1 \le |H| \le 1+\delta_1$。兩者的 dB 換算並不相同。MATLAB 的 buttord/cheby1 是以 0 dB 峰值為基準量 $R_p$——算 $N$ 之前先把慣例講清楚,否則階數可能差一階。教科書によっては(そして MATLAB でも)通過帯域を $1-\delta_p \le |H| \le 1$ と定義し、ピーク利得を 1 に正規化してリップルをすべて 1 より下に置く。一方 $1-\delta_1 \le |H| \le 1+\delta_1$ を使う流儀もある。dB への換算はそれに応じて変わる。MATLAB の buttord/cheby1 は 0 dB のピークから測った $R_p$ を使う。$N$ を計算する前に流儀をはっきりさせること。さもないと次数が 1 だけずれる。
Before designing, choose the filter class. The lecture's comparison:動手設計之前,先決定濾波器的類別。課堂投影片的比較如下:設計に取りかかる前に、フィルタの種類を決める。講義での比較は次のとおりである。
| Property性質性質 | FIR(有限脈衝響應)FIR(有限脈衝響應)FIR(有限インパルス応答) | IIR(無限脈衝響應)IIR(無限脈衝響應)IIR(無限インパルス応答) |
|---|---|---|
| Phase相位位相 | Exactly linear phase possible (symmetric $h[n]$)可以做到嚴格線性相位($h[n]$ 對稱)厳密な線形位相が可能($h[n]$ が対称) | Nonlinear phase; only approximately linear in passband非線性相位;僅在通帶內近似線性非線形位相。通過帯域で近似的に線形になるだけ |
| Stability穩定性安定性 | Always stable (no feedback poles)恆穩定(沒有回授極點)つねに安定(帰還による極がない) | Must keep all poles inside $|z|=1$所有極點都必須留在 $|z|=1$ 之內すべての極を $|z|=1$ の内側に保つ必要がある |
| Order for a sharp spec銳利規格所需的階數急峻な仕様に必要な次数 | High (often 10× the IIR order)高(常是 IIR 階數的 10 倍)高い(IIR の 10 倍になることも多い) | Low — sharp cutoffs with few coefficients低——少量係數就能做出陡峭的截止低い——少ない係数で急峻な遮断が得られる |
| Computational cost運算成本計算コスト | Higher per sample (long taps), but FFT block convolution helps每個樣本較高(抽頭很長),但 FFT 區塊摺積有幫助1 標本あたりは高い(タップが長い)。ただし FFT ブロック畳み込みが効く | Low per sample (recursive)每個樣本較低(遞迴)1 標本あたりは低い(再帰的) |
| Coefficient sensitivity係數靈敏度係数感度 | Robust to quantization對量化不敏感量子化に強い | Sensitive; poles near $|z|=1$ may go unstable敏感;靠近 $|z|=1$ 的極點可能變不穩定敏感。$|z|=1$ に近い極は不安定になりうる |
| Design route設計途徑設計の道筋 | Direct digital (windows, Parks–McClellan)直接在數位域進行(視窗法、Parks–McClellan)ディジタル領域で直接設計(窓関数法、Parks–McClellan) | Usually via an analog prototype通常要經過類比原型ふつうアナログプロトタイプを経由する |
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:所有古典類比低通原型都共用同一個振幅平方樣板 $|H_c(j\Omega)|^2 = \dfrac{1}{1+V_N^2(\Omega)}$,其中 $V_N$ 是 $N$ 階的多項式或有理函數,在通帶內很小、在阻帶內很大。四個家族的差別,在於它們把逼近誤差花在哪裡:古典的なアナログ低域通過プロトタイプはいずれも、振幅の二乗について同じ雛形 $|H_c(j\Omega)|^2 = \dfrac{1}{1+V_N^2(\Omega)}$ を共有する。ここで $V_N$ は $N$ 次の多項式または有理関数で、通過帯域では小さく阻止帯域では大きい。四つの族の違いは、近似誤差をどこで費やすかにある。
| Family家族族 | Passband通帶通過帯域 | Stopband阻帶阻止帯域 | Roll-off / order needed滾降速度/所需階數ロールオフと必要な次数 | Phase linearity相位線性度位相の直線性 |
|---|---|---|---|---|
| Butterworth(巴特沃斯)Butterworth(巴特沃斯)Butterworth(バターワース) | Maximally flat, monotonic最大平坦、單調最大平坦で単調 | Monotonic單調単調 | Slowest → highest $N$最慢 → $N$ 最高最も遅い → $N$ が最大 | Best of the four四者中最佳四つの中で最良 |
| Chebyshev I(柴比雪夫一型)Chebyshev I(柴比雪夫一型)Chebyshev I(チェビシェフ I 型) | Equiripple等漣波等リップル | Monotonic單調単調 | Faster → moderate $N$較快 → $N$ 中等やや速い → $N$ は中程度 | Worse較差やや悪い |
| Chebyshev II(柴比雪夫二型)Chebyshev II(柴比雪夫二型)Chebyshev II(チェビシェフ II 型) | Monotonic (flat)單調(平坦)単調(平坦) | Equiripple等漣波等リップル | Same $N$ as Type I與一型相同的 $N$I 型と同じ $N$ | Moderate中等中程度 |
| Elliptic / Cauer(橢圓)橢圓(Elliptic / Cauer)楕円(Elliptic / Cauer) | Equiripple等漣波等リップル | Equiripple等漣波等リップル | Fastest → minimum $N$最快 → $N$ 最小最も速い → $N$ が最小 | Worst (very nonlinear)最差(非常不線性)最も悪い(きわめて非線形) |
The Butterworth lowpass of order $N$ with 3-dB cutoff $\Omega_c$ is defined by its squared magnitude:階數為 $N$、3 dB 截止頻率為 $\Omega_c$ 的 Butterworth 低通濾波器,由它的振幅平方定義:次数 $N$、3 dB 遮断周波数 $\Omega_c$ の Butterworth 低域通過フィルタは、振幅の二乗によって定義される。
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:它的定義性質是最大平坦:$|H_c(j\Omega)|^2$ 在 $\Omega = 0$ 處的前 $2N-1$ 階導數全為零。由圖 13-2 可以看出的幾個結果:その定義的な性質が最大平坦性である。$|H_c(j\Omega)|^2$ の $\Omega = 0$ における $2N-1$ 階までの導関数がすべて零になる。図 13-2 から読み取れる帰結は次のとおりである。
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$:代入 $\Omega = s/j$ 可得 $H_c(s)H_c(-s) = \dfrac{1}{1+(s/j\Omega_c)^{2N}}$,它的 $2N$ 個極點等間隔分布在半徑為 $\Omega_c$ 的圓上:$\Omega = s/j$ を代入すると $H_c(s)H_c(-s) = \dfrac{1}{1+(s/j\Omega_c)^{2N}}$ となり、その $2N$ 個の極は半径 $\Omega_c$ の円周上に等間隔に並ぶ。
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)$.極點成對出現為 $\pm s_k$,沒有任何一個落在 $j\Omega$ 軸上,相鄰者相差角度 $\pi/N$。為了造出穩定且因果的 $H_c(s)$,我們把 $N$ 個左半平面極點指派給 $H_c(s)$,鏡像的那一半給 $H_c(-s)$。極は $\pm s_k$ の対をなし、$j\Omega$ 軸上には一つも乗らず、隣り合う極は角度 $\pi/N$ だけ離れている。安定かつ因果的な $H_c(s)$ を組み立てるには、$N$ 個の左半平面の極を $H_c(s)$ に、その鏡像を $H_c(-s)$ に割り当てる。
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}$,一階 Butterworth 濾波器就是投影片第 14 頁的那個 RC 電路:取 $R = 100\,\text{k}\Omega$、$C = 0.001\,\mu\text{F}$,1 次の Butterworth フィルタは、スライド 14 ページの RC 回路そのものである。$R = 100\,\text{k}\Omega$、$C = 0.001\,\mu\text{F}$ とすると、
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:要求 $|H_c(j\Omega_p)|^2 \ge (1-\delta_p)^2 = 10^{-R_p/10}$ 以及 $|H_c(j\Omega_s)|^2 \le \delta_s^2 = 10^{-A_s/10}$,再把這兩個關於 $(\Omega/\Omega_c)^{2N}$ 的式子解開,就得到:$|H_c(j\Omega_p)|^2 \ge (1-\delta_p)^2 = 10^{-R_p/10}$ と $|H_c(j\Omega_s)|^2 \le \delta_s^2 = 10^{-A_s/10}$ を要求し、$(\Omega/\Omega_c)^{2N}$ についての二つの式を解くと、次が得られる。
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.取整數 $N$ 之後,$\Omega_c$ 可以放在兩個值之間的任何位置:剛好滿足通帶的 $\Omega_c = \Omega_p\,(10^{R_p/10}-1)^{-1/2N}$,與剛好滿足阻帶的 $\Omega_c = \Omega_s\,(10^{A_s/10}-1)^{-1/2N}$。這段餘裕來自 $N$ 被無條件進位。整数の $N$ を得たあと、$\Omega_c$ は、通過帯域をちょうど満たす値 $\Omega_c = \Omega_p\,(10^{R_p/10}-1)^{-1/2N}$ と、阻止帯域をちょうど満たす値 $\Omega_c = \Omega_s\,(10^{A_s/10}-1)^{-1/2N}$ のあいだのどこに置いてもよい。この余裕は $N$ を切り上げたことから生じる。
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$.規格:通帶邊界 $\Omega_p = 1$ rad/s,$R_p = 1$ dB;阻帶邊界 $\Omega_s = 2$ rad/s,$A_s = 40$ dB。求 $N$ 與 $\Omega_c$。仕様:通過帯域端 $\Omega_p = 1$ rad/s で $R_p = 1$ dB、阻止帯域端 $\Omega_s = 2$ rad/s で $A_s = 40$ dB。$N$ と $\Omega_c$ を求めよ。
The Chebyshev Type I filter trades passband flatness for a sharper knee: it is equiripple in the passband(通帶等漣波) and monotonic in the stopband.Chebyshev 一型濾波器用通帶的平坦度換取更銳利的轉折:它在通帶內等漣波,在阻帶內單調。Chebyshev I 型フィルタは、通過帯域の平坦さを犠牲にして肩の鋭さを買う。通過帯域で等リップル、阻止帯域で単調である。
$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:$T_N$ 是 $N$ 階的 Chebyshev 多項式:在 $|x|\le 1$ 範圍內它在 $\pm1$ 之間振盪(因此通帶振幅在 $1$ 與 $1/\sqrt{1+\varepsilon^2}$ 之間等幅起伏),在範圍之外則以 $\cosh$ 的速度成長——遠快於 $x^N$——因而衰減很快。性質:$T_N$ は $N$ 次の Chebyshev 多項式である。$|x|\le 1$ では $\pm1$ のあいだを振動し(そのため通過帯域の振幅は $1$ と $1/\sqrt{1+\varepsilon^2}$ のあいだで等しく波打つ)、その外では $\cosh$ のように——$x^N$ よりはるかに速く——増大するので、急峻な減衰が得られる。性質は次のとおりである。
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 二型(反 Chebyshev)把取捨顛倒過來:通帶單調、近似最大平坦,而阻帶等漣波,做法是把傳輸零點放在阻帶的 $j\Omega$ 軸上:Chebyshev II 型(逆 Chebyshev)はトレードオフを逆にする。通過帯域は単調で最大平坦に近く、阻止帯域が等リップルになる。これは阻止帯域の $j\Omega$ 軸上に伝送零点を置くことで実現される。
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$).對同一份規格,它需要與一型相同的階數,但通帶完全沒有漣波——當通帶裡的訊號振幅不容失真時特別有用。代價是:轉移函數變成有理式(不再是全極點多項式)且帶有有限零點,而且高頻響應不再單調趨近於零(它會回到漣波上限 $\delta_s$)。同じ仕様に対して必要な次数はI 型と同じだが、通過帯域にリップルがまったくない。通過帯域を通る信号の振幅を歪ませたくないときに有用である。代償として、伝達関数は有限零点をもつ有理式(多項式ではない)になり、高周波で応答が単調に零へ落ちていかない(リップルの上限 $\delta_s$ に戻ってくる)。
Elliptic filters are equiripple in both bands, replacing $T_N$ with the Jacobi elliptic rational function $R_N$:橢圓濾波器在兩個頻帶內都等漣波,做法是把 $T_N$ 換成 Jacobi 橢圓有理函數 $R_N$:楕円フィルタは両方の帯域で等リップルになる。$T_N$ をヤコビの楕円有理関数 $R_N$ に置き換えるのである。
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.由 Chebyshev 逼近定理可知,把誤差平均分配到兩個頻帶是最佳的:對給定的 $(\delta_p,\delta_s,\Omega_p,\Omega_s)$,橢圓濾波器以所有有理濾波器中可能的最小階數達成規格。代價是相位最不線性,而且在頻帶邊界附近群延遲會強烈尖起。Chebyshev の近似定理により、誤差を両方の帯域へ等しく配分するのが最適である。与えられた $(\delta_p,\delta_s,\Omega_p,\Omega_s)$ に対して、楕円フィルタは有理フィルタの中で可能な最小の次数で仕様を満たす。その代償は、最も非線形な位相と、帯域端付近で群遅延が大きく尖ることである。
All formulas above are for a lowpass prototype. Other shapes come from algebraic substitutions on $s$ (here the prototype has cutoff 1 rad/s):上面所有公式都是針對低通原型的。其他形狀由對 $s$ 做代數代換得到(此處原型的截止頻率為 1 rad/s):上の公式はいずれも低域通過プロトタイプに対するものである。他の形状は $s$ への代数的な置換で得られる(ここでのプロトタイプの遮断周波数は 1 rad/s とする)。
| Target目標目標 | Substitution $s \to$代換 $s \to$置換 $s \to$ | Effect效果効果 |
|---|---|---|
| Lowpass, cutoff $\Omega_c$低通,截止頻率 $\Omega_c$低域通過、遮断 $\Omega_c$ | $s/\Omega_c$ | Scales the cutoff縮放截止頻率遮断周波数をスケールする |
| Highpass, cutoff $\Omega_c$高通,截止頻率 $\Omega_c$高域通過、遮断 $\Omega_c$ | $\Omega_c/s$ | Swaps $\Omega=0$ and $\Omega=\infty$把 $\Omega=0$ 與 $\Omega=\infty$ 對調$\Omega=0$ と $\Omega=\infty$ を入れ替える |
| Bandpass, edges $\Omega_1,\Omega_2$帶通,邊界 $\Omega_1,\Omega_2$帯域通過、端 $\Omega_1,\Omega_2$ | $\dfrac{s^2+\Omega_1\Omega_2}{s(\Omega_2-\Omega_1)}$ | Order doubles ($N \to 2N$)階數加倍($N \to 2N$)次数が倍になる($N \to 2N$) |
| Bandstop, edges $\Omega_1,\Omega_2$帶阻,邊界 $\Omega_1,\Omega_2$帯域阻止、端 $\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).在數位 IIR 設計中,同樣的想法可以用在類比域(在 $s\to z$ 映射之前),也可以直接在 $z$ 域用全通代換完成;MATLAB 的 butter(N, Wn, 'high') 等函式會自動處理(§13.4)。ディジタル IIR の設計でも同じ考えが使える。アナログ領域で($s\to z$ 写像の前に)行ってもよいし、$z$ 領域で全域通過の置換によって直接行ってもよい。MATLAB の butter(N, Wn, 'high') などはこれを自動で処理する(§13.4)。
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:我們手上有一個好的 $H_c(s)$,需要的是 $H(z)$。任何可用的 $s$ 平面到 $z$ 平面的轉換,都必須滿足兩個要求:よい $H_c(s)$ は手元にあり、欲しいのは $H(z)$ である。$s$ 平面から $z$ 平面への変換として役に立つものは、二つの要件を満たさなければならない。
Two classical mappings satisfy both: impulse invariance and the bilinear transformation.有兩個古典映射同時滿足這兩點:脈衝不變法與雙線性轉換。この二つをともに満たす古典的な写像が二つある。インパルス不変法と双一次変換である。
The impulse invariance method(脈衝響應不變法) defines the digital filter by sampling the analog impulse response:脈衝不變法直接對類比脈衝響應取樣來定義數位濾波器:インパルス不変法は、アナログのインパルス応答を標本化することでディジタルフィルタを定義する。
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:這正是把取樣定理套用到 $h_c(t)$ 上(因子 $T$ 用來歸一化增益,使 $H(e^{j0}) \approx H_c(j0)$)。有兩個結果:これは標本化定理を $h_c(t)$ に適用したものにほかならない(係数 $T$ は利得を正規化し、$H(e^{j0}) \approx H_c(j0)$ とするためのものである)。帰結は二つある。
In practice nobody samples $h_c(t)$ literally; the pole mapping is done algebraically. Expand the (simple-pole) prototype and map each term:實務上沒有人真的去對 $h_c(t)$ 取樣;極點映射是用代數做的。把(單極點的)原型展開,再逐項映射:実務では誰も $h_c(t)$ を文字どおり標本化しない。極の写像は代数的に行う。(単純極の)プロトタイプを展開し、各項を写す。
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.每一個類比極點 $s_k$ 都變成位於 $z_k = e^{s_k T}$ 的數位極點。因為 $\operatorname{Re}\{s_k\}<0 \Rightarrow |z_k| = e^{\operatorname{Re}\{s_k\}T} < 1$,穩定性得以保留。注意零點並不是這樣映射的——只有極點才是。アナログの極 $s_k$ はそれぞれ $z_k = e^{s_k T}$ のディジタル極になる。$\operatorname{Re}\{s_k\}<0 \Rightarrow |z_k| = e^{\operatorname{Re}\{s_k\}T} < 1$ であるから、安定性は保たれる。零点はこのようには写らないことに注意せよ——写るのは極だけである。
The bilinear transformation(雙線性轉換) avoids aliasing entirely by using an algebraic, one-to-one map between the $s$-plane and the $z$-plane:雙線性轉換完全避開混疊,做法是在 $s$ 平面與 $z$ 平面之間用一個代數的、一對一的映射:双一次変換は、$s$ 平面と $z$ 平面のあいだに代数的で一対一の写像を使うことで、エイリアシングを完全に避ける。
(It derives from the trapezoidal-rule discretization of the integrator $1/s$.) Mapping properties — check them by substituting $s = \sigma + j\Omega$:(它源自把積分器 $1/s$ 用梯形法則離散化。)映射的性質——代入 $s = \sigma + j\Omega$ 即可一一驗證:(これは積分器 $1/s$ を台形則で離散化したものに由来する。)写像の性質は、$s = \sigma + j\Omega$ を代入すれば確かめられる。
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:在雙線性映射中令 $z = e^{j\omega}$,可得 $s = \frac{2}{T}\,\frac{1-e^{-j\omega}}{1+e^{-j\omega}} = j\frac{2}{T}\tan(\omega/2)$,也就是說兩條頻率軸之間是非線性的關係:双一次写像で $z = e^{j\omega}$ とおくと $s = \frac{2}{T}\,\frac{1-e^{-j\omega}}{1+e^{-j\omega}} = j\frac{2}{T}\tan(\omega/2)$ となる。すなわち二つの周波数軸は非線形に結びついている。
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:當 $\omega$ 很小時 $\Omega \approx \omega/T$(映射在局部是線性的),但頻率較高處的頻帶邊界就會被翹曲。補救之道是預翹曲:在設計原型之前,先用精確的翹曲公式把每一個關鍵的數位頻率換算到類比域:$\omega$ が小さいところでは $\Omega \approx \omega/T$ であり(写像は局所的に線形である)、より高い周波数にある帯域端はワープする。その対処がプリワーピングである。プロトタイプを設計する前に、重要なディジタル周波数をすべて、厳密なワーピングの式でアナログ領域へ換算しておく。
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.這樣一來,經過雙線性映射之後,數位濾波器就會恰好落在 $\omega_p,\omega_s$ 上。注意 $T$ 會從最終的 $H(z)$ 中消掉——規格被 $T$ 預翹曲,又被 $1/T$ 翹曲回來——所以習慣上為了方便就取 $T=1$(或 $T=2$)。こうすれば、双一次写像のあとでディジタルフィルタは $\omega_p,\omega_s$ を厳密に満たす。$T$ は最終的な $H(z)$ から消えてしまうことに注意せよ——仕様は $T$ でプリワープされ、$1/T$ でワープし戻される——ので、慣例として便宜上 $T=1$(あるいは $T=2$)とおく。
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.若走脈衝不變法路線,就把第 2 步與第 5 步換成線性換算 $\Omega_{p,s} = \omega_{p,s}/T$ 與式 (13.3.2) 的逐極點映射——並且把阻帶稍微設計得過頭一些,以吸收混疊。インパルス不変法の道筋をとる場合は、第 2 段階と第 5 段階を線形換算 $\Omega_{p,s} = \omega_{p,s}/T$ と式 (13.3.2) の極ごとの写像に置き換える——そして、折り返しを吸収できるよう阻止帯域をやや過剰に設計しておく。
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$.數位規格:$\omega_p = 0.2\pi$ 配 $R_p = 1$ dB($|H|\ge 0.8913$),$\omega_s = 0.3\pi$ 配 $A_s = 15$ dB($|H|\le 0.1778$)。取 $T=1$。ディジタル仕様:$\omega_p = 0.2\pi$ に対して $R_p = 1$ dB($|H|\ge 0.8913$)、$\omega_s = 0.3\pi$ に対して $A_s = 15$ dB($|H|\le 0.1778$)。$T=1$ とする。
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:MATLAB(Signal Processing Toolbox)把這一整章包成每個家族兩個呼叫:一個選階數的函式與一個設計的函式。數位頻率經過歸一化,$1.0$ 代表 Nyquist 頻率 $\pi$ rad/sample:MATLAB(Signal Processing Toolbox)は、この章全体を族ごとに二つの呼び出しにまとめている。次数選択の関数と設計の関数である。ディジタル周波数は正規化されており、$1.0$ がナイキスト周波数 $\pi$ rad/sample を表す。
| Family家族族 | Order selection選階數次数選択 | Design call設計呼叫設計の呼び出し | Notes備註備考 |
|---|---|---|---|
| ButterworthButterworth(巴特沃斯)Butterworth(バターワース) | [N,Wn] = buttord(wp,ws,Rp,As) | [b,a] = butter(N,Wn) | maximally flat最大平坦最大平坦 |
| Chebyshev IChebyshev 一型Chebyshev I 型 | [N,Wp] = cheb1ord(wp,ws,Rp,As) | [b,a] = cheby1(N,Rp,Wp) | passband ripple $R_p$通帶漣波 $R_p$通過帯域リップル $R_p$ |
| Chebyshev IIChebyshev 二型Chebyshev II 型 | [N,Ws] = cheb2ord(wp,ws,Rp,As) | [b,a] = cheby2(N,As,Ws) | stopband ripple $A_s$阻帶漣波 $A_s$阻止帯域リップル $A_s$ |
| Elliptic橢圓楕円 | [N,Wp] = ellipord(wp,ws,Rp,As) | [b,a] = ellip(N,Rp,As,Wp) | minimum order最小階數最小次数 |
| Manual s→z自行做 s→zs→z を自前で | — | [bz,az] = bilinear(b,a,fs), impinvar(b,a,fs) | map your own $H_c(s)$映射你自己的 $H_c(s)$自分の $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:其他形狀(投影片第 31 頁「Other Filter Shapes」):傳入 'high'、'stop',或給帶通一組兩元素的 Wn = [w1 w2]——MATLAB 會先在內部把 §13.2.7 的頻帶轉換套到低通原型上,再做內建預翹曲的雙線性轉換:その他の形状(スライド 31 ページ「Other Filter Shapes」):'high' や 'stop' を渡すか、帯域通過なら 2 要素の Wn = [w1 w2] を渡す——MATLAB は内部でまず §13.2.7 の周波数変換を低域通過プロトタイプに適用し、つづいてプリワーピング込みの双一次変換を行う。
% 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
buttord/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.(設計結果疊上規格遮罩驗證。)圖 13-6 — buttord/butter 的數位設計($N=9$、$\omega_c = 0.423\pi$),對照規格遮罩 $\omega_p=0.4\pi$、$\omega_s=0.6\pi$、$R_p=1$ dB、$A_s=40$ dB 驗證。曲線順利穿過未著色的走廊。図 13-6 — buttord/butter によるディジタル設計($N=9$、$\omega_c = 0.423\pi$)を、仕様マスク $\omega_p=0.4\pi$、$\omega_s=0.6\pi$、$R_p=1$ dB、$A_s=40$ dB に照らして検証したもの。曲線は網掛けのない回廊を通り抜けている。butter/cheby1/ellip already do
prewarping + bilinear internally — never prewarp the arguments yourself.MATLAB 的數位 butter/cheby1/ellip 內部已經做了預翹曲加雙線性轉換——千萬不要自己先把引數預翹曲一次。MATLAB のディジタル版 butter/cheby1/ellip は内部でプリワーピングと双一次変換をすでに行っている——引数を自分でプリワープしてはならない。[b,a] is numerically
fragile; use [z,p,k] = butter(...) with zp2sos and filter with
second-order sections(二階節).階數超過約 10 時,轉移函數形式 [b,a] 在數值上很脆弱;改用 [z,p,k] = butter(...) 搭配 zp2sos,再以二階節(second-order sections)來濾波。次数がおよそ 10 を超えると、伝達関数の形 [b,a] は数値的に脆くなる。[z,p,k] = butter(...) と zp2sos を使い、2 次セクション(second-order sections)でフィルタリングすること。impinvar exists but refuses improper $H_c(s)$; remember it is only
sensible for lowpass/bandpass prototypes.impinvar 確實存在,但它拒絕非真分式的 $H_c(s)$;別忘了這個方法只對低通/帶通原型才合理。impinvar は存在するが、真分数でない $H_c(s)$ は受け付けない。この方法が意味をもつのは低域通過と帯域通過のプロトタイプだけであることを忘れないこと。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?題目:某數位低通濾波器必須在 $0 \le \omega \le 0.35\pi$ 上滿足 $0.9441 \le |H(e^{j\omega})| \le 1$,並在 $0.5\pi \le \omega \le \pi$ 上滿足 $|H(e^{j\omega})| \le 0.0032$。(a) 指出 $\omega_p,\omega_s,\delta_p,\delta_s$,並把漣波換算成以 dB 表示的 $R_p$ 與 $A_s$。(b) 若這個濾波器要用雙線性轉換、取 $T = 1$ 來設計,求預翹曲後的類比頻帶邊界。(c) 哪些類比家族能在通帶單調的前提下滿足這份規格?問題:あるディジタル低域通過フィルタは、$0 \le \omega \le 0.35\pi$ で $0.9441 \le |H(e^{j\omega})| \le 1$ を、$0.5\pi \le \omega \le \pi$ で $|H(e^{j\omega})| \le 0.0032$ を満たさなければならない。(a) $\omega_p,\omega_s,\delta_p,\delta_s$ を同定し、リップルを dB の $R_p$ と $A_s$ に換算せよ。(b) このフィルタを $T = 1$ の双一次変換で設計する場合、プリワープ後のアナログ帯域端を求めよ。(c) 通過帯域が単調なまま この仕様を満たせるアナログ族はどれか。
(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)$:(b) 用 $\Omega = 2\tan(\omega/2)$ 做預翹曲:(b) $\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$.注意翹曲後的邊界比值 $\Omega_s/\Omega_p = 1.632$ 大於 $\omega_s/\omega_p = 1.429$——翹曲把過渡比稍微放寬了,因而降低所需階數。邊界低於 $\pi/2$ 時通常都是這樣。ワープ後の帯域端の比 $\Omega_s/\Omega_p = 1.632$ が $\omega_s/\omega_p = 1.429$ より大きいことに注意せよ——ワーピングが遷移比をわずかに緩めており、必要な次数を下げる。帯域端が $\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.(c) 通帶單調 → Butterworth 或 Chebyshev 二型。(Chebyshev 一型與橢圓在通帶都是等漣波。)Chebyshev 二型所需的階數會低很多;Butterworth 則另外還給出單調的阻帶與最好的相位。(c) 通過帯域が単調 → Butterworth か Chebyshev II 型である。(Chebyshev I 型と楕円は通過帯域が等リップルになる。)Chebyshev II 型のほうが必要な次数はずっと低い。Butterworth はそれに加えて単調な阻止帯域と最良の位相をもたらす。
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.題目:針對以下規格設計類比 Butterworth 原型(求 $N$、合法 $\Omega_c$ 的範圍,並對 $N = 3$、$\Omega_c = 1$ 列出極點與 $H_c(s)$):在 $\Omega_p = 1$ rad/s 處衰減至多 1 dB,在 $\Omega_s = 2$ rad/s 處衰減至少 40 dB。問題:次の仕様に対してアナログ Butterworth プロトタイプを設計せよ($N$、許される $\Omega_c$ の範囲を求め、$N = 3$、$\Omega_c = 1$ について極と $H_c(s)$ を挙げよ)。$\Omega_p = 1$ rad/s で減衰は高々 1 dB、$\Omega_s = 2$ rad/s で少なくとも 40 dB とする。
Order. With $10^{R_p/10}-1 = 10^{0.1}-1 = 0.2589$ and $10^{A_s/10}-1 = 9999$:階數。由 $10^{R_p/10}-1 = 10^{0.1}-1 = 0.2589$ 與 $10^{A_s/10}-1 = 9999$:次数。$10^{R_p/10}-1 = 10^{0.1}-1 = 0.2589$ と $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.截止頻率的範圍。剛好滿足通帶:$\Omega_c = 1\cdot(0.2589)^{-1/16} = 1.088$。剛好滿足阻帶:$\Omega_c = 2\cdot(9999)^{-1/16} = 1.126$。任何 $\Omega_c \in [1.088,\,1.126]$ 都同時滿足兩者;取下界可得最大的阻帶裕度,取上界則得最大的通帶裕度。遮断周波数の範囲。通過帯域をちょうど満たすと $\Omega_c = 1\cdot(0.2589)^{-1/16} = 1.088$、阻止帯域をちょうど満たすと $\Omega_c = 2\cdot(9999)^{-1/16} = 1.126$ である。$\Omega_c \in [1.088,\,1.126]$ ならどちらも満たす。下端をとれば阻止帯域の余裕が、上端をとれば通過帯域の余裕が最大になる。
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$N=3$、$\Omega_c=1$ 的極點幾何(示意)。$H_c(s)H_c(-s)$ 的 6 個極點位於角度 $\pi(2k+4)/6$,也就是單位圓上每 $60^\circ$ 一個,沒有任何一個落在 $j\Omega$ 軸上。三個左半平面極點為$N=3$、$\Omega_c=1$ のときの極の幾何(説明用)。$H_c(s)H_c(-s)$ の 6 個の極は角度 $\pi(2k+4)/6$、すなわち単位円上 $60^\circ$ おきに並び、$j\Omega$ 軸上には一つもない。左半平面の三つの極は
$$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.驗算:$|H_c(j1)|^2 = 1/(1+1^{6}) = 1/2$ —— 在 $\Omega_c$ 處恰為 $-3$ dB,符合要求。検算:$|H_c(j1)|^2 = 1/(1+1^{6}) = 1/2$ —— $\Omega_c$ でちょうど $-3$ dB であり、要求どおりである。
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?題目:對習題 2 的規格($\Omega_p=1$、$\Omega_s=2$、$R_p = 1$ dB、$A_s = 40$ dB),計算 Chebyshev 一型濾波器所需的階數,並與 Butterworth 的結果比較。通帶漣波參數 $\varepsilon$ 是多少?若算出的 $N$ 為奇數,$|H_c(j0)|$ 又是多少?問題:演習 2 の仕様($\Omega_p=1$、$\Omega_s=2$、$R_p = 1$ dB、$A_s = 40$ dB)について、Chebyshev I 型フィルタに必要な次数を計算し、Butterworth の結果と比較せよ。通過帯域リップルのパラメータ $\varepsilon$ はいくらか。得られた $N$ が奇数のとき $|H_c(j0)|$ はいくらか。
Ripple parameter. $\varepsilon = \sqrt{10^{R_p/10}-1} = \sqrt{0.2589} = 0.5088$.漣波參數。$\varepsilon = \sqrt{10^{R_p/10}-1} = \sqrt{0.2589} = 0.5088$。リップルのパラメータ。$\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$.)相對於 Butterworth 的 $N = 8$:在同一份規格下,通帶等漣波換來 37% 的階數縮減。(橢圓設計則只需要 $N = 4$。)Butterworth の $N = 8$ と比べると、同じ仕様に対して通過帯域の等リップルが 37% の次数削減をもたらす。(楕円で設計すれば $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.直流增益。$N$ 為奇數時 $T_N(0) = 0$,所以 $|H_c(j0)| = 1/\sqrt{1+\varepsilon^2 T_5^2(0)} = 1$。通帶振幅在 $1$ 與 $1/\sqrt{1+\varepsilon^2} = 0.8913$ 之間振盪 $N$ 次,並在頻帶邊界 $\Omega_p$ 處停在漣波的最小值。直流利得。$N$ が奇数なら $T_N(0) = 0$ なので、$|H_c(j0)| = 1/\sqrt{1+\varepsilon^2 T_5^2(0)} = 1$ となる。通過帯域の振幅は $1$ と $1/\sqrt{1+\varepsilon^2} = 0.8913$ のあいだを $N$ 回振動し、帯域端 $\Omega_p$ ではリップルの最小値で終わる。
Problem: Apply impulse invariance with sampling interval $T$ to題目:以取樣間隔 $T$ 對下式施行脈衝不變法問題:標本化間隔 $T$ でインパルス不変法を次の式に適用せよ。
$$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.(a) 求 $h_c(t)$、$h[n]$ 與 $H(z)$。(b) 數位極點在哪裡?為什麼對每一個 $T > 0$ 都保證 $H(z)$ 穩定?(c) 解釋為什麼數位零點的位置並不是類比零點的 $e^{s_0T}$ 像。(a) $h_c(t)$、$h[n]$、$H(z)$ を求めよ。(b) ディジタルの極はどこにあり、なぜ任意の $T > 0$ について $H(z)$ の安定性が保証されるのか。(c) ディジタルの零点の位置がアナログ零点の $e^{s_0T}$ 像にならない理由を説明せよ。
(a) Partial fractions:(a) 部分分式:(a) 部分分数展開すると、
$$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[n] = T\,h_c(nT) = 2T\left(e^{-nT} - e^{-2nT}\right)u[n]$,再逐項做 z 轉換:標本化すると $h[n] = T\,h_c(nT) = 2T\left(e^{-nT} - e^{-2nT}\right)u[n]$ となり、項ごとに z 変換して、
$$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.(b) 極點在 $z = e^{-T}$ 與 $z = e^{-2T}$。對任何 $T>0$,它們都是嚴格落在單位圓內的正實數,因為類比極點 $s=-1,-2$ 的實部為負,而 $|e^{s_kT}| = e^{\operatorname{Re}(s_k)T} < 1$。映射 $s_k \to e^{s_kT}$ 永遠把左半平面帶進單位圓盤。(b) 極は $z = e^{-T}$ と $z = e^{-2T}$ にある。任意の $T>0$ についてこれらは単位円の内部に厳密に入る正の実数である。アナログの極 $s=-1,-2$ の実部が負であり、$|e^{s_kT}| = e^{\operatorname{Re}(s_k)T} < 1$ だからである。写像 $s_k \to e^{s_kT}$ はつねに左半平面を単位円板の中へ運ぶ。
(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}$.(c) 脈衝不變法只把極點以指數方式映射;$H(z)$ 的分子是把映射後的部分分式項重新合併之後才冒出來的。這裡 $H_c(s)$ 的兩個零點都在 $s=\infty$,而 $H(z)$ 卻在 $z=0$ 有一個有限零點(另一個在無窮遠)。零點之所以不具不變性,是因為對 $h_c(t)$ 取樣是時域的操作——只有模態(極點)結構 $e^{s_kt}$ 才能以 $e^{s_kT n}$ 的形式通過取樣存活下來。(c) インパルス不変法が指数的に写すのは極だけである。$H(z)$ の分子は、写したあとの部分分数項を足し合わせ直した結果として現れる。ここでは $H_c(s)$ の零点は二つとも $s=\infty$ にあるのに、$H(z)$ は $z=0$ に有限の零点をもつ(もう一つは無限遠である)。零点が不変でないのは、$h_c(t)$ の標本化が時間領域の操作だからである——標本化を生き延びて $e^{s_kT n}$ になるのは、モード(極)の構造 $e^{s_kt}$ だけなのである。
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$)?題目:用 $T=1$ 的雙線性轉換,從類比原型 $H_c(s) = \Omega_c/(s+\Omega_c)$ 出發,設計一個一階數位低通濾波器,使其 $-3$ dB 頻率恰為 $\omega_c = 0.25\pi$。寫出差分方程並驗證在 $\omega_c$ 處的增益。若不做預翹曲(也就是天真地取 $\Omega_c = 0.25\pi$),得到的 $-3$ dB 頻率會是多少?問題:$T=1$ の双一次変換を用い、アナログプロトタイプ $H_c(s) = \Omega_c/(s+\Omega_c)$ から出発して、$-3$ dB 周波数がちょうど $\omega_c = 0.25\pi$ となる 1 次のディジタル低域通過フィルタを設計せよ。差分方程式を示し、$\omega_c$ での利得を検証せよ。プリワーピングを行わない場合(すなわち素朴に $\Omega_c = 0.25\pi$ とした場合)、$-3$ dB 周波数はいくらになるか。
Prewarp. $\Omega_c = 2\tan(\omega_c/2) = 2\tan(0.125\pi) = 0.8284$ rad/s.預翹曲。$\Omega_c = 2\tan(\omega_c/2) = 2\tan(0.125\pi) = 0.8284$ rad/s。プリワープ。$\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}}$:轉換。代入 $s = 2\frac{1-z^{-1}}{1+z^{-1}}$:変換。$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.注意 $z=-1$ 處的零點:位於 $\Omega=\infty$ 的類比零點落到了 $\omega=\pi$,所以這個數位濾波器在 Nyquist 頻率上有一個真正的零點。$z=-1$ の零点に注意せよ。$\Omega=\infty$ にあったアナログの零点が $\omega=\pi$ へ移ったため、このディジタルフィルタはナイキスト周波数に真の零をもつ。
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$.驗證。在 $\omega = 0.25\pi$ 處:$|H(e^{j0.25\pi})| = 0.7071 = 1/\sqrt2$,恰好($-3.01$ dB)——預翹曲過的邊界正好映射回 $0.25\pi$。検証。$\omega = 0.25\pi$ では $|H(e^{j0.25\pi})| = 0.7071 = 1/\sqrt2$ がちょうど成り立つ($-3.01$ dB)——プリワープした帯域端が $0.25\pi$ へ正確に写り戻っている。
Without prewarping, $\Omega_c = 0.25\pi = 0.7854$ and the realized $-3$ dB point lands at若不做預翹曲,$\Omega_c = 0.25\pi = 0.7854$,實現出來的 $-3$ dB 點會落在プリワーピングを行わない場合、$\Omega_c = 0.25\pi = 0.7854$ となり、実現される $-3$ dB 点は次の位置に来る。
$$\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$.大約低了 5%——這就是翹曲誤差,而且邊界越靠近 $\pi$,誤差增長得越快。およそ 5% 低い——これがワーピング誤差であり、帯域端が $\pi$ に近いほど急速に大きくなる。
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.題目:某數位低通濾波器必須滿足 $\omega_p = 0.3\pi$、$\omega_s = 0.4\pi$、$R_p = 0.5$ dB、$A_s = 50$ dB。(a) 寫出 MATLAB 程式碼,求出 Butterworth、Chebyshev 一型與橢圓設計的最小階數,並實現橢圓那一個。(b) 說出這三個階數並解釋其排名。(c) 對照規格遮罩畫出/驗證橢圓響應。問題:あるディジタル低域通過フィルタは $\omega_p = 0.3\pi$、$\omega_s = 0.4\pi$、$R_p = 0.5$ dB、$A_s = 50$ dB を満たさなければならない。(a) Butterworth、Chebyshev I 型、楕円の各設計について最小次数を求め、楕円のものを実現する MATLAB コードを書け。(b) 三つの次数を述べ、その順位を説明せよ。(c) 楕円の応答を仕様マスクに照らして描き、検証せよ。
(a) MATLAB (frequencies normalized to Nyquist = 1):(a) MATLAB(頻率以 Nyquist = 1 歸一化):(a) MATLAB(周波数はナイキスト = 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.(b) 階數:Butterworth $N=20$,Chebyshev 一型 $N=9$,橢圓 $N=6$(Chebyshev 二型同樣是 9)。過渡帶很窄($0.1\pi$)而阻帶又很深,所以單調的 Butterworth 代價極高;允許其中一個頻帶有漣波(Chebyshev)大致可把階數砍半;兩個頻帶都允許漣波(橢圓)則是最佳解——代價是相位最不線性。(b) 次数は Butterworth が $N=20$、Chebyshev I 型が $N=9$、楕円が $N=6$ である(Chebyshev II 型も 9 になる)。遷移帯域が狭く($0.1\pi$)阻止帯域が深いため、単調な Butterworth は大きな代償を払う。片方の帯域にリップルを許せば(Chebyshev)次数はおよそ半分になり、両方の帯域に許せば(楕円)最適になる——ただし位相は最も非線形になる。
(c) Regenerated result (scipy ellipord/ellip,
identical algorithm):(c) 重新產生的結果(scipy 的 ellipord/ellip,演算法相同):(c) 再現した結果(scipy の ellipord/ellip、アルゴリズムは同一):