FIR filter using windowing method having specs
10 views (last 30 days)
Show older comments
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 Comments
Answers (1)
Star Strider
on 24 Nov 2019
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 Comments
Star Strider
on 24 Nov 2019
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.
See Also
Categories
Find more on Digital Filter Design in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!