Severity: Warning
Message: fopen(/home/polpe/.phpsession/ci_session9ee13e10d2478488ebf9b0ca69f77397ea436d3a): failed to open stream: No space left on device
Filename: drivers/Session_files_driver.php
Line Number: 159
Backtrace:
File: /home/polpe/public_html/application/controllers/Main.php
Line: 17
Function: library
File: /home/polpe/public_html/index.php
Line: 315
Function: require_once
Teljes Matlab script
(és live script)
kiegészítő függvényekkel.
Tekintsd meg LiveEditor nézetben is!
Generate symbolic system parameters $k_1 ,k_2 ,k_3 ,k_4 >0$ (flow rate of the corresponding tank).
pcz_generateSymStateVector(4,'k');
pcz_generateSymStateVector(4,'x');
assumeAlso(k>0)
State space matrices
A = [
-k1 0 0 0
k1 -k2 0 0
0 k2 -k3 0
0 0 k3 -k4
];
B = [ 0 1 0 0 ]';
C = [ 0 0 1 0 ];
Observability and controllability matrices
C4 = [ B A*B A^2*B A^3*B ], rank(C4)
O4 = [ C ; C*A ; C*A^2 ; C*A^3 ], rank(O4)
C4 = [ 0, 0, 0, 0] [ 1, -k2, k2^2, -k2^3] [ 0, k2, - k2^2 - k3*k2, k3*(k2^2 + k3*k2) + k2^3] [ 0, 0, k2*k3, - k3*(k2^2 + k3*k2) - k2*k3*k4] ans = 3 O4 = [ 0, 0, 1, 0] [ 0, k2, -k3, 0] [ k1*k2, - k2^2 - k3*k2, k3^2, 0] [ - k2*(k1^2 + k2*k1) - k1*k2*k3, k3*(k2^2 + k3*k2) + k2^3, -k3^3, 0] ans = 3
Controllable subspace
XC_ = orth(C4)
XC_ = [ 0, 0, 0] [ 1, 0, 0] [ 0, 1, 0] [ 0, 0, 1]
State variables $\left(x_2 ,x_3 ,x_4 \right)$ are controllable
Uncontrollable subspace
Xc_ = null(XC_')
Xc_ = 1 0 0 0
State variable $x_1$ is not controllable
Unobservable subspace
X_o = null(O4)
X_o = 0 0 0 1
State variable $x_4$ is not observable
Observable subspace
X_O = null(X_o')
X_O = [ 1, 0, 0] [ 0, 1, 0] [ 0, 0, 1] [ 0, 0, 0]
State variables $\left(x_1 ,x_2 ,x_3 \right)$ are observable
S = [XC_ Xc_]
x_ = S'*x
A_ = S' * A * S, B_ = S' * B, C_ = C * S
S = [ 0, 0, 0, 1] [ 1, 0, 0, 0] [ 0, 1, 0, 0] [ 0, 0, 1, 0] x_ = x2 x3 x4 x1 A_ = [ -k2, 0, 0, k1] [ k2, -k3, 0, 0] [ 0, k3, -k4, 0] [ 0, 0, 0, -k1] B_ = 1 0 0 0 C_ = [ 0, 1, 0, 0]
A = [
1.613378610435994 -3.995855597631523 -0.810450484741737 -0.168720889102838
0.734243523886419 -1.441227814368974 -0.230398914393346 -0.184908002657739
-0.645586131749136 -2.271869456330054 -1.257298097726161 0.738442163303650
1.337529417392070 -5.440050610034118 -1.733590645293144 -0.143058326670208
];
B = [
1.420709123535001
0.656198450951251
-0.385009953764639
1.668593611633082
];
C = [ 0.715755046956996 -3.906572661173081 -0.886008486028291 0.751557463505590 ];
rtol = 1e-10;
Cn = ctrb(A,B), rank(Cn,rtol)
On = obsv(A,C), rank(On,rtol)
Cn = 1.4207 -0.2994 0.7760 -0.7495 0.6562 -0.1224 0.3454 -0.3295 -0.3850 -0.6918 0.4249 -0.6073 1.6686 -1.2408 1.6422 -1.8125 ans = 2 On = 0.7158 -3.9066 -0.8860 0.7516 -0.1364 0.6946 0.1311 -0.1602 -0.0089 0.1175 0.0634 0.0143 0.0501 -0.3555 -0.1243 0.0245 ans = 2