Consoles 967
tion, the contents of the input and output delay lines
move down one, such that the value in input delay 2 is
displaced by the former contents of input delay 1, which
is in turn filled by the last used input data sample;
similar actions occur in the output delay, only the last
calculated output sample enters the delay line.
In short, the biquad takes all of five coefficients, five
MACs (multiply and accumulates) and a bit of concur-
rent shuffling of data to happily create a second-order
high-pass, low-pass, or bandpass filter. They are very
quick and easy to implement in DSP. That it is the basic
building block of most digital EQ is hardly, therefore, a
surprise.
25.21.2.3 Coefficient Analysis
A look at the coefficients for the input 3-point FIR can
give a clue as to what class of filter the biquad is
running. (Actually, complicated only by the higher
number of coefficients, the same sort of analysis can be
done to longer FIR coefficient sets, too.) Fig. 25-136
shows three biquad coefficient sets. Set A shows equal
and opposite coefficients for b0 and b2, and none for b1.
A very low applied audio frequency (dc, or practically
so) will present substantially the same input signal level
over the three samples in the FIR; this means that what
is contributed to the MAC by the input sample by the b0
multiplication is going to be substantially canceled by a
similar size signal from b2 (b1 not contributing at all,
being zero). So low frequencies are not being passed.
By a similar token, a signal of half the sample frequency
(Fs/2) would have near identical values in the first and
third positions, i.e., being administered by b0 and b2;
since these coefficients are inverted this frequency gets
nulled too. The highest valid audio frequency (Fs/2) is
not being passed, and neither are very low frequencies.
With a bit of luck something in the middle will be, so
this is in all likelihood a bandpass filter.
On the second coefficient set, Fig. 25-136B, the
effect of multiplies by b0 and b2 are entirely canceled
by the effect of b1 at dc, yet by virtue of b0 and b2 not
being inverted with respect to each other, Fs/2 is not
nulled. The conclusion would be, if one didn’t already
know, that this was likely a high-pass filter.
The only apparently slightly misleading case is that
of the lowpass filter, Fig. 25-136C, which one would
expect to bung in a null at Fs/2, but doesn’t at first
glance seem to, being that the b0 and b2 coefficients are
the same. Aha! though. If one imagines the positive
peaks of an Fs/2 signal being coincident with b0 and b2,
then the b1 coefficient is coincident with the negative-
going peak—the b1 coefficient, being the sum of b0 and
b2, neatly cancels their effect by creating a negative
signal equal to their positive contributions at Fs/2.
Fig. 25-137 graphically shows these analysis results.
In short the input FIR is a dumb little filter of the same
class of the overall filter—and actually is what deter-
mines its class—the output feedback IIR structure in
effect determining the frequency and Q.
25.21.2.4 Filter Quantization Distortion
The output (recursive) stages of a biquad can cause
some pretty wild signal levels to be achieved in the
accumulator—they are, after all, little more than a
slightly complex feedback circuit; the output signal is
fed back in part through both delays in accord with their
a1 and a2 multiplies and grows until it (hopefully) stabi-
lizes. (This can be likened to operating a PA right on the
edge of feedback at microscopically varying degrees;
this is standard operating procedure with IIRs). Filters
that are either high in Q and/or more importantly very
low in frequency with respect to the sample rate (and
that, unfortunately, means most EQ-type frequencies)
exacerbate this effect. The cure is to only excite the filter
to the degree that the desired output is unity with respect
to the source; this is usually achieved by proportionally
scaling back the coefficients in the FIR input chain.
Looking at the coefficients in Fig. 25-136C, this can be
Figure 25-136. Biquad coefficient sets.
A.
48 k bpf 1000 Hz Q .707
b0 .292543
b1 0
b2 .292543
a1 1.98289
a2 .7074571
B.
48 k hpf 1000 Hz Q .707
b0 .9115751
b1 1.82315
b2 .9115751
a1 1.815318
a2 .8309824
C.
48k 1pf 1000 Hz Q .707
b0 3.916071E-03
b1 7.832143E-03
b2 3.916071E-03
a1 1.815318
a2 .8309824
Biquad coefficient sets for bandpass, high-pass, and low-pass
filters. Note the similarity in the a1 and a2 coefficients; the class
of filter is determined by the b0, b1 and b2 coefficients of the
input FIR structure.