High pass butterworth filter
93 次查看(过去 30 天)
显示 更早的评论
Hello, I am trying to implement a Butterworth filter with the following specs:
- high-pass
- 6th order
- 0.1 Hz 3dB cutoff frequency
- sample interval of 50 Hz
I am trying to replicate results from another source which I do not have access to the source code, only the filter specs (original not implemented in matlab), but so far have not had any luck in getting my results to match that of the original source.
So far I have tried the following:
fc=0.1;% cut off frequency
w=2*pi*fc;% convert to radians per second
fn=25; %nyquivst frequency = sample frequency/2;
order = 6; 6th order filter, high pass
[b14 a14]=butter(order,(w/fn),'high');
xf14=filtfilt(b14,a14,data);
Basically, I am not sure how to proceed at this point. Perhaps someone can see where I am going wrong? My experience with filtering is pretty limited so any help would be appreciated.If it would be beneficial I can upload the data, or describe the data further.
Thank you for your time,
lu
0 个评论
回答(3 个)
Rob Graessle
2011-4-7
You are converting the cutoff frequency to radians while leaving the Nyquist rate in Hz.
Try this:
fc=0.1;% cut off frequency
fn=25; %nyquivst frequency = sample frequency/2;
order = 6; %6th order filter, high pass
[b14 a14]=butter(order,(fc/fn),'high');
fvtool(b14,a14);
Does the filter response look like what you are expecting?
Prasanth Reddy
2021-11-14
clc
clear all
fc=0.1;% cut off frequency
w=2*pi*fc;% convert to radians per second
fn=25; %nyquivst frequency = sample frequency/2;
order = 6; %6th order filter, high pass
[b14, a14]=butter(order,(w/fn),'high');
fvtool(b14,a14);
0 个评论
Yepuni Giyai
2022-5-18
clc
clear all
fc=0.1;% cut off frequency
w=2*pi*fc;% convert to radians per second
fn=25; %nyquivst frequency = sample frequency/2;
order = 6; %6th order filter, high pass
[b14, a14]=butter(order,(w/fn),'high');
fvtool(b14,a14);
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!