Academia.eduAcademia.edu

Optimal design of mechanical components using the Bees Algorithm

2009, Proceedings of the Institution of Mechanical Engineers, Part C: Journal of Mechanical Engineering Science

This paper describes the first application of the Bees Algorithm to mechanical design optimization. The Bees Algorithm is a search procedure inspired by the way honey bees forage for food. Two standard mechanical design problems, the design of a welded beam structure and the design of coil springs, were used to benchmark the Bees Algorithm against other optimization techniques. The paper presents the results obtained showing the robust performance of the Bees Algorithm.

1051 Optimal design of mechanical components using the Bees Algorithm D T Pham1∗ , A Ghanbarzadeh1,2 , S Otri1 , and E Koç1 1 Manufacturing Engineering Centre, Cardiff University, Cardiff, UK 2 Mechanical Engineering Department, Engineering Faculty, Shahid Chamran University, Ahvaz, I. R. Iran The manuscript was received on 23 August 2007 and was accepted after revision for publication on 10 October 2008. DOI: 10.1243/09544062JMES838 Abstract: This paper describes the first application of the Bees Algorithm to mechanical design optimization. The Bees Algorithm is a search procedure inspired by the way honey bees forage for food. Two standard mechanical design problems, the design of a welded beam structure and the design of coil springs, were used to benchmark the Bees Algorithm against other optimization techniques. The paper presents the results obtained showing the robust performance of the Bees Algorithm. Keywords: Bees Algorithm, optimization, mechanical design 1 INTRODUCTION Researchers have used the design of welded beam structures [1] and coil springs [2] as benchmarks to test their optimization algorithms. The welded beam design problem involves a non-linear objective function and eight constraints, and the coil spring design problem, a non-linear objective function and four constraints. A number of optimization techniques have been applied to these two problems. Some of them, such as geometric programming (GP) [3], require extensive problem formulation; some (see, for example, reference [4]) use specific domain knowledge, which may not be available for other problems, and others (see, for example, reference [3]) are computationally expensive or give poor results. The Bees Algorithm has been applied to different unconstrained complex optimization problems [5–7]. The design problems discussed in this paper are among the first constrained optimization problems to be solved using this new algorithm. The paper is organized as follows: section 2 outlines the main steps of the Bees Algorithm; sections 3 and 4 explain the welded beam and coil spring optimization problems; section 5 presents the results obtained using the Bees Algorithm and other optimization procedures. 2 THE BEES ALGORITHM 2.1 The foraging process in nature CF24 3AA, UK. email: [email protected] During the harvesting season, a colony of bees keeps a percentage of its population as scouts [8] and uses them to explore the field surrounding the hive for promising flower patches. The foraging process begins with the scout bees being sent to the field where they move randomly from one patch to another. When they return to the hive, those scout bees that found a patch of a sufficient quality (measured as the level of some constituents, such as sugar content) deposit their nectar or pollen and go to the ‘dance floor’ to perform a dance known as the ‘waggle dance’ [9]. This dance is the means to communicate to other bees three pieces of information regarding a flower patch: the direction in which it will be found, its distance from the hive, and its quality rating (or fitness) [8, 10]. This information helps the bees watching the dance to find the flower patches without using guides or maps. After the waggle dance, the dancer (i.e. the scout bee) goes back to the flower patch with follower bees recruited from the hive. The number of follower bees will depend on the overall quality of the patch. Flower patches with large amounts of JMES838 © IMechE 2009 Proc. IMechE Vol. 223 Part C: J. Mechanical Engineering Science ∗ Corresponding author: Manufacturing Engineering Centre, Cardiff University, Queen’s Building, Newport Road, Cardiff 1052 D T Pham, A Ghanbarzadeh, S Otri, and E Koç nectar or pollen that can be collected with less effort are regarded as more promising and attract more bees [9, 11]. In this way, the colony can gather food quickly and efficiently. Although some of the algorithms proposed have names that are suggestive of possibly bee-inspired operations, as far as the authors know, those algorithms do not closely follow the behaviour of bees. In particular, they do not seem to implement the techniques that bees employ when foraging for food. An algorithm independently developed at almost the same time as the Bees Algorithm can be found described in reference [12]. Named the ABC algorithm, it is perhaps closest in its operation to the Bees Algorithm. To date, the ABC algorithm has not been evaluated on optimization problems in mechanical engineering design. 2.2 The Bees Algorithm This section summarizes the main steps of the Bees Algorithm. For more details, the reader is referred to references [5] to [7]. Figure 1 shows the pseudocode for the Bees Algorithm in its simplest form. The algorithm requires a number of parameters to be set, namely: the number of scout bees, n, the number of sites selected for neighbourhood searching (out of n visited sites), m, the number of top-rated (elite) sites among m selected sites, e, the number of bees recruited for the best e sites, nep, the number of bees recruited for the other (m − e) selected sites, nsp, the initial size of each patch, ngh (a patch is a region in the search space that includes the visited site and its neighbourhood), and the stopping criterion. The algorithm starts with the n scout bees being placed randomly in the search space. The fitnesses of the sites visited by the scout bees are evaluated in step 2. In step 4, the m sites with the highest fitnesses are designated as ‘selected sites’ and chosen for neighbourhood search. In steps 5 and 6, the algorithm conducts searches around the selected sites, assigning more bees to search in the vicinity of the best e sites. Selection of the best sites can be made directly according to the fitnesses associated with them. Alternatively, the fitness values are used to determine the probability of the sites being selected. Searches in the neighbourhood of the best e sites – those which represent the most promising solutions – are made more detailed. As already mentioned, this is done by recruiting more bees for the best e sites than for the other selected sites. Together with scouting, this differential recruitment is a key operation of the Bees Algorithm. In step 6, for each patch, only the bee that has found the site with the highest fitness (the ‘fittest’ bee in the patch) will be selected to form part of the next bee population. In nature, there is no such restriction. This restriction is introduced here to reduce the number of points to be explored. In step 7, the remaining bees in the population are assigned randomly around the search space to scout for new potential solutions. At the end of each iteration, the colony will have two parts to its new population: representatives from the selected patches, and scout bees assigned to conduct random searches. These steps are repeated until a stopping criterion is met. As described above, the Bees Algorithm is suitable for unconstrained optimization problems. If a problem involves constraints, a simple technique can be adopted to enable the optimization to be applied. The technique involves subtracting a large number from the fitness of a particular solution that has violated a constraint in order to drastically reduce the chance of that solution being found acceptable. This was the technique adopted in this work. As both design problems were minimization problems, a fixed penalty was added to the cost of any constraint-violating potential solution. 3 WELDED BEAM DESIGN PROBLEM∗ A uniform beam of rectangular cross-section needs to be welded to a base to be able to carry a load of 6000 lbf. The configuration is shown in Fig. 2. The beam is made of steel 1010. The length L is specified as 14 in. The objective of the design is to minimize the cost of fabrication while finding a feasible combination of weld thickness h, weld length l, beam thickness t, and beam width b. The objective function can be formulated as [1] min f = (1 + c1 )h2 l + c2 tb(L + l) (1) where f is the cost function including setup cost, welding labour cost, and material cost, c1 the unit volume of weld material cost (= 0.10471$/in3 ), c2 the unit volume of bar stock cost (= 0.04811$/in3 ), and L the fixed distance from load to support (= 14 in). ∗ Both the welded beam design and coil spring design problems are described in the literature in terms of Imperial units. For ease of Fig. 1 Pseudo-code of the basic Bees Algorithm Proc. IMechE Vol. 223 Part C: J. Mechanical Engineering Science comparison of the results, Imperial units are retained in this paper. JMES838 © IMechE 2009 Optimal design of mechanical components using the Bees Algorithm 1053 Normal and shear stresses and buckling force can be formulated as [1, 13] 2.1952 (10) t 3b   τ = (τ ′ )2 + (τ ′′ )2 + (lτ ′′ τ ′′ )/ 0.25[l 2 + (h + t)2 ] (11) σ = where 6000 τ′ = √ 2h1 Fig. 2 (primary stress)  6000(14 + 0.5l) 0.25[l 2 + (h + t)2 ] τ = 2{0.707hl[l 2 /12 + 0.25(h + t)2 ]} A welded beam ′′ (secondary stress) Not all combinations of h, l, t, and b that can support F are acceptable. There are limitations that should be considered regarding the mechanical properties of the weld and bar, for example, shear and normal stresses, physical constraints (no length less than zero), and maximum deflection. The constraints are as follows [1] g1 = τd − τ  0 (2) g2 = σd − σ  0 (3) g3 = b − h  0 (4) g4 = l  0 (5) g5 = t  0 (6) g6 = Pc − F  0 (7) g7 = h − 0.125  0 (8) g8 = 0.25 − δ  0 (9) where τd is the allowable shear stress of the weld (= 13 600 psi), τ the maximum shear stress in the weld, σd the allowable normal stress for the beam material (= 30 000 psi), σ the maximum normal stress in the beam, Pc the bar buckling load, F the load (= 6000 lbf), and δ the beam end deflection. The first constraint, g1 , ensures that the maximum developed shear stress is less than the allowable shear stress of the weld material. The second constraint, g2 , checks that the maximum developed normal stress is lower than the allowed normal stress in the beam. The third constraint, g3 , ensures that the beam thickness exceeds that of the weld. The fourth and fifth constraints, g4 and g5 , are practical checks to prevent negative lengths or thicknesses. The sixth constraint, g6 , makes sure that the load on the beam is not greater than the allowable buckling load. The seventh constraint, g7 , checks that the weld thickness is above a given minimum, and the last constraint, g8 , is to ensure that the end deflection of the beam is less than a predefined amount. JMES838 © IMechE 2009 Pc = 64 746.022(1 − 0.0282346t)tb3 4 (12) COIL SPRING DESIGN PROBLEM The problem is to design a coil spring to carry a specific axial load. Figure 3 shows a coil spring in tension. The parameters that should be optimized are the wire diameter d, the mean coil diameter D, and the number active coils N . The objective function is the mass M of the spring which should be minimized [2] min M = 1 (N + Q)π2 Dd 2 ρ 4 (13) where Q is the number of inactive coils (i.e. end coils performing no energy storage function) (= 2), g the gravitational constant (= 386 in/s2 ), γ the weight density of the spring material (= 0.285 lbf/in3 ), and ρ the mass density of the material (γ /g ) (= 7.38342 × 10−4 lbf-s2 /in4 ). The constraints can be formulated as [2] 8PD 3 N 0 d4G   8PD (4D − d) 0.615d = + − τd  0 πd 3 4(D − d) D g9 = ∆ − (14) g10 (15) g11 = ω0 − ω  0 (16) g12 = D + d − D0  0 (17) where P is the applied axial load (= 10 lbf ), G the shear modulus (= 1.15 × 107 lbf/in2 ), ∆ the minimum spring deflection (= 0.5 in), τd the allowable shear Fig. 3 A coil spring Proc. IMechE Vol. 223 Part C: J. Mechanical Engineering Science 1054 D T Pham, A Ghanbarzadeh, S Otri, and E Koç stress (= 80 000 lbf/in2 ), ω0 the lower limit on the surge wave frequency (= √ 100 Hz), ω the frequency of surge waves (= d/2πND 2 G/2ρ), and D0 the limit on the outer diameter of the coil (= 1.5 in). Using these values, the above constraints can be rewritten as D3 N 0 71875d 4 D(4D − d) 2.46 = + − 1.0  0 12566d 3 (D − d) 12566d 2 140.54d 0 = 1.0 − D2 N D+d = − 1.0  0 1.5 g9 = 1.0 − (18) g10 (19) g11 g12 (20) (21) The first constraint, g9 , makes sure that the deflection of the coil spring is greater than the specified minimum value. The second constraint, g10 , checks that the maximum shear stress in the coil spring is less than the allowable shear stress. The third condition, g11 , checks that the frequency of surge waves is greater than the given lower limit. Finally, the fourth constraint, g12 , controls the outer diameter of the spring. 5 RESULTS AND DISCUSSION 5.1 Welded beam problem The empirically chosen parameters for the Bees Algorithm are given in Table 1, with the maximum number of generations set to 750. The search space was defined by the following intervals [14] 0.125  h  5 (22) 0.1  l  10 (23) 0.1  t  10 (24) 0.1  b  5 (25) Evolution of the lowest cost in each iteration Fig. 4 With the above search space definition, constraints g4 , g5 , and g7 are already satisfied and do not need to be checked in the code. Figure 4 shows how the lowest value of the objective function changes with the number of iterations (generations) for three independent runs of the algorithm. It can be seen that the objective function decreases rapidly in the early iterations and then gradually converges to the optimum value. A variety of optimization methods have been applied to this problem by other researchers [3, 4, 14]. The results they obtained along with those of the Bees Algorithm are given in Table 2. APPROX is a method of successive linear approximation [15]. DAVID is a gradient method with a penalty [15]. GP is a method capable of solving linear and non-linear optimization problems that are formulated analytically [3]. SIMPLEX is the Simplex algorithm for solving linear programming problems [15]. Table 2 Results for the welded beam design problem obtained using the Bees Algorithm and other optimization methods Design variables Table 1 Parameters of the Bees Algorithm for the welded beam design problem Bees Algorithm parameters Symbol Value Population Number of selected sites Number of top-rated sites out of m selected sites Initial patch size Number of bees recruited for best e sites Number of bees recruited for the other (m − e) selected sites n m e 80 5 2 ngh nep nsp 0.1 50 10 Random function used to generate the bees: random function with a uniform distribution ranging over the relevant search space. Proc. IMechE Vol. 223 Part C: J. Mechanical Engineering Science Methods h l t b APPROX [3] DAVID [3] GP [3] 0.2444 0.2434 0.2455 6.2189 8.2915 0.2444 6.2552 8.2915 0.2444 6.1960 8.2730 0.2455 2.38 2.38 2.39 GA [14] (three independent runs) 0.2489 0.2679 0.2918 6.1730 8.1789 0.2533 5.8123 7.8358 0.2724 5.2141 7.8446 0.2918 2.43 2.49 2.59 Improved GA [4] (three independent runs) 0.2489 0.2441 0.2537 6.1097 8.2484 0.2485 6.2936 8.2290 0.2485 6.0322 8.1517 0.2533 2.40 2.41 2.41 SIMPLEX [3] RANDOM [3] 0.2792 0.4575 5.6256 7.7512 0.2796 4.7313 5.0853 0.6600 2.53 4.12 Bees Algorithm (three independent runs) 0.244 29 6.2126 8.3009 0.244 32 2.3817 0.244 28 6.2110 8.3026 0.244 29 2.3816 0.244 32 6.2152 8.2966 0.244 35 2.3815 Cost JMES838 © IMechE 2009 Optimal design of mechanical components using the Bees Algorithm 1055 As shown in Table 2, the Bees Algorithm produces better results than almost all the examined algorithms, including the genetic algorithm (GA) [14], an improved version of the GA [4], SIMPLEX [3], and the random search procedure RANDOM [3]. Only APPROX and DAVID [3] produce results that match those of the Bees Algorithm. However, as these two algorithms require information specifically derived from the problem [4], their application is limited. The result for GP is close to those of the Bees Algorithm, but GP needs a very complex formulation [3]. 5.2 Coil spring problem The parameters used for the Bees Algorithm are given in Table 3, with the maximum number of generations set to 1500. The search space was defined using the following intervals [4] 0.05  d  0.2 (26) 0.25  D  1.3 (27) 2  N  15 (28) Figure 5 shows the evolution of the best value of the objective function, with the number of iterations (generations) for three independent runs. Again, it can be seen that the objective function decreases rapidly in the early iterations and then gradually converges to the optimum value. The coil spring design problem has been solved by other researchers using sequential quadratic programming (SQP) methods in a batch environment and in an interactive mode [2] and using an improved GA [4]. The results obtained by those optimization tools are given in Table 4 together with the outputs of three independent runs of the Bees Algorithm. It can be seen that the Bees Algorithm gives better solutions than the improved GA and the interactive solution process. Only the result from the batch–mode SQP is comparable with those of the Bees Algorithm. Table 3 Parameters of the Bees Algorithm for the coil spring design problem Bees Algorithm parameters Symbol Value Population Number of selected sites Number of top-rated sites out of m selected sites Initial patch size Number of bees recruited for best e sites Number of bees recruited for the other (m − e) selected sites n m e 60 5 2 ngh nep nsp 0.1 40 10 Random function used to generate the bees: random function with a uniform distribution ranging over the relevant search space. JMES838 © IMechE 2009 Fig. 5 Evolution of the lowest mass in each iteration Table 4 Results for the coil spring design problem obtained using the Bees Algorithm and other optimization methods Design variables D d SQP (batch) [2] SQP (interactive) [2] 0.051 699 0.356 95 11.289 0.012 678 7 0.053 40 0.3992 9.1854 0.012 730 0 Improved GA [4] (best three solutions not violating constraints) Bees Algorithm (three independent runs) 0.052 35 0.053 23 0.053 96 0.3721 0.3947 0.4132 N Mass M (×4/ρπ2 ) Methods 10.48 9.383 8.697 0.051 759 0.358 39 11.207 0.051 807 0.359 56 11.139 0.051 779 0.358 86 11.179 0.012 72 0.012 73 0.012 87 0.012 680 0.012 680 0.012 681 However, as SQP methods need information on derivatives of variables, the range of problems that can be solved by these methods is limited. 6 CONCLUSION Two different constrained optimization problems were solved using the Bees Algorithm. In each case, the algorithm converged to the optimum without becoming trapped at local optima. The algorithm generally outperformed other optimization techniques in terms of the accuracy of the results obtained. A drawback of the algorithm is the number of parameters that must be chosen. However, it is possible to set the values of those parameters after only a few trials. Indeed, the Bees Algorithm can solve a problem without any special domain information, apart from that needed to evaluate fitnesses. In this respect, the Bees Algorithm shares the same advantage as global search algorithms such as the GA. Further work should be addressed at reducing the number of parameters and incorporating better learning mechanisms to make the algorithm even simpler and more efficient. Proc. IMechE Vol. 223 Part C: J. Mechanical Engineering Science 1056 D T Pham, A Ghanbarzadeh, S Otri, and E Koç ACKNOWLEDGEMENT The research described in this paper was performed as part of the Objective 1 SUPERMAN project, the EPSRC Innovative Manufacturing Research Centre Project, and the EC FP6 Innovative Production Machines and Systems (I*PROMS) Network of Excellence. puter Engineering Department, Erciyes University, Engineering Faculty, Turkiye, 2005. 13 Shigley, J. E. Mechanical engineering design, 1973 (McGraw-Hill, New York). 14 Deb, K. Optimal design of a welded beam via genetic algorithm. AIAA J. 1991, 29(11), 2013–2015. 15 Siddall, J. N. Analytical decision-making in engineering design, 1972 (Prentice-Hall, New Jersey). REFERENCES APPENDIX 1 Rekliatis, G. V., Ravindrab, A., and Ragsdell, K. M. Engineering optimisation methods and applications, 1983 (Wiley, New York). 2 Arora, J. S. Introduction to optimum design, 2004 (Elsevier, New York). 3 Ragsdell, K. M. and Phillips, D. T. Optimal design of a class of welded structures using geometric programming. ASME J. Eng. Indus., 1976, 98(2), 1021–1025. 4 Leite, J. P. B. and Topping, B. H. V. Improved genetic operators for structural engineering optimization. Adv. Eng. Softw., 1998, 29(7–9), 529–562. 5 Pham, D. T., Ghanbarzadeh, A., Koc, E., Otri, S., Rahim, S., and Zaidi, M. The Bees Algorithm. Cardiff University Technical Report – MEC 0501, Cardiff Manufacturing Engineering Centre, 2005. 6 Pham, D. T., Ghanbarzadeh, A., Koc, E., Otri, S., Rahim, S., and Zaidi, M. The Bees Algorithm. A novel tool for complex optimisation problems. In Proceedings of the 2nd International Virtual Conference on Intelligent production machines and systems (IPROMS 2006), 2006, pp. 454–459 (Elsevier, Oxford), available from http://www.iproms.org/ 7 Pham, D. T., Ghanbarzadeh, A., Koc, E., and Otri, S. Application of the Bees Algorithm to the training of radial basis function networks for control chart pattern recognition. In Proceedings of the 5th CIRP International Seminar on Intelligent computation in manufacturing engineering (CIRP ICME ’06), 2006, Ischia, Italy, pp. 711–716. 8 Von Frisch, K. Bees: their vision, chemical senses and language, revised edition, 1976 (Cornell University Press, Ithaca, NY). 9 Seeley, T. D. The wisdom of the hive: the social physiology of honey bee colonies, 1996 (Harvard University Press, Cambridge, Massachusetts). 10 Camazine, S., Deneubourg, J.-L., Franks, N. R., Sneyd, J., Theraula, G., and Bonabeau, E. Self-organization in biological systems, 2003 (Princeton University Press, Princeton). 11 Bonabeau, E., Dorigo, M., and Theraulaz, G. Swarm intelligence: from natural to artificial systems, 1999 (Oxford University Press, New York). 12 Karaboga, D. An idea based on honey bee swarm for numerical optimization, Technical Report-TR06, Com- Proc. IMechE Vol. 223 Part C: J. Mechanical Engineering Science Notation b c1 c2 d D D0 e f F G h l L m n nep ngh nsp N P Pc Q t δ ∆ ρ σ σd τ τd ω0 beam width unit volume of weld material cost unit volume of bar stock cost wire diameter mean coil diameter upper limit on outer diameter of the coil number of top-rated sites among m selected sites cost function including setup cost, welding labour cost, and material cost load shear modulus weld thickness weld length fixed distance from load to support number of sites selected out of n visited sites number of scout bees number of bees recruited for the best e sites initial size of patches number of bees recruited for the other (m − e) selected sites number of active coils applied axial load beam buckling load number of inactive coils beam thickness beam end deflection minimum spring deflection mass density of material maximum normal stress in beam allowable normal stress for beam material maximum shear stress in weld allowable shear stress of weld lower limit on surge wave frequency JMES838 © IMechE 2009