Page 223 - Anatomy of a Robot
P. 223

08_200256_CH08/Bergren  4/10/03  4:39 PM  Page 208
                             208 CHAPTER EIGHT
                             DSP Filter Design
                             DSP filters are engines that do just exactly that: They process digital signals. DSP filters
                             process digital data in an organized way. DSP can be accomplished in hardware Field-
                             Programmable Gate Array (FPGAs) or the processing can be done in software. Even a
                             general-purpose computer can perform DSP calculations. DSP filters are a mathemati-
                             cal construct that can be realized in various physical ways. We will discuss the mathe-
                             matical structure first and the physical implementation much later in a separate section.
                             Until we get to that section, none of the following discussion refers to specific physical
                             implementations. This is a discussion in mathematical terms.
                               DSP filters process a digital stream that represents a signal. The stream of data will
                             be recomputed in a coordinated way to form the output stream of the filter. It is the
                             nature of the computation that gives the DSP filter the desired frequency transfer func-
                             tion. DSP filters can be constructed in many ways, but a few standard ways exist for
                             building such a filter. A standard DSP filter is defined by its structure: a generic
                             sequence of arithmetic operations executed on the input data stream. To make a custom
                             filter, designers take a standard DSP filter and modify it. Tools and formulae convert
                             the custom filter transfer function to a set of alterations of the standard DSP filter. The
                             alterations, when made, turn the standard DSP filter into the custom filter. To actually
                             construct the custom filter, the designers map both the standard DSP filter and the cus-
                             tom alterations to a physical implementation.
                               One of the simpler standard structures for a DSP filter is the Finite Impulse Response
                             (FIR) filter shown in Figure 8-11. The data sequences through a linear series of regis-
                             ters called taps. At each sampling clock, the data moves to the next tap. After the last
                             tap, the data is discarded. The output of the FIR filter at each clock is generally a sin-
                             gle data element formed by combining all the data in all the taps. The data in each tap
                             is multiplied by that tap’s coefficient and the results are summed to make the output
                             data. It is the vector of coefficients that turns the standard DSP FIR structure into the
                             custom FIR filter. Once the designers decide that a custom FIR filter can be built with
                             the standard FIR structure (a process to be discussed later), few design tasks remain
                             other than the generation of the coefficients.
                               The coefficients for a FIR filter can be designed in many ways. We would need
                             another whole book to describe all the methods. Instead, we’re going to describe per-
                             haps the simplest, most general way to design a FIR filter. The technique uses Fourier
                             transforms and a technique called windowing. We won’t go fully into exactly why this
                             technique works, but rather how it works.
                               The technique is general because it enables the construction of a filter with an arbi-
                             trary frequency transfer function. The designer can describe a custom-shaped frequency
   218   219   220   221   222   223   224   225   226   227   228