Paper: Deep DeePC

This project is the source code of paper Deep DeePC: Data-enabled predictive control with low or no online optimization using deep learning by X. Zhang, K. Zhang, Z. Li, and X. Yin.

The objective of this work is to learn the DeePC operator using a neural network and bypass the online optimization of conventional DeePC for efficient online implementation.

If you are using this work in your research or teaching, please include explicit acknowledge of this work and of our paper.

Please check the sections of License and Citation at the end.

Paper:link

Source code: link


I. How to use

1. Install required packages:

    pip install -r path/to/requirements.txt

Note: if you want to use GPU, please install GPU version of torch, e.g.:

    pip install torch==1.8.0+cu101 torchvision==0.9.0+cu101 torchaudio===0.8.0 -f https://download.pytorch.org/whl/torch_stable.html

The source code can automatically run on a CPU or GPU without any modification.

2. Run the project

a. To generate set-points for selected system:

    python main.py --system (selected systems) --gen_sp (number of set-points) --N (Time steps for one set-point)

For example:

    python main.py --system threetanks --gen_sp 10 --N 100

b. To train and test the model:

    python main.py --system (selected systems) --train --test_num (number of test runs) --N (Time steps for one set-point) --noise (#if add it, apply noise)

After training finished, it will automatically test the model.

For example:

    python main.py --system threetanks --train --test_num 1 --N 100 --noise

c. To test the well-trained model:

    python main.py --system (selected systems) --test (model number) --test_num (number of test runs) --N (Time steps for one set-point) --noise (#if add it, apply noise)

For example, to test the well-trained model 3:

    python main.py --threetanks --test 3 --test_num 10 --N 100 --noise

II. Organization of Deep DeePC source codes

. 
└── Deep DeePC 
    ├── README.md 
    ├── main.py
    ├── ddeepc_args.py
    ├── DDeePC 
    │   ├── __init__.py
    │   ├── model.py
    │   ├── Plants
    │   │   └── three_tanks.py
    │   ├── deepc.py
    │   ├── train.py
    │   ├── control.py
    │   ├── con_opt.py
    │   └── MyTool.py
    ├── _data
    │   ├── README_fig
    │   │   └── ...
    │   └── threetanks
    │       └── ...
    ├── _results
    │   └── threetanks
    │       └── ...
    ├── .gitignore
    ├── requirements.txt
    └── LICENSE

Additionally, two toolboxes are used which are developed by myself:

III. Introductio to Deep DeePC

1. Training data construction

Data_process

Figure from our paper Deep DeePC: Data-enabled predictive control with low or no online optimization using deep learning. Please refer to the paper for more details.

2. Offline training

Architecture

Figure from our paper Deep DeePC: Data-enabled predictive control with low or no online optimization using deep learning. Please refer to the paper for more details.

3. Constrainted Deep DeePC for online implementation

Constraint_handling

Figure from our paper Deep DeePC: Data-enabled predictive control with low or no online optimization using deep learning. Please refer to the paper for more details.

IV. Case study on chemical process

Reactor-separator Figure from our paper Deep DeePC: Data-enabled predictive control with low or no online optimization using deep learning. Please refer to the paper for more details.

Acknowledgment

The sources code is established and contributed by Xuewen Zhang. This project is the source code of paper X. Zhang, K. Zhang, Z. Li, and X. Yin. Deep DeePC: Data-enabled predictive control with low or no online optimization using deep learning. arXiv preprint arXiv:2408.16338, 2024.

Citation

License

The project is released under the APACHE license. See LICENSE for details.

Copyright 2024 Xuewen Zhang (xuewen001@e.ntu.edu.sg)

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Recent Posts

Timeline of posts