Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.2k views
in Technique[技术] by (71.8m points)

matlab - How do I properly design a digital FIR filter?

I want to design a series of optimal filters for ultrasonic signals. The filter order is fixed at 16 and I want the filter to have a passband for a list of ranges, i.e. (16kHz-38kHz, 17kHz-39kHz etc.). I've been using Matlab's Filter Designer and trying to different design inputs in a trial and error manner. What method can I use to find the optimal filter design algorithm (Remez, least-windows or something else) rather than haphazardly throwing inputs to the wall and seeing what looks best (I'm looking for a filter that best attenuates in the stopbands and has a flat frequency response in the passband, given my filter order constraint).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

16 taps is not much to work with for an FIR filter, so I'm a dubious whether satisfying results are possible with any design. That said, I suggest trying Remez, aka Parks–McClellan optimal FIR filter design. See Matlab's firpm function. FIR filters designed by the Remez algorithm are "optimal" in the sense of minimizing the maximum pointwise error. Anthor plus about Remez is it allows setting different importance on each band, which could be useful to balance the tradeoff between passband flatness vs. stopband attenuation.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...