Introduction to IIR Filter Design

Infinite Impulse Response (IIR) filters are a cornerstone of digital signal processing, offering efficient frequency selectivity with fewer coefficients than their Finite Impulse Response (FIR) counterparts. Deriving an IIR filter’s transfer function from a set of performance specifications is a systematic process that blends analog prototype theory with digital transformation techniques. This guide provides a comprehensive, step-by-step approach to designing IIR filters, covering everything from interpreting specifications to obtaining a practical H(z) expression suitable for implementation. Mastering these steps is essential for students, engineers, and researchers working in communications, audio processing, control systems, or any field requiring digital filtering.

Understanding Filter Specifications

Every filter design begins with a clear set of requirements. The more precisely these are defined, the easier it becomes to select an appropriate prototype and determine the required order. Key parameters typically include:

  • Passband edge frequency (ωp): The upper (or lower) frequency of the passband, often given in radians per second or Hz. For low-pass filters, this is the cutoff frequency where the gain begins to drop.
  • Stopband edge frequency (ωs): The frequency beyond which attenuation must be at least the specified stopband value.
  • Passband ripple (δp): The maximum allowable variation in gain within the passband, typically expressed in decibels (dB) as Ap = 20 log₁₀(1+δp) or directly as a dB value (e.g., 1 dB).
  • Stopband attenuation (As): The minimum attenuation required in the stopband, expressed in dB (e.g., 60 dB). This is equivalent to the maximum allowed stopband gain.
  • Filter type: Low-pass, high-pass, band-pass, band-stop, or all-pass. Each requires a different frequency transformation.
  • Sampling frequency (Fs): Critical for digital implementation, as all analog frequencies must be normalized to the Nyquist range (0 to Fs/2).

Additional considerations may include phase linearity requirements (often better met by Bessel or FIR filters) and computational resource limits. All specifications should be recorded in both analog (prewarped) and digital domains to avoid confusion during transformation.

Selecting the Filter Prototype

The prototype is an analog low-pass filter with a normalized cutoff frequency of 1 rad/s. Four classic prototypes are widely used, each offering a different trade-off between passband ripple, stopband attenuation, and phase linearity.

Butterworth Filter

The Butterworth filter provides a maximally flat passband response with no ripple. Its gain decreases monotonically with frequency, and its roll-off is moderate — — 20n dB/decade for an nth order filter. It is ideal when a smooth passband magnitude is required and moderate stopband attenuation is acceptable.

Chebyshev Type I Filter

Chebyshev Type I filters introduce equiripple in the passband but achieve a steeper roll‑off at the cutoff frequency compared to Butterworth. The passband ripple is specified (e.g., 0.5 dB). These filters are useful when a sharper transition band is needed, but passband ripple can be tolerated.

Chebyshev Type II (Inverse Chebyshev) Filter

Type II has ripple in the stopband and a flat passband. It offers a steep roll‑off just before the stopband, but the stopband exhibits equiripple attenuation. This type is selected when a flat passband is mandatory but some stopband variation is acceptable.

Elliptic (Cauer) Filter

Elliptic filters provide the steepest possible roll‑off for a given order by allowing ripple in both passband and stopband. They are optimal for applications requiring high selectivity with a low filter order, such as anti‑aliasing filters or channel separation. The trade‑off is significant nonlinear phase and sensitivity to coefficient quantization.

Bessel Filter

Bessel filters maximize group delay flatness, preserving the shape of time‑domain signals. Their magnitude response has a slower roll‑off than Butterworth, making them suitable for pulse‑based communications or where linear phase is critical.

The choice depends on the specifications. For example, if the passband ripple must be less than 0.1 dB and a 60 dB stopband attenuation is needed, a Chebyshev Type I or elliptic design might be appropriate. Online resources such as Butterworth filter, Chebyshev filter, and Elliptic filter provide detailed pole‑zero and transfer function tables.

Determining the Required Filter Order

Once the prototype type is chosen, the minimum order n that satisfies both passband ripple and stopband attenuation must be computed. For Butterworth and Chebyshev filters, closed‑form expressions exist. For example, for a Butterworth low‑pass filter:

n = ceil( log₁₀( (100.1As – 1) / (100.1Ap – 1) ) / ( 2 log₁₀( ωs / ωp ) ) )

where Ap and As are the passband ripple and stopband attenuation in dB, and ωp, ωs are the passband and stopband edge frequencies. For Chebyshev Type I, a similar formula using hyperbolic cosine functions applies. Elliptic filter order estimation requires the complete elliptic integral, often computed using design tables or software. Most modern DSP environments — such as MATLAB’s buttord, cheb1ord, or ellipord functions — automate this step. It is essential to round the order up to the nearest integer; a higher order can be used if computational resources permit.

Deriving the Analog Transfer Function H(s)

With the prototype type and order known, the next step is to obtain the normalized low‑pass transfer function H(s) with a cutoff of 1 rad/s. For each prototype, the poles (and zeros for elliptic/Chebyshev Type II) are known analytically.

  • Butterworth: Poles lie on a circle of radius 1 in the left half‑plane at angles (2k+1)π/(2n) + π/2, for k = 0,1,…,n−1. No finite zeros.
  • Chebyshev Type I: Poles lie on an ellipse with foci at ± jωp. The minor axis radius is related to the ripple factor ε = √(100.1Ap–1).
  • Chebyshev Type II: Has both poles and zeros on the imaginary axis (stopband). The zeros are at s = ± j ωs / cos(…).
  • Elliptic: Involves Jacobian elliptic functions; poles and zeros are available in tables or via numerical routines.

The transfer function is then formed as a ratio of polynomials: H(s) = K * N(s) / D(s), where the gain K normalizes the magnitude response (e.g., K = 1 for unity DC gain). For a low‑pass prototype, H(s) is low‑pass with ωc = 1. Many textbooks, such as The Scientist and Engineer’s Guide to Digital Signal Processing, provide tabulated pole‑zero locations and denominator polynomials for common orders.

Applying Frequency Transformations

The normalized prototype filter must be transformed to meet the desired cutoff frequency and filter type. Frequency transformations replace the complex variable s with a function of s that maps the prototype response to the desired passband.

Low‑pass to Low‑pass

Replace s with s / ωc, where ωc is the desired cutoff angular frequency. This scales all pole and zero frequencies linearly.

Low‑pass to High‑pass

Substitute s → ωc / s. This converts zeros and poles reciprocally, inverting the magnitude response.

Low‑pass to Band‑pass

The band‑pass transformation is s → (s² + ω0²) / (s Δω), where ω0 is the center frequency and Δω the bandwidth. This doubles the order because a second‑order mapping is applied.

Low‑pass to Band‑stop

Similar to band‑pass, but with s → s Δω / (s² + ω0²).

After transformation, the transfer function H(s) is now expressed in terms of the analog angular frequency variable that corresponds to the desired passband edges. At this point, the filter is still an analog design; the next step converts it to a digital filter.

Discretizing the Filter Using the Bilinear Transform

The most widely used method for converting the analog H(s) to a digital H(z) is the bilinear transform:

s = (2/T) · (1 – z⁻¹) / (1 + z⁻¹)

where T is the sampling period. This transformation maps the entire left‑half s‑plane into the unit circle in the z‑plane, guaranteeing stability (provided the analog filter is stable). However, the mapping introduces frequency warping: the analog frequency Ω and digital frequency ω are related by

Ω = (2/T) tan( ω/2 ).

To compensate, the analog cutoff frequencies used in the transformation must be prewarped. If the desired digital cutoff is ωd (in radians per sample), prewarp to Ωanalog = (2/T) tan( ωd/2 ). Then apply the bilinear transform to the prewarped analog transfer function.

The bilinear transform results in a rational function in z⁻¹ of the same order as the analog filter. The coefficients can be obtained by algebraic substitution and polynomial expansion, or more commonly by using digital filter design functions in software like MATLAB’s bilinear function. Simpler alternatives exist: the impulse‑invariant method and matched z‑transform, but they may cause aliasing or fail to preserve the magnitude response shape. The bilinear transform is preferred for most IIR designs because it ensures no aliasing and preserves the filter’s magnitude response characteristics (except for warping, which is precompensated).

Expressing the Final Transfer Function H(z)

After discretization, the transfer function is a ratio of polynomials in z⁻¹:

H(z) = (b₀ + b₁ z⁻¹ + … + bN z⁻N) / (1 + a₁ z⁻¹ + … + aM z⁻M)

where N and M are typically equal (the filter order). For a second‑order section (SOS), the coefficients are often written as:

H(z) = (b₀ + b₁ z⁻¹ + b₂ z⁻²) / (1 + a₁ z⁻¹ + a₂ z⁻²)

Higher‑order filters should be factored into cascaded second‑order sections to improve numerical stability and reduce quantization noise. The difference equation implementation is derived directly from H(z):

y[n] = b₀ x[n] + b₁ x[n−1] + … + bN x[n−N] – a₁ y[n−1] – … – aM y[n−M]

Practical Considerations

Deriving a theoretical transfer function is only part of the design; successful implementation requires attention to digital signal processing (DSP) realities:

  • Quantization effects: Finite‑precision arithmetic can shift pole locations, causing instability or altering the frequency response. Use cascaded second‑order sections with sufficient word length (e.g., 32‑bit floating point or 24‑bit fixed point).
  • Scaling: Input and output signals should be scaled to prevent overflow in fixed‑point systems. Intermediate node gains in each SOS stage must be managed.
  • Phase distortion: IIR filters introduce nonlinear phase, which may be unacceptable in certain applications. If phase linearity is critical, consider an FIR filter or a Bessel prototype.
  • Startup transients: The infinite memory of IIR filters causes an initial transient; this can be mitigated by initializing state variables or allowing a warm‑up period.
  • Real‑time constraints: The number of multiply‑accumulate operations per sample directly impacts throughput. Use optimized code and consider polynomial approximations for coefficient calculation.

Example: Designing a Chebyshev Type I Low‑Pass Filter

Suppose we need a digital low‑pass filter with the following specifications:

  • Sampling frequency: 10 kHz
  • Passband edge: 2 kHz (ωp = 0.4π rad/sample)
  • Stopband edge: 3 kHz (ωs = 0.6π rad/sample)
  • Passband ripple: 1 dB
  • Stopband attenuation: 40 dB

Step 1: Prewarp the analog frequencies using T = 1/10000 s. Ωp = 2 × 10⁴ tan(0.4π/2) ≈ 2 × 10⁴ × 1.376 ≈ 27520 rad/s; Ωs = 2 × 10⁴ tan(0.6π/2) ≈ 2 × 10⁴ × 3.077 ≈ 61540 rad/s.

Step 2: Determine order using Chebyshev Type I formula: with 1 dB ripple and 40 dB attenuation, order n ≈ 4 (rounded up).

Step 3: Find normalized Chebyshev Type I transfer function for n=4, 1 dB ripple (poles and gain available in tables). Example from standard design: H(s) = K / ( (s² + 0.3473s + 0.8591)(s² + 0.8506s + 0.3381) ).

Step 4: Apply prewarped low‑pass to low‑pass transformation: replace s with s / Ωp. This yields new polynomial coefficients.

Step 5: Apply bilinear transform to the prewarped analog transfer function. Using a tool or manual substitution yields b and a coefficients for each second‑order section. The final H(z) will be in cascaded SOS form.

This example, though condensed, illustrates the entire pipeline. For full numerical computation, refer to DSP software documentation or standard references.

Conclusion

Deriving an IIR filter transfer function from specifications is a methodical process that moves from requirements to prototype selection, order determination, analog transfer function derivation, frequency transformation, discretization, and implementation. Each step has well‑established mathematical foundations and practical trade‑offs. By understanding these fundamentals, you can design filters that meet stringent performance criteria with minimal computational overhead. For further study, consult authoritative sources such as The Scientist and Engineer’s Guide to Digital Signal Processing or the MATLAB IIR Filter Design documentation for detailed algorithms and examples.