Teaching examples for three direct methods for solving optimal control problems, namely single shooting, single step, and pseudospectral.
INSTALL_Direct_Method_Examples
/src
Run_All_Examples
See INSTALL_Direct_Method_Examples.m for more information
The main methods should work on version R2014b or newer. Method_DTQPProject.m requires version R2016a or newer. Some of the plot decorations require newer versions that support structure properties in figures. The Optimization Toolbox is required.
This is the optimal control problem used in the examples. The problem formulation is:
The optimal control solution when \ell
is between 0 and 1/6 is:
Please see the following files that calculate the optimal states and control. See pages 120–123 of A. E. Bryson and Y.-C. Ho, Applied Optimal Control, revised printing ed. Taylor & Francis, 1975 for more details on this problem.