On Optimal Control of Hybrid Dynamical Systems using Complementarity Constraints

Saif R. Kazi, Kexin Wang, Lorenz T. Biegler · DOI

Abstract

Optimal control for switch-based dynamical systems is a challenging problem in the process control literature. In this study, we model these systems as hybrid dynamical systems with a finite number of unknown switching points and reformulate them using non-smooth and non-convex complementarity constraints as a mathematical program with complementarity constraints (MPCC). We utilize a moving finite element based strategy to discretize the differential equation system to accurately locate the unknown switching points at the finite element boundary and achieve high-order accuracy at intermediate non-collocation points. We propose a globalization approach to solve the discretized MPCC problem using a mixed NLP/MILP-based strategy to converge to a non-spurious first-order optimal solution. The method is tested on three dynamic optimization examples, including a gas-liquid tank model and an optimal control problem with a sliding mode solution.

Introduction

Many real-world systems are "hybrid," meaning they combine continuous motion with discrete jumps or switches. Examples include chemical reactors where valves open abruptly or mechanical systems experiencing friction-induced "stick-slip" behavior. Optimizing these systems is computationally difficult because switching creates "kinks" or non-smoothness in the system dynamics.

Standard numerical methods often fail because switching points typically fall between fixed grid points, leading to significant discretization errors. Furthermore, the optimization landscape for these problems is frequently non-convex and violates standard regularity conditions (like LICQ), causing solvers like IPOPT to converge to "spurious" (sub-optimal) solutions.

Methodology

The proposed framework addresses these challenges through a two-pronged approach:

1. Moving Finite Element (MFE) Strategy

Instead of using a fixed numerical grid, the time-steps ($h_l$) are treated as decision variables. The objective is to force the switching point to land exactly on the boundary of a finite element. This ensures the system remains smooth within each element, thereby restoring the validity of high-order numerical methods. To maintain numerical stability, a "Two-Stage Step Equilibration" is used to keep the grid uniform away from switches.

Discretization of a hybrid system using the Moving Finite Element (MFE) strategy to align switching points with element boundaries.

2. MPCC Formulation and Globalization

The switches are modeled using complementarity constraints (e.g., $0 \le \lambda \perp \nu \le 0$). To solve the resulting Mathematical Program with Complementarity Constraints (MPCC), the authors employ a multi-step globalization algorithm:

  • Initial NLP: Solve a smoothed version of the problem using standard Nonlinear Programming.
  • B-Stationarity Check: Verify if the solution meets the strongest first-order optimality criteria for MPCCs.
  • MILP Descent: If the solver is stuck at a sub-optimal point, a small Mixed-Integer Linear Program (MILP) identifies a descent direction to escape local traps.
  • Refinement: A final NLP step polishes the solution to high precision.

Experimental Evaluation

The method was evaluated on three benchmark problems:

  • Signum Problem: A fundamental switching system used to verify grid accuracy.
  • Sign Optimal Control Problem: A 4-state system featuring "sliding modes," where the trajectory moves along a switching surface.
  • Gas-Liquid Tank Model: A practical engineering case where discharge dynamics switch based on liquid levels.

Key Results

  • Computational Efficiency: In the 100-element Signum test, the proposed method converged in 303 iterations, significantly outperforming the previous state-of-the-art Nurkanovic formulation which required 1,162 iterations.
  • High Precision: The algorithm accurately located switching points (e.g., $t = 2/3$ in the Signum problem) and handled complex sliding modes without the numerical ill-conditioning typical of moving-grid methods.
  • Robustness: The MILP-guided globalization successfully reached B-stationary points where standard solvers often fail or provide spurious solutions.

Discussion and Conclusion

The core insight of this work is that numerical discretization must be "aware" of the underlying physics. By aligning the grid with switches, the method preserves the accuracy of Taylor series expansions, which are the bedrock of high-order numerical methods. While the use of MILP adds some computational overhead, it serves as a critical "mathematical compass" for navigating non-convex landscapes where standard solvers get lost.

Future work includes testing on larger-scale benchmarks and extending the framework to impulsive systems with state jumps. This research provides a robust path forward for the high-accuracy control of complex, non-smooth dynamical systems.

Reference: Kazi, S. R., Wang, K., & Biegler, L. (2025). On Optimal Control of Hybrid Dynamical Systems using Complementarity Constraints. arXiv:2503.03879v2 [math.OC].

Summary updated

Abstract

Optimal control for switch-based dynamical systems is a challenging problem in the process control literature. In this study, we model these systems as hybrid dynamical systems with finite number of unknown switching points and reformulate them using non-smooth and non-convex complementarity constraints as a mathematical program with complementarity constraints (MPCC). We utilize a moving finite element based strategy to discretize the differential equation system to accurately locate the unknown switching points at the finite element boundary and achieve high-order accuracy at intermediate non-collocation points. We propose a globalization approach to solve the discretized MPCC problem using a mixed NLP/MILP-based strategy to converge to a non-spurious first-order optimal solution. The method is tested on three dynamic optimization examples, including a gas-liquid tank model and an optimal control problem with a sliding mode solution.
BibTeX
@article{kazi2025optimal,
  author = {Saif R. Kazi and Kexin Wang and Lorenz T. Biegler},
  title = {{On Optimal Control of Hybrid Dynamical Systems using Complementarity Constraints}},
  journal = {Journal of Process Control},
  year = {2025},
  doi = {10.1016/j.jprocont.2025.103492},
}
Figure