Main Content

Time-Varying MPC

When to Use Time-Varying MPC

To adapt to changing operating conditions, adaptive MPC supports updating the prediction model and its associated nominal conditions at each control interval. However, the updated model and conditions remain constant over the prediction horizon. If you can predict how the plant and nominal conditions vary in the future, you can use time-varying MPC to specify a model that changes over the prediction horizon. Such a linear time-varying (LTV) model is useful when controlling periodic systems or nonlinear systems that are linearized around a time-varying nominal trajectory.

To use time-varying MPC, specify arrays for the Plant and Nominal input arguments of mpcmoveAdaptive. For an example of time-varying MPC, see Time-Varying MPC Control of a Time-Varying Plant.

Time-Varying Prediction Models

Consider the LTV prediction model

x(k+1)=A(k)x(k)+Bu(k)u(k)+Bv(k)v(k)y(k)=C(k)x(k)+Dv(k)v(k)

where A, Bu, Bv, C, and D are discrete-time state-space matrices that can vary with time. The other model parameters are:

  • k — Current control interval time index

  • x — Plant model states

  • u — Manipulated variables

  • v — Measured disturbance inputs

  • y — Measured and unmeasured plant outputs

Since time-varying MPC extends adaptive MPC, the plant model requirements are the same; that is, for each model in the Plant array:

  • Sample time (Ts) is constant and identical to the MPC controller sample time.

  • Any time delays are absorbed as discrete states.

  • The input and output signal configuration remains constant.

  • There is no direct feed-through from the manipulated variables to the plant outputs.

For more information, see Plant Model.

The prediction of future trajectories for p steps into the future, where p is the prediction horizon, is the same as for the adaptive MPC case:

[y(1)y(p)]=Sxx(0)+Su1u(1)+Su[Δu(0)Δu(p1)]+Hv[v(0)v(p)]

However, for an LTV prediction model, the matrices Sx, Su1, Su, and Hv are:

Sx=[C(1)A(0)C(2)A(1)A(0)C(p)i=0p1A(i)]Su1=[C(1)Bu(0)C(2)[Bu(1)+A(1)Bu(0)]C(p)k=0p1[(i=k+1p1A(i))Bu(k)]]Su=[000Su1C(2)Bu(1)00C(p)k=1p1[(i=k+1p1A(i))Bu(k)]C(p)Bu(p1)]Hv=[C(1)Bv(0)Dv(1)00C(2)A(1)Bv(0)C(2)Bv(1)Dv(2)0C(p)(i=1p1A(i))Bv(0)C(p)Bv(p1)Dv(p)]

where i=k1k2A(i)A(k2)A(k21)A(k1) if k2k1, or I otherwise.

For more information on the prediction matrices for implicit MPC and adaptive MPC, see QP Matrices.

Time-Varying Nominal Conditions

Linear models are often obtained by linearizing nonlinear dynamics around time-varying nominal trajectories. For example, consider the following LTI model, obtained by linearizing a nonlinear system at the time-varying nominal offsets xoff, uoff, voff, and yoff:

x(k+1)xoff(k)=A(k)(x(k)xoff(k))+Bu(k)(u(k)uoff(k))+Bv(k)(v(k)voff(k))+Δxoff(k)y(k)yoff(k)=C(k)(x(k)xoff(k))+Dv(k)(v(k)voff(k))

If we define

xoff¯x(0),uoff¯u(0)voff¯v(0),yoff¯y(0)

as standard nominal values that remain constant over the prediction horizon, we can transform the LTI model into the following LTV model:

x(k+1)xoff¯=A(k)(x(k)xoff¯)+Bu(k)(u(k)uoff¯)+Bv(k)(v(k)voff¯)+B¯v(k)y(k)yoff¯=C(k)(x(k)xoff¯)+Dv(k)(v(k)voff¯)+D¯v(k)

where

B¯v(k)Δxoff(k)+xoff(k)xoff¯+A(k)(xoff¯xoff(k))+Bu(k)(uoff¯uoff(k))+Bv(k)(voff¯voff(k))D¯v(k)yoff(k)yoff¯+C(k)(xoff¯xoff(k))+Dv(k)(voff¯voff(k))

If the original linearized model is already LTV, the same transformation applies.

State Estimation

As with adaptive MPC, time-varying MPC uses a time-varying Kalman filter based on A(0), B(0), C(0), and D(0) from the initial prediction step; that is, the current time at which the state is estimated. For more information, see State Estimation.

See Also

Functions

Objects

Related Examples

More About