grande-dev / Augmented-Neural-Lyapunov-Control

Automatic learning of (linear and nonlinear) control functions for nonlinear dynamical systems with stability certificates. The stability of the closed-loop system is certified by means of a Lyapunov Function, whose correctness is guaranteed via SMT solvers.
GNU General Public License v3.0
9 stars 1 forks source link

Augmented-Neural-Lyapunov-Control

This repository contains the code for the paper:
Augmented Neural Lyapunov Control (ANLC)

The work can be read open-access on the IEEE webpage.

Scope of the code

ANLC is a software framework to automatically synthesise:

  1. a stabilising controller for a desired equilibrium of a nonlinear system;
  2. 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:

Repository structure

The repository contains two versions of the code:

Step-by-step guide

To synthesise control and Lyapunov functions for your own dynamics, a step-by-step example is described in the WIKI 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

Installation

Instructions on installation are available within the INSTALLATION file.

What is next?

Contacts

The authors can be contacted for feedback, clarifications or requests of support at:
grande.rdev@gmail.com

Reference

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}
}