Elio Saade
Note

Linear MPC

Topics: Model Predictive Control

Problem Definition

The Linear MPC is a special case of the Finite Horizon Optimal Control MPC where the system dynamics function is linear, i.e. xk+1=f(xk,uk)=Axk+Bukx_{k+1}=f(x_k,u_k)=A x_k + B u_k and the cost function is typically quadratic. This makes Linear MPC a convex quadratic program that can be solved efficiently in real time, which is its main advantage over nonlinear versions.

There are 2 widely popular applications of Linear MPC presented below: reference tracking and regulation.

Linear MPC for Reference Tracking

The objective of the reference tracking problem is to drive the state and control of the system as close as possible to a pre-defined desired trajectory. For example, in an autonomous vehicle, the path planning algorithm generates a reference trajectory, and MPC optimizes the vehicle controls to follow it.

min⁡{u0,…,uN−1}∑i=0N−1[(xi−xr,i)⊤Q(xi−xr,i)+(ui−ur,i)⊤R(ui−ur,i)]+(xN−xr,N)⊤Qf(xN−xr,N)subject toxi+1=Axi+Bui,i=0,…,N−1,x0=xinit,xi∈X,i=0,…,N,ui∈U,i=0,…,N−1,xN∈Xf.\begin{equation} \begin{aligned} \min_{\{u_0,\ldots,u_{N-1}\}} \quad & \sum_{i=0}^{N-1} \Big[ (x_i-x_{r,i})^\top Q (x_i-x_{r,i}) + (u_i-u_{r,i})^\top R (u_i-u_{r,i}) \Big] + (x_N-x_{r,N})^\top Q_f (x_N-x_{r,N}) \\ \text{subject to} \quad & x_{i+1} = A x_i + B u_i, \qquad i=0,\ldots,N-1, \\ & x_0 = x_{\mathrm{init}}, \\ & x_i \in \mathcal{X}, \qquad i=0,\ldots,N, \\ & u_i \in \mathcal{U}, \qquad i=0,\ldots,N-1, \\ & x_N \in \mathcal{X}_f. \end{aligned} \end{equation}

where

  • Q⪰0Q \succeq 0 penalizes state deviations
  • R≻0R \succ 0 penalizes control deviations
  • Qf⪰0Q_f \succeq 0 is the terminal cost matrix

QQ, RR, and QfQ_f are typically diagonal matrices, and make it possible to penalize different states/control at different scales.

Linear MPC for Regulation

The objective of a regulation problem is to drive the state of the system to an equilibrium point, typically the origin xe=0,  ue=0x_e=0, \; u_e=0, while minimizing control effort. It is similar to the reference tracking problem with the reference points being 0.

min⁡{u0,…,uN−1}∑i=0N−1(xi⊤Qxi+ui⊤Rui)+xN⊤QfxNsubject toxi+1=Axi+Bui,i=0,…,N−1,x0=xinit,xi∈X,i=0,…,N,ui∈U,i=0,…,N−1,xN∈Xf.\begin{equation} \begin{aligned} \min_{\{u_0,\ldots,u_{N-1}\}} \quad & \sum_{i=0}^{N-1} \left( x_i^\top Q x_i + u_i^\top R u_i \right) + x_N^\top Q_f x_N \\ \text{subject to} \quad & x_{i+1} = A x_i + B u_i, \qquad i=0,\ldots,N-1, \\ & x_0 = x_{\mathrm{init}}, \\ & x_i \in \mathcal{X}, \qquad i=0,\ldots,N, \\ & u_i \in \mathcal{U}, \qquad i=0,\ldots,N-1, \\ & x_N \in \mathcal{X}_f. \end{aligned} \end{equation}

Connections

Direct relationships to this note.