cut off frequency for butterworth filters
11 次查看(过去 30 天)
显示 更早的评论
Hi All,
I have a very basic question.
I am trying to use a butterworth filter but the instructions make no sense. Matlab on accepts a frequency between 0 and 1. The specific instructions say:
"The cutoff frequency Wn must be 0.0 < Wn < 1.0, with 1.0 corresponding to half the sample rate."
Lets say my data was sampled at 2500 Hz. I want to low pass filter at 20 Hz. What exactly would I need to enter for Wn and how can I figure it out on my own.
Thanks in advance!
Mostafa
0 个评论
采纳的回答
Star Strider
2015-4-1
The ‘frequency between 0 and 1’ refers to a normalised frequency with respect to the Nyquist frequency (Nyquist frequency = sampling frequency/2).
For your low-pass filter with a cutoff of 20 Hz and a sampling frequency (Fs) of 2500 Hz, you would define:
Fs = 2500;
Fco = 20;
Fn = Fs/2;
Wn = Fco/Fn;
Since ‘Wn’ is the upper passband frequency, and you will want to use the buttord function to help you design your filter, you will set the stopband frequency at about 1.25 times the passband frequency, and the passband ripple to be 1 dB and the stopband ripple at 10 dB. (These have no relevance to a Butterworth design, but buttord wants them.)
Also, use tf2sos to create the most stable (second-order-section) representation of your filter.
0 个评论
更多回答(1 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!