next up previous
Next: Property analysis Up: Inverted pendulum Previous: Open loop simulation

Linearization near vertical position

-->//
--> x0=[0;0;0;0];u0=0;
--> [f,g,h,j]=lin(pendu,x0,u0);
--> pe=syslin('c',f,g,h,j);ssprint(pe)
    | 0  1  0          0 |    | 0         |
.   | 0  0 -0.7178049  0 |    | 0.9756098 |
x = | 0  0  0          1 |x + | 0         |u
    | 0  0  52.639024  0 |    |-4.8780488 |
    | 1  0  0  0 |    | 0 |
y = | 0  0  1  0 |x + | 0 |u
-->//checking the result
-->//
--> f1=[0 1        0             0
-->    0 0    -3*mb*9.81/m         0
-->    0 0        0             1
-->    0 0  6*(mb+mc)*9.81/(m*l)   0];
--> g1=[0 ; 4/m ; 0 ; -6/(m*l)];
--> h1=[1 0 0 0
-->     0 0 1 0];
--> norm(f-f1,1)+norm(g-g1,1)+norm(h-h1,1)+norm(j,1)
 ans  =
    3.934D-15


Scilab group