Documentation Center |
This section describes the matrices associated with the model predictive control optimization problem described in Optimization Problem.
Assume that the disturbance model in Equation 2-1 and Equation 2-2 is a unit gain for example, d(k)=n_{d}(k) is a white Gaussian noise). You can denote this problem as
Then, the prediction model is:
x(k+1) = Ax(k) +B_{u}u(k) +B_{v}v(k)+B_{d}n_{d}(k)
y(k) = Cx(k) +D_{v}v(k) +D_{d}n_{d}(k)
Next, consider the problem of predicting the future trajectories of the model performed at time k=0. Set n_{d}(i)=0 for all prediction instants i, and obtain
This equation gives the solution
where
Let m be the number of free control moves, and let z= [z_{0}; ...; z_{m–1}]. Then,
(2-15) |
where J_{M} depends on the choice of blocking moves. Together with the slack variable ɛ, vectors z_{0}, ..., z_{m–1 }constitute the free optimization variables of the optimization problem. In the case of systems with a single manipulated variables, z_{0}, ..., z_{m–1} are scalars.
Blocking Moves: Inputs and Input Iincrements for moves=[2 3 2]
Consider the blocking moves depicted in Blocking Moves: Inputs and Input Iincrements for moves=[2 3 2]. This graph 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 J_{M} is
The function to be optimized is
where
(2-16) |
Finally, after substituting u(k), Δu(k), y(k), J(z) can be rewritten as
(2-17) |
Note You may want the QP problem to remain strictly convex. If the condition number of the Hessian matrix K_{Δ}_{U} is larger than 10^{12}, add the quantity 10*sqrt(eps) on each diagonal term. You can use this solution only when all input rates are unpenalized (W^{Δ}^{u}=0) (see Weights in the Model Predictive Control Toolbox™ reference documentation). |
If you are using the alternative cost function shown in Equation 2-5, Equation 2-16 is replaced by the following:
(2-18) |
In this case, the block-diagonal matrices repeat p times, for example, 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 in the Model Predictive Control Toolbox reference documentation for more details.
Next, consider the limits on inputs, input increments, and outputs along with the constraint ɛ≥ 0.
Note To reduce computational effort, the controller automatically eliminates extraneous constraints, such as infinite bounds. Thus, the constraint set used in real time may be much smaller than that suggested in this section. |
Similar to what you did for the cost function, you can substitute u(k), Δu(k), y(k), and obtain
(2-19) |
In this case, matrices M_{z},M_{ɛ},M_{lim},M_{v},M_{u},M_{x} are obtained from the upper and lower bounds and ECR values.