# What is the difference between Remez exchange and Parks-McClellan filter design?

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?

## 1 Answer

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.

• 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. – Mark Borgerding Sep 17 '11 at 2:44
• @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. – Lorem Ipsum Sep 17 '11 at 2:49
• 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. – Mark Borgerding Sep 17 '11 at 3:07
• how about firgr (in matlab)? – daurnimator Oct 11 '11 at 4:12
• @daurnimator what about it? – Lorem Ipsum Oct 11 '11 at 4:29