This is the official code for L4DC 2024 paper "Real-Time Safe Control of Neural Network Dynamic Models with Sound Approximation" PDF can be found here.
This repo is based on Julia and is tested with Julia v1.8.0. Check here to install Julia environment. Install NeuralVerficiaton.jl
from this repo under branch nn-safe-control
using the Julia package manager as follows,
import Pkg
Pkg.add(url="https://github.com/intelligent-control-lab/NeuralVerification.jl.git", rev="nn-safe-control")
Download pre-trained models from here and place all the model folders under root path. The training script can be found here.
Run the following scripts for both baseline and ours. Set SIS=true
for safety index synthesis. Set STATS=true
to find quantitative results by sampling multiple trajectories. Set VISUALIZE=true
to visualize and debug. More options can be set for ablation studies, e.g. USE_IA_FLAG,BPO_DEGREE,BPO_SOLVER,P_NORM
.
For collision avoidance, run
include("test_collision_original.jl") # baseline
include("test_collision_BPO.jl") # ours
For safe following, run
include("test_following_original.jl") # baseline
include("test_following_BPO.jl") # ours
If you find the repo useful, please cite:
H. Hu, J. Lan and C. Liu "Real-Time Safe Control of Neural Network Dynamic Models with Sound Approximation", Learning for Dynamics and Control Conference (L4DC). PMLR, 2024
@article{hu2024real,
title={Real-Time Safe Control of Neural Network Dynamic Models with Sound Approximation},
author={Hu, Hanjiang and Lan, Jianglin and Liu, Changliu},
journal={arXiv preprint arXiv:2404.13456},
year={2024}
}