DSP Toolkits

Home › Filter Design Toolkits

Filter Design Toolkits

A digital filter performs arithmetic on a discrete-time signal to suppress or emphasise part of its content, most often a frequency band. The two families are finite impulse response filters, which are non-recursive and can be made exactly linear-phase, and infinite impulse response filters, which are recursive and reach a given selectivity with far fewer coefficients.

The choice between them is a trade-off rather than a ranking. A linear-phase FIR filter preserves waveform shape, which matters for pulse and audio work, but needs a long impulse response and therefore more delay and arithmetic. An IIR filter is cheap and sharp but has non-linear phase and can be sensitive to coefficient quantisation.

fir design panel with magnitude response
FIR design panel with magnitude response
iir design panel with prototype selection
IIR design panel with prototype selection

Working from a specification

A filter specification is a set of band edges with a tolerance in each band: passband ripple, stopband attenuation and the transition width between them. The toolkit estimates the order needed to meet those limits, designs the filter, and marks any band where the result falls outside the mask.

Because several methods can satisfy the same mask, candidate designs are kept side by side. An equiripple FIR filter and a windowed design of the same order behave differently at the band edges, and the comparison makes that difference explicit.

inverse chebyshev design and its response
Inverse Chebyshev design and its response

From design to implementation

A design is only finished once it runs on the target. Coefficients are exported as floating-point or as a chosen fixed-point Q format, with the quantised response plotted against the ideal one. For IIR filters the toolkit also factors the transfer function into second-order sections, which is far better conditioned than a single high-order form.

filter design templates ready for insertion
Filter design templates ready for insertion
fir filter applied to a noisy record
FIR filter applied to a noisy record
filtered output and residual error
Filtered output and residual error