Coder Social home page Coder Social logo

zachlee10 / efficient-calibration-embedded-mpc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from forgi86/efficient-calibration-embedded-mpc

0.0 0.0 0.0 2.95 MB

Python code of the paper "Efficient Calibration of Embedded MPC" (2020 IFAC World Congress) by Marco Forgione, Dario Piga, and Alberto Bemporad

Home Page: https://arxiv.org/abs/1911.13021

License: MIT License

Python 58.74% TeX 41.26%

efficient-calibration-embedded-mpc's Introduction

Efficient Calibration of Embedded MPC

This repository contains the Python code to reproduce the results of the paper Efficient Calibration of Embedded MPC by Marco Forgione, Dario Piga, and Alberto Bemporad.

The code performs an efficient data-driven MPC calibration by tuning:

  • MPC weight matrices
  • MPC sampling time
  • Prediction and control horizon
  • Kalman filter matrices
  • QP solver relative and absolute tolerances

to optimize a closed-loop objective function , under the constraint that where is the (worst-case) time required to compute the MPC control low. This constraints guarantees that the controller can run in real-time.

Main scripts:

The main script to be executed for MPC calibration is

GLIS_BO_main.py

The results of the MPC calibration are saved in the results_*.pkl file on the disk and are read by the script

GLIS_BO_analysis.py

that produces the relevant plots.

Other files:

  • pendulum_model.py: dynamic equations of the pendulum
  • pendulum_MPC_sim: performs a single closed-loop MPC simulation
  • objective_function.py: objective function
  • kalman.py: implements a kalman filter

Included dependencies:

Other dependencies:

Simulations were performed on a Python 3.6 conda environment with

  • numpy
  • scipy
  • matplotlib
  • OSQP (a QP solver used by the MPC controller)
  • python-control (used to solve the DARE of the Kalman Filter)
  • GPyOpt (for Bayesian Optimization, optional)

These dependencies may be installed through the commands:

conda install numpy scipy matplotlib
pip install osqp
pip install control
pip install gpyopt

Citing

If you find this project useful, we encourage you to

  • Star this repository โญ
  • Cite the paper
@inproceedings{forgione2020efficient,
  title={{E}fficient {C}alibration of {E}mbedded {MPC}},
  author={Forgione, Marco and Piga, Dario and Bemporad, Alberto},
  booktitle={Proc. of the 21st IFAC World Congress, Berlin, Germany},
  year={2020}
}

efficient-calibration-embedded-mpc's People

Contributors

forgi86 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.