Optimal synthesis of four-bar linkages for path generation using the individual repairing method
- Key Laboratory of Metallurgical Equipment and Control Technology, Ministry of Education, Wuhan University of Science and Technology, Wuhan 430081, China
Correspondence: Xingdong Wang (firstname.lastname@example.org)
Constraints are one of the main factors that hinder the optimal synthesis of linkages to obtain the global optimum. At present, the most commonly used constraint handling method is called the penalty function (PF) method, but this technique has proven to be inefficient and unreliable in path synthesis. In this paper, a novel and effective constraint handling method called the individual repairing (IR) method is developed for the optimization model of four-bar mechanisms for path synthesis. The function of the IR method is to check the conformity of each individual to the Grashof condition, the sequence condition, and the variable range condition after population initialization and each iteration as well as to repair all unreasonable individuals according to the corresponding repairing technique to make them all satisfy the constraint conditions. In other words, the new constraint handling method establishes a transformation method so that each infeasible point in the search space uniquely corresponds to a feasible point. Based on the IR method, the optimization of path synthesis can be effectively carried out. Finally, the validity and reliability of the new constraint handling method are verified using three examples.
A linkage mechanism is a kind of commonly used mechanism that is employed to realize the motion transformation and power transmission (Sandor and Erdman, 1984; Erdman et al., 1984). Among various linkage mechanisms, the four-bar mechanism is essential and widely used due to its simple structure, stable output, and the fact that it is easy to control and maintain (Buśkiewicz, 2019; Kadarno et al., 2021; Lee et al., 2021; Yildiz, 2021; Zhao et al., 2014).
A class of design tasks for linkage mechanisms is called path synthesis. The purpose of path synthesis is to find the optimal dimensional parameters of a mechanism so that a point on the coupler link can move along a desired curve (Fox and Willmert, 1967; Han, 1966; Li et al., 2020; Khan et al., 2015). In general, the desired curve of path synthesis usually refers to a sequence of precision points. Because of the high nonlinearity of the problem, the path synthesis task is usually treated as an optimization problem (Marín and González, 2003). In order to ensure the rationality of the final linkage solution, three constraints are usually introduced into the optimization model of path synthesis of four-bar mechanisms, including the Grashof condition, the sequence condition, and the variable range condition. However, the introduction of constraints leads to a highly discontinuous search space. In general, constraints are considered to be one of the main factors hindering the optimal synthesis of linkages to obtain the global optimum (Angeles et al., 1988; Acharyya and Mandal, 2009; Lin, 2010; Peñuñuri et al., 2011; Ebrahimi and Payvandy, 2015; Sleesongsom and Bureerat, 2018; Bureerat and Sleesongsom, 2021).
At present, the penalty function (PF) method is the most commonly used method to deal with the constraint conditions in path synthesis. The principle of the PF method is to add a very large value to the objective function of individuals who do not meet the constraint conditions so that these individuals will be eliminated in the optimization. However, this causes the vast majority or even all of the individuals of the initial population to be eliminated by the penalty function, especially when dealing with the sequence condition (Acharyya and Mandal, 2009; Peñuñuri et al., 2011). As a result, the PF method usually requires a very large population, otherwise the optimization will be inefficient or will even fail (Sleesongsom and Bureerat, 2018; Bureerat and Sleesongsom, 2021). However, a large population is accompanied by a sharp increase in the computational cost. In this context, researchers have made some useful explorations. Acharyya and Mandal (2009) first proposed a method to rearrange the randomly generated input angles in the initial population to reduce the probability of individuals being rejected in the next iteration. Additionally, they proposed a refinement scheme to ensure that all individuals in the initial population satisfy the Grashof condition by reassigning link lengths to individuals that do not satisfy the abovementioned condition. Lin (2010) further introduced the method of rearranging input angles during both population initialization and each iteration, so that the sequence condition of input angles could be ignored until the end of the optimization. Ebrahimi and Payvandy (2015) developed an innovative technique to generate the initial population that satisfies the Grashof condition. Sleesongsom and Bureerat (2018) and Bureerat and Sleesongsom (2021) designed two new individual generation techniques for the Grashof condition and the sequence condition, respectively, which can ensure the generation of individuals that satisfy the constraints. However, the individual generation techniques that they designed did not take the parameters of the original individual into account and, instead, generated a completely new individual.
In this paper, a novel and effective constraint handling method called the individual repairing (IR) method is introduced. The principle of the IR method is to develop the corresponding repairing technique for each constraint condition of the optimization model, so as to ensure that all of the individuals in the optimization always meet the constraints. The design of these repairing techniques follows the same criterion, which is to transform the original unreasonable individual into a unique corresponding reasonable individual. In other words, the IR method transforms every infeasible point in the search space into a unique corresponding feasible point. This is the difference between this study and other relevant studies and is also the main innovation described in this work. Based on the new constraint handling method, the optimization of path synthesis can be effectively carried out.
In Sect. 2, the kinematics analysis and the classic optimization model of four-bar mechanisms for path synthesis are described. Section 3 then introduces three repairing techniques corresponding to the three constraint conditions of the classic optimization model of four-bar mechanisms for path synthesis. Following this, Sect. 4 shows the optimization results using the new IR method through three classical path synthesis tasks. Finally, the conclusions of the paper and the plan for future work are presented in Sect. 5.
2.1 Kinematics analysis
The schematic diagram of a planar four-bar mechanism is shown in Fig. 1. The mechanism is represented by nine independent design variables:
Here, l1 is the length of the fixed link AD, l2 is the length of input link AB, and l3 and l4 represent the lengths of coupler link BC and output link CD, respectively. The coupler point P is a point on the coupler link BC which generates a continuous curve, and r and α determine the position of P relative to the coupler link BC. x0, y0 and θ determine the offset and rotation angle of the fixed link AD relative to the coordinate system xoy, respectively.
Based on the variable definition shown in Fig. 1, the position of the coupler point P can be formulated as follows:
where the variable β represents the angle between the coupler link BC and the fixed link AD.
Actually, the variable β is a dependent variable, and Freudenstein (1954) provides the relation equation of the variable β, the input angle ϕ, and the dimensional parameters of the mechanism.
The following simplified equation can then be derived:
The two solutions of Eq. (5) represent two respective branches of the four-bar mechanism. In summary, the Eq. (2) can be simplified as follows:
2.2 Classic optimization model
The path synthesis problem is usually considered to be an optimization problem, and an objective function is specified to minimize the difference between the desired curve and an actual generated curve. The tracking error is the most commonly used objective function to quantify this difference, and it is defined as the sum of the squares of the Euclidian distances between the target points and the same number of comparison points on the generated curve. In order to obtain these comparison points, the classical model introduces N input angles as optimization variables in addition to the nine design variables of the four-bar mechanism, where N is equal to the number of target points. In addition, the Grashof condition, the sequence condition, and the variable range condition are used as constraint functions in the classic optimization model of four-bar mechanisms for path synthesis. Therefore, the optimization variables of the classic model usually include the following:
As a result, the classic model can be defined as follows:
where () is the position of the actual generated precision points for comparison, () is the prescribed position of the target point, , mod(m,n) is the remainder of the quotient of , xi is the ith parameter in X0, and Li and Ui are the lower and upper limits of the variable xi, respectively.
Constraint conditions (a)–(c) in Eq. (9) represent the Grashof condition, the sequence condition, and the variable range condition, respectively. It should be noted that this paper uses the crank–rocker mechanism as the research object, so the link AB is directly defined as the shortest link in constraint (a). In addition, it should be mentioned that the purpose of the sequence condition is to restrict the rotation direction of the crank so that it cannot be rotated backwards. Currently, some literature forces input angles to be arranged in increasing order, which overdefines the sequence condition and may lead to a reduced potential for the optimization to obtain the optimal solution. As far as we know, a reasonable expression for the sequence condition was first proposed by Cabrera et al. (2002), but they miswrote the comparison symbol in the formula. The correct definition of the sequence condition is represented in constraint (b). Finally, constraint (c) ensures that all optimization variables are within their respective predetermined reasonable ranges.
Although it is the most common constraint handling method in path synthesis, the PF method has been proven to be inefficient and to have poor repeatability (Sleesongsom and Bureerat, 2018; Bureerat and Sleesongsom, 2021; Acharyya and Mandal, 2009; Lin, 2010; Peñuñuri et al., 2011; Ebrahimi and Payvandy, 2015). Actually, using PF methods to deal with constraint functions will result in most or all of the individuals in the initial population being eliminated by penalty functions, especially when dealing with the sequence condition.
The probability that a uniform random sequence is already sorted is (Peñuñuri et al., 2011). Therefore, the probability of randomly generated individuals meeting the sequence condition is . A simple example is illustrated here. For the path synthesis task with six target points, 3 000 000 individuals were randomly generated by a uniform distribution to form the initial population. Among them, the proportion of individuals conforming to the Grashof condition is 12.4944 %, the proportion of individuals conforming to the sequence condition is 0.8356 %, and the proportion of individuals conforming to both constraints is 0.1039 %. This means that the vast majority of randomly generated individuals do not satisfy the constraint conditions. In this case, the PF method will lead to the majority or even all of the individuals in the initial population being eliminated, resulting in the inefficiency or even failure of the optimization. In addition, it is easy to understand that even if the optimization is successful, the optimization completed by a few initial individuals conforming to the constraints will not have satisfactory repeatability. This is especially problematic when there are more target points.
Therefore, a new constraint handling method called the IR method is developed in this section. The principle of the IR method is to develop different individual repairing techniques corresponding to each constraint condition, so as to repair the individuals that do not meet the constraint condition after the initial population generation and each iteration. The repairing techniques corresponding to the constraint conditions of the optimization model for path synthesis of four-bar mechanisms are described below.
3.1 Grashof condition repairing technique
The Grashof condition is a constraint on the link lengths of a four-bar mechanism. Its purpose is to ensure the existence of a crank in the four-bar mechanism. In this work, a linkage repairing technique is proposed to transform all of the non-Grashof linkage solutions into reasonable solutions in the optimization process. The flow of the linkage repairing technique is shown in Fig. 2.
As shown in Fig. 2, the linkage repairing technique is mainly divided into two steps, making the link lengths meet the two respective inequality constraints of the Grashof condition as shown in Eq. (9). The function of the first step is to ensure that link AB becomes the shortest link, which is easy to understand. The function of the second step is to ensure that the sum of the shortest link and longest link is less than the sum of the other two links, which may be difficult to intuitively understand. The principle of the second step is presented in Fig. 3.
Assuming that the link length values are arranged on a positive line as shown in Fig. 3, the second inequality constraint of the Grashof condition can be transformed into a more graphical representation: the thick dashed line representing the average length M1 of the longest and shortest links must be to the left of the thin dashed line representing the average length M2 of the remaining two links. For linkages that do not satisfy this inequality constraint, Fig. 3 shows an ingenious repairing technique that takes x=M1 as the axis of symmetry and then redefines the values of lm and ln.
In contrast to the work of Ebrahimi and Payvandy (2015), Sleesongsom and Bureerat (2018), and Bureerat and Sleesongsom (2021), the linkage repairing technique developed in this study is based on the parameters of the irrational linkage solution itself, rather than regenerating another completely unrelated linkage solution. Based on this new technique, the repaired linkage solution is more likely to remain competitive in the next iteration.
3.2 Sequence condition repairing technique
Similar to the studies of Acharyya and Mandal (2009), Lin (2010), and Ebrahimi and Payvandy (2015), this study also adopted the method of rearranging input angles in increasing order to ensure that all individuals meet the sequence condition in the optimization process. However, in contrast to the method of Acharyya and Mandal (2009) and Ebrahimi and Payvandy (2015), who randomly selected an input angle as the first angle, and the method of Lin (2010), who selected the smallest input angle as the first angle, this study keeps the original first input angle unchanged. Figure 4 shows the schematic of the angle repairing technique used in this study.
Assuming that a randomly generated set of input angles is arranged on a positive line, the angles' arrangement is likely to be chaotic, as shown in Fig. 4. The function of the angles repairing technique is to give this set of angles a new order so that the angles are neatly arranged on the positive line according to the sequence condition.
3.3 Variable range condition repairing technique
In the iterative process of population, some parameters of some individuals are likely to break through the predetermined range. At present, the commonly used optimization technique is to set the parameter value of the breakthrough range as the boundary value, but there is no relevant research on path synthesis to describe this handling technique of the variable range condition. Figure 5 illustrates the principle of this variable range repairing technique in detail.
Similarly, suppose that a parameter value and its corresponding boundary value of an individual in the population are arranged on a positive line as shown in Fig. 5. The principle of variables repairing technique is to set parameters beyond the upper boundary as the upper boundary and parameters beyond the lower boundary as the lower boundary.
3.4 Application of the IR method in optimization
Based on the three individual repairing techniques shown above, the elitism of population was guaranteed during the whole optimization procedure. Finally, the application method of these repairing techniques in the path synthesis of four-bar mechanism is shown in Fig. 6.
In Fig. 6, the variable Np represents the population number and Imax represents the maximum iteration number.
In order to verify the validity and reliability of the new constraint handling method, three classic path synthesis tasks are discussed in this section, including one path synthesis task without prescribed timing and two path synthesis tasks with prescribed timing. Additionally, three classical optimization algorithms are selected to search for the optimal solution. The parameters of these optimization algorithm are set as follows:
for the genetic algorithm (GA), Cp = 0.8 and Mp = 0.2;
for the particle swarm optimization (PSO), w=0.7, c1=1.49, and c2=1.49;
for the differential evolution (DE), F=0.5 and Cp = 0.9.
Here, the parameters Cp, Mp, w, c1, c2, and F represent the crossover probability, the mutation probability, the inertia factor, the global learning weight, the local learning weight, and the scaling factor, respectively. Additionally, the population number Np is set to 100, and the maximum iteration number Imax is set to 1000. Finally, results from other studies using the same optimization algorithms were compared with the results of this study.
4.1 Example 1: six target points and 15 optimization variables
This example is a path synthesis task without prescribed timing for a straight-line path with six target points. The range of the design variables in this example is defined as follows:
The target points are
The optimization variables are
Table 1 shows the optimization results of the new method proposed in this study using the three optimization algorithms for Example 1. In addition, the results from Acharyya and Mandal (2009) using the same optimization algorithms are also shown in Table 1. It is worth noting that the original literature does not show the tracking error; instead, it shows the square root of the tracking error. As can be seen from Table 1, the results obtained by adopting the IR method are better than those obtained using other constraint handling methods in previous work under the same optimization algorithm. Figure 7 shows the coupler curve of the linkage solutions obtained in this study for Example 1.
4.2 Example 2: six target points and nine optimization variables
This example is a path synthesis task with prescribed timing for a semicircular arc path with six target points. The range of the design variables in this example is defined as follows:
The target points are
The optimization variables are
Table 2 shows the optimization results of the new method proposed in this study using the three optimization algorithms for Example 2. Similarly, it can be seen from Table 2 that the error of the linkage solutions obtained by the IR method is smaller than the error of the linkage solutions obtained by previous work (Acharyya and Mandal, 2009) using the same three optimization algorithms. Figure 8 shows the coupler curve of the linkage solutions obtained in this study for Example 2.
4.3 Example 3: 18 target points and 10 optimization variables
This example is a path synthesis task with prescribed timing for a path with 18 target points. The range of the design variables in this example is defined as follows:
The target points are
The optimization variables are
Table 3 shows the optimization results of the new method proposed in this study using the three optimization algorithms for Example 3. Additionally, this example has also been studied by Cabrera et al. (2002) and Peñuñuri et al. (2011) using the GA and DE algorithms, respectively.
As can be seen from Table 3, the results obtained by adopting the IR method are better using the same optimization algorithms. Figure 9 shows the coupler curve of the linkage solutions obtained in this study for Example 3.
In this paper, different constraint handling methods are discussed in detail, and a new constraint handling method based on the idea of individual repairing is proposed for the path synthesis of four-bar mechanisms. The function of the new method is to transform individuals that do not meet the constraints into the individuals that meet the constraints in time, so as to ensure the success and effectiveness of the optimization. More precisely, the principle of the new constraint processing method is to build a converter based on the constraints of the optimization model, so as to transform any infeasible point in the search space into a unique corresponding feasible point. Experimental results show that, compared with other constraint handling methods, the proposed method can obtain better linkage solutions using the same optimization algorithm for the same path synthesis task. The core innovation of this research is the constraint handling method based on the idea of individual repairing, which is universal in theory and can be matched with different optimization algorithms, so as to be applied to other constrained engineering optimization problems. In the future, it is planned to extend the constraint handling method based on the idea of individual repairing to the kinematics synthesis of six-bar mechanisms, eight-bar mechanisms, and other mechanisms in the field of mechanical design, including not only path synthesis but also motion synthesis and function synthesis.
The code and data used in this paper can be obtained upon request from the corresponding author.
XY provided the ideas and wrote the first draft of the paper, XW designed the comparative experiment, WS and JK completed the code, and ZL helped modify the paper.
The contact author has declared that neither they nor their co-authors have any competing interests.
Publisher’s note: Copernicus Publications remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
This work was supported in part by the National Natural Science Foundation of China (grant no. 51875418); the Youth Fund of the Education Department of Hubei Province (grant no. B2020011); the WUST National Defense Pre-research Foundation (grant no. GF201906); and the Hubei Provincial High Value Patent Cultivation, Transformation and Industrialization Project (grant no. 2019-41).
This paper was edited by Daniel Condurache and reviewed by three anonymous referees.
Acharyya, S. K. and Mandal, M.: Performance of EAs for four-bar linkage synthesis, Mech. Mach. Theory, 44, 1784–1794, 2009.
Angeles, J., Alivizatoss, A., and Akhras, R.: An unconstrained nonlinear least-square method of optimization of RRRR planar path generators, Mech. Mach. Theory, 23, 343–353, 1988.
Bureerat, S. and Sleesongsom, S.: Constraint handling technique for four-bar linkage path generation using self-adaptive teaching–learning-based optimization with a diversity archive, Eng. Optimiz., 53, 513–530, 2021.
Buśkiewicz, J.: The optimum distance function method and its application to the synthesis of a gravity balanced hoist, Mech. Mach. Theory, 139, 443–459, 2019.
Cabrera, J. A., Simon, A. S., and Prado. M.: Optimal synthesis of mechanisms with genetic algorithms, Mech. Mach. Theory, 37, 1165–1177, 2002.
Ebrahimi, S. and Payvandy, P.: Efficient constrained synthesis of path generating four-bar mechanisms based on the heuristic optimization algorithms, Mech. Mach. Theory, 85, 189–204, 2015.
Erdman, A. G., Sandor, G. N., and Kota, S.: Mechanism Design: Analysis and Synthesis, edited by: Horton, M., Prentice-Hall, Englewood Cliffs, 344 pp., ISBN 0-13-040872-7, 1984.
Fox, R. L. and Willmert, K. D.: Optimum design of curve-generating linkages with inequality constraints, J. Eng. Ind., 89, 144–152, 1967.
Freudenstein, F.: An analytical approach to the design of four-link mechanisms, T. ASME, 76, 483–492, 1954.
Han, C. Y.: A general method for the optimum design of mechanisms, J. Mech., 1, 301–313, 1966.
Kadarno, P., Barrinaya, M. A., Manurung, A. O., Riyandwita, B. W., Hastuty, S., Rahmawan, Y., Pradanawati, S. A., Widiyati, K., Putra, I. S., and Purbolaksono, J.: Mechanism analysis of a main landing gear of transporting aircraft: A design learning perspective, Eng. Fail. Anal, 119, 105015, https://doi.org/10.1016/j.engfailanal.2020.105015, 2021.
Khan, N., Ullah, I., and Al-Grafi, M.: Dimensional synthesis of mechanical linkages using artificial neural networks and Fourier descriptors, Mech. Sci., 6, 29–34, https://doi.org/10.5194/ms-6-29-2015, 2015.
Lee, J., Li, L., Shin, S. Y., Deshpande, A. D., and Sulzer, J.: Kinematic comparison of single degree-of-freedom robotic gait trainers, Mech. Mach. Theory, 159, 104258, https://doi.org/10.1016/j.mechmachtheory.2021.104258, 2021.
Li, X., Wei, S., Liao, Q., and Zhang, Y.: A novel analytical method for four-bar path generation synthesis based on Fourier series, Mech. Mach. Theory, 144, 1–24, 2020.
Lin, W. Y.: A GA–DE hybrid evolutionary algorithm for path synthesis of four-bar linkage, Mech. Mach. Theory, 45, 1096–1107, 2010.
Marín, F. T. and González, A. P.: Global optimization in path synthesis based on design space reduction, Mech. Mach. Theory, 38, 579–594, 2003.
Peñuñuri, F., Peón-Escalante, R., Villanueva, C., and Pech-Oy, D.: Synthesis of mechanisms for single and hybrid tasks using differential evolution, Mech. Mach. Theory, 46, 1335–1349, 2011.
Sandor, G. N. and Erdman, A. G.: Advanced Mechanism Design: Analysis and Synthesis, edited by: Skrable, K., Prentice-Hall, New Jersey, Vol. 2, ISBN 0-13-011437-5, 1984.
Sleesongsom, S. and Bureerat, S.: Optimal Synthesis of Four-Bar Linkage Path Generation through Evolutionary Computation with a Novel Constraint Handling Technique, Comput. Intell. Neurosci., 2018, 5462563, https://doi.org/10.1155/2018/5462563, 2018.
Yildiz, A.: Parametric synthesis of two different trunk lid mechanisms for sedan vehicles using population-based optimisation algorithms, Mech. Mach. Theory, 156, 104130, https://doi.org/10.1016/j.mechmachtheory.2020.104130, 2021.
Zhao, J., Yan, Z., and Ye, L.: Design of planar four-bar linkage with n specified positions for a flapping wing robot, Mech. Mach. Theory, 82, 33–55, 2014.