Coder Social home page Coder Social logo

grande-dev / augmented-neural-lyapunov-control Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yachienchang/neural-lyapunov-control

9.0 1.0 1.0 16.1 MB

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.

License: GNU General Public License v3.0

Python 100.00%

augmented-neural-lyapunov-control's Introduction

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:

  • 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).

Repository structure

The repository contains two versions of the code:

  • ANLC_v1: v1 is used to generate the results of the paper;
  • ANLC_v2: 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).

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?

  • 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.

Contacts

The authors can be contacted for feedback, clarifications or requests of support at:
[email protected]

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

augmented-neural-lyapunov-control's People

Contributors

grande-dev avatar yachienchang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

ssilenzi

augmented-neural-lyapunov-control's Issues

[#2] Code refactoring

Releasing ANLC_v2, where the existing code is refactored and rendered more modular.

Use in Google Colab

Thank you for providing a valuable code.

While trying to use the repo in Google Colab, I get this error:

File "/usr/local/lib/python3.8/site-packages/dreal/init.py", line 6, in
from dreal._dreal_py import *
ImportError: /usr/local/lib/python3.8/site-packages/dreal/../../../libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /opt/libibex/2.7.4/lib/libibex.so)

The error message indicates that the version of GLIBCXX (GNU C++ Library) required by the libibex.so library is not found in the Colab environment. How could this be solved?

Thank you very much again

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.