Z Systems rdq-6 Instruction Manual - page 23
rdq-6 instruction manual
z-systems audio laboratories
23
appendix C: finite wordlength digital filtering
Two of the primary challenges facing designers of digital filters are dealing with quantization
error and dealing with roundoff noise. Quantization error refers to a digital filter’s sensitivity
to coefficient quantization within a fixed-wordlength system, as occurs any time a real-world
processor is used to implement the digital filter. Roundoff noise is a more difficult problem to
treat because of the cumulative numerical precision problems that arise whenever a recursive
or “recirculant” algorithm is used to implement the filter. Both of these problems can occur
with fixed- and floating-point processors.
In a nutshell, the types of digital filters that found in audio equalization are implementing a
difference equation of the form
y(k) = b
0
x(k) + b
1
x(k-1) + b
2
x(k-2) – a
1
y(k-1) – a
2
y(k-2) (Equation 1)
where x(k) is the input and y(k) is the output [1]. The frequency-selective behavior of the filter
is determined by the set of parameters {b
0
,b
1
,b
2
,a
0
,a
1
} and “recipes” for determining these
parameters as a function of center frequency, bandwidth, and gain are readily available. One
can readily see from Equation 1 that the difference equation is recursive – there is feedback.
In the presence of an impulse (a signal, x(k), that is equal to 1 for k=0 and equal to 0 for all
other times), the difference equation will continue to produce a non-zero output signal since
future values of y are computed as a function of past values of y. This is known as an infinite
impulse response (IIR) filter. One can also see how computational errors as a result of finite
precision can recirculate through the filter.
There are many different ways to compute the difference equation given by Equation 1. For
example, there are different ways to arrange the order of summation and products, or there
are alternative formulations to realize the same output y(k) as a “rearrangement” of different
intermediate sums and products. Whatever the realization, the order and structure of
computations is referred to as a “filter architecture.”
The textbook architecture for realizing Equation 1 is known as the direct-form architecture.
The direct form architecture has two principal advantages. First, it is simple to derive from the
canonical difference equation above. Second, it is simple to implement and can be run in
real-time with very few instructions. Unfortunately, the direct-form has some significant
drawbacks: abysmal quantization and roundoff noise performance. In many applications, the
roundoff noise is so large that the direct-form filter architecture is all but unusable. For
example, consider implementing a peaking filter. It turns out that the roundoff noise power is
a function of the bandwidth, center frequency, and gain. As the bandwidth decreases, the
noise increases. As the gain increases, the noise increases. As the center frequency
decreases, the noise increases. In fact, implementing a narrow filter at low center frequencies
with any peaking is all but impossible with the direct-form architecture.
There is a counterintuitive axiom that experienced digital filter designers are familiar with.
Filter architectures that are simple to implement (few multiplies and adds) tend to have poor
finite-wordlength performance. Architectures tend to need to be complicated in order to
perform well from the standpoint of roundoff noise. This was recognized in the early days of