TL;DR
This paper presents a novel method for automatically synthesizing Lyapunov functions, which are crucial for proving the stability of dynamical systems. By leveraging Satisfiability Modulo Theory (SMT) solvers within an inductive synthesis framework, the authors provide a sound and scalable approach to generate these stability certificates, even for complex non-linear and parametric models.
What Problem Does This Paper Address?
Ensuring the stability of dynamical systems is a fundamental challenge in many scientific and engineering fields. A common and powerful technique for proving stability is the use of Lyapunov functions. However, finding these functions, especially for non-linear or parametric systems, is notoriously difficult and often requires significant manual effort and expertise. Existing automated methods often lack formal guarantees of correctness (soundness) or struggle with scalability. This paper aims to bridge this gap by developing an automated and sound method for synthesizing Lyapunov functions and their associated regions of validity.
Methods
The core of the proposed method is Counter-Example Guided Inductive Synthesis (CEGIS), a framework that iteratively refines candidate solutions. The CEGIS architecture consists of two main components:
- Learner: Proposes a candidate Lyapunov function.
- Verifier: Checks if the candidate function satisfies the stability conditions. If not, it provides a "counterexample" – a specific state where the function fails.
The key innovation here is the use of SMT solvers, specifically Z3, for both components.
- Sound Verifier: Z3 is used to rigorously check the validity of the candidate Lyapunov function. If a counterexample is found, Z3 provides it. This ensures that any function certified by the verifier is indeed a valid Lyapunov function.
- Learner Options: The paper explores two options for the learner:
- Numerical Learner (Gurobi): Uses an optimization solver to propose candidate functions. This approach is fast but relies on numerical approximations, potentially sacrificing soundness.
- SMT-based Learner (Z3): Uses Z3 to synthesize candidate functions. This approach is sound but can be slower.
The synthesis process starts with a template Lyapunov function (e.g., a polynomial) and iteratively refines it based on counterexamples provided by the verifier. For non-linear systems, the method also determines a region of validity for the synthesized Lyapunov function.
Datasets
The paper evaluates its approach on a suite of examples taken from existing literature on Lyapunov function synthesis. These include:
- Randomly generated linear models of dimensions 3 to 10.
- Several non-linear and parametric ODE models from references [18], [19], [20], [23].
No new benchmarks were introduced; instead, the focus was on demonstrating the scalability and effectiveness of the proposed method on established problem instances.
Key Insights and Ideas
- SMT Solvers for Soundness: Using SMT solvers like Z3 as the verifier provides a formal guarantee of correctness for the synthesized Lyapunov functions and their validity regions. This is a significant advantage over purely numerical methods.
- CEGIS for Iterative Refinement: The CEGIS framework is well-suited for this problem, allowing the system to learn from its mistakes (counterexamples) and progressively improve the candidate Lyapunov function.
- Scalability to Higher Dimensions: The method demonstrates reasonable scalability, handling up to 10-dimensional linear models within practical time limits.
- Handling Non-linearities and Parameters: The approach can be extended to non-linear and parametric systems, either through linearization or direct computation, providing regions of validity.
- Trade-off Between Speed and Soundness: Comparing a numerical learner (Gurobi) with an SMT-based learner (Z3) highlights the trade-off: Gurobi is faster but less sound, while Z3 is sound but slower. The paper suggests that the SMT-based learner is preferred when formal guarantees are paramount.
Key Results
- The proposed CEGIS framework with Z3 as a verifier successfully synthesizes Lyapunov functions for linear, polynomial, and parametric systems.
- For linear models, the method scales to 10 dimensions, with average computation times reported in Table 1. For example, for 10-dimensional models, the average time for Z3-CEGIS was 44.63 seconds.
- The method successfully synthesized Lyapunov functions for complex non-linear and parametric examples where other tools (like SOSTOOLS) failed or produced less satisfactory results (Table 2). For instance, in Example 9, Z3-CEGIS found a global stability Lyapunov function, while SOSTOOLS found a complex polynomial with a hard-to-characterize stability region.
- The approach provides a sound proof for the generated Lyapunov functions and their domains of validity.
Limitations and Future Work
- Non-polynomial Terms: Z3 has limitations in fully handling non-polynomial terms, which restricts the direct application of the method to systems with such components.
- Numerical Precision (Gurobi): The numerical learner using Gurobi can suffer from precision issues, as seen in Example 8, where it failed to reach the exact numerical values of a valid Lyapunov function due to the ratio of coefficients.
- Completeness: The algorithm is not guaranteed to be complete. For unstable systems, it will correctly return an empty Lyapunov function, but for complex stable systems, it might not find a solution within practical limits.
Future work suggested includes:
- Implementing synthesis techniques for higher-order and parametric models with Gurobi.
- Exploring optimization techniques for tuning SMT solvers (Z3) to improve performance and generate more insightful counterexamples.
- Embedding neural networks as function approximators for the learner, while retaining the SMT solver for verification, to potentially improve scalability and handle more complex function structures.
Summary updated