Controllability of state space equation

In summary, the conversation discusses a mechanical system and its corresponding equations. The goal is to find the expression for u(t) that will bring the system to rest in 2 seconds and then simulate the time response using MATLAB. Various attempts using different equations and code are discussed, but the desired result is not achieved. An alternative approach using state feedback is suggested, with the use of eigenvalues to determine the desired characteristic polynomial and corresponding gains. The conversation ends with a suggestion to try using MATLAB's "place" command for better results.
  • #1
dabargo
2
0

Homework Statement


I have calculated the following mechanical system

[tex]

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

[/tex]

[tex]

\left( \begin{array}{c}y_{1}(t) & y_{2}(t)\end{array} \right) = \left( \begin{array}{cc}1 & 0\end{array} \right) \cdot \left( \begin{array}{c}x_{1}(t) & x_{2}(t)\end{array} \right)

[/tex]

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:
[tex]

x_1(0) = 10

[/tex]
[tex]

x_2(0) = -1

[/tex]


Homework Equations


[tex]

u(t) = -B^T\exp^{A^T(t_1-t)}W_c^{-1}(t_1)[\exp^{At_1}x_0-x_1]

[/tex]
[tex]

W_c(t_1) = \int_0^{t_1} \exp^{A\gamma}BB^T\exp^{A^T\gamma} d\gamma

[/tex]


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 interpretate something wrong maybe?
 

Attachments

  • Timeresponse1.jpg
    Timeresponse1.jpg
    10 KB · Views: 449
  • Timeresponse2.jpg
    Timeresponse2.jpg
    10.5 KB · Views: 428
  • lsimresults.bmp
    230.7 KB · Views: 572
Physics news on Phys.org
  • #2
dabargo said:

Homework Equations


[tex]

u(t) = -B^T\exp^{A^T(t_1-t)}W_c^{-1}(t_1)[\exp^{At_1}x_0-x_1]

[/tex]
[tex]

W_c(t_1) = \int_0^{t_1} \exp^{A\gamma}BB^T\exp^{A^T\gamma} d\gamma

[/tex]

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:

[tex]u=-Kx[/tex]

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

You then choose the eigenvalues of the closed loop system
[tex](sI-A+BK)[/tex] 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

[tex](s+2)(s+2)=s^2+4s+4[/tex]

Now to go about solving for [tex]K[/tex],

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

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

[tex]\alpha_2 = 1[/tex]
[tex]\alpha_1 = 2[/tex]
[tex]\alpha_0 = 4[/tex]

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 [tex]K=[1 \, 2][/tex] 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:
 

FAQ: Controllability of state space equation

1. What is the state space equation?

The state space equation is a mathematical representation of a dynamic system. It describes the state of the system as a set of state variables and the evolution of these variables over time. It is commonly used in control theory to model and analyze the behavior of systems.

2. How is the controllability of a state space equation determined?

The controllability of a state space equation can be determined by checking if the system can be controlled from any initial state to any desired final state in a finite amount of time. This can be done by analyzing the rank of the controllability matrix, which is a measure of the system's controllability.

3. What factors affect the controllability of a state space equation?

The controllability of a state space equation is affected by the number of state variables, the number of control inputs, and the system's dynamics. A higher number of state variables or control inputs generally leads to a more controllable system, while complex dynamics can make a system less controllable.

4. How does controllability relate to stability in a state space equation?

Controllability and stability are two different properties of a state space equation. Controllability refers to the ability to control the system's behavior, while stability refers to the system's tendency to return to a steady state after being disturbed. However, controllability can affect stability, as a highly controllable system is easier to stabilize through control inputs.

5. Can a state space equation be uncontrollable?

Yes, a state space equation can be uncontrollable. This means that there are certain states of the system that cannot be reached by any combination of control inputs. In this case, the system's behavior cannot be fully controlled, and it may exhibit unpredictable or undesirable responses to external inputs.

Similar threads

Back
Top