An FIR Filter or finite impulse response filter follows directly from the tutorial information on convolution and impulse responses for systems. The fundamental equation of an FIR filter is shown next both in a difference equation format and a graphical format. The z-1 means a delay by a single sample.
Remember that all digital signal controllers and digital signal processors are optimized for a multiply accumulate instruction in a single cycle (MAC). It is this MAC that provides the performance, today up to 3 times faster than more general purpose engines (it might be as much as 10X for some procesors). The signal flow graph clearly shows how the MAC instruction coupled with some smart coefficient look ups offer great signal processing performance. For the FIR Filters in question, the algorithm of N terms can be computed in just N clock cycles!
A key factor related to FIR Filters is their response relative to infinite impulse response filters (IIR). FIR Filters have a linear phase response, which means that all of the frequencies are delayed by a fixed number of samples, and a very flat pass band. In comparison, IIR filters have a non linear phase response (different frequencies delayed by a variable number of samples), sharper cutoff and ripple in the pass band. It is these differences that lead us to choose different filters for different purposes.
If FIR Filters with an impulse response of N terms can be computed in N clocks, does this mean that if the impulse response is infinite that the processing must take an infinite number of clocks? It could be approximated like this with a large number of terms but there is an easier means to include a large number of past samples – simply include the past output to include these terms. Using this approach we have IIR filters which are shown mathematically and graphically.
The IIR filter signal flow graph and equation show that the inclusion of past output values to compute new outputs reduces the number of terms and clocks required significantly. It also provides sharper cutoff frequencies and much higher attenuation in the stop band.
FIR Filters and IIR Filters are a simple and indispensable pair of DSP modules in your signal processing library, particularly for simple applications.