Top Banner
Proofs from Simulations and Modular Annotations Zhenqi Huang and Sayan Mitra Department of Electrical and Computer Engineering University of Illinois at Urbana-Champaign
15

Proofs from Simulations and Modular Annotationsโ‚ฌยฆย ยท discrepancy of the system if for any two states ๐œƒ1 and ๐œƒ2โˆˆฮ˜, For any , V๐œ‰๐œƒ, ,๐œ‰๐œƒโ€ฒ, โ‰ค |๐œƒโˆ’๐œƒโ€ฒ|,

Oct 19, 2020

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
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