[Components] Design Finite Impulse Response Digital Filters Precise FIR digital filters can be designed with the help of a popular mathematical modeling program and an understanding of basic performance trade-offs. Ricardo A. Losada | ED Online ID #7229 | January 2004
Linear-phase equiripple filters are desirable because they have the smallest maximum deviation from the ideal filter when compared to all other linear-phase FIR filters of the same order. Equiripple filters are ideally suited for applications in which a specific tolerance must be met, such as when designing a filter with a given minimum stopband attenuation or a given maximum passband ripple. For example, the earlier Kaiser-window design example was of 42nd order. With this same order, an equiripple filter (with fixed transition width) can be designed that is superior to the Kaiser-window design: br = remez(42,[0 0.37 0.43 1], [1 1 0 0]); Figure 4 shows the superposition of the passband details for the filters designed with the Kaiser window and with the "remez" function, with the maximum deviation appearing smaller for the "remez" design. In fact, since the filter is designed to minimize the maximum ripple (minimax design), the optimization process guarantees that no other linear-phase FIR filter of the 42nd order will have a smaller peak ripple for the same transition width. Equiripple designs may not be the best design approach to minimize the error between the ideal and the designed filter's passband and stopband energy. A least-squares design approach is preferable to reduce the energy of a signal as much as possible in a certain frequency band. For example, for the same transition width and filter order as the earlier equiripple filter, a least-squares FIR design can be computed from: bls = firls (42, [0 0.37 0.43 1], [1 1 0 0]); The stopband energy for this case is:
where: Ha(ejv) is the frequency response of the filter. In this case, the stopband energy for the equiripple filter is approximately 1.7608e-004 while the stopband energy for the least-squares filter is 3.3106e-005. (As a reference, the stopband energy for the Kaiser-window design for this order and transition width is 6.1646e-005.) While the equiripple design has less peak error, it has more total error, measured in terms of its energy. The stopband details for both the equiripple design and the least-squares design are shown in Fig. 5. An advantage of an FIR filter compared to an infinite-impulse-response (IIR) filter is the ability to attain exact linear phase in a straightforward manner. As mentioned previously, a linear-phase characteristic implies a symmetry or antisymmetry property for the filter coefficients. Nevertheless, the symmetry of the coefficients constrains the possible designs that can be attained. For a filter with N + 1 coefficients, only N/2 + 1 of these coefficients is freely assignable (assuming that N is even). The remaining N/2 coefficients are immediately determined by the linear-phase constraint. This can be thought of as reducing the search space for an optimal solution. The idea is depicted in Fig. 6.7 Region A of the graph represents the set of all linear-phase FIR filters that meet a given set of specifications. This set contains both the optimal equiripple and the optimal least-squares filters mentioned so far. Region B represents the set of all FIR filters that meet a set of specifications, regardless of their phase characteristic, with Region A contained within Region B. Without the linear-phase constraint (i.e., if the application at hand does not require a linear-phase characteristic), it is possible to design minimum-phase equiripple filters that are superior to optimal equiripple linear-phase designs based on a technique described in ref. 8. For example, the following minimum-phase design has both smaller peak passband ripple and smaller peak stopband ripple than the linear-phase equiripple design: bm = gremez (42, [0 0.37 0.43 1], [1 1 0 0], [1,10], 'minphase') It should be noted that this is not a totally unconstrained design. The minimum-phase requirement restricts the resulting filter to have all of its zeros on or inside the unit circle.2 Due to the requirement on the loci of the zeros, minimum-phase designs are not completely unconstrained. A general nonlinear-phase design algorithm is provided in the "firlpnorm" function. Consider the following specifications: a cutoff frequency of 0.375π rads/sample, a transition width of 0.15π rads/sample, maximum passband ripple of 0.008, and maximum stopband ripple of 0.0009. A 30th-order FIR equiripple filter (with nonlinear phase) can be designed to meet this set of specifications using the "firlpnorm" function: blp = firlpnorm (30, [0 .3 .45 1], [0 .3 .45 1], [1 1 0 0], [1 1 10 10]); This 30th-order design is in sharp contrast to a linear-phase filter, which would require a 37th-order architecture. By comparison, a minimum-phase equiripple filter designed using the "gremez" function would also require a 30th-order filter to meet the specifications. The fact that two different nonlinear-phase filters of the same order meet the same specifications illustrates the difficulty associated with nonlinear-phase designs in general. There is no longer a unique optimal solution to a given design problem. Figure 7 shows the virtually identical magnitude responses. In contrast, Fig. 8 shows the different impulse responses.
| |||||||||||||||||||||||||||||||||||||||||||||||||||
Resources

RSS















