Page 395 - Analog and Digital Filter Design
P. 395

392 Analog and Digital Filter Design




                       FIR Filter Design Using the Remez Exchange Algorithm
                       The second FIR filter design method uses a mathematical process called the
                       Remez exchange algorithm. This sounds complicated, and indeed the algorithm
                       itself  is,  but  the  functionality  of  the  algorithm  is  quite  simple in  principle.
                       Sample values of the desired frequency response that is selected by the designer
                       are used as a model. The Remez exchange algorithm then tries to generate a set
                       of filter coefficients that will produce the same response as the model. The algo-
                       rithm is a curve-fitting method that minimizes the error between the model and
                       the flter. It is equi-ripple, in that the final response has equal errors above and
                       below the desired response. The equi-ripple method sometimes fails to find a
                       suitable solution, but it is still useful.

                       One of  the first considerations when designing an FIR filter is the number of
                       taps  required to achieve the desired performance. Providing more taps  than
                       necessary raises the cost by having to use a higher processor speed or additional
                       processors. The desired performance will not be met if insufficient taps are pro-
                       vided. The rules for determining the number of taps are somewhat empirical but
                       valuable nevertheless.



                        Number of Taps Needed by Variable Window  Functions
                       Variable windows have coefficient values that are dependent upon the attenua-
                       tion required. Also, the number of taps required varies with the desired level of
                       attenuation. Kaiser and Dolph-Chebyshev windows are good examples of vari-
                       able windows.

                       The number of taps required for a Kaiser window is given by N = 2M+ 1, where

                                   (As -7.99.n
                              A4 =
                                  14.36.(0,  -0,)

                       The term  As is  the stopband attenuation  in decibels, us is the stopband fre-
                       quency, and cop is the passband frequency. Hence,

                                             (As - 7.95)
                              N  = 1 + (int)
                                         14.36.G - fP)/fci0'k

                       fs is the stopband frequency, fp is the passband frequency, andfcork is the clock
                       frequency, all in Hertz.

                       Remember that the equation for 11f assumes that the sample clock is 1 Hz, or 2a
                       rads, so to convert to Hertz the passband and stopband frequencies have to be
                       multiplied by 2n. However, the a term introduced cancels the one in the numer-
                       ator. The term 2 introduced into the denominator can be cancelled by multi-
   390   391   392   393   394   395   396   397   398   399   400