Skip to content

Automatic hyperparameter tuning for DeePC. Built by Michael Cummins at the Automotaic Control Laboratory, ETH Zurich.

Notifications You must be signed in to change notification settings

michael-cummins/DeePC-Hunt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DeePC-Hunt

Data-enabled predictive control hyperparameter tuning via differentiable optimization layers

DeePC-Hunt is a method for optimising over the hyperparameters of DeePC using analytical policy gradients and differentiable optimization layers. This method has been developed as part of my bachelor thesis, carried out at the Automatic Control Laboratory (IfA). Supervised by Alberto Padoan, Keith Moffat and Florian Dorfler. A pre-print is available on arxiv.

Developed in a conda environment on Ubuntu 22.04 with Python 3.10.

Differentiable DeePC layer is inspired by Differentiable MPC and built using CvxpyLayers.

Installation

Clone the repo and install from source

cd DeePC-Hunt && pip install -e .

Extra packages necessary for running the example notebooks are in examples/requirements.txt if needed.

pip install -r examples/requirements.txt

DeePC-Hunt has the following dependencies.

Usage

Data-enabled Predictive Control (DeePC) is a data-driven non-parametric algorithm for combined identification (learning) and control of dynamical systems. It leverages the solution of the following optimization problem in a receding horizon fashion.

Problem Formulation

DeePC can achieve performance that rivals MPC on non-linear and stochastic systems (see here) but is highly sensitive to the choice of regularization parameters $\theta_i$. DeePC-Hunt addresses this problem by automatically tuning these parameters. The performance of DeePC-Hunt has been validated on a rocket lander modelling the falcon 9 and a LTI system. To run these example notebooks, you can clone this directory and open it in a VS-Code environment with the Jupyter Notebook extension

Rocket - before training

Untrained-episode-0.mp4

Rocket - after training (episode 70)

After running DeePC-Hunt for 70 episodes, the controller now stabilizes the system.

trained.mp4

Citing

If you use DeePC-Hunt in your research or found the ideas useful, please cite the paper

@article{cummins2024deepc,
  title={DeePC-Hunt: Data-enabled Predictive Control Hyperparameter Tuning via Differentiable Optimization},
  author={Cummins, Michael and Padoan, Alberto and Moffat, Keith and Dorfler, Florian and Lygeros, John},
  journal={arXiv preprint arXiv:2412.06481},
  year={2024}
}