Jonas-Nicodemus/PINNs-based-MPC

GitHub: Jonas-Nicodemus/PINNs-based-MPC

Stars: 152 | Forks: 32

[![arXiv](https://img.shields.io/badge/arXiv-2109.10793-b31b1b.svg?style=for-the-badge)][arxiv-url] [![DOI](https://img.shields.io/badge/DOI-10.5281%20%2F%20zenodo.5520662-blue.svg?style=for-the-badge)][doi-url] [![MIT License](https://img.shields.io/github/license/Jonas-Nicodemus/PINNs-based-MPC.svg?style=for-the-badge)][license-url] [![LinkedIn](https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555)][linkedin-url] # [Physics-Informed Neural Networks-based Model Predictive Control for Multi-link Manipulators][ifac-url] Contribution to the [MATMOD 2022](https://www.mathmod.at/) conference in Vienna.

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. License
  5. Contact
## About The Project We discuss nonlinear model predictive control (NMPC) for multi-body dynamics via physics-informed machine learning methods. Physics-informed neural networks (PINNs) are a promising tool to approximate (partial) differential equations. PINNs are not suited for control tasks in their original form since they are not designed to handle variable control actions or variable initial values. We thus present the idea of enhancing PINNs by adding control actions and initial conditions as additional network inputs. The high-dimensional input space is subsequently reduced via a sampling strategy and a zero-hold assumption. This strategy enables the controller design based on a PINN as an approximation of the underlying system dynamics. The additional benefit is that the sensitivities are easily computed via automatic differentiation, thus leading to efficient gradient-based algorithms. Finally, we present our results using our PINN-based MPC to solve a tracking problem for a complex mechanical system, a multi-link manipulator. ### Citing If you use this project for academic work, please consider citing our [publication][ifac-url]: Jonas Nicodemus, Jonas Kneifl, Jörg Fehr, Benjamin Unger, Physics-informed Neural Networks-based Model Predictive Control for Multi-link Manipulators, IFAC-PapersOnLine, Volume 55, Issue 20, 2022. ### Built With * [TensorFlow](https://www.tensorflow.org/) * [Python](https://www.python.org/) ## Getting Started ### Prerequisites A python environment is required, we recommend using a virtual environment. ### Installation 1. Clone the repo git clone git@github.com:Jonas-Nicodemus/PINNs-based-MPC.git 2. Go into the directory cd PINNs-based-MPC 3. Install dependencies pip install -r requirements.txt ## Usage There are two executable scripts located in `src`. * `train_pinn.py` can be executed to learn weights and overwrite the already existing ones, which can be found under `resources/weights`. * `main.py`, then evaluates the PINN first in self-loop prediction mode and subsequently in closed-loop mode connected to the real system (emulated by RK45) for the given reference trajectory. ## License Distributed under the MIT License. See `LICENSE` for more information. ## Contact Jonas Nicodemus - jonas.nicodemus@icloud.com Benjamin Unger - benjamin.unger@kit.edu\ Jonas Kneifl - jonas.kneifl@itm.uni-stuttgart.de\ Jörg Fehr - joerg.fehr@itm.uni-stuttgart.de Project Link: [https://github.com/Jonas-Nicodemus/PINNs-based-MPC](https://github.com/Jonas-Nicodemus/PINNs-based-MPC)