Professional Documents
Culture Documents
Model Predictive Control With Constraints: Example 5.1
Model Predictive Control With Constraints: Example 5.1
Model Predictive Control With Constraints: Example 5.1
Example 5.1
– As we expect, both have modulus 1:0 and lie on the unit circle
C ASE ( I ) N O C ONSTRAINT.
! The basic idea here is to take the control increment 4u.k/ obtained
for the unconstrained problem and modify it when a constraint
becomes active
! This involves formulating an optimization problem directly in the
presence of constraints
! Three of the most common types of contraints are placed on:
– control variable increment
c 2010-2015, M. Scott Trimboli
Lecture notes prepared by M. Scott Trimboli. Copyright #
ECE5590, Model Predictive Control with Constraints 5–5
– control variable amplitude
– output variable
Numerical Solutions
! Here, J.x/ is the objective function and the minimizing point denoted
by x ? is found among all x vectors in Rn
! We must first make some assumptions on the existence and
uniqueness of x ?
! Sufficient conditions for a strict and isolated minimizer x ?are that the
above hold and that G.x ?/ is positive definite.
Minimize
J D .x1 " 2/2 C .x2 " 2/2
subject to
x1 C x2 D 1
! The solution is found by taking the first partial derivatives with respect
to the vectors x and " and then equating the derivatives to zero:
@J
D Ex C F C M T " D 0
@x
@J
D Mx " ! D 0
@"
! From these expressions we can build the Lagrangian matrix and write
the corresponding linear expression
" #" # " #
T
E M x "F
D
M 0 " !
! If the inverse exists and is expressed as
" #"1 " #
T
E M H T
D
M 0 T U
then the solution can be written
x ? D "HF C T "
"? D "T T F " U "
! Note that
x ? D "E "1F " E "1M T "? D x o " E "1M T "?
where the first term x o gives the optimal solution in the absence of
constraints, and the second term is a correction factor due to the
equality constraint.
x3
2 3 2 3
2 1 3 " #
6 7 6 7 1:6452
D 4 3 5 " 4 1 "2 5
"0:0323
1 1 "3
2 3
0:4516
6 7
D 4 1:2903 5
"0:7419
! For the constrained optimizing solution,
J ? D .x ?/t Ex ? C .x ?/t F D "1:6130
indicating the cost function cannot achieve the same value as the
unconstrained optimum.
! Alternatively, building the Lagrangian matrix,
2 3
1 0 0 1 3
" # 6 60 1 0 1
7
"2 7
E MT 6 7
LD D6 60 0 1 1 "3 7
7
M 0 6 7
41 1 1 0 0 5
3 "2 "3 0 0
) So, for the set of active constraints, the problem looks exactly like
the equality constraint optimization!
! It is clear that the set of variables that satisfy the first inequality will
also satisfy the second
x1 C x2 C x3 D 1
3x1 " 2x2 " 3x3 D 1
x1 " 3x2 C 2x3 D 1
! The three equality constraints are taken as the first working set
! Calculating the Lagrange multipliers we get
2 3
1:6873
6 7
" D ".ME "1M T /"1.! C ME "1F / D 4 0:0309 5
"0:4352
! Since the third element is negative, the third constraint is inactive and
is dropped from the constrained equation set
! Thus the problem becomes:
1
J D x t Ex C x t F
2
Primal-Dual Methods
! A dual method can be used to identify the constraints that are not
active in the optimization problem so that they can be systematically
eliminated in the solution
! Assuming feasibility (i.e., there exists an x such that M x < !), the
primal problem is equivalent to
! "
1 t
max min x Ex C x t F C "t .M x " !/
!%0 x 2
! The minimum over x is unconstrained and attained by
x D "E "1.F C M T "/
! Substituting this into the above expression gives the dual problem
# $
1 t 1
max " " P " " "t K " F T E "1F
"%0 2 2
where
P D ME "1M T
K D ! C ME "1F
where,
1 X
i "1 Xn
wimC1 D " Œki C pij !mC1
j C pij !m
j#
pi i j D1 j Di C1
K D ! C ME "1F
2 3 2 3
0 "1 0 " #"1 " #
6 7 6 7 2 "1 "1
D 4 0 5 C 4 0 "1 5
"1 1 0
4 3 2
2 3
1
6 7
D4 1 5
"1
! Iteration:
k=0
!01 D !02 D !03 D 0
k=1
w11 C 1 D 0
!11 C 2w21 C 1 D 0
"5!11 " 7!12 C 29w31 " 1 D 0
Example 5.7
– Continuous-time state-space:
" # " #
"0:1 "3 1
Ac D Bc D
1 0 0
h i h i
Cc D 0 10 Dc D 0
– Discrete-time state-space:
" # " #
:9752 ":2970 :0990
Ad D Bd D
:0990 :9851 :005
h i h i
Cd D 0 10 Dd D 0
where,
2 3 2 3
:1760 :1553 :1361 :1972 ":1758 1:4187
6 7 6 7
ˆT ˆ D 4 :1553 :1373 :1204 5 I ˆT F D 4 :1740 ":1552 1:2220 5
:1361 :1204 :1057 :1522 ":1359 1:0443
and 2 3
1:4187
6 7
Rs D 4 1:2220 5 & r.ki /
1:0443
n o
! Select observer poles at 0 0 0
! Computing the closed-loop compensated eigenvalues for a range of
control weighting values .rw / results in the following values for
Kmpc .rw /:
h i
Kmpc .:01/ D 13:1552 84:1009 3:7417
h i
Kmpc .:1/ D 11:3704 58:4467 1:1666
h i
Kmpc .1:0/ D 9:5534 43:5058 0:6567
n o
!.:01/ D :3357 C j 0:4 :3357 " j 0:4 0:3824
n o
!.:1/ D :3654 C j 0:2650 :3654 " j 0:2650 0:7552
n o
!.1:0/ D :4697 C j 0:3063 :4697 " j 0:3063 0:8262
n o
!.10/ D :7710 C j 0:2439 :7710 " j 0:2439 :7819
n o
!.100/ D :9240 C j 0:1610 :9249 " j 0:1610 :7283
where
Y D F x.ki / C ˆ4U
! Using this expression with the assumption that the initial state
x.0/ D 0, we obtain
h it
4U D 3:7417 "6:2794 2:7112
! Using the first component, 4u.1/ D 3:000 and y.1/ D 0; the new
estimated state variable is
2 3
:2791
6 7
x.2/ D 4 :0149 5
:1491
! Computing the next incremental input sequence gives
h i
!
4U D "1:9777 "4:1326 3:3456
and 2 3
":0261
6 7
x.4/ D 4 :0422 5
:9372
! And again
h i
'
4U D " "2:9689 2:2251 1:0865
h i
'
4Uc D "1:5 ":8547 2:7239