Time-optimal control to the origin for two first order ODES - Trying to take control as we speak! 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.

 A: 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!!
A: 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.)
