A Geetc Programmg Framework for Error Recovery Robotc Assembly Systems Cem M. Baydar cbaydar@umch.edu Kazuhro Satou kazu@umch.edu Departmet of Mechacal Egeerg ad Appled Mechacs Uversty of Mchga A Arbor, MI 48109-15, USA Abstract I ths paper, the advatages ad performace of geetc programmg use of error recovery plag robotc assembly systems s dscussed. Exstg systems use polyomal tme plag techques or heurstcs to produce error recovery plas. However, these systems requre traslato of the geerated plas to workg cotroller codes. A alteratve approach could be the use of Geetc Programmg to produce recovery plas robot laguage tself. A framework s developed ad coupled wth a 3D robotc smulato software for the geerato of error recovery logc assembly systems. The developed archtecture uses a geetc programmg system based o both determstc ad probablstc crossover ad varable mutato schemes. Performace of the system s evaluated wth the smulatos made o a three dmesoally modeled automated assembly le. The obtaed results showed that the determstc crossover operator mproves the evoluto of the plas ad the system s effcet of geeratg robust recovery plas for dfferet error states. 1 INTRODUCTION Robotc assembly s a sophstcated dustral process, composed of complex tasks. As t s dscussed oe of our prevous works (Baydar ad Satou, 000a), automated assembly les are subject to uexpected falures, whch ca result costly shutdows. The uexpectedess of these falures arses from the fact that these falures may be uforesee to huma experts before the assembly process. The recovery from these falures s doe ether maually by huma experts or by programmable logc cotroller codes based o atcpated error recovery scearos. However, geerato of recovery plas for all of the error cases s a hard task to accomplsh sce t requres well uderstadg of the task doma. Therefore, these recovery plas cover oly small porto of the possble error codtos atcpated by huma programmer. I lterature, several systems were developed to produce effcet process plas maufacturg ad assembly domas. Muõs-Avla ad Weberkrch (1996) developed a system for plag maufacturg systems usg STRIPS operators. Ther plaer uses case-based plag ad pla adaptato approaches. Aother system of factorzato model of robotc tasks s dscussed (Beberou, 1999). The model s composed of a descrptve step, whch allows the formulato of tasks usg a fuctoal decomposto approach, ad a costructve step, whch s resposble for developg a program by usg the former step. The usage of AND/OR graphs for the plag of assembly process was studed by Mello ad Saderso (Mello ad Saderso, 1990) ad ths type of graph provdes compact represetato of all feasble assembly sequeces ad provdes selecto of best assembly, dsassembly or recovery pla. However these systems are focused o process plag of the systems ad they do ot clude ways to geerate error recovery plas. I error recovery doma, kowledge-based systems are also wdely used. (Vssky et al., 1994) developed a expert system framework for fault detecto ad recovery. but ths system s based o atcpated errors sce t s ot possble to predct all error scearos. Ks ad Vãcza s system (Ks ad Vãcza, 1995) volves combato of expert systems wth geetc programmg usg STRIPS operators maufacturg doma. Aother recet plag tool s developed by (Kle et al., 1999) for the error recovery process assembly systems. The system s composed of a plaer usg a polyomal tme plag algorthm ad a traslator that traslates the plas to GRAFCET charts. However, ths system
requres post-processg to comple the recovery algorthm to a code for a programmable logc cotroller. Geetc programmg s also used the moto-plag cocept of moble robots. Specer (1994) used geetc programmg to automatcally create programs that eable a sx-legged sect to walk a smulated evromet. Hadley (1994) developed aother plaer system, whch uses a computer smulato of the world to develop plag programs. I aother study, (Nord et al., 1998) vestgated the cotrol of a mature robot by usg mache code geetc programmg. I ths study, a uque approach s preseted for geeratg recovery plas robotc assembly systems. The system uses geetc programmg to geerate effcet recovery plas the robot laguage tself. Therefore, o post-processg s requred to covert the plas to cotroller codes. Besdes, t s coupled wth a robotc smulato software, whch eables smulato of uforesee errors. Prevously developed systems requre a tal error state to develop a recovery pla ad these tal states are atcpated by huma experts. However, 3D robotc smulato provdes the geerato of these tal error states. The performace of the two crossover operators mplemeted s evaluated wth the expermetal studes. The results showed that the determstc crossover operator mproves the evoluto of the plas. It s beleved that ths uque approach wll be coupled wth the geerated uexpected error scearos the future, whch wll provde a error recovery system for automated assembly systems. DEVELOPED FRAMEWORK The problem of geeratg error recovery logc for falures occurred durg a assembly process s dscussed our prevous work (Baydar ad Satou, 000a). Selecto of geetc programmg as the plag method eables to produce recovery plas the robot laguage tself, whch elmates the fact of covertg the plas to programmable logc cotroller codes or other postprocessg procedures. Wth ths approach, the geerated programs ca be drectly embedded to the system by usg the commercal software package s features. Also smulato of the assembly process usg threedmesoal geometrc model of the system eables to geerate tal error states whch mght ot be cosdered usg prevous approaches. I ths paper, oly geeratg error recovery plas wll be dscussed. The focused error type for the recovery s part placemet errors, whch occur wdely durg assembly process. The objectve of the recovery pla s to fd a robust way to reposto the workpece from several dfferet collso error states. I order to acheve ths goal, two dfferet crossover operators are defed ad ther effects o the problem are observed. I order to mplemet the GP to the problem, a computer program s developed ad tegrated wth the commercal robotc smulato package called Workspace (Workspace, 1998). Ths program eables the user to geerate programs for the problem ad after that evaluate the outputs form the commercal software ad proceed wth the evoluto process for the ext geeratos. The basc workg mechasm s dscussed (Baydar ad Satou, 000a) ad gve Fgure 1. Fgure 1: System Archtecture The system ca be summarzed as follows. Frst a assembly system s modeled by usg the commercal software package. After that for a predetermed error type, the recovery procedure s vestgated. I ths study, the pre-determed error states are the possble collso pots durg the assembly process. A tal populato, whch cotas radomly geerated recovery plas, s geerated. The performaces of these plas are evaluated a geerate ad test fasho by the software package ad the results are putted to the GP processor. After that, the evoluto procedure takes place ad the recovery programs are evolved. Ths procedure cotues utl a acceptable soluto s foud..1 PROBLEM CODING The commads used for ths study are take from KAREL (Workspace, 1998) laguage. These commads eable the robot arm approach to the specfed pot (takg the referece as the robot base ad the destato pot as the tool ceter pot) or move the arm relatve to a predefed coordate pot. The commads used ths study are Move To, Move Away, Move Near ad Move Relatve. However order to represet a blak le the program, Null commad s also used. Ths commad s ot the structure of the KAREL laguage. However, order to preset varable umber of les a recovery program t s mplemeted. The commad varables are coded to a dscrete set of varables such as: 0 = Null 1 = Move To = Move Away 3 = Move Near 4 = Move Relatve
Each program commad requres a formal way of combato wth the varables of Tool Ceter Pot (TCP) ad/or a relatve movemet the egatve z- drecto (Offset). The followg table shows the approprate lexcal represetato for each commad. Table 1: The Use of Commads COMMAND Move To Move Away Move Near Move Relatve SUFFIX <TCP> <Offset> <TCP> By <Offset> <Vector> TCP varable s composed of 6 varables. These varables are the three pots the robot frame ad three oretatos of the tool holder arm. A vector s composed of three offset varables the space. Ths varable coupled wth the Move Relatve commad eables the robot to move ts arm relatvely from ts curret posto three dmesoal space. A chromosome structure s defed for each le of a program ad s composed of 5 gees. Therefore, each program s coded to a multple chromosome structure. The frst gee the chromosome structure s for the commad value from the specfed set. Secod gee s the tool ceter pot value ad t ca be actve depedg o the commad type. From thrd to ffth gees the offset values are defed. I a case of a vector value s eeded, all of the gees from three to fve are actve. If the commad seeks for a offset value, oly gee umber three s actve. Fgure shows the chromosome structure. At frst a TCP matrx s defed ad flled wth the radomly geerated values wth the costrats. Ths matrx has the sze of 1000x6. Each row represets a TCP wth ts posto ad oretato values. The maxmum umber of rows s take as 1000 as the multplcato of umber of programs a populato wth the maxmum umber of les each program. After that, a offset value matrx s defed wth the sze of 1000x1. Each row represets a offset value. The ma matrx s a three dmesoal matrx, composed of all commads, teachpots ad offset values ad has the sze of 100x10x5. Each row the frst dmeso represets oe computer program the populato. Secod dmeso s used for each le a computer program whle thrd dmeso s used for the chromosome structure of each le. Ths matrx holds the dex values from the teachpots ad offset matrces. These dex values are combed radomly the begg of the optmzato process ad are chaged accordg to the evolutoary rules durg the process.. PROBLEM SOLVING PROCEDURE The objectve of the problem s defed as mmzg the repostog error betwee the actual ad the desred state. Several error states are take tally ad worked out parallel to fd a robust recovery algorthm as t s dscussed oe of our works (Baydar ad Satou, 000b). A ftess fucto s defed as the verse of the objectve fucto dvdually for all of the error states. These fuctos are gve through Equatos (1) ad () where s the umber of error cases. = 1,,..., (1) f 1 = () ( x x ) + ( y y ) + ( z z ) o o o Fgure.: Chromosome Structure The maxmum umber of les for the recovery program s lmted to 10. Commad umber 0 ( Null commad), represets a blak le the program so a varable legth of DNA structure s defed wth the computer programs. For each chromosome the values of the varables are take from a set, whch s radomly geerated the begg. These values are stored oe ma matrx ad several sub matrces order to be retreved ad processed durg the evoluto process. The overall ftess of a recovery program s defed as ts average ftess mus the absolute value of the devato betwee ths average value ad the mmum ftess value amog the cases as t s show Equato (3). The varables w 1 ad w determe the weght of each term. By usg ths kd of defto, performace varace for recovery program s pealzed ad robustess s tred to be assured. f f f = w1 w ABS m f (3) Optmzato procedure takes place two-levels. I the frst level of optmzato a robust recovery algorthm s vestgated that eables all of the states to reach a
commo state (a pot 3D space) whch s ear to the desred posto. After that, the obtaed termedate state s defed as the oly error case to be recovered ad the desred postog s take as the goal state. Same procedure s appled for the secod part of the problem. The obtaed recovery algorthm for the secod part s combed wth the oe obtaed the frst part ad overall robust recovery logc s obtaed..3 EVOLUTION PROCEDURE I each geerato all of the members of the populato are evaluated wth respect to the desred ftess fucto. Both o-determstc ad determstc types of crossover are mplemeted. I o-determstc crossover, the probablty s take as 0.9. Weghted roulette wheel selecto s used durg the study. The probablty for a member to be the mate pool s gve as: = f p (4) f Where f s the ftess value of the dvdual. After two parets are selected the crossover operato takes place. The frst step the crossover process s locatg the crossover le pot betwee the programs. Each program has dfferet umber of les (.e., varable umber of DNA strads). Also due to the structure of the program, t s possble for ot havg all the les actve. If a collso s occurred durg the executo of the program ad automatc recovery from ths collso s ot achevable by usg the rest of the commad les, the rest of the program becomes actve. These actve les are ot prued because they may become actve after the mutato. Therefore a varable whch keeps the umber of workg les for each program s stored. Whe crossover takes place, the radom crossover pot selecto s chose from the actve les. The followg fgure depcts the acto. After the crossover le s determed, the ext step s locatg the crossover pot o the chromosome structure. A pot o the chromosome s selected radomly ad two chldre are geerated the ext geerato by exchagg the gees after the crossover pot. The followg fgure shows the crossover operato. Fgure.4: Chromosome Structures after the Crossover The secod type of crossover uses determstc rules. At frst each member s raked based o ts performace for each error state. After that the actve les of each program are prued ad ther actve les are combed suggestg that ths kd of eltsm produces better results. For dfferet states ths operato produces e umber of programs gve wth the followg equato. The (,k) fucto represets the combato of k dfferet ways: e = k= k Fgure 5 demostrates the overall operato. It s observed that ths type of eltsm mproves the evoluto process ad the results are dscussed the followg secto. (5) Fgure.3: Determato of the Crossover Le Fgure.5: Determstc Crossover Procedure
Mutato s ot appled to ths part of the crossover. After programs are combed ths maer they are drectly serted to the ext geerato. The rest of the members for the ext geerato s obtaed from the probablstc crossover part. I ths study, varable mutato probablty s mplemeted after the probablstc crossover part. The bas of mutato s focused o the actve les but ot lmted to actve oes. Ths type of mutato may tur the actve les the chromosome structure to become actve. Durg the operato, a mutato le s selected frst radomly. After that, ths le a mutato pot s determed aga radomly. After the evoluto step, the ew geerato of the programs s stored the ma matrx structure. Ths ecoded structure s decoded to workg programs KAREL laguage. These programs are tested Workspace ad ther outputs are wrtte to text fles. After that, these outputs are processed wth the developed program ad ext evolutoary step takes place accordg to these outputs. 3 EXPERIMENTAL RESULTS Several case studes are coducted wth the developed framework ad the results of these studes are gve (Baydar ad Satou, 000a ad 000b) detal. I ths secto, the effects of havg determstc crossover o the effcecy of the optmzato process s hghlghted. A assembly le s modeled as show Fgure 6. The am s to recover the collso error by repostog the workpece o the fxture. Usg the developed framework, a robust recovery algorthm s vestgated. The usage of crossover operators s gve Table. Table 3 shows the performace of the developed system uder dfferet codtos. Durg the geerato of recovery logc process, the maxmum repostog error allowed s determed as 5 mm all dmesos. The geerato of recovery from oe error state (Case studes 1 ad ) as well as from multple states (Case study 3 ad 4) are expermeted. From the expermetal results t s observed that the requred geeratos for fdg a optmum s both depedet o the umber of error states recovered ad the geometrcal posto of these states. I the frst two case studes sce there s oe error state to recover, determstc crossover operator s eglected. Ths operator s used multple error state recovery. Ths s summarzed Table. Table : Summary of Appled Crossover Operators Case Study Crossover Operator 1 (No-det.) (No-det.) 3 (No-det. + Det) 4 (No-det. + Det) Fgure 7 shows the collso scearo from the d case study. The workpece has a collso error wth the fxture at the dcated pot. The desred posto of the workpece s gve Fgure 6. Fgure.7: Collso State of the d Case Study Fgure.6: Assembly System It took 13 geeratos wth the developed system to fd a recovery algorthm from ths error state. The progress of ftess of the best ad the worst members the populato s gve Fgure 8.
Ftess Value 1.60E-01 1.40E-01 1.0E-01 1.00E-01 8.00E-0 6.00E-0 4.00E-0.00E-0 0.00E+00 Fgure.8: Hstory of the Optmzato Process The obtaed repostog error s uder 5 mm tolerace all dmesos ad acceptable. The recovery algorthm code s as follows: Best Program of Case Study: ROUTINE GPCode6 BEGIN Move To POS(-695,-670,-987,90,30, 0,'RUFB') Move Away -36 Move To POS(-710,-700,-991,90,90, 0,'RUFB') END GPCode6 Ths recovery code s composed of 3 les betwee the BEGIN ad END commads. The robot trasfers the workpece to a acceptable posto o the fxture by usg two dfferet commads from the lst (Move To ad Move Away). Ths geerated recovery logc code ca be mplemeted the cotroller ad used to recover from the smlar error codtos durg the assembly process. The performace of the system uder all 4 case studes coducted s gve Table 3 below. Case Study 1 3 5 7 9 11 13 Geerato Table 3: Performace of the System Error States Recovered No. of Geeratos 1 1 11 1 13 3 3 11 4 3 17 Worst Best Average Case Study Recovery Prog. Legth (les) Max. Postog Error (mm) (x, y, z) 1 3 (5,5,5) 3 (4,3,4) 3 5 (5,5,1) 4 6 (5,3,3) I the d case study, t took 13 geeratos to reach a acceptable optmum for oe error state. I the 3 rd ad 4 th cases although the umber of error states s trpled, wth the performace of determstc crossover t took early same umber geeratos to fd a optmum result. Error states from 1 st ad d cases are used together wth aother radomly geerated state Case 4. It s observed that the fal postog Case 4 s o better tha Case but t s stll better tha Case 1. The obtaed recovery code of the 1 st ad d case studes are also tested the 4 th case study, but the results are ot foud to be acceptable. It s also observed that the legth of the recovery program s depedet o the umber of states recovered. 4 CONCLUSIONS Geerato of recovery logc for the automated assembly systems s a major cocer sce these systems are ope to uexpected falures. A commo way to deal wth ths problem s usg plaer systems to develop a pla for the atcpated error scearos ad covert ths pla to a uderstadable cotroller code. However ths type of approach requres the post processg of the pla ad t s based o expected error stuatos. I ths paper, the usage of geetc programmg for the geerato of error recovery logc a off-le maer s dscussed. The proposed approach uses a three-dmesoal model of the assembly system to geerate ad test robust recovery logc for the gve error codtos. The use of geetc programmg eables to produce recovery code the cotroller laguage tself. Therefore, the eed for postprocessg s elmated. Besdes, the system s coupled wth a 3D robotc smulato software to geerate uforesee error states whch prevous approaches are defcet to fullfll. It uses determstc ad odetermstc crossover ad varable mutato schemes wth the mplemetato of mult-level optmzato procedure to mprove the performace. Performace of the system s evaluated wth the smulatos ad the results showed that the determstc crossover mproved the progress ad the system s effcet to solve recovery problems ad capable of geeratg robust recovery plas for multple dfferet error states. It s expected that ths approach wll requre less tme for the geerato of error recovery logc.
Refereces Beberou S. (1999), A factorzato model of robotc tasks, Artfcal Itellgece Egeerg, v13.: 11-0. Baydar C., Satou K. (000a), Off-le error recovery logc sythess automated assembly les by usg geetc programmg, Proceedgs of the 000 Japa- USA Symposum o Flexble Automato, 000JUSFA- 1314, A Arbor, MI. Baydar C., Satou K. (000b), Geerato of robust recovery logc assembly systems usg mult-level optmzato ad geetc programmg, Proceedgs of the ASME-DETC000/CIE Coferece, DETC000/CIE- 14639, Baltmore, MD. De Mello L., Saderso A. (1990), AND/OR graph represetato of assembly plas, IEEE Trasactos o Robotcs ad Automato, v6.:188-199 Hadley S.G. (1994), The automatc geerato of plas for a moble robot va geetc programmg wth automatcally defed fuctos, Advaces Geetc Programmg, Advaces Geetc Programmg, MIT Press, Cambrdge, MA:391-407 Ks T., Vãcza J. (1994), Computatoal Complexty of maufacturg process plag, New Drectos AI Plag: EWSP 95-3 rd Europea Workshop o Plag, Froters AI ad Applcatos, Asss, Italy: 99-311 Kle I., Josso P., Backstrom C. (1999), Effcet plag for a mature assembly le. Artfcal Itellgece Egeerg, v13.: 69-81 Muõs-Avla H., Weberkrch F. (1996), Plag for maufacturg workpeces by storg, dexg ad replayg plag decsos., Proceedgs of the Thrd Iteratoal Coferece o Artfcal Itellgece Plag Systems (AIPS 96), Edburgh, Scotlad, May 1996, Melo Park, CA: AAAI Press:150-157 Nord P., Bazhaf W., Brameer M. (1998), Evoluto of a world model for a mature robot usg geetc programmg, Robotcs ad Autoomous Systems, v5.:105-116 Specer G. (1994), Automatc geerato of programs for walkg, Advaces Geetc Programmg, MIT Press, Cambrdge, MA:335-353 Vssky M.L., Cavallaro J.R., Walker I.D. (1994), Expert system framework for fault detecto ad fault tolerace robotcs, Computers Electrcal Egeerg, v0., No.5,:41-435 Workspace v.4 Educatoal User Gude Maual, (1998).