Skip to main content
10 events
when toggle format what by license comment
Jun 28, 2020 at 17:42 comment added Dan Boschen This may also be helpful to you regarding making an initial approximation to the number of taps needed: dsp.stackexchange.com/questions/31066/…
Jun 28, 2020 at 17:39 comment added Dan Boschen I don't have MATLAB (I use octave), so don't have firpmord so can't confirm further but clearly the firls parameters don't match what is specified in the documentation for desired stopband. With firpm or firls you will need to increase the number of taps to achieve the desired rejection (but can simplify by using a multiband response if that is indeed applicable).
Jun 28, 2020 at 17:39 comment added Dan Boschen @Laleh when you state that increasing the number of taps to achieve your rejection results in overkill for the rest of the filter, this implies you don't need the same rejection over the full stop band. You can specify multiband performance using firpm, assuming you even need equiripple performance (otherwise use firls for a least squared solution). I also recommend that you simply use the firpm (or firls) commands directly and not the determined parameters from firpmord. Read the documentation and put in the proper stopband values and you will get the expected result.
Jun 28, 2020 at 17:26 comment added Laleh @MarcusMüller I have added the parameters of firpm() command to the question.
Jun 28, 2020 at 17:25 comment added Laleh @DanBoschen I have updated the question and included the desired spec. for the filter.
Jun 27, 2020 at 20:53 comment added Dan Boschen @Laleh I suspect the issue must be with your use of normalized frequency. With firpm the stop band will absolutely start with the point of constant ripple such as the 10MHz location in your plot. Look carefully at the documentation for firpm. If you add the specific command you used and how you came up with the pass band and stop band values we may be able to help further.
Jun 27, 2020 at 20:48 comment added Marcus Müller @Laleh again, you forgot to tell us how you used firpm. As it can design pretty arbitrary filters, I'd say you're simply not using it correctly!
Jun 27, 2020 at 18:51 comment added Laleh Is there any difference in the result when using commands directly? I tried firpm() and the number of taps didn't get better.
Jun 27, 2020 at 18:33 comment added TimWescott For extra credit, familiarize yourself with the underlying math. There seem to be a lot of Matlab button-pushers out there that don't know the mechanisms behind the buttons -- that's not going to lead to the best possible designs.
Jun 27, 2020 at 16:03 history answered Dan Boschen CC BY-SA 4.0