Finite Impulse Response (FIR) Filters

Digital filters that have an impulse response which reaches zero in a finite number of steps are (appropriately enough) called Finite Impulse Response (FIR) filters. An FIR filter can be implemented non-recursively by convolving its impulse response (which is often used to define an FIR filter) with the time data sequence it is filtering. FIR filters are somewhat simpler than Infinite Impulse Response (IIR) filters, which contain one or more feedback terms and must be implemented with difference equations or some other recursive technique.

IDL's DIGITAL_FILTER function computes the impulse response of an FIR filter based on Kaiser's window, which in turn is based on the modified Bessel function. The Kaiser filter is "nearly optimum in the sense of having the largest energy in the mainlobe for a given peak sidelobe level" [Jackson, Leland B., Digital Filters and Signal Processing]. The DIGITAL_FILTER function constructs lowpass, highpass, bandpass, or bandstop filters. The figure below plots a bandstop filter which suppresses frequencies between 7 cycles per second and 15 cycles per second for data sampled every 0.02 seconds.

Figure 8-9: Bandstop FIR Filter

sigprc11iplot.gif

Example Code
Type @sigprc10 at the IDL prompt to run the batch file that creates this display. The source code is located in sigprc10, in the examples/doc/signal directory. See Running the Example Code if IDL does not find the batch file.

Other FIR filters can be designed based on the Hanning and Hamming windows (see Using Windows), or any other user-defined window function. The design procedure is simple:

  1. Compute the impulse response of an ideal filter using the inverse FFT.
  2. Apply a window to the impulse response. The modified impulse response defines the FIR filter.

The figure below shows the plot using the same sampling period and frequency cutoffs as above, and the corresponding ideal filter is constructed in the frequency domain using the Hanning window.

Figure 8-10: Bandstop Filter Using Hanning Window

sigprc12iplot.gif

Example Code
Type @sigprc11 at the IDL prompt to run the batch file that creates this display. The source code is located in sigprc11, in the examples/doc/signal directory. See Running the Example Code if IDL does not find the batch file.