Trajectory Optimization
What Is Trajectory Optimization?
Trajectory optimization is a branch of optimal control concerned with computing the state and control input profiles that drive a dynamical system along a desired path while minimizing a cost function subject to constraints on dynamics, actuator limits, and boundary conditions. Rather than synthesizing a feedback policy valid across all possible initial states, trajectory optimization finds the best trajectory from a single specified starting point, making it computationally tractable even for high-dimensional, nonlinear systems where global policy computation would be infeasible.
The field draws on variational calculus, nonlinear programming, and numerical analysis. Its applications range from planning minimum-fuel spacecraft maneuvers to generating smooth joint-space motions for robot arms and optimizing aircraft climb and cruise profiles for fuel efficiency. As computational hardware has improved and optimization solvers have matured, trajectory optimization has moved from offline design tools to real-time control elements embedded in autonomous systems.
Problem Formulation
A trajectory optimization problem specifies a dynamical system, a time horizon, a cost functional to be minimized, and a set of constraints. The cost functional commonly penalizes control effort, elapsed time, or deviation from a desired endpoint. Constraints include the system dynamics (expressed as ordinary differential equations or difference equations), bounds on state and control variables, and terminal conditions specifying where the trajectory must end. The MIT Underactuated Robotics textbook chapter on trajectory optimization presents the core formulation and discusses how the choice of cost function and constraint set determines the character of the resulting trajectory: minimum-time formulations produce bang-bang control profiles with saturated actuators, while minimum-effort formulations produce smooth, continuous controls.
Direct and Indirect Methods
Trajectory optimization problems are solved by two broad classes of numerical methods. Indirect methods apply Pontryagin's Minimum Principle to derive the necessary conditions for optimality, yielding a two-point boundary value problem that is solved by shooting methods. While indirect methods can achieve high accuracy, they require analytical derivation of the optimality conditions and are sensitive to initial guesses. Direct methods convert the continuous-time problem into a finite-dimensional nonlinear program (NLP) by discretizing the trajectory. Direct transcription treats both state and control histories as decision variables, with the dynamics imposed as equality constraints at each time step. Direct collocation represents the trajectory as piecewise polynomials and enforces dynamic feasibility at a set of collocation points, which can be chosen using Gaussian quadrature rules for higher accuracy. Research on multi-objective trajectory optimization for industrial robots using reinforcement learning in Scientific Reports demonstrates how direct methods are increasingly combined with learning-based initialization strategies to improve convergence on complex, constrained problems.
Real-Time Optimization and Model Predictive Control
When the dynamics or environment change during execution, a pre-computed trajectory can become infeasible or suboptimal. Model predictive control (MPC) addresses this by embedding trajectory optimization within a feedback loop: at each control cycle, the controller solves a trajectory optimization problem from the current measured state over a finite look-ahead horizon, applies the first control action from the solution, and repeats the process when new state information arrives. This receding-horizon strategy allows MPC to handle constraint satisfaction and disturbance rejection simultaneously. Convex relaxations of the trajectory optimization problem are particularly valuable for real-time MPC because they guarantee global optimality and can be solved reliably by interior-point methods within milliseconds. A MathWorks tutorial on trajectory optimization and control of flying robots using nonlinear MPC illustrates how nonlinear MPC combines a plant model, state estimator, and trajectory optimizer into an integrated control system for aerial vehicles.
Applications
Trajectory optimization has applications in a wide range of fields, including:
- Spacecraft orbit insertion and maneuver planning
- Robot manipulator motion generation and collision-free path planning
- Autonomous vehicle speed profile and lane-change planning
- Aircraft climb, cruise, and descent fuel optimization
- Legged robot gait generation and balance control
- Chemical process control and batch reaction optimization