Kinematics is the study of motion without
reference to forces. In engineering applications kinematics
usually means finding the position (often called *displacement*),
velocity and acceleration of a rigid body. In these tutorials we are
principally concerned with finding positions of the the robot links for a
particular position of the tool tip in three dimensional space. This position is often
referred to as the *tool tip pose*.

In this series of tutorials we examine two approaches. The method of ** forward kinematics**
sets the position of each joint in turn and from this information computes the
position of the tool tip. It is the subject of this tutorial and the
next.

In later tutorials we examine *i** nverse
kinematics* where we begin with the
required position of the tool tip and then find the position of each
link. In practice inverse kinematics is more useful but we
begin with forward kinematics as the analytic methods are more
straightforward.

In this tutorial we show how robot links and co-ordinate systems are
presented in a* kinematic diagram *and how angular movement and
displacement of links are represented and calculated using a series of
*homogeneous transformation matrices*.
I suggest reading the first tutorial
in the series If not familiar with basic terminology of robotics

A reasonable knowledge of linear algebra is necessary to follow some aspects of this tutorial.

In the first tutorial we introduced the six axis robot
shown in Fig.1 above, which is our model for kinematic analysis.
Each link is shaded a different colour. We
use the physical construction of the robot to draw a ** kinematic diagram**
which defines co-ordinate systems (called

Firstly we define co-ordinates for the base or
"real world" frame, shown on Fig.1*. This co-ordinate frame is indicated by
subscript 0. Its origin is at the centre of the top surface of
the base plate (shaded grey). This is a "right hand" co-ordinate
system (check images on-line if you are not
familiar with the *right-hand rule*). In the
right hand rule counter-clockwise rotation about an axis is
designated +ve.

* Co-ordinates are directly from the CAD model. It is more conventional for Z to be the vertical co-ordinate in the base frame.

Each joint is assigned a co-ordinate frame located somewhere on its axis of rotation. Co-ordinate frames form the basis of the kinematic diagram and the first task is to fix their position.

Figs.2 and 3 below show the construction of the robot model in a vertically extended pose with front view on the XY plane, and side view on the YZ plane. Red dots show the chosen location of each frame for joints #1 to #6 and TT for the tool tip. The frame for joint 1 is coincident with the base frame.

Fig.4 shows co-ordinate frames in three dimensions for each joint in the vertically extended pose. Revolute joints are represented by cylinders . The diagram is not drawn to scale for clarity. In this pose, orientations of X, Y and Z axes in each frame are chosen to be identical but this is not essential. The origin of a frame can be at any convenient point on the axis of joint rotation and can even be outside the physical joint (as we shall see in the next tutorial).

We now add to the diagram the
length and offset of each link. The**
link length** is the distance between successive frames
on the longitudinal axis of the link*, not the external dimension
of the link. An

* Note the difference in determining link lengths associated with revolute joints type 1 or 2 as defined in the previous tutorial.

Fig.5 below shows link lengths and offsets on the kinematic diagram viewed on the YZ plane which provides a clearer view than the three dimensional diagram in Fig.4. Again note that this diagram is not to scale. Our convention is one subscript for link length, two for offset.

The table below lists these dimensions in the robot model (unspecified length units).

>a_{1} |
a_{2} |
a_{3} |
a_{4} |
a_{5} |
a_{T} |
a_{12} |
a_{23} |
a_{34} |

160 | 400 | 130 | 500 | 220 | 110 | 85 | 50 | 75 |

There is one more piece of information we require for forward kinematic analysis, namely the angle of rotation applied to each joint to achieve the tool tip pose shown in Fig.1(b). In this example the joint rotations are:

- joint #2 rotate 45° counter-clockwise
- joint #3 rotate 90° clockwise
- joint #5 rotate 90° clockwise

The next section explains how we express movement of the robot mathematically using transformations of co-ordinate frames.

The objective of this kinematic analysis is
to resolve the *real world *co-ordinates of the tool tip with
reference to the base frame. The robot model has six revolute joints
in series. The co-ordinate frame for each joint can rotate about its
joint axis and there are displacements between frames denoted by
link lengths and offsets, where they exist. Hence we need a
method for resolving displacements in three dimensions that result
from rotating the joints, starting at the base frame and finishing at
the tool tip.

The most widely applied method which we outline below uses *
transformation matrices*
to combine rotation and translation of co-ordinate
frames (

Fig.6 (a) and (b) show rotation of a right hand co-ordinate frame* about the Z axis. We consider initially this rotation in two dimensions in the XY plane.

* It is conventional to use the notation X_{0}
etc. for the base frame.

Note: in the following text vectors are indicated in ** bold italic**
type.

Co-ordinate frame axes X_{0}
and Y_{0} are rotated counter-clockwise by
angle** ***θ* to create a second frame *1*
with axes X_{1} and Y_{1}. We envisage
the axis of rotation coming out of the XY plane indicated by the
green dot.

*î*_{0} * ĵ*_{0}
* î*_{1} and** ĵ**

Fig 6a shows a position vector *p*_{0}
for a point *p* in space
with co-ordinates x_{0} and y_{0}
in frame *0* . The
position vector for point* p* referred to rotated frame* 1* is
*p*_{1}
with co-ordinates x_{1} and y_{1}. Note that*
p*_{0} ≠ *p*_{1}

Substituting the above expressions for
*î*_{1} and *ĵ*_{1}
into the above expression for* p*_{1}
gives:

We can state these equations in matrix form as:

Examining the columns of the matrix we see that columns 1 and
2 are respectively column vectors for: (i) the projections of
X_{1} on X_{0 }and Y_{0} and (ii) the
projections of Y_{1} on X_{0} and Y_{0},
where X_{1} and Y_{1} are unit vectors.

We now expand the rotational matrix to three dimensions by
introducing axes Z_{0} and Z_{1} and adding
projections of X_{1} and Y_{1} on Z_{0}
and projections of Z_{1} on X_{0}, Y_{0} and
Z_{0}.

In Fig.6 the Z axis is perpendicular out of the page hence projections of
X_{1} and Y_{1} on Z_{0} = 0 and
projections of Z_{1} on X_{0} and Y_{0} =
0. The projection of Z_{1} on Z_{0 }= 1 since
the Z axis is unchanged by the rotation. We can now expand the
transformation matrix for rotation about the Z axis from two to
three dimensions as follows:

The notation R_{Z(θ)} indicates a rotation matrix for a
rotation angle θ about the Z axis.

The corresponding elementary
rotation matrices R_{X(θ)} and R_{Y(θ)} for rotation
about the X and Y axes respectively are:

Rotation matrices can be multiplied to obtain a transformation
matrix for a series of frame rotations. Thus if the rotation of
frame 0 to frame 1 about axis Z_{0} is angle θ and the rotation of frame 1
to frame 2 about axis Z_{1} is
angle φ then:

The reverse rotational transformation matrix from frame 1 to frame 0
is the transpose of R^{0}_{1}, i.e.R^{1}_{0}
= (R^{0}_{1})^{T}

By *translation* we mean moving the origin of a co-ordinate
frame to a new point in space In the context of forward
kinematics the new point is the origin of the co-ordinate frame for
the next joint.

Clearly it is useful to combine translation and rotation in one transformation matrix. We now show how this is done, initially in two dimensions and then expanded to three dimensions.

Figs.7a and 7b show rotated co-ordinate frame *1* translated in the
XY plane from its original position coincident with the origin of
frame *0*.

In Fig 7a consider point *p* in space represented by position vector
** p1** in frame

In Fig 7b introduce a co-ordinate frame * V* which is
parallel to frame *0 *and shares its origin with frame *1.*
Point *p* is now represented by position vector **
p**

Because frame* V *is parallel to frame* 0* we
can add vectors in frames* 0* and *V* such that
*p*_{0} =*
t*_{V0} +*
p*** _{V }
**................ (i)

Now we replicate frame *1*
by rotating
frame *V* by angle θ, using rotational transformation matrix R^{V}_{1}

which gives :
*p*_{V} =
R^{V}_{1 }. *p*_{1}
................... (ii)

substituting for *p*_{V} in (i) gives:
*p*_{0} =*
t*_{V0} +*
*R^{V}_{1
}**. p_{1}**

now R^{V}_{1} = R^{0}_{1}
(equal rotations of angle θ) and *t*_{V0}
= *t*_{10}

giving *p*_{0}
=* t*_{10}
+* *R^{0}_{1
}**. p_{1}**
..................... (iii)

* this step is not obvious but is easily checked by expanding dot products in both equations.

* Homogeneous co-ordinates add one dimension to Cartesian co-ordinates and are widely used for linear transformations in computing.

Note that the homogeneous transformation matrix takes the form:

where R^{0}_{1} is the rotational transformation
matrix and *t*_{10}
is the column vector representing translation of the origin of frame
1 to the origin of frame 0.

The reverse homogeneous transformation matrix for a transformation from frame 0 to frame
1 is the inverse of T^{0}_{1}, i.e.T^{1}_{0}
= (T^{0}_{1})^{-1 }(not the transpose as for
R^{0}_{1 }reversed)

Homogeneous transformation matrices can be multiplied to obtain a
transformation matrix for a series of frame rotations and
translations such that T^{0}_{2} = T^{0}_{1}
• T^{1}_{2}

We now extend the homogeneous transformation matrix for rotation and translation of co-ordinate frames to three dimensions illustrated in Fig.8.

Derivation of the homogeneous transformation matrix for three dimensions is broadly identical to the two dimensional case using homogeneous vectors with X, Y and Z components. The result is a [4 x 4] homogeneous transformation for rotation about the Z axis as follows.

Where R^{0}_{1} is the elementary rotation matrix
and *t*_{10}
is the column vector representing translation of the origin of the
co-ordinate frame, shown in Fig.8. We call the vector*
t*_{10} the *
translation* (or *displacement*) *vector.*

The homogeneous transformation matrices for rotation about the X, Y and Z axes are thus:

As with the two dimensional case we can combine
homogeneous transformations to obtain a transformation matrix for a
series of frame rotations and translations such that T^{0}_{n} = T^{0}_{1}
• T^{1}_{2} • ----- •T^{(n-1)} _{n.}
Examination of the dot product shows that the translation vector part * t*_{n0}
of matrix T^{0}_{n} expresses the co-ordinates of
the origin of frame* n * with respect to frame* 0*.

We now have a mathematical tool for forward kinematic analysis of the robot model. The next section of the tutorial examines each joint of the robot in sequence, applying the homogeneous transformation matrix at each stage.

Commercial software (for example *MATLAB) *computes multiple
transformations using joint angles, link lengths and offsets as
input variables. For our purpose, however, it is instructive to compute
each transformation using a matrix calculator, find
the *real world co-ordinates* of each joint and then validate the output
directly from the CAD robot
model.

Fig.9 is an enlarged section of the kinematic diagram in Fig.3
showing joints 1 and 2 connected by link 1. Joint 1 is a
revolute joint with rotation about the Y axis. The initial state of frame *1*
has co-ordinates x_{1} = 0,
y_{1} = 0, z_{1} = 0 (i.e. identical to the
co-ordinates of the base frame).

Parameters for transformation T^{1}_{2} are:

- there is no rotation of frame
*1.*Thus θ_{1}= 0° - frame
*1*translates to frame*2*along link length a_{1}on the Y axis and link offset a_{12}on the Z axis. - link length a
_{1}= 160 - link offset a
_{12}= 85

Inserting these values into the homogeneous* transformation matrix for rotation about the Y axis gives:

* from this point *transformation matrix* refers to
the homogeneous version.

Note that the rotational part of the transformation matrix in the upper left hand section is the identity matrix. This is consistent with no rotation.

We use the transformation matrix T^{1}_{2} to state
co-ordinates x_{2}, y_{2}, z_{2} within
frame 2 in terms of co-ordinates x_{1}, y_{1}, z_{1}
within frame1 from the equation:

We want to express co-ordinates of the origin of frame 2 in terms of
the co-ordinates of frame 1 (our *real world* co-ordinates).
The origin of frame 2 has co-ordinates: x_{2} = 0, y_{2} = 0, z_{2}
= 0 giving:

Note that the translation vector* t*_{21}
in the transformation matrix yields the required *real world*
co-ordinates. This result was predictable since frame *2*
does not rotate relative to the base. Examining the above dot
product in fact reveals that the translation vector *t*_{n1}
in every transformation matrix T^{1}_{n}
yields the co-ordinates for transformations to frame *1*
of the origin of each frame* n*.

.

For joint rotation θ_{2} the
projections of* a*_{2} are *a _{2}.cosθ_{2}* on
the Y axis and

* It is more conventional to set the datum for kinematic analysis aligned with the X axis. For this example a vertical datum provides clearer diagrams.

Parameters for transformation T^{2}_{3} are:

- frame
*2*rotates 45° in a positive (counter-clockwise) direction. Thus θ_{2}= 45° - frame
*2*translates to frame*3*along link length a_{2}and link offset a_{23}on the Z axis. - link length a
_{2}= 400 - link offset a
_{23}= 50

Inserting these values into the transformation matrix for rotation about the Z axis gives:

We now perform the matrix multiplication T^{1}_{3} =
T^{1}_{2} • T^{2}_{3} giving:

*Real world* co-ordinates for the origin of frame 3 after the
transformation read from the *t*_{31}
section of matrix T^{1}_{3} are as follows:

To give a better perspective the viewpoint of Fig.11 has changed from previous diagrams.

Parameters for transformation T^{3}_{4} are:

- frame
*3*rotates 90° in a negative (clockwise) direction. Thus θ_{3}= -90° - frame
*3*translates to frame*4*along link length a_{3}and link offset a_{34}on the Z axis. - link length a
_{3}= 130 - link offset a
_{34}= 75

Inserting these values into the transformation matrix for rotation about the Z axis gives:

We now perform the matrix multiplication T^{1}_{4} =
T^{1}_{2} • T^{2}_{3} • T^{3}_{4}
giving:

*Real world* co-ordinates for the origin of frame 4 after the
transformation read from the *t*_{41}
section of matrix T^{1}_{4} are as follows:

Parameters for this transformation T^{4}_{5} are:

- there is no rotation. Thus θ
_{4}= 0° - frame
*4*translates to frame*5*along link length a_{4}. There is no link offset on the Z axis. - link length a
_{4}= 500

Inserting these values into the transformation matrix for rotation about the Y axis gives:

We now perform the matrix multiplication T^{1}_{5} =
T^{1}_{2} • T^{2}_{3} • T^{3}_{4}
• T^{4}_{5 } giving:

*Real world* co-ordinates for the origin of frame *5*
after the transformation read from the *t*_{41}
section of matrix T^{1}_{4} are as follows:

Parameters for this transformation T^{5}_{6} are:

- frame
*5*rotates 90° in a negative (clockwise) direction about the Z axis. Thus θ_{5}= -90° - frame
*5*translates to frame*6*along link length a_{5}on the Z axis. - link length a
_{5}= 220

If you are unsure why components x_{65} = 0 and y_{65} =
0 consider that the projection of the origin of rotated frame 6 on
frame 5 passes through the origin of frame 5 (for further illustration,
in Fig.7 consider the projection of the origin of frame 1 on the Y_{0}
axis if
translation of frame 1 were along the X_{0} axis only).

Inserting these values into the transformation matrix for rotation about the Z axis gives:

We now perform the matrix multiplication T^{1}_{6} =
T^{1}_{2} • T^{2}_{3} • T^{3}_{4}
• T^{4}_{5 }• T^{5}_{6}
giving:

*Real world* co-ordinates for the origin of frame *6*
after the transformation read from the *t*_{61}
section of matrix T^{1}_{6} are as follows:

Parameters for transformation T^{6}_{TT} are:

- there is no rotation. Thus θ
_{6}= 0° - frame 6 translates to frame
*TT*along link length a_{TT}on the Y axis. - link length a
_{TT}= 110

No rotation is equivalent to placing the identity matrix in
the rotation section of the transformation matrix Thus T^{6}_{TT}
can be stated as:

We now perform the (final!) matrix multiplication T^{1}_{TT}
= T^{1}_{2} • T^{2}_{3} • T^{3}_{4}
• T^{4}_{5 }• T^{5}_{6} • T^{6}_{TT}
giving:

*Real world* co-ordinates for the tool tip after the
transformation read from the *t*_{T1}
section of matrix T^{1}_{TT} are as follows:

We have completed the forward kinematic analysis using homogeneous
transformations. In the next tutorial we explain another
method using transformation matrices known as the *Denavit Hartenberg* method.

I welcome feedback at: