Butterworth filter and normalised frequency
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi, I have a little problem with a B filter, I want to compare the frequency response of the analog and digital filter, so I tried with this
if true
>> Rp=1;
>> Rs=80;
>> nupass=20000;
nustop=22000;
>> Ts=1/44100;
>> nucontpass=1/pi/Ts*tan(pi*Ts*nupass);
>> nuconstop=1/pi/Ts*tan(pi*Ts*nustop);
>> nu=0:0.1:1/2/Ts;
>> nucont=0:0.1:1000;
[n,wn]=buttord(2*pi*nucontpass,2*pi*nuconstop, Rp, Rs,'s');
[b,a]=butter(n,wn);
[B,A]=bilinear(b,a,1/Ts);
>> Hc=freqs(b,a,2*pi*nucont);
>> Hb=freqz(B,A,nu,1/Ts);
>> figure, plot(nu,abs(Hb)),hold on,plot(nucont,abs(Hc),'g--');
end
But the problem come of wn which is not normalised so tried to do Wn=2wn/Ts but i have but the result is always superior at 1. Have you got any solution to fix this problem? Thanks
댓글 수: 0
답변 (1개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!