Butterworth filter and normalised frequency
Show older comments
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
Answers (1)
Categories
Find more on Butterworth in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!