What is FIR filter?

A digital filter whose impulse response ends after a finite length (finite impulse response filter). It computes y[n] = Σh[k]x[n − k], multiplying the present and past N inputs by coefficients and adding them, and has no output feedback. Its poles lie only at z = 0, so it is always stable whatever the coefficients, and symmetric coefficients give linear phase, delaying every frequency component by (N − 1)/2 samples. On the other hand, a steep response needs many taps, and each output sample takes as many multiply-accumulate operations as there are taps.

Japanese name: FIRフィルタ

FIR filter appears in 9 practice questions across 2 topics, including Digital Signal Processing Basics, A/D and D/A conversion.

Field: Digital Signal Processing Basics

Structure and workload

The structure lines up delay elements that each delay the input by one sample, multiplies the value at each stage by a coefficient and adds the results; the chain of delay elements is called a tapped delay line. N taps need N multiply-accumulates per output sample: running 256 taps at 44.1 kHz, for example, takes about 11.3 million multiply-accumulates per second. This is why DSPs have instructions that perform a multiply-accumulate in one cycle, or dedicated MAC units.

Design methods

The most basic method is the window method: the impulse response of the ideal response (a sinc function for a low-pass filter) is cut to a finite length and multiplied by a window function to soften the effect of the ends. The Parks-McClellan method, which minimizes the maximum error from the specified frequency response, is also widely used. In both, more taps bring the response closer to the ideal.

Linear phase and delay

An FIR filter with symmetric coefficients delays every frequency component by the same time, so it preserves the shape of pulses and audio waveforms. The delay is (N − 1)/2 samples, about 1.04 ms for 101 taps at 48 kHz. Where delay matters, linear phase is sometimes given up for a minimum-phase FIR filter with a smaller delay.

Try it: questions about FIR filter

An FIR filter with transfer function H(z) = 1 + z⁻² (y[n] = x[n] + x[n − 2]) runs at a sampling frequency of 8 kHz. Which of the following is the frequency of a sine-wave input for which the output is 0?

  1. A1 kHz
  2. B2 kHz
  3. C4 kHz
Show answer and explanation

Answer: B. 2 kHz

The solutions of 1 + z⁻² = 0, that is, the zeros, are z = ±j from z² = −1, which lie on the unit circle at ω = ±π/2. ω = π/2 corresponds to f = ω·fs/(2π) = fs/4 = 2 kHz; a 2 kHz sine wave has exactly the opposite sign two samples earlier, so the sum is 0. A zero on the unit circle creates a notch that completely removes that frequency. At 4 kHz (the Nyquist frequency), z⁻² = 1, so the gain is 2.

Which of the following is a characteristic of an FIR (finite impulse response) filter?

  1. AIt has feedback from the output to the input side, so a steep response can be obtained with few coefficients
  2. BIts impulse response continues forever, so it easily becomes unstable when its coefficients are quantized
  3. CIt has no feedback, so it is always stable, and symmetric coefficients give it linear phase
Show answer and explanation

Answer: C. It has no feedback, so it is always stable, and symmetric coefficients give it linear phase

An FIR filter only multiplies the present and past inputs by coefficients and adds them; it has no output feedback. Its impulse response ends after the number of coefficients (taps), and its poles lie only at z = 0, so it is stable whatever the coefficient values. With symmetric coefficients it has linear phase, delaying every frequency component by the same time and preserving the shape of the waveform. In exchange, a steep response needs more taps than an IIR filter.

FAQ

How do I choose between FIR and IIR filters?

FIR filters suit cases that need linear phase, guaranteed stability or low sensitivity to coefficient quantization. IIR filters suit cases that need a steep response with little computation and small delay, but their phase is not linear and instability from coefficient quantization must be watched.

What determines the number of taps?

The narrower the transition band (the width from the passband to the stopband) and the greater the stopband attenuation, the more taps are needed. As a rule of thumb, the number of taps is proportional to "sampling frequency ÷ transition-band width", and the proportionality factor grows with the required attenuation.

FIR filter in the explanations

Questions that mention FIR filter (9)

  1. An FIR filter with transfer function H(z) = 1 + z⁻² (y[n] = x[n] + x[n − 2]) runs at a sampling frequency of 8 kHz. Which of the following is the frequency of a sine-wave input for which the output is 0?
  2. Which of the following is a characteristic of an FIR (finite impulse response) filter?
  3. Which of the following 5-tap FIR filters has linear phase?
  4. Which of the following is the group delay of a 101-tap linear-phase FIR filter (with symmetric coefficients)?
  5. A 256-tap FIR filter runs in real time at a sampling frequency of 44.1 kHz. Which of the following is the number of multiply-accumulate (MAC) operations needed per second?
  6. An FIR filter output is computed for every sample at a sampling frequency of 48 kHz on a processor clocked at 200 MHz that performs one multiply-accumulate per cycle. Ignoring the time for other processing, which of the following is closest to the maximum number of taps that can be processed in real time?
  7. In an FIR filter computation, products of 16-bit fixed-point data and coefficients are represented in 32 bits, and 256 of these products are added up. Which of the following is the minimum accumulator width that guarantees no overflow during the computation?
  8. In a delta-sigma ADC, which digital circuit converts the fast, coarse quantized output into high-resolution data at a lower sampling rate?
  9. Which of the following is a correct precaution when implementing a high-order IIR filter in fixed point with coefficients of limited bit width?

Books on Digital Signal Processing Basics Ad

As an Amazon Associate I earn from qualifying purchases.

Related terms

Linear phase IIR filter Nyquist frequency Impulse response Group delay Saturating arithmetic Delta-sigma ADC Decimation Fixed point Convolution

Back to the glossary