Modeling and Analysis of Hybrid Systems 6. Convex polyhedra Prof. Dr. Erika Ábrahám Informatik 2 - LuFG Theory of Hybrid Systems RWTH Aachen University Szeged, Hungary, 27 September - 06 October 2017 Ábrahám - Hybrid Systems 1 / 18
Contents 1 Convex polyhedra 2 Operations on convex polyhedra Ábrahám - Hybrid Systems 2 / 18
(Convex) polyhedra and polytopes Ábrahám - Hybrid Systems 3 / 18
(Convex) polyhedra and polytopes Notation: In this lecture we use column-vector-notation, i.e., x R d is a column vector, whereas x T is a row vector. Ábrahám - Hybrid Systems 4 / 18
(Convex) polyhedra and polytopes Notation: In this lecture we use column-vector-notation, i.e., x R d is a column vector, whereas x T is a row vector. Denition (Polyhedron, polytope) A polyhedron in R d is Ábrahám - Hybrid Systems 4 / 18
(Convex) polyhedra and polytopes Notation: In this lecture we use column-vector-notation, i.e., x R d is a column vector, whereas x T is a row vector. Denition (Polyhedron, polytope) A polyhedron in R d is the solution set to a nite number n N 0 of linear inequalities a it x b i (i.e., a i1 x 1 +... + a in x n b i ), i = 1,..., n, with real coecients a i R d, real-valued variables x = (x 1,..., x d ) T and b i R. A bounded polyhedron is called a polytope. Ábrahám - Hybrid Systems 4 / 18
(Convex) polyhedra and polytopes Notation: In this lecture we use column-vector-notation, i.e., x R d is a column vector, whereas x T is a row vector. Denition (Polyhedron, polytope) A polyhedron in R d is the solution set to a nite number n N 0 of linear inequalities a it x b i (i.e., a i1 x 1 +... + a in x n b i ), i = 1,..., n, with real coecients a i R d, real-valued variables x = (x 1,..., x d ) T and b i R. A bounded polyhedron is called a polytope. x 2 0 x 1 Ábrahám - Hybrid Systems 4 / 18
(Convex) polyhedra and polytopes Notation: In this lecture we use column-vector-notation, i.e., x R d is a column vector, whereas x T is a row vector. Denition (Polyhedron, polytope) A polyhedron in R d is the solution set to a nite number n N 0 of linear inequalities a it x b i (i.e., a i1 x 1 +... + a in x n b i ), i = 1,..., n, with real coecients a i R d, real-valued variables x = (x 1,..., x d ) T and b i R. A bounded polyhedron is called a polytope. x 2 x 1 + 2x 2 12 0 x 1 Ábrahám - Hybrid Systems 4 / 18
(Convex) polyhedra and polytopes Notation: In this lecture we use column-vector-notation, i.e., x R d is a column vector, whereas x T is a row vector. Denition (Polyhedron, polytope) A polyhedron in R d is the solution set to a nite number n N 0 of linear inequalities a it x b i (i.e., a i1 x 1 +... + a in x n b i ), i = 1,..., n, with real coecients a i R d, real-valued variables x = (x 1,..., x d ) T and b i R. A bounded polyhedron is called a polytope. x 2 3x 1 + 2x 2 1 x 1 + 2x 2 12 0 x 1 Ábrahám - Hybrid Systems 4 / 18
(Convex) polyhedra and polytopes Notation: In this lecture we use column-vector-notation, i.e., x R d is a column vector, whereas x T is a row vector. Denition (Polyhedron, polytope) A polyhedron in R d is the solution set to a nite number n N 0 of linear inequalities a it x b i (i.e., a i1 x 1 +... + a in x n b i ), i = 1,..., n, with real coecients a i R d, real-valued variables x = (x 1,..., x d ) T and b i R. A bounded polyhedron is called a polytope. x 2 3x 1 + 2x 2 1 x 1 + 2x 2 12 x 1 0 x 1 7 Ábrahám - Hybrid Systems 4 / 18
(Convex) polyhedra and polytopes Denition (Reminder: convex sets) A set S R d is convex if Ábrahám - Hybrid Systems 5 / 18
(Convex) polyhedra and polytopes Denition (Reminder: convex sets) A set S R d is convex if x, y S. λ [0, 1] R. λx + (1 λ)y S. Ábrahám - Hybrid Systems 5 / 18
(Convex) polyhedra and polytopes Denition (Reminder: convex sets) A set S R d is convex if x, y S. λ [0, 1] R. λx + (1 λ)y S. Polyhedra are convex sets. Proof? Ábrahám - Hybrid Systems 5 / 18
(Convex) polyhedra and polytopes Denition (Reminder: convex sets) A set S R d is convex if x, y S. λ [0, 1] R. λx + (1 λ)y S. Polyhedra are convex sets. Proof? Depending on the form of the representation we distinguish between H-polytopes and V-polytopes Ábrahám - Hybrid Systems 5 / 18
H-polytopes Denition (Closed halfspace) A d-dimensional closed halfspace is a set H = {x R d a T x b} for some a R d, called the normal of the halfspace, and some b R. Ábrahám - Hybrid Systems 6 / 18
H-polytopes Denition (Closed halfspace) A d-dimensional closed halfspace is a set H = {x R d a T x b} for some a R d, called the normal of the halfspace, and some b R. Denition (H-polyhedron, H-polytope) A d-dimensional H-polyhedron P = n i=1 H i is the intersection of nitely many closed halfspaces. A bounded H-polyhedron is called an H-polytope. The facets of a d-dimensional H-polytope are d 1-dimensional H-polytopes. Ábrahám - Hybrid Systems 6 / 18
H-polytopes An H-polytope P = n H i = i=1 n i=1 {x R d a it x b i } can also be written in the form P = {x R d Ax b}. We call (A, b) the H-representation of the polytope. Ábrahám - Hybrid Systems 7 / 18
H-polytopes An H-polytope P = n H i = i=1 n i=1 {x R d a it x b i } can also be written in the form P = {x R d Ax b}. We call (A, b) the H-representation of the polytope. Each row of A is the normal vector to the ith facet of the polytope. Ábrahám - Hybrid Systems 7 / 18
H-polytopes An H-polytope P = n H i = i=1 n i=1 {x R d a it x b i } can also be written in the form P = {x R d Ax b}. We call (A, b) the H-representation of the polytope. Each row of A is the normal vector to the ith facet of the polytope. An H-polytope P has a nite number of vertices V (P ). Ábrahám - Hybrid Systems 7 / 18
Convex hull of a nite set of points x 2 0 x 1 Ábrahám - Hybrid Systems 8 / 18
Convex hull of a nite set of points x 2 0 x 1 Ábrahám - Hybrid Systems 8 / 18
V-polytopes Denition (Convex hull) Given a set V R d, the convex hull conv(v ) of V is the smallest convex set that contains V. Ábrahám - Hybrid Systems 9 / 18
V-polytopes Denition (Convex hull) Given a set V R d, the convex hull conv(v ) of V is the smallest convex set that contains V. For a nite set V = {v v 1,...,v v n } R d, its convex hull can be computed by Ábrahám - Hybrid Systems 9 / 18
V-polytopes Denition (Convex hull) Given a set V R d, the convex hull conv(v ) of V is the smallest convex set that contains V. For a nite set V = {v v 1,...,v v n } R d, its convex hull can be computed by conv(v ) = {x R d λ 1,..., λ n [0, 1] R. n n λ i = 1 λ i v i = x}. i=1 i=1 Ábrahám - Hybrid Systems 9 / 18
V-polytopes Denition (Convex hull) Given a set V R d, the convex hull conv(v ) of V is the smallest convex set that contains V. For a nite set V = {v v 1,...,v v n } R d, its convex hull can be computed by conv(v ) = {x R d λ 1,..., λ n [0, 1] R. n n λ i = 1 λ i v i = x}. i=1 i=1 Denition (V-polytope) A V-polytope P = conv(v ) is the convex hull of a nite set V R d. We call V the V-representation of the polytope. Ábrahám - Hybrid Systems 9 / 18
V-polytopes Denition (Convex hull) Given a set V R d, the convex hull conv(v ) of V is the smallest convex set that contains V. For a nite set V = {v v 1,...,v v n } R d, its convex hull can be computed by conv(v ) = {x R d λ 1,..., λ n [0, 1] R. n n λ i = 1 λ i v i = x}. i=1 i=1 Denition (V-polytope) A V-polytope P = conv(v ) is the convex hull of a nite set V R d. We call V the V-representation of the polytope. Note that all V-polytopes are bounded. Ábrahám - Hybrid Systems 9 / 18
V-polytopes Denition (Convex hull) Given a set V R d, the convex hull conv(v ) of V is the smallest convex set that contains V. For a nite set V = {v v 1,...,v v n } R d, its convex hull can be computed by conv(v ) = {x R d λ 1,..., λ n [0, 1] R. n n λ i = 1 λ i v i = x}. i=1 i=1 Denition (V-polytope) A V-polytope P = conv(v ) is the convex hull of a nite set V R d. We call V the V-representation of the polytope. Note that all V-polytopes are bounded. Unbounded polyhedra can be represented by extending convex hulls with conical hulls. Ábrahám - Hybrid Systems 9 / 18
Conical hull of a nite set of points x 2 0 x 1 Ábrahám - Hybrid Systems 10 / 18
Conical hull of a nite set of points x 2 0 x 1 Ábrahám - Hybrid Systems 10 / 18
Conical hull of a nite set of points Denition (Conical hull) u 1 u n If U = {uu 1,...,uu n } is a nite set of points in R d, the conical hull of U is dened by cone(u) = {x R d λ 1,..., λ n R 0. x = n i=1 λ i u i }. (1) Ábrahám - Hybrid Systems 11 / 18
Conical hull of a nite set of points Denition (Conical hull) u 1 u n If U = {uu 1,...,uu n } is a nite set of points in R d, the conical hull of U is dened by cone(u) = {x R d λ 1,..., λ n R 0. x = n i=1 λ i u i }. (1) Each polyhedra P R d can be represented by two nite sets V, U R d such that P = conv(v ) cone(u) = {v + u v conv(v ), u cone(u)}, where is called the Minkowski sum. If U is empty then P is bounded (e.g., a polytope). In the following we consider, for simplicity, only bounded V-polytopes. Ábrahám - Hybrid Systems 11 / 18
Motzkin's theorem For each H-polytope, the convex hull of its vertices denes the same set in the form of a V-polytope, and vice versa, each set dened as a V-polytope can be also given as an H-polytope by computing the halfspaces dened by its facets. The translations between the H- and the V-representations of polytopes can be exponential in the state space dimension d. Ábrahám - Hybrid Systems 12 / 18
Contents 1 Convex polyhedra 2 Operations on convex polyhedra Ábrahám - Hybrid Systems 13 / 18
Operations If we represent reachable sets of hybrid automata by polytopes, we need some operations like membership computation (x P ) linear transformation (A P ) Minkowski sum (P 1 P 2 ) intersection (P 1 P 2 ) (convex hull of the) union of two polytopes (conv(p 1 P 2 )) test for emptiness (P =?) Ábrahám - Hybrid Systems 14 / 18
Membership p P Membership for p R d : Ábrahám - Hybrid Systems 15 / 18
Membership p P Membership for p R d : H-polytope dened by Ax z: Ábrahám - Hybrid Systems 15 / 18
Membership p P Membership for p R d : H-polytope dened by Ax z: just substitute p for x to check if the inequation holds. Ábrahám - Hybrid Systems 15 / 18
Membership p P Membership for p R d : H-polytope dened by Ax z: just substitute p for x to check if the inequation holds. V-polytope dened by the vertex set V : Ábrahám - Hybrid Systems 15 / 18
Membership p P Membership for p R d : H-polytope dened by Ax z: just substitute p for x to check if the inequation holds. V-polytope dened by the vertex set V : check satisability of λ 1,..., λ n [0, 1] R. n λ i = 1 i=1 n i=1 λ i v i = x. Ábrahám - Hybrid Systems 15 / 18
Membership p P Membership for p R d : H-polytope dened by Ax z: just substitute p for x to check if the inequation holds. V-polytope dened by the vertex set V : check satisability of λ 1,..., λ n [0, 1] R. n λ i = 1 i=1 n i=1 λ i v i = x. Alternatively: Ábrahám - Hybrid Systems 15 / 18
Membership p P Membership for p R d : H-polytope dened by Ax z: just substitute p for x to check if the inequation holds. V-polytope dened by the vertex set V : check satisability of λ 1,..., λ n [0, 1] R. n λ i = 1 i=1 n i=1 λ i v i = x. Alternatively: convert the V-polytope into an H-polytope by computing its facets. Ábrahám - Hybrid Systems 15 / 18
Intersection P 1 P 2 Intersection for two polytopes P 1 and P 2 : H-polytopes dened by A 1 x b 1 and A 2 x b 2 : Ábrahám - Hybrid Systems 16 / 18
Intersection P 1 P 2 Intersection for two polytopes P 1 and P 2 : H-polytopes dened by A 1 x b 1 the resulting H-polytope is dened by V-polytopes dened by V 1 and V 2 : b 2 b 1 and A 2 x b 2 : ( A1 A 2 ) x ( b1 b 1 b 2 ). Ábrahám - Hybrid Systems 16 / 18
Intersection P 1 P 2 Intersection for two polytopes P 1 and P 2 : H-polytopes dened by A 1 x b 1 the resulting H-polytope is dened by b 2 b 1 and A 2 x b 2 : ( A1 A 2 ) x ( b1 b 1 b 2 V-polytopes dened by V 1 and V 2 : Convert P 1 and P 2 to H-polytopes and convert the result back to a V-polytope. ). Ábrahám - Hybrid Systems 16 / 18
Union P 1 P 2 Note that the union of two convex polytopes is in general not a convex polytope. Ábrahám - Hybrid Systems 17 / 18
Union P 1 P 2 Note that the union of two convex polytopes is in general not a convex polytope. take the convex hull of the union. Ábrahám - Hybrid Systems 17 / 18
Union P 1 P 2 Note that the union of two convex polytopes is in general not a convex polytope. take the convex hull of the union. V-polytopes dened by V 1 and V 2 : Ábrahám - Hybrid Systems 17 / 18
Union P 1 P 2 Note that the union of two convex polytopes is in general not a convex polytope. take the convex hull of the union. V-polytopes dened by V 1 and V 2 : V-representation V 1 V 2. H-polytopes dened by A 1 x b 1 and A 2 x b 2 : Ábrahám - Hybrid Systems 17 / 18
Union P 1 P 2 Note that the union of two convex polytopes is in general not a convex polytope. take the convex hull of the union. V-polytopes dened by V 1 and V 2 : V-representation V 1 V 2. H-polytopes dened by A 1 x b 1 and A 2 x b 2 : convert to V-polytopes and compute back the result. b 1 b 2 Ábrahám - Hybrid Systems 17 / 18
Operation complexity overview easy: doable in polynomial complexity hard: no polynomial algorithm is known x P A P P 1 P 2 P 1 P 2 P 1 P 2 V-polytope easy easy H-polytope easy hard V-polytope and V-polytope easy hard easy H-polytope and H-polytope hard easy hard V-polytope and H-polytope hard hard hard It is in general also hard to translate a V-polytope to an H-polytope or vice versa. Ábrahám - Hybrid Systems 18 / 18