<< Chapter < Page | Chapter >> Page > |
Minimizing filter length is important because in many applications the length of the filter determinesthe amount of computation. For example, an FIR filter of length may be directly implemented in the time domain by evaluating the expression
For each output value this expression requires multiplies and additions.
Oftentimes is a symmetric filter so that . If the filter is symmetric and is even, then [link] may be more efficiently computed as
This strategy reduces the computation to multiplies and adds for any value of The advantages of using such symmetries varies considerably with the implementation andapplication. On many modern computing architectures the computational cost of adds and multiplies are similar,and the overhead of control loops may eliminate the advantages of reduced operations. . Note that the computational effort is linearly proportional to the lengthof the filter.
The Kaiser filters do not guarantee the minimum possible filter length. Since the filter has equal passbandand stopband ripple, it will usually exceed design requirements in one of the two bands; this results in an unnecessarily longfilter. A better design would allow the stopband and passbandconstraints to be specified separately.
In 1972, Parks and McClellan devised a methodology for designing symmetric filters that minimize filter lengthfor a particular set of design constraints { , , , }. The resulting filters minimizethe maximum error between the desired frequency response and the actual frequency responseby spreading the approximation error uniformly over each band.The Parks and McClellan algorithm makes use of the Remez exchange algorithm and Chebyshev approximation theory.Such filters that exhibit equiripple behavior in both the passband and the stopband, and are sometimes calledequiripple filters.
As with Kaiser filters, designing a filter with the Parks and McClellan algorithm is a two step process.First the length (i.e. order) of the filter must be computed based on the design constraints.Then the optimal filter for a specified length can be determined. As with Kaiser windows, the filter length computation is approximateso the resulting filter may exceed or violate the design constraints. This is generally not a problem since the filter canbe redesigned for different lengths until the constraints are just met.
The Matlab command for computing the approximate filter length is
[n,fo,mo,w] = firpmord(f,m,ripple,2*pi)
where the inputs are:
f
- vector containing an even number
of band edge frequencies. For a simple low pass filter,
f=[wp,ws]
, where
wp
and
ws
are the passband and stopband frequencies, respectively.m
- vector containing the ideal filter magnitudes
of the filter in each band. For a simple low pass filter
m=[1,0]
.ripple
- vector containing the allowed ripple in
each band. For a simple low pass filter
ripple=[delta_p,delta_s]
, where
delta_p
and
delta_s
are the passband and stopband
ripples, respectively.2*pi
- value, in radians, that corresponds to the
sampling frequency.Notification Switch
Would you like to follow the 'Purdue digital signal processing labs (ece 438)' conversation and receive update notifications?