<< Chapter < Page Chapter >> Page >

The basic parks-mcclellan formulation and algorithm

Parks and McClellan formulated the basic Chebyshev FIR filter design problem by specifying the desired amplitude response A ( ω ) and the transition band edges, then minimizing the weighted Chebyshev error overthe pass and stop bands. For the basic lowpass filter illustrated in [link] , the pass band edge ω p and the stop band edge ω s are specified, the maximum passband error is related to the maximum stop band error by δ p = K δ s and they are minimized.

Figure 1 is a graph titled Length-15 Optimal Chebyshev FIR Filter. The horizontal axis is labeled Normalized Frequency and ranges in value from 0 to 1 in increments of 0.2. The vertical axis is labeled Amplitude Response, A and ranges in value from 0 to 1 in increments of 0.2. The curve on the graph is broken up into three segments. The first, which is a sinusoidal section around vertical value 1 and from 0 to 0.3 horizontally. The horizontal width of this segment is labeled passband. After this segment, from 0.3 to 0.5 is a segment with a large, smooth continuation of the curve with negative slope bringing the curve from (0.3, 1) to (0.5, 0). The width of this section is labeled transitionband. The final section is another sinusoidal segment of the same amplitude as the passband section and a slightly longer wavelength. This section continues to the right edge of the figure along the horizontal axis, and it is labeled stopband.
Amplitude Response of a Length-15 Optimal Chebyshev Filter

Notice that if there is no transition band, i.e. ω p = ω s , that δ p + δ s = 1 and no minimization is possible. While not the case for a least squares approximation, a transition band is necessaryfor the Chebyshev approximation problem to be well-posed. The effects of a small transition band are large pass and stopband ripple as illustratedin [link] b.

The alternation theorem states that the optimal approximation for this problem will have an error function with R + 1 extremal points with alternating signs. The theorem also states that there exists R + 1 frequencies such that, if the Chebyshev error at those frequencies are equal and alternate in sign, it will be minimized over the pass band andstop band. Note that there are nine extremal points in the length-15 example shown in [link] , counting those at the band edges in addition to those that are interior to the pass and stopbands. For this case, R = ( L + 1 ) / 2 which agree with the example.

Parks and McClellan applied the Remez exchange algorithm [link] to this filter design problem by writing R + 1 equations using Equation 37 from FIR Digital Filters and Equation 1 from Design of IIR Filters by Frequency Transformations evaluated at the R + 1 extremal frequencies with R unknown cosine parameters a ( n ) and the unknown ripple value, δ . In matrix form this becomes

A d ( ω 0 ) A d ( ω 1 ) A d ( ω 2 ) A d ( ω 3 ) A d ( ω R ) = cos ( ω 0 0 ) cos ( ω 0 1 ) cos ( ω 0 ( R - 1 ) ) 1 cos ( ω 1 0 ) cos ( ω 1 1 ) cos ( ω 1 ( R - 1 ) ) - 1 cos ( ω 2 0 ) cos ( ω 2 1 ) cos ( ω 2 ( R - 1 ) ) 1 cos ( ω 3 0 ) cos ( ω 3 1 ) cos ( ω 3 ( R - 1 ) ) - 1 cos ( ω R 0 ) cos ( ω R 1 ) cos ( ω R M ) ± 1 a ( 0 ) a ( 1 ) a ( 2 ) a ( R - 1 ) δ .

These equations are solved for a ( n ) and δ using an initial guess as to the location of the extremal frequencies ω i . This design is optimal but only over the guessed frequencies, and we want optimality overall of the pass and stopbands. Therefore, the amplitude response of the filter is calculated over a dense set of frequency samples using Equation 34 from FIR Digital Filters and a new set of estimates of the extremal frequencies is found from the local minima and maxima and these are used to replace the initialguesses (they are exchanged). This process is iteratively performed until the guaranteed convergence is achieved and the optimal filter is designed.

The detailed steps of the Parks-McClellan algorithm are:

  1. Specify the ideal amplitude, A d ( ω ) , the stop and pass band edges, ω p and ω s , the error weight K where δ p = K δ s , and the length L .
  2. Choose R + 1 initial guesses for the extremal frequencies, ω i , in the bands of approximation, Ω . This is often done uniformly over the pass and stop bands, including ω = 0 , ω p , ω s , and π .
  3. Calculate the cosine matrix at the current ω i and solve [link] for a ( n ) and δ which are optimal over these current extremal frequencies, ω i .
  4. Using the a ( n ) or the equivalent h ( n ) from step 3, evaluate A ( ω ) over a dense set of frequencies. This amplitude response will interpolate A ( ω i ) = A d ( ω i ) ± δ at the extremal frequencies.
  5. Find R + 1 new extremal frequencies where the error has a local maximum or minimum and has alternating sign. This includes the band edges.
  6. If the largest error is the same as δ found in step 3, then convergence has occured and the optimal filter has been designed, otherwise,exchange the old extremal frequencies ω i used in step 2 and return to step 3 for the next iteration.
  7. This iterative algorithm is guaranteed to converge to the unique optimal solution using almost any starting points in step 2.

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Digital signal processing and digital filter design (draft). OpenStax CNX. Nov 17, 2012 Download for free at http://cnx.org/content/col10598/1.6
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Digital signal processing and digital filter design (draft)' conversation and receive update notifications?

Ask
Edgar Delgado
Start Test
Jordon Humphreys
Start Quiz
Sheila Lopez
Start Exam
Marion Cabalfin
Start Quiz