Hybrid Systems Modeling, Analysis and Control Radu Grosu Vienna University of Technology Lecture 6
Continuous AND Discrete Systems Control Theory Continuous systems approximation, stability control, robustness Computer Science Discrete systems abstraction, composition concurrency, verification Hybrid Systems Software controlled systems Embedded real-time systems Multi-agent systems
Models and Tools Dynamic systems with continuous & discrete state variables Models Analytical Tools Software Tools Continuous Part Differential equations, transfer functions, Lyapunov functions, eigenvalue analysis, Matlab, Matrix x, VisSim, Discrete Part Automata, Petri nets, Statecharts, Boolean algebra, formal logics, verification, Statemate, Rational Rose, SMV,
Modeling a Hybrid System M odel of System M odel of P hysics M odel of S oftw are continuous dynam ics discrete dynam ics
Hybrid Automaton (HA) locations or modes (discrete states) edge guard n e : guard (x ) 0 x inv (n ) x init (m ) m x inv (m ) action (x, x ) jump transformation initial condition continuous dynamics invariant: HA m ay rem ain in m as long as x inv (m )
Example: Bouncing Ball Ball has m ass m and position x Ball initially at position x 0 and at rest Ball bounces w hen hitting ground at x 0
Bouncing Ball: Free Fall Condition for free fall: x 0 Differential equations: First order
Bouncing Ball: Bouncing Condition for bouncing: x 0 Action for bouncing: v cv C oefficient c: deform ation, friction
Bouncing Ball: Hybrid Automaton initial condition x x 0, v 0 location invariant flow freefall x 0 discrete transition label guard actio n bounce: v cv
Bouncing Ball: Associated Program initial condition location invariant flow freefall discrete transition label guard action bounce: v c v
Execution of Bouncing Ball x (t) Position (x ) 0 x (t) 1 x (t) 2 x (t) 3 x (t) 4 T 0 T 1 T 2 T 3 T 4 Tim e (t ) Velocity (v ) v (t) v (t) 4 v (t) v (t) v (t) 3 1 2 0 T 0 T 1 T 2 T 3 T 4 Tim e (t )
Boost DC-DC Converter i L i 0 v c v 0 s 0 s 0
Boost DC-DC Converter i L i 0 v c v 0 s 1 s 0 s 0 s 1 s 1 s 0
i L i 0 v c v 0 Boost DC-DC Converter s 1 s 0 s 0 s 1 s 1 s 0 float i L i 0, v c v 0, d d 0 ; bool s 0; w hile true { w hile (s 0) { i L i L ( R L L v C v C 1 C i L 1 L 1 v S ) d R C R 0 v C d read(s ) }
Execution of Boost DC-DC Converter Parameters : U s = 20V L = 1mH C = 50nF R L = 1kW R C = 10W Voltage u Cþ, V 16 12 8 4 0 Capacitor Voltage and Inductor Current 0 1 2 3 Time t, ms 200 150 100 50 0 Current i L, ma R 0 = 10kW dt = 200ns U max = 16V U min = 14V Voltage u R0, V 16 12 8 4 0 Load Voltage 0 1 2 3 Time t, ms 200 150 100 50 0 Current i L, ma
Hybrid Autom aton H V ariables: Continuous variables x [ x 1,..., x n ] Control G raph: Finite directed m ultigraph (V,E ) Finite set V of control m odes Finite set E of control switches Vertex labeling functions: for each v V Initial states: init(v )(x ) defines initial region Invariant: inv(v )(x ) defines invariant region Edge labeling functions: for each e E G uard: guard(e )(x ) defines enabling region Update: action(e )(x, x ) defines the reset region Synchronization labels: label(e ) defines com m unication
Executions of a Hybrid Autom aton State: (m,x ) such that x inv(m ) Initialization: (m,x ) such that x init(m ) Tw o types of state updates: Discrete sw itches: (m,x ) a ( m, x ) if e ( m, m ') E label(e ) a guard(e )(x ) 0 action(e)(x, x ) Continuous flow s: (m,x ) f (m, x ) if f : [0,T] R n. f (0) x f (T) x
References T. A. Henzinger, "The theory of hybrid automata, Logic in Computer Science, 1996. LICS '96. Proceedings., Eleventh Annual IEEE Symposium on, New Brunswick, NJ, 1996, pp. 278-292.