Direct collocation transcription is a dominant technique for solving complex optimal control problems, converting continuous dynamics into large-scale, sparse nonlinear programming problems. The computational efficiency of this approach is fundamentally limited by the evaluation of first- and second-order derivatives required by modern optimization algorithms. While general-purpose automatic differentiation tools exist, they often fail to fully exploit the repetitive substructure inherent in trajectory discretization. This paper presents a vectorized, sparse, second-order forward automatic differentiation framework specifically tailored for direct collocation methods. By explicitly distinguishing between scalar and vector nodes within the expression graph, the proposed method leverages the independence of mesh point evaluations to enable Single Instruction, Multiple Data (SIMD) execution and optimize memory access patterns. This structure-aware approach ensures linear time complexity with respect to the number of discretization nodes while maintaining the flexibility to handle complex dependencies. The methodology is implemented in the open-source software package pockit and is validated through three distinct engineering case studies: the aggressive stabilization of a nano-quadrotor, the powered descent guidance of a reusable launch vehicle, and a low-thrust heliocentric orbital transfer. These applications demonstrate the framework’s capability to deliver high-performance derivative computation for large-scale, nonlinear dynamical systems.
Zou et al. (Mon,) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: