23
$\begingroup$

A question recently came up regarding Parks-McClellan and some of the comments point out that the wikipedia article on Parks-McClellan states,

...the Parks-McClellan algorithm is a variation of the Remez algorithm or Remez exchange algorithm.

Is there a difference in performance? Is the remez function in octave equivalent to the Matlab function firpm?

$\endgroup$

1 Answer 1

10
$\begingroup$

The Remez exchange algorithm is a generic iterative procedure to approximate any function optimally in the $L^\infty$ sense (i.e., give the best worst-case approximation or in other words, minimize the maximum error or minmax). The Parks-McClellan algorithm (PM) is a variation of the Remez exchange algorithm, applied specifically for FIR filters. From the wiki article you cited:

Thomas [Parks] drove from Houston to Princeton in order to attend a conference. At the conference, he heard Ed Hofstetter's presentation about a new FIR filter design algorithm (Maximal Ripple algorithm). He brought the paper by Hofstetter, Oppenheim, and Siegel, back to Houston, thinking about the possibility of using the Chebyshev approximation theory to design FIR filters. He heard that the method implemented in Hofstetter's algorithm was similar to the Remez exchange algorithm and decided to pursue the path of using the Remez exchange algorithm.

Without going into too much detail, the primary difference between the two algorithms is that the Remez exchange algorithm (RE) gives you conditions to design the optimal filter (specifically, see #3 here: the errors must be of equal weighted magnitude and alternating in sign). RE implements an iterative procedure to calculate polynomial coefficients (which can be mapped to FIR filter coefficients) that satisfy the above criterion, which is the "Alternation Theorem". The "E" in RE is the part of the procedure where the maxima in the error, that are used in the iterative procedure, are replaced by the new maxima, which are closer to the optimal values. PM uses Tchebyshev polynomials to convert polynomial coefficients to coefficients governing a series of cosine functions which are directly translated to symmetrical FIR coefficients.


Coming to your question about the remez function in Octave and the firpm function in MATLAB, I believe they're the same. MATLAB used to have a remez, which was phased out in favour of firpm. Octave probably still sticks to the former. Typing help remez in MATLAB R2011b gives the following:

REMEZ Parks-McClellan optimal equiripple FIR filter design.

REMEZ is obsolete.  REMEZ still works but may be removed in the future.
Use FIRPM instead.

See also FIRPM.
$\endgroup$
7
  • 1
    $\begingroup$ I infer that Mathworks changed the name remez to firpm since it was not a generic Remez solver, but rather the P-M incarnation of the Remez method. $\endgroup$ Sep 17, 2011 at 2:44
  • $\begingroup$ @MarkBorgerding I believe that is indeed the reason for the name change. However, it is still common to find people use the two terms interchangeably. $\endgroup$ Sep 17, 2011 at 2:49
  • 2
    $\begingroup$ I think a fair statement is: all Parks-McClellan implementations are Remez Exchange implementations, but the reverse is not true. In relation to filter design, I think they can be used interchangably. It would be (somewhat) like referring to an FFT as a DFT. $\endgroup$ Sep 17, 2011 at 3:07
  • $\begingroup$ how about firgr (in matlab)? $\endgroup$ Oct 11, 2011 at 4:12
  • $\begingroup$ @daurnimator what about it? $\endgroup$ Oct 11, 2011 at 4:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.