FIR filter using windowing method having specs

10 visualizaciones (últimos 30 días)
Franco Riggio
Franco Riggio el 24 de Nov. de 2019
Comentada: Star Strider el 24 de Nov. de 2019
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!

Respuestas (1)

Star Strider
Star Strider el 24 de Nov. de 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 comentarios
Franco Riggio
Franco Riggio el 24 de Nov. de 2019
I'm in the same situation...Unfortunately, I haven't found any function which could make this. What function I should use to make this filter? firls?
Star Strider
Star Strider el 24 de Nov. de 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.

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by