FIR and IIR filter design
A design starts with passband, stopband, ripple, attenuation and sample-rate specifications. Convert all digital edges to rad/sample before selecting a method; never mix them with analogue rad/s.
9.1 Filter structures and specifications
An FIR filter has finitely many nonzero impulse-response samples. An IIR filter has an infinite response; a causal rational IIR design uses poles inside the unit circle. Real coefficients and initial rest are assumed here.
Direct form I stores input and output delays separately. Direct form II shares delays and uses delay elements before reductions. Cascaded second-order sections are preferable to a high-order direct polynomial in finite precision. FIR filters are always BIBO stable for finite coefficients and can have exact linear phase; a general stable causal IIR gives a sharper transition for a smaller order but nonlinear phase. Exact cancellation can make a recursive implementation FIR.
9.2 Linear-phase FIR types
Let a real FIR have length , support and symmetry about . Its order is , not its length.
A symmetric real FIR's zeros occur in reciprocal-conjugate sets, with degeneracies on the real axis or unit circle. Group delay is constant between zeros; phase delay need not equal group delay for antisymmetric types.
9.3 FIR design by windows and frequency samples
Start from the desired infinite impulse response, shift its centre to , and multiply by a finite symmetric window. Longer windows narrow the transition; tapering reduces sidelobes at the cost of a wider main lobe.
The minimax/equiripple method instead minimises the largest weighted approximation error over specified passbands and stopbands. Error weights are chosen inversely proportional to allowable deviations; exchange algorithms locate alternating error extrema. This method has no universal closed-form order guarantee. Window estimates also need a final frequency-response check.
9.4 IIR mappings and prewarping
Design an analogue prototype , then map it to . The bilinear transform avoids aliasing but warps frequency; impulse invariance preserves sampled impulse values but aliases the analogue spectrum.
Bilinear mapping sends the left half-plane inside the unit circle and the entire imaginary axis onto the unit circle, one-to-one except at infinity. Prewarp every critical digital edge using the tangent relation before computing prototype order. Analogue infinity maps to . Impulse invariance maps poles by and retains stability. For a stable strictly proper rational prototype continuous at zero, its frequency response is under the stated scaling. Use impulse invariance when out-of-band analogue response is negligible; it is generally unsuitable for high-pass prototypes with non-decaying high-frequency response.
9.5 Classical analogue prototypes and frequency transformations
Use positive analogue low-pass edges , maximum passband loss dB and minimum stopband loss dB. For a digital bilinear design these edges must already be prewarped.
| Prototype | Passband | Stopband | Main trade-off |
|---|---|---|---|
| Butterworth | Monotone, flat near DC | Monotone | Smooth amplitude; moderate transition |
| Chebyshev I | Equiripple | Monotone | Sharper transition for permitted passband ripple |
| Chebyshev II | Monotone | Equiripple, finite-frequency zeros | Stopband ripple instead of passband ripple |
| Elliptic | Equiripple | Equiripple, finite-frequency zeros | Lowest classical order for fixed two-band magnitude constraints |
| Bessel | Monotone magnitude | Monotone | Flat low-frequency group delay; slower magnitude transition |
Last-minute recall
- FIR order is length minus one.
- Type II cannot pass Nyquist; Types III and IV cannot pass DC.
- A window estimate is a starting design, not a guaranteed specification.
- Include desired phase in frequency-sampling design.
- Bilinear design needs edge prewarping and has no spectral aliasing.
- Impulse invariance samples an impulse response and can alias.
- Round prototype order up, then verify both band edges.
- Band transformations use analogue edges; digital edges enter through prewarping.