Formal Verification of Cyber-Physical Systems Matthew Chan , Daniel - - PowerPoint PPT Presentation

formal verification of cyber physical systems
SMART_READER_LITE
LIVE PREVIEW

Formal Verification of Cyber-Physical Systems Matthew Chan , Daniel - - PowerPoint PPT Presentation

Formal Verification of Cyber-Physical Systems Matthew Chan , Daniel Ricketts, Sorin Lerner, Gregory Malecha University of California, San Diego veridrone.ucsd.edu Cyber-Physical Systems Cyber-Physical Systems Cyber-Physical Systems


slide-1
SLIDE 1

Formal Verification of Cyber-Physical Systems

Matthew Chan, Daniel Ricketts, Sorin Lerner, Gregory Malecha University of California, San Diego veridrone.ucsd.edu

slide-2
SLIDE 2

Cyber-Physical Systems

slide-3
SLIDE 3

Cyber-Physical Systems

slide-4
SLIDE 4

Cyber-Physical Systems

slide-5
SLIDE 5

Cyber-Physical Systems

slide-6
SLIDE 6

Cyber-Physical Systems

slide-7
SLIDE 7

Cyber-Physical Systems

slide-8
SLIDE 8

Cyber-Physical Systems

Program

slide-9
SLIDE 9

Cyber-Physical Systems

World Program

slide-10
SLIDE 10

Cyber-Physical Systems

World Program

Sensor

slide-11
SLIDE 11

Cyber-Physical Systems

World Program

Actuator Sensor

slide-12
SLIDE 12

Cyber-Physical Systems

Program World

slide-13
SLIDE 13

Program

World

v t

slide-14
SLIDE 14

Program

World

v t

slide-15
SLIDE 15

Program

World

v t

slide-16
SLIDE 16

Program

World

v t

{

slide-17
SLIDE 17

Program

World

x t

{

slide-18
SLIDE 18

Program

World

v t

{

slide-19
SLIDE 19

Program World

v t

{

slide-20
SLIDE 20

Outline

slide-21
SLIDE 21

Outline

  • How we formalize CPSs in Coq
slide-22
SLIDE 22

Outline

  • How we formalize CPSs in Coq
  • Stability (graphically)
slide-23
SLIDE 23

Outline

  • How we formalize CPSs in Coq
  • Stability (graphically)
  • Lyapunov Stability
slide-24
SLIDE 24

Outline

  • How we formalize CPSs in Coq
  • Stability (graphically)
  • Lyapunov Stability
  • Exponential Stability
slide-25
SLIDE 25

Outline

  • How we formalize CPSs in Coq
  • Stability (graphically)
  • Lyapunov Stability
  • Exponential Stability
  • Proving Stability using Lyapunov Functions
slide-26
SLIDE 26

Program

Actuator Sensor

World

slide-27
SLIDE 27

Program

Actuator Sensor

World

a! = − v ∆

slide-28
SLIDE 28

Program

Actuator Sensor

World

a! = − v ∆

v

slide-29
SLIDE 29

Program

Actuator Sensor

World

a! = − v ∆ a!

v

slide-30
SLIDE 30

Program

Actuator Sensor

World

a! = − v ∆

∂v ∂t = a a!

v

slide-31
SLIDE 31

Program World

a! = − v ∆

∂v ∂t = a

slide-32
SLIDE 32

Program World

a! = − v ∆

∂v ∂t = a

slide-33
SLIDE 33

Program World

⇤( )

a! = − v ∆

∂v ∂t = a

slide-34
SLIDE 34

`

P

Program World

⇤( )

a! = − v ∆ ˙ x = ∂v ∂t = a

slide-35
SLIDE 35

`

Safe

Program World

⇤( ) ⇤(

slide-36
SLIDE 36

`

Safe

Program World

⇤( )

[Ricketts et al. MEMOCODE 15]

Velocity Height Boundary box …etc

⇤(

slide-37
SLIDE 37

`

Program World

⇤( )

Stable

⇤(

slide-38
SLIDE 38

Stability

slide-39
SLIDE 39
slide-40
SLIDE 40
slide-41
SLIDE 41
slide-42
SLIDE 42
slide-43
SLIDE 43

Lyapunov stability

slide-44
SLIDE 44

Lyapunov stability

v t

slide-45
SLIDE 45

Lyapunov stability

∀α > 0 → ∃

{

α

v t

slide-46
SLIDE 46

Lyapunov stability

∀α > 0 → ∃β > 0 ∧ (|x| < β)

{

α

{

β

v t

slide-47
SLIDE 47

Lyapunov stability

∀α > 0 → ∃β > 0 ∧ (|x| < β) → ⇤(|x| < α) v t

slide-48
SLIDE 48

Lyapunov stability

∀α > 0 → ∃β > 0 ∧ (|x| < β) → ⇤(|x| < α) v t

slide-49
SLIDE 49

Lyapunov stability

∀α > 0 → ∃β > 0 ∧ (|x| < β) → ⇤(|x| < α) v t

slide-50
SLIDE 50

Lyapunov stability

∀α > 0 → ∃β > 0 ∧ (|x| < β) → ⇤(|x| < α) v t

slide-51
SLIDE 51

Proving Lyapunov stability

v t

slide-52
SLIDE 52

Proving Lyapunov stability

∀α > 0 → ∃β > 0 ∧ (|x| < β) → ⇤(|x| < α) v t

slide-53
SLIDE 53

Proving Lyapunov stability

∀α > 0 → ∃β > 0 ∧ (|x| < β) → ⇤(|x| < α) v t

slide-54
SLIDE 54

Proof Sketch

slide-55
SLIDE 55

Proof Sketch

Spec = Ctrl ∨ World

slide-56
SLIDE 56

Proof Sketch

Spec = Ctrl ∨ World

a! = − v ∆

slide-57
SLIDE 57

Proof Sketch

Spec = Ctrl ∨ World

a! = − v ∆ ∂v ∂t = a

slide-58
SLIDE 58

Proof Sketch

Spec = Ctrl ∨ World

a! = − v ∆ ∂v ∂t = a

Inv = v < 0 → −vt ≤ x ∧ v ≥ 0 → vt ≤ −x

slide-59
SLIDE 59

Proof Sketch

Spec = Ctrl ∨ World

a! = − v ∆ ∂v ∂t = a

Spec ` (Inv ! next(Inv))

Inv = v < 0 → −vt ≤ x ∧ v ≥ 0 → vt ≤ −x

slide-60
SLIDE 60

Improving Lyapunov stability

v t

slide-61
SLIDE 61

Exponential stability

Displacement (x)

`

v t

∃α > 0, ∃γ > 0 ∧ ⇤(|v| ≤ αe−γ(t−t0))

slide-62
SLIDE 62

Exponential stability

Displacement (x)

`

v t

∃α > 0, ∃γ > 0 ∧ ⇤(|v| ≤ αe−γ(t−t0))

slide-63
SLIDE 63

Exponential stability

Displacement (x)

`

v t

∃α > 0, ∃γ > 0 ∧ ⇤(|v| ≤ αe−γ(t−t0))

slide-64
SLIDE 64

Displacement (x)

`

Exponential stability

v t

∃α > 0, ∃γ > 0 ∧ ⇤(|v| ≤ αe−γ(t−t0))

slide-65
SLIDE 65

Exponential stability

Displacement (x)

`

v t

∃α > 0, ∃γ > 0 ∧ ⇤(|v| ≤ αe−γ(t−t0))

slide-66
SLIDE 66

Exponential stability

Displacement (x)

`

v t

∃α > 0, ∃γ > 0 ∧ ⇤(|v| ≤ αe−γ(t−t0))

slide-67
SLIDE 67

Proving Exponential stability

v t

∃α > 0, ∃γ > 0 ∧ ⇤(|v| ≤ αe−γ(t−t0))

slide-68
SLIDE 68

Proving Exponential stability

where v t

∃α > 0, ∃γ > 0 ∧ ⇤(|v| ≤ αe−γ(t−t0))

α = c|v0| γ = 1 ∆

slide-69
SLIDE 69

Proving Exponential stability

v t where

∃α > 0, ∃γ > 0 ∧ ⇤(|v| ≤ αe−γ(t−t0))

α = c|v0| γ = 1 ∆

slide-70
SLIDE 70

Proving Exponential stability

v t where

∃α > 0, ∃γ > 0 ∧ ⇤(|v| ≤ αe−γ(t−t0))

α = c|v0| γ = 1 ∆

slide-71
SLIDE 71

Proving Stability with Lyapunov Functions

The difficulty of proving stability manually is

slide-72
SLIDE 72

Proving Stability with Lyapunov Functions

The difficulty of proving stability manually is

  • explicit reasoning about time
slide-73
SLIDE 73

Proving Stability with Lyapunov Functions

The difficulty of proving stability manually is

  • explicit reasoning about time
  • complicated inductive invariants
slide-74
SLIDE 74

Proving Stability with Lyapunov Functions

The difficulty of proving stability manually is

  • explicit reasoning about time
  • complicated inductive invariants
  • manual proof of Lyapunov stability is 190 lines;

46 lines using Lyapunov function

slide-75
SLIDE 75

Lyapunov functions

E(v) v

slide-76
SLIDE 76

Lyapunov functions

E(v) v

slide-77
SLIDE 77

Lyapunov functions

E(0) = 0

E(v) 0, v 6= 0

slide-78
SLIDE 78

Lyapunov functions

E(0) = 0

E(v) 0, v 6= 0

Lyapunov stable: ˙ E(v) ≤ 0

slide-79
SLIDE 79

Lyapunov functions

E(0) = 0

E(v) 0, v 6= 0

Lyapunov stable: ˙ E(v) ≤ 0

˙ E(v) ≤ αE(v)

Exponentially stable:

slide-80
SLIDE 80

Recap

slide-81
SLIDE 81

Recap

  • How we formalize CPSs in Coq
slide-82
SLIDE 82

Recap

  • How we formalize CPSs in Coq
  • Stability (graphically)
slide-83
SLIDE 83

Recap

  • How we formalize CPSs in Coq
  • Stability (graphically)
  • Lyapunov Stability
slide-84
SLIDE 84

Recap

  • How we formalize CPSs in Coq
  • Stability (graphically)
  • Lyapunov Stability
  • Exponential Stability
slide-85
SLIDE 85

Recap

  • How we formalize CPSs in Coq
  • Stability (graphically)
  • Lyapunov Stability
  • Exponential Stability
  • Proving Stability with Lyapunov Functions
slide-86
SLIDE 86

Lessons learned

slide-87
SLIDE 87

Lessons learned

  • Coq can be applied to continuous domains
  • I learned some Coq
  • I learned some control theory
slide-88
SLIDE 88

Lessons learned

  • Coq can be applied to continuous domains
  • I learned some Coq
  • I learned some control theory
  • Better solvers for real numbers
slide-89
SLIDE 89

Lessons learned

  • Coq can be applied to continuous domains
  • I learned some Coq
  • I learned some control theory
  • Better solvers for real numbers
  • Real analysis library could be modernized and better
  • rganized
slide-90
SLIDE 90

Thanks!

veridrone.ucsd.edu