Handbook for Sound Engineers

(Wang) #1

798 Chapter 23


related by the Fourier transform. Digital filters make use
of extensively recursive algorithms involving multiplica-
tions and additions, for which digital signal processors
(DSPs) are optimized. The precision of the sampled data
in magnitude and time is an important factor, not only at
the input and output but all through the calculations.


23.5.1 FIR Filters


A finite impulse response (FIR) filter performs the
convolution in the time domain of the input signal and
the impulse response of the filter. While FIR filters are
simple in concept and easy to design, they can end up
using large amounts of processing power relative to
other designs. Hundreds of multiplications per sample
are often needed. They are, however, inherently stable
as there are no feedback loops that can get out of control
when finite precision arithmetic is used. They can also
be designed to have linear phase, preserving wave
shape and having a constant time delay for all frequency
components.


The FIR filter structure is shown in Fig. 23-22. Each
Z^1 is a delay that represents one unit of time equivalent
to the sample period of the system. The notation derives
from the Z domain transform, which is a way of
expressing transfer functions in a discrete time form.
The recursive nature of the algorithm is apparent, with
the multiply and add sections being repeated for every
sample in the stored impulse response.


The FIR filter treats each incoming sample as an
input impulse stimulus and generates an output that is a
truncated copy of the impulse response scaled by the
magnitude of that sample. The summing of the results
from each successive sample by superposition generates
the full output signal. The result for each output sample
in a filter with M coefficients is

(23-58)

where,
n is the sample number,
x(n) is the nth input sample value,
h(m) is the mth filter coefficient value,
y(n) is the nth output sample value.

This requires the storage of M1 previous input
samples and is executed in M multiply and add opera-
tions per sample.

23.5.1.1 FIR Coefficients

The coefficient values for an FIR filter are generally
computed in advance and stored in a look-up-table for
reference while the filter is operating.
Consider the ideal, or brick wall, digital low-pass
filter with a cutoff frequency of Z 0 rad s^1. This filter
has magnitude 1 at all frequencies less than Z 0 and
magnitude 0 at frequencies between Z 0 and the Nyquist
frequency. The impulse response sequence h(n) for a
filter normalized for frequencies between 0 and Sis

(23-59)

This filter cannot be implemented as an FIR since its
impulse response is infinite. To create a finite-duration
impulse response, we truncate it by applying a window.
By retaining the central section of impulse response in
this truncation, you obtain a linear phase FIR filter. The
length of the filter primarily controls the steepness of
the cutoff, while the choice of window function allows
you to trade off between pass band and stop band ripple,
Fig. 23-23.

Figure 23-21. Switched capacitor equivalent of a resistor.


Figure 23-22. Block diagram of an FIR filter.


V 1 V 2

C
GND

Z^1 Z^1 Z^1

h(0) h(1) h(2) h(3)

333

yn x
m 0=

M

= ¦ nm– uhm

hn 1
2 S

------ H ZejwZndZ


  • S


S

= ³

1
2 S

------ ejZn


  • Z 0


Z 0

= ³ dZ

Z 0
S

------ c

Z 0
S

------n
©¹
= sin §·
Free download pdf