SpaceEx: Scalable Verification of Hybrid...
Transcript of SpaceEx: Scalable Verification of Hybrid...
Colas Le Guernic CMACS meeting – 1 / 22
SpaceEx:
Scalable Verification of Hybrid Systems
Colas Le Guernic
April 29, 2011
joint work with:Goran Frehse, Alexandre Donze, Scott Cotton, Rajarshi Ray, Olivier Lebeltel,
Rodolfo Ripado, Antoine Girard, Thao Dang, and Oded Maler.
SpaceEx
Introduction
SpaceEx
Hybrid Systems
Example
CMACSParameterEstimation inSpaceEx
Reachability Analysis
Support Function
SpaceEx
Colas Le Guernic CMACS meeting – 2 / 22
SpaceEx is a software platform for reachability and safetyverification of hybrid systems developed at Verimag.
http://spaceex.imag.fr/
Hybrid Systems
Introduction
SpaceEx
Hybrid Systems
Example
CMACSParameterEstimation inSpaceEx
Reachability Analysis
Support Function
SpaceEx
Colas Le Guernic CMACS meeting – 3 / 22
x ∈ f1(x) x ∈ f2(x)
x ∈ f3(x)
x ∈ f4(x)
x ∈ G1,2
x← R1,2(x)
x ∈ G2,4
x← R2,4(x)
x ∈ G2,3
x← R2,3(x)
x ∈ G3,2
x← R3,2(x)
x ∈ G3,1
x← R3,1(x)
Example
Colas Le Guernic CMACS meeting – 4 / 22
HEAT
dTdt
= fHeat(T )
OFF
dTdt
= fOff(T )
T > 22C
T < 18C
Example
Colas Le Guernic CMACS meeting – 4 / 22
HEAT
dTdt
= fHeat(T )
OFF
dTdt
= fOff(T )
T > 22C
T < 18C
Example
Colas Le Guernic CMACS meeting – 4 / 22
HEAT
dTdt
= fHeat(T )
OFF
dTdt
= fOff(T )
T > 22C
T < 18C
Example
Colas Le Guernic CMACS meeting – 4 / 22
HEAT
dTdt
= fHeat(T )
OFF
dTdt
= fOff(T )
T > 22C
T < 18C
Example
Colas Le Guernic CMACS meeting – 4 / 22
HEAT
dTdt
∈ FHeat(T )
OFF
dTdt
∈ FOff(T )
T > 22C
T < 18C
CMACS
Introduction
SpaceEx
Hybrid Systems
Example
CMACSParameterEstimation inSpaceEx
Reachability Analysis
Support Function
SpaceEx
Colas Le Guernic CMACS meeting – 5 / 22
CMACS
Introduction
SpaceEx
Hybrid Systems
Example
CMACSParameterEstimation inSpaceEx
Reachability Analysis
Support Function
SpaceEx
Colas Le Guernic CMACS meeting – 5 / 22
Parameter Estimationwith RoVerGeNe.
CMACS
Introduction
SpaceEx
Hybrid Systems
Example
CMACSParameterEstimation inSpaceEx
Reachability Analysis
Support Function
SpaceEx
Colas Le Guernic CMACS meeting – 5 / 22
Parameter Estimationwith RoVerGeNe.
Based on abstractionsby discrete automata.
Parameter Estimation in SpaceEx
Introduction
SpaceEx
Hybrid Systems
Example
CMACSParameterEstimation inSpaceEx
Reachability Analysis
Support Function
SpaceEx
Colas Le Guernic CMACS meeting – 6 / 22
SpaceEx, Reachability for:
LHA HA with linear dynamicsx ∈ P x ∈ Ax+ u | u ∈ U
No parameter estimation.
Parameter Estimation in SpaceEx
Introduction
SpaceEx
Hybrid Systems
Example
CMACSParameterEstimation inSpaceEx
Reachability Analysis
Support Function
SpaceEx
Colas Le Guernic CMACS meeting – 6 / 22
SpaceEx, Reachability for:
LHA HA with linear dynamicsx ∈ P x ∈ Ax+ u | u ∈ U
Parameters as variables with 0 derivative.
0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.00.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
x1
x2
initial states
final states
reachable
final states
reachable
states R1
Reachability Analysis
Introduction
Reachability Analysis
Reachability Analysis
LTI
Guards
Representing Sets
Scalable
Support Function
SpaceEx
Colas Le Guernic CMACS meeting – 7 / 22
Continuous Dynamics: x ∈ Ax⊕ U and x(t) ∈ I Hyperplanar guards Affine Reset Maps
Reachability Analysis
Introduction
Reachability Analysis
Reachability Analysis
LTI
Guards
Representing Sets
Scalable
Support Function
SpaceEx
Colas Le Guernic CMACS meeting – 7 / 22
Continuous Dynamics: x ∈ Ax⊕ U and x(t) ∈ I Hyperplanar guards Affine Reset Maps
Postc : Continuous evolution
Reachability Analysis
Introduction
Reachability Analysis
Reachability Analysis
LTI
Guards
Representing Sets
Scalable
Support Function
SpaceEx
Colas Le Guernic CMACS meeting – 7 / 22
Continuous Dynamics: x ∈ Ax⊕ U and x(t) ∈ I Hyperplanar guards Affine Reset Maps
Postc : Continuous evolutionPostd : Discrete transition
Reachability Analysis
Introduction
Reachability Analysis
Reachability Analysis
LTI
Guards
Representing Sets
Scalable
Support Function
SpaceEx
Colas Le Guernic CMACS meeting – 7 / 22
Continuous Dynamics: x ∈ Ax⊕ U and x(t) ∈ I Hyperplanar guards Affine Reset Maps
Postc : Continuous evolutionPostd : Discrete transition
Reachability Analysis
Introduction
Reachability Analysis
Reachability Analysis
LTI
Guards
Representing Sets
Scalable
Support Function
SpaceEx
Colas Le Guernic CMACS meeting – 7 / 22
Continuous Dynamics: x ∈ Ax⊕ U and x(t) ∈ I Hyperplanar guards Affine Reset Maps
Postc : Continuous evolutionPostd : Discrete transition
Reachability Analysis
Introduction
Reachability Analysis
Reachability Analysis
LTI
Guards
Representing Sets
Scalable
Support Function
SpaceEx
Colas Le Guernic CMACS meeting – 7 / 22
Continuous Dynamics: x ∈ Ax⊕ U and x(t) ∈ I Hyperplanar guards Affine Reset Maps
Postc : Continuous evolutionPostd : Discrete transition
Reachability for Linear Time Invariant systems
Introduction
Reachability Analysis
Reachability Analysis
LTI
Guards
Representing Sets
Scalable
Support Function
SpaceEx
Colas Le Guernic CMACS meeting – 8 / 22
Describe all x(t) ∈ Rd for any t in [0;T ] such that :
x(t) = Ax(t) + u(t) with x(0) ∈ X0 and u(t) ∈ U
Reachability for Linear Time Invariant systems
Introduction
Reachability Analysis
Reachability Analysis
LTI
Guards
Representing Sets
Scalable
Support Function
SpaceEx
Colas Le Guernic CMACS meeting – 8 / 22
Describe all x(t) ∈ Rd for any t in [0;T ] such that :
x(t) = Ax(t) + u(t) with x(0) ∈ X0 and u(t) ∈ U
Analytical solution for a given input function u:
x(t) = etAx(0) +
∫ t
0e(t−s)Au(s) ds
Reachability for Linear Time Invariant systems
Introduction
Reachability Analysis
Reachability Analysis
LTI
Guards
Representing Sets
Scalable
Support Function
SpaceEx
Colas Le Guernic CMACS meeting – 8 / 22
Describe all x(t) ∈ Rd for any t in [0;T ] such that :
x(t) = Ax(t) + u(t) with x(0) ∈ X0 and u(t) ∈ U
Analytical solution for a given input function u:
x(t) = etAx(0) +
∫ t
0e(t−s)Au(s) ds
Temporal discretization:
Reach[tk,tk+δk](X0) = eAtkReach[0,δk](X0) ⊕ Reach[tk,tk](0)
Reachability for Linear Time Invariant systems
Introduction
Reachability Analysis
Reachability Analysis
LTI
Guards
Representing Sets
Scalable
Support Function
SpaceEx
Colas Le Guernic CMACS meeting – 8 / 22
Describe all x(t) ∈ Rd for any t in [0;T ] such that :
x(t) = Ax(t) + u(t) with x(0) ∈ X0 and u(t) ∈ U
Analytical solution for a given input function u:
x(t) = etAx(0) +
∫ t
0e(t−s)Au(s) ds
Temporal discretization:
Ψk+1 = Ψk ⊕ eAtkΨδk(U)
Ωk = eAtkΩ[0,δk](X0,U) ⊕ Ψk
Guards
Introduction
Reachability Analysis
Reachability Analysis
LTI
Guards
Representing Sets
Scalable
Support Function
SpaceEx
Colas Le Guernic CMACS meeting – 9 / 22
Guards
Introduction
Reachability Analysis
Reachability Analysis
LTI
Guards
Representing Sets
Scalable
Support Function
SpaceEx
Colas Le Guernic CMACS meeting – 9 / 22
Guards
Introduction
Reachability Analysis
Reachability Analysis
LTI
Guards
Representing Sets
Scalable
Support Function
SpaceEx
Colas Le Guernic CMACS meeting – 9 / 22
Guards
Introduction
Reachability Analysis
Reachability Analysis
LTI
Guards
Representing Sets
Scalable
Support Function
SpaceEx
Colas Le Guernic CMACS meeting – 9 / 22
Representing Sets
Introduction
Reachability Analysis
Reachability Analysis
LTI
Guards
Representing Sets
Scalable
Support Function
SpaceEx
Colas Le Guernic CMACS meeting – 10 / 22
Scalable Computation by Transformation
Introduction
Reachability Analysis
Reachability Analysis
LTI
Guards
Representing Sets
Scalable
Support Function
SpaceEx
Colas Le Guernic CMACS meeting – 11 / 22
Support Function
Introduction
Reachability Analysis
Support Function
Definition
Examples
Representing sets
Properties
ρΩk(ℓ)
Ω[0,δk ](X0, U)
ρΩ[0,δk](ℓ)
Time Step
SpaceEx
Colas Le Guernic CMACS meeting – 12 / 22
Definition
Introduction
Reachability Analysis
Support Function
Definition
Examples
Representing sets
Properties
ρΩk(ℓ)
Ω[0,δk ](X0, U)
ρΩ[0,δk](ℓ)
Time Step
SpaceEx
Colas Le Guernic CMACS meeting – 13 / 22
The support function of a compact convex set S ⊆ Rd, denoted
ρS , is defined as:
ρS : Rd → R
ℓ 7→ maxx∈S ℓ · x
Definition
Introduction
Reachability Analysis
Support Function
Definition
Examples
Representing sets
Properties
ρΩk(ℓ)
Ω[0,δk ](X0, U)
ρΩ[0,δk](ℓ)
Time Step
SpaceEx
Colas Le Guernic CMACS meeting – 13 / 22
The support function of a compact convex set S ⊆ Rd, denoted
ρS , is defined as:
ρS : Rd → R
ℓ 7→ maxx∈S ℓ · x
−2
0
2
4
6
8
ℓ
Examples
Introduction
Reachability Analysis
Support Function
Definition
Examples
Representing sets
Properties
ρΩk(ℓ)
Ω[0,δk ](X0, U)
ρΩ[0,δk](ℓ)
Time Step
SpaceEx
Colas Le Guernic CMACS meeting – 14 / 22
support function of the unit cube B∞:
ρB∞(ℓ) = ‖ℓ‖1 =
d−1∑
i=0
|ℓi|
support function of a ball S of center c and radius r:
ρS(ℓ) = c · ℓ+ r‖ℓ‖2
support function of a polytope P = x : Ax ≤ b: any LPalgorithm solving:
maxx · ℓAx ≤ b
Representing sets
Introduction
Reachability Analysis
Support Function
Definition
Examples
Representing sets
Properties
ρΩk(ℓ)
Ω[0,δk ](X0, U)
ρΩ[0,δk](ℓ)
Time Step
SpaceEx
Colas Le Guernic CMACS meeting – 15 / 22
If S is convex, then:
S =⋂
ℓ∈Rd
x : x · ℓ ≤ ρS(ℓ)
Properties
Introduction
Reachability Analysis
Support Function
Definition
Examples
Representing sets
Properties
ρΩk(ℓ)
Ω[0,δk ](X0, U)
ρΩ[0,δk](ℓ)
Time Step
SpaceEx
Colas Le Guernic CMACS meeting – 16 / 22
Linear transformation:
ρAS(ℓ) = ρS(A⊤ℓ)
Minkowski sum:
X ⊕ Y = x+ y : x ∈ X and y ∈ Y
ρX⊕Y(ℓ) = ρX (ℓ) + ρY(ℓ)
Convex union:
ρCH(X∪Y)(ℓ) = max(ρX (ℓ), ρY(ℓ))
ρΩk(ℓ)
Introduction
Reachability Analysis
Support Function
Definition
Examples
Representing sets
Properties
ρΩk(ℓ)
Ω[0,δk ](X0, U)
ρΩ[0,δk](ℓ)
Time Step
SpaceEx
Colas Le Guernic CMACS meeting – 17 / 22
Ψk+1 = Ψk ⊕ eAtkΨδk(U)
Ωk = eAtkΩ[0,δk](X0,U) ⊕ Ψk
For any direction ℓ:
ψk+1(ℓ) = ψk(ℓ) + ρΨδk((eAtk)⊤ℓ)
ρΩk(ℓ) = ρΩ[0,δk]
((eAtk)⊤ℓ) ⊕ ψk(ℓ)
Ω[0,δk](X0,U)
Introduction
Reachability Analysis
Support Function
Definition
Examples
Representing sets
Properties
ρΩk(ℓ)
Ω[0,δk ](X0, U)
ρΩ[0,δk](ℓ)
Time Step
SpaceEx
Colas Le Guernic CMACS meeting – 18 / 22
Let λ ∈ [0, 1], and Ωλ(X0,U , δ) be the convex set defined by :
Ωλ(X0,U , δ) = (1 − λ)X0 ⊕ λeδAX0 ⊕ λδU
⊕(
λE+Ω (X0, δ) ∩ (1 − λ)E−
Ω (X0, δ))
⊕ λ2EΨ(U , δ)
where E+Ω (X0, δ) = ⊡
(
Φ2(|A|, δ) ⊡(
A2X0
))
and E−
Ω (X0, δ) = ⊡(
Φ2(|A|, δ) ⊡(
A2eδAX0
))
and EΨ(U , δ) = ⊡ (Φ2(|A|, δ) ⊡ (AU)) .
Then Reachλδ,λδ(X0,U) ⊆ Ωλ(X0,U , δ). If we define Ω[0,δ](X0,U) as:
Ω[0,δ](X0,U) = CH(
⋃
λ∈[0,1]
Ωλ(X0,U , δ))
,
then Reach0,δ(X0) ⊆ Ω[0,δ](X0,U).
ρΩ[0,δk](ℓ)
Introduction
Reachability Analysis
Support Function
Definition
Examples
Representing sets
Properties
ρΩk(ℓ)
Ω[0,δk ](X0, U)
ρΩ[0,δk](ℓ)
Time Step
SpaceEx
Colas Le Guernic CMACS meeting – 19 / 22
Ωλ(X0,U , δ) = (1 − λ)X0 ⊕ λeδAX0 ⊕ λδU
⊕(
λE+Ω (X0, δ) ∩ (1 − λ)E−
Ω (X0, δ))
⊕ λ2EΨ(U , δ)
Ω[0,δ](X0,U) = CH(
⋃
λ∈[0,1]
Ωλ(X0,U , δ))
,
ρΩ[0,δk](ℓ)
Introduction
Reachability Analysis
Support Function
Definition
Examples
Representing sets
Properties
ρΩk(ℓ)
Ω[0,δk ](X0, U)
ρΩ[0,δk](ℓ)
Time Step
SpaceEx
Colas Le Guernic CMACS meeting – 19 / 22
Ωλ(X0,U , δ) = (1 − λ)X0 ⊕ λeδAX0 ⊕ λδU
⊕(
λE+Ω (X0, δ) ∩ (1 − λ)E−
Ω (X0, δ))
⊕ λ2EΨ(U , δ)
Ω[0,δ](X0,U) = CH(
⋃
λ∈[0,1]
Ωλ(X0,U , δ))
,
ρΩ[0,δ](ℓ) = max
λ∈[0,1]
(
(1 − λ)ρX0(ℓ) + λρX0
((eδA)⊤ℓ) + λδρU (ℓ)
+ ρλE+Ω∩(1−λ)E−
Ω(ℓ) + λ2ρEΨ
(ℓ))
Time step adaptation with error bounds
Introduction
Reachability Analysis
Support Function
Definition
Examples
Representing sets
Properties
ρΩk(ℓ)
Ω[0,δk ](X0, U)
ρΩ[0,δk](ℓ)
Time Step
SpaceEx
Colas Le Guernic CMACS meeting – 20 / 22
A user defined time step is arbitrary Time step guided by requested quality of approximation:
ǫΩk(ℓ) = ρ (ℓ,Ωk) − ρ
(
ℓ,Reachtk,tk+1(X0)
))
linear accumulation of errors
ǫΨk(ℓ) + ǫΨ
δΨk
(U)(eAtΨk
⊤ℓ) ≤
tΨk + δΨkT
ǫΨ
computed independently for each direction
SpaceEx Platform - Architecture
Introduction
Reachability Analysis
Support Function
SpaceEx
Architecture
Colas Le Guernic CMACS meeting – 21 / 22
Thank you
Introduction
Reachability Analysis
Support Function
SpaceEx
Colas Le Guernic CMACS meeting – 22 / 22