cis 4930 6930 principles of cyber physical systems
play

CIS 4930/6930: Principles of Cyber-Physical Systems Chapter 4: - PowerPoint PPT Presentation

CIS 4930/6930: Principles of Cyber-Physical Systems Chapter 4: Hybrid Systems - Hybrid Automata Hao Zheng Department of Computer Science and Engineering University of South Florida Ref.: An Introduction to Hybrid Automata


  1. CIS 4930/6930: Principles of Cyber-Physical Systems Chapter 4: Hybrid Systems - Hybrid Automata Hao Zheng Department of Computer Science and Engineering University of South Florida Ref.: An Introduction to Hybrid Automata http://link.springer.com/chapter/10.1007%2F0-8176-4404-0_21 Skip sec. 3.2, 4.2, skim sec. 5. H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 1 / 31

  2. Hybrid Automata: Syntax H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 2 / 31

  3. A hybrid automata is defined with (ignoring discrete variables) • L : a finite set of locations. • l 0 ∈ L : the initial location. • X : a finite set of real-valued variables. • A : a finite set of actions. • E : a finite set of edges connecting locations. • Inv : location invariants. • Flow : definition of continuous evolution on ( X ∪ ˙ X ) in locations. • Init : initial values of X ∪ ˙ X . For each e ∈ E , e = ( l 1 , α, Jump , l 2 ) where • α ∈ A is an action, • Jump defines how X ∪ X ′ are updated when e happens. X ′ represents updates to X after e is taken. H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 3 / 31

  4. A Running Example H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 4 / 31

  5. A Running Example • When the burner is Off , water temp. x decreses def’ed by x ( t ) = Ie − Kt when x ( t ) > 20. • I : initial water temp.. • K : heat transfer constant of tank. H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 5 / 31

  6. A Running Example • When the burner is Off , water temp. x decreses def’ed by x ( t ) = Ie − Kt when x ( t ) > 20. • I : initial water temp.. • K : heat transfer constant of tank. • When x ≤ 20, x stays constant. H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 5 / 31

  7. A Running Example • When the burner is Off , water temp. x decreses def’ed by x ( t ) = Ie − Kt when x ( t ) > 20. • I : initial water temp.. • K : heat transfer constant of tank. • When x ≤ 20, x stays constant. • When the burner is On , water temp. x decreses def’ed by x ( t ) = Ie − Kt + h (1 − e − Kt ) when x ( t ) < 100. • h : constant relative to the power of the burner. H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 5 / 31

  8. A Running Example • When the burner is Off , water temp. x decreses def’ed by x ( t ) = Ie − Kt when x ( t ) > 20. • I : initial water temp.. • K : heat transfer constant of tank. • When x ≤ 20, x stays constant. • When the burner is On , water temp. x decreses def’ed by x ( t ) = Ie − Kt + h (1 − e − Kt ) when x ( t ) < 100. • h : constant relative to the power of the burner. • When x = 100, x stays 100. H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 5 / 31

  9. A Possible Behavior of the Tank H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 6 / 31

  10. Water Tank: Hybrid Automata t 1 t 2 B , x = 100 ∧ x ′ = x x = K ( h − x ) ˙ x = 0 ˙ 20 ≤ x ≤ 100 x = 100 Off , x ′ = x Off , x = x ′ = 0 On , x = x ′ On , x ′ = x t 4 t 3 x = − Kx x = 0 ˙ ˙ C , x = 20 ∧ x ′ = x x = 20 20 ≤ x ≤ 100 H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 7 / 31

  11. Hybrid Automata: Semantics H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 8 / 31

  12. Transitions Let η : X − → R . • A state of a hybrid automata is ( l , η ). • The initial state is ( l 0 , η 0 ). e − → ( l 2 , η 2 ) Discrete transition: ( l 1 , η 1 ) • An edge e = ( l 1 , α, Jump , l 2 ) ∈ E is enabled/executable in a state ( l 1 , η 1 ) if • η 1 | = Jump ( X ), and • there is a matching synchronization action to α . • A new state ( l 2 , η 2 ) after executing e such that η 2 | = Jump ( X ′ ) . H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 9 / 31

  13. Transitions (Cont’d) δ → ( l , η 2 ) , δ ∈ R + Continuous transition: ( l , η 1 ) − There is a differentiable function f : [0 , δ ] − → R m , with the first derivative ˙ → R m , such that f : [0 , δ ] − • f (0) = η 1 , • f ( δ ) = η 2 , = Inv ( l ) and ˙ • For all t ∈ [0 , δ ], f ( t ) | f ( t ) | = Flow ( l ). Intuitively, a hybrid automata can stay in a location by letting time pass by without violating the location invariant, and the valuation of X during that period of time is constrained by the flow condition labeled in that location. H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 10 / 31

  14. Execution Traces e δ • Execution step: − → = − → ∪ − → • Execution trace: ( l 0 , u 0 ) − → ( l 1 , η 1 ) − → ( l 2 , η 2 ) . . . • Reachability: ( i , η ) is reachable if there exists a trace ( l 0 , η 0 ) − → ( l 1 , η 1 ) . . . − → ( l n , η n ) such that l = l n and u = η n . H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 11 / 31

  15. t 1 B , x = 100 ∧ x ′ = x t 2 x = K ( h − x ) ˙ x = 0 ˙ 20 ≤ x ≤ 100 x = 100 Off , x ′ = x On , x = x ′ Off , x = x ′ On , x ′ = x t 4 t 3 x = − Kx x = 0 ˙ ˙ C , x = 20 ∧ x ′ = x 20 ≤ x ≤ 100 x = 20 On ( t 4 , x = 20) − → ( t 1 , x = 20) H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 12 / 31

  16. t 1 B , x = 100 ∧ x ′ = x t 2 x = K ( h − x ) ˙ x = 0 ˙ 20 ≤ x ≤ 100 x = 100 Off , x ′ = x On , x = x ′ Off , x = x ′ On , x ′ = x t 4 t 3 x = − Kx x = 0 ˙ ˙ C , x = 20 ∧ x ′ = x 20 ≤ x ≤ 100 x = 20 On 10 ( t 4 , x = 20) − → ( t 1 , x = 20) − → ( t 1 , x = 88 . 59) H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 12 / 31

  17. t 1 B , x = 100 ∧ x ′ = x t 2 x = K ( h − x ) ˙ x = 0 ˙ 20 ≤ x ≤ 100 x = 100 Off , x ′ = x On , x = x ′ Off , x = x ′ On , x ′ = x t 4 t 3 x = − Kx x = 0 ˙ ˙ C , x = 20 ∧ x ′ = x 20 ≤ x ≤ 100 x = 20 On 10 2 . 74 ( t 4 , x = 20) − → ( t 1 , x = 20) − → ( t 1 , x = 88 . 59) − − → ( t 1 , x = 100) H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 12 / 31

  18. t 1 B , x = 100 ∧ x ′ = x t 2 x = K ( h − x ) ˙ x = 0 ˙ 20 ≤ x ≤ 100 x = 100 Off , x ′ = x On , x = x ′ Off , x = x ′ On , x ′ = x t 4 t 3 x = − Kx x = 0 ˙ ˙ C , x = 20 ∧ x ′ = x 20 ≤ x ≤ 100 x = 20 On 10 2 . 74 ( t 4 , x = 20) − → ( t 1 , x = 20) − → ( t 1 , x = 88 . 59) − − → ( t 1 , x = 100) B − → ( t 2 , x = 100) H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 12 / 31

  19. t 1 B , x = 100 ∧ x ′ = x t 2 x = K ( h − x ) ˙ x = 0 ˙ 20 ≤ x ≤ 100 x = 100 Off , x ′ = x On , x = x ′ Off , x = x ′ On , x ′ = x t 4 t 3 x = − Kx x = 0 ˙ ˙ C , x = 20 ∧ x ′ = x 20 ≤ x ≤ 100 x = 20 On 10 2 . 74 ( t 4 , x = 20) − → ( t 1 , x = 20) − → ( t 1 , x = 88 . 59) − − → ( t 1 , x = 100) B 5 − → ( t 2 , x = 100) − → ( t 2 , x = 100) H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 12 / 31

  20. t 1 B , x = 100 ∧ x ′ = x t 2 x = K ( h − x ) ˙ x = 0 ˙ 20 ≤ x ≤ 100 x = 100 Off , x ′ = x On , x = x ′ Off , x = x ′ On , x ′ = x t 4 t 3 x = − Kx x = 0 ˙ ˙ C , x = 20 ∧ x ′ = x 20 ≤ x ≤ 100 x = 20 On 10 2 . 74 ( t 4 , x = 20) − → ( t 1 , x = 20) − → ( t 1 , x = 88 . 59) − − → ( t 1 , x = 100) B 5 Off − → ( t 2 , x = 100) − → ( t 2 , x = 100) − − → ( t 3 , x = 100) H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 12 / 31

  21. t 1 B , x = 100 ∧ x ′ = x t 2 x = K ( h − x ) ˙ x = 0 ˙ 20 ≤ x ≤ 100 x = 100 Off , x ′ = x On , x = x ′ Off , x = x ′ On , x ′ = x t 4 t 3 x = − Kx x = 0 ˙ ˙ C , x = 20 ∧ x ′ = x 20 ≤ x ≤ 100 x = 20 On 10 2 . 74 ( t 4 , x = 20) − → ( t 1 , x = 20) − → ( t 1 , x = 88 . 59) − − → ( t 1 , x = 100) B 5 Off − → ( t 2 , x = 100) → ( t 2 , x = 100) − − − → ( t 3 , x = 100) 8 − → ( t 3 , x = 54 . 88) , . . . H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 12 / 31

  22. Composing Hybrid Automata H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 13 / 31

  23. Parallel Composition of Hyrbid Automata Two HAs H 1 = ( L 1 , l 10 , X 1 , A 1 , E 1 , Inv 1 , Flow 1 , Init 1 ) and H 2 = ( L 2 , l 20 , X 2 , A 2 , E 2 , Inv 2 , Flow 2 , Init 2 ) such that L 1 ∩ L 2 = ∅ , their parallel composition, H 1 � H 2 is a HA ( L , l 0 , C , A , E , Inv ) where • L = L 1 × L 2 , • l 0 = ( l 10 , l 20 ); • X = X 1 ∪ X 2 , • A = A 1 ∪ A 2 , • E = { . . . } , defined in the next slide, • Inv ( l 1 , l 2 ) = Inv 1 ( l 1 ) ∧ Inv 2 ( l 2 ) for all ( l 1 , l 2 ) ∈ L , • Flow ( l 1 , l 2 ) = Flow 1 ( l 1 ) ∧ Flow 2 ( l 2 ) for all ( l 1 , l 2 ) ∈ L , • Init = Init 1 ∧ Init 2 . H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 14 / 31

  24. Parallel Composition of Timed Automata E = { ( l 1 , l 2 ) , α, Jump , ( l ′ 2 ) } includes edges defined as follows. 1 , l ′ 1 ) ∈ E 1 2 ) ∈ E 2 ( l 1 , α, Jump 1 , l ′ ( l 2 , α, Jump 2 , l ′ Sync (( l 1 , l 2 ) , α, Jump 1 ∧ Jump 2 , ( l ′ 1 , l ′ 2 )) ∈ E 1 ) ∈ E 1 ∈ A 2 ( l 1 , α, Jump 1 , l ′ α / Async x ∈ X 2 − X 1 x ′ = x , ( l ′ (( l 1 , l 2 ) , α, Jump 1 ∧ � 1 , l 2 )) ∈ E ( l 2 , α, cc 2 , reset 2 , l ′ 2 ) ∈ E 2 α / ∈ A 1 Async x ∈ X 1 − X 2 x ′ = x , ( l 1 , l ′ (( l 1 , l 2 ) , α, Jump 2 ∧ � 2 )) ∈ E H. Zheng (CSE USF) CIS 4930/6930: Principles of CPS 15 / 31

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend