資源描述:
《現(xiàn)代控制理論作業(yè)--蔣子丹.docx》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在應(yīng)用文檔-天天文庫(kù)。
1、HUNANUNIVERSITY學(xué)生姓名蔣子丹學(xué)生學(xué)號(hào)S1209W250專業(yè)班級(jí)電氣工程12級(jí)碩士7班已知系統(tǒng)傳遞函數(shù):1.由傳遞函數(shù)求取狀態(tài)空間模型>>num=[1,4,8];den=[1,4,8,1];G=tf(num,den);G1=ss(G)輸出結(jié)果:a=x1x2x3x1-4-2-0.5x2400x300.50b=u1x12x20x30c=x1x2x3y10.50.52d=u1y10Continuous-timemodel.2.計(jì)算系統(tǒng)給定時(shí)間的狀態(tài)轉(zhuǎn)移矩陣(在此t=0.2為例)>>A=[-4,-2,-
2、0.5;4,0,0;0,0.5,0];>>expm(A*0.2)輸出結(jié)果:ans=0.3555-0.2647-0.06520.52190.8774-0.03040.03040.09560.99893.求取系統(tǒng)在單位階躍輸入作用下的狀態(tài)響應(yīng)>>B=[2;0;0];C=[0.5,0.5,2];>>D=[0];[y,t,x]=step(G1);>>plot(t,x)輸出結(jié)果:4.判斷系統(tǒng)的能控性>>n=length(A)Uc=[A,A*B,A^2*B];rank(Uc)輸出結(jié)果:n=3ans=3由此,可以得到系統(tǒng)能
3、控性矩陣Uc的秩是3,等于系統(tǒng)維數(shù),故系統(tǒng)是能控的。5.判斷系統(tǒng)的能觀性>>Uo=[C;C*A;C*A^2];rank(Uo)輸出結(jié)果:ans=3由此,可以得到系統(tǒng)能觀性矩陣Uo的秩是3,等于系統(tǒng)維數(shù),故系統(tǒng)是能觀的。6.由李雅普諾夫第一方法判別系統(tǒng)的穩(wěn)定性>>flag=0;[z,p,k]=ss2zp(A,B,C,D,1);disp('Systemzero-points,pole-pointsandgainare:');zpkfori=1:nifreal(p(i))>0flag=1;endendifflag=
4、=1disp('Systemisunstable');elsedisp('Systemisstable');end輸出結(jié)果:Systemzero-points,pole-pointsandgainare:z=-2.0000+2.0000i-2.0000-2.0000ip=-1.9332+1.9355i-1.9332-1.9355i-0.1336k=1.0000Systemisstable7.由李雅普諾夫第二方法判別系統(tǒng)的穩(wěn)定性>>Q=eye(3,3);P=lyap(A,Q);forj=1:ndet(P(1:j
5、,1:j))if(det(P(1:j,1:j))<=0)flag=1;endendifflag==1disp('Systemisunstable');elsedisp('Systemisstable');end輸出結(jié)果:ans=0.2016ans=0.1665ans=0.5541Systemisstable附:matlab總程序.m文件clearclc%由傳遞函數(shù)求取狀態(tài)空間模型num=[1,4,8];den=[1,4,8,1];G=tf(num,den);G1=ss(G)%計(jì)算t=0.2時(shí)的狀態(tài)轉(zhuǎn)移矩陣A=
6、[-4,-2,-0.5;4,0,0;0,0.5,0];expm(A*0.2)%該系統(tǒng)在單位階躍輸入作用下的狀態(tài)響應(yīng)B=[2;0;0];C=[0.5,0.5,2];D=[0];[y,t,x]=step(G1);plot(t,x)%判斷系統(tǒng)的能控性n=length(A)Uc=[A,A*B,A^2*B];rank(Uc)%判斷系統(tǒng)的能觀性Uo=[C;C*A;C*A^2];rank(Uo)%由李雅普諾夫第二方法判別系統(tǒng)的穩(wěn)定性flag=0;[z,p,k]=ss2zp(A,B,C,D,1);disp('Systemze
7、ro-points,pole-pointsandgainare:');zpkfori=1:nifreal(p(i))>0flag=1;endendifflag==1disp('Systemisunstable');elsedisp('Systemisstable');end%由李雅普諾夫第二方法判別系統(tǒng)的穩(wěn)定性Q=eye(3,3);P=lyap(A,Q);forj=1:ndet(P(1:j,1:j))if(det(P(1:j,1:j))<=0)flag=1;endendifflag==1disp('Syste
8、misunstable');elsedisp('Systemisstable');end