Skip to content

DecodEPFL/neurSLS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Neural System Level Synthesis

PyTorch implementation of Neural System Level Synthesis using Recurrent Equilibrium Networks, as presented in "Neural System Level Synthesis: Learning over All Stabilizing Policies for Nonlinear Systems".

Implementation details

The implementation details can be found in the docs folder.

Installation

git clone https://github.com/DecodEPFL/neurSLS.git

cd neurSLS

python setup.py install

Basic usage

Two environments of robots in the xy-plane are proposed to train the neurSLS controllers. Firstly, we propose the problem mountains, where two agents need to pass through a narrow corridor while avoiding collisions. Secondly, in the problem swapping, 12 robots need to switching positions while avoiding collisions among them.

To train the controllers, run the following script:

./run.py --sys_model [SYS_MODEL]

where available values for SYS_MODEL are corridor and robots.

Examples:

Mountains problem (2 robots)

The following gifs show trajectories of the 2 robots before and after the training of a neurSLS controller, where the agents that need to coordinate in order to pass through a narrow passage, starting from a random initial position marked with ○, sampled from a Normal distribution centered in [±2 , -2] with standard deviation of 0.5.

robot_trajectories_before_training robot_trajectories_after_training_a_neurSLS_controller

Swapping problem (12 robots)

The following gifs show the trajectories of the 12 robots before and after the training of a neurSLS controller, where the agents swap their initial fixed positions, while avoiding all collisions.

robot_trajectories_before_training robot_trajectories_after_training_a_neurSLS_controller

Early stopping of the training

We verify that neurSLS controllers ensure closed-loop stability by design even during exploration. Results are reported in the following gifs, where we train the neurSLS controller for 0%, 25%, 50% and 75% of the total number of iterations.

Mountains problem:
Note that, for this example, we fix the initial condition to be [±2 , -2] and we train for 150 epochs.

mountains_0_training mountains_25_training mountains_50_training mountains_75_training

Swapping problem:

robot_trajectories_0_training robot_trajectories_25_training robot_trajectories_50_training robot_trajectories_75_training

In both cases, the training is performed for t ∈ [0,5].
Partially trained distributed controllers exhibit suboptimal behavior, but never compromise closed-loop stability.

License

This work is licensed under a Creative Commons Attribution 4.0 International License.

CC BY 4.0

References

[1] Luca Furieri, Clara Galimberti, Giancarlo Ferrari-Trecate. "Neural System Level Synthesis: Learning over All Stabilizing Policies for Nonlinear Systems," arXiv:2203.11812, 2022.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages