In signal processing, a finite impulse response (FIR) filter is a filter whose impulse response (or response to any finite length input) is of finite duration, because it settles to zero in finite time. This is in contrast to infinite impulse response (IIR) filters, which may have internal feedback and may continue to respond indefinitely (usually decaying). The impulse response (that is, the output in response to a Kronecker delta input) of an Nth-order discrete-time FIR filter lasts exactly N+1 samples (from first nonzero element through last nonzero element) before it then settles to zero. FIR filters can be discrete-time or continuous-time, and digital or analog.
Definition
For a causal discrete-time FIR filter of order N, each value of the output sequence is a weighted sum of the most recent input values:
y[n]=b0x[n]+b1x[n−1]+⋯+bNx[n−N]=∑i=0Nbi⋅x[n−i], where:
x[n] is the input signal, y[n] is the output signal, N is the filter order; an Nth-order filter has N+1 terms on the right-hand side bi is the value of the impulse response at the i'th instant for 0≤i≤N of an Nth-order FIR filter. If the filter is a direct form FIR filter then bi is also a coefficient of the filter. This computation is also known as discrete convolution. The x[n−i] in these terms are commonly referred to as taps, based on the structure of a tapped delay line that in many implementations or block diagrams provides the delayed inputs to the multiplication operations. One may speak of a 5th order/6-tap filter, for instance. The impulse response of the filter as defined is nonzero over a finite duration. Including zeros, the impulse response is the infinite sequence:
h[n]=∑i=0Nbi⋅δ[n−i]={bn0≤n≤N0otherwise. If an FIR filter is non-causal, the range of nonzero values in its impulse response can start before n=0, with the defining formula appropriately generalized.
Properties An FIR filter has a number of useful properties which sometimes make it preferable to an infinite impulse response (IIR) filter. FIR filters:
Require no feedback. This means that any rounding errors are not compounded by summed iterations. The same relative error occurs in each calculation. This also makes implementation simpler. Are inherently stable, since the output is a sum of a finite number of finite multiples of the input values, so can be no greater than ∑|bi| times the largest value appearing in the input. Can easily be designed to be linear phase by making the coefficient sequence symmetric. This property is sometimes desired for phase-sensitive applications, for example data communications, seismology, crossover filters, and mastering. The main disadvantage of FIR filters is that considerably more computation power in a general purpose processor is required compared to an IIR filter with similar sharpness or selectivity, especially when low frequency (relative to the sample rate) cutoffs are needed. However, many digital signal processors provide specialized hardware features to make FIR filters approximately as efficient as IIR for many applications.
A symmetric impulse response provides a mathematical condition for achieving a linear phase response. For a symmetric FIR filter of order N, the impulse response coefficients satisfy: h[n]=h[N−n],0≤n≤N. Under this condition, the frequency response can be expressed as: H(ejω)=e−jωN/2A(ω), where A(ω) is a real-valued function. This expression shows that the filter has a linear phase response and a constant group delay of N/2 samples, except at frequencies where the frequency response is zero. The constant group delay means that all frequency components are delayed by the same amount of time. Consequently, the relative phase relationships between frequency components are preserved. This property is particularly useful in audio signal processing, where preserving the waveform shape is important.
Frequency response The filter's effect on the sequence x[n] is described in the frequency domain by the convolution theorem:
ℱ{x∗h}⏟Y(ω)=ℱ{x}⏟X(ω)⋅ℱ{h}⏟H(ω) and y[n]=x[n]∗h[n]=ℱ−1{X(ω)⋅H(ω)}, where operators ℱ and ℱ−1 respectively denote the discrete-time Fourier transform (DTFT) and its inverse. Therefore, the complex-valued, multiplicative function H(ω) is the filter's frequency response. It is defined by a Fourier series:
H2π(ω) ≜∑n=−∞∞h[n]⋅(eiω)−n=∑n=0Nbn⋅(eiω)−n, where the added subscript denotes 2π-periodicity. Here ω represents frequency in normalized units (radians per sample). The function H2π(2πf′) has a periodicity of 1 with f′ in units of cycles per sample, which is favored by many filter design applications. The value ω=π, called Nyquist frequency, corresponds to f′=12. When the sequence x[n] has a known sampling-rate fs (in samples per second), ordinary frequency is related to normalized frequency by f=f′⋅fs=ω2π⋅fs cycles per second (Hz). Conversely, if one wants to design a filter for ordinary frequencies f1, f2, etc., using an application that expects cycles per sample, one would enter f1/fs, f2/fs, etc. H2π(ω) can also be expressed in terms of the Z-transform of the filter impulse response:
H^(z) ≜∑n=−∞∞h[n]⋅z−n. H2π(ω)=H^(z)|z=ejω=H^(ejω).
Filter design FIR filters are designed by finding the coefficients and filter order that meet certain specifications, which can be in the time domain (e.g. a matched filter) or the frequency domain (most common). Matched filters perform a cross-correlation between the input signal and a known pulse shape. The FIR convolution is a cross-correlation between the input signal and a time-reversed copy of the impulse response. Therefore, the matched filter's impulse response is "designed" by sampling the known pulse-shape and using those samples in reverse order as the coefficients of the filter. When a particular frequency response is desired, several different design methods are common:
… excerpt ends here. Continue reading the full article.





