《现代控制理论基础》第五章(讲义)
JA=
1.0000 6.0000 5.0000 1.0000
a1=JA(2);a2=JA(3);a3=JA(4);
%*****Define matrices W and P as follows***** W=[a2 a1 1;a1 1 0;1 0 0]; P=Q*W;
%*****Obtain
the
desired
chracteristic polynomial by defining
%the following matrix J and entering statement poly(J)*****
J=[-2+j*4 0 0;0 -2-j*4 0;0 0 -10];
16
《现代控制理论基础》第五章(讲义)
JJ=poly(J) JJ=
1 14 60 200
aa1=JJ(2);aa2=JJ(3);aa3=JJ(4);
%*****State feedback gain matrix K can be given by *****
K=[aa3-a3 aa2-a2 aa1-a1]*(inv(P)) K=
199 55 8
%*****Hence, k1,k2,and k3 are given by *****
k1=K(1),k2=K(2),k3=K(3)
17
《现代控制理论基础》第五章(讲义)
k1= 199 k2= 55 k3= 8 如果采用爱克曼公式来确定状态反馈增益矩阵K,必须首先计算矩阵特征方程φ(A)。 对于该系统
?(A)?A?a1A?a2A?a3I
3*2** 在MATLAB中,利用Polyvalm可计算矩阵多项式φ(A)。对于给定的矩阵J,如前所示,poly(J)可计算特征多项式的系数。对于
10??0??A?001
?????1?5?6?? 利用MATLAB命令Polyvalm(Poly(J), A),可计算下列φ(A),即
18
《现代控制理论基础》第五章(讲义)
?19955832?(A)?A?14A?60A?200I???81597????7?43?? ?117??实际上,
Polyvalm(poly(J), A) ans= 199 55 8 -8 159 7 -7 -43 117 利用爱克曼公式,MATLAB Program 5.2将求出状态反馈增益矩阵K。
MATLAB Program 5.2 %--------Pole placement--------- %*****Determination of state feedback gain matrix K by use of ?kermann’s formula***** 19
《现代控制理论基础》第五章(讲义)
%*****Enter matrices A and B*****
A=[0 1 0;0 0 1; -1 -5 -6]; B=[0;0;1];
%*****Define the controllability matrix Q*****
Q=[B A*B A^2*B];
%*****Check the rank of matrix Q***** rank(Q) ans= 3
%*****Since the rank of Q is 3, arbitrary pole placement is
20