The biquad's output y[n] for input x[n] follows the direct-form I difference equation:
y[n]=b0x[n]+b1x[n−1]+b2x[n−2]−a1y[n−1]−a2y[n−2]
Taking the z-transform of both sides turns this recurrence into a rational function of z, the transfer function:
H(z)=1+a1z−1+a2z−2b0+b1z−1+b2z−2
The frequency response is what you hear: substitute z=ejω on the unit circle and the magnitude ∣H(ejω)∣ tells you how much the filter amplifies or attenuates each frequency ω.
Turning knobs into coefficients. Robert Bristow-Johnson's Audio EQ Cookbook (1994, updated 2021) gives closed-form formulas for every common filter shape. For a resonant low-pass filter with cutoff f0 and quality factor Q:
ω0=2πf0/fs,α=sin(ω0)/(2Q)
b0=21−cosω0,b1=1−cosω0,b2=b0,a0=1+α
a1=−2cosω0,a2=1−α(all divided by a0)
Poles and zeros. The two roots of the denominator polynomial are the filter's poles; the two roots of the numerator are its zeros. A pole close to the unit circle creates a peak in the response (resonance); a zero on the unit circle creates a perfect null. Moving the five coefficients moves the poles and zeros and thus sculpts the response curve.
Numerical stability. Because each output feeds back into itself, accumulated round-off errors can push an IIR filter to instability if the poles stray outside the unit circle. Well-designed coefficient formulas and double-precision arithmetic keep this risk vanishingly small for audio rates, but it is something digital filter designers always track.
See also: the discrete Fourier transform family that biquad filters complement in the frequency domain, and compression algorithms that lean on the same perceptual audio models.
Comments
Loading comments...