FIR Filters

From AstroBaki

Jump to: navigation, search

[edit] Short Topical Videos

[edit] Reference Material


1 Finite Impulse Response (FIR) filters

Schematic diagram of an FIR filter where sample delays (Z), coefficient multiplication (b), and summation are used to convolve the input waveform x is by the coefficients b. This convolution in time corresponds to a multiplication in frequency, making the output samples, yi, reflect a frequency-filtered version of xi.

FIR filters are digital circuits that are used to filter an input signal in frequency. As shown above, samples of a signal, xi, propagate through the chain of delays along the top of the diagram as the circuit is clocked. At each clock, the set of N samples of x (where N is called the number of “taps" in the FIR filter) held in this chain of delays is multiplied by N coefficients, b_0\dots b_{N-1}, and then summed. While the coefficients remain constant — each associated with one tap — the input samples continue to shift through the circuit. In effect, this results in the input waveform x being convolved by the coefficients b, as in the equation:

  y(\tau ) = [b*x](\tau ) = \int {b(t)\cdot x(\tau -t)~ dt}. \,\!

When x, b, and y are discretely sampled, this convolution becomes

  y(t_ i) = \sum _{j=0}^{N-1}b(t_ j)\cdot x(t_{i-j}), \,\!

which is precisely the arithmetic that the FIR filter circuit implements. In particular, note how the samples of b (which increase left-to-right in the figure above), are multiplied by samples of x that are in the opposite order. For example, in a 4-tap FIR filter, 4 samples of b\equiv [b(t_0), b(t_1), b(t_2), b(t_3)] are multiplied by 4 samples of x in reversed order [x(t3),x(t2),x(t1),x(t0)] before the products are all summed together to produce y(t0) = b(t0)x(t3) + b(t1)x(t2) + b(t2)x(t1) + b(t3)x(t0). Note that the output sample for y is labeled t0, but because the logical steps of multiplication and summation, the first valid sample of the convolved signal may appear several clock cycles after the input signal is multiplied. This delay in the output (called the “latency”) is a common artifact of digital signal processing circuits, and is usually not a problem.

1.1 Coefficient Selection

FIR filters implement different filtering shapes, depending on the values chosen for b. By the convolution theorem, b(t) represents the Fourier transform of the frequency filter that is applied. Usually, the amplitude of this filter as a function of frequency is the most important feature; the (complex) phase of the output is of less importance. This, combined with the fact that windowing functions may be desired to reduce spectral leakage and to optimize filter flatness, roll-off, or stop-band rejection, can complicate the choice of FIR coefficients. Many design tools exist for optimizing FIR filter coefficients.

1.2 Optimizations

One common optimization in FIR filters is to use only real-valued coefficients for b. While the resulting filter must necessarily be symmetric between positive and negative frequency components, this constrain is often worth the factor of ˜2 reduction in the computational complexity of the FIR filtering operation. (Real-valued multiplies require approximately half the operations complex multiplies require). Another common optimization in FIR filters is to implement half-band, quarter-band, etc. filters, where a large number of the FIR coefficients end up being 0. Since such coefficients can be implemented by stripping out the multiplier circuit and omitting the tap from the summation, this optimization can similarly save a significant fraction of resources.

1.3 Number of Taps

Finally, the number of taps in an FIR filter affects the sharpness of the filter. This can be easily understood by recognizing that the number of taps determines the length of time over which the filter operates, and sharp features in frequency require longer time intervals to represent. In fact, for those who are familiar with “poles" in analog filters (1 pole = -6dB; people talk about, e.g., a 6-pole Butterworth filter), each tap in an FIR filter is equal to 1 pole.

Personal tools