Introduction Moving Average Filters FIR Filters Code and data IIR Filters Transfer Functions

Infinite Impulse Response (IIR) Filters

We have covered FIR filters in a previous tutorial and the other main type of filter is the IIR filter. The diagram below shows an IIR filter:

We can see that the right half is a typical FIR filter (rotated on its side from the previous tutorial) and the other part of it is like an FIR filter that feeds it's output back into the input.

Because there is feedback, very complex behavior and long impulse responses can be achieved for a short delay line. They can be a bit more difficult to design and understand because of the feedback.

If we removed the left half, we would have an FIR filter and the impulse response would die off after 3 time-steps. With the feedback part, we keep recycling the signal, producing a much longer impulse response. This is why they are called INFINITE impulse response filters.

Let's drag an IIR filter to our application. They are all very similar but differ in subtly different ways. The best way to understand their differences is to experiment with them. We'll start with a Butterworth filter. IIR filters often derive their names from the mathematical functions that define their frequency responses.

Cut-off frequency

As you move the cursor, you can see that there is a handle that lets you change the "cut-off" frequency of the filter. You can also set this value in the properties dialog to the right. You will find that as you drag the handle, you control the filter's cut-off frequency.

IIR filter order

As with FIR filters, you can also adjust the length of the filter which gives a sharper response at the expense of more computer time, via the "Order" field.

IIR filter types - Low-pass, High-pass, Band-pass, Band-stop

By changing the Type (Low Pass/High Pass etc) of the filter, you can select the pattern of frequencies to pass or remove:

More complex filters can be made by combining multiple filters in series (chaining outputs to inputs) or parallel (summing outputs).

Elliptic IIR Filters

Let's look at a different IIR filter. Let's drag an IIR Elliptic Filter to our application. This is the most complex IIR filter but it will help us understand the other ones. Most of the other IIR filters can be made from the Elliptic Filter. This time there are handles to control the pass-band ripple, stop-band ripple, the width of the transition band and the cut-off frequency:

As with FIR filters, you will have to trade filter length (or order), transition band width and ripple with each other, depending on your requirements.

Let's experiment with the other IIR filters, you will find that they all differ in very subtle ways. In short, the differences can be summarized as:

  1. Butterworth - Flat passband and stopband. Wide transition band.
  2. Chebyshev - Controllable passband ripple. Flat stopband.
  3. Inverse Chebyshev - Controllable stopband ripple. Flat passband.
  4. Elliptic - Adjustable transition band width. Adjustable passband and stopband ripple are traded against each other
  5. Bessel - only the cut-off frequency can be adjusted. Bessel filters have a group delay that is reasonably constant across the passband (see below).

Phase distortion and group delay

While IIR filters are extremely fast and can provide very sharp changes in frequency response compared to FIR filters, they have at least one major drawback - phase distortion. Phase distortion occurs because signals of different frequencies are delayed differently when crossing the filter. Group delay is the amount of time that a signal of a specific frequency is delayed by the filter.

If you click on the graph's group delay icon, you will see a graph of group delay Vs frequency. If you do the same thing for an FIR filter, you see a straight horizontal line, meaning that all signals are delayed by equal amounts, which is good.

For elliptic filters, the group delay is especially noticeable at the edge of the pass-band. In the diagram below, signals at the edge of the passband at 12khz will be delayed 11 samples but signals in the middle of the passband, at 4.8khz will be delayed 3.1 samples.

Bessel Filters

The bessel filter is somewhat different from the other types of IIR filters. You will see that the variation of group delay

IIR Filter structure

If we look at the structure view, you will notice, that the filter has been split into smaller sub-filters, or sections called biquads, rather than one long filter. This is because they use feedback and having a large amount of feedback in the same filter can cause the filter to be unstable. Splitting it into biquads solves this problem. Biquad means bi-quadratic because the transfer function that defines the frequency response of each sub-filter is the ratio of two second order polynomials, or quadratics. We will cover these more in the next section.

In the next section, we will cover topics such as transfer functions, poles and zeros. After reading the next section, you should understand the Z-Plane and Transfer Function views and understand these concepts.

Introduction Moving Average Filters FIR Filters Code and data IIR Filters Transfer Functions