필터 지우기
필터 지우기

nth order filter approximations to LPF not giving proper results

조회 수: 2 (최근 30일)
Bhaskar
Bhaskar 2023년 6월 26일
댓글: Bhaskar 2023년 6월 28일
Hi , i am trying to implement an analog filter Butterworth Low pass filter and want to observe the effect of order over the magnitude of that filter I have tried using the inbuilt 'butter(n,Wn,ftype)' filter but want to implement the same using the base algoritm without any inbuilt function .I have tried but not getting the proper results .
The input parameters are as follows:
Wc=pi/2.
w=(0,4*Pi) at 8pi/1000 intervals .
Thanks in advance .

채택된 답변

Harsh Kumar
Harsh Kumar 2023년 6월 27일
Hi Bhaskar,
I understand that you are trying to implement an analog butterworth filter with the given specifications programmatically instead of using MATLAB in-built ‘butterfunction .
You can use the fundamental mathematical strategy to implement it in MATLAB as well.
Please refer to the below code snippet for better understanding.
%frequency over which you are iterating
w=0:8*pi/1000:4*pi;
%cutt-off frequency
wc=pi/2;
%pre-setting to zero
H_w_2=zeros(1,length(w));
%checking for multiple orders(optional)
for N=1:5:11
num=1;
den=zeros(1,2*N);
den(1)=1;
for i=1:1:length(w)
%implement the equation of butterworth filter
H_w_2(i)=1/(1+power(w(i)/wc,2*N));
end
plot(w,abs(H_w_2));
hold on
end
legend('N=1','N=6','N=11')
  댓글 수: 1
Bhaskar
Bhaskar 2023년 6월 28일
Thanks harsh, for your explanation. It cleared up my doubt and i got your approach.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Kaiser에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by