# FIR filter using windowing method having specs

3 ビュー (過去 30 日間)
Franco Riggio 2019 年 11 月 24 日
Commented: Star Strider 2019 年 11 月 24 日
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 件のコメント

サインイン to comment.

### 件の回答 (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 件のコメント

Franco Riggio 2019 年 11 月 24 日
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 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.

サインイン to comment.

サインイン してこの質問に回答します。

Translated by