Professional Documents
Culture Documents
Tor AJohansen
Tor AJohansen
Tor A. Johansen
Norwegian University of Science and Technology, Trondheim, Norway
Main topics
1
Part I
Example
2
MPC formulation
Nonlinear system:
Optimization problem (similar to Chen and Allg öwer (1998)):
with subject to and
Explicit constrained nonlinear MPC
3
MPC formulation, assumptions
A1. .
where and will be specified shortly.
4
Terminal set
has a unique solution .
5
Terminal set, cont’d
Lemma 2. Let satisfy the conditions in Lemma 1. Then there exists a
constant such that satisfies
1. .
6
Multi-parametric nonlinear program (mp-NLP)
subject to
This defines an mp-NLP, since it is an NLP in parameterized by .
for some
We seek an explicit state feedback representation of the solution function
to this problem: Implementation without real-time optimization!
7
How to represent and ?
8
Orthogonal partitioning via a search tree
9
PWL approximate mp-NLP approach
Construct feasible local linear approximation to the mp-NLP solution from NLP
solutions at a finite number of samples in every region of the partition.
Construct the partition such that the approximate solution has a cost close to
the optimal cost for all .
10
mp-NLP and convexity
The optimal cost function can now be shown to have some regularity prop-
erties (Mangasarian and Rosen, 1964):
11
Optimal cost function bounds
12
Feasible local linear approximation
13
Sub-optimality bound
Since
defined in Lemma 3 is feasible in , it follows that
is an upper bound on in such that for all
!
where
!
¼
14
Approximate mp-NLP algorithm
1. Initialize the partition to the whole hypercube, i.e. . Mark the hypercube as
unexplored.
3. Solve the NLP for fixed to each of the vertices of the hypercube ¼ (some of these NLPs
may have been solved in earlier steps). If all solutions are feasible, go to step 4. Otherwise,
compute the size of ¼. If it is smaller than some tolerance, mark ¼ explored and infeasible.
Otherwise, go to step 8.
7. Compute the error bound ¼. If ¼ , mark ¼ as explored and feasible, and go to step
2.
8. Split the hypercube ¼ into two hypercubes ½ and ¾ using some heuristic rule. Mark
both unexplored, remove ¼ from , add ½ and ¾ to and go to step 2.
15
Example, Chen and Allgöwer (1998)
"
"
The origin is an unstable equilibrium point, with a stabilizable linearization.
We discretize this system using a sampling interval # . The control
objective is given by the weighting matrices
#
#
The terminal penalty is given by the solution to the Lyapunov equation
and a positively invariant terminal region is
The prediction horizon is "# .
Explicit constrained nonlinear MPC
16
Example, partition with 105 regions
1
0.8
0.6
0.4
0.2
2
0
x
−0.2
−0.4
−0.6
−0.8
−1
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1
x
1
17
Example, solution and cost
2
2
1 1
u (x ,x )
u(x ,x )
1 2
1 2
0 0
*
−1 −1
1
−2 −2 1
−1 −1
0.5 0.5
−0.5 −0.5
0 0
0 0
−0.5 −0.5
0.5 0.5
1 −1 x2 1 −1 x2
x1 x1
50 50
40 40
V (x ,x )
V(x1,x2)
1 2
30 30
20 20
*
10 10
0 1 0 1
−1 −1
0.5 0.5
−0.5 −0.5
0 0
0 0
1 −1 1 −1
x2 x2
x1 x1
Optimal cost function to the left and sub-optimal cost to the right.
Explicit constrained nonlinear MPC
18
Example, simulations
0 0.1 2.5
0
−0.1
−0.1 2
−0.2
−0.2
−0.3
−0.3 1.5
x1(t)
x2(t)
u(t)
−0.4 −0.4
−0.5 1
−0.5
−0.6
−0.6
−0.7 0.5
−0.7
−0.8
−0.8 −0.9 0
0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10
t t t
19
Properties of the algorithm
Theorem 3. Assume the partitioning rule in step 8 guarantees that the error
decreases by some minimum amount or factor at each split. The algorithm
terminates with an approximate solution function
that is feasible and satis-
fies
!
for all . ¾
20
Stability
The exact MPC will make the origin asymptotically stable (Chen and Allg öwer,
1998) . We show below that asymptotic stability is inherited by the approxi-
mate MPC under an assumption on the tolerance !:
A6. Assume the partition generated by Algorithm 1 has the property that
for any hypercube that does not contain the origin
! $
¼
where $ is given.
21
Non-convex problems
2. The computation of the error bound ! in step 7 must rely on global opti-
mization, or convex underestimation.
22
Key references
T. A. Johansen, Approximate Explicit Receding Horizon Control of Constrained Nonlinear
Systems, submitted for publication, 2002
H. Chen and F. Allgöwer, A quasi-infinite horizon nonlinear model predictive control scheme
with guaranteed stability, Automatica, Vol. 34, pp. 1205-1217, 1998
A. Bemporad and C. Filippi, Suboptimal explicit RHC via approximate quadratic programming,
J. Optimization Theory and Applications, Vol. 117, No. 1, 2003
23
Part II
24
Nonlinear Constrained Model Predictive Control
# #
% & # #
and the ordinary differential equation (ODE) given by
%
%
with given initial condition .
25
Multi-parametric Nonlinear Programming
( ' % & ( # #
subject to
This is an NLP in parameterized by , i.e. an mp-NLP. Solving the mp-
NLP amounts to determining an explicit representation of the solution function
.
Explicit constrained nonlinear MPC
26
Explicit solution approach
Main idea: Locally approximate the mp-NLP with a convex mp-QP. Iteratively
sub-partition the space until sufficient agreement between the mp-QP and
mp-NLP solutions is achieved.
27
Assumptions
28
Basic result (Fiacco, 1983)
The optimal solution depends in a continuous manner on : It may be
meaningful with a PWL approximation to !
29
Local mp-QP Approximation
Minimize
*
+ , -
subject to
. #
The cost and constraints are defined by the matrices
¼ ¾ ¼ ¼ ¼ ¾ ¼ ¼ ¼ ¼ ¼
¼ ¼
¼ ¼
¼ ¼
¼ ¼ ¼ ¼
¼
¼ ¼ ¼ ¼ ¼ ¼ ¼ ½¾ ¼ ¾ ¼ ¼ ¼
30
KKT conditions
Let the PWL solution to the mp-QP be denoted with associated La-
grange multipliers ) :
* , + )
diag ) . #
)
. #
Assumption A5. For an optimal active set , the matrix has full row
rank (LICQ) and / * / , where the columns of / is a basis for
null .
31
QP-solution for fixed active set
)
. #
Hence, and ) ) if , and
the solution is a continuous, PWL function of defined on a polyhedral
partition of .
32
Comparing mp-QP and mp-NLP solutions
) )
33
Approximation criteria
!
¼
Æ 2
¼
34
Optimal cost function bounds
35
Optimal cost function bounds
! !
where
!
¼
!
¼
36
Approximate mp-NLP algorithm
Step 1. Let .
37
Example: Compressor surge control
!
The following compressor and valve characteristics are used
! 3" *
4 4
$ sign
with $ , , * , 3" and 4 , (Gravdahl and
Egeland, 1997).
38
Example, cont’d
The control objective is to avoid surge, i.e. stabilize the system. This may be
formulated as
&
with 1 and the setpoint , corresponds to
an unstable equilibrium point.
Valve capacity requires the constraint to hold, and the pres-
sure constraint avoids operation too far left of the operating
point.
39
Partition of the state space
R2 R4
R7 R23
R19
R15 RR26
R25
R21
R2024
R17
R16
R9 R10
R3 R7R4 R3 R2 R87
R6 R11R4R1 R13 R1 R2
R6 R1 R1 R1 R85
0.7 R3
R5
R3
R8
R2
R6 R1
0.7 R99 R98 R100
R14R12 R5 R2 R86
R1 R19 R18 R18
R22 R12 R5
R6 R9 R15
R17
R13
R16
R14R11 R3 R2R6 R73 R66R64 R65R101 R97
R17
R11R7 R2 R8 R10
R14
R16
R15
R12
R9
R11 R4R7 R4 R9 R11 R7 R10 R6 R4 R93 R95 R45
R42
R4 R6 R6 R9 R1 R7 R3 R2 R94
R92 R91 R39 R67 R71 R96
R2 R1 R7 R6 R1 R1
0.6 R5R4
R2
R4 R3
R1 R4
R5
R3
R8R3 R3
R12
R8 R1 0.6 R49 R90 R88
R44
R41 R69
R72
R63
R5 R3
R8 R5 R10 R13
R2 R1 R10
R11 R5 R6R2 R5R10R2R5 R9
R4
R8 R5
R3 R89 R43 R68
R70
R17
R15
R13 R7 R12 R7 R6
R6 R9 R4 R2 R78R76
R9R6R10R2
R16
R14
R11
R12
R5
R11
R10
R9
R7 R5 R4 R5
R4
R3 R12
R15R7 R5
R15R81
R83R79
R80
R2 R4R5 R1 R10
R13
R16 R3
R82
R84
R2 R1 R48 R77 R74
0.5 R1 R3 R2 R3
R6 R1
R8
R11
R14R5
R3 R1 R1 0.5 R50 R13
R75
R1 R6
R8 R5
R9 R1
R4 R1 R5R4 R2
R1 R25
R8 R2 R6R4R2R3
R1 R5 R2
R3 R14
0.4 R4 R3 R2 R2 R3 R4 0.4 R24
2
R3 R8 R6 R7 R4
x2
R12
R11 R7 R5
R10
x
R10 R6 R9 R11
R8R5 R7
R5
R2 R5 R3R6 R3 R60
R58
R1 R1 R1 R2 R7 R7 R57 R46 R47 R38
R1
0.3 R3 R2
R5R8
R2R4R9
R16R10
R14
R15
R12
0.3 R36
R62
R59
R34 R51 R37
R13 R8 R6
R1 R4 R3 R2 R1 R2 R9 R5 R30 R17
R1 R2 R2 R4
R6 R1 R2 R4 R6 R2 R29 R16
R4 R3 R6 R3 R5
0.2 R3R7
R9 R4
R6
R3
R4
R7R5
R8
R11 R5
R6
R7
R10
R5 R7
R4
R4 R8
R10 R1 0.2 R31
R33
R35 R22
R21
R18
R8 R5 R1 R55
R5 R2 R3 R7
R1 R1 R54 R53 R19 R20
R2 R1R3R4
R8 R4 R3 R2 R56
R4R6 R6 R5 R3
0.1 R1
R2 R1 R3
R8
R9
R2R4R7
R6
R5 R12
R13 R9R5
R8R3
R11
0.1 R1
R23
R4
R3R12
R11
R8
R11 R5 R3 R10 R28 R10 R6
R6 R1
R14 R7
R10
R13 R4 R2 R4 R27 R2 R9
R17
R4 R6 R1
R15 R16 R7
R9
R12 R18
R2 R5 R2 R1 R7 R4 R26
0 R19 R3 0
0 0.2 0.4 0.6 0.8 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8
x x1
1
The PWL mapping with 379 regions can be represented as a binary search
tree with 329 nodes, of depth 9. Real-time evaluation of the controller there-
fore requires 49 arithmetic operations, in the worst case, and 1367 numbers
needs to be stored in real-time computer memory.
Explicit constrained nonlinear MPC
40
Optimal solution and cost
Approximate solution Exact solution
0.3 0.3
u (x1,x2)
0.2 0.2
u(x1,x2)
0.1
*
0.1
0 0
0.6 0.6
0.8 0.8
0.4 0.6 0.4 0.6
0.2 0.4 0.2 0.4
0.2 0.2
0 0 0 0
x x1 x2 x1
2
2.5 2.5
2 2
V (x1,x2)
V(x1,x2)
1.5 1.5
1 1
*
0.5 0.5
0 0
0.8
1
0.6 1
1 0.8
0.4
0.5 0.6
0.5 0.2 0.4
0.2
0 0
0 0
x2 x1 x2 x
1
41
Simulation with controller activated at
0.8 0.9 0.35
0.8 0.3
0.6 0.7
0.25
0.6
0.4 0.2
x (t)
0.5
x (t)
u(t)
0.15
1
0.4
0.2 0.1
0.3
0.05
0 0.2
0.1 0
−0.2 0 −0.05
0 10 20 30 40 50 60 0 10 20 30 40 50 60 0 10 20 30 40 50 60
t t
t
42
Key references
T. A. Johansen, On Multi-parametric Nonlinear Programming and Explicit Nonlinear Model
Predictive Control, IEEE Conf. Decision and Control, Las Vegas, NV, 2002
A. Bemporad and M. Morari and V. Dua and E. N. Pistikopoulos, The Explicit Linear Quadratic
Regulator for Constrained Systems, Automatica, Vol. 38, pp. 3-20, 2002
P. Tøndel, T. A. Johansen and A. Bemporad, Evaluation of Piecewise Affine Control via Binary
Search Tree, Automatica, accepted, May, 2003
A. Bemporad and C. Filippi, Suboptimal explicit RHC via approximate quadratic programming,
J. Optimization Theory and Applications, Vol. 117, No. 1, 2003
43
Part III – Discussion and summary
Solvers efficient for constrained MPC problems with a few states and in-
puts and reasonable horizons
44
Discussion and summary, cont’d
45
Advantages and disadvantages
46
Applications
47