You are on page 1of 28

Introduction Matrix Representation Transformation Matrices Examples

 EEM 343 ROBOTICS 


ROBOT KINEMATICS 

Dr. Muhammad Nasiruddin Mahyuddin


School of Electrical and Electronics Engineering,
Universiti Sains Malaysia

Semester 2 Academic Session 2016/2017

Dr. Muhammad Nasiruddin Mahyuddin ✏B EEM 343:ROBOT KINEMATICS [p.1]


Introduction Matrix Representation Transformation Matrices Examples

I NTRODUCTION

Forward Kinematics: to determine where the robot hand is? (if all
joint variables are known)
Inverse Kinematics: to calculate what each joint variable is? (If we
desire that the hand be located at a particular point)

Dr. Muhammad Nasiruddin Mahyuddin ✏B EEM 343:ROBOT KINEMATICS [p.2]


Introduction Matrix Representation Transformation Matrices Examples

R OBOTS AS MECHANISM

⊲ Multiple type robots have multiple degrees-of-freedom (DOF).

Figure 1: (a) A 1 DOF closed-loop four-bar mechanism (b) A closed-loop mechanism (c) An
opened-loop mechanism

Dr. Muhammad Nasiruddin Mahyuddin ✏B EEM 343:ROBOT KINEMATICS [p.3]


Introduction Matrix Representation Transformation Matrices Examples

M ATRIX REPRESENTATION

⊲ Representation of a Point P in
Space.
◮ A point P in space: 3
coordinates relative to a
reference frame
◮ P = ax î + by ĵ + cz k̂

Figure 2: Representation of a point in space

Dr. Muhammad Nasiruddin Mahyuddin ✏B EEM 343:ROBOT KINEMATICS [p.4]


Introduction Matrix Representation Transformation Matrices Examples

M ATRIX REPRESENTATION

⊲ Representation of a Vector in
Space.
◮ A Vector ~P in space: 3
coordinates of its tail and
its head.
◮ ~P = ax î + by ĵ + cz k̂
 
x
~P =  y 
 

 z 
Figure 3: Representation of a vector in
w space
where w is normalizing factor

Dr. Muhammad Nasiruddin Mahyuddin ✏B EEM 343:ROBOT KINEMATICS [p.5]


Introduction Matrix Representation Transformation Matrices Examples

M ATRIX REPRESENTATION

⊲ Representation of a Frame at the


Origin of a Fixed-Reference Frame

◮ A frame is constructed by
3 unit vectors which are
mutually perpendicular to
each other.
◮ Therefore, to describe a
frame, we need 3 vectors Figure 4: Representation of a frame in
which are concatenated to space
form a matrix.

Dr. Muhammad Nasiruddin Mahyuddin ✏B EEM 343:ROBOT KINEMATICS [p.6]


Introduction Matrix Representation Transformation Matrices Examples

M ATRIX REPRESENTATION

⊲ Representation of a Frame at the


Origin of a Fixed-Reference Frame
 
nx ox ax
◮ R =  ny oy ay 
nz oz az
Figure 5: Representation of a frame in
space

Dr. Muhammad Nasiruddin Mahyuddin ✏B EEM 343:ROBOT KINEMATICS [p.7]


Introduction Matrix Representation Transformation Matrices Examples

M ATRIX REPRESENTATION

⊲Representation of a Frame in a
Fixed Reference Frame
◮ To describe a frame in
space with respect to
another fixed frame, we
would need two
information:
• orientation information
• translation (how far is its
Figure 6: Representation of a frame
origin with respect to the with reference to a fixed frame
fixed frame origin?)

Dr. Muhammad Nasiruddin Mahyuddin ✏B EEM 343:ROBOT KINEMATICS [p.8]


Introduction Matrix Representation Transformation Matrices Examples

M ATRIX REPRESENTATION

⊲Representation of a Frame in a
Fixed Reference Frame
 
nx ox ax px
 n oy ay py 
◮ T = y 
 nz oz az pz 
0 0 0 1
Figure 7: Representation of a frame
with reference to a fixed frame

Dr. Muhammad Nasiruddin Mahyuddin ✏B EEM 343:ROBOT KINEMATICS [p.9]


Introduction Matrix Representation Transformation Matrices Examples

M ATRIX REPRESENTATION

⊲Representation of a Rigid Body


◮ An object can be represented
in space by attaching a frame
to it and representing the
frame in space.
◮ It is with this same concept,
we would like to describe the
location(and also the
configuration) of a robot link
member using the concept of Figure 8: Representation of a rigid
attaching a frame. body in space

Dr. Muhammad Nasiruddin Mahyuddin ✏B EEM 343:ROBOT KINEMATICS [p.10]


Introduction Matrix Representation Transformation Matrices Examples

H OMOGENEOUS T RANSFORMATION M ATRICES

⊲A transformation matrix must be in square matrix form.


◮ It is much easier to calculate the inverse of square matrices.
◮ To multiply two matrices, their dimensions must match.
 
nx ox ax Px
 ny oy ay Py 
T=  nz oz az Pz 
 (1)
0 0 0 1

Dr. Muhammad Nasiruddin Mahyuddin ✏B EEM 343:ROBOT KINEMATICS [p.11]


Introduction Matrix Representation Transformation Matrices Examples

H OMOGENEOUS T RANSFORMATION M ATRICES

⊲A transformation matrix contains two descriptions:


1. Translation (position)
2. Rotation
 
nx ox ax Px
 ny oy ay Py 
T= 
 nz oz az Pz  (2)
0 0 0 1

Dr. Muhammad Nasiruddin Mahyuddin ✏B EEM 343:ROBOT KINEMATICS [p.12]


Introduction Matrix Representation Transformation Matrices Examples

P URE T RANSLATION

a
z
Frame{B}

Frame{A} AP
B
o
x n
y

Figure 9: Frame B is translated with respect to another frame, Frame A

Dr. Muhammad Nasiruddin Mahyuddin ✏B EEM 343:ROBOT KINEMATICS [p.13]


Introduction Matrix Representation Transformation Matrices Examples

P URE T RANSLATION

A
PB (3)
The superscript indicates the reference Frame(in this case
Frame A) to which we infer Frame B (subscript B) to be
described to. Equation (3) indicates that position of Frame B
relative to Frame A in space. This can be described by a 3 × 1
vector,  
Px
A
PB =  Py  (4)
Pz

Dr. Muhammad Nasiruddin Mahyuddin ✏B EEM 343:ROBOT KINEMATICS [p.14]


Introduction Matrix Representation Transformation Matrices Examples

P URE T RANSLATION


⊲ Vectors must be tagged with information identifying which coordinate system they are
defined within.

Frame A can be also sometimes written as {A}. A PB is a vector


that describes a distance along the axes of {A} from the origin
of {B}. Each of these distances which can be described by
vectors can be thought as a vector projection onto the
corresponding axis.

Dr. Muhammad Nasiruddin Mahyuddin ✏B EEM 343:ROBOT KINEMATICS [p.15]


Introduction Matrix Representation Transformation Matrices Examples

P URE T RANSLATION

To describe pure translation using the transformation matrix, we may


concatenate the vector describing translation in a matrix like such,
 
1 0 0 dx
 0 1 0 dy 
Ttrans = 
 0 0 1 dz 
 (5)
0 0 0 1

Transformation matrix T has also the rotation matrix subsumed but it


is a diagonal unity matrix (with diagonal of 1’s). Since it is a pure
translation and no change in orientation (i.e. no rotation), then the
axes of translated frame are always parallel with the reference frame,
i.e. ~xB · ~xA = |xB ||xA |cos(0) = 1, ~yB · ~yA = |yB ||yA |cos(0) = 1 and
~zB · ~zA = |zB ||zA |cos(0) = 1.

Dr. Muhammad Nasiruddin Mahyuddin ✏B EEM 343:ROBOT KINEMATICS [p.16]


Introduction Matrix Representation Transformation Matrices Examples

P URE T RANSLATION
Suppose a frame (say Frame B) is to be translated by the amount
described in transformation matrix in Equation (5) relative to Frame
A (the reference frame), then we write,
  A A~ A~

1 0 0 dx ~xB11 xB12 xB13 Px
dy   A A~ A~
  ~xB21
 0 1 0 xB22 xB23 Py 
Fnew = Ttrans × Fold = 
 0 0 1 dz   A~xB31 A~
xB32 A~
xB33 Pz 
0 0 0 1 0 0 0 1
A~ A~ A~
 
xB11 xB12 xB13 Px + dx
 A~
xB21 A~
xB22 A~
xB23 Py + dy 
= 
A~ A~ A~
 (6)
 xB31 xB32 xB33 Pz + dz 
0 0 0 1
Fn ew = Trans(dx , dy , dz ) × Fo ld (7)

Let us now look at how we can describe the orientation of a body in space. ֒→

Dr. Muhammad Nasiruddin Mahyuddin ✏B EEM 343:ROBOT KINEMATICS [p.17]


Introduction Matrix Representation Transformation Matrices Examples

H OMOGENEOUS T RANSFORMATION M ATRICES

⊲A transformation matrix contains two descriptions:


1. Translation (position)
2. Rotation
 
nx ox ax Px
 ny oy ay Py 
T= 
 nz oz az Pz  (8)
0 0 0 1

Dr. Muhammad Nasiruddin Mahyuddin ✏B EEM 343:ROBOT KINEMATICS [p.18]


Introduction Matrix Representation Transformation Matrices Examples

P URE R OTATION


⊲ In order to describe orientation of a body, we will attach a coordinate system to the body
and then give a description of this coordinate system relative to reference system.

zB A z
One way to describe the
body-attached coordinate system, θ
say {B}, is to write the unit vectors yB
x A θ
its principal axes (xyz- axis) in yA
terms of coordinate system {A}. θ
xB
Let us look at Figure 10 for pure
rotation case. Figure 10: Frame B is rotated with respect to
another frame, Frame A

Dr. Muhammad Nasiruddin Mahyuddin ✏B EEM 343:ROBOT KINEMATICS [p.19]


Introduction Matrix Representation Transformation Matrices Examples

P URE R OTATION

Denote the unit vectors giving the


principal directions of coordinate
system {B} as
zA
◮ X̂B zB

◮ ŶB θ {B}
yB
◮ ẐB xA θ
{A} yA
Then, write them in terms of θ
coordinate system {A} will yield, xB
◮ A X̂B Figure 11: The orientation of Frame B with
respect to Frame A
◮ A ŶB

◮ A ẐB

Dr. Muhammad Nasiruddin Mahyuddin ✏B EEM 343:ROBOT KINEMATICS [p.20]


Introduction Matrix Representation Transformation Matrices Examples

R OTATION MATRIX
 
⊲Recalled that we can stack the vectors to form a matrix.
 

Let us stack these three unit vectors together to as the columns of a


3 × 3 matrix, in order A XB ,A YB ,A ZB . This will be our rotation matrix.
We call it A RB .

zB zA

θ {B}
⊲ A RB = [A~xB A~yB A~zB ] (9) yB

~xB · ~xA ~yB · ~xA

~zB · ~xA xA θ
{A} yA
=  ~xB · ~yA ~yB · ~yA ~zB · ~yA  θ
~xB · ~zA ~yB · ~zA ~zB · ~zA xB
Figure 12: Frame B is rotated
with respect to another frame, Frame
A

Dr. Muhammad Nasiruddin Mahyuddin ✏B EEM 343:ROBOT KINEMATICS [p.21]


Introduction Matrix Representation Transformation Matrices Examples

R OTATION M ATRIX

 
⊲Recalled that two vectors will have its angle between them defined by the dot product.
 

~x · ~y = |x||y|cosθ (10)
~y
• Suppose that ~x and ~y is a unit
vector then, their magnitude, i.e. θ
|x|or|y| will be 1. Therefore, the dot ~x
product of two unit vectors will be
cosθ where θ is the angle between
these two unit vectors. Figure 13: The dot product of
vector ~x and vector ~y

Dr. Muhammad Nasiruddin Mahyuddin ✏B EEM 343:ROBOT KINEMATICS [p.22]


Introduction Matrix Representation Transformation Matrices Examples

R OTATION M ATRIX

Since, the dot product of two unit vectors yield the cosine angle
between them, the components of rotation matrices are often referred
to as direction cosines. Another special relationship we can observe is
that,  B T 
XA
A A A A B T 
BR = [ XB YB ZB ] = YA (11)

B T
ZA
Hence, BA R, represents the description of frame {A} relative to {B} by
its transpose.
B A T
A R =B R (12)

Dr. Muhammad Nasiruddin Mahyuddin ✏B EEM 343:ROBOT KINEMATICS [p.23]


Introduction Matrix Representation Transformation Matrices Examples

R OTATION M ATRIX

From Equation (12), it can be verified that


A T A
BR BR = I3 (13)

(where I3 is the 3 × 3 identity matrix) which suggests that inverse of a


rotation matrix is equal to its transpose,
A B −1 B T
BR = AR = AR (14)

⊲ The column of a rotation matrix all have unit magnitude, and further, these
unit vectors are orthogonal. Due this property, the inverse of rotation matrix
is the same its corresponding transpose.


Dr. Muhammad Nasiruddin Mahyuddin ✏B EEM 343:ROBOT KINEMATICS [p.24]


Introduction Matrix Representation Transformation Matrices Examples

E XAMPLE 1: P URE ROTATION

yA
{A}

xB
θ
yB

{B} θ
xA

Figure 14: Example 1 on Pure Rotation

Dr. Muhammad Nasiruddin Mahyuddin ✏B EEM 343:ROBOT KINEMATICS [p.25]


Introduction Matrix Representation Transformation Matrices Examples

E XAMPLE 1: P URE ROTATION


Example
According to Figure 14, a frame {B} is rotated relative to frame {A}
about Z by θ = 30◦ . Here, Z is pointing out of the page. Adopting the
dot product concept of the unit vectors, we may write unit vectors of
{B} in terms of {A} in rotation matrix,
 
|xB ||xA |cos30◦ |yB ||xA |cos(90◦ + 30◦ ) |zB ||xA |cos(90◦ )
A  |xB ||yA |cos(90◦ − 30◦ )
RB = |yB ||yA |cos(30◦ ) |zB ||yA |cos(90 ) 

|xB ||zA |cos(90◦ ) |yB ||zA |cos(90◦ ) |zB ||zA |cos(0◦ )


 
0.866 −0.5 0
=  0.5 0.866 0  (15)
0 0 1


Try yourself: Calculate rotation matrix of frame B relative to frame A about
⊠⊲
x-axis and y-axis using the same concept illustrated here.


Dr. Muhammad Nasiruddin Mahyuddin ✏B EEM 343:ROBOT KINEMATICS [p.26]


Introduction Matrix Representation Transformation Matrices Examples

E XAMPLE 2: R OTATING A VECTOR IN A FRAME


Suppose, a vector B P is expressed in Frame {B} and the Frame {B} is
rotated with respect to Frame {A} in the same manner as in Example
1. ⊚⊲We would like to calculate A P.

B
P
yA
{A}
Given, xB
θ
  yB
0.0
B
P =  2.0  (16) θ
0.0 {B} xA

Figure 15: Example 2: Expressing a vector


in Frame B which is rotated by an angle with
respect to Frame A

Dr. Muhammad Nasiruddin Mahyuddin ✏B EEM 343:ROBOT KINEMATICS [p.27]


Introduction Matrix Representation Transformation Matrices Examples

E XAMPLE 2: R OTATING A VECTOR IN A FRAME

⊚⊲ Then, using the result from Example 1 we can calculate A P as


 
−1
A
P =A B
B R P =
 1.732  (17)
0

Here, A B
B R acts as a mapping which is used to describe P relative to frame
A
{A}, P. It is to note that vector P is not changed in space. Instead, we
compute a new description of the vector relative to another frame.

Dr. Muhammad Nasiruddin Mahyuddin ✏B EEM 343:ROBOT KINEMATICS [p.28]

You might also like