A general procedure based on exact gradient determination in dimensional synthesis of planar mechanisms

A general procedure based on exact gradient determination in dimensional synthesis of planar mechanisms

Mechanism and Machine Theory 41 (2006) 212–229 Mechanism and Machine Theory www.elsevier.com/locate/mechmt A general procedure based on exact gradie...

251KB Sizes 30 Downloads 99 Views

Mechanism and Machine Theory 41 (2006) 212–229

Mechanism and Machine Theory www.elsevier.com/locate/mechmt

A general procedure based on exact gradient determination in dimensional synthesis of planar mechanisms R. Sancibrian *, P. Garcı´a, F. Viadero, A. Ferna´ndez Structural and Mechanical Engineering Department, University of Cantabria, Avda.de los Castros s/n, Santander, Cantabria 39005, Spain Received 16 June 2004; received in revised form 23 March 2005; accepted 22 April 2005 Available online 27 June 2005

Abstract In this paper an approximate kinematic synthesis method is presented with general application to path generation, function generation and rigid-body guidance in planar multibody systems. The formulation proposed uses exact differentiation to obtain gradient elements, avoiding the use of numerical differentiation and improving the quality of the search direction. Furthermore, the method permits the use of a large number of prescribed precision points or poses allowing high accuracy in the definition of the trajectory. Ó 2005 Elsevier Ltd. All rights reserved. Keywords: Planar linkages; Dimensional synthesis; Optimization

1. Introduction Generally, to attempt to fulfil the specifications imposed in linkage design entails a long process. It is mainly due to the complexity of the mechanical systems and the difficulty of developing mathematical tools involving all the parameters taking part. Often, the analystÕs experience and judgment predominates upon the information obtained from mathematical methodologies. In these cases, the analyst is obliged to repeat the process several times using his intuition until a *

Corresponding author. Tel.: +34 942201859, fax: +34 942201853. E-mail address: [email protected] (R. Sancibrian).

0094-114X/$ - see front matter Ó 2005 Elsevier Ltd. All rights reserved. doi:10.1016/j.mechmachtheory.2005.04.006

R. Sancibrian et al. / Mechanism and Machine Theory 41 (2006) 212–229

213

suitable solution is obtained. Kinematic synthesis of planar linkages provides valuable tools to help the analyst to take decisions, playing an important role in the design of mechanisms and this importance increases as more performance requirements are demanded [1–4]. Computer aided kinematics provides an important amount of numerical techniques involving different kinds of design parameters and constraints. Thus, the designer can carry out a large number of simulations efficiently, quickly and with low cost. However, due to the real world complexity, not all cases in mechanical design synthesis have been formulated and some of them remain unsolved. Dimensional synthesis is a research field where a lot of effort has been made for many years and a large number of efficient methods have been developed [2–7]. However, a lack of generality is an everpresent drawback in all these methods. It is difficult to find a synthesis procedure adapting well to all kinds of dimensional synthesis problems (i.e. function generation, path generation and rigidbody guidance), it being necessary to apply specific methodologies for each one of them [5–7]. All synthesis problems generate drawbacks with similar characteristics involving a large number of nonlinear equations that are difficult to solve even with the help of a powerful computer. Some linkage applications require high accuracy in the definition of the prescribed requirements. When this occurs, the formulation may lead to a greater number of equations than the number of unknowns. In this case, only approximate synthesis is possible. That means that the solution does not fulfil the requirements exactly, however, based on optimization procedures the error obtained will be reduced to a minimum. Approximate optimization problems can be tackled using global or local methods. Global methods attempt to find the overall best solution. By global we mean that no other solutions fulfil the specifications imposed with a lower synthesis error and no influence is obtained from the starting point of iteration. Continuation methods and more recently genetic algorithms [8,9] are two of the most used global approaches. In general these methods have application when the number of precision poses is not much larger than the number of the formulated equations. On the other hand, local techniques use optimal synthesis methods to search for a local minimum, which means that the solution achieved is the nearest to the initial-guess. In this case, the synthesis error is minimized, but there is no guarantee that other solutions do not exist that could improve the local solution achieved. Local optimization methods can be classified depending on the order of derivatives taking part. Gradient or Jacobian methods are those that require the computation of the first-order derivatives. In this case, derivatives provide valuable information for finding an optimal solution and their computation supposes a crucial issue. Exact or numerical differentiation can be used to obtain the gradient elements. In the latter case, if a finite-difference procedure is used the errors involved in their computation could lead to a less accurate search direction, using more computational time to achieve the optimal solution or, in some cases, failing to find it. On the other hand, methods based on exact differentiation require differentiable expressions in the interval of interest [5,10,11]. The use of exact differentiation has enormous advantages in the algorithm accuracy and improves the efficiency. Some mechanical systems need high accuracy in the trajectory described during the motion, so a large number of precision points or poses must be defined. As the number of prescribed conditions is increased a higher number of variables are involved and more computations are necessary to obtain derivatives. Under these circumstances, the optimization process can be too slow, even stopped without achieving the optimal solution. Exact derivatives have been used by researchers in local optimization synthesis. For instance, Akhras [5]

214

R. Sancibrian et al. / Mechanism and Machine Theory 41 (2006) 212–229

proposed a procedure to obtain the gradient elements in the four-bar linkage. However, this procedure cannot be easily extended to other linkage topologies. Mariappan [11] proposes a method to obtain the exact derivatives independently of the topology, but in this case with application only to path generation problems. Furthermore, this procedure does not obtain a direct relationship between functional parameters and design variables which would give great versatility to the method. In this paper a general method for optimal dimensional synthesis is proposed. The formulation presented is simple and it may be used for solving path generation, rigid-body guidance and function generation in any particular topology in planar mechanisms. The method is based on local optimization and uses exact determination of the gradient to search for the optima. The proposed formulation provides some advantages over other synthesis methods based on the same principles. The first one is the general application of the method. In other words, using the proposed matrix formulation the elements of the gradient can be obtained independently of the linkage topology. Furthermore, the gradient formulation directly relates the requirements imposed on the mechanism to the design variables. This is done including the requirements imposed by the design in the constraints. Thus, the optimization procedure provides a recursive formula obtaining the necessary alteration in the design variables to approximate the generated functional parameters to the desired ones. Finally, the successive linearization of the differentiated objective function allows formulating a large number of precision points or poses. This procedure has been used successfully by the authors in path generation synthesis [12]. Furthermore, problems such as branching or correlation with the input link are computed easily and solved. This fact makes the algorithm a useful method when great accuracy is necessary in the path or position description.

2. Synthesis error and constraint formulation Normally, an optimal synthesis procedure starts with the definition of a set of desired functional parameters obtained from the mechanism requirements. Therefore, these parameters define the expected kinematic behaviour of the mechanism after the synthesis procedure is performed. In a 2D path generation problem, every linkage position requires the definition of at least two desired functional parameters, for instance by means of the coordinates giving the position of the interest point. This vector is: rT = [rxry], where rx and ry are the Cartesian coordinates. In rigidbody guidance, these coordinates give the position of the origin of the local reference frame in the body of interest with respect to the global coordinate system. However, another parameter is necessary to define the orientation of the body using, for example, the angle X. Thus, it can be formulated in the following form: PT ¼ ½rT X

ð1Þ

where P is the vector of the desired functional parameters defining the body position for every precision pose specified by the design. This is a usual way of defining the mechanismÕs requirements in this sort of problem. However, Eq. (1) assumes that no correlation exists between the position of the rigid-body and the input link. Many times this correlation is imposed by the design requirements transforming the problem into a correlated system. Therefore, Eq. (1) becomes

R. Sancibrian et al. / Mechanism and Machine Theory 41 (2006) 212–229

h i Pðhjin ÞT ¼ rðhjin ÞT Xðhjin Þ ;

j ¼ 1; 2; . . . ; n

215

ð2Þ

where hjin is the angle defining the position of the input link in position j and n represents the total number of prescribed positions. If two consecutive positions are considered the synthesis requirements are given by j djd ¼ Pðhjþ1 in Þ  Pðhin Þ;

j ¼ 1; 2; . . . ; n  1

ð3Þ

where djd is a measure of the changes undergone by the desired functional parameters between two consecutive positions. Once the requirements have been imposed using Eq. (3) the synthesis process begins. Other parameters could be established together with Eq. (3) relative to special requirements in the mechanism such as the space occupied by linkage, the maximum weight expected, etc. The mathematical formulation of an optimal synthesis procedure requires minimizing some kind of function describing some type of error. This function is defined as a measurement of the difference between the desired functional parameters, djd , and the same parameters generated by the linkage during the optimization process, i.e. the generated functional parameters djg . This function is called synthesis error and depends on a set of design variables, z, whose values are altered by the optimization algorithm from the initial-guess to the optimal solution. These design variables represent the dimensions of the links and their optimum values constitute the solution to the dimensional synthesis problem. The formulation of the synthesis error function is crucial and must be done carefully in order to guarantee the convergence in a wide range of situations. In this paper the synthesis error function is formulated as a measurement of how far the generated functional parameters are from the optimal solution. This can be done using the leastsquare concept in the following way: H¼

n1 1X 1 ðdjg  djd ÞT ðdjg  djd Þ ¼ ðdg  dd ÞT ðdg  dd Þ 2 j¼1 2

ð4Þ

Thus, the goal of the synthesis problem is to find a set of design variables, z, for which Eq. (4) is minimal. This formulation gives the same importance to all functional parameters and all positions considered in the problem. However, in order to give relative importance to each precision point or pose, a set of weighted parameters may be defined and introduced in this equation. Eq. (4) is insufficient if linkage characteristics governing the kinematic behavior are not included in some way. In the proposed method, these requirements are formulated by means of constraints. The mechanism obtained by solving the synthesis problem should accomplish exactly all the design requirements contained in the constraint equations. The constraint equations depend on the design variables and coordinates. Dependent coordinates have been selected to describe the system kinematically. The main advantage in the use of this kind of coordinates is that the equations describe the system in a much more easy way. However, it is necessary to introduce a number of constraints equal to the difference between the dependent coordinates and the number of degrees of freedom. Constraint equations can be derived from many sources so they must be classified. Three kinds of constraints can be considered by the proposed method: kinematic, synthesis and additional constraints. These equations can be selected by the analyst with different forms leading to an easier or

216

R. Sancibrian et al. / Mechanism and Machine Theory 41 (2006) 212–229

more difficult formulation in the optimization process. For this reason, this step has a huge importance in the algorithm and special attention should be paid to it. Kinematic constraints describe behavior of the mechanism only from the kinematic point of view, which means they give the relationship between link positions, joints and coordinates during the motion. In fact, the formulation only depends on the topology of the linkage considered and therefore, can be established as geometric conditions. Functional parameters are not involved in these equations, at least in a direct way. Normally, these constraints give a set of nonlinear equations that are valid for all mechanism positions. On the other hand, synthesis constraints relate the design variables and dependent coordinates to the generated functional parameters, djg , whose values are not present in the kinematic constraint and will be compared with the desired ones by means of Eq. (4). Furthermore, these equations hold an important difference with respect to kinematic constraints because they may take into account design variables and dependent coordinates in more than one position. That means that they involve the conditions to jump from one position to another without transgressing the kinematic conditions. The inclusion of these equations has an important effect in avoiding the branch defect during the optimization process. In the same way as before, the formulation of these constraints leads to a set of nonlinear equations that must be fulfilled together with the kinematic constraints. To make the method more general, additional constraints can be considered as a special group and formulated using another set of equations. They can exist or not depending on the linkage application. For instance, a typical example may be to avoid collisions between linkage elements or other elements close to the mechanism (e.g. the mechanism house or ground). There is a wide range of additional constraints in mechanism design, so their meaning and formulation cannot be expressed in a generalized form. Furthermore, these requirements are difficult to formulate and sometimes impossible with the necessary accuracy. When this case occurs, they are not considered during the analysis and their accomplishment must be checked by the analyst a posteriori. However, several kinds of constraints affecting the design parameters can be formulated by means of mathematical expressions, for instance, the maximum or minimum length of one link, the mobility range of a crank, a Grashofian or Non-Grasofian condition in a four-bar mechanism, etc. Depending on the case, the set of equations can add more or less difficulty to the system obtaining linear or nonlinear equations. The combination and formulation of constraints described above can be expressed as follows: 8 9 Ckin ðqj ; zÞ > > > > > > > > jþ1 > > C ðq ; zÞ > > kin < = j jþ1 j jþ1 ð5Þ Cðq ; q ; zÞ ¼ Csyn ðq ; q ; zÞ ¼ 0 > > > > j > Cadd ðq ; zÞ > > > > > > > : ; jþ1 Cadd ðq ; zÞ where the superscripts are the reference to the linkage position occupied in one instant during the motion, vector z contains the design parameters and qj and qj+1 are the vectors of the dependent coordinates in two consecutive positions. In order to obtain a more compact formulation and due to the fact that the consecutive positions are defined by the conditions imposed, the vector of dependent coordinates may be expanded as follows:

R. Sancibrian et al. / Mechanism and Machine Theory 41 (2006) 212–229 j

 q ¼



qj qjþ1

217

ð6Þ

In this way, constraints can be grouped in only one vector and Eq. (5) can be written as 8 9 qj ; zÞ > > < Ckin ð = j j Cð q ; zÞ ¼ Csyn ð q ; zÞ ¼ 0 > > : ; Cadd ð qj ; zÞ

ð7Þ

To illustrate the formulation of the constraint vector shown in Eq. (7) let us consider the example of a four-bar linkage. Fig. 1 shows the mechanism in two consecutive positions, lets call them j and j + 1. The coupler link is the rigid-body with dimensions z3, z5 and z6, whose position is imposed by the linkage motion. Correlation between the input link, z2, and rigid-body position is required. Thus, the expression shown in Eq. (3) is used for the formulation of the conditions imposed between two finite-separate positions. As mentioned before, the kinematic constraints are geometrical expressions containing the dependent coordinates and the design variables. For this reason, the selection of both vectors must be studied carefully in order to obtain the necessary information during the optimization process. In this case, the vector of dependent coordinates is selected as  qjT ¼ ½qj1 qj2 . . . qj6 qj7 qj8 . . . qj12 . . . qj14 , where qj14 is the distance between Vj and Vj+1 and is the only term that does not represent an angle (see Fig. 1). The vector of design variables is defined by lengths of the links, i.e. z = [z1 z2 z3 z4 z5 z6]. The origin of the body reference will be considered as the point V in the coupler link. Thus, the generated and desired functional parameters compared in Eq. (4) are, respectively ) T djg ¼ ½ qj14 qj13 qj9 qj3  ; j ¼ 1; 2; . . . ; n  1 ð8Þ T djd ¼ ½ qj14d qj13d qj9d qj3d 

Fig. 1. Four-bar linkage in two finite-separate positions.

218

R. Sancibrian et al. / Mechanism and Machine Theory 41 (2006) 212–229

The number of kinematic constraint equations for every single position is six. The closed equation of the four-bar mechanism yields the following constraints listed below: 4 X

Aji zi ¼ 0

ð9Þ

i¼1

where zTi ¼ ½zi 0 and Aji is the rotation matrix affecting zi. A similar expression is obtained for the coupler link as follows: Aj3 z3  Aj5 z5 þ Aj6 z6 ¼ 0

ð10Þ

The input link position requires another equation qj2  qj2o

ð11Þ

qj2o

where is the predefined position of the input link. Another constraint is obtained from the condition of immobility of the fixed link giving the following relationship: qj1  q1o ¼ 0

ð12Þ

where q1o is the predefined value of the fixed angle. Eqs. (9)–(12) are the kinematic constraints, which have been formulated for the jth position. If the vector of design variables z has been defined, the whole kinematic analysis of the four-bar linkage can be carried out by introducing a time dependent coordinate and solving the constraint vector. Thus, to analyze further positions, it is enough to modify the value of superscript j in Eqs. (9)–(12). The constraint vector can obviously include both, vector and scalar expressions. In planar mechanisms the vector expressions lead to two independent scalar equations. Thus, kinematic constraints give a set of 12 algebraic equations for both positions. The next step is to define the synthesis constraints as an additional set of equations. The synthesis constraint equations together with kinematic constraints will permit the differentiation of Eq. (4). The main objective is to introduce the generated functional parameters involved in Eq. (4) that are not present in the kinematic constraints into the formulation. The synthesis constraints must be solved together with the kinematic ones and, therefore, must be fulfilled for every linkage position. Fig. 1 shows different possibilities of formulation considering the two positions of the linkage. Rigid-body guidance synthesis requires defining the coordinates of one point considered as the origin of a frame attached to the rigid-body of interest. In this case, the coupler point V has been selected again as the origin of the reference system allowing the formulation of the first constraint equation from position j to j + 1. Therefore Aj13 qj14  ðAj8  Aj2 Þz2  ðAj11  Aj5 Þz5 ¼ 0 T

ð13Þ

where qj14 ¼ ½qj14 0 and matrix Aj13 depends on the coordinate qj13 . Eq. (13) constitutes the set of synthesis constraint equations and must be added to the kinematic constraints. In this case, 2 more algebraic equations are considered in the vector. With the aim of simplicity no additional constraints are introduced in this case, so Eqs. (9)–(13) constitute the whole constraint vector in the synthesis problem.

R. Sancibrian et al. / Mechanism and Machine Theory 41 (2006) 212–229

219

The constraints formulated must be satisfied by the mechanism for a pair of given precision poses. If the total number of precision poses is n, the total number of constraints involved will be equal to n  1. Therefore, the total number of equations will be n  1 times the dimension of vector C. Thus, the following vector can be written including all the constraints across the linkage motion as    q; zÞT ¼ Cð q1 ; zÞCð q2 ; zÞ . . . Cð qn1 ; zÞ ¼ 0 ð14Þ Cð Solving the synthesis problem requires finding the solution for Eq. (4) together with Eq. (14) in the unknowns  q and z. When the synthesis problem demands a high accuracy, the number of poses could be larger than the number required for obtaining exact solution. In this case, the system is overconstrained and only approximate synthesis is possible. The optimal solution must guarantee that the error achieving the precision poses is minimal, so Eq. (4) is fulfilled at best, whereas Eq. (14) is exactly accomplished. An optimization process could be done using well-known techniques such as Lagrange Multipliers or Penalty Functions. However, to solve such a system which contains a large number of nonlinear equations can take a great computational time and may obtain an inaccurate solution. In this paper, a different approach for solving the optimization problem is introduced, which reduces the number of equations to be solved. 3. Linear search method and Jacobian matrix performance To overcome the drawbacks presented by traditional constrained optimization methods the procedure proposes the independent use of every term in Eq. (4). Taking one of the terms participating in this equation which can be written as 1 ð15Þ Hj ¼ ðdjg  djd ÞT ðdjg  djd Þ 2 This equation is a function of the dependent coordinates q and the design parameters z. Differentiating with respect to unknown parameters in Eq. (15), we have qj ; zÞðdjg  djd Þ ¼ 0 JT ð

ð16Þ

which is a system of nonlinear equations where Jðqj ; zÞ is the Jacobian matrix including partial derivatives of the synthesis error function with respect to the parameters of interest and whose expression can be written as follows: 2 j3 odg 7 6 6 oq 7 ð17Þ Jðqj ; zÞ ¼ 6 j 7 4 od 5 g

oz Now, the system of nonlinear equations can be expanded in a TaylorÕs series around the dependent coordinates and design parameters given by the generated linkage and curtailed after the first order derivative

220

R. Sancibrian et al. / Mechanism and Machine Theory 41 (2006) 212–229

( ðdjg



djd Þkþ1

¼

ðdjg



djd Þk

þ Jðqj ; zÞk

Dqj Dz

) 0

ð18Þ

kþ1 j qkþ1  qjk ,

and Dzkþ1 ¼ zkþ1  zk . Substituting Eq. (18) where k is the iteration step and Dqjkþ1 ¼ into Eq. (16) and reordering, the following iterative process can be obtained j j  1 q q ¼ þ JT ðqj ; zÞJðqj ; zÞ JT ðqj ; zÞðdjg  djd Þk ð19Þ z kþ1 z k Eq. (19) gives the basic formula for the iterative process that must be applied to achieve the optimal solution. Thus, this method supposes the use of gradient as a guide to manage the optimization procedure towards the optimal solution from the initial-guess. The determination of the exact gradient improves the efficiency of the algorithm and enhances the rate of convergence. To evaluate the gradient terms, it is necessary to obtain the relationships between generated functional parameters, dependent coordinates and design variables. Due to the formulation presented before, the determination of the Jacobian elements can be made in an easy and quick way by means of the constraint vector. To achieve that, the vector of dependent coordinates will now be considered as a function of the design variables z. This means that if a variation of design variables is allowed, a modification of these coordinates will be obtained, thus, in a first-order approximation using Taylor series we have qðz þ DzÞ  qðzÞ þ qz Dz

ð20Þ

considering now the variation of the constraint equation Cq qz Dz þ Cz Dz ¼ 0

ð21Þ

where Cq is the matrix of partial derivatives of the constraint equations with respect to the dependent coordinates, and Cz the matrix of partial derivatives of the same equations with respect to the design variables. Since Dz is an arbitrary value, Eq. (21) can be written as qz ¼ C1 q Cz

ð22Þ

In a similar way Cq qq ¼ 0

ð23Þ

Thus, the approach consists of solving Eqs. (22) and (23) for qz and qq , respectively, which can be employed to compute the elements of the Jacobian matrix. In the latter case, the determinant of Cq must be equal to zero in order to obtain a valid solution. The two matrices Cq and Cz are fairly easily computed and they have the following form: 3 3 2 2 oCkin ðqj ; zÞ oCkin ðqj ; zÞ 7 7 6 6 oq oz 7 7 6 6 j 7 7 6 6 j j j oC ðq ; zÞ syn oCðq ; zÞ oCðq ; zÞ 7 7 6 6 ð24Þ ; Cjz ¼ ¼ 6 oCsyn ðq ; zÞ 7 Cjq ¼ ¼6 7 oq 7 7 6 6 oq oz oz 7 7 6 6 4 ocadd ðqj ; zÞ 5 4 oCadd ðqj ; zÞ 5 oq oz

R. Sancibrian et al. / Mechanism and Machine Theory 41 (2006) 212–229

And qjz and qjq matrices have the following expression 3 2 j 2 j oq1 oq1 oqj1 6 oq oq 7 6 oz 6 1 6 1 m7 7 6 j 6 j j 7 6 j j oqðq ; zÞ 6 oq2 oq2 7 oqðq ; zÞ 6 6 oq2 j j ; ¼ qq ¼ ¼ 6 oq q ¼ 7 6 oz z j oqm 7 6 1 6 1 oz oq 6 7 6 7 6 j 6 j j 5 4 oqm 4 oqm oqm oq1 oqm oz1



221

3 oqj1 ozp 7 7 j 7 oq2 7 7 ozp 7 7 7 7 oqjm 5 ozp

ð25Þ

where m is the number of dependent coordinates and p the number of design variables. With the aim of illustrating the determination of the Jacobian matrix the same four-bar linkage example as before is considered. Eqs. (9)–(13) constitute the kinematic and synthesis constraints and, therefore, must be differentiated with respect to generalized coordinates and design parameters as follows: 2 6 6 6 6 6 6 6 6 6 j Cq ¼ 6 6 6 6 6 6 6 6 4

Bj1 z1 Bj2 z2 Bj3 z3 Bj4 z4

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

0

Bj3 z3

0

0

1

0

0

0

0

1

0

0

0

0

0

0

0

0

0

0

0

Bj7 z1

Bj8 z2

Bj10 z4

0

0

0

0

Bj11 z5

Bj12 z6

0 0

0 0

0

0

0

0 0

0

0

Bj2 z2

Bj5 z5 Bj6 z6

0

0

0

0

0

0

0

0

0

0

0

Bj5 z5

0

0

0

0

0

Bj1 9 z3 Bj9 z3

0

0

1

0

0

0

0

0

1

0

0

0

0

0

0

0

Bj8 z2

0

Bj11 z5

0

Bj13 qj14

0

0

0

3

7 0 7 7 0 7 7 7 0 7 7 7 0 7 7 0 7 7 7 0 7 7 7 0 5 Aj13

ð26Þ

2

Aj1

6 0 6 6 6 0 6 6 6 0 6 j j Cz ¼ 6 6 A7 6 6 0 6 6 0 6 6 4 0 0

Aj2

Aj3

Aj4

0

0

Aj3

0

Aj5

0

0

0

0

0

0

0

0

Aj8

Aj10

0

0

Aj9 Aj9

0

Aj11

0

0

0

0

0

0

0 ðAj8



Aj2 Þ

0

0

0 ðAj11

 Aj5 Þ

0

3

Aj6 7 7 7 0 7 7 7 0 7 7 0 7 7 7 Aj12 7 7 0 7 7 7 0 5

ð27Þ

0

where matrix B is the derivative of the rotation matrix A with respect to the dependent coordinates. It can be noted that both matrices are very easy to compute and the Jacobian terms can be obtained with a low computational cost in each iteration. Other constraints can be introduced in the formulation, for instance, constant angles or constant link length, but the complexity of the matrices shown in Eqs. (26) and (27) does not increase significantly.

222

R. Sancibrian et al. / Mechanism and Machine Theory 41 (2006) 212–229

4. Computer algorithm implementation In the next paragraphs, implementation aspects of the proposed method are highlighted. The methodology proposes considering the synthesis error and constraint equations gradually. That means that the problem must be considered divided in n  1 steps. The first objective must be optimizing the linkage from position 1 to 2, after that and using the linkage optimized in this first stage, the objective function is considered between positions 2 and 3. This process is continued until all precision points or poses are achieved. However, changes in the overall dimensions of the linkage must be minimal between consecutive positions to make a gradual evolution. Thus, in order to achieve this objective, in each position changes in all or part of the design parameters are experimented using Eq. (19). The design variables selected to change their values are chosen based on the minimum overall change in the linkage dimensions. In some cases, the design variables selected can greatly change the overall dimensions of the mechanism in two consecutives positions. To avoid the problems provoked by large changes in the dimensions, several possibilities of variation must be studied in every step in order to select the most suitable alteration. In other words, the algorithm limits changes in some design parameters allowing variation in others. In this way, the overall change of the mechanism is minimal between consecutive positions at the same time as the constraints are completely fulfilled. With the linear-search method, the variation of the parameters in each iteration is expressed as a function of vector z and q, in the manner of Eq. (19). Thus, the process requires the evaluation of the Jacobian matrix in every step using Eqs. (22) and (23). The total numerical error in this process is the summation of the truncation and round-off errors during the calculations. Truncation errors limit the distance between consecutive precision points or poses. Furthermore, in order to detect ill-conditioned functions, the condition number must be determined. That is a measure of the extent to which an uncertainty in the dependent coordinates q and design variables z is magnified by Eq. (15). Obviously, at the end of the iteration through the n  1 positions, n  1 dimensions are obtained for each design variable z. Since the optimized mechanism must only have one dimension for each design variable the algorithm must establish a procedure to make them coincident. In the methodology proposed, calculation of the final design parameters requires the computation of the average through the different values of the lengths z. That calculation involves weighting mean length formulation, where the weighting parameters depend on the Jacobian terms calculated by Eq. (22). These terms can be regarded as a sensitivity parameter measuring the importance of each design variable on the trajectory generated—the greater the sensitivity, the greater its influence on the results. The definition of weighting parameters is as follows: qjk

odjg ¼ ozk

ð28Þ

Thus, the weighting mean has the following expression: Pn1 j j n1 q1k z1k þ q2k z2k þ þ qn1 qz k zk ¼ P1 n1 kj k zk ¼ n1 1 2 zk1 þ zk þ þ zk 1 zk

ð29Þ

R. Sancibrian et al. / Mechanism and Machine Theory 41 (2006) 212–229

223

where the superscript affecting design variables gives the linkage position. Once the design parameters have been obtained the synthesis error is evaluated using Eq. (4). This procedure is repeated until the solution converges, that is, until the following expression:   Hkþ1  Hk  100%  ð30Þ jej ¼   H k

falls below an acceptable stopping criterion. One important aspect in the optimization process is the selection of the initial-guess linkage. Kinematic simulation must be performed in order to find the most suitable form to achieve the desired trajectory. At this stage the analyst plays an important role selecting the starting point for the iterative process. In order to do that, it is necessary to perform the kinematic analysis along a sufficient interval to be able to compare the generated parameters with the desired ones. Other synthesis methods can be used at this first stage, for instance, exact synthesis methods with a low number of precision points, in order to approximate the two curves adequately.

5. Numerical examples To illustrate the characteristics of the proposed method some numerical examples have been solved with application to different synthesis problems. These examples try to embrace different situations that can appear in the design of linkages demonstrating its generality and possibilities, as well as, limitations and drawbacks. Examples have been run in a Pentium IV PC. Example 1. Path generation using a four-bar mechanism with correlation. Several simulations have been done by the authors in applications to the four-bar mechanism in different situations to verify the quality of the solution. Correlation and non-correlation with the input link have been considered in all these examples obtaining good accuracy in the solutions. To prove one of the main advantages of the method—that the correlation between links can be easily computed, the example selected in path generation considers the correlation between input link— z2—and the path generated by the coupler point. This equation has the following form: ) qj2  qj2o ¼ 0 ; j ¼ 1; 2; . . . n  1 ð31Þ qj8  qj8o ¼ 0 where qj2o and qj8o are the predefined positions of the input link. The desired path forms a square angle with the mentioned correlation with the input link. One hundred equally spaced precision points are used in the definition of the desired path. In this case, the input link range motion takes on values continuously in the following interval:   5p 4p ; ð32Þ q2 ¼ 6 3 Fig. 2 shows the initial-guess and the final solution and in Fig. 3, both the desired and optimal path are shown in detail. In Fig. 2 the dashed line shows the whole path outside the correlated zone, and the solid line shows the path within the correlated interval. The CPU time necessary to achieve convergence is 76.46 s after four iterations. As can be seen, the accuracy achieved

224

R. Sancibrian et al. / Mechanism and Machine Theory 41 (2006) 212–229

Fig. 2. Path generated by the four-bar mechanism with correlation: (a) initial-guess and (b) optimal solution.

Optimized path Desired path

12

(mm)

10 8 6 4 2 0 -2

0

2

4

6 8 (mm)

10

12

14

Fig. 3. Desired and optimal path.

can be considered good enough and the generated path fits the desired one well during the predetermined motion of the input link. Table 1 shows the design variables for both linkages. Although, the correlation imposes is a strong constraint, the algorithm proves its efficiency and convergence capacity. Table 1 Initial-guess and optimal solution dimensions in Example 1 Design variables

Initial-guess

Optimal solution

z1 (mm) z2 (mm) z3 (mm) z4 (mm) z5 (mm) z6 (mm) q1 (rad)

59.92 28.00 70.00 63.84 70.00 36.23 3.141

54.20 31.79 57.29 69.68 69.96 33.33 4.099

R. Sancibrian et al. / Mechanism and Machine Theory 41 (2006) 212–229

225

Example 2. Rigid-body guidance in a Stephenson III six-bar linkage. The following example corresponds to rigid-body guidance of a mechanism which is part of a backhoe. Fig. 4 shows the scheme of such a linkage where the hydraulic cylinder A provides a wide range of motion to the hoe. Fig. 5a shows the desired path of point P and the desired poses of vector z8 (solid lines) together with those generated by the initial-guess linkage (dashed lines), 5000

z9

4000

z10 Hoe z8

3000

(mm)

2000

P

1000

z7

z6

A

z5

z3

z4

z2

0

z1

-1000 -2000 -3000 -4000 -10000 -8000

-6000

-4000 (mm)

-2000

0

2000

Fig. 4. Backhoe scheme based on Stephenson III six-bar linkage.

3000 4000

Desired Initial-guess

2000

3000 2000

1000

(mm)

(mm)

1000 0

0 Desired

-1000

-1000

Optimized

-2000 -2000 -3000 -4000

-3000

-5000 -4000 -6000

a

-4000 -3000 -2000 -1000 (mm)

-2000

0

b

-1000

0

(mm)

Fig. 5. (a) Initial-guess and desired trajectory and (b) optimized and desired.

1000

226

R. Sancibrian et al. / Mechanism and Machine Theory 41 (2006) 212–229

Table 2 Initial-guess and optimal solution dimensions in Example 2 Design variables

Initial-guess (mm)

Optimal solution (mm)

z1 z2 z3 z4 z5 z6 z7 z8 z9 z10

3180.00 1050.00 1660.00 4210.00 4890.00 5150.00 6720.00 3140.00 2870.00 4030.00

3760.73 1460.33 2010.26 4430.36 5210.40 5330.53 7040.05 3160.07 2910.32 4050.11

whose scheme has been shown in Fig. 4. There are 10 design variables (the z vector) and the synthesis objective is to find the optimal dimensions to pass through the desired positions indicated in Fig. 5. There are 210 precision points and poses, but, with the aim of clarity not all precision data have been shown in Fig. 5. In this example, we consider two special constraints: the angle of the fixed link must remain constant and equal to p and the angular variation of link z4 is limited to 212 degrees. Thus, the total number of constraints is 14 with the following distribution: 8 equations for kinematics, 2 equations for synthesis and 4 equations for special constraints. In Table 2, the first column of data corresponds to the initial-guess linkage dimensions and the second one to the same values after the optimization process is over. The optimization process takes four iterations and the synthesis error decreases from 106.65 to 1.90 at the end. After four iterations the error is stabilized and additional iterations do not enhance the convergence. Fig. 6 shows the evolution of the synthesis error for each position of the input link. The computational time used by the whole process is 250.31 s. The solution shows that the algorithm converges satisfactorily towards the local optimal solution where the generated poses fit well with the desired ones.

0.9

Synthesis error

0.8 0.7

Iterations Optimized

0.6

Initial-guess

0.5 0.4 1st

0.3 0.2 Solution

0.1

2nd

3rd

0 -0.1

0

20

40

60 80 100 120 140 160 180 200 Precision poses (deg)

Fig. 6. Synthesis error evolution.

R. Sancibrian et al. / Mechanism and Machine Theory 41 (2006) 212–229

227

Example 3. Function generation using a Watt II six-bar linkage. In this example a crank-double-rocker mechanism is used to generate a double function. Fig. 7a shows the linkage configuration based on a Watt kinematic chain, where the design variables vector is defined by the z components. The input link is defined by z2 and the outputs are given by the positions of the vectors z4 (or z6) and z8. Thus, during the full rotation of the crank link the motion of both rockers must be limited. This kind of mechanism is used, for instance, in windshield wipers in vehicles, where an electrical motor is connected to the crank link and the wipers to the rockers. However, to show the capabilities of the method proposed, in this example a more sophisticated objective is pursued, making the oscillation frequency of one rocker double the other one. Mathematically, this correlation can be expressed in the following form: 9 q2 ¼ ½0; 2p; > = q4 ¼ l þ 12 sinðq2 þ p4Þ; ð33Þ > ; q8 ¼ f þ 2 sinð2q2 Þ. Angles l and f can be chosen freely due to the fact that only peak-to-peak amplitude is considered in the displacement of the q4 and q8 angles. The synthesis error function is obtained from Eq. (33) where q4 and q8 are the desired values. Position of link 2-given by the q2 angle- is formulated as a kinematic constraint. Furthermore, an additional constraint is introduced: fixed links z1 and z9 must always be aligned. If the initial-guess linkage fulfills this constraint, the restriction can be formulated easily making invariant the position of the involved links during the optimization process. The total number of constraints is 20 with the following distribution: 12 equations for kinematics, 4 equations for synthesis and 4 for additional constraints. Ninety precision poses are considered to give the necessary accuracy to the optimization problem. Table 3 shows the initial and optimized values of the design variables, Fig. 7b shows the optimal solution linkage and Fig. 8 shows the output rocker angles for the initial-guess, the optimized and the desired linkage. The optimum linkage is obtained after 13 iterations with a synthesis error reduced to 0.37e4 with a CPU time of 80.95 s.

200

200

150

z5

z3

100

0

z8

z4

50

z2

z7 z6

z1

(mm)

(mm)

150

-50

z4

50 0

z9

z5

z3

100

z2

z7

z6

z8

z1 z9

-50

-100

a

-250 -200 -150 -100 -50 (mm)

0

50

-200 -150 -100 -50

100 150

b

0 50 (mm)

Fig. 7. Watt II six-bar linkage: (a) initial-guess and (b) solution.

100 150 200

228

R. Sancibrian et al. / Mechanism and Machine Theory 41 (2006) 212–229

Table 3 Initial-guess and optimal solution dimensions in Example 3 Design variables

Initial-guess (mm)

Optimal solution (mm)

z1 z2 z3 z4 z5 z6 z7 z8 z9

241.00 39.00 180.00 147.00 170.00 86.00 115.00 155.00 104.00

184.00 30.38 196.67 161.45 166.46 105.21 137.57 155.00 133.45

Desired variation Initial-guess variation Optimized variation

25 20

Link 4

15 (deg)

Link 4

Link 4

10 5

Link 8

0 Link 8 -5 Link 8

-10 0

50

100

300 150 200 250 Input link position (deg)

350

Fig. 8. Initial, desired and optimized error.

6. Concluding remarks In this paper a general method for optimum kinematic synthesis of planar linkages has been presented. This method is based on the formulation of the constraint equations for multibody systems and the exact determination of the gradient, which leads to an efficient procedure to achieve optimal solution. Due to the characteristics of the formulation proposed, the method has applications to all classic synthesis problems in mechanisms, i.e. path generation, function generation and rigid-body guidance. The constraint equations are selected taking into account the requirements imposed on the linkage to be synthesized and are expressed by means of vector and scalar expressions. Three kinds of constraints are used in the formulation: kinematic, synthesis and additional constraints. The objective function is formulated depending on the kind of synthesis problem to be solved, allowing for mixed synthesis problems if necessary. The method can be used when a high accuracy is demanded by the synthesis problem, because it allows the definition of a large number of precision points or poses. Furthermore, the proposed method has the advantage that the elements of the gradient can be obtained in exact form, avoid-

R. Sancibrian et al. / Mechanism and Machine Theory 41 (2006) 212–229

229

ing the use of numerical differentiation and the inaccuracies inherent to this kind of approach. Other problems always present in dimensional synthesis, like correlation with the input link or branching, are solved adequately by the method without increasing the computational time. The practical examples presented demonstrate the versatility, stability and convergence capability of the proposed method.

Acknowledgements This paper has been developed in the framework of the Project DPI2002-02043 funded by the Spanish Ministry of Science and Technology.

References [1] S.-J. Chiou, S. Kota, Automated conceptual design of mechanisms, Mechanism and Machine Theory 34 (3) (1999) 467–495. [2] Y.-M. Moon, S. Kota, Automated synthesis of mechanisms using dual-vector algebra, Mechanism and Machine Theory 37 (2) (2002) 143–166. [3] G.N. Sandor, A.G. Erdman, Advanced Mechanism Design: Analysis and Synthesis, vol. II, Prentice Hall, 1984. [4] C.H. Suh, C.W. Radcliffe, Kinematic and Mechanism Design, John-Wiley & Sons, 1978. [5] R. Akhras, J. Angeles, Unconstrained nonlinear least-square optimization of planar linkages for rigid-body guidance, Mechanism and Machine Theory 25 (1) (1990) 97–118. [6] I. Ullah, S. Kota, Optimal synthesis of mechanisms for path generation using Fourier Descriptors and Global Search Methods, Journal of Mechanical Design 119 (4) (1997) 504–510. [7] Z. Liu, J. Angeles, Optimization of planar, spherical and spatial function generators using input–output curve planning, Journal of Mechanical Design 116 (3) (1994) 915–919. [8] J.A. Cabrera, A. Simon, M. Prado, Optimal synthesis of mechanisms with genetic algorithm, Mechanism and Machine Theory 37 (10) (2002) 1165–1177. [9] A.-X. Liu, T.-L. Yang, Finding all solutions to unconstrained nonlinear optimization for approximate synthesis of planar linkages using continuation method, Journal of Mechanical Design 121 (3) (1999) 368–374. [10] J.M. Jimenez, G. Alvarez, J. Cardenal, J. Cuadrado, A simple and general method for kinematic synthesis of spatial mechanism, Mechanism and Machine Theory 32 (3) (1997) 323–341. [11] J. Mariappan, S. Krishnamurty, Using exact gradients in mechanism design, ASME Advances in Design Automation 44 (2) (1992) 53–59. [12] R. Sancibrian, F. Viadero, P. Garcia, A. Fernandez, Gradient-based optimization of path synthesis problems in planar mechanisms, Mechanism and Machine Theory 39 (8) (2004) 839–856.