TIMEOPTIMAL PATH PLANNING MODEL USING GENETIC ALGORITHM IN RRR ROBOT
Abstract
The mathematical expression of the kinematic equations of each joint is utilized for the path planning using a quantic polynomial in joint space. In this study, a time optimization model for path planning using genetic algorithms with a variety of crossover fraction and mutation rates is investigated. The optimization process is performed with MATLAB. Optimization using boundary conditions is performed with MATLAB. The result of the simulation, smooth speed graphs, angular position graphs, and the time when joint movements will complete the orbit as soon as possible are obtained. As a result of this study, a path planning model that can be applied to any robot is developed in joint space based on time optimization and can be used to shorten the task time, especially in taskbased robots.
Keywords
Path Planning, Genetic Algorithm, Time Optimization
INTRODUCTION
Trajectory planning is an important research topic in robot applications, and many research papers are published on this subject (Duque, Prieto, & Hoyos, 2017), (Markus, Agee, & Jimoh, 2013), (Ragaglia, Zanchettin, & Rocco, 2018). Robot trajectory planning means that the endeffector passing through specific points reaches the target point from the starting point. Each joint angle varies depending on the time in trajectory planning. The primary purpose of trajectory planning is to automatically create a collisionfree trajectory for the robot by making a motion plan in an environment with obstacles. Trajectory planning can be done in Cartesian space or in Joint space. Trajectory planning in joint space is more straightforward than in Cartesian space. To make trajectory planning in joint space, the points given in Cartesian space must be found in the joint space using inverse kinematics. Robot trajectory planning research analyzes the velocity and acceleration of each joint. The mechanical properties of the robots determine the limits of the velocity and acceleration of the joints. For this reason, research is done on improving trajectory planning (Haiek, Aboulissane, Bakkali, & Bahaoui, 2019), (Jin, Kang, Zhang, & Yang, 2016), (Tan & Hu, 2002), (Zhang, Meng, Feng, & Shen, 2018).
The purpose of the methods generally used in trajectory planning is to avoid complex geometric processes (AbuDakka, Rubio, Valero, & Mata, 2013), (Machmudah, Parman, Zainuddin, & Chacko, 2013), (Mineo, Pierce, Nicholson, & Cooper, 2016), to reduce the processing time, to make the shortest trajectory planning (Cao, Jiang, & Yue, 2017), (Chen, Fang, Sun, & Qian, 2015), (Gasparetto & Zanotto, 2010), (Gu, Cai, Hu, Zhang, & Chen, 2019), (Kim & Kim, 2011), (Ko, Ryuh, Kim, Suprem, & Mahalik, 2015), (Xu, Xie, Zhuang, & Wang, 2010), and to optimize using different algorithms (Garrido, Yu, & Li, 2016), (LaraMolina, Koroishi, & Dumur, 2015), (Švejda & Čechura, 0411). The most researched subject among these topics is to improve trajectory planning parameters using optimization techniques. The studies conducted in trajectory planning are mostly done in joint space because it is intuitive and straightforward. In addition, trajectory planning is carried out using polynomial interpolation algorithms in the joint space because these algorithms are not problematic for computing (Cao et al., 2017). The movements of the robot must be smooth and continuous without vibration. For this reason, the Bspline curve is generally used in interpolation methods, and optimum processing time and angular displacement, velocity, and acceleration graphs for each joint are found in trajectory planning studies (Gasparetto et al., 2010).
In this study, a trajectory planning model is created for the RRR robot arm based on time optimization. Since the first three joints affect Cartesian space's position, the robot arm in the RRR structure was preferred. Trajectory planning is done with quintic interpolation in the joint space, and time optimization is performed for each joint using a genetic algorithm. Attention has been paid to make the movements of the joints smooth and continuous.
MATERIALS AND METHODS
Today, robots with six degrees of freedom (DOF) illustrated in Figure 1 are used in the industry because of their speed and flexibility. Mathematical models of robot arms contain highly nonlinear equations. The most common method for controlling robots is by looking at the lookup tables (Deshpande & George, 2014). The robot arms consist of interconnected links. Connections consist of revolute or prismatic joints. The relationship between the joints is defined by 4x4 transformation matrices. By multiplying these matrices, the matrix containing the final orientation and position obtained, and this process is called forward kinematics (Craig, 2004). Forward kinematic equations are simple and do not have complex equations (Schilling, 1990). It is passed from Cartesian space to joint space with the forward kinematic, while the inverse kinematic provides the transition from the joint space to the Cartesian space. The solution for going from point A to point B in Cartesian space is found with inverse kinematics. There are two methods for solving inverse kinematics which is the numerical solution and the closedform. The closedform is more preferred because it runs faster (Küçük, Kocaeli, & Bingül, 2004). There is only one general method to solve robot kinematics which is DenativHartenberg (DH) (Huang, Wang, Liu, & Cui, 2012), (Li, Cao, Guo, & Huang, 2015), (Redondo & LeSar, 2004).
The last three joints that make up the wrist structure are identical, but the first three joints that affect the position are different in industrial robots. The first three joints' joint properties are essential to classify the robots according to DOF (Bingül & Küçük, 2009). The first three joints determine the robot's position in Cartesian space, while the last three joints (Euler's wrist) define the robot's orientation, and the Euler's wrist is illustrated in Figure 2 .
The DH table of the Euler's wrist is given in Table 1 , and the DH parameters are the same for industrial robots.
i 
α_{i1} 
a_{ i1} 
d_{ i} 
θ_{ i} 
1 
0 
0 
0 
θ_{ 4} 
2 
90 
0 
0 
θ_{ 5} 
3 
90 
0 
0 
θ_{ 6} 
In this study, three rotary joints are used in the robot configuration. This configuration is the basis of most industrial robots because they have a vast working space, and they are very flexible and fast. But their kinematic equations have very complicated. The robot configuration and the coordinate frames which are shown in Figure 3 has the threerotary joint.
DH method uses four main variables, which are the bond length between two axes ( ${a}_{i1}$ ), the bond angle between axes (i1) and i ( ${\alpha}_{i1}$ ), the joint misalignment between overlapping bonds ( ${d}_{i}$ ), and the joint angle between two bonds ( ${\theta}_{i}$ ). The DH variables for our design are shown in Table 2 .
Number of axes 
DH variables 
Joint variables 

i 
${\alpha}_{i1}$ 
${a}_{i1}$ 
${d}_{i}$ 
${\theta}_{i}$ 
${d}_{i}\text{or}{\theta}_{i}$ 
1 
0 
0 
D_{1} 
${\theta}_{1}$ 
${\theta}_{1}$ 
2 
90 
0 
L_{1} 
${\theta}_{2}$ 
${\theta}_{2}$ 
3 
0 
L_{2} 
0 
${\theta}_{3}$ 
${\theta}_{3}$ 
4 
0 
L_{3} 
0 
0 
0 
The transformation matrix of a joint is obtained by using Equation 1 .
The transformation matrices for each joint are given by:
The forward kinematic matrix is obtained by multiplying the transformation matrices.
The analytical solution approach is used for inverse kinematic solution. In this solution, r_{ij} is the rotation, and px, py, pz is the position specifying elements.
The forward kinematic matrix is written in Equation 6 as symbolically. Both sides of the equation are multiplied by ${\left({}_{1}{}^{0}T\right]}^{1}$ .
When Equation 7 is solved, the joint variables are found.
TRAJECTORY PLANNING
The trajectory planning is performed with three or higherorder polynomials in joint space. The inverse kinematic solution gives the initial and target positions of the end effector. A quantic (5degree) polynomial is needed to obtain smoothing the path curve, shown in Equation 11 (Tan et al., 2002).
At the start and endpoint, the velocity, acceleration, and displacement limits are given by:
The velocity polynomial is obtained from the derivation of Equation 11. It is possible to find the acceleration equation by taking the derivation of the velocity polynomial. The coefficients of the angular position equation can be determined by:
SIMULATION USING GENETIC ALGORITHMS
The technical characteristics of the electric motors used in the joints directly affect the path planning. Genetic algorithms are used for optimal path planning using the limits of electric motors.
Each robot arm reaches its target point by passing through n points. Therefore, the motion of each joint should be examined separately. If one of the joints completes its motion in ti time, the total motion time is expressed in Equation 16.
The evolutionary Genetic Algorithm (G.A.) has been used to optimize the motion time. The objective function used in experimental studies to complete a certain movement as soon as possible is given in Equation 17.
hows the constraint conditions of the objective function. The constraint conditions determine the technical characteristics of the servo motors used in the joints.
Joint 
$\text{Velocity}{\theta}^{\text{'}}\left(t\right)$ 
$\text{Acceleration}{\theta}^{\u2033}\left(t\right)$ 
1 
$300\le {\theta}^{\u2033}\left(t\right)\le 600$ 
$50\le {\theta}^{\u2033}\left(t\right)\le 200$ 
2 
$300\le {\theta}^{\u2033}\left(t\right)\le 600$ 
$50\le {\theta}^{\u2033}\left(t\right)\le 200$ 
3 
$400\le {\theta}^{\u2033}\left(t\right)\le 750$ 
$40\le {\theta}^{\u2033}\left(t\right)\le 300$ 
In the optimization, selection mechanisms have determined scholastic uniformly. The population size is chosen as 200. Optimization was performed at different mutation rates and crossover fractions to achieve the best objective function. The crossover fraction is selected as 0.2, 0.5, and 0.8. Mutation rates are chosen as 0.01 and 0.02.P_{0} (X_{0} = 155.28, Y_{0} = 0, Z_{0} = 164.14) to P_{1} (X_{1} = 135.65, Y_{1} = 23.92, Z_{1} = 99.12)[HD1] In the simulation, the robot arm was moved from
Crossover Fraction 
Mutation Rate of the First Joint 
Mutation Rate of the Second Joint 
Mutation Rate of the Third Joint 

0.01 
0.02 
0.01 
0.02 
0.01 
0.02 

0.2 
4.24358 sec 
4.24654 sec 
5.21699 sec 
5.20255 sec 
4.90852 sec 
4.92415 sec 
0.5 
4.2516 sec 
4.28907 sec 
5.27448 sec 
5.19656 sec 
4.94927 sec 
4.94372 sec 
0.8 
4.24369 sec 
4.28733 sec 
5.20639 sec 
5.19776 sec 
4.91203 sec 
4.94527 sec 
Considering that the joints move sequentially, the robot completes the arm movement in 14.346 seconds. This period is sufficient for the robot to perform its movement smoothly as it is calculated as the shortest time in tests.
CONCLUSIONS
In this study, the path planning for a specific movement in the joint space of a robot with RRR joint structure is considered. Since the first three joints in 6 joint industrial robots determine the position in Cartesian space, the robot structure in this study consists of three joints. The quintic path polynomial is created for the specified motion. Time optimization is realized with G.A. The constraint conditions used in optimization were velocity and acceleration, and the movements are provided to be smooth. The best objective function is found by diversifying the optimization parameters. In reference (Zhang et al., 2018), the path planning method in joint space is defined using genetic algorithms for PUMA 560 robot model. Optimization studies were made for a robot model. In this study, a time optimization model is developed using G.A. for industrial robot arms. The shortest working time of each joint is found for the specified movement. The time optimization model developed can reduce task time for robot structures designed to work fast, such as delta robots. The algorithm developed can be used to increase product output by shortening the task times of taskbased robots.