High pass butterworth filter

조회 수: 59 (최근 30일)
LU
LU 2011년 4월 7일
답변: Yepuni Giyai 2022년 5월 18일
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

답변 (3개)

Rob Graessle
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?
  댓글 수: 1
LU
LU 2011년 4월 8일
Thanks Rob,
After doing some more reading I see that I want an analog filter, where as the default is a digital filter. I will try using the analog option to see if this helps.
lu

댓글을 달려면 로그인하십시오.


Prasanth Reddy
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);

Yepuni Giyai
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);

Community Treasure Hunt

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

Start Hunting!

Translated by