Subjects optimal control

Optimal Control 4B1802

Step-by-step solutions with LaTeX - clean, fast, and student-friendly.

Use the AI math solver

1. **Problem statement:** We want to maximize the functional $$\max_{u(t)} \int_0^T (2u - \frac{1}{2}u^2 + 2x) e^{-2t} dt$$ subject to the dynamic constraint $$\dot{x}(t) = x(t) - u(t), \quad x(0) = x_0, \quad x(T) \text{ free}.$$ 2. **Hamiltonian formulation:** Define the Hamiltonian as $$H = (2u - \frac{1}{2}u^2 + 2x) e^{-2t} + \lambda (x - u),$$ where $\lambda(t)$ is the costate variable. 3. **Optimality condition for control $u$:** Maximize $H$ with respect to $u$ by setting $$\frac{\partial H}{\partial u} = 0.$$ Calculate: $$\frac{\partial H}{\partial u} = (2 - u) e^{-2t} - \lambda = 0.$$ Solve for $u$: $$u = 2 - \lambda e^{2t}.$$ 4. **Costate equation:** The costate dynamics are given by $$\dot{\lambda} = -\frac{\partial H}{\partial x}.$$ Calculate: $$\frac{\partial H}{\partial x} = 2 e^{-2t} + \lambda,$$ so $$\dot{\lambda} = - (2 e^{-2t} + \lambda) = -2 e^{-2t} - \lambda.$$ 5. **State equation:** Recall $$\dot{x} = x - u = x - (2 - \lambda e^{2t}) = x - 2 + \lambda e^{2t}.$$ 6. **System of differential equations:** We have the coupled system $$\begin{cases} \dot{x} = x - 2 + \lambda e^{2t} \\ \dot{\lambda} = -2 e^{-2t} - \lambda \end{cases}$$ with initial condition $x(0) = x_0$ and transversality condition $\lambda(T) = 0$ since $x(T)$ is free. 7. **Solve costate equation:** Rewrite $$\dot{\lambda} + \lambda = -2 e^{-2t}.$$ Use integrating factor $e^{t}$: $$\frac{d}{dt}(\lambda e^{t}) = -2 e^{-2t} e^{t} = -2 e^{-t}.$$ Integrate: $$\lambda(t) e^{t} = \int -2 e^{-t} dt + C = 2 e^{-t} + C,$$ so $$\lambda(t) = 2 e^{-2t} + C e^{-t}.$$ Apply terminal condition $\lambda(T) = 0$: $$0 = 2 e^{-2T} + C e^{-T} \implies C = -2 e^{-T}.$$ Thus $$\lambda(t) = 2 e^{-2t} - 2 e^{-T} e^{-t}.$$ 8. **Substitute $\lambda(t)$ into state equation:** $$\dot{x} = x - 2 + \left(2 e^{-2t} - 2 e^{-T} e^{-t}\right) e^{2t} = x - 2 + 2 - 2 e^{-T} e^{t} = x - 2 e^{-T} e^{t}.$$ Simplify: $$\dot{x} - x = -2 e^{-T} e^{t}.$$ 9. **Solve for $x(t)$:** Use integrating factor $e^{-t}$: $$\frac{d}{dt}(x e^{-t}) = -2 e^{-T}.$$ Integrate: $$x(t) e^{-t} = -2 e^{-T} t + D,$$ so $$x(t) = e^{t} (D - 2 e^{-T} t).$$ Apply initial condition $x(0) = x_0$: $$x_0 = D,$$ thus $$x(t) = e^{t} (x_0 - 2 e^{-T} t).$$ 10. **Final expressions:** - Optimal control: $$u(t) = 2 - \lambda(t) e^{2t} = 2 - \left(2 e^{-2t} - 2 e^{-T} e^{-t}\right) e^{2t} = 2 - 2 + 2 e^{-T} e^{t} = 2 e^{-T} e^{t}.$$ - Optimal state: $$x(t) = e^{t} (x_0 - 2 e^{-T} t).$$ **Summary:** $$\boxed{\begin{cases} u^*(t) = 2 e^{-T} e^{t} \\ x^*(t) = e^{t} \left(x_0 - 2 e^{-T} t\right) \end{cases}}$$