Skip to content

intelligent-control-lab/safe-pde-control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

safe-pde-control

This the released code for L4DC 2025 "Safe pde boundary control with neural operators" (PDF).

Preparation

The code is based on Julia and Python. It is tested with Julia v1.9.4. Check here to install Julia environment. Install NeuralOperators.jl from here. For Python part, the code is based on PDEControlGym, which can be installed based on doc.

Data collection

Train or download the PPO and SAC models for all the environments following README.md of PDEControlGym. To collect data for hyperbolic environment, see Jupyter file HyperbolicPDEExample.ipynb for details. To collect data for parabolic environment, see Jupyter file ParabolicPDEExample.ipynb for details. To collect data for Navier-Stokes environment, see Jupyter file NS2DExample.ipynb for details.

Data preprocessing

Check out preprocess_hyperbolic.ipynb for data preprocessing of collected hyperbolic PDE data. Check out preprocess_parabolic.ipynb for data preprocessing of collected parabolic PDE data. Check out preprocess_ns.ipynb for data preprocessing of collected Navier-Stokes data.

Model training

Under hyperbolic equation, see train_hyper_all_pf.jl for neural operator training and the Jupyter file train_cbf_hyper.ipynb for neual BCBF training. Similarly, see train_para_all_pf.jl to train neural operator and the Jupyter file train_cbf_parabolic.ipynb for neual BCBF training under parabolic equation. see train_ns_all_pf.jl to train neural operator and the Jupyter file train_cbf_ns.ipynb for neual BCBF training under Navier-Stokes equation.

Evaluation of online safety filtering

For the safety filtering over the collected trajectories, see Jupyter file test_cbf_hyper.ipynb for hyperbolic equation, test_cbf_parabolic.ipynb for parabolic equation, and test_cbf_ns.ipynb for Navier-Stokes equation. For the reward and PF metric metric evaluation, see Jupyter file transportPDE/HyperbolicPDEExample.ipynb for hyperbolic equation, Jupyter file reactionDiffusionPDE/ParabolicPDEExample.ipynb for parabolic equation and Jupyter file NS2Dtest.ipynb Navier-Stokes equation.

Citation

If you find the repo useful, please cite:

H. Hu and C. Liu "Safe PDE Boundary Control with Neural Operators", Learning for Dynamics & Control Conference (L4DC). PMLR, 2025

@article{hu2025safe,
  title={Safe PDE Boundary Control with Neural Operators},
  author={Hu, Hanjiang and Liu, Changliu},
  journal={7th Annual Learning for Dynamics \& Control Conference},
  year={2025}
}

About

This is the official code for L4DC 2025 paper "Safe PDE Boundary Control with Neural Operators"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published