Robotics Book TYK 2022 Chap1 2
Robotics Book TYK 2022 Chap1 2
ACE 322
Robotics
Introduction .............................................................................................................1
What is Robotics?....................................................................................................5
Problems ................................................................................................................18
Chapter 2
Introduction ...........................................................................................................19
i
Representation of a Frame in Space ............................................................. 24
Problems 2........................................................................................................... 77
ii
Chapter 1
Fundamentals of Robots
Introduction
You may have seen machines that try to mimic human motions and
behavior. When you hear the word Robot you imagine a humanoid
machine as you see in movies. Even the Arabic translation of the word
robot is " "إنسان آليwhich is a big mistake. Although humanoids are
robots, there are many different kinds of robots, varies from industrial
robots to intelligent toys. Figure 1.1 shows examples of different kinds
of robots. The history of industrial automation is characterized by
periods of rapid change in popular methods related to world economics.
Use of industrial Robots became identifiable in the 1960s. In this book
we are concerning with industrial robots. We will study the analysis of
mechanics of robots including kinematics, dynamics and trajectory
planning. Also we will study sensors and actuators used in robots.
Robots are very powerful elements of industry. They are capable of
performing many tasks with high accuracy. They don’t need safety and
comfort elements that humans need. Robots are used together with other
devices, peripherals and machines to construct a system for certain task
or operation.
1
Figure 1.1 Examples for Robots.
History of Robots
In 1922 a Czech author "Karel Capek" wrote a story called
"Rossum's Universal Robots". He used the word "Robota" which means
"workers" to refer to human-like machines. After World War II,
automatic machines were designed to increase productivity and
numerical control is introduced to have better products. In 1946 a
playback device was developed by George Devol. The first numerically
controlled machine was built at MIT in 1952. In 1955 Denavit and
Hartenberg developed homogeneous transformation matrices (explained
later). The first industrial robot (Unimation) appeared in 1962 and used
by GM. In 1983 robots become popular subject in industry and
academia, robotic courses started to be taught.
2
It was reported that over 5,300 robots were ordered by North
American Companies on 2005. In 2014, the International Federation of
Robots (IFR) reported that robot sales increased by 29% to 229,261
units.
What is a Robot?
When comparing a conventional robot with a crane attached to a
vehicle, they look similar to each other. Both has a number of links
attached to each other with joints, and each joint can be moved by an
actuator, the hand can be moved in space in the desired location and
orientation. The main difference between them is that the crane is
controlled manually by the operator while the robot is controlled by a
computer (microprocessor) that executes certain program to perform the
desired task. For robots we can change the operation by changing the
program, while the crane cannot change the operation without an
operator running it all the time.
Robot Classifications
Robots can by classified into different groups. For example, the
Japanese Industrial Robot Association (JIRA) classifies robots into six
classes as follows:
Class 1: Manual Handling Device: that includes devices with
multy degrees of freedom, controlled by an operator.
Class 2: Fixed Sequence Robot: includes devices that perform
successive stages of a task according to a predetermined,
unchanging method, which is hard to modify.
3
Class 3: Variable Sequence Robot: similar to class 2, but easy to
be modified.
Class 4: Playback Robot: allows the operator to perform the task
manually by leading the robot (teach), which records the motions
to repeat them later. The robot repeats the same motions
according to the recorded information.
Class 5: Numerical Control Robot: the operator writes a program
to describe movement rather than teaching the robot manually.
Class 6: Intelligent Robot: the robot is equipped by sensors to
gather information about the environment, and with the aid of the
program, it can complete a task despite of the changes in the
surrounding conditions.
According to The Robotics Institute of America (RIA), the robot
should be easily programmed, so it considers classes 3-6 of the previous
as robots. The Association Francaise de Robotique (AFR) classifies
robots into four types as follows:
Type A: Handling Devices with manual control to telerobotics.
Type B: Automatic handling devices with predetermined cycles.
Type C: programmable, servo controlled robots with continuous
or point-to-point trajectories.
Type D: similar to type C but with capability to gather
information from the surrounding.
4
What is Robotics?
Robotics is the art, knowledge base, and know-how of designing,
applying and using robots. It includes studying robots and other devices
used with it. As robots are used in many applications like underwater,
space exploration, aid for disabled or even toys, Robotics is not limited
to mechanical and electronic engineering or computer science, it may
include biology, Insects and many other disciplines.
Robot Components
A robot is a system consists of some elements which integrated
together to form the robot. We can summarize these elements as follow:
• Manipulator (rover): this is the main body of the robot which
consists of the links, joints and other structural parts of the robot.
Without other elements, the manipulator is not a robot.
• End Effector: It is the part connected to the last joint (hand) of
the manipulator. It is specifically designed according to the task it
may perform. It may be a gripper, a welding torch, a paint spray
gun or any other constructions.
• Actuators: They are the "muscles" of the manipulator. When an
actuator receives a control signal from the controller it moves the
joint according to these signals. There are many types of actuators
like servomotors, stepper motors, pneumatic, hydraulic actuators.
• Sensors: They are used to collect information about the internal
state of the robot and the surroundings as well. It gives the
5
controller information about the location of each link or joint, and
allows the robot to communicate with the outside world.
• Controller: It is like the "cerebellum". It controls the motion of
actuators. It receives its data from the computer (brain) then sends
the suitable control signal to actuators, like a current to an electric
motor or air to pneumatic cylinder causing it to move.
• Processor: It is the "brain" of the robot. It calculates the motions
of the joints and determines how much and how fast each joint
must move to achieve the desired location and speed. It is
generally a computer dedicated for this purpose. It requires an
operating system, programs and peripherals. In some systems the
processor and controller are integrated together.
• Software: It represents the programs used to manage the robot.
There are three types of software, firstly the operating system
which operates the processor. Secondly the robotic software that
calculates the necessary motions of each joint based on the
construction of the robot. And finally the application-oriented
routines for specific tasks such as assembly, machine loading and
vision routines.
6
coordinates it will be inadequate. If we consider a three dimensional
rigid body, to locate it, we need to specify the location of a selected
point on it, it needs 3 pieces of information to locate its position.
However, although the location of the point on the body is specified,
there are infinite possible ways to orientate that body about the selected
point. To fully specify the orientation of the body, in addition to the
location of a selected point on it, we need to specify the orientation of
the body as well. This means that 6 pieces of information are needed to
fully specify the location and orientation of a rigid body. By the same
way, there need to be 6 degrees of freedom available to fully place an
object in space and orientate it as desired.
For this reason, robots need to have 6 degrees of freedom to freely
place and orientate objects within the workspace. If a robot has fewer
degrees of freedom, it can only go to positions and orientations that the
fewer joints allow. On the other hand, if a robot has 7 degrees of
freedom, it would not have a unique solution, i.e. it will have infinite
ways to place a part in certain position and orientation. This needs
additional decision-making routine to choose one of the infinite
solutions. For example we may choose the fastest or the shortest path to
the desired destination, but this need more computation!
Note that, the End Effector of the robot is not considered as one of
the degrees of freedom. In some cases there are limitations on the
movement of joints, so we assign 1/2 degree of freedom for that joint.
7
The human arm -excluding the hand- has three joints the shoulder,
the elbow and the wrist. The shoulder has 3 degrees of freedom, the
elbow has 1 degree of freedom and the wrist has 3 degrees of freedom.
Types of Joints
Robots may have different types of joints, such as linear (prismatic),
rotary (revolute) or spherical. Although spherical joints have multiple
degrees of freedom, they are difficult to control, so it is not common in
robots except for research. Most robots have either linear joints or
rotary joints. Prismatic joints have linear movements, there is no
rotation involved. They are either hydraulic, pneumatic cylinders or
linear electric actuators.
Revolute joints have rotary movements, most rotary joints are
electrically driven either by stepper motors or servomotors. Hydraulic
and pneumatic are also used. Figure 1.2 shows Symbolic representation
of prismatic and revolute joints.
8
Robot Configurations
Robot configurations generally follow the joints from the base to the
hand. Prismatic joints are denoted by P, revolute joints are denoted by R
and spherical joints are denoted by S. Here are some examples of
common configurations illustrated in figure 1.3:
9
• Articulated (3R): It has three revolute joints, similar to the
human's arm. It is the most common configuration for industrial
robots.
• Selective Compliance Assembly Robot Arm (SCARA): It has
two or three revolute joints that are parallel and allow the robot to
move in a horizontal plane, plus an additional prismatic joint that
moves vertically. It is commonly used in assembly operations.
10
Joint Reference Frame: This is used to specify movements of
individual joints. In this case, each joint is moved individually;
therefore only one joint move at a time. Depending on the type of joint
used the motion of the robot hand will be different. For example if a
revolute joint is moved the hand will move on a circle.
11
Programming Modes
Robots may be programmed in a number of different modes,
depending on the robot design and its sophistication. Most industrial
robots can be programmed in more than one mode. The following are
the common programming modes:
Physical Set-up: In this mode, an operator sets up switches and hard
stops that control the motions of the robot. This mode is usually used
with PLCs.
Lead Through (Teach): In this mode, an operator moves the joints
with a teach pendent. When the desired location and orientation is
achieved, the location and orientation are recorded into the controller.
During playback, the controller moves the joints to the same locations
and orientations. It is a point-to-point mode, i.e. the motion between
points is not specified or controlled. Only the points taught are
guaranteed to reach.
Continuous Walk-Through Mode: In this mode, all the robot
joints are moved simultaneously, while the motion is continuously
sampled and recorded by the controller. During playback, the exact
motion that was recorded is executed. The motion is taught by the
operator either through a model or by physically moving the end
effector.
Software Mode: In this mode, a program is written offline or online
and executed by the controller. It uses codes like other programming
languages. There are codes for gathering sensors information, codes for
12
branching and conditional statements. It requires the knowledge of the
programming syntax for the robot.
Robot Characteristics
The following definitions are used to characterize robot
specifications:
Payload: it is defined as the weight a robot can carry and still
remain within its other specifications or capable of achieving its tasks.
The robot's maximum load capacity may be much larger than its
payload, as with that maximum load the robot may become less
accurate, may not follow its desired trajectory or may have deflections.
Reach: it is the maximum distance a robot can reach within its
workspace. Is depends on links' length and joints' type. Many points
within the workspace can be reached in any desired orientation, (called
dexterous points), while other points, closed to the limits, orientation
can NOT be specified as desired, called (nondexterous point).
13
But repeatability represents random error that is not predicted and
consequently cannot be eliminated.
Robot Workspace
According to the configuration and size of joints and links, robot can
reach a collection of points around them that constitute a workspace.
The shape of workspace is defined by the joint types, while the
dimension of the workspace is defined by the links' lengths.
Workspace can be found mathematically by writing equations that
define the robot's links and joints including their limitation. Alternately,
the workspace may be found empirically by virtually moving each joint
through its range of motions, combining all the space it can reach and
subtracting what it cannot reach. Figure 1.8 shows examples of how to
determine the workspace of a robot. Note the difference in shape
according to the type of joints.
14
Figure 1.8 Examples for Workspace of robots.
As the configuration of robot changes, the shape and size of the
workspace is changed. Figure 1.9 shows approximate workspaces for
common robot configurations.
Robot Applications
Robots are best suited to work in environment and on tasks where
humans are not. Robots have already been used in many industries for
many purposes. Robots perform better than humans at lower costs. For
example, a welding robot can weld better than a human welder because
it can move more uniformly and more consistently, besides robots do
15
not need safety like protective goggles, ventilation, or other necessities
that human would need.
The following is a list of some robot applications. There are many
other applications find their ways into industry and society all the time:
Machine loading: robots supply other machines with parts or
remove the processed parts. It may not perform any operation on the
parts, but it facilitates material handling.
Pick and place: where robots pick up parts and place them
elsewhere. This may include palletizing, simple assembly by putting to
parts together, placing parts in an oven and removing treated parts from
the oven.
Welding: a robot with proper set-up and a welding end effector is
used to weld parts together. This is the most common applications of
robot in auto-industry.
Painting: since having a ventilated and clean room suited for
humans is difficult to achieve, painting robots are very well-suited for
this job.
Inspection: robots are used in inspection systems of circuit boards
and similar products. The system may include a vision system, x-ray
device, ultrasound detector or other devices.
Assembly: robots can locate parts and identify them, then carry
them in a particular order to fit them together and then assemble them.
Manufacturing: robots may perform many different operations like
drilling, cutting, and so on. It also includes insertion of parts such as
electronic components unto circuit boards.
16
Medical Applications: using robots in medical applications
becomes increasingly common. Nowadays there are internal surgery
robots, where the surgeon directs the robotic movements. Other robots
assist surgeons during microsurgery including operations on heart
valves.
Assisting disabled persons: these applications have a great interest,
as robot can perform simple tasks for disabled persons. The finger-
spelling hand is designed for communication with the deaf individuals.
Hazardous Environments: robots can access, traverse and explore
hazardous environments like radioactive environments. Robots are used
to detect underground mines.
Underwater, Space and Inaccessible locations: these
environments with very high or low pressures and/or temperatures are
easily accessed by robots. Robots are sent to other planets like Mars.
Figure 1.10
Intelligent Toys: toys that react intelligently with people became a
popular field of robot applications.
17
Problems
Pr.1.1 Draw the approximate workspace for the following robot.
18
Chapter 2
Kinematics of Robots
Introduction
Kinematics is a branch of mechanics concerned with the motion of
objects without reference to the forces that cause the motion. In this
chapter, we will study forward and inverse kinematics of robots.
Forward kinematic equations can determine where the robot's end
(hand) will be if all joint variables are known, while inverse kinematic
equations enable us to calculate what each joint variable should be in
order to locate the hand at a desired location with a desired orientation.
19
Chapter 2 Kinematicss of Robots
that the end effector is a plate to which the end effector can be attached
as necessary. We will call it the hand or the end plate of the robot.
Robots as Mechanisms
Manipulator-type robots are multi degree of freedom, three
dimensional, open loop, chain mechanisms. We will explain these terms
briefly.
Multi degree of freedom means that the robot has many joints,
allowing it to move freely within its workspace. Three dimensional
means that the robot can move in space, although it is possible to have a
two-dimensional multi-DOF robot, it is not common.
There is a type of manipulators called parallel robots which is out
of the scope of this book. For open loop manipulators, all the joint
variables should be measured continuously to ensure achieving the
desired position and location for the hand.
Matrix representation
We will use matrices to represent points, vectors, frames,
translations, rotations, transformations and objects. As we will see, this
will make it easy to discuss movements and calculate the position and
20
Chapter 2 Kinematicss of Robots
location of the hand, or the joints variables for the hand to be in a
desired position and orientation.
21
Chapter 2 Kinematicss of Robots
Where:
vx = vy = vz =
22
Chapter 2 Kinematicss of Robots
Example 2.1: A vector V is described as V= 3 i + 4 j + 12 k, represent
it with a scale factor of 3, then represent a unit vector in its
direction.
Solution
Where: = 13
So a unit vector in the direction of V is:
Solution
As q is a unit vector, so =1
23
Chapter 2 Kinematicss of Robots
= 0.743
then P = 5 * =
24
Chapter 2 Kinematicss of Robots
orientation of approach, and the n-axis is normal (orthogonal) to the
previous two axes.
Assume a moving frame Fn,o,a with its origin coincides with the
origin of the reference frame Fx,y,z. As shown in figure 2.5, the vectors
n, o and a are located in the fixed frame, we can represent that frame
using a matrix contains these three vectors as follows:
F=
25
Chapter 2 Kinematicss of Robots
F=
26
Chapter 2 Kinematicss of Robots
F=
27
Chapter 2 Kinematicss of Robots
This means that the object can be represented as follows:
Fobject =
Example 2.4: For the following frame, find the missing elements and
complete the matrix represents the frame.
28
Chapter 2 Kinematicss of Robots
F=
Solution
There are only 6 known values. Applying the 6 constraints on the
vectors n, o and a we get the following equations:
n x o x + n y o y + nz o z = 0 0.707 oy + nz oz = 0
ax ox + ay oy + az oz = 0 ay o y = 0
nx ax + ny ay + nz az = 0 nx ax + 0.7.7 ay = 0
n x 2 + ny 2 + nz 2 = 1 nx 2 + 0.707 2 + nz 2 = 1
o x 2 + oy 2 + oz 2 = 1 o y 2 + oz 2 = 1
ax 2 + ay 2 + az 2 = 1 ax 2 + ay 2 = 1
solving these six equations we have: nx = ±0.707, nz = 0, oy = 0, oz = 1,
ax = ±0.707 and ay = -0.707. Notice that both nx and ax must have the
same sign. It is clear that we have two solutions, this is because we have
two sets of mutually perpendicular vectors in the opposite direction.
The final matrix will be:
F1 = or F2 =
The same problem can be solved using the cross product instead of
the dot product, so we have the following equations:
n × o = a, = ax i + ay j + az k
29
Chapter 2 Kinematicss of Robots
ax = –
ay = - – )
az = –
these three equations with the three unit-vector length constraint
equations can be solved to give the solution. We note that only one of
the two previous solutions (F1) satisfies these equations. This is because
the dot product equations are scalar, so they are the same whether the
unit vectors are right-handed or left-handed frames. However the cross
product equations indicate the correct directions. So it is recommended
to use the cross product to have the right solution.
30
Chapter 2 Kinematicss of Robots
Representation of a Pure Translation
If a frame (or an object) moves in space without changing its
orientation, the transformation is a pure translation. In this case the
directional unit vectors remain in the same direction, and therefore do
not change. The only thing that changes is the location of the origin of
the frame relative to the fixed reference frame, as shown in figure 2.9.
31
Chapter 2 Kinematicss of Robots
first three columns represent no-change in direction, while the last
column represents the translation. So for a frame:
F=
Fnew = =
Example 2.5: A frame F moved 4 units along the y-axis, and 7 units
along the z-axis, find its new.
F=
Solution
T = Trans (0 , 4 , 7) =
32
Chapter 2 Kinematicss of Robots
Fnew = T × Fold
Fnew =
Figure 2.10 Coordinates of a point in a rotating frame before and after rotation.
33
Chapter 2 Kinematicss of Robots
Now let's drive a relation between the new location of the point and
its old location. To simplify, consider the 2-D coordinates shown in
figure 2.11, where the x-axis is assumed to be out of the paper.
Figure 2.11 Coordinates of a point relative to the rotating frame and reference
frame after a rotation about x-axis.
The coordinates of P relative to the moving frame (pn , po and pa) do
not change with the rotation, as the point is attached to the moving
frame. While its coordinates relative to the reference frame (px , py and
pz) will change according to the rotation. As the rotation is about the x-
axis, the value of px will not change, but the values of py and pz do
change. Form figure 2.11 we can deduce that:
p x = pn
py = L1 – L2 = po cos θ - pa sin θ
pz = L3 + L4 = po sin θ + pa cos θ
this could be put in matrix form as follows:
34
Chapter 2 Kinematicss of Robots
This means that the coordinates of the point P in the rotated frame is
pre-multiplied by a rotation matrix, to get the coordinates in the
reference frame. The above matrix represents a pure rotation about the
x-axis. This can be denoted as:
pxyz = Rot (x,θ) × pnoa
35
Chapter 2 Kinematicss of Robots
Example 2.6: A point p (2,3,4)T is attached to a moving frame, the
frame is rotating 90º about the x-axis of the reference frame,
find its new location relative to the reference frame.
Solution
T = Rot (x,θ) = =
pnew = × =
Figure 2.12 Rotation of a frame about the x-axis of the reference frame
36
Chapter 2 Kinematicss of Robots
order is very important, such that if the order of two successive
transformations changes, the result may be completely different.
37
Chapter 2 Kinematicss of Robots
Note that the coordinates of the point relative to the reference frame
at the end of each transformation is found by pre-multiplying the
coordinates of the point by the transformation matrix. The order of
matrices cannot be changed, therefore the order is very important.
T1 = Rot (z,90º) = =
T2 = Rot (y,90º) = =
T3 = Trans (4,-3,7) =
38
Chapter 2 Kinematicss of Robots
To check the importance of order, let's repeat the last example if two
transformations are changed.
Example 2.8: Assume the same point p (7,3,1)T as the previous example
attached Fnoa, is subjected to the same transformations, but in
different order as shown. Find its position relative to the
reference frame.
T1 = Rot (z,90º) = =
T2 = Trans (4,-3,7) =
T3 = Rot (y,90º) = =
Note: the result is different from the previous one. This confirms the
importance of order. Use Matlab to verify the result.
39
Chapter 2 Kinematicss of Robots
Transformations Relative to the Rotating Frame
All transformations we have discussed so far have been relative to
the fixed frame. This means that all translations, rotations and distances
(except for the location of a point relative to the moving frame) have
been measured to the reference frame axes. However it is possible to
make transformations relative to the axes of the moving frame. This
means, for example, a rotation about n-axis of the moving frame, and
not the x-axis of the reference frame. To calculate the changes in the
coordinates of a point attached to the moving frame relative to the
reference frame, the transformation matrix is post-multiplied. Note that
since the position of a point or an object attached to a moving frame is
always measured relative to that moving frame, the position matrix
describing the point or object is also always post-multiplied.
Example 2.9: Assume the same point p (7,3,1)T as the previous example
attached Fnoa, is subjected to the same transformations, but all
relative to current moving frame. Find its position relative to
the reference frame.
T1 = Rot (a,90º) = =
40
Chapter 2 Kinematicss of Robots
T2 = Transnoa (4,-3,7) =
T3 = Rot (o,90º) = =
Example 2.10: A frame B was rotated 90º about the x-axis, then it was
translated 3 units along the a-axis, then it was rotated 90º
about the z-axis, and finally it was translated 5 units along the
o-axis.
41
Chapter 2 Kinematicss of Robots
2- Find the final location of a point p (1,5,4)T attached to the
frame relative to the reference frame.
Solution
T1 = Rot (x,90º) = =
T2 = Transnoa (0,0,3) =
T3 = Rot (z,90º) = =
T4 = Transnoa (0,5,0) =
U
p = UTB × Bp = T3 × T1 × T2 × T4× =
42
Chapter 2 Kinematicss of Robots
Given B =
Solution
T1 = Rot (z,90º) = =
T2 = Transnoa (3,5,0) =
T3 = Rot (n,90º) = =
T4 = Rot (y,90º) = =
Bnew = T4 × T1 × B × T2 × T3 =
43
Chapter 2 Kinematicss of Robots
to drill a hole in it. The robot's base position relative to the reference
frame U is described by the frame R, the robot's hand is described by
the frame H, and the end effector (drill bit) is described by the frame E.
Figure 2.13 Universe, Robot, Hand, End effector and part frames.
44
Chapter 2 Kinematicss of Robots
robot's hand relative to the robot's base. This means we need to find out
what the robot's joint variables (the length for prismatic joints and the
angle for revolute joints) must be to place the end effector at the hole
for drilling. So it is necessary to calculate this transformation. To
calculate this matrix we need to use the inverse matrices as follows:
(UTR)-1(UTR RTH HTE) (HTE)-1 =(UTR)-1 (UTP PTE) (HTE)-1
R
TH =UTR-1 UTP PTE HTE-1
We can check the accuracy of this equation by realizing that (HTE)-1
is the same as ETH. then the last equation can be rewritten as:
R
TH =UTR-1 UTP PTE HTE-1 = RTU UTP PTE ETH = RTH
It is clear that we need to be able to calculate the inverse of
transformation matrices for kinematic analysis. Now let's try to find the
inverse of a simple rotation matrix about the x-axis (refer to
mathematical course for preparatory year).
Rot (x,θ) =
Rot (x,θ)-1 =
45
Chapter 2 Kinematicss of Robots
We notice that, the inverse of the rotation matrix is equal to its
transpose, i.e. Rot (x,θ)-1 = Rot (x,θ)T
A matrix like this is called unitary matrix. This means, when we
need to calculate the inverse of a rotation matrix, we simply transpose
it. If fact we can proof that the rotation matrix about y- and z-axes are
unitary matrices. The preceding result is true for the 3×3 rotation
matrix. While for the homogeneous 4×4 transformation matrix, it can be
shown that the inverse matrix can be written by dividing the matrix into
two portions; the rotation portion can be simply transposed, while the
position portion is the negative dot product of the p-vector with each of
the n-, o- and a-axes as follows:
T= then T-1 =
T=
Solution
T-1 =
46
Chapter 2 Kinematicss of Robots
T-1 =
5 5
Tcam = TH =
cam H
Tobj = TE =
Solution
We can write the equation that relates the different transformations
and frames together as follows:
R
T5 5TH HTE ETobj = RT5 5Tcam camTobj
The transformation RT5 appears to the left in both sides, so we can
cancel it. All other matrices, except for ETobj are known. Then using the
inverse matrices we get:
E
Tobj = HTE-1 5TH-1 5Tcam camTobj
H
TE-1 = 5
TH-1 =
47
Chapter 2 Kinematicss of Robots
E
Tobj =
48
Chapter 2 Kinematicss of Robots
49
Chapter 2 Kinematicss of Robots
there will be one linear motion and two rotary motions. We
will discuss the following common configurations:
Cartesian (Gantry, Rectangular) Coordinates.
Cylindrical Coordinates.
Spherical Coordinates.
Cartesian Coordinates
In Cartesian robots, there are three linear movements along the x-, y-
and z-axes. This means that, all actuators are linear (such as a hydraulic
ram or a linear power screw), and the positioning of the hand is
achieved by moving the three linear joints along the three axes, as
shown in figure 2.15.
50
Chapter 2 Kinematicss of Robots
R
Tp = Tcart (px , py , pz) =
Where RTp is the transformation between the reference frame and the
origin of the hand frame p, and Tcart (px , py , pz) is the Cartesian
transformation matrix. For inverse kinematic equation, we simply set
the desired position equal to p.
R
Tp = Tcart (px , py , pz) = =
Hence: px = 3 , py =4 and pz =7
Cylindrical Coordinates
The Cylindrical coordinate system includes two linear translations
and one rotation. The sequence is a translation of ( r ) along the x-axis, a
rotation of ( α ) about the z-axis and a translation of ( ℓ ) along the z-
axis, as shown in figure 2.16-(a). Since these transformations are
relative to the reference frame, the total transformation caused by these
51
Chapter 2 Kinematicss of Robots
three transformations is found by pre-multiplying by each matrix as
follows:
R
Tp = Tcyl (r , α , ℓ ) = T3 × T2 × T1
Tcyl (r , α , ℓ )
The first three columns represent the orientation of the frame after
the three transformations. But we are only interested in the position of
the origin of the frame, or the last column. It is clear that, in Cylindrical
coordinate, due to the rotation about the z-axis, the orientation of the
52
Chapter 2 Kinematicss of Robots
moving frame will change. we can restore the original orientation of the
frame by rotating the n,o,a frame about the a-axis an angle of (-α), as
shown in figure 2.16-(b). This is equivalent to post-multiplying the
cylindrical coordinate matrix by a rotation matrix of Rot (a,-α). As a
result, the frame will be at the same location but parallel to the
reference frame again:
Spherical Coordinates
A Spherical coordinate system consists of one linear motion and two
rotations. The sequence of movements is a translation of (r) along z-
53
Chapter 2 Kinematicss of Robots
axis, a rotation of (β) about y-axis, then a rotation of (γ) about z-axis, as
shown in figure 2.17-(a). Since these transformations are relative to the
reference frame, the total transformation caused by these three
transformations is found by pre-multipling by each matrix as follows:
R
Tp = TSph (r , β , γ) = T3 × T2 × T1
TSph (r , β , γ)
The first three columns represent the orientation of the frame after
the three transformations, while the last column represents the position
of the origin of the frame. It is clear that, in Spherical coordinate, due to
54
Chapter 2 Kinematicss of Robots
the rotations about y- and z-axes, the orientation of the moving frame
will change. To restore the original orientation of the frame we need to
make a rotation of (-γ) about a-axis then a rotation of (-β) about o-axis
i.e. Rot (o,- β)×Rot (a,- γ) are post multiplied to Tsph matrix, as shown in
figure 2.17-(b). As a result, the frame will be at the same location but
parallel to the reference frame again:
55
Chapter 2 Kinematicss of Robots
But rCβ = 7 , then β= 35.5º or β= -35.5º
And r = 8.6
The two answers satisfy the position, however only one of them
satisfies the orientation.
56
Chapter 2 Kinematicss of Robots
Figure 2.18 RPY rotations about the current axes (a,o and n).
57
Chapter 2 Kinematicss of Robots
The inverse kinematic solution for RPY is more complicated than
the spherical coordinates because there are three coupled angels, we
need information about the sines and cosines of all three angels
individually to solve for the angles. To simplify solution, we have to de-
couple these angels, by using the inverse matrix as follow:
Rot (a, φa)-1 RPY (φa ,φo ,φn) = Rot (o, φo) Rot (n, φn)
Euler angles
The sequence of movements is similar to RPY, except that the third
rotation is about the current a-axis, as shown in figure 2.19.
Figure 2.19 Euler rotations about the current axes (a,o and a).
58
Chapter 2 Kinematicss of Robots
This matrix represents the orientation change caused by the Euler
angels alone. The location and final orientation of the frame will be the
product of the two matrices representing the position and orientation.
For example, suppose a robot is designed based on Cartesian
coordinates and Euler, then the robot is represented by:
R
TH = Tcart (px , py , pz) × Euler (φ , θ, ψ)
59
Chapter 2 Kinematicss of Robots
configurations. In fact, there are many different combinations. For
complicated designs, it is better to use Denavit-Hartenberg (D-H)
representation. We will discuss this method in details in the next
section.
60
Chapter 2 Kinematicss of Robots
including zero; may be twisted and bent; and may be in any plane.
Therefore, any general set of joints and links may create a robot. We
need to be able to model and analyze any robot, whether or not it
follows any of the preceding common configurations.
To do this we assign a reference frame to each joint, and later define
a general procedure to transform from one joint to the next (one frame
to the next). If we combine all the transformations from the base to the
first joint, from the first joint to the second joint, and so on, until we get
to the last joint, we will have the robot's total transformation matrix.
Let's begin to define the general procedure for D-H representation,
how to assign a reference frame for each joint, how to calculate
transformations between any two successive joints, and finally how to
write the total transformation matrix for the robot.
Imagine that a robot made of a number of links and joints in any
form.
Figure 2.20 shows three successive joints and two links.
61
Chapter 2 Kinematicss of Robots
62
Chapter 2 Kinematicss of Robots
To model the robot with the D-H representation, we need to assign a
local frame for each joint. Therefore, for each joint we will assign a z-
axis and an x-axis. There is no need to assign the y-axis, because we
know that y-axis is mutually perpendicular to both x- and z-axes. So the
D-H representation does not use the y-axis at all. We follow the
following procedure for assigning a local frame to each joint:
All joint are represented by the z-axis. If the joint is prismatic, its
z-axis is along the direction of linear movement. While for the
revolute joint, its z-axis is in the direction of its axis of rotation
according to the right-hand rule of rotation. The index number for
the z-axis of joint n is n-1. Applying these simple rules will allow
us to assign a-axes to all joints. For prismatic joints, the length of
link along the z-axis represented by (d) will be the joint variable.
While for revolute joints, the rotation angel (θ) about the z-axis
will be the joint variable.
In general, joints may not be parallel or intersecting, so the
assigned z-axes may be skew lines. There is always one line
mutually perpendicular to any two skew lines, called common
normal, which is the shortest distance between them. We always
assign the x-axis of the local reference frame in the direction of
the common normal. Therefore, if an represents the common
normal between zn-1 and zn, the direction of xn will be along an.
similarly, if the common normal between zn and zn+1 is an+1, the
direction of xn+1 will be along an+1. In general, the common
normal lines between successive joints are not necessarily
63
Chapter 2 Kinematicss of Robots
intersecting or collinear. As a result, the origins of two successive
frames may also not be at the same location. Based on the above
procedure, we can assign coordinate frames to all joints, with the
following two exceptions:
If two successive z-axes are parallel, this are an infinite
number of common normal between them. We will use the
common normal that is collinear with the previous common
normal. This simplifies the model.
If two successive z-axes are intersecting, there is no common
normal between them. We will use a line perpendicular to the
plane formed by the two z-axes, i.e. in the direction of the
cross-product of the two z-axes. This simplifies the model.
In figure 2.20, there are four parameters:
θ : represents a rotation about the z-axis,
d : represents the distance on the z-axis between two successive
common normal (or joint offset),
a : represents the length of each common normal (or the length of
a link),
α : represents the angle between two successive z-axes (or joint
twist angel).
In fact, only θ and d are joint variables, while a and α are constants
depends on the mechanical construction of robot. The next step is to
follow the necessary motions to transform from one frame to the next,
as shown in figure 2.21.
64
Chapter 2 Kinematicss of Robots
65
Chapter 2 Kinematicss of Robots
Repeating the same sequence of four movements between the n+1
and n+2 frames will transform one frame to the next. By repeating this
as necessary, we can transform from the first joint to the second joint
and so on to the end effector. Note that this sequence of movements
remains the same between any two successive frames.
n
The transformation Tn+1 (called An+1) between two successive
frames representing the four movements is the product of the four
transformation matrices. Since all transformations are relative to the
current frame, all matrices are post-multiplied. This can be expressed as
follows:
n
Tn+1 = An+1= Rot (z,θn+1) Trans(0,0,dn+1)Trans(an+1,0,0)Rot(x,αn+1)
2
T3 = A3 =
Joints θ d a α
0-1
1-2
2-3
….
Table 2.1 D-H parameters table.
66
Chapter 2 Kinematicss of Robots
Now we can find the total transformation between the base of the
robot and the hand as follows:
R
TH =RT1 1T2 2T3 . . . . n-1Tn = A1 A2 A3 . . . . An
Where n is the joint number. For a 6-DOF robot, there will be six A
matrices. To facilitate the calculation of the A matrices, we form a
table, like table 2.1, that contains joint and link parameters, where the
values representing each link and joint are determined from the
schematic drawing of the robot.
Let's see some examples to explain how to use D-H representation to
get a model for a robot. We will start with a simple 2-axis robot and
moving up to a robot with 6 axes.
Example 2.17: For the simple 2-axes, planar robot of figure 2.22,
assign the necessary coordinate systems based on D-H
representation, fill out the parameters table, and drive the
forward kinematic equations for the robot.
67
Chapter 2 Kinematicss of Robots
Solution
Note that both joints rotate in the x-y plane. We start by give
numbers to the joints, so we have joints 1 , 2 and the hand. Then we
assign the z-axes for the joints. z0 will be assigned to joint 1, as the
joint is rotary z0 will be in the direction of the joint's axis of rotation,
pointing out of the paper. In a similar way we assign z1 to joint 2,
it is pointing out of the paper as well. As zH is arbitrary, we choose it
parallel to z1 for simplicity. Notice that the 0-frame is fixed and the
robot moves relative to it.
Now we begin to assign the x-axes for each frame. Since frame 0
has no frames preceding it, the direction of x 0 is arbitrary, so for
convenience (only), we may choose it in the same direction of the
Universe x-axis. In fact there is no problem if we use any other
direction perpendicular to z0, but we use this for simplicity.
Since z0 and z1 are parallel, the common normal between them is
in the direction between them, therefore x1-axis is as shown. Since z1
and zH are parallel, the common normal between them is in the
direction between them, therefore xH-axis is as shown.
Table 2.2 shows the parameters table for the robot. To fill the
values in that table, follow the four necessary transformations
required to go from one frame to the next, according to the D-H
convention.
1-Rotate about z0-axis an angle θ1 to make x0 parallel to x1.
2-Since x0 and x1 are in the same plane, translation d along z0-
axis is zero.
68
Chapter 2 Kinematicss of Robots
3-Translate along the (already rotated) x0-axis a distance of a1.
4-Since z0- and z1-axes are parallel, the necessary rotation α
about x1-axis is zero.
The same four steps are repeated for transformation between
frames 1 and H. Note that since there are two revolute joints, the
two unknowns are joint angles θ1 and θ2.
Joints θ d a α
0-1 θ1 0 a1 0
1-H θ2 0 a2 0
Table 2.2 D-H parameters table for example 2.17.
The forward kinematic equation of this robot can be calculated
by substituting the parameters from the table into the A matrices:
A1 = and A2 =
0
TH = A1 × A2
0
TH =
Example 2.18: For 3-DOF robot arm in figure 2.23, Assign the
necessary coordinate systems based on D-H representation,
fill out the parameters table, and drive the forward kinematic
equations for that robot.
70
Chapter 2 Kinematicss of Robots
be perpendicular to both at the same point, as shown. Table 2.3
shows the parameters table for the robot.
Joints θ d a α
0-1 θ1 0 a1 0
1-2 90+ θ2 0 0 90
2-H θ3 d3 0 0
Table 2.3 D-H parameters table for example 2.18.
71
Chapter 2 Kinematicss of Robots
A1 = A2 =
A3 =
0
TH = A1 × A2 × A3
A special location and orientation of the hand if (θ1, θ2, θ3) equals
0
(0, 0, 0), we get TH =
0
if (θ1, θ2, θ3) equals (90, 0, 0), we get TH =
73
Chapter 2 Kinematicss of Robots
skew and always perpendicular to each other, x4 will be normal to
them along the link. As z4 and z5 are intersecting, x5 will be normal
to their plane. Finally because z5 and z6 are collinear, x6 will be
normal to both of them. It is important to notice the location of the
origins of the frames. For example, the origin of the first joint is not
at the physical location of the joint. Now we can start to fill the
parameters of Table 2.4 for the robot.
74
Chapter 2 Kinematicss of Robots
It is clear that, as the all the joints are revolute, all the robot
variables are angles.
The A matrices representing the transformations of joints are:
A1 = A2 =
A3 = A4 =
A5 = A6 =
0
TH = A1 × A2 × A3× A4 × A5 × A6
Notes:
In assigning the x- and z- axes, you may choose either direction
along the chosen line of action. This may change the individual
matrices, however the total transformation will be the same.
You may not have any fewer or more unknown variables than the
number of joints.
The D-H representation does not use a transformation along the y-
axis. Therefore, if you find that you need to move along the y-
axis to transform from one frame to another, you either have
made a mistake, or you need an additional frame in between.
In reality, there may be a small angles between seemingly parallel
z-axes due to manufacturing errors or tolerance. To represent
75
Chapter 2 Kinematicss of Robots
these errors it will be necessary to make transformations along y-
axis. Therefore D-H method cannot represent these errors.
Frame xn-zn represents link n before itself. It is attached to link n
and moves with it relative to frame n-1. Motions about joint n are
relative to frame n-1.
Although you may use other representations to develop the
kinematic equations of a robot, D-H representation is useful in the
derivation of differential motions, dynamic analysis and so on.
In all previous examples we drive the transformation between the
base of the robot and the end effector (0TH). It is also possible to
find the transformation between the Universe frame and the end
effector (UTH). It is a direct relation as UTH =UT0 0TH. since the
location of the base within the Universe is known, i.e. UT0 is
known.
D-H representation is used for any configurations contrary to
Cartesian, Cylindrical, Spherical, RPY and Euler which are for
special configurations. Additionally you cannot use those
representations if ant twist angles or joint offsets are present. In
fact those special ways were presented for teaching purposes, and
you should use the D-H for analysis.
76
Chapter 2 Kinematicss of Robots
Problems 2
Pr.2.1 Write a unit vector in matrix form that describes the direction of
the cross product of p=5i+3k and q= 3i +4j +5k.
Pr.2.2 A vector p is 8 units long and is perpendicular to vectors q and r
described below. Express the vector in matrix form.
B=
Pr.2.6 Find the values of the missing elements of frame B and complete
the matrix representation of the frame.
B=
77
Chapter 2 Kinematicss of Robots
Pr.2.7 Find the coordinates of point p= (2,3,4)T relative to the reference
frame after a rotation of 45 about the x-axis.
Pr.2.8 Find the coordinates of point p= (3,5,7)T relative to the reference
frame after a rotation of 30 about the z-axis.
Pr.2.9 Find the new location of point p= (1,2,3)T relative to the
reference frame after a rotation of 30 about the z-axis followed by a
rotation of 60 about the y-axis.
Pr.2.10 A point P in space is defined as (5,3,4)T relative to frame
B which is attached to the origin of the reference frame A and is
parallel to it. Apply the following transformations to frame B and
find AP:
• Rotate 90 about x-axis, then
• Translate 3 units about y-axis, 6 units about z-axis, and 5 units
about x-axis. Then,
• Rotate 90 about z-axis.
Pr.2.11 A point P in space is defined as (2,3,5)T relative to frame
B which is attached to the origin of the reference frame A and is
parallel to it. Apply the following transformations to frame B and
find AP:
• Rotate 90 about x-axis, then
• Rotate 90 about local a-axis, then
• Translate 3 units about y-, 6 units about z-, and 5 units about x-
axes
Pr.2.12 A frame B is rotated 90 about the z-axis, then translated 3 and 5
units relative to the n-and o-axes respectively, then rotated another
90 about the n-axis, and finally, 90 about the y-axis. Find the new
location and orientation of the frame.
78
Chapter 2 Kinematicss of Robots
B=
T1 = T2 =
TSph =
79
Chapter 2 Kinematicss of Robots
robot configuration if the hand of the robot is to be placed on the
object.
U U
Tobj = TR =
Pr.2.18 A 3-DOF robot arm has been designed for applying paint
on flat walls, as shown. Assign coordinate frames as necessary
based on the D-H representation, Fill out the parameters table, and
Find the UTH matrix.
80
Chapter 2 Kinematicss of Robots
81