FIR filter using windowing method having specs
9 次查看(过去 30 天)
显示 更早的评论
Hello,
I'm trying to make a FIR filter using windowing method, using a rectangle window. I have the following specs:
fp= 5*10^3 Hz
fa=1.5*fp Hz
fs=22050 Hz
Ap=2 dB
I don't know how can I do a filter with specs, but without knowing the order of the filter.
Thank you!
0 个评论
回答(1 个)
Star Strider
2019-11-24
I have not found a universally-applicable method of calculating the order of a FIR filter. I generally begin with a 48-order FIR filter, then increase or decrease the order depending on how well it works.
2 个评论
Star Strider
2019-11-24
I usually use kaiserord and fir1 to design windowed filters, largely because I’m used to it. Note that kaiserord automatically calculates ‘n’ that you can then use to define the filter order.
You appear to be designing a simple lowpass filter, so it should be straightforward to design it using those functions.
I use FIR filters when I want to avoid cascading IIR filters, such as in Can 'cascade' be used on bandstop filters created with 'designfilt'?. In spite of their being longer filters (and so less efficient), since they are linear phase, they recover some of that by being able to use filter rather than having to use filtfilt, as do the efficient elliptic filters that I now use almost exclusively for IIR filtering.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Digital Filter Design 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!