Elio Saade
Note

General MPC Formulation

Topics: Model Predictive Control

Problem Definition

Model Predictive Control (MPC) is an optimal control technique where an optimization problem is solved repeatedly in real time. At each control interval, the controller predicts the future behavior of the system over a finite horizon and computes the optimal control inputs while satisfying a set of constraints.

Consider a discrete-time dynamical system
xk+1=f(xk,uk)x_{k+1}=f(x_k, u_k)
where

  • xk∈Rnx_k \in \mathbb{R}^n is the state vector
  • uk∈Rmu_k \in \mathbb{R}^m is the control input
  • f(⋅)f(\cdot) is the system dynamics function, linear or nonlinear

At time step kk, the general MPC formulation is the following optimization problem

arg⁡min⁡uJ(x,u)subject toxi+1=f(xi,ui),i=0,…,N−1,x0=xcurrent,xi∈X,i=1,…,N,ui∈U,i=0,…,N−1,\begin{equation} \begin{aligned} \arg\min_{\mathbf{u}} \quad & J(\mathbf{x},\mathbf{u}) \\ \text{subject to} \quad & x_{i+1} = f(x_i,u_i), \qquad i = 0,\ldots,N-1, \\ & x_0 = x_{\mathrm{current}}, \\ & x_i \in \mathcal{X}, \qquad i = 1,\ldots,N, \\ & u_i \in \mathcal{U}, \qquad i = 0,\ldots,N-1, \end{aligned} \end{equation}

where

  • J(x,u)J(x,u) is the cost function
  • NN is the prediction horizon
  • X\mathcal{X} is the set of allowed states
  • U\mathcal{U} is the set of allowed input

In other words, the controller optimizes a sequence of control inputs over a finite horizon to minimize a given cost function, while satisfying the system dynamics, and state and control constraints.

Receding Horizon Principle

At each control step kk, the MPC solves for the optimal sequence of control input over the prediction horizon NN, i.e. u=[u0u1⋯uN−1]\mathbf{u} = \begin{bmatrix} u_0 & u_1 & \cdots & u_{N-1} \end{bmatrix}. However, only the first control of the optimal sequence is applied to the system, u(k)=u0u(k)=u_0. Then, the new state is measured at the next sampling instant, the prediction horizon is moved forward, and the optimization problem is solved again. This repeated optimization at every control interval is known as the receding horizon principle.

Connections

Direct relationships to this note.