Git Product home page Git Product logo

eric-bradford / nominal_nmpc Goto Github PK

View Code? Open in Web Editor NEW
41.0 1.0 6.0 13 KB

A basic nonlinear model predictive control implementation using Casadi with Unscented Kalman filter state estimation

License: MIT License

Python 100.00%
chemical-engineering unscented-kalman-filter nonlinear-optimization automatic-differentiation nonlinear-dynamics control-systems python3 model-predictive-control casadi differential-equations

nominal_nmpc's Introduction

Nominal Nonlinear Model Predictive Control

The code in this repository is a basic nonlinear model predictive control (NMPC) implementation in Python with soft constraints, which uses an Unscented Kalman filter for state estimation. The NMPC algorithm does not consider possible uncertainties and is therefore referred to as nominal. For more information on the required modules and packages refer to section Technical requirements. If you found this code useful, consider citing [1][2] that use this implementation for verification purposes.

Getting started

First install the required technical prerequisites and download the Python files contained in this repository. Next run Simulation, which should run the pre-defined problem. Once this works the problem definition can be edited in Problem_definition to define your own problem. The code automatically outputs a data library for analysis and plots to be employed in for example Matlab or Python.

Description

Nonlinear model predictive control (NMPC) is a popular control method for multivariable control problems with important process constraints. The dynamic equation system is assumed to be given by differential algebraic equations (DAE). The code is mostly meant to be used as a way to verify the performance of more novel algorithms against an implementation more likely to be found in industry. It has the following features:

  • Cheap NMPC implementation for both receding and shrinking time horizons
  • Parameter and state estimation using the UKF
  • Efficient solution of nonlinear dynamic optimization formulation using automatic differentiation
  • Always feasible due to soft-constraints

Technical requirements

The code was written using CasADi in Python 3.9 and hence requires CasADi with all its sub-dependencies. Simply download a Python distribution and install CasADi following the instructions. In addition, it uses the Unscented Kalman filter implementation from filterpy.

References

[1] E. Bradford, and L. Imsland, Output feedback stochastic nonlinear model predictive control for batch processes, Computers & Chemical Engineering, vol. 126, pp. 434-450, 2019.

[2] E. Bradford, and L. Imsland, Economic stochastic model predictive control using the unscented Kalman filter, IFAC-PapersOnLine, vol. 51, no. 18, pp. 417-422, 2018.

Legal information

This project is licensed under the MIT license โ€“ see LICENSE.md in the repository for details.

nominal_nmpc's People

Contributors

eric-bradford avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.