Finite impulse response
From Wikipedia, the free encyclopedia
A finite impulse response (FIR) filter is a type of a digital filter. It is 'finite' because its response to an impulse ultimately settles to zero. This is in contrast to infinite impulse response filters which have internal feedback and may continue to respond indefinitely.
Contents |
[edit] Discussion
We start the discussion by stating the difference equation which defines how the input signal is related to the output signal
where P is the filter order, x(n) is the input signal, y(n) is the output signal and bi are the filter coefficients. The previous equation can also be expressed as
To find the impulse response we set
- x(n) = δ(n)
where δ(n) is the Kronecker delta impulse. The impulse response for an FIR filter follows as
The Z-transform of the impulse response yields the transfer function of the FIR filter
We note that Z{δ(n)} = 1 then with the definition of the impulse response and the time shift property of the Z-transform follows
The transfer function allows us to judge whether or not a system is BIBO stable. To be specific the BIBO stability criterion requires all poles of the transfer function to have an absolute value smaller than one. In other words all poles must be located within a unit circle in the z-plane. To find the poles of the transfer function we have to extend it with and arrive at
The FIR transfer function contains P poles for z = 0. Since all poles are at the origin, all poles are located within the unit circle of the z-plane; therefore all FIR filters are stable.
[edit] Properties
A FIR filter has a number of useful properties which sometimes make it preferable to an infinite impulse response filter. FIR filters:
- Are inherently stable. This is due to the fact that all the poles are located at the origin and thus are located within the unit circle.
- Require no feedback. This means that any rounding errors are not compounded by summed iterations. The same relative error occurs in each calculation.
- Can have linear phase
- Can have minimum phase
[edit] Filter design
To design a filter means to select the coefficients such that the system has specific characteristics. The required characteristics are stated in filter specifications. Most of the time filter specifications refer to the frequency response of the filter. There are different methods to find the coefficients from the specifications:
- Window design method
- Weighted least squares design
- Minimax design
- In practice the equiripple design is often used.
Software packages like MATLAB and GNU Octave provide convenient ways to apply these different methods.
[edit] Moving average example
A moving average filter is a very simple FIR filter. The filter coefficients are found via the following equation
for
To provide a more specific example, we select the filter order
- P = 2
The impulse response of the resulting filter is
The following figure shows the block diagram of such a second order moving average filter.
To discuss stability and spectral topics we take the z-transform of the impulse response
The following figure shows the pole-zero diagram of the filter. Two poles are located at the origin, and two zeros are located at ,
The frequency response is
The following figure shows the absolute value of the frequency response. Clearly, the moving average filter leaves low frequencies unaffected and blocks high frequencies. This is a typical low pass filter characteristic.
The following figure shows the phase response.
[edit] See also
- Digital filter
- Electronic filter
- Filter (signal processing)
- Infinite impulse response (IIR) filter
- Z-transform (specifically Z-transform#Linear_constant_coefficient_difference_equation)
- Filter design
- Cascaded Integrator-Comb Filter