Wiki · Read the guide: Digital IIR filters and the biquad cascade

IIR Filter Designer

Design digital IIR filters as a cascade of second-order sections (biquads): choose type, family, order and cutoff, then read the frequency response, poles/zeros and the CMSIS-DSP-ready coefficients. Demonstration tool.

IIR filter designer tool

1 · Specification

Response

Magnitude response
Phase response
Poles & zeros (z-plane)

v0.2: lowpass/highpass, 5 families (Butterworth, Chebyshev I/II, Elliptic, Bessel), even orders 2–8. Numerical tests included in the repository. Bandpass/bandstop unavailable.

Biquad coefficients (SOS)

Stageb₀b₁b₂a₁a₂

CMSIS-DSP export

How it works

What is a biquad cascade (SOS)?

An order-N IIR filter is built as a cascade of second-order sections (biquads), numerically more robust than a single high-order section. Each biquad has transfer function:

Hk(z)=b0+b1z−1+b2z−21+a1z−1+a2z−2,H_k(z) = \dfrac{b_0 + b_1 z^{-1} + b_2 z^{-2}}{1 + a_1 z^{-1} + a_2 z^{-2}},H(z)=∏k=1N/2Hk(z)H(z) = \prod_{k=1}^{N/2} H_k(z)

From continuous to discrete: bilinear transform

The analog prototype (Butterworth, Chebyshev, elliptic or Bessel) is mapped to the z-plane with the bilinear transform, with cutoff frequency pre-warping:

s  ←  2T 1−z−11+z−1,s \;\leftarrow\; \dfrac{2}{T}\,\dfrac{1 - z^{-1}}{1 + z^{-1}},ωa=2Ttan⁡ ⁣(ωdT2)\omega_a = \dfrac{2}{T}\tan\!\left(\dfrac{\omega_d T}{2}\right)

Stability is read from the poles: the analog left half-plane maps to the inside of the unit circle. A filter is stable if all poles have magnitude < 1.

What are the five approximations?

Each family is a trade-off between transition steepness, ripple and phase linearity. Butterworth: maximally flat magnitude, no ripple. Chebyshev I: passband ripple, steeper transition. Chebyshev II: flat passband, stopband ripple. Elliptic: the steepest, ripple in both bands. Bessel: smooth group delay in the analog prototype, altered by the digital transformation. Compare families over the useful band with the same transition requirements.

The elliptic is the general form: the other three are its special cases (stopband ripple→0 gives Chebyshev I, passband ripple→0 gives Chebyshev II, both→0 gives Butterworth).

  • Butterworth — maximally flat passband, no ripple, 20·N dB/decade roll-off. When you want a clean passband and no tight order constraint.
  • Chebyshev I — passband ripple, monotonic stopband. Steeper transition than Butterworth for the same order.
  • Chebyshev II — flat passband, stopband ripple. Useful when you want a clean passband but accept ripple in the stopband.
  • Elliptic / Cauer — ripple in both bands, the steepest transition for a given order. More non-linear phase and more ringing. Typical in aggressive anti-aliasing filters where only the magnitude matters.
  • Bessel / Thomson — smooth group delay in the analog prototype, with gentle roll-off. The bilinear transformation changes this property: check the digital response over the useful band.
∣HBW(jω)∣2=11+(ωωc)2N,|H_{\text{BW}}(j\omega)|^2 = \dfrac{1}{1 + \left(\tfrac{\omega}{\omega_c}\right)^{2N}},∣HC1∣2=11+ε2TN2(ω/ωc),|H_{\text{C1}}|^2 = \dfrac{1}{1 + \varepsilon^2 T_N^2(\omega/\omega_c)},∣Hell∣2=11+ε2RN2(ξ,ω/ωc)|H_{\text{ell}}|^2 = \dfrac{1}{1 + \varepsilon^2 R_N^2(\xi, \omega/\omega_c)}

where Tₙ is the Chebyshev polynomial and Rₙ the elliptic rational function (built on Jacobi elliptic functions), with ξ the selectivity factor. Selection guide and use cases in the tool wiki.

How are the coefficients exported for CMSIS-DSP?

The export uses the CMSIS-DSP convention for arm_biquad_cascade_df2T_f32: five values per stage, with feedback coefficients already converted from the denominator shown in the SOS table. Copy the array without reversing their signs again.

Coefficients validated against scipy.signal.