資源描述:
《基于matlab的系統(tǒng)校正》由會員上傳分享,免費在線閱讀,更多相關(guān)內(nèi)容在行業(yè)資料-天天文庫。
1、基于matlab的系統(tǒng)校正1num=1000;den=conv([1,0],conv([0.1,1],[0.001,1]));G0=tf(num,den);[Gm,Pm,Wcg,Wcp]=margin(G0);w=0.1:0.1:10000;[mag,phase]=bode(G0,w);magdb=20*log10(mag);phiml=45;deta=8;phim=phiml-Pm+deta;bita=(1-sin(phim*pi/180))/(1+sin(phim*pi/180));n=find(magdb+10*log10(1/bita)<=0.0001);wc=
2、n(1);w1=(wc/10)*sqrt(bita);w2=(wc/10)/sqrt(bita);numc=[1/w1,1];denc=[1/w2,1];Gc=tf(numc,denc);G=Gc*G0;[Gmc,Pmc,Wcgc,Wcpc]=margin(G);CmcdB=20*log10(Gmc);disp('校正裝置傳遞函數(shù)和校正后系統(tǒng)開環(huán)傳遞函數(shù)'),Gc,G;disp('校正后系統(tǒng)的頻域性能指標Kg,γ,wc'),[Gmc,Pmc,Wcpc];disp('校正裝置的參數(shù)T和β值:'),T=1/w1;[T,bita],bode(G0,G);holdon,marg
3、in(G);校正裝置傳遞函數(shù)和校正后系統(tǒng)開環(huán)傳遞函數(shù)Transferfunction:0.01741s+1--------------0.001955s+1校正后系統(tǒng)的頻域性能指標Kg,γ,wc校正裝置的參數(shù)T和β值:ans=0.1740.11232、num=10;den=[0.2,1,0,0];G0=tf(num,den);[Gm,Pm,Wcg,Wcp]=margin(G0);w=0.1:1:10000;[mag,phase]=bode(G0,w);magdb=20*log10(mag);phiml=35;deta=18;phim=(phiml-Pm+deta)/2;
4、alpha=(1+sin(phim*pi/180))/(1-sin(phim*pi/180));n=find(magdb+10*log10(alpha)<=0.0001);wc=n(1)+0.1;w1=wc/sqrt(alpha);w2=sqrt(alpha)*wc;numc=(1/alpha)*[1/w1,1];denc=[1/w2,1];Gcl=tf(numc,denc);Gc=Gcl*Gcl;G=(alpha)^2*Gc*G0;disp('顯示單級校正網(wǎng)絡(luò)傳遞函數(shù),2級串聯(lián)校正網(wǎng)絡(luò)傳遞函數(shù)及α,T值'),T=1/w2;Gcl,Gc,[alpha,T]t=[0:0.
5、001:4];bode(G0,G);holdon,margin(G),figure(2);sys0=feedback(G0,1);step(sys0,t);holdon,sys=feedback(G,1);step(sys,t);顯示單級校正網(wǎng)絡(luò)傳遞函數(shù),2級串聯(lián)校正網(wǎng)絡(luò)傳遞函數(shù)及α,T值Transferfunction:0.07348s+0.2009------------------0.07348s+1Transferfunction:0.0054s^2+0.02953s+0.04037--------------------------------0.0054s^
6、2+0.147s+1