利用MATLAB设计状态观测器
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
利用MATLAB 设计状态观测器
本节将介绍用MATLAB 设计状态观测器的若干例子。我们将举例说明全维状态观测器和最小阶状态观测器设计的MATLAB 方法。
------------------------------------------------
[例1] 考虑一个调节器系统的设计。给定线性定常系统为
Cx
y Bu Ax x =+=& 式中
]01[,10,06.2010=⎥⎦⎤⎢⎣⎡=⎥⎦⎤⎢⎣⎡=C B A
且闭环极点为)2,1(==i s i μ,其中
4.28.1,4.28.121j j −−=+−=μμ
期望用观测-状态反馈控制,而不是用真实的状态反馈控制。观测器的期望特征值为
821−==μμ
试采用MATLAB 确定出相应的状态反馈增益矩阵K 和观测器增益矩阵e K 。
[解]对于题中给定的系统,可利用如下MATLAB Program 1来确定状态反馈增益矩阵K和观测器增益K。
矩阵
e
MATLAB Program 1
% Pole placement and design of observer ------
% ***** Design of a control system using pole-placement
% technique and state observer. Solve pole-placement
% problem *****
% ***** Enter matrices A,B,C,and D *****
A=[0 1;20.6 0];
B=[0;1]
C=[1 0];
D=[0];
% ***** Check the rank of the controllability matrix Q *****
Q=[B A*B];
Rank(Q)
ans=
2
% ***** Since the rank of the controllability matrix Q is 2, % arbitrary pole placement is possible *****
% ***** Enter the desired characteristic polynomial by
% defining the following matrix J and computingpoly(J) *****
J=[-1.8+2.4*i 0;0 -1.8-2.4*i];
Poly(J)
ans=
1.000 3.6000 9.0000
% ***** Enter characteristic polynomial Phi *****
Phi=polyvalm(poly(J),A);
% ***** State feedback gain matrix K can be given by ***** K=[0 1]*inv(Q)*Phi
K=
29.6000 3.6000
% ***** The following program determines the observer matrix Ke *****
% ***** Enter the observability matrix RT and check its rank *****
RT=[C’ A’*C’];
rank(RT)
ans=
2
% ***** Since the rank of the observability matrix is 2, design of
% the observer is possible *****
% **** Enter the desired characteristic polynomial by defining % the following matrix J0 and entering statement poly(JO) *****
JO=[-8 0;0 -8];
Poly(JO)
ans=
1 16 64
% ***** Enter characteristic polynomial Ph ***** Ph=polyvalm(ply(JO),A);
% ***** The observer gain matrix Ke is obtained from ***** Ke=Ph*(inv(RT’))*[0;1]
Ke=
16.0000
84.60000
求出的状态反馈增益矩阵K 为
[]6.36.29=K
观测器增益矩阵e K 为
⎥⎦
⎤⎢⎣⎡=6.8416e K 该观测-状态反馈控制系统是4阶的,其特征方程为
0=+−+−C K A sI BK
A sI e
通过将期望的闭环极点和期望的观测器极点代入上式,可得
576
4.3746.1306.19)8)(4.28.1)(4.28.1(2342++++=+++−+=
+−+−s s s s s j s j s C K A sI BK A sI e
这个结果很容易通过MATLAB得到,如MATLAB Program 2所示(MATLAB Program 2是
K已MATLAB Program1的继续。矩阵A、B、C、K和
e 在MATLAB Program 1中给定)。
MATLAB Program 2
% ------- Characteristic polynomial -------
% ***** The characteristic polynomial for the designed system
% is given by |sI-A+BK||sI-A+KeC| *****
% ***** This characteristic polynomial can be obtained by use of
% eigenvalues of A-BK and A-KeC as follows ***** X=[eig(A-B*K);eig(A-Ke*C)]
X=
-1.8000+2.4000i
-1.8000-2.4000i
-8.0000