Sei sulla pagina 1di 19

Model Predictive Control

Reachability and Invariance

F. Borrelli∗ , M. Morari, C. Jones†


UC Berkeley

Institut für Automatik


ETH Zürich

EPFL

Fall Semester 2014 (revised September 2014)

Table of Contents

1. Polyhedra and Polytopes


1.1 General Set Definitions and Operations
1.2 Basic Operations on Polytopes

2. Reachable Sets
2.1 Pre and Reach Sets Definition
2.2 Pre and Reach Sets Computation
2.3 Controllable Sets
2.4 N -Step Reachable Sets

3. Invariant Sets
3.1 Invariant Sets
3.2 Control Invariant Sets

Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014) i
1 1. Polyhedra and Polytopes

Outline

1. Polyhedra and Polytopes


1.1 General Set Definitions and Operations
1.2 Basic Operations on Polytopes

2. Reachable Sets

3. Invariant Sets

Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014) ii

1 1. Polyhedra and Polytopes 1.1 General Set Definitions and Operations

Table of Contents

1. Polyhedra and Polytopes


1.1 General Set Definitions and Operations
1.2 Basic Operations on Polytopes

Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014)
1 1. Polyhedra and Polytopes 1.1 General Set Definitions and Operations

Definitions (Polyhedra and polytopes)


A polyhedron is the intersection of a finite number of closed halfspaces:

Z = {z | a1> z ≤ b1 , a2> z ≤ b2 , . . . , am
>
z ≤ bm }
= {z | Az ≤ b}

where A := [a1 , a2 , . . . , am ]> and b := [b1 , b2 , . . . , bm ]> .

A polytope is a bounded polyhedron.


Polyhedra and polytopes are always convex.
z2 z2

z1 z1

An (unbounded) polyhedron A polytope


Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014) 1-3

1 1. Polyhedra and Polytopes 1.1 General Set Definitions and Operations

General Set Definitions and Operations

An n-dimensional ball pB(x0 , ρ) is the set


n
B(x0 , ρ) = {x ∈ R | kx − x0 k2 ≤ ρ}. x0 and ρ are the center and the
radius of the ball, respectively.
The convex combination of Pkx1 , . . . , xk is defined as the point
λ1 x1 + . . . + λk xk where i=1 λi = 1 and λi ≥ 0, i = 1, . . . , k.
The convex hull of a set K ⊆ Rn is the set of all convex combinations of
points in K and it is denoted as conv(K ):

conv(K ) ,{λ1 x1 + . . . + λk xk | xi ∈ K , λi ≥ 0, i = 1, . . . , k,
k
X
λi = 1}.
i=1

Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014) 1-4
1 1. Polyhedra and Polytopes 1.1 General Set Definitions and Operations

Polyhedra Representations
An H-polyhedron P in Rn denotes an intersection of a finite set of closed
halfspaces in Rn :
P = {x ∈ Rn : Ax ≤ b}
In Matlab: P = Polytope(A,b)
A two-dimensional H-polyhedron
a1x ·b1

a2x ·b2
a4x ·b4

a3x ·b3

a5x ·b5

Inequalities which can be removed without changing the polyhedron are called
redundant. The representation of an H-polyhedron is minimal if it does not
contain redundant inequalities.
Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014) 1-5

1 1. Polyhedra and Polytopes 1.1 General Set Definitions and Operations

Polyhedra Representations

A V-polytope P in Rn is defined as

P = conv(V )

for some V = [V1 , . . . , Vk ] ∈ Rn×k .


Any H-polytope is a V-polytope and viceversa.
A polytope P ⊂ Rn , is full-dimensional if it is possible to fit a non-empty
n-dimensional ball in P
If kAi k2 = 1, where Ai denotes the i-th row of a matrix A, we say that the
polytope P is normalized.

Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014) 1-6
1 1. Polyhedra and Polytopes 1.1 General Set Definitions and Operations

Polyhedra Representations

The faces of dimension 0 and 1 are called vertices and edges, respectively.

10 10

8 8

6 6

4 4

2 2
x2

x2
0 0

−2 −2

−4 −4

−6 −6

−8 −8

−10 −10
−10 −8 −6 −4 −2 0 2 4 6 8 10 −10 −8 −6 −4 −2 0 2 4 6 8 10
x1 x1

(a) V-representation. (b) H-representation.

Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014) 1-7

1 1. Polyhedra and Polytopes 1.1 General Set Definitions and Operations

Polytopal Complexes

A set C ⊆ Rn is called a P-collection (in Rn ) if it is a collection of a finite number


of n-dimensional polytopes, i.e.

C = {Ci }N
i=1 ,
C

where Ci := {x ∈ Rn : Cix x ≤ Cic }, dim(Ci ) = n, i = 1, . . . , NC , with NC < ∞.

In Matlab: Q = [P1, P2, P3], R = [P4, Q, [P5, P6], P7]

Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014) 1-8
1 1. Polyhedra and Polytopes 1.1 General Set Definitions and Operations

Functions on Polytopal Complexes

A function h(θ) : Θ → Rk , where Θ ⊆ Rs , is piecewise affine (PWA) if there


exists a strict partition R1 ,. . . ,RN of Θ and h(θ) = H i θ + k i , ∀θ ∈ Ri ,
i = 1, . . . , N .
A function h(θ) : Θ → Rk , where Θ ⊆ Rs , is piecewise affine on polyhedra
(PPWA) if there exists a strict polyhedral partition R1 ,. . . ,RN of Θ and
h(θ) = H i θ + k i , ∀θ ∈ Ri , i = 1, . . . , N .
A function h(θ) : Θ → R, where Θ ⊆ Rs , is piecewise quadratic (PWQ) if
there exists a strict partition R1 ,. . . ,RN of Θ and h(θ) = θ0 H i θ + k i θ + l i ,
∀θ ∈ Ri , i = 1, . . . , N .
A function h(θ) : Θ → R, where Θ ⊆ Rs , is piecewise quadratic on polyhedra
(PPWQ) if there exists a strict polyhedral partition R1 ,. . . ,RN of Θ and
h(θ) = θ0 H i θ + k i θ + l i , ∀θ ∈ Ri , i = 1, . . . , N .

Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014) 1-9

1 1. Polyhedra and Polytopes 1.2 Basic Operations on Polytopes

Table of Contents

1. Polyhedra and Polytopes


1.1 General Set Definitions and Operations
1.2 Basic Operations on Polytopes

Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014)
1 1. Polyhedra and Polytopes 1.2 Basic Operations on Polytopes

Basic Operations on Polytopes

Convex Hull of a set of points V = {Vi }N n


i=1 , with Vi ∈ R ,
V

NV
X NV
X
n
conv(V ) = {x ∈ R :x= αi Vi , 0 ≤ αi ≤ 1, αi = 1}. (1)
i=1 i=1

In Matlab: P=hull(V ), V matrix containing vertices of the polytope P


Vertex Enumeration of a polytope P given in H-representation. (dual of the
convex hull operation)
In Matlab: V=extreme(P)
Used to switch from a V-representation of a polytope to an H-representation.

Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014) 1-10

1 1. Polyhedra and Polytopes 1.2 Basic Operations on Polytopes

Basic Operations on Polytopes


Polytope reduction is the computation of the minimal representation of a
polytope. A polytope P ⊂ Rn , P = {x ∈ Rn : Ax ≤ b} is in a minimal
representation if the removal of any row in Ax ≤ b would change it (i.e., if
there are no redundant constraints).

In Matlab: P = Polytope(A,b,normal,minrep), minrep=1


The Chebychev Ball of a polytope P corresponds to the largest radius ball
B(xc , R) with center xc , such that B(xc , R) ⊂ P.

In Matlab: P.xCheb, P.rCheb


10

2
x2

−2

−4

−6

−8

−10
−10 −8 −6 −4 −2 0 2 4 6 8 10
x1

Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014) 1-11
1 1. Polyhedra and Polytopes 1.2 Basic Operations on Polytopes

Basic Operations on Polytopes


Projection Given a polytope
P = {[x 0 y 0 ]0 ∈ Rn+m : Ax x + Ay y ≤ b} ⊂ Rn+m the projection onto the
x-space Rn is defined as

projx (P) := {x ∈ Rn | ∃y ∈ Rm : Ax x + Ay y ≤ b}.

In Matlab: Q = projection(P,dim)

Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014) 1-12

1 1. Polyhedra and Polytopes 1.2 Basic Operations on Polytopes

Affine Mappings and Polyhedra

Consider a polyhedron P = {x ∈ Rn | Hx ≤ k}, with H ∈ RnP ×n and an


affine mapping f (z)

f : z ∈ Rn 7→ Az + b, A ∈ Rn×n , b ∈ Rn

Define the composition of P and f as the following polyhedron

P ◦ f , {z ∈ Rn | Hf (z) ≤ k} = {z ∈ Rm | HAz ≤ k − Hb}

Useful for backward-reachability

Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014) 1-13
1 1. Polyhedra and Polytopes 1.2 Basic Operations on Polytopes

Affine Mappings and Polyhedra


Consider a polyhedron P = {x ∈ Rn | Hx ≤ k}, with H ∈ RnP ×n and an
affine mapping f (z)

f : z ∈ Rn 7→ Az + b, A ∈ Rn×n , b ∈ Rn

Define the composition of f and P as the following polyhedron

f ◦ P , {y ∈ Rn | y = Ax + b ∀x ∈ Rn , Hx ≤ k}

The polyhedron f ◦ P in can be computed as follows. Write P in


V-representation P = conv(V ) and map the vertices V = {V1 , . . . , Vk }
through the transformation f . Because the transformation is affine, the set
f ◦ P is the convex hull of the transformed vertices

f ◦ P = conv(F ), F = {AV1 + b, . . . , AVk + b}.

Useful for forward-reachability

Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014) 1-14

2 2. Reachable Sets

Outline

1. Polyhedra and Polytopes

2. Reachable Sets
2.1 Pre and Reach Sets Definition
2.2 Pre and Reach Sets Computation
2.3 Controllable Sets
2.4 N -Step Reachable Sets

3. Invariant Sets

Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014) 2-15
2 2. Reachable Sets 2.1 Pre and Reach Sets Definition

Table of Contents

2. Reachable Sets
2.1 Pre and Reach Sets Definition
2.2 Pre and Reach Sets Computation
2.3 Controllable Sets
2.4 N -Step Reachable Sets

Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014)

2 2. Reachable Sets 2.1 Pre and Reach Sets Definition

Set Definition

We consider the following two types of systems autonomous systems:

x(t + 1) = fa (x(t)), (2)

and systems subject to external inputs:

x(t + 1) = f (x(t), u(t)). (3)

Both systems are subject to state and input constraints

x(t) ∈ X , u(t) ∈ U, ∀ t ≥ 0.

The sets X and U are polyhedra and contain the origin in their interior.

Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014) 2-16
2 2. Reachable Sets 2.1 Pre and Reach Sets Definition

Reach Set Definition

For the autonomous system (2) we denote the one-step reachable set as

Reach(S) , {x ∈ Rn : ∃ x(0) ∈ S s.t. x = fa (x(0))}

For the system (3) with inputs we denote the one-step reachable set as

Reach(S) , {x ∈ Rn : ∃ x(0) ∈ S, ∃ u(0) ∈ U s.t. x = f (x(0), u(0))}

Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014) 2-17

2 2. Reachable Sets 2.1 Pre and Reach Sets Definition

Pre Set Definition

“Pre” sets are the dual of one-step reachable sets. The set

Pre(S) , {x ∈ Rn : fa (x) ∈ S}

defines the set of states which evolve into the target set S in one time step for the
system (2).

Similarly, for the system (3) the set of states which can be driven into the target
set S in one time step is defined as

Pre(S) , {x ∈ Rn : ∃u ∈ U s.t. f (x, u) ∈ S}

Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014) 2-18
2 2. Reachable Sets 2.2 Pre and Reach Sets Computation

Table of Contents

2. Reachable Sets
2.1 Pre and Reach Sets Definition
2.2 Pre and Reach Sets Computation
2.3 Controllable Sets
2.4 N -Step Reachable Sets

Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014)

2 2. Reachable Sets 2.2 Pre and Reach Sets Computation

Pre Set Computation - Autonomous Systems

Assume the system is linear and autonomous

x(t + 1) = Ax(t)

Let
S = {x : Hx ≤ h}, (4)
Then the set Pre(S) is
Pre(S) = {x : HAx ≤ h}
Note that by using polyhedral notation, the set Pre(S) is simply S ◦ A.

Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014) 2-19
2 2. Reachable Sets 2.2 Pre and Reach Sets Computation

Reach Set Computation - Autonomous Systems

The set Reach(S) is obtained by applying the map A to the set S.


Write S in V-representation
S = conv(V ) (5)
and map the set of vertices V through the transformation A.
Because the transformation is linear, the reach set is simply the convex hull of the
transformed vertices
Reach(S) = A ◦ S = conv(AV ) (6)

Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014) 2-20

2 2. Reachable Sets 2.2 Pre and Reach Sets Computation

Pre Set Computation - System with Inputs

Consider the system


x(t + 1) = Ax(t) + Bu(t)
Let
S = {x | Hx ≤ h}, U = {u | Hu u ≤ hu }, (7)
The Pre set is
      
n HA HB x h
Pre(S) = x ∈ R | ∃u ∈ R s.t. ≤
0 Hu u hu

which is the projection onto the x-space (with dimension Rn ) of the polyhedron
    
HA HB x h
T := { ≤ }.
0 Hu u hu

In Matlab: Q = projection(T ,n)

Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014) 2-21
2 2. Reachable Sets 2.3 Controllable Sets

Table of Contents

2. Reachable Sets
2.1 Pre and Reach Sets Definition
2.2 Pre and Reach Sets Computation
2.3 Controllable Sets
2.4 N -Step Reachable Sets

Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014)

2 2. Reachable Sets 2.3 Controllable Sets

Contorllable Sets
Definition (N -Step Controllable Set KN (O))
For a given target set O ⊆ X , the N -step controllable set KN (O) is defined as:

KN (O) , Pre(KN −1 (O)) ∩ X , K0 (O) = O, N ∈ N+ .

All states x0 ∈ KN (O) can be driven,through a time-varying control law, to the


target set O in N steps, while satisfying input and state constraints.

Definition (Maximal Controllable Set K∞ (O))


For a given target set O ⊆ X , the maximal controllable set K∞ (O) for the
system x(t + 1) = f (x(t), u(t)) subject to the constraints x(t) ∈ X , u(t) ∈ U is
the union of all N -step controllable sets contained in X (N ∈ N).

Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014) 2-22
2 2. Reachable Sets 2.4 N -Step Reachable Sets

Table of Contents

2. Reachable Sets
2.1 Pre and Reach Sets Definition
2.2 Pre and Reach Sets Computation
2.3 Controllable Sets
2.4 N -Step Reachable Sets

Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014)

2 2. Reachable Sets 2.4 N -Step Reachable Sets

N -Step Reachable Sets

Definition (N -Step Reachable Set RN (X0 ))


For a given initial set X0 ⊆ X , the N -step reachable set RN (X0 ) is

Ri+1 (X0 ) , Reach(Ri (X0 )), R0 (X0 ) = X0 , i = 0, . . . , N − 1

All states x0 ∈ X0 can will evolve to the N -step reachable set RN (X0 ) in N steps

Same definition of Maximal Reachable Set R∞ (X0 ) can be introduced.

Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014) 2-23
3 3. Invariant Sets

Outline

1. Polyhedra and Polytopes

2. Reachable Sets

3. Invariant Sets
3.1 Invariant Sets
3.2 Control Invariant Sets

Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014) 3-24

3 3. Invariant Sets 3.1 Invariant Sets

Table of Contents

3. Invariant Sets
3.1 Invariant Sets
3.2 Control Invariant Sets

Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014)
3 3. Invariant Sets 3.1 Invariant Sets

Invariant Sets

Invariant sets
are computed for autonomous systems
for a given feedback controller u = g(x), provide the set of initial states
whose trajectory will never violate the system constraints.

Definition (Positive Invariant Set)


A set O ⊆ X is said to be a positive invariant set for the autonomous
system x(t + 1) = fa (x(t)) subject to the constraints x(t) ∈ X , if

x(0) ∈ O ⇒ x(t) ∈ O, ∀t ∈ N+

Definition (Maximal Positive Invariant Set O∞ )


The set O∞ is the maximal invariant set if O∞ is invariant and O∞ contains all
the invariant sets contained in X .
Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014) 3-25

3 3. Invariant Sets 3.1 Invariant Sets

Invariant Sets

Algorithm
Input: fa , X
Output: O∞
1 let Ω0 = X ,
2 let Ωk+1 = Pre(Ωk ) ∩ Ωk
3 if Ωk+1 = Ωk then O∞ ← Ωk+1
4 else go to 2

The algorithm generates the set sequence {Ωk } satisfying Ωk+1 ⊆ Ωk , ∀k ∈ N and
it terminates when Ωk+1 = Ωk so that Ωk is the maximal positive invariant set
O∞ for x(t + 1) = fa (x(t)).

Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014) 3-26
3 3. Invariant Sets 3.2 Control Invariant Sets

Table of Contents

3. Invariant Sets
3.1 Invariant Sets
3.2 Control Invariant Sets

Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014)

3 3. Invariant Sets 3.2 Control Invariant Sets

Control Invariant Sets

Control invariant sets


are computed for systems subject to external inputs
provide the set of initial states for which there exists a controller such that
the system constraints are never violated.

Definition (Control Invariant Set)


A set C ⊆ X is said to be a control invariant set if

x(t) ∈ C ⇒ ∃u(t) ∈ U such that f (x(t), u(t)) ∈ C, ∀t ∈ N+

Definition (Maximal Control Invariant Set C∞ )


The set C∞ is said to be the maximal control invariant set for the system
x(t + 1) = f (x(t), u(t)) subject to the constraints in x(t) ∈ X , u(t) ∈ U, if it is
control invariant and contains all control invariant sets contained in X .
Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014) 3-27
3 3. Invariant Sets 3.2 Control Invariant Sets

Control Invariant Sets


Same geometric condition for control invariants holds: C is a control invariant set
if and only if
C ⊆ Pre(C) (8)

Algorithm
Input: f , X and U
Output: C∞
1 let Ω0 = X ,
2 let Ωk+1 = Pre(Ωk ) ∩ Ωk
3 if Ωk+1 = Ωk then C∞ ← Ωk+1
4 else go to 2

The algorithm generates the set sequence {Ωk } satisfying Ωk+1 ⊆ Ωk , ∀k ∈ N and
it terminates if Ωk+1 = Ωk so that Ωk is the maximal control invariant set C∞ for
the constrained system.

Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014) 3-28

3 3. Invariant Sets 3.2 Control Invariant Sets

Invariant Sets and Control Invariant Sets

The set O∞ (C∞ ) is finitely determined if and only if ∃ i ∈ N such that


Ωi+1 = Ωi .
The smallest element i ∈ N such that Ωi+1 = Ωi is called the
determinedness index.
For all states contained in the maximal control invariant set C∞ there exists a
control law, such that the system constraints are never violated.

Reachability and Invariance F. Borrelli, M. Morari, C. Jones - Fall Semester 2014 (revised September 2014) 3-29

Potrebbero piacerti anche