Beruflich Dokumente
Kultur Dokumente
A Project
MASTER OF SCIENCE
in
by
Mahavishnu Murugesan
SUMMER
2017
© 2017
Mahavishnu Murugesan
ii
SIMULATION OF FORWARD AND INVERSE KINEMATICS OF A ROBOTIC ARM
A Project
by
Mahavishnu Murugesan
Approved by:
____________________________
Date
iii
Student: Mahavishnu Murugesan
I certify that this student has met the requirements for format contained in the University format
manual, and that this project is suitable for shelving in the Library and credit is to be awarded for
the project.
iv
Abstract
of
by
Mahavishnu Murugesan
Robots are the main part of flexible manufacturing systems. They are used in various applications
where human work can be replaced and automated. In this project, I have simulated a robotic arm
manipulator with six degrees of freedom in MATLAB. There are various applications where a
robotic arm is used like painting, carpentry and hardware verification. In hardware verification
labs, robotic arms are used to hold passive and power rail probes that connect from instruments
like scopes and power supplies to pcb boards to protect the pcb layout from rip off due to
Robot kinematics uses the geometry (position and orientation) of rigid bodies (links) and joints to
control the movement of the robot. In this project, I have demonstrated the forward and inverse
Forward kinematics calculates the end-effector position of the robot using the angles of the joints.
Inverse kinematics calculates the angles of the joints with the end-effector position as the
reference. There are several methods to calculate the forward and inverse kinematics such as
analytical methods, numerical hit and trial, and iterative methods. The complexity of the
v
kinematics increases as a function of the workspace of the manipulator. Thus, I have adopted the
_______________________
Date
vi
ACKNOWLEDGEMENTS
I would like to express my sincere thanks to my project advisor, Dr. Fethi Belkhouche for
guidance in this project and motivating me with great patience and utmost care. I am fortunate to
I would like to express my sincere gratitude to my graduate co-ordinator, Dr. Preetham B. Kumar
for spending his valuable time to read the project report and guiding for the betterment of the
project. I would also like to extend my thanks to the Department of Electrical and Electronics
Engineering and Office of Graduate studies, California State University, Sacramento for
providing the road map for graduation and for all the help and support.
I wholeheartedly thank my parents Mr. Murugesan Natarajan and Mrs. Meenakshi Singaram, my
brother Mr. Nanda kumar, my aunt Mrs. Kalavathi and all my family members for their
continuous support, which helped me to achieve the goal and their encouragement throughout my
academics. I would also like to thank all my professors who passed on their knowledge in the
vii
TABLE OF CONTENTS
Page
Acknowledgements………………………………………………………………………………vii
List of Tables…………………………………………………………………………………......x
List of Figures……………………………………………………………………………………xi
Chapter
1. INTRODUCTION………………………………………………………………………..... 1
6. RESULTS………………………………………………………………………………… 14
6.2 Example 2.1: Robot position with joint angles (11, 16, 21, 29, 41, 51)….………… 15
6.3 Example 2.2: Forward kinematics with joint angles (11, 16, 21, 29, 41, 51)………. 16
6.4 Example 3.1: Robot position with joint angles (9, 18, 19, 17, 27, 36)…………… 17
6.5 Example 3.2: Forward kinematics with joint angles (9, 18, 19, 17, 27, 36)………… 18
6.6 Example 4.1: Robot position with joint angles (13, 18, 25, 37, 44, 50)…….……… 19
6.7 Example 4.2: Forward kinematics with joint angles (13, 18, 25, 37, 44, 50)………. 20
6.8 Example 5.1: Robot position with joint angles (6, 11, 21, 30, 39, 46)……………… 21
6.9 Example 5.2: Forward kinematics with joint angles (6, 11, 21, 30, 39, 46)…..…… 22
viii
6.10 Example 6.1: Robot position with joint angles (50, 48, 42, 31, 23, 15)………….....23
6.11 Example 6.2: Forward kinematics with joint angles (50, 48, 42, 31, 23, 15)….……24
6.12 Example 7.1: Robot position with joint angles (9, 16, 25, 35, 43, 51)…………......25
6.13 Example 7.2: Forward kinematics with joint angles (9, 16, 25, 35, 43, 51)……......26
6.14 Example 8.1: Robot position with Joint angles (7, 14, 20, 23, 34, 49)…………......27
6.15 Example 8.2: Forward kinematics with joint angles (7, 14, 20, 23, 34, 49)……......28
7. RESULT SUMMARY…………………………………………………………………….29
8. CONCLUSION…………………………………………………………………………...34
References……………………………………………………………………………………...35
ix
LIST OF TABLES
Tables Page
x
LIST OF FIGURES
Figures Page
6. Flow chart……………………………………………………………………………... 11
9. Robot position with joint angles (11, 16, 21, 29, 41, 51)……………………………... 15
10. Forward kinematics with joint angles (11, 16, 21, 29, 41, 51)…………………………16
11. Robot position with joint angles (9, 18, 19, 17, 27, 36)………………………………..17
12. Forward kinematics with joint angles (9, 18, 19, 17, 27, 36)…………………………..18
13. Robot position with joint angles (13, 18, 25, 37, 44, 50)………………………………19
14. Forward kinematics with joint angles (13, 18, 25, 37, 44, 50)……………………........20
15. Robot position with joint angles (6, 11, 21, 30, 39, 46)……………………………......21
16. Forward kinematics with joint angles (6, 11, 21, 30, 39, 46)…………………………..22
17. Robot position with joint angles (50, 48, 42, 31, 23, 15)………………………………23
18. Forward kinematics with joint angles (50, 48, 42, 31, 23, 15)…………………………24
19. Robot position with joint angles (9, 16, 25, 35, 43, 51)……………………………......25
20. Forward kinematics with joint angles (9, 16, 25, 35, 43, 51)…………………………..26
21. Robot position with joint angles (7, 14, 20, 23, 34, 49)……………………………......27
xi
22. Forward kinematics with joint angles (7, 14, 20, 23, 34, 49)…………………………..28
xii
1
1. INTRODUCTION
In this chapter, a detailed discussion of the robot’s arm, the basic components of the robotic arm
Robotic arms are probably the most mathematically complex robots to analyze, simulate, and
build. A robotic arm has links/frames and joints as the basic building blocks. The links are also
known as rigid bodies which are chained together by revolute or prismatic joints to construct an
Robot anatomy deals with the study of different joints and links and other aspects of the
manipulator's physical construction. A robotic joint provides relative motion between two links of
the robot. Each joint, or axis, provides a certain degree-of-freedom (DOF) of motion. In most
cases, only one degree-of-freedom is associated with each joint. Therefore the robot's complexity
can be classified according to the total number of degrees-of-freedom they possess [4]. Figure 1
shows the graphical representation and placement of frames/links and joints [2].
As shown in figure 1, each joint is connected to two links, an input link and an output link. The
joint provides controlled relative movement between the input link and the output link. A robotic
link is the rigid component of the robot manipulator [1]. Most robots are mounted upon a
The robotic base and its connection to the first joint are referred to as link 0. The first joint in the
sequence is joint 1. Link 0 is the input link for joint 1, while the output link from joint 1 is link 1
which leads to joint 2. Thus link 1 is, simultaneously, the output link for joint 1 and the input link
for joint 2. This joint-link-numbering scheme is followed for all joints and links in the robotic
system [3].
The degree of freedom, or DOF, is an important concept in robotics. In general, each degree of
freedom is a joint, which can be controlled along with the other joints to have a particular arm
position. It is important that a robotic arm has a fewer degrees of freedom, because each degree of
3
freedom adds more complexity to the control algorithm. Also, each degree of freedom requires a
The robot workspace (sometimes known as the reachable space) is all positions that the end
effector (gripper) can reach. The workspace depends on the angle/translation limitations of the
joints, the arm link lengths, the angle at which something must be picked up, etc. The workspace
A six DOF robotic arm which consists of six links is developed using MATLAB simulation tool
and then the forward and inverse kinematics analysis is performed in this project. As discussed
earlier about the joint-link convention, the six DOF manipulator will have six joints from joint 1
to joint 6 and six links from link 0 to link 5. Figure 2 shows the graphical representation of a six
The organization of links and joints of the six DOF manipulator is shown in the above figure.
Also the orientation of the end-effector of the robotic arm is shown above. In this project, the
base (first link) is fixed [6]. The goal is to find the relation between the first link and last link
(gripper’s link). The relationship can be obtained from the description of the coordinate
5
transformations between the coordinate frames attached to the links and forming the overall
description in a recursive manner [2]. In other words, kinematic chain will give the overall
transformation from frame 0 to frame N. A detailed discussion of the kinematic chain is provided
in chapter 3. Another important attribute of the robot is that it is a revolute joint robot, (i.e.) each
joint is designed to rotate. There are six joint angles from to to which are adjusted to control
In this convention, coordinate frames are attached to the joints between two links such that
one transformation is associated with the joint, [Z], and the second is associated with the link [X].
The coordinate transformations along a serial robot consisting of n links forms the kinematics
Each transformation from link i-1 to link i has six parameters. There are three parameters for
rotation and three parameters for displacement. As I developed a six DOF robot using MATLAB
robotic tool, it becomes complex to calculate the transformation matrix with three parameters
each for rotation and displacement. In general, DH convention converts six parameters to four
parameters (three parameters for rotation and one for displacement) for considering the
The link length and link twist are fixed for a given link. For a prismatic robot, di is the varying
parameter and i is fixed. For a revolute robot, iis the varying parameter and di is fixed.
The DH convention is used in the project and the six DOF robot follows the DH rules mentioned
The DH parameters for the six DOF robot are shown in table 1 [18]:
Joint Angle Joint Offset (di) Link Length (ai) Twist Angle (αi) Angle limits
Table 1 shows the joint angle configuration for the six DOF robot used in this project. The joint
offset, link length and twist angle for each link are shown in the table. The angle limit for each
link is given. A joint angle which is outside the specified limits is considered to be invalid.
9
Forward kinematics is the process of determining the position and orientation of the end effector
in Cartesian space with the help of the joint angles [10]. Inverse kinematics is the process of
calculating the joint angles with the help of the position and orientation of the end-effector.
Figure 3 shows the schematic relationship between forward and inverse kinematics.
Forward kinematics gives only one solution to the given input angles. On other hand, inverse
kinematics can give multiple solutions to a given input (position and orientation of end effector).
This implies that inverse kinematics is more suitable to real word applications [11] [12].
Figure 3 shows the calculation of the end effector’s position by composing the transformations.
Figure 4 shows the calculation of joint angles with the end-effector’s position using the
transformation method. Forward kinematics can be calculated using different methods [13] [14].
In this project, forward kinematics is calculated using the transformation matrix method. As a
result the forward kinematics solution is the product of six matrices (six transformation matrices)
1
1
1
1
1
In equation (1), the first three columns in the matrix represent the orientation of the end
effector’s. Equation (1) is obtained from the kinematic chain of transformation matrices.
11
In this chapter, a detailed discussion on the implementation, creation and the forward and inverse
kinematics analysis of the robotic arm using MATLAB tool is provided. The flow chart below
explains the process starting with creating the robot, controlling the robot with input joint angles,
forward kinematics and inverse kinematics functions used for the implementation.
In this project, I used MATLAB R2016B for robot creation and simulation. In the MATLAB tool,
RVC feature which consists of the robotic 3D capability is initialized. With the RVC feature, the
robot arm can be developed, controlled and manipulated [16]. I have a file, startup_rvm.m which
calls several robot functions by calling the respective .m files of each function.
A matlab file, LINK.m performs the process of link creation. This file holds all information
related to a robot link such as the kinematics parameters, rigid body inertial parameters, motor
and transmission parameters. In addition, there are classes and functions to receive the four
parameters of the DH convention and construct the link. The fifth parameter of a link determines
its type, revolute (0) or prismatic (1). The robot is created by connecting all links together in a
serial fashion. The MATLAB file, SerialLink.m does connect the vector of link objects and forms
a serial-link robot object. The output of SerialLink.m gives all the links information and robot
dimensions. Figure 7 shows the output of SerialLink.m (Serial-Link robot). The DH parameters
To view the 3D-representation of the robot created, Plot.m function is executed on the robot links
to display the graphical animation based on the kinematic model. The plot function in the file
joins the origins of the link co-ordinate frames and displays the 3D-View. The robot’s movement
The file, fkine.m has a function which outputs the robot-end effector position as a homogenous
transformation for the joint configuration. The result is provided in a matrix format as described
in the forward kinematic chapter. The fkine.m file uses the transformation matrix method to
provide the result. Similarly, the file ikine.m outputs the joint co-ordinates corresponding to the
6. RESULTS
Example 1 gives the parameters of the links that constitute the six DOF robot. It also gives the
configuration of the links (Prismatic or Revolute). In this project, I developed a robot with six
links in revolute configuration. The DH parameters of the six DOF robot are obtained from the
6.2 Example 2.1: Robot position with joint angles (11, 16, 21, 29, 41, 51)
Figure 9: Robot position with joint angles (11, 16, 21, 29, 41, 51)
Example 2.1 shows the robot with joint angles (11, 16, 21, 29, 41, 51). This set of joint angles
aligned joints in different directions to get the end-effector position shown in figure 9. Also, the
same end-effector position can be obtained by different joint angles using inverse kinematics.
16
6.3 Example 2.2: Forward kinematics with joint angles (11, 16, 21, 29, 41, 51)
Figure 10: Forward kinematics with joint angles (11, 16, 21, 29, 41, 51)
Example 2.2 shows forward kinematics with joint angles (11, 16, 21, 29, 41, 51) obtained in 4x4
matrix form from which the values of the position vectors are obtained. In addition, the position
vectors of the end-effector are all positive. The second orientation vector along the three axes is
6.4 Example 3.1: Robot position with joint angles (9, 18, 19, 17, 27, 36)
Figure 11: Robot position with joint angles (9, 18, 19, 17, 27, 36)
Example 3.1 shows the robot with joint angles (9, 18, 19, 17, 27, 36). In this example, the end-
effector position is pointing downwards. Link 5 is perpendicular to link 6 and also, link 6 is
parallel to link 2. Link 5 is perpendicular to link 2. Also, link 2, link 5 and link 6 form a
rectangular shape with one side open. The configuration of the robot is shown in figure 11.
18
6.5 Example 3.2: Forward kinematics with joint angles (9, 18, 19, 17, 27, 36)
Figure 12: Forward kinematics with joint angles (9, 18, 19, 17, 27, 36)
Example 3.2 shows the forward kinematics of the robot with joint angles (9, 18, 19, 17, 27, 36).
The second orientation vector along the three axes is negative. The orientations of the end-
effector along the z-axis are negative. The position vector along the three axes is positive as
6.6 Example 4.1: Robot position with joint angles (13, 18, 25, 37, 44, 50)
Figure 13: Robot position with Joint angles (13, 18, 25, 37, 44, 50)
Example 4.1 shows the robot with joint angles (13, 18, 25, 37, 44, 50). In this example, joints 3
and 5 are perpendicular to each other. Link 5 and link 6 are serially attached to each other. Under
these values of the joint variables, the end-effector position is directed towards the upper right
6.7 Example 4.2: Forward kinematics with joint angles (13, 18, 25, 37, 44, 50)
Figure 14: Forward kinematics with joint angles (13, 18, 25, 37, 44, 50)
Example 4.2 shows the forward kinematics of the robot with joint angles (13, 18, 25, 37, 44, 50).
In this example, joints 3 and 5 are perpendicular to each other. The positive vectors along the z-
axis oz, 𝛼 z, pz are all positive except the position vector nz which has a negative value as shown in
figure 14.
21
6.8 Example 5.1: Robot position with joint angles (6, 11, 21, 30, 39, 46)
Figure 15: Robot position with joint angles (6, 11, 21, 30, 39, 46)
Example 5.1 shows the robot with joint angles (6, 11, 21, 30, 39, 46). In this example, the end-
effector position is pointing downwards similar to example 3.1 with an angle variation in the end
effector. This is mainly due to the angle of joint 6. Also, joint 3 is perpendicular to joint 5. These
6.9 Example 5.2: Forward kinematics with joint angles (6, 11, 21, 30, 39, 46)
Figure 16: Forward kinematics with joint angles (6, 11, 21, 30, 39, 46)
Example 5.2 shows the forward kinematics of the joint angles (6, 11, 21, 30, 39, 46). In this
example, the orientation and position vectors along the y-axis are negative and all the orientation
vectors along z-axis are positive except αz. The position vector along x and z axes are positive
6.10 Example 6.1: Robot position with joint angles (50, 48, 42, 31, 23, 15)
Figure 17: Robot position with joint angles (50, 48, 42, 31, 23, 15)
Example 6.1 shows the robot with joint angles (50, 48, 42, 31, 23, 15). In this example, the end-
effector position is pointing towards the upper-left and the configuration of the joints is very
different as shown in figure 17. Joints 2, 3, 6 and joints 4, 6, 5 form two different triangles. Link 0
6.11 Example 6.2: Forward kinematics with joint angles (50, 48, 42, 31, 23, 15)
Figure 18: Forward kinematics with joint angles (50, 48, 42, 31, 23, 15)
In example 6.2, the position vector along the x and y axis is negative whereas it is positive along
the y-axis. The orientation vectors nx, ox, ax and the position vector px are negative. The orientation
6.12 Example 7.1: Robot position with joint angles (9, 16, 25, 35, 43, 51)
Figure 19: Robot position with joint angles (9, 16, 25, 35, 43, 51)
Example 7.1 shows the robot with joint angles (9, 16, 25, 35, 43, 51). In this example, the end-
effector position is parallel to the x-axis. Also, joint 5 and joint 6 are perpendicular to each other.
The link 5 and link 6 are perpendicular to each other respectively. This configuration is shown in
figure 19.
26
6.13 Example 7.2: Forward kinematics with joint angles (9, 16, 25, 35, 43, 51)
Figure 20: Forward kinematics with joint angles (9, 16, 25, 35, 43, 51)
Example 7.2 shows the forward kinematics of the joint angles (9, 16, 25, 35, 43, 51). The
orientation vectors nx, ny and nz are negative. The diagonal vectors nx, oy and az of the orientation
parameters of the end-effector are positive, negative, and negative respectively. Figure 20 shows
this configuration.
27
6.14 Example 8.1: Robot position with joint angles (7, 14, 20, 23, 34, 49)
Figure 21: Robot position with joint angles (7, 14, 20, 23, 34, 49)
Example 8.1 shows the robot with joint angles (7, 14, 20, 23, 34, 49). In this example, link 2 and
link 6 are parallel to each other. Also, the end effector position is pointing towards joint 2. Link 2
6.15 Example 8.2: Forward kinematics with joint angles (7, 14, 20, 23, 34, 49)
Figure 22: Forward kinematics with joint angles (7, 14, 20, 23, 34, 49)
Example 8.2 shows the result of forward kinematics for the joint angles (7, 14, 20, 23, 34, 49).
The orientation vectors nx, ny, nz of the forward kinematics are positive which is opposite to the
robot with the joint angle (9, 16, 25, 35, 43, 51). The orientation parameters along the z axis of
7. RESULT SUMMARY
LINK Joint angle Joint offset Link length Twist angle Prismatic or
(di) (ai)
(i Revolute
Table 2 shows the parameters of each link of the six-link robotic arm. The parameters are joint
offset, link length, twist angle and joint angle. In addition, it also shows the configuration of each
link (prismatic or revolute). All these parameters together form the DH parameters for the six link
angle
11 9 13 6 50 9 7
16 18 18 11 48 16 14
21 19 25 21 42 25 20
29 17 37 30 31 35 23
41 27 44 39 23 43 34
51 36 50 46 15 51 49
Table 3 shows the six joint angles for each input (example). The robot position for each input
(example) is shown in the previous chapter. It is also proven that changing the angle of any joint
vector
Table 4 shows the forward kinematics result for the input combinations (with six different joint
angles) mentioned in table 3. Vectors N, 0 and A represent the orientation of the end-effector of
the robot. Vector P represents the position of the end-effector of the robot.
angle
11 9 13 6 50 9 7
16 18 18 11 48 16 14
21 19 25 21 42 25 20
29 17 37 30 31 35 23
41 27 44 39 23 43 34
51 36 50 46 15 51 49
Table 5 shows the inverse kinematics result of different input combinations of the position
vectors obtained in the forward kinematics result mentioned in table 4. With the orientation and
33
position vectors as input, the joint angles are obtained as output. It proves that forward and
8. CONCLUSION
In this project, I have simulated a six DOF robot using MATLAB simulation tool. The motion of
the robot was controlled in different directions using various joint angle combinations. The
concept of forward and inverse kinematics was used to determine the end-effector position for
fixed joint angles, and the joint angles for a fixed end-effector. Through research and
implementation of kinematics concept in the project, it became clear that inverse kinematics is
widely used in practical applications. The result of the forward kinematics was also discussed for
each joint angle combination emphasizing the difference in the configuration of the position
vector. The results confirmed that the forward kinematics is the inverse function of the inverse
kinematics.
35
References
http://petercorke.com/wordpress/
[2] Serdar Kucuk and Zafer Bingul Forward and Inverse Kinematics December 2006.
http://www.wikipedia.com.
http://nptel.ac.in/courses/112101098/31.
http://www.springer.com/cda/content/document/cda_downloaddocument/9789400705784-
c2.pdf?SGWID=0-0-45-1338704-p174080776
[6] Harvey Lipkin a note on D-H notation on robotics ASME 2005, February 2017
[7] Kinematic and dynamic analysis of a robotic positioning arm, February 2017
http://brl.ee.washington.edu/eprints/110/1/Th033.pdf
[8] Craig, J. J. (1989). Introduction to Robotics Mechanics and Control, USA: Addision
https://www.cs.duke.edu/brd/Teaching/Bio/asmb/current/Papers/chap3-forward-
kinematics.pdf.
[10] Jianxin XU, Wei Wang & Yuanguang SUN two optimization algorithms for solving
Heidelberg 2010.
http://me.umn.edu/courses/me5286/manipulator/LectureNotes/2017/ME5286CourseNotes3-
2017.pdf
[12] W. W. Melek. "ME 547: Robot Manipulators: Kinematics, Dynamics, and Control".
[13] L-W. Tsai. "Robot Analysis: The Mechanics of Serial and Parallel Manipulators".
[14] Zhang, Dan Lei, Jianhe Kinematic analysis of a novel 3-DOF actuation redundant
[15] B Purmus, H. Temurtas & A. Gan An inverse kinematics solution using practical
[16] Mustafa Jabbar Hayawi analytical inverse kinematics algorithm Of A 5-DOF robot
[18] Er. Harpreet Singh, Dr. Naveen Dhillon and Er. Imran Ansari, Forward and inverse
Kinematics solution for six DOF. IJAIEM, ISSN 2319-4847, March 2013.