GithubHelp home page GithubHelp logo

sppap / linear-adaptive-mpc Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 1.0 31 KB

This repository is part of my diploma thesis titled "Development of Model Predictive Control (MPC) schemes for unmanned aerial vehicles using neural networks". The current project focuses on MPC controller design for controlling the altitude dynamics of the quadrotor as well as the x-y plane position

License: MIT License

MATLAB 100.00%
control mpc optimization pid quadcopter

linear-adaptive-mpc's Introduction

Linear-Adaptive-MPC

This repository is part of my diploma thesis titled "Development of Model Predictive Control (MPC) schemes for unmanned aerial vehicles using neural networks". The current project focuses on MPC controller design for controlling the altitude dynamics of the quadrotor as well as the x-y plane position. As far, as the orientation dynamics are concerned, custom discrete PID (DPID) controllers are used. The project is fully coded and simulated in MATLAB 2022b. Also, the optimization problem is solved using the SQP solver and the full-plant dynamics of the quad were solved using Runge-Kutta (4,5) (ode45 solver) Finally, the benchmark trajectory for evaluating the controller's performance is a 3D helix. text

Notes

If you use this software please cite it as below (APA Style):
Spiros, P. (2024). Linear Adaptive MPC for Unmanned Aerial Vehicles Position Control. https://github.com/SpPap/Linear-Adaptive-MPC

Control Scheme

controlScheme_schematic

Tracking MPC Optimization Problem

Assume that the control input is denoted by $u_{k}$ and the state under control is $x$. Also, $f$ denotes the transition function, i.e. the prediction model.

  • $N_{p}$ is the Prediction Horizon
  • $N_{c}$ is the Control Horizon

Thus, we end up with the following QP problem with $N_{c}$ design variables

$$ \begin{aligned} \min_{\Delta u(k), ...,\Delta u(k+N_{c})} \quad & J = {\hat{\textbf{e}}}^T \textbf{Q}\ \hat{\textbf{e}} + {\Delta u_{k}}^T \textbf{R} \Delta u_{k} \\ \textrm{s.t.} \quad & \ \ \textbf{x}^{+} = f(x_{k},u_{k}) & \\ & \ \ \hat{\textbf{e}} = \textbf{x}^{r} - \hat{\textbf{x}} \\ &\ \ \Delta u_{min} \leq \Delta u_{k+i} \leq \Delta u_{max} \ \ \ , \ i=0,...N_{c} \\ & \ \ u_{min} \leq u_{k+i} \leq u_{max} \ \ \ \ \ \ \ \ , \ i=0,...N_{c} \\ &\ \ \Delta u_{k+i} = 0 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ , \ i=N_{c}+1,...N_{p} \\ \end{aligned} $$

Results

3D_trajectory 3D_trajectory

linear-adaptive-mpc's People

Contributors

sppap avatar

Stargazers

 avatar  avatar Bashar Shami avatar

Watchers

 avatar

Forkers

basharbme

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.