
A finite impulse response (FIR) filter is a type of a digital filter. The impulse response, the filter's response to a Kronecker delta input, is 'finite' because it settles to zero in a finite number of sample intervals. This is in contrast to infinite impulse response filters which have internal feedback and may continue to respond indefinitely. The impulse response of an Nth order FIR filter lasts for N+1 samples, and then dies to zero.
Contents |
|
|
This article or section reads like a textbook and may need a cleanup. Please help to improve this article to make it neutral in tone and meet Wikipedia's quality standards. |
We start the discussion by stating the difference equation which defines how the input signal is related to the output signal
![\ y[n]=b_0 x[n] + b_1 x[n-1] + \cdots + b_N x[n-N]](http://upload.wikimedia.org/math/1/7/f/17f7e2c4e5fa57179f9a9effe9690893.png)
where x[n] is the input signal, y[n] is the output signal and bi are the filter coefficients. N is known as the filter order; an Nth-order filter has (N + 1) terms on the right-hand side; these are commonly referred to as taps.
The previous equation can also be expressed as a convolution of filter coefficients and the input signal.
![\ y[n] = \sum_{i=0}^{N} b_i x[n-i].](http://upload.wikimedia.org/math/d/3/3/d33998541fe958c6c3e1765e0ff35dea.png)
To find the impulse response we set
![\ x[n] = \delta[n]](http://upload.wikimedia.org/math/2/8/f/28f280744d077339a36da5dd6bb2c369.png)
where δ[n] is the Kronecker delta impulse. The impulse response for an FIR filter is the set of coefficients bn, as follows
![\begin{align}
h[n] &= \sum_{i=0}^{N}b_i \delta[n-i] \\
&= b_n.
\end{align}](http://upload.wikimedia.org/math/5/d/a/5da1b6004b16da6423019b0a248a64e3.png)
for
to
.
The Z-transform of the impulse response yields the transfer function of the FIR filter
![\begin{align}
H(z) &= Z\{h[n]\} \\
&= \sum_{n=-\infty}^{\infty} h[n] z^{-n} \\
&= \sum_{n=0}^{N}b_n\,z^{-n}.
\end{align}](http://upload.wikimedia.org/math/3/0/1/301ce6314cadbaee085e64a540e57609.png)
FIR filters are clearly bounded-input bounded-output (BIBO) stable, since the output is a sum of a finite number of finite multiples of the input values, so can be no greater than
times the largest value appearing in the input.
An FIR filter has a number of useful properties which sometimes make it preferable to an infinite impulse response filter. FIR filters:
The main disadvantage of FIR filters is that considerably more computation power is required compared with a similar IIR filter. This is especially true when low frequencies (relative to the sample rate) are to be affected by the filter.
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 frequency specifications:
Software packages like MATLAB, GNU Octave and Scilab provide convenient ways to apply these different methods.
Some of the time, the filter specifications refer to the time-domain shape of the input signal the filter is expected to "recognize". The optimum matched filter is to sample that shape and use those samples directly as the coefficients of the filter -- giving the filter an impulse response that is the time-reverse of the expected input signal.
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:

The impulse response of the resulting filter is:
![h[n]=\frac{1}{3}\delta[n]+\frac{1}{3}\delta[n-1]+\frac{1}{3}\delta[n-2]](http://upload.wikimedia.org/math/1/6/2/1624bc7c4352ab7f8b541abd9b83012f.png)
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, for frequency ω in radians per sample, is:

The following figure shows the absolute value of the frequency response. Clearly, the moving-average filter passes low frequencies with a gain near 1, and attenuates high frequencies. This is a typical low-pass filter characteristic. Frequencies above π are aliases of the frequencies below π, and are generally ignored or filtered out if reconstructing a continuous-time signal.
The following figure shows the phase response.
Why are we here?
All text is available under the terms of the GNU Free Documentation License
This page is cache of Wikipedia. History