状态变量表达形式中-状态变量的转换 eg: x1->x2

状态控制表达中-状态变量的转换

 

Transformation: State Space ↔ State Space

系统的状态变量表示不是唯一的。事实上,有无穷多的表现形式。下面将讨论从一组状态变量转换到另一组状态变量的方法,并给出一个示例。

 

 

 

 

 

 

 

 1 Use MatLab to convert from state space to state space (symbolic)
 2 This script requires the MatLab's symbolic toolbox
 3 
 4 % Start by clearing everything
 5 clear all
 6 clc
 7 format compact
 8 Declare all symbolic variables
 9 
10 syms k1 k2 b m
11 Define state space system
12 
13 A=[0 1 0; -(k1+k2)/m 0 k1/m; k1/b 0 -k1/b];
14 B=[0; 1/m; 0];
15 C=[0 0 1];
16 D=0;
17 
18 Define state transformation matrix and find its inverse
19 
20 T=[1/2 0 1/2; -1 0 1; 0 1 0;];
21 Tinv=inv(T)
22 Tinv =
23          1.0000   -0.5000         0
24          0         0    1.0000
25          1.0000    0.5000         0
26 
27 Find new state space system
28 
29 % Ahat
30 Ahat = simplify(T*A*Tinv)
31 
32 % Bhat
33 Bhat = T*B
34 
35 % Chat
36 Chat = C*Tinv
37 
38 % Dhat
39 Dhat = D
40 Ahat =
41           [     0,         -k1/(2*b), 1/2]
42           [     0,             -k1/b,  -1]
43           [ -k2/m, (2*k1 + k2)/(2*m),   0]
44 Bhat =
45           0
46           0
47          1/m
48 Chat =
49            1.0000    0.5000         0
50 Dhat =
51            0
View Code

 

posted @ 2021-01-12 15:54  试一下就知道了  阅读(260)  评论(0编辑  收藏  举报