This repository contains the code for the paper:
Augmented Neural Lyapunov Control (ANLC)
The work can be read open-access on the IEEE webpage.
ANLC is a software framework to automatically synthesise:
- a stabilising controller for a desired equilibrium of a nonlinear system;
- a Control Lyapunov Function (CLF) to certify its stability.
The code is based on a loop between a Learner and a Falsifier. Starting from a finite set of state-space samples, the Learner trains two Neural Networks, one representing a control law and the other a CLF. In parallel, the Falsifier is tasked with verifying whether the candidate CLF satisfies the theoretical Lyapunov conditions within a domain of Reals. If the conditions are satisifed, the learning is halted and the resulting control law and CLF are returned. On the contrary, if the conditions are not satisfied, the Falsifier returns a set of points (denoted as counterexample) where the Lyapunov conditions are violated. These points are added to the dataset and the learning process is further iterated.
A schematic of the learning architecture is hereby illustrated:
This repository was initially branched from the original Neural Lyapunov Control (NLC):
With respect to the NLC, the key ANLC upgrades consist of:
- Option to synthesised both linear and nonlinear control laws;
- Control functions (linear and nonlinear) synthesised without initialising the control weights;
- Option to stabilise generic equilibria (not necessarily the origin).
The repository contains two versions of the code:
-
: v1 is used to generate the results of the paper;
-
: v2 is the version actively developed and the one recommended. With respect to v1, v2 entails:
- Refactored and optimised code;
- Option to stabilise generic equilibria (not necessarily the origin).
To synthesise control and Lyapunov functions for your own dynamics, a step-by-step example is described in the file.
Results, encompassing 3D visualisation plots as follows, will be generated:
Lyapunov function example | Lie derivative function example |
---|---|
![]() |
![]() |
Hereby an example of how a CLF and the corresponding Lie derivative are updated over the training iterations:
CLF evolution | Lie derivative function evolution |
---|---|
![]() |
![]() |
Instructions on installation are available within the file.
- An extension to the software tool to synthesise control laws including actuator saturation will be released.
- Utilities to compute the Region Of Attraction of the desired equilibrium for 2-dimensional systems will be released.
The authors can be contacted for feedback, clarifications or requests of support at:
[email protected]
The article can be accessed open-access on the IEEE webpage.
This work can be cited with the following BibTeX entry:
@article{grande2023augmented,
title={Augmented Neural Lyapunov Control},
author={Grande, Davide and Peruffo, Andrea and Anderlini, Enrico and Salavasidis, Georgios},
journal={IEEE Access},
volume={11},
pages={67979--67986},
year={2023},
publisher={IEEE},
doi={10.1109/ACCESS.2023.3291349}
}