Model Predictive Control (MPC)

MPC

Linear MPC requires solving a Quadratic Program (QP)

minz 12zHz+x(t)Fz+12x(t)Yx(t)

s.t. GzW+Sx

where z=[u0 u1  uN1]

These define a polyhedron where the solution should lie.

QP solver

fast gradient method for dual QP

  • apply fast gradient method to dual QP

    minz 12zHz+xFz

    ​ s.t. GzW+Sx

    Example:

    Model:

    wk=yk+βk(ykyk1) zk=KwkJx sk=1LGzk1L(Sx+W) yk+1=maxyk+sk,0

    ​ Where y1=y0=0, K=H1G , and J=H1F, β={0,k=0 k1k+2,k>0

    Termination criterion:

    1. primal feasibility

      ski1LϵG,i=1,,m

    2. primal oprimality

      f(zk)ff(zk)ϕ(wk)=wkskLϵV

      and wksk1LϵV

solve MPC:

Step 1: get a linear discrete-time model

system linearization

Step 2: design the MPC controller

LPV

LinearParameter-Varying(LPV) model

xk+1=A(p(t))xk+B(p(t))uk+Bv(p(t))vk yk+1=C(p(t))xk+Dv(p(t))vk

​ depends on p(t)

the quadratic perfirmance index can also be LPV, and the resulting optimization problem is still a QP:

minz12zH(p(t))z+[x(t) r(t) u(t1)]F(p(t))z s.t.G(p(t))zW(p(t))+S(p(t))[x(t) r(t) u(t1)]

The QP matrices must be constructed online, contrarily to the LTI case.

An LPV model can obtained by linearizing nonlinear model

{x˙x(t)=f(xc(t),uc(t),pc(t)) yc(t)=g(xc(t),pc(t))

​ where pc = a vector of exogeneous signals

Linearize:

​ $$\dot{x}c(t) \simeq \underbrace{ \frac{\partial f}{\partial x}|{\bar{x}_c,\bar{u}_c,\bar{p}c}}{A_c} (x_c(t)-\bar{x}c) + \underbrace{ \frac{\partial f}{\partial u}|{\bar{x}_c,\bar{u}_c,\bar{p}c}}{B_c} (u_c(t)-\bar{u}c)+ \underbrace{ \left[ \frac{\partial f}{\partial p}|{\bar{x}_c,\bar{u}_c,\bar{p}_c} f(\bar{x}_c,\bar{u}c,\bar{p}c) \right]}{B{vc}} [[pc(t)p¯c 1]] $$

  • convert [Ac,[Bc  Bvc]] to discrete-time and get prediction model (A,[]B  Bvc)
  • same thing for the output equation, to get matrices C and Dv

LTV

Linear time-varying (LTV) model

  • xk+1=Ak(t)xk+Bk(t)uk yk=Ck(t)xk

  • at each time the model can also change over the prediction horizon k

  • the optimization problem is still a QP

    minz12zH(t)z+[x(t) r(t) u(t1)]F(t)z s.t.G(t)zW(t)+S(t)[x(t) r(t) u(t1)]

  • As for LPV-MPC, the QP matrices must be constructed online.

  • LTV/LPV model can be obtained by linearing nonlinear models
  • nominal trajectories:
    • U=u¯c(t),u¯c(t+Ts),,u¯c(t+(N1)Ts)
      • U=shifted previous optimal sequence, or reference trajectories.
    • P=p¯c(t),p¯c(t+Ts),,p¯c(t+(N1)Ts)
      • no preview: p¯c(t+k)p¯c(t)