Module 3 Slides PDF
Module 3 Slides PDF
Module 3 Slides PDF
Mobile Robots
Dr. Magnus Egerstedt
Professor
School of Electrical and
Computer Engineering
Module 3
Linear Systems
3.1.1
u
p = u
p
Want to write this on a compact/general form
x1 = p
x2 = p
x 1 = x2
x 2 = u
3.1.2
x=
x1
x2
x =
x 1
x 2
y = p = x1 =
x2
u
1 0
0 1
0 0
x1
x2
0
1
3.1.3
x 1
x 2
x2
u
=
x =
=
y = p = x1 = 1 0 x
A=
0
0
1
0
, B=
0 1
0 0
0
1
, C=
x = Ax + Bu
y = Cx
x1
x2
1 0
0
1
3.1.4
A 2D Point-Mass
px = ux
py = uy
u = (ux , uy )
p = (px , py )
x 1 = px
x2 = px
x 3 = py
x4 = py
u1 = ux
u2 = uy
y 1 = px
y 2 = py
A=
B=
C=
0
0
0
0
0
1
0
0
1
0
1
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
1
0
0 0
1 0
x = Ax + Bu
y = Cx
3.1.5
LTI Systems
x = Ax + Bu
y = Cx
This is a so-called LTI (Linear Time-Invariant) System on
State-Space form!
x n
u m
y p
A: nn
B : nm
C : pn
x =
A x + B u
y =
C x
n 1 (n n)(n 1) (n m)(m 1)
n1
n1
p1
(p n)(n 1)
p1
3.1.6
x
y
u
state
output
input
x = Ax + Bu
y = Cx
3.2.1
c
v = u v
m
If we care about/can measure the velocity:
x = Ax + Bu
y = Cx,
c
A = , B = , C = 1
m
A=
0
0
, B=
0
c/m
, C=
3.2.2
Example 2: Pendulum
Newtons 2nd tells us that
Not linear!
= sin() + cu
1 sin
For small angles we get x = Ax + Bu, y = Cx
A=
0
g/
1
0
, B=
0
c
, C=
3.2.3
x 2 = u2
x 1 = u1
x1
x =
x2
1 0
0 1
(A = 0)
u1 = x2 x1
u2 = x1 x2
x =
1
1
1
1
x
3.2.4
Rendezvous
3.2.5
(x, y)
x = v
y = v
=
1
x = v cos
y = v sin
=
Not linear!
3.2.6
3.3.1
Linearizations
Given a non-linear model
(xo , uo ) (x = xo + x, u = uo + u)
The new equations of motion become
= x x o = x = f (xo + x, uo + u)
x
Magnus
Egerstedt,
Control
of
Mobile
Robots,
Georgia
Ins<tute
of
Technology
3.3.2
Linearizations
= f (xo + x, uo + u)
x
Taylor
expansion
f
f
= f (xo , uo ) +
(xo , uo )x +
(xo , uo )u + H.O.T
x
u
A
h
y = h(xo + x) = h(xo ) +
(xo )x + H.O.T
x
Assumptions:
f (xo , uo ) = 0
h(xo ) = 0
Magnus
Egerstedt,
Control
of
Mobile
Robots,
Georgia
Ins<tute
of
Technology
3.3.3
Linearizations
x = f (x, u)
y = h(x)
x = xo + x
u = uo + u
f (xo , uo ) = 0
h(xo ) = 0
= Ax + Bu
x
y = Cx
A = f
x (xo , uo )
B
=
u (xo , uo )
C = h
x (xo )
3.3.4
x n , u m , y p , f =
f
=
x
f1
x1
f2
x1
f1
x2
..
.
fn
x1
nn
..
.
f1
f2
..
.
fn
f1
xn
f2
xn
..
.
fn
xn
h1
..
,
h
=
hm
3.3.5
x n , u m , y p , f =
f
=
x
f1
x1
f2
x1
..
.
fn
x1
f1
x2
..
.
f1
xn
f2
xn
..
.
fn
xn
f
=
u
f1
u1
f2
u1
..
.
fn
u1
..
.
nm
f1
um
f2
um
..
.
fn
um
f1
f2
..
.
fn
h1
..
,
h
=
hm
3.3.5
x n , u m , y p , f =
f
=
x
f
=
u
f1
x1
f2
x1
f1
x2
..
.
fn
x1
f1
u1
f2
u1
..
.
fn
u1
..
.
f1
xn
f2
xn
..
.
..
.
f1
um
f2
um
..
.
fn
um
fn
x
n
h
=
x
h1
x1
..
.
hp
x1
..
.
pn
f1
f2
..
.
fn
h1
..
,
h
=
hm
h1
xn
..
.
hp
xn
3.3.5
= sin + u cos
x1 =
x2
f (x, u) =
g/ sin(x1 ) + u cos(x1 )
x2 = ,
h(x) = x1
y = x1
(xo , uo ) = (0, 0)
A=
f1
x1
f2
x1
f1
x2
f2
x2
=
(0,0)
0
g/ cos(x1 )
1
0
=
(0,0)
0
g/
1
0
3.3.6
= sin + u cos
x1 =
x2
f (x, u) =
g/ sin(x1 ) + u cos(x1 )
x2 = ,
h(x) = x1
y = x1
(xo , uo ) = (0, 0)
B=
f1
u
f2
u
=
(0,0)
0
cos(x1 )
=
(0,0)
0
1
3.3.6
= sin + u cos
x1 =
x2
f (x, u) =
g/ sin(x1 ) + u cos(x1 )
x2 = ,
h(x) = x1
y = x1
(xo , uo ) = (0, 0)
C=
h
x1
h
x2
(0,0)
3.3.6
Example: Unicycle
(x, y)
x = v cos x1 = x, x2 = y, x3 =
y = v sin y1 = x1 , y2 = x2 , y3 = x3
=
u1 = v, u2 =
(xo , uo ) = (0, 0)
1 0
1
A = 0, B = 0 0 , C = 0
0 1
0
0 0
1 0
0 1
x 2 = 0 ???
Magnus
Egerstedt,
Control
of
Mobile
Robots,
Georgia
Ins<tute
of
Technology
3.3.7
Punchlines
Sometimes the linearizations give reasonable models and
sometimes they do not
Despite the fact that they are only local approximations, they
are remarkably useful (when they work)
3.3.8
x = Ax + Bu
y = Cx
x = Ax
x(t0 ) = x0
What is the solution to this system?
3.4.1
How do we know?
x(t0 ) = ea(t0 t0 ) x0 = e0 x0 = x0
d
x(t) = aea(tt0 ) x0 = ax
dt
initial conditions
dynamics
3.4.2
Matrix Exponentials
The definition is just like for scalar exponentials
eat =
a k tk
k=0
Derivative:
k!
eAt =
Ak t k
k=0
k!
k=0
k=1
k=1
k=0
kAk tk1
Ak1 tk1
Ak t k
d Ak t k
=0+
=A
=A
dt
k!
k!
(k 1)!
k!
d At
e = AeAt
dt
Magnus
Egerstedt,
Control
of
Mobile
Robots,
Georgia
Ins<tute
of
Technology
3.4.3
eA(tt0 ) = (t, t0 )
d
dt (t, t0 ) = A(t, t0 )
x = Ax x(t) = (t, )x( )
(t, t) = I
But what if we have the controlled system: x = Ax + Bu
Claim:
(t, )Bu( )d
t0
3.4.4
(t, )Bu( )d
t0
t0
(t0 , )Bu( )d
t0
x(t0 ) = x(t0 )
3.4.5
(t, )Bu( )d
t0
d
d
x(t) = A(t, t0 )x(t0 ) +
dt
dt
d
dt
(t, )Bu( )d
t0
d
f (t, )d
dt
f (t, )d = f (t, t) +
t0
t0
t
(t, t)Bu(t) +
A(t, )Bu( )d
t0
3.4.6
(t, )Bu( )d
t0
d
d t
x(t) = A(t, t0 )x(t0 ) +
(t, )Bu( )d
dt
dt t0
t
d
x(t) = A (t, t0 )x(t0 ) +
(t, )Bu( )d + Bu(t)
dt
t0
d
x = Ax + Bu
dt
Magnus
Egerstedt,
Control
of
Mobile
Robots,
Georgia
Ins<tute
of
Technology
3.4.6
In Summary
x = Ax + Bu, y = Cx
(t, )Bu( )d
t0
(t, ) = eA(t )
3.4.7
3.5.1
Scalar Systems
It is useful to start with scalar systems to get some intuition
about what is going on
a>0:
100
50
0.5
1.5
2.5
3.5
4.5
3.5.2
Scalar Systems
It is useful to start with scalar systems to get some intuition
about what is going on
a<0:
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.5
1.5
2.5
3.5
4.5
3.5.2
Scalar Systems
It is useful to start with scalar systems to get some intuition
about what is going on
a=0:
1.8
1.6
1.4
1.2
0.8
0.6
0.4
0.2
0.5
1.5
2.5
3.5
4.5
3.5.2
Three Cases
Asymptotically Stable: x(t) 0, x(0)
Unstable: x(0) : x(t)
Critically Stable: in-between (doesnt blow up but doesnt go
to zero either)
a > 0 : unstable
a < 0 : asymptotically stable
a = 0 : critically stable
3.5.3
Av = v
eigenvector n
>> eig(A)
3.5.4
Example
A=
1
0
0
1
1 = 1, 2 = 1, v1 =
1
0
, v2 =
0
1
3.5.5
Stability
x = Ax x(t) = eAt x(0)
Asymptotically Stable (if and only if):
Unstable (if):
We will design
for this!
Re() 0, eig(A)
3.5.6
A=
0 1
1 0
0 1
1 0
1 = j, 2 = j
critically stable!
oscillates!
1 = 1, 2 = 1
unstable!
3.5.7
Problem: Have all the agents meet at the same (unspecified) position
3.6.1
x 1 = u1
x 2 = u2
x1
x2
u1 = x2 x1
u2 = x1 x2
x =
1
1
1
1
3.6.2
1
1
1
1
1 = 0, 2 = 2
critically stable
null(A) = {x : Ax = 0}
null(A) = {x : x =
, }
3.6.3
x1 , x2 (x1 x2 ) 0
Rendezvous is achieved!
If there are more than two agents, they should probably aim
towards the centroid of their neighbors (or something similar)
x i =
jNi
(xj xi )
3.6.4
jNi
(xj xi )
x1
..
x= .
xN
x = Lx
..
null(L) = {x : x = . }
3.6.5
jNi
(xj xi )
x = Lx
xi , i (xi xj ) 0, i, j
Rendezvous is achieved!
3.6.6
Rendezvous
3.6.7
Beyond Rendezvous
3.6.8
3.6.9
x = Ax + Bu
y = Cx
?
Magnus
Egerstedt,
Control
of
Mobile
Robots,
Georgia
Ins<tute
of
Technology
3.7.1
x =
y=
p
0 1
0 0
1 0
x+
u > 0 if y < 0
u < 0 if y > 0
p = u
0
1
u = y
3.7.2
Or, In General
u = Ky = KCx
x = Ax + Bu = Ax BKCx = (A BKC)x
Pick, if possible, K such that
3.7.3
0 1
0 0
0 1
1 0
0
1
eig(A BKC) = j
Critically stable!
3.7.4
3.7.5
3.7.6
x = Ax + Bu
y = Cx
?
Magnus
Egerstedt,
Control
of
Mobile
Robots,
Georgia
Ins<tute
of
Technology
3.8.1
closed-loop dynamics
x = Ax + Bu = Ax BKx = (A BK)x
Pick, if possible, K such that the closed-loop system
is stabilized, i.e.,
Module 4!
3.8.2
K = k1 k2
0 1
0
k1
x =
0 0
1
0
1
x =
x
k1 k2
k2
3.8.3
k1 = k2 = 1
0
1
A BK =
1 1
eig(A BK) = 0.5 0.866j
Asymptotically stable!
Damped oscillations
3.8.4
Attempt 1
3.8.5
Another Attempt
k1 = 0.1, k2 = 1
0
1
A BK =
0.1 1
eig(A BK) = 0.1127, 0.8873
Asymptotically stable!
No oscillations
3.8.6
Attempt 2
3.8.7
Eigenvalues Matter
It is clear that some eigenvalues are better than others. Some
cause oscillations, some make the system respond too slowly,
and so forth
In the next module we will see how to select eigenvalues and
how to pick control laws based on the output rather than the
state.
3.8.8