FIR vs IIR Filters: Stability, Phase and Filter Order
Both are digital filters that shape the frequency response of a signal, but they differ in whether past outputs are used in the calculation. An FIR (finite impulse response) filter only multiplies the current and past inputs by coefficients and adds them up, so its impulse response ends after as many samples as it has taps. An IIR (infinite impulse response) filter also feeds past outputs back into the calculation, so in theory its impulse response goes on forever. An FIR filter is always stable and becomes linear phase if its coefficients are symmetric, but a sharp response needs many taps. An IIR filter achieves a sharp response with a low order, but its phase is not linear and it can become unstable depending on where its poles lie.
| Aspect | FIR filter | IIR filter |
|---|---|---|
| Difference equation and impulse response | y[n] = Σh[k]x[n − k]: a weighted sum of inputs only; the impulse response ends after N taps | y[n] = Σb[k]x[n − k] − Σa[k]y[n − k]: past outputs are fed back, and the impulse response decays but continues |
| Transfer function H(z) and stability | No denominator; the only poles are at z = 0, so it is always stable whatever the coefficients | Has a denominator; stable only if all poles lie inside the unit circle |
| Phase response | Linear phase if the coefficients are symmetric; the group delay is (N − 1)/2 samples at every frequency | Not linear phase; the group delay changes with frequency and grows near the cutoff |
| Order needed for the same specification (example) | For a low-pass filter at fs = 48 kHz with a 4 kHz passband edge, a 5 kHz stopband edge, 60 dB attenuation and 0.5 dB passband ripple, an equiripple design needs about 110 taps | An elliptic filter meeting the same specification is 7th order (4 second-order sections) |
| Computation per output sample | As many multiply-accumulates as taps: about 110 in the example (symmetry roughly halves the multiplications) | About 5 multiplications per second-order section: about 20 in the example |
| Delay | Constant (N − 1)/2 samples: about 56 samples (about 1.2 ms) in the example | Varies with frequency: in the example about 9 samples at low frequencies and about 75 samples at the passband edge |
| Coefficient quantization (fixed point) | The frequency response changes slightly, but stability is never lost | Implementing a high-order equation directly can move poles and cause instability; it is implemented as a cascade of second-order sections (biquads) |
| Main design methods | Window method, equiripple (Parks-McClellan) method | Bilinear transform of an analog prototype (Butterworth, Chebyshev, elliptic and others) |
| Typical uses | Communications and measurement where the waveform shape must be kept, audio and image processing, decimation and interpolation filters, adaptive filters | Embedded devices that must save computation and memory, audio equalizers, DC removal and exponential smoothing |
Figures are typical orders of magnitude and vary by process generation and product.