Abstract
This paper provides an overview, analysis, and comparison of second-order dynamic optimization algorithms, i.e., constrained Differential Dynamic Programming (DDP) and Sequential Quadratic Programming (SQP). Although a variety of these algorithms have been proposed and used successfully, there exists a gap in understanding the key differences and advantages, which we aim to provide in this work. For constrained DDP, we choose methods that incorporate nonlinear programming techniques to handle state and control constraints, including Augmented Lagrangian (AL), Interior Point, Primal-Dual Augmented Lagrangian (PDAL), and Alternating Direction Method of Multipliers (ADMM). Both DDP and SQP are provided in single- and multiple-shooting formulations, where constraints that arise from dynamics are encoded implicitly and explicitly, respectively. As a byproduct of the review, we propose a single-shooting PDAL DDP that has more favorable properties than the standard AL variant, such as the robustness to the growth of penalty parameters. We perform extensive numerical experiments on a variety of systems with increasing complexity to investigate the quality of the solutions, the levels of constraint violation, and the sensitivity of final solutions with respect to initialization, as well as targets. The results show that single-shooting PDAL DDP and multiple-shooting SQP are the most robust methods. For multiple-shooting formulation, both DDP and SQP can enjoy informed initial guesses, while the latter appears to be more advantageous in complex systems. It is also worth highlighting that DDP provides favorable computational complexity and feedback gains as a byproduct of optimization as is.
Introduction
In robotics, aerospace, and biological modeling, the challenge of dynamic optimization involves finding optimal control trajectories that satisfy both physical laws (dynamics) and safety limits (constraints). Traditionally, researchers have relied on two primary frameworks: Differential Dynamic Programming (DDP), which leverages Bellman’s principle of optimality to decompose the problem temporally, and Sequential Quadratic Programming (SQP), which treats the trajectory as a large-scale constrained optimization problem.
Despite the widespread use of these methods, there has been a lack of rigorous "apples-to-apples" comparisons, particularly regarding their handling of modern constraints like obstacle avoidance or actuator limits across different shooting formulations. This work aims to bridge this gap, providing a systematic evaluation to guide the selection of optimization tools for complex robotic tasks.
Methodology and Algorithmic Variants
The study evaluates several second-order methods, focusing on the integration of Nonlinear Programming (NLP) techniques for constraint handling:
- DDP Variants: The research examines DDP combined with Augmented Lagrangian (AL), Interior Point (IP), and Alternating Direction Method of Multipliers (ADMM).
- Primal-Dual Augmented Lagrangian (PDAL) DDP: A key contribution is the introduction of a single-shooting PDAL DDP. Unlike standard AL methods, which can suffer from numerical instability as penalty parameters grow, PDAL optimizes Lagrangian multipliers concurrently with control variables, enhancing robustness.
- Shooting Formulations: The comparison spans single-shooting (implicit dynamics satisfaction via system rollout) and multiple-shooting (explicit dynamics satisfaction where states at each step are decision variables). Multiple-shooting allows the optimizer to temporarily violate physics to escape local minima or utilize informed initial guesses.
Comparative Analysis of Algorithms
The theoretical differences between these methods are summarized in the table below, highlighting their capabilities in constraint satisfaction, feedback generation, and computational scaling.
As shown in the table, DDP variants generally scale linearly ($O(Nm^3)$) with the time horizon $N$, whereas standard single-shooting SQP can scale cubically ($O(N^3m^3)$). Furthermore, DDP provides feedback gains as a natural byproduct of the backward pass, a significant advantage for real-time control robustness that SQP typically lacks in its standard single-shooting form.
Experimental Evaluation
The algorithms were benchmarked across four simulated systems of increasing complexity:
- Inverted Pendulum: A swing-up task with torque and velocity limits.
- Quadrotor with Pendulum (Quadpend): Navigating a drone through narrow gaps while balancing a pole—a highly non-linear challenge.
- Tadpole-like Swimmer: A multi-link system in fluid, testing high-dimensional coordination.
- Franka Emika Panda Arm: A 7-DOF industrial robot performing obstacle avoidance in cluttered environments.
Key Insights and Results
The experimental results highlight several critical trade-offs between the methods:
- Feedback for Free: DDP’s inherent generation of feedback gains makes the resulting trajectories more robust to small disturbances compared to the open-loop trajectories typically generated by SQP.
- Computational Efficiency: DDP's linear scaling makes it significantly more efficient for long-horizon tasks, whereas naive SQP implementations struggle as the horizon increases.
- Constraint Satisfaction vs. Optimality: While DDP often finds lower-cost local minima, SQP is generally more reliable at strictly satisfying complex constraints in highly cluttered environments.
- Robustness of PDAL: The proposed PDAL DDP variant demonstrated superior stability compared to standard AL DDP, particularly in its handling of penalty parameters that enforce constraints.
- Success Rates: In the Panda arm experiments, multiple-shooting SQP achieved a 100% success rate, whereas single-shooting variants ranged from 50% to 90% depending on obstacle density. Multiple-shooting formulations also proved better at utilizing "informed" initial guesses to avoid traps in complex scenarios like the "Quadpend" gap navigation.
Conclusion and Future Directions
This comparison establishes single-shooting PDAL DDP and multiple-shooting SQP as the most robust choices for constrained dynamic optimization. While DDP offers speed and feedback, SQP excels in complex constraint satisfaction.
Future research directions include integrating more advanced feasibility restoration into DDP to improve performance in cluttered environments, applying these methods to systems with contact dynamics (e.g., legged robots), and further optimizing the computational pipeline to enable real-time deployment on embedded robotic hardware.
Summary updated