Next: Infinite Impulse Response filters Up: Linear filters Previous: Linear filters

### Finite Impulse Response filters

A Finite Impulse Response (FIR) filter produces an output, y(n), that is the weighted sum of the current and past inputs, x(n).

This is shown in figure 4 with representing a unit delay.

Figure 4: A FIR filter

Consider supplying this filter with a sine wave, :

Using the identity :

The terms in parantheses are independent of time and hence the output is a sinusoid with amplitude:

and phase:

This method may be used to provide the amplitude and phase response for any FIR filter. The transform is called the Fourier transform (defined in section 4), and it has a simple inverse. Conversely the filter coefficents may be obtained from the desired filter response using the same technique.

As a simple example, consider a low pass filter where the desired response, is:

But this means we need an infinite number of filter coefficients! True enough - real ``brick wall'' filters are impossible and sharp filters are hard to design. Some solutions:

• truncate: simple and effective if cycles are short
• window: use the Hamming window - minimises the power in the side-lobes
• Use a more complex filter design package, for example Parks-McClelland Remez Exchange algorithm, which designs optimal zero-phase FIR filters with arbitrary frequency responses.

Matlab implements all these, for example ``fir1(14, 0.5)'' is a 15 tap low pass filter that has a cutoff at half the maximum frequency. The filter coefficents are a windowed sinc funtion, plotted in figure 5 and the amplitude response is plotted in figure 6.

Figure 5: Example filter coefficiants: plot(fir1(14, 0.5), '+')

Figure 6: Example filter response: freqz(fir1(14, 0.5))

FIR filters are computationally expensive to implement but need not introduce phase distortions - useful in processing high quality speech.

IIR filters are often much more efficient, but can not be designed to have exact linear phase.

Next: Infinite Impulse Response filters Up: Linear filters Previous: Linear filters

Speech Vision Robotics group/Tony Robinson