POCP: A package for polynomial optimal control problems

Didier Henrion, Jean B. Lasserre, Carlo SavorgnanECC 2009

Introduction

Optimal Control Problems (OCPs) are fundamental to modern engineering, providing the mathematical framework for steering systems—ranging from aerospace vehicles to chemical reactors—along trajectories that minimize specific costs. However, when system dynamics are nonlinear, finding a global optimum becomes a significant challenge. Traditional numerical approaches typically fall into two categories: indirect methods, which solve two-point boundary value problems derived from the Maximum Principle, and direct methods, which discretize the problem into nonlinear programming (NLP) tasks. Both are prone to local minima and sensitivity to initial guesses.

POCP is a Matlab package designed to address these challenges by treating OCPs as polynomial optimization tasks. By leveraging the "hierarchy of moments" theory, POCP transforms complex nonlinear control problems into a sequence of convex semidefinite programs (SDP). This approach provides guaranteed lower bounds on optimal costs and offers a systematic way to synthesize feedback controllers.

Methodology: The Occupation Measure Approach

The theoretical backbone of POCP is the Generalized Problem of Moments (GPM). Rather than searching for a single optimal state-control trajectory $(x(t), u(t))$, the software seeks an "occupation measure"—a probability distribution representing the time the system spends in various parts of the state-control space. This transformation linearizes the problem in the space of measures.

The POCP Workflow

The package simplifies the implementation of this measure-theoretic approach through a four-step workflow:

  1. Polynomial Modeling: Users define system dynamics, costs, and constraints as polynomials using the mpol command. This allows the software to handle nonlinearities that can be expressed or approximated by polynomial functions.
  2. Moment Relaxation: POCP reformulates the infinite-dimensional measure problem into a finite-dimensional SDP. This process is handled internally via integration with GloptiPoly 3.
  3. Hierarchy of Solutions: By increasing the "degree" of the relaxation, the user generates a sequence of solutions. These solutions provide monotonically increasing lower bounds that converge toward the true global optimum.
  4. Controller Synthesis: By solving the dual version of the SDP, POCP approximates the Value Function (the solution to the Hamilton-Jacobi-Bellman equation). This polynomial approximation can then be used to derive real-time feedback control laws.

Performance and Benchmarking

The package has been validated against several classic control benchmarks to demonstrate its precision and utility:

  • The Double Integrator: In a minimum-time control test where the analytical optimal time is $T = 3.5$, POCP achieved a lower bound of 3.4988 using a degree-14 moment matrix. This represents an error of less than 0.04%, demonstrating high numerical precision.
  • Nonlinear Suboptimal Control: For 2D nonlinear systems, the package successfully derived feedback laws from approximated value functions. These laws were shown to drive the system to the target state from various initial conditions.
  • Exact Polynomial Recovery: In cases where the true value function is known to be a polynomial, POCP can recover the exact global solution using very low-degree relaxations (e.g., degree 2).

Key Insights

Global Optimality Bounds

One of the most significant advantages of POCP over standard NLP solvers is the provision of a lower bound on the optimal cost. This serves as a diagnostic tool: if a candidate controller achieves a cost near the POCP lower bound, the user has a certificate of global optimality.

Simplified Syntax

POCP abstracts PhD-level mathematical frameworks into four primary Matlab commands: mpol, pocp, set, and solvepocp. This allows engineers to focus on the physical constraints of their system rather than the underlying measure theory or SDP formulation.

HJB via Duality

The package utilizes the dual variables of the SDP to find subsolutions to the Hamilton-Jacobi-Bellman (HJB) equation. This effectively turns a theoretical relaxation into a practical, deployable control law, bridging the gap between abstract optimization and real-time execution.

Limitations and Future Directions

Despite its power, POCP faces the "curse of dimensionality." As the number of state variables or the degree of the polynomial relaxation increases, the size of the resulting SDP grows exponentially. Consequently, the package is currently best suited for systems with fewer than 10 states.

Furthermore, the requirement for polynomial data means that non-polynomial functions (e.g., trigonometric or exponential functions) must be approximated via Taylor series, which introduces additional error. Future development aims to reduce software dependencies—such as the current reliance on YALMIP for dual variable extraction—and to increase flexibility regarding time-interval constraints.

Summary updated

BibTeX
@inproceedings{henrion2009pocp,
  author = {Didier Henrion and Jean B. Lasserre and Carlo Savorgnan},
  title = {{POCP: A package for polynomial optimal control problems}},
  booktitle = {ECC},
  year = {2009},
  doi = {10.23919/ecc.2009.7074564},
}
Figure