Transcript Document

Hybrid Systems and Hybrid Automata
Lecture 20 (04/11/02)
7/18/2015
1
Schedule for Course
Remaining work


7/18/2015
Presentations: Jian (04/16); John, Holly, Yolanda, and Sree classes : 04/18
and 04/23
Project: want a well-defined problem statement plus literature review by
April 18
[my travel schedule: out 04/22 (Mon), 04/26-27 (Fri, Sat),
04/30-05/07 (Tues.-Tues.), and 05/12-05/16 (Sun-Thurs)]
When do we have our final project submission and presentations?
05/08-05/10 [Wed-Fri]
My suggestion: Turn in final project report on 05/08.
Presentations on 05/09. Demos: 05/09 and 05/10.
After presentation and demo, I will allow you to refine project report and
submit for final grading.
Post grades on 05/11.
2
Course Projects
Jolan: MILAN interpreter for MATLAB simulations (asynchronous scheduling
problem)
Jian: Hierarchical modeling of Hybrid Systems – applied to water recovery
system (WRS) of Bioplex
Hari: Supervisory Control for Hybrid Systems: Designing a controller for a
three-tank testbed
Aditya: Graph transformations to aid task-oriented problem solving (??) – look
at the bond graph formalism
Holly: Parameter estimation methods for continuous dynamic systems (??)
John: Hybrid Bond Graph modeling and simulation methodologies – applied to
fuel transfer system (??)
Sachin: timed automata representations for (??)
Yolanda: The Hybrid Bond Graph Framework (??)
Sree: (??)
7/18/2015
Please send me updated topic and abstract as soon as possible
e-mail will be fine.
3
Project Work -- Outline
Introduction



Motivating scenario and what are the important problems in the domain
Use this to make your problem statement (obviously you will not be
solving every problem listed above)
What you hope to achieve
Background


Critical literature review
Use the above to situate where your work falls into in terms of the big
scheme of things, why is it different or new?
Project Description




7/18/2015
Your work, describe in one or more sections
General solution
Particular examples and cases you have worked on
Experimental Results
Conclusions and Future Work
4
Lecture on Hybrid Systems
7/18/2015
5
Hybrid Automata
Hybrid automata is a 6-tuple
H = (V, X, f, Init, Inv, Jump)
V  I – set of discrete modes
X  Rn – real-valued variables, often the state vector
f : V x Rn  Rn -- vector field 
x  f (v, x)
n
Init  V x R -- defines initial state of H (v,z) -- v V, z Rn
Inv  V x Rn -- invariant condition – as long as the discrete mode is
v V, the state of the system  Inv
Jump: V x Rn  P(V x Rn) – jump condition; defines if transition from
one discrete mode to another is possible, and what new value
should be assigned to state vector after the jump (reset condition)
(v,z)  V x Rn (z is an evaluation of x) state of H
7/18/2015
6
Hybrid Automata: Graphical
Representation
H  directed graph (V,E), vertices V, and edges E
E = {(v,v’)  V x V :  z,z’  Rn , (v’ ,z’)  Jump(v,z)]
Init(v) = {z  Rn : (v,z)  Init}
Inv(v) = {z  Rn : (v,z)  Inv}
G(e) = {z  Rn :  z’  Rn
(v’ ,z’)  Jump(v,z)} – guard cond.
J(e,z) = {z’  Rn : (v’ ,z’)  Jump(v,z)}
– jump map
7/18/2015
7
Hybrid Time Trajectory
Interval Point Paradigm: sequence of intervals on the
real line, whose end points overlap. Endpoints are
where discrete transitions occur.
x
x
k
x+
k
k
< ,t s >
1
x+
x+
k

2
x
m
m
[ts]
x+
x+
m
m
1
2
n
x+
n
<t s , >
Two key issues:
1. When do jumps occur, and how to model the transition ?
2. When system re-enters a continuous mode, what is the
7/18/2015
initial state vector ?
8
Train gate system
7/18/2015
Train starts atleast 2000 ft away from gate
Train travels at 40-50 ft/sec
The gate is fully raised
Controller can sense train 1000 ft away
At this point controller commands gate to lower with delay of at most  seconds
Gate lowers at 90/sec.
Train slows down after sensor but still travels at at least 30ft/sec
100 feet after crossing second signal sensed and controller raises gate at 90/sec
Specs:
gate must be closed when train within 10 feet of crossing
keep gate open for as much time as possible
9
Train Gate system
Train Model
Gate Model
7/18/2015
10
Train Gate System: Controller
Specifications :
 Is the set (  0)  (10  x  10) possible?
 For what values of  is the system safe ?
Safety Verification, Reachability Analysis, Simulation
Controller Design
7/18/2015
11
Continuous System
x  f (t , x, u)  time varying nonlinear ODE
x  f ( x, u)  time invariant nonlinear ODE
Example: Pendulum
ml   mg sin( )  kl
Solution:
x1   ;
x(t) must be differentiable
x 2  
g
k
sin( x1 ) 
x 2 and satisfy x (t )  f ( x, t )
l
m
Unique solution requires
0
x


1
1 
x
x(0) = x0

 g
k
x

  2   l sin( x1 )  m x 2 
1  x2 ; x
2 
x
7/18/2015
12
Pathological Cases
 1 x  0
x  
 1 x  0
Discontinuity at x  0
No differentiable trajectory can generate this behavior
2
3
x  3 x , x (0)  0
Solution:
Questions:
Given any a
(t  a ) 3 t  a
xa( t )  
t a
0
i.e., solution is not unique
x  1  x 2
x ( 0)  0
x ( t )  t an(t ) t  [0,
7/18/2015
1. Do solutions exist?
2. Do solutions exist
globally? (t  )
3. Are solutions unique
Answer: Lipschitz condition

)
2
solution blows up to   in finite time
13
Local Existence and Uniqueness
Lipschitz Condition
Let x  f ( x, t ), x (0)  x0 be a differential equation.
Assume f ( x, t ) is continuous in x and t , and
f ( y, t )  f ( x, t )  L y  x x  B( x0 , r ) and t  [0, T ]
B( x0 , r ) is the ball around x0 of radius r.
Then  such that a solution existsand is unique on[0,  ]
Like the mean value theorem
f ( x)  f ( y) 
7/18/2015
f
xs
x
14
Global Existence and Uniqueness
Let x  f ( x , t ), x (0)  x0 be a differential equation.
Assume f ( x , t ) is continuous in x and t , and
f ( x , t )  h f ( y, t )  f ( x , t )  L y  x x , y  R n and t  [0, T ]
Then a uniquesolution exists and is unique on[0, T ] for any T
Example:
x  Ax
Ax  Ay  A( x  y )  A ( x  y )
Since A is constant  Lipschitz conditionlocally and globallysatisfied
1
3
What about x  x ; x (0)  0 ?
2 
Solutions: (i ) x (t )  0; (ii ) x (t )   x 
7/18/2015
3 
3
2
15
Executions of Hybrid System
Execution: An execution  of a hybrid automaton H is a collection
 = (, v, x), with   , v:   V, and x:   Rn
Initial condition: (v(0),x(0))  Init
Continuous evolution for all I with i < i’ ; v(.) is constant
'
and x(t) f(v(t),x(t) over [τi , τi ], and for all t [τi , τ'i ], (v(t),x(t)) Inv
Execution is finite if  is a finite sequence ending with a compact interval
Infinite if  is an infinite sequence or if ( ) = 
7/18/2015 Zeno if  ( ) < 

16
Blocking and Nonblocking Automata
7/18/2015
17
Dynamic Physical Systems
Inherently continuous
Discontinuities attributed to modeling abstractions


parameter abstraction
time scale abstraction
Implement discontinuities as transitions in
continuous behavior


7/18/2015
systematic principles
compositional modeling
18
Abstraction Semantics

Parameter Abstraction




abstracts away complex non linear behaviors
intermediate modes mythical
switching model uses a posteriori state values
Time Scale Abstraction


collapses behavior in small intervals to point in time
(pinnacle)
switching model uses a priori state values
Our Goal: systematic model building to facilitate building
Hybrid Automata for real-time analysis
7/18/2015
19
Example: Diode-Inductor Circuit
Diode-Inductor Circuit
R
I
Sw
D:
ON
V
D
L
V
ID
+
I th
+
VD < -Vdi ode
OFF
Mode Switching
10
V
I
V
R
Sw
D
L
I
00
p
V
R
01
Sw
D
L
0
V
I
-V
R
Sw
D
L
?
Switch closed: inductor charges
Switch open: IL=0
No parasitic capacitance or resistance
Diode comes on
Sequence of instantaneous changes
7/18/2015
20
Simulation Result
Freewheeling Diode
I
V
V
Sw
D
R
L
I
p
R
V
Sw
D
0
L
R
V
a
0
0
a
1
0
I
-V
Sw
D
?
L
a0
1
0.04
0.03
IL
0.02
0.01
0.00
50
100
50
100
150
200
250
3 00
-0.01
3 50
400
t
20
15
VL
10
5
0
0
150
200
250
3 00
350
t
400
Sw
7/18/2015
real mode 00
mythical mode
10
01
00
t
00
21
Parameter Abstractions
Principle of Invariance of State
Lemma: Any vector that represents the state of a linear physical system is
invariant across mode changes.
Proof: based on converting any state vector to particular state vector
involving energy variables. (Mosterman, Biswas, and Sztipanovits,
“A hybrid modeling and verification paradigm for embedded control systems,”
Control Engineering Practice, vol. 2, pp. 127-142, 1998.)
Conjecture: This may be extended to nonlinear systems provided an
inverse mapping can be computed uniquely.
Switching transition for parameter abstraction
depends on a posteriori state vector value
7/18/2015
22
Time Scale Abstraction
Perfect Elastic Collision
elasticity effects
condensed to a point
in time



conservation of state
conservation of energy
Collision Chain
energy state
changes

free
free
im pact
free
fr ee
impact
1
2
1
2
1
2
v
m1
m2
a0
0
7/18/2015
m3
m1
m2
m3
m1
m2
m3
v
v
a
1
0
a
0
1
23
Time Scale Abstraction
State Vector change governed by the principle of
Conservation of State.
E.g., colliding bodies
Newton’s Collision rule: v2+ - v1+ =  (v2 - v1 ) ;  - coefficient of restitution
and equate Forces: m1 (v1+ - v1 ) = m2 (v2+ - v2 )
Mode change from interval to point to interval. Point is
called a pinnacle.
7/18/2015
24
Hybrid Systems: Issues and Challenges
Building Hybrid Models of Complex Systems


Systematic introduction of abstraction phenomena
Composing hybrid automata
Design of Hybrid Systems

Verification and Validation of Hybrid Trajectories
Monitoring and Control of Hybrid Systems

Issues of switching transients
Fault Detection and Isolation

Combining discrete-event and continuous paradigms
Fault Adaptive Control

7/18/2015
Fault detection, isolation, study of consequences, controller selection,
transient management
25