Parks-McClellan Algorithm
According to the IEEE Signal Processing Magazine, the Parks-McClellan Algorithm is implemented using the following steps:
- Initialization: Choose an extremal set of frequences {ωi(0)}.
- Finite Set Approximation: Calculate the best Chebyshev approximation on the present extremal set, giving a value δ(m) for the min-max error on the present extremal set.
- Interpolation: Calculate the error function E(ω) over the entire set of frequencies Ω using (2).
- Look for local maxima of |E(m)(ω)| on the set Ω.
- If max(ωεΩ)|E(m)(ω)| > δ(m), then update the extremal set to {ωi(m+1)} by picking new frequencies where |E(m)(ω)| has its local maxima. Make sure that the error alternates on the ordered set of frequencies as described in (4) and (5). Return to Step 2 and iterate.
- If max(ωεΩ)|E(m)(ω)| ≤ δ(m), then the algorithm is complete. Use the set {ωi(0)} and the interpolation formula to compute an inverse discrete Fourier transform to obtain the filter coefficients.
According the Professor Douglas Jones of the University of Illinois, the Parks-McClellan Algorithm may be implemented as the following:
- Make an initial guess of the L+2 extremal frequencies.
- Compute δ using the equation given.
- Using Lagrange Interpolation, we compute the dense set of samples of A(ω) over the passband and stopband.
- We Determine the new L+2 largest extrema.
- If the Alternation Theorem is not satisfied, then we go back to (2) and iterate until the Alternation Theorem is satisfied.
- If the Alternation Theorem is satisfied, then we compute h(n) and we are done.
To gain a basic understanding of the Parks-McClellan Algorithm mentioned above, we can rewrite the algorithm above in a simpler form as:
- Guess the positions of the extrema are evenly spaced in the pass and stop band.
- Perform polynomial interpolation and re-estimate positions of the local extrema.
- Move extrema to new positions and iterate until the extrema stop shifting.
Read more about this topic: Parks-Mc Clellan Filter Design Algorithm