# Convert a Park McClellan FIR Solution to Achieve Stop-band Roll-off

Often it is more desirable to have a roll-off versus frequency of the rejection in the stopband; for example resampling filters where all the alias image locations fold into the first Nyquist Zone. What is a VERY simple change you can make to the coefficient solution provided by the Parks-McClellan algorithm that will convert the "equiripple" stopband to one that rolls off with greater rejection (at the expense of exceeding target limits near the transition, and increasing passband ripple)? Note: This is a great "trick" that I learned from fred harris.

Note- for full credit please explain why this "trick" works.

To help illustrate the end result, see the plot below showing a standard design using P-McC before and after the simple modification. Here we see the stop band rejection with a roll-off instead of being flat, but increased passband ripple and degraded rejection immediately near the beginning of the stopband, but overall significantly better rejection.

Before (blue) and after (red) modifcation to filter coeff. Note the region close to the transition where the stop band is worst, but overall rejection is much better:

• It would be interesting to see a plot of such a modified Parks McClellan filter, together with the original filter, just to get an idea. Feb 18, 2017 at 19:44
• Good idea, that will be helpful. Will create one now and add it. Feb 18, 2017 at 19:48
• yeah, and i got my tricks with P-McC that are useful for interpolation/sample-rate-conversion because most of the energy in music and audio is in the bottom 5 octaves. Feb 18, 2017 at 19:50
• Would love to hear your tricks @robertbristow-johnson Feb 18, 2017 at 20:04
• Good to see you're spelling fred's name correctly. :-)
– Peter K.
Feb 19, 2017 at 20:01

That trick must have to do with manipulating the first and the last tap of the Parks-McClellan (Chebyshev) solution. This is also explained in the last paragraph of this answer, which deals with a very extreme case. For equi-ripple designs the first and the last tap tend to be a bit larger in magnitude than what would be expected if one just extrapolated the impulse response. These two extremal taps correspond to time-domain echos and generate the equi-ripple behavior in the frequency domain. By decreasing the size of these two taps, the stop band ripple can be reduced. Any heuristic can be used to do so. I don't know what Harris suggested, but by simply choosing $h[0]=h[1]/2$ and $h[N-1]=h[N-2]/2$ (where $N$ is the filter length) I get an even faster roll-off (albeit a less regular one), at apparently no extra cost (compared to the solution in the question):