Professional Documents
Culture Documents
!
1.2822
0
0.98
0
0.3
0
0
1
0
! x =
x + 0 u
5.4293
17
0
1.8366 0
!
128.2 128.2
0
0
0
!
0 1 0 0
y
=
x
!
0 0 0 1
!
Angle of attack!
V!
horizon!
Pitch angle!
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
2!
T
T
J (x) = min
xiT Qxi + uiT Rui
J (x) = min
xi Qxi + ui Rui
x,u
x,u
!
i=0
i=0
!
!
!
!
!
!
Z[ xi+1
x0
= Axi + Bui
=x
Z[ xi+1
x0
= Axi + Bui
=x
Cxi + Dui b
(ZZ\TL! Q = QT 0, R = RT 0
3!
N1
Resulting MPC problem:!
J (x) = min
Qxi p + Rui p
!
x,u
i=0
!
Z[ xi+1
= Axi + Bui
!
Cxi + Dui b
!
x0
=x
!
!
Optimization problem can be translated into a linear program (LP) for p =1/!.
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
4!
100
100
200
0
1
2
2
10
Time (sec)
0.5
Altitude x4 (m)
Problem parameters: !
Sampling time Ts=0.25sec,!
Q=I, R=10
! Closed-loop system is
unstable!
! Applying LQR control
and saturating the
controller can lead to
instability!
Input is saturated!
0.5
0
10
Time (sec)
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
5!
40
20
0.5
20
40
0
0.5
2
1
10
10
Time (sec)
0.5
0.5
0
Problem parameters: !
Sampling time Ts=0.25sec,!
Q=I, R=10, N=10
Pitch angle x2 (rad)
Altitude x4 (m)
Time (sec)
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
6!
20
0.2
10
0
10
0
0.2
0.4
10
10
Time (sec)
Altitude x4 (m)
0.2
0.1
Problem parameters: !
Sampling time Ts=0.25sec,!
Q=I, R=10, N=10
0
0.1
0.2
0
4
Time (sec)
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
7!
Altitude x4 (m)
150
0.5
100
50
0.5
0
50
0
1
10
10
Time (sec)
0.5
0.5
0
Problem parameters: !
Sampling time Ts=0.25sec,!
Q=I, R=10, N=10
Increase step:!
At time t = 0 the plane is
flying with a deviation of
100m of the desired
altitude, !
i.e. x (0)=[0; 0; 0; 100]!
!
! Pitch angle too large !
during transient!
!
Time (sec)
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
8!
Altitude x4 (m)
150
100
50
0.2
0
0
50
0
0.4
0.2
2
0.4
10
10
Problem parameters: !
Sampling time Ts=0.25sec,!
Q=I, R=10, N=10
|x2| "0.349
Time (sec)
0.5
0.5
0
4
Time (sec)
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
9!
Altitude x4 (m)
20
0.5
20
0
Problem parameters: !
Sampling time Ts=0.25sec,!
Q=I, R=10, N=4
0.5
10
Time (sec)
0.5
0.5
0
10
Time (sec)
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
10!
Outline!
Motivating Example: Cessna Citation Aircraft!
!
Constraint satisfaction and stability in MPC!
Main idea !
Problem setup for the linear quadratic case!
!
How to prove constraint satisfaction and stability in MPC!
!
Implementation !
!
Theory extensions !
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
11!
min
x,u
Z[
N1
i=0
xi+1
= Axi + Bui
x0
=x
Cxi + Dui b
!
!
Definition: Feasible set!
! ;OL MLHZPISL ZL[ X PZ KLULK HZ [OL ZL[ VM PUP[PHS Z[H[LZ x MVY ^OPJO [OL 47*
N
! WYVISLT^P[OOVYPaVU N PZMLHZPISL PL
! X := {x | [u , . . . , u ] Z\JO[OH[ Cu + Dx b, i = 1, . . . , N}
N
0
N1
i
i
!
!
!
!
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
12!
1 1
0
=
x+
u
0 1
1
!
1 0
, !R = 10 !. !
We choose N =! 3, Q = !
4
0 1
3.5
!
Time step 1: x (0)=[-4 ; 4] , u0*(x)=-0.5
Time step 3: x (2)=[ 3 ; 2] MPC problem !
!
!
!
!
infeasible!
3
2.5
x2
Set of initial
feasible states!
(feasible set)!
x(0)
x(1)
x(3)
1.5
1
0.5
0
5
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
0
x1
13!
2 1
1
=
x+
u
0 0.5
0
!
10
10
1 0
We choose Q =!
! !
0 1
!
and investigate the stability properties for different horizons N and weights R by
solving the finite horizon MPC problem in a receding horizon fashion !
!
!
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
14!
R=10, N=2
R=2, N=3
R=1 , N=4
x2
0
x1
10
0
x1
10
10
5
x2
x2
10
10
10
0
5
5
10
10
10
0
x1
10
10
10
15!
!
J (x) = min
xiT Qxi + uiT Rui + xNT P xN Terminal cost!
x,u
!
i=0
!
Z[ xi+1
= Axi + Bui
!
Cxi + Dui b
!
xN
Xf Terminal constraint!
!
Xf !
x0
=x
!
t!
xN
!
x0=x
! How to choose P and Xf ?
!
!
!"#$%!#&'('$)#*$+(
!
+!,$*!#$*-
16!
Closed-loop
trajectories!
Open-loop
predictions!
5
5
x2
!
!
!
!
x2
0
x1
Set of feasible
initial states for
open-loop
Set of initial
prediction!
states leading to
feasible closedloop trajectories!
5
5
0
x1
Ideally we would solve the MPC problem with an infinite horizon, but that is
computationally intractable!
!
! Design finite horizon problem such that it approximates the infinite horizon !
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
17!
Z[
!
!
N1
i=0
xi+1
= Axi + Bui
Cxi + Dui b
x0
=x
+ min
x,u
i=N
Z[
+ xNT P xN
!
!
xi+1
= Axi + Bui ,
Unconstrained LQR !
!starting from state xN
Bound the tail of the infinite horizon cost from N to ! using the !
LQR control law u=KLQR x
xNT P xN is the corresponding infinite horizon cost!
P is the solution of the discrete-time algebraic Riccati equation!
!
18!
Z[
N1
i=0
xi+1
= Axi + Bui
Cxi + Dui b
xN
Xf
Xf !
t!
x0=x
xN
!
x0
=x
!
All input and state constraints are satisfied for the closed-loop system using
the LQR control law for! x Xf
Terminal set is often defined by linear or quadratic constraints!
!
! The bound holds in the terminal set and is used as a terminal cost!
! The terminal set defines the terminal constraint!
!
In the following: Show that this problem setup provides feasibility and stability!
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
19!
Outline!
Motivating Example: Cessna Citation Aircraft!
!
Constraint satisfaction and stability in MPC!
Main idea !
Problem setup for the linear quadratic case!
!
How to prove constraint satisfaction and stability in MPC!
!
Implementation !
!
Theory extensions !
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
20!
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
x(0)
21!
Infeasible after
two steps!
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
Invariant!
! Recursively!
feasible!
!
22!
simplicity it is assumed that V(x) is continuous. This assumption can be relaxed by requiring an additional !
state dependent upper bound on V (x), see e.g. [Rawlings & Mayne, 2009] !
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
23!
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
24!
! Recursive feasibility!
x1
x2
x0 = x
x5 = 0
x3
x4
!
!
!!
!
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
25!
! Recursive feasibility!
x1 = x +
x2
x0 = x
x5 = 0
x3
x4
!
!
!!
!
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
26!
! Recursive feasibility!
!
!
x2
x0 = x
x5 = 0
x3
x4
x1 = x +
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
27!
Goal: " Use convex set for Xf that contains the origin in its interior!
!
Example:!
3
x2
!
!
Feasible
set for xN & Xf !
!!
!
Feasible set for xN= 0 !
!
Xf!
3
6
0
x1
Double Integrator: !
1
1
0
x+ =
x+
u
0 1
1
5
5
x
0.5 u 0.5
5
5
1 0
N = 5, Q =
, R = 10
0 1
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
28!
The stage cost is a positive definite function, i.e. it is strictly positive and
only zero at the origin!
!
The terminal set is invariant under the local control law 'f (x):
x + = Ax + Bf (x) Xf MVYHSS x Xf
!
!
29!
x1
Xf
x5
x2
x3
x4
x0 = x
!!
! :!
!
!
30!
x1 = x +
x5
x2
x3
x4
x0 = x
x6 Xf
!!
! :!
!
!
31!
!
!
x0 = x
x6 Xf
x5
x2
x3
x4
!
!
x1 = x +
!!
:!
We obtain for the optimal solution! J (x) !J(x)
+ ) J (x) l(x, u0 ) 0
J (x + ) J (x) J(x
32!
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
33!
3`HW\UV]Z[HISL
x(0)
! The closed-loop system under the MPC control law is asymptotically stable.!
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
34!
Z[
N1
i=0
xi+1
= f (xi , ui )
Cxi + Dui
xN
x0
l(xi , ui ) + Vf (xN )
Xf ,
=x ,
Presented assumptions on the terminal set and cost did not rely on linearity!
Lyapunov stability is a general framework to analyze stability of nonlinear
dynamic systems!
!
35!
Outline!
Motivating Example: Cessna Citation Aircraft!
!
Constraint satisfaction and stability in MPC!
Main idea !
Problem setup for the linear quadratic case!
!
How to prove constraint satisfaction and stability in MPC!
!
Implementation !
!
Theory extensions !
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
36!
Multi-Parametric Toolbox!
Modeling!
Optimal control!
Analysis!
Computational !
geometry!
37!
Matlab!
Double Integrator: !
1
1
0
x+ =
x+
u
0 1
1
5
5
x
0.5 u 0.5
5
5
1 0
N = 5, Q =
, R = 10
0 1
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
hi
Xf
38!
P = P & inv(A+BK)*P;
if Pprev == P, break; end
end
!
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
Iteration 1!
Iteration 3!
Iteration 2!
39!
P = P & inv(A+BK)*P;
if Pprev == P, break; end
end
!
Iteration 1!
Iteration 3!
Iteration 2!
Simpler procedure
M X = mpt_infset(A+BK, X&U, 100);
P
T!
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
40!
Altitude x4 (m)
20
0.5
20
0
0.5
10
10
Problem parameters: !
Sampling time Ts=0.25sec,!
Q=I, R=10, N=4
Time (sec)
0.5
0.5
0
4
Time (sec)
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
41!
20
0.2
10
0
10
0
Altitude x4 (m)
0.2
0.4
10
10
Problem parameters: !
Sampling time Ts=0.25sec,!
Q=I, R=10, N=4
! Inclusion of terminal
cost and constraint
provides stability
Time (sec)
0.2
0.1
0
0.1
0.2
0
4
Time (sec)
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
42!
Outline!
Motivating Example: Cessna Citation Aircraft!
!
Constraint satisfaction and stability in MPC!
Main idea !
Problem setup for the linear quadratic case!
!
How to prove constraint satisfaction and stability in MPC!
!
Implementation !
!
Theory extensions !
Reference Tracking
!!
Uncertain Systems!
Soft constrained MPC!
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
43!
Extensions "
Reference Tracking!
!
Note: Many
solutions possible!
For a solution to exist the matrix must be full column rank and the steadystate must be feasible, i.e.! xss X, uss U
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
44!
Altitude x4 (m)
0.5
200
200
0
10
Time (sec)
15
0.5
20
10
Time (sec)
15
20
Problem parameters: !
Sampling time Ts=0.25sec,!
Q=I, R=10, N=10
0.2
0
0.2
0
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
45!
Extensions "
Reference Tracking!
MPC problem for reference tracking:!
Penalize the deviation from the desired steady-state !
!
N1
(xi xss )T Q(xi xss ) + (ui uss )T R(ui uss ) + (xN xss )T P (xN xss )
! J (x) = min
x,u
i=0
!
Z[ xi+1
= Axi + Bui
Here: Reference assumed constant
!
over horizon. !
Cxi + Dui
b
If reference trajectory is known this can
!
x0
=x
be included ! Preview !
!
!
Steady-state is computed at each time step!
Same problem structure as the standard MPC problem with additional
parameter r
!
Steady-state offset: If the model is not accurate the output will show an offset
from the desired reference!
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
46!
Extensions "
Offset-free reference tracking!
Goal: Zero steady-state tracking error, i.e. y (k) r (k) 0 MVY k
!
! We can correct for the disturbance by choosing xss, uss such that!
"
!
"! " !
I A B xss
Bw w
=
r Cw w
C
0
uss
!
47!
Extensions"
Uncertain systems !
In practice, the nominal system model will not be accurate due to model
mismatch or external disturbances that are acting on the system.!
!
Stability:!
In the presence of uncertainties, asymptotic stability of the origin can often
not be achieved. Instead, it can be shown that the trajectories converge to a
neighborhood of the origin.!
Stability can be analyzed in the framework of input-to-state stability.!
Idea: Effect of the uncertainty on the system is bounded and depends on
the size of the uncertainty.
!
Feasibility?!
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
48!
Extensions"
Approaches for uncertain systems !
x
terminal
t!
set!
x+=Ax+Bu+Bww
Trajectories differ from what is expected using the
nominal system model!
! Uncertainties can lead to infeasibility of the
MPC problem!
Robust MPC:!
Idea: Design MPC problem for the worst-case disturbance by constraint
! tightening !
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
49!
Extensions"
Soft constrained MPC!
Idea: Input constraints are hard (e.g. actuator limitations),!
state constraints may (temporarily) be violated!
!
Z[
xi+1
N1
Cxi + Dui b + i
GN xN
x0
fN + N
Slack variables!
=x
Standard soft constrained MPC setup does not provide stability guarantees!
!
! New soft constrained MPC setup with (robust) stability properties developed !
in [Zeilinger et al., CDC 2010]!
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
50!
Further extensions!
Reference tracking with recursive feasibility guarantees!
[Gilbert et al., 1994; Bemporad 1998; Gilbert & Kolmanovsky 1999, 2002; Limon et al., 2008;
Borrelli et al., 2009; Ferramosca et al., 2009; ]!
!"#$%!#&'('$)#*$+(
+!,$*!#$*-
51!