Hybrid Control and Switched Systems
Lecture #2
How to describe a hybrid system?
Formal models for hybrid system
João P. Hespanha
University of California
at Santa Barbara
Summary
1. Formal models for hybrid systems:
• Finite automata
• Differential equations
• Hybrid automata
• Open hybrid automaton
2. Nondeterministic vs. stochastic systems
• Non-deterministic hybrid automata
• Stochastic hybrid automata
1
Example #5: Multiple-tank system
goal ≡ prevent the tank from
emptying or filling up
pump
pump-on inflow ≡ λ
δ ≡ delay between command is
sent to pump and the time it is
executed
y
constant outflow ≡ μ
τ ≥δ?
pump off
guard condition
wait to off
y · ymin ?
τú0
wait to on
τú0
state reset
pump on
y ≥ ymax ?
τ ≥δ?
How to formally describe this hybrid system?
Deterministic finite automaton
Q ú {q1, q2, …, qn} ≡ finite set of states
Σ ú {a, b, c,… }
≡ finite set of input symbols (alphabet)
Φ:Q×Σ→Q
≡ transition function
automata
M
Example:
Graph representation:
q∈Q
s∈Σ
Φ(q,s)
1
1
2
2
3
3
©
blocking
state
a
b
a
b
a
b
a/b
2
©
3
1
1
©
©
a
1
2
b
a
a
3
• one node per state
(except for blocking state ©)
• one directed edge (arrow)
from q to Φ(q, s) with label s
for each pair (q, s) for which Φ(q, s) ≠ ©
2
Deterministic finite automaton
a
1
2
b
a
a
3
Notation: Given set A
string ≡ finite sequence of symbols
∈ ≡ empty string
≡ set of all strings of symbols in set A
A*
e.g., A = {a, b}
s = abbbbaab ∈ A*
s[3] = b (3rd element)
| s | = 8 (length of string)
• initial state q1 ∈ Q
• set of final states F ⊂ Q
M accepts a string s ∈ Σ* with length n ú | s | if
there exists a sequence of states q ∈ Q* with length | q | = n+1 (execution) such that
1. q[1] = q1
(starts at initial state)
2. q[i+1] = Φ(q[i], s[i] ) , i ∈ {1,2,…,n}
(follows arrows with correct label)
3. q[n+1] ∈ F
(ends in set of final states)
Definition: Given
Definition: language accepted by automaton M
L(M) ú { set of all strings accepted by M }
There is no concept of time–
the whole string is accepted
“instantaneously”
Deterministic finite automaton
Example:
q1 ú 1
F
ú {1}
L(M) = {∈, ab, aaa, abab, abaaa, aaaab, … }
= ( (ab)* (aaa)* )*
a
1
2
b
a
a
3
Questions in formal language theory:
Is there a finite automaton that accepts a given language?
Do two given automata accept the same language?
What is the smallest automaton that accepts a given language? etc.
• initial state q1 ∈ Q
• set of final states F ⊂ Q
M accepts a string s ∈ Σ* with length n ú | s | if
there exists a sequence of states q ∈ Q* with length | q | = n+1 (execution) such that
1. q[1] = q1
(starts at initial state)
2. q[i+1] = Φ(q[i], s[i] ) , i ∈ {1,2,…,n}
(follows arrows with correct label)
3. q[n+1] = F
(ends in set of final states)
Definition: Given
Definition: language accepted by automaton M
L(M) ú { set of all strings accepted by M }
3
Differential equation
ordinary
differential
equation
with input
Σ
Rn
≡ state space
≡ input space
Rm
f : Rn × Rm→Rn ≡ vector field
Definition: Given an input signal u : [0,∞) → Rm
A signal x : [0,∞) → Rn is a solution to Σ (in the sense of Caratheodory) if
1. x is piecewise differentiable
2.
If x is a solution then
at any time t for which the derivative exists
Differential equation (no inputs)
ordinary
differential
equation
without input
Σ
Rn
f : Rn →Rn
≡ state space
≡ vector field
Definition:
A signal x : [0,∞) → Rn is a solution to Σ (in the sense of Caratheodory) if
1. x is piecewise differentiable
2.
If x is a solution then
at any time t for which the derivative exists
4
Hybrid Automaton
(Example #2: Thermostat)
x · 73 ?
x ≡ mean temperature
off mode
room
heater
on mode
x ≥ 77 ?
Q
≡ set of discrete states
≡ continuous state-space
Rn
f : Q × Rn → Rn ≡ vector field
ϕ : Q × Rn → Q ≡ discrete transition
Example: Q ú { off, on } n ú 1
note “closed” inequalities associated with jump and “open” inequalities with flow
Hybrid Automaton
(Example #2: Thermostat)
x · 73 ?
x ≡ mean temperature
room
off mode
heater
on mode
x ≥ 77 ?
Q
≡ set of discrete states
≡ continuous state-space
Rn
f : Q × Rn → Rn ≡ vector field
ϕ : Q × Rn → Q ≡ discrete transition
ϕ (q1,x) = q2 ?
mode q2
mode q1
ϕ (q1,x) = q3 ?
mode q3
resets?
5
Hybrid Automaton
Q
Rn
f : Q × Rn → Rn
ϕ : Q × Rn → Q
ρ : Q × Rn → Rn
x ú ρ (q1,x–)
mode q2
≡ set of discrete states
≡ continuous state-space
≡ vector field
≡ discrete transition
≡ reset map
ϕ (q1,x–) = q2 ?
mode q1
ϕ( q1,x–) = q3 ?
mode q3
x ú ρ (q1,x–)
Hybrid Automaton
Q
Rn
f : Q × Rn → Rn
Φ : Q × Rn → Q × Rn
x ú Φ2(q1,x–)
mode q2
≡ set of discrete states
≡ continuous state-space
≡ vector field
≡ discrete transition (& reset map)
Φ1(q1,x–) = q2 ?
mode q1
Φ1(q1,x–) = q3 ?
mode q3
x ú Φ2(q1,x–)
Compact representation of a hybrid automaton
6
Example #5: Multiple-tank system
goal ≡ prevent the tank from
emptying or filling up
pump
pump-on inflow ≡ λ
δ ≡ delay between command is
sent to pump and the time it is
executed
y
constant outflow ≡ μ
τ ≥δ?
pump off
wait to off
y · ymin ?
τú0
τú0
wait to on
pump on
y ≥ ymax ?
τ ≥δ?
Example #5: Multiple-tank system
pump off
τ ≥δ?
wait to off
y · ymin ?
τú0
τú0
wait to on
pump on
τ ≥δ?
y ≥ ymax ?
Q ú { off, won, on, woff }
R2 ≡ continuous state-space
7
Solution to a hybrid automaton
Φ1(q1,x–) = q2 ?
x ú Φ2(q1,x–)
mode q2
mode q1
Definition: A solution to the hybrid automaton is a pair of right-continuous signals
q : [0,∞) → Q
x : [0,∞) → Rn
such that
1. x is piecewise differentiable & q is piecewise constant
2. on any interval (t1,t2) on which q is constant and x continuous
continuous evolution
3.
discrete transitions
Hybrid Automaton
(Example #2: Thermostat)
x · 73 ?
x ≡ mean temperature
off mode
room
heater
x ≥ 77 ?
x – = 77, q – = on ⇒ q = off
77
73
on mode
x
off
q = on
off
on
no transition would occur if
the “jump branch” had a
strict inequality x > 77
off
on
on
note “closed” inequalities associated with jumps and “open” inequalities with flows
8
Example #7: Server system with congestion control
incoming rate
r
qmax
q
Additive increase/multiplicative
decrease congestion control (AIMD):
• while q < qmax increase r linearly
• when q reaches qmax instantaneously
multiply r by γ ∈ (0,1)
q ≥ qmax ?
queue
dynamics
congestion
controller
q(t)
server
r ú γ r–
B
rate of service
(bandwidth)
t
Open Automaton
(Example #7: Server system with congestion control)
incoming rate
r
q ≥ qmax ?
queue
dynamics
congestion
controller
qmax
r ú γ r–
q
server
variable
r
B
rate of service
(bandwidth)
queue
dynamics
congestion
controller
event
q ≥ qmax
9
Open Automaton
(Example #7: Server system with congestion control)
incoming rate
qmax
q ≥ qmax ?
queue-full
q
event
queue-full
variable
r
server
congestion
controller
B
rate of service
(bandwidth)
queue-full ?
synchronized transitions
(all guards must hold for transition to occur)
r
queue
dynamics
r ú γ r–
events are nothing more than symbolic labels for transitions
Open Automaton
(Example #7: Server system with congestion control)
incoming rate
q ≥ qmax ?
queue-full
qmax
q
server
B
rate of service
(bandwidth)
event
queue-full
variable
r
congestion
controller
r >1
queue-full
synchronized transitions
(all guards must hold for transition to occur)
r
queue
dynamics
r ú γ r–
events are nothing more than symbolic labels for transitions
10
Open Automaton
(Example #5: Multiple-tank system)
goal ≡ prevent the tank from
emptying or filling up
pump
pump-on inflow ≡ λ
δ ≡ delay between command is
sent to pump and the time it is
executed
y
constant outflow ≡ μ
τ ≥δ?
pump off
wait to off
y · ymin ?
τú0
wait to on
τú0
pump on
y ≥ ymax ?
τ ≥δ?
Open Automaton
(Example #5: Multiple-tank system)
goal ≡ prevent the tank from
emptying or filling up
pump
pump-on inflow ≡ λ
y
constant outflow ≡ μ
event
change
y · ymin ?
ask
δ ≡ delay between command is
sent to pump and the time it is
executed
idle
pump off
change ?
change
ask ?
change ?
pump on
y ≥ ymax ?
event
ask
τú0
delay
τ ≥δ?
ask
11
Deterministic finite automaton
Q ú {q1, q2, …, qn} ≡ finite set of states
Σ ú {a, b, c,… }
≡ finite set of input symbols (alphabet)
Φ:Q×Σ→Q
≡ transition function
automata
M
Example:
Graph representation:
q∈Q
s∈Σ
Φ(q,s)
1
1
2
2
3
3
©
blocking
state
a
b
a
b
a
b
a/b
2
©
3
1
1
©
©
a
1
2
b
a
a
3
• one node per state
(except for blocking state ©)
• one directed edge (arrow)
from q to Φ(q, s) with label s
for each pair (q, s) for which Φ(q, s) ≠ ©
Nondeterministic finite automaton
Q ú {q1, q2, …, qn} ≡ finite set of states
Σ ú {a, b, c,… }
≡ finite set of input symbols (alphabet)
≡ transition set-valued function
Φ : Q × Σ → 2Q
automata
M
Example:
Graph representation:
q∈Q
s∈Σ
Φ(q,s)
1
1
2
2
3
3
©
blocking
state
a
b
a
b
a
b
a/b
{2}
{©}
{©}
{1,3}
{1}
{©}
{©}
a
1
2
b
b
a
3
Notation: Given a set A,
2A ≡ power-set of A, i.e., the set of all subsets of A
e.g., A = {1,2} ⇒ 2A = {∈, {1}, {2}, {1,2} }
When A has n < ∞ elements then 2A has 2n elements
12
Nondeterministic finite automaton
a
1
Example:
q1 ú 1
F
ú {1}
L(M) = { ∈, ab, aba, abab, ababa, abaab, … }
= ( (ab)* (aba)* )*
2
b
b
a
3
• initial state q1 ∈ Q
• set of final states F ⊂ Q
M accepts a string s ∈ Σ* with length n ú | s | if
there exists a sequence of states q ∈ Q* with length | q | = n+1 (execution) such that
1. q[1] = q1
(starts at initial state)
2. q[i+1] ∈ Φ(q[i], s[i] ) , i ∈ {1,2,…,n}
(follows arrows with correct label)
3. q[n+1] ∈ F
(ends in set of final states)
Definition: Given
Definition: language accepted by automaton M
L(M) ú { set of all strings accepted by M }
Determinization
From formal language theory:
For every nondeterministic finite automaton there is a deterministic one that accepts
the same language (but generally the deterministic one needs more states)
nondeterministic automaton M
deterministic automaton N
a
a
1
1
2
2
a
b
b
b
a
3
• from 1 only accepts a and goes to 2
• from 2 only accepts b and can go to either
1 or 3
• from 1 or 3 only accepts a and goes to 2 or
1 resp.
• from 1 (or 2) can accepts a and go to 2
from (1 or) 2 can accept b and go to 1 or 3
b
1 or 3
1 or 2
a
Same language:
L(M) = L(N) = ( (ab)* (aba)* )*
M provides more compact representation
13
Example #3: Transmission
throttle
u ∈ [-1,1]
position
g ∈ {1,2,3,4}
gear
velocity
θ
ω
ηk ≡ efficiency of the kth gear
η1
η2 η3
η4
ω
velocity
[Hedlund, Rantzer 1999]
Example #3: Semi-automatic transmission
v(t) ∈ { up, down, keep } ≡ drivers input (discrete)
v = up or ω ≥ ω2 ?
g=1
v = up or ω ≥ ω3 ?
g=2
v = up or ω ≥ ω4 ?
g=3
v = down or ω · ϖ1 ? v = down or ω · ϖ2 ?
g=4
v = down or ω · ϖ3 ?
ω2
ω3
g=1
g=2
ϖ1
ω4
g=3
ϖ2
g=4
ϖ3
14
Nondeterministic Hybrid Automaton
(Example #3: Semi-automatic transmission)
Suppose we want to consider all possible driver inputs:
ω ≥ ϖ1 ?
ω ≥ ϖ2 ?
ω ≥ ϖ3 ?
g=1
g=2
g=3
g=4
ω · ω2
ϖ1 · ω · ω3
ϖ2 · ω · ω4
ω ≥ ϖ3
invariance condition
(must hold to remain
in discrete state)
ω · ω3 ?
ω · ω2 ?
ω2
ω3
g=1
g=2
ϖ1
ω · ω4 ?
guard condition
(does not force jump,
simply allows it)
ω4
g=3
ϖ2
g=4
ϖ3
Nondeterministic Hybrid Automaton
Q
Rn
f : Q × Rn → Rn
ϕ : Q × Rn → 2Q
ρ : Q × Rn → 2Rn
Δ ⊂ Q × Rn
x ∈ ρ(q1,x–)
≡ set of discrete states
≡ continuous state-space
≡ vector field
≡ set-valued discrete transition
≡ set-valued reset map
≡ domain or invariant set
q2 ∈ ϕ(q1,x–) ?
mode q2
mode q1
mode q3
(q2,x) ∈ Δ
(q1,x) ∈ Δ
(q3,x) ∈ Δ
q3 ∈ ϕ(q1,x–) ?
x ∈ ρ(q1,x–)
15
Nondeterministic Hybrid Automaton
Q
Rn
f : Q × Rn → Rn
Φ: Q × Rn → 2Q×Rn
≡ set of discrete states
≡ continuous state-space
≡ vector field
≡ set-valued discrete transition (& reset & domain)
ú
?
(q2, x) ∈ Φ(q1,x–)
mode q2
mode q1
(q2,x) ∈ Φ(q2,x−)
mode q3
(q1,x) ∈ Φ(q1,x−)
(q3,x) ∈ Φ(q3,x−)
(q3, x) ∈ Φ(q1,x–)
Compact representation of a nondeterministic hybrid automaton
Nondeterministic Hybrid Automaton
(Example #3: Semi-automatic transmission)
guard condition
(does not force jump,
simply allows it) ω ≥
g=1
ω2
ϖ1 ?
g=1
g=2
g=2
ϖ1
ω · ω2
invariance condition
(must hold to remain
in discrete state)
ϖ1 · ω · ω3
ω · ω2 ?
Q ú { 1, 2 }
R2 ≡ continuous state-space
16
Solution to a nondeterministic hybrid automaton
(q2, x) ∈ Φ(q1,x–)
mode q2
mode q1
(q2,x) ∈ Φ(q2,x−)
(q1,x) ∈ Φ(q1,x−)
Definition: A solution to the hybrid automaton is a pair of right-continuous signals
q : [0,∞) → Q
x : [0,∞) → Rn
such that
1. x is piecewise differentiable & q is piecewise constant
2. on any interval (t1,t2) on which q is constant and x continuous
continuous evolution
discrete transition
& resets & domain
3.
Stochastic finite automaton: controlled Markov chain
a
1
controlled Markov chain M
2
20% | b
80% | b
a
Q ú {q1, q2, …, qn}
≡ finite set of states
Σ ú {a, b, c,… }
≡ finite set of input symbols
Φ : Q × Q × Σ → [0,1] ≡ transition probability function
3
Φ(q1, q2, s ) ≡ probability of transitioning to state q2, when in
state q1 and symbol s is selected
By convention, typically
• edges drawn without probabilities correspond to
transitions that occur with probability 1
• self-loops may be omitted
17
Stochastic finite automaton: controlled Markov chain
100% | a
100% | b
1
2
100% | a
20% | b
By convention, typically
• edges drawn without probabilities
correspond to transitions that
occur with probability 1
• self loops may be omitted
80% | b
100% | a
3
100% | b
Q ú {1, 2, 3} Σ ú {a, b}
Φ(q1, q2, s ) ≡ probability of transitioning to state q2, when in
state q1 and symbol s is selected
Stochastic Hybrid Automaton
Q
Rn
f : Q × Rn → Rn
ϕ : Q × Q × Rn → [0,∞]
ρ : Q × Q × Rn → Rn
≡ set of discrete states
≡ continuous state-space
≡ vector field
≡ discrete transition probability
≡ reset map (deterministic)
(Poisson-like model)
x ú ρ (q1, q2, x–)
mode q2
ϕ (q1, q2, x–)
mode q1
ϕ (q1, q3, x–)
mode q3
x ú ρ (q1, q3, x–)
18
Stochastic Hybrid Automaton
Q
≡ set of discrete states
≡ continuous state-space
Rn
f : Q × Rn → Rn
≡ vector field
Φ : Q × Q × Rn× Rn → [0,∞] ≡ discrete transition probability & reset
(Poisson-like model)
ϕ (q1, q2, x–, x)
mode q2
mode q1
mode q3
ϕ (q1, q3, x–, x)
More as special topic later…
Next class…
1. Trajectories of hybrid systems:
• Solution to a hybrid system
• Execution of a hybrid system
2. Degeneracies
• Finite escape time
• Chattering
• Zeno trajectories
• Non-continuous dependency on initial conditions
19
© Copyright 2026 Paperzz