IIR filter design
Введено
7:22
Цифровая обработка сигналов
Digital signal processing rebuilds the continuous theory for samples, where arithmetic is exact: N samples in, N numbers out, and every promise can be…
Озвучивание на английском · переключаемые субтитры на английском и китайском языках
В этом уроке
| English | Значение |
|---|---|
| IIR/ˌaɪ aɪ ˈɑː/ | ИИХ-фильтр |
| bilinear transform/baɪˈlɪnɪə trænsˈfɔːm/ | Двухлинейное преобразование |
| warp/wɔːp/ | искажение |
| prewarped/prɪˈwɔːpt/ | предварительно искажённый |
Five numbers instead of 67
- The FIR filter in lesson 1204 needed 67 taps. An IIR 无限脉冲响应 filter feeds its own output back, so a few coefficients give a long response: a second-order low-pass needs only 5.
- It gets there by reusing a century of analog filter designs through one substitution.
A biquad has three numerator coefficients and three denominator coefficients, one of which is normalised to 1. How many coefficients must be stored?
Сложность 2/5 · 140 монет + небольшой бонус за первое завершение сегодня
Three numerator plus two denominator coefficients. The 67-tap FIR stores 67.
The bilinear transform
- The bilinear transform 双线性变换 substitutes $s = \dfrac{2}{T}\cdot\dfrac{1 - z^{-1}}{1 + z^{-1}}$ into an analog filter.
- It maps the analog left half-plane inside the unit circle, so every stable analog filter becomes a stable digital one.
Match each part of the s-plane to where the bilinear transform puts it.
Сложность 2/5 · 140 монет + небольшой бонус за первое завершение сегодня
Because stable analog poles land inside the circle, stability carries over automatically.
Warp and prewarp
- The whole analog frequency axis is squeezed once around the unit circle. This warp 弯曲 grows towards the Nyquist frequency.
- So each critical frequency is prewarped 预畸变 first: $\omega_{a} = \dfrac{2}{T}\tan\left(\dfrac{\omega_{d}T}{2}\right)$.

At f_s = 1 kHz a filter must cut at 200 Hz. What prewarped analog frequency should the design use, in rad/s? Give the nearest whole number.
Сложность 2/5 · 140 монет + небольшой бонус за первое завершение сегодня
$2000\tan(0.2\pi) = 2000 \times 0.7265 = 1453$ rad/s, well above $2\pi \times 200 = 1257$.
Worked example: the biquad
- 2nd-order Butterworth, 100 Hz, $f_{s} = 1$ kHz. Prewarp: $\omega_{a} = 2000\tan(0.1\pi) = 649.8$ rad/s, so $K = 1/\tan(0.1\pi) = 3.078$.
- $\dfrac{1}{s^{2} + 1.4142s + 1}$ becomes $H(z) = \dfrac{1 + 2z^{-1} + z^{-2}}{14.82 - 16.94z^{-1} + 6.12z^{-2}}$.
Worked example: verify it
- DC: the denominator sums to 4.00, and so does the numerator, so $H(1) = 1$. At 100 Hz the response is exactly $-3.0$ dB. The poles sit at $|z| = 0.643$, inside the circle.
- Skip the prewarp and the cutoff lands at 96.9 Hz. Also set $T = 1$ ($K = 1$) and it lands at 250 Hz.
H(z) has numerator 1 + 2z^(−1) + z^(−2), and its denominator coefficients sum to 4. What is the DC gain?
Сложность 2/5 · 140 монет + небольшой бонус за первое завершение сегодня
At DC, z = 1: the numerator is 1 + 2 + 1 = 4, and 4/4 = 1.
The 100 Hz design is done without prewarping, using 2π × 100 rad/s directly. Where does the −3 dB point land?
Сложность 1/5 · 100 монет + небольшой бонус за первое завершение сегодня
The warp squeezes frequencies, so an unwarped design lands low. 250 Hz is the different slip of setting T = 1.
The cost
- 5 coefficients against 67 taps, but they buy less. A second-order filter rolls off at only 12 dB per octave, far gentler than the 67-tap FIR's 50 Hz transition; a sharp IIR needs a higher order. And the phase is not linear, especially near the cutoff.
- In fixed-point arithmetic the denominator coefficients are sensitive: rounding 6.12 moves the cutoff.
Designing with T = 1 (K = 1) puts the cutoff at a quarter of the sample rate. Where is that for f_s = 8 kHz, in Hz?
Сложность 2/5 · 140 монет + небольшой бонус за первое завершение сегодня
With K = 1 the cutoff is where $\tan(\omega T/2) = 1$, which is $f_{s}/4 = 2000$ Hz.
Three common slips
- Skipping the prewarp. 96.9 Hz instead of 100 is small; 2.86 kHz instead of 4 kHz at $f_{s} = 10$ kHz is not.
- $T = 1$ with frequencies in hertz. The cutoff moves to a quarter of the sample rate.
- Expecting linear phase. IIR phase bends most near the poles.
Like a symmetric FIR filter, an IIR biquad has exactly linear phase.
Сложность 1/5 · 100 монет + небольшой бонус за первое завершение сегодня
Its phase bends near the cutoff. If the waveform shape matters, use a symmetric FIR.
Recap
- Bilinear: the left half-plane maps inside the unit circle, so stability is automatic.
- Prewarp every critical frequency with $\dfrac{2}{T}\tan(\omega_{d}T/2)$.
| IIR | FIR | |
|---|---|---|
| Feedback | yes | no |
| Coefficients here | 5 | 67 taps |
| Phase | bends near the poles | linear |
| Stability | must be checked | always stable |
Что пошло не так? Это увидит только команда сайта.