Butterworth filter and normalised frequency

1 view (last 30 days)
jack
jack on 9 Jun 2014
Commented: jack on 9 Jun 2014
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)

Rick Rosson
Rick Rosson on 9 Jun 2014
Wn = 2*wn*Ts;
  1 Comment
jack
jack on 9 Jun 2014
Thankls but it's an error in my previous post but i have tried Wn = 2*wn*Ts; so it's not the problem

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!