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

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);

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

답변 (1개)

Sowmiya Sowmiya
Sowmiya Sowmiya 2022년 10월 6일
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

제품

릴리스

R2015b

질문:

2020년 1월 14일

답변:

2022년 10월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by