Advanced Programming Techniques

Download Report

Transcript Advanced Programming Techniques

Theory of Hybrid Automata

Sachin J Mujumdar 09 Apr 2002 CS 367 - Theory of Hybrid Automata 1

Hybrid Automata

• A formal model for a dynamical system with discrete and continuous components • Example – Temperature Control 09 Apr 2002 CS 367 - Theory of Hybrid Automata 2

Formal Definition

A Hybrid Automaton consists of following: 1. Variables –  Finite Set (real numbered)  Continuous Change,  Values at conclusion at of discrete change,

X

 

X

 2 , 3 ,...,

x n

} 2 , 3 ,...,

x n

}

X

'  { , 1 ' ' 2 , ' 3 ,...,

x n

' } 2. Control Graph    Finite Directed Multigraph (V, E) V – control modes (represent discrete state) E – control switches (represent discrete dynamics) 09 Apr 2002 CS 367 - Theory of Hybrid Automata 3

Formal Definition

3.

  Initial, Invariant & Flow conditions – vertex labeling functions

v

 init(v) – initial condition whose free variable are from X inv(v) – free variables from X flow(v) – free variables from X U 

X

4.

Jump Conditions   Edge Labeling function, “jump” for every control switch, e Є E Free Variables from X U X’ • 5.

Events   Finite set of events, Σ Edge labeling function, event: E  Σ, for assigning an event to each control switch Continuous State – points in

R

09 Apr 2002 CS 367 - Theory of Hybrid Automata 4

Safe Semantics

• Execution of Hybrid Automaton – continuous change (flows) and discrete change (jumps) • Abstraction to fully discrete transition system • Using Labeled Transition Systems 5 09 Apr 2002 CS 367 - Theory of Hybrid Automata

Labeled Transition Systems

• Labeled Transition System, S   State Space, Q – (Q 0 – initial states) Transition Relations  Set of labels, A – possibly infinite  Binary Relations on Q,   Transition – triplet of

q q

' 09 Apr 2002 CS 367 - Theory of Hybrid Automata 6

Labeled Transition Systems

• Two Labeled Transition Systems  Timed Transition System   Abstracts continuous flows by transitions Retains info on source, target & duration of flow  Time-Abstract Transition System   Also abstracts the duration of flows Called timed-abstraction of Timed Transition Systems

S t H S H a

09 Apr 2002 CS 367 - Theory of Hybrid Automata 7

Live Semantics

• • • • Usually consider the infinite behavior of hybrid automaton. Thus, only infinite sequences of transitions considered Transitions do not converge in time Divergence of time – liveness Nonzeno – Cant prevent time from diverging 09 Apr 2002 CS 367 - Theory of Hybrid Automata 8

Live Transition Systems

• • • Trajectory of S     (In)Finite Sequence of i ≥1 Condition –

q i

 1

q i

q 0 – rooted trajectory If q 0 is initial state, then intialized trajectory Live Transition System   (S, L) pair L  infinite number of initialized trajectories of S Trace  i ≥1 is finite initialized trajectory of S, or trajectory in L  corresponding sequence i ≥1 of labels is a Trace of (S, L), i.e. the Live Transition System 09 Apr 2002 CS 367 - Theory of Hybrid Automata 9

Composition of Hybrid Automata

• • • • • Two Hybrid Automata, H 1 & H 2 Interact via joint events

a

is an event of both  Both must synchronize on

a-

transitions

a

is an event of only H 1  each

a

-transition of H 1 0-duration time transition of H 2 synchronizes with a Vice-Versa 09 Apr 2002 CS 367 - Theory of Hybrid Automata 10

Composition of Hybrid Automata

• Product of Transition Systems   Labeled Transition Systems, S 1 & S 2 Consistency Check    Associative partial function Denoted by  Defined on pairs consisting of a transition from S 1 & a transition from S 2  S 1   x S 2 w.r.t  State Space – Q 1 x Q 2   Initial States – Q0 1 Label Set x Q0 2   Transition Condition 

q

1

q

1 '

q

2

q

2  ( , 1 2 ) ' ( , 1 ' 2 ) 09 Apr 2002 CS 367 - Theory of Hybrid Automata 11

Composition of Hybrid Automata

• Parallel Composition  H 1 and H 2 

q

 1 is true

q

1 '

S t H

1

q

2 2

q

2 '

S H

2     a 1 a 1 a 2 = a 2  consistency check yields a 1 belongs to Event space of H 1 and a 2 belongs to Event space of H 2 and a 1 = 0  = 0  consistency check yields a 1 consistency check yields a 1 The Parallel Composition is defined to be the cross product w.r.t the consistency check 09 Apr 2002 CS 367 - Theory of Hybrid Automata 12

Railroad Gate Control - Example

• • • • • • Circular track, with a gate – 2000 – 5000 m circumference ‘x’ – distance of train from gate speed – b/w 40 m/s & 50 m/s x = 1000 m  “approach” event  may slow down to 30 m/s x = -100 m (100m past the gate)  “exit event” Problem    Train Automaton Gate Automaton Controller Automaton 09 Apr 2002 CS 367 - Theory of Hybrid Automata 13

Railroad Gate Control - Example

Train Automaton 09 Apr 2002 CS 367 - Theory of Hybrid Automata 14

Railroad Gate Control - Example

• • Gate Automaton y – position of gate in degrees (max 90) 9 degrees / sec 09 Apr 2002 CS 367 - Theory of Hybrid Automata 15

Railroad Gate Control - Example

Controller Automaton • • u – reaction delay of controller z – clock for measuring elapsed time Question : value of “u” so that, y = 0, whenever -10 <= x <= 10 09 Apr 2002 CS 367 - Theory of Hybrid Automata 16

Verification

• 4 paradigmatic Qs about the traces of the H Reachability  For any H, given a control mode, v, if there exists some initialized trajectory for its Labeled Transition System(LTS), can it visit the state of the form (v, x)?

• Emptiness  Given H, if there exists a divergent initialized trajectory of the LTS?

• (Finitary) Timed Trace Inclusion Problem  Given H 1 & H 2 , if every (finitary) timed trace of H 1 is also that of H 2 • (Finitary) Time-Abstract Trace Inclusion Problem  Same as above – consider time-abstract traces 09 Apr 2002 CS 367 - Theory of Hybrid Automata 17

Rectangular Automata

• • • • • Flow Conditions are independent of Control Modes First derivative, x dot, of each variable has fixed range of values, in every control mode This is independent of the control switches After a control switch – value of variable is either unchanged or from a fixed set of possibilities Each variable becomes independent of other variables • • Multirectangular Automata – allows for flow conditions that vary with control switches Triangular Automata – allows for comparison of variables 09 Apr 2002 CS 367 - Theory of Hybrid Automata 18

State Space of Hybrid Automata

• • State Space is infinite – cannot be ennumerated Studied using finite symbolic representation   x – real numbered variable 1 <= x <= 5  numbers Finite symbolic representation of an infinite set of real 09 Apr 2002 CS 367 - Theory of Hybrid Automata 19

Observational Transition Systems

• • • Difficult to (dis)prove the assertion about behavior of H – sampling of only piecewise continuous trajectory of LTS’ at discrete time intervals Reminder – Transition abstracts the information of all the intermediate states visited Solution  Label each transition with a region   transition, t, is labeled with region, R, iff all intermediate & target states of t lie in R i.e. Observational Transition System – from continuous observation of hybrid automaton 20 09 Apr 2002 CS 367 - Theory of Hybrid Automata

Summary

• • • • • • • Introduction to Hybrid Systems Formal Definition of Hybrid Systems Change from hybrid to fully-discrete systems - Safe Semantics Labeled transition Systems Composition of Hybrid Automata Properties of Hybrid Automata Observational Transition Systems • Theorems & Theories presented in paper, for further reading – “The Theory of Hybrid Automata” – Thomas A. Henzinger 09 Apr 2002 CS 367 - Theory of Hybrid Automata 21