Inverse Kinematics Analysis of a Five-Degree of Freedom Educated Type of Alpha Robot Using Genetic Algorithm
Total Page:16
File Type:pdf, Size:1020Kb
35 Inverse Kinematics Analysis Of a Five-Degree Of Freedom Educated Type Of Alpha Robot Using Genetic Algorithm Israa Rafie Shareef Mechatronics Engineering Dept. Al Khawarzmi College of Engineering University of Baghdad \Iraq Abstract Inverse Kinematic is considered as one of the complicated issues in robots domain according to the nonlinearity , multiple solutions , the need for complete knowledge about robotic environment besides to other factors. Whereas a great development has appeared in using the artificial intelligence methods to replace the classical analyzing methods. In this paper , an approach for using the Genetic Algorithm is suggested to deal with the Inverse Kinematics problem of a five degree of freedom robot . Firstly the forward and inverse kinematics of the robot is introduced , then the inverse kinematic equations are solved by the Genetic Algorithm with the aid of MATLAB programming , the results were compared using three ways , firstly by the classic analytical equations , secondly by the robot simulation program ROBCIM , and lastly by the MATLAB Genetic Algorithm Toolbox . Genetic Algorithm had accomplished good results , and got rid of many limitations which may face other analytical methods . Key-Words : Robotic Manipulator , Inverse Kinematics (I. K.) , Genetic Algorithm (G. A) . 1-Introduction It contains chain of links , with an According to the definition end –effector or gripper carrying the presented by the International needed tool (like welding gun or Standard Organization (ISO) , the drill) , these links are attached by robotic manipulator (named as joints (either prismatic or revolute) industrial robot or as robotic arm) is .while , saying 5-axes means having an automated, programmed ,multi- five independently moving degrees purposes machine which deals with of freedom (DOF) [ 16.] several domains to handle work The robotic kinematic structure deals parts. with the calculation of the end effector position (without outer إسراء رافع شريف مجلة اتحاد الجامعات العربية للدراسات والبحوث الهندسية العدد 1 مجلد 23 عام 2016 36 effected force) , and to make the I.K. may has multiple solutions due robotic manipulator adopt the to the non linearity in equations and wanted configuration [ 22 ]. the robot configuration's dependence The manipulator has non-linearity [ 23 ]. kinematic equations to be solved [1]. I.K. is considered difficult because The robot kinematic analysis is of : many unknowns equations handled in two ways ; forward or variables , multiple solutions , some direct (F. K.) , and inverse kinematic solution are undefined [12 ]. (I. K.) , where the second one is the Many methods were used to solve most important because it gives the the I.K. problems like jacobian robotic joints' values to reach any inversion , optimization , numerical spatial point . Thus , the I.K. is the and lastly the Artificial Intelligence important factor in following paths , methods used like Neural Networks , and controlling robotic motion [ 9 ]. Fuzzy , and Genetic Algorithms In (F. K.),we have the position of the [14]. end-effector (x,y,z) and its In this paper , we will analyze the orientation (θx , θy ,θz ) = f(q) I.K. of a 5-DOF robotic manipulator, Function of (q) the joints' variables using one of the most important either revolute or prismatic. Artificial Intelligence methods , While in I.K. , the opposite case is which is the Genetic Algorithm. occurred where , q=f −1(x,y,z) and Reaching to this goal , we will start (θx , θy ,θz ). by defining the used robot , knowing For its importance ,I.K. had been its physical characteristics , D-H studied for years , for its roll in (Denavit – Hartenberg) manipulator's controlling , as the representation , transformation robot actuators deal with joint space matrix and analyzing the F.K. of this , while the end-effector deals with robot , besides to finding the I.K. cartesian space , thus , the I.K. is the equations using the classical way to transform from the cartesian approach . to the joints space [11] . Estimating the I.K. equations of this Good development had been robot using the G.A. approach will achieved in I.K. for the recent years be simulated using the MATLAB and many approaches were Genetic Algorithm Toolbox [ 5 ]. presented [ 14 ]. إسراء رافع شريف مجلة اتحاد الجامعات العربية للدراسات والبحوث الهندسية العدد 1 مجلد 23 عام 2016 37 The robot which will be discussed simulated online and offline by for its I.K. , is a scale model for the computer . famous robot (ALPHA) robot as mentioned in [ 20 ] , that's because of the high cost of the original robot This robot has Base , Shoulder , [8] , we substitute by this model of Elbow , Tool-roll and Tool pitch laboratory robot for the sake of reach joints' motions providing the five approximately to its physical degrees of freedom , besides to a information and limitations , Figure1 grip movement by its two fingers below show the microbot ALPHA in gripper[ 24 ]. its laboratory type . 3 Figure1-b clarifies the link coordinates and D-H parameters of the robot . The most important step in analyzing any robot kinematics , is to find the transformation matrix which relates between the base and the end- effector joints , in order to reach this matrix , we have to establish the Denavit-Hartenberg parameters Figure (1-a) the ALPHA robot which were defined in detail in [20&6 ] , as follows in Table1: Table1 the robot parameters Joint θ d a α in in in degree Figure (1-b) Link coordinates of the millimeter millimeter ALPHA robot Base q 1 255 0 - 90 It's a 5-DOF robotic manipulator , Shoulder q 2 0 190 0 articulated arm , delivered with a Elbow q 3 0 190 0 specific software that allows it to be إسراء رافع شريف مجلة اتحاد الجامعات العربية للدراسات والبحوث الهندسية العدد 1 مجلد 23 عام 2016 38 Too q 4 0 0 - 90 Applying these parameters in the standard transformation matrix from roll base to tool , we'll get : Tool q 5 115 0 0 pitch 풕풐풐풍 −푪표푠 푞234 푻풃풂풔풆 = 0 Column 4= 푪표푠 푞1 (190 퐶표푠 푞2 + where , Column1= 190 퐶표푠 푞23 − 115 푆푖푛 푞234) 푪표푠 푞1 퐶표푠 푞234 퐶표푠 푞5 + 푆푖푛 푞1 푆푖푛 푞5 푺푖푛 푞1 (190 퐶표푠 푞2 + 190 퐶표푠 푞23 ) 푺푖푛 푞1 퐶표푠 푞234 퐶표푠 푞5 − 퐶표푠 푞1 푆푖푛 푞5 − 115 푆푖푛 푞234 ퟐ55 − 190 푆푖푛 푞2 − 190 푆푖푛 푞23 −푺푖푛 푞234 퐶표푠 푞5 − 115 퐶표푠 푞234 0 1 Column2= −푪표푠 푞1 퐶표푠 푞234 푆푖푛 푞5 + 푆푖푛 푞1 퐶표푠 푞5 −푺푖푛 푞1 퐶표푠 푞234 푆푖푛 푞5 − 퐶표푠 푞1 퐶표푠 푞5 Thus the robot –tool-configuration will be : 푺푖푛 푞234 푆푖푛 푞5 푪표푠 푞1 (190 퐶표푠 푞2 + 190 퐶표푠 푞23 − 0 115 푆푖푛 푞234) .. 1 Column 3= −푪표푠 푞1 푆푖푛 푞234 푺푖푛 푞1 (190 퐶표푠 푞2 + 190 퐶표푠 푞23 − −푺푖푛 푞1 푆푖푛 푞234 115 푆푖푛 푞234) .. 2 إسراء رافع شريف مجلة اتحاد الجامعات العربية للدراسات والبحوث الهندسية العدد 1 مجلد 23 عام 2016 39 ퟐ55 − 190 푆푖푛 푞2 − 190 푆푖푛 푞23 − = 푎22(푐표푠 푞22 + 푠푖푛 푞22) 115 퐶표푠 푞234 .. 3 +푎32(cos 푞232 + sin 푞232)+ 2 a2 a3 (cos q2 cos q23 + sin q2 sin q23) − 퐞xp(푞5) 퐶표푠 푞1 푆푖푛 푞234 … 4 =푎22 + 푎32+2 a2 a3 cos q3 − 퐞xp(푞5) 푆푖푛 푞1 푆푖푛 푞234 … 5 ; 푏2−푎22−푎32 − 퐞xp(푞5) 퐶표푠 푞234 … 6 q 3 = ± arcos 2 푎2 푎3 Now , the Inverse kinematics of this 4 b1 = a2 cos q2 + a3 ( cos q2 cos q3 – robot is : sin q2 sin q3) b2 = a2 sin q2 + a3 ( sin q2 cos q3 + q 1(the base joint) =atan (w2 , w1) cos q2 sin q3) b 1=cos q1 w1+sin q1 w2-a4 cos q234 b1 = (a2 + a3 cos q3 ) cos q2 – ( a3 sin +d5 sin q234 q3) sin q2 b2 = d1 – a4 sin q234 – d5 cos q234 – b2 = ( a2 + a3 cos q3) sin q2 + ( a3 sin w3 q3) cos q2 taking the expressions of w from tool solving the two simultaneous linear configuration and substitute in b1 , and equations : b2 ; (푎2+푎3 cos 푞3)푏1+(푎3 sin 푞3)푏2 cos q2 = 푏2 b1 = a2 cos q2 + a3 cos q23 q 2 =± arcos 풃ퟏퟐ=푎22 cos 푞22 +2 a2 a3 cos q2 cos (푎2+푎3 cos 푞3)푏1+(푎3 sin 푞3)푏2 q23 +푎32 cos 푞232 푏2 5 or using sin q2 b2=a2 sin q2 + a3 sin q23 (푎2+푎3 cos 푞3)푏2−(푎3 sin 푞3)푏1 = 2 풃ퟐퟐ= 푏 q 2 = atan [(a2 +a3 cos q3) b2 – (q3 sin 푎22 sin 푞22 +2 a2 a3 sin q2 sin q23 q3) b1 , ( a2 + a3 cos q3 ) b1 + (a3 sin +푎32 sin 푞232 q3) b2] 2 2 2 푏 =푏1 + 푏2 q 234 =atan (-(- cos q1 w4 + cos 1 w5 ) , – w6) إسراء رافع شريف مجلة اتحاد الجامعات العربية للدراسات والبحوث الهندسية العدد 1 مجلد 23 عام 2016 40 q 4 = q234 – q2 – q3 In GA , processes of "initialization , fitness , selection , cross-over , and q 5 = π ln mutation " would be noticed. The first ((푤4)2+(푤5)2+(푤6)2)^(1/2) generation's parents or individuals will be prepared , then those with best Genetic Algorithm (GA) fitness's function will be combined to deliver new generation of children or GA is a special category of individuals having better fitness values evolutionary algorithms [19] , it is an than their parents . This process will optimization method which mimic the continue till the convergence of the behavior of biological evolution [7], population around some individual's its first appearance was in nineties [15]. values with the best fitness value ever In this paper , a GA is proposed to deal [18]. with the solving of robot's I.K. The next steps will discuss the main equations because of reasons , some of procedures of the G.A. with its them : application for our robot ; 1. GA as an A.I.(Artificial Intelligence) Initialization and encoding 2.