| Products & Services | Industries | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Model Predictive Control Toolbox |
| Contents | Index |
QP Matrices
This section describes the matrices associated with the model predictive control optimization problem described in Optimization Problem.
Prediction
Assume for simplicity that the disturbance model in Equation 2-1 and Equation 2-2 is a unit gain (i.e., d(k)=nd(k) is a white Gaussian noise). For simplicity, denote by
Then, the prediction model given by
Consider for simplicity the prediction of the future trajectories of the model performed at time k=0. We set nd(i)=0 for all prediction instants i, and obtain
Optimization Variables
Let m be the number of free control moves and denote by z= [z0; ...; zm-1]. Then,
|
(2-7) |
where JM depends on the choice of blocking moves. Together with the slack variable
, vectors z0, ..., zm-1 constitute the free optimization variables of the optimization problem (in case of systems with a single manipulated variables, z0, ..., zm-1 are scalars).
Figure 2-3: Blocking Moves: Inputs and Input Iincrements for moves=[2 3 2]
Consider for instance the blocking moves depicted in Figure 2-3, which corresponds to the choice moves=[2 3 2], or, equivalently, u(0)=u(1), u(2)=u(3)=u(4), u(5)=u(6),
u(0)=z0,
u(2)=z1,
u(5)=z2,
u(1)=
u(3)=
u(4)=
u(6)=0.
Then, the corresponding matrix JM is
Standard Form
The function to be optimized is
|
(2-8) |
Finally, after substituting u(k),
u(k), y(k), J(z) can be rewritten as
|
(2-9) |
Note
In order to keep the QP problem always strictly convex, if the condition number of the Hessian matrix K U is larger than 1012, the quantity 10*sqrt(eps) is added on each diagonal term. This may only occur when all input rates are not weighted (W u=0) (see Weights).
|
Alternative Cost Function
If the alternative cost function shown in Equation 2-5 is being used, Equation 2-8 is replaced by the following:
|
(2-10) |
where the block-diagonal matrices repeat p times, i.e., once for each step in the prediction horizon.
You also have the option to use a combination of the standard and alternative forms. See Weights for more details.
Constraints
Let us now consider the limits on inputs, input increments, and outputs along with the constraint 
0.
| Note Upper and lower bounds that are not finite are removed, as well as the input and input-increment bounds over blocked moves. |
Similarly to what was done for the cost function, we can substitute u(k),
u(k), y(k), and obtain
|
(2-11) |
where matrices Mz,M
,Mlim,Mv,Mu,Mx are obtained from the upper and lower bounds and ECR values.
Function mpc_buildmat constructs the QP problem matrices.
| Provide feedback about this page |
![]() | State Estimation | Model Predictive Control Computation | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |