(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

In signal processing, a digital biquad filter is a second-order recursive linear filter, containing two poles and two zeros. "Biquad" is an abbreviation of "biquadratic", which refers to the fact that in the Z domain, its transfer function is the ratio of two quadratic functions:

$\ H(z)={\frac {b_{0}+b_{1}z^{-1}+b_{2}z^{-2}}{a_{0}+a_{1}z^{-1}+a_{2}z^{-2}}}$ The coefficients are often normalized such that a0 = 1:

$\ H(z)={\frac {b_{0}+b_{1}z^{-1}+b_{2}z^{-2}}{1+a_{1}z^{-1}+a_{2}z^{-2}}}$ High-order IIR filters can be highly sensitive to quantization of their coefficients, and can easily become unstable. This is much less of a problem with first and second-order filters; therefore, higher-order filters are typically implemented as serially-cascaded biquad sections (and a first-order filter if necessary). The two poles of the biquad filter must be inside the unit circle for it to be stable. In general, this is true for all filters i.e. all poles must be inside the unit circle for the filter to be stable.

## Implementation

### Direct form 1

The most straightforward implementation is the direct form 1, which has the following difference equation:

$\ y[n]={\frac {1}{a_{0}}}\left(b_{0}x[n]+b_{1}x[n-1]+b_{2}x[n-2]-a_{1}y[n-1]-a_{2}y[n-2]\right)$ or, if normalized:

$\ y[n]=b_{0}x[n]+b_{1}x[n-1]+b_{2}x[n-2]-a_{1}y[n-1]-a_{2}y[n-2]$ Flow graph of biquad filter in direct form 1:

### Direct form 2

The direct form 1 implementation requires four delay registers. An equivalent circuit is the direct form 2 implementation, which requires only two delay registers:

The direct form 2 implementation is called the canonical form, because it uses the minimal amount of delays, adders and multipliers, yielding in the same transfer function as the direct form 1 implementation. The difference equations for DF2 are:

$\ y[n]=b_{0}w[n]+b_{1}w[n-1]+b_{2}w[n-2],$ where

$\ w[n]=x[n]-a_{1}w[n-1]-a_{2}w[n-2].$ 