Main Content

Time-Varying MPC

When to Use Time-Varying MPC

适应不断变化的操作条件,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 thePlantandNominalinput arguments ofmpcmoveAdaptive. For an example of time-varying MPC, seeTime-Varying MPC Control of a Time-Varying Plant.

Time-Varying Prediction Models

Consider the LTV prediction model

x ( k + 1 ) = A ( k ) x ( k ) + B u ( k ) u ( k ) + B v ( k ) v ( k ) y ( k ) = C ( k ) x ( k ) + D v ( k ) v ( k )

whereA,Bu,Bv,C, andD是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 thePlantarray:

  • 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, seePlant Model.

The prediction of future trajectories forpsteps into the future, wherepis the prediction horizon, is the same as for the adaptive MPC case:

[ y ( 1 ) y ( p ) ] = S x x ( 0 ) + S u 1 u ( 1 ) + S u [ Δ u ( 0 ) Δ u ( p 1 ) ] + H v [ v ( 0 ) v ( p ) ]

However, for an LTV prediction model, the matricesSx,Su1,Su, andHvare:

S x = [ C ( 1 ) A ( 0 ) C ( 2 ) A ( 1 ) A ( 0 ) C ( p ) i = 0 p 1 A ( i ) ] S u 1 = [ C ( 1 ) B u ( 0 ) C ( 2 ) [ B u ( 1 ) + A ( 1 ) B u ( 0 ) ] C ( p ) k = 0 p 1 [ ( i = k + 1 p 1 A ( i ) ) B u ( k ) ] ] S u = [ 0 0 0 S u 1 C ( 2 ) B u ( 1 ) 0 0 C ( p ) k = 1 p 1 [ ( i = k + 1 p 1 A ( i ) ) B u ( k ) ] C ( p ) B u ( p 1 ) ] H v = [ C ( 1 ) B v ( 0 ) D v ( 1 ) 0 0 C ( 2 ) A ( 1 ) B v ( 0 ) C ( 2 ) B v ( 1 ) D v ( 2 ) 0 C ( p ) ( i = 1 p 1 A ( i ) ) B v ( 0 ) C ( p ) B v ( p 1 ) D v ( p ) ]

where i = k 1 k 2 A ( i ) A ( k 2 ) A ( k 2 1 ) A ( k 1 ) if k 2 k 1 , orIotherwise.

For more information on the prediction matrices for implicit MPC and adaptive MPC, seeQP 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 offsetsxoff,uoff,voff, andyoff:

x ( k + 1 ) x o f f ( k ) = A ( k ) ( x ( k ) x o f f ( k ) ) + B u ( k ) ( u ( k ) u o f f ( k ) ) + B v ( k ) ( v ( k ) v o f f ( k ) ) + Δ x o f f ( k ) y ( k ) y o f f ( k ) = C ( k ) ( x ( k ) x o f f ( k ) ) + D v ( k ) ( v ( k ) v o f f ( k ) )

If we define

x o f f ¯ x ( 0 ) , u o f f ¯ u ( 0 ) v o f f ¯ v ( 0 ) , y o f f ¯ 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 ) x o f f ¯ = A ( k ) ( x ( k ) x o f f ¯ ) + B u ( k ) ( u ( k ) u o f f ¯ ) + B v ( k ) ( v ( k ) v o f f ¯ ) + B ¯ v ( k ) y ( k ) y o f f ¯ = C ( k ) ( x ( k ) x o f f ¯ ) + D v ( k ) ( v ( k ) v o f f ¯ ) + D ¯ v ( k )

where

B ¯ v ( k ) Δ x o f f ( k ) + x o f f ( k ) x o f f ¯ + A ( k ) ( x o f f ¯ x o f f ( k ) ) + B u ( k ) ( u o f f ¯ u o f f ( k ) ) + B v ( k ) ( v o f f ¯ v o f f ( k ) ) D ¯ v ( k ) y o f f ( k ) y o f f ¯ + C ( k ) ( x o f f ¯ x o f f ( k ) ) + D v ( k ) ( v o f f ¯ v o f f ( 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 onA(0),B(0),C(0), andD(0) from the initial prediction step; that is, the current time at which the state is estimated. For more information, seeState Estimation.

See Also

Functions

Objects

Related Examples

More About