High pass butterworth filter
92 views (last 30 days)
Show older comments
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 Comments
Answers (3)
Rob Graessle
on 7 Apr 2011
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
on 14 Nov 2021
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 Comments
Yepuni Giyai
on 18 May 2022
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 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!