0% found this document useful (0 votes)
49 views

Module5 PDF

This document summarizes a lecture on controlling mobile robots using hybrid systems and control theory. It discusses how robot models and controllers may need to switch based on changes in the environment or task. Hybrid automata are introduced as a model that can describe systems with both continuous dynamics and discrete switching logic. Examples of hybrid systems like a thermostat, gear shift, and behavior-based robot control are provided. The lecture also discusses a potential issue where switching between two stable controllers can cause instability in the overall system.

Uploaded by

NurujjamanKhan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views

Module5 PDF

This document summarizes a lecture on controlling mobile robots using hybrid systems and control theory. It discusses how robot models and controllers may need to switch based on changes in the environment or task. Hybrid automata are introduced as a model that can describe systems with both continuous dynamics and discrete switching logic. Examples of hybrid systems like a thermostat, gear shift, and behavior-based robot control are provided. The lecture also discusses a potential issue where switching between two stable controllers can cause instability in the overall system.

Uploaded by

NurujjamanKhan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 53

Control of

Mobile Robots
Module 5
Dr. Magnus Egerstedt
Professor
School of Electrical and
Hybrid Systems
Computer Engineering

How make mobile robots move in effective, safe,


predictable, and collaborative ways using modern
control theory?

School  of  Electrical  and  Computer  Engineering  


Lecture 5.1 – Switches Everywhere
•  So far, the models stay the same over time
- NOT ALWAYS TRUE!
•  We have a designed one-size-fits-all controllers
- “NEVER” TRUE IN ROBOTICS!

•  Recall the behavior-based control


paradigm
•  We need to be able to deal with
these types of phenomena

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.1.1
Switches by Necessity

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.1.2
Switches by Design

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.1.3
Switches by Design

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.1.4
Issues
•  Models?
•  Stability and Performance? (t �→ ∞)
•  Compositionality?
•  Traps?

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.1.5
Lecture 5.2 – Hybrid Automata
•  We need to be able to describe systems that contain both the
continuous dynamics and the discrete switch logic
•  Hybrid Automata = Finite state machines (discrete logic) on
steroids (continuous dynamics)

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.2.1
Modes, Transitions, Guards, and Resets
•  Let, as before, the (continuous) state of the system be x
•  As we will be switching between different modes of operation,
let’s add an additional discrete state q
•  Dynamics:
ẋ = fq (x, u)
•  The transitions between different discrete modes can be
encoded in a state machine:

q q�

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.2.2
Modes, Transitions, Guards, and Resets
•  The conditions under which a transition occurs are called
guard conditions, i.e., a transition occurs from q to q’ if
x ∈ Gq,q�

•  As a final component, we would like to allow for abrupt


changes in the continuous state as the transitions occur, which
we will call resets:
x := Rq,q� (x)

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.2.3
The Hybrid Automata Model
•  Putting all of this together yields a very rich model known as a
hybrid automata (HA) model:
x := R1,2 (x)
x := x0 q=1 q=2
x ∈ G1,2
ẋ = f1 (x, u) ẋ = f2 (x, u)
x ∈ G2,1

x := R3,1 (x) x ∈ G2,3


x := R2,1 (x)

x ∈ G3,1 ẋ = f3 (x, u) x := R2,3 (x)

q=3

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.2.4
HA Example 1 - Thermostat

T ≥ Td + �

Ṫ = Fheat (T ) Ṫ = Fcool (T )

T ≤ Td − �

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.2.5
HA Example 2 – Gear Shift

v̇ = f1 (v, u)
RP M (v) ≥ c1

RP M (v) ≤ c�1 v̇ = f2 (v, u)


RP M (v) ≥ c2

RP M (v) ≤ c�2 v̇ = f3 (v, u)

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.2.6
HA Example 3 – Behaviors

�x − xO � ≤ d

ẋ = fGT G (x) ẋ = fAO (x)

�x − xO � ≥ d�

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.2.7
Lecture 5.3 – A Counter Example
•  What can possibly go wrong when you start switching
between different controllers?

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.3.1
A Simple 2-Mode System
•  Two modes:
� �
−� 1
ẋ = A1 x = x
−2 −�
� � eig(Ai ) = −� ± 1.41j
−� 2
ẋ = A2 x = x
−1 −�

•  Both modes are asymptotically stable!

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.3.2
Mode 1
ẋ = A1 x
1

0.5

ï0.5

ï1

ï1.5

ï1.5 ï1 ï0.5 0 0.5 1 1.5 2

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.3.3
Mode 2
ẋ = A2 x
1

0.5

ï0.5

ï1

ï1.5 ï1 ï0.5 0 0.5 1 1.5

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.3.4
HA 1
� �
0 1 x=0

ẋ = A1 x ẋ = A2 x
� �
1 0 x=0
1

ASYMPTOTICALLY STABLE
0.8

0.6

0.4

0.2

ï0.2

ï0.4

ï0.6

ï0.8
ï1 ï0.5 0 0.5 1 1.5 2

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.3.5
HA 2
� �
1 0 x=0

ẋ = A1 x ẋ = A2 x
� �
0 1 x=0

50
UNSTABLE
0

ï50

ï100

ï150

ï250 ï200 ï150 ï100 ï50 0 50 100 150 200

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.3.6
Punchlines
•  By combining stable modes, the resulting hybrid system may
be unstable!
•  By combining unstable modes, the resulting hybrid system
may be stable!
•  Design stable modes but be aware that this is a risk one may
face!

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.3.7
Lecture 5.4 – Danger, Beware!
•  Stable subsystems do not guarantee a stable hybrid system

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.4.1
Switched Systems
•  We saw last time that it was possible to destabilize stable
subsystems by an unfortunate series of switches
•  Ignoring resets, we can write the hybrid system as a switched
system:
ẋ = fσ (x, u)
switch signal
•  The switch signal dictates which discrete mode the system is
in
σ(t) ∈ Σ = {1, . . . , p}

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.4.2
Different Kinds of Stability
•  Given a switched system ẋ = fσ (x)
–  universal, asymptotic stability:
x → 0, ∀σ
–  existential, asymptotic stability:
∃σ s.t. x → 0
•  If the switch signal is generated by an underlying hybrid
automaton:
–  hybrid, asymptotic stability:
x→0

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.4.3
Some Results

If all the individual modes are A.S., then

Existentially A.S.
•  Why? Simply pick a mode and never switch!

Not always universally A.S.


•  Why? See the counter example
•  What to do? (common Lyapunov function)

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.4.4
Practically Speaking

•  Design stabilizing controllers for the subsystems


•  Design the switching logic in the HA
•  (Find common Lyapunov function)
•  Be aware of the potential danger here and test, test, test!

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.4.5
Lecture 5.5 – The Bouncing Ball
•  Let’s model a ball bouncing on a surface:

•  Equations of motion in-between bounces:


� � � �
0 1 0 � �
ḧ = −g ⇒ ẋ = x+ , y= 1 0 x
0 0 −g

•  Bounces:
� �
1 0
ḣ := −γ ḣ ⇒ x := x
0 −γ

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.5.1
The Ball HA
x∈G
Guards?
ẋ = Ax + b � �
h≤0 ⇒ 1 0 x≤0

x := Rx h ≤ 0 and ḣ ≤ 0 ⇒ x ≤ 0
� � � �
0 1 0
A= , b=
0 0 −g
� �
1 0
R=
0 −γ

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.5.2
The Ball HA
x∈G

ẋ = Ax + b

x := Rx
•  Is this any good?
•  To answer that we need to figure out how the
system actually behaves!

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.5.3
Solving for the Output
� � � �
0 1 0 � �
ḧ = −g ⇒ ẋ = x+ , y= 1 0 x
0 0 −g
� t
y = CΦ(t, t0 )x(t0 ) + C Φ(t, τ )Bu(τ )dτ
t0
Φ(t, τ ) = eA(t−τ )
A2 = A3 = . . . = 0
�∞ k � �
At At 1 t
e = = I + At + 0 =
k! 0 1
k=0

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.5.4
Solving for the Output
� � � �
0 1 0 � �
ḧ = −g ⇒ ẋ = x+ , y= 1 0 x
0 0 −g
� t
y = CΦ(t, t0 )x(t0 ) + C Φ(t, τ )Bu(τ )dτ
t0
� �� �
� � 1 t − t0 h0
y= 1 0
0 1 ḣ0
� � �� �
� � t 1 t−τ 0
+ 1 0 dτ
t0 0 1 −g
g
= h0 + ḣ0 (t − t0 ) − (t − t0 )2
2
Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.5.4
Time In-Between Bounces?
g
y = h0 + ḣ0 (t − t0 ) − (t − t0 )2
2
h0 = 0, t0 = 0
g 2
y(T ) = 0 = ḣ0 T − T = T (ḣ0 − g/2T )
2
2ḣ0
T = 0, T =
g

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.5.5
Accumulated Bounce Times
2ḣ0
T = (time in-between bounces)
velocity at the beginning
g
time of first bounce
ḣ0,0 = v 2v time of second bounce
velocity after first bounce T1 = 2v 2v
g T2 = +γ
ḣ0,1 = γv g g
.. N −1
. 2v � 2v 1
k
TN = γ →
ḣ0,k = γ k v g g 1−γ
k=0

γ<1

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.5.6
So What?

2v 1
T∞ = <∞
g 1−γ

•  The ball bounces an infinite number of times in finite time.


•  More than just a mathematical curiosity
–  Simulations crash!
–  Hybrid system is undefined beyond this time!
•  This is known as the Zeno Phenomenon – next lecture

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.5.7
Lecture 5.6 – The Zeno Phenomenon
•  Problem with the bouncing ball: Infinitely many switches in
finite time
•  This is bad:
–  Simulations crash
–  Model is not accurate
–  System behavior fundamentally ill-defined beyond “Zeno
point”

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.6.1
The Zeno Phenomenon
The hare

The tortoise

Zeno of Elea: 490 BC-430 BC

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.6.2
The Zeno Phenomenon

Zeno of Elea: 490 BC-430 BC

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.6.2
The Zeno Phenomenon

Zeno of Elea: 490 BC-430 BC

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.6.2
The Zeno Phenomenon

Zeno of Elea: 490 BC-430 BC

The Paradox: The hare never catches up with the tortoise


The Solution: Convergent series
The Problem: Infinitely many switches in finite time

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.6.2
Example

−1 x≥0
ẋ =
+1 x<0

ẋ = −1

x≥0 x<0

ẋ = +1

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.6.3
Super-Zeno?
� •  This system switches infinitely
−1 x≥0
ẋ = many times in a single time-
+1 x<0
instant
•  Zeno: Infinitely many switches in
ẋ = −1 finite time
–  Type 1: In a single time-
x≥0 x<0 instant
–  Type 2: Not Type 1 (bouncing
ẋ = +1
ball)

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.6.4
Good News and Bad News
•  Zeno is a problem
•  Type 1 is not only detectable, but one can deal with it in a
rather straightforward manner
•  Type 2 is overall hard to handle!

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.6.5
Lecture 5.7 – Sliding Mode Control

ẋ = −1

x≥0 x<0

ẋ = +1

•  It is clear what should happen!


•  How do we make that mathematically sound?
•  Sliding Mode Control

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.7.1
Switching Surfaces
switching surface
ẋ = f1 (x)
g(x) ≥ 0 g(x) < 0 g(x) > 0
ẋ = f2 (x) g(x) = 0
g(x) < 0
•  Both vector fields point “inwards” = bad!
•  We should keep sliding along the switching surface
•  Sliding Mode Control

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.7.2
Sliding?
∂g T
∂x f2

g(x) > 0
f1
g(x) = 0
Sliding occurs if g(x) < 0
∂g ∂g
f1 < 0 AND f2 > 0
∂x ∂x
derivative of g in direction f = Lf g = Lie derivative

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.7.3
Sliding?
∂g T
∂x f2

g(x) > 0
f1
g(x) = 0
g(x) < 0
Sliding occurs if
Lf1 g < 0 AND Lf2 g > 0

derivative of g in direction f = Lf g = Lie derivative

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.7.3
A Test For Type 1 Zeno

Sliding occurs if
Lf1 g < 0 AND Lf2 g > 0

•  Next time: But what happens beyond the Zeno point?

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.7.4
Lecture 5.8 – Regularizations

f2
ẋ = f1 (x)
g(x) ≥ 0 g(x) < 0 g(x) > 0
f1
ẋ = f2 (x) g(x) = 0
g(x) < 0
Sliding occurs if
Lf1 g < 0 AND Lf2 g > 0

•  How do we move beyond the Zeno point?

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.8.1
The Sliding “Mode”
f2 dg
=0
dt
f1
g=0

dg ∂g ∂g
= ẋ = (σ1 f1 + σ2 f2 ) = σ1 Lf1 g + σ2 Lf2 g
dt ∂x ∂x
L f1 g
= 0 ⇒ σ2 = −σ1
L f2 g

σ1 , σ2 ≥ 0, σ1 + σ2 = 1

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.8.2
Back to the Example

−1 x≥0 g(x) = x = 0
ẋ =
+1 x<0

∂g The Induced Mode


L f1 g = f1 = 1(−1) = −1
∂x ẋ = 0.5f1 + 0.5f2 = 0
∂g
L f1 g = f2 = 1 · 1 = 1
∂x
L f1 g −1
σ2 = −σ1 = −σ1 = σ1
L f2 g 1
σ1 = σ2 = 0.5
Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.8.3
The Induced Mode
� �
L f1 g Lf1 g
σ2 = −σ1 σ1 + σ2 = σ1 1 − =1
L f2 g Lf2 g
1 L f2 g
σ1 = Lf1 g
=
1 − Lf g L f2 g − L f1 g
2

L f1 g
σ2 = −
L f2 g − L f1 g

1 � �
ẋ = Lf2 gf1 − Lf1 gf2
L f2 g − L f1 g

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.8.4
Regularizations of Type 1 Zeno HA

ẋ = f1 (x)

g(x) > 0 g(x) < 0

ẋ = f2 (x)

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.8.5
Regularizations of Type 1 Zeno HA

g = 0 and Lf1 g < 0 and Lf2 g > 0


ẋ = f1 (x)

g>0 � �
1
g>0 g<0 ẋ = Lf2 gf1 − Lf1 gf2
L f2 g − L f1 g
g<0

ẋ = f2 (x) g = 0 and Lf1 g < 0 and Lf2 g > 0

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.8.5
Hybrid Systems: In Summary
•  We have
–  Models
–  Stability Awareness
–  Zeno
–  Regularizations
•  Next Module: Back to ROBOTICS!

Magnus  Egerstedt,  Control  of  Mobile  Robots,  Georgia  Ins<tute  of  Technology  
5.8.6

You might also like