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".
The implementation details can be found in the docs
folder.
git clone https://github.com/DecodEPFL/neurSLS.git
cd neurSLS
python setup.py install
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
.
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.
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.
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.
Swapping problem:
In both cases, the training is performed for t ∈ [0,5].
Partially trained distributed controllers exhibit suboptimal behavior, but never
compromise closed-loop stability.
This work is licensed under a Creative Commons Attribution 4.0 International License.
[1] Luca Furieri, Clara Galimberti, Giancarlo Ferrari-Trecate. "Neural System Level Synthesis: Learning over All Stabilizing Policies for Nonlinear Systems," arXiv:2203.11812, 2022.