如何用MATLAB编写双线性变换法

如题所述

第1个回答  推荐于2016-02-01
wp1=0.3*pi;wp2=0.6*pi;ws1=0.4*pi;ws2=0.5*pi;Ap=3;As=10;Fs=1;
B=ws2-ws1;w0=sqrt(ws1*ws2);
wp=max(abs(wp1),abs(wp2));ws=1;
[N,wc]=buttord(wp,ws,Ap,As,'s');
[num,den]=butter(N,wc,'s');
[numt,dent]=lp2bs(num,den,w0,B);
[numd,dend]=bilinear(numt,dent,Fs);
w=linspace(0,pi,512);
h=freqz(numd,dend,w);
norm=max(abs(h));
numd=numd/norm;
subplot(2,2,1);
plot(w/pi,20*log(abs(h)/norm));grid;
xlabel('Butterworth BS DF');
ylabel('Gain,dB');

wp1=0.3*pi;wp2=0.6*pi;ws1=0.4*pi;ws2=0.5*pi;Ap=3;As=10;Fs=1;
B=ws2-ws1;w0=sqrt(ws1*ws2);
wp=max(abs(wp1),abs(wp2));ws=1;
[N,wc]=cheb1ord(wp,ws,Ap,As,'s');
[num,den]=cheby1(N,Ap,wc,'s');
[numt,dent]=lp2bs(num,den,w0,B);
[numd,dend]=bilinear(numt,dent,Fs);
w=linspace(0,pi,512);
h=freqz(numd,dend,w);
norm=max(abs(h));
numd=numd/norm;
subplot(2,2,2);
plot(w/pi,20*log(abs(h)/norm));grid;
xlabel('ChebyshevI BS DF');
ylabel('Gain,dB');

wp1=0.3*pi;wp2=0.6*pi;ws1=0.4*pi;ws2=0.5*pi;Ap=3;As=10;Fs=1;
B=ws2-ws1;w0=sqrt(ws1*ws2);
wp=max(abs(wp1),abs(wp2));ws=1;
[N,wc]=cheb2ord(wp,ws,Ap,As,'s');
[num,den]=cheby2(N,As,wc,'s');
[numt,dent]=lp2bs(num,den,w0,B);
[numd,dend]=bilinear(numt,dent,Fs);
w=linspace(0,pi,512);
h=freqz(numd,dend,w);
norm=max(abs(h));
numd=numd/norm;
subplot(2,2,3);
plot(w/pi,20*log(abs(h)/norm));grid;
xlabel('ChebyshevII BS DF');
ylabel('Gain,dB');

wp1=0.3*pi;wp2=0.6*pi;ws1=0.4*pi;ws2=0.5*pi;Ap=3;As=10;Fs=1;
B=ws2-ws1;w0=sqrt(ws1*ws2);
wp=max(abs(wp1),abs(wp2));ws=1;
[N,wc]=ellipord(wp,ws,Ap,As,'s');
[num,den]=ellip(N,Ap,As,wc,'s');
[numt,dent]=lp2bs(num,den,w0,B);
[numd,dend]=bilinear(numt,dent,Fs);
w=linspace(0,pi,512);
h=freqz(numd,dend,w);
norm=max(abs(h));
numd=numd/norm;
subplot(2,2,4);
plot(w/pi,20*log(abs(h)/norm));grid;
xlabel('Tuoyuan BS DF');
ylabel('Gain,dB');本回答被网友采纳