5 th Natonal Conference on Machnes and Mechansms NaCoMM0-44 An Optmzaton Approach for Path Synthess of Four-bar Grashof Mechansms A.S.M.Alhajj, J.Srnvas Abstract Ths paper presents an optmzaton scheme based on the prncple of harmonysearch for path synthess of Grashof four-bar mechansms. The objectve n ths work s to mnmze poston error defned by the coordnates of coupler pont subjected to satsfacton of constrants such as Grashof crteron and sequence on nput lnk angles n addton to geometrcal constrants on the desgn varables. A generalzed approach s formulated such that the mnmzaton of objectve s carred-out only after a feasble soluton has been obtaned. Two benchmark examples for path synthess wth and wthout prescrbed tmngs (nput lnk angles for each precson pont) are consdered to llustrate the effectveness of the method. Keywords: Path synthess, Poston error, Crank-rocker mechansm, Constraned- Optmzaton, Harmony search. Introducton Lnkages havng rgd members are exclusvely used n the area of mechancal engneerng for moton and energy transmsson from one or more nput members to output members. Four-bar lnkages are a class of smple but practcally mportant mechansms. Ther utlzaton ranges from smple devces, such as wndsheldwpng mechansms and door-closng mechansms to complcated rock crushers, sewng machnes, round balers and suspenson systems of automobles. Two basc concepts nvolved n the desgn of lnkages are: analyss and synthess. The term synthess refers to the process of obtanng lnkage parameters to obtan a requred task. In dmensonal synthess of lnkages, three dfferent problems are commonly seen. These nclude: moton-generaton, functon-generaton and path generaton. Desgn of a lnkage for generaton of a partcular path s relatvely a dffcult task. In fact, the problem of path synthess of a four-bar lnkage s to generate a mechansm whose coupler pont can trace the desred trajectory or target ponts. The path synthess of a four-bar lnkage has been actvely studed durng the past 50 years. There has been a large number of studes on ths topc usng a varety of methods. Analytcal soluton to the general problem of four-bar lnkage synthess wth more than fve precson ponts s a qute dffcult task. For such stuatons, a varety of numercal methods can be employed. One such approach s optmzaton, n whch a defned objectve functon n terms of lnkage varables s mnmzed under certan constrants. The most common objectve functon s poston error, A.S.M.Alhajj Department of Mechancal Engneerng, NIT-Rourkela, E-mal: ahmedme63@gmal.com J.Srnvas (Correspondng author) Department of Mechancal Engneerng, NIT-Rourkela, Rourkela 769 008, E-mal: srn07@yahoo.co.n
5 th Natonal Conference on Machnes and Mechansms NaCoMM0-44 defned as the sum of the squares of the Eucldean dstance between the target and generated coupler ponts. Several authors descrbed the use of unconventonal optmzaton schemes for solvng path synthess problem of four-bar mechansms. Cabrera et al. [] ntated the applcaton of genetc algorthms (GA) for optmal synthess of four-bar lnkages. Later-on, evolutonary algorthms [], Genetc-fuzzy scheme [3], geometrc constraned programmng approach [4], ant-gradent algorthm [5], partcle swarm optmzaton (PSO) and dfferental evoluton [6], real-coded evolutonary algorthms [7] have been adopted for path synthess problem. Some works [8-9] hghlghted the use of meta-heurstc methods for mult-objectve Pareto optmum synthess of fourbar lnkages. Recently, there s a ganng nterest towards development of new optmzaton heurstcs that generate the outputs relatvely faster and accurate wth less number of nput parameters. Harmony search optmzaton s one such approach fndng ts applcatons n several engneerng problems. Implementaton of harmony search optmzaton (HSO) method n mechansm synthess has relatve merts over several exstng optmzaton schemes. Basc Synthess Procedure In path generaton problem of four-bar mechansm, synthess procedure s accomplshed by some precson ponts to be traced by the coupler pont P of the mechansm as shown n Fgure. Y A P C b 3 B c AC=L x PC=L y AB=b 4 X r a O d O Y r O y 0 x 0 0 X Fgure : Four-bar mechansm n global coordnate frame An optmzaton scheme may be adopted to fnd the set of dmensonal parameters of the mechansm, namely lnk lengths (a, b, c, d, L x, L y etc) and nput lnk angles ( ), so that the error between the precson ponts (representng the desred trajectory) and the actually traced ponts by the coupler s mnmzed. Whle mnmzng the error functon, there are number of constrants such as the Grashof condton, decreasng or ncreasng sequence of nput lnk angles and the range of desgn varables have to be satsfed. Ths forms a multvarable, constraned-nonlnear
5 th Natonal Conference on Machnes and Mechansms NaCoMM0-44 optmzaton problem. Here, the objectve functon called trackng error (TE) s evaluated from the traced ponts (P x, P y ), (where =,,N) defned wth respect to global coordnate frame XOY. From Fg., the poston vector of the coupler pont P n reference frame X r O Y r can be expressed as a vector equaton: P r = a L x L y () whch can be expanded as: Pxr cos cos 3 sn 3 a L x L y () Pyr sn sn 3 cos 3 Here, the coupler lnk angle θ 3 s computed usng the followng vector loop equaton of the four-bar mechansm: a b c d 0 (3) Ths can be expressed n ts components wth respect to relatve coordnate frame X r O Y r as: a cos + b cos 3 c cos 4 d =0 (4) a sn + b sn 3 c sn 4 =0 (5) After elmnaton of 4, the unknown angle of θ 3 s computed for known values of nput lnk angle θ. Ths takes the followng form known as Freudensten s equaton: K cos 3 +K cos +K 3 =cos( - 3 ) (6) c d a b where K =d/a, K =d/b and K 3 = (7) ab From ths equaton, the two solutons (open and crossed) can be wrtten as:, 3 = tan - E E 4DF (8) D where D=cos -K +K cos +K 3, E=-sn and F=K +(K -)cos +K 3 (9) Fnally, the poston of coupler P, wth respect to global or world coordnate system XOY s defned by: Px cos 0 sn 0 Pxr x 0 P y sn 0 cos (0) 0 Pyr y 0 The coordnates are used to defne the followng objectve functon: N xd x Mnmze TE= [(P P ) (P P ) ] () where N s number of precson ponts specfed on the desred path and (P, P ) are gven set of desred precson pont coordnates. For effectve functonng of lnkage, one or several constrants on the dmensons are often posed. In ths work, the followng constrants are consdered: () Range for desgn varables: The magntudes of lnk lengths and coupler pont coordnates as well as jont angle ranges are restrcted between a low and hgh value. These are called sde or geometrc constrants. yd y xd yd 3
5 th Natonal Conference on Machnes and Mechansms NaCoMM0-44 () Grashof crteron: Ths s the requrement that the nput ln k of lnka ge as a crank and the mechansm s ether crank-rocker or drag-lnk mecha nsm. Ths condton s wrtten as: (x mn x max ) 0 () ( a b c d) where x mn and x max are respectvely the mnmum and maxmum values of lnk lengths: a,b,c and d. If ths condton s not satsfed, a new desgn vector s selected. (3) Order of crank angles: As there s a possblty of a large combnaton of mechansms that would generate same coupler curve, we need to pose ether clockwse or antclockwse rotaton constrant on crank angle. Ths s especally mportant whle generatng paths wthout prescrbed tmngs, where the angle of crank for each coupler pont s also of concern. Ths ncreases the sze of desgn vector by ncludng as many crank angles as the number of gven precson ponts. If,,.. N are the requred crank angles, the order constrant s wrtten as: sgn( + - ) =sgn( - ) for all =,3,.,(N-) (3) Here sgn s sgn functon defned as sgn()=+ f 0, otherwse sgn()=-.if ths condton s not meetng, the soluton s rejected and new set of random varables are selected satsfyng the above two condtons. For handlng the objectve functon wth all these constrants, a dynamc objectve functon approach s adopted n ths paper. The orgnal problem s converted nto followng unconstraned b-objectve optmzaton problem: Mn (CV, TE), X={x,x, x n } S R n (4) where CV s constrant volaton f any and SR n s the search space defned by parameter bounds. Hence, we could mnmze TE only when CV becomes zero. When the set of varables les outsde the feasble regon (CV>0), t s not necessary to calculate objectve functon TE, resultng n reducton of computaton cost. 3 Proposed Optmzaton Scheme The Harmony Search (HS) algorthm, compared to other optmzng methods lke genetc algorthms, s very smple n dea and nvolves very few settng parameters as well as easy to execute. HS method was developed orgnally by Geem et al. [0] and later on several modfcatons have been suggested to mprove ts performance. The basc HS method apples the muscal procedure of seekng for the best state of harmony. The harmony n musc s smlar to soluton vector n the optmzaton problem and muscan s seekng for best harmony s comparable to global search system n ths optmzaton method. The basc steps of the approach are as follows: Step : Intalzng the problem and algorthm parameters: In ths step, the optmzaton problem s defned n terms of decson varables X and effectve objectve functon f(x). The parameters of algorthm are also desgnated n ths step. These are the harmony memory sze (HMS) or the number of soluton vectors n the harmony memory; harmony memory consderng rate (HMCR); ptch adjustment rate (PAR); number of decson varables (N) and the number of mprovsatons (NI) or stoppng base. The harmony memory (HM) s a memory locaton where all the soluton vectors are stored. Ths HM s smlar to the genetc pool n the genetc algorthm. The HMCR and PAR are parameters used to enhance the soluton vector and are defned later n Step 3. 4
5 th Natonal Conference on Machnes and Mechansms NaCoMM0-44 Step : Intalzng the harmony memory: The HM matrx s ntally flled wth as many randomly generated soluton vectors as the HMS, as well as wth the correspondng functon values of each random vector, f(x). x x. x N f (X ) x x. x N f (X ) H M=..... (5)..... HMS HMS HMS HMS x x. x N f (X ) Step 3: Improvsng a new harmony: New Harmony vector, X={x, x,.., x N } s created from the HM based on the memory consderatons, ptch adjustments and randomzaton. For example, the value of frst varable x n new harmony-vector s created from any value n specfed HM range. The values of other varables are also selected lkewse. The HMCR, whch vares between 0 and, s the rate of choosng one value from the hstorcal values stored n HM, whle (-HMCR) s rate of randomly selectng one value from the possble range of values. Every component ob taned by memory consderaton s examned for condton of ptch-adjustment. Ths operaton uses the PAR parameter, n whch the ptch s adjusted as: Ptch adjustng decson for x = yes, wth probablty PAR =no, wth probablty -PAR (6) When the ptch adjustment decson for x s yes, x should be updated as: x bwrand( ), where bw=bw max exp(cgn) wth c=log e (bw mn /bw max )/NI, s an arbtrary dstance bandwdth n each generaton gn, whle rand() s a random number between 0 and. The constants bw mn and bw max are mnmum and maxmum values of bandwdth respectvely. The HMCR and PAR parameters help the algorthm to fnd globally and locally mproved solutons, respectvely. PAR and bw n the HS algorthm are found to be fne-tunng parameters of optmzed soluton vectors. In present task, just lke bandwdth, adaptve PAR values for each genera ton are employed. That s, PAR for generaton gn n terms of mnmum and maxmum ptch adjustment rates s: PAR=PAR mn + (PAR max -PAR mn ) gn/ni (7) Step 4: Updatng the harmony memory: In ths step, f the new Harmony vector X s better than the worst harmony n the HM n terms of the objectve functon value, the new harmony s ncluded n the HM and the worst exstng harmony s excluded from the HM. The HM s then sorted by the value of objectve functon. Step 5: Stoppng crteron: When the maxmum number of mprovsatons (NI) has reached, the computaton s termnated. Otherwse, steps 3 and 4 are repeated. 4 Numercal Smulatons The HS optmzaton scheme s mplemented n MATLAB envronment. The program employs two sub-functons for handlng constrants and objectve. Two cases are descrbed here for path synthess problem, one wthout and other wth prescrbed tmngs. Case : Path generaton wthout prescrbed tmng, 0 target ponts: The problem was proposed by Acharya and Mandal [6] and s defned as: Desgn varables (9 varables): X =[a, b, c, d, L x, L y, 0, x 0, y 0,,,., 9, 0 ] 5
5 th Natonal Conference on Machnes and Mechansms NaCoMM0-44 Target ponts (Ten ponts): {P d }={(0,0),(7.66,5.4),(.736,7.878),(5,6.98), (0.60307,.736), (0.60307,7.638), (5, 3.078),(.736,.5),(7.66,4.8577),(0,0)} - Lmts of the varables: a, b, c, d [5,80]; L x, L y, x 0, y 0 [-80, 80]; 0,,, 0 [0, ] Fgure shows the ten target ponts and the coupler curve obtaned usng the harmony search method for ths case. The tme taken to run the program s just 0.09 seconds for 5,000 cycles. The convergence plot for ths case s llustrated n Fgure 3. Fgure : Coupler curve for case- Fgure 3: Ftness-convergence plot The sy ntheszed geometrc parameters and the correspondng values of the mean error are shown n Ta ble, together wth the avalable results. Table Desgn varables obtan ed and comparson wth avalable data Varable G A [6] PS O[6] G A-DE[7] HSO a 9.09993 8.687 8.4689 8.395 b 7.9365 36.55 45.8968 75.9046 c 80 80 58.5404 64.5646 d 79.985 5.535 80 59.8899 L x 0 0-6.40389 -.3858 L y 0.48-9.64 9.038 x 0 0.5597.00 6.5409-6.9700 y 0 0.0955 0.5 -.4564 0 0.0649.4035 0.3653 5.585 6.8385 6.86 6.0599.0676 0.600745 0.653 0.488453.756 3.378.3054.7805.3344 4.0575.88.88339 3.054 5.86639.93.59806 4.0346 6 3.40547 3.4993 3.8585 4.654 7 4.076 4.55 3.96674 5.860 6
5 th Natonal Conference on Machnes and Mechansms NaCoMM0-44 8 4.90373 4.999 4.65966 5.7453 9 5.6844 5.685 5.353 6.830 0 6.8385 6.833 6.0663 6.83 The trackng error s found to be.5 as aganst.8 n GA [6] for ths case. Case: Path generaton wth prescrbed tmng, 8 target ponts: Ths problem requres generatng a path along the 8 ponts and s proposed by Kunjur and Krshnamurthy (KK) []. It s defned as follows: Desgn varables (0 varables): X=[a, b, c, d, L x, L y,,x 0,Y 0, 0 ] -Target ponts: {P d }= {(0. 5,.),(0. 4,.),(0.3,.),(0.,.0),(0.,0.9),(0.005,0.75), (0.0,0.6),(0,0.5),(0,0.4),(0.03,0.3),(0.,0.5),(0.5,0.),(0.,0.3),(0.3,0.4),(0.4,0.5), (0.5,0.7),(0.6,0.9), (0.6,)} { }={, + 0 o }, (where =,, 7) -Lmts of the varables: a, b, c, d [5,50]; L x, L y, x 0, y 0 [-50, 50]; 0, [0, ] Table gves the parameters of the optmal mechansm generated by HSO algorthm and compares them wth results reported n lterature. The results show that the HSO soluton gves the smallest average e rror. Table Com paratve results for case Varable GA-DE[7] Cabrera[] KK[8] HSO a 0.86 0.37803 0.36355 0.547 b 4.484 4.88954.9374 8.5878 c 3.747.056456 0.49374 0.3845 d 49.959 3.057878.8545 40.377 L x -47.966 0.767038.033-7.9087 L y 5.3586.85088.7747-0.545 x 0 44.758.776808 0.9598 7.878 y 0-3.9643-0.6499 -.9645 -.345 0 5.37543.0068 0.76398 4.6397.8855 0.686.756.467 Error 0.04784 0.04 0.06 0.0836 Fg.4 shows the coupler curve generated by the optmal mechansm usng proposed HSO method along wth that of GA-DE approach [7]. 7
5 th Natonal Conference on Machnes and Mechansms NaCoMM0-44 Fgure 4: Coupler curve for case (sold: HSO, dotted: GA-DE [7], : Desred) In both the cases, the algorthm parameters adopted are: NI=5000, HMS=30, HMCR=0.95, PAR max=0.9, PAR mn=0.4, bw mn=0.000, bw max=. The smulatons are conducted usng X-86 based PC wth Intel core- Duo, 3.0 GHz processor. 5 Conclusons Ths paper presented the results of path synthess of four-bar mechansm usng harmony search optmzaton method. Path trackng error was defned as objectve functon and constrants lke varable bounds, Grashof crteron and angle sequence at nput lnk were mposed. The algorthm resulted n near optmal solutons faster wth acceptable accuracy. The methodology may be extended for path synthess of hgher order lnkages (6-bar planar parallel mechansms) as well as to obtan dmensons of hybrd (to acheve both the desred path and moton) mechansms. References [] J.A. Cabrera, A. Smon and M. Prado, Optmal synthess of mechansms wth genetc algorthms, Mechansm and Machne Theory, vol. 37, pp. 65 77, 00. [] A. Kanarachos, D. Koulochers and H. Vruzopoulos, Evolutonary algorthms wth determnstc mutaton operators used for the optmzaton of the trajectory of a four-bar mechansm, Mathematcs and Computer n Smulaton, vol.63, pp. 483 49, 003. [3] M.A. Larb, A. Mlke, L. Romdhane and S. Zeghloul, A combned genetc algorthm fuzzy logc method (GA FL) n mechansm synthess, Mechansm and Machne Theory, vol.39, pp.77 735, 004. [4] E.C. Knzel, J.P. Schmedeler and G.R. Pennock, Knematc synthess for fntely separated postons usng geometrc constraned programmng, Journal of Mech.Desgn, Trans.ASME, vol.8, pp.070-079, 006. [5] A. Smal and N. Dab, Optmum synthess of hybrd-task mechansms usng ant-gradent search method, Mechansm and Machne Theory, vol.4, pp.5-30, 007. [6] S.K. Acharyya and M. Mandal, Performance of evolutonary algorthms for four-bar lnkage synthess, Mechansm and Machne Theory, vol.44, pp.784-794, 009. 8
5 th Natonal Conference on Machnes and Mechansms NaCoMM0-44 [7] W.Y. Ln, A GA-DE hybrd evolutonary algorthm for path synthess of four-bar lnkage, Mechansm and Machne Theory, vol.45, pp.096-07, 00. [8] N.N. Zadeh, M. Felez, A. Jamal and M. Ganj, Pareto optmal synthess of four-bar mechansms for path generaton, Mechansm and Machne Theory, vol.44, pp.80-9, 009. [9] R.R. Bulatovc S.R. Dordevc, On the optmum synthess of four-bar lnkage usng dfferental evoluton and method of varable controlled devatons, Mechansm and Machne Theory, vol.44, pp.35-46, 009. [0] Z.W. Geem, J.H. Km and G.V. Loganathan, A new heurstc optmzaton algorthm: harmony search, Smulatons, Vol.76, pp.60 68, 00. [] S. Kunjur and S. Krshnamurty, Genetc algorthms n mechansm synthess, Journal of App. Mech. Rob. 4 () (997) 8 4. 9