## Optimal Control Question

Solve the problem of optimal control to the origin for the system

$\displaystyle \displaystyle \dot{x_1} = - 4x_1 + 2x_2$

$\displaystyle \displaystyle \dot{x_2} = 2x_1 - 4x_2 + 2u$

where $\displaystyle \displaystyle |u| \leq 2$

I have done a bit, but Im not really sure where to go next....

$\displaystyle \displaystyle J[x] = \int_{t_0}^{t_1} 1 dt$

Let
$\displaystyle \displaystyle f_0 (x_1, x_2, u) = 0$

$\displaystyle \displaystyle f_1 (x_1, x_2, u) = -4x_1 + 2x_2$

$\displaystyle \displaystyle f_2 (x_1, x_2, u) = 2x_1 - 4x_2 + 2u$ where $\displaystyle u \leq |2|$

Then

$\displaystyle \displaystyle \vec{\dot{x}} = Ax + \left( \begin{array}{ccc} 0 \\ 3 \end{array} \right) u$ where $\displaystyle A = \left( \begin{array}{ccc} -4 & 2 \\ 2 & -4 \end{array} \right)$

$\displaystyle \vec{\dot{x}} = \left( \begin{array}{ccc} \dot{x_1} \\ \dot{x_2} \end{array} \right) , \vec{x} = \left( \begin{array}{ccc} x_1 \\ x_2 \end{array} \right) , |u| \leq 2$

Then

$\displaystyle H = \psi_0 f_0 + \psi_1 f_1 + \psi_2 f_2$ where $\displaystyle \psi= -1$

$\displaystyle = -1 + \psi_1(- 4x_1 + 2x_2) + \psi_2(2x_1 - 4x_2) + 2 \psi_2 u$

The costate equations are

$\displaystyle \displaystyle \dot{\psi_1} = - \frac{\partial H}{\partial x_1} = 4 \psi_1 - 2 \psi_2$

$\displaystyle \displaystyle \dot{\psi_2} = - \frac{\partial H}{\partial x_2} = 4 \psi_2 - 2 \psi_1$

$\displaystyle \displaystyle \vec{\dot{\psi}} = -A^T \vec{\psi}$

$\displaystyle \displaystyle = \left( \begin{array}{ccc} 4 & -2 \\ -2 & 4 \end{array} \right)\vec{\psi}$

so $\displaystyle u^*$ maximizes $\displaystyle H$as a function of $\displaystyle u$. As $\displaystyle u$ is linear in $\displaystyle H$ and $\displaystyle |u| \leq 2$ then $\displaystyle H$ is maximized such that $\displaystyle u^* = 2$ when $\displaystyle 2 \psi_2 > 0$ and $\displaystyle u^* = -2$when $\displaystyle 2 \psi_2 < 0$

$\displaystyle u* = sgn (2 \psi_2)$
The eigenvalues are found when $\displaystyle det (A - \lambda I) = 0$

when solving we have two eigenvalues

$\displaystyle \lambda = -4 \pm 2 \sqrt{7}$.

I'm not sure if what I have done is correct, and I don't know where to go from here.