Skip to main content
QUICK REVIEW

[Paper Review] Model Predictive Control using MATLAB

Midhun T. Augustine|arXiv (Cornell University)|Sep 1, 2023
Advanced Control Systems OptimizationEngineering3 citations
TL;DR

This tutorial presents a comprehensive introduction to Model Predictive Control (MPC) using MATLAB, covering both Linear MPC (LMPC) and Nonlinear MPC (NMPC) through numerical implementation. It details the formulation of optimization problems, constraint handling, feasibility, stability via Lyapunov analysis, and optimality, with practical MATLAB code provided for implementation and validation across various system types.

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.

Motivation & Objective

  • To provide a structured tutorial on Model Predictive Control (MPC) using MATLAB for researchers and practitioners.
  • To bridge theoretical MPC concepts with practical numerical implementation, focusing on both linear and nonlinear MPC.
  • To enable users to implement MPC algorithms with proper handling of constraints, feasibility, stability, and optimality.
  • To offer accessible MATLAB code examples for LMPC and NMPC to support learning and experimentation.
  • To guide users through the formulation of optimization problems, including prediction and control horizons, terminal constraints, and weighting matrices.

Proposed method

  • Formulates MPC as a receding horizon optimization problem using a system model and current state to predict future behavior over a finite horizon.
  • Employs a cost function dependent on predicted states and control inputs, optimized using numerical solvers in MATLAB.
  • Implements both Linear MPC (LMPC) and Nonlinear MPC (NMPC) by solving convex (QP, LP) and non-convex (NLP) optimization problems.
  • Introduces feasibility via the set of feasible control sequences $\mathbb{U}_{fk}$, ensuring state and control constraints are satisfied over the prediction horizon.
  • Applies Lyapunov-based stability analysis by ensuring the optimal cost function $J_k^*$ acts as a Lyapunov function, guaranteeing $\Delta V < 0$.
  • Incorporates terminal constraints and weighting matrices $\mathbf{Q}_N$, $\mathbf{F}_{\mathbf{x}_N}$, and $\mathbf{g}_{\mathbf{x}_N}$ to enhance stability and convergence.
Figure 1: (a) MPC General block diagram (b) Basic MPC strategy.
Figure 1: (a) MPC General block diagram (b) Basic MPC strategy.

Experimental results

Research questions

  • RQ1How can MPC be numerically implemented in MATLAB for both linear and nonlinear systems?
  • RQ2What are the key components of MPC formulation, including prediction horizon, control horizon, and constraint handling?
  • RQ3How does MPC ensure recursive feasibility and stability through Lyapunov analysis?
  • RQ4What role do terminal constraints and weighting matrices play in improving MPC performance and convergence?
  • RQ5How does the choice of prediction horizon $N$ affect the suboptimality and performance of the MPC control law?

Key findings

  • The MPC control law is persistently feasible if the initial state lies in the feasible set $\mathbb{X}_{f0}$, ensuring feasibility for all future time steps under the system dynamics.
  • Stability is achieved when the optimal cost function $J_k^*$ serves as a Lyapunov function, satisfying $\Delta V = J_{k+1}^*(\mathbf{x}_{k+1}) - J_k^*(\mathbf{x}_k) < 0$.
  • For LTI systems, proper selection of the terminal weighting matrix $\mathbf{Q}_N$ and terminal constraints ensures the value function is a valid Lyapunov function.
  • As the prediction horizon $N$ increases toward the total time horizon $N_T$, the MPC control law becomes increasingly optimal, approaching the global optimal solution.
  • The use of terminal constraints $\mathbf{F}_{\mathbf{x}_N}$ and terminal cost $\mathbf{Q}_N$ significantly improves stability and convergence properties in both LMPC and NMPC.
  • MATLAB-based implementation enables efficient numerical solution of MPC problems, with code examples provided for LMPC and NMPC across various system models.
Figure 2: LMPC response (a) Stabilization (b) Set point tracking.
Figure 2: LMPC response (a) Stabilization (b) Set point tracking.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.