Skip to content
Digital Signal Processing

IIR filters: analogue prototypes and the bilinear transform

The Butterworth filter and the order formula proved, Chebyshev and elliptic filters, the bilinear transform with proof, prewarping, a complete numerical example, impulse invariance, FIR or IIR.

IIR filters have an infinite impulse response because they use feedback: the output also depends on past outputs. With few coefficients they achieve very steep transitions, but they give up linear phase and must be made stable. The classic way to design them is to start from an analogue prototype, one of the filters studied for decades for circuits, and transform it. In this lesson we look at the Butterworth filter with the order formula proved, the bilinear transform with the proof of its properties, frequency prewarping, impulse invariance and a complete numerical example.

Analogue prototypes

The Butterworth filter of order N has

    \[ |H(j\Omega)|^2 = \frac{1}{1 + (\Omega/\Omega_c)^{2N}} \]

It is maximally flat: at \Omega = 0 the first 2N - 1 derivatives of the squared magnitude are zero, and the gain falls monotonically. At \Omega_c it is -3 dB, and beyond it falls by 20N dB per decade. The poles lie on a semicircle of radius \Omega_c in the left half-plane.

Theorem. To have at most A_p dB of attenuation up to \Omega_p and at least A_s dB from \Omega_s, the Butterworth order must be

    \[ N \ge \frac{\log_{10}\left[(10^{A_s/10} - 1)/(10^{A_p/10} - 1)\right]}{2\log_{10}(\Omega_s/\Omega_p)} \]

Proof. The attenuation in dB is 10\log_{10}(1 + (\Omega/\Omega_c)^{2N}). The two conditions give (\Omega_p/\Omega_c)^{2N} \le 10^{A_p/10} - 1 and (\Omega_s/\Omega_c)^{2N} \ge 10^{A_s/10} - 1. Dividing the second by the first, \Omega_c disappears: (\Omega_s/\Omega_p)^{2N} \ge (10^{A_s/10} - 1)/(10^{A_p/10} - 1), and taking logarithms gives the formula. ∎

The Chebyshev type I filter accepts ripple in the passband, type II in the stopband, and the elliptic (or Cauer) filter in both: for the same order it has the steepest possible transition, but the most irregular phase.

The bilinear transform

To go from the analogue filter H_a(s) to the digital one, substitute

    \[ s = \frac{2}{T}\cdot\frac{1 - z^{-1}}{1 + z^{-1}} \]

where T is the sampling period. It is the trapezoidal rule applied to the integrator 1/s, and it turns a rational function into another rational function of the same order.

Theorem. The bilinear transform maps the imaginary axis s = j\Omega onto the unit circle, with

    \[ \omega = 2\arctan\frac{\Omega T}{2} \]

and the left half-plane inside the unit circle. So a stable analogue filter becomes a stable digital filter.

Proof. Inverting the formula, z = (1 + sT/2)/(1 - sT/2). For s = j\Omega numerator and denominator are complex conjugates, 1 \pm j\Omega T/2, so |z| = 1 and z = e^{j\omega} with \omega = 2\arg(1 + j\Omega T/2) = 2\arctan(\Omega T/2). For \mathrm{Re}\,s \lt  0 the point s is closer to -2/T than to +2/T, so |1 + sT/2| \lt  |1 - sT/2| and |z| \lt  1: the poles end up inside the circle. ∎

Relation between analogue and digital frequency in the bilinear transform
The whole analogue frequency axis, from zero to infinity, is compressed into the interval from zero to pi. At low frequencies the relation is almost linear (dashed), then it bends more and more.

There is no aliasing, because the whole \Omega axis from 0 to infinity is “squeezed” into the interval from 0 to \pi. The price is frequency warping: the relation is not linear, and the characteristic frequencies of the prototype end up in the wrong place.

Prewarping

The remedy is to design the analogue prototype with prewarped frequencies: to get a digital cutoff at \omega_c, use \Omega_c = (2/T)\tan(\omega_c/2). The critical frequencies then fall exactly where they are needed; the shape of the response between one critical frequency and the next is slightly distorted, but for piecewise-constant filters (low-pass, high-pass, band-pass) it does not matter.

A complete example

We want a second-order Butterworth filter with digital cutoff \omega_c = 0.2\pi (for instance 1 kHz with 10 kHz sampling). With T = 1 prewarping gives \Omega_c = 2\tan(0.1\pi) \approx 0.650, and the prototype is H_a(s) = \Omega_c^2/(s^2 + \sqrt{2}\,\Omega_c s + \Omega_c^2). Applying the substitution and setting K = \tan(\omega_c/2) \approx 0.325, with D = 1 + \sqrt{2}K + K^2 \approx 1.565:

    \[ H(z) = \frac{b_0 + b_1z^{-1} + b_2z^{-2}}{1 + a_1z^{-1} + a_2z^{-2}},\quad b_0 = b_2 = \frac{K^2}{D} \approx 0.0675,\ b_1 = 2b_0,\ a_1 = \frac{2(K^2 - 1)}{D} \approx -1.143,\ a_2 = \frac{1 - \sqrt{2}K + K^2}{D} \approx 0.413 \]

The DC gain (z = 1) is (b_0 + b_1 + b_2)/(1 + a_1 + a_2) = 1, as it must be, and the gain at \omega = \pi (z = -1) is zero, because the numerator (1 + z^{-1})^2 vanishes: the bilinear transform maps the prototype’s zero at infinity exactly to the Nyquist frequency. The poles have magnitude \sqrt{a_2} \approx 0.64: well inside the circle.

Impulse invariance

An alternative method samples the prototype’s impulse response: h[n] = T\,h_a(nT). It preserves the shape of the time response and the linear relation between frequencies, but the digital frequency response is the sum of copies of the analogue one, so there is aliasing: it works well only for low-pass and band-pass filters strongly attenuated before the Nyquist frequency, and it is not used for high-pass filters.

FIR or IIR?

IIR filters reach steep transitions with a much lower order, hence fewer multiplications and less delay: they are the natural choice when phase does not matter, as in many audio filters, equalisers and control loops. FIR filters have exact linear phase, are always stable and tolerate finite precision better: they are preferred in digital communications, imaging and multirate systems. IIR filters are almost always implemented as a cascade of second-order sections, like the one in the example (lesson on structures).

Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
0
Would love your thoughts, please comment.x
()
x