Comparisson IIR and FIR filters

There are lots of discussion in the DIY loudspeaker community, if digital loudspeaker crossover filters should be designed using IIR (infinite impulse response) or FIR (finite impulse response) filters. As IIR-capable DSPs are usually cheaper, many people use them.

This short article should give some information about advantages and disadvantages of both filter types.

Comparison of IIR and FIR filters

IIR FIR
 Feedback  yes  no
 Latency  low  high
 Processing complexity  low  high
 Comparable to analog circuits  yes  no
 Linear phase filtering  no  yes

One argument often used pro FIR and contra IIR filters is the phase response. It is possible, to design FIR filters, that change the frequency response, but not the phase response – so-called linear phase filters. However, have a look at real circuits and even a loudspeaker. No real circuit with capacitors or inductors used for filtering is a linear-phase system. Also a loudspeaker chassis changes its phase response depending on the frequency. Even in high-end speakers, passive LC-crossovers introduce phase shifts. It seems, that a changing phase response is not the worst thing in the world.

There are two major disadvantages of FIR filters: the need a lot of processing power and they introduce a longer delay than IIR filters. Depending on the hardware used, the first issue might not be a disadvantage. But the delay can be a problem in many use cases.



Are FIR filters bad? No, but you should understand the differences of IIR and FIR filters and then decide what kind of filtering you need. For loudspeaker crossovers, IIR filters often work well – as the old school passive filters did before.

References

3 thoughts on “Comparisson IIR and FIR filters

  1. Torsten Jaekel

    Just to add:
    IIR filters can be unstable (oscillate, if filter coefficients are incorrect), FIR not.
    All real circuits, e.g. LC, RC, loudspeaker crossover etc. are IIRs (analog circuits). FIR is only possible with digital processing (FPGAs, DSPs, micro-processors).
    Correct, for a similar filter transfer function (impulse response), an FIR filter needs much more filter taps (my rule of thumb: 5-10 times more), therefore larger delay (which matters just for real-time or bi-directional applications).
    Finite because: no feedback (predictable, no history from output signals to incorporate on input, therefore always stable).
    Not all filter characteristics are possible with FIR but FIR is much easier to implement, including to have a filter gain (or to compensate attenuation).
    FIR can be implemented often with fixed point DSP operations (called MAC, Multiply-and-Accumulate).
    Processing power: FIR needs just more filter taps (stages, elements), on parallel processing units such as FPGA and some DSPs not really “power hungry” (in terms of clock speed). On single-core micro-processors for sure but consider the benefit to avoid floating point operations (often needed on IIR).
    FIR is often used on signal upsampling, e.g. audio rate conversion 48 -> 192 KHz.

    Reply
    1. Daniel Post author

      Some notes on IIR:
      In general, IIR filters can be unstable, however for normal audio filtering, the math is well-documented. Therefore it is not a problem in practical applications.
      Fixed-point DSP processing works on FIR and IIR. IIR filters are also just a bunch of Multiply-and-accumulate operations. Many low-end DSPs use fixed point arithmetics. For normal audio filters, this works very well without the need of floating point arithmetics.

      Reply

Leave a Reply