This repository provides a Python package and a C++ library, which both implement DeePC from the paper
Data-Enabled Predictive Control: In the Shallows of the DeePC
https://arxiv.org/pdf/1811.05890
The Python package requires at least Python 3.10 and pip.
It depends on numpy, which it installs automatically through pip.
The C++ library requires a C++ compiler, cmake, and make.
It depends on Eigen, Google Test, and Google Benchmark; which it installs automatically through cmake.
To install the Python package deepc, run pip install ..
It installs the package and all its dependencies.
(Use pip install -e . to install it in editable mode.)
To run the provided tests, execute python -m unittest discover tests/deepc.
(The GitHub actions run them on every commit.)
To build the C++ library into a folder build, run
cmake -B build
cmake --build buildTo run the provided tests, execute make -C build test.
(The GitHub actions run them on every commit.)
To install the library, execute make -C build install.
To list more options of make, see make --help.
The DeePC algorithm calculates the optimal control for a given system and a target.
To grasp the system it requires data from an offline procedure in the form of system input data u_d and system output data y_d.
To grasp the current stat of the system it needs initialization data in the form of system input data u_ini and system output data y_ini.
With this data it solves
where
and H denotes the hankel matrix.
Note that this is more general than described in the paper.
The resulting u is the optimal control to reach the target r in the context of the optimization problem.
The Python package provides two implementations of this, the stand-alone algorithm deePC and a controller.
For reference applications of the controller see examples/python_*.ipynb.
The C++ library provides two implementations of this, the stand-alone algorithm deePC and a controller.
For reference applications of the controller see examples/cpp_*.cpp.