Papers
Topics
Authors
Recent
Search
2000 character limit reached

Model Predictive Control using MATLAB

Published 1 Sep 2023 in math.OC | (2309.00293v1)

Abstract: This tutorial consists of a brief introduction to the modern control approach called model predictive control (MPC) and its numerical implementation using MATLAB. We discuss the basic concepts and numerical implementation of the two major classes of MPC: Linear MPC (LMPC) and Nonlinear MPC (NMPC). This includes the various aspects of MPC such as formulating the optimization problem, constraints handling, feasibility, stability, and optimality.

Citations (2)

Summary

  • The paper demonstrates the implementation of both LMPC and NMPC using MATLAB, emphasizing optimization problem formulation and proper constraint handling.
  • It outlines iterative algorithmic approaches by transforming control tasks into quadratic and nonlinear programming problems solved via MATLAB's fmincon.
  • Practical numerical examples illustrate set-point tracking and system stabilization, effectively bridging theoretical analysis with real-world applications.

Model Predictive Control using MATLAB

Introduction

The paper "Model Predictive Control using MATLAB" (2309.00293) provides an in-depth tutorial on implementing Model Predictive Control (MPC) for both linear and nonlinear systems using MATLAB. The tutorial focuses on the practical aspects of MPC, including the formulation of optimization problems, constraints handling, feasibility, stability, and optimality. The paper distinguishes between the two primary classes of MPC—Linear MPC (LMPC) and Nonlinear MPC (NMPC)—and discusses their respective implementations.

Linear Model Predictive Control

Problem Formulation

Linear MPC (LMPC) deals with systems where the model and constraints are linear. The control problem is defined using a discrete-time linear time-invariant (LTI) system. The cost function is quadratic, comprising terms that penalize deviations in state and control inputs.

For LMPC, the constrained Linear Quadratic Regulator (CLQR) approach is employed. The optimization problem minimizes the cost over a defined prediction horizon while adhering to state and control constraints. A finite or infinite horizon can be considered, with practical implementations often opting for the former due to computational constraints.

Algorithmic Implementation

The LMPC algorithm transforms the MPC problem into a quadratic programming (QP) problem. State predictions and control sequences are iteratively computed. The MATLAB toolbox, specifically the fmincon function, is utilized to solve these QP problems, with care taken to initialize and update state and decision variables at each iteration to ensure feasibility and optimal control application.

Set-point Tracking and Numerical Examples

Set-point tracking in MPC involves modifying the control and state variables to adjust to non-zero references. This is achieved by redefining the control problem in terms of error states. The paper provides numerical examples, including a state convergence scenario and set-point tracking, illustrating these concepts through MATLAB simulations.

Nonlinear Model Predictive Control

Problem Formulation

Nonlinear MPC (NMPC) extends the MPC framework to systems with nonlinear dynamics. This involves solving optimization problems where the system's nonlinearities are explicitly considered. Nonlinear equality constraints govern the state transition equations, making the optimization a non-convex problem.

Algorithmic Implementation

Similar to LMPC, NMPC translates the optimization problem into a nonlinear programming (NLP) problem, which is more complex due to the nonlinear constraints. The fmincon function in MATLAB is again used to handle these NLP problems, with additional adjustments for maintaining feasibility and minimizing computational load.

Set-point Tracking and Numerical Examples

The NMPC setup for set-point tracking mirrors that of LMPC but considers nonlinear steady-state and error dynamics to enable accurate tracking of non-zero set points. Numerical examples, including a pendulum system, demonstrate NMPC capabilities in stabilizing the system and achieving desired state tracking.

Feasibility, Stability, and Optimality

The paper discusses crucial aspects such as feasibility, stability, and optimality of MPC schemes. Feasibility entails the existence of control sequences that maintain state constraints. Persistent feasibility ensures that once a feasible solution is found, it remains feasible over time. The stability analysis utilizes Lyapunov criteria to guarantee convergence of the state trajectory. Optimality in MPC, often suboptimal due to finite prediction horizons, improves with increased horizon lengths, steering solutions closer to global optima.

Conclusion

The paper provides a comprehensive guide for implementing MPC in both linear and nonlinear contexts using MATLAB. It effectively bridges theoretical concepts and practical implementations, offering insights into addressing common issues like constraint handling, stability, and tracking performance. The shared MATLAB code and examples serve as practical resources for researchers and practitioners aiming to deploy MPC in real-world applications.

Paper to Video (Beta)

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Authors (1)

Collections

Sign up for free to add this paper to one or more collections.