Optimal and Robust Control
B3M35ORR + BE3M35ORR + BE3M35ORCHomework problem assignment #6 - Retest
Find the optimal trajectory (both states and controls) minimizing the following cost function
\int_0^{5} u^2(t) dt
\)
and getting the system modeled by
\begin{array}{rl}
\dot{x}_1(t) &= x_2^3(t), \\
\dot{x}_2(t) &= u(t) ,
\end{array}
\)
from \(x_1(0)=1, x_2(0)=1\) to \(x_1(5)=0, x_2(5)=0\).
This problem is an instance of an Optimal Control Problem with a fixed final state and on a finite time horizon. As such, its solution leads to a Two-Point Boundary Value Problem and thus it can be solved in Matlab by the function bvp4c.
Implement your solution as a function with the header of the following form:
function [ t_star, x_star, u_star ] = hw6_cvutID()
where cvutID is your KOS username, t_star is the time vector of the trajectory, x_star is the state trajectory and u_star is the control trajectory. You are free to choose the sampling of the time interval [0, 5]; in other words, time samples in t_star can be arbitrarily spaced.
You can submit only one m-file. If you need more functions, you can use nested functions (for details, see this).