You are on page 1of 5

Int J Adv Manuf Technol (2005) 27: 2–6

DOI 10.1007/s00170-004-2162-z

ORIGINAL ARTICLE

Jean-Luc Marcelin

Using genetic algorithms for the optimization of mechanisms

Received: 27 November 2003 / Accepted: 27 February 2004 / Published online: 26 January 2005
© Springer-Verlag London Limited 2005

Abstract This work examines the possibility of using genetic methods are also very effective for problems of optimization of
algorithms for the optimization of the loads transmitted in mech- mechanisms.
anisms. The variables of design are the relative positions of In the past, the genetic algorithms method was used within
the various connections, considered in a comparative manner. the framework of various mechanical problems. These algo-
The minimization of the loads transmitted in the connections is rithms appeared very effective, and may play an interesting role
achieved by optimizing the respective positions of those lead to in a process of integrated design [2, 3]. The potential of these al-
less expensive solutions for bearings and sections of beams. The gorithms was also shown in the difficult case of the optimization
examples show that using this stochastic method is an efficient of the gears [1], and in the optimization of the supports with ap-
way to minimize loads in mechanisms. plications for fastening in machining [4]. In [5], the possibility
of using some genetic algorithms and some neural networks to
Keywords Genetic algorithms · Mechanisms · Optimization optimize mechanisms in their globality is examined; a detailed
example of a gear box shows that using this stochastic method
and neural networks is very efficient. We can speak thus of
1 Introduction a metamodel for optimization, in a context of integrated design.
In [6], a multi-objective optimization of hand prosthesis, four-bar
Stochastic methods of optimization, such as genetic algorithms, mechanisms is performed with reference to seven positions, with
are being used more and more for the optimal design of mechan- respect to five design criteria. In [7], the prevalent mathematical
ical systems. The principal advantages of genetic algorithms are programming neural network (MPNN) models are surveyed, and
an assured convergence without use of derivatives and functions MPNN models are developed and applied to the unconstrained
with discrete and non-derivable variables. On the other hand, the optimization of mechanisms. In [8], the optimization of the tran-
deterministic methods of optimization, known as methods of gra- sient dynamical behavior of mechanisms is addressed.
dient, require a reliable calculation of the sensitivities. This is This paper tackles the problem of optimizing the loads trans-
often difficult, or even impossible, for certain problems of me- mitted in mechanisms under certain restrictive criteria. These
chanical technology with discrete variables. assumptions are as follows: (a) we remain within the frame-
The detractors of the stochastic methods of optimization work of fixed topologies and we consider isostatic or slightly
point out an important volume of calculations, especially in the hyperstatic mechanisms. In this sense, the principal objective is
case of a method of analysis of the finite element type. Never- to minimize the transmitted loads in each connection; (b) the
theless, in certain cases of application in mechanical technology variables of design are the relative positions of the various con-
as the optimization of gears (a problem in which the variables nections, considered in a comparative manner; and (c) we respect
of design are primarily discrete) [1], these methods are effect- certain technological limitations by excluding certain zones of
ive because the volume of calculations remains reasonable. In the plan or space for preset connections.
this case, the use of a method of gradient would be very dif- We show through examples that the procedure described in
ficult because the derivatives of the objective function and the this paper makes it possible to optimize the mechanisms effec-
limitations are difficult to calculate. We will show that these tively. Indeed, the minimization of the loads transmitted in the
connections by optimizing the respective positions of those lead
J.-L. Marcelin components, compared to less expensive solutions for bearings
Laboratoire Sols, Solides, Structures, and sections of beams. The minimization of loads transmitted
UMR CNRS C5521,
BP 53 38041, Grenoble Cedex 9, France in the connections thus minimizes the weight of the mechanism,
E-mail: Jean-Luc.Marcelin@ujf-grenoble.fr therefore resulting in its optimization.
3

• Probability of crossing Pcrossing,


2 Methods • Probability of mutation Pmutation.
2.1 Genetic algorithms It is clear that the algorithm gives better results when the
values chosen for the first two parameters are large (within the
The genetic algorithms seek the optimal solutions of a given limits of capacity of the computer equipment used). In practice,
problem by simulating the process of evolution and adaptation of the number of individuals of a population will be about 1 to 5
living organisms. The problem is translated into terms of maxi- times the number of the chromosome digits. However, the prob-
mization of an objective function in a space with N dimensions. abilities of crossing and mutation are more difficult to choose. It
The starting point is a randomly chosen population of individu- has been shown that mutation is a phenomenon much less fre-
als that are coded by binary numbers, called chromosomes. After quent than crossing; in [9], the following values are advised:
this departure, the genetic algorithm randomly generates a new
Pcrossing = 0.60
population, formed of individuals increasingly ready to adapt to
a well defined environment. The process uses three operators: Pmutation = 0.03
• Reproduction These advised values are the result of a numerical experimenta-
• Crossing tion on many examples. In any event, the probability of crossing
• Mutation must be higher than the probability of mutation, since mutation
The GA (Genetic Algorithms) are now well known, because they is less frequent [9]. For example, if any mutation is removed,
are frequently used. Details can be found in [9–11]. the algorithm converges towards an extremum, but there are few
chances that it is the absolute extremum. In theory, convergence
is obtained when all the values of the costs of a population are
2.2 Optimization of mechanisms stabilized around a maximum value. In practice, convergence is
rather slow with tops and bottoms due to the algorithm’s nature.
Optimization consists of coupling a calculation program of stan-
The user can stop the process when the maximum value of the
dard mechanisms (called in the continuation analysis program)
cost of a population does not evolve any more. The user then
with the genetic algorithm. Upon request, the analysis program
manually selects the most interesting individuals of the final pop-
provides the efforts transmitted in each connection, according to
ulation in order to compare their merits.
the parameters of the problem, which are primarily the relative
positions of the various connections.
3 Results
2.3 Formulation of the optimization problem
3.1 Test 1
The correct formulation of the optimization problem is essential
in achieving effective and technologically valid solutions. This This first test is very simple, used to validate the strategy Imple-
consists in defining an objective function (even multi-objective, mented. It acts to optimize the two connections’ position defined
which will be the minimization of the transmitted efforts’ com- on Fig. 1. It is a question of optimizing the relative position of
ponents), to choose a set of independent variables of design, and these two connections (linear, annular, and kneecap). The vari-
to define the technological limitations in terms of equalities or in- ables of optimization are the quantities a, b and c of Fig. 1. The
equalities on the variables of design. The formulation depends on units are the mm for the lengths, and N for the loads. The con-
the problem arising and conditions of the final solution. We will straints of optimization are:
give examples of formulation in the test cases later in the paper. 30 < a < 40 ,
60 < b < 70 ,
2.4 The particularities in the case of the use of the AG and: 40 < c < 80 .
There are two difficulties with AG: (a) the first issue is the prob- External efforts are applied to point M, with values (in the ref-
lem of setting up a solution-coding in the form of chromosomes erence x, y, z): XM = −1000 N, YM = 10 000 N and ZM =
which is simple and effective; secondly, we must then take into 3000 N. The analytical solution of this isostatic mechanism
account the technological limitations correctly, which is not im- shows that the variable of design b appears systematically with
mediate in the case of the use of a genetic algorithm. One can the denominator of the expressions of the transmitted loads. The
take multi-objective functions or carry out a penalization of the analytical solution minimizing these transmitted loads is thus b
objective function by limitations as indicated in [12]. Before equal to its maximum value of 70 mm, which we will check
each execution, the genetic algorithm requires the user to specify thereafter. Now, considering the definition of the problem of op-
the values of the following parameters: timization, let F be the square root of the sum of squares of the
• The number of individuals in a population, components of the loads transmitted by connections A and B:
• The maximum number of generations,  1/2
• The chromosomes’ length, F = YA2 + ZA2 + XB2 + YB2 + ZB2 .
4

The table of coding decoding for c is as follows:


0000 0001 0010 0011
40 42 44 47
0100 0101 0110 0111
50 53 56 59
1000 1001 1010 1011
62 65 68 71
1100 1101 1110 1111
73 76 78 80
It can be noted that the limitation of optimization for c is
included in coding.
Fig. 1. Test 1 For example, the chromosome 0000 0101 1101 corresponds
to: a = 30, b = 62.5 and c = 76. One obtains the following result
for optimization by the genetic algorithm:
During the process of optimization, a call with a computation
software of mechanism will be made to calculate these compo- Probability of crossing: 0.7
nents for a, b and c. This will be repeated with each analysis. The Probability of mutation: 0.02
problem of optimization is raised without difficulty in the follow- Generation for which one obtains to best individual: 31
ing terms: to find the minimum of F, by holding account of the Best individual: 0000 1111 1111
constraints of optimization stated before. Decoding of the chromosome: a = 30, b = 70 and c = 80
For the AG, the problem must be posed in a different term, The function objective F is 15 274, which corresponds to
since the AG seeks the maximum and not the minimum of a func- YA = 14285, ZA = 142, XB = 1000, YB = 4285 and ZB =
tion, and requires the coding of a, b and c. Therefore, the problem 3142. It can be noted that the b optimum is the b announced of
can be expressed in the following way: to find the maximum of 70 mm.
N − F, N is a sufficiently large constant so that expression N − F
is always positive. The coding of a, b and c is carried out for each 3.2 Test 2: optimization of a 3D mechanism
one of these variables with four binary digits, which one arranges
end to end for chromosomes in a total of 12 binary digits. The We want to optimize the position of the connections of a mech-
table of coding decoding for a is as follows: anism of movement transformation whose diagram is given in
Fig. 2. It is composed of a beam, three solids and a fixed frame.
0000 0001 0010 0011 The units are N for the forces and m for the lengths. The beam
30 30.5 31 31.5 of entry is connected to the point M, where there is an applied
0100 0101 0110 0111 effort, corresponding to Z, of 100 N. The distance CM is 0.5 m.
32 32.5 33 34 This beam is connected to a first solid CB by a pivot connec-
tion. Solid CB is connected to a second solid AB by a slide
1000 1001 1010 1011 connection. Solid AB is connected to a third solid AO by a slide
35 36 37 38 connection. Lastly, solid AO is connected to the fixed frame by
1100 1101 1110 1111 a pivot connection of vertical axis.
38.5 39 39.5 40 Our objective is to minimize the loads in each connection of
the mechanism, with the goal of dimensioning these connections
It can be noted that the limitation of optimization for a is
at a lower cost. A standard software of static study of mechan-
included in coding.
ism makes it possible to calculate for a given configuration of
The table of coding decoding for b is as follows:
the mechanism the loads transmitted in the various connections.
For the needs of our test, we will take as function objective min-
0000 0001 0010 0011
imizing F (as in the preceding example), the square root of the
60 60.5 61 61.5
quadratic sum of all the components of loads and moments of
0100 0101 0110 0111 all the connections. As for the variables of design which define
62 62.5 63 64 the relative positions of the various connections compared to the
1000 1001 1010 1011 others, one can use four of them that are independent. These vari-
65 66 67 68 ables appear on Fig. 2 and are labelled a, b, c, and α. It should be
1100 1101 1110 1111 noted that the angle β is fixed and is worth 20◦ .
68.5 69 69.5 70 The limitations on these variables of design are as follows:

It can be noted that the limitation of optimization for b is 0.1 < a < 0.5
included in coding. 0.2 < b < 0.8
5

The table of coding/decoding for c is as follows:


0000 0001 0010 0011
0.10 0.15 0.17 0.20
0100 0101 0110 0111
0.22 0.25 0.27 0.30
1000 1001 1010 1011
0.32 0.35 0.37 0.40
1100 1101 1110 1111
0.42 0.45 0.47 0.50
The table of coding/decoding for α is as follows:
0000 0001 0010 0011
20 22 24 25
0100 0101 0110 0111
26 27 28 29
1000 1001 1010 1011
30 31 32 33
1100 1101 1110 1111
34 36 38 40
It is seen that the limitations of the problem, in particular
those on the variables of design, are integrated in coding. Thus,
it is not necessary to penalize the objective function which will
be of the type N − F (N constant very large). For a population of
30 individuals, of 50 generations, of a 0.8 probability of cross-
Fig. 2. Test 2
ing, and a 0.1 probability of mutation, the AG leads quickly to
the following solution: a = 0.35, b = 0.5, c = 0.2, α = 36◦ which
corresponds to chromosome 1001011100111101 and for which
0.1 < c < 0.5 F = 1752.
20◦ < α < 40◦

We voluntarily limit the coding of the four variables of design to 4 Conclusion


a binary chromosome of 16 digits on the whole, with four digits
per variable according to the tables of coding and decoding. This study showed the effectiveness and simple application ge-
The table of coding/decoding for a is as follows: netic algorithms to address the problem of optimizing mech-
0000 0001 0010 0011 anisms, as compared to the deterministic methods. This basic
0.10 0.15 0.17 0.20 study provides a first consideration of feasibility and will be sup-
0100 0101 0110 0111 plemented in the near future with examples dealing with more
0.22 0.25 0.27 0.30 complex problems.
Indeed, the test of a topological optimization of mechan-
1000 1001 1010 1011 ism seems completely achievable because stochastic techniques
0.32 0.35 0.37 0.40 are well adapted to these primarily discrete problems. Further-
1100 1101 1110 1111 more, calculations of mechanism are relatively efficient in terms
0.42 0.45 0.47 0.50 of computing times, compared to structural analyses by finite
The table of coding/decoding for b is as follows: elements.
0000 0001 0010 0011
0.20 0.22 0.25 0.30
0100 0101 0110 0111 References
0.35 0.40 0.45 0.50
1. Marcelin JL (2001) Genetic optimization of gears. Int J Adv Manuf
1000 1001 1010 1011 Technol 17(12):910–915
0.52 0.55 0.60 0.65 2. Marcelin JL (1999) Evolutionary optimization of mechanical Struc-
tures. Eng Optim 31:571–588
1100 1101 1110 1111 3. Marcelin JL (1999) Evolutionary optimization of mechanical structures:
0.70 0.75 0.77 0.80 towards an integrated optimization. Eng Comput 15:326–333
6

4. Marcelin JL (2001) Genetic search applied to selecting support pos- 8. Schulz M, Brauchli H (1998) Optimization of mechanisms and the ef-
itions in machining of mechanical parts. Int J Adv Manuf Technol fect of collisions. Mech Struct Mach 26(4):401–421
17(5):344–347 9. Goldberg DE (1989) Genetic algorithm in search, optimization and ma-
5. Marcelin JL (2004) A metamodel using neural networks and genetic al- chine learning. Addison-Wesley, Boston
gorithms for integrated optimal design of mechanisms. Int J Adv Manuf 10. Koza JR (1992) Genetic programming: on the programming of comput-
Technol 24(9–10):708–714 ers by means of natural evolution. MIT Press, Cambridge, MA
6. Haulin EN, Vinet R (2003) Multiobjective optimization of hand pros- 11. Michalewicz Z (1996) Genetic algorithms + data stuctures = evolution
thesis mechanisms. Mech Mach Theory 38(1):3–26 Programs, 3rd ed. Springer, Berlin Heidelberg New York
7. Li J, Gupta KC (1998) Mechanism design with MP-neural networks. J 12. Marcelin JL, Trompette P, Dornberger R (1995) Optimisation of compos-
Mech Des 120(4):527–532 ite beam structures using a genetic algorithm. Struct Optim 9:236–244

You might also like