Upload
others
View
9
Download
0
Embed Size (px)
Citation preview
Modeling and Analysis of Hybrid SystemsReachability analysis using Taylor models
Prof. Dr. Erika Ábrahám
Informatik 2 - Theory of Hybrid SystemsRWTH Aachen University
SS 2015
Ábrahám - Hybrid Systems 1 / 17
Higher-order approximations
Polynomial p is a k-order approximation of a smooth f : D → R ∈ Ck
iff f(c) = p(c) for the center point c of D and for each 0 < m ≤ k:
∂mf
∂xm
∣∣∣∣x=c
=∂mp
∂xm
∣∣∣∣x=c
.
Ábrahám - Hybrid Systems 2 / 17
Examples
Several higher-order approximations of f(x) = ex with x ∈ [−1, 1]
x
f(x)
-1 -0.5 0 0.5 10
1
2
3f(x) = ex
p(x) = 1
0-order approximation
Ábrahám - Hybrid Systems 3 / 17
Examples
Several higher-order approximations of f(x) = ex with x ∈ [−1, 1]
x
f(x)
-1 -0.5 0 0.5 10
1
2
3f(x) = ex
p(x) = 1 + x
1-order approximation
Ábrahám - Hybrid Systems 3 / 17
Examples
Several higher-order approximations of f(x) = ex with x ∈ [−1, 1]
x
f(x)
-1 -0.5 0 0.5 10
1
2
3f(x) = ex
p(x) = 1 + x + x2
2
2-order approximation
Ábrahám - Hybrid Systems 3 / 17
Taylor models
Taylor model: a pair (p, I) over an interval domain DIt defines the set
{x = p(x0) + y | x0 ∈ D ∧ y ∈ I}
Taylor model arithmetic: Closed under many basic operations
[Berz et al., 1999]
Ábrahám - Hybrid Systems 4 / 17
Higher-order over-approximations by Taylor models
x
f(x)
-1 -0.5 0 0.5 1
-1
0
1
2
3f(x) = ex
p(x) = 1
p(x) + [−1.8, 1.8]
0-order over-approximation
Ábrahám - Hybrid Systems 5 / 17
Higher-order over-approximations by Taylor models
x
f(x)
-1 -0.5 0 0.5 1
-1
0
1
2
3f(x) = ex
p(x) = 1 + x
p(x) + [−0.8, 0.8]
1-order over-approximation
Ábrahám - Hybrid Systems 5 / 17
Higher-order over-approximations by Taylor models
x
f(x)
-1 -0.5 0 0.5 1
-1
0
1
2
3f(x) = ex
p(x) = 1 + x + x2
2
p(x) + [−0.3, 0.3]
2-order over-approximation
Ábrahám - Hybrid Systems 5 / 17
Verified integration by Taylor models
Given:ODE: dx
dt = f(x, t)
Initial set: Taylor model X0 over domain D0
Integration step for time [0, δ]:1 Compute a k-order approximation pk(x0, t) over X0 × [0, δ]
2 Determine remainder Ik such that (pk(x0, t), Ik) over X0 × [0, δ]over-approximates the flow pipe segment
3 Initial set for the next flowpipe segment: (pk(x0, δ), Ik) over X0
[Berz et al., 1999]
Ábrahám - Hybrid Systems 6 / 17
Verified integration by Taylor models
Given:ODE: dx
dt = f(x, t)
Initial set: Taylor model X0 over domain D0
Integration step for time [0, δ]:
1 Compute a k-order approximation pk(x0, t) over X0 × [0, δ]
2 Determine remainder Ik such that (pk(x0, t), Ik) over X0 × [0, δ]over-approximates the flow pipe segment
3 Initial set for the next flowpipe segment: (pk(x0, δ), Ik) over X0
[Berz et al., 1999]
Ábrahám - Hybrid Systems 6 / 17
Verified integration by Taylor models
Given:ODE: dx
dt = f(x, t)
Initial set: Taylor model X0 over domain D0
Integration step for time [0, δ]:1 Compute a k-order approximation pk(x0, t) over X0 × [0, δ]
2 Determine remainder Ik such that (pk(x0, t), Ik) over X0 × [0, δ]over-approximates the flow pipe segment
3 Initial set for the next flowpipe segment: (pk(x0, δ), Ik) over X0
[Berz et al., 1999]
Ábrahám - Hybrid Systems 6 / 17
Continuous systems:
Van-der-Pol oscillator Brusselator Rössler attractor
How can we apply Taylor models to hybrid systems?
Ábrahám - Hybrid Systems 7 / 17
Continuous systems:
Van-der-Pol oscillator Brusselator Rössler attractor
How can we apply Taylor models to hybrid systems?
Ábrahám - Hybrid Systems 7 / 17
Taylor model flowpipe construction for hybrid systems
Time evolution:Verified integration using Taylor modelsCompute flowpipe/invariant intersections
For a discrete transition:Compute flowpipe/guard intersectionsCompute the image of the reset mapping
Ábrahám - Hybrid Systems 8 / 17
Over-approximate an intersection
We use three techniques in combination to over-approximate theintersection (p, I) ∩G:
1 Domain contraction2 Range over-approximation3 Template method
Ábrahám - Hybrid Systems 9 / 17
1. Domain contraction
Intersection of a Taylor model (p, I) over domain D × T and a guard G:
x = p(x0, t) + y ∧ y ∈ I ∧ x0 ∈ D ∧ t ∈ T︸ ︷︷ ︸Taylor model domain︸ ︷︷ ︸
Taylor model
∧ G(x)︸ ︷︷ ︸guard predicate
Domain contaction:1 Split the domain in one dimension into two halves2 Contract dimensions using interval constraint propagation3 Drop empty (unsatisfiable) domain halves
Ábrahám - Hybrid Systems 10 / 17
1. Domain contraction
Intersection of a Taylor model (p, I) over domain D × T and a guard G:
x = p(x0, t) + y ∧ y ∈ I ∧ x0 ∈ D ∧ t ∈ T︸ ︷︷ ︸Taylor model domain︸ ︷︷ ︸
Taylor model
∧ G(x)︸ ︷︷ ︸guard predicate
Domain contaction:1 Split the domain in one dimension into two halves2 Contract dimensions using interval constraint propagation3 Drop empty (unsatisfiable) domain halves
Ábrahám - Hybrid Systems 10 / 17
1. Domain contraction: Example
t
D0
TM
guard
t
D0
new TM guard
Ábrahám - Hybrid Systems 11 / 17
1. Domain contraction: Example
Ábrahám - Hybrid Systems 12 / 17
2. Range over-approximation
1 Over-approximate (p, I) by a set S which can be asupport functionConservative over-approximation of a polynomialzonotopeZonotopes are order 1 Taylor models and vise versa
2 Over-approximate S ∩G by a Taylor model
[Sankaranarayanan et el., 2008], [Le Guernic et al., 2009]
Ábrahám - Hybrid Systems 13 / 17
3. Template method
Goal: Find a Taylor model (p∗, 0) over domain
Du = [`1, u1]× [`2, u2]× · · · × [`n, un]
containing the intersection (p, I) ∩G
Tasks:Fix p∗
Compute proper parameters `1, . . . , `n, u1, . . . , un
∀x.((x = p(y) + z ∧ y ∈ D ∧ z ∈ I ∧ x ∈ G)→ ∃x0.(x = p∗(x0) ∧ x0 ∈ Du))
[Sankaranarayanan et al., 2008], [Gulwani, 2008]
Ábrahám - Hybrid Systems 14 / 17
3. Template method
Goal: Find a Taylor model (p∗, 0) over domain
Du = [`1, u1]× [`2, u2]× · · · × [`n, un]
containing the intersection (p, I) ∩GTasks:
Fix p∗
Compute proper parameters `1, . . . , `n, u1, . . . , un
∀x.((x = p(y) + z ∧ y ∈ D ∧ z ∈ I ∧ x ∈ G)→ ∃x0.(x = p∗(x0) ∧ x0 ∈ Du))
[Sankaranarayanan et al., 2008], [Gulwani, 2008]
Ábrahám - Hybrid Systems 14 / 17
3. Template method
Goal: Find a Taylor model (p∗, 0) over domain
Du = [`1, u1]× [`2, u2]× · · · × [`n, un]
containing the intersection (p, I) ∩GTasks:
Fix p∗
Compute proper parameters `1, . . . , `n, u1, . . . , un
∀x.((x = p(y) + z ∧ y ∈ D ∧ z ∈ I ∧ x ∈ G)→ ∃x0.(x = p∗(x0) ∧ x0 ∈ Du))
[Sankaranarayanan et al., 2008], [Gulwani, 2008]
Ábrahám - Hybrid Systems 14 / 17
Example: Glycemic control in diabetic patients
G plasma glucose concentration above the basal value GB
I plasma insulin concentration above the basal value IBX insulin concentration in an interstitial chamber
dGdt = −p1G−X(G+GB) + g(t)dXdt = −p2X + p3IdIdt = −n(I + Ib) +
1VIi(t)
g(t) infusion of glucose into the bloodstreami(t) infusion of insulin into the bloodstream
g(t) =
t60 t ≤ 30120−t180 t ∈ [30, 120]
0 t ≥ 120
i(t) =
{1 + 2G(t)
9 G(t) < 6503 G(t) ≥ 6
Ábrahám - Hybrid Systems 15 / 17
Glycemic Control in Diabetic Patients
Order of the Taylor models: 9 Time step: 0.02 Time horizon: [0,360]Total time: 1804 s Time of intersection: 443 s Memory: 410 MB
Ábrahám - Hybrid Systems 16 / 17
Fetch the tool
http://systems.cs.colorado.edu/research/cyberphysical/taylormodels/
Ábrahám - Hybrid Systems 17 / 17