Skip to main content

The Approximation Filter Cookbook

"Filter design" means two things depending on who you talk to. For music DSP practitioners, filter design typically means creating subtractive synthesis or EQ filters along the lines of Vadim Zavalishin's book The Art of VA Filter Design, sometimes with nonlinearities. In non-musical DSP and electrical engineering, however, filter design means something specific: designing a linear time-invariant filter that matches the frequency response of an ideal filter as much as possible, and taking into account the various engineering tradeoffs necessary to do so.

An "ideal filter" is an impossibly perfect design such as a sinc filter (a perfect rectangular lowpass) or a Hilbert transform (a perfect 90-degree phase shift across all frequencies). Most ideal filters have tractability issues, such as being noncausal or requiring infinite components, computation, or memory to implement. Thus an approximation filter -- my term -- is a filter that aims for ideality in some way.

This post was inspired by Robert Bristow-Johnson's "EQ Filter Cookbook," which describes mathematical expressions for digital second-order EQ filters. Similarly, the present article aims to provide a cookbook for IIR approximation filters: Butterworth, Chebyshev types I and II, and elliptic filters of the lowpass, highpass, bandpass, and notch varieties. There is nothing novel going on here except the convenience of having ready-to-use formulas, which I haven't seen anywhere online.