Invariant-Based Verification and Synthesis for Hybrid Systems - - PowerPoint PPT Presentation

invariant based verification and synthesis for hybrid
SMART_READER_LITE
LIVE PREVIEW

Invariant-Based Verification and Synthesis for Hybrid Systems - - PowerPoint PPT Presentation

Invariant-Based Verification and Synthesis for Hybrid Systems Naijun Zhan Institute of Software, Chinese Academy of Sciences (Joint work with Hengjun Zhao, Jiang Liu, Deepak Kapur, Kim G. Larsen, Liang Zou, etc.) IFIP WG 2.2 Scientific


slide-1
SLIDE 1

Invariant-Based Verification and Synthesis for Hybrid Systems

Naijun Zhan

Institute of Software, Chinese Academy of Sciences (Joint work with Hengjun Zhao, Jiang Liu, Deepak Kapur, Kim G. Larsen, Liang Zou, etc.)

IFIP WG 2.2 Scientific Meeting, IMS, Singapore

  • Sept. 12-16, 2016
slide-2
SLIDE 2

Outline

  • Background
  • Invariant and Verification
  • Invariant-Based Synthesis
  • Case Studies
  • Conclusion

2

slide-3
SLIDE 3

Outline

  • Background
  • Invariant and Verification
  • Invariant-Based Synthesis
  • Case Studies
  • Conclusion

3

slide-4
SLIDE 4

Classification of Dynamical Systems

  • Discrete
  • Continuous

4

ON

) ( d d x f t x  x ) (t x

OFF

slide-5
SLIDE 5

Hybrid System

  • Continuous + Discrete

5

by Heer Rami http://www.benettonplay.com/toys/flipbookdeluxe/player.php?id=294504

Universal Law of Gravitation

slide-6
SLIDE 6

Hybrid Automata

6

) (

1 x

f x  ) (

2 x

f x 

domain guard transition Initial

slide-7
SLIDE 7

HSs in Engineering

7

Electrical Circuits Chemical Process

http://people.ee.ethz.ch/~mpt/2/docs/demos/twotanks.php

slide-8
SLIDE 8

Embedded Control Systems

8

logic/computation sensor actuator physical discipline

slide-9
SLIDE 9

Safety Critical Systems

9

slide-10
SLIDE 10

Motivation

  • Develop formal methods for enhancing the

trustworthiness of safety critical embedded systems

Problems: Verification and Design System Requirements: mainly safety Techniques: symbolic/rigorous computation

10

slide-11
SLIDE 11

Outline

  • Background
  • Invariant and Verification
  • Invariant-Based Synthesis
  • Case Studies
  • Conclusion

11

slide-12
SLIDE 12

Deductive Verification

  • Program

x:=1; while (x<=1000000000) { x:=x+1; } x≦0

  • Inductive Invariant

 x=1  x≧1  x≧1  x+1≧1  x≧1  ﹁(x≦0)

12

  • Continuous system

) ( d d x f t x 

Inductive Invariant

slide-13
SLIDE 13

Inductiveness

  • Discrete
  • Inductiveness
  • Transition relation

13

  • Continuous
  • Inductiveness
  • Transition relation

I x I x

k k

  

1

) (

1 k k

x x  

Δt

I t t x I t x    

 )

( ) (

t t x t x t t x

 

    ) ( ) ( ) (

'

I I

slide-14
SLIDE 14

Lie Derivatives and Invariant

14

) ( d d x f t x 

p(x) > 0 p(x) = 0

d )) ( ( d  t t x p d )) ( ( d  t t x p d )) ( ( d  t t x p

slide-15
SLIDE 15

Higher-Order Lie Derivatives

15

p(x) > 0 p(x) = 0

d )) ( ( d  t t x p

d d

1 1

 t p d d d d

2 2 1 1

    t p t p d d d d d d

3 3 2 2 1 1

      t p t p t p         d d d d d d

3 3 2 2 1 1

t p t p t p

slide-16
SLIDE 16

Criterion for Invariant

16

      0 d d

1 1

t p     d d d d

2 2 1 1

t p t p           d d d d d d

2 2 1 1 N N

t p t p t p 

) ( d d x f t x 

  • f(x) and p(x) are polynomials
  • Compute an upper bound N s.t.
  • p(x) ≥ 0 is an inductive invariant of

iff

 0 p   

slide-17
SLIDE 17

Main Result

  • Semi-algebraic set

,

  • First-order theory of real numbers is decidable

Quantifier Elimination

17

Checking whether a semi-algebraic set is an inductive invariant of a polynomial continuous dynamical systems is decidable

slide-18
SLIDE 18

Parametric Case

  • Parametric polynomials p(u,x)
  • p(u,x) ≥ 0 is an inductive invariant of

iff u satisfies

18

      0 d d

1 1

t p     d d d d

2 2 1 1

t p t p           d d d d d d

2 2 1 1 N N

t p t p t p   0 ) , ( x u p   

Use parametric polynomials and quantifier elimination (or other compuation techniques) to automatically discovering inductive invariants

) ( d d x f t x 

slide-19
SLIDE 19

Inductive Invariant of HSs

19

2 1, Inv

Inv

Init Inv1 Inv2

1

Inv Init 

2 12 1

Inv G Inv  

1 21 2

Inv G Inv  

) (

1 x

f x 

) (

2 x

f x  

12

G

21

G

slide-20
SLIDE 20

Safety Verification

20

S Inv

                      y x x y y x 3

3

 

  • Try to generate an

invariant that implies the safety property

  • Example
slide-21
SLIDE 21

Outline

  • Background
  • Invariant and Verification
  • Invariant-Based Synthesis
  • Case Studies
  • Conclusion

21

slide-22
SLIDE 22

Problem Description

  • Given an initial specification of a hybrid

system and a safety requirement, construct a refined hybrid system such that the safety requirement is satisfied

domains guards

22

slide-23
SLIDE 23

Nuclear Reactor

23

http://commons.wikimedia.org/wiki/File:Control_rods_schematic.svg

slide-24
SLIDE 24

Hybrid Automata Model

  • x: temperature of the reactor
  • p: fraction of the rod immersed into the reactor

24

slide-25
SLIDE 25

Violation of Safety

  • 510 x 550

25

x p

550 510 1

slide-26
SLIDE 26

Invariant for Refinement

26

Domain1 Domain2 Guard12

S

Inv

slide-27
SLIDE 27

Result

27

92 . 547 12 6575   x

Inv

slide-28
SLIDE 28

Optimization

  • Further refine the hybrid system according to

certain optimization criteria

  • polynomial objective function +

semi-algebraic feasible region

Symbolic optimization

28

slide-29
SLIDE 29

Outline

  • Background
  • Invariant and Verification
  • Invariant-Based Synthesis
  • Case Studies

Oil pump Lunar lander

  • Conclusion

29

slide-30
SLIDE 30

Oil Pump Switching

  • First studied in

[Cassez et al. HSCC09, 45% improvement]

  • Provided by the German

company HYDAC

  • Determine the time points

to switch the pump on/off s.t.

Safety: Optimality:

minimize

30

slide-31
SLIDE 31

Synthesized Switching Controller

  • v0 is the initial volume of oil

31

  • n off
  • n
  • ff
slide-32
SLIDE 32
  • Safety
  • Improve the optimal value of [HSCC09] by 7.5%
  • The synthesized controller is correct, also optimal 32

Performance

slide-33
SLIDE 33

Soft Landing

33

15km 3km 2.4km 100m 30m 0m Braking Adjustment Approach Obstacle avoidance Slow descent

Lunar surface

Hovering

slide-34
SLIDE 34

Slow Descent Phase

  • Trajectory control
  • Sampling period:∆T = 0.128s
  • Control objective: v = -2m/s

34

slide-35
SLIDE 35

Hybrid Automata Model

  • Dynamics
  • Replace the non-polynomial term by a new

variable: a = Fc/m

slide-36
SLIDE 36

Verification

  • Safety requirement: |v – (-2)|

0.05

  • Generated Invariant:

36

Kong, H., He, F., Song, X., Hung,W., Gu, M.: Exponential-condition-based barrier certificate generation for safety verification of hybrid systems. In: CAV’13. pp. 242–257 (2013)

slide-37
SLIDE 37

Conclusion

  • Hybrid systems attracts more and more interests with

the development of safety critical embedded systems

  • Invariant plays an important role in the study (formal

verification, controller synthesis) of hybrid systems

  • Semi-algebraic inductive invariant checking for

polynomial continuous/hybrid systems is decidable

37

slide-38
SLIDE 38

Conclusion

  • Use parametric polynomials and symbolic computation

to automatically discover invariants, and to perform

  • ptimization

 rigorous  high complexity (may be combined with numeric computation)  Non-polynomial systems transformed to polynomials ones

  • Case studies show good prospect of proposed methods

38

slide-39
SLIDE 39

Related references

  • Hengjun Zhao, Mengfei Yang, Naijun Zhan, Bin Gu, Liang Zou and Yao Chen (2014):

Formal verification of a descent guidance control program of a lunar lander, in

  • Proc. of FM 2014, Lecture Notes in Computer Science 8442, pp.733-748.
  • Hengjun Zhao, Naijun Zhan and Deepak Kapur (2013): Synthesizing switching

controllers for hybrid systems by generating invariants, in Proc. of the Jifeng Festschrift, Lecture Notes in Computer Science 8051, pp.354-373.

  • Hengjun Zhao, Naijun Zhan, Deepak Kapur, and Kim G. Larsen (2012): A “hybrid”

approach for synthesizing optimal controllers of hybrid systems: A Case study of the oil pump industrial example, in Proc. of FM 2012, Lecture Notes in Computer Science 7436, pp.471-485, 2012.

  • Jiang Liu, Naijun Zhan and Hengjun Zhao (2011):Computing semi-algebraic

invariants for polynomial dynamical systems, in Proc. of EMSOFT 2011, pp.97-106, ACM Press.

39

slide-40
SLIDE 40

Thanks! Questions?

40