+ All Categories
Home > Documents > Proofs from Simulations and Modular Annotations€¦ · discrepancy of the system if for any two...

Proofs from Simulations and Modular Annotations€¦ · discrepancy of the system if for any two...

Date post: 19-Oct-2020
Category:
Upload: others
View: 0 times
Download: 0 times
Share this document with a friend
15
Proofs from Simulations and Modular Annotations Zhenqi Huang and Sayan Mitra Department of Electrical and Computer Engineering University of Illinois at Urbana-Champaign
Transcript
Page 1: Proofs from Simulations and Modular Annotations€¦ · discrepancy of the system if for any two states πœƒ1 and πœƒ2∈Θ, For any , Vπœ‰πœƒ, ,πœ‰πœƒβ€², ≀ |πœƒβˆ’πœƒβ€²|,

Proofs from Simulations and Modular Annotations

Zhenqi Huang and Sayan Mitra

Department of Electrical and Computer Engineering

University of Illinois at Urbana-Champaign

Page 2: Proofs from Simulations and Modular Annotations€¦ · discrepancy of the system if for any two states πœƒ1 and πœƒ2∈Θ, For any , Vπœ‰πœƒ, ,πœ‰πœƒβ€², ≀ |πœƒβˆ’πœƒβ€²|,

Background

β€’ Invariant verification for dynamical systems. β€’ Through computing the set of state the system can reach (reach set)

β€’ Exact Reach set computation is in general undecidable β‡’ Over-approximation

β€’ Static analysis and symbolic approaches β€’ E.g. SpaceEx, PHAVer, CheckMate, d/dt

β€’ Dynamic+Static analysis using numerical simulations β€’ E.g. S-TaLiRo, Breach, C2E2

2 HSCC 2014, Berlin

Page 3: Proofs from Simulations and Modular Annotations€¦ · discrepancy of the system if for any two states πœƒ1 and πœƒ2∈Θ, For any , Vπœ‰πœƒ, ,πœ‰πœƒβ€², ≀ |πœƒβˆ’πœƒβ€²|,

Simulation-based Reachability

β€’ π‘₯ = 𝑓 π‘₯ , Θ βŠ† 𝑅𝑛

β€’ Denote πœ‰(πœƒ, 𝑑) as a trajectory from πœƒ ∈ Θ

β€’ Simulation-based Verification β€’ Finite cover of Θ ( ).

β€’ Simulate from the center of each cover.

β€’ Bloat the simulation with some factor, such that the bloated tube contains all trajectories starting from the cover.

β€’ Union of all such tubes gives an over-approximation of reach set

β€’ In [1], we expect the bloating factor to be given by the user as an annotation to the model

3 HSCC 2014, Berlin [1] Duggirala, Mitra, Viswannathan. EMSOFT2013

Page 4: Proofs from Simulations and Modular Annotations€¦ · discrepancy of the system if for any two states πœƒ1 and πœƒ2∈Θ, For any , Vπœ‰πœƒ, ,πœ‰πœƒβ€², ≀ |πœƒβˆ’πœƒβ€²|,

Annotation: Discrepancy Function

Definition. Functions V: 𝑋 Γ— 𝑋 β†’ ℝβ‰₯0 and 𝛽: ℝβ‰₯0 Γ— 𝑇 β†’ ℝβ‰₯0 define a

discrepancy of the system if for any two states πœƒ1 and πœƒ2 ∈ Θ, For any 𝑑,

V πœ‰ πœƒ, 𝑑 , πœ‰ πœƒβ€², 𝑑 ≀ 𝛽 |πœƒ βˆ’ πœƒβ€²|, 𝑑

where, 𝛽 β†’ 0 as πœƒ β†’ πœƒβ€²

β€’ Stability not required

β€’ Discrepancy can be found automatically for

linear systems

β€’ For nonlinear systems, several template-based

heuristics were proposed

𝑉(πœ‰(πœƒ, 𝑑), πœ‰(πœƒβ€², 𝑑))

πœƒβ€²

πœ‰(πœƒβ€², 𝑑) πœƒ

πœ‰(πœƒ, 𝑑)

4

HSCC 2014, Berlin

Page 5: Proofs from Simulations and Modular Annotations€¦ · discrepancy of the system if for any two states πœƒ1 and πœƒ2∈Θ, For any , Vπœ‰πœƒ, ,πœ‰πœƒβ€², ≀ |πœƒβˆ’πœƒβ€²|,

Key challenge: Finding Discrepancy

Functions for Large Models

HSCC 2014, Berlin 5

Page 6: Proofs from Simulations and Modular Annotations€¦ · discrepancy of the system if for any two states πœƒ1 and πœƒ2∈Θ, For any , Vπœ‰πœƒ, ,πœ‰πœƒβ€², ≀ |πœƒβˆ’πœƒβ€²|,

Models of Cardiac Cell Networks β€’ Find quadratic contraction metric [2]:

β€’ 𝐽(𝑣,𝑀) = 0.5 βˆ’ 3𝑣2 βˆ’11 βˆ’1

β€’ Search for 𝛽 ∈ β„œ and the coefficients of

𝑅 𝑣,𝑀 = π‘Žπ‘–π‘— 𝑣

𝑖𝑀𝑗 𝑏𝑖𝑗 𝑣𝑖𝑀𝑗

𝑏𝑖𝑗 𝑣𝑖𝑀𝑗 𝑐𝑖𝑗 𝑣

𝑖𝑀𝑗,

s.t. 0 ≀ 𝑖 + 𝑗 ≀ 2, 𝑅 ≻ 0, and 𝐽𝑇𝑅 + 𝑅𝐽 + 𝑅 β‰Ί βˆ’π›½π‘€

Cardiac Cell

𝑣 = 0.5 𝑣 βˆ’ 𝑣3 βˆ’ 𝑀 + 𝑒𝑀 = 𝑣 βˆ’ 𝑀 + 0.7

β€’ FitzHugh–Nagumo (FHN) model [1] β€’ Invariant property

β€’ Threshold of voltage β€’ Periodicity of behavior

6 HSCC 2014, Berlin

𝑉 𝛽

Pacemaker

[1] FitzHugh. Biophysical J. 1961 [2] Aylward,Parrilo, Slotine. Automatica. 2008

𝑑𝑅(πœ‰ πœƒ, 𝑑 , πœ‰ πœƒβ€², 𝑑 ) ≀ π‘’βˆ’π›½π‘‘π‘‘π‘…(πœƒ, πœƒβ€²)

𝑒

Page 7: Proofs from Simulations and Modular Annotations€¦ · discrepancy of the system if for any two states πœƒ1 and πœƒ2∈Θ, For any , Vπœ‰πœƒ, ,πœ‰πœƒβ€², ≀ |πœƒβˆ’πœƒβ€²|,

Scalability of Finding Annotation

Pace Maker

Pace Maker Cardiac

Cell

Cardiac Cell

Cardiac Cell

Cardiac Cell

Cardiac Cell

7 HSCC 2014, Berlin

?

𝐿 = 𝐿1 Γ— |𝐿2|

[1] Grosu, et al. CAV2011 [1]

Page 8: Proofs from Simulations and Modular Annotations€¦ · discrepancy of the system if for any two states πœƒ1 and πœƒ2∈Θ, For any , Vπœ‰πœƒ, ,πœ‰πœƒβ€², ≀ |πœƒβˆ’πœƒβ€²|,

Input-to-State (IS) Discrepancy

8

Definition. Functions 𝑉: 𝑋1 Γ— 𝑋1 β†’ ℝβ‰₯0, 𝛽: ℝβ‰₯0 Γ— ℝβ‰₯0 β†’ ℝβ‰₯0and 𝛾:ℝβ‰₯0 β†’ ℝβ‰₯0 define a IS discrepancy of the system:

𝑉1 πœ‰1 πœƒ1, 𝑒1, 𝑑 , πœ‰ πœƒ1β€², 𝑒1β€², 𝑑 ≀ 𝛽1 |πœƒ1 βˆ’ πœƒ1β€²|, 𝑑 + 𝛾1 |𝑒1 𝑠 βˆ’ 𝑒1β€² 𝑠 | 𝑑𝑠

𝑇

0

and 𝛾1 β‹… β†’ 0 as 𝑒1 β†’ 𝑒1β€² (πœ‰1, πœ‰2) and (πœ‰1

β€² , πœ‰2β€²) are a pair of trajectories of the overall ring:

𝑉1 πœ‰1 𝑑 , πœ‰1β€² 𝑑 ≀ 𝛽1 πœƒ1 βˆ’ πœƒ1

β€² , 𝑑 + 0𝑑𝛾1(|πœ‰2(𝑠) βˆ’ πœ‰2

β€² (𝑠)|)𝑑𝑠

𝑉2 πœ‰2 𝑑 , πœ‰2β€² 𝑑 ≀ 𝛽2 πœƒ2 βˆ’ πœƒ2β€² , 𝑑 + 0

𝑑𝛾2(|πœ‰1(𝑠) βˆ’ πœ‰1

β€²(𝑠)|)𝑑𝑠

𝐴1 π‘₯ 1 = 𝑓1(π‘₯1, 𝑒1)

𝐴2 π‘₯ 2 = 𝑓2(π‘₯2, 𝑒2)

𝑒2 = πœ‰1 𝑒1 = πœ‰2

𝑒1 πœ‰1 𝐴1 π‘₯ 1 = 𝑓1(π‘₯1, 𝑒1)

HSCC 2014, Berlin

Page 9: Proofs from Simulations and Modular Annotations€¦ · discrepancy of the system if for any two states πœƒ1 and πœƒ2∈Θ, For any , Vπœ‰πœƒ, ,πœ‰πœƒβ€², ≀ |πœƒβˆ’πœƒβ€²|,

More on IS Discrepancy

β€’ IS Discrepancy:

𝑉 πœ‰ πœƒ, 𝑒, 𝑑 , πœ‰ πœƒβ€², 𝑒′, 𝑑 ≀ 𝛽 πœƒ βˆ’ πœƒβ€² , 𝑑 + 𝛾( 𝑒 𝑠 βˆ’ 𝑒′ 𝑠 )𝑑𝑠𝑑

0

β€’ Incremental integral input-to-state stability [1], except no stability property is required.

β€’ Most methods of finding discrepancy of π‘₯ = 𝑓(π‘₯) can be modified to find IS discrepancy systems with linear input π‘₯ = 𝑓 π‘₯ + 𝐡𝑒.

9 HSCC 2014, Berlin [1] Angeli D. TAC. 2009

Page 10: Proofs from Simulations and Modular Annotations€¦ · discrepancy of the system if for any two states πœƒ1 and πœƒ2∈Θ, For any , Vπœ‰πœƒ, ,πœ‰πœƒβ€², ≀ |πœƒβˆ’πœƒβ€²|,

IS Discrepancy ⟹ Reachability

β€’ We will build a reduced model 𝑀(𝛿) with a unique trajectory πœ‡(𝑑) using the IS Discrepancy.

β€’ Theorem: π‘…π‘’π‘Žπ‘β„Ž(𝐡𝛿𝑉 πœƒ , 𝑇) βŠ† π΅πœ‡ 𝑑

𝑉 (πœ‰(πœƒ, 𝑑))π‘‘βˆˆ[0,𝑇]

β€’ Theorem: for small enough 𝛿 and precise enough simulation, the over-approximation can be computed arbitrarily precise.

πœƒ

πœ‰(πœƒ, 𝑑) πœ‡(𝑑)

𝛿

10 HSCC 2014, Berlin

Page 11: Proofs from Simulations and Modular Annotations€¦ · discrepancy of the system if for any two states πœƒ1 and πœƒ2∈Θ, For any , Vπœ‰πœƒ, ,πœ‰πœƒβ€², ≀ |πœƒβˆ’πœƒβ€²|,

Construction of the Reduced Model

β€’ Reduced model 𝑀 𝛿

β€’ π‘₯ = 𝑓𝑀(π‘₯) with π‘₯ = βŸ¨π‘š1, π‘š2, π‘π‘™π‘˜βŸ©

β€’

π‘š1π‘š2

π‘π‘™π‘˜

=

𝛽1 𝛿,π‘π‘™π‘˜ +𝛾1 (π‘š2)

𝛽2 𝛿,π‘π‘™π‘˜ +𝛾2 (π‘š1)

1

β€’ π‘šπ‘– 0 = 𝛽𝑖 𝛿, 0 , π‘π‘™π‘˜ 0 = 0

β€’ 𝑀(𝛿) has a unique trajectory πœ‡(𝑑).

πœ‰1, 𝑒2

πœ‰2, 𝑒1

11 HSCC 2014, Berlin

Page 12: Proofs from Simulations and Modular Annotations€¦ · discrepancy of the system if for any two states πœƒ1 and πœƒ2∈Θ, For any , Vπœ‰πœƒ, ,πœ‰πœƒβ€², ≀ |πœƒβˆ’πœƒβ€²|,

Reduced Model ⟹ Bloating Factor

β€’ Lemma: |πœƒ1 βˆ’ πœƒ1β€² | ≀ 𝛿, and |πœƒ2 βˆ’ πœƒ2

β€² | ≀ 𝛿 ⟹ 𝑉1 πœ‰1 𝑑 , πœ‰1

β€² 𝑑 ≀ π‘š1(𝑑), and 𝑉2 πœ‰2 𝑑 , πœ‰2β€² 𝑑 ≀ π‘š2(𝑑).

12

The IS Discrepancy functions:

𝑉1 πœ‰1 𝑑 , πœ‰1β€² 𝑑 ≀ 𝛽1 πœƒ1 βˆ’ πœƒ1

β€² , 𝑑 + 0𝑑𝛾1(|πœ‰2(𝑠) βˆ’ πœ‰2

β€² (𝑠)|)𝑑𝑠

𝑉2 πœ‰2 𝑑 , πœ‰2β€² 𝑑 ≀ 𝛽2 πœƒ2 βˆ’ πœƒ2β€² , 𝑑 + 0

𝑑𝛾2(|πœ‰1(𝑠) βˆ’ πœ‰1

β€²(𝑠)|)𝑑𝑠

The ODE of the reduced model 𝑀(𝛿) :

π‘š1

π‘š2

π‘π‘™π‘˜

=𝛽1 𝛿, π‘π‘™π‘˜ + 𝛾1 (π‘š2)

𝛽2 𝛿, π‘π‘™π‘˜ + 𝛾2 (π‘š1)1

πœƒ

πœ‰(πœƒ, 𝑑) πœ‡(𝑑)

𝛿

β€’ Thus, bloating πœ‰(πœƒ, 𝑑) by πœ‡(𝑑) gives an over-approximation of reach set from a ball.

HSCC 2014, Berlin

Page 13: Proofs from Simulations and Modular Annotations€¦ · discrepancy of the system if for any two states πœƒ1 and πœƒ2∈Θ, For any , Vπœ‰πœƒ, ,πœ‰πœƒβ€², ≀ |πœƒβˆ’πœƒβ€²|,

Simulation & Modular Annotation ⟹ Proof

13

Simulation Engine

Reach set over-

approximation

Reduced Model

Pace Maker

Trajectory

Bloating factor

IS Discrepancy

HSCC 2014, Berlin

Sat Inv?

Proof

Counter Example

Refinement

Page 14: Proofs from Simulations and Modular Annotations€¦ · discrepancy of the system if for any two states πœƒ1 and πœƒ2∈Θ, For any , Vπœ‰πœƒ, ,πœ‰πœƒβ€², ≀ |πœƒβˆ’πœƒβ€²|,

Soundness and Relative Complete

β€’ Robustness Assumption: β€’ Invariant is closed.

β€’ If an initial set Θ satisfies the invariant, βˆƒπœ– > 0, such that all trajectories are at least πœ– distance from the boundary of the invariant.

β€’ Theorem: the Algorithm is sound and relatively complete

β€’ We verify systems with upto 30 dimensions in minutes.

14 HSCC 2014, Berlin

System # Variables # Module # Init. cover Run Time

Lin. Sync 24 6 128 135.1

Nonli. WT 30 6 128 140.0

Nonli. Robot 6 2 216 166.8

Page 15: Proofs from Simulations and Modular Annotations€¦ · discrepancy of the system if for any two states πœƒ1 and πœƒ2∈Θ, For any , Vπœ‰πœƒ, ,πœ‰πœƒβ€², ≀ |πœƒβˆ’πœƒβ€²|,

Conclusion

β€’ A scalable technique to verify nonlinear dynamical systems using modular annotations

β€’ Modular annotations are used to construct a reduced model of the overall system whose trajectory gives the discrepancy of trajectories

β€’ Sound and relatively complete β€’ Ongoing: extension to hybrid, cardiac cell network with 5 cells each has 4

continuous var. and 29 locations β€’ Thank you for your attention!

15 HSCC 2014, Berlin


Recommended