FIR Filter Design

Statistics
Introduced by
Thomas W. Parks and C. Sidney Burrus
Year
1987
Type
Finite Impulse Response filter design
Family
Frequency filtering

What does it do?

Finite impulse response (FIR) filters compute each output as a weighted sum of a finite number of current and past input samples, so their impulse response is zero after a finite number of samples.

Because no past outputs are fed back, they are stable for any coefficient values, and symmetric coefficient sets give exactly linear phase. This makes FIR filters a common choice when phase distortion must be controlled.

The intuition behind the method

An FIR filter's output is a weighted sum of recent input samples, and the weights are the filter's impulse response. With no feedback path, there are no poles that could lie outside the stable region, so stability does not depend on the coefficient values. The cost is selectivity: a narrow transition band between passband and stopband needs many taps, so an FIR filter is usually longer than an IIR filter with a comparable magnitude response. For a linear-phase design, the group delay is fixed by the filter length, so longer filters also add more delay. The trade-off is acceptable when stability and phase linearity matter more than computational cost and latency.

History

Windowing, least-squares and equiripple optimisation are established approaches to FIR design. Parks and Burrus's Digital Filter Design (1987) is cited on this page as a reference text on digital filter design. The Parks-McClellan algorithm, widely used for optimal equiripple FIR design, is a distinct method from the general approaches above. FIR filters became more practical as computation became cheaper, which made their higher order acceptable in many applications.

When to use it

Choose an FIR filter when the design must be stable without checking pole locations, when linear phase is required (which needs symmetric or antisymmetric coefficients), or when filtering is part of a multirate or polyphase chain. It suits waveform-sensitive work such as pulse shaping and biomedical signal filtering, where the shape of the signal matters. For real-time biomedical use, compare the filter's group delay with the acceptable latency before choosing an FIR design. Where the latency or computation budget is tight, an IIR design, possibly with a phase-correction step or zero-phase offline filtering, may be more appropriate. Avoid an FIR design when a narrow transition band would force a very long filter under a tight latency budget, or when computation is severely limited and the phase distortion of an IIR filter is acceptable.

Limitations and considerations

  • For the same transition band and attenuation, an FIR filter needs a substantially higher order than an IIR filter, because it has no poles to sharpen the response.
  • Arithmetic cost per output sample grows with the filter length, so long filters are expensive in real-time or low-power implementations.
  • The group delay of a linear-phase FIR filter grows with its length, which is a problem when the system has a strict latency limit.
  • Linear phase requires symmetric or antisymmetric coefficients, which constrains the set of achievable responses.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • The feed-forward structure means the output depends only on inputs, so stability does not depend on coefficient values or pole locations.
  • Symmetric coefficient sets give exactly linear phase, so the group delay is the same at all frequencies and the signal shape is preserved within the passband.
  • Several design methods (windowing, Parks-McClellan, least-squares, frequency sampling) let the designer trade passband ripple against stopband attenuation.
  • There is no feedback loop, so rounding errors are not recirculated through the filter; finite word length mainly changes the realised response through coefficient quantisation.
  • The filter structure supports polyphase decomposition, which makes sample-rate conversion efficient.

Applications

  • Linear-phase filtering of ECG and EEG signals, where waveform shape matters for interpretation.
  • Pulse shaping and channel filtering in digital communication systems.
  • Polyphase structures for sample-rate conversion and multirate processing.
  • Offline audio processing where a fixed delay is acceptable and phase must be preserved.
  • Frequency shaping in hearing aids and cochlear implants where the processing delay is within the device's latency budget.

How it works

How it works

1

Specify the desired response: the passband and stopband edges, the transition bandwidth between them, and the allowed passband and stopband ripple.

2

Express the band edges relative to the Nyquist frequency (half the sampling rate), so the specification is tied to the sampling rate and the design constraints are stated consistently.

3

Choose a design method (windowing, Parks-McClellan, least-squares, or frequency sampling) and estimate the filter length needed for the transition bandwidth and the required attenuation. A narrower transition band requires a longer filter.

4

Compute the coefficients with the chosen method. Each method approximates the ideal response with a finite-length filter, through truncation with a window, optimisation, or sampling of the frequency response.

5

Check the magnitude response against the specification. Measure passband ripple as the maximum deviation from the ideal gain, in dB or linear units, and stopband attenuation as the minimum attenuation across the stopband, in dB. Confirm that the coefficients are symmetric or antisymmetric, which is the condition for linear phase, and that the phase response is consistent with a constant group delay. Re-check the magnitude response after coefficient quantisation, because finite word length can move the realised response away from the design. If the specification is not met, revisit the filter length or the design method. Once the response meets the specification, implement the filter as a convolution of the coefficients with the input signal.

Common pitfalls

  • Choosing a filter length that is too short for the transition band and accepting a stopband that misses the specification, instead of increasing the length.
  • Truncating the ideal response with a rectangular window produces large stopband ripple near the band edge; use a tapered window or an optimal design method.
  • Ignoring the constant group delay of a linear-phase design when the filtered output must line up in time with other signals.
  • Assuming the designed coefficients give the intended response without checking the quantised coefficients, since finite word length moves the realised response away from the design.

Frequently asked questions

What is the relationship between FIR and IIR filter order?

An FIR filter generally needs a substantially higher order than an IIR filter that meets the same magnitude specification, particularly for narrow transition bands. This is the main trade-off: the FIR filter gains guaranteed stability and, with symmetric coefficients, linear phase, at the cost of more taps and more computation. The exact ratio depends on the specification, so the practical comparison is to design both and check their lengths.

What are the common FIR design methods?

The main methods are windowing (simple, but with less direct control over the response), frequency sampling (flexible, but the response between sample points is less predictable), least-squares (minimises the mean-squared error over the bands), and Parks-McClellan (optimal equiripple design for a given length). Parks-McClellan is generally preferred when the frequency response requirements are stringent.

Can FIR filters have non-linear phase?

Yes. Coefficient sets that are neither symmetric nor antisymmetric give non-linear phase. Symmetric designs give exactly linear phase, which is usually desirable for avoiding phase distortion. Asymmetric designs are used where linear phase is not required; whether they offer any ripple advantage depends on the specification and is not assumed here.

How does group delay affect FIR filter applications?

A linear-phase FIR filter has a constant group delay, so every frequency component is delayed by the same amount, and the size of that delay is set by the filter length. In latency-critical uses such as voice communication, a long filter's delay can be unacceptable. In offline audio processing or analysis, the delay is usually not a concern and can be removed by shifting the output in time.

Related methods

Sources

  1. Parks, T. W., & Burrus, C. S. (1987). Digital Filter Design. John Wiley & Sons.

    Open publication reference
  2. Oppenheim, A. V., Schafer, R. W., & Buck, J. R. (1999). Discrete-Time Signal Processing (2nd ed.). Prentice Hall.

    Open publication reference