21
Hindawi Publishing Corporation Mathematical Problems in Engineering Volume 2012, Article ID 151590, 20 pages doi:10.1155/2012/151590 Research Article Hybrid Optimization Approach for the Design of Mechanisms Using a New Error Estimator A. Sedano, 1 R. Sancibrian, 2 A. de Juan, 2 F. Viadero, 2 and F. Ega ˜ na 3 1 Calculation Department, MTOI, C/Maria Viscarret 1, ´ Artica (Berrioplano), 31013 Navarra, Spain 2 Department of Structual and Mechanical Engineering, University of Cantabria, Avenida de los Castros s/n, 39005 Santander, Spain 3 Mechatronics Department, Tekniker, Avenida Otaola 20, 20600 Eibar, Spain Correspondence should be addressed to R. Sancibrian, [email protected] Received 24 February 2012; Revised 24 April 2012; Accepted 14 May 2012 Academic Editor: Yi-Chung Hu Copyright q 2012 A. Sedano et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited. A hybrid optimization approach for the design of linkages is presented. The method is applied to the dimensional synthesis of mechanism and combines the merits of both stochastic and determin- istic optimization. The stochastic optimization approach is based on a real-valued evolutionary algorithm EA and is used for extensive exploration of the design variable space when searching for the best linkage. The deterministic approach uses a local optimization technique to improve the eciency by reducing the high CPU time that EA techniques require in this kind of applications. To that end, the deterministic approach is implemented in the evolutionary algorithm in two stages. The first stage is the fitness evaluation where the deterministic approach is used to obtain an eective new error estimator. In the second stage the deterministic approach refines the solution provided by the evolutionary part of the algorithm. The new error estimator enables the evaluation of the dierent individuals in each generation, avoiding the removal of well-adapted linkages that other methods would not detect. The eciency, robustness, and accuracy of the proposed method are tested for the design of a mechanism in two examples. 1. Introduction The mechanical design of modern machines is often very complex and needs very sophisticated tools to meet technological requirements. The design of linkages is no exception, and modern applications in this field have increasingly demanding requirements. The design of linkages consists in obtaining the best mechanism to fulfil a specific motion characteristic demanded by a specific task. In many engineering design fields there are three common requirements known as function generation, path generation, or rigid-body guidance 1, 2. Dimensional synthesis deals with the determination of the kinematic parameters of the mechanism necessary to satisfy the required motion characteristics.

Hybrid Optimization Approach for the Design of Mechanisms

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Hybrid Optimization Approach for the Design of Mechanisms

Hindawi Publishing CorporationMathematical Problems in EngineeringVolume 2012, Article ID 151590, 20 pagesdoi:10.1155/2012/151590

Research ArticleHybrid Optimization Approach for the Design ofMechanisms Using a New Error Estimator

A. Sedano,1 R. Sancibrian,2 A. de Juan,2 F. Viadero,2 and F. Egana3

1 Calculation Department, MTOI, C/Maria Viscarret 1, Artica (Berrioplano), 31013 Navarra, Spain2 Department of Structual andMechanical Engineering, University of Cantabria, Avenida de los Castros s/n,39005 Santander, Spain

3 Mechatronics Department, Tekniker, Avenida Otaola 20, 20600 Eibar, Spain

Correspondence should be addressed to R. Sancibrian, [email protected]

Received 24 February 2012; Revised 24 April 2012; Accepted 14 May 2012

Academic Editor: Yi-Chung Hu

Copyright q 2012 A. Sedano et al. This is an open access article distributed under the CreativeCommons Attribution License, which permits unrestricted use, distribution, and reproduction inany medium, provided the original work is properly cited.

A hybrid optimization approach for the design of linkages is presented. The method is applied tothe dimensional synthesis of mechanism and combines the merits of both stochastic and determin-istic optimization. The stochastic optimization approach is based on a real-valued evolutionaryalgorithm (EA) and is used for extensive exploration of the design variable space when searchingfor the best linkage. The deterministic approach uses a local optimization technique to improve theefficiency by reducing the high CPU time that EA techniques require in this kind of applications. Tothat end, the deterministic approach is implemented in the evolutionary algorithm in two stages.The first stage is the fitness evaluation where the deterministic approach is used to obtain aneffective new error estimator. In the second stage the deterministic approach refines the solutionprovided by the evolutionary part of the algorithm. The new error estimator enables the evaluationof the different individuals in each generation, avoiding the removal of well-adapted linkages thatother methods would not detect. The efficiency, robustness, and accuracy of the proposed methodare tested for the design of a mechanism in two examples.

1. Introduction

The mechanical design of modern machines is often very complex and needs verysophisticated tools to meet technological requirements. The design of linkages is noexception, and modern applications in this field have increasingly demanding requirements.The design of linkages consists in obtaining the best mechanism to fulfil a specific motioncharacteristic demanded by a specific task. In many engineering design fields there arethree common requirements known as function generation, path generation, or rigid-bodyguidance [1, 2]. Dimensional synthesis deals with the determination of the kinematicparameters of the mechanism necessary to satisfy the required motion characteristics.

Page 2: Hybrid Optimization Approach for the Design of Mechanisms

2 Mathematical Problems in Engineering

Different techniques have been used for the synthesis of mechanisms including graphical andanalytical techniques [1–3]. Graphical and analytical methods developed in the literature arerelatively restricted because they find the exact solution for a reduced number of prescribedposes and variables. However, during the last decades numerical methods have enabled anincrease in the complexity of the problems by using numerical optimization techniques [4–8].

Despite the work done in dimensional synthesis over recent decades, the design ofmechanisms is still a task where the intuition and experience of the engineers play animportant role. One of the main reasons for this is the large number of variables involved ina strongly nonlinear problem. Under these circumstances the design variable space containstoo many local minima and only some of them can be identified as local solutions. These localsolutions provide an error below a limit established by the designer and can be consideredacceptable. However, only the global minimum leads to the solution that provides thegreatest accuracy and this should be the main objective in the design of mechanisms.

The application of local optimization techniques to the synthesis of mechanisms tookplace mainly during the 80s and 90s. Although other techniques have become more importantin recent years, they remain important so far. Some local search methods have been describedin references [4–6]. The main disadvantage of these methods is their dependence on theinitial point, or initial guess, although they also require a differentiable objective function.Several research works have been done to achieve exact differentiation, which improve theaccuracy and efficiency of these methods. For example, in [5] exact gradient is determined tooptimize a six-bar and eight-bar mechanism. In [6] a general synthesis procedure is obtainedby using exact differentiation and it is applied to different kinds of problems. However, thedependence on the initial point cannot be avoided and therein lies the weakest point of localsearch methods.

Global search methods avoid the dependence on the initial point, but there is a sharpincrease in the computational time necessary to achieve convergence. Genetic algorithms(GAs) [7, 8], evolutionary algorithms (EAs) [9], and Particle Swarm (PS) are some of themost frequently used optimization techniques in the literature. All these techniques mimicthe behaviour of processes found in nature and are based on biological processes.

Genetic and evolutionary algorithms apply the principles of evolution found in natureto the problem of finding an optimal solution. Holland [10] was the first to introduce the GAand DeJong [11] verified the usage. In GA the genes are usually encoded using a binarylanguage whereas in EA the decision variables and objective function are used directly. Ascoding is not necessary, EAs are less complex and easier to implement for solving complicatedoptimization problems. Cabrera et al. [8] used GAs applied to a four-bar linkage in a pathgeneration problem. Some years later Cabrera et al. [9] used EAs to solve more complexproblems in the design of mechanisms. In this case a multiobjective problem is formulatedincluding mechanical advantage in the objective function as a design requirement. In [12] agenetic algorithm is used for the Pareto optimum synthesis of a four-bar linkage consideringthe minimization of two objective functions simultaneously.

Hybrid algorithms with application to the synthesis of linkages have been studiedin recent years. Lin [13] developed an evolutionary algorithm by combining differentialevolution and the real-valued genetic algorithm. Khorshidi [14] developed a hybrid approachwhere a local search is employed to accelerate the convergence of the algorithm. However,these methods are limited to the four-bar mechanism and their application is restricted topath generation problems.

The objective function is based on the synthesis error estimation. The most widelyused error estimator in the literature is Mean Square Distance (MSD). The MSD is used to

Page 3: Hybrid Optimization Approach for the Design of Mechanisms

Mathematical Problems in Engineering 3

measure the difference between the desired parameters and the generated ones. However,this formulation has proven to be ineffective when seeking the optimal solution [15]. Inmany cases the MSD misleads the direction of the design and good linkages generated bythe algorithm can be underestimated. Therefore, error estimation is of the utmost importancefor deterministic and stochastic optimization. In EA the error estimator must be evaluatedfor each individual in each generation and for this reason the lack of accuracy could leadto poor efficiency in the optimization process. To avoid these problems Ullah and Kota [15]proposed the use of Fourier Descriptors that evaluate only the shape differences between thegenerated and desired paths. However, the proposed formulation is limited to closed pathsin path generation problems. An energy-based error function is used in [16] where the finiteelement method is used to assess the synthesis error. This formulation reduces the drawbacksof MSD, but problems with the relative distance between desired and generated parametersremain.

The aim of this work is to propose a new hybrid algorithm that combines anevolutionary technique with a local search optimization approach. Some of the fundamentalsin mechanism synthesis studied in this paper have been extensively discussed in theliterature. However, the originality of this work lies in two aspects: the first one is theintroduction of a new error estimator which accurately compares the function generated bythe candidate mechanism with desired function. The second one is a novel approach basedon the combination of deterministic and stochastic optimization techniques in the so-calledhybrid methods. The flowchart for the optimization process is presented in the paper togetherwith the results and conclusions.

2. Objective Function and Deterministic Optimization Approach

In optimal synthesis of linkages the optimization problem is defined as follows:

minimize F[q(w),w]

subject to Φ[q(w),w] = 0,

g[q(w),w] ≤ 0,

(2.1)

where the objective function F[q(w),w] formulates the technological requirements of themechanism to be designed. The equality constraints Φ[q(w),w] formulate the kinematicrestrictions during the motion, and the inequality constraints g[q(w),w] establish thelimitations in the geometrical dimensions. Vector q(w) is the vector of dependent coordinatesand w is the n-dimensional vector of design variables.

To illustrate the formulation the scheme of a four-bar mechanism in a path generationsynthesis problem is shown in Figure 1. The proposed method can be applied effortlessly toany type of planar mechanism; however, the example in Figure 1 enables the formulation tobe easily understood. The equality constraints are formulated as follows:

Φ[q(w),w]i =

⎧⎪⎪⎪⎨

⎪⎪⎪⎩

L1 cos θ1 + L2 cos(θ20 + θ2i) + L3 cos θ3 + L3 cos θ3

L1 sin θ1 + L2 sin(θ20 + θ2i) + L3 sin θ3 + L3 sin θ3

xg − x0 − L1 cos θ1 − L2 cos(θ20 + θ2i) − L5 cos(θ5 + α)yg − y0 − L1 sin θ1 − L2 sin(θ20 + θ2i) − L5 sin(θ5 + α)

⎫⎪⎪⎪⎬

⎪⎪⎪⎭

= 0, (2.2)

Page 4: Hybrid Optimization Approach for the Design of Mechanisms

4 Mathematical Problems in Engineering

x0y0

P(xg, yg)

α

L1

L2

L3

L4

L5

Generated path

Desired path

θ1

θ2i

θ3

θ4

θ5

θ20

x3y3

x2y2

x1y1

Figure 1: Scheme of the four-bar linkage.

where the vector of design variables contains the geometrical dimensions of the link. That is

wT =[x0 y0 θ1 θ20 L1 L2 L3 L4 L5 α

], (2.3)

and dependent variables are defined as

qT =[θ3 θ4 xg yg

]. (2.4)

An important aspect in dimensional synthesis of linkages is the formulation of the goal orobjective function. The objective function is capable of expressing the difference between thedesired and generated paths (see Figure 1), providing an estimation of the error between thetwo curves irrespective of location, orientation, and size. The minimization of this functionobliges the design variables to be changed and leads to the optimal dimensions of thelinkage which can be expressed as w∗. The generated and desired paths can be either openor closed curves. Figure 2 shows the two paths for the case of two closed curves. In thiswork the definition of both curves is assumed to be specified by a number of points namedprecision points. The precision points are selected by the designer by using vector notationand Cartesian coordinates as follows:

diT =[xid yi

d

]

giT =[xig yi

g

] i = 1, 2, . . . , p, (2.5)

Page 5: Hybrid Optimization Approach for the Design of Mechanisms

Mathematical Problems in Engineering 5

where subscript d stands for desired points, g stands for the generated ones and p is thenumber of precision points. Most of the works in dimensional synthesis propose the MeanSquare Distance to assess the error between the two curves. That is

F =12

p∑

i=1

[(gi − di

)T(gi − di

)]

=12

[(g − d)T (g − d)

]. (2.6)

The deterministic approach used in this paper is based on a local search procedure whichuses first-order differentiation to obtain the search direction. In the synthesis problem thegenerated precision points depend on the vector of design variables and (2.6) should berewritten as follows:

F[q(w),w] =12[g{q(w),w} − d]T [g{q(w),w} − d] (2.7)

which is the objective function that must be minimized subject to the equality and inequalityconstraints to obtain the optimal dimensions of the mechanism. Differentiating (2.7) withrespect to the design variables and equating it to zero provides

∇F[q(w),w] = JT [g{q(w),w} − d] = 0, (2.8)

where J is the Jacobian that can be expressed as,

J =∂g[q(w),w]

∂w=

∂g[q(w),w]∂q(w)

∂q(w)∂w

. (2.9)

With the aim of greater clarity hereafter the dependence on the variables is omitted. The termbetween brackets in (2.8) can be expanded using Taylor series expansion as

∇F ≈ JTg − JTd + JT JΔw = 0. (2.10)

From (2.10) a recursive formula can be obtained as follows:

wj+1 = wj − α JT J[JTg − JTd

]. (2.11)

In this formula the stepsize α has been included in order to control the distance along thesearch direction. In [6] the determination of the stepsize and the exact Jacobian is described.

Differentiation of equality constraints given in (2.1) using the chain rule yields

∂Φ∂q

∂q∂w

+∂Φ∂w

= 0. (2.12)

Page 6: Hybrid Optimization Approach for the Design of Mechanisms

6 Mathematical Problems in Engineering

d1

dp

dp−1

d4

d3d2

g4

g1

gp−1

gp

g3

g2

Figure 2: Desired (d) and generated (g) closed paths.

Thus, (2.9) can be rewritten as

J = −∂g∂q

(∂Φ∂q

)−1 ∂Φ∂w

. (2.13)

All terms in (2.13) can be easily obtained from the objective function and constraints, and theyenable the exact Jacobian to be determined for use in the deterministic optimization method.

If there are inequality constraints in the optimization problem, they can be convertedto equality constraints through the addition of so-called slack variables. That is

gi(w) + v2i = 0. (2.14)

In this way, each inequality constraint adds a new variable that must be included in theformulation.

3. New Error Estimator for EA Algorithms

In EA, lack of accuracy in the error estimation could lead to overestimation of the errorand removal of good individuals from the optimization process. On the other hand,underestimation of the error could lead to selecting individuals who are not better adaptedthan others in fulfilling the goal.

Equation (2.7) is used in many works as the objective function [4–9]. It has been widelyused in deterministic approaches, but it is also used in probabilistic optimization. However,the function itself is an estimator of the error, not a representation of the actual error. Thisfunction depends on the relative position of the two curves and under certain circumstancesthe approximation may not be good enough. For instance, in the case shown in Figure 2 theerror given by (2.7) can be increased or decreased if the generated curve is translated closerto the desired one or away from it, respectively. Moreover, rotation and scaling can be addedto the transformation in order to reduce the error. For practical applications in engineeringthe translation of the curve only entails the translation of the linkage even as the rotationonly needs to change the mechanism orientation. The lack of accuracy of (2.7) can be reducedby selecting the appropriate initial guess linkage in local optimization. However, in EA thisoption is not available and it should be solved using other strategies.

Page 7: Hybrid Optimization Approach for the Design of Mechanisms

Mathematical Problems in Engineering 7

x

y

d1

dpdp−1

d4

d3

d2

g4

g1

gp−1

gp

g3

g2βg

βd

Figure 3: Translation of the desired (d) and generated (g) paths.

Thus, one can say that the error between two curves is minimum if they are comparedby the translation, rotation, and scaling. Therefore, (2.7) could underestimate the error unlesssome transformations are introduced. The first transformation consists of the translation ofthe generated curve towards the desired one. To do that, the geometric centroids of bothcurves are determined by using the precision points as follows:

dc =1p

p∑

i=1

di,

gc =1p

p∑

i=1

gi,

(3.1)

where dc and gc are the coordinates of the geometric centroids for desired and generatedcurves, respectively. The new coordinates of the precision points for the two paths areobtained by translating the geometric centroids to the origin of the reference frame. Thatis

di0 = di − dc,

gi0 = gi − gc.(3.2)

Figure 3 shows the translation of both curves. Thus, the error estimation can be reformulatedin the following way:

E0 =12

p∑

i=1

[(gi0 − di

0

)T(gi0 − di

0

)]

. (3.3)

Obviously, (3.3) reduces the error and is more accurate than (2.7). However, it should bepointed out that it still depends on the order chosen for numbering the precision points. In

Page 8: Hybrid Optimization Approach for the Design of Mechanisms

8 Mathematical Problems in Engineering

other words, (3.3) provides a comparison of the precision points with the same superscript,which depends on the arbitrary choice previously made by the designer. Therefore, it couldbe possible to reduce the error when the order of numbering is changed. Therefore, removingthe effect of the numbering requires the formulation of p error estimators. For the case of twoclosed curves, as shown in Figure 3, the following matrix can be written:

⎢⎢⎢⎢⎢⎢⎣

g10 − d1

0 g2 − d10 · · · gp−1 − d1

0 gp0 − d10

g20 − d2

0 g30 − d2

0 · · · gp0 − d20 g1

0 − d20

......

......

...gp−1

0 − dp−10 gp0 − dp−1

0 · · · gp−30 − dp−1

0 gp−20 − dp−1

0

gp0 − dp

0 g10 − dp

0 · · · gp−20 − dp

0 gp−10 − dp

0

⎥⎥⎥⎥⎥⎥⎦

p×p

. (3.4)

Each column of (3.4) gives the terms of the error estimator for each possible combination.Thus, each error estimator can be formulated as the summatory function defined by

Fj =p−j+1∑

i=1

(gi+j−1

0 − di0

)2+

p∑

i=p−j+2

(gi+j−p−1

0 − di0

)2; j = 1, 2, . . . , p, (3.5)

where subscript j stands for the estimator index. Therefore, Fj is a single-valued functionproviding the estimation of the error. A vector can be formulated with all the values given by(3.5)

FT =[F1F2 · · ·Fp

]. (3.6)

Only one of the terms in this vector provides the minimum error and will be selected to formthe objective function. That is

Fm = min(F). (3.7)

The matrix given by (3.4) and the summatory given by (3.5) are only valid for the comparisonof closed-closed curves. However, it is possible to have two other situations: open-open oropen-closed paths. The former case is shown in Figure 4, while the latter is shown in Figure 5.In both cases the number of precision points may be different for the desired and generatedcurves. Thus, the precision points are redefined as follows:

diT =[xid

yid

]; i = 1, 2, . . . , p

grT =[xrg yr

g

]; r = 1, 2, . . . , c

c ≥ p, (3.8)

where c is the number of precision points for the generated curve. Similarly to the closed-closed case, the centroid of the precision points is determined and the curves are translated

Page 9: Hybrid Optimization Approach for the Design of Mechanisms

Mathematical Problems in Engineering 9

d1

dpdp−1d4

d3

d2g4

g1

gc−1

gc

g3

g2

Figure 4: Desired (d) and generated (g) open paths.

d1

dpdp−1d4

d3

d2

g4

g1

gc−1

gc

g3

g2

Figure 5: Desired open path (d) and generated closed path (g).

to the origin of the reference frame. The possible combinations that allow the estimation ofthe error are given by the following matrix:

E =

⎢⎢⎢⎢⎢⎢⎢⎣

g10 − d1

0 g20 − d1

0 · · · gc−p0 − d10 gc−p+1

0 − d10

g20 − d2

0 g30 − d2

0 · · · gc−p+10 − d2

0 gc−p+20 − d2

0...

......

......

gp−10 − dp−1

0 gp0 − dp−10 · · · gc−2

0 − dp−10 gc−1

0 − dp−10

gp0 − dp

0 gp+10 − dp

0 · · · gc−10 − dp

0 gc0 − dp

0

⎥⎥⎥⎥⎥⎥⎥⎦

p×(c−p+1)

. (3.9)

The sum of the squared elements of each column in (3.9) leads to

Fj =p∑

i=1

(gi+j−1

0 − di0

)2; j = 1, 2, . . . , c − p + 1. (3.10)

Equation (3.10) provides the different error estimators and the minimum value given by thisformula is selected as the objective function.

Page 10: Hybrid Optimization Approach for the Design of Mechanisms

10 Mathematical Problems in Engineering

When the desired path is an open curve and the generated path is a closed curve (seeFigure 5), the aforementioned process can be used. However, the error estimator should beadapted to this situation. That is

E =

⎢⎢⎢⎢⎢⎢⎢⎣

g10 − d1

0 g20 − d1

0 · · · gc−10 − d1

0 gc0 − d10

g20 − d2

0 g30 − d2

0 · · · gc0 − d20 g1

0 − d20

......

......

...gp−1

0 − dp−10 gp0 − dp−1

0 · · · gp−30 − dp−1

0 gp−20 − dp−1

0

gp0 − dp

0 gp+10 − dp

0 · · · gp−20 − dp

0 gp−10 − dp

0

⎥⎥⎥⎥⎥⎥⎥⎦

p×c

. (3.11)

Thus, the error estimators can be formulated as follows:

Fj =p∑

i=1

(gi+j−1

0 − di0

)2, 1 ≤ j ≤ c − p + 1,

Fj =c−j+1∑

i=1

(gi+j−1

0 − di0

)2+

p∑

i=c−j+2

(gi+j−c−1

0 − di0

)2, c − p + 1 ≤ j ≤ c.

(3.12)

Equations (3.5), (3.10), and (3.12) provide a better comparison because they remove the effectof the translation and avoid the influence of the numbering. However, the error estimationcan be enhanced by rotation and scaling. Indeed, if the generated curve is rotated and scaledwith respect to the desired one, the difference between the two curves could be reduced. Todo this, two new parameters must be introduced. The first one is a reference angle whichprovides the orientation of each curve. In Figure 2 the orientation angles are given by βd andβg . In practical design of mechanisms the modification of βg implies the rotation of the wholelinkage in the plane, which is allowed for most of the cases. The second parameter is thescaling factor s. This parameter allows the generated curve to be expanded or contracted toreduce the difference with respect to the desired path. For the case of closed-closed curvesthe introduction of the rotation and scaling factor in the formulation modifies equations asfollows:

Fm

(βg, s

)=

p−j+1∑

i=1

[sAgi+j−1

0 − di0

]2+

p∑

i=p−j+2

(sAgi+j−p−1

0 − di0

)2; j = 1, 2, . . . , p, (3.13)

where

A(βg

)= A =

[cos βg − sin βgsin βg cos βg

]

, (3.14)

is the rotation matrix and provides the rotation of the generated precision points.The error estimator given by (3.13) is now the objective function in a local optimization

subproblem with two variables, βg and s. This optimization subproblem attempts to find thebest orientation and size of the generated curve (and also the linkage) in order to reduce the

Page 11: Hybrid Optimization Approach for the Design of Mechanisms

Mathematical Problems in Engineering 11

error with respect to the desired path. The objective functions for the open-open curves maybe readily derived as

Fm

(βg, s

)=

p∑

i=1

(sAgi+j−1

0 − di0

)2; j = 1, 2, . . . , c − p + 1, (3.15)

and (3.12) for the open-closed curves becomes

Fm

(βg, s

)=

p∑

i=1

(sAgi+j−1

0 − di0

)2, 1 ≤ j ≤ c − p + 1,

Fm

(βg, s

)=

c−j+1∑

i=1

(sAgi+j−1

0 − di0

)2+

p∑

i=c−j+2

(sAgi+j−c−1

0 − di0

)2, c − p + 1 ≤ j ≤ c.

(3.16)

These expressions might suggest that the problem must be solved as an optimization withtwo variables. However, the authors’ experience shows that better results are obtainedwhen the problem is solved independently for each variable. In other words, the resultsobtained are very accurate when the rotation optimization problem is solved before thescaling problem.

In summary, the aforementioned transformations are the core of the comparisonbetween the desired curve and the candidate, avoiding the influence of location, orientation,and size all at once. This provides an important contribution that improves the efficiency inthe exploration of the search space when using evolutionary algorithms.

4. Hybrid Approach for the Synthesis of Mechanisms

The design space of linkages contains a large number of local minima. Deterministicapproaches based on local optimization start from a random point converging to the nearestlocal minimum. Thus, the solution may be an unsatisfactory solution because the designspace is not sufficiently explored. The strength of stochastic optimization approaches lies insearching the entire design space of the design variables in order to locate a region with thelowest values of the objective function. This region probably contains the global minimum.However, the cost of the computational time required to achieve the convergence by usingEA could be very expensive when an accurate solution is demanded. Local search approachesneed less time to achieve solutions, but the accuracy depends on the quality of the initialguess. To ensure convergence and enhance its ratio hybrid methods combine the benefits ofboth techniques. The main advantages expected from this approach are the generality andtotal independence of the initial guess. The evolutionary process for searching among theoptima is briefly outlined below.

4.1. Evolutionary Strategy

It should be highlighted that the efficiency of an evolutionary algorithm is given by both thequality of the objective function and the structure of the chromosomes and their genes. Inthis work the objective function is formulated as was described in the previous section. The

Page 12: Hybrid Optimization Approach for the Design of Mechanisms

12 Mathematical Problems in Engineering

chromosomes are encoded using real-valued genes instead of a binary code because severalworks [9, 13] have demonstrated the advantages of this procedure in the design of linkages.Thus, each gene gives the real value of a design variable in the mechanism to be synthesizedand all genes are grouped in a chromosome which in classical optimization is known as thevector of design variables. That is

wTr,g =

[w1,g w2,g · · · wm,g

]; r = 1, 2, . . . , rmax, (4.1)

where m represents the dimensionality of wr,g , g is the generation subscript, and rmax isthe number of individuals in each generation. The dimension of w is given by the type ofmechanism to be synthesized and the kind of coordinates used in their definition. In this worknatural coordinates are used for this purpose, as well as in the definition of the generated anddesired paths. The starting and successive populations are randomly generated:

Pg = wr,g ; r = 1, 2, . . . , rmax; g = 1, 2, . . . , gmax, (4.2)

where gmax is the number of generations. In this work rmax does not change during theoptimization process so the population neither increases nor decreases. After a generation hasbeen created, the fitness of each individual is evaluated in order to sort them for the selection.The evaluation of the fitness depends on the type of curves involved in the problem, selecting(3.13), (3.15) or (3.16) according to the case. The algorithm uses an elitism strategy in order topreserve the best individuals for the next generation. To obtain the number of best individualsan elitism factor, ef, is used as follows:

nE = Round (ef rmax), (4.3)

where nE is the number of individuals whose genetic information is preserved for thefollowing generation. After that, the tournament selection starts and the parents are chosenfor reproduction. The first step in reproduction is to establish the number of offspringgenerated by the crossover, whose valued is given by the following formula:

nC = Round [rf(rmax − nE)], (4.4)

where nC is the number of offspring generated by the crossover operator and rf is thereproduction factor. Mutation is another operator used to change the genes randomly duringthe reproduction. The number of offspring affected by mutation is given by

nM = rmax − nE − nC. (4.5)

Thus, the number of parents is twice the number of offspring selected for crossover plus thenumber of individuals selected for mutation. To decide whether or not it should become amember for reproduction, the roulette wheel method [8] is used for the selection of parentsfrom the complete population. The number of slots in the roulette is equal to the number ofindividuals and the size of the slots is equal to their expectation. Once the parents are selected,crossover is used to increase the diversity of the individuals in the complete population.

Page 13: Hybrid Optimization Approach for the Design of Mechanisms

Mathematical Problems in Engineering 13

Crossover generates the offspring by taking genetic information from the two parents. Thechromosomes of the descendents are obtained using the arithmetic mean of the same genestaken from each parent using a random coefficient with normal distribution. The mutationoperator is controlled by two coefficients. The first one is the scale, sM, which controls therange of the variation allowed in the genes. The second one is the shrink coefficient, hM.This coefficient allows mutations with a wider interval of variation in the first generationsbut gradually reduces this interval in the following generations. In this way the algorithmprovides exploration and exploitation of the global optimum and maintains a suitable balanceduring the optimization process. The authors have verified that the control of the shrinkcoefficient is fundamental to obtain the optimal solution when the range of the designvariables is very different.

After the reproduction has finished for one generation, the new generation is evaluatedby using the fitness value for every individual and the same process is repeated until theconvergence of the evolutionary algorithm is achieved. Different convergence criteria maybe used to stop the algorithm. The first one is based on the accuracy obtained for the bestindividual in the last generation, but a limit in the number of generations is also establishedto stop the process. Once the convergence is achieved, the fitness of the last generation isevaluated and a family of best individuals is obtained. The family of best individuals isselected from those linkages whose fitness value is below a threshold. This family of linkagesis used as the initial guess for the deterministic approach to form the hybridization processwhich is described in the following subsection.

4.2. Hybrid Algorithm

Figure 6 shows the flowchart of the hybrid algorithm including the stochastic anddeterministic optimization. On the left-hand side of Figure 6, the scheme of the evolutionarytechnique is shown. The right side in the same figure shows the deterministic part of thehybrid algorithm. The algorithm starts with the definition by the designer of the desiredfunction based on the required motion for the linkage. The designer also establishes the EAparameters that will be used in the algorithm (e.g. the operators for selection, crossover,etc.). After that the optimization process starts with the generation of the first population.The fitness evaluation of this first generation requires the estimation of the error by usingdeterministic optimization to obtain the orientation angle, βg , and scaling factor, s. If thefitness value is below a threshold, a family of linkages is selected to be optimized by thedeterministic approach. This rarely occurs in the first generation and several generationsare necessary to cross from the probabilistic approach to the deterministic optimization asis shown in Figure 6. The deterministic approach uses the best individuals selected fromthe evolutionary algorithm which are called Family 1. These individuals are optimizedirrespective of their fitness values because local optimization could lead to obtainingbetter individuals among those with worse initial expectation. The deterministic approachoptimizes each individual independently to obtain a second family called Family 2. Thesolution is selected as the best linkage of this second family.

5. Numerical Examples

In this section two examples are presented in order to demonstrate the capacity of thehybrid algorithm. In the first example a four-bar mechanism is selected to be synthesized to

Page 14: Hybrid Optimization Approach for the Design of Mechanisms

14 Mathematical Problems in Engineering

Setting EA parameters

Fitness evaluation

Error estimation

Convergence?

Family 1 of solutions- Solution 1- Solution 2- Etc.

Gradient search

Family 2 of solutions- Solution 1- Solution 2- Etc.

Best solution

Yes

No

EA operators: selection,crossover, mutation, etc.

New generation

Glo

bal s

earc

h(s

toch

asti

c)Initial population, P0

Definition of the desiredfunction, d

Loc

al s

earc

h(d

eter

min

isti

c)

Figure 6: Flowchart of the hybrid algorithm.

generate a right angle path. The example does not correspond to any actual implementationin engineering design, but this type of path is a challenging objective and demonstratesthe accuracy, robustness, and efficiency of the proposed approach. The second example isa practical application in the design of an actual machine. The results in these examples aredivided into two stages. The first one is the result obtained by the evolutionary algorithmand the second one is the result obtained by the complete hybrid algorithm which includesthe local optimization approach in the dimensional synthesis.

5.1. Four-Bar Linkage Generating a Right Angle Path

In this example the methodology is applied to the synthesis of a four-bar mechanism. Thescheme of the mechanism is the same as that used in Section 2 (see Figure 1). Likewise theconstraints and design variables are given by (2.2) and (2.3), respectively. The aim of theproblem is that the coupler point, P, of the synthesized linkage describes a right angle pathduring the motion. The path is defined by 11 prescribed points whose coordinates are shownin the first two rows in Table 1. Table 2 shows the values of the operator factors used in theevolutionary algorithm. It is important to highlight the small size of the population and themaximum number of generations.

The best resulting mechanism and the path followed by the coupler point in theevolutionary part of the algorithm is shown in Figure 7(a), in addition to the desired precisionpoints. The evolutionary algorithm takes 189.59 seconds to achieve the convergence with anerror of 2.439 mm2 using an Intel Core I5 PC. As can be observed in this figure, the generatedpath approximates well to the desired one; however, there is clearly a lack of accuracy. In

Page 15: Hybrid Optimization Approach for the Design of Mechanisms

Mathematical Problems in Engineering 15

Table 1: Desired path and the path generated at the convergence with the proposed algorithm.

Paths 1 2 3 4 5 6 7 8 9 10 11

Desired (mm) xd 0 0 0 0 0 0 3.00 6.00 9.00 12.00 15.00yd 15.00 12.00 9.00 6.00 3.00 0 0 0 0 0 0

EA (mm) xg 0.21 0.06 0.08 −0.24 −0.29 0.82 2.96 5.70 8.77 11.92 14.97yg 15.33 12.20 8.75 5.27 2.76 1.14 0.03 −0.59 −0.68 −0.17 0.94

Hybrid (mm) xs 0.22 −0.16 −0.18 0.04 0.11 0.00 3.00 5.99 9.00 12.01 14.93ys 14.95 12.01 8.99 6.00 2.98 0.24 0.05 −0.17 −0.26 −0.11 0.32

Table 2: Values of the different factors used in the evolutionary algorithm.

EA factors rmax gmax ef rf sM hMValues 150 10 0.02 0.8 0.8 0.4

order to compare the result with the desired path, the third and fourth rows of Table 1 showthe coordinates of the generated points. The solution for the hybrid algorithm is shown inFigure 7(b) where the path followed by the coupler point fits very well with the desired one.In the last two rows of Table 1 the coordinates of the generated path are shown and the lastrow of Table 3 shows the values for the design variables.

The error at convergence is 0.2025 mm2 and the time necessary to achieve theconvergence was 212 seconds, which is a very reasonable computational cost in this kindof problem.

Since it is stochastic, the results differ each time the algorithm runs. In order to evaluatethe robustness, the algorithm was run 30 times and the sample mean error obtained atconvergence was 0.309 mm2 with a sample standard deviation of 0.211 mm2. The samplemean CPU time to achieve the convergence was 215.05 seconds with a standard deviationof 19.031 seconds.

5.2. Application to a Mechanism for Injection Machine

In this example the methodology has been applied to the design of a mechanism for die-castinjection machine. Figure 8(a) shows the scheme of such a machine, where the system forthe injection of zamak alloys is shown at the top. The mould is located below the injectionsystem (not shown in the figure). The system for the displacement of the mould is shown onthe left-hand side of the figure. Figure 8(b) shows the detail of the injection system where it ispossible to see the linkage used for this purpose. The mechanism selected for this applicationis a combination of a four-bar linkage together with a slider-crank mechanism connected bythe coupler link. The motion of the slider follows a straight line pushing the zamak alloythrough the entrance to fill the mould. This motion must be controlled in order to fill themould adequately. To obtain good quality in the manufacturing process a rapid, motion ofthe slider is necessary initially, then a slower motion, and finally a fast backward motionwhen the mould has been filled. This motion of the slider is coordinated with the input linkwhich is driven by an electric motor with constant velocity (see Figure 8(b)). The precisionpoints are set every 18 deg of the motor rotation, or in other words, 20 precision points areselected for a full rotation of the motor. The coordinates of the precision points are shown inTable 4 and the desired motion is dotted in Figure 9.

Page 16: Hybrid Optimization Approach for the Design of Mechanisms

16 Mathematical Problems in Engineering

−10 0 10 20 30−25

−20

−15

−10

−5

0

5

10

15

20

25

(a)

−10 0 10 20 30−25

−20

−15

−10

−5

0

5

10

15

20

25

(b)

Figure 7: (a) Solution with the evolutionary algorithm and (b) with the hybrid algorithm.

Table 3: Design variables.

Design variables x0(mm)

x0(mm)

θ1(rad)

θ20(rad)

L1(mm)

L2(mm)

L3(mm)

L4(mm)

L5(mm)

α(rad)

EA solution −10.47 8.34 0.31 1.68 24.30 14.81 24.48 31.70 4.02 −0.68Hybrid solution −8.01 4.91 0.28 5.50 28.16 16.94 23.05 32.68 7.13 −1.63

The scheme of the mechanism to be synthesized is shown in Figure 10 together withthe twelve design variables. Figure 9 compares the results for the evolutionary algorithm andthe hybrid optimization approach and Table 4 gives the values of the coordinates generatedin all cases. Finally, Table 5 shows the values of the design variables at convergence for theevolutionary algorithm and the hybrid algorithm.

Despite of the difficulty of the problem, the graphical results in Figure 9 show that theevolutionary algorithm provides good accuracy in general; however, in the central part of thecurve the accuracy is lower. The hybrid algorithm enhances the accuracy in this zone andprovides a very good solution.

The sample mean error obtained by the hybrid algorithm is 357.70 mm2 with astandard deviation of 14.07 mm2. The mean CPU time to achieve the convergence is 623.17seconds with a standard deviation of 46.40 seconds.

6. Concluding Remarks

In this paper a hybrid optimization approach has been presented with application to theoptimal dimensional synthesis of planar mechanisms. The objective function is selectedusing a new error estimator defined by means of the precision points. This error estimatorenables the evaluation of the fitness of the function without influence of translation, rotation,and scaling effects. The error estimation is done using a local optimization procedure

Page 17: Hybrid Optimization Approach for the Design of Mechanisms

Mathematical Problems in Engineering 17

Injection system

(a)

Injection mechanism

Electric motor

(b)

Figure 8: (a) Injection moulding machine and (b) detail of the injection system.

Table 4: Desired path and the path generated at convergence with the proposed algorithm.

Desired yd (mm) EA solution yg (mm) Hybrid solution ys (mm)

1 900 892.33 908.62 800 757.53 776.83 600 588.30 587.44 400 417.67 402.75 200 274.19 255.06 190 178.37 165.47 180 137.35 143.28 170 140.40 161.59 160 161.43 161.610 150 173.98 146.811 140 166.79 133.012 130 143.37 123.913 120 113.29 117.414 110 88.23 110.315 100 83.79 104.216 150 125.08 118.417 200 250.88 219.118 500 491.63 496.419 800 777.75 785.520 900 937.63 908.4

providing a very efficient hybrid algorithm. The hybrid algorithm combines the advantagesof both stochastic and deterministic approaches to improve the robustness and accuracy.Two examples have been presented in the paper to demonstrate the capacity of the method.The examples show that the proposed method not only achieves the convergence but alsodemonstrates how the accuracy is improved by the combination of the two procedures.

Page 18: Hybrid Optimization Approach for the Design of Mechanisms

18 Mathematical Problems in Engineering

0 2 4 6 8 10 12 14 16 18 200

100

200

300

400

500

600

700

800

900

1000

Input link position

Slid

er p

osit

on(m

m)

EA solutionHybrid solution

Desired

Figure 9: Desired motion, EA, and hybrid solution.

L1

L2

L3

L4

L5

L6

α

θ4

θ2

θ6

θ1

x5y5

x0y0

θ3

θ10

Figure 10: Scheme of the mechanism for injection.

Page 19: Hybrid Optimization Approach for the Design of Mechanisms

Mathematical Problems in Engineering 19

Table 5: Design variables.

Designvariables

x0(mm)

y0(mm)

θ10(rad)

θ4(rad)

L1(mm)

L2(mm)

L3(mm)

L4(mm)

L5(mm)

L6(mm)

α(rad)

x5(mm)

EA solution 810.92 311.51 2.745 −1.23 517.03 992.82 991.66 1227.4 1161.7 722.41 −0.286 100Hybridsolution 537.39 393.31 2.785 −1.4 416.52 603.75 554.85 724.41 611.08 372.27 0.2437 100

To do this, the examples depict the solution for the case of the evolutionary algorithmworking alone, and then the solution improved by the hybrid algorithm. This showshow the evolutionary algorithm provides an approximation to the solution and then thelocal optimization improves the accuracy. In both examples the solution provides gooddesigns and the generated curves fit very well with the desired ones. In summary, thehybrid algorithm is a valuable tool for the design of mechanisms when highly demandingrequirements are imposed. Thus, the conclusion we draw is that the appropriate combinationof stochastic and deterministic algorithms has an enormous potential in the more effectivesolution of optimization problems in the design of mechanisms. This work will be furtherdeveloped for the solution of other mechanism design problems by adapting the algorithm.Furthermore, another future task in this field aims to improve the efficiency of the hybridoptimizer by using the most recent developments in metaheuristic approaches such asParticle Swarm Optimization and Differential Evolution.

Acknowledgment

This paper has been developed in the framework of the Project DPI2010-18316 funded by theSpanish Ministry of Economy and Competitiveness.

References

[1] F. Freudenstein, “An analytical approach to the design of four-link mechanisms,” Transactions of theASME, vol. 76, pp. 483–492, 1954.

[2] G. N. Sandor, A general complex number method for plane kinematics synthesis with applications [Ph.D.thesis], Columbia University, New York, NY, USA, 1959.

[3] A. G. Erdman, “Three and four precision point kinematic synthesis of planar linkages,” Mechanismand Machine Theory, vol. 16, no. 3, pp. 227–245, 1981.

[4] S. Krishnamurty and D. A. Turcic, “Optimal synthesis of mechanisms using nonlinear goalprogramming techniques,” Mechanism and Machine Theory, vol. 27, no. 5, pp. 599–612, 1992.

[5] J. Mariappan and S. Krishnamurty, “A generalized exact gradient method for mechanism synthesis,”Mechanism and Machine Theory, vol. 31, no. 4, pp. 413–421, 1996.

[6] R. Sancibrian, P. Garcıa, F. Viadero, and A. Fernandez, “A general procedure based on exact gradientdetermination in dimensional synthesis of planar mechanisms,” Mechanism and Machine Theory, vol.41, no. 2, pp. 212–229, 2006.

[7] A. Kunjur and S. Krishnamurty, “Genetic algorithms in mechanical synthesis,” Journal of AppliedMechanism and Robotics, vol. 4, no. 2, pp. 18–24, 1997.

[8] J. A. Cabrera, A. Simon, and M. Prado, “Optimal synthesis of mechanisms with genetic algorithms,”Mechanism and Machine Theory, vol. 37, no. 10, pp. 1165–1177, 2002.

[9] J. A. Cabrera, F. Nadal, J. P. Munoz, and A. Simon, “Multiobjective constrained optimal synthesis ofplanar mechanisms using a new evolutionary algorithm,” Mechanism and Machine Theory, vol. 42, no.7, pp. 791–806, 2007.

[10] J. H. Holland, Adaptation in Natural and Artificial Systems, The University of Michigan Press, AnnArbor, Mich, USA, 1975, An introductory analysis with applications to biology, control, and artificial

Page 20: Hybrid Optimization Approach for the Design of Mechanisms

20 Mathematical Problems in Engineering

intelligence.[11] K. A. DeJong, An analysis of the behaviour of a class of genetic adaptive system [Ph.D. thesis], University of

Michigan, Ann Arbor, Mich, USA, 1975.[12] N. Nariman-Zadeh, M. Felezi, A. Jamali, and M. Ganji, “Pareto optimal synthesis of four-bar

mechanisms for path generation,” Mechanism and Machine Theory, vol. 44, no. 1, pp. 180–191, 2009.[13] W. Y. Lin, “A GA-DE hybrid evolutionary algorithm for path synthesis of four-bar linkage,”

Mechanism and Machine Theory, vol. 45, no. 8, pp. 1096–1107, 2010.[14] M. Khorshidi, M. Soheilypour, M. Peyro, A. Atai, and M. S. Panahi, “Optimal design of four-bar

mechanisms using a hybrid multi-objective GA with adaptive local search,” Mechanism and MachineTheory, vol. 46, no. 10, pp. 1453–1465, 2011.

[15] I. Ullah and S. Kota, “Optimal synthesis of mechanisms for path generation using fourier descriptorsand global search methods,” Journal of Mechanical Design, vol. 119, no. 4, pp. 504–510, 1997.

[16] I. Fernandez-Bustos, J. Aguirrebeitia, R. Aviles, and C. Angulo, “Kinematical synthesis of 1-dofmechanisms using finite elements and genetic algorithms,” Finite Elements in Analysis and Design,vol. 41, no. 15, pp. 1441–1463, 2005.

Page 21: Hybrid Optimization Approach for the Design of Mechanisms

Submit your manuscripts athttp://www.hindawi.com

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

MathematicsJournal of

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Mathematical Problems in Engineering

Hindawi Publishing Corporationhttp://www.hindawi.com

Differential EquationsInternational Journal of

Volume 2014

Applied MathematicsJournal of

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Probability and StatisticsHindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Journal of

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Mathematical PhysicsAdvances in

Complex AnalysisJournal of

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

OptimizationJournal of

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

CombinatoricsHindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

International Journal of

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Operations ResearchAdvances in

Journal of

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Function Spaces

Abstract and Applied AnalysisHindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

International Journal of Mathematics and Mathematical Sciences

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

The Scientific World JournalHindawi Publishing Corporation http://www.hindawi.com Volume 2014

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Algebra

Discrete Dynamics in Nature and Society

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Decision SciencesAdvances in

Discrete MathematicsJournal of

Hindawi Publishing Corporationhttp://www.hindawi.com

Volume 2014 Hindawi Publishing Corporationhttp://www.hindawi.com Volume 2014

Stochastic AnalysisInternational Journal of