Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
PREDICTIVE CONTROL
Eric C. Kerrigan and Jan M. Maciejowski
The MPC problem is not defined for any other where is the constraint violation penalty weight,
combination of past control input, current state the vector c()+ contains the magnitude of the
and reference trajectory, i.e. if / F then the constraint violations for a given and c+ i ,
QP problem is infeasible. The set F can be max(ci , 0).
seen to be the orthogonal projection of F onto the The concept of a dual norm is used in the
subspace and can therefore be computed using condition on for which the solution to (10) is
standard techniques, such as the Fourier-Motzkin equal to the solution to (9). The dual of a norm k k
elimination method [7]. is defined as
In general, even for the case with no distur-
kukD , max uT v . (11)
bances and model uncertainty, the set F is not nec- kvk1
essarily positively invariant for the closed-loop sys-
tem. Since constraints can be satisfied if and only It can be shown that the dual of k k1 is k k and
if the initial condition (k) is in a set which is pos- vice versa, and that k k2 is the dual of itself.
itively invariant [8] for the closed-loop system, it is If denotes the optimal solution to (9) and
important to design the controller such that F is in- is the corresponding optimal Lagrange multiplier
variant. If Hp = Hu , one can guarantee nomi- vector, then the following well-known result gives a
nal feasibility for all time by requiring that the pre- condition under which the solutions to (9) and (10)
dicted terminal state (k + Hp |k) lie in a control in- are equal:
variant set, as discussed in [9]. For simplicity, it is as-
Theorem 1. If the penalty weight > k kD and
sumed that F is positively invariant for the nomi-
c( ) 0, then the solution to (9) is equal to the
nal closed-loop system and that a feasible sequence
solution to (10).
of reference trajectories is always chosen.
Assuming the above, it is still possible that a Proof. See [3, Thm. 14.3.1].
disturbance or modelling error could result in the
system being driven to a state where the problem is If > k kD , then (10) is called an exact penalty
infeasible and hence no solution exists. One possible function. The cost function (10) is non-smooth and
way of dealing with this situation is to soften some therefore not as easy to solve for as, say, a QP. One
or all of the constraints. way to overcome this difficulty is to introduce slack
variables into the problem.
SOFT CONSTRAINTS
Slack Variables as Soft Constraints
A straightforward way for softening constraints is
The non-smooth, unconstrained minimisation (10)
to introduce slack variables which are defined such
can be cast into the following equivalent smooth,
that they are non-zero only if the corresponding
constrained problem which is a lot easier to compute:
constraints are violated. If the original, hard-
constrained solution is feasible, one would like
the soft-constrained problem to produce the same min V () + kk (12a)
control action. In order to guarantee this the ,
weights in the cost function have to be chosen large
enough such that the optimiser tries to keep the subject to
slack variables at zero, if possible. Exact penalty
c() (12b)
functions can be used to guarantee this behaviour [3,
Sect. 14.3]. 0 (12c)
where are the slack variables representing the A Non-conservative Lower Bound
constraint violations, i.e. = 0 if the constraints
are satisfied. If V () = V ((k), U (k)) as in (3), The condition on the lower bound on over all
c() = EU f G, = U and kk1 or kk is feasible can now be stated as:
used in (12), then the problem can be formulated as
> max kkD (15)
a QP and solved using standard techniques [1, 2]. ,
Note that even though the l2 -norm kk2 , T
will result in a non-smooth penalty function, one with the maximisation subject to the KKT optimal-
cannot formulate the soft-constrained MPC problem ity conditions (14) with U as above. This is the
as a QP because V ((k), U (k)) is quadratic and lowest bound on that guarantees that the soft- and
kk2 has a square root. Using the l22 quadratic norm hard-constrained QP problems produce the same so-
kk22 , T one can express the problem as a QP, lution for all feasible , since all points (U, )
but this does not result in an exact penalty function which satisfy the KKT conditions for a given
since (10) will be smooth; it is the non-smoothness solve the corresponding strictly convex primal QP
of the penalty function which allows it to be exact1 . and dual problem. It can be shown that the op-
timal U and are uniquely defined continu-
ous, piecewise affine functions of [6]. The op-
COMPUTING A LOWER BOUND FOR timisation in (15) is difficult, since it is the max-
THE PENALTY WEIGHT imisation of the norm of a piecewise affine func-
tion, which is not necessarily convex or concave.
In MPC, the optimal solution U is dependent on It is also possible that the maximisation is
the current augmented state as can be seen in (5) unbounded. If the region F is bounded, then
and hence the corresponding Lagrange multiplier the maximisation is bounded. However, F is
is also dependent on . The lower bound for is not necessarily bounded. From this point on, the
therefore dependent on . optimisation is subject to the additional constraint
0 , where 0 is a polyhedron of initial conditions
One would therefore have to calculate a lower
which is chosen such that 0 F is bounded. If 0
bound for which guarantees that the soft-con-
is a polytope2 , then 0 F is also a polytope, hence
strained MPC will produce the same solution as
the maximisation is bounded.
the original hard-constrained MPC for all F .
The last constraint in (14) is the complementary
Duality in optimisation theory provides some insight
slackness condition. Let j and j denote the La-
into the relation of the Lagrange multipliers to .
grange multiplier vectors for the jth set of inac-
tive and active constraints as in [6]. Let E j , fj , G
j
j j j
KKT conditions for mp-QP Problems and E , f , G be the corresponding matrices ex-
tracted from E, f and G. Adopting the above the op-
The Lagrangian of optimisation problem (5) is timisation in (15) becomes3 :
1 j kD
max k (16a)
L (U , ) = U T HU + U T G + T F j
j,,
2 (13)
+ T (EU f G) . subject to
max kk = 0 if 3 2
2
EXAMPLE 2 if 2 4
This section demonstrates how a soft-constrained The lower bound of the violation weight for the soft-
mp-QP problem can be designed given a hard- constrained mp-QP is therefore
constrained mp-QP. A simple example was chosen,
> max kk = 4 .
in order that the reader can work out the solutions 24
analytically and visualise the results easily. Consider
the following hard-constrained mp-QP: Choosing > 4 guarantees that the soft-constrained
mp-QP (18) solution sof t is equal to the solution
min 2 + + 2 (17a) hard of the hard-constrained mp-QP (17) for all
R
2 4.
subject to Figure 1 is a plot of the actual Lagrange multipli-
ers of the hard-constrained mp-QP at the optimal so-
1+ (17b) lution as is varied from -2 to 4, confirming that
1 (17c) is a piecewise affine function of . Figure 2 shows
that the difference between the soft-constrained op-
where the inequalities describe the feasible set F. timal solution and the hard-constrained optimal so-
The feasible set for is therefore given by F = lution is zero for > 4 over the range 2 4.
{ : 2}, i.e. the hard-constrained mp-QP The soft-constrained and hard-constrained solutions
problem is infeasible for < 2. will differ for > 4, depending on the actual value
For the soft-constrained problem one can take used for . For < 2 the hard-constrained mp-QP
kkD = kk . If > max2 kk then the soft- does not have a solution, while the soft-constrained
constrained mp-QP4 mp-QP solution minimises the constraint violations.
3
maximum norm, the solution is guaranteed to be
Magnitude of Lagrange multipliers
0.6
otherwise.
0.5
0.4
ACKNOWLEDGEMENTS
0.3
Figure 2: Plot showing that the difference between [1] N.M.C. de Oliveira and L.T. Biegler. Constraint
handling and stability properties of model-predictive
sof t and hard for 2 4 is zero if > 4
control. AIChE Journal, 40(7):11381155, July 1994.
[2] P.O.M. Scokaert and J.B. Rawlings. Feasibility
issues in model predictive control. AIChE Journal,
problem is feasible was defined. The importance of
45(8):16491659, August 1999.
ensuring that the feasible set is positively invariant
for the nominal closed-loop system was briefly [3] R. Fletcher. Practical Methods of Optimization. John
Wiley & Sons, 2nd edition, 1987.
discussed.
[4] P.O.M. Scokaert and J.B. Rawlings. Inifinite hori-
It was shown that both the cost function and
zon linear quadratic control with constraints. In Pro-
the constraints of the resulting QP is dependent ceedings of the 13th Triennial IFAC World Congress,
on the current state, previous control input and pages 109114, San Francisco, USA, 1996. IFAC.
reference trajectory. This implies that the Lagrange
[5] W.W. Hager. Lipschitz continuity for constrained
multipliers are also dependent on these variables. processes. SIAM Journal of Control and Optimiza-
Exact penalty functions require that the con- tion, 17(3):321338, May 1979.
straint violation weight be larger than the norm [6] A. Bemporad, M. Morari, V. Dua, and E.N. Pis-
of the Lagrange multiplier of the original optimi- tikopoulos. The explicit solution of model predic-
sation problem. It is therefore necessary to com- tive control via multiparametric quadratic program-
pute the upper bound on this norm for all feasi- ming. In Proceedings of the American Control Con-
ble combinations of current states, previous con- ference, Chicago, USA, June 2000.
trol inputs and reference trajectories. [7] S.S. Keerthi and E.G. Gilbert. Computation of
A method for computing the upper bound on the minimum-time feedback control laws for discrete-
norm of the Lagrange multipliers over a bounded time systems with state-control constraints. IEEE
subset of the feasible states was presented. The Transactions on Automatic Control, AC-32(5):432
region of interest can be divided into polytopes in 435, 1987.
which different combinations of constraints become [8] F. Blanchini. Set invariance in control. Automatica,
active at the solution. The problem of finding the 35:17471767, 1999.
maximum norm of the Lagrange multipliers reduces [9] D.Q. Mayne, J.B. Rawlings, C.V. Rao, and P.O.M.
to solving a finite number of LPs. The maximum Scokaert. Constrained model predictive control:
norm therefore lies at one of the vertices of these Stability and optimality. Automatica, 36:789814,
polytopes. 2000.