MATLAB系统空间分析法.ppt
第8章 系统状态空间分析法,内容,系统特征方程及解关于系统相似变换关于系统可观性、可控性判别的状态反馈极点配置状态观测器,8.1 系统状态方程的解,状态转移矩阵,若状态方程是齐次的,即有:,EX1,a=0 1 0;0 0 1;-6-11-6;x0=1;1;1;t=0:0.1:10;for i=1:length(t)x(:,i)=expm(a*t(i)*x0;endplot3(x(1,:),x(2,:),x(3,:);grid on,系统的特征方程、特征值及特征向量,特征方程:|sI-A|=0特征值及特征向量:,V,D=eig(A),特征向量矩阵,特征值矩阵,A*V=V*D,EX2 已知控制系统求控制系统的特征方程,A=2 1-1;1 2-1;-1-1 2;I=1 0 0;0 1 0;0 0 1;syms s%符号计算det(s*I-A)s=solve(det(s*I-A)%求解,ans=s3-6*s2+9*s-4,s=4 1 1,EX2 求控制系统的特征值及特征向量,符号计算Symbolic Toolbox,EIGENSYS Obsolete Symbolic Toolbox function.V,D=EIGENSYS(A)is the same as V,D=eig(sym(A),8.2 传递矩阵G,CsI-A-1B+D,A=0 1;0-2;B=1 0;0 1;C=1 0;0 1;D=0;syms sI=1 0;0 1;G=C*inv(s*I-A)*B,G=1/s,1/s/(s+2)0,1/(s+2),8.3 线性变换,状态方程的线性变换 ss2ss(sys,T),EX3,A=0-2;1-3;B=2 0;C=0 3;P=6 2;2 0;%变换矩阵x=PzP1=inv(P);A1=P1*A*P%z坐标系的模型B1=P1*BC1=C*P,A1=0 1-2-3B1=0 1C1=6 0,The eigenvalues of system are unchanged by the linear transformation:(线性变换不改变系统的特征值),约当标准形,canon(sys,model)canon(sys,companion),EX4利用特征值及范德蒙特矩阵求约当阵,A=0 1 0;0 0 1;2-5 4;V,D=eig(A)P=1 0 1;1 1 2;1 2 4P1=inv(P);J=P1*A*P,V=-0.5774 0.5774-0.2182-0.5774 0.5774-0.4364-0.5774 0.5774-0.8729D=1.0000 0 0 0 1.0000 0 0 0 2.0000P=1 0 1 1 1 2 1 2 4J=1 1 0 0 1 0 0 0 2,符号计算,Jo=jordan(A),Jo=2 0 0 0 1 1 0 0 1,8.4 系统的可控性和可观性,MATLAB提供函数分别计算能控性矩阵和能观测性矩阵可控性矩阵CO=ctrb(A,B)可观测性矩阵OB=obsv(A,C),可控性判定,A=1 1 0;0 1 0;0 1 1;B=0 1;1 0;0 1;n=length(A)CO=ctrb(A,B);rCO=rank(CAM);if rCO=n disp(System is controllable)elseif rCOn disp(System is uncontrollable)end,n=3 CO=0 1 1 1 2 1 1 0 1 0 1 0 0 1 1 1 2 1 rCO=2 System is uncontrollable,可观测性判定,A=-3 1;1-3;B=1 1;1 1;C=1 1;1 1;D=0;n=length(A);OB=obsv(A,C);rOB=rank(OB)if rOB=n disp(System is observable)elseif rOBn disp(System is unobservable)end,OB=1 1 1 1-2-2-2-2rOB=1System is unobservable,可控标准形,若S为非奇异,逆矩阵存在,设为,则,变换矩阵为P,A=-2 2-1;0-2 0;1-4 0;B=0 1 1;n=length(A);CAM=ctrb(A,B);if det(CAM)=0 CAM1=inv(CAM);endP=CAM1(3,:);CAM1(3,:)*A;CAM1(3,:)*A*A;P1=inv(P);A1=P*A*P1B1=P*B,A1=0 1 0 0 0 1-2-5-4B1=0 0 1,可观测标准形,则,变换矩阵为M=PT,若V为非奇异,逆矩阵存在,设为,8.5 系统状态反馈与状态观测器,利用反馈结构,研究在什么条件下能实现闭环系统极点的任意配置,以达到预期要求。状态反馈与状态观测器原理参见线性控制系统工程Module24,25,24.1 The Structure of State Space Feedback Control(状态反馈控制的结构),1.State Variable Feedback Control System,n the number of state variable,If the desired location of the closed-loop poles are,the desired characteristic equation will be,We can obtained,to make the closed-loop poles to be located in desired position.,The principle of designing a state space controller,2.The sufficient and necessary condition of state feedback for closed-loop placement:(状态反馈实现极点配置的充要条件),25.1 Observer A model of the system under study(P550 Section 2),The approach taken to solve the problem is as following:To construct a model of the system under study;Assume(subject to certain restrictions)that the computed state variables are good approximations to the true state variables;From these computed state variables,a suitable controller for the actual system may be constructed using the techniques described in Module 24.,Where,x are assumed to be unmeasured directly.,状态观测器设计,Now,we construct a model to simulate the origin system,and assume the parameter matrix are good approximations to,But in model is different from in the origin system,because is/are unmeasured directly.,To decrease the error,(that is error),we take to correct to make well approach:,Select the matrix K to make the solution of this equation on error be convergent(收敛的),then,The gain matrix K is written as:,The closed-loop poles of this model(observer)can be selected by selecting the gain matrix K,so that the state variables will be same as in the end.Hence,we can use as the state variables in the state variable feedback system.,The closed-loop system with observer,B,C,A,+,+,u,x,y,B,C,A,+,+,K,-,G,-,r,+,+,状态观测器,状态反馈,25.2 The sufficient and necessary condition of constructing a state variable observer,Observability criterion:A system A,C is state observable if and only if,参见线性控制系统工程539页POLE PLACEMENT VIA AKERMANNS FORMULA,MATLAB直接用于系统极点配置计算的函数有acker和place,A,B为系统矩阵,K=acker(A,B,P),P为期望极点向量,K反馈增益向量,K=place(A,B,P),状态观测器设计一般原理归结为使用极点配置法求观测器的增益矩阵G,A,C为系统矩阵,G=acker(A,C,P),P为观测器的期望极点向量,G为观测器增益向量,K=place(A,C,P),观测器设计和带观测器的状态反馈系统,amp413.mamp414.m利用阶跃响应和状态响应来进行检验状态估计值是否与系统状态实际值吻合amp415.m,