Sie sind auf Seite 1von 122

Fundamentals of Robotic Mechanical

Systems
Chapter 2: Mathematical Background
Jorge Angeles
Department of Mechanical Engineering &
Centre for Intelligent Machines
McGill University
2009
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 1 / 122
Outline
1
Preambule
2
Linear Transformations
3
Rigid-Body Rotations
The Cross-Product Matrix
The Rotation Matrix
The Linear Invariants of a 3 3 Matrix
Linear Invariants of a Rotation
Examples
Euler-Rodrigues Parameters
4
Composition of Reections and Rotations
5
Coordinate Transformations and Homogeneous Coordinates
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 2 / 122
Preamble
Links are regarded as rigid bodies
General motion : rotation and translation
Invariant concepts : items that do not change upon a change of coordinate
frame
Examples : distances between points and angles between lines
Vectors vs. components
Tensors vs. matrices
We will use matrix whenever we mean tensor.
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 3 / 122
Linear Transformations
Vector space : Set of objects called vectors
that follow certain algebraic rules
The physical 3-dimensional space is a particular case of a vector space
vectors : in boldface lower case
tensors and matrices : in boldface upper case
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 4 / 122
Algebraic Rules for Vectors
Let v, v
1
, v
2
, v
3
and w be elements of a vector space V over the real eld
while and are real numbers :
(i) v
1
+v
2
= v
2
+v
1
(ii) v +0 = v where 0 : the zero vector
(iii) v
1
+ (v
2
+v
3
) = (v
1
+v
2
) +v
3
(iv) v +w = 0 w = v
(v) (v) = ()v
(vi) = 1 v = v
(vii) ( + )v = v + v
(v
1
+v
2
) = v
1
+ v
2
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 5 / 122
Linear Transformations (Contd)
L : linear transformation operator over the real eld
v = Lu
Properties of linear transformations :
(i) homogeneity : L(u) = v
(ii) additivity : L(u
1
+u
2
) = v
1
+v
2
Range of L : v = Lu for every u in U
Kernel of L : u
N
of U mapped by L into 0 V
Examples of transformations in 3-dimensional Euclidean space E
3
:
projections, reections, rotations, afne transformations
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 6 / 122
Linear Transformations (Contd)
Orthogonal projection P of E
3
onto itself : linear transformation of E
3
onto a
plane passing through the origin with unit normal n. Properties :
P
2
= P : idempotent; Pn = 0 : singular (2.1a)
The projection p

of p onto a plane of unit vector n :


FIG.: Projection.
p

= p n(n
T
p) = (1 nn
T
)p = Pp (2.1b)
P = 1 nn
T
(2.4)
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 7 / 122
Linear Transformations (Contd)
Reection Rof E
3
onto a plane passing through the origin with a unit
normal n :
FIG.: reection.
p

= p 2nn
T
p (1 2nn
T
)p = Rp
R = 1 2nn
T
(2.5)
Properties of reections : R
2
= 1, R
1
= R
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 8 / 122
Linear Transformations (Contd)
Orthogonal decomposition
v = v

+v

axial component (v-par) :


v

ee
T
v (2.6a)
normal component (v-perp)
v

v v

(1 ee
T
)v (2.6b)
Vector space
Basis of a vector space V : set of linearly independent vectors {v
i
}
n
1
where n
is the dimension of V
v =
1
v
1
+
2
v
2
+ +
n
v
n
(2.7)
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 9 / 122
Linear Transformations (Contd)
A linear transformation of U into V with bases B
U
= {u
j
}
m
1
and
B
V
= {v
i
}
n
1
:
Lu
j
= l
1j
v
1
+ l
2j
v
2
+ + l
nj
v
n
j = 1, . . . , m
[L]
B
V
B
U

_
l
11
l
12
l
1m
l
21
l
22
l
2m
.
.
.
.
.
.
.
.
.
.
.
.
l
n1
l
n2
l
nm
_

_
(2.10)
Denition
The jth column of L with respect to B
U
and B
V
is composed of the n real
coefcients l
ij
of the representation of the image of the jth vector of B
U
in
terms of B
V
.
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 10 / 122
Linear Transformations (Contd)
If Le = e,
then e : eigenvector of L,
: eigenvalue of L
Characteristic polynomial of L :
det(1 L) = 0 (2.11)
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 11 / 122
Example
Example
What is the representation of the reection Rof E
3
into itself, with respect to
the x-y plane, in terms of unit vectors parallel to the X, Y, Z axes that form
the coordinate frame F ?
Ri = i, Rj = j, Rk = k
[Ri]
F
=
_
_
1
0
0
_
_
, [Rj]
F
=
_
_
0
1
0
_
_
, [Rk]
F
=
_
_
0
0
1
_
_
[R]
F
=
_
_
1 0 0
0 1 0
0 0 1
_
_
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 12 / 122
Rigid-Body Rotations
Linear isomorphism : one-to-one linear transformation mapping space V onto
itself
Isometry : distance between any two points is preserved :
d
_
(u v)
T
(u v) (2.12)
where u and v are position vectors of two points.
Volume of tetrahedron formed by triad {u, v, w} :
V
1
6
|u v w| =
1
6

det
__
u v w
_

(2.13)
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 13 / 122
Rigid-Body Rotations (Contd)
Magnitudes of vectors {u, v, w} :
u

u
T
u, v

v
T
v, w

w
T
w (2.14)
Under isotropy mapping {u, v, w} into {u

, v

, w

} :
u

= u, v

= v, w

= w (2.15a)
det[u

] = det[u v w] (2.15b)
If +, then rotation ; otherwise, reection
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 14 / 122
Rigid-Body Rotations (Contd)
A position vector p of a point in E
3
undergoes a rotation Q:
p

= Qp , p
T
p = p

T
p

Q
T
Q = 1 and Q is an orthogonal matrix.
Moreover, for T [u v w] and T

[u

],
T

= QT (2.20)
det(T) = det(T

) (2.21a)
det(Q) = +1 (2.21b)
Qis a proper orthogonal matrix.
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 15 / 122
Rigid-Body Rotations (Contd)
Theorem
The eigenvalues of a proper orthogonal matrix Qlie on the unit circle
centered at the origin of the complex plane.
Proof :
Qe = e , e

= e

: eigenvalue of Q, e : eigenvector of Q
: complex conjugate of , e

: complex conjugate of e
For real Q : Q

= Q
T
, e

= e
T
e
T
Q

Qe = e
T
e e
T
Q
T
Qe = e
T
e (2.25)
Qis orthogonal e
T
e =| |
2
e
T
e | |
2
= 1 (2.27)
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 16 / 122
Rigid-Body Rotations (Contd)
Corollary
A proper orthogonal 3 3 matrix has at least one eigenvalue that is +1.
Qe = e (2.28)
Theorem
(Euler, 1776)
A rigid-body motion about a point O leaves xed a set of points lying on a
line L that passes through O and is parallel to eigenvector e of Qassociated
with the eigenvalue +1.
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 17 / 122
Rigid-Body Rotations (Contd)
Theorem
(Cayley-Hamilton) If P() is the characteristic polynomial of n n matrix
A, i.e.,
P() = det(1 A)
=
n
+ a
n1

n1
+ + a
1
+ a
0
(2.29)
then,
A
n
+ a
n1
A
n1
+ + a
1
A+ a
0
1 = O (2.30)
O: n n zero matrix
Any power p n of the n n matrix Acan be expressed as linear
combination of the rst n powers of A:
1, A, , A
n1
where 1 = A
0
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 18 / 122
The Cross-Product Matrix
If u = u(t) U and v = v(u(t)) V are m- and n-dimensional vectors,
respectively, while t is a real variable, and f = f(u, v) is a real-valued
function, then
u(t) =
_

_
u
1
(t)
u
2
(t)
.
.
.
u
m
(t)
_

_
, v(t) =
_

_
v
1
(t)
v
2
(t)
.
.
.
v
n
(t)
_

_
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 19 / 122
Cross-Product Matrix (Contd)
f
u

_

_
f/u
1
f/u
2
.
.
.
f/u
m
_

_
,
f
v

_

_
f/v
1
f/v
2
.
.
.
f/v
n
_

_
(2.31)
v
u

_

_
v
1
/u
1
v
1
/u
2
v
1
/u
m
v
2
/u
1
v
2
/u
2
v
2
/u
m
.
.
.
.
.
.
.
.
.
.
.
.
v
n
/u
1
v
n
/u
2
v
n
/u
m
_

_
(2.32)
df
du
=
f
u
+
_
v
u
_
T
f
v
(2.33)
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 20 / 122
Cross-Product Matrix (Contd)
If f = f(u, v, t) and v = v(u, t), then
df
dt
=
f
t
+
_
f
u
_
T
du
dt
+
_
f
v
_
T
v
t
+
_
f
v
_
T
v
u
du
dt
(2.34)
and
dv
dt
=
v
t
+
v
u
du
dt
(2.35)
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 21 / 122
Example
Example
Let the components of v and x in certain reference frame F be given as
[v]
F
=
_
_
v
1
v
2
v
3
_
_
, [x]
F
=
_
_
x
1
x
2
x
3
_
_
(2.36a)
what are the components of [v x] and
_
(vx)
x
_
in the same frame F ?
Solution :
[v x]
F
=
_
_
v
2
x
3
v
3
x
2
v
3
x
1
v
1
x
3
v
1
x
2
v
2
x
1
_
_
(2.36b)

_
(v x)
x
_
F
=
_
_
0 v
3
v
2
v
3
0 v
1
v
2
v
1
0
_
_
(2.36c)
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 22 / 122
Cross-Product Matrix (Contd)
v x = Vx (2.37)
Theorem
The cross-product matrix A of any 3-dimensional vector a is skew-symmetric,
i.e.,
A
T
= A a (a b) = A
2
b (2.38)
with
A
2
= a
2
1 +aa
T
(2.39)
and being the Euclidean norm of the vector.
The cross-product matrix (CPM) A of any 3-dimensional vector a is uniquely
dened.
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 23 / 122
The Rotation Matrix
FIG.: Rotation of a rigid body about a line.
p

OQ +

QP

(2.40)

OQ : the axial component of p along



e

QP : normal component of p with respect to e


Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 24 / 122
Rotation Matrix (Contd)

OQ= ee
T
p (2.41)

QP

= (cos )

QP +(sin)

QP

(2.42)

QP= (1 ee
T
)p,

QP

= e p Ep

QP

= cos (1 ee
T
)p + sinEp (2.45)
p

= [ee
T
+ cos (1 ee
T
) + sinE]p (2.47)
p

is a linear transformation of p with a rotation matrix


Q = ee
T
+ cos (1 ee
T
) + sinE (2.48)
e, : The natural invariants of Q
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 25 / 122
Rotation Matrix (Contd)
Special cases :
= Q = 1 + 2ee
T
(2.49)
= 0 Q = 1
leading to a symmetric Q.
Under no circumstance does the rotation matrix become skew-symmetric, for
a 3 3 skew-symmetric matrix is by necessity singular.
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 26 / 122
Rotation Matrix (Contd)
The series expansion of Qfor a xed value of e :
Q() = Q(0) +Q

(0) +
1
2!
Q

(0)
2
+ +
1
k!
Q
(k)
(0)
k
+
where (k) is the kth derivative of Qwith respect to .
Since Q
(k)
(0) = E
k
, E
(2k+1)
= (1)
k
E,
E
2k
= (1)
k
(1 ee
T
),
Q() = 1 +E +
1
2!
E
2

2
+ +
1
k!
E
k

k
+
Q() = e
E
(2.53)
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 27 / 122
Rotation Matrix (Contd)
Q() = 1+
[
1
2!

2
+
1
4!

4
+
1
(2k)!
(1)
k

2k
+
. .
cos 1
](1 ee
T
)
+[
1
3!

3
+ +
1
(2k + 1)!
(1)
k

2k+1
+
. .
sin
]E
Q = 1 + sinE+ (1 cos )E
2
(2.54)
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 28 / 122
Rotation Matrix (Contd)
Canonical Forms of the Rotation Matrix
If X axis is parallel to the axis of rotation, i.e., to [e]
X
=
_
1 0 0

T
, then
[E]
X
=
_
_
0 0 0
0 0 1
0 1 0
_
_
, [E
2
]
X
=
_
_
0 0 0
0 1 0
0 0 1
_
_
[Q]
X
=
_
_
1 0 0
0 cos sin
0 sin cos
_
_
(2.55a)
[Q]
Y
=
_
_
cos 0 sin
0 1 0
sin 0 cos
_
_
(2.55b)
[ Q]
Z
=
_
_
cos sin 0
sin cos 0
0 0 1
_
_
(2.55c)
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 29 / 122
The Linear Invariants of a 3 3 Matrix
For any 3 3 matrix A:
Cartesian decomposition
A
S

1
2
(A+A
T
), A
SS

1
2
(AA
T
) (2.56)
A
S
: symmetric part, A
SS
: skew-symmetric part.
The axial vector is a vector a with the property
a v A
SS
v (2.57)
for any vector v.
The trace of Ais the sum of the eigenvalues of A
S
.
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 30 / 122
Linear Invariants of a 3 3 Matrix (Contd)
Let entries of matrix Abe a
ij
, for i, j = 1, 2, 3. Then,
vect(A) a
1
2
_
_
a
32
a
23
a
13
a
31
a
21
a
12
_
_
tr(A) a
11
+ a
22
+ a
33
(2.58)
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 31 / 122
Linear Invariants of a 3 3 Matrix (Contd)
Theorem
The vector of a 3 3 matrix vanishes if and only if it is symmetric, whereas
the trace of an n n matrix vanishes if the matrix is skew symmetric.
For 3-dimensional vectors a and b :
vect(ab
T
) =
1
2
a b (2.59)
tr(ab
T
) = a
T
b (2.60)
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 32 / 122
Linear Invariants of a 3 3 Matrix (Contd)
Proof of relation (2.59) :
Let w denote vect(ab
T
)
wv = Wv (2.61)
W : skew-symmetric component of ab
T
W
1
2
(ab
T
ba
T
) (2.62)
Wv = wv =
1
2
[(b
T
v)a (a
T
v)b] (2.63)
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 33 / 122
Linear Invariants of a 3 3 Matrix (Contd)
Compare relation (2.63) with the double-cross product :
(b a) v = (b
T
v)a (a
T
v)b (2.64)
w =
1
2
b a (2.65)
The trace of an n n matrix can vanish without the matrix necessarily
being skew-symmetric, while the trace of a skew-symmetric matrix
necessarily vanishes.
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 34 / 122
Linear Invariants of a Rotation
Matrices 1, ee
T
and cos (1 ee
T
) are symmetric ;
matrix sinE is skew-symmetric. Hence,
vect(Q) = vect(sinE) = sine (2.66)
tr(Q) = tr[ee
T
+ cos (1 ee
T
)]
e
T
e + cos (3 e
T
e)
= 1 + 2 cos (2.67)
cos =
tr(Q) 1
2
(2.68)
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 35 / 122
Linear Invariants of a Rotation (Contd)
vect(Q) q =
_
_
q
1
q
2
q
3
_
_
in a given frame.
Introducing q
0
cos as a linear invariant of the rotation matrix, the rotation
matrix can be fully dened by four scalar parameters :
[q
1
, q
2
, q
3
, q
0
]
T
(2.69)
These components of are not independent since
q
2
+ q
2
0
sin
2
+ cos
2
= 1 (2.70)
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 36 / 122
Linear Invariants of a Rotation (Contd)

2
q
2
1
+ q
2
2
+ q
2
3
+ q
2
0
= 1 (2.71)
sin = q, e = q/ sin (2.73)
Q =
qq
T
q
2
+ q
0
_
1
qq
T
q
2
_
+Q (2.74a)
Q
(q x)
x
Q = q
0
1 +Q+
qq
T
1 + q
0
(2.74b)
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 37 / 122
Linear Invariants of a Rotation
Linear invariants are not suitable to represent a rotation when is either
or close to it.
Changing the sign of e does not change the rotation matrix, provided that the
sign of is also changed.
Choose 0
sin = q, e =
q
q
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 38 / 122
Examples
Example
If [e]
F
= [

3/3,

3/3,

3/3 ]
T
in a given coordinate frame F and
= 120

, what is Q in F ?
Solution : From the data,
cos =
1
2
, sin =

3
2
[ee
T
]F =
1
3
_
_
1
1
1
_
_
_
1 1 1

=
1
3
_
_
1 1 1
1 1 1
1 1 1
_
_
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 39 / 122
Examples (Contd)
[ 1 ee
T
]
F
=
1
3
_
_
2 1 1
1 2 1
1 1 2
_
_
, [ E]
F

3
3
_
_
0 1 1
1 0 1
1 1 0
_
_
[Q]
F
=
1
3
_
_
1 1 1
1 1 1
1 1 1
_
_

1
6
_
_
2 1 1
1 2 1
1 1 2
_
_
+
3
6
_
_
0 1 1
1 0 1
1 1 0
_
_
[Q]
F
=
_
_
0 1 0
0 0 1
1 0 0
_
_
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 40 / 122
Examples (Contd)
Example
Is the linear transformation below a rotation ?
[ Q]
F
=
_
_
0 1 0
0 0 1
1 0 0
_
_
If so, nd its natural invariants.
Solution : Test for orthogonality :
[ Q]
F
[ Q
T
]
F
=
_
_
0 1 0
0 0 1
1 0 0
_
_
_
_
0 0 1
1 0 0
0 1 0
_
_
=
_
_
1 0 0
0 1 0
0 0 1
_
_
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 41 / 122
Examples (Contd)
det( Q) = +1 a rotation
Find e and : vect(Q) = (sin)e
[ q]
F
sin[e]
F
=
1
2
_
1 1 1

T
sin q =

3
2
= 60

or 120

[e]
F
=
[q]
F
q
=

3
3
_
1 1 1

T
1 + 2 cos tr(Q) = 0, cos =
1
2
= 120

Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 42 / 122


Examples (Contd)
Example
A coordinate frame X
1
, Y
1
, Z
1
is rotated into a conguration X
2
, Y
2
, Z
2
in
such a way that
X
2
= Y
1
, Y
2
= Z
1
, Z
2
= X
1
Find the matrix representation of the rotation in X
1
, Y
1
, Z
1
coordinates.
Compute the direction of the axis and the angle of rotation.
Solution : Let i
1
, j
1
, k
1
be unit vectors parallel to X
1
, Y
1
, Z
1
, respectively,
i
2
, j
2
, k
2
being dened correspondingly.
i
2
= j
1
, j
2
= k
1
, k
2
= i
1
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 43 / 122
Examples (Contd)
[ Q]
1
=
_
_
0 0 1
1 0 0
0 1 0
_
_
[q]
1
[ vect(Q) ]
1
= sin[ e ]
1
=
1
2
_
_
1
1
1
_
_
cos =
1
2
[ tr(Q) 1 ] =
1
2
Assume sin 0 sin = q =

3
2
[ e ]
1
=
[q]
1
sin
=

3
3
_
_
1
1
1
_
_
= 120

Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 44 / 122


Examples (Contd)
Example
Show that the matrix P in eq. (2.4) satises (2.1a).
Solution : Is P idempotent ?
P
2
= (1 nn
T
)(1 nn
T
)
= 1 2nn
T
+nn
T
nn
T
= 1 nn
T
= P
Moreover,
Pn = (1 nn
T
)n = n nn
T
n = n n = 0
n is eigenvector of P with eigenvalue 0 and, hence, spans the nullspace
of P
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 45 / 122
Examples (Contd)
Example
The representations of three linear transformations in a given coordinate
frame F :
[A]
F
=
1
3
_
_
2 1 2
2 2 1
1 2 2
_
_
, [ B]
F
=
1
3
_
_
2 1 1
1 2 1
1 1 2
_
_
,
[ C]
F
=
1
3
_
_
1 2 2
2 1 2
2 2 1
_
_
Identify the orthogonal projection, the reection and the rotation and nd its
invariants.
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 46 / 122
Examples (Contd)
Solution : B and C are symmetric. Rotation matrix is symmetric if and only if
sin = 0 i.e., = 0 or , with trace 3 or 1. But
tr(B) = 2, tr(C) = 1
B and C are not rotations
[ AA
T
]
F
=
1
9
_
_
9 0 0
0 9 0
0 0 9
_
_
, det(A) = +1
Ais a rotation
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 47 / 122
Examples (Contd)
Natural invariants of A :
sin[e]
F
= [vect(A)]
F
=
1
2
_
_
1
1
1
_
_
cos =
1
2
[tr(A) 1] =
1
2
(2 1) =
1
2
For sin 0 sin = vect(A) =

3
2
= 60

[e]
F
=
[vect(A)]
F
vect(A)
=

3
3
_
_
1
1
1
_
_
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 48 / 122
Examples (Contd)
Test B and C for orthogonality :
[ BB
T
]
F
=
1
3
_
_
2 1 1
1 2 1
1 1 2
_
_
= [ B
2
]
F
= [ B]
F
B is not orthogonal but idempotent
[ CC
T
]
F
=
1
9
_
_
9 0 0
0 9 0
0 0 9
_
_
C is orthogonal
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 49 / 122
Examples (Contd)
det(C) = 1 C is a reection
det(B) = 0 B is singular : a projection
The unit vector [ n]
F
= [ n
1
, n
2
, n
3
]
T
spanning the nullspace of B can be
determined from :
Bn = 0 nn
T
= 1 B
Produces two solutions, one the negative of the other.
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 50 / 122
Examples (Contd)
nn
T
=
_
_
n
2
1
n
1
n
2
n
1
n
3
n
1
n
2
n
2
2
n
2
n
3
n
1
n
3
n
2
n
3
n
2
3
_
_
=
1
3
_
_
1 1 1
1 1 1
1 1 1
_
_
n =

3
3
_
_
1
1
1
_
_
From C = 1 2nn
T
follows the same solution for n
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 51 / 122
Examples (Contd)
Example
The vector and the trace of a rotation matrix Q in a reference frame F are
[vect(Q)]
F
=
1
2
_
_
1
1
1
_
_
, tr(Q) = 2
Find the matrix representation of Q in the given coordinate frame and in a
frame with its Z-axis parallel to vect(Q).
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 52 / 122
Examples (Contd)
Solution :
Use eq.(2.74a) to determine rotation matrix Q
[ qq
T
]
F
=
1
4
_
_
1 1 1
1 1 1
1 1 1
_
_
, q
2
=
3
4
[ Q]
F
=
1
2
_
_
0 1 1
1 0 1
1 1 0
_
_
[ Q]
F
=
1
3
_
_
2 1 2
2 2 1
1 2 2
_
_
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 53 / 122
Examples (Contd)
Denote by Z a coordinate frame with Z axis parallel to q
[ q]
Z
=

3
2
_
_
0
0
1
_
_
, [ qq
T
]
Z
=
3
4
_
_
0 0 0
0 0 0
0 0 1
_
_
[ Q]
Z
=

3
2
_
_
0 1 0
1 0 0
0 0 0
_
_
[ Q]
Z
=
_
_
1/2

3/2 0

3/2 1/2 0
0 0 1
_
_
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 54 / 122
Examples (Contd)
Example
A procedure for trajectory planning produced a matrix
[ Q] =
_
_
0.433 0.500 z
x 0.866 0.433
0.866 y 0.500
_
_
representing a rotation for a certain pick-and-place operation where x, y, and
z are entries that are unrecognizable due to failures in the printing hardware.
Find the missing entries.
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 55 / 122
Examples (Contd)
Solution : Product Q
T
Qmust be 1 :
Q
T
Q =
_
_
0.437 + z
2
0.433(x z 1) 0.5(y + z) + 0.375
0.937 + x
2
0.866(x + y) 0.216
1 + y
2
_
_
Upon equating the diagonal elements to unity :
x = 0.250, y = 0, z = 0.750
while the vanishing of the off-diagonal entries leads to :
x = 0.250, y = 0, z = 0.750
det(Q) = +1
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 56 / 122
Euler-Rodrigues Parameters
r sin
_

2
_
e, r
0
= cos
_

2
_
(2.75)
Q = (r
0
2
r r)1 + 2rr
T
+ 2r
0
R (2.76)
where, for arbitrary x,
R
(r x)
x
= : r
0
=
_
1 + q
0
2
, r =
q
2r
0
(2.77)
= : r
0
= 0, r = e (2.78)
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 57 / 122
The Matrix Square Root
The square root for a 3 3 matrix is a linear combination of 1 (the identity
matrix), the matrix itself and its square, the coefcients being found using the
eigenvalues of the matrix (from Cayley-Hamil- tons Theorem).
Square root of a rotation matrix : a rotation through angle /2 about axis
parallel to e.
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 58 / 122
The Matrix Square Root (Contd)
A diagonalizable n n matrix admits as many square roots as there are
combinations of the two possible roots of individual eigenvalues. Example :
the eight square roots of the 3 3 identity matrix :
_
_
1 0 0
0 1 0
0 0 1
_
_
,
_
_
1 0 0
0 1 0
0 0 1
_
_
,
_
_
1 0 0
0 1 0
0 0 1
_
_
,
_
_
1 0 0
0 1 0
0 0 1
_
_
_
_
1 0 0
0 1 0
0 0 1
_
_
,
_
_
1 0 0
0 1 0
0 0 1
_
_
,
_
_
1 0 0
0 1 0
0 0 1
_
_
,
_
_
1 0 0
0 1 0
0 0 1
_
_
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 59 / 122
The Matrix Square Root (Contd)
Not all 2
3
= 8 square roots of a 3 3 proper orthogonal matrix are proper
orthogonal but there is one and only one that represents a rotation of /2
denoted

Q:
r = vect(
_
Q), r
0
=
tr(

Q) 1
2
(2.79)
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 60 / 122
Euler-Rodrigues Parameters (Contd)
Linear invariants can be derived from the rotation matrix by simple additions
and subtractions, but fail to produce information on the axis of rotation when
= .
Euler-Rodrigues parameters require square roots and entail sign ambiguities,
but produce information on the axis of rotation for any value of the rotation
angle .
Note : Not to be confused with Euler angles, which are not invariant and
admit multiple denitions.
No single set of Euler angles exists for a given rotation ; set depends on how
the rotation is decomposed into three simpler rotations.
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 61 / 122
Example
Example
Find the Euler-Rodrigues parameters of the proper orthogonal matrix
Q =
1
3
_
_
1 2 2
2 1 2
2 2 1
_
_
Solution :
Qis symmetric = . Impossible to determine the direction of the
axis of rotation from the linear invariants. However, note that
ee
T
=
1
2
(1 +Q)
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 62 / 122
Example (Contd)
_
_
e
2
1
e
1
e
2
e
1
e
3
e
1
e
2
e
2
2
e
2
e
3
e
1
e
3
e
2
e
3
e
2
3
_
_
=
1
3
_
_
1 1 1
1 1 1
1 1 1
_
_
e =

3
3
_
1 1 1

T
r = e sin
_

2
_
=

3
3
_
_
1
1
1
_
_
, r
0
= cos
_

2
_
= 0
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 63 / 122
Composition of Reections and Rotations
Let R be a pure reection & Q a rotation
T = QRand T

= RQ
are neither symmetric nor self-inverse, yet both are reections !
An improper orthogonal transformation (not symmetric) can always be
decomposed into the product of a rotation and a pure reection. This
decomposition is not unique.
For arbitrary n : R 1 2nn
T
Q = TR
1
TR = T2(Tn)n
T
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 64 / 122
Example
Example
Place both palms in the diving position. Hold a sheet of paper between them. The
sheet denes a hand plane in each hand , its unit normal, hand normal, pointing
outside of the hand, n
R
and n
L
for the right and left hand, respectively.
o
R
and o
L
: unit vectors pointing in the direction of the nger axes of each of the
hands
n
L
= n
R
, o
L
= o
R
Now, without moving your right hand, let the left hand attain a position whereby the
left-hand normal lies at right angles with the right-hand normal, the palm pointing
downwards and the nger axes of the two hands remaining parallel.
Find the representation of the transformation carrying the right hand to the nal
conguration of the left hand, in terms of the unit vectors n
R
and o
R
.
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 65 / 122
Example (Contd)
Solution : Desired transformation :
T = QR
Reection mapping the right hand into the left hand :
R = 1 2n
R
n
T
R
Left hand rotates from diver position about an axis || o
R
through an angle of
90

cw. From eq.(2.48) and above information,


Q = o
R
o
T
R
+O
R
where O
R
is the cross-product matrix of o
R
T = o
R
o
T
R
+ 2O
R
2(o
R
n
R
)n
T
R
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 66 / 122
Coordinate Transformations and
Homogeneous Coordinates
Coordinate Transformations Between Frames
with a Common Origin
A = {X, Y, Z} , B = {X, Y, Z},
Q: A B (2.80)
[ p]
A
=
_
x y z

T
(2.81)
Find [ p]
B
in terms of [ p]
A
and Q
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 67 / 122
Coordinate Transformations Between
Frames with a Common Origin
FIG.: Coordinate transformation : (a) coordinates of point P in the A-frame ; and (b)
relative orientation of frame B with respect to A.
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 68 / 122
Coordinate Transformations Between
Frames with a Common Origin (Contd)
Point P is attached to frame A, while frame A undergoes a rotation Qabout
its origin and is carried to frame B :
= Qp (2.82)
where is the position vector of point : rotated position of P
[ ]
B
=
_
x y z

T
(2.83)
[ ]
A
=
_

T
(2.84)
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 69 / 122
Coordinate Transformations Between
Frames with a Common Origin (Contd)
Theorem
The representations of the position vector of any point in two frames A and
B, denoted by [ ]
A
and [ ]
B
respectively, are related by
[ ]
A
= [ Q]
A
[ ]
B
(2.85)
Proof :
[ ]
A
= [ Q]
A
[ p]
A
(2.86)
[ ]
B
= [ p]
A
(2.87)
[ ]
A
= [ Q]
A
[ ]
B
(2.88)
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 70 / 122
Coordinate Transformations Between
Frames with a Common Origin (Contd)
Theorem
The representations of Q carrying A into B in these two frames are identical,
i.e.,
[ Q]
A
= [ Q]
B
(2.89)
Proof :
[ Qp]
A
= [ Q]
A
[ Qp]
B
, [ Q]
A
[ p]
A
= [ Q]
A
[ Qp]
B
[ p]
A
= [ Q]
B
[ p]
B
(2.90)
[ p]
A
= [ Q]
A
[ p]
B
(2.91)
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 71 / 122
Coordinate Transformations Between
Frames with a Common Origin (Contd)
Theorem
The inverse relation of Theorem 1 is given by
[ ]
B
= [ Q
T
]
B
[ ]
A
(2.92)
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 72 / 122
Example
Example
FIG.: Coordinate frames A and B with a common origin.
Find the representations of Qrotating A into B in these two frames and show
that they are identical. Moreover, if [ p]
A
= [ 1, 1, 1 ]
T
, nd [ p]
B
.
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 73 / 122
Example (Contd)
Solution : Let i, j, and k be unit vectors in the directions of the X-, Y -, and
Z-axes, respectively,
unit vectors , , and being dened likewise, as parallel to the X-, Y-, and
Z-axes of Fig. 2.2
Qi = k, Qj = i, Qk = j
[ Q]
A
=
_
_
0 1 0
0 0 1
1 0 0
_
_
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 74 / 122
Example (Contd)
Q =
_
_
0 1 0
0 0 1
1 0 0
_
_
_
_
0
0
1
_
_
=
_
_
0
1
0
_
_
= j =
Likewise,
Q = , Q =
From Denition 1
[ Q]
B
=
_
_
0 1 0
0 0 1
1 0 0
_
_
= [ Q]
A
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 75 / 122
Example (Contd)
If we represent this matrix in a frame whose X-axis is directed along the axis
of rotation of Q,
[ Q]
X
=
_
_
1 0 0
0 cos sin
0 sin cos
_
_
with = 120

[ Q]
X
=
_
_
1 0 0
0 1/2

3/2
0

3/2 1/2
_
_
[ p]
B
=
_
_
0 0 1
1 0 0
0 1 0
_
_
_
_
1
1
1
_
_
=
_
_
1
1
1
_
_
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 76 / 122
Coordinate Transformation with Origin Shift
Theorem
The representations of the position vector p of a point P of the Euclidean
3-dimensional space in two frames A and B are related by
[ p]
A
= [ b]
A
+ [ Q]
A
[ ]
B
(2.93a)
[ ]
B
= [ Q
T
]
B
([ b]
A
+ [ p]
A
) (2.93b)
with b dened as the vector directed from the origin of A to that of B, and
the vector directed from the origin of B to P, as depicted in Fig. 2.3.
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 77 / 122
Coordinate Transformation with Origin Shift (Contd)
FIG.: Coordinate frames with different origins.
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 78 / 122
Coordinate Transformation with Origin Shift (Contd)
Proof :
p = b + (2.94)
[ p]
A
= [ b]
A
+ [ ]
A
is assumed to be readily available in B
[ p]
A
= [ b]
A
+ [ Q]
A
[ ]
B
To prove eq.(2.93b), we simply solve eq.(2.94) for and apply eq.(2.92) to
the equation thus resulting.
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 79 / 122
Example
Example
If [ b]
A
= [ 1, 1, 1 ]
T
and A & B have the relative orientations as in
Example 4, nd the position vector, in B, of a point P of position vector [ p]
A
given as in the same example.
Solution : Find [ ]
B
: [ b]
A
+ [ p]
A
=
_
2 2 2

T
By virtue of Theorem 2, Q]
B
= [ Q
T
]
A
:
[ Q]
B
=
_
_
0 0 1
1 0 0
0 1 0
_
_
[ ]
B
=
_
_
0 0 1
1 0 0
0 1 0
_
_
_
_
2
2
2
_
_
=
_
_
2
2
2
_
_
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 80 / 122
Homogeneous Coordinates
General coordinate transformation involving a shift of the origin is not linear,
e.g., the rst terms of the RHS of eq.(2.93a) is nonhomogeneous. It can be
represented in homogeneous form by introducing homogeneous coordinates :
{p}
M

_
[ p]
T
M
1

T
(2.95)
Then, the afne transformation of eq.(2.93a) becomes {p}
A
= {T}
A
{}
B
with :
{ T}
A

_
[ Q]
A
[ b]
A
0
T
1
_
, (2.97)
{ T
1
}
B
=
_
[ Q
T
]
B
[ b]
B
0
T
1
_
(2.98)
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 81 / 122
Homogeneous Coordinates (Contd)
F
k
, for k = i 1, i, i + 1 : coordinate frames with origins at O
k
Q
i1
: the rotation of F
i1
into F
i
Q
i
: the rotation of F
i
into F
i+1
If three origins coincide :
[ p]
i
= [ Q
T
i1
]
i1
[ p]
i1
[ p]
i+1
= [ Q
T
i
]
i
[ p]
i
= [ Q
T
i
]
i
[ Q
T
i1
]
i1
[ p]
i1
with inverse relation
[ p]
i1
= [ Q
i1
]
i1
[ Q
i
]
i
[ p]
i+1
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 82 / 122
Homogeneous Coordinates (Contd)
If origins do not coincide, a
i1
=

O
i1
O
i
, a
i
=

O
i
O
i+1
{T
i1
}
i1
=
_
[ Q
i1
]
i1
[ a
i1
]
i1
0
T
1
_
,
{T
i
}
i
=
_
[ Q
i
]
i
[ a
i
]
i
0
T
1
_
Inverse transformation :
{T
i1
}
1
i
=
_
[ Q
T
i1
]
i
[ Q
T
i1
]
i
[ a
i1
]
i1
0
T
1
_
{T
i
}
1
i+1
=
_
[ Q
T
i
]
i+1
[Q
T
i
]
i+1
[ a
i
]
i
0
T
1
_
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 83 / 122
Homogeneous Coordinates (Contd)
Therefore, the coordinate transformations are
{p
i1
}
i1
= {T
i1
}
i1
{p
i
}
i
(2.105)
{p
i1
}
i1
= {T
i1
}
i1
{T
i
}
i
{p
i+1
}
i+1
(2.106)
with the corresponding inverse transformations
{ p
i
}
i
= {T
i1
}
1
i1
{ p
i1
}
i1
(2.107)
{ p
i+1
}
i+1
= {T
i
}
1
i
{ p
i
}
i
= {T
i
}
1
i
{T
i1
}
1
i1
{ p
i1
}
i1
(2.108)
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 84 / 122
Homogeneous Coordinates (Contd)
If P lies at innity :
{p}
M
p
_
[ e ]
M
1/p
_

lim
p
{p}
M
=
_
lim
p
p
__
lim
p
_
[ e ]
M
1/p
__
=
_
lim
p
p
__
[ e ]
M
0
_
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 85 / 122
Homogeneous Coordinates (Contd)
We dene the homogeneous coordinates of a point P lying at innity as
{ p

}
M

_
[ e ]
M
0
_
(2.109)
Let Q =
_
e
1
e
2
e
3

and triad { e
k
}
3
1
be orthonormal
{T}
A
of eq.(2.97) becomes
{ T}
A
=
_
e
1
e
2
e
3
b
0 0 0 1
_
(2.110)
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 86 / 122
Example
Example
Find the equation of an ellipsoid in A with semiaxes of a = 1, b = 2, c = 3
and with its centre O
B
of position [ b]
A
= [ 1, 2, 3 ]
T
, its axes X, Y, Z
dening a coordinate frame B. The direction cosines of X are
(0.933, 0.067, 0.354), whereas Y b and Y u while u||X-axis.
u, v, w are unit vectors parallel to the X-, Y-, and Z-axes, respectively :
[ u]
A
=
_
_
0.933
0.067
0.354
_
_
, v =
u b
u b
, w = u v
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 87 / 122
Example (Contd)
[ v ]
A
=
_
_
0.243
0.843
0.481
_
_
, [ w]
A
=
_
_
0.266
0.535
0.803
_
_
[ Q]
A
= [ u, v, w]
A
=
_
_
0.933 0.243 0.266
0.067 0.843 0.535
0.354 0.481 0.803
_
_
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 88 / 122
Example (Contd)
If [ p]
A
= [ p
1
, p
2
, p
3
]
T
and [ ]
B
= [
1
,
2
,
3
]
T
,
B:

2
1
1
2
+

2
2
2
2
+

2
3
3
2
= 1
[ Q
T
]
B
= [ Q
T
]
A
=
_
_
0.933 0.067 0.354
0.243 0.843 0.481
0.266 0.535 0.803
_
_
[ ]
B
=
_
_
0.933 0.067 0.354
0.243 0.843 0.481
0.266 0.535 0.803
_
_
_
_
_
_
1
2
3
_
_
+
_
_
p
1
p
2
p
3
_
_
_
_
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 89 / 122
Example (Contd)
Therefore,

1
= 0.933p
1
+ 0.067p
2
0.354p
3
0.005

2
= 0.243p
1
0.843p
2
+ 0.481p
3

3
= 0.266p
1
0.535p
2
0.803p
3
+ 3.745
Upon substitution of the foregoing relations into the ellipsoid equation in B,
A: 32.1521p
1
2
+ 7.70235p
2
2
+ 9.17286p
3
2
8.30524p
1
16.0527p
2
23.9304p
3
+ 9.32655p
1
p
2
+ 9.02784p
2
p
3
19.9676p
1
p
3
+ 20.101 = 0
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 90 / 122
Similarity Transformations
v =
1
a
1
+
2
a
2
+ +
n
a
n
v =
1
b
1
+
2
b
2
+ +
n
b
n
[ v ]
A
=
_

2
.
.
.

n
_

_
, [ v ]
B
=
_

2
.
.
.

n
_

_
(2.113)
b
j
= a
1j
a
1
+ a
2j
a
2
+ + a
nj
a
n
, j = 1, . . . , n
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 91 / 122
Similarity Transformations (Contd)
v =
1
(a
11
a
1
+ a
21
a
2
+ + a
n1
a
n
)
+
2
(a
12
a
1
+ a
22
a
2
+ + a
n2
a
n
)
.
.
.
+
n
(a
1n
a
1
+ a
2n
a
2
+ + a
nn
a
n
)
v = (a
11

1
+ a
12

2
+ + a
1n

n
)a
1
+(a
21

1
+ a
22

2
+ + a
2n

n
)a
2
.
.
.
+(a
n1

1
+ a
n2

2
+ + a
nn

n
)a
n
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 92 / 122
Similarity Transformations (Contd)
[ v ]
A
= [ A]
A
[ v ]
B
(2.117)
where
[ A]
A

_

_
a
11
a
12
a
1n
a
21
a
22
a
2n
.
.
.
.
.
.
.
.
.
.
.
.
a
n1
a
n2
a
nn
_

_
(2.118)
Inverse relationship :
[ v ]
B
= [ A
1
]
A
[ v ]
A
(2.119)
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 93 / 122
Similarity Transformations (Contd)
[ L]
A
=
_

_
l
11
l
12
l
1n
l
21
l
22
l
2n
.
.
.
.
.
.
.
.
.
.
.
.
l
n1
l
n2
l
nn
_

_
(2.120)
We want to nd relation between [L]
A
and [L]
B
. To this end, let
Lv = w (2.121)
whose representations in A and B are
[ L]
A
[ v ]
A
= [ w]
A
(2.122)
[ L]
B
[ v ]
B
= [ w]
B
(2.123)
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 94 / 122
Similarity Transformations (Contd)
We assume that the image vector w is identical to vector v in the range of L
(not always the case).
[ w]
A
= [ A]
A
[ w]
B
(2.124)
Substitution of eq.(2.124) into eq.(2.122) yields
[ A]
A
[ w]
B
= [ L]
A
[ A]
A
[ v ]
B
(2.125)
[ w]
B
= [ A
1
]
A
[ L]
A
[ A]
A
[ v ]
B
(2.126)
Hence,
[ L]
B
= [ A
1
]
A
[ L]
A
[ A]
A
(2.127)
[ L]
A
= [ A]
A
[ L]
B
[ A
1
]
A
(2.128)
Equations (2.117), (2.119), (2.127) & (2.128) are the similarity
transformations sought. They preserve invariant quantities
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 95 / 122
Similarity Transformations (Contd)
Theorem
The characteristic polynomial of a given n n matrix remains unchanged
under a similarity transformation. Moreover, the eigenvalues of two matrix
representations of the same n n linear transformation are identical, and if
[ e ]
B
is an eigenvector of [ L]
B
, then under the similarity transformation
(2.128), the corresponding eigenvector of [ L]
A
is [ e ]
A
= [ A]
A
[ e ]
B
.
Proof : The characteristic polynomial of [ L]
B
is
P() = det([ 1]
B
[ L]
B
) (2.129)
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 96 / 122
Similarity Transformations (Contd)
P() det([ A
1
]
A
[ 1]
A
[ A]
A
[ A
1
]
A
[ L]
A
[ A]
A
)
= det([ A
1
]
A
([ 1]
A
[ L]
A
)[ A]
A
)
= det([ A
1
]
A
)det([ 1]
A
[ L]
A
)det([ A]
A
)
det([ A
1
]
A
)det([ A]
A
) = 1
The characteristic polynomials of [ L]
A
and [ L]
B
are identical [ L]
A
& [ L]
B
have same eigenvalues.
Let [ L]
B
[ e ]
B
= [ e ]
B
:
[ A
1
]
A
[ L]
A
[ A]
A
[ e ]
B
= [ e ]
B
[ L]
A
[ A]
A
[ e ]
B
= [ A]
A
[ e ]
B
(2.130)
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 97 / 122
Similarity Transformations (Contd)
Theorem
If [ L]
A
and [ L]
B
are related by the similarity transformation (2.127), then
[ L
k
]
B
= [ A
1
]
A
[ L
k
]
A
[ A]
A
(2.131)
for any integer k.
Proof : For k = 2
[ L
2
]
B
[ A
1
]
A
[ L]
A
[ A]
A
[ A
1
]
A
[ L]
A
[ A]
A
= [ A
1
]
A
[ L
2
]
A
[ A]
A
For k = n
[ L
n+1
]
B
[ A
1
]
A
[ L
n
]
A
[ A]
A
[ A
1
]
A
[ L]
A
[ A]
A
= [ A
1
]
A
[ L
n+1
]
A
[ A]
A
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 98 / 122
Similarity Transformations (Contd)
Theorem
The trace of an n n matrix does not change under a similarity
transformation.
Proof : Let [ A], [ B] and [ C] be three different n n matrix arrays, in a
given reference frame
Let a
ij
, b
ij
, and c
ij
be the components of the said arrays, with indices ranging
from 1 to n
tr([ A] [ B] [ C]) a
ij
b
jk
c
ki
= b
jk
c
ki
a
ij
tr([ B] [ C] [ A])
tr([ L]
B
) = tr([ A
1
]
A
[ L]
A
[ A]
A
)
= tr([ A]
A
[ A
1
]
A
[ L]
A
) = tr([ L]
A
)
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 99 / 122
Example
Example
We consider the equilateral triangle Fig. 2.4 of side 2, with vertices
P
1
, P
2
, P
3
, and coordinate frames A(X, Y) and B(X

, Y

), both with origin


at the centroid of the triangle. Let P be a 2 2 matrix :
P =
_
p
1
p
2

with p
i
being the position vector of P
i
in a given coordinate frame. Show that
matrix P does not obey a similarity transformation upon a change of frame,
and compute its trace in frames A and B to make it apparent that this matrix
does not comply with the conditions of Theorem 3.
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 100 / 122
Example (Contd)
FIG.: Two coordinate frames used to represent the position vectors of the corners of
an equilateral triangle.
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 101 / 122
Example (Contd)
[ P]
A
=
_
1 0

3/3 2

3/3
_
, [ P]
B
=
_
0 1
2

3/3

3/3
_
tr([ P]
A
) = 1 +
2

3
3
= tr([ P]
B
) =

3
3
[ p
i
]
A
= [ Q]
A
[ p
i
]
B
[ P]
A
= [ Q]
A
[ P]
B
Let R PP
T
then
[ R]
A
=
_
1

3/3

3/3 5/3
_
, [ R]
B
=
_
1

3/3

3/3 5/3
_
tr([ R]
B
) =
8
3
[ R]
A
= [ PP
T
]
A
= [ Q]
A
[ P]
B
([ Q]
A
[ P]
B
)
T
= [ Q]
A
[ PP]
T
B
[ Q
T
]
A
which is a similarity transformation
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 102 / 122
Invariance Concepts
The scalar function f( ) of the position vector p is
invariant if : f([p]
B
) = f([p]
A
)
vector f is invariant if : [f ]
A
= [Q]
A
[f ]
B
matrix F is invariant if : [F]
A
= [Q]
A
[F]
B
[Q
T
]
A
Moreover,
[ a]
T
A
[ b]
A
= [ a]
T
B
[ b]
B
[ a b]
A
= [ Q]
A
[ a b]
B
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 103 / 122
Invariance Concepts (Contd)
The kth moment of an n n matrix T :
I
k
tr(T
k
), k = 0, 1, . . .
with I
0
= tr(1) = n.
Theorem
The moments of a n n matrix are invariant under a similarity
transformation.
Proof :
[ T
k
]
B
= [ A
1
]
A
[ T
k
]
A
[ A]
A
(2.140)
[ I
k
]
B
= tr(
_
A
1

A
_
T
k

A
[ A]
A
) tr([ A]
A
_
A
1

A
_
T
k

A
)
= tr(
_
T
k

A
) [ I
k
]
A
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 104 / 122
Invariance Concepts (Contd)
Theorem
An n n matrix has only n linearly independent moments.
Proof : Let the characteristic polynomial of T be
P() = a
0
+ a
1
+ + a
n1

n1
+
n
= 0
Applying the Cayley-Hamilton Theorem :
a
0
1 + a
1
T+ + a
n1
T
n1
+T
n
= 0
Take the trace of both sides of the above equation :
a
0
I
0
+ a
1
I
1
+ + a
n1
I
n1
+I
n
= 0
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 105 / 122
Invariance Concepts (Contd)
The vector invariants of an n n matrix are its eigenvectors.
The eigenvectors of symmetric matrices are real and mutually orthogonal, its
eigenvalues being real as well.
This is not so for skew-symmetric matrices but for 3 3 skew-symmetric
matrices, one eigenvalue is real, namely, 0, and its associated vector is the
axial vector of this matrix.
Two n n matrices related by a similarity transformation have the same set
of moments. However, if two n n symmetric matrices share their rst n
moments { I
k
}
n1
0
, they are not necessarily related by a similarity
transformation.
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 106 / 122
Invariance Concepts (Contd)
For example :
A =
_
1 0
0 1
_
, B =
_
1 2
2 1
_
Both matrices share the two moments : I
0
= 2 & I
1
= 2. The second
moments are different :
tr(A
2
) = 2, tr(B
2
) = tr
_
5 4
4 5
_
= 10
To test whether two different matrices represent the same linear
transformation, we must verify that they share the same set of n
moments { I
k
}
n
1
since all n n matrices share the same I
0
= n.
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 107 / 122
Invariance Concepts (Contd)
The foregoing discussion does not apply, in general, to nonsymmetric
matrices : they are not fully characterized by their eigenvalues. For example :
A =
_
1 1
0 1
_
Moments I
0
= 2, I
1
= tr(A) = 2 are equal to those of the 2 2 identity
matrix but the transformations are different.
If two symmetric matrices, Aand B, represent the same transformation, they
are related by a similarity transformation :
B = T
1
AT
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 108 / 122
Examples
Example
Find out whether two symmetric matrices
A =
_
_
1 0 1
0 1 0
1 0 2
_
_
, B =
_
_
1 0 0
0 2 1
0 1 1
_
_
are related by a similarity transformation.
tr(A) = tr(B) = 4. What about I
2
and I
3
?
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 109 / 122
Examples (Contd)
A
2
=
_
_
2 0 3
0 1 0
3 0 5
_
_
, B
2
=
_
_
1 0 0
0 5 3
0 3 2
_
_
tr(A
2
) = tr(B
2
) = 8
A
3
=
_
_
5 0 8
0 1 0
8 0 13
_
_
, B
3
=
_
_
1 0 0
0 13 8
0 8 5
_
_
tr(A
3
) = tr(B
3
) = 19
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 110 / 122
Examples (Contd)
Example
Same as the previous example, for :
A =
_
_
1 0 2
0 1 0
2 0 0
_
_
, B =
_
_
1 1 1
1 1 0
1 0 0
_
_
tr(A) = tr(B) = 2, but tr(A
2
) = 10 while tr(B
2
) = 6
Therefore, Aand B are not related by a similarity transformation
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 111 / 122
Applications to Redundant Sensing
If redundant sensors are introduced, and we attach frames A and B to each of
these, then each sensor can be used to determine the orientation of the
end-effect- or with respect to a reference conguration.
For this task it is needed to measure rotation R that each frame underwent
from the reference conguration.
Assume that the measurements produce the orthogonal matrices Aand B,
representing Rin A and B, respectively. Determine the relative orientation Q
of frame B with respect to frame A (instrument calibration).
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 112 / 122
Applications to Redundant Sensing (Contd)
We have : A [ R]
A
and B [ R]
B
Need to determine [ Q]
A
or [ Q]
B
, which can be obtained from
A = [ Q]
A
B[ Q
T
]
A
or A[ Q]
A
= [ Q]
A
B
This problem can be solved with three invariant vectors associated with Aand
B.
Since A and B are orthogonal, they admit one real invariant vector : their axial
vector.
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 113 / 122
Applications to Redundant Sensing (Contd)
To determine Q, we need two more invariant vectors, represented in A and B.
To this end, take two measurements of the orientation of A
0
and B
0
with
respect to A and B.
Let the matrices representing these orientations be given by A
i
and B
i
, with
a
i
and b
i
being the corresponding axial vectors, for i = 1, 2.
There are two possibilities :
(i) Neither of a
1
and a
2
and, consequently, neither of b
1
and b
2
, is zero ;
(ii) at least one of a
1
and a
2
, and consequently, the corresponding vector of
the { b
1
, b
2
} pair, vanishes.
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 114 / 122
Applications to Redundant Sensing (Contd)
In the rst case compute a 3rd vector for each set
a
3
= a
1
a
2
, b
3
= b
1
b
2
(2.143)
In the second case, two more possibilities : angle of rotation of orthogonal
matrix, A
1
or A
2
, whose axial vector vanishes, is either 0 or .
If angle is 0, then A, as well as B, underwent a pure translation from A
0
and
B
0
, correspondingly. Then, a new measurement is needed, involving a
rotation.
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 115 / 122
Applications to Redundant Sensing (Contd)
If the angle is , then associated rotation is symmetric and the unit vector e
parallel to its axis can be determined from eq.(2.49) in both A and B.
Then, we end up with two pairs of nonzero vectors {a
i
}
2
1
and {b
i
}
2
1
.
a
i
= [ Q]
A
b
i
, for i = 1, 2, 3 (2.144)
E = [ Q]
A
F (2.145)
E
_
a
1
a
2
a
3

, F
_
b
1
b
2
b
3

(2.146)
[ Q]
A
= EF
1
(2.147)
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 116 / 122
Applications to Redundant Sensing (Contd)
F
1
=
1

_
_
(b
2
b
3
)
T
(b
3
b
1
)
T
(b
1
b
2
)
T
_
_
, b
1
b
2
b
3
(2.148)
Therefore,
[ Q]
A
=
1

[a
1
(b
2
b
3
)
T
+a
2
(b
3
b
1
)
T
+a
3
(b
1
b
2
)
T
]
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 117 / 122
Example
Example (Hand-Eye Calibration)
Determine the relative orientation of a frame B attached to a camera mounted on a
robot end-effector, with respect to a frame A xed to the latter, as shown in Fig. 2.5.
It is assumed that two measurements of the orientation of the two frames with respect
to frames A
0
and B
0
in the reference conguration of the end-effector are available.
These measurements produce the orientation matrices A
i
of the frame xed to the
camera and B
i
of the frame xed to the end-effector, for i = 1, 2.
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 118 / 122
Example (Contd)
The numerical data :
A
1
=
_
_
0.92592593 0.37037037 0.07407407
0.28148148 0.80740741 0.51851852
0.25185185 0.45925926 0.85185185
_
_
A
2
=
_
_
0.83134406 0.02335236 0.55526725
0.52153607 0.31240270 0.79398028
0.19200830 0.94969269 0.24753503
_
_
B
1
=
_
_
0.90268482 0.10343126 0.41768659
0.38511568 0.62720266 0.67698060
0.19195318 0.77195777 0.60599932
_
_
B
2
=
_
_
0.73851280 0.54317226 0.39945305
0.45524951 0.83872293 0.29881721
0.49733966 0.03882952 0.86668653
_
_
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 119 / 122
Example (Contd)
FIG.: Measuring the orientation of a camera-xed coordinate frame with respect to a
frame xed to a robotic end-effector.
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 120 / 122
Example (Contd)
a
1
=
_
_
0.02962963
0.08888889
0.32592593
_
_
, b
1
=
_
_
0.04748859
0.30481989
0.14084221
_
_
,
a
2
=
_
_
0.07784121
0.37363778
0.27244422
_
_
, b
2
=
_
_
0.12999385
0.44869636
0.04396138
_
_
a
3
=
_
_
0.09756097
0.01730293
0.00415020
_
_
, b
3
=
_
_
0.07655343
0.01622096
0.06091842
_
_
= 0.00983460
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 121 / 122
Example (Contd)
a
1
(b
2
b
3
)
T
=
_
_
0.00078822 0.00033435 0.00107955
0.00236467 0.00100306 0.00323866
0.00867044 0.00367788 0.01187508
_
_
a
2
(b
3
b
1
)
T
=
_
_
0.00162359 0.00106467 0.00175680
0.00779175 0.00510945 0.00843102
0.00568148 0.00372564 0.00614762
_
_
a
3
(b
1
b
2
)
T
=
_
_
0.00746863 0.00158253 0.00594326
0.00132460 0.00028067 0.00105407
0.00031771 0.00006732 0.00025282
_
_
[ Q]
A
=
_
_
0.84436553 0.01865909 0.53545750
0.41714750 0.65007032 0.63514856
0.33622873 0.75964911 0.55667078
_
_
Jorge Angeles (McGill University ) Chapter 2: Mathematical Background 2009 122 / 122

Das könnte Ihnen auch gefallen