Direct optimal control algorithms first discretize the continuous-time optimal control problem and then solve the resulting finite dimensional optimization problem. If Newton type optimization algorithms are used for solving the discretized problem, accurate first as well as second order sensitivity information needs to be computed. This article develops a novel approach for computing Hessian matrices which is tailored for optimal control. Algorithmic differentiation based schemes are proposed for both discrete- and continuous-time sensitivity propagation, including explicit as well as implicit systems of equations. The presented method exploits the symmetry of Hessian matrices, which typically results in a computational speedup of about factor 2 over standard differentiation techniques. These symmetric sensitivity equations additionally allow for a three-sweep propagation technique that can significantly reduce the memory requirements, by avoiding the need to store a trajectory of forward sensitivities. The performance of this symmetric sensitivity propagation is demonstrated for the benchmark case study of the economic optimal control of a nonlinear biochemical reactor, based on the open-source software implementation in the ACADO Toolkit.
published in Journal of Process Control (February 2017, Volume 50, Pages 19–28)