1

I'm trying to solve this optimal control theory problem, but i'm having some problem finding the constants $k_1$ and $k_2$. I will show what I have developed so far.

The problem:

$$V(y)=\int_{0}^{1}u^2+2yu+2y^2\,dt$$ with $$y'=y+u;\quad y(0)=0;\quad y(1)=y_{1}$$ where $y(1)$ can vary and $T=1$ is given.

I will skip all the calculations, but after finding the Hamiltonian and applying the canonic equations and solving the system of differential equations I have:

\begin{align} u&=-y-\frac{1}{2}\lambda\\ y&=-\frac{1}{2}k_1e^t+\frac{1}{2}k_2e^{-t}\\ \lambda&=k_1e^t+k_2e^{-t} \end{align}

I should use the initial condition $y(0)=0$ and the traversality condition $\lambda(T=1)=0$ to find $k_1$ and $k_2$. But I don't know why, I can't solve these simple system:

\begin{align} y(0)&=-\frac{1}{2}k_1+\frac{1}{2}k_2=0\\ \lambda(T=1)&=k_1e+k_2e^{-1}=0 \end{align}

I find $k_1=k_2=0$ which seems wrong to me.

Did I miss something in the process?

Thank you very much.

DMcMor
  • 9,407
Jackaba
  • 83

2 Answers2

1

The problem is that the condition on the Lagrange multiplier $\lambda(1)=0$ doesn't apply here (recall this condition arises from the derivation of the Euler-Lagrange equations with the boundary term coming from the integration by parts step). Since the point $y_1$ is presumably fixed, assuming anything about $\lambda(1)$ overdetermines the resulting system of necessary optimality conditions.

As far as solving your system is concerned for completeness of this answer, note that, fortuitously, $$u=\frac{\lambda}{2}-y $$ implies $$\dot{y}=u+y=\frac{\lambda}{2}. $$ Now since $$\frac{\delta V}{\delta\lambda}=0\to2u+4y-\dot{\lambda}-\lambda=2y-\dot{\lambda}=0, $$ after substituting in for u, we find after differentiating the equation for $\dot{y}$, the following boundary value problem $$\ddot{y}-y=0,\quad y(0)=0,\ y(1)=y_1 $$ whose simple solution is given by $$y(t)=\frac{y_1}{\sinh1}\sinh t. $$ For completeness, the lagrange multiplier is $$\lambda=2\dot{y}=2\frac{y_1}{\sinh1}\cosh t, $$ therefore the optimal control is given by $$u=\frac{\lambda}{2}-y=\frac{y_1}{\sinh1}\cosh t-\frac{y_1}{\sinh1}\sinh t=\frac{y_1}{\sinh1}e^{-t}. $$

  • Actually, $y(1)$ can vary, that why I use the transversality condition with lambda. But I think it was not clear in my question, I have edited it. And I found a different equation for $u$, as you can see in my question. But thank you anyway!! – Jackaba Feb 09 '21 at 11:40
  • 1
    writing y(1)=y_1 as a condition means you will have a one parameter family of optimal controls in the end. If you mean that y(1) is not a given and can truly be anything (which means you shouldn't write y(1)=y_1 in your problem statement) , observe that lambda(1)=0 sets u and y to zero in the solution above, so everything is consistent. – garserdt216 Feb 10 '21 at 22:50
  • we have the same equation for u, by the way, up to a sign of lambda which doesn't change the end result – garserdt216 Feb 10 '21 at 22:54
0

Your solution is fine. Note that if $$H = u^2+2yu+2y^2 + \lambda(y + u)$$ then $$\frac{\partial H}{\partial u} = 2u + 2y + \lambda$$ and $$\frac{\partial^{2} H}{\partial u^{2}} = 2 > 0,$$ which means that this is a minimization problem. It's not unreasonable to expect a minimization problem involving several squares and a product to have its minimum when the state and control are zero, particularly when the differential equation for $y$, along with the initial condition, tell us that $yu \ge 0$ at least initially.

DMcMor
  • 9,407