YaChienChang / Neural-Lyapunov-Control

Learning Lyapunov functions and control policies of nonlinear dynamical systems
119 stars 30 forks source link
clf control-lyapunov-functions neural-lyapunov-function

Neural-Lyapunov-Control

This repository contains the code for the paper: Neural Lyapunov Control

Requirements

How it works

The framework consists of a learner and a falsifier. The learner minimizes the Lyapunov risk to find parameters in both a control function and a neural Lyapunov function. The falsifier takes the learned control function and the neural Lyapunov function from the learner and checks whether there is a state vector violating the Lyapunov conditions.

A typical procedure is as follows:

The training part updates the parameters by iteratively minimizing the Lyapunov risk, a cost function measures the degree of violation of the Lyapunov conditions and the verifying part periodically searches counterexample state vectors and adds them back to the training set for the next iteration. This procedure provides flexibility to adjust the cost function for learning additional properties of controllers and Lyapunov functions. In examples we add a tuning term to maximize the region of attractions.

Example