Different results using buttap and butter

HI, Im having problem with designing IIR filter with buttap and bilinear functions. Filter doesnt match the one designed using butter function. Any ideas where the problem occurs?
fs=30000;
fc=10000;
n=6;
[z,p,k]=buttap(n);
[b,a]=zp2tf(z,p,k);
[be,ae]=lp2lp(b,a,fc);
[numd,dend]=bilinear(be,ae,fs,fc);
[bt,at] = butter(n,fc/(fs/2));
fvtool(numd,dend,bt,at);

1 Kommentar

Ok i fixed it now. I dont know why this [numd,dend]=bilinear(be,ae,fs,fc) doesnt apply prewarping at fc
fs=30000;
fc=10000;
Fc=2*fs*tan((pi/2*fc)/(fs/2))
n=6;
[z,p,k]=buttap(n);
[b,a]=zp2tf(z,p,k);
[be,ae]=lp2lp(b,a,Fc);
[numd,dend]=bilinear(be,ae,fs);
[bt,at] = butter(n,fc/(fs/2));
fvtool(numd,dend,bt,at);

Melden Sie sich an, um zu kommentieren.

Antworten (1)

wp=0.3;
ws=0.6;
rp=1;
rs=40;
[N wn]=buttord(wp,ws,rp,rs);
[z,p,k ]=buttap(N)
z = []
p =
-0.2588 + 0.9659i -0.2588 - 0.9659i -0.7071 + 0.7071i -0.7071 - 0.7071i -0.9659 + 0.2588i -0.9659 - 0.2588i
k = 1

Produkte

Version

R2015b

Gefragt:

am 14 Jan. 2020

Beantwortet:

am 6 Okt. 2022

Community Treasure Hunt

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

Start Hunting!

Translated by