Anda di halaman 1dari 3

In this applicaon note, we will explain the dierence between FIR ("nite impulse response") and IIR

("innite impulse response") ltering.

Innite impulse response (IIR) lters


IIR lters are the most ecient type of lter to implement in DSP (digital signal processing). They are usually
provided as "biquad" lters. For example, in the parametric EQ block of a miniDSP plugin, each peak/notch
or shelving lter is a single biquad. In the crossover blocks, each crossover uses up to 4 biquads. Each band
of a graphic EQ is a single biquad, so a full 31-band graphic EQ uses 31 biquads per channel.

The amount of processing that is required to compute a biquad is relavely small. This is what enables the
low-cost miniDSP products to implement a full acve crossover with parametric EQ on all input and output
channels. The DSP (digital signal processor) on each board can compute a certain number of biquads, and
this is the primary thing that determines how many lters are available in each plugin.

The miniDSP biquads can be programmed using the crossover parameters (slope and frequency), the
parametric lter parameters (center frequency, gain, and Q), and so on. They can also be programmed with
custom lter shapes by directly entering the biquad coecients - ve numbers that are used to compute the
biquad output from its input. You can generate these coecients by using the community-contributed
custom biquad programming spreadsheet (/images/les/les/All_digital_coefs_v1-20101026.zip).

Finite impulse response (FIR) lters


An FIR lter requires more computaon me on the DSP and more memory. The DSP chip therefore needs
to be more powerful. miniDSP products that support FIR ltering include the OpenDRC (/products
/opendrc-series) and the miniSHARC kit (/products/minidspkits/minisharc-kit).

FIR lters are specied using a large array of numbers. In the case of the OpenDRC, there are 6144
coecients (or "taps") per channel. In the case of the miniSHARC, there are a total of 10240 taps assignable
to all input and output channels. Generaon of this large array of numbers must be done in a separate
program, such as rephase (hp://sourceforge.net/projects/rephase/), Acourate (hp://www.audiovero.de
/en/acourate.php), and others.

FIR ltering has these advantages over IIR ltering:

1. It can implement linear-phase ltering. This means that the lter has no phase shi across the
frequency band. Alternately, the phase can be corrected independently of the amplitude. See
examples below.
2. It can be used to correct frequency-response errors in a loudspeaker to a ner degree of precision
than using IIRs.

However, FIRs can be limited in resoluon at low frequencies, and the success of applying FIR lters
depends greatly on the program that is used to generate the lter coecients. Usage is generally more
complicated and me-consuming than IIR lters.

Examples of FIR and IIR


Here we will provide some simple examples to illustrate the dierence between FIR and IIR.

Crossover lter
In a two-way crossover lter, the low pass and high pass outputs are sent to the woofer and tweeter
respecvely and are summed acouscally. We can simulate this behavior electrically - the gure below
shows the measured phase response of a summed fourth-order Linkwitz-Riley crossover (24 dB/octave) at
300 Hz in blue. The phase of this crossover shis by 360 degrees from low frequencies to high frequencies.

Shown in red is the measured output from a crossover with the same amplitude response curves, but
implemented with a linear-phase FIR lter. The phase shi is very close to zero across the audio band.

Parametric lter
Parametric lters also have a phase shi. Consider a parametric lter with this response:

Below is the measured phase shi of this lter, in blue as implemented by an IIR lter, and in red as
implemented by a linear-phase FIR lter. Again, the linear-phase lter has minimal phase shi across the
audio band.

Note that somemes the phase shi shown above is desirable, as it acts to correct phase as well as
amplitude errors in (for example) the speaker driver being corrected. FIR lters can implement this curve
either way: with the phase shi (minimum phase) or without it (linear phase).

Summary
FIR lters are more powerful than IIR lters, but also require more processing power and more work to set
up the lters. They are also less easy to change "on the y" as you can by tweaking (say) the frequency
seng of a parametric (IIR) lter. However, their greater power means more exibility and ability to nely
adjust the response of your acve loudspeaker.

Anda mungkin juga menyukai