《现代控制理论》课程教学资源课程教学资源——实验指导_EXPERIMENT2 Analysis of Stability, Controllability and Observability by MATLAB

实验二控制系统的稳定性、能控性和能观测性分析ExperimentIIAnalysisofStability,ControllabilityandObservabilityby MATLABLExperimentalPurpose1. Analyzing the stability of the LTI system by the 2nd Lyapunov method2.Determining the controllability and observability of a control system.3.Obtaining the controllablecanonical formand observable canonical formby thestate transformation.4. Getting a minimal realization of the LTI system5.Placing the poles by state feedback controlII.ExperimentalContent2.1Consider the state space description of a LTI system is[1 -3.54.5[0.5]X=2-4.54.50.51.5[ 0.5]-2.5y=[1 0 ]xDetermine the stability by the Lyapunov 2nd Method.close allclear all% The system matrix of the systemA-[1 -3.5 4.5;2 -4.5 4.5;-1 1.5 -2.5];n=length(A);% determining the equilibrium point of the systemif(rank(A)==n)disp('the system is the only equilibrium point of the system.')
实验二 控制系统的稳定性、能控性和能观测性分析 Experiment II Analysis of Stability, Controllability and Observability by MATLAB I. Experimental Purpose 1. Analyzing the stability of the LTI system by the 2 nd Lyapunov method. 2. Determining the controllability and observability of a control system. 3. Obtaining the controllable canonical form and observable canonical form by the state transformation. 4. Getting a minimal realization of the LTI system. 5. Placing the poles by state feedback control. II. Experimental Content 2.1 Consider the state space description of a LTI system is y X X X u 1 0 1 0.5 0.5 0.5 1 1.5 2.5 2 4.5 4.5 1 3.5 4.5 = − − − + − − − − = Determine the stability by the Lyapunov 2nd Method. close all clear all % The system matrix of the system A=[1 -3.5 4.5;2 -4.5 4.5;-1 1.5 -2.5]; n=length(A); % determining the equilibrium point of the system. if(rank(A)==n) disp('the system is the only equilibrium point of the system.');

elsedisp(theoriginisanequilibriumpointofthesystem.):end% Q=IQ=eye(n,n);% Getting the solution matrix P of Lyapunov equation A'P+PA=-QP=lyap(transpose(A),Q);% X=lyap(A,Q) solves the Lyapunov equation AP+PAT=-Q% Calculating the principle minor determinant of the matrix P and determining thedefinitenessofPflag=0,for i=1.:nif(det(P(1:i, 1:i)<=0)flag=1;endend% Determining the stability of the systemIf flag=-1disp( the origin is unstable')elseif(rank(A)==n)disp( the origin system is globally asymptotically stable.);elsedisp(theorigin systemislocally asymptoticallystable'),endend
else disp('the origin is an equilibrium point of the system.'); end % Q=I Q=eye(n,n); % Getting the solution matrix P of Lyapunov equation T A P PA Q + = − . P=lyap(transpose(A),Q); % X = lyap(A,Q) solves the Lyapunov equation T AP PA Q + = − % Calculating the principle minor determinant of the matrix P and determining the definiteness of P. flag=0; for i=1:n if(det(P(1:i,1:i))<=0) flag=1; end end % Determining the stability of the system. If flag==1 disp(' the origin is unstable'); else if(rank(A)==n) disp(' the origin system is globally asymptotically stable.'); else disp(' the origin system is locally asymptotically stable '); end end

2.2Consider the state space description of a LTI system is20X=3 -1 1[0 20y=[0 0 1]x2.2.1 Calculating the controllability matrix and determining the controllability ofthe system.A=[1 2 0;3 -1 1;0 2 0]; B=[2;1;1]; C=[0 0 1]; D=[0];Qc=ctrb(A,B);nc=size(Qc,1);if(rank(Qc)-=nc)disp(' the system is completely controllable.);elsedisp(the system is not completely controllable.);end2.2.2Transformthestate spacedescription intothecontrollablecanonicalform:cp=poly(A);P=[A^2*B,A*B,B)*[cp(1),0,0;cp(2),cp(1),0; cp(3), cp(2),cp(1))[Ac,Bc,Cc,Dc]=ss2ss(A,B,C,D,inv(P))2.3Considerthestatespacedescriptionof aLTI system is[1021L1X101-2 [y=[0 1 1]x
2.2 Consider the state space description of a LTI system is 1 2 0 2 3 1 1 1 0 2 0 1 0 0 1 X X u y X = − + = 2.2.1 Calculating the controllability matrix and determining the controllability of the system. A=[1 2 0;3 -1 1;0 2 0]; B=[2;1;1]; C=[0 0 1]; D=[0]; Qc=ctrb(A,B); nc=size(Qc,1); if(rank(Qc)==nc) disp(' the system is completely controllable.'); else disp(' the system is not completely controllable.'); end 2.2.2 Transform the state space description into the controllable canonical form: cp=poly(A); P=[A^2*B,A*B,B]*[cp(1),0,0;cp(2),cp(1),0; cp(3), cp(2),cp(1)]; [Ac,Bc,Cc,Dc]=ss2ss(A,B,C,D,inv(P)) 2.3 Consider the state space description of a LTI system is 1 0 2 1 2 1 1 2 1 0 2 1 0 1 1 X X u y X = + − =

2.3.1Calculating the observability matrix and determining the observability of thesystem.A=[1 0 2 ;2 1 1;1 0 -2]; B=[1;2;1]; C=[0 1 1]; D=[0];Qo=obsv(A,C);no=size(Qo,2);if(rank(Qo)==no)disp(the system is completely observable.);elsedisp(the system is not completely observable.);end2.3.2 Transform the state space description into the observable canonical form:Transform the state space description into the observable canonical form:cp=poly(A);T=[ cp(1), cp(2), cp(3);0, cp(1),cp(2);0,0, cp(1))*[C*A^2;C*A;C];[Ao,Bo,Co,Do]=ss2ss(A,B,C,D,T)%不推荐使用[A1,B1,C1,D1]=canon(A,B,C,D,companion')2.4Consider the state space description of a LTI system is[-1010071000-101X=00100000Loolx00y=[12.4.1 Getting a minimal realization of the LTI system.A=[-10100;0-1000;0010;0001];
2.3.1 Calculating the observability matrix and determining the observability of the system. A=[1 0 2 ;2 1 1;1 0 -2]; B=[1;2;1]; C=[0 1 1]; D=[0]; Qo=obsv(A,C); no=size(Qo,2); if(rank(Qo)==no) disp(' the system is completely observable.'); else disp(' the system is not completely observable.'); end 2.3.2 Transform the state space description into the observable canonical form: Transform the state space description into the observable canonical form: cp=poly(A); T=[ cp(1), cp(2), cp(3);0, cp(1),cp(2);0,0, cp(1)]*[C*A^2;C*A;C]; [Ao,Bo,Co,Do]=ss2ss(A,B,C,D,T) %不推荐使用 [A1,B1,C1,D1]=canon(A,B,C,D,'companion') 2.4 Consider the state space description of a LTI system is y X X X u 1 0 0 0 0 0 1 1 0 0 0 1 0 0 1 0 0 10 0 0 10 1 0 0 = + − − = 2.4.1 Getting a minimal realization of the LTI system. A=[-10 1 0 0;0 -10 0 0;0 0 1 0;0 0 0 1];

B=[1;1;0;0]; C=[1 0 0 0]; D=[0];[Am,Bm,Cm,Dm]=minreal(A,B,C,D);2.4.2Comparingthetransferfunction of the system with its minimal realization[z1,p1,k1]=ss2zp(A,B,C,D);sys1=zpk(zl,p1,k1)[z2,p2,k2]=ss2zp(Am,Bm,Cm,Dm);sys2=zpk(z2,p2,k2)%Therealization isa minimal realizationiff itis completely controllable andcompletely observable%TheLTTSISOsystemiscompletelycontrollableandobservableiffitstransfenfunctiondoesnothavepole-zerocancellation2.5Consider the LTI system described byTo00[]X =-601ouX+LoLo1-12y=[0 0 1]xDesign the state feedback gain vectorKthat assigns the set of closed-loopeigenvalues as (-2,-1+j, -1-j }.% The original systemA=[0 0 0;1 -6 0;0 1 -12]; b=[1;0;0]; c=[0 0 1]; d=0;G=ss(A,b,c,d)%The poles of the initial systemeig(A)%Expected poles of the systemP=[-1+i,-1-i,-2]; % The components of vector P are the expected poles
B=[1;1;0;0]; C=[1 0 0 0]; D=[0]; [Am,Bm,Cm,Dm]=minreal(A,B,C,D); 2.4.2 Comparing the transfer function of the system with its minimal realization [z1,p1,k1]=ss2zp(A,B,C,D); sys1=zpk(z1,p1,k1) [z2,p2,k2]=ss2zp(Am,Bm,Cm,Dm); sys2=zpk(z2,p2,k2) % The realization is a minimal realization iff it is completely controllable and completely observable. % The LTI SISO system is completely controllable and observable iff its transfer function does not have pole-zero cancellation. 2.5 Consider the LTI system described by y X X X u 0 0 1 0 0 1 0 1 12 1 6 0 0 0 0 = + − = − Design the state feedback gain vector K that assigns the set of closed-loop eigenvalues as − + − 2, 1 , 1 - j - j . % The original system A=[0 0 0;1 -6 0;0 1 -12]; b=[1;0;0]; c=[0 0 1]; d=0; G=ss(A,b,c,d) %The poles of the initial system eig(A) % Expected poles of the system P=[-1+i,-1-i,-2]; % The components of vector P are the expected poles

% Function acker(A,b,P)K1=acker(A,b,P)% Function acker() can only be applied to single input system[X(t) =(A-bK)X(t) +br(t)%Theclosed-loopsystemwith statefeedbackcontrol(y(t) =cX(t)G1=ss(A-b*K1,b,c,d)%The poles of the closed-loop system with state feedback controleig(A-b*K1)%Function place(A,BP)K2=place(A,b,P))%Functionplace()canbeappliedtosingleinputsystem,alsocanbeappliedtomultipleinputsystem%But when you used thisfunction,the expected poles shouldbedistinct.%The closed-loop system with statefeedbackcontrolG2=ss(A-b*K2,b,c,d)%The poles of the closed-loop system with state feedbackcontroleig(A-b*K2)%Youcan use the algorithm studied in our course to writea poles placementfunctionI.Requirements ofthereport1. Write the relevant programs in the experimental content and compile them in thecomputer.2. All programs, results and related graphics are written on the experiment reporttogether
% Function acker(A,b,P) K1=acker(A,b,P) % Function acker( ) can only be applied to single input system %The closed-loop system with state feedback control ( ) ( ) ( ) ( ) ( ) ( ) t t r t y t t = − + = X A bK X b cX G1=ss(A-b*K1,b,c,d) %The poles of the closed-loop system with state feedback control eig(A-b*K1) %Function place(A,B,P) K2=place(A,b,P) % Function place( ) can be applied to single input system, also can be applied to multiple input system. % But when you used this function, the expected poles should be distinct. %The closed-loop system with state feedback control G2=ss(A-b*K2,b,c,d) %The poles of the closed-loop system with state feedback control eig(A-b*K2) %You can use the algorithm studied in our course to write a poles placement function. III. Requirements of the report 1. Write the relevant programs in the experimental content and compile them in the computer. 2. All programs, results and related graphics are written on the experiment report together
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 《现代控制理论》课程教学资源课程教学资源——教学课件_Chap3_3.1 The Basics of Stability Theory in Mathematics.pdf
- 《现代控制理论》课程教学资源课程教学资源——教学课件_Chap3_3.2 Lyapunov Stability.pdf
- 《现代控制理论》课程教学资源课程教学资源——教学课件_Chap3_3.3 Lyapunov Stability Theory.pdf
- 《现代控制理论》课程教学资源课程教学资源——教学课件_Chap3_3.4 Application of Lyapunov 2nd Method to the LTI System.pdf
- 《现代控制理论》课程教学资源课程教学资源——教学课件_Chap2_2.2 Calculation of the Matrix Exponential Function.pdf
- 《现代控制理论》课程教学资源课程教学资源——教学课件_Chap2_2.3 State Transition Matrix.pdf
- 《现代控制理论》课程教学资源课程教学资源——教学课件_Chap2_2.4 Time Response of the LTI System.pdf
- 《现代控制理论》课程教学资源课程教学资源——教学课件_Chap1_1.1 Definition of State Space.pdf
- 《现代控制理论》课程教学资源课程教学资源——教学课件_Chap1_1.2 Obtaining State Space Model from IO Model.pdf
- 《现代控制理论》课程教学资源课程教学资源——教学课件_Chap1_1.5 State Transformation of the LTI system.pdf
- 《现代控制理论》课程教学资源课程教学资源——教学课件_Chap1_1.6 Obtaining a Jordan Canonical Form by State Transformation.pdf
- 《现代控制理论》课程教学资源课程教学资源——总结(1-5章)-2023.pdf
- 《电力系统自动化》课程教学资源(讲义)第2章 发电厂自动化.pdf
- 《发电厂电气部分》课程教学大纲 Course Exercise in Electrical Section of Power Plant.doc
- 《发电厂电气部分》课程教学资源(实践教学)220~500KV变电所设计规程.doc
- 《发电厂电气部分》课程教学资源(PPT课件讲稿)第八章 发电厂和变电站的控制与信号.ppt
- 山东理工大学:《高电压技》课程教学资源(PPT课件)第1章 气体放电的物理过程(主讲:安韵竹).ppt
- 山东理工大学:《高电压技》课程教学资源(PPT课件)第2章 气体介质的电气强度.ppt
- 山东理工大学:《高电压技》课程教学资源(PPT课件)第三章 液体、固体电介质的电气特性 3.1 液体和固体介质的极化、电导和损耗.ppt
- 山东理工大学:《高电压技》课程教学资源(PPT课件)第三章 液体、固体电介质的电气特性 3.2 液体介质的击穿 3.3 固体介质的击穿 3.4 组合绝缘的电气强度.ppt
- 《现代控制理论》课程教学资源课程教学资源——实验指导_EXPERIMENT1 Modeling with State Space Description and Analysis of Time Response by Using MATLAB.doc
- 《现代控制理论》课程教学资源——现控课件_Ch1-5 State Transformation of the LTI system.ppt
- 《现代控制理论》课程教学资源——现控课件_Ch1-2 Obtaining State Space Description from I_O Description.ppt
- 《现代控制理论》课程教学资源——现控课件_Ch1-1 Definition of state space.ppt
- 《现代控制理论》课程教学资源——现控课件_Ch2-Time response of LTI system.ppt
- 《现代控制理论》课程教学资源——参考资料_第六章 线性反馈系统的时间域综合.ppt
- 《现代控制理论》课程教学资源——参考资料_第五章 系统运动稳定分析.ppt
- 《现代控制理论》课程教学资源——参考资料_第四章 线性系统的能控性和能观测性.ppt
- 《现代控制理论》课程教学资源——参考资料_第三章 线性系统的运动分析.ppt
- 《现代控制理论》课程教学资源——参考资料_第二章 线性系统的状态空间描述.ppt
- 《现代控制理论》课程教学资源——参考资料_第一章 绪论.ppt
- 《现代控制理论》课程教学资源——参考资料_自动控制原理_8-3离散系统分析.pdf
- 《现代控制理论》课程教学资源——参考资料_自动控制原理_8-2离散数模.pdf
- 《现代控制理论》课程教学资源——参考资料_自动控制原理_8-1离散控制系统.pdf
- 《现代控制理论》课程教学资源——参考资料_自动控制原理_7-3相平面法2.pdf
- 《现代控制理论》课程教学资源——参考资料_自动控制原理_7-2相平面法.pdf
- 《现代控制理论》课程教学资源——参考资料_自动控制原理_7-1描述函数法.ppt
- 《现代控制理论》课程教学资源——参考资料_自动控制原理_6-2串联综合法校正.ppt
- 《现代控制理论》课程教学资源——参考资料_自动控制原理_6-1串联校正.ppt
- 《现代控制理论》课程教学资源——参考资料_自动控制原理_5-3 稳定裕度等.ppt
