Академический Документы
Профессиональный Документы
Культура Документы
Michael S. Branicky
Department of Electrical Engineering and Computer Science
Case Western Reserve University
+ =
Rn Q ! {1, 2, . . . , N } Rn × Q
2
Continuous + Discrete = Hybrid (2)
Mixture of . . . differential equations and discrete events / switching
Outline
Mathematical Models of HS
6
Laplace’s Problem
Predict the motion of a comet about to pass near Jupiter (1845)
8
Laplace’s Solution (2)
Double-think: SOI is both infinitely large and infinitesimally small
10
Hybrid Systems All Around Us
They drive on our streets, work in our factories, fly in our skies, ...
11
• continuous plants
• asynchronous or event-driven data transmission
sampling, varying transmission delay, packet loss
• discrete implementation of network/protocols
data packets, queuing, routing, scheduling, etc.
Physical Plant
Other Other
Processes Processes
Control Network
Controller
(Computer)
12
Networked Control Systems (2)
Packet queueing
and forwarding Network dynamics
Visualization
Plant agent
(actuator,
Controller sensor, …)
agent
(SBC, PLC, …) Router
Bandwidth
monitoring
Plant output
dynamics Simulation
languages
13
Other Examples
• systems with relays, switches, and hysteresis
• computer disk drives
• constrained robotic systems (locomotion, assembly, etc.)
• vehicle powertrains, transmissions, stepper motors
• mode-switched flight control, vehicle management systems
14
Systems with Switches and Relays
HVAC control with a thermostat:
ẋ = f (x, H(x − x0), u)
• x, room temperature
• x0, desired temperature
• f , dynamics of temperature
• u, control signal (e.g., the fuel burn rate)
H
1 ![ x ≥ ∆ ]
" H = +1 H = −1
x
!"
![ x ≤ −∆ ]
-1
![ReadDone]
ReadWait Spindle-Ready
/Read /Seek(Adr)
On-Cylinder SeekWait
![HeadSettled]
16
Raibert’s Hopping Robot
[ x = 0 ∩ ẋ < 0 ]
KF KC
[ x = 0 ∩ ẋ > 0 ] [ ẋ = 0 ] / T := 0
KT KD
[ T = τthrust ]
Dynamic Phases
Finite State Controller
[Back et al., HS I, 1993]
17
Outputs Inputs
o∈O! Hybrid !
i∈I
Control
y∈Y ! System !
u∈U
18
Flight Vehicle Mgmt. Systems
19
20
From Continuous Toward Hybrid
Differential Equations1
Discrete Phenomena
=⇒
Hybrid Dynamical Systems
1
It is easy to substitute “Difference Equations”
21
Non-autonomous or time-varying:
ẋ(t) = f (x(t), t)
22
ODE with Inputs and Outputs
The functions u(·) and y(·) are the inputs and outputs, respectively
23
Differential Inclusions
ẋ(t) ∈ F (x(t))
a rectangular inclusion #
"
!
+"
! " # $ % & ' ( ) *
24
Adding Discrete Phenomena
25
Autonomous Switching
ẋ(t) = f1(x(t))
Example 2 (HVAC) Dynamics are H
1
given by
ẋ(t) = f1(x(t)), furnace is On "
x
ẋ(t) = f0(x(t)), furnace is Off !"
x(t) is temperature -1
ẋ(t) = f0(x(t))
26
Piece-Wise Constant Vector Fields
Programmable vector fields for sorting parts (large, up; small, down)
Vector fields are merely sequenced in time (sensorless or open loop)
Figure from [Böhringer et al., Computational Methods for Design and Control of MEMS Micromanipulator
Arrays, IEEE Computer Science and Engineering, pp. 17–29, January–March 1997]
27
Switched Systems
A general switched system:2
ẋ(t) = fq(t)(x(t))
where q(t) ∈ Q ! {1, . . . , N }
2
Note: Switching boundaries/manifolds have been suppressed; really, q + (t) = ν(x(t), q(t)) and hybrid state is (x, q)
28
Switched Linear Systems (1)
Example 3 (Unstable from Stable [Branicky, IEEE T-AC, 1998])
! " ! "
−0.1 1 −0.1 10
ẋ(t) = Aq x(t), A0 = , A1 =
−10 −0.1 −1 −0.1
5
x 10
3 3 3.5
3
2 2
2.5
1 1
2
1.5
y
0 0
y
y 1
-1 -1
0.5
-2 -2
0
-0.5
-3 -3 -2 -1 0 1 2 3 4 5 6 7 8
-3 -2 -1 0 1 2 3 -3 -2 -1 0 1 2 3 x 5
x x x 10
29
2
2
1
0 0
-1
-2
-2
-3 -4
-3 -2 -1 0 1 2 3 -4 -2 0 2 4
Argues for “Multiple Lyapunov Functions” to prove stability [Branicky, IEEE T-AC, 1998]
Simulated using Omola/Omsim [Andersson, PhD, 1994; Branicky-Mattsson, HS IV, 1997]
30
EECS 381/409: Hybrid and Discrete Event Systems. Class N
Lecture #3: January 18, 2005
Prof. M.S. Branicky; Scribe: Andy Allen
v̇(t) = −mg v h
+
v (t) = −ρv(t), x(t) ∈ M x
0
R
31
v(t ) = v(0) ! mgt
1
x(t ) = x(0) + v(0) " t !
2
Networked Control
z (t ) = F (System
•
z (t )), z (t ) ! A
z + (t ) = G ( z (t )), z (t ) ! A this expression denotes when an update of the s
Example 6 (NCS) A linear, full-state feedback control system
Another Example
ẋ(t)Clegg integrator
= Ax(t) + Bu(t)
•
u(t) x= −Kx(t)
(t ) = e(t ) where e(t) is an error term, and x + (t ) = 0 IF e(t ) = 0.
Place a network between state measurement (at sensor node) end of Autonom
and control computation/actuation (at another node)
32
Autonomous Jumps / Impulses (2)
33
Controlled Switching
Vector field ξ(·) changes abruptly in response to a
control command, usually with an associated cost
•
x = Fq ( x), q ! Q = {1,2,..., N }
θ̈ = τeff v v=0
v=-1
ẋ = y
ẏ = −x + u
![ T = δ ∧ x < 0 ] / T := 0 u = 0 u = −3x
x ≡ state measurement
Ṫ = 1 (always in model)
![ T = 3π/4 ] / T := 0
0.5
1.5
0 1
-0.5 0.5
-1 0
-1 -0.5 0 0.5 1 0 5 10 15 20
36
Switching Control Laws (2)
Example 10 (Max Controller [Branicky, ACC, 1994])
Control objective:
r=desired nz!#$e1 ! δ1
K1
!" #
" #
nz v #
−nz # ! δ!
α θ max
!
$
$
αlim #$e δ2 $
! 2
! K2 $
!"
δ "
−α
37
2000 1
1000 0.5
0 0
-1000 -0.5
-2000 -1
0 5 10 0 5 10
t t
2000 1
1000 0.5
0 0
-1000 -0.5
-2000 -1
0 5 10 0 5 10
t t
Controlled Example:
Jumps Inventory/ management
Impulses
µ characterizes the use/degradation dynamics,
Continuous state x(·) changes i are restocking
discontinuously in!response to times,
•
a control command,x(t )usually
= $ µ (t ) +with
% # (tan )! i and
$ " iassociated !
cost
i are the restocked amounts.
i
µ, degradation/utilization
θ1 < θ2 < . . ., “discrete” restocking times
t
α1, α2, . . ., order amounts !1 !2
Example2: Planetary
Note: If stocking times/amounts explicitFlybys
function ofSee x,Handout: Laplace’s Result: Sphere of Influence
Page 1: shows how planet gravitational fields change the trajectory of objects in
then controlled jumpsspace.
become autonomous
To model jumps bodies (very complex in nature), when a body is
the pulls of celestial
within a sphere of influence of a pulling body, the gravitational effect of that body is then
taken into effect.39
Exploration
Example 12 (Planetary Flybys) Inputless spacecraft typically use
automation
close encounters with moons/planets toqkgain
+1 = ! (energy, change
qk ) , qk ! course
Q , a finite set
40
Significant Hybrid Phenomena
Continuous dynamics and controls +
Type:
Discontinuity
Example
Source Vector Field Continuous State
(Switching) (Jump/Impulse)
Autonomous Autonomous
System Switching: Jumps/Impulses:
(Autonomous)
Hysteresis Collisions
Controlled Controlled
Controller Switching: Jumps/Impulses:
(Controlled)
Gearbox Resets
Tavernini’s Model
Differential automaton [Tavernini, 1987]:
A triple (S, f, ν) where
• S = Rn × Q, (hybrid) state space
Q ! {1, . . . , N }, discrete state space q=j
In our notation:
M i,j
ẋ = f (x, q)
q + = ν(x, q)
42
Tavernini’s Results
Assumptions:
• switching manifolds are given by the zeros of a smooth function
• separation of switching sets, separation from concatenated jumps
Results:
• Unique solution with finitely many switching points
s0(t0) = (x0, q0), s1(t1) = (x1, q1), s2(t2) = (x2, q2), ...
43
H = (Q, Σ, A, G)
Aj
Dj Xj
• Q, countable discrete states
• Σ = {Σq }q∈Q, set of DSs Aj
fq : Xq → Rdq , Xq ⊂ Rdq ,
Xi
continuous state spaces Xi
Di
• Aq , autonomous jump sets Ai
• Gq : Aq → S , autonomous
jump transition maps X1
A1
Hybrid
$ state space: D1 D1
S= q∈Q Xq × {q}
44
Hybrid Dynamical Systems: Notes
• ODEs and Automata
ODEs: |Q| = 1, A = ∅
(Later) Finite Automata: |Q| = N , each fq ≡ 0
• Outputs: add continuous/discrete output maps for each q
• Changing State Space
inelastic collisions, component failures, aircraft modes, . . .
• State Space Overlaps, e.g., hysteresis
• Transition Delays
Add autonomous jump delay map, ∆a : A × V −→ R+
Associates (possibly zero) delay to each jump
Aggregate transients, activation delay, etc.
45
Hc = (Q, Σ, A, G, C, F) Aj
Dj Cj
Xj
Ai Di Ci
• Gq : Aq × Vq → S , modulated
by discrete decisions Vq
• Cq , controlled jump sets X1
C1
• Fq : Cq → 2S , controlled jump A1
D1
destination maps (set-valued) D1
46
(C)HDS: Automaton View
.. ..
. .
![ x ∈ Mp,q ] / x := Gp (x)
p : Σp q : Σq
![ x ∈ Mq,p ] / x := Gq (x)
.. ..
. .
?[ x ∈ Cp ] / x :∈ Fp (x)
.. ..
. .
![ x ∈ Mp,q ] / x := Gp (x)
![condition]: must be taken
?[condition]: may be taken p : Σp q : Σq
47
ẏ = v ![ (y = 0) ∧ (v > 0) ] / v := −ρv
v̇ = −mg
Off On
ẋ = f0 (x) ẋ = f1 (x)
![ x ≤ 21 ]
48
Hybrid Automata: Examples (2)
Example 15 (HVAC++) Add that A.C.
(i) is never O N more than 55 minutes straight
(ii) must remain Off for at least 5 minutes
![ (x ≥ 25) ∧ (T ≥ 5) ] / T:=0
Off On
ẋ = f0 (x) ẋ = f1 (x)
Ṫ = 1/60 Ṫ = 1/60
Gear 1 Gear 2
... ...
ẋ1 = x2 ẋ1 = x2
ẋ2 = [−a(x2 ) + u]/2 ẋ2 = [−a(x2 /2) + u]/3
![ x2 ≤ 1200 ], ?[ x2 ≤ 2000 ]
49
Continuous Phenomena
=⇒
Hybrid Automata
5
It is easy to substitute “Automata” with “Petri Nets”
50
Base Discrete Model: FA / FSM
Inputless finite automaton (FA) or finite state machine (FSM):
q(k + 1) = ν(q(k))
q(k) ∈ Q, a finite set
i.e., dynamical system with discrete state space
51
Deterministic FA Example
Example 18 (Parity of Binary String Input)
DFA keeps track of input’s parity by counting 1s, modulo 2
53
Dynamics:
• Machine starts in state q0
• One move: DFA in q receives symbol a and enters state ν(q, a)
• On input word w = a1a2 · · · an: DFA in r0 successively processes
symbols and sequences through states r1, r2, . . . , rn, such that
rk+1 = ν(rk , ak )
This sequence is a run of DFA over w
a1 a2 a3 an−1 an
r0 −→ r1 −→ r2 −→ · · · −→ rn−1 −→ rn
54
Languages
language (over alphabet I ): a set of strings over I
English language, LE , is a language over E
cat ∈ LE , qqq *∈ LE
Languages over B :
Blength 2 = {00, 01, 10, 11}
Beven length = {ε} ∪ Blength 2 ∪ Blength 4 ∪ · · ·
Bodd parity = {1, 01, 10, 001, 010, 100, 111, . . .}
Marked States
DFA plus a set of marked or accepting or final states, F
Start
1
0 q0 q1 0
1
If F = {q1}, 111 is accepted, ε is not; accepted language is Bodd parity
If F = {q0, q1}: accepted language is B ∗
If F = {q1}: it would be B ∗ − Bodd parity
If F = ∅: it is ∅
Exercise 4 Draw DFA accepting: (i) Beven length, (ii) Blength 2
56
Nondeterministic FA (NFA)
An NFA N = (Q, I, ν̂, Q0, F ) allows
• a set of start states, Q0 ⊆ Q
• set-valued transition function, ν̂ : Q × I → 2Q
• at any stage automaton may be in a set of states
Dynamics:
• One move: NFA in q receives symbol a and nondeterministically
enters any one of the states in the set ν̂(q, a)
• On input w = a1a2 · · · an: NFA in state r0 nondeterministically
sequences through r1, r2, . . . , rn such that
rk+1 ∈ ν̂(rk , ak )
a1 a2 an
Sequence is run of NFA over w : r0 −→ r1 −→ · · · rn−1 −→ rn
• In general, NFA has many runs over each string; DFA, only one
57
NFA Examples
Example 19 (Pattern Search [Hopcroft, Motwani, Ullman])
58
Subset Construction
Convert any NFA into a DFA
N = (QN , I, ν̂, Q0, FN ) =⇒ D = (QD , I, νD , q0, FD )
59
ω -Automata
Machines that process infinite sequence of symbols
Appropriate for modeling reactive processes (e.g., OS, server)
a
q0 q1
60
Adding Continuous Phenomena
Finite automata plus continuous phenomenon
61
Global Time
FA usually: “abstract time,” only ordering of symbols/“events” matters
62
Timed Automata (1)
timed word: sequence of symbols + their increasing times of occurrence
w = (i1, t1), (i2, t2), . . . , (iN , tN )
ik ∈ I ; tk ∈ R+, tk+1 > tk
For server: w = (a, 0), (d, 2), (a, 3), (d, 4), (a, 5), (d, 8), (a, 9), (d, 16)
symbol sequence: σ = a, d, a, d, a, d, a, d
time sequence: τ = 0, 2, 3, 4, 5, 8, 9, 16
w = (σ, τ ); Untime(w) = σ
63
H/J;P<R$
GP<R
A$
A
'$
<$ '
<
'$ %$ ) ' % )$
$
! N$<6H;J$O/.J$P/L;.$4FME4C;<$QR$6G$4$0656<;$G;S=;57;$/0$G9HC/FG$MF=G$<E;6.$<6H;$/0$
/77=..;57;$
o P6'B$<'RB$P6AB$<ARB$TB$P65B$<5R$OE;.;$68 " $Q$45J$<8 " $RU$
o I6H;G$4.;$G<.67<F9$657.;4G65V$P<8U'W<64 8R$
! N$<6H;J$/H;V4$O/.J$P!KO/.JR$6G$45$650656<;$G;S=;57;$/0$G9HC/FG$MF=G$<E;6.$<6H;$
/0$/77=..;57;$
o P6'B$<'RB$P6AB$<ARB$T$OE;.;$<6H;$progresses$O6<E/=<$C/=5J$
o #/B$745X<$E4L;$'(AB$%()B$Y(&B$'?('ZB$%'(%AB$T$4G$4$G;S=;57;$/0$<6H;G1$$IE4<$
6G$74FF;J$[;5/$C;E4L6/.1$
o Q5$<E;$C/=5765V$C4FF$;\4HMF;B$<E;$G;<$/0$<6H;G$<E4<$<E;$C4FF$C/=57;G$O6FF$
Timed Automata (3)
Example 21 (Bounded Response Time [Alur-Dill, TCS, 1994])
Every “arrival” needs to “depart” within two seconds
a / x := 0
q0 q1
d, ?(x < 2)
Accepted word: (a, 0), (d, 1.5), (a, 2), (d, 3.5), (a, 4), (d, 5.5), · · ·
Not accepted: (a, 0), (d, 1.5), (a, 2), (d, 4.5), · · ·
Not accepted: (a, 0), (a, 1.5), · · ·
65
66
Skewed-Clock Automata S1
![ y ≥ 1 ] / y := 0
S2
x=0
y = 1/2 ẋ = 9/10 ẋ = 9/10
timed automaton: ẋi = 1 for all clocks and all locations ẏ = 11/10 ẏ = 11/10
![ x ≥ 1 ] / x := 0
skewed-clock automaton: ẋi = ki where each ki is a rational number
![ y ≥ 1 ] / y := 0 ![ y ≥ 10/11 ] / y := 0
S1 S2 S1 S2
x=0 x=0
y = 1/2 ẋ = 9/10 ẋ = 9/10 y = 5/11 ẋ = 1 ẋ = 1
ẏ = 11/10 ẏ = 11/10 ẏ = 1 ẏ = 1
![ x ≥ 1 ] / x := 0 ![ x ≥ 10/9 ] / x := 0
Skewed-Clock Automaton
![ y ≥ 10/11 ] / y := 0 Equivalent Timed Automaton
S1 S2
x=0
Remark
y = 5/11 1 Skewed-clock
ẋ = 1
ẏ = 1
automata ẋẏare
= 1 equivalent to timed automata
=1
67
Skewed-Clock Automata!
! "#$%&!'()*$')'!+'&!'!,%)!*-!./*.0,1!21!3+%4%!5# " 2!'6&!5#!7!8!-*4!'//!./*.0!'6&!'//!
/*.')#*6,9!
! :0%3%&;./*.0!'()*$')'!.'6!+'<%!5=#!7!0#!,(.+!)+')!0#!#,!'!4')#*6'/9!
x(t), y(t)
2
!(x = 0) !(y = 0)
1.5
q2 :
1
ẋ = −2
ẏ = 1 0.5
0
0 0.5 1 1.5 2 2.5 3 3.5 4
t
69
Multi-Rectangular Automata
71
8
So the reachable set at each step is a union of polyhedra [Alur et al., Theoretical Computer Science, 138:3–34, 1995]
72
LHA: Technical Definition (1)
Expressions over a set of variables Z
73
init(q) is a predicate on X
inv(q) is a convex predicate on X (the invariant for each q )
f low(q) is a convex predicate on Ẋ
ẋ ∈ [10, 20] is equivalent to (ẋ ≥ 10)&&(ẋ ≤ 20)
reset(e) is a convex predicate on X ∪ X +
1 <= x+, x+ < 2, t+ >= x + 3, y+ = 0
75
x := 3 ![x ≥ 5] x := 3 ![x ≥ 5]
ẋ = 2x ẋ = 2x
⇓ ⇓
tx := 0 ![tx ≥ c] x := 3 ![x ≥ 5]
t˙x = 1 ẋ ∈ [6, 10]
77
Summary
• Broad Hybrid Systems Modeling Definition / Motivation
• Mathematical Models of HS
- From Continuous Side:
ODEs + Discrete Phenomena
=⇒ Hybrid Dynamical Systems
78
Going Further
Early HS models: Witsenhausen, Tavernini, Brockett, Nerode-Kohn, Antsaklis-Stiver-
Lemmon, Back et al. ←− all reviewed/compared in [Branicky, ScD Thesis, 1995]
79
References
[1] MS Branicky. Introduction to hybrid systems. In D Hristu-Varsakelis and WS
Levine (eds), Handbook of Networked and Embedded Control Systems, Boston:
Birkhauser, 2005
[2] MS Branicky. EECS 381/409: Discrete event and hybrid systems. Course notes,
Case Western Reserve University, 1998–2005
[3] MS Branicky, VS Borkar, SK Mitter. A unified framework for hybrid control: model
and optimal control theory. IEEE Trans. Automatic Control, 43(1):31–45, 1998
[4] MS Branicky. Studies in Hybrid Systems: Modeling, Analysis, and Control. ScD
thesis, Massachusetts Institute of Technology, Cambridge, MA, 1995
80