Outline大綱アウトライン
11.1 Filters & Decibels11.1 濾波器與分貝11.1 フィルタとデシベル
11.2 Simple FIR Filters11.2 簡單的 FIR 濾波器11.2 単純な FIR フィルタ
11.3 Simple IIR Filters11.3 簡單的 IIR 濾波器11.3 単純な IIR フィルタ
11.4 Cascading Filters11.4 濾波器的串接11.4 フィルタの縦続接続
11.5 Ideal Filters & Specs11.5 理想濾波器與規格11.5 理想フィルタと仕様
11.6 Linear-Phase FIR11.6 線性相位 FIR11.6 線形位相 FIR
11.7 Summary11.7 總結11.7 まとめ
Exercises習題演習問題
DSP Study Guide · Chapter 11DSP 學習指南 · 第 11 章DSP 学習ガイド · 第 11 章

Filters: Introduction濾波器導論フィルタ入門

Simple FIR and IIR filters, the decibel scale, ideal filters and why they are unrealizable, practical tolerance specifications, and the four linear-phase FIR types.簡單的 FIR 與 IIR 濾波器、分貝刻度、理想濾波器為何不可實現、實務上的容忍度規格,以及四種線性相位 FIR。単純な FIR および IIR フィルタ、デシベル尺度、理想フィルタとそれが実現できない理由、実用的な許容仕様、そして 4 種類の線形位相 FIR。

11.1 Filters and the Decibel Scale11.1 濾波器與分貝刻度11.1 フィルタとデシベル尺度

11.1.1 What Is a Filter? FIR vs IIR11.1.1 什麼是濾波器?FIR 與 IIR11.1.1 フィルタとは何か。FIR と IIR

A digital filter(數位濾波器)is an LTI system designed to pass certain frequency components of a signal and attenuate(衰減)others. Because an LTI system simply multiplies each frequency component by its frequency response, the whole story of filtering is contained in數位濾波器是一種 LTI 系統,設計目的是讓訊號中某些頻率成分通過,並把其餘成分衰減掉。由於 LTI 系統只是把每個頻率成分乘上自己的頻率響應,濾波的全部內容其實都包含在下式之中:ディジタルフィルタとは、信号の特定の周波数成分を通過させ、それ以外を減衰させるように設計された LTI システムである。LTI システムは各周波数成分にその周波数応答を掛けるだけなので、フィルタリングの内容はすべて次の式に収まっている。

Filtering in time and frequency時域與頻域中的濾波時間領域と周波数領域におけるフィルタリング $$y[n] = h[n] * x[n] \qquad\Longleftrightarrow\qquad Y(e^{j\omega}) = H(e^{j\omega})\,X(e^{j\omega})$$

Frequencies where $|H(e^{j\omega})| \approx 1$ form the passband(通帶); frequencies where $|H(e^{j\omega})| \approx 0$ form the stopband(阻帶). This chapter introduces the simplest members of the two great families of realizable filters:使 $|H(e^{j\omega})| \approx 1$ 的頻率構成通帶;使 $|H(e^{j\omega})| \approx 0$ 的頻率構成阻帶。本章介紹兩大可實現濾波器家族中最簡單的成員:$|H(e^{j\omega})| \approx 1$ となる周波数が通過帯域を、$|H(e^{j\omega})| \approx 0$ となる周波数が阻止帯域を作る。本章では、実現可能なフィルタの二大系統のうち最も単純なものを紹介する。

FIR (Finite Impulse Response, 有限脈衝響應)FIR(有限脈衝響應)FIR(有限インパルス応答)IIR (Infinite Impulse Response, 無限脈衝響應)IIR(無限脈衝響應)IIR(無限インパルス応答)
Difference equation差分方程式差分方程式$y[n]=\sum_{k=0}^{M} b_k\,x[n-k]$ (no feedback)$y[n]=\sum_{k=0}^{M} b_k\,x[n-k]$(無回授)$y[n]=\sum_{k=0}^{M} b_k\,x[n-k]$(帰還なし)$y[n]=\sum_{k=0}^{M} b_k x[n-k]-\sum_{k=1}^{N} a_k y[n-k]$ (feedback)$y[n]=\sum_{k=0}^{M} b_k x[n-k]-\sum_{k=1}^{N} a_k y[n-k]$(有回授)$y[n]=\sum_{k=0}^{M} b_k x[n-k]-\sum_{k=1}^{N} a_k y[n-k]$(帰還あり)
Impulse response脈衝響應インパルス応答finite length長度有限長さが有限infinite length長度無限長さが無限
Poles極點極only at $z=0$ — always stable只在 $z=0$ — 必定穩定$z=0$ のみ — 常に安定anywhere; stable iff poles inside unit circle可以在任何位置;唯有極點全在單位圓內才穩定どこにでも置ける。極がすべて単位円の内側にあるときに限り安定
Exact linear phase嚴格的線性相位厳密な線形位相possible (Section 11.6)可以做到(11.6 節)可能(11.6 節)not possible (only approximately)做不到(只能近似)不可能(近似のみ)
Order needed for sharp cutoff達成陡峭截止所需的階數急峻な遮断に必要な次数high高高いlow低低い
Concept — Why study "toy" filters first?觀念 — 為什麼要先研究「玩具」濾波器?概念 — なぜ先に「おもちゃ」のフィルタを学ぶのか
The lecture builds intuition with first- and second-order filters whose behavior you can compute by hand: where the zeros sit on the unit circle tells you which frequencies are killed; where the poles sit tells you which frequencies are boosted. Every sophisticated design method (windowing, Parks–McClellan, bilinear transform — later chapters) refines this same picture.課堂先用一階與二階濾波器建立直覺,因為它們的行為都可以用手算出來:零點落在單位圓上的哪裡,就決定哪些頻率被消滅;極點落在哪裡,就決定哪些頻率被抬高。後面每一種精巧的設計方法(視窗法、Parks–McClellan、雙線性轉換——都在後面的章節)都只是把同一幅圖像畫得更細而已。講義では、手計算で挙動を追える 1 次・2 次のフィルタから直感を組み立てる。単位円上のどこに零点があるかがどの周波数を消すかを教え、どこに極があるかがどの周波数を持ち上げるかを教える。より高度な設計法(窓関数法、Parks–McClellan、双一次変換——いずれも後の章)は、すべてこの同じ描像を精密にしたものにすぎない。

Why the three statements are equivalent三種說法為什麼等價三つの言い方はなぜ等価なのか

The table above splits filters into two families and asserts that three statements say the same thing: the length of the impulse response ⇔ whether the block diagram carries feedback ⇔ whether $H(z)$ has poles. The three are tied together because each is a different reading of the same difference equation.上表把濾波器分成兩大類,並指出三種說法是等價的:脈衝響應長度 ⇔ 方塊圖有沒有回授 ⇔ $H(z)$ 有沒有極點。三者之所以綁在一起,是因為它們不過是同一條差分方程式的三種讀法。上の表はフィルタを二つの系統に分け、三つの言い方が同じことを述べていると主張する。すなわちインパルス応答の長さ ⇔ ブロック図に帰還があるか ⇔ $H(z)$ に極があるかである。この三つが結びついているのは、どれも同じ差分方程式の読み方の違いにすぎないからである。

FIR: finite impulse responseFIR:有限脈衝響應FIR:有限インパルス応答

An FIR output is a weighted sum of the present and past inputs only:FIR 的輸出只由現在和過去的輸入加權相加:FIR の出力は現在と過去の入力だけの重みつき和である。

FIR difference equationFIR 差分方程式FIR の差分方程式 $$y[n] = \sum_{k=0}^{M} b_k\,x[n-k]$$

Why is the impulse response finite? Feed in a single impulse $\delta[n]$ and the output is the coefficient list: $h[n] = b_n$. After $M$ samples the impulse has walked out of the delay line and the output drops to 0 at once.為什麼脈衝響應是有限的?輸入一個脈衝 $\delta[n]$,輸出就是係數本身:$h[n] = b_n$。$M$ 個樣本之後,脈衝已經「走出」延遲線,輸出立刻變成 0。なぜインパルス応答は有限なのか。インパルス $\delta[n]$ を一つ入れると、出力は係数そのものになる。$h[n] = b_n$ である。$M$ 標本のあとインパルスは遅延線を「出て」しまい、出力はただちに 0 になる。

Why is there no feedback? In the block diagram the input is delayed, scaled by the coefficients and summed; the output never travels back to the input side. The 3-point filter $\{\alpha,\ \beta,\ \alpha\}$ of §10.2.5 is exactly this structure.為什麼沒有回授?方塊圖中只有輸入經過延遲、乘上係數、相加,輸出從不回到輸入端。§10.2.5 的 3 點濾波器 $\{\alpha,\ \beta,\ \alpha\}$ 就是這種結構。なぜ帰還がないのか。ブロック図では入力が遅延し、係数を掛けられ、加算されるだけで、出力が入力側へ戻ることは決してない。§10.2.5 の 3 点フィルタ $\{\alpha,\ \beta,\ \alpha\}$ がまさにこの構造である。

Why are there no poles? The z-transform is a polynomial in $z^{-1}$:為什麼沒有極點?Z 轉換是 $z^{-1}$ 的多項式:なぜ極がないのか。z 変換は $z^{-1}$ の多項式である。

FIR transfer functionFIR 的轉移函數FIR の伝達関数 $$H(z) = \sum_{k=0}^{M} b_k z^{-k} = \frac{b_0 z^M + b_1 z^{M-1} + \cdots + b_M}{z^M}$$

The roots of the numerator are the zeros and may be placed anywhere; the denominator is nothing but $z^M$, so every "pole" sits at the origin. A pole at the origin does not affect the magnitude response at all — its distance to the unit circle is always 1 — and contributes only linear phase, that is, a pure delay. So when the slide says "no poles", what it means precisely is no poles anywhere but the origin. The 3-point filter is the case with zeros at $e^{\pm j0.4}$ and a double pole at the origin.分子的根是零點,可以放在任何位置;分母只有 $z^M$,所以「極點」全部在原點。原點的極點不影響大小響應(距離單位圓永遠是 1),只貢獻線性相位(純延遲)。因此投影片說「no poles」,精確的意思是沒有原點以外的極點。3 點濾波器就是零點在 $e^{\pm j0.4}$、原點有二重極點。分子の根が零点であり、どこにでも置ける。分母は $z^M$ でしかないので、「極」はすべて原点にある。原点の極は振幅応答にまったく影響しない。単位円までの距離がつねに 1 だからである。寄与するのは線形位相、すなわち純粋な遅延だけである。したがってスライドの「no poles」が正確に意味するのは、原点以外に極がないということである。3 点フィルタは零点が $e^{\pm j0.4}$ にあり、原点に二重極をもつ場合にあたる。

IIR: infinite impulse responseIIR:無限脈衝響應IIR:無限インパルス応答

An IIR output uses the past outputs as well as the inputs:IIR 的輸出除了輸入,還用到過去的輸出:IIR の出力は入力に加えて過去の出力も使う。

IIR difference equationIIR 差分方程式IIR の差分方程式 $$y[n] = \sum_{k=0}^{M} b_k\,x[n-k] \;-\; \sum_{k=1}^{N} a_k\,y[n-k]$$

Why is the impulse response infinite? Take the simplest first-order system:為什麼脈衝響應是無限的?以最簡單的一階系統為例:なぜインパルス応答は無限なのか。最も単純な 1 次のシステムで考える。

First-order IIR and its impulse response一階 IIR 與它的脈衝響應1 次 IIR とそのインパルス応答 $$y[n] = a\,y[n-1] + x[n] \qquad\Longrightarrow\qquad h[n] = a^n u[n]$$

Once the impulse is in, the output is sent back, multiplied by $a$, and sent back again, and again — it never becomes exactly 0. It only decays exponentially ($|a| < 1$) or blows up ($|a| > 1$).脈衝進來後,輸出被送回去乘上 $a$,再送回去……永遠不會精確變成 0,只會指數衰減($|a| < 1$)或發散($|a| > 1$)。インパルスが入ると、出力は戻されて $a$ を掛けられ、また戻され……と続き、決して厳密に 0 にはならない。指数的に減衰する($|a| < 1$)か、発散する($|a| > 1$)だけである。

Why are there poles? The z-transform becomes a rational function:為什麼有極點?Z 轉換變成有理函數:なぜ極があるのか。z 変換は有理関数になる。

IIR transfer functionIIR 的轉移函數IIR の伝達関数 $$H(z) = \frac{B(z)}{A(z)} = \frac{\sum_{k=0}^{M} b_k z^{-k}}{1 + \sum_{k=1}^{N} a_k z^{-k}}$$

The roots of the denominator $A(z)$ are the poles, and they come straight from the feedback coefficients $a_k$. For the first-order example above, $H(z) = \dfrac{1}{1 - az^{-1}}$ and the pole sits at $z = a$. The allpass filter of §10.4.1 and the system of the lecture example in §10.3.3 are both IIR.分母 $A(z)$ 的根就是極點,直接來自回授係數 $a_k$。上面的一階例子:$H(z) = \dfrac{1}{1 - az^{-1}}$,極點在 $z = a$。§10.4.1 用過的全通濾波器、§10.3.3 課本例子中的系統,都是 IIR。分母 $A(z)$ の根が極であり、それは帰還係数 $a_k$ から直接生じる。上の 1 次の例では $H(z) = \dfrac{1}{1 - az^{-1}}$ であり、極は $z = a$ にある。§10.4.1 の全域通過フィルタも、§10.3.3 の講義例のシステムも、どちらも IIR である。

The three statements side by side三者的對應關係三つの言い方の対応

FIRIIR
Difference equation差分方程式差分方程式$x$ terms only只有 $x$ 項$x$ の項のみpast values of $y$ as well有 $y$ 的過去值$y$ の過去の値も使う
Block diagram方塊圖ブロック図feed-forward only只有前饋前向きの経路のみa feedback path有回授路徑帰還の経路がある
$H(z)$polynomial (poles only at the origin)多項式(極點只在原點)多項式(極は原点のみ)rational (poles away from the origin)有理函數(原點以外有極點)有理関数(原点以外に極がある)
$h[n]$finite length有限長度有限の長さinfinite length無限長度無限の長さ

The interactive figure below carries four systems, and shows the difference equation, the pole-zero plot, the impulse response and the magnitude response of each at the same time.下面的互動圖有四種系統,可以同時看到差分方程式、pole-zero 圖、脈衝響應和大小響應。下のインタラクティブな図には四つのシステムがあり、差分方程式、極零配置、インパルス応答、振幅応答を同時に見ることができる。

8
0.80
0.950
0.60
feedback回授帰還
poles away from the origin原點以外的極點原点以外の極
length of $h[n]$$h[n]$ 長度$h[n]$ の長さ
stability穩定性安定性

Interactive — 互動圖 — インタラクティブ — four systems, each shown four ways at once. The four cards read off the three statements of the slide — feedback, poles away from the origin, length of $h[n]$ — plus the stability that follows from them, so the equivalence can be checked rather than believed. In the z-plane, ○ marks zeros and × poles; a mark at the origin carries a $\times k$ label giving its multiplicity. Note which kind sits at the origin: the FIR filters pile up poles there, while the two all-pole IIR filters pile up zeros there instead. The impulse response is drawn as 61 stems, the ones that are exactly zero in grey, so the length of $h[n]$ can be counted off the plot. The magnitude response is clamped to $\pm 40$ dB.四種系統,每一種同時用四種方式呈現。四張卡片直接讀出投影片的三種說法——回授、原點以外的極點、$h[n]$ 長度——再加上由此而來的穩定性,所以這個等價關係是可以當場檢查的,而不必相信。在 z 平面上,○ 是零點、× 是極點;原點上的記號帶有 $\times k$ 標籤,表示重數。請注意原點上是哪一種:FIR 濾波器把極點堆在那裡,而兩個全極點 IIR 濾波器堆在那裡的則是零點。脈衝響應畫成 61 支脈衝,恰好為零的畫成灰色,所以 $h[n]$ 的長度可以直接從圖上數出來。大小響應截在 $\pm 40$ dB。四つのシステムを、それぞれ同時に四通りの見方で示す。四枚のカードはスライドの三つの言い方——帰還、原点以外の極、$h[n]$ の長さ——と、そこから従う安定性をそのまま読み出すので、この等価性は信じるのではなく確かめられる。z 平面では ○ が零点、× が極である。原点の記号には重複度を表す $\times k$ の標識がつく。原点にあるのがどちらかに注目されたい。FIR フィルタはそこに極を積み上げ、全極型の二つの IIR フィルタはかわりに零点を積み上げる。インパルス応答は 61 本の棒で描かれ、厳密に零のものは灰色なので、$h[n]$ の長さは図から数えられる。振幅応答は $\pm 40$ dB で打ち切ってある。

A suggested order to try建議依序嘗試試す順序の提案

  1. FIR: moving average. Adjust $N$ and the impulse response is exactly $N$ stems of equal height, every later sample being 0. In the pole-zero plot the zeros are spread evenly around the unit circle and the poles are all piled at the origin. Whatever $N$ is, the stability reading stays "stable".FIR:移動平均。調整 $N$,脈衝響應恰好是 $N$ 根等高的線,之後全部是 0。pole-zero 圖中,零點均勻分布在單位圓上,極點全部集中在原點。不論 $N$ 是多少,穩定性永遠是「穩定」。FIR:移動平均。$N$ を動かすと、インパルス応答はちょうど $N$ 本の等しい高さの棒になり、それ以降はすべて 0 である。極零配置では零点が単位円上に等間隔に並び、極はすべて原点に集まる。$N$ がいくつであっても、安定性の表示は「安定」のままである。

  2. IIR: first order. Pull $a$ from 0.5 up to 0.95 and the "tail" of the impulse response grows ever longer, because the closer the pole comes to the unit circle the slower the decay (a time constant of about $1/(1-|a|)$). For negative $a$ the samples of $h[n]$ alternate in sign. Push $a$ past 1 and the pole leaves the unit circle, whereupon the impulse response diverges.IIR:一階。把 $a$ 從 0.5 拉到 0.95,脈衝響應的「尾巴」越來越長,因為極點越靠近單位圓,衰減越慢(時間常數約 $1/(1-|a|)$)。$a$ 為負數時,$h[n]$ 正負交錯。把 $a$ 拉過 1,極點跑出單位圓,脈衝響應發散。IIR:1 次。$a$ を 0.5 から 0.95 へ上げると、インパルス応答の「尾」はしだいに長くなる。極が単位円に近づくほど減衰が遅くなるからである(時定数はおよそ $1/(1-|a|)$)。$a$ が負のとき $h[n]$ は符号が交互になる。$a$ を 1 より大きくすると極は単位円の外へ出て、インパルス応答は発散する。

  3. IIR: second-order resonator. This is the pole structure used by the allpass filter and by the lecture example of §10.3.3. The impulse response is a decaying oscillation — the ringing met earlier. The closer $\rho$ comes to 1, the longer the ringing lasts and the sharper the peak of the frequency response. This is precisely the time-domain face of "the closer a pole comes to the unit circle, the larger the group delay and the longer the transient".IIR:二階共振。這就是全通濾波器和 §10.3.3 課本例子中使用的極點結構。脈衝響應是衰減振盪,也就是先前提到的振鈴。$\rho$ 越接近 1,振鈴越久,頻率響應的峰值越尖銳。這正是「極點越靠近單位圓,群延遲越大、暫態越長」的時域表現。IIR:2 次の共振。これは全域通過フィルタと §10.3.3 の講義例で使われている極の構造である。インパルス応答は減衰振動、すなわち先に出てきたリンギングである。$\rho$ が 1 に近づくほどリンギングは長く続き、周波数応答のピークは鋭くなる。これこそ「極が単位円に近づくほど群遅延は大きく、過渡は長くなる」ことの時間領域での姿である。

  4. Recursive moving average. This mode brings out a detail hidden in the "⇔" of the slide. Its difference equation contains $y[n-1]$ and its block diagram does carry feedback, yet its impulse response has only $N$ nonzero samples — exactly as in mode 1.遞迴移動平均。這個模式說明投影片中「⇔」的一個細節。它的差分方程式有 $y[n-1]$,方塊圖有回授,但脈衝響應只有 $N$ 個非零樣本,和模式 1 完全相同。再帰的移動平均。このモードはスライドの「⇔」に隠れた細部を明らかにする。差分方程式には $y[n-1]$ があり、ブロック図には帰還がある。それでもインパルス応答の非零標本は$N$ 個だけで、モード 1 とまったく同じである。

The reason is that the pole at $z = 1$ is cancelled by a zero:原因是 $z = 1$ 的極點被零點抵消了:理由は、$z = 1$ の極が零点に打ち消されることにある。

The integrator-comb cancellation積分器與梳形的抵消積分器とくし形の相殺 $$H(z) = \frac{1}{N}\cdot\frac{1 - z^{-N}}{1 - z^{-1}} = \frac{1}{N}\left(1 + z^{-1} + \cdots + z^{-(N-1)}\right)$$
Warning — feedback does not by itself mean IIR注意 — 有回授不一定代表 IIR注意 — 帰還があるだけでは IIR とは限らない
The equivalence asserted by the slide holds, strictly speaking, for the reduced $H(z)$. "There is feedback" does not by itself mean IIR; what settles the question is whether the poles really survive the reduction.所以投影片的等價關係,嚴格來說是針對化簡後的 $H(z)$。「有回授」不一定代表 IIR,要看極點是否真的保留下來。したがってスライドが主張する等価性は、厳密には約分後の $H(z)$ に対して成り立つ。「帰還がある」ことだけでは IIR とは限らず、決め手は極が約分を生き延びるかどうかである。
Tip — the CIC filter實務 — CIC 濾波器実務 — CIC フィルタ
This structure is common in hardware, the CIC (cascaded integrator-comb) filter being the standard example. However large $N$ grows, each sample costs one addition and one subtraction — there is no need for $N$ multiply-accumulates. The price is that the integrator's pole sits exactly on the unit circle, so the cancellation has to be exact; implementations therefore use integer or modular arithmetic, which keeps rounding error from accumulating.這個結構在硬體中很常見,例如 CIC(cascaded integrator-comb)濾波器。不論 $N$ 多大,每個樣本只需要一次加法和一次減法,不必做 $N$ 次乘加。代價是積分器的極點恰好在單位圓上,必須依賴精確的抵消,所以通常用整數或模數運算實作,避免捨入誤差累積。この構造はハードウェアでよく使われ、CIC(cascaded integrator-comb)フィルタが代表例である。$N$ がどれほど大きくても、1 標本あたり加算 1 回と減算 1 回で済み、$N$ 回の積和は要らない。代償として積分器の極はちょうど単位円上にあり、相殺が厳密でなければならない。そのため実装には整数演算や剰余演算を用い、丸め誤差が蓄積しないようにする。

The FIR / IIR trade-offFIR 與 IIR 的取捨FIR と IIR の取捨選択

This bears directly on the phase and group delay discussed in §10.3:這和 §10.3 討論的相位、群延遲直接相關:これは §10.3 で論じた位相と群遅延に直結する。

Property特性特性FIRIIR
Stability穩定性安定性always stable (no poles away from the origin)一定穩定(沒有原點以外的極點)つねに安定(原点以外に極がない)the poles must lie inside the unit circle極點必須在單位圓內極が単位円の内側になければならない
Linear phase線性相位線形位相obtained simply by making the coefficients symmetric; the group delay is fixed at $(N-1)/2$係數對稱即可做到,群延遲固定為 $(N-1)/2$係数を対称にするだけで得られ、群遅延は $(N-1)/2$ に固定されるa causal system cannot achieve it exactly; the group delay varies with frequency因果系統無法做到精確線性相位,群延遲隨頻率變化因果システムでは厳密には達成できず、群遅延は周波数とともに変わる
Order needed for the same specification達成相同規格所需的階數同じ仕様に必要な次数high (tens to hundreds of taps may be needed)高(可能需要數十到數百個 taps)高い(数十から数百のタップが要ることもある)low (poles produce sharp frequency selectivity)低(極點能產生尖銳的頻率選擇性)低い(極が鋭い周波数選択性を生む)
Computation and memory計算量、記憶體計算量と記憶量larger較大大きいsmaller較小小さい
Effect of finite precision有限精度的影響有限語長の影響insensitive; errors do not accumulate不敏感,誤差不會累積鈍感であり、誤差は蓄積しないsensitive: coefficient quantization can displace the poles, even out of the unit circle, and rounding error circulates in the feedback, possibly producing a limit cycle敏感:係數量化可能讓極點移位甚至跑出單位圓;捨入誤差會在回授中循環,可能產生 limit cycle敏感である。係数の量子化は極を動かし、単位円の外へ出すことさえある。丸め誤差は帰還の中を回り、リミットサイクルを生むことがある。

The examples met earlier happen to stand on opposite sides:前面的例子剛好各代表一邊:これまでの例は、ちょうど両側に一つずつ立っている。

Key — how to choose重點 — 如何選擇要点 — どう選ぶか
Lean towards FIR when linear phase is required and the waveform must be preserved (communications, measurement, imaging), or when the hardware precision is limited. Lean towards IIR when sharp frequency selectivity must be bought with the least arithmetic and the phase does not matter (many audio equalizers, control loops).選擇的原則是:需要線性相位、保持波形(例如通訊、量測、影像),或者硬體精度有限時,偏向 FIR;需要用最少的運算達成尖銳的頻率選擇性,而且相位不重要時(例如許多音訊等化、控制迴路),偏向 IIR。選択の原則はこうである。線形位相が必要で波形を保たねばならないとき(通信、計測、画像など)、あるいはハードウェアの精度が限られているときは FIR に寄せる。最小の演算量で鋭い周波数選択性を得たく、位相が問題にならないとき(多くの音声イコライザや制御ループなど)は IIR に寄せる。

11.1.2 Decibels(分貝)11.1.2 分貝11.1.2 デシベル

Filter gains span many orders of magnitude, so magnitude responses are usually plotted on a logarithmic decibel scale:濾波器的增益橫跨好幾個數量級,因此振幅響應通常畫在對數的分貝刻度上:フィルタの利得は何桁にもわたるため、振幅応答はふつう対数のデシベル尺度で描かれる。

Gain in dB以 dB 表示的增益dB で表した利得 $$G(\omega)\;=\;20\log_{10}\bigl|H(e^{j\omega})\bigr|\ \text{dB}, \qquad \text{attenuation(衰減量)} \;=\; -\,G(\omega)\ \text{dB}$$
$|H|$$|H|^2$ (power)$|H|^2$(功率)$|H|^2$(電力)gain in dB以 dB 表示的增益dB で表した利得read as讀作読み方
$1$$1$$0$ dB$0$ 分貝$0$ デシベルunity gain增益為 1利得 1 倍
$1/\sqrt{2}\approx 0.707$$1/2$$-3$ dB$-3$ 分貝$-3$ デシベルhalf-power point(半功率點)半功率點半電力点
$1/2$$1/4$$-6$ dB$-6$ 分貝$-6$ デシベルhalving the amplitude振幅減半振幅が半分
$0.1$$0.01$$-20$ dB$-20$ 分貝$-20$ デシベルone decade down降低一個數量級1 桁下がる
$0.01$$10^{-4}$$-40$ dB$-40$ 分貝$-40$ デシベルtwo decades down降低兩個數量級2 桁下がる
Key — The 3-dB cutoff frequency重點 — 3-dB 截止頻率要点 — 3-dB 遮断周波数
The 3-dB cutoff frequency(3-dB 截止頻率) $\omega_c$ is where $|H(e^{j\omega_c})|^2 = \tfrac12 |H|^2_{\max}$, i.e. $|H(e^{j\omega_c})| = 1/\sqrt{2}$ for a unity-gain filter. It is the conventional boundary between "passed" and "attenuated". Also remember: cascading filters multiplies magnitudes, hence dB gains simply add.3-dB 截止頻率 $\omega_c$ 就是使 $|H(e^{j\omega_c})|^2 = \tfrac12 |H|^2_{\max}$ 成立的頻率;對增益為 1 的濾波器來說,也就是 $|H(e^{j\omega_c})| = 1/\sqrt{2}$ 之處。習慣上就以它作為「通過」與「被衰減」的分界。另外要記得:濾波器串接時振幅相乘,因此 dB 增益只要相加。3-dB 遮断周波数 $\omega_c$ とは $|H(e^{j\omega_c})|^2 = \tfrac12 |H|^2_{\max}$ となる周波数であり、利得 1 のフィルタでは $|H(e^{j\omega_c})| = 1/\sqrt{2}$ となる点である。慣例として、これを「通す」と「減衰させる」の境界とみなす。さらに、フィルタを縦続接続すると振幅は掛け算になるので、dB 利得は単純に足し算になることも覚えておきたい。
直觀解釋(點擊展開)
為什麼用分貝?因為濾波器的增益範圍可能從 1 到 0.00001,用線性座標畫圖時阻帶細節全部擠在 0 附近看不見。取對數之後,「每衰減 10 倍」變成固定的 −20 dB 間距,阻帶的漣波結構一目了然。另外串接濾波器時增益相乘,在 dB 尺度上變成相加,計算非常方便。−3 dB 對應功率剩一半,所以叫「半功率點」,習慣上把它當作通帶的邊界。

11.2 Simple FIR Filters11.2 簡單的 FIR 濾波器11.2 単純な FIR フィルタ

11.2.1 The Two-Point Average: a Simple FIR Lowpass11.2.1 兩點平均:最簡單的 FIR 低通11.2.1 2 点平均——単純な FIR 低域通過

The simplest lowpass filter(低通濾波器)averages the current and previous samples:最簡單的低通濾波器,就是把目前與前一個樣本取平均:最も単純な低域通過フィルタは、現在と一つ前の標本を平均するものである。

Simple FIR lowpass簡單的 FIR 低通単純な FIR 低域通過 $$y[n]=\tfrac12\bigl(x[n]+x[n-1]\bigr) \qquad H_0(z)=\tfrac12\bigl(1+z^{-1}\bigr)$$

Its frequency response factors into a real amplitude and a linear phase:它的頻率響應可以分解成一個實數振幅乘上一個線性相位:その周波数応答は、実数の振幅と線形位相の積に分解できる。

Frequency response頻率響應周波数応答 $$H_0(e^{j\omega}) = \tfrac12\bigl(1+e^{-j\omega}\bigr) = e^{-j\omega/2}\cos\!\bigl(\tfrac{\omega}{2}\bigr) \qquad\Rightarrow\qquad \bigl|H_0(e^{j\omega})\bigr| = \cos\!\bigl(\tfrac{\omega}{2}\bigr)$$
Worked Example 11-A — Properties of the two-point average範例 11-A — 兩點平均的性質例題 11-A — 2 点平均の性質
Zero location: $H_0(z)=0$ at $z=-1$, i.e. at $\omega=\pi$. The highest frequency $(-1)^n$ is annihilated: averaging two adjacent samples of $(-1)^n$ gives exactly zero.零點位置:$H_0(z)=0$ 發生在 $z=-1$,也就是 $\omega=\pi$ 處。最高的頻率 $(-1)^n$ 被完全消滅:把 $(-1)^n$ 相鄰兩個樣本平均起來恰好是零。零点の位置:$z=-1$、すなわち $\omega=\pi$ で $H_0(z)=0$ となる。最高周波数 $(-1)^n$ は完全に消える。$(-1)^n$ の隣り合う 2 標本を平均すると、ちょうど零になるからである。
DC gain: $H_0(e^{j0})=1$. A constant passes unchanged.直流增益:$H_0(e^{j0})=1$。常數訊號原封不動地通過。直流利得:$H_0(e^{j0})=1$。定数はそのまま通過する。
3-dB cutoff: solve $\cos(\omega_c/2)=1/\sqrt2 \Rightarrow \omega_c/2=\pi/4 \Rightarrow \boxed{\omega_c=\pi/2}$.3-dB 截止頻率:解 $\cos(\omega_c/2)=1/\sqrt2 \Rightarrow \omega_c/2=\pi/4 \Rightarrow \boxed{\omega_c=\pi/2}$。3-dB 遮断周波数:$\cos(\omega_c/2)=1/\sqrt2 \Rightarrow \omega_c/2=\pi/4 \Rightarrow \boxed{\omega_c=\pi/2}$ を解けばよい。
Phase: $\angle H_0 = -\omega/2$, perfectly linear — a delay of half a sample.相位:$\angle H_0 = -\omega/2$,完全線性——相當於延遲半個樣本。位相:$\angle H_0 = -\omega/2$ で完全に線形である——半標本ぶんの遅延にあたる。

Pole-zero: the factored formZ 轉換與 pole-zeroz 変換と極零配置

These two slides use the simplest lowpass filter there is to revise every tool met so far — pole-zero, the linear phase of a symmetric FIR, the geometric reading of the magnitude — and end by introducing the definition of the cutoff frequency. Start by clearing the $z^{-1}$ out of $H_0(z)$:這兩張投影片用最簡單的低通濾波器,複習前面學過的所有工具:pole-zero、對稱 FIR 的線性相位、幾何詮釋,最後引入截止頻率的定義。先把 $H_0(z)$ 中的 $z^{-1}$ 清掉:この二枚のスライドは、ありうる最も単純な低域通過フィルタを使って、これまでの道具——極零配置、対称 FIR の線形位相、振幅の幾何学的な読み方——をすべて復習し、最後に遮断周波数の定義を導入する。まず $H_0(z)$ から $z^{-1}$ を払う。

Zero at $z=-1$, pole at the origin零點在 $z=-1$、極點在原點零点は $z=-1$、極は原点 $$H_0(z) = \tfrac12\left(1 + z^{-1}\right) = \frac{z+1}{2z}$$

The Euler step: the same trick as for the 3-point filter頻率響應:和 3 點濾波器同樣的技巧周波数応答——3 点フィルタと同じ手口

Substitute $z = e^{j\omega}$ and pull out $-\omega/2$, the midpoint of the exponents $0$ and $-\omega$:代入 $z = e^{j\omega}$,把指數 $0$ 和 $-\omega$ 的中間值 $-\omega/2$ 提出來:$z = e^{j\omega}$ を代入し、指数 $0$ と $-\omega$ の中点である $-\omega/2$ をくくり出す。

Pulling out the midpoint exponent提出中間的指數中点の指数をくくり出す $$\tfrac12\left(1 + e^{-j\omega}\right) = \tfrac12\,e^{-j\omega/2}\left(e^{j\omega/2} + e^{-j\omega/2}\right) = e^{-j\omega/2}\cos(\omega/2)$$

The last step is Euler's formula, $e^{j\omega/2} + e^{-j\omega/2} = 2\cos(\omega/2)$, whose 2 cancels the $\tfrac12$ exactly. That is the step the green arrow on the slide points at. The result splits into two parts:最後一步用 Euler 公式:$e^{j\omega/2} + e^{-j\omega/2} = 2\cos(\omega/2)$,正好和前面的 $\tfrac12$ 約掉。投影片上的綠色箭頭指的就是這一步。結果拆成兩部分:最後の一歩はオイラーの公式 $e^{j\omega/2} + e^{-j\omega/2} = 2\cos(\omega/2)$ であり、その 2 が前の $\tfrac12$ とちょうど約分される。スライドの緑の矢印が指しているのがこの一歩である。結果は二つの部分に分かれる。

Part部分部分What it is意義意味
$\cos(\omega/2)$real, and it is the magnitude response. It stays $\ge 0$ throughout $[0,\pi]$, so there is no $\pi$ jump in the phase.實數,就是大小響應。在 $[0, \pi]$ 上恆 $\ge 0$,所以沒有 $\pi$ 的相位跳躍。実数であり、振幅応答そのものである。$[0,\pi]$ 上でつねに $\ge 0$ なので、位相に $\pi$ の跳びは生じない。
$e^{-j\omega/2}$linear phase, $\theta(\omega) = -\omega/2$.線性相位,$\theta(\omega) = -\omega/2$。線形位相であり、$\theta(\omega) = -\omega/2$ である。

From the phase:由相位可得:位相から次が得られる。

Phase delay and group delay相位延遲與群延遲位相遅延と群遅延 $$\tau_p = \tau_g = \tfrac12 \ \text{sample}$$

The phase is a straight line through the origin, so the phase delay and the group delay are equal, both half a sample. That is what "½ sample delay" on the slide means. The reason is the same as for the 3-point filter of §10.2.5: $h[n]$ is symmetric about $n = \tfrac12$, the midpoint of its two coefficients.相位是一條通過原點的直線,所以相位延遲和群延遲相等,都是半個樣本。這就是投影片「½ sample delay」的意思。原因和 §10.2.5 的 3 點濾波器一樣:$h[n]$ 對稱於 $n = \tfrac12$(兩個係數的中間)。位相は原点を通る直線なので、位相遅延と群遅延は等しく、ともに半標本である。これがスライドの「½ sample delay」の意味である。理由は §10.2.5 の 3 点フィルタと同じで、$h[n]$ がその二つの係数の中点 $n = \tfrac12$ について対称だからである。

What "a delay of half a sample" means「延遲半個樣本」是什麼意思「半標本の遅れ」とはどういうことか

A discrete-time signal has values only at integer instants, so "a delay of 0.5 samples" sounds odd. What actually happens, for an input $\cos(\omega_0 n)$, is this:離散時間訊號只在整數時刻有值,「延遲 0.5 個樣本」聽起來很奇怪。實際上,輸入 $\cos(\omega_0 n)$ 時:離散時間信号は整数の時刻にしか値をもたないので、「0.5 標本の遅れ」は奇妙に聞こえる。入力 $\cos(\omega_0 n)$ に対して実際に起きているのは次のことである。

Averaging two neighbours samples the midpoint兩點平均就是取中間點的值隣接 2 点の平均は中点を読むこと $$y[n] = \tfrac12\bigl(\cos(\omega_0 n) + \cos(\omega_0(n-1))\bigr) = \cos(\omega_0/2)\cdot\cos\!\bigl(\omega_0(n - \tfrac12)\bigr)$$

Averaging two adjacent samples amounts to taking the value of that sinusoid exactly halfway between them, times a shrinking factor. So every output sample lands where the input curve is, shifted right by half a step. The interactive figure below shows this directly.把兩個相鄰樣本平均,相當於取那條正弦曲線在兩個樣本正中間的值(再乘上一個縮小因子)。所以輸出的每個樣本,都落在輸入曲線往右平移半格的位置。下面的互動圖可以直接看到這點。隣り合う 2 標本を平均することは、その正弦曲線のちょうど真ん中の値を(縮小因子を掛けて)取ることにあたる。したがって出力の各標本は、入力曲線を右へ半目盛ずらした位置に落ちる。下のインタラクティブな図でそれが直に見える。

Geometric reading: the shape of the magnitude response幾何詮釋:大小響應的形狀幾何学的な読み方——振幅応答の形

Magnitude as a ratio of vector lengths大小是向量長度之比振幅はベクトルの長さの比 $$\bigl|H_0(e^{j\omega})\bigr| = \frac{\bigl|e^{j\omega} - (-1)\bigr|}{2\,\bigl|e^{j\omega} - 0\bigr|} = \frac{\text{length of the zero vector}}{2}$$

Put a zero at $z=-1$ and a lowpass filter is what comes out. This is the lesson "a zero produces a minimum of the magnitude" of §10.2.4 put to work.零點放在 $z = -1$,就得到一個低通濾波器。這正是 §10.2.4「零點造成大小的極小值」的應用。$z=-1$ に零点を置けば、出てくるのは低域通過フィルタである。これは §10.2.4 の「零点は振幅の極小を作る」をそのまま使ったものである。

The cutoff frequency截止頻率遮断周波数

Why a definition is needed. The magnitude response of this filter is a smoothly falling curve with no clear boundary between "passed" and "blocked". To describe the filter with a single number, a boundary has to be agreed upon, and that is the cutoff frequency $\omega_c$.為什麼需要定義。這個濾波器的大小響應是平滑下降的曲線,沒有明確的「通過」和「擋掉」的分界。為了用一個數字描述濾波器,需要約定一個分界點,這就是截止頻率 $\omega_c$。なぜ定義が要るのか。このフィルタの振幅応答はなめらかに下がる曲線であり、「通す」と「遮る」の明確な境目がない。フィルタを一つの数で表すには境目を取り決めねばならず、それが遮断周波数 $\omega_c$ である。

The half-power point. The commonest definition is the frequency at which the power has fallen to half its maximum:半功率點。最常用的定義是功率降到最大值一半的頻率:半電力点。最もよく使われる定義は、電力が最大値の半分まで落ちる周波数である。

Half-power definition of $\omega_c$$\omega_c$ 的半功率定義$\omega_c$ の半電力による定義 $$\bigl|H(e^{j\omega_c})\bigr|^2 = \tfrac12\max_\omega \bigl|H(e^{j\omega})\bigr|^2 \qquad\Longrightarrow\qquad \bigl|H(e^{j\omega_c})\bigr| = \tfrac{1}{\sqrt2}\,H_{\max} \approx 0.707\,H_{\max}$$

Why power and not amplitude? The power of a signal is proportional to the square of its amplitude, so "half the power" is "the amplitude times $1/\sqrt2$". In decibels:為什麼用功率而不是振幅?訊號的功率和振幅的平方成正比,所以「功率減半」就是「振幅乘上 $1/\sqrt2$」。換成 dB:なぜ振幅ではなく電力なのか。信号の電力は振幅の二乗に比例するので、「電力が半分」は「振幅が $1/\sqrt2$ 倍」である。dB に直すと次のようになる。

Half power is $-3$ dB功率減半就是 $-3$ dB電力が半分とは $-3$ dB のこと $$10\log_{10}\tfrac12 \;=\; 20\log_{10}\tfrac{1}{\sqrt2} \;\approx\; -3\ \text{dB}$$

So the half-power point is also commonly called the $-3$ dB point, as in §11.1.2. For the two-point average the maximum is at $\omega=0$ with $H_{\max}=1$, and solving $\cos(\omega_c/2) = 1/\sqrt2$ gives $\omega_c = \pi/2$, as in Worked Example 11-A above. Translated into a real frequency, $\omega=\pi$ corresponds to $f_s/2$ (the Nyquist frequency), so $\omega_c = \pi/2$ corresponds to $f_c = f_s/4$: at a sampling rate of 48 kHz, the cutoff is 12 kHz.所以半功率點也常叫做 $-3$ dB 點,如 §11.1.2 所述。兩點平均的最大值在 $\omega = 0$,$H_{\max} = 1$;令 $\cos(\omega_c/2) = 1/\sqrt2$ 解得 $\omega_c = \pi/2$,就是上面範例 11-A 的結果。換成實際頻率,$\omega = \pi$ 對應 $f_s/2$(Nyquist 頻率),所以 $\omega_c = \pi/2$ 對應 $f_c = f_s/4$。例如取樣率 48 kHz,截止頻率就是 12 kHz。そのため半電力点は §11.1.2 にあるとおり $-3$ dB 点とも呼ばれる。2 点平均では最大値は $\omega=0$ にあり $H_{\max}=1$ である。$\cos(\omega_c/2) = 1/\sqrt2$ を解けば $\omega_c = \pi/2$ となり、上の例題 11-A の結果と一致する。実際の周波数に直すと、$\omega=\pi$ が $f_s/2$(ナイキスト周波数)に対応するので、$\omega_c = \pi/2$ は $f_c = f_s/4$ にあたる。標本化周波数 48 kHz なら遮断周波数は 12 kHz である。

What this filter cannot do這個濾波器的限制このフィルタの限界

This is a very "gentle" lowpass: it does not reach $-3$ dB until $\pi/2$ and does not reach zero until $\pi$, so the transition band takes up half the whole band. One simple way to steepen it is to cascade $K$ identical two-point averages:這是很「緩」的低通濾波器:在 $\pi/2$ 才降到 $-3$ dB,到 $\pi$ 才完全歸零,過渡帶佔了整個頻帶的一半。要讓它更陡,一種簡單的方法是串接 $K$ 個相同的 2 點平均:これはきわめて「ゆるい」低域通過である。$-3$ dB に達するのが $\pi/2$、零になるのが $\pi$ であり、遷移帯が帯域全体の半分を占めてしまう。急峻にする簡単な方法の一つは、同じ 2 点平均を $K$ 個縦続接続することである。

$K$ cascaded two-point averages串接 $K$ 個兩點平均2 点平均を $K$ 個縦続接続する $$H_K(e^{j\omega}) = e^{-jK\omega/2}\cos^K(\omega/2), \qquad \omega_c = 2\cos^{-1}\!\left(2^{-1/(2K)}\right)$$

This amounts to stacking $K$ zeros at $z=-1$, and the coefficients become the binomial coefficients — $\{\tfrac14,\ \tfrac12,\ \tfrac14\}$ for $K=2$, for instance. The larger $K$ is, the lower the cutoff frequency and the faster the decay at high frequencies, while the group delay rises to $K/2$. The cascade is taken up properly in §11.4; the interactive figure below lets $K$ be adjusted here.這相當於把 $K$ 個零點都疊在 $z = -1$,係數是二項式係數,例如 $K = 2$ 時是 $\{\tfrac14,\ \tfrac12,\ \tfrac14\}$。$K$ 越大,截止頻率越低,曲線在高頻衰減越快,群延遲則增加為 $K/2$。串接本身留到 §11.4 正式討論;下面的互動圖可以在這裡先調整 $K$。これは $z=-1$ に零点を $K$ 個重ねることにあたり、係数は二項係数になる。たとえば $K=2$ なら $\{\tfrac14,\ \tfrac12,\ \tfrac14\}$ である。$K$ が大きいほど遮断周波数は低くなり、高域での減衰は速くなる。一方で群遅延は $K/2$ へと増える。縦続接続そのものは §11.4 で本格的に扱う。下のインタラクティブな図では、ここで $K$ を動かせる。

$h[n]$
$|H(\omega_0)|$
dBdBdB
cutoff $\omega_c$截止頻率 $\omega_c$遮断周波数 $\omega_c$
group delay群延遲群遅延
input $x[n] = \cos(\omega_0 n)$輸入 $x[n] = \cos(\omega_0 n)$入力 $x[n] = \cos(\omega_0 n)$ output $y[n]$輸出 $y[n]$出力 $y[n]$ input curve shifted by $K/2$ and scaled by $|H|$輸入曲線平移 $K/2$ 並縮小 $|H|$ 倍入力曲線を $K/2$ ずらし $|H|$ 倍したもの half power, $1/\sqrt2$半功率 $1/\sqrt2$半電力 $1/\sqrt2$
Interactive — 互動圖 — インタラクティブ — $K$ cascaded two-point averages, read three ways at once. Left: the z-plane, with the blue zero vector drawn from the zero at $-1$ to the green point $e^{j\omega_0}$; its length divided by 2, raised to the $K$, is $|H|$. The green point can be dragged around the circle. Middle: the magnitude response, with the half-power line and $\omega_c$ marked in red, and $K=1$ kept as a dotted reference whenever $K>1$; dragging across it also sets $\omega_0$. Bottom: the samples from $n=-2$ to $30$ of input and output, with the blue dashed curve being the input curve shifted right by $K/2$ and scaled by $|H|$ — every blue output dot lands on it, which is what a half-sample delay looks like.$K$ 個串接的兩點平均,同時用三種方式呈現。左:z 平面,藍色零點向量從零點 $-1$ 連到綠點 $e^{j\omega_0}$;它的長度除以 2 再取 $K$ 次方,就是 $|H|$。綠點可以沿圓周拖動。中:大小響應,紅色標出半功率線與 $\omega_c$,$K>1$ 時保留 $K=1$ 的點線作為對照;在圖上拖動也可以設定 $\omega_0$。下:$n=-2$ 到 $30$ 的輸入與輸出樣本,藍色虛線是輸入曲線往右平移 $K/2$、再縮小 $|H|$ 倍——每個藍色輸出點都落在它上面,這就是半樣本延遲的樣子。$K$ 個縦続接続した 2 点平均を、同時に三通りに読む。左は z 平面であり、零点 $-1$ から緑の点 $e^{j\omega_0}$ へ青い零点ベクトルが引かれる。その長さを 2 で割り $K$ 乗したものが $|H|$ である。緑の点は円周に沿ってドラッグできる。中央は振幅応答で、半電力の線と $\omega_c$ が赤で示され、$K>1$ のときは $K=1$ が点線の参照として残る。この図上をドラッグしても $\omega_0$ を設定できる。下は $n=-2$ から $30$ までの入力と出力の標本を描いたものである。青い破線は入力曲線を右へ $K/2$ ずらし $|H|$ 倍したもので、青い出力点はすべてその上に落ちる。これが半標本の遅れの姿である。

A suggested order to try建議操作試す順序の提案

  1. $K=1$: drag $\omega_0$ (or drag the green point round the pole-zero plot). The blue zero vector runs from $z=-1$ to the green point, and its length divided by 2 is $|H|$:$K = 1$,拖動 $\omega_0$(或在 pole-zero 圖上拖動綠點)。藍色零點向量從 $z = -1$ 連到綠點。它的長度除以 2,就是 $|H|$:$K=1$ で $\omega_0$ をドラッグする(または極零配置の緑の点を動かす)。青い零点ベクトルは $z=-1$ から緑の点へ伸び、その長さを 2 で割ったものが $|H|$ である。

    • at $\omega_0 = 0$ the length is 2, so $|H| = 1$;$\omega_0 = 0$ 時長度為 2,$|H| = 1$。$\omega_0 = 0$ では長さが 2 なので $|H| = 1$ である。
    • at $\omega_0 = 0.5\pi$ the curve just touches the red $1/\sqrt2$ line — the cutoff frequency;$\omega_0 = 0.5\pi$ 時,曲線剛好碰到紅色 $1/\sqrt2$ 虛線,就是截止頻率。$\omega_0 = 0.5\pi$ では曲線がちょうど赤い $1/\sqrt2$ の線に触れる。これが遮断周波数である。
    • at $\omega_0 = \pi$ the length is 0 and $|H| = 0$.$\omega_0 = \pi$ 時,向量長度為 0,$|H| = 0$。$\omega_0 = \pi$ では長さが 0 になり $|H| = 0$ である。
  2. Look for the half-sample delay in the time-domain panel. Every blue output dot lands on the blue dashed line, and that line is nothing but the grey input curve shifted right by 0.5 and shrunk by $|H|$. Each output sample is exactly the value of the input curve halfway between two samples. Pull $\omega_0$ up close to $\pi$ and the input is nearly alternating $(+1, -1, +1, \ldots)$, so the average of two neighbours is nearly 0. That is what a zero at $z=-1$ means in the time domain.看時域圖的半樣本延遲。藍色輸出點都落在藍色虛線上,而這條虛線就是灰色輸入曲線往右平移 0.5 格、再縮小 $|H|$ 倍。每個輸出點,正好是輸入曲線在兩個樣本中間的值。把 $\omega_0$ 拉到接近 $\pi$,輸入幾乎是正負交錯($+1, -1, +1, \ldots$),相鄰兩點平均後幾乎是 0。這就是零點在 $z = -1$ 的時域意義。時間領域のパネルで半標本の遅れを見る。青い出力点はすべて青い破線の上に落ち、その線は灰色の入力曲線を右へ 0.5 ずらして $|H|$ 倍しただけのものである。各出力標本は、入力曲線の 2 標本のちょうど中間の値にあたる。$\omega_0$ を $\pi$ の近くまで上げると入力はほぼ交互($+1, -1, +1, \ldots$)になり、隣接 2 点の平均はほぼ 0 になる。これが $z=-1$ の零点の時間領域での意味である。

  3. Pull $K$ from 1 up to 6.把 $K$ 從 1 拉到 6。$K$ を 1 から 6 まで上げる。

    • The zero and the pole at the origin both become $K$-fold.零點和原點的極點都疊成 $K$ 重。零点も原点の極も $K$ 重になる。
    • The curve steepens and the cutoff frequency falls from $0.5\pi$ to about $0.21\pi$ (the dotted curve is $K=1$, kept for comparison).曲線變陡,截止頻率從 $0.5\pi$ 降到約 $0.21\pi$(灰色虛線是 $K = 1$ 作為對照)。曲線は急になり、遮断周波数は $0.5\pi$ からおよそ $0.21\pi$ まで下がる(点線は比較のための $K=1$)。
    • $h[n]$ becomes the binomial coefficients, and the group delay becomes $K/2$.$h[n]$ 變成二項式係數,群延遲變為 $K/2$。$h[n]$ は二項係数になり、群遅延は $K/2$ になる。
    • In the time domain the output is delayed further, and a high-frequency input is pressed down harder.時域中,輸出延遲增加,高頻的輸入被壓得更小。時間領域では出力の遅れが増え、高い周波数の入力はより強く押さえられる。
Key — the FIR trade-off in miniature重點 — FIR 取捨的縮影要点 — FIR の取捨選択の縮図
This also displays the typical FIR trade-off: a steeper lowpass characteristic costs more coefficients, and the delay grows along with them.這也顯示了 FIR 的典型取捨:要更陡的低通特性,就需要更多係數,延遲也隨之增加。これは FIR の典型的な取捨選択も示している。低域通過の特性を急峻にするには係数を増やすほかなく、遅れもそれにつれて大きくなる。

11.2.2 The M-Point Moving-Average Lowpass11.2.2 M 點移動平均低通11.2.2 M 点移動平均の低域通過

Generalizing to an average of $M$ samples gives the moving-average filter(移動平均濾波器), the workhorse of noise smoothing:推廣成 $M$ 個樣本的平均,就得到移動平均濾波器,它是雜訊平滑的主力:$M$ 標本の平均に一般化すると移動平均フィルタが得られる。雑音平滑化の主力である。

Moving-average filter移動平均濾波器移動平均フィルタ $$y[n]=\frac1M\sum_{k=0}^{M-1}x[n-k] \qquad H(e^{j\omega})=\frac1M\,\frac{\sin(M\omega/2)}{\sin(\omega/2)}\;e^{-j\omega(M-1)/2}$$

The magnitude is a periodic-sinc (Dirichlet) shape with nulls at $\omega = 2\pi k/M$, $k=1,\dots,M-1$: any sinusoid completing a whole number of cycles inside the averaging window averages to zero. Increasing $M$ narrows the passband and increases the smoothing, at the cost of a longer delay $(M-1)/2$ samples.振幅是週期 sinc(Dirichlet)的形狀,並在$\omega = 2\pi k/M$ 處出現零點,$k=1,\dots,M-1$:任何在平均視窗內剛好走完整數個週期的弦波,平均之後都是零。把 $M$ 加大會讓通帶變窄、平滑更強,代價是延遲變長為 $(M-1)/2$ 個樣本。振幅は周期 sinc(Dirichlet)の形をしており、$\omega = 2\pi k/M$ に零点をもつ($k=1,\dots,M-1$)。平均化窓の中でちょうど整数回の周期を終える正弦波は、平均すると零になるからである。$M$ を大きくすると通過帯域は狭くなり平滑化は強まるが、その代わり遅延が $(M-1)/2$ 標本と長くなる。

2026-06-12T22:38:05.450493 image/svg+xml Matplotlib v3.10.8, https://matplotlib.org/ 0 π/4 π/2 3π/4 π ω 0.0 0.2 0.4 0.6 0.8 1.0 |H(e^jω)| M-point moving-average filter: longer M means narrower passband M = 2 M = 5 M = 10
Fig. 11-5 — Magnitude response of the $M$-point moving average for $M=2,5,10$. Longer windows give a narrower passband and deeper smoothing, with nulls at multiples of $2\pi/M$(窗長越長,通帶越窄、平滑越強,且在 2π/M 的整數倍處有零點).圖 11-5 — $M$ 點移動平均在 $M=2,5,10$ 時的振幅響應。視窗越長,通帶越窄、平滑越強,並在 $2\pi/M$ 的整數倍處出現零點。図 11-5 — $M$ 点移動平均の振幅応答($M=2,5,10$)。窓が長いほど通過帯域は狭く平滑化は強くなり、$2\pi/M$ の整数倍に零点が現れる。
Tip — Moving average in MATLAB提醒 — 在 MATLAB 中做移動平均ヒント — MATLAB での移動平均
b = ones(1,M)/M; y = filter(b,1,x); implements the causal moving average. Use freqz(b,1) to inspect its magnitude/phase. It is a fine smoother but a poor lowpass filter: its first sidelobe is only about 13 dB down, so stopband rejection is weak.b = ones(1,M)/M; y = filter(b,1,x); 就實作出因果的移動平均。用 freqz(b,1) 可以檢視它的振幅與相位。它是不錯的平滑器,卻是很差的低通濾波器:第一個旁瓣只低了大約 13 dB,阻帶抑制很弱。b = ones(1,M)/M; y = filter(b,1,x); で因果的な移動平均が実装できる。振幅と位相は freqz(b,1) で確認するとよい。平滑化器としては優秀だが、低域通過フィルタとしては出来が悪い。第一サイドローブが約 13 dB しか下がらないため、阻止帯域の抑圧が弱いのである。

11.2.3 The First Difference: a Simple FIR Highpass11.2.3 一階差分:最簡單的 FIR 高通11.2.3 一次差分——単純な FIR 高域通過

Flipping the sign of the second tap turns the averager into a differencer — the simplest highpass filter(高通濾波器):把第二個抽頭的符號翻過來,平均器就變成差分器——這是最簡單的高通濾波器:2 番目のタップの符号を反転させると、平均器は差分器に変わる——これが最も単純な高域通過フィルタである。

Simple FIR highpass簡單的 FIR 高通単純な FIR 高域通過 $$y[n]=\tfrac12\bigl(x[n]-x[n-1]\bigr) \qquad H_1(z)=\tfrac12\bigl(1-z^{-1}\bigr) \qquad \bigl|H_1(e^{j\omega})\bigr|=\sin\!\bigl(\tfrac{\omega}{2}\bigr)$$

Now the zero sits at $z=+1$ ($\omega=0$): DC is annihilated, while the fastest alternation $(-1)^n$ passes with gain 1. Its 3-dB cutoff is again $\omega_c = \pi/2$. In fact $h_1[n]=(-1)^n h_0[n]$ — replacing $z$ by $-z$ shifts a frequency response by $\pi$, converting lowpass to highpass(把 $z\to-z$,頻率響應平移 π,低通變高通).現在零點落在 $z=+1$($\omega=0$):直流被消滅,而振盪最快的 $(-1)^n$ 以增益 1 通過。它的 3-dB 截止頻率同樣是 $\omega_c = \pi/2$。事實上 $h_1[n]=(-1)^n h_0[n]$ ——把 $z$ 換成 $-z$ 會讓頻率響應平移 $\pi$,於是 $z\to-z$ 就把低通變成了高通。今度は零点が $z=+1$($\omega=0$)にあり、直流が消される一方、最も速く振動する $(-1)^n$ は利得 1 で通過する。3-dB 遮断周波数はやはり $\omega_c = \pi/2$ である。実際 $h_1[n]=(-1)^n h_0[n]$ であって、$z$ を $-z$ に置き換えると周波数応答は $\pi$ だけ平行移動する。つまり $z\to-z$ が低域通過を高域通過に変えるのである。

2026-06-12T22:38:05.117785 image/svg+xml Matplotlib v3.10.8, https://matplotlib.org/ 0 π/4 π/2 3π/4 π ω 0.0 0.2 0.4 0.6 0.8 1.0 magnitude 1/√2 (−3 dB) Two-point average (lowpass) and first difference (highpass) |H0(e^jω)| = cos(ω/2) (lowpass) |H1(e^jω)| = sin(ω/2) (highpass)
Fig. 11-4 — The two simplest FIR filters: $|H_0|=\cos(\omega/2)$ (lowpass, zero at $\omega=\pi$) and $|H_1|=\sin(\omega/2)$ (highpass, zero at DC). Both cross the −3 dB level $1/\sqrt2$ at $\omega=\pi/2$(兩者皆在 π/2 處達 −3 dB).圖 11-4 — 兩個最簡單的 FIR 濾波器:$|H_0|=\cos(\omega/2)$(低通,零點在 $\omega=\pi$)與 $|H_1|=\sin(\omega/2)$(高通,零點在直流)。兩者都在 $\omega=\pi/2$ 處通過 −3 dB 的位準 $1/\sqrt2$。図 11-4 — 最も単純な二つの FIR フィルタ。$|H_0|=\cos(\omega/2)$(低域通過、零点は $\omega=\pi$)と $|H_1|=\sin(\omega/2)$(高域通過、零点は直流)。どちらも $\omega=\pi/2$ で −3 dB の水準 $1/\sqrt2$ を横切る。
Key — Power complementary pair重點 — 功率互補的一對濾波器要点 — 電力相補な組
$\cos^2(\omega/2)+\sin^2(\omega/2)=1$, so $|H_0|^2+|H_1|^2=1$ at every frequency: whatever power the lowpass removes, the highpass keeps. Such a pair is called power-complementary(功率互補).$\cos^2(\omega/2)+\sin^2(\omega/2)=1$,所以在每一個頻率上都有 $|H_0|^2+|H_1|^2=1$:低通丟掉多少功率,高通就留下多少。這樣的一對濾波器稱為功率互補。$\cos^2(\omega/2)+\sin^2(\omega/2)=1$ であるから、どの周波数でも $|H_0|^2+|H_1|^2=1$ が成り立つ。低域通過が捨てた電力は、そのまま高域通過が保つ。このような組を電力相補と呼ぶ。

Pole-zero: the zero moves to $z=1$Z 轉換與 pole-zero:零點移到 $z = 1$z 変換と極零配置——零点は $z=1$ へ移る

These two slides introduce the highpass that corresponds to the two-point lowpass, and end with a very practical trick: multiply $h[n]$ by $(-1)^n$ and a lowpass becomes a highpass. Where the lowpass takes the average of two neighbouring samples, the highpass takes their difference:這兩張投影片介紹與低通相對應的高通濾波器,並說明一個很實用的技巧:把 $h[n]$ 乘上 $(-1)^n$,低通就變成高通。低通是相鄰樣本取平均,高通則是取差:この二枚のスライドは、2 点低域通過に対応する高域通過フィルタを導入し、最後にとても実用的な手口を示す。$h[n]$ に $(-1)^n$ を掛ければ、低域通過は高域通過になる。低域通過が隣り合う標本の平均をとるのに対し、高域通過はその差をとる。

Two-point difference highpass2 點差分高通2 点差分の高域通過 $$h_H[n] = \left\{\tfrac12,\ -\tfrac12\right\} \quad\Longleftrightarrow\quad y[n] = \tfrac12\big(x[n] - x[n-1]\big)$$

This is nothing but the discrete-time derivative (the first difference), and it is used to detect change. Clearing the $z^{-1}$ out of $H_H(z)$ as before:這其實就是離散時間的微分(一階差分),用來偵測變化。和前面一樣,先把 $H_H(z)$ 中的 $z^{-1}$ 清掉:これはまさに離散時間の微分(一次差分)であり、変化を検出するのに使われる。前と同じく、まず $H_H(z)$ から $z^{-1}$ を払う。

Zero at $z=1$, pole at the origin零點在 $z=1$、極點在原點零点は $z=1$、極は原点 $$H_H(z) = \tfrac12\left(1 - z^{-1}\right) = \frac{z - 1}{2z}$$

Compared with the lowpass, the zero has moved from $z=-1$ to $z=1$.和低通相比,零點從 $z = -1$ 移到了 $z = 1$。低域通過と比べると、零点が $z=-1$ から $z=1$ へ移っている。

Frequency response: the Euler step with a minus sign頻率響應:Euler 公式,這次是相減周波数応答——引き算になった Euler の公式

Pull out $e^{-j\omega/2}$ with the same trick as for the lowpass:用同樣的技巧,提出 $e^{-j\omega/2}$:低域通過と同じ手口で $e^{-j\omega/2}$ をくくり出す。

A difference of exponentials gives a sine指數相減得到 sin指数の差は正弦になる $$\tfrac12\left(1 - e^{-j\omega}\right) = \tfrac12\,e^{-j\omega/2}\left(e^{j\omega/2} - e^{-j\omega/2}\right) = \tfrac12\,e^{-j\omega/2}\cdot 2j\sin(\omega/2)$$ $$H_H(e^{j\omega}) = j\,e^{-j\omega/2}\sin(\omega/2)$$

This time the bracket is a difference, and by Euler's formula $e^{j\omega/2} - e^{-j\omega/2} = 2j\sin(\omega/2)$. Set against the lowpass $e^{-j\omega/2}\cos(\omega/2)$ there are two differences: cos has become sin, and there is an extra factor of $j$.這次括號裡是相減,由 Euler 公式 $e^{j\omega/2} - e^{-j\omega/2} = 2j\sin(\omega/2)$。和低通 $e^{-j\omega/2}\cos(\omega/2)$ 比較,有兩個差別:cos 變成 sin,以及多了一個 $j$。今度は括弧の中が差であり、Euler の公式から $e^{j\omega/2} - e^{-j\omega/2} = 2j\sin(\omega/2)$ となる。低域通過の $e^{-j\omega/2}\cos(\omega/2)$ と比べると違いは二つある。cos が sin になったことと、$j$ が一つ余分に付いたことである。

Magnitude and cutoff大小響應與截止頻率振幅応答と遮断周波数

Magnitude, and the half-power cutoff大小響應與半功率截止頻率振幅と半電力の遮断周波数 $$|H_H(e^{j\omega})| = |\sin(\omega/2)|, \qquad \sin(\omega_c/2) = \tfrac{1}{\sqrt2} \;\Rightarrow\; \omega_c = \tfrac{\pi}{2}$$

Geometrically this is the length of the zero vector — from $z=1$ to $e^{j\omega}$ — divided by 2:從幾何上看,就是零點向量(從 $z = 1$ 指向 $e^{j\omega}$)的長度除以 2:幾何学的には、零点ベクトル($z=1$ から $e^{j\omega}$ へ)の長さを 2 で割ったものである。

The cutoff is exactly the same as the lowpass's — again. That is no coincidence; the reason comes with the second slide below.截止頻率和低通完全相同(again)。這不是巧合,原因在第二張投影片。遮断周波数は低域通過とまったく同じである——またしても。これは偶然ではなく、理由は下の二枚目のスライドで明らかになる。

Phase: what the extra $j$ means相位:多出來的 $j$ 是什麼位相——余分な $j$ の意味

Since $j = e^{j\pi/2}$, for $0 < \omega < \pi$:$j = e^{j\pi/2}$,所以在 $0 < \omega < \pi$ 時:$j = e^{j\pi/2}$ であるから、$0 < \omega < \pi$ では次のようになる。

Generalized linear phase廣義線性相位一般化線形位相 $$\theta(\omega) = \frac{\pi}{2} - \frac{\omega}{2}, \qquad 0 < \omega < \pi$$

This is a straight line of slope $-\tfrac12$ that does not pass through the origin — the second kind of linear phase, generalized linear phase, which §11.6.2 treats in full:這是一條斜率 $-\tfrac12$、但不通過原點的直線,對應第二種線性相位——廣義線性相位,§11.6.2 會完整討論:これは傾き $-\tfrac12$ の直線だが、原点を通らない。線形位相の第二の種類、一般化線形位相であり、§11.6.2 で本格的に扱う。

Lowpass $h_L$低通 $h_L$低域通過 $h_L$Highpass $h_H$高通 $h_H$高域通過 $h_H$
Coefficients係數係数symmetric $\{\tfrac12, \tfrac12\}$對稱 $\{\tfrac12, \tfrac12\}$対称 $\{\tfrac12, \tfrac12\}$antisymmetric $\{\tfrac12, -\tfrac12\}$反對稱 $\{\tfrac12, -\tfrac12\}$反対称 $\{\tfrac12, -\tfrac12\}$
Phase相位位相$-\omega/2$$\pi/2 - \omega/2$
Group delay $\tau_g$群延遲 $\tau_g$群遅延 $\tau_g$$\tfrac12$$\tfrac12$
Phase delay $\tau_p$相位延遲 $\tau_p$位相遅延 $\tau_p$$\tfrac12$$\tfrac12 - \dfrac{\pi}{2\omega}$ (varies with frequency)$\tfrac12 - \dfrac{\pi}{2\omega}$(隨頻率變化)$\tfrac12 - \dfrac{\pi}{2\omega}$(周波数とともに変わる)

The group delay is still $\tfrac12$, so the envelope is not distorted; but the carrier picks up a fixed $90^\circ$ lead. That matches the "derivative" reading exactly: the derivative of cos is $-\sin$, a phase difference of $90^\circ$. At low frequency $H_H \approx j\omega/2$, which is the ideal differentiator $j\omega$ times $\tfrac12$.群延遲仍然是 $\tfrac12$,所以包絡不失真;但載波多了固定的 $90^\circ$ 超前。這正好呼應「微分」的解讀:cos 的微分是 $-\sin$,相位剛好差 $90^\circ$。在低頻時,$H_H \approx j\omega/2$,就是理想微分器 $j\omega$ 乘上 $\tfrac12$。群遅延は相変わらず $\tfrac12$ なので包絡は歪まない。だが搬送波には一定の $90^\circ$ の進みが付く。これは「微分」という読み方とぴったり合う。cos の微分は $-\sin$ であり、位相はちょうど $90^\circ$ ずれる。低い周波数では $H_H \approx j\omega/2$ で、理想微分器 $j\omega$ の $\tfrac12$ 倍である。

On either side of $\omega=0$, $\sin(\omega/2)$ changes sign, so the phase jumps from $-\pi/2$ to $+\pi/2$ — a jump of $\pi$. As before, this happens at a zero, where $|H|=0$.在 $\omega = 0$ 兩側,$\sin(\omega/2)$ 變號,相位從 $-\pi/2$ 跳到 $+\pi/2$,跳了 $\pi$。這和前面的情況一樣,發生在 $|H| = 0$ 的零點上。$\omega=0$ の両側で $\sin(\omega/2)$ の符号が変わるので、位相は $-\pi/2$ から $+\pi/2$ へ、つまり $\pi$ だけ跳ぶ。前と同じく、これは $|H|=0$ となる零点で起こる。

Lowpass to highpass: one operation seen three ways低通變高通:同一件事的三種看法低域通過から高域通過へ——一つの操作の三つの見方

Time domain: multiply by $(-1)^n$. Check it: $h_L[0] = \tfrac12$ times $(-1)^0 = 1$ is still $\tfrac12$; $h_L[1] = \tfrac12$ times $(-1)^1 = -1$ becomes $-\tfrac12$.時域:乘上 $(-1)^n$。驗證:$h_L[0] = \tfrac12$ 乘上 $(-1)^0 = 1$,仍是 $\tfrac12$;$h_L[1] = \tfrac12$ 乘上 $(-1)^1 = -1$,變成 $-\tfrac12$。時間領域:$(-1)^n$ を掛ける。確かめると、$h_L[0] = \tfrac12$ に $(-1)^0 = 1$ を掛けても $\tfrac12$ のまま、$h_L[1] = \tfrac12$ に $(-1)^1 = -1$ を掛けると $-\tfrac12$ になる。

Time domain, and the z-domain: $z \to -z$時域,以及 z 域:$z \to -z$時間領域と z 領域——$z \to -z$ $$h_H[n] = (-1)^n h_L[n] \qquad\Longrightarrow\qquad H_H(z) = \sum_n (-1)^n h_L[n]\,z^{-n} = \sum_n h_L[n]\,(-z)^{-n} = H_L(-z)$$

z-domain: replace $z$ by $-z$, which rotates the whole z-plane by $180^\circ$. Every zero and pole moves to the opposite side: the lowpass zero at $z=-1$ lands on $z=1$, and the pole at the origin stays at the origin under the rotation. The coloured discs on the slide are domain colouring — the colour of each point encodes the angle of $z$. The left disc is $z$ and the right disc is $-z$; the colours have turned half a revolution, showing that the same value now appears at the opposite position.z 域:把 $z$ 換成 $-z$,等於把整個 z 平面旋轉 $180^\circ$。所有零點和極點都移到對面:低通在 $z = -1$ 的零點,移到 $z = 1$;原點的極點旋轉後仍在原點。投影片中的彩色圓盤是 domain coloring:每個點的顏色代表 $z$ 的角度。左邊是 $z$,右邊是 $-z$,顏色整體轉了半圈,表示同一個值出現在對面的位置。z 領域:$z$ を $-z$ に置き換える。これはz 平面全体を $180^\circ$ 回すことにあたる。零点も極もすべて反対側へ移る。低域通過の $z=-1$ の零点は $z=1$ へ移り、原点の極は回しても原点のままである。スライドの色付きの円盤は domain coloring で、各点の色が $z$ の偏角を表す。左が $z$、右が $-z$ であり、色が全体として半回転している。同じ値が反対の位置に現れるということである。

Frequency domain: a shift by $\pi$頻域:平移 $\pi$周波数領域——$\pi$ だけの平行移動 $$-e^{j\omega} = e^{j(\omega + \pi)} \qquad\Longrightarrow\qquad H_H(e^{j\omega}) = H_L\!\left(e^{j(\omega + \pi)}\right), \qquad \cos\!\left(\frac{\omega - \pi}{2}\right) = \sin(\omega/2)$$

Frequency domain: the whole response shifts by $\pi$. On the unit circle $-e^{j\omega} = e^{j(\omega+\pi)}$. The lowpass was largest at $\omega=0$ and zero at $\pi$; after the shift it is largest at $\pi$ and zero at 0 — a highpass. The two plots at the bottom of the slide are exactly this shift, and the identity on the right checks it directly. The cutoff $\pi/2$, shifted by $\pi$, corresponds to $-\pi/2$, whose absolute value is still $\pi/2$ — which is why the two cutoffs agree.頻域:整個頻率響應平移 $\pi$。在單位圓上 $-e^{j\omega} = e^{j(\omega + \pi)}$。低通原本在 $\omega = 0$ 最大、在 $\pi$ 為 0;平移後變成在 $\pi$ 最大、在 0 為 0,也就是高通。投影片下方的兩張圖就是這個平移,右邊的恆等式可以直接驗證。截止頻率 $\pi/2$ 平移 $\pi$ 之後,對應的是 $-\pi/2$,取絕對值仍是 $\pi/2$,所以兩者的截止頻率相同。周波数領域:周波数応答全体が $\pi$ だけずれる。単位円の上では $-e^{j\omega} = e^{j(\omega+\pi)}$ である。低域通過はもともと $\omega=0$ で最大、$\pi$ で 0 だった。ずらした後は $\pi$ で最大、0 で 0 になる。これが高域通過である。スライド下段の二つの図はまさにこのずれであり、右の恒等式で直接確かめられる。遮断周波数 $\pi/2$ を $\pi$ ずらすと $-\pi/2$ に対応し、絶対値はやはり $\pi/2$ である。二つの遮断周波数が一致するのはそのためである。

Why $(-1)^n$ is a shift by $\pi$: the modulation property of the DTFT為什麼乘上 $(-1)^n$ 就是平移 $\pi$:DTFT 的調變性質なぜ $(-1)^n$ が $\pi$ のずれなのか——DTFT の変調性質 $$(-1)^n = e^{j\pi n}, \qquad e^{j\omega_0 n}\,h[n] \;\Longleftrightarrow\; H\!\left(e^{j(\omega - \omega_0)}\right)$$

Multiplying by a complex exponential in the time domain shifts the frequency response by $\omega_0$. The case $\omega_0=\pi$ is special because $e^{j\pi n}$ happens to be the real number $\pm1$, so the coefficients stay real. The trick works for any lowpass: the 3-point binomial lowpass $\{\tfrac14, \tfrac12, \tfrac14\}$, multiplied by $(-1)^n$, gives the highpass $\{\tfrac14, -\tfrac12, \tfrac14\}$. The interactive figure below performs the rotation continuously: the slider sets the rotation angle $\omega_0$, with 0 the lowpass and $\pi$ the highpass, and any angle in between a filter with complex coefficients.時域乘上一個複指數,頻域就平移 $\omega_0$。$\omega_0 = \pi$ 是特例,因為 $e^{j\pi n}$ 剛好是實數 $\pm1$,係數維持實數。這個技巧適用於任何低通濾波器。例如 3 點二項式低通 $\{\tfrac14, \tfrac12, \tfrac14\}$,乘上 $(-1)^n$ 就得到高通 $\{\tfrac14, -\tfrac12, \tfrac14\}$。下面的互動圖把這個旋轉連續地做出來:滑桿控制旋轉角度 $\omega_0$,0 是低通,$\pi$ 是高通,中間的角度則是複數係數的濾波器。時間領域で複素指数を掛けると、周波数領域では $\omega_0$ だけずれる。$\omega_0=\pi$ が特別なのは、$e^{j\pi n}$ がたまたま実数 $\pm1$ であり、係数が実数のままだからである。この手口はどんな低域通過フィルタにも使える。たとえば 3 点の二項低域通過 $\{\tfrac14, \tfrac12, \tfrac14\}$ に $(-1)^n$ を掛ければ、高域通過 $\{\tfrac14, -\tfrac12, \tfrac14\}$ が得られる。下のインタラクティブな図は、この回転を連続的に行う。スライダが回転角 $\omega_0$ を決め、0 が低域通過、$\pi$ が高域通過、その間の角度は複素係数のフィルタになる。

$h[n]$
$|H(\omega)|$
$\theta(\omega)$
group delay $\tau_g$群延遲 $\tau_g$群遅延 $\tau_g$
phase delay $\tau_p = -\theta/\omega$相位延遲 $\tau_p = -\theta/\omega$位相遅延 $\tau_p = -\theta/\omega$
current filter / real part目前濾波器/實部現在のフィルタ/実部 imaginary part虛部虚部 original lowpass ($\omega_0 = 0$)原始低通($\omega_0 = 0$)元の低域通過($\omega_0 = 0$) half power, $1/\sqrt2$半功率 $1/\sqrt2$半電力 $1/\sqrt2$
Interactive — 互動圖 — インタラクティブ — Lowpass to highpass by modulation: $h[n] = h_L[n]\,e^{j\omega_0 n}$ rotates the z-plane by $\omega_0$ and shifts the frequency response by $\omega_0$. Top left: the z-plane, with the zero of the rotated filter (blue ring) travelling from $z=-1$ along the grey dashed arc, and the blue zero vector drawn from it to the green observation point $e^{j\omega}$, which can be dragged round the circle. Bottom left: the coefficients, real part in blue and imaginary part in orange. Right: the magnitude and phase responses over $-\pi$ to $\pi$, with the original lowpass kept as a grey dashed reference and the shift $\omega_0$ marked by the green arrow; dragging across either plot also sets $\omega$. $K$ cascades $K$ copies of the two-point filter, so $\omega_0 = 0$ gives the binomial lowpass and $\omega_0 = \pi$ the matching highpass.用調變把低通變成高通:$h[n] = h_L[n]\,e^{j\omega_0 n}$ 把 z 平面旋轉 $\omega_0$,頻率響應平移 $\omega_0$。左上:z 平面,旋轉後濾波器的零點(藍色圓圈)從 $z = -1$ 沿灰色虛線弧移動,藍色零點向量從零點連到綠色觀察點 $e^{j\omega}$,綠點可以沿圓周拖動。左下:係數,藍色是實部,橘色是虛部。右:$-\pi$ 到 $\pi$ 的大小響應與相位響應,灰色虛線是原始低通作為對照,綠色箭頭標出平移量 $\omega_0$;在任一圖上拖動也可以設定 $\omega$。$K$ 是串接 $K$ 個兩點濾波器,所以 $\omega_0 = 0$ 是二項式低通,$\omega_0 = \pi$ 是對應的高通。変調による低域通過から高域通過への変換。$h[n] = h_L[n]\,e^{j\omega_0 n}$ は z 平面を $\omega_0$ だけ回し、周波数応答を $\omega_0$ だけずらす。左上は z 平面で、回したフィルタの零点(青い輪)が $z=-1$ から灰色の破線の弧に沿って動き、そこから緑の観察点 $e^{j\omega}$ へ青い零点ベクトルが引かれる。緑の点は円周に沿ってドラッグできる。左下は係数で、青が実部、橙が虚部である。右は $-\pi$ から $\pi$ までの振幅応答と位相応答で、元の低域通過が灰色の破線の参照として残り、ずれ $\omega_0$ が緑の矢印で示される。どちらの図上をドラッグしても $\omega$ を設定できる。$K$ は 2 点フィルタを $K$ 個縦続接続するので、$\omega_0 = 0$ が二項低域通過、$\omega_0 = \pi$ がそれに対応する高域通過になる。

A suggested order to try建議操作試す順序の提案

  1. Pull the rotation slowly from "lowpass" to "highpass". In the pole-zero plot the zero travels along the unit circle from $z=-1$ to $z=1$; the grey dashed arc is the path it has covered. At the same time the blue magnitude curve slides to the right relative to the grey lowpass curve, by exactly $\omega_0$ (the green arrow).從「低通」慢慢拉到「高通」。在 pole-zero 圖中,零點沿著單位圓,從 $z = -1$ 轉到 $z = 1$,灰色虛線弧就是它走過的路徑。同時,大小響應的藍色曲線相對於灰色低通曲線整體往右平移,平移量正好是 $\omega_0$(綠色箭頭)。回転を「低域通過」から「高域通過」へゆっくり動かす。極零配置では零点が単位円に沿って $z=-1$ から $z=1$ へ回り、灰色の破線の弧がその通った道である。同時に振幅応答の青い曲線が灰色の低域通過の曲線に対して右へ、ちょうど $\omega_0$(緑の矢印)だけずれる。

    Note that the horizontal axis runs from $-\pi$ to $\pi$, so at a shift of $\pi$ the lowpass peak at 0 moves to $\pm\pi$ and the edge "folds back" onto the other side. That is because the frequency response is periodic in $2\pi$.注意圖的橫軸畫的是 $-\pi$ 到 $\pi$,所以平移 $\pi$ 時,低通在 0 的峰值移到 $\pm\pi$,邊緣被「折回」另一側。這是頻率響應以 $2\pi$ 為週期造成的。横軸は $-\pi$ から $\pi$ までなので、$\pi$ ずらすと低域通過の 0 にあった山は $\pm\pi$ へ移り、端が反対側へ「折り返される」ことに注意する。周波数応答が $2\pi$ 周期であるためである。

  2. Press "halfway ($\omega_0 = \pi/2$)". The coefficients become complex (blue real part, orange imaginary part) and the magnitude response is no longer symmetric: it is largest at $+\pi/2$ and zero at $-\pi/2$. A filter with real coefficients always has a symmetric magnitude response, so the rotated coefficients are real only for $\omega_0 = 0$ or $\pi$. That is why lowpass-to-highpass uses exactly $(-1)^n$.按「中間($\omega_0 = \pi/2$)」。係數變成複數(藍色是實部,橘色是虛部),大小響應不再左右對稱:在 $+\pi/2$ 最大,在 $-\pi/2$ 為 0。實數係數的濾波器,大小響應一定左右對稱,所以只有 $\omega_0 = 0$ 或 $\pi$ 時,旋轉後的係數才會是實數。這就是為什麼低通變高通剛好用 $(-1)^n$。「中間($\omega_0 = \pi/2$)」を押す。係数は複素数になり(青が実部、橙が虚部)、振幅応答は左右対称でなくなる。$+\pi/2$ で最大、$-\pi/2$ で 0 である。実係数のフィルタの振幅応答は必ず左右対称なので、回した係数が実数になるのは $\omega_0 = 0$ か $\pi$ のときだけである。低域通過から高域通過への変換にちょうど $(-1)^n$ を使うのはそのためである。

  3. In highpass mode, drag the observation frequency.在高通模式下,拖動觀察頻率。高域通過のまま、観察する周波数をドラッグする。

    • For $0 < \omega < \pi$ the phase is a straight line of slope $-\tfrac12$, but its value at $\omega=0$ is $\pi/2$, not 0.在 $0 < \omega < \pi$ 時,相位是一條斜率 $-\tfrac12$ 的直線,但在 $\omega = 0$ 處的值是 $\pi/2$,不是 0。$0 < \omega < \pi$ では位相は傾き $-\tfrac12$ の直線だが、$\omega=0$ での値は 0 ではなく $\pi/2$ である。
    • In the number cards, $\tau_g$ stays fixed at $\tfrac12$ while $\tau_p$ changes with frequency. This is generalized linear phase: the envelope is not distorted, but the carrier has a fixed $90^\circ$ lead.數字卡中,$\tau_g$ 固定為 $\tfrac12$,$\tau_p$ 卻隨頻率改變。這就是廣義線性相位:包絡不失真,但載波有固定的 $90^\circ$ 超前。数値カードでは $\tau_g$ が $\tfrac12$ に固定される一方、$\tau_p$ は周波数とともに変わる。これが一般化線形位相であり、包絡は歪まないが搬送波には一定の $90^\circ$ の進みが付く。
    • Crossing $\omega=0$ the phase jumps by $\pi$, because DC is the zero.跨過 $\omega = 0$ 時,相位跳 $\pi$,因為 DC 就是零點。$\omega=0$ をまたぐと位相は $\pi$ 跳ぶ。直流がまさに零点だからである。
  4. Set $K$ to 2, then switch between lowpass and highpass. The lowpass is the binomial $\{\tfrac14, \tfrac12, \tfrac14\}$ and the highpass becomes $\{\tfrac14, -\tfrac12, \tfrac14\}$ — exactly the coefficients times $(-1)^n$. The double zero travels from $-1$ to $1$ as one, and the two cutoffs remain mirror images about $\pi/2$.把 $K$ 調到 2,再切換低通和高通。低通是二項式 $\{\tfrac14, \tfrac12, \tfrac14\}$,高通變成 $\{\tfrac14, -\tfrac12, \tfrac14\}$,正好是係數乘上 $(-1)^n$。二重零點一起從 $-1$ 轉到 $1$,兩者的截止頻率依然以 $\pi/2$ 為中心對稱。$K$ を 2 にして、低域通過と高域通過を切り替える。低域通過は二項係数 $\{\tfrac14, \tfrac12, \tfrac14\}$、高域通過は $\{\tfrac14, -\tfrac12, \tfrac14\}$ になり、まさに係数に $(-1)^n$ を掛けたものである。二重零点はそろって $-1$ から $1$ へ回り、二つの遮断周波数は相変わらず $\pi/2$ を中心に対称である。

Key — lowpass to highpass, in one table重點 — 低通變高通總結要点 — 低域通過から高域通過へのまとめ
Viewpoint觀點見方Lowpass → highpass低通 → 高通低域通過 → 高域通過
Time domain時域時間領域multiply the coefficients by $(-1)^n$係數乘上 $(-1)^n$係数に $(-1)^n$ を掛ける
z-domainz 域z 領域$z \to -z$; zeros and poles rotate by $180^\circ$$z \to -z$,零點和極點旋轉 $180^\circ$$z \to -z$。零点と極が $180^\circ$ 回る
Frequency domain頻域周波数領域the frequency response shifts by $\pi$頻率響應平移 $\pi$周波数応答が $\pi$ だけずれる
Property behind it背後的性質背後にある性質the modulation property of the DTFT, $(-1)^n = e^{j\pi n}$DTFT 的調變性質,$(-1)^n = e^{j\pi n}$DTFT の変調性質、$(-1)^n = e^{j\pi n}$

11.3 Simple IIR Filters11.3 簡單的 IIR 濾波器11.3 単純な IIR フィルタ

Adding one feedback coefficient buys far more selectivity per multiply. All four classical responses — LP, HP, BP, BS — have standard first/second-order IIR prototypes, parameterized so that the gain is exactly 1 at the center of the passband and exactly 0 at the center of the stopband.只要加上一個回授係數,每一次乘法買到的選擇性就大幅提高。四種經典響應——LP、HP、BP、BS——都有標準的一階或二階 IIR 原型,而且參數化的方式讓通帶中心的增益恰好是 1、阻帶中心的增益恰好是 0。帰還係数を一つ加えるだけで、乗算一回あたりの選択度は格段に高くなる。古典的な四つの応答——LP・HP・BP・BS——にはいずれも標準的な 1 次/2 次の IIR プロトタイプがあり、通過帯域の中心で利得がちょうど 1、阻止帯域の中心でちょうど 0 になるように母数が選ばれている。

11.3.1 First-Order IIR Lowpass11.3.1 一階 IIR 低通11.3.1 1 次 IIR 低域通過

First-order IIR lowpass一階 IIR 低通1 次 IIR 低域通過 $$H_{LP}(z)=\frac{1-\alpha}{2}\cdot\frac{1+z^{-1}}{1-\alpha z^{-1}}, \qquad |\alpha|<1 \text{ (stability)}$$

The zero at $z=-1$ forces $H_{LP}(e^{j\pi})=0$; the normalizing constant forces $H_{LP}(e^{j0})=1$. The pole at $z=\alpha$ (real, $0<\alpha<1$ in practice) boosts low frequencies — the closer $\alpha$ is to 1, the narrower the passband. The 3-dB cutoff is controlled directly by $\alpha$; the design equation is derived below.$z=-1$ 的零點迫使 $H_{LP}(e^{j\pi})=0$;歸一化常數則迫使 $H_{LP}(e^{j0})=1$。位於 $z=\alpha$ 的極點(實數,實務上 $0<\alpha<1$)會抬高低頻——$\alpha$ 越接近 1,通帶就越窄。3-dB 截止頻率直接由 $\alpha$ 控制,設計公式在下面推導。$z=-1$ の零点が $H_{LP}(e^{j\pi})=0$ を強制し、正規化定数が $H_{LP}(e^{j0})=1$ を強制する。$z=\alpha$ にある極(実数で、実用上は $0<\alpha<1$)が低域を持ち上げる。$\alpha$ が 1 に近いほど通過帯域は狭くなる。3-dB 遮断周波数は $\alpha$ が直接決める。設計式は以下で導く。

Structure: the two-point average plus one pole結構:兩點平均加上一個極點構造——2 点平均に極を一つ加える

Part部分部分Origin來源由来Role作用役割
numerator $1+z^{-1}$分子 $1+z^{-1}$分子 $1+z^{-1}$the two-point average of §11.2.1就是 §11.2.1 的兩點平均§11.2.1 の 2 点平均そのものzero at $z=-1$: $\omega=\pi$ is nulled exactly零點在 $z=-1$,讓 $\omega=\pi$ 完全歸零$z=-1$ の零点で $\omega=\pi$ を完全に零にする
denominator $1-\alpha z^{-1}$分母 $1-\alpha z^{-1}$分母 $1-\alpha z^{-1}$the new feedback path新加入的回授新たに加えた帰還pole at $z=\alpha$ on the real axis極點在 $z=\alpha$(實軸上)実軸上の $z=\alpha$ に極
$K$gain constant增益常數利得定数makes the DC gain exactly 1讓 DC 增益為 1直流利得をちょうど 1 にする

The filter shows the four hallmarks of an IIR: feedback, both zeros and poles, conditional stability, and an $h[n]$ that is of little direct use. Writing $H_{LP}(z)=K\,\dfrac{1+z^{-1}}{1-\alpha z^{-1}}$ and cross-multiplying gives the difference equation這個濾波器具備 IIR 的四個特徵:回授、同時有零點和極點、條件式穩定、以及$h[n]$ 比較沒用。把 $H_{LP}(z)=K\,\dfrac{1+z^{-1}}{1-\alpha z^{-1}}$ 交叉相乘,得到差分方程式このフィルタは IIR の四つの特徴を備えている。帰還、零点と極の両方、条件付き安定、そして$h[n]$ があまり役に立たないことである。$H_{LP}(z)=K\,\dfrac{1+z^{-1}}{1-\alpha z^{-1}}$ をたすき掛けすると差分方程式が得られる。

Difference equation差分方程式差分方程式 $$y[n]=\alpha\,y[n-1]+K\bigl(x[n]+x[n-1]\bigr)$$
x[n]y[n] z⁻¹z⁻¹ ++ Kα feedforward → zero前饋 → 零點前向き → 零点 feedback → pole回授 → 極點帰還 → 極
The left $z^{-1}$ is feed-forward and produces the zero; the right $z^{-1}$, multiplied by $\alpha$ and added back, is feedback and produces the pole.左邊的 $z^{-1}$ 是前饋,產生零點;右邊的 $z^{-1}$ 乘上 $\alpha$ 再加回來,就是回授,產生極點。左の $z^{-1}$ は前向きで零点を生む。右の $z^{-1}$ は $\alpha$ 倍して足し戻す帰還であり、極を生む。

Why $K=(1-\alpha)/2$為什麼 $K=(1-\alpha)/2$なぜ $K=(1-\alpha)/2$ なのか

Evaluate at DC, $z=1$:在 DC($z=1$)代入:直流 $z=1$ を代入する。

$$H_{LP}(1)=K\,\frac{1+1}{1-\alpha}=\frac{2K}{1-\alpha}=1\quad\Longrightarrow\quad K=\frac{1-\alpha}{2}$$

Geometrically, at $z=1$ the zero vector (from $-1$ to $1$) has length 2 and the pole vector has length $1-\alpha$. The closer the pole is to 1, the smaller the denominator and the larger the raw DC gain, so $K$ must shrink to compensate.從幾何上看:在 $z=1$,零點向量長度是 2(從 $-1$ 到 $1$),極點向量長度是 $1-\alpha$。極點越靠近 1,分母越小,DC 增益越大,所以 $K$ 必須跟著縮小來補償。幾何的には、$z=1$ で零点ベクトル($-1$ から $1$)の長さは 2、極ベクトルの長さは $1-\alpha$ である。極が 1 に近いほど分母は小さく直流利得は大きくなるので、$K$ を小さくして補償しなければならない。

Conditional stability, and why $h[n]$ is of little use條件式穩定,以及為什麼 $h[n]$ 比較沒用条件付き安定と、$h[n]$ があまり役に立たない理由

An FIR filter is always stable; an IIR filter is stable only if its poles lie inside the unit circle, here $|\alpha|<1$. The impulse response contains $\alpha^n$, which does not decay when $|\alpha|\ge1$:FIR 一定穩定,IIR 則必須滿足條件:極點在單位圓內,也就是 $|\alpha|<1$。脈衝響應中含有 $\alpha^n$ 這一項,$|\alpha|\ge1$ 時不會衰減:FIR は常に安定だが、IIR は極が単位円の内側にあるとき、ここでは $|\alpha|<1$ のときにだけ安定である。インパルス応答には $\alpha^n$ が含まれ、$|\alpha|\ge1$ では減衰しない。

$$h[n]=K\bigl(\alpha^n u[n]+\alpha^{n-1}u[n-1]\bigr)$$

For an FIR filter $h[n]$ is the coefficient list used in the implementation. For an IIR filter it is infinitely long, so nobody implements it from $h[n]$; the implementation uses $\alpha$ and $K$ in the difference equation. IIR design and analysis therefore live in the z-domain and frequency domain, and $h[n]$ is used only to look at transient behaviour.FIR 的 $h[n]$ 就是係數本身,直接拿來實作。IIR 的 $h[n]$ 是無限長的,我們不會用這串數字來實作(無法存無限個係數),而是用差分方程中的 $\alpha$ 和 $K$。所以 IIR 的設計和分析主要在 z 域和頻域進行,$h[n]$ 只用來觀察暫態特性。FIR では $h[n]$ がそのまま実装に使う係数列である。IIR では $h[n]$ が無限に長いので、これから実装することはなく、差分方程式の $\alpha$ と $K$ を使う。したがって IIR の設計と解析は主に z 領域と周波数領域で行い、$h[n]$ は過渡特性を見るためにしか使わない。

Pushing $\alpha\to1$當 $\alpha\to1$$\alpha\to1$ に近づける

Deriving the design equation推導設計公式設計式の導出

Goal: given the desired $\omega_c$, find $\alpha$.目標:給定想要的 $\omega_c$,求出 $\alpha$。目標:望みの $\omega_c$ から $\alpha$ を求める。

Derivation — half-power point of $H_{LP}$推導 — $H_{LP}$ 的半功率點導出 — $H_{LP}$ の半電力点
Step 1: write $|H|^2$. $|H|^2=H\cdot H^*$, and for real coefficients $H^*(e^{j\omega})=H(e^{-j\omega})$:步驟 1:寫出 $|H|^2$。$|H|^2=H\cdot H^*$,而實數係數時 $H^*(e^{j\omega})=H(e^{-j\omega})$:手順 1:$|H|^2$ を書く。$|H|^2=H\cdot H^*$ であり、実係数なら $H^*(e^{j\omega})=H(e^{-j\omega})$ である。 $$|H(e^{j\omega})|^2=\frac{(1-\alpha)^2}{4}\cdot\frac{(1+e^{-j\omega})(1+e^{j\omega})}{(1-\alpha e^{-j\omega})(1-\alpha e^{j\omega})}$$
Step 2: expand the products.步驟 2:展開乘積。手順 2:積を展開する。 $$(1+e^{-j\omega})(1+e^{j\omega})=2+2\cos\omega,\qquad (1-\alpha e^{-j\omega})(1-\alpha e^{j\omega})=1+\alpha^2-2\alpha\cos\omega$$
Step 3: set it to ½ (half power). The maximum is 1 at DC, so with $c=\cos\omega_c$:步驟 3:令它等於 ½(半功率點)。最大值是 1(在 DC),令 $c=\cos\omega_c$:手順 3:½(半電力)と置く。最大値は直流での 1 なので、$c=\cos\omega_c$ として $$\frac{(1-\alpha)^2}{4}\cdot\frac{2(1+c)}{1+\alpha^2-2\alpha c}=\frac12\;\Longrightarrow\;(1-\alpha)^2(1+c)=1+\alpha^2-2\alpha c$$
Step 4: simplify. Expanding the left side gives $(1-2\alpha+\alpha^2)+c(1-2\alpha+\alpha^2)$; cancel $1+\alpha^2$ and $-2\alpha c$ from both sides:步驟 4:化簡。左邊展開為 $(1-2\alpha+\alpha^2)+c(1-2\alpha+\alpha^2)$;兩邊消去 $1+\alpha^2$,再消去 $-2\alpha c$:手順 4:整理する。左辺を展開すると $(1-2\alpha+\alpha^2)+c(1-2\alpha+\alpha^2)$ となる。両辺から $1+\alpha^2$ と $-2\alpha c$ を消すと $$-2\alpha+c(1+\alpha^2)=0\;\Longrightarrow\;\cos\omega_c=\frac{2\alpha}{1+\alpha^2}$$ This is the "given $\alpha$, find $\omega_c$" form.這是「給 $\alpha$,求 $\omega_c$」的公式。これが「$\alpha$ から $\omega_c$ を求める」形である。
Step 5: solve for $\alpha$. As a quadratic in $\alpha$:步驟 5:反解 $\alpha$。整理成 $\alpha$ 的二次方程:手順 5:$\alpha$ について解く。$\alpha$ の 2 次方程式にすると $$c\,\alpha^2-2\alpha+c=0\;\Longrightarrow\;\alpha=\frac{1\pm\sin\omega_c}{\cos\omega_c}$$ The product of the two roots is 1, so they are reciprocals: one inside the unit circle, one outside. Only the root inside may be used, otherwise the filter is unstable.兩個根的乘積是 1,所以互為倒數,一個在單位圓內,一個在單位圓外。只能取單位圓內的根,否則濾波器不穩定。二つの根の積は 1 なので互いに逆数であり、一方は単位円の内側、もう一方は外側にある。使えるのは内側の根だけで、そうでなければフィルタは不安定になる。

Taking the "−" sign gives the design equation: specify the cutoff and read off the feedback coefficient directly.取「−」號就得到設計公式(design equation):指定截止頻率,直接得到回授係數。「−」の符号を取ると設計式が得られる。遮断周波数を指定すれば帰還係数がそのまま決まる。

3-dB cutoff ↔ pole location3-dB 截止頻率 ↔ 極點位置3-dB 遮断周波数 ↔ 極の位置 $$\cos\omega_c=\frac{2\alpha}{1+\alpha^2} \qquad\Longleftrightarrow\qquad \alpha=\frac{1-\sin\omega_c}{\cos\omega_c}$$
Worked Example 11-B — Place the cutoff at $\omega_c = 0.25\pi$範例 11-B — 把截止頻率放在 $\omega_c = 0.25\pi$例題 11-B — 遮断周波数を $\omega_c = 0.25\pi$ に置く
Step 1: $\sin(0.25\pi)=\cos(0.25\pi)=0.7071$.步驟 1:$\sin(0.25\pi)=\cos(0.25\pi)=0.7071$。手順 1:$\sin(0.25\pi)=\cos(0.25\pi)=0.7071$。
Step 2: $\alpha=\dfrac{1-0.7071}{0.7071}=0.4142$.步驟 2:$\alpha=\dfrac{1-0.7071}{0.7071}=0.4142$。手順 2:$\alpha=\dfrac{1-0.7071}{0.7071}=0.4142$。
Step 3: $H_{LP}(z)=0.2929\,\dfrac{1+z^{-1}}{1-0.4142\,z^{-1}}$, i.e. the difference equation $y[n]=0.4142\,y[n-1]+0.2929\,x[n]+0.2929\,x[n-1]$.步驟 3:$H_{LP}(z)=0.2929\,\dfrac{1+z^{-1}}{1-0.4142\,z^{-1}}$,也就是差分方程式 $y[n]=0.4142\,y[n-1]+0.2929\,x[n]+0.2929\,x[n-1]$。手順 3:$H_{LP}(z)=0.2929\,\dfrac{1+z^{-1}}{1-0.4142\,z^{-1}}$、すなわち差分方程式 $y[n]=0.4142\,y[n-1]+0.2929\,x[n]+0.2929\,x[n-1]$ となる。
Check: $|H_{LP}(e^{j0.25\pi})| = 0.7071 = 1/\sqrt2$. Exactly −3 dB.驗算:$|H_{LP}(e^{j0.25\pi})| = 0.7071 = 1/\sqrt2$。恰好是 −3 dB。検算:$|H_{LP}(e^{j0.25\pi})| = 0.7071 = 1/\sqrt2$。ちょうど −3 dB である。

Checking special values驗證幾個特殊值特別な値で確かめる

$\omega_c$$\alpha$Meaning意義意味
$\pi/2$$0$pole at the origin: the filter collapses to the two-point average, whose cutoff is indeed $\pi/2$極點在原點,退化成 2 點移動平均,截止頻率確實是 $\pi/2$極が原点にあり 2 点平均に退化する。その遮断周波数は確かに $\pi/2$ である
$<\pi/2$$0<\alpha<1$pole on the positive real axis: passband narrower than the FIR version極點在正實軸,通帶比 FIR 版本窄極は正の実軸上にあり、通過帯域は FIR 版より狭い
$>\pi/2$$-1<\alpha<0$pole on the negative real axis: passband wider than the FIR version極點在負實軸,通帶比 FIR 版本寬極は負の実軸上にあり、通過帯域は FIR 版より広い
$\to0$$\to1$pole approaches $z=1$: a very narrow lowpass極點逼近 $z=1$,非常窄的低通極が $z=1$ に迫り、非常に狭い低域通過になる

The two-point FIR has only one fixed cutoff, $\pi/2$. Adding one pole lets the cutoff be placed anywhere, at the cost of a single extra multiply. That is the efficiency advantage of IIR. The interactive figure below takes $\omega_c$ directly and shows the $\alpha$ the design equation returns together with the resulting responses.一個 FIR 只能有一個固定的截止頻率 $\pi/2$,加上一個極點後,就能把截止頻率設定在任何位置,而且只多了一次乘法。這就是 IIR 的效率優勢。下面的互動圖可以直接指定 $\omega_c$,觀察設計公式算出的 $\alpha$ 與各種響應。2 点 FIR の遮断周波数は $\pi/2$ に固定されている。極を一つ加えるだけで遮断周波数をどこにでも置け、増えるのは乗算一回だけである。これが IIR の効率面での利点である。下のインタラクティブな図では $\omega_c$ を直接指定し、設計式が返す $\alpha$ と各応答を観察できる。

$\alpha$ (design eq.)$\alpha$(設計公式)$\alpha$(設計式)
$K=(1-\alpha)/2$
$|H(\omega)|$
$\tau_g(\omega)$
IIR lowpassIIR 低通IIR 低域通過 two-point FIR average ($\alpha=0$)FIR 2 點平均($\alpha=0$)FIR 2 点平均($\alpha=0$) −3 dB and $\omega_c$−3 dB 與 $\omega_c$−3 dB と $\omega_c$ −20 dB/decade
Interactive — 互動圖 — インタラクティブ — First-order IIR lowpass designed from the specified $\omega_c$ through $\alpha=(1-\sin\omega_c)/\cos\omega_c$. Left: the z-plane, with the blue zero vector and red pole vector drawn to the green point $e^{j\omega}$ (drag it), and the faded × marking the rejected root $1/\alpha$; below it, $h[n]$ for $n=0\ldots29$. Right: linear magnitude, log-log magnitude in dB, and group delay, each with the two-point FIR as a grey dashed reference.由指定的 $\omega_c$ 經 $\alpha=(1-\sin\omega_c)/\cos\omega_c$ 設計出的一階 IIR 低通。左:z 平面,藍色零點向量與紅色極點向量連到綠點 $e^{j\omega}$(可拖動),淡色 × 是被捨棄的根 $1/\alpha$;下方是 $n=0\ldots29$ 的 $h[n]$。右:線性振幅、log-log 振幅(dB)與群延遲,灰色虛線都是 FIR 2 點平均作為對照。指定した $\omega_c$ から $\alpha=(1-\sin\omega_c)/\cos\omega_c$ で設計した 1 次 IIR 低域通過。左は z 平面で、青い零点ベクトルと赤い極ベクトルが緑の点 $e^{j\omega}$(ドラッグ可)へ伸び、淡い × は捨てた根 $1/\alpha$ を示す。その下は $n=0\ldots29$ の $h[n]$。右は線形振幅、両対数振幅(dB)、群遅延で、いずれも灰色の破線が 2 点 FIR の参照である。

A suggested order to try建議操作試す順序の提案

  1. Press "$\omega_c = 0.5\pi$ (FIR)". $\alpha=0$, the pole sits at the origin, the blue curve lies exactly on the grey FIR dashed curve, and the impulse response has only two samples. The two-point average is a special case of this IIR.按「$\omega_c = 0.5\pi$(FIR)」。$\alpha=0$,極點落在原點,藍色曲線和灰色 FIR 虛線完全重合,脈衝響應只剩 2 個樣本。這驗證了 2 點移動平均是這個 IIR 的特例。「$\omega_c = 0.5\pi$ (FIR)」を押す。$\alpha=0$ で極は原点にあり、青い曲線は灰色の FIR 破線と完全に重なり、インパルス応答は 2 標本だけになる。2 点平均はこの IIR の特別な場合である。

  2. Drag the specified $\omega_c$ and watch the design equation.拖動「指定 $\omega_c$」,觀察設計公式。指定する $\omega_c$ をドラッグし、設計式を観察する。

    • As $\omega_c$ falls, $\alpha$ rises and the pole slides toward $z=1$; the red −3 dB line always meets the blue curve exactly at the specified $\omega_c$.$\omega_c$ 減小時,$\alpha$ 增大,極點沿實軸往 $z=1$ 移動,紅色 −3 dB 線與藍色曲線的交點始終落在指定的 $\omega_c$ 上。$\omega_c$ を下げると $\alpha$ が増え、極は $z=1$ へ移動する。赤い −3 dB の線と青い曲線の交点は常に指定した $\omega_c$ に落ちる。
    • Above $0.5\pi$, $\alpha$ turns negative: the pole moves to the negative real axis and the passband is wider than the FIR version.$\omega_c$ 大於 $0.5\pi$ 時,$\alpha$ 變成負數,極點移到負實軸,通帶比 FIR 版本寬。$0.5\pi$ を超えると $\alpha$ は負になり、極は負の実軸へ移り、通過帯域は FIR 版より広くなる。
    • The faded × in the pole-zero plot is the other root $1/\alpha$, always outside the unit circle — which is why the formula takes the "−" sign.pole-zero 圖中淡色的 × 是另一個根 $1/\alpha$,永遠在單位圓外,這就是公式中必須取「−」號的原因。極零配置の淡い × はもう一つの根 $1/\alpha$ で、常に単位円の外にある。式で「−」の符号を取る理由はここにある。
  3. Press "$\omega_c = 0.05\pi$".按「$\omega_c = 0.05\pi$」。「$\omega_c = 0.05\pi$」を押す。

    • Pole-zero plot: the pole is very close to $z=1$. Drag the green point and the red pole vector lengthens quickly as soon as it leaves DC, so $|H|$ drops quickly.pole-zero 圖:極點非常靠近 $z=1$。拖動綠點會發現,只要稍微離開 DC,紅色極點向量就迅速變長,$|H|$ 迅速下降。極零配置:極は $z=1$ のすぐ近くにある。緑の点を動かすと、直流から少し離れただけで赤い極ベクトルが急に長くなり、$|H|$ が急速に下がる。
    • Log-log plot: above the cutoff the blue curve hugs the orange −20 dB/decade reference until, near $\pi$, the zero pulls it toward $-\infty$.log-log 圖:截止頻率以上,藍色曲線緊貼橘色的 −20 dB/decade 參考線,直到接近 $\pi$ 時才被零點拉向 $-\infty$。両対数グラフ:遮断周波数より上では、青い曲線はオレンジの −20 dB/decade 参照線にぴったり沿い、$\pi$ の近くで零点によって $-\infty$ へ引き下げられる。
    • Impulse response: a long exponential tail $\alpha^n$ — the "infinite" in infinite impulse response, made visible.脈衝響應:拖出很長的指數尾巴($\alpha^n$),這是「無限」脈衝響應的直觀表現。インパルス応答:長い指数の尾($\alpha^n$)を引く。無限インパルス応答の「無限」が目に見える形である。
  4. Look at the group delay. The FIR version (grey dashed) has a constant group delay of 0.5. The IIR version near DC has看群延遲。FIR 版本(灰色虛線)的群延遲固定為 0.5。IIR 版本在 DC 附近的群延遲是群遅延を見る。FIR 版(灰色の破線)の群遅延は 0.5 で一定である。IIR 版の直流付近の群遅延は

    $$\tau_g(0)=\frac12+\frac{\alpha}{1-\alpha}$$

    and it falls with frequency. At $\omega_c=0.05\pi$ ($\alpha\approx0.854$) the DC delay is about 6.4 samples while the high-frequency delay is near 0. This is the IIR price mentioned earlier: the phase is not linear. Different passband frequencies are delayed by different amounts, which is phase distortion, and it grows as the pole approaches the unit circle and the cutoff drops.並隨頻率下降。$\omega_c=0.05\pi$($\alpha\approx0.854$)時,DC 的群延遲約 6.4 個樣本,高頻卻接近 0。這正是前面說的 IIR 代價:相位不是線性的。通帶內不同頻率的延遲不同,會造成相位失真。極點越靠近單位圓,截止越低,這個現象越明顯。であり、周波数とともに下がる。$\omega_c=0.05\pi$($\alpha\approx0.854$)では直流の遅れが約 6.4 標本なのに、高域ではほぼ 0 である。これが先に述べた IIR の代償、位相が線形でないことである。通過帯域内で周波数ごとに遅れが異なり、位相ひずみを生む。極が単位円に近づき遮断周波数が下がるほど、この現象は目立つ。

FIR two-point averageFIR 2 點平均FIR 2 点平均First-order IIR lowpassIIR 一階低通1 次 IIR 低域通過
Transfer function轉移函數伝達関数$\tfrac12(1+z^{-1})$$\dfrac{1-\alpha}{2}\cdot\dfrac{1+z^{-1}}{1-\alpha z^{-1}}$
Cutoff截止頻率遮断周波数fixed at $\pi/2$固定為 $\pi/2$$\pi/2$ に固定anywhere: $\alpha=\dfrac{1-\sin\omega_c}{\cos\omega_c}$可任意指定:$\alpha=\dfrac{1-\sin\omega_c}{\cos\omega_c}$任意:$\alpha=\dfrac{1-\sin\omega_c}{\cos\omega_c}$
Operations per sample每個樣本的運算1 標本あたりの演算1 add, 1 multiply1 次加法、1 次乘法加算 1、乗算 1one more add and multiply (feedback)多 1 次乘法和 1 次加法(回授)加算と乗算が 1 回ずつ増える(帰還)
Stability穩定性安定性always stable一定穩定常に安定requires $|\alpha|<1$需要 $|\alpha|<1$$|\alpha|<1$ が必要
Phase相位位相linear, $\tau_g=\tfrac12$線性,$\tau_g=\tfrac12$線形、$\tau_g=\tfrac12$nonlinear, larger delay near DC非線性,DC 附近延遲較大非線形で、直流付近の遅れが大きい

11.3.2 First-Order IIR Highpass11.3.2 一階 IIR 高通11.3.2 1 次 IIR 高域通過

First-order IIR highpass一階 IIR 高通1 次 IIR 高域通過 $$H_{HP}(z)=\frac{1+\alpha}{2}\cdot\frac{1-z^{-1}}{1-\alpha z^{-1}}$$

Same pole, but the zero moves to $z=+1$: now DC is blocked and $\omega=\pi$ has unit gain. The same $\alpha \leftrightarrow \omega_c$ relation holds, so one design formula serves both filters.極點相同,但零點移到 $z=+1$:現在直流被擋掉,而 $\omega=\pi$ 的增益為 1。同樣的 $\alpha \leftrightarrow \omega_c$ 關係依然成立,所以一條設計公式就能同時服務兩個濾波器。極は同じで、零点が $z=+1$ に移る。こうすると直流が遮断され、$\omega=\pi$ の利得が 1 になる。$\alpha \leftrightarrow \omega_c$ の関係はそのまま成り立つので、一つの設計式で両方のフィルタをまかなえる。

Key — A doubly complementary pair重點 — 雙重互補的一對濾波器要点 — 二重に相補な組
With the same $\alpha$, the lowpass/highpass pair satisfies both在相同的 $\alpha$ 之下,低通與高通這一對同時滿足同じ $\alpha$ のもとで、低域通過と高域通過の組は次の両方を満たす。 $$H_{LP}(z)+H_{HP}(z)=1 \qquad\text{and}\qquad \bigl|H_{LP}(e^{j\omega})\bigr|^2+\bigl|H_{HP}(e^{j\omega})\bigr|^2=1 .$$ They are delay-complementary and power-complementary(雙重互補): implement one filter, subtract its output from the input, and you get the other for free.它們既是延遲互補也是功率互補:只要實作其中一個濾波器,再把它的輸出從輸入中減掉,另一個就免費得到了。両者は遅延相補かつ電力相補である。片方のフィルタだけを実装し、その出力を入力から引けば、もう片方がただで手に入る。
2026-06-12T22:38:05.719225 image/svg+xml Matplotlib v3.10.8, https://matplotlib.org/ 0 π/2 π ω 0.0 0.2 0.4 0.6 0.8 1.0 magnitude First-order IIR lowpass α = 0.5 α = 0.8 0 π/2 π ω First-order IIR highpass α = 0.5 α = 0.8
Fig. 11-6 — First-order IIR lowpass and highpass magnitudes for $\alpha=0.5$ and $\alpha=0.8$. Pushing the pole toward the unit circle ($\alpha\to1$) narrows the passband of the LP and widens the stop region of the HP(α 越接近 1,極點越靠近單位圓,截止頻率越低). Dashed line: $1/\sqrt2$.圖 11-6 — 一階 IIR 低通與高通在 $\alpha=0.5$ 與 $\alpha=0.8$ 時的振幅。把極點推向單位圓($\alpha\to1$)會讓低通的通帶變窄、高通的阻止區變寬。虛線:$1/\sqrt2$。図 11-6 — 1 次 IIR 低域通過・高域通過の振幅($\alpha=0.5$ と $\alpha=0.8$)。極を単位円に近づける($\alpha\to1$)と、低域通過の通過帯域は狭くなり、高域通過の阻止領域は広がる。破線は $1/\sqrt2$。

11.3.3 Second-Order IIR Bandpass11.3.3 二階 IIR 帶通11.3.3 2 次 IIR 帯域通過

A bandpass filter(帶通濾波器)needs zeros at both $\omega=0$ and $\omega=\pi$ and a resonant pole pair near the center frequency $\omega_0$:帶通濾波器需要在 $\omega=0$ 與 $\omega=\pi$ 兩處都有零點,並在中心頻率 $\omega_0$ 附近放一對共振的極點:帯域通過フィルタには、$\omega=0$ と $\omega=\pi$ の両方に零点が必要で、さらに中心周波数 $\omega_0$ の近くに共振する極の対が要る。

Second-order IIR bandpass二階 IIR 帶通2 次 IIR 帯域通過 $$H_{BP}(z)=\frac{1-\alpha}{2}\cdot \frac{1-z^{-2}}{1-\beta(1+\alpha)z^{-1}+\alpha z^{-2}}$$
Design knobs設計參數設計パラメータ $$\text{center: } \omega_0=\cos^{-1}\beta \qquad\quad \text{3-dB bandwidth } B_w:\ \ \cos B_w=\frac{2\alpha}{1+\alpha^2}$$

The two parameters decouple beautifully: $\beta$ sets where the peak is ($|H_{BP}(e^{j\omega_0})|=1$ exactly), while $\alpha$ sets how narrow it is. Stability requires $|\alpha|<1$ and $|\beta|<1$.這兩個參數漂亮地解耦了:$\beta$ 決定峰值在哪裡(而且 $|H_{BP}(e^{j\omega_0})|=1$ 恰好成立),$\alpha$ 則決定峰值有多窄。穩定性要求 $|\alpha|<1$ 與 $|\beta|<1$。二つの母数は見事に分離している。$\beta$ がピークの位置を決め(このとき $|H_{BP}(e^{j\omega_0})|=1$ がちょうど成り立つ)、$\alpha$ が鋭さを決める。安定であるためには $|\alpha|<1$ と $|\beta|<1$ が必要である。

11.3.4 Second-Order IIR Bandstop (Notch)11.3.4 二階 IIR 帶阻(陷波)11.3.4 2 次 IIR 帯域阻止(ノッチ)

Second-order IIR bandstop二階 IIR 帶阻2 次 IIR 帯域阻止 $$H_{BS}(z)=\frac{1+\alpha}{2}\cdot \frac{1-2\beta z^{-1}+z^{-2}}{1-\beta(1+\alpha)z^{-1}+\alpha z^{-2}}$$

Now the zeros sit on the unit circle at $e^{\pm j\omega_0}$ with $\omega_0=\cos^{-1}\beta$, so the gain is exactly zero at the notch frequency(陷波頻率)— the classic tool for removing power-line hum(去除電源雜訊). The same $\alpha$ formula gives the 3-dB notch width, and with matching parameters $H_{BP}(z)+H_{BS}(z)=1$: another doubly complementary pair.現在零點就落在單位圓上的 $e^{\pm j\omega_0}$,其中 $\omega_0=\cos^{-1}\beta$,因此陷波頻率上的增益恰好是零——這正是去除電源哼聲的經典工具。同一條 $\alpha$ 公式給出 3-dB 陷波寬度;參數彼此配合時還有 $H_{BP}(z)+H_{BS}(z)=1$:又是一對雙重互補的濾波器。今度は零点が単位円上の $e^{\pm j\omega_0}$ にあり、$\omega_0=\cos^{-1}\beta$ である。したがってノッチ周波数では利得がちょうど零になる。電源ハムを除去する古典的な道具である。3-dB のノッチ幅は同じ $\alpha$ の式で与えられ、母数をそろえれば $H_{BP}(z)+H_{BS}(z)=1$ も成り立つ。これもまた二重に相補な組である。

2026-06-12T22:38:05.966320 image/svg+xml Matplotlib v3.10.8, https://matplotlib.org/ 0 ω₀ π ω 0.0 0.2 0.4 0.6 0.8 1.0 magnitude Second-order IIR bandpass α = 0.5 α = 0.8 0 ω₀ π ω Second-order IIR bandstop (notch) α = 0.5 α = 0.8
Fig. 11-7 — Second-order IIR bandpass and bandstop (notch) magnitudes, center $\omega_0=0.4\pi$ ($\beta=\cos\omega_0$), for $\alpha=0.5,\,0.8$. Larger $\alpha$ pulls the pole pair toward the unit circle, sharpening the peak/notch(α 越大,峰值/陷波越尖銳).圖 11-7 — 二階 IIR 帶通與帶阻(陷波)的振幅,中心在 $\omega_0=0.4\pi$($\beta=\cos\omega_0$),取 $\alpha=0.5,\,0.8$。$\alpha$ 越大,極點對越靠近單位圓,峰值與陷波就越尖銳。図 11-7 — 2 次 IIR 帯域通過と帯域阻止(ノッチ)の振幅。中心は $\omega_0=0.4\pi$($\beta=\cos\omega_0$)、$\alpha=0.5,\,0.8$ の場合である。$\alpha$ が大きいほど極の対は単位円に近づき、ピークとノッチは鋭くなる。
Worked Example 11-C — A 60 Hz notch at $f_s=400$ Hz範例 11-C — 在 $f_s=400$ Hz 下做 60 Hz 陷波例題 11-C — $f_s=400$ Hz での 60 Hz ノッチ
Step 1: notch frequency $\omega_0=2\pi\,(60/400)=0.3\pi \Rightarrow \beta=\cos(0.3\pi)=0.5878$.步驟 1:陷波頻率 $\omega_0=2\pi\,(60/400)=0.3\pi \Rightarrow \beta=\cos(0.3\pi)=0.5878$。手順 1:ノッチ周波数は $\omega_0=2\pi\,(60/400)=0.3\pi \Rightarrow \beta=\cos(0.3\pi)=0.5878$ となる。
Step 2: choose a 3-dB width $B_w=0.05\pi$: $\cos B_w = 0.98769 = \dfrac{2\alpha}{1+\alpha^2} \Rightarrow \alpha^2-2.02492\,\alpha+1=0 \Rightarrow \alpha=0.85408$ (the root inside the unit circle).步驟 2:取 3-dB 寬度 $B_w=0.05\pi$:$\cos B_w = 0.98769 = \dfrac{2\alpha}{1+\alpha^2} \Rightarrow \alpha^2-2.02492\,\alpha+1=0 \Rightarrow \alpha=0.85408$(取落在單位圓內的那個根)。手順 2:3-dB 幅を $B_w=0.05\pi$ とすると、$\cos B_w = 0.98769 = \dfrac{2\alpha}{1+\alpha^2} \Rightarrow \alpha^2-2.02492\,\alpha+1=0 \Rightarrow \alpha=0.85408$(単位円の内側にある根)。
Step 3: $H_{BS}(z)=0.92704\,\dfrac{1-1.17557\,z^{-1}+z^{-2}}{1-1.08980\,z^{-1}+0.85408\,z^{-2}}$. Gain is exactly 0 at 60 Hz and ≈1 elsewhere.步驟 3:$H_{BS}(z)=0.92704\,\dfrac{1-1.17557\,z^{-1}+z^{-2}}{1-1.08980\,z^{-1}+0.85408\,z^{-2}}$。在 60 Hz 的增益恰好是 0,其餘頻率則約為 1。手順 3:$H_{BS}(z)=0.92704\,\dfrac{1-1.17557\,z^{-1}+z^{-2}}{1-1.08980\,z^{-1}+0.85408\,z^{-2}}$。60 Hz での利得はちょうど 0、それ以外ではおよそ 1 である。
Warning — Stability is on you注意 — 穩定性要自己負責注意 — 安定性は設計者の責任
For FIR filters stability is automatic. For these IIR prototypes you must keep $|\alpha|<1$ (and $|\beta|<1$ for the second-order filters). A pole on or outside the unit circle makes the filter useless: the exam trap is to solve the quadratic for $\alpha$ in the bandwidth formula and pick the root larger than 1 — always take the root with $|\alpha|<1$.FIR 濾波器的穩定性是自動成立的。但這些 IIR 原型必須讓 $|\alpha|<1$(二階濾波器還要 $|\beta|<1$)。極點落在單位圓上或圓外就會讓濾波器失效:考試的陷阱就是在頻寬公式裡解 $\alpha$ 的二次方程式時挑了大於 1 的根——永遠要取滿足 $|\alpha|<1$ 的那個根。FIR フィルタでは安定性は自動的に保証される。しかしこれらの IIR プロトタイプでは $|\alpha|<1$(2 次フィルタではさらに $|\beta|<1$)を保たねばならない。極が単位円上またはその外にあると、フィルタは使いものにならない。試験でよくある落とし穴は、帯域幅の式から $\alpha$ の二次方程式を解いたときに 1 より大きい根を選んでしまうことである。必ず $|\alpha|<1$ を満たす根を取ること。

11.4 Cascading Filters11.4 濾波器的串接11.4 フィルタの縦続接続

A single first-order section rolls off slowly. The cheapest way to sharpen it is to cascade(串接)identical copies: overall $H(z)=G_1(z)G_2(z)\cdots G_K(z)$, magnitudes multiply, dB curves add.單一個一階區段的滾降很慢。要讓它變陡,最便宜的辦法就是把相同的複本串接起來:整體 $H(z)=G_1(z)G_2(z)\cdots G_K(z)$,振幅相乘,dB 曲線相加。1 次のセクション一つでは減衰の傾きが緩い。これを急峻にする最も安価な方法は、同じものを縦続接続することである。全体では $H(z)=G_1(z)G_2(z)\cdots G_K(z)$ となり、振幅は掛け算、dB の曲線は足し算になる。

x[n] G₁(z) G₂(z) G₃(z) y[n] H(z) = G₁(z)·G₂(z)·G₃(z)
Cascade connection: transfer functions multiply, dB gains add(串接:轉移函數相乘,dB 增益相加).串接:轉移函數相乘,dB 增益相加。縦続接続では伝達関数が掛け算になり、dB 利得は足し算になる。

Cascading $K$ copies of the two-point average gives $H(z)=\bigl[\tfrac12(1+z^{-1})\bigr]^K$ with magnitude $\cos^K(\omega/2)$. The stopband improves dramatically — at $\omega=3\pi/4$ one section gives −8.3 dB but four sections give −33 dB — yet there is a price: the passband shrinks too.把兩點平均串接 $K$ 份,就得到 $H(z)=\bigl[\tfrac12(1+z^{-1})\bigr]^K$,振幅為 $\cos^K(\omega/2)$。阻帶改善得非常顯著——在 $\omega=3\pi/4$ 處,一段只有 −8.3 dB,四段卻有 −33 dB——但也有代價:通帶跟著縮小了。2 点平均を $K$ 個縦続すると $H(z)=\bigl[\tfrac12(1+z^{-1})\bigr]^K$ となり、振幅は $\cos^K(\omega/2)$ である。阻止帯域は劇的に改善し、$\omega=3\pi/4$ では 1 段で −8.3 dB、4 段では −33 dB になる。ただし代償があり、通過帯域も一緒に狭くなる。

3-dB cutoff of a K-section cascadeK 段串接的 3-dB 截止頻率K 段縦続接続の 3-dB 遮断周波数 $$\cos^K\!\bigl(\tfrac{\omega_c}{2}\bigr)=\tfrac{1}{\sqrt2} \qquad\Rightarrow\qquad \omega_c = 2\cos^{-1}\!\bigl(2^{-1/(2K)}\bigr) \quad\text{e.g. } K{=}1:\ 0.5\pi,\ \ K{=}2:\ 0.364\pi,\ \ K{=}4:\ 0.259\pi$$
2026-06-12T22:38:06.155450 image/svg+xml Matplotlib v3.10.8, https://matplotlib.org/ 0 π/4 π/2 3π/4 π ω −60 −50 −40 −30 −20 −10 0 gain (dB) −3 dB Cascade of K identical FIR lowpass sections [cos(ω/2)]^K K = 1 section(s) K = 2 section(s) K = 4 section(s)
Fig. 11-8 — Cascading $K$ identical FIR lowpass sections: gain $\cos^K(\omega/2)$ in dB. Stopband attenuation improves with each section, but the −3 dB point slides toward DC(串接可加深阻帶衰減,但通帶也跟著變窄).圖 11-8 — 串接 $K$ 個相同的 FIR 低通區段:以 dB 表示的增益 $\cos^K(\omega/2)$。每多一段,阻帶衰減就更深,但 −3 dB 的位置也跟著往直流滑動。図 11-8 — 同一の FIR 低域通過セクションを $K$ 個縦続した場合の、dB で表した利得 $\cos^K(\omega/2)$。段を重ねるほど阻止帯域の減衰は大きくなるが、−3 dB 点は直流側へずれていく。
Concept — The big picture (interlude)觀念 — 全景(插曲)概念 — 全体像(幕間)
Simple filters teach the moves — zeros kill, poles boost, cascades sharpen — but they cannot independently control cutoff frequency, transition width, passband flatness, and stopband depth. That is exactly what real filter design delivers, and it needs two things developed next: a precise specification language (Section 11.5) and structural results about linear phase (Section 11.6). Later chapters then fill in the design algorithms.簡單濾波器教會我們幾招——零點消滅、極點抬高、串接變陡——但它們沒辦法各自獨立地控制截止頻率、過渡帶寬度、通帶平坦度與阻帶深度。那正是真正的濾波器設計要提供的東西,而它需要接下來發展的兩樣準備:一套精確的規格語言(11.5 節),以及關於線性相位的結構性結果(11.6 節)。設計演算法本身則留到後面的章節。単純なフィルタは、零点が消し、極が持ち上げ、縦続が急峻にするという手筋を教えてくれる。しかし遮断周波数・遷移帯域幅・通過帯域の平坦さ・阻止帯域の深さを互いに独立に制御することはできない。それこそが本当のフィルタ設計の仕事であり、そのためには次の二つが要る。正確な仕様の言語(11.5 節)と、線形位相に関する構造的な結果(11.6 節)である。設計アルゴリズムそのものは後の章で埋めていく。

11.5 Ideal Filters and Practical Specifications11.5 理想濾波器與實務規格11.5 理想フィルタと実用的な仕様

11.5.1 The Four Ideal Filter Types11.5.1 四種理想濾波器11.5.1 4 種類の理想フィルタ

An ideal filter(理想濾波器)has unit gain in the passband, zero gain in the stopband, and an instantaneous transition between them — a "brick wall"(磚牆式)response. The four classical types, on $0\le\omega\le\pi$ (responses are even in $\omega$ and $2\pi$-periodic):理想濾波器在通帶的增益為 1、在阻帶的增益為 0,而且兩者之間是瞬間過渡——也就是「磚牆」式的響應。以下是定義在 $0\le\omega\le\pi$ 上的四種經典型式(響應對 $\omega$ 是偶函數,並以 $2\pi$ 為週期):理想フィルタは通過帯域で利得 1、阻止帯域で利得 0 をもち、その間の遷移は瞬時である——いわゆる「ブリックウォール」応答である。$0\le\omega\le\pi$ 上での古典的な四つの型式は次のとおりである(応答は $\omega$ について偶関数で、周期は $2\pi$)。

2026-06-12T22:38:26.992210 image/svg+xml Matplotlib v3.10.8, https://matplotlib.org/ 0.00 0.25 0.50 0.75 1.00 1.25 |H(e^jω)| Ideal Lowpass Ideal Highpass 0 ω₁ ωc ω₂ π ω (rad/sample) 0.00 0.25 0.50 0.75 1.00 1.25 |H(e^jω)| Ideal Bandpass 0 ω₁ ωc ω₂ π ω (rad/sample) Ideal Bandstop
Fig. 11-1 — Magnitude responses of the four ideal filter types: brick-wall transitions, unit passband, zero stopband(四種理想濾波器:通帶增益 1、阻帶增益 0、瞬間過渡).圖 11-1 — 四種理想濾波器的振幅響應:磚牆式過渡、通帶增益 1、阻帶增益 0。図 11-1 — 4 種類の理想フィルタの振幅応答。ブリックウォールの遷移、通過帯域は利得 1、阻止帯域は 0 である。

11.5.2 The Ideal Lowpass Impulse Response — and Why It Is Unrealizable11.5.2 理想低通的脈衝響應——以及它為何不可實現11.5.2 理想低域通過のインパルス応答——そしてなぜ実現できないのか

Take the inverse DTFT of the ideal lowpass response $H_{LP}(e^{j\omega})=1$ for $|\omega|\le\omega_c$, $0$ otherwise:對理想低通響應取反 DTFT:$|\omega|\le\omega_c$ 時 $H_{LP}(e^{j\omega})=1$,其餘為 $0$:理想低域通過応答、すなわち $|\omega|\le\omega_c$ で $H_{LP}(e^{j\omega})=1$、それ以外では $0$ となる応答の逆 DTFT をとる。

Ideal lowpass impulse response理想低通的脈衝響應理想低域通過のインパルス応答 $$h_{LP}[n]=\frac{1}{2\pi}\int_{-\omega_c}^{\omega_c}e^{j\omega n}\,d\omega =\frac{\sin(\omega_c n)}{\pi n},\quad -\infty<n<\infty, \qquad h_{LP}[0]=\frac{\omega_c}{\pi}$$
2026-06-12T22:38:02.366558 image/svg+xml Matplotlib v3.10.8, https://matplotlib.org/ −20 −15 −10 −5 0 5 10 15 20 n −0.05 0.00 0.05 0.10 0.15 0.20 0.25 h_LP[n] Ideal lowpass impulse response, ωc = π/4 (noncausal, infinite length)
Fig. 11-2 — Impulse response of the ideal lowpass filter with $\omega_c=\pi/4$: a sinc sequence extending over all $n$, including $n<0$(理想低通的脈衝響應是雙邊無限長的 sinc 序列).圖 11-2 — $\omega_c=\pi/4$ 的理想低通濾波器的脈衝響應:一條延伸到所有 $n$ 的 sinc 序列,包含 $n<0$ 的部分。図 11-2 — $\omega_c=\pi/4$ の理想低域通過フィルタのインパルス応答。すべての $n$ に広がる sinc 列であり、$n<0$ の部分も含む。
Warning — Three strikes against the ideal filter注意 — 理想濾波器的三項致命傷注意 — 理想フィルタに対する三つの致命傷
  1. Noncausal(非因果): $h_{LP}[n]\ne0$ for $n<0$ — the filter must respond before the input arrives.非因果:$n<0$ 時 $h_{LP}[n]\ne0$——濾波器必須在輸入抵達之前就反應。非因果的:$n<0$ でも $h_{LP}[n]\ne0$ である——入力が到着する前にフィルタが応答しなければならない。
  2. Infinitely long: the sinc never terminates, so no finite delay can fix the noncausality and no FIR can implement it exactly.長度無限:sinc 永遠不會結束,所以任何有限的延遲都補救不了非因果性,也沒有任何 FIR 能精確實作它。長さが無限:sinc は決して終わらないので、有限の遅延では非因果性を直せず、どんな FIR でも厳密には実装できない。
  3. Not absolutely summable: $h_{LP}[n]$ decays only like $1/n$, so $\sum|h_{LP}[n]|=\infty$ — the ideal filter is not even BIBO stable. Truncating the sinc causes the Gibbs ripples(吉布斯現象)you will meet in FIR window design.不是絕對可和:$h_{LP}[n]$ 只以 $1/n$ 的速度衰減,所以 $\sum|h_{LP}[n]|=\infty$——理想濾波器連 BIBO 穩定都談不上。把 sinc 截斷會造成吉布斯漣波,你在 FIR 視窗設計裡會再碰到它。絶対総和可能でない:$h_{LP}[n]$ は $1/n$ 程度でしか減衰しないので $\sum|h_{LP}[n]|=\infty$ となり、理想フィルタは BIBO 安定ですらない。sinc を打ち切るとギブスのリップルが生じる。FIR の窓関数設計で再会することになる。
直觀解釋(點擊展開)
頻域裡越「尖銳」的東西,時域裡就越「拖長」——這是傅立葉變換的基本取捨。磚牆式的不連續跳變是頻域裡最尖銳的特徵,所以它的時域對應(sinc)必須無限長、而且衰減極慢(只有 1/n)。因果、有限長的濾波器永遠只能「逼近」理想響應:你可以把過渡帶做窄、漣波做小,但不可能同時做到零過渡帶與零漣波。這就是為什麼下一小節要定義「容忍規格」——承認不完美,但把不完美量化。

11.5.3 Practical Filter Specifications: the Tolerance Scheme11.5.3 實務上的濾波器規格:容忍度規格圖11.5.3 実用的なフィルタ仕様——許容仕様図

Since brick walls are impossible, a practical lowpass spec relaxes the ideal in three ways: allow a small passband ripple(通帶漣波)$\delta_p$, allow a small nonzero stopband level(阻帶漣波)$\delta_s$, and insert a transition band(過渡帶)between the passband edge $\omega_p$ and stopband edge $\omega_s$ where the response is unconstrained:既然磚牆做不到,實務上的低通規格就從三個方向放寬理想:容許一點點通帶漣波 $\delta_p$,容許阻帶有一點不為零的阻帶位準 $\delta_s$,並在通帶邊界 $\omega_p$ 與阻帶邊界 $\omega_s$ 之間插入一段響應不受限制的過渡帶:ブリックウォールが不可能である以上、実用的な低域通過の仕様は理想を三つの方向に緩める。わずかな通過帯域リップル $\delta_p$ を許し、零でない小さな阻止帯域の水準 $\delta_s$ を許し、そして通過帯域端 $\omega_p$ と阻止帯域端 $\omega_s$ のあいだに、応答が拘束されない遷移帯域を挟むのである。

Lowpass tolerance scheme低通的容忍度規格圖低域通過の許容仕様図 $$\begin{aligned} 1-\delta_p \;\le\; \bigl|H(e^{j\omega})\bigr| \;\le\; 1+\delta_p, &\qquad |\omega|\le\omega_p \quad\text{(passband)}\\[2pt] \bigl|H(e^{j\omega})\bigr| \;\le\; \delta_s, &\qquad \omega_s\le|\omega|\le\pi \quad\text{(stopband)} \end{aligned}$$
2026-06-12T22:38:04.851067 image/svg+xml Matplotlib v3.10.8, https://matplotlib.org/ 0 ωp ωs π ω 0.0 0.2 0.4 0.6 0.8 1.0 1.2 |H(e^jω)| 1+δp 1−δp δs passband transition stopband Lowpass tolerance scheme: shaded regions are forbidden
Fig. 11-3 — The lowpass tolerance scheme(容忍規格圖): the response must stay out of the shaded forbidden regions. Green curve: a third-order elliptic filter meeting $\omega_p=0.4\pi$, $\omega_s=0.55\pi$, $\delta_p=0.08$, $\delta_s=0.05$. The transition band $\omega_p\le\omega\le\omega_s$ is a free zone(過渡帶內不受限制).圖 11-3 — 低通的容忍度規格圖:響應必須避開陰影的禁區。綠色曲線是一個滿足 $\omega_p=0.4\pi$、$\omega_s=0.55\pi$、$\delta_p=0.08$、$\delta_s=0.05$ 的三階橢圓濾波器。過渡帶 $\omega_p\le\omega\le\omega_s$ 是不受限制的自由區。図 11-3 — 低域通過の許容仕様図。応答は網掛けの禁止領域に入ってはならない。緑の曲線は $\omega_p=0.4\pi$、$\omega_s=0.55\pi$、$\delta_p=0.08$、$\delta_s=0.05$ を満たす 3 次の楕円フィルタである。遷移帯域 $\omega_p\le\omega\le\omega_s$ は拘束のない自由領域である。

Specifications are usually quoted in dB:規格通常以 dB 表示:仕様はふつう dB で示される。

dB specificationsdB 規格dB による仕様 $$R_p = -20\log_{10}\bigl(1-\delta_p\bigr)\ \text{dB (peak passband ripple)} \qquad A_s = -20\log_{10}\delta_s\ \text{dB (minimum stopband attenuation)}$$

For example $\delta_s=0.01$ means $A_s=40$ dB; $\delta_p=0.05$ means $R_p\approx0.45$ dB. (An alternative convention quotes the total passband swing $20\log_{10}\frac{1+\delta_p}{1-\delta_p}$ — read the problem statement carefully.) A complete lowpass specification is then the quadruple $(\omega_p,\ \omega_s,\ \delta_p,\ \delta_s)$, or equivalently $(\omega_p,\ \omega_s,\ R_p,\ A_s)$. The filter design problem of the coming chapters is: find the lowest-order filter whose response stays inside the template.舉例來說,$\delta_s=0.01$ 代表 $A_s=40$ dB;$\delta_p=0.05$ 代表 $R_p\approx0.45$ dB。(另一種慣例是用通帶的總擺幅 $20\log_{10}\frac{1+\delta_p}{1-\delta_p}$ 來表示——題目要看清楚。)於是一份完整的低通規格就是四元組 $(\omega_p,\ \omega_s,\ \delta_p,\ \delta_s)$,或等價地寫成 $(\omega_p,\ \omega_s,\ R_p,\ A_s)$。接下來幾章的濾波器設計問題就是:找出響應仍落在樣板之內、階數最低的那個濾波器。たとえば $\delta_s=0.01$ は $A_s=40$ dB を、$\delta_p=0.05$ は $R_p\approx0.45$ dB を意味する。(別の慣例では通過帯域の全振れ幅 $20\log_{10}\frac{1+\delta_p}{1-\delta_p}$ を示すので、問題文をよく読むこと。)完全な低域通過の仕様は四つ組 $(\omega_p,\ \omega_s,\ \delta_p,\ \delta_s)$、あるいは同じことだが $(\omega_p,\ \omega_s,\ R_p,\ A_s)$ である。以降の章のフィルタ設計問題とは、応答がテンプレートの内側に収まる最低次数のフィルタを見つけることにほかならない。

Key — The four numbers every spec needs重點 — 每份規格都需要的四個數字要点 — どの仕様にも要る四つの数
$\omega_p$ (passband edge), $\omega_s$ (stopband edge), $\delta_p$ (passband tolerance), $\delta_s$ (stopband tolerance). Tighter tolerances or a narrower transition band $\Delta\omega=\omega_s-\omega_p$ always cost a higher filter order — nothing is free.$\omega_p$(通帶邊界)、$\omega_s$(阻帶邊界)、$\delta_p$(通帶容忍度)、$\delta_s$(阻帶容忍度)。容忍度收得越緊,或過渡帶 $\Delta\omega=\omega_s-\omega_p$ 越窄,就一定要付出更高的濾波器階數——天下沒有白吃的午餐。$\omega_p$(通過帯域端)、$\omega_s$(阻止帯域端)、$\delta_p$(通過帯域の許容値)、$\delta_s$(阻止帯域の許容値)。許容値を厳しくしたり、遷移帯域 $\Delta\omega=\omega_s-\omega_p$ を狭くしたりすれば、必ずフィルタ次数が上がる。ただで手に入るものはない。

11.6 Linear-Phase FIR Filters11.6 線性相位 FIR 濾波器11.6 線形位相 FIR フィルタ

11.6.1 Why Linear Phase? And Time-Reversal Filtering11.6.1 為什麼要線性相位?以及時間反轉濾波11.6.1 なぜ線形位相か。そして時間反転フィルタリング

Magnitude is only half the story. If the phase response $\angle H(e^{j\omega})$ is not linear in $\omega$, different frequency components experience different delays — the group delay(群延遲)$\tau(\omega)=-\,d\angle H/d\omega$ varies — and the waveform is smeared even when all magnitudes are untouched. This phase distortion(相位失真)is fatal in applications that care about waveform shape (ECG, seismic data, images, data pulses).振幅只說了一半的故事。如果相位響應 $\angle H(e^{j\omega})$ 對 $\omega$ 不是線性的,不同頻率成分就會有不同的延遲——群延遲 $\tau(\omega)=-\,d\angle H/d\omega$ 會隨頻率改變——即使所有振幅都原封不動,波形仍然被抹散。這種相位失真在重視波形形狀的應用(心電圖、地震資料、影像、資料脈衝)裡是致命的。振幅は話の半分にすぎない。位相応答 $\angle H(e^{j\omega})$ が $\omega$ について線形でないと、周波数成分ごとに遅延が変わり——群遅延 $\tau(\omega)=-\,d\angle H/d\omega$ が一定でなくなり——振幅をいっさい変えなくても波形は崩れる。この位相歪みは、波形の形そのものが問題になる用途(心電図、地震データ、画像、データパルス)では致命的である。

Linear phase = pure delay線性相位 = 純延遲線形位相 = 純粋な遅延 $$H(e^{j\omega})=A(\omega)\,e^{-j\omega D}\ \ (A(\omega)\text{ real}) \qquad\Rightarrow\qquad \tau(\omega)=D\ \text{samples for all }\omega$$

Every frequency is delayed by the same $D$ samples: the output is a filtered, shifted, but unsmeared copy of the input.每個頻率都被延遲同樣的 $D$ 個樣本:輸出是輸入經過濾波、平移、但沒有被抹散的複本。どの周波数も同じ $D$ 標本だけ遅れる。出力は、フィルタを通って平行移動したが崩れてはいない入力の複製である。

Time-reversal (zero-phase) filtering時間反轉(零相位)濾波時間反転(ゼロ位相)フィルタリング

For offline data there is an elegant trick. Filter the signal, time-reverse the result, filter again, and reverse once more. Each pass contributes $H(e^{j\omega})$ once with a conjugation, so the overall response is對離線資料有一個漂亮的小技巧:先濾波,把結果在時間上反轉,再濾一次,然後再反轉回來。每一趟都貢獻一次 $H(e^{j\omega})$ 並附帶一次共軛,所以整體響應是オフラインのデータには洗練された技がある。信号をフィルタにかけ、結果を時間反転し、もう一度フィルタにかけ、さらに反転して戻す。各パスが $H(e^{j\omega})$ を一度ずつ共役つきで寄与するので、全体の応答は次のようになる。

Forward–backward filtering前向—後向濾波前向き・後ろ向きフィルタリング $$H_{\text{overall}}(e^{j\omega}) = H(e^{j\omega})\,H^{*}(e^{j\omega}) = \bigl|H(e^{j\omega})\bigr|^{2}$$

— real and nonnegative: exactly zero phase, with the magnitude squared (doubling attenuation in dB). This is MATLAB's filtfilt. The catch: the procedure is noncausal, so it only works on recorded (finite, stored) signals, not in real time(僅適用於離線資料,無法即時處理).——實數且非負:完全零相位,而且振幅被平方(以 dB 計算時衰減加倍)。這就是 MATLAB 的 filtfilt。但有個陷阱:這個程序是非因果的,所以只能用在錄好的(有限、已儲存的)訊號上,無法即時處理。——これは実数かつ非負であり、厳密にゼロ位相で、振幅は二乗される(dB での減衰は倍になる)。MATLAB の filtfilt がこれである。ただし落とし穴があり、この手順は非因果的なので、記録済みの(有限で保存された)信号にしか使えず、実時間処理はできない。

11.6.2 The Four Linear-Phase FIR Types11.6.2 四種線性相位 FIR 型式11.6.2 4 種類の線形位相 FIR 型式

A causal length-$N$ FIR filter $h[n]$, $n=0,\dots,N-1$, has (generalized) linear phase if and only if its impulse response is symmetric or antisymmetric about its midpoint:一個長度為 $N$ 的因果 FIR 濾波器 $h[n]$($n=0,\dots,N-1$),具有(廣義)線性相位的充分必要條件,是它的脈衝響應對中點對稱或反對稱:長さ $N$ の因果的 FIR フィルタ $h[n]$($n=0,\dots,N-1$)が(一般化)線形位相をもつのは、そのインパルス応答が中点に関して対称または反対称であるとき、かつそのときに限る。

Linear-phase condition線性相位的條件線形位相の条件 $$h[n]=\pm\,h[N-1-n] \qquad\Rightarrow\qquad H(e^{j\omega})= \begin{cases} e^{-j\omega(N-1)/2}\,A(\omega), & \text{symmetric }(+)\\[2pt] j\,e^{-j\omega(N-1)/2}\,A(\omega), & \text{antisymmetric }(-) \end{cases}$$

with $A(\omega)$ real (the amplitude response) and constant group delay $\tau=(N-1)/2$ samples. Two symmetry choices times two length parities give exactly four types:其中 $A(\omega)$ 是實數(稱為振幅響應),群延遲固定為 $\tau=(N-1)/2$ 個樣本。兩種對稱性乘上兩種長度奇偶,恰好給出四種型式:ここで $A(\omega)$ は実数(振幅応答と呼ぶ)であり、群遅延は $\tau=(N-1)/2$ 標本で一定である。対称性の 2 通りと長さの偶奇 2 通りを掛けると、ちょうど四つの型式が得られる。

Type型式型式Symmetry對稱性対称性Length $N$長度 $N$長さ $N$Group delay $\frac{N-1}{2}$群延遲 $\frac{N-1}{2}$群遅延 $\frac{N-1}{2}$Forced zeros強制零點強制される零点Can realize可以實現実現できる応答
1symmetric $h[n]=h[N{-}1{-}n]$對稱 $h[n]=h[N{-}1{-}n]$対称 $h[n]=h[N{-}1{-}n]$odd奇數奇数integer整數整数none無なしLP, HP, BP, BS — anythingLP、HP、BP、BS——什麼都行LP・HP・BP・BS——何でも可
2symmetric對稱対称even偶數偶数half-integer半整數半整数$z=-1$ ($\omega=\pi$)LP, BP (not HP, not BS)LP、BP(不能做 HP、BS)LP・BP(HP と BS は不可)
3antisymmetric $h[n]=-h[N{-}1{-}n]$反對稱 $h[n]=-h[N{-}1{-}n]$反対称 $h[n]=-h[N{-}1{-}n]$odd奇數奇数integer整數整数$z=+1$ and $z=-1$$z=+1$ 與 $z=-1$$z=+1$ と $z=-1$BP, differentiator, HilbertBP、微分器、希爾伯特轉換器BP・微分器・ヒルベルト変換器
4antisymmetric反對稱反対称even偶數偶数half-integer半整數半整数$z=+1$ ($\omega=0$)HP, BP, differentiator, HilbertHP、BP、微分器、希爾伯特轉換器HP・BP・微分器・ヒルベルト変換器
2026-06-12T22:38:06.620815 image/svg+xml Matplotlib v3.10.8, https://matplotlib.org/ 0 1 2 3 4 5 6 n −4 −2 0 2 4 Type 1: symmetric, N odd (N=7) 0 1 2 3 4 5 n −4 −2 0 2 4 Type 2: symmetric, N even (N=6) 0 1 2 3 4 5 6 n −4 −2 0 2 4 Type 3: antisymmetric, N odd (N=7) 0 1 2 3 4 5 n −4 −2 0 2 4 Type 4: antisymmetric, N even (N=6)
Fig. 11-9 — Example impulse responses of the four linear-phase FIR types. Dashed red line: the center of (anti)symmetry at $n=(N-1)/2$ — an actual sample for odd $N$ (Types 1, 3), halfway between samples for even $N$ (Types 2, 4). Note the Type 3 center sample is forced to zero(Type 3 中心點必為 0).圖 11-9 — 四種線性相位 FIR 型式的脈衝響應範例。紅色虛線是(反)對稱中心 $n=(N-1)/2$——當 $N$ 為奇數時(型式 1、3)它是一個真正的樣本,當 $N$ 為偶數時(型式 2、4)則落在兩個樣本中間。注意型式 3 的中心樣本必定為零。図 11-9 — 4 種類の線形位相 FIR のインパルス応答の例。赤い破線は(反)対称の中心 $n=(N-1)/2$ である。$N$ が奇数のとき(型式 1・3)は実際の標本にあたり、$N$ が偶数のとき(型式 2・4)は標本と標本の中間に来る。型式 3 では中心の標本が強制的に零になることに注意したい。

11.6.3 Forced Zeros and Filter Suitability11.6.3 強制零點與濾波器的適用性11.6.3 強制零点とフィルタの適性

The structural zeros in the table follow directly from the symmetry. Evaluate $H(z)=\sum h[n]z^{-n}$ at $z=\pm1$:表中的結構性零點可以直接由對稱性推得。把 $H(z)=\sum h[n]z^{-n}$ 代入 $z=\pm1$:表に現れる構造的な零点は、対称性から直ちに従う。$H(z)=\sum h[n]z^{-n}$ を $z=\pm1$ で評価してみよう。

Key — Type 1 is the safe choice重點 — 型式 1 是安全的選擇要点 — 型式 1 が安全な選択
Only Type 1 (symmetric, odd length) has no forced zeros and can approximate any of LP/HP/BP/BS. Exam shortcut: check (i) symmetric or antisymmetric? (ii) $N$ odd or even? then read off the type and its forbidden bands. Antisymmetric ⇒ dead at DC; even-length symmetric ⇒ dead at $\omega=\pi$.只有型式 1(對稱、長度為奇數)沒有強制零點,可以近似 LP/HP/BP/BS 當中的任何一種。考試的捷徑:先看(i)是對稱還是反對稱?再看(ii)$N$ 是奇數還是偶數?然後就能讀出型式與它的禁用頻帶。反對稱 ⇒ 直流處為零;偶數長度且對稱 ⇒ $\omega=\pi$ 處為零。強制零点をもたず、LP/HP/BP/BS のどれでも近似できるのは型式 1(対称・奇数長)だけである。試験での近道は、(i) 対称か反対称か、(ii) $N$ は奇数か偶数か、を確かめて型式と禁じられた帯域を読み取ることだ。反対称なら直流で零、偶数長の対称なら $\omega=\pi$ で零になる。
直觀解釋(點擊展開)
為什麼對稱就會有線性相位?把脈衝響應想成以中心點 (N−1)/2 為鏡像。任何對稱序列都可以寫成「零相位(以中心為原點的偶/奇序列)」再「延遲 (N−1)/2」。零相位部分的頻率響應是純實數(偶對稱)或純虛數(奇對稱),延遲部分貢獻 e^{−jω(N−1)/2} 的線性相位——所以總相位是一條直線(奇對稱多一個 90° 的常數相移,稱為「廣義線性相位」)。而「強制零點」的直覺:反對稱序列所有樣本相加必為 0,所以 DC 增益必為 0;偶數長度的對稱序列在 ω=π 時左右兩半正負抵消,所以 π 處增益必為 0。選型時先想清楚你的濾波器在 ω=0 和 ω=π 需不需要增益。

11.7 Chapter Summary11.7 本章總結11.7 本章のまとめ

Simple FIR prototypes簡單的 FIR 原型単純な FIR プロトタイプ

Lowpass $\tfrac12(1+z^{-1})$: $|H|=\cos\frac\omega2$, zero at $\pi$. Highpass $\tfrac12(1-z^{-1})$: $|H|=\sin\frac\omega2$, zero at DC. Both cut off at $\pi/2$; $M$-point moving average generalizes the LP with nulls at $2\pi k/M$.低通 $\tfrac12(1+z^{-1})$:$|H|=\cos\frac\omega2$,零點在 $\pi$。高通 $\tfrac12(1-z^{-1})$:$|H|=\sin\frac\omega2$,零點在直流。兩者的截止頻率都是 $\pi/2$;$M$ 點移動平均把低通推廣,零點落在 $2\pi k/M$。低域通過 $\tfrac12(1+z^{-1})$ は $|H|=\cos\frac\omega2$ で零点は $\pi$、高域通過 $\tfrac12(1-z^{-1})$ は $|H|=\sin\frac\omega2$ で零点は直流にある。どちらも遮断は $\pi/2$ である。$M$ 点移動平均は低域通過を一般化したもので、零点は $2\pi k/M$ に並ぶ。

Simple IIR prototypes簡單的 IIR 原型単純な IIR プロトタイプ

First-order LP/HP with pole $\alpha$: $\alpha=\frac{1-\sin\omega_c}{\cos\omega_c}$ sets the 3-dB cutoff. Second-order BP/BS: $\beta=\cos\omega_0$ sets the center/notch, $\cos B_w=\frac{2\alpha}{1+\alpha^2}$ sets the width. Matching pairs satisfy $H_1+H_2=1$ and $|H_1|^2+|H_2|^2=1$.一階 LP/HP 的極點為 $\alpha$:$\alpha=\frac{1-\sin\omega_c}{\cos\omega_c}$ 決定 3-dB 截止頻率。二階 BP/BS:$\beta=\cos\omega_0$ 決定中心或陷波位置,$\cos B_w=\frac{2\alpha}{1+\alpha^2}$ 決定寬度。參數彼此配合的一對滿足 $H_1+H_2=1$ 與 $|H_1|^2+|H_2|^2=1$。1 次 LP/HP は極 $\alpha$ をもち、$\alpha=\frac{1-\sin\omega_c}{\cos\omega_c}$ が 3-dB 遮断周波数を決める。2 次 BP/BS では $\beta=\cos\omega_0$ が中心(ノッチ)の位置を、$\cos B_w=\frac{2\alpha}{1+\alpha^2}$ が幅を決める。母数をそろえた組は $H_1+H_2=1$ と $|H_1|^2+|H_2|^2=1$ を満たす。

Decibels & cascades分貝與串接デシベルと縦続接続

Gain $=20\log_{10}|H|$ dB; $-3$ dB $=$ half power $=1/\sqrt2$ amplitude. Cascading: magnitudes multiply, dB add — stopband deepens but the passband narrows.增益 $=20\log_{10}|H|$ dB;$-3$ dB $=$ 半功率 $=1/\sqrt2$ 的振幅。串接時振幅相乘、dB 相加——阻帶更深,但通帶也更窄。利得は $=20\log_{10}|H|$ dB、$-3$ dB $=$ 半電力 $=1/\sqrt2$ の振幅である。縦続接続では振幅が掛け算、dB が足し算になり、阻止帯域は深くなるが通過帯域は狭くなる。

Ideal filters理想濾波器理想フィルタ

Brick-wall LP/HP/BP/BS. Ideal LP has $h[n]=\frac{\sin\omega_c n}{\pi n}$: noncausal, infinite, not absolutely summable ⇒ unrealizable; real filters only approximate it.磚牆式的 LP/HP/BP/BS。理想 LP 的 $h[n]=\frac{\sin\omega_c n}{\pi n}$:非因果、無限長、不絕對可和 ⇒ 不可實現;真實的濾波器只能逼近它。ブリックウォールの LP/HP/BP/BS。理想 LP は $h[n]=\frac{\sin\omega_c n}{\pi n}$ であり、非因果的・無限長・絶対総和可能でない ⇒ 実現不可能である。実際のフィルタはこれを近似するだけである。

Tolerance scheme容忍度規格圖許容仕様図

Spec $=(\omega_p,\omega_s,\delta_p,\delta_s)$: passband within $1\pm\delta_p$, stopband below $\delta_s$, free transition band. In dB: $R_p=-20\log_{10}(1-\delta_p)$, $A_s=-20\log_{10}\delta_s$.規格 $=(\omega_p,\omega_s,\delta_p,\delta_s)$:通帶落在 $1\pm\delta_p$ 之內,阻帶低於 $\delta_s$,過渡帶自由。以 dB 表示:$R_p=-20\log_{10}(1-\delta_p)$、$A_s=-20\log_{10}\delta_s$。仕様は $=(\omega_p,\omega_s,\delta_p,\delta_s)$ である。通過帯域は $1\pm\delta_p$ の内側、阻止帯域は $\delta_s$ 以下、遷移帯域は自由。dB では $R_p=-20\log_{10}(1-\delta_p)$、$A_s=-20\log_{10}\delta_s$ となる。

Linear-phase FIR types線性相位 FIR 的型式線形位相 FIR の型式

$h[n]=\pm h[N{-}1{-}n]$ ⇒ constant group delay $\frac{N-1}{2}$. Type 1 (sym, odd): anything. Type 2 (sym, even): no HP/BS. Type 3 (antisym, odd): zeros at $0$ and $\pi$. Type 4 (antisym, even): no LP/BS. Offline zero phase: filtfilt ⇒ $|H|^2$.$h[n]=\pm h[N{-}1{-}n]$ ⇒ 群延遲固定為 $\frac{N-1}{2}$。型式 1(對稱、奇數):什麼都能做。型式 2(對稱、偶數):不能做 HP/BS。型式 3(反對稱、奇數):在 $0$ 與 $\pi$ 處有零點。型式 4(反對稱、偶數):不能做 LP/BS。離線的零相位:filtfilt ⇒ $|H|^2$。$h[n]=\pm h[N{-}1{-}n]$ ⇒ 群遅延は $\frac{N-1}{2}$ で一定。型式 1(対称・奇数)は何でも可。型式 2(対称・偶数)は HP/BS が不可。型式 3(反対称・奇数)は $0$ と $\pi$ に零点。型式 4(反対称・偶数)は LP/BS が不可。オフラインのゼロ位相は filtfilt ⇒ $|H|^2$。

Exercises習題演習問題

Exercise 1 — Analyzing the Two-Point Average and First Difference習題 1 — 分析兩點平均與一階差分演習 1 — 2 点平均と一次差分の解析

Problem: Consider the filters $H_0(z)=\tfrac12(1+z^{-1})$ and $H_1(z)=\tfrac12(1-z^{-1})$. (a) Derive the magnitude and phase responses of both filters. (b) Find the 3-dB cutoff frequency of each. (c) Show that the pair is power-complementary. (d) What is the gain of $H_0$ in dB at $\omega = 3\pi/4$?題目:考慮濾波器 $H_0(z)=\tfrac12(1+z^{-1})$ 與 $H_1(z)=\tfrac12(1-z^{-1})$。(a)推導兩個濾波器的振幅響應與相位響應。(b)求出各自的 3-dB 截止頻率。(c)證明這一對是功率互補的。(d)在 $\omega = 3\pi/4$ 處,$H_0$ 的增益是多少 dB?問題:フィルタ $H_0(z)=\tfrac12(1+z^{-1})$ と $H_1(z)=\tfrac12(1-z^{-1})$ を考える。(a) 両方のフィルタの振幅応答と位相応答を導け。(b) それぞれの 3-dB 遮断周波数を求めよ。(c) この組が電力相補であることを示せ。(d) $\omega = 3\pi/4$ における $H_0$ の利得は何 dB か。

Click to reveal solution點擊展開解答クリックして解答を表示

(a) Factor out the half-sample delay:(a) 把半個樣本的延遲提出來:(a) 半標本ぶんの遅延をくくり出す。

$$H_0(e^{j\omega})=\tfrac12\bigl(1+e^{-j\omega}\bigr)=e^{-j\omega/2}\,\frac{e^{j\omega/2}+e^{-j\omega/2}}{2}=e^{-j\omega/2}\cos\tfrac\omega2$$ $$H_1(e^{j\omega})=\tfrac12\bigl(1-e^{-j\omega}\bigr)=e^{-j\omega/2}\,\frac{e^{j\omega/2}-e^{-j\omega/2}}{2}=j\,e^{-j\omega/2}\sin\tfrac\omega2$$

So $|H_0|=\cos\frac\omega2$, $\angle H_0=-\frac\omega2$; and $|H_1|=\sin\frac\omega2$ (for $0\le\omega\le\pi$), $\angle H_1=\frac\pi2-\frac\omega2$. Both have linear phase (Types 2 and 4 respectively).於是 $|H_0|=\cos\frac\omega2$、$\angle H_0=-\frac\omega2$;而 $|H_1|=\sin\frac\omega2$(在 $0\le\omega\le\pi$ 範圍內)、$\angle H_1=\frac\pi2-\frac\omega2$。兩者都具有線性相位(分別是型式 2 與型式 4)。よって $|H_0|=\cos\frac\omega2$、$\angle H_0=-\frac\omega2$ であり、$|H_1|=\sin\frac\omega2$($0\le\omega\le\pi$ の範囲)、$\angle H_1=\frac\pi2-\frac\omega2$ である。どちらも線形位相をもつ(それぞれ型式 2 と型式 4)。

(b) $\cos\frac{\omega_c}2=\frac1{\sqrt2}\Rightarrow\omega_c=\frac\pi2$; likewise $\sin\frac{\omega_c}2=\frac1{\sqrt2}\Rightarrow\omega_c=\frac\pi2$. Same cutoff — they split the band evenly.(b) $\cos\frac{\omega_c}2=\frac1{\sqrt2}\Rightarrow\omega_c=\frac\pi2$;同樣地 $\sin\frac{\omega_c}2=\frac1{\sqrt2}\Rightarrow\omega_c=\frac\pi2$。截止頻率相同——兩者把整個頻帶平分了。(b) $\cos\frac{\omega_c}2=\frac1{\sqrt2}\Rightarrow\omega_c=\frac\pi2$、同様に $\sin\frac{\omega_c}2=\frac1{\sqrt2}\Rightarrow\omega_c=\frac\pi2$。遮断周波数は同じであり、両者は帯域をちょうど半分ずつに分ける。

(c) $|H_0|^2+|H_1|^2=\cos^2\frac\omega2+\sin^2\frac\omega2=1$ for all $\omega$. $\blacksquare$(c) 對所有 $\omega$ 都有 $|H_0|^2+|H_1|^2=\cos^2\frac\omega2+\sin^2\frac\omega2=1$。$\blacksquare$(c) すべての $\omega$ について $|H_0|^2+|H_1|^2=\cos^2\frac\omega2+\sin^2\frac\omega2=1$ が成り立つ。$\blacksquare$

(d) $|H_0(e^{j3\pi/4})|=\cos\frac{3\pi}8=0.3827$, so the gain is $20\log_{10}0.3827=-8.34$ dB.(d) $|H_0(e^{j3\pi/4})|=\cos\frac{3\pi}8=0.3827$,所以增益是 $20\log_{10}0.3827=-8.34$ dB。(d) $|H_0(e^{j3\pi/4})|=\cos\frac{3\pi}8=0.3827$ なので、利得は $20\log_{10}0.3827=-8.34$ dB である。

Exercise 2 — Designing a First-Order IIR Lowpass習題 2 — 設計一階 IIR 低通演習 2 — 1 次 IIR 低域通過の設計

Problem: Design the first-order IIR lowpass $H_{LP}(z)=\frac{1-\alpha}{2}\cdot\frac{1+z^{-1}}{1-\alpha z^{-1}}$ with a 3-dB cutoff at $\omega_c=\pi/3$. (a) Find $\alpha$ and write out $H_{LP}(z)$ numerically and the difference equation. (b) Verify the gains at $\omega=0$, $\omega=\omega_c$, and $\omega=\pi$. (c) Write the corresponding highpass $H_{HP}(z)$ with the same cutoff and state the two complementarity relations linking the pair.題目:設計一階 IIR 低通 $H_{LP}(z)=\frac{1-\alpha}{2}\cdot\frac{1+z^{-1}}{1-\alpha z^{-1}}$,使 3-dB 截止頻率落在 $\omega_c=\pi/3$。(a)求 $\alpha$,並寫出 $H_{LP}(z)$ 的數值形式與差分方程式。(b)驗算 $\omega=0$、$\omega=\omega_c$ 與 $\omega=\pi$ 處的增益。(c)寫出截止頻率相同的對應高通 $H_{HP}(z)$,並說明連結這一對濾波器的兩個互補關係。問題:3-dB 遮断が $\omega_c=\pi/3$ となるように、1 次 IIR 低域通過 $H_{LP}(z)=\frac{1-\alpha}{2}\cdot\frac{1+z^{-1}}{1-\alpha z^{-1}}$ を設計せよ。(a) $\alpha$ を求め、$H_{LP}(z)$ を数値で、また差分方程式として書け。(b) $\omega=0$、$\omega=\omega_c$、$\omega=\pi$ における利得を検証せよ。(c) 遮断周波数が同じ高域通過 $H_{HP}(z)$ を書き、この組を結ぶ二つの相補関係を述べよ。

Click to reveal solution點擊展開解答クリックして解答を表示

(a) With $\sin\frac\pi3=0.8660$, $\cos\frac\pi3=0.5$:(a) 由 $\sin\frac\pi3=0.8660$、$\cos\frac\pi3=0.5$ 得:(a) $\sin\frac\pi3=0.8660$、$\cos\frac\pi3=0.5$ より、

$$\alpha=\frac{1-\sin\omega_c}{\cos\omega_c}=\frac{1-0.8660}{0.5}=0.2679$$ $$H_{LP}(z)=0.3660\,\frac{1+z^{-1}}{1-0.2679\,z^{-1}} \qquad y[n]=0.2679\,y[n-1]+0.3660\,x[n]+0.3660\,x[n-1]$$

(b) At $\omega=0$: $H=0.3660\cdot\frac{2}{1-0.2679}=\frac{0.7321}{0.7321}=1$ (0 dB). At $\omega=\pi$: numerator $1+e^{-j\pi}=0$, so $H=0$ ($-\infty$ dB). At $\omega_c=\pi/3$: by construction of the $\alpha$ formula, $|H|=1/\sqrt2$ ($-3$ dB); direct substitution $z=e^{j\pi/3}$ confirms $|H|=0.7071$.(b) 在 $\omega=0$:$H=0.3660\cdot\frac{2}{1-0.2679}=\frac{0.7321}{0.7321}=1$(0 dB)。在 $\omega=\pi$:分子 $1+e^{-j\pi}=0$,所以 $H=0$($-\infty$ dB)。在 $\omega_c=\pi/3$:由 $\alpha$ 公式的構造可知 $|H|=1/\sqrt2$($-3$ dB);直接代入 $z=e^{j\pi/3}$ 也確認 $|H|=0.7071$。(b) $\omega=0$ では $H=0.3660\cdot\frac{2}{1-0.2679}=\frac{0.7321}{0.7321}=1$(0 dB)。$\omega=\pi$ では分子が $1+e^{-j\pi}=0$ となるので $H=0$($-\infty$ dB)。$\omega_c=\pi/3$ では $\alpha$ の式の作り方から $|H|=1/\sqrt2$($-3$ dB)であり、$z=e^{j\pi/3}$ を直接代入しても $|H|=0.7071$ が確かめられる。

(c) $H_{HP}(z)=\dfrac{1+\alpha}{2}\cdot\dfrac{1-z^{-1}}{1-\alpha z^{-1}}=0.6340\,\dfrac{1-z^{-1}}{1-0.2679\,z^{-1}}$. The pair is delay-complementary, $H_{LP}(z)+H_{HP}(z)=1$, and power-complementary, $|H_{LP}(e^{j\omega})|^2+|H_{HP}(e^{j\omega})|^2=1$ — so the highpass output can be computed as $x[n]-y_{LP}[n]$.(c) $H_{HP}(z)=\dfrac{1+\alpha}{2}\cdot\dfrac{1-z^{-1}}{1-\alpha z^{-1}}=0.6340\,\dfrac{1-z^{-1}}{1-0.2679\,z^{-1}}$。這一對是延遲互補的,$H_{LP}(z)+H_{HP}(z)=1$,也是功率互補的,$|H_{LP}(e^{j\omega})|^2+|H_{HP}(e^{j\omega})|^2=1$——所以高通的輸出可以直接用 $x[n]-y_{LP}[n]$ 算出來。(c) $H_{HP}(z)=\dfrac{1+\alpha}{2}\cdot\dfrac{1-z^{-1}}{1-\alpha z^{-1}}=0.6340\,\dfrac{1-z^{-1}}{1-0.2679\,z^{-1}}$ である。この組は遅延相補 $H_{LP}(z)+H_{HP}(z)=1$ であり、かつ電力相補 $|H_{LP}(e^{j\omega})|^2+|H_{HP}(e^{j\omega})|^2=1$ でもある。したがって高域通過の出力は $x[n]-y_{LP}[n]$ として計算できる。

Exercise 3 — The Ideal Lowpass Filter Is Unrealizable習題 3 — 理想低通濾波器不可實現演習 3 — 理想低域通過フィルタは実現できない

Problem: An ideal lowpass filter has $H(e^{j\omega})=1$ for $|\omega|\le0.3\pi$ and $0$ for $0.3\pi<|\omega|\le\pi$. (a) Derive its impulse response $h[n]$ and evaluate $h[0]$, $h[1]$, $h[5]$. (b) Give three independent reasons why this filter cannot be implemented. (c) If we tolerate a delay, can a sufficiently long causal FIR filter implement it exactly? Explain.題目:某理想低通濾波器在 $|\omega|\le0.3\pi$ 時 $H(e^{j\omega})=1$,在 $0.3\pi<|\omega|\le\pi$ 時為 $0$。(a)推導它的脈衝響應 $h[n]$,並算出 $h[0]$、$h[1]$、$h[5]$。(b)給出三個互相獨立的理由,說明這個濾波器為何無法實作。(c)如果我們願意容忍延遲,夠長的因果 FIR 濾波器能否精確實作它?請說明。問題:理想低域通過フィルタが $|\omega|\le0.3\pi$ で $H(e^{j\omega})=1$、$0.3\pi<|\omega|\le\pi$ で $0$ であるとする。(a) インパルス応答 $h[n]$ を導き、$h[0]$、$h[1]$、$h[5]$ を求めよ。(b) このフィルタが実装できない理由を、互いに独立に三つ挙げよ。(c) 遅延を許すなら、十分に長い因果的 FIR フィルタでこれを厳密に実装できるか。理由を述べよ。

Click to reveal solution點擊展開解答クリックして解答を表示

(a) Inverse DTFT over the passband only:(a) 只在通帶上取反 DTFT:(a) 通過帯域だけで逆 DTFT をとる。

$$h[n]=\frac1{2\pi}\int_{-0.3\pi}^{0.3\pi}e^{j\omega n}\,d\omega =\frac{e^{j0.3\pi n}-e^{-j0.3\pi n}}{2\pi jn} =\frac{\sin(0.3\pi n)}{\pi n}$$

Values: $h[0]=\dfrac{\omega_c}{\pi}=0.3$; $h[1]=\dfrac{\sin 0.3\pi}{\pi}=\dfrac{0.8090}{3.1416}=0.2575$; $h[5]=\dfrac{\sin 1.5\pi}{5\pi}=\dfrac{-1}{15.708}=-0.0637$.數值:$h[0]=\dfrac{\omega_c}{\pi}=0.3$;$h[1]=\dfrac{\sin 0.3\pi}{\pi}=\dfrac{0.8090}{3.1416}=0.2575$;$h[5]=\dfrac{\sin 1.5\pi}{5\pi}=\dfrac{-1}{15.708}=-0.0637$。値は $h[0]=\dfrac{\omega_c}{\pi}=0.3$、$h[1]=\dfrac{\sin 0.3\pi}{\pi}=\dfrac{0.8090}{3.1416}=0.2575$、$h[5]=\dfrac{\sin 1.5\pi}{5\pi}=\dfrac{-1}{15.708}=-0.0637$ である。

(b) (1) Noncausal: $h[-1]=h[1]\ne0$ — it needs future inputs. (2) Infinite duration: $h[n]\ne0$ for arbitrarily large $|n|$, so no finite implementation exists. (3) Unstable in the BIBO sense: $|h[n]|\sim\frac1{\pi|n|}$ and the harmonic series diverges, so $\sum_n|h[n]|=\infty$.(b)(1)非因果:$h[-1]=h[1]\ne0$——它需要未來的輸入。(2)長度無限:對任意大的 $|n|$ 都有 $h[n]\ne0$,所以不存在有限的實作。(3)不是 BIBO 穩定:$|h[n]|\sim\frac1{\pi|n|}$,而調和級數發散,所以 $\sum_n|h[n]|=\infty$。(b) (1) 非因果的:$h[-1]=h[1]\ne0$ であり、未来の入力を必要とする。(2) 無限長:いくら大きな $|n|$ でも $h[n]\ne0$ なので、有限の実装は存在しない。(3) BIBO の意味で不安定:$|h[n]|\sim\frac1{\pi|n|}$ であり調和級数は発散するから $\sum_n|h[n]|=\infty$ となる。

(c) No. Delaying by $D$ and truncating to $0\le n\le N-1$ gives a causal FIR approximation $h[n-D]w[n]$, but truncation in time means convolving the brick wall with a sinc-like kernel in frequency: ripples (Gibbs phenomenon, ≈9% overshoot for rectangular truncation) and a nonzero transition band appear for every finite $N$. Exact realization would require all infinitely many taps. This is precisely why practical specs use the tolerance scheme of Section 11.5.3.(c) 不行。延遲 $D$ 再截斷到 $0\le n\le N-1$,得到的是因果 FIR 的近似 $h[n-D]w[n]$;但時域的截斷在頻域上等於把磚牆與一個類 sinc 的核做摺積:對每一個有限的 $N$,都會出現漣波(吉布斯現象,矩形截斷約有 9% 的過衝)以及不為零的過渡帶。要精確實現就得用上無窮多個抽頭。這正是實務規格採用 11.5.3 節那套容忍度規格圖的原因。(c) できない。$D$ だけ遅らせて $0\le n\le N-1$ に打ち切ると、因果的 FIR による近似 $h[n-D]w[n]$ が得られる。しかし時間領域での打ち切りは、周波数領域でブリックウォールを sinc 状の核と畳み込むことを意味する。どの有限の $N$ に対しても、リップル(ギブス現象。矩形打ち切りでは約 9% の行き過ぎ)と零でない遷移帯域が現れる。厳密に実現するには無限個のタップがすべて必要になる。実用の仕様が 11.5.3 節の許容仕様図を使うのは、まさにこのためである。

Exercise 4 — Converting Tolerance Specs to Decibels習題 4 — 把容忍度規格換算成分貝演習 4 — 許容仕様をデシベルに換算する

Problem: A lowpass filter must satisfy the tolerance scheme with $\omega_p=0.35\pi$, $\omega_s=0.5\pi$, $\delta_p=0.05$, $\delta_s=0.01$. (a) Compute the peak passband ripple $R_p$ and the minimum stopband attenuation $A_s$ in dB. (b) A different spec sheet demands $A_s = 60$ dB and $R_p = 0.2$ dB. Convert these back to $\delta_s$ and $\delta_p$. (c) The transition bandwidth is $\Delta\omega=\omega_s-\omega_p$. Qualitatively, what happens to the required filter order if $\Delta\omega$ is halved with tolerances unchanged?題目:某低通濾波器必須滿足容忍度規格 $\omega_p=0.35\pi$、$\omega_s=0.5\pi$、$\delta_p=0.05$、$\delta_s=0.01$。(a)計算以 dB 表示的峰值通帶漣波 $R_p$ 與最小阻帶衰減 $A_s$。(b)另一份規格書要求 $A_s = 60$ dB 與 $R_p = 0.2$ dB,請把它們換算回 $\delta_s$ 與 $\delta_p$。(c)過渡帶寬度為 $\Delta\omega=\omega_s-\omega_p$。在容忍度不變的情況下,若 $\Delta\omega$ 減半,所需的濾波器階數大致會如何變化?問題:ある低域通過フィルタが $\omega_p=0.35\pi$、$\omega_s=0.5\pi$、$\delta_p=0.05$、$\delta_s=0.01$ の許容仕様を満たさなければならない。(a) dB で表したピーク通過帯域リップル $R_p$ と最小阻止帯域減衰量 $A_s$ を求めよ。(b) 別の仕様書は $A_s = 60$ dB と $R_p = 0.2$ dB を要求している。これらを $\delta_s$ と $\delta_p$ に戻せ。(c) 遷移帯域幅は $\Delta\omega=\omega_s-\omega_p$ である。許容値を変えずに $\Delta\omega$ を半分にすると、必要なフィルタ次数は定性的にどうなるか。

Click to reveal solution點擊展開解答クリックして解答を表示

(a)

$$R_p=-20\log_{10}(1-\delta_p)=-20\log_{10}0.95=0.446\ \text{dB} \qquad A_s=-20\log_{10}\delta_s=-20\log_{10}0.01=40\ \text{dB}$$

(b) Invert the formulas:(b) 把公式反解回來:(b) 式を逆に解く。

$$\delta_s=10^{-A_s/20}=10^{-3}=0.001 \qquad \delta_p=1-10^{-R_p/20}=1-10^{-0.01}=1-0.97724=0.0228$$

(c) The order grows roughly in inverse proportion to the transition width (for FIR designs, $N\propto A_s/\Delta\omega$ by standard estimates such as the Kaiser formula). Halving $\Delta\omega$ approximately doubles the required order — sharpness is the most expensive item in a filter spec.(c) 階數大致與過渡帶寬度成反比(對 FIR 設計而言,依 Kaiser 公式之類的標準估計有 $N\propto A_s/\Delta\omega$)。把 $\Delta\omega$ 減半,所需階數大約加倍——陡峭度是濾波器規格裡最昂貴的一項。(c) 次数はおおむね遷移帯域幅に反比例して増える(FIR 設計では Kaiser の式などの標準的な見積りにより $N\propto A_s/\Delta\omega$)。$\Delta\omega$ を半分にすると必要な次数はおよそ倍になる。急峻さはフィルタ仕様のなかで最も高くつく項目である。

Exercise 5 — MATLAB: Smoothing a Noisy Signal with a Moving Average習題 5 — MATLAB:用移動平均平滑含雜訊的訊號演習 5 — MATLAB:移動平均で雑音のある信号を平滑化する

Problem: A slow sinusoid $s[n]=2\sin(2\pi\cdot0.02\,n)$, $n=0,\dots,199$, is corrupted by white Gaussian noise of standard deviation $0.8$. In MATLAB, (a) filter the noisy signal with an $M=11$ point moving average and plot the input and output; (b) plot the filter's magnitude response and explain why $M=11$ works well here; (c) state the delay introduced and how to compensate it.題目:一個緩慢的弦波 $s[n]=2\sin(2\pi\cdot0.02\,n)$($n=0,\dots,199$)被標準差 $0.8$ 的白高斯雜訊汙染。請用 MATLAB:(a)以 $M=11$ 點的移動平均對含雜訊的訊號濾波,並畫出輸入與輸出;(b)畫出濾波器的振幅響應,說明為什麼 $M=11$ 在這裡效果很好;(c)說明引入了多少延遲,以及要如何補償。問題:ゆっくりした正弦波 $s[n]=2\sin(2\pi\cdot0.02\,n)$($n=0,\dots,199$)が、標準偏差 $0.8$ の白色ガウス雑音で汚されている。MATLAB で、(a) この雑音入り信号を $M=11$ 点の移動平均でフィルタし、入力と出力を描け。(b) フィルタの振幅応答を描き、なぜここで $M=11$ がうまく働くのかを説明せよ。(c) 生じる遅延と、その補償方法を述べよ。

Click to reveal solution點擊展開解答クリックして解答を表示

(a) MATLAB code:(a) MATLAB 程式碼:(a) MATLAB のコード:

N = 200;  n = (0:N-1).';
s = 2*sin(2*pi*0.02*n);          % clean signal (f0 = 0.02 cycles/sample)
x = s + 0.8*randn(N,1);          % noisy observation

M = 11;
b = ones(1,M)/M;                 % moving-average coefficients
y = filter(b, 1, x);             % causal filtering, delay (M-1)/2 = 5
y_aligned = [y((M+1)/2:end); zeros((M-1)/2,1)];   % advance by 5 samples

subplot(2,1,1); plot(n, x, 'Color', [.5 .5 .5]); hold on;
plot(n, s, 'b', 'LineWidth', 1.5); legend('noisy x[n]','clean s[n]');
subplot(2,1,2); plot(n, y_aligned, 'r', 'LineWidth', 1.5); hold on;
plot(n, s, 'b--'); legend('filtered (aligned)','clean s[n]');

figure;                          % (b) magnitude response
[H, w] = freqz(b, 1, 1024);
plot(w/pi, abs(H)); grid on;
xlabel('\omega/\pi'); ylabel('|H(e^{j\omega})|');

Regenerated result (numpy/matplotlib, seed 11):重新產生的結果(numpy/matplotlib,種子 11):再生成した結果(numpy/matplotlib、シード 11):

2026-06-12T22:38:07.001718 image/svg+xml Matplotlib v3.10.8, https://matplotlib.org/ −2 0 2 4 amplitude Noisy input and underlying signal x[n] = s[n] + noise clean s[n] 0 25 50 75 100 125 150 175 200 n −2 −1 0 1 2 amplitude Moving-average output: noise reduced, signal kept y[n]: 11-point moving average clean s[n]
Fig. 11-10 — Top: noisy input over the clean signal. Bottom: 11-point moving-average output (center-aligned) — broadband noise is strongly suppressed while the slow sinusoid passes nearly intact(雜訊被平均掉,慢速正弦幾乎不受影響).圖 11-10 — 上圖:含雜訊的輸入疊在乾淨訊號之上。下圖:11 點移動平均的輸出(已對齊中心)——寬頻雜訊被強烈抑制,而緩慢的弦波幾乎原封不動地通過。図 11-10 — 上:きれいな信号に重ねた雑音入りの入力。下:11 点移動平均の出力(中心そろえ)。広帯域の雑音は強く抑えられ、ゆっくりした正弦波はほぼそのまま通過している。

(b) The signal lives at $\omega_0=2\pi\cdot0.02=0.04\pi$, deep inside the main lobe of the $M=11$ response (first null at $2\pi/11\approx0.18\pi$): its gain is $\bigl|\frac{\sin(11\omega_0/2)}{11\sin(\omega_0/2)}\bigr|\approx0.978$, i.e. a loss of only about 0.2 dB. The noise, by contrast, is spread uniformly over all $\omega$, and averaging $11$ independent samples cuts the noise power by a factor of $11$ ($\approx10.4$ dB). Hence: signal kept, noise reduced.(b) 訊號位於 $\omega_0=2\pi\cdot0.02=0.04\pi$,深深落在 $M=11$ 響應的主瓣之內(第一個零點在 $2\pi/11\approx0.18\pi$):它的增益是 $\bigl|\frac{\sin(11\omega_0/2)}{11\sin(\omega_0/2)}\bigr|\approx0.978$,也就是只損失大約 0.2 dB。相對地,雜訊均勻散佈在所有 $\omega$ 上,把 $11$ 個獨立樣本平均起來,雜訊功率就降為原來的 $11$ 分之一($\approx10.4$ dB)。於是訊號保住了,雜訊減少了。(b) 信号は $\omega_0=2\pi\cdot0.02=0.04\pi$ にあり、$M=11$ の応答のメインローブの奥深くに入っている(最初の零点は $2\pi/11\approx0.18\pi$)。その利得は $\bigl|\frac{\sin(11\omega_0/2)}{11\sin(\omega_0/2)}\bigr|\approx0.978$ で、損失はわずか 0.2 dB 程度である。一方、雑音はすべての $\omega$ に一様に広がっており、独立な $11$ 標本を平均すると雑音電力は $11$ 分の 1 になる($\approx10.4$ dB)。こうして信号は保たれ、雑音は減るのである。

(c) The filter is a Type-1 linear-phase FIR with group delay $(M-1)/2=5$ samples at every frequency, so the output is simply shifted by 5. Compensate by advancing the output 5 samples (as in the code), by plotting against $n-5$, or — offline — by using filtfilt, which yields zero phase and squares the magnitude response.(c) 這個濾波器是型式 1 的線性相位 FIR,在每個頻率上的群延遲都是 $(M-1)/2=5$ 個樣本,所以輸出只是整體平移了 5。補償的方法是把輸出往前移 5 個樣本(程式碼裡就是這麼做的)、改用 $n-5$ 當橫軸,或者——在離線的情況下——改用 filtfilt,它會給出零相位,並把振幅響應平方。(c) このフィルタは型式 1 の線形位相 FIR であり、群遅延はどの周波数でも $(M-1)/2=5$ 標本なので、出力は単に 5 だけずれる。補償するには、出力を 5 標本進めるか(コードではそうしている)、横軸を $n-5$ にして描くか、あるいはオフラインであれば filtfilt を使えばよい。これはゼロ位相を与え、振幅応答を二乗する。

Exercise 6 — Identifying a Linear-Phase Type習題 6 — 判別線性相位的型式演習 6 — 線形位相の型式を見分ける

Problem: A causal FIR filter has impulse response $h[n]=\{1,\,-2,\,0,\,2,\,-1\}$ for $n=0,\dots,4$. (a) Determine whether it has linear phase, and if so, which type and what group delay. (b) Compute $H(e^{j0})$ and $H(e^{j\pi})$ and confirm they agree with the structural zeros of that type. (c) Could this filter be used as a lowpass filter? A highpass? What applications suit it?題目:某因果 FIR 濾波器在 $n=0,\dots,4$ 上的脈衝響應為 $h[n]=\{1,\,-2,\,0,\,2,\,-1\}$。(a)判斷它是否具有線性相位;若有,是哪一種型式、群延遲是多少。(b)計算 $H(e^{j0})$ 與 $H(e^{j\pi})$,確認它們與該型式的結構性零點一致。(c)這個濾波器可以當低通用嗎?高通呢?什麼樣的應用適合它?問題:ある因果的 FIR フィルタのインパルス応答が $n=0,\dots,4$ に対して $h[n]=\{1,\,-2,\,0,\,2,\,-1\}$ であるとする。(a) 線形位相をもつかどうかを判定し、もつならどの型式か、群遅延はいくらかを答えよ。(b) $H(e^{j0})$ と $H(e^{j\pi})$ を計算し、その型式の構造的な零点と一致することを確かめよ。(c) このフィルタは低域通過として使えるか。高域通過ではどうか。どのような用途に向くか。

Click to reveal solution點擊展開解答クリックして解答を表示

(a) Check $h[n]$ against $h[4-n]$: $h[0]=1$ vs $h[4]=-1$; $h[1]=-2$ vs $h[3]=2$; $h[2]=0$. So $h[n]=-h[4-n]$: antisymmetric with odd length $N=5$ — a Type 3 linear-phase filter (note the center sample $h[2]=0$, as Type 3 requires). Group delay $\tau=(N-1)/2=2$ samples, plus the constant $90^\circ$ phase factor $j$ of antisymmetric filters (generalized linear phase).(a) 把 $h[n]$ 與 $h[4-n]$ 比對:$h[0]=1$ 對上 $h[4]=-1$;$h[1]=-2$ 對上 $h[3]=2$;中間是 $h[2]=0$。所以 $h[n]=-h[4-n]$:反對稱且長度為奇數 $N=5$——這是型式 3 的線性相位濾波器(注意中心樣本 $h[2]=0$,正是型式 3 的要求)。群延遲 $\tau=(N-1)/2=2$ 個樣本,另外還要加上反對稱濾波器那個固定的 $90^\circ$ 相位因子 $j$(廣義線性相位)。(a) $h[n]$ と $h[4-n]$ を比べる。$h[0]=1$ に対し $h[4]=-1$、$h[1]=-2$ に対し $h[3]=2$、そして中央は $h[2]=0$ である。したがって $h[n]=-h[4-n]$ となり、長さが奇数 $N=5$ の反対称、すなわち型式 3 の線形位相フィルタである(中心の標本が $h[2]=0$ になっている点も型式 3 の要件どおり)。群遅延は $\tau=(N-1)/2=2$ 標本で、さらに反対称フィルタ特有の一定の $90^\circ$ 位相因子 $j$ がつく(一般化線形位相)。

(b) $H(e^{j0})=\sum_n h[n]=1-2+0+2-1=0$. $H(e^{j\pi})=\sum_n(-1)^n h[n]=h[0]-h[1]+h[2]-h[3]+h[4]=1+2+0-2-1=0$. Both are zero — exactly the forced zeros at $z=\pm1$ that define Type 3.(b) $H(e^{j0})=\sum_n h[n]=1-2+0+2-1=0$。$H(e^{j\pi})=\sum_n(-1)^n h[n]=h[0]-h[1]+h[2]-h[3]+h[4]=1+2+0-2-1=0$。兩者都是零——正是定義型式 3 的那組位於 $z=\pm1$ 的強制零點。(b) $H(e^{j0})=\sum_n h[n]=1-2+0+2-1=0$、$H(e^{j\pi})=\sum_n(-1)^n h[n]=h[0]-h[1]+h[2]-h[3]+h[4]=1+2+0-2-1=0$。どちらも零であり、まさに型式 3 を定義する $z=\pm1$ の強制零点である。

(c) With zero gain at both $\omega=0$ and $\omega=\pi$ it can be neither a lowpass nor a highpass (nor a bandstop) — passbands at the band edges are impossible. It is shaped for bandpass-like behavior; Type 3 structures are the natural home of differentiators and Hilbert transformers(微分器與希爾伯特轉換器), both of which require $A(0)=0$.(c) 由於在 $\omega=0$ 與 $\omega=\pi$ 兩處的增益都是零,它既不能當低通也不能當高通(更不能當帶阻)——通帶不可能落在頻帶端點。它的形狀適合類似帶通的行為;型式 3 的結構正是微分器與希爾伯特轉換器的天然歸宿,這兩者都要求 $A(0)=0$。(c) $\omega=0$ と $\omega=\pi$ の両方で利得が零なので、低域通過にも高域通過にも(さらに帯域阻止にも)なれない。帯域の端に通過帯域を置くことが不可能だからである。このフィルタは帯域通過に似た振る舞いに向いており、型式 3 の構造は微分器とヒルベルト変換器の本来の居場所である。どちらも $A(0)=0$ を必要とする。