# Formula for calculating IIR filter coefficients for a high order low pass?

I'm trying to make a filter for use in real-time audio processing and I'm trying to figure out how to produce coefficients for a low pass with a steep attenuation curve. I've found a few examples of b0, b1, b2, a1, a2 but I'd like to have the option of a high order filter, which to my knowledge means more coefficients. How are the extras calculated? I'd be extremely grateful for any help on this. Thanks!

• well, just like a second-order LPF has different shapes based on Q and also where the zeros might be, you have to decide on a shape (like Butterworth or Tchebyshev or Inverse Tchebyshev or Elliptic) then there are ways to get the coefficients. but a nice formula they ain't exactly. certainly not nice for the elliptic. – robert bristow-johnson Jan 13 at 1:58
• yup, would be super useful if you could actually state your design objectives – so, what is that filter going to be used for? What's its purpose? That might at least rule out certain filter types, and narrow this down. – Marcus Müller Jan 13 at 9:29

First, the equations you solve for the coefficients depend on what type of filter you're after. They also depend on how the equations are derived. For instance, a common case would be a Butterworth lowpass, converted from an analog prototype in the s-domain via the bilinear z transform. Converting a higher order lowpass with the bilinear transformation would yield a solution with more coefficients.

However, it's common practice to form higher order filters from second order sections in series, with a first order section if the filter order is odd. The responses of the individual filters multiply to give the overall higher order response. The reason for reducing a high-order filter to first and second order filter is that high-order filters are more sensitive to the limited precision of typical floating point fixed point math. The cascaded filters are all set to the same corner frequency, and the Q of each filter is set to a different values that, together, produce the intended overall Q.

Here's an article about how to produce higher-order Butterworth filters for first and second order sections, including a calculator that produces the Q values for filter orders up to 20: