ROBOT MODELING
Robotics(EP-5532)
3/11/2020 1
3/11/2020 Robotics(EP-5532) 2
3/11/2020 Robotics(EP-5532) 3
Representation of a Point
^ in^Space:
^
P a x i by j c z k
A point P in space :
3 coordinates relative to a reference frame
Fig- 3.1: Representation of a point in space.
Representation of a Vector in Space:
__ ^ ^ ^
A Vector P in space : P a x i by j c z k x
3 coordinates of its tail and of its head __ y
P
z
w
Fig-3.2: Representation of a vector in space
Representation of a Frame at the Origin of a Fixed-Reference Frame:
Each Unit Vector is mutually perpendicular:
nx ox a x
F n y o y a y
normal, orientation, approach vector
nz oz a z
Fig-3.3 Representation of a frame at the origin of the reference frame
3/11/2020 Robotics(EP-5532) 4
Cont…
Representation of a Frame in a Fixed Reference Frame:
Each Unit Vector is mutually perpendicular:
nx ox a x Px
n o y a y Py
F y
nz oz a z Pz
0 0 0 1
Fig-3.3 Representation of a frame in a frame
Representation of a Rigid Body:
An object can be represented in space by attaching a frame
to it and representing the frame in space.
nx ox a x Px
n o y a y Py
Fobject y
nz oz a z Pz
0 0 0 1
3/11/2020 Robotics(EP-5532) 5
Fig-3.4: Representation of an object in space
Basic Transformations:-
Moving Between Coordinate Frames
Translation Along the X-Axis
Px = distance between the XY and NO coordinate planes
Notation:
………………..(3.1)
Writing V XY in terms of V NO
;
PX V N
V XY O P V …………
NO (3.2)
V
3/11/2020 Robotics(EP-5532) 6
Cont…
Translation along the X-Axis and Y-Axis
Where,
Px
P XY
………………….(3.3)
PY
Referring the above figure and using equations (3.1), (3.2) and (3.3), we have;
PX V N
V XY P V NO O ……… ……..(3.4)
PY V
3/11/2020 Robotics(EP-5532) 7
Cont…
Using Basis Vectors
Basis vectors are unit vectors that point along a coordinate axis.
Where,
n - Unit vector along the N-Axis
o - Unit vector along the O-Axis
V NO - Magnitude of the VNO vector
NO
The vector V can be expressed as:
V N V cosθ V NO cosθ V NO n
NO
V NO O NO NO NO …………………(3.5)
V V sinθ V cos(90 θ) V o
3/11/2020 Robotics(EP-5532) 8
Cont…
Rotation (around the Z-Axis)
Let, θ = Angle of rotation between the XY and NO coordinate axis as shown below.
Y
Z X
Using the notations vectors as, V X V N
V XY
Y V NO
O ……………….(3.6)
V V
For x = Unit vector along X-Axis,
V Can be considered with respect to the XY coordinates or NO coordinates.
From the above figure, V XY V NO
3/11/2020 Robotics(EP-5532) 9
Cont…
Thus;
(Substituting for VNO using the N and O
components of the vector)
…………………..(3.7)
Similarly….
…..…… ………(3.8)
So….
…………………………(3.9)
Finally, the Rotation Matrix about the z-axis can be written in Matrix Form as;
… ………………(3.10)
3/11/2020 Robotics(EP-5532) 10
Cont…
Translation along P followed by rotation by
…………………..(3.11)
Note: - Px, Py are relative to the original coordinate frame.
- Translation followed by rotation is different than rotation followed by translation.
In other words,
knowing the coordinates of a point (VN,VO) in some coordinate frame (NO);
you can find the position of that point
3/11/2020
relative to your original coordinate frame (X0 Y0).
Robotics(EP-5532) 11
HOMOGENEOUS REPRESENTATION:
Putting it all into a Matrix.
What we found by doing a translation and a rotation,
V X Px cosθ sinθ V N
XY
Y
cosθ V O
V
V Py sinθ
Padding with 0’s and 1’s, V X Px cosθ sinθ 0 V N
V Y Py sinθ cosθ 0 V O
1 1 0 0 1 1
Simplifying into a matrix form, V X cosθ sinθ Px V N
V Y sinθ cosθ Py V O ……………(3.12)
1 0 0 1 1
From eqn. (3.12), the Homogenous Matrix for a Translation in XY plane, followed by
a Rotation around the z-axis can be written as:
cosθ sinθ Px
H sinθ cosθ Py …………………….(3.13)
3/11/2020 0 1
0 Robotics(EP-5532) 12
Cont…
Rotation Matrices in 3D;
Rotation around the Z-Axis
cosθ sinθ 0
R z sinθ cosθ 0 …………………(2.14)
0 0 1
Rotation around the Y-Axis
cosθ 0 sinθ
R y 0 1 0 …………………..(2.15)
sinθ 0 cosθ
Rotation around the X-Axis
1 0 0
R x 0 cosθ sinθ ……………………(2.16)
0 sinθ cosθ
3/11/2020 Robotics(EP-5532) 13
3/11/2020 Robotics(EP-5532) 14
3/11/2020 Robotics(EP-5532) 15
3/11/2020 Robotics(EP-5532) 16
3/11/2020 Robotics(EP-5532) 17
3/11/2020 Robotics(EP-5532) 18
3/11/2020 Robotics(EP-5532) 19
3/11/2020 Robotics(EP-5532) 20
3/11/2020 Robotics(EP-5532) 21
3/11/2020 Robotics(EP-5532) 22
3/11/2020 Robotics(EP-5532) 23
3/11/2020 Robotics(EP-5532) 24
Homogeneous Matrices in 3D
H is a 4x4 matrix that can describe a translation, rotation, or both in one matrix.
3/11/2020 Robotics(EP-5532) 25
Homogeneous Continued….
The rotation and translation part can be combined into a single homogeneous
matrix IF and ONLY IF both are relative to the same coordinate frame.
3/11/2020 Robotics(EP-5532) 26
Example
A point is attached to a rotating frame, the frame rotates
60 degree about the OZ axis of the reference frame. Find the
coordinates of the point relative to the reference frame after the
rotation.
3/11/2020 Robotics(EP-5532) 27
Finding the Homogeneous Matrix:
EX-1:
Fig-3.11: Two coordinate frames that differ by only a translation.
For the figure 3.11, the rotation matrix,
Rotation matrix = , and
changing for x, y, z axis, ΔX = Xm- Xc = 5, ΔY = Ym- Yc = -4, ΔZ = Zm- Zc = -1
Thus, The transformation matrix,
Where, = The transformation that you use to take a point in j-coordinates and
compute
3/11/2020 its location in k-coordinates.
Robotics(EP-5532) 28
Cont…
If there is a rotation around the x, y or z axis,
The rotation matrix reforms below,
Ex-2:
Consider the simple robot arm from figs. (2.12) & (2.13) with the joint rotated by ψ degrees.
Fig-2.12: A simple arm.
Fig-3.13: The robot arm from fig-2.12 with the joint rotated by ψ degrees.
For the figure 2.13, Transformation matrix,
3/11/2020 Robotics(EP-5532) 29
Cont…
Ex-3:
A point in the tool coordinate system is (xN, yN, zN). The origin of the tool
coordinate is at (a, b, c) in the base coordinate system.
What is (x0, y0, z0), this point in the base coordinate system?
Soln:
Using simple analytical geometry,
We can also use the translation transformation,
3/11/2020 Robotics(EP-5532) 30
Cont…
Ex-4:
A robot is holding a plate. The plate is at location (0, 0, 200) in the tool coordinate system. At
the ready position, the tool coordinate system is at (500, 0, 600).
a) What is the location of the plate in the base coordinate system?
b) If the base is rotated 300 about z0, what is the location of the plate?
a)
b)
If you swap the order of z rotation and translation, you will have Tran(433, 250,600)Rot(z,30)Rot(y,90).
Please verify.
3/11/2020 Robotics(EP-5532) 31
Cont…
Ex-5:
Consider the first two joints in a SCARA robot.
Top view.
We can consider the link 2 being translated to point P then rotated for θ1.
Soln:
The translation to P along x0 and y0 are: a1 cos θ1, a1 sin θ1.
The rotation is about z for θ1.
The vector in the translated coordinate is v1 = (a2 cos θ2, a2 sin θ2, z, 1)T
Let’s use the standard transformation to calculate TCP with respect to (x0, y0, z0).
3/11/2020 Robotics(EP-5532) 32
Transformation Rule
Composite Homogeneous Transformation Matrix Rules:
Transformation (rotation/translation) w.r.t (X,Y,Z) (OLD FRAME), using
pre-multiplication
Transformation (rotation/translation) w.r.t (U,V,W) (NEW FRAME),
using post-multiplication
Example -1
Find the homogeneous transformation matrix (T) for the following
operations:
3/11/2020 Robotics(EP-5532) 33
Example -2
3/11/2020 Robotics(EP-5532) 34
3/11/2020 Robotics(EP-5532) 35
3/11/2020 Robotics(EP-5532) 36
3/11/2020 Robotics(EP-5532) 37
3/11/2020 Robotics(EP-5532) 38
3/11/2020 Robotics(EP-5532) 39
3/11/2020 Robotics(EP-5532) 40
3/11/2020 Robotics(EP-5532) 41
3/11/2020 Robotics(EP-5532) 42
Robot kinematic analysis (Forward Kinematics)
An industrial robot has 4, 5, 6 or even more dof.
The transformation from the base to TCP can be complex.
In addition, the location and orientation of the end effectors becomes bulky if found directly.
With the transformation introduced earlier,
the transformation of the entire robot can be decomposed to successive
transformations between connected links.
In order to be consistent, people in the field follow certain convention in naming
links and joints and define the angles.
This is called Denavit-Hartenberg convention and homogeneous transformation.
Let joint n has transformation Ai.
The transformation of a robot with N dof has is:
…………………..(2.17)
TN defines the location and orientation of the tool coordinate system (TCP).
Then, a point in the base coordinate:
3/11/2020
v0 = 0 Tn
Robotics(EP-5532)
vn………………….(2.18) 43
Cont…
People in the field developed conventions and step-by-step method to cope with the
complexity.
Steps:
1. Finding transformation between link n-1 and n, An,
2. Finding the transformation of the robot, 0TN.
3. v0 = 0TN vN =0 ,
Where, 0TN = A1,A2,…AN
What is the purpose?
Robots often have to find the relationships between its tool coordinate system
and its base coordinate system.
3/11/2020 Robotics(EP-5532) 44
Homogeneous transformation and Denavit-Hartenberg convention
An n dof robot has N mobile links linked by N joints.
A link may be translated, rotated with respect to its previous link through their joint.
Two joint coordinate system for 2 consecutive joints can be setup as,
(xn-1, yn-1, zn-1) and (xn, yn, zn).
Establishing Frames Between Links of a Robot:
A robot is a series of links and joints, which creates a kinematic chain.
Each link connects 2 adjacent joints, and each joint connects 2 adjacent links (see figure2.14.)
3/11/2020 Fig-214: RelationshipRobotics(EP-5532)
of joints and links on a robot mechanism. 45
Cont…
We need to set up a coordinate frame for every joint of the robot.
Once we do this, we can establish a set of transformations that will take us from
one joint frame to the next.
If we combine all these transformations from frame 0 to frame n, we can define the
entire robot transformation matrix 0Tn.
All joints, without exception, are represented by a Z axis.
If we have a revolute (rotary motion) joint, we rotate about Z.
If we have a prismatic joint ( a linear sliding joint), we translate along Z.
Notation:
- joint k connects link k-1 and link k, and it rotates θk about the Zk-1 axis.
- When joint k is actuated, link k moves.
A robot with n joints will have n+1 links, since each joint connects 2 links.
We number the joints from 1 to n, and we number the links from 0 to n starting
at the base.
3/11/2020
We can think of link 0 as the fixed base of the robot that never moves.
Robotics(EP-5532) 46
Cont…
With the ith joint we describe a joint variable qi, which is an angular rotation if a
revolute joint or a linear displacement if a prismatic joint.
Each link has a coordinate frame attached to it.
Frame oixiyizi is attached to link i.
This means that whatever robot motions occur, the coordinates of every point
on link i are constant when expressed in the ith coordinate frame.
When joint i is actuated, the link i and its entire frame experience a resulting
motion.
Figure 2.14 shows a more general way to analyze the relationship between links
and joints.
Figure 2.15 shows some frames attached to a 3-link manipulator.
3/11/2020 Robotics(EP-5532) 47
Creating Transform from Frame i-1 to Frame i:
We need to specify 4 parameters that will allow us to completely describe the transformation
from one frame of the robot to the next.
These parameters are called the Denavit-Hartenberg parameters.
When we describe a robot using this notation, we refer to it as D-H notation.
1. Rotate about the Zi-1 axis by an angle of θi.
θi is called the joint angle.
2. Translate along Zi-1 by di.
di is called the link offset distance.
3. Translate along Xi-1 by ai. This will bring the origins of the two coordinate frames
together.
ai is called the link length.
4. Rotate about the Xi-1 axis by an angle .
This angle is called the link twist angle, and it will align the Z axes of the two
frames.
This entire process can be summarized by chaining together the 4 transformations above into a
single composite transformation:
………………..(2.19)
3/11/2020 Robotics(EP-5532) ………………….(2.20) 48
CONSTRUCTION PROCEDURE :
1)Number the links and joints, starting from the base.
The stationary base is link 0. Link n rotates and/or translates with respect to link
n-1 through joint n.
The last joint is N.
2)Definition of coordinate systems for each link.
zn-1: axis of motion of joint n.
If joint n is rotational, link n rotates about zn-1.
If joint n is linear, link n translates along zn-1.
xn: along common perpendicular (zn-1 zn) perpendicular and passing both.
3)Define the joint parameters.
Θn is the rotation from xn-1 to xn about zn-1.
dn is the translation along zn-1.
An is the translation along xn.
is the rotation from zn-1 to zn about xn.
4)Form the homogeneous displacement matrix An.
3/11/2020 Robotics(EP-5532) 49
Setting up a Table of D-H parameters:
From the discussion above, all we need to provide to solve the forward kinematics of a robot are
4 parameters:
If we fill in a table like the one below, we can completely specify the robot’s forward kinematic
structure:
Using this table, we can just plug into the transform matrix for each link of the robot, and
multiply them together.
Note that: the joint variable is either θ for revolute joints or d for prismatic joints.
Figure 2.15 shows a 3-link elbow manipulator.
Fig-2.15: Coordinate frames attached to
a 3-link elbow manipulator
3/11/2020 Robotics(EP-5532) 50
Cont…
From Fig-3.15 (D-H frames for 3 link elbow manipulator), the D-H parameters can be easily
tabulated.
Note: manipulator is pictured after rotation (θ1 , θ2 , θ3) = (90, 0, 0)
Assume link lengths of a2 and a3 for links 2 and 3, and that the link 1 offset is d1:
Where;
If (θ1 , θ2 , θ3) = (90, 0, 0), then substituting in we get the matrix:
This shows the end effector location as (0, a2+a3, d1).
Note also the directions of the axes in the final end-effector frame are equal to the column
vectors of
3/11/2020 . Robotics(EP-5532) 51
3/11/2020 Robotics(EP-5532) 52
3/11/2020 Robotics(EP-5532) 53
Setting up a Frame Diagram:
In analyzing a robot mechanism, we often create a frame diagram that graphically
shows the relationships between the DH-frames of the robot.
Starting from a base coordinate frame, we align the Z axis with the first joint axis.
Call this joint axis Zi-1. Every joint axis in the mechanism will be a Z axis.
The axis of the next joint in the chain Zi is either parallel, intersecting or skew
with Zi-1.
if Zi and Zi-1 are intersecting, then Xi is in the direction of the cross product of the 2
Z-axes.
if Zi and Zi-1 are parallel, then Xi is in the direction of common normal between the
2 parallel axes.
Since there are many equal normals between the 2 parallel axes, we usually
take as the Xi axis the normal through the origin Oi-1 from the previous frame
and establish origin Oi as the point of intersection of the normal with Zi.
Note that the link offset distance di will be zero in this case.
3/11/2020 Robotics(EP-5532) 54
Cont…
if Zi and Zi-1 are skew, then Xi is in the direction of the common (unique) normal
between the 2 axes.
Once we have a new X and Z axis, and an origin for the new frame we are done.
The Y axis will simply be the cross product of Z and X.
Using these rules we then move out the mechanism, a joint and a frame at a time,
filling in the D-H parameters and setting up the manipulator transforms.
We also usually designate a zero-position frame diagram of the robot which is a
graphical depiction of the frames when all joint variables are zero.
The examples that follow will make this clear.
Another analysis of the manipulator is to define its geometric workspace:
the volume of space reachable by the endpoint of the manipulator.
For the previous example of the elbow manipulator (fig-2.15), the workspace is
a sphere.
3/11/2020 Robotics(EP-5532) 55
Ex-6: Forward Kinematics,
Cylindrical Manipulator
Fig-3.16: Three link Cylindrical Manipulator
Figure 3.16 shows a picture of this mechanism and its frame diagram.
It shows the robots configuration for each link of the robot.
The table of joint parameters is:
Substituting these values into the D-H frame transformation matrices we get:
Note: d1 could be zero, in which case the origin of link 1 would be the same as link 2’s origin.
Let θ1 = 90, d1 = 0, d2 = 3 and d3 = 5.
Then substituting into the transform matrix, we can see the manipulator endpoint (last column of matrix)
is at (-5; 0; 3).
3/11/2020 Robotics(EP-5532) 56
Ex-7: Forward Kinematics, Spherical Wrist
Fig-2.17: Spherical wrist frame assignments
A spherical wrist can be added to the cylindrical manipulator to orient the end-effector (gripper) in space.
The first 2 angles effectively point the gripper in a spherical coordinate system, and the last angle is a roll angle
that orients the gripper about the approach axis.
The table of joint parameters is:
Substituting these values into the D-H frame transformation matrices we get:
You can append the 2 matrices to get the final matrix of the cylindrical manipulator with the spherical
wrist. This mechanism has 6 DOF and 6 joint variables: θ1; d2; d3; θ4; θ5; θ6.
3/11/2020 Robotics(EP-5532) 57
Ex-8: Forward Kinematics, 3 Link Manipulator B
Figure 2.18 shows a picture of this mechanism and its frame diagram.
Fig-2.18: Manipulator B: Mechanism and frame diagram
It shows the robots configuration for each link of the robot.
The table of joint parameters is as follows:
3/11/2020 Robotics(EP-5532) 58
Cont…
Substituting these values into the D-H frame transformation matrices we get
(note: C23 = Cos(θ2 + θ2), same for S23.
If θ1 = 90, θ2 = 90, θ2 = -90, then
3/11/2020 Robotics(EP-5532) 59
Ex-9: Forward Kinematics, 3 Link Manipulator D
Figure 3.19 shows a picture of this mechanism and its frame diagram.
Fig-3.19: Manipulator D: Mechanism and frame diagram
The table of joint parameters is as follows:
3/11/2020 Robotics(EP-5532) 60
Cont…
Substituting these values into the D-H frame transformation matrices we get:
if θ1 = 90 and θ3 = 0 and q2 = 5:
3/11/2020 Robotics(EP-5532) 61
Example-10:
For the polar robot, what is TCP if θ1 = 900, θ2 = 300 and d3 = 5’’ ?
That means, the TCP is at (0, 2.5, -4.33), The gripper is pointing down & front.
The gripper opens along y, so it is along x axis.
Forward kinematics can also be used to relate positions in tool coordinate and base coordinate.
Example-11:
If a point in the scope link coordinate is (0, 0, 1), where is TCP and what is its orientation if
θ1 = 900, θ2 = 300 and d3 = 5’’ ?
This means, a point (0, 0, 1) in the gripper
3/11/2020 coordinate is at (0, 3, -5.196) in base coordinate.
Robotics(EP-5532) 62
Inverse Kinematics
Introduction:
We knew that,
the forward kinematics problem of a manipulator is to determine the configuration (position
and orientation) of the end effector of the manipulator as a function of the manipulator’s
joint angles.
The inverse problem of that,
i.e., determining the joint angles given a desired end effector configuration, is the inverse
kinematics problem.
There are two main categories of approaches to this problem; namely,
closed-form analytical methods and
numerical approaches.
The main difficulty of the inverse kinematics problem in general is that for some desired end
effector configuration,
there may be no solutions,
there may be a unique solution, or
there may be multiple (Redundancy)Robotics(EP-5532)
3/11/2020 solutions. 63
3/11/2020 Robotics(EP-5532) 64