I am using GNU Radio C++ source code in my app (pm_remez()) for generating FIR filters coefficients. Input parameters here are: bands[], des[] and weight[]. How I can manipulate stop band attenuation in pm_remez() function?


1 Answer 1


The stopband attenuation is controlled indirectly by the relation between passband and stopband weights. A large weight means a small error in the corresponding frequency band. E.g., if the passband weight is $1$ and the stopband weight is $10$, then the approximation error in the stopband will be $10$ times smaller than the approximation error in the passband. The actual value of the error (i.e. passband ripple and stopband attenuation) cannot be prescribed in the original version of the algorithm. The approximation error is an outcome of the algorithm, just like the filter coefficients. The only thing that can be prescribed is the ratio between the errors in the different frequency bands.

  • $\begingroup$ Yep. Thank you. But what can i do if I really need to have for example -80 dB but i got only -50 dB? Google another implemenation of algorithm? $\endgroup$
    – tty6
    Mar 12, 2015 at 15:12
  • $\begingroup$ @tty6: If a larger passband error can be tolerated, you can increase the stopband weight (this will increase stopband attenuation at the expense of passband ripple). Otherwise, just increase the filter order, which will result in a smaller approximation error. $\endgroup$
    – Matt L.
    Mar 12, 2015 at 15:33

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.