Controllability of state space equation

Click For Summary
SUMMARY

The discussion focuses on the controllability of a mechanical system represented by a state space equation. The user attempts to derive the control input u(t) to bring the system to rest in 2 seconds using MATLAB's lsim function but encounters unexpected results. A solution involving state feedback is proposed, where the control input is defined as u = -Kx, with K chosen to place the eigenvalues of the closed-loop system at desired locations for optimal performance. The suggested gains for K are [1, 2], which effectively adjust the system's poles.

PREREQUISITES
  • Understanding of state space representation in control systems
  • Familiarity with MATLAB and its lsim function
  • Knowledge of eigenvalues and their significance in system stability
  • Experience with state feedback control techniques
NEXT STEPS
  • Research "State Space Control Design" for deeper insights into control strategies
  • Learn about "Pole Placement Techniques" in control systems
  • Explore MATLAB's "place" command for eigenvalue assignment
  • Study "Controllability and Observability" in linear systems
USEFUL FOR

Control engineers, mechanical system designers, and students studying control theory who are looking to optimize system performance through state feedback methods.

dabargo
Messages
2
Reaction score
0

Homework Statement


I have calculated the following mechanical system

<br /> <br /> \left( \begin{array}{c}\dot{\mathbf{x_1}}(t) &amp; \dot{\mathbf{x_2}}(t) \end{array} \right) = \left( \begin{array}{cc}-0.5 &amp; 0 &amp; 0 &amp; -1\end{array} \right) \cdot \left( \begin{array}{c}x_{1}(t) &amp; x_{2}(t)\end{array} \right) + \left( \begin{array}{c}0.5 &amp; 1\end{array} \right)\cdot u(t)<br /> <br />

<br /> <br /> \left( \begin{array}{c}y_{1}(t) &amp; y_{2}(t)\end{array} \right) = \left( \begin{array}{cc}1 &amp; 0\end{array} \right) \cdot \left( \begin{array}{c}x_{1}(t) &amp; x_{2}(t)\end{array} \right) <br /> <br />

The question is to find the expression for u(t) that brings the system to its restposition in 2 seconds. Afterwards i have to simulate this time response in MATLAB with the function lsim.

The initial conditions of the system are:
<br /> <br /> x_1(0) = 10<br /> <br />
<br /> <br /> x_2(0) = -1<br /> <br />


Homework Equations


<br /> <br /> u(t) = -B^T\exp^{A^T(t_1-t)}W_c^{-1}(t_1)[\exp^{At_1}x_0-x_1]<br /> <br />
<br /> <br /> W_c(t_1) = \int_0^{t_1} \exp^{A\gamma}BB^T\exp^{A^T\gamma} d\gamma<br /> <br />


The Attempt at a Solution


I calculated u(t) with MATLAB with the following code
Code:
A = [-0.5 0;0 1];
B = [0.5; 1];
C = [1 0];
D = 0;
syms t;
Wc = int(expm(A*t)*B*transpose(B)*expm(transpose(A)*t),0,2);
u = -transpose(B)*expm(transpose(A)*(2-t))*inv(Wc)*(expm(A*2)*[10;-1]-[0;0]);
sys = ss(A,B,C,D);
t = 0:0.1:2;
u = subs(u,t);
lsim(sys,u,t)

But the result i get with lsim doesn't fulfill my expectations at all.
The result i get is given in the lsimresults.bmp.
While i expect it to curve a bit down/up the original time responses (1st and 2nd thumbnails) where u(t) = 0, so that the amplitude of the system becomes 0 at 2 seconds.

So, if you there is anybody who can give me some help where it goes wrong. Or if i interpret something wrong maybe?
 

Attachments

  • Timeresponse1.jpg
    Timeresponse1.jpg
    10 KB · Views: 504
  • Timeresponse2.jpg
    Timeresponse2.jpg
    10.5 KB · Views: 479
  • lsimresults.bmp
    lsimresults.bmp
    230.7 KB · Views: 619
Physics news on Phys.org
dabargo said:

Homework Equations


<br /> <br /> u(t) = -B^T\exp^{A^T(t_1-t)}W_c^{-1}(t_1)[\exp^{At_1}x_0-x_1]<br /> <br />
<br /> <br /> W_c(t_1) = \int_0^{t_1} \exp^{A\gamma}BB^T\exp^{A^T\gamma} d\gamma<br /> <br />

Where did you get those equations, your system is not doing what you want it to do I agree.

I've tried using state feedback to solve your problem, here is what I got:

u=-Kx

where x=[x_1 \, x_2]^{T}
and K=[K_1 \, K_2]

You then choose the eigenvalues of the closed loop system
(sI-A+BK) by varying K such that they have the properties you want.

In this case you want a settling time of 2s, so I would make both of my eigenvalues equal to -2, which gives us the desired characteristic polynomial of

(s+2)(s+2)=s^2+4s+4

Now to go about solving for K,

the controllers characteristic polynomial is
det(sI-A+BK)=\alpha_2s^2+\alpha_1s+\alpha_0

All you do now is compare the desired characteristic polynomial with the actual characteristic polynomial and solve for K_1, K_2 such that the co-efficients of the two characteristic polynomials are equal i.e.

\alpha_2 = 1
\alpha_1 = 2
\alpha_0 = 4

For this system there is a pole that no matter what feedback you give the system, will not move higher

the pole is located at approx. -0.74

If the settling time we are talking about is 0-63% of final value then you are ok.
The other pole you can shift around at whim using this technique.

The gains I used are K=[1 \, 2] to give poles at -0.73 and -5.76

I don't have access to MATLAB now but try its "place" command
maybe you can have better luck that way :smile:
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K