# What's the use of the ripple in the Equiripple method and their effect in the filtering process?

I read about the design methods of FIR filter which are: windowing method, sampling frequency method and Equiripple method. And I don't understand the use of the ripple in the Equiripple method and their effect in the filtering process. Can anyone help me?

• What is your question, exactly? What "ripple" is? – Marcus Müller Mar 26 '17 at 16:26
• @Marcus Müller when we design a low pass FIR filter with MATLAB we should choose the design method f the filter and we should indiquate the passband ripple so i don't understand the meaning of that. – root Mar 26 '17 at 17:56
• @Dan Boschen ok I understand now thank you – root Mar 26 '17 at 19:20

There is ripple to three different degrees depicted in this plot:

ripple is the variance that the filter gain is from the target gain. in the above, there are 3 different frequency segments with 3 different target gains (well, two target gains are the same), and three different error weighting factors.

first frequency segement, from 0 to 0.2 Nyquist: target gain $-\infty$ dB gain (linear gain = 0, a "stopband"), about -67 dB maximum stopband gain (ripple = 0.00045).

second frequency segment, from 0.2 to 0.6 Nyquist: target gain 0 dB (linear gain = 1, a "passband"), about $\pm \tfrac38$ dB deviation from 0 dB (ripple = 0.44).

third frequency segment, from 0.6 to 1.0 Nyquist: target gain $-\infty$ dB gain (another stopband), about -47 dB maximum stopband gain (ripple = 0.0045).

you will see that the ripple (in linear error terms) times the weighting (100, 1, 10) is about constant.

ripple is error. it is the deviation of gain in the actual FIR filter from what your set target is. this error with each band, besides being a tradeoff between each other (given a fixed number of FIR taps), it is a tradeoff with the steepness of the transition bands. at least this is the case with the choice of FIR design method. if the total "average" error is what is salient, then your design method might be least-squares (firls() in MATLAB) and if the maximum error (in each band) is what is important, then the design method is likely Parks-McClellan (firpm()).

now, theoretically, windowed FIR design using a good window (like Kaiser) can sorta compete with the two "optimized" and iterative methods above and there will also be a measure for ripple, but usually the ripple viewed as linear gain, is the same in the passband as in the stopband, but in dB is more in the stopband. you can hardly see any passband ripple using a Kaiser-windowed design. and the Kaiser-windowed designed FIR is maybe just a little longer than the optimal Parks-McClellan design, given the same transition band and stopband attenuation.

The "optimal" P-McC design will show ripple (whatever you allow in the tradeoff) in the passband and that might make the Kaiser-windowed design look a lot better to you. Sometimes i pick a simple Kaiser-window design over P-McC, particularly if i want to upsample by just a factor of two. In that case, if it's a windowed-sinc, i need not compute half of my output samples because i am copying them from the input (the P-McC does not have that feature). but if i am upsampling by 4 or more, the P-McC will have shorter FIRs, enough so to make up for the requirement to compute the output sample instead of copying.

The ripple is an artifact of the polynomial used to create the filter (related to the order of the polynomial/ filter). Thus the FIR will have ripple and we want to minimize it to meet our design requirements. Passband ripple will introduce leading and trailing echos to our waveform, so it is not a desired feature we are trying to get but an artifact of the filter that we want to minimize.

Also see the following post for similar details on passband (and stopband) ripple: what's the pass band ripple and stop band attenuation of a digital filter?

Equiripple is a specification criteria for passband and/or stopband ripple. In many cases, specifying the ripple peaks to be equal leads to the minimization of the maximum ripple peak, thus possibly satisfying some minimax optimization criteria. So equiripple methods are often used when trying to design filters that can be said to be "optimal" for certain filter specification criteria.

However optimizing one set of frequency domain criteria can also lead to sub-optimal performance for other criteria, such as the minimizing of visible pre/post echoes in the time domain response.