Tradeoff Sampling rate / bandpass filter design

1 次查看(过去 30 天)
Dear all, I'm usually sampling my data with 20 kHz and want to filter the data with a butterworth filter. My question: if I filter the data from e.g. 30-90 Hz. If I use the simple b,a filter logic
nyquist=10000;
Wn=[30, 90]/nyquist;
[b,a]=butter(4,Wn,'bandpass');
filtered_signal=filtfilt(b,a,signal);
Is it still a good filter design, or is the order of 4 or even 3 to small to gain a valid filter result? Was I read in the threads, there is a tradeoff between the sampling rate, the filter order and the narrowness of the passband....
Thanks for your experience. Best, Peter

回答(1 个)

Star Strider
Star Strider 2015-8-18
I suggest using the buttord function to calculate the filter order, and then use the second-order-section implementation in the actual filter operation. The full discussion is here.
  1 个评论
Star Strider
Star Strider 2015-8-19
I’m not sure you need this line:
hd=dfilt.df2sos(sos,g);
I would just use the ‘sos,g’ results in the filter.
Filter design is heuristic. I don’t know what you want to do or what is not working, since you didn’t describe it.
Experiment with different passband and stopband values, since that is the most difficult part of bandpass (or bandstop) filter design. I usually begin specifying the stopband with [0.5, 1/0.5]*Wp (with ‘Wp’ the desired passband in a bandpass filter), and then increase the rolloff to [0.8, 1/0.8]*Wp or so until I get the behaviour I want.
Alternatively, consider a different filter design, for instance Chebyshev or something with a sharper rolloff, if that’s the problem.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Digital Filter Analysis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by