Abstract
Switched systems, which transition between different continuous behaviors, are critical in modern engineering but present significant challenges for formal verification. This paper provides a formal bridge between control theory and computer science by modeling these systems as hybrid programs in differential dynamic logic (dL). The authors demonstrate how to rigorously verify safety and stability properties using the KeYmaera X theorem prover, providing a sound and complete framework for arbitrary, state-dependent, and time-triggered switching mechanisms.
Introduction
In many engineering domains, systems do not follow a single, smooth continuous path. For instance, a self-driving car’s dynamics change when moving from ice to asphalt, and power converters toggle between circuit topologies. These are switched systems: families of continuous ordinary differential equations (ODEs) governed by a switching signal that determines the active mode at any given time.
A major challenge in analyzing these systems is that even if every individual ODE mode is stable, the act of switching between them can induce instability or unsafe behavior. While control theory offers mathematical tools like Lyapunov functions for analysis, there has historically been a gap between these descriptions and the computer-verified "hybrid program" models used for software safety. This work closes that gap by internalizing switching signals as discrete program logic.
Modeling Switched Systems
The authors utilize Differential Dynamic Logic (dL) to specify and verify hybrid systems. Their methodology involves translating various switching paradigms—Arbitrary, State-Dependent, Time-Dependent (Slow Switching), and Periodic—into standard hybrid program constructs such as nondeterministic choice, loops, and tests.
A key insight is that the switching signal can be represented as a discrete program. For example, a simple loop containing a nondeterministic choice can perfectly model "arbitrary switching." The authors prove that these program-based models are "adequate," meaning the states reachable by the hybrid program exactly match those reachable by the original mathematical switched system. Furthermore, they identify criteria to avoid modeling pitfalls like "stuck states" (where no valid next move exists) and "sliding modes" (infinitely fast chattering along a surface).
Formal Verification and Results
By extending dL’s proof theory, the authors show that invariants for switched systems can be verified by checking them against each constituent ODE. For systems with polynomial dynamics, this invariance is shown to be decidable. This allows the classic $\epsilon-\delta$ definition of stability to be expressed as a first-order dL formula, enabling a theorem prover to provide mathematical guarantees rather than relying on simulation.
The framework was implemented in KeYmaera X, an axiomatic theorem prover, and validated against several classic examples from control literature:
- Arbitrary Switching: Verification of systems sharing a common Lyapunov function.
- State-Dependent Switching: Proving stability for systems that are unstable under arbitrary switching but stabilized by specific state-based rules.
- Slow Switching: Verifying systems stabilized by enforcing a minimum dwell time between transitions.
Conclusion and Future Work
This research provides a powerful, logic-based foundation for the verification of complex switched systems. While the current work focuses on Lyapunov stability (staying within bounds), future efforts will target asymptotic stability (convergence to a target state). Additionally, the authors highlight the need for improved proof automation to assist in the synthesis of Lyapunov functions and invariants for large-scale industrial applications. Addressing "Zeno behavior"—where infinite jumps occur in finite time—also remains an important area for formal detection in future iterations of the logic.
Summary updated