FIR Filter
Canonical Definition
A finite impulse response filter is a discrete-time feedforward filter whose output is a weighted sum of a finite set of present and past input samples. Its coefficients define the impulse response directly. FIR filters can be linear phase, minimum phase, maximum phase, or another phase shape; finite impulse response does not by itself imply linear phase.
The coefficient symmetry and design method determine phase. The platform, scaling, sample rate, and implementation determine whether the intended filter is actually produced.
Basic Form
y[n] = h[0]x[n] + h[1]x[n-1] + ... + h[N]x[n-N]
The coefficients h[n] are the filter taps and also the filter impulse response. Applying them to audio is convolution.
Phase Choices
| Design | Time behavior | Tradeoff |
|---|---|---|
| Linear phase | Constant group delay through the designed band when coefficients are symmetric or antisymmetric | Usually more bulk delay and energy distributed around the aligned main event |
| Minimum phase | Energy concentrated as early as the magnitude target allows | Nonlinear phase and frequency-dependent group delay |
| Mixed or custom phase | Magnitude and phase shaped toward a stated target | Needs careful causality, latency, regularization, and spatial verification |
Length And Resources
More taps give more time support and design freedom, but do not guarantee better sound or a universal frequency resolution. Required length depends on sample rate, transition width, passband ripple, stop-band attenuation, phase target, correction time span, and hardware limits.
Memory and instruction use scale with the implementation. Direct convolution and partitioned FFT convolution can implement the same filter response while producing different processing latency and resource tradeoffs.
Linear-Phase Delay
For a symmetric linear-phase FIR of order N, the group delay is:
delay samples = N / 2
latency seconds = N / (2 × sample rate)
Do not apply this formula to an arbitrary asymmetric, minimum-phase, or mixed-phase FIR. Also add buffer, transport, converter, and device latency when evaluating the complete signal path.
Import And Verification
- Record coefficient count, format, sample rate, scaling, phase design, and expected peak gain.
- Mute the physical output before loading the coefficient set.
- Verify channel assignment and compare the implemented impulse and transfer response with the design.
- Measure total latency and channel-to-channel delay.
- Check digital headroom, DAC output, analog clipping, noise, and driver protection.