FIR Bandpass question about order and sampling rate

6 ビュー (過去 30 日間)
Krispy Scripts
Krispy Scripts 2016 年 4 月 14 日
コメント済み: J. Webster 2016 年 4 月 14 日
Hello, I have Local Field Potential Data that I am looking to filter. I would like to filter it for the gamma oscillation frequency zone. I am looking to use Filt Filt as the zero phase delay with the designfilter funciton. I have a question about the filter order and sampling rate. My sampling frequency was a 1000. It is a continuous data set. I have tried looking for the best order and sampling rate for the filter, but I am still foggy on what it should be.
d = designfilt('bandpassfir','FilterOrder',Fi, ... 'CutoffFrequency1',4,'CutoffFrequency2',12, ... 'SampleRate',Fs); zerophasedelayfilter = filtfilt(d,data);

採用された回答

J. Webster
J. Webster 2016 年 4 月 14 日
When designing your filter, the sampling rate should be set to the sampling rate that you took the data with, in your case 1000Hz.
As for the rest of your problem, there is no set "best order" for a filter. You can increase the order and give yourself a sharper roll-off if you want, (I believe the order just has to be less than the number of samples in your data set). However, the higher the order of the filter, the longer the calculation takes.
What I typically do is use designfilt (without any arguments) or the Filter Design and Analysis Toolkit, with order set to 'Minimum'. I pick the upper and lower stop/pass bands to be suitable for my application, then let the program determine the order.
  2 件のコメント
Krispy Scripts
Krispy Scripts 2016 年 4 月 14 日
Benefits of higher order filters for sharper roll off?
Nyquist frequency rules are important for recording data, but not data analysis then?
J. Webster
J. Webster 2016 年 4 月 14 日
the rate of roll off depends on your application, if you need 3 db/octave, or 6 db/octave, or whatever. That is application specific and you need to determine that.
Not sure what you are asking about Nyquist frequency rules. The Nyquist frequency simply states that in order to resolve a frequency in the fourier spectrum, then you need to sample at at least twice that frequency.
One specific thing regarding Nyquist and filters is that you will usually want a low-pass filter set at the Nyquist frequency to eliminate any aliasing. But this needs to be done BEFORE the digitization. So if you are recording/analyzing audio up to 20 kHz, you would need to sample at at least 40 kHz, and you would want an anti-aliasing filter set at 20 kHz in line just before the recorder.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDigital and Analog Filters についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by