THE CALCULATION OF INVERSE KINEMATICS FOR 6DOF SERIAL ROBOT THE CALCULATION OF INVERSE KINEMATICS FOR 6DOF SERIAL ROBOT

Simulation programs can be divided into two main categories - programs developed by manufacturers of industrial robots (ABB, Kuka, Fanuc, etc.) and systems developed by software producers.


Introduction
The main aim of this article is off-line programming of robotic systems as well as their computer simulation.It contains the basic information about the development process of universal software for simulation of automated workplaces equipped with one or more robots.This software is developed during last few years in authors' workplace and is called RoboSim.The article is focused on one specific part of its development, concretely on calculation of kinematic model for specified type of robots.
Kinematics is the study of possible motion and configuration of a mechanism and it is related to the geometry of solved system.To understand how the system will move in given circumstance requires knowledge of speed, forces, torque, inertia, energy, etc.We need to know the position and orientation of the last linkage or the end-effector in terms of robot joint variables.This method is called forward kinematics [1].The basic idea is to find matrices corresponding to the motion of each joint.We can use rotation and transformation matrices for this task.Combining these matrices in the correct order will give us the basic transformation equations for the final linkage as a function of the joint variables [2].The position and orientation of any point rigidly attached to the gripper can be found if the joint angles are known.Inverse kinematics tells us how to do it in a backward way.The angles for each joint are calculated separately which must be set when the given position and orientation of the gripper want to be reached.This is one of the basic aims in robotics, since whenever we specify the motion of the robot's gripper we need to know the corresponding joint motion.
There are currently a number of programs used for simulation of robots and complete robotic workstations on the market.These programs are used for visualization, testing, debugging and repairing of programs for real robots.Debugging option is therefore very advantageous in pre-production stage because the standing time of robots or whole line can be reduced to a minimum.These programs also find their application in production planning and training of operators in the field of robotics.
Requirements for simulation programs are: • simple operation, • good quality results, • low initial and total costs • quality of interface (the ability to import / export existing data) • correct selection of simulation tools, • processing and evaluation of results, • visualization and animation.
Simulation programs can be divided into two main categories -programs developed by manufacturers of industrial robots (ABB, Kuka, Fanuc, etc.) and systems developed by software producers.

THE CALCULATION OF INVERSE KINEMATICS FOR 6DOF SERIAL ROBOT THE CALCULATION OF INVERSE KINEMATICS FOR 6DOF SERIAL ROBOT Juraj Uricek -Tibor Galbavy -Vladimir Bulej -Peter Durec *
This article deals with the inverse kinematic model of robot devices which was implemented into the simulation software RoboSim designed at the Department of Automation and Production Systems -Faculty of Mechanical Engineering, University of Zilina.Concretely there is shown the technique how to develop the system of equations for serial kinematic mechanism with 6 degrees of freedom (DOFs).Further this software can be used as universal platform for simulation of mechanisms with serial, parallel as well as hybrid kinematic structure.This flexibility can be considered as a main advantage of the software RoboSim.Its specific feature is that there are used two different methods for calculation of inverse kinematics: heuristic and vector method as well.The versatility, openness and access to the source code create the predisposition for its deployment under the laboratory conditions for controlling of robotic devices developed in authors' workplace within the last few years.

General inverse kinematics calculation
Any robot can be taken as a group of links connected by joints.To each link of manipulator we can connect one coordinate system.Using homogeneous transformations, the relative position and orientation between the link coordinate matrixes can be described (Fig. 2).The A-matrix is a simple homogeneous transformation describing the relative displacement (translation and rotation) between the coordinate systems of two neighboring links.The A1-matrix describes the position and orientation (variable U) of the first link, A2-matrix the second link with respect to the first one.All A-matrixes can be composed of two other matrixes, B-matrix and C-matrix.The B-matrix represents translation and rotation to another link and the C-matrix represents only setup angle U.For a robot with six degrees of freedom, we can write: A specific feature of the software RoboSim is that there are used two different methods for calculation of inverse kinematics: heuristic and vector method as well.Vector method is applicable to only one type of kinematic structure (in our case just the serial robot with six degrees of freedom and rotation constraints) but it is very fast and accurate.On the other hand, heuristic method allows us to find a solution for more degrees of freedom than the number of known parameters.This method is especially useful when the robot moved fast from point to point when there is not needed very high precision of orientation (just high precision of position).
The versatility, openness and access to the source code created the predisposition for its deployment under the laboratory conditions for controlling of robotic devices developed in authors' workplace within the last few years.Some of them are based on parallel or hybrid kinematic structure and the simulation software can be used for creating and testing of control programs for these machines as well.Designed simulation software is based on modular principle what enable to modify the software according to our application (modules can be changed).

Basic transform equations within the robot workspace
The task is to formulate the robot with transform equations.These equations arise when the manipulated object as well as the robot is described with respect to the same reference system.In Fig. 1 is shown the automated cell based on robot which is described by WRD-matrix (world) within the global reference system.The robot end link is described by UCS-matrix and T6-matrix as well, while the end-effector is described by GRPmatrix (gripper) relatively to the robot's end link.All matrixes could be defined as dynamics, but only T6-matrix is controlled by inverse kinematics.At the opposite side in Fig. 1 is shown a manipulated object described by relative transformation CONVmatrix (conveyor), OBJ-matrix (object) and PICK-matrix (place where it is possible to catch the object).
Then, for the task "grasping the object by robot" we can mathematically formulate this equation [robot gripper coordinate system must be identified to the gripping (welding, touching, picking) position of a moveable object]: Then for the robot position we can write general equation: This is the basic procedure how it is possible to find T6-matrix for selected robot.Using inverse kinematics we can find unknown joint variables of the robot arm.
These equations are too difficult to solve directly in a closed form.This is the case for most robot arms.Therefore, it is needed to develop efficient and systematic techniques that exploit the particular kinematic structure of the manipulator.Whereas the forward kinematics problem always has a unique solution that can be obtained simply by evaluating the forward equations, the inverse kinematics problem may or may not have a solution.Even if a solution exists, it may or may not be unique.Furthermore, because these forward kinematic equations are in general complicated nonlinear functions of the joint variables, the solutions may be difficult to obtain even when they exist.
Solving the inverse kinematics problem is most interesting in finding a closed form solution of the equations rather than a numerical solution.
Closed form solutions are preferable for two reasons: • In certain applications, such as tracking a welding seam whose location is provided by a vision system, the inverse kinematic equations must be solved at a rapid rate, say every 20 milliseconds, and having closed form expressions rather than an iterative search is a practical necessity.The T6-matrix represents the desired position and orientation of the end-effector.The task is to find all values for joint variables inside A-matrixes.For standard manipulator it is supposed that the desired position and orientation of the final frame are given by:

UCS -robot coordinate system, could be placed everywhere WRD -basic world coordinate system (not shown) TCP -position and orientation of end-effector relatively to UCS GRP -position and orientation of end-effector relatively to T6 WRS -wrist center (orange axis)
in that order), where the direction of Z-axis is parallel with axis of the end-effector (direction of Y-axis goes left for right angle coding system).Finally, the coding system can be X, Y, Z, Rz, Rx, Ry, which is also user-friendly for robot programing.Coding system doesn't have any influence on calculation either for the controlling of robot.Coding system is important only for user comfort and for preventing errors and mistake.

General equations for robot links
The first task for joint variables computing is finding position and orientation for the center point of wrist, then: Having closed form solutions allows one to develop rules for choosing a particular solution among several.
The practical question whether the solution of inverse kinematics problem exists or not depends on engineering as well as mathematical considerations.For example, the motion of the revolute joints may be restricted to less than full 360 degrees of rotation so that not all mathematical solutions of the kinematic equations will correspond to physically realizable configurations of the manipulator.

Kinematics decomposition
The position and orientation of a robot's end-effector are derived from the joint positions by means of a geometric model of the robot arm.For serial robots, the mapping from joint positions to end-effector pose is easy whereas the inverse mapping is more difficult [3].Therefore, most industrial robots have special designs that reduce the complexity of the inverse mapping.The most popular designs involve a spherical wrist.
Although the general problem of inverse kinematics is quite difficult, it turns out that for manipulators having six joints (with the last three joints intersecting at a point) it is possible to decouple the inverse kinematics into two separate and simpler problems (Fig. 3).They are known as inverse position kinematics, and inverse orientation kinematics.For a six-DOFs manipulator with a spherical wrist, the inverse kinematics problem may be separated into two simpler problems, namely first finding the position of the intersection of the wrist axes, called the wrist center, and then finding the orientation of the wrist (matrix WRS).

WRS R P
where P and R are the desired position and orientation of the tool frame, expressed with respect to the world coordinate system.For given P and R the inverse kinematics problem is to calculate parameters U1-U6.The important point of this assumption for the inverse kinematics is that the motion of the final three links about these axes will not change the position of WRS.The position of the wrist center is only a function of the first three joint variables (U1, U2 and U3).But orientation of the wrist center is a function of all joint variables (U1-U6).This is the reason why it is preferable to find the position of wrist as first.Next important step is defining coding system for position and orientation of end-effector.Here is the big variability.It is possible to use: a coding system based by Euler angles, rotation Roll Pitch Yaw, Cardan angles or many others [4].The best way for robot programing is to use a coding system based on rotating of robot wrist center around axis Rz, Rx, Ry (exactly It should be remembered that the calculated rotation angles are wrist angles (WRS-matrix) based on the original coordinate system (UCS-matrix).These angles will be needed later to calculate the real angles of the robot wrist U4, U5, U6.These angles are already affected by the position, not only the orientation of the wrist.

Inverse position
For the common kinematic arrangements, we can use a geometric approach to find the variables U1, U2, U3 corresponding to the right center position of wrist.The complexity of the inverse kinematics increases with the number of nonzero link parameters in general.For most manipulators, many of the parameters of B-matrix and C-matrix are zero, or the angles included inside are 0 or ± π/2, etc.In these cases especially a geometric approach is the simplest and most natural way.
For calculation of U1, U2, U3 it is easy to define this angle from the robot triangle, known links length and known center of wrist P (Fig. 4).

Fig. 4 Motion equation in a graphic form
The position of points is defined in the known matrix: Vector p is determined by the position of the wrist.Three unit vectors a, o, n describe the orientation of the gripper as follows: • a is the vector which defines the direction of closing up the wrist to the object • o vector called orientation, determines the orientation of the hand • n is the normal vector and is calculated as the vector product Then, the position of wrist center is easy to find from WRS matrix: To find orientation it is good idea to put the position vector to zero because we know that the position doesn't have influence on orientation.Then:   Now we have all unknown variable U1-U6 like a function of TCP coordinate (X, Y, Z, Rz, Rx, Ry).

Conclusion
Industrial robots have a distinct set of capabilities that allows them to perform in industrial environments while also distinguishing them from other specialized robots.Manufacturing companies are seeking ways to ramp up production in a flexible way, as European economies start to recover from the recession [5].One option is to use industrial robots, which are now more cost-effective both to purchase and to implement [6 and 7], thanks largely to programming software that is more engineerfriendly.
One of the basic tasks which need to be solved in robotics is so-called inverse kinematics.The vector method of inverse kinematics may not use Denavit-Hartenberg coordinates placement rule for links [8] but it is advantageous in terms of automated building transformation equations.This method is used most frequently for real time continuous path control due to easy programming as well as very fast calculation of results.It is, however, necessary to treat certain position programmatically links of mechanism when triangles and associated trigonometric equation, generate calculation errors.
Nowadays the investigation of system properties based on activity simulation in its virtual model belongs to the commonly used scientific methods for solving any technical problems.Simulation has substantial economic gains.Its usage can reduce pre-production stages.Thanks to that it can help us to examine several alternative solutions, find the optimal one as well as to avoid possible collisions.
The main aim of this article is original and special software RoboSim developed at authors' workplace which enables the simulation of automated manufacturing systems equipped with one or more robots.There is described more detailed one specific part of its development process -design of the mathematical model used for motion simulation of robots.Output equations are used for calculation of all joint coordinates which are necessary for motion control of robot devices.They make it possible to carry out collision detection between the robot and its environment in real time as well.Proposed software is based on a modular principle, which allows the system continuously to innovate and extend according to our requirements.The versatility, openness and access to the source code created the predisposition for its deployment under the laboratory conditions.The software development will continue in next period.

Inverse orientation
The inverse orientation problem is now one of finding the values of the final three joint variables U4, U5, U6 corresponding to a given orientation with respect to the dimensions (all B-matrixes) and set-up of frame (join U1, U2, U3).For a spherical wrist, this can be interpreted as the problem of finding a set of Rz, Rx, Ry angles corresponding to a given rotation matrix R. Recall that equation shows that the rotation matrix obtained for the spherical wrist has the same form as the rotation matrix for the Rz, Rx, Ry transformation given in the previous chapter.
For last joint angles (U4, U5 and U6) it is necessary to define differential matrix DIF like a difference between angles at the end of T5-matrix and requested set up angles Rz, Rx, Ry: DIF = WRS*T5 -1   Also matrix DIF has a known form and it is possible to use the analogously mathematical principle like for finding angles from matrix WRS, then:

Fig. 1
Fig. 1 Coordination system of working space and robots

Fig. 2
Fig. 2 Kinematic structure and coordinate system of serial links to find the corresponding joint variables U1, U2, U3, U4, U5 and U6 we must solve the following simultaneous set of nonlinear trigonometric equations: r c c c c c s s s s c s s c c c s

•
The kinematic equations in general have multiple solutions.

Fig. 3
Fig. 3 The relative position of the wrist axis and coding system of wrist