14

I want to find the time optimal control to the origin of the system:

$$\dot{x}_1 = 3x_1+ x_2$$ $$\dot{x}_2 = 4x_1 + 3x_2 + u$$ where $|u|\leq 1$

I ran straight into the problem full strength, hit it with all I have got:

$\begin{pmatrix} \dot{x}_1 \\ \dot{x}_2\end{pmatrix} = \begin{pmatrix}3 & 1 \\ 4 & 3\end{pmatrix}\begin{pmatrix}x_1 \\ x_2\end{pmatrix}+ \begin{pmatrix}0\\u \end{pmatrix}$

So we get eigenvalues from $(3-\lambda)^2-4=\lambda^2-6\lambda +5=(\lambda-1)(\lambda-5),\lambda=1,5$

And bam, I got hit by that... Hit straight headfirst with two eigenvalues - same sign - no complex component. But oh no... That means... No it couldn't be?? It is repulsive, the control is going to be hard.

I am running out of time my friends, the oxygen is low and I need to land at base to refill it, but the planets is pulsating with a magenetic field of opposite polarity to the ship at the time being(positive eigenvalues)! How do I get back in the optimal time using my rockets?

Question: How do I setup the optimal control so I can land before my oxygen depletes? I don't know where to go from here. Is the information decoded from the transmission entitled 'Committing to a name' correct?

Editing in my current knowledge as an answer as I try it again.

Exodus
  • 189
  • Hint: Find eigen-vectors, then general solution to coupled system, Setup Hamiltonian and maximize as a function of $u$, consider how many switches you will need for the optimal case for this switching function. Consider the Pontryagin maximum principle. Draw phase plane and find $C^+ C^-$ paths to origin, noting your switching function. –  Oct 22 '14 at 08:23
  • Take a look at bang-bang control. – Calculon Nov 03 '14 at 16:01

2 Answers2

1

I can have a shot, I think I've finished the problem sufficiently.

So, you should be able to get to the following;

$$H = -1 + \psi_1(3x_1 + x_2) + \psi_2(4x_1 + 3x_2) + u \psi_2$$

Now, as a direct consequence of PMP, we can basically set $S = \psi_2$, so with that, we get $u^* = sgn(S) = sgn(\psi_2) = \pm 1$. Now, what this basically means is that $u^*$ will switch depending on whether $\psi_2$ is positive or negative. We do eventually work it out, but we need to make sure that $\psi_2$ has, at most, one zero.

Now, again, you should be able to work out the appropriate eigenvalues and eigenvectors, which should come out to be: $$\lambda_1 = 5, v_1 = \left( \begin{array}{c} 1\\ 2\\ \end{array} \right)$$

$$\lambda_2 = 1, v_2 = \left( \begin{array}{c} 1\\ -2\\ \end{array} \right)$$

Then, this gives you an expression for $x$:

$$x(t) = \alpha_1 \left( \begin{array}{c} 1\\ 2\\ \end{array} \right)e^{5t} + \alpha_2 \left( \begin{array}{c} 1\\ 2\\ \end{array} \right)e^{t} $$

Using a similar process, you should be able to work out the appropriate eigenvalues and vectors for the costate equations (the eigenvalues are just the negatives of $1$ and $5$, the vectors differ a little bit, but not too much).

You should get something along the lines of;

$$\psi(t) = \beta_1 \left( \begin{array}{c} 2\\ 1\\ \end{array} \right)e^{-5t} + \beta_2 \left( \begin{array}{c} -2\\ 1\\ \end{array} \right) e^{-t}$$

Now, this means that $\psi_2 = \beta_1 e^{-5t} + \beta_2 e^{-t}$, which clearly can have at most one zero.

Now, you can sub $u^* = \pm 1$ into your initial state equations, to work out your $P$ and $Q$ start points respectively. If you take $u^* = 1$, you should get the $C^+$ paths; $$x(t) = \alpha_1 \left( \begin{array}{c} 1\\ 2\\ \end{array} \right)e^{5t} + \alpha_2 \left( \begin{array}{c} 1\\ 2\\ \end{array} \right)e^{t} +\left( \begin{array}{c} \frac{1}{5}\\ \frac{-3}{5}\\ \end{array} \right) $$

And with $u^* = -1$, the following $C^-$ paths;

$$x(t) = \alpha_1 \left( \begin{array}{c} 1\\ 2\\ \end{array} \right)e^{5t} + \alpha_2 \left( \begin{array}{c} 1\\ 2\\ \end{array} \right)e^{t} +\left( \begin{array}{c} \frac{-1}{5}\\ \frac{3}{5}\\ \end{array} \right) $$

From there, it should be pretty easy to draw out your solution. If that gives you some trouble, I'll be in the 2:00pm tutorial tomorrow, so you can have a look at my diagram if you'd like. I'm the kid with the stupid long hair and blue headphones!!

Jack
  • 1,084
  • Ah yeah, should also mention the slope at $(0,0)$. To get that, divide your $\dot x_2$ by $\dot x_1$, and set $x_1 = x_2 = 0$. You should get $\pm \infty$. – Jack Oct 30 '14 at 07:31
  • Had you done the previous assignment?? It's pretty much the last question on that again. – Jack Oct 30 '14 at 08:03
  • It's kind of really hard to explain in words what the curves look like/how to draw them. – Jack Oct 30 '14 at 08:04
  • http://tutorial.math.lamar.edu/Classes/DE/PhasePlane.aspx

    Something like this is probably the best intro to drawing phase planes, which is essentially what you're doing.

    – Jack Oct 30 '14 at 08:05
  • All good, dude. $P$ and $Q$ are vectors, and they're basically the origin of where all these curves are coming from. The relevance behind getting the slope and the equation for the curve is that you want to select a $C^+$ and $C^-$ curve that goes from $P$ or $Q$ respectively to the origin, such that the derivative of the curve at the origin is $\pm \infty$. Then, the $POQ$ line, where $O$ is the origin, is the line on which switching occurs. You then need to work out what lines intercept that $POQ$ line, and from there, you can work out within what region you can control things. – Jack Oct 30 '14 at 08:14
  • Was it $u^=1$ below POQ until POQ and then $u^=-1$

    $u^=-1$ above POQ until POQ and then $u^=1$

    Correct? and only controllable in the rectangle made by the eigenvectors?

    – Exodus Nov 01 '14 at 08:22
  • Pretty much, yeah. I haven't handed mine in yet, I've been sick ;-; – Jack Nov 01 '14 at 11:58
  • Oh I handed mine in already :'(. I didn't know how to do it, so I didn't hand it in with the pictures, I just want to learn how to do it for the final. How do you describe the area of controllability? It was just the rectangle that the eigenvectors made? – Exodus Nov 02 '14 at 03:47
  • To find the optimal time, should I find the maximum or minimum of the function:$x(t)= \alpha_1 \left( \begin{array}{c} 1\ 2\ \end{array} \right)e^{5t} + \alpha_2 \left( \begin{array}{c} 1\ 2\ \end{array} \right)e^{t} +\left( \begin{array}{c} \frac{-1}{5}\ \frac{3}{5}\ \end{array} \right)$? – Alex Pozo Mar 21 '18 at 22:58
0

To maximize H as a function of u I believe you can simply say that u(t) = 1 sqn ψ2(t). Its simply a case of when will H be as big as it can be as you change u, since |u|≤1, H can take maximum values at 1 or -1 depending on the sign of ψ2.

(sorry for not commenting on your answer, I don't have high enough rep haha. I signed up because I'm battling the same question myself and thought I might be able to help.)

Dave
  • 1