[IEEE 2010 Student Conference on Research and Development (SCOReD) - Kuala Lumpur, Malaysia...

4
Proceedings of 2010 IEEE Student Conrence on Research and Development (SCOReD 2010), 13 - 14 Dec 2010, Putrajaya, Malaysia Path Optimization Using Genetic Algorithm Evolution Low, C. y'l Chong, K. H. 2 Salleh, K. 3 Johnny, K.S.P.4 1 , 2 , 4 Department of Electronic & Communication 3 Department of Mechanical Engineering College of Engineering, Universiti Tenaga Nasional (UNITEN) Jalan IKRAM-UNITEN, 43009 Kajang Selangor Dl Ehsan, Malaysia e-mail: { l lcyee 2 chongkh 3 khairuls. 4 johnnykoh}@uniten.edu.my, Abstract-Gantry robots are widely used in the industries for various material handling applications. The robot capable of moving in the Cartesian makes it very flexible and efficient at big or small areas. Path optimization to the robot would make it more efficient and easier automation. In this paper, genetic algorithm (GA) has been proposed to optimize the traveling sequence making the movement more efficient and economic as the total travel length is shortened. Kwords-path optimization; g enetic al g otithm; GA; g ant robots; caesian robots I. INTRODUCTION Gantry robot offers flexible and efficient solution for a wide range of material handling applications. Such applications include: picking and placing, machine loading and unloading, stacking, unitizing, and palletizing. Gantry robots' capability is not limited to material handling tasks only. In the demanding environment of factory automation, the robotic systems have been on continuous development process to improve nctionality and adaptability. Today many gantry robot systems become more complex and more expensive. Unlike the popular image of a robot, the gantry robot is a stationary robot built with three elements of motion. Each motion refers to a linear motion in a single direction, arranged to be peendicular to each other and is typically labeled X, Y, and Z. X and Y are location in the horizontal plane and Z is vertical. The X and Y are the width and length of a base, and Z is the height. The space where the robot is reachable is called the working envelope of the gantry robot. Moving the robots om points to points has limitation as it does not optimize the path sequence [1]. Hence, the proposed soſtware would implement genetic algorithm (GA) to the X- and Y- axes to optimize the robot travelling path. Over the years, Darwin's theory of evolution inspired the development of genetic algorithm [1]. Genetic algorithms were formally introduced in the United States in the 1970s by John Holland at University of Michigan [4]. The continuing price/performance improvements of computational systems have made them attractive for some types of optimization. Genetic algorithms work very well on mixed (continuous and discrete), combinatorial problems. They are less likely to get to local optima. II. PROBLEM FORMULATION The problem formulation was given to optimize the travelling path in the X- and Y-Axes with the shortest route. The robot will start om a point and then going through all the other designated points until all the points had been gone through. This travelling path for the robot would be similar to Travelling Salesman Problem (TSP), where the robot would move om one point to another without repeating. The total scan distance is given by equation (1). In this research, GA is applied to determine the shortest route of traveling, thus optimizing the robot movement and processing time required for better efficiency. III. PROPOSED ALGORITHM GA is a robust optimization technique belongs to the class of stochastic search methods as simulated annealing, threshold acceptance, and some branch and bound[2]. Most stochastic search methods operate on a single solution to the problem at hand, while GA operates on a population of solutions. n-l dscan = (xo - xitart)2 + (Yo - yltart)2 + J(Xd - xo)2 + (Y:nd - YO)2 + L (X�d - x:t�t)2 + (Y�d - Ys��;t)2 (1) k=l dscan n k Where, total traveling route last point the sequence of the points (xo , Yo) = the initial position of the robot 978-1-4244-8648-9/101$26.00 ©2010 IEEE 252

Transcript of [IEEE 2010 Student Conference on Research and Development (SCOReD) - Kuala Lumpur, Malaysia...

Proceedings of 2010 IEEE Student Conference on Research and Development (SCOReD 2010), 13 - 14 Dec 2010, Putrajaya, Malaysia

Path Optimization Using Genetic Algorithm Evolution Low, C. y'l Chong, K. H. 2 Salleh, K. 3 Johnny, K.S.P.4

1,2,4 Department of Electronic & Communication 3 Department of Mechanical Engineering

College of Engineering, Universiti Tenaga Nasional (UNITEN) Jalan IKRAM-UNITEN, 43009 Kajang

Selangor Darnl Ehsan, Malaysia e-mail: {llcyee2chongkh3khairuls.4johnnykoh}@uniten.edu.my ,

Abstract-Gantry robots are widely used in the industries for

various material handling applications. The robot capable of

moving in the Cartesian makes it very flexible and efficient at big

or small areas. Path optimization to the robot would make it more efficient and easier automation. In this paper, genetic

algorithm (GA) has been proposed to optimize the traveling

sequence making the movement more efficient and economic as

the total travel length is shortened.

Keywords-path optimization; genetic algotithm; GA; gantry robots; cartesian robots

I. INTRODUCTION

Gantry robot offers flexible and efficient solution for a wide range of material handling applications. Such applications include: picking and placing, machine loading and unloading, stacking, unitizing, and palletizing. Gantry robots' capability is not limited to material handling tasks only. In the demanding environment of factory automation, the robotic systems have been on continuous development process to improve functionality and adaptability. Today many gantry robot systems become more complex and more expensive.

Unlike the popular image of a robot, the gantry robot is a stationary robot built with three elements of motion. Each motion refers to a linear motion in a single direction, arranged to be perpendicular to each other and is typically labeled X, Y, and Z. X and Y are location in the horizontal plane and Z is vertical. The X and Y are the width and length of a base, and Z is the height. The space where the robot arm is reachable is called the working envelope of the gantry robot. Moving the robots from points to points has limitation as it does not optimize the path sequence [1]. Hence, the proposed software would implement genetic algorithm (GA) to the X- and Y­axes to optimize the robot travelling path.

Over the years, Darwin's theory of evolution inspired the development of genetic algorithm [1]. Genetic algorithms were formally introduced in the United States in the 1970s by John Holland at University of Michigan [4]. The continuing price/performance improvements of computational systems have made them attractive for some types of optimization. Genetic algorithms work very well on mixed (continuous and discrete), combinatorial problems. They are less likely to get to local optima.

II. PROBLEM FORMULATION

The problem formulation was given to optimize the travelling path in the X- and Y-Axes with the shortest route. The robot will start from a point and then going through all the other designated points until all the points had been gone through. This travelling path for the robot would be similar to Travelling Salesman Problem (TSP), where the robot would move from one point to another without repeating. The total scan distance is given by equation (1).

In this research, GA is applied to determine the shortest route of traveling, thus optimizing the robot movement and processing time required for better efficiency.

III. PROPOSED ALGORITHM

GA is a robust optimization technique belongs to the class of stochastic search methods as simulated annealing, threshold acceptance, and some branch and bound[2]. Most stochastic search methods operate on a single solution to the problem at hand, while GA operates on a population of solutions.

n-l dscan = (xo - xitart)2 + (Yo - yltart)2 + J(X:nd - xo)2 + (Y:nd - YO)2 + L (X�d - x:t�i-t)2 + (Y�d - Ys��;t)2 (1) k=l

dscan n k

Where, total traveling route last point the sequence of the points

(xo, Yo) = the initial position of the robot arm

978-1-4244-8648-9/101$26.00 ©201 0 IEEE 252

The solution of the problem which made up of parameters to be optimized is called a chromosome. GA creates a population of genomes then applies evolution technique such as inheritance, mutation, selection, and crossover [3]. Various selection criteria can be used to pick the best individuals for mating. The genetic algorithm can be very simple, yet it is capable of performing well on many different types of problems. The algorithm can be modified, and its many parameters that can be tweaked to suit its purpose.

This paper proposed of a solution to the shortest travelling route of the robot arm using GA. The goal is to find the shortest route and going through all points. Testing every possibility for n numbers of points would be nl math additions. A problem with 25 points would make up a total of 1.5511 X 1025 different travelling paths. GA can be used to find a solution in much lesser time. Sometimes, the solution may not be the shortest path, but it can find a near to perfect solution for a 100 points traveling route within minutes [5].

y�

No

Figure I. GA Flow Chart.

A. Initialization

There are a few steps to take for solving the genetic algorithm optimization problem. The GA operation is shown in Figure 1. First, create a group of many random travelling paths in what is called a population. The population size is

253

dependent on problem, but mostly it can contain up to several hundreds or thousands of possible solutions. In most cases, the population is generated by random, covering all possible solutions [3]. Occasionally, the solutions may be reproduced in areas where optimal solutions are likely to be found [2]. This algorithm uses a greedy initial population that gives preference to linking points that are close to each other [5].

B. Selection

A new generation is created by selection of a proportion of the existing population to mate and produce new generation again. Individual solutions will go through a selection process to measure the individual's fitness (measure by a fitness function) where fitter solutions are more likely to be selected [3]. Some selection methods will select the best solution by rating the fitness of each solution [2]. Other methods rate only a certain population size as the checking is very time consuming. Most functions are stochastic and designed so that a small proportion of less fit solutions are selected [3]. This helps keep the population diversity large and preventing premature convergence of poor solutions. For this case, the fitness function will be the total length of the route. The better (shorter) routes would be picked for reproduction while the worse (longer) routes individuals will be discarded to maintain the numbers of population.

C. Crossover

Next, a second generation population of solutions from those selected through genetic operators will be generated through crossover and mutation. 2 of the best (shortest) routes will be chosen as the parents to recombine to create two children by crossover process. Hopefully, these children produce better solutions than either parent. The two best chromosomes which produce the shortest routes will be chosen to become the next generation parents and the two worst chromosomes with the longest routes would be discarded. The size of the population would remain the same. These processes would result the next generation population of chromosomes to be different from the initial generation.

Crossover is performed by randomly picking a point in the parent's sequences and every number in the sequence after that point will be switched. In this example, the crossover point is between the 3rd and 4th item in the list. The children are created by swapping every item in the parent's sequence after the crossover point as in Figure 2.

PARENTI 0000 000 PARENT> 0000000

CHILD I 0000000 CHILD' 0000 000

Figure 2. Crossover process showing the parents and children.

D. Checking

After the crossover process, the checking operation would check the validity of the chromosome [5]. Note that each point can only be visited once. As example, the checking operator identify CHILDl having two invalid genes. The location of the repeating genes would be relocated.

CHILD I 00010000 Figure 3. Invalid crossover as the genes B and 0 are repeated.

Noted in Figure 3, genes 0 and B are repeated in the chromosome. If each of the alphabets representing a points, then point B and 0 would be travelled twice and never goes to A and E. Checking will make sure that this would never happens by not accepting invalid chromosomes. The missing genes would be replaced after the checking operation according to the repeated location.

� Forml Simtd"tiDD G il

Since only the best organisms are selected for breeding from the first generation, along with a little of less fit solutions, the result of reproduction will generally be better by generation. New children are repeatedly created until the desired goal is reached and no better results achievable after 10000 generations.

E. Mutation

Sometimes the child will go through mutation. This is to prevent all tours in the popUlation from looking identical and to prevent the solution from being trapped in local optima. Mutation also introduce randomness by helping to find solution that crossover alone might not encounter. However, genes mutation by simply hanging it to a different point would cause invalid situation, as the repeated gene may be generated in this case. In order to overcome this limitation, two point mutation was implemented, where by the two randomly selected genes would swap with each other as shown in Figure 4. Thus, new generated offspring would always be valid.

Figure 4. two points mutation (swap).

Oplim"atiuu ufPuwl.s TI'a"dil/1: SWII.latiuu witb �uallc Ail:uriw_1U (G.4...) rpOiDl Input

lG.S

.....

0.'

X I L y I nun

mm

rota! V"ints: � r GA Parameter

I PopularioD 'o 110)

L (;eDEratioD p 0)00

10 2(1 ),0 .0 50 60 7.0 1.0 '.0 !(lC 110 12,) 13.0 leo l!.O 160

rFf>m,. -0 of ItcratioD

Tra"ellia2 Dish..DCO

::>tartGA

Figure 5. Simulation result with 12 points path optimization.

254

.Keset

IV. RESULT ANO DISCUSSION

The simulation was conducted using Visual Basic 6 on different population size using a certain GA parameters. The population size is randomly generated. GA selection type is greedy initial selection, crossover type is 2-point random crossover, crossover rate is 80% of the population, mutation rate is 5% of the population and stop criteria is if no improvement after 10000 generations. The system has been tested with different size of population. Figure 5 shows the simulation result of the optimized travelling path for 12 points with a population size of 100.

Table I' Result showing the population size and the number of Iterations needed to get the shortest path Number of Populations Number of Iterations

500 3310 400 2264 300 2243 200 1862 100 1139 90 670 80 327 70 385

60 393 50 516 30 374 20 284 10 1364

From Table 1, it is observed that when the population number is large, the convergence process would be fast. But this would increase the computational time. Thus, the best suited population size is ranging from 50 to 100.

255

V. CONCLUSION

In this work, the path optimization of the XY gantry robot has been solved using the developed software which employed GA evolution. The best suited fitness function and the GUI simulation were developed to adjust the genetic parameters in order to obtain the best solution for optimization. Hence, the motor turn on and the robot travelling time would be shortened.

REFERENCES

[1] Chen, C.P.; Koh, S.P. ; Aris, 1.8.; Albert, F.Y.C.; Tiong, S.K.; , "Path optimization using Genetic Algorithm in laser scanning system," Information Technology, 2008. ITSim 2008. International Symposium on , voU, no. , pp.l-5, 26-28 Aug. 2008

[2] Ouch W, Korczak J, "Optimization and global minimization methods suitable for neural networks ". KMK UMK Technical Report 1/99; submitted to Neural Computing Surveys.

[3] Genetic algorithm Wikipedia, the free encyclopedia http://en.wikipedia.org/wiki/Genetic _algorithm

[4] Introduction to Genetic Algorithms http://www.rennard.org/alife/english/gavintrgb.html

[5] Traveling Salesman Problem Using Genetic Algorithms http://www.lalena.comlAIITsp/