3
$\begingroup$

For an efficient and optimized digital FIR filter design, there are two methods available broadly, Equiripple filter design & Least Squares filter design. A general method for designing a filter is also Frequency Sampled FIR design but it is not an optimized design

The basic knowledge I have is that Equiripple filter, as the name suggests, has equal ripples in passband & stopband, which means the signal distortion that happens at the edge of the passband due to presence of a large ripple is avoided in Equiripple design BUT, Equiripple design has a large transition band, thus limiting the total passband width.

On the other hand, in a Least Squares design, the transition band width is smaller than for Equiripple design, hence the passband width is more, but the passband ripple are not equi-ripple & exhibit a spike at the passband edge due to Gibbs phenomenon, which causes signal distortion at the edge.

My question is can somebody present or quote the all the differences & advantages over other, in a technical language, for the Equiripple design vs Least squares design of digital low pass FIR filter.

$\endgroup$
  • 1
    $\begingroup$ what @JasonR said. the equiripple design (Parks-McClellan) will have less maximum error than the least-squares design at the expense of having more mean-square error. also it should be noted that weighting factors can be applied and the equiripple design need not require that passband ripple be the same as the stopband ripple. $\endgroup$ – robert bristow-johnson May 22 '14 at 5:54
  • $\begingroup$ @robertbristow-johnson I also want to know what's the effect on signal in the case of these two, in terms of distortion. Is it that equal ripple has uniform albeit larger distortion & least squares has smaller albeit non liner distortion. Also which is preferred $\endgroup$ – KharoBangdo May 22 '14 at 6:15
  • $\begingroup$ well, filters, in and of themselves, don't distort. whether they have ripple or not. FIRs designed with either Parks-McClellan or Least-Squares, are linear-phase as well as just linear (as in "LTI"). $\endgroup$ – robert bristow-johnson May 24 '14 at 5:15
5
$\begingroup$

While I completely agree with Jason R's answer, I would like to add a few things that I consider important. First of all, it is a misunderstanding to believe that for least squares designs the transition band width is smaller than for equi-ripple designs. The width of the transition band depends on many design parameters but it is independent of the optimality criterion. With both criteria you can define arbitrary transition bands ("don't care regions") where you simply do not specify a desired response. This has to be done explicitly for the Parks-McClellan algorithm, but it can (and should) also be done for least squares designs. The most basic least squares design which is to simply truncate the Fourier series of a (often discontinuous) desired frequency response, is definitely no benchmark for comparing least squares designs with other optimality criteria.

The second important thing to notice is that the least-squares design and the equi-ripple design are two extreme points on a trade-off curve between maximum error and error energy. While the least squares design minimizes the error energy, its maximum error is relatively large, and the opposite holds for the equi-ripple design. So it is desirable - and possible - to mix the two criteria. One way of doing this is to use a constrained least squares criterion which minimizes the error energy while constraining the maximum error to some desired limit. In many cases it is desirable to have an equi-ripple design in the passband of a filter and to minimize the (weighted) least squares error in the stopbands, because then the maximum distortion of the signal is minimized, while the noise power in the stopbands is also minimized. The following example shows such a design. It is a linear-phase FIR bandpass filter of order 100, with a constraint on the maximum error in the passband (in this case resulting in an equi-ripple design in the passband), and with minimal error energy in the stopbands. The top figure shows the magnitude of the frequency response in dB, and the bottom figure shows the magnitude of the frequency response in the passband. Clearly, we have an equi-ripple approximation in the passband, and a least squares approximation in the stopbands.

enter image description here

$\endgroup$
  • $\begingroup$ Hi Matt: I don't suppose you could provide a resource for generating these filters - I find it really interesting, and would like to know more. $\endgroup$ – Tom Kealy Jan 13 '16 at 14:21
  • 2
    $\begingroup$ @TomKealy: Sure I can. It's in my thesis. $\endgroup$ – Matt L. Jan 13 '16 at 14:26
  • $\begingroup$ @MattL., Looks very interesting. Is there a MATLAB Code for those? Thank You. $\endgroup$ – Royi Aug 16 '16 at 8:34
  • $\begingroup$ @Drazick: Yes, in my profile you can find the link to my site; there go to 'PhD thesis' where you'll find a download link for the matlab files. Note that they are VERY old, and you might need to change a few things to adapt them to the Matlab / Octave version you use. On my site you'll also find an email address, in case you have any questions. $\endgroup$ – Matt L. Aug 16 '16 at 8:59
3
$\begingroup$

One main difference is the cost function used in the two design methods:

  • Equiripple filters seek to minimize the maximum error between the desired filter response and the designed approximation.

  • Least-squares filters seek to minimize the total squared error betwen the desired filter response and the designed approximation.

These different strategies lead to the different characteristics observed in the two methods' results, a number of which you noted in your question.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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