Direct Trajectory Optimization offers an alternative approach to solving non-linear trajectory optimization problems.
The output control form of trajectory optimization can be either:
- An open-loop control policy,
- A feedback policy, or
- It might depend on the solver being used.
One common strategy is to discretize and convert the continuous-time optimal control problem into nonlinear programming (NLP). This is done using the following standard non-linear programming formulation:
Assumptions:
- The function is (C^2) smooth.
SQP is a standard method for trajectory optimization.
- IPOPT (open source)
- SNOPT (commercial)
- KNITRO (commercial)
SQP works by converting the NLP problem into a QP (Quadratic Programming) problem. This is achieved using the 2nd order Taylor expansion of the Lagrangian and linearized (C(x)) and (d(x)) to approximate NLP as QP.
Where:
- (H = \frac{\partial L}{\partial x})
- (g = \frac{\partial L}{\partial x})
- (C = \frac{\partial c}{\partial x})
- (D = \frac{\partial d}{\partial xb})
- (L(x, \lambda, \mu) = f(x) + \lambda^T c(x) + \mu^T d(x))
To solve the QP, compute the primal-dual search direction:
Then, perform a line search with a merit function.
For classical QP with only equality constraints, Newton’s method can be applied directly by solving the KKT condition:
- SQP can be viewed as a generalization of Newton’s method to sequential constrained problems.
- Any QP solver should work, but implementation details, including warm starts, matter.
- Good performance leverages sparsity.
- For convex inequality constraints, it can be generalized to SCP (sequential convex programming).
Direct Collocation is an efficient way to impose dynamic constraints.
The main goal is to reduce the number of optimization variables. Instead of integrating, constraints are imposed with higher-order splines.
- In the indirect method, a rollout is needed to make dynamics work in a sequential decision process.
- In the direct method, dynamics can be enforced into a single equality since all states and controls are considered in one-time optimization.
- Direct collocation uses polynomial splines to represent trajectories and enforces dynamics and spline derivatives.
- The method achieves 3rd order integration accuracy, similar to RK3.
- It requires fewer dynamics calls and can use larger timesteps, saving up to 80% of the time.
- However, it is sensitive to warm starts.
Direct Trajectory Optimization offers a robust and efficient way to solve non-linear trajectory optimization problems. By understanding the underlying strategies and methods, one can effectively apply these techniques in real-world applications.