Free Books

The BiQuad Section

The term ``biquad'' is short for ``bi-quadratic'', and is a common name for a two-pole, two-zero digital filter. The transfer function of the biquad can be defined as

$\displaystyle H(z) = g \frac{1 + \beta_1 z^{-1}+ \beta_2 z^{-2}}{1 + a_1 z^{-1}+ a_2 z^{-2}} \protect$ (B.8)

where $ g$ can be called the overall gain of the biquad. Since both the numerator and denominator of this transfer function are quadratic polynomials in $ z^{-1}$ (or $ z$), the transfer function is said to be ``bi-quadratic'' in $ z^{-1}$ (or $ z$). As derived in §B.1.3, for real second-order polynomials having complex roots, it is often convenient to express the polynomial coefficients in terms of the radius $ R$ and angle $ \theta$ of the positive-frequency pole. For example, denoting the denominator polynomial by $ A(z)=1 + a_1 z^{-1}+ a_2 z^{-2}$, we have

$\displaystyle A(z) = \left(1 - Re^{j\theta}z^{-1}\right)\left(1 - Re^{-j\theta}z^{-1}\right)
= 1 - 2R\cos(\theta)z^{-1}+ R^2z^{-2}.

This representation is most often used for the denominator of the biquad, and we think of $ \theta$ as the resonance frequency (in radians per sample-- $ \theta=2\pi f_c T$, where $ f_c$ is the resonance frequency in Hz), and $ R$ determines the ``Q'' of the resonance (see §B.1.3). The numerator is less often represented in this way, but when it is, we may think of the zero-angle as the antiresonance frequency, and the zero-radius affects the depth and width of the antiresonance (or notch). As discussed on page [*], a common setting for the zeros when making a resonator is to place one at $ z = 1$ (dc) and the other at $ z = -1$ (half the sampling rate), i.e., $ \beta_1=0$ and $ \beta_2=-1$ in Eq.$ \,$(B.8) above $ \Rightarrow B(z) = 1-z^{-2}= (1-z^{-1})(1+z^{-1})$. This zero placement normalizes the peak gain of the resonator if it is swept using the $ a_1$ parameter. Using the shift theorem for z transforms, the difference equation for the biquad can be written by inspection of the transfer function as
v(n) &=& g\, x(n) \\
y(n) &=& v(n) + \beta_1 v(n-1) + \beta_2 v(n-2) \\
& & \qquad - a_1 y(n-1) - a_2 y(n-2) .
where $ x(n)$ denotes the input signal sample at time $ n$, and $ y(n)$ is the output signal. This is the form that is typically implemented in software. It is essentially the direct-form I implementation. (To obtain the official direct-form I structure, the overall gain $ g$ must be not be pulled out separately, resulting in feedforward coefficients $ [g,g\beta_1,g\beta_2]$ instead. See Chapter 9 for more about filter implementation forms.)
Next Section:
Biquad Software Implementations
Previous Section:
Complex Resonator