Jump back to chapter selection.


Table of Contents

11.1 FIR and IIR Filters
11.2 Realisation Structures
11.3 Linear Phase, All-Pass, and Minimum Phase
11.4 Filter Specifications
11.5 IIR Filter Design
11.6 FIR Filter Design
11.7 Numerical Effects


11 Digital Filter Structures and Design

Once the z-transform has described a discrete-time LTI system, the next question is how to realise and design it. A digital filter is not just a transfer function; it is also a numerical algorithm. Different realisations of the same H(z) can have very different sensitivity to coefficient quantization, round-off noise, overflow, and hardware cost.


11.1 FIR and IIR Filters

A general causal rational digital filter is described by

y[n]+k=1Naky[nk]=m=0Mbmx[nm].

Its system function is

H(z)=m=0Mbmzm1+k=1Nakzk.

If all ak=0, the filter is finite impulse response (FIR):

y[n]=m=0Mbmx[nm].

The impulse response has finite length. FIR filters are always BIBO stable if their coefficients are finite. They can also be designed to have exact generalized linear phase.

If any feedback coefficient ak is nonzero, the filter is infinite impulse response (IIR). IIR filters can achieve sharp magnitude responses with lower order than FIR filters, but stability must be checked and exact linear phase is generally not possible for causal stable IIR filters.

The basic tradeoff is:


11.2 Realisation Structures

The same rational H(z) can be implemented in several structures.

The direct-form realisation follows the difference equation directly. Direct Form I uses separate delay lines for feedforward and feedback parts. Direct Form II combines them into one delay line and is more memory efficient. However, direct forms can be sensitive to coefficient quantization for high-order filters.

In cascade form, the system function is factored into first- and second-order sections:

H(z)=GrHr(z).

Second-order sections are preferred for complex-conjugate pole-zero pairs:

Hr(z)=b0r+b1rz1+b2rz21+a1rz1+a2rz2.

Cascade form is numerically safer because each section can be scaled and implemented independently.

In parallel form, partial-fraction expansion gives

H(z)=C+rHr(z).

This is useful when the system naturally decomposes into resonant sections.

Transposed structures reverse the signal-flow graph while preserving the transfer function. They often have better numerical behaviour in finite precision and are common in software libraries.


11.3 Linear Phase, All-Pass, and Minimum Phase

A real FIR filter has exact linear phase if its impulse response is symmetric or antisymmetric:

h[n]=h[Mn]

or

h[n]=h[Mn].

The corresponding group delay is

τg=M2.

Linear phase is important when waveform shape matters, because all frequencies in the passband are delayed equally.

An all-pass system has

|A(ejω)|=1

for all ω. It changes phase without changing magnitude. A first-order discrete-time all-pass section can be written as

A(z)=z1a1az1,|a|<1.

More generally, stable all-pass systems have zeros that are reciprocal conjugates of their poles.

A minimum-phase system has all zeros inside the unit circle, assuming it is causal and stable. It has a causal stable inverse. Any stable rational system can often be factored conceptually into

H(z)=Hmin(z)A(z),

where Hmin is minimum phase and A is all-pass. The all-pass part carries excess phase delay without changing the magnitude response.

This is a useful warning: specifying only |H(ejω)| does not uniquely determine the filter. Phase and zero placement still matter.


11.4 Filter Specifications

Digital filter design starts from specifications. For a lowpass filter, typical parameters are:

In magnitude form:

1δp|H(ejω)|1+δp,|ω|ωp,

and

|H(ejω)|δs,ωs|ω|π.

Stopband attenuation is often given in decibels:

As=20log10δs.

No finite-order filter can have an ideal brick-wall transition. A narrower transition band or smaller ripple requires a higher-order filter.


11.5 IIR Filter Design

IIR digital filters are often designed from analogue prototypes. Classical analogue lowpass families include Butterworth, Chebyshev, inverse Chebyshev, and elliptic filters.

A Butterworth filter has maximally flat passband magnitude:

|Ha(jΩ)|2=11+(Ω/Ωc)2N.

It is smooth but does not give the sharpest transition for a given order.

Chebyshev and elliptic filters allow ripple in one or both bands to achieve sharper transitions. Elliptic filters are usually the lowest order for given magnitude specifications, but their phase is more nonlinear.

Two common mappings from analogue to digital filters are impulse invariance and the bilinear transform.

Impulse invariance samples the analogue impulse response:

hd[n]=Tha(nT).

It maps analogue poles according to

z=esT.

This preserves time-domain samples of the impulse response, but it aliases the analogue frequency response. It is appropriate only when the analogue response is sufficiently bandlimited.

The bilinear transform maps the s-plane to the z-plane by

s=2T1z11+z1.

It maps the entire left half-plane into the inside of the unit circle, so stability is preserved and no aliasing occurs. The frequency mapping is nonlinear:

Ω=2Ttan(ω2).

Because of this warping, critical frequencies are prewarped before designing the analogue prototype:

Ωc=2Ttan(ωc2).

11.6 FIR Filter Design

The ideal lowpass impulse response is infinite:

hd[n]={ωcπ,n=0,sin(ωcn)πn,n0.

The simplest FIR design method truncates it with a finite window:

h[n]=hd[n]w[n].

Windowing in time smooths the frequency response but produces a transition band and ripple. The window controls the tradeoff between main-lobe width and side-lobe level.

The Kaiser window is useful because it has an adjustable parameter β. A common empirical order estimate is

NA82.285Δω,

where A is the desired attenuation in dB and Δω is the transition width.

Equiripple FIR design instead directly optimises the maximum weighted error between the desired and actual responses. The Parks-McClellan algorithm is the standard method. Its characteristic result is equal ripple in the optimised bands:

E(ω)=W(ω)[Hd(ejω)H(ejω)]

oscillates between equal positive and negative extrema.

Window design is simple and predictable. Equiripple design is usually more efficient for strict specifications. Both methods are widely used.


11.7 Numerical Effects

Digital filters are implemented with finite word length. This introduces several effects:

IIR filters are especially sensitive because pole locations determine stability. A pole that is stable before quantization can move closer to the unit circle, changing resonance and decay time, or in the worst case move outside the unit circle.

This is why high-order IIR filters are almost always implemented as cascaded second-order sections rather than one high-order direct form. Each section can be scaled to avoid overflow and quantized with less pole sensitivity.

FIR filters are more robust because they have no feedback. Coefficient quantization changes the magnitude and phase response but cannot create instability. This robustness is one of the reasons FIR filters are often chosen even when they require more multiplications.