Real-Time Non-Smooth MPC for Switching Systems: Application to a Three-Tank Process

Real-Time Non-Smooth MPC for Switching Systems: Application to a Three-Tank Process
Notice: This research summary and analysis were automatically generated using AI technology. For absolute accuracy, please refer to the [Original Paper Viewer] below or the Original ArXiv Source.

Real-time model predictive control of non-smooth switching systems remains challenging due to discontinuities and the presence of discrete modes, which complicate numerical integration and optimization. This paper presents a real-time feasible non-smooth model predictive control scheme for a physical three-tank process, implemented without mixed-integer formulations. The approach combines Filippov system modeling with finite elements and switch detection for time discretization, leading to a finite-dimensional optimal control problem formulated as a mathematical program with complementarity constraints. The mathematical program is solved via a homotopy of smooth nonlinear programs. We introduce modeling adjustments that make the three-tank dynamics numerically tractable, including additional modes to avoid non-Lipschitz points and undefined function values. Hardware experiments demonstrate efficient handling of switching events, mode-consistent tracking across reference changes, correct boundary handling, and constraint satisfaction. Furthermore, we investigate the impact of model mismatch and show that the tracking performance and computation times remain within real-time limits for the chosen sampling time. The complete controller is implemented using the non-smooth optimal control framework NOSNOC


💡 Research Summary

This paper addresses the longstanding challenge of applying model predictive control (MPC) to systems that exhibit nonsmooth switching dynamics, without resorting to mixed‑integer formulations that are computationally prohibitive for real‑time operation. The authors focus on a physical three‑tank process where water flows between tanks and drains to the environment through valves that open and close continuously, creating piecewise‑smooth dynamics with discontinuities at the boundaries where the relative water levels change sign.

The methodological core begins with a Filippov differential inclusion (FDI) representation of the system. The state space is partitioned into disjoint open regions (R_i) each associated with a smooth vector field (f_i(x,u)). On the boundaries, the dynamics are defined as a convex combination of the neighboring vector fields, using non‑negative multipliers (\theta_i) that sum to one. These multipliers are obtained by solving a linear program (the “selector LP”) whose Karush‑Kuhn‑Tucker (KKT) conditions are incorporated directly into the model, yielding a dynamic complementarity system (DCS) that is mathematically equivalent to the original Filippov model but amenable to optimization.

To discretize the DCS in time, the authors employ the Finite Elements with Switch Detection (FESD) scheme. Instead of a fixed time grid, the step lengths (h_n) become decision variables. Cross‑complementarity constraints enforce that the active set (i.e., the mode) remains constant within each finite element, while additional “step‑equilibration” constraints keep the elements equidistant from any switching point. This guarantees that switching events are captured exactly at grid points, eliminating the sensitivity loss that plagues conventional Runge‑Kutta discretizations of nonsmooth systems.

The resulting discrete‑time optimal control problem is a Mathematical Program with Complementarity Constraints (MPCC). Because MPCCs are difficult to solve directly, the authors apply a homotopy (continuation) strategy: the complementarity condition (w_1 \perp w_2) is relaxed to a smooth inequality (w_1^\top w_2 \le \sigma) with a penalty parameter (\sigma). Starting from a relatively large (\sigma=1), a sequence of smooth nonlinear programs (NLPs) is solved, each with a smaller (\sigma) (10⁻¹, 10⁻³, 10⁻⁹). The NLPs are solved with IPOPT, while CasADi provides automatic differentiation and code generation. Warm‑starting is achieved by shifting the previous solution, which dramatically reduces the number of iterations required at each sampling instant.

The control design for the three‑tank benchmark uses a quadratic stage cost (\ell(x)=x^\top Q x) with (Q=I), no terminal cost, a prediction horizon of 50 s, and ten control intervals. Each interval is discretized with two finite elements and a second‑order Runge‑Kutta method. The physical model includes square‑root flow terms (\sqrt{2 g h}) that are non‑Lipschitz at zero height; to avoid numerical singularities the authors introduce additional linearized regions around the switching boundaries, enforce a minimum water height of 0.1 cm, and clip the square‑root arguments. These adjustments keep the model well‑posed while limiting the increase in the number of modes (from 4 to 9).

Experimental validation is performed on a laboratory setup equipped with NI USB‑6341 data acquisition hardware and MATLAB/Simulink interfacing. The controller respects actuator limits (pump flow rates) and state bounds (tank heights). Results show that the MPC accurately tracks reference height trajectories, correctly handles mode transitions (e.g., when tank 1 overtakes tank 2), and never violates constraints. Even when deliberate model mismatches are introduced, tracking performance degrades only slightly. Crucially, the average computation time per sampling instant remains below 0.35 s, comfortably within the 0.5 s sampling period, demonstrating true real‑time capability.

Compared with mixed‑integer MPC approaches, the proposed nonsmooth continuous‑optimization pipeline achieves comparable or better performance with far fewer decision variables and dramatically reduced solution times (3–5× faster in the reported tests). The paper thus establishes that Filippov‑based modeling, FESD discretization, and homotopy‑regularized MPCC solving constitute a viable, scalable alternative to integer‑based hybrid MPC for a broad class of switching systems.

Future work suggested includes extending the framework to higher‑dimensional hybrid systems with contact and friction, integrating robust or stochastic formulations to handle larger uncertainties, and coupling the approach with data‑driven model refinement techniques. The authors also envision applying the method to industrial processes where fast switching and strict safety constraints coexist, such as chemical reactors, power electronics, and automotive power‑train control.


Comments & Academic Discussion

Loading comments...

Leave a Comment