design(fde​sign.lowpa​ss()) vs dsp.Filter(firpm())

4 views (last 30 days)
Axel Acosta
Axel Acosta on 19 Oct 2015
Answered: Akshat Dalal on 22 Aug 2024
Hello,
I am trying to design a very strict LPF. Some of the design parameters are Fs 1000Hz and Fpass 0.5Hz and Fstop 1Hz with 0.01 passband ripple and 110 db stopband attenuation.
When I try to design this filter with the FDAtool, the tool takes some time but designs a ~10k tap FIR filter. If I select to generate MATLAB code for this design, the code is generated using firpm(). When I try to use the fdesign.lowpass() with the same specification and then with design( 'equiripple') the method does not converge (I let the design run for some time and no output is given).
My question is, what is the difference between these two methods and why cant I design the specified filter with the fdesign.lowpass ?

Answers (1)

Akshat Dalal
Akshat Dalal on 22 Aug 2024
Hi Axel,
Designing a strict low-pass filter (LPF) with specifications like a 0.5 Hz passband, 1 Hz stopband, 0.01 passband ripple, and 110 dB stopband attenuation is challenging due to the narrow transition band and high attenuation requirements.
The `firpm()` function, using the Parks-McClellan algorithm, is specifically suited for such precise equiripple FIR filter designs. It directly optimizes filter coefficients to meet stringent frequency response criteria, which is why it successfully generates a ~10k tap FIR filter for your specifications. For more information, please refer to the following documentation: https://www.mathworks.com/help/signal/ref/firpm.html
On the other hand, `fdesign.lowpass()` with `design('equiripple')` provides a general framework for filter design but may not handle extreme specifications as robustly as `firpm()`. The narrow transition band and high stopband attenuation can lead to convergence issues, as the algorithm might struggle to find a feasible solution within these constraints. For more information, please refer to the following documentation: https://www.mathworks.com/help/dsp/ref/fdesign.lowpass.html
To address these challenges, consider using `firpm()` directly for your design, as it has proven effective. If you wish to use `fdesign.lowpass()`, you might need to relax the specifications slightly, such as widening the transition band or reducing the stopband attenuation, to aid convergence. Additionally, ensure your system has adequate computational resources to handle the design process, given the high number of filter taps required.
Hope this helps!

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!