multi parametric with references
Post on 07-Apr-2018
223 Views
Preview:
TRANSCRIPT
-
8/6/2019 Multi Parametric With References
1/29
Part III:
MPC for Constrained Linear Systems
An Explicit Solution
Miroslav Baric
Johan Lofberg
Helfried Peyrl
Ioannis Fotiou
Manfred Morari
-
8/6/2019 Multi Parametric With References
2/29
MPC and Receding Horizon Policy
PLANT
inputref
Measurement
output
constrained
finite timeoptimal control
xt|t
rt ytut|t
At time instance t:
solve Constrained Finite Time Optimal
Control problem to obtain open-loop
solution:
U =
u
T
t|t uTt+1|t . . . u
Tt+N1|t
T apply only u
t|t ,
repeat the optimization at the next time
instance for a shifted prediction horizon
Receding horizon policy introduces feedback
-
8/6/2019 Multi Parametric With References
3/29
Motivation
MPC requires solving a constrained optimizationproblem (e.g. linear or quadratic) on-line.
Drawbacks
the optimization problem may not be solved
within a prescribed time due to a highsampling rate limited to slow processes
(e.g. chemical plants)
it is difficult to estimate strict (and tight)
upper bound on the time needed for the
optimization procedure
on-line optimization usually implies
expensive and large computational
infrastructure inconvenient for embedded
control applications
Remedy
Move the optimization effort off-line . How?
-
8/6/2019 Multi Parametric With References
4/29
Parametric Programming - Part I
Before providing the answer to the question, letus consider the following example:
Example: Perturbed quadratic program
f(x) = minz
f(z, x) = 12z
2 + 2xz
subj. to z 1 + x,
x R is an unknown parameter.
The goals:
1. find z(x) = argminz f(z, x),
2. find all x for which the problem has a
solution
3. compute the value function f(x)
Define Lagrangian:
L(z , x , ) = f(z, x) + (z x 1)
KKT conditions:
z + 2x + = 0, (1)
z x 1 0, (2)
(z x 1) = 0, (3)
0. (4)
-
8/6/2019 Multi Parametric With References
5/29
Parametric Programming - Part II
Consider two strictly complementary cases(from (3)):
1.z x 1 = 0
> 0
z(x) = x + 1,
x < 13f(x) = 52x
2 + 3x + 12
2.z x 1 < 0
= 0
z(x) = 2x,
x > 13f(x) = 2x2
-2 -1 0 1 2
-2
-1
0
1
2
x
z, f
x= 13
f(x)
z(x)
z(x) =
x + 1, ifx 1
3,
2x, ifx 13
The optimization problem is solved for all
admissible values of parameter x.
The optimal solution for a given x amounts
to simple evaluation of z(x) and f(x).
-
8/6/2019 Multi Parametric With References
6/29
Parametric Programming - General
General formulation:
f(x) = infz
f(z, x),
subj. to g(z, x) 0,
where z Z Rm is the optimization variable
and x X Rn
is a vector of parameters.
x Rn, n > 1 multi-parametric program
closely related to sensitivity analysis:
sensitivity analysis: local behavior of the
solution for small perturbations
parametric program: solution for the full
range of parameters x
We consider two important classes:
1. multi-parametric LP (mpLP)
2. multi-parametric QP (mpQP)
-
8/6/2019 Multi Parametric With References
7/29
mpLP
FormulationPRIMAL PROBLEM (PP) DUAL PROBLEM (DP)
J(x) = minz
J(z, x) = cTz,
subj. to Gz W + Sx
max
(W + Sx)T,
subj. to GT = c,
0
where c Rm, G Rqm, S Rqn, W Rq.
Feasible Set: X X is the set of all x for
which a solution to the PP & DP.
Given constraint indices I = {1, . . . , q}:
Set of Active Constraints:
A(x) = {i I | z : J(z, x) = J(x)
Giz Six Wi = 0} ,
Set of Inactive Constraints:
N(x) = {i I | z : J(z, x) = J(x)
Giz Six Wi < 0} ,
Critical region: for a given set A I
CRA = {x X | A(x) = A}
-
8/6/2019 Multi Parametric With References
8/29
mpLP: Geometric Algorithm (I)
exploration of the parameter space X usinggeometric methods
requires an LP solver
for simplicity, assume: no degeneracy
Optimality Conditions
primal feasibility:
Gz W + Sx
dual feasibility:
GT
= c, 0
complementarity slackness:
i(Giz Six Wi) = 0, i I
Step 1: solve an LP
For an initial parameter vector x0 X:
solve PP & DP z(x0) and (x0),
obtain A0 = A(x0) and N0 = N(x0) and
matrices:
{GA0, SA0, WA0} = {Gi, Si, Wi | i A(x0)}
{GN0, SN0, WN0} = {Gi, Si, Wi | i N(x0)}
-
8/6/2019 Multi Parametric With References
9/29
mpLP: Geometric Algorithm (II)
Step 2: determine CRA0, z0(x) and J0(x)
From the primal feasibility conditions:
GA0z0(x) = WA0 + SA0x,
GN0z0(x) < WN0 + SN0x.
compute:
optimizer z0(x):
z0(x) = G1A0
SA0x + G1A0
WA0 = F0x + g0
critical region CRA0:
CRA0 =
x | (GN0F0 SN0)x < WN0 GN0g0
Using the solution to the DP compute the value
function J0(x) (remember, strong duality holds):
J0(x) = (SA0x + WA0)TA0
Simplifying notation: CRAj CRj
-
8/6/2019 Multi Parametric With References
10/29
mpLP: Geometric Algorithm (III)
Critical region CR0 is defined by strictinequalities an open polyhedral set
x0
x1
x2
CR0 X
A = A(x) uniquely determines CRA
critical regions do not overlap
the optimizer z(x) is affine over CR0
Step 3: explore the rest of X
replace CR0 by its closure CR0 (change
-
8/6/2019 Multi Parametric With References
11/29
mpLP: Geometric Algorithm (IV)
I) Reversing inequalities
x1
x2
CR0
XR1
R2
R3
R4
CR0 = {x X | Hx K}
Ri = {x X | Hix Ki
Hjx Kj, j < i}
X \ CR0 =i
Ri
NOTE: regions Ri are not critical regions
proceed recursively: repeat the whole
procedure for each Ri guaranteed: set X explored in finite number
of iterations
problem: critical regions can be artificially
divided among different Ri
x1
x2
CR0
CR1
XR1
R2
R3
R4CR1 is split between R2and R3 keep track of
the critical regions already
discovered
-
8/6/2019 Multi Parametric With References
12/29
mpLP: Geometric Algorithm (V)
II) Crossing the facets
x1 x1
x2 x2
CR0 CR0CR4 CR4
CR1 CR1
CR2 CR2
CR3 CR3
X X
for each of the facets of CR0 a point outside
the region but close to the facet is selected
and the procedure is repeated
critical regions are computed in one piece,
no artificial splitting
heuristics: how far to step over the facet?
no formal proof that whole X is covered
however: in practice usually outperforms the
strategy based on reversing inequalities
-
8/6/2019 Multi Parametric With References
13/29
mpLP: Solution Properties
The following theorem summarizes theproperties of the solution to the mpLP:
Theorem 1
i) Feasible set X is closed and convex ,
ii) If the optimal solution z is unique x X,
the optimizer function z(x) : X Rm is:
continuous
polyhedral piecewise affine (PPWA) over
X , affine in each CRi
Otherwise, it is always possible to choosea continuous and PPWA optimizer function
z(x).
iii) The value function J(x) : X R is:
convex
PPWA over X , affine in each CRi
-
8/6/2019 Multi Parametric With References
14/29
mpLP: Example
minz
3z1 8z2,
s.t.
z1 + z2 13 + x15z1 4z2 208z1 + 22z2 121 + x24z1 z2 8z1 0z2 0
Critical regions and the optimizer
20 10 0 10 20 30 40 5060
40
20
0
20
40
60
x1
x2
CR1 CR2
CR3
A1 = {1,3} A2 = {2,3}
A3 = {1,4}
100
1020
3040
50
50
0
50
2
4
6
8
10
12
14
PPWA optimizer function
x1x2
z
(x)
z(x) =
0.733 0.03330.267 0.0333
x +
5.507.50
ifx CR1
0 0.0513
0.0641
x +
11.8
9.81
ifx CR2
0.333 0
1.33 0
x +
1.67
14.7
ifx CR3
-
8/6/2019 Multi Parametric With References
15/29
mpQP
Formulation
We consider multi-parametric quadratic
programs of the form:
J(x) = minz J(z, x) =
12z
THz ,subj. to Gz W + Sx
where z Z Rm, and x X Rn, G Rqm.
Assumptions:
H 0 no dual degeneracy
no primal degeneracy
Optimality conditions (KKT)
Hz + GT = 0, (5)
i (Giz
Six Wi) = 0, i = 1, . . . , q (6)
0, (7)
Gz W + Sx (8)
-
8/6/2019 Multi Parametric With References
16/29
mpQP: Geometric Algorithm (I)
the algorithm is conceptually identical to thegeometric algorithm for mpLP
required: QP solver
Step 1: Solve QP
For an initial parameter vector x0 solve QP and: obtain the optimizer z(x0),
identify indices of active and inactive
constraints A = A(x0) and N = N(x0) and
the corresponding matrices {G,S,W}A and
{G,S,W}N
Step 2: Compute z(x), (x) and CRA
from (5):
z = H1GT (9)
from (9) and (6) (N = 0):
A(x) = (GAH1GTA)
1(WA + SAx), (10)
the optimizer function: from (9) and (10):
z(x) = H1GTA(GAH1GTA)
1(WA+SAx)
-
8/6/2019 Multi Parametric With References
17/29
mpQP: Geometric Algorithm (II)
critical region: put
(x) and z
(x) into (7)and (8):
CRA = {x | Ax b}
A = GH1GTA(GAH
1GTA)1SA S
(GAH1GT
A
)1SA b =
W + GH1GTA(GAH
1GTA)1WA
(GAH1GTA)
1WA
NOTE: we immediately use the closure of the
critical region
Also note:
the value function z(x) is a uniquely defined
affine function over the critical region CRA
the critical region is a polyhedral set in the
x-space
Step 3: explore the rest of X
exploration strategies as in mpLP
propagation of active constraints: no
degeneracy active set of the neighboring
critical region can be computed without
solving a QP
-
8/6/2019 Multi Parametric With References
18/29
mpQP: Solution Properties
Under the assumption that no degeneracy
occurs, the following theorem summarizes the
global properties of the solution to the mpQP:
Theorem 2 i) feasible set X is closed and
convex
ii) the optimizer function z(x) : X Rm is:
continuous
PPWA over the critical regions CRi
iii) the value function J(x) : X R is:
continuous
convex
polyhedral piecewise quadratic (PPWQ)
(piecewise quadratic over polyhedra), in
particular over the critical regions CRi
-
8/6/2019 Multi Parametric With References
19/29
mpQP: Example
minz
12(z21 + z22),
s.t.
z1 + z2 13 + x15z1 4z2 208z1 + 2z2 10 + x24z1 z2 8z1 0z2 0
Critical regions and the optimizer
20 10 0 10 20 30 40 50 6060
40
20
0
20
40
60
x1
x2
CR1
CR2
CR3
CR4CR5
0
20
4050
0
50
2
2.5
3
3.5
4
4.5
5
PPWA optimizer function
x1 x2
z
(x)
z(x) =
0 00 0
x +
1.880.47
ifx CR1
0.3333 0
1.3333 0
x +
1.67
14.67
ifx CR2
0 0.0625
0 0.25
x +
0.38
6.5
ifx CR3
0 0.125
0 0 x +
1.25
0 ifx CR4
0 0.1818
0 0.2273
x +
3.64
9.55
ifx CR5
-
8/6/2019 Multi Parametric With References
20/29
MPC based on Linear Norms (I)
Consider optimal control problem:
minu
N1k=0
||Qxt+k|t||p + ||Rut+k|t||p
s.t. xt+k+1|t = Axt+k|t + But+k, k 0xt+k|t Xut+k|t U
(11)
where p {1, }, X and U are polyhedral sets.
Recall vectorized notation:
X = xTt|t x
Tt+1|t . . . xt+N1|t
T
U =
uTt|t u
Tt+1|t . . . u
Tt+N1|t
T
The predicted states and outputs can be
conveniently written as
X = Axt|t + BU
where
A =
I
A
A2
...
AN1
, B =
0 0 0 . . . 0B 0 0 . . . 0
AB B 0 . . . 0... . . . . . . . . . ...
AN2B . . . AB B 0
-
8/6/2019 Multi Parametric With References
21/29
MPC based on Linear Norms (II)
Polyhedral sets X and U are given by:
U U = {U : EuU Fu}
X X = {X : ExX Fx}
(for suitably defined matrices Eu, Ex, Fu and Fx).
Consider p = 1 (sum of absolute values):
Introduce decision vectors Zx and Zu to model
absolute values of QX and RU.
Zx QX ZxZu RU Zu
Inserting the definition of X, the problem (11)
can be written as:
minU,Zx,Zu
1TZx + 1TZu
s.t.
Eu
ExB
U
Fu
Fx ExAxk|k
Zx Q(Axt|t + BU) ZxZu RU Zu
-
8/6/2019 Multi Parametric With References
22/29
MPC based on Linear Norms (III)
Written in a more compact form, the problem
becomes:
minz
cTz,
subj. to Gz W + Sxt|t(12)
where z =
UT, ZTx , ZTu
T.
The problem (12) can be solved on-line as an
LP for a particular xt|t or off-line for all xt|t as
an mpLP, with xt|t as the parameter vector.
-
8/6/2019 Multi Parametric With References
23/29
MPC based on Quadratic Cost
Consider the optimal control problem:
minu
N1k=0
xTt+k|tQxt+k|t + uTt+k|tRut+k|t
s.t. xt+k+1|t = Axt+k|t + But+k, k 0xt+k|t Xut+k|t U
(13)
Using the same notation, the problem (13) is
transformed into QP:
minU
UTHU + 2UTF xt|t
s.t. EuExB
U Fu
Fx ExAxk|k
where H = ATQA + R, F = BTQA.
Completing the square and transforming
coordinates: z = 2(U + H1FTxt|t):
minz
12
zTHz,
subj. to Gz W + Sxt|t
(14)
Solve QP (14) on-line for a particular xt|t or
off-line for all xt|t as an mpQP with xt|t as a
parameter vector.
-
8/6/2019 Multi Parametric With References
24/29
Explicit Solution to MPC
For constrained linear systems and quadraticcost or cost based on linear norms:
MPC is a continuous, piecewise
affine feedback law.
The computational burden is moved off-line:
off-line: solve mpLP(QP)
on-line: detect which critical region xt|t
belongs to and evaluate the corresponding
affine feedback law LOOK-UP TABLE
EXPLICIT FEEDBACK LAW
LOOKUP TABLEOPTIMIZATION PROBLEM
(mpLP, mpQP, ...)
PLANT
OFFLINE
u(xt|t)
u(xt|t)
rt
yt
xt|t
xt|t
u = Fixt|t + gi
Receding horizon policy: extract ut|t from
the optimizer vector z(xt|t) and apply it to the
plant
-
8/6/2019 Multi Parametric With References
25/29
Example: Double Integrator (II)
G(s) = 1s2
ZOH, Ts=0.1s= xt+1 =
1 0.10 1
xt +
0.005
1
ut
Constraints:
|u| 1
x 5
-norm based cost
J(x, u) =
10k=0
xt+k|t + ut+k|t
5 4 3 2 1 0 1 2 3 4 55
4
3
2
1
0
1
2
3
4
5
Position
Speed
Control partition with 116 regions
5
0
5
5
0
5
1
0.5
0
0.5
1
Value of the control action over 116 regions
x1x2
u
(x)
0 1 2 3 4 5 6 7 8 9 102
1
0
1
2
3
4
x1
,x2
0 1 2 3 4 5 6 7 8 9 101
0.5
0
0.5
1
u * t
|t
time [s]
-
8/6/2019 Multi Parametric With References
26/29
Example: Double Integrator (II)
Quadratic cost
J(x, u) =
10k=0
xt+k|t
22 + u
2t+k|t
5 4 3 2 1 0 1 2 3 4 55
4
3
2
1
0
1
2
3
4
5
Position
Speed
Control partition with 17 regions
5
0
55
0
5
1
0.5
0
0.5
1
Value of the control action over 17 regions
x1x2
u
(x)
0 1 2 3 4 5 6 7 8 9 102
1
0
1
2
3
4
x1
,x2
0 1 2 3 4 5 6 7 8 9 101
0
1
u * t
|t
time [s]
-
8/6/2019 Multi Parametric With References
27/29
As a conclusion ...
Explicit solution to MPC for linear constrained
systems:
enables application of MPC to systems with
fast sampling rates
suitable for embedded applications better insight into MPC properties
(performance, stability, feasibility)
Caveat: The complexity of the explicit solution
(the number of regions) typically grows with
the dimension of the state space may easily
outgrow any practical application
Extensions
time optimal control
complexity reduction using suboptimal
solutions
infinite horizon solution
robust min-max controller
This (and much more) can be found in ...
-
8/6/2019 Multi Parametric With References
28/29
The One and Only ...
MULTI-PARAMETRIC
TOOLBOX
http://control.ee.ethz.ch/~mpt
-
8/6/2019 Multi Parametric With References
29/29
References
[1] A. Bemporad, M. Morari, V. Dua, and E.N. Pistikopoulos.The explicit linear quadratic regulator for constrained sys-tems. Automatica, 38(1):320, January 2002.
[2] F. Borrelli. Constrained Optimal Control Of Linear And Hy-brid Systems, volume 290 of Lecture Notes in Control andInformation Sciences. Springer, 2003.
[3] M. Kvasnica, P. Grieder, M. Baotic, and M. Morari. MultiParametric Toolbox (MPT). In Hybrid Systems: Compu-tation and Control, Lecture Notes in Computer Science.Springer Verlag, 2003. http://control.ee.ethz.ch/~mpt .
[4] R.D.C. Monteiro and I. Adler. A geometric view of paramet-ric linear programming. Algoritmica, 8(2):161176, 1992.
[5] P. Tndel, T.A. Johansen, and A. Bemporad. An algo-rithm for multiparametric quadratic programming and ex-plicit mpc solutions. Automatica, 39(3):489497, 2003.
top related