Application of Multiple Deep Neural Networks to Multi-Solution Synthesis of Linkage Mechanisms

.


Introduction
The linkage-bar synthesis problem is an inverse problem [1], which requires designing the linkage mechanism based on the expected kinematic characteristics and the inverse solution for each linkage parameter; however, the relationship between the shape of the coupling curves and the parameters of the linkage mechanism is highly nonlinear; furthermore, this type of inverse problem presents a high degree of complexity as it may have no solution, a single solution, or multiple solutions depending on the specific conditions [2].
Numerous prior studies have investigated linkage synthesis problems, with prevailing solution methods encompassing geometric derivation, algebraic analysis, and numerical methods [3].The first two can comprehend mechanism parameters through the mathematical derivation process; however, such methods have limitations due to the number of precise points.When the number of points to be synthesized exceeds the number of mechanism parameters, it is typically impossible to find exact paths through all the points.Consequently, numerical methods are used to obtain an approximate solution, which is the main solution method when dealing with a large number of points.
Numerical methods rely on the analysis of linkage-bar motion to establish an approximate mathematical model.Through the designed objective function of the coupling error, various numerical algorithms are employed to solve for the optimal solution, such as gradient methods [4].Nevertheless, such methods have their limitations, including the difficulty of selecting an appropriate initial value and algorithms to jump out the local solution, making it arduous to get the global solution [5].Therefore, researchers have generalized curves in the cases they discussed.Li & Chen [19] explore the parametrizationinvariant method to eliminate the influence of parametrization under FD, normalization with the arc length approach, and then learning by MLFFNN.However, according to the original paper, the quality of the ANN solution can be further improved.Table 1 collates information from existing literature about neural-network-based linkage synthesis and indicates the curve descriptor, neural network model, and applicable mechanism types used in each study for reference.
As previously discussed, the ANN method may provide a fast solution, but it struggles to solve the linkage-bar synthesis problem well when faced with multiple solutions [19].Additionally, in cases where there are instances with identical inputs but different outputs within the dataset, the training quality and convergence of the ANN are significantly reduced.This phenomenon can be confirmed by examining specific cases outlined in the subsequent sections.However, although solving the multiple solution problem presents challenges, it can provide more flexibility in applications [20].For example, multiple sets of inverse solutions can encourage the decision-maker to consider factors that are less easily modeled (e.g., difficult machining) to select the most appropriate solution.Therefore, unlike the previous research in which a single solution scheme was mainly considered, this paper employs multiple deep neural networks (DNNs) to learn the relationship between the Fourier coefficients and linkage-bars.This enables the development of a fast solution scheme for linkage synthesis and allows individual DNNs to learn the partitioned subsolution spaces to cooperatively generate multiple sets of candidate solutions.Although some recent studies use generative artificial intelligence (Generative AI), such as Auto Encoder [21], to explore multiple solutions to linkage synthesis, their primary focus is on generating diverse solutions.Coupling refinement is usually a secondary consideration, and their direction is still distinct from the cooperative solutions towards refinement proposed in this paper.
Since the proposed approach involves the construction of multiple DNNs, arranging the learning datasets appropriately to maximize the overall learning quality has become a critical issue.To effectively tune the learning performance of multiple DNNs, this paper first proposes a multi-solution distribution evaluation using the random restart local searches (MDE-RRLS) method.This sampling method examines the better sub-solution space partitioning scheme when training multiple DNNs.Additionally, a multi-facet query (MFQuery) is also proposed to form additional coupling targets by utilizing vertical and horizontal projections on the trajectory curves.This expands the solution coverage of the dataset.Subsequently, a voting method or threshold filtering process can be used to gather one or multiple candidate solutions.
In addition, to assess the scalability of the proposed solution, the paper investigates the design issues of a six-linkage-bar ladle used in metal-mold die-casting machine system [22].Unlike the aforementioned four-linkage-bar case, this ladle mechanism does not require closed-curve motion and cannot be directly converted by the Fourier transform; this paper proposes expanding the motion curve into a closure-curve motion through geometric projection and training multiple DNNs to solve the design problem.
To summarize, the contributions of this study mainly come from: (1) The multi-DNNs strategy proposed in this study can obtain superior solution quality while also providing multiple candidate solutions, in contrast to prior single-solution schemes; (2) This study proposes a comprehensive multi-DNNs learning and prediction process, encompassing the MDE-RRLS, the MFQuery and the voting methods; (3) This study extends and validates the synthesis scheme with non-closed trajectories, providing a fast and feasible solution for the redesign needs due to practical variations in the design of an industrial six-linkagebar mechanism.

Problem Definition and Formulation
For a rigid body driven by a linkage-bar mechanism, when given a number of precise points to pass through, the goal of the synthesis design is to solve the linkage parameters inversely, in order to produce a desired trajectory curve that passes through a given set of precise points as accurately as possible [30].When coupling a closed curve, one can apply a Fourier descriptor to obtain curve features and introduce a systematic normalization method to assist in the linkage-bar coupling procedure [31].

Fourier Descriptor Formulation
To analyze the periodic movement of a planar four-linkage-bar mechanism, the coordinate system shown in Figure 1a can be used.The framework uses O as the coordinate origin, coincides point A with origin O, and aligns the AD link with the x axis.Under the condition that r 2 can rotate a full 360 degrees, it is identified as a Crank link, in which the P-point will form a closed curve as it changes with time.The four linkage-bar mechanism is typically driven by the input angle θ 2 .To obtain the position of P at a certain point in time, it is necessary to combine the value of θ 2 with the kinematic analysis of the lengths of the link-bars.This deduction can be achieved through the vector-loop method.Assuming that r represents the vector of the link-bar r, the corresponding closure conditions are formulated as follows: Next, the component equations are used to derive: and   =   +   −   .
(3) By collapsing the above equations and analyzing the geometric relation of P and BC based on the parameters  and , the position of P can be expressed as a relation of  ,  ,  ,  , ,  and  ; the detailed derivation process can be referred to [32].
If  (t) represents the trajectory curve function of P during the motion,  (t) is a periodic function, and the period T = 2π ,  (t + T) =  (t) .The function can be represented by a complex function  (t) = (t) + (t).When  is moving at a constant speed ω, based on previous studies [14,33],  can be expanded to a Fourier series in complex form: where  is the n-th term of Fourier coefficients of the trajectory curve.In the Fourier descriptor, each item can be regarded as a circle whose radius is the magnitude of the coefficient, and these items are iterated to form the desired curve.Since the process of synthesis typically involves passing through a finite number of precise points, using a Fourier descriptor to represent the curve requires that only a finite number of terms to be chosen to meet the necessary level of precision [17].As a result, the precise points can serve as sampling points in this synthesis problem, with the corresponding coefficients obtained through application of the Fourier transform.If the number of retained terms is 2 + 1, this can be expressed as the following equation: In practice,  only needs to be a small number for the approximation error to be reduced to what is actually required [1].
On the other hand, a more generalized four-linkage-bar diagram can be represented in Figure 1b.From the diagram, the whole mechanism ABCDP is equivalent to a rotation of  about the x-axis, and an offset of   with respect to the origin O.In this case, the coordinate transformed  of  is as follows: Next, the component equations are used to derive: and By collapsing the above equations and analyzing the geometric relation of P and BC based on the parameters r 5 and ϕ, the position of P can be expressed as a relation of [r 1 , r 2 , r 3 , r 4 , ϕ, r 5 ] and θ 2 ; the detailed derivation process can be referred to [32].
If r P (t) represents the trajectory curve function of P during the motion, r P (t) is a peri- odic function, and the period T = 2π, r P (t + T) = r P (t).The function can be represented by a complex function r P (t) = x(t) + iy(t).When θ 2 is moving at a constant speed ω, based on previous studies [14,33], r P can be expanded to a Fourier series in complex form: where c n is the n-th term of Fourier coefficients of the trajectory curve.In the Fourier descriptor, each item can be regarded as a circle whose radius is the magnitude of the coefficient, and these items are iterated to form the desired curve.Since the process of synthesis typically involves passing through a finite number of precise points, using a Fourier descriptor to represent the curve requires that only a finite number of terms to be chosen to meet the necessary level of precision [17].As a result, the precise points can serve as sampling points in this synthesis problem, with the corresponding coefficients obtained through application of the Fourier transform.If the number of retained terms is 2d + 1, this can be expressed as the following equation: In practice, d only needs to be a small number for the approximation error to be reduced to what is actually required [1].
On the other hand, a more generalized four-linkage-bar diagram can be represented in Figure 1b.From the diagram, the whole mechanism ABCDP is equivalent to a rotation of θ 1 about the x-axis, and an offset of l 0 e iα with respect to the origin O.In this case, the coordinate transformed r P of r P is as follows: The transformed trajectory curve can be expanded as:

Fourier Coefficient Normalizing and Learning
To couple closed curves, normalization can reduce the dimensions that need to be synthesized.For example, shapes of curves produced by the same linkage-bar configuration with different origin coordinates can be normalized to the same shape.The normalization operations used in this paper include: (1) Normalization of the center point: setting the c 0 coefficient to 0, the center point is normalized to the origin (0,0); (2) Normalization of the orientation: rotating the curve to zero the phase angle of the c −1 coefficient, it tends to align the orientation with the X-axis (horizontally); (3) Normalization of the curve size: dividing the amplitude of the coefficient c −1 to all coefficients; and (4) Normalization of the length of the ground-link: setting r 1 as the base (r 1 = 1).
Indeed, in operations ( 2) and (3), they are not limited to the selection of the c −1 term, and in the practical tests, the selection of either c 1 or c −1 is very close to the effect.Based on the normalization rule, r P (t) and r P (t) are normalized to r P (t) and r P (t), respectively, and their equations can be derived as follows: From the derivation, r P (t) is equivalent to r P (t); therefore, the normalization elim- inates the impact of the extra displacement and rotation of the mechanism.As a result, the simplified coordinate system as shown in Figure 1a is suitable for the normalized synthesis problem. Figure 2 shows an example of a trajectory curve obtained using the aforementioned normalization operations.
As shown in Figure 3, in the Fourier descriptor, the dimension synthesis problem is equivalent to the problem that synthesizing Fourier coefficients with the linkage-bar parameters.Therefore, when solving this synthesis problem using a DNN approach with multiple hidden layers, it is necessary to build a network model with normalized as input and the linkage parameters [r 2 , r 3 , r 4 , ϕ, r 5 ] as output, where r 1 is fixed to 1, and need not to be included.

= r̅ (t).
From the derivation, r̅ (t) is equivalent to r̅ (t); therefore, the normalization eliminates the impact of the extra displacement and rotation of the mechanism.As a result, the simplified coordinate system as shown in Figure 1a is suitable for the normalized synthesis problem. Figure 2 shows an example of a trajectory curve obtained using the aforementioned normalization operations.As shown in Figure 3, in the Fourier descriptor, the dimension synthesis problem is equivalent to the problem that synthesizing Fourier coefficients with the linkage-bar parameters.Therefore, when solving this synthesis problem using a DNN approach with multiple hidden layers, it is necessary to build a network model with normalized coefficients  ⋯  ,  ⋯  as input and the linkage parameters  ,  ,  , ,  as output, where  is fixed to 1, and need not to be included.

One-to-Many Mapping Issues
Although the Fourier descriptor approach can systematically represent the needs of the coupling problem, there remains one-to-many mapping in this synthesis problem.This implies that, for one input (a Fourier coefficient vector), there will be multiple output solutions (a set of linkage parameter vectors), as can be seen below: (1) Cognate linkages According to the Roberts-Chebyshev theorem [34,35], for a trajectory curve that can be generated by a four-link mechanism, there are always three corresponding four-link mechanisms that describe the same curve.As shown in Figure 4 (2) Factors of normalization Due to the normalization, trajectory curves with different translations, rotations and

One-to-Many Mapping Issues
Although the Fourier descriptor approach can systematically represent the needs of the coupling problem, there remains one-to-many mapping in this synthesis problem.This implies that, for one input (a Fourier coefficient vector), there will be multiple output solutions (a set of linkage parameter vectors), as can be seen below: (1) Cognate linkages According to the Roberts-Chebyshev theorem [34,35], for a trajectory curve that can be generated by a four-link mechanism, there are always three corresponding four-link mechanisms that describe the same curve.As shown in Figure 4

One-to-Many Mapping Issues
Although the Fourier descriptor approach can systematically represent the needs of the coupling problem, there remains one-to-many mapping in this synthesis problem.This implies that, for one input (a Fourier coefficient vector), there will be multiple output solutions (a set of linkage parameter vectors), as can be seen below: (1) Cognate linkages According to the Roberts-Chebyshev theorem [34,35], for a trajectory curve that can be generated by a four-link mechanism, there are always three corresponding four-link mechanisms that describe the same curve.As shown in Figure 4 (2) Factors of normalization Due to the normalization, trajectory curves with different translations, rotations and scales, but with the same shape, will have the same Fourier coefficients.
(3) Incomplete coupling at precise points (2) Factors of normalization Due to the normalization, trajectory curves with different translations, rotations and scales, but with the same shape, will have the same Fourier coefficients.
(3) Incomplete coupling at precise points Multiple solutions arise regardless of whether there are too many or too few precise points coupled to the problem.When there are too few precise points, there are multiple different linkage trajectories to pass through, which is essentially a multi-solution paradigm.On the other hand, too many precise points may result in the inability to obtain a trajectory that perfectly passes through the precise points, and only approximate solutions can be obtained [36].As shown in Figure 5, the different dashed lines are generated by using AD as the base reference and different combinations of other link parameters.These configurations are considered equivalent solutions within the allowable error after normalization.As mentioned above, these aspects reveal that coupling curves will have multiple feasible solutions as a result of the one-to-many mappings, regardless of whether the coupler error falls within an acceptable range or is expressed in terms of the normalized Fourier coefficients.

Learning One-to-Many Mapping by Neural Networks
For problems with one-to-many mappings, the outputs corresponding to the same or similar inputs may vary significantly in the solution space near multiple solutions.This means that even small input variations can result in considerable output changes.The most straightforward case is to input the same Fourier coefficients and receive multiple different sets of linkages in the output, resulting in infinity variation.As a result, data models obtained using an ANN typically have poor learning quality.
Taking the Slider-Crank linkage shown in Figure 6 as an example, the relationship between the length  and angle  can be derived as follows: As mentioned above, these aspects reveal that coupling curves will have multiple feasible solutions as a result of the one-to-many mappings, regardless of whether the coupler error falls within an acceptable range or is expressed in terms of the normalized Fourier coefficients.

Learning One-to-Many Mapping by Neural Networks
For problems with one-to-many mappings, the outputs corresponding to the same or similar inputs may vary significantly in the solution space near multiple solutions.This means that even small input variations can result in considerable output changes.The most straightforward case is to input the same Fourier coefficients and receive multiple different sets of linkages in the output, resulting in infinity variation.As a result, data models obtained using an ANN typically have poor learning quality.
Taking the Slider-Crank linkage shown in Figure 6 as an example, the relationship between the length l and angle θ can be derived as follows: Given the value of l, if one wishes to find the corresponding value of θ, one needs to find the inverse solution of the equation.The geometric relationship symmetric to the vertical axis indicates the existence of two solutions.Therefore, a DNN designed to learn this inverse solution problem with l as input and θ as output will contain a one-to-many mapping relationship (specifically, 1-to-2 in this case).
different sets of linkages in the output, resulting in infinity variation.As a result, data models obtained using an ANN typically have poor learning quality.
Taking the Slider-Crank linkage shown in Figure 6 as an example, the relationship between the length  and angle  can be derived as follows: (a) (b) Table 2 shows that when the range of θ is restricted to the interval [−1/2π, 1/2π], the learning quality is poor regardless of the size of the training set because each l corresponds to two solutions; if the region of θ is restricted to the interval [−1/2π, 1/4π], the quality is similarly poor due to the fact that multiple solutions still exist in the interval; and when the region of θ is restricted to the intervals [0, 1/2π] or [−1/2π, 0], in which each l value corresponds to a single θ solution, the trained DNN can obtain good learning results.As shown in the table, the prediction error can be reduced to about 1.8% in 50,000 data.In addition, when converging to one-to-one mapping relationship, the number of training sets increases to make DNN learning quality with significant improvement.Therefore, when employing a DNN approach to solve inverse problems, it is crucial to choose the solution space region thoughtfully and minimize one-to-many relationships.In the past, studies using ANN to learn the synthesis have often improved the quality by restricting the parameter region of the linkages.However, it is typically challenging to directly analyze and derive appropriate constraints to limit the solution space to a small enough region to avoid multiple solutions in most practical inverse problems.On the other hand, solutions obtained by narrowing the parameter region are typically not able to meet the needs of general practical applications.This paper proposes using multiple DNNs to address this kind of inverse problem.

Synthesis Using Multiple DNNs
As mentioned above, it is necessary to establish the appropriate learning region for each DNN.However, since the synthesis is a complex nonlinear problem, it is difficult to obtain a complete solution landscape through analytical methods.On the other hand, previous research [37] has demonstrated the feasibility of investigating the multimodal solutions by restarter searches and obtaining optimal or far better solutions.Therefore, this paper proposes a multi-solution distribution evaluation by random restart local searches (MDE-RRLS) to assist the analysis of the solution space.MDE-RRLS analyzes the distribu-tion of multiple solutions through sampling and generates a group of sub-datasets from the corresponding partitioned regions to train a set of DNNs. Figure 7 shows the overall learning and predicting process using MDE-RRLS as the evaluation metric, and the main steps in the process are explained as follows.

Dataset Partition and Generation for DNN Training Flow
Assuming that the normalized Fourier coefficients of the desired trajectory curve are C = ̅ ⋯ ̅ , the synthesis problem can be converted into the following optimization problem: subject to  ̅ = ̅ ′ ⋯ ̅ ′ = Γ(φ, r ⋯ r ), φ ∈ 0,2 , r ∈ r , r , and 2 ≤  ≤ 5, where  ̅ is the coefficients of the trajectory curve of the predicted linkage mechanism, r and r are the lower and upper bounds of r , respectively, and Γ(. ) denotes as the Fourier transform and normalization function.Equation (10) tends to minimize the root mean square error (RMSE) of the desired and the predicted normalized coefficients.By encoding the linkage parameters into the objective function, this paper proposes a method for generating a set of coupling curves as samples.This method employs iteratively restarting and searching methods to explore the multi-solution locations of these samples and evaluates the relative merits of partitioning schemes.The evaluation is carried out by measuring the number of multi-solutions in the partitioned regions.

Multi-Solution Distribution Evaluation by Random Restart Local Searches (MDE-RRLS)
MDE-RRLS randomly generates M sets of linkage parameters as samples and converting them to normalized Fourier coefficients.Then, by searching the region in the entire solution space with a local search with randomly restarting L-1 times while trapped into a local solution.The goal of the search is to collect all the local solutions explored during the restart iterations.Since multiple solutions exist, the set of inverse solutions after repeatedly restarting searches is denoted as S =  , 1 ≤  ≤ , 1 ≤  ≤  where  , is the search result of the j-th partitioned region of the i-th sample, and its value is set to 0 if the solution is duplicated with the others or is not a feasible solution; otherwise,  , is set to the searched linkage parameter vector  ,  ,  , ,  .MDE-RRLS computes and evaluates the number of multiple solutions that fall in the same partitioned region, which allows to discriminate the relatively better partition scheme.
In the implementation, MDE-RRLS computes the total number (labelled SUM) of the multiple solutions in a partition and the maximal amount (labelled MAX) of the multiple solutions in a partitioned region as the evaluation metrics, and the pseudo steps are shown in Algorithm 1.

Dataset Partition and Generation for DNN Training Flow
Assuming that the normalized Fourier coefficients of the desired trajectory curve are C = {c −d • • • c d }, the synthesis problem can be converted into the following optimization problem: where C is the coefficients of the trajectory curve of the predicted linkage mechanism, rk and řk are the lower and upper bounds of r k , respectively, and Γ(.) denotes as the Fourier transform and normalization function.Equation (10) tends to minimize the root mean square error (RMSE) of the desired and the predicted normalized coefficients.By encoding the linkage parameters into the objective function, this paper proposes a method for generating a set of coupling curves as samples.This method employs iteratively restarting and searching methods to explore the multi-solution locations of these samples and evaluates the relative merits of partitioning schemes.The evaluation is carried out by measuring the number of multi-solutions in the partitioned regions.

Multi-Solution Distribution Evaluation by Random Restart Local Searches (MDE-RRLS)
MDE-RRLS randomly generates M sets of linkage parameters as samples and converting them to normalized Fourier coefficients.Then, by searching the region in the entire solution space with a local search with randomly restarting L-1 times while trapped into a local solution.The goal of the search is to collect all the local solutions explored during the restart iterations.Since multiple solutions exist, the set of inverse solutions after repeatedly restarting searches is denoted as S = s i,j 1 ≤ i ≤ M, 1 ≤ j ≤ L where s i,j is the search result of the j-th partitioned region of the i-th sample, and its value is set to 0 if the solution is duplicated with the others or is not a feasible solution; otherwise, s i,j is set to the searched linkage parameter vector [r 2 , r 3 , r 4 , ϕ, r 5 ].MDE-RRLS computes and evaluates the number of multiple solutions that fall in the same partitioned region, which allows to discriminate the relatively better partition scheme.
In the implementation, MDE-RRLS computes the total number (labelled SUM) of the multiple solutions in a partition and the maximal amount (labelled MAX) of the multiple solutions in a partitioned region as the evaluation metrics, and the pseudo steps are shown in Algorithm 1.

Input:
A set of partitions PR = {pr i |1 ≤ i ≤ h} where h is the number of partitions and pr i is the region covering the i-th partitioned sub-space of (ϕ, r 2 • • • r 5 ).A set of explored multi − solutions S = s i,j 1 ≤ i ≤ M, 1 ≤ j ≤ L after performing random local searches with restarting L-1 times when trapped.

Output:
SUM: total number of multi-solutions existed in the partitions.MAX: the maximal multi-solution number in a partitioned region.
where ps i,j is the number of solutions of the j-th sample located at the i-th partitioned region and set as 0 initially.

For k = 1 to h
For i = 1 to M For j = 1 to L If s i,j = 0 and s i,j located at pr k Then, ps i,j = ps i,j + 1

End
Since all the sampled solutions will inevitably fall in all the partitioned regions, and between the partitioned regions, as illustrated in the Slider-Crank example above.It follows that learning quality increases when partitioned regions produce no or fewer multi-solutions.Consequently, a better partitioning scheme will have fewer SUM and MAX values.Using sampling can significantly reduce the computational cost compared to directly training the DNNs and then reviewing their learning quality.

Dataset Generation & Partition
After selecting the partition scheme, all linkage data within the partitioned region will be randomly generated.However, any data that does not satisfy the Grashof's law or prohibits r 2 from rotating by a full 360 0 should be excluded.According to the sampling requirements of the Fourier transform, the sampling position {t 1 • • • t 2d+1 } is brought into P(t) to obtain the precise points {p 1 • • • p 2d+1 }.Next, the Fourier coefficients are obtained after Fourier transformation and normalization.The dataset is then constructed by combining the Fourier coefficients with the parameters of the linkages to form an inputoutput pair r 3 , r 4 , ϕ, r 5 ]).It should be noted that c 0 and r 1 remain fixed throughout this process.

Training DNNs by Partitioned Datasets
Next, the dataset is partitioned into multiple sub-datasets based on the results of MDE-RRLS for training and learning purposes.The subsequent experiments also address the learning quality of DNNs trained using different partitioning schemes.

Predicting Flow to Obtain One or Multiple Solutions
When using the trained MDNNs for prediction, this paper proposes the multi-facet query (MFQuery) method which uses multiple projections of the desired curve to predict the outputs of the DNNs.In addition, since multiple DNNs are used to learn the overall solution space, when predicting the solutions, it is necessary to further cooperate with the trained DNNs to decide the most suitable solutions.Therefore, the paper also advocates for establishing a voting method for prediction.

Multi-Facet Query
For the desired curve, the standard method of prediction is sampling precise points and subsequently transforming and normalizing them into Fourier coefficients.Using these coefficients as the input, the trained DNNs will then predict the output of the corresponding linkage parameters.However, although the normalization effect allows the dataset to eliminate additional translations, scales, and rotations, there are still other affine transformations that have not been considered, such as vertical-axis versus horizontal-axis projection.There are two potential solutions to improve this problem.The first is to add additional affine transformations to the normalization of the dataset, but this approach will increase the number of multiple solutions again.The second solution involves transforming the desired coupler curve with the above two projections and querying the trained DNNs to predict additional linkages.Since the latter takes only a rather short time (usually less than 0.1 s) to perform the additional prediction, this paper proposes the second scheme to obtain more coupling candidate solutions within the same dataset.
MFQuery is implemented by first converting the normalized Fourier coefficients back to the sampling points (normalized precise points) of the curves and subsequently acquiring two additional sets of sampling points transformed by vertical-axis and horizontal-axis projections, followed by obtaining two additional sets of corresponding normalized Fourier coefficients.Then, the trained DNNs use these coefficient sets as inputs to predict the additional outputs (i.e., the linkage parameters), and finally, the best-fit solutions are chosen.
Figure 8 shows an MFQuery example.Figure 8(a1,b1) is the desired coupler curve.Figure 8(a3,b3) shows the curves after the projection of the vertical and horizontal axes, respectively.Additionally, Figure 8(a2,a4,b2,b4) is the prediction results of the trained DNNs, respectively.Since Figure 8(a4,b4) is the additionally projected linkages, the practical linkage configurations need to be applied with corresponding inverse projections; the resulting transformed configurations are shown in Figure 8(a5,b5).
In the presentation style, Figure 8(a1,b1) lacks specific axes since the axes can have arbitrary scales due to normalization.To ensure consistency, Figure 8(a3,b3) is presented following the same format as Figure 8(a1,b1), since they have a projection relationship with Figure 8(a1,b1).

Voting Method
Since synthesis can involve a single solution or a set of candidate solutions, a voting method is needed to select the best-fit solutions from the outputs of the trained DNNs.This paper employs the RMSE formulated in Equation (10) to assess the closeness of the trajectory points of output solutions to their corresponding precise point positions.All feasible solutions can be ranked according to the RMSE values, and the one with the lowest value can be selected, or an appropriate threshold can be set to reserve a collection of superior solutions.
tical linkage configurations need to be applied with corresponding inverse projections; the resulting transformed configurations are shown in Figure 8(a5,b5).
In the presentation style, Figure 8(a1,b1) lacks specific axes since the axes can have arbitrary scales due to normalization.To ensure consistency, Figure 8

Voting Method
Since synthesis can involve a single solution or a set of candidate solutions, a voting method is needed to select the best-fit solutions from the outputs of the trained DNNs.This paper employs the RMSE formulated in Equation (10) to assess the closeness of the trajectory points of output solutions to their corresponding precise point positions.All feasible solutions can be ranked according to the RMSE values, and the one with the lowest value can be selected, or an appropriate threshold can be set to reserve a collection of superior solutions.

Experiments and Discussions
In this section, the four-linkage-bar synthesis problem is first used to validate the proposed flows, and a comparison with the cases in the literature will also be made to identify the potential advantages of the proposed scheme.The following hardware and software specifications were used for the execution of the experiments: i7-12700 CPU, RTX4090 GPU, Windows 10 OS, and TensorFlow 2.

MDE-RRLS Evaluation and Selection of Subspace Partitions
In this test case, r , r , r , , r parameters are used as the partition targets.Based on r = 1, the bar length ranges of r , r , r , r are set to be [0.1, 3.5], and  ∈ 0,2 .In addition, according to the transmission angle µ (as shown in Figure 1a) is greater than or less than 90 degrees, the linkages can be assembled into different two kinds of configurations, "elbow-up " and "elbow-down", denoted as CFG to represent these two types with values 0 and 1. CFG is also used as the partition target.The Fourier transform is performed with a set of nine precise points to retain the first nine coefficients ( = 4) as chosen in [17].
Firstly, the distribution of multiple solutions in different partitioned regions was evaluated by MDE-RRLS in 100 samples (M = 100) where the sequential least squares programming method (SLSQP) [38] is employed in the local searches with 100 restarting times (L = 100).Then, further refined partitioning schemes were selected to review the changes in the distribution.Table 3 shows the results of the MDE-RRLS evaluation with up to 8 partitioned regions.Firstly, the smallest SUM and MAX values obtained by MDE-RRLS were selected after comparing the cases with two equal regions, the top two being Ψ and CFG, respectively; and then the cases with four equal regions was performed to compare the two parameters including an individual partition (Ψ:4) and a combined partition (Ψ:2, CFG:2).Comparisons show that the obtained values decrease significantly in a larger number of regions, and in addition, the combined partition scheme leads to better

Experiments and Discussions
In this section, the four-linkage-bar synthesis problem is first used to validate the proposed flows, and a comparison with the cases in the literature will also be made to identify the potential advantages of the proposed scheme.The following hardware and software specifications were used for the execution of the experiments: i7-12700 CPU, RTX4090 GPU, Windows 10 OS, and TensorFlow 2.

MDE-RRLS Evaluation and Selection of Subspace Partitions
In this test case, r 2 , r 3 , r 4 , ϕ, r 5 parameters are used as the partition targets.Based on r 1 = 1, the bar length ranges of r 2 , r 3 , r 4 , r 5 are set to be [0.1, 3.5], and ϕ ∈ [0, 2π].In addition, according to the transmission angle µ (as shown in Figure 1a) is greater than or less than 90 degrees, the linkages can be assembled into different two kinds of configurations, "elbow-up " and "elbow-down", denoted as CFG to represent these two types with values 0 and 1. CFG is also used as the partition target.The Fourier transform is performed with a set of nine precise points to retain the first nine coefficients (d = 4) as chosen in [17].
Firstly, the distribution of multiple solutions in different partitioned regions was evaluated by MDE-RRLS in 100 samples (M = 100) where the sequential least squares programming method (SLSQP) [38] is employed in the local searches with 100 restarting times (L = 100).Then, further refined partitioning schemes were selected to review the changes in the distribution.Table 3 shows the results of the MDE-RRLS evaluation with up to 8 partitioned regions.Firstly, the smallest SUM and MAX values obtained by MDE-RRLS were selected after comparing the cases with two equal regions, the top two being Ψ and CFG, respectively; and then the cases with four equal regions was performed to compare the two parameters including an individual partition (Ψ:4) and a combined partition (Ψ:2, CFG:2).Comparisons show that the obtained values decrease significantly in a larger number of regions, and in addition, the combined partition scheme leads to better values; finally, based on the SUM and MAX values, the case (Ψ:4, CFG:2) containing a quadratic partition in Ψ combined with an equal partition in CFG is selected here as the partitioning and learning blueprint for the subsequent training of DNNs.

Training Parameter Selection
For each partitioned sub-dataset, an individual DNN will be trained.Due to the stochastic nature of DNN learning and training, the mean and standard deviation of the 10 execution runs in each case are used as a basis for comparison.Other training parameters were set as follows: according to the number of data ranging from [0, 50,000], (50,000, 200,000], (200,000, 800,000] to (800,000, 1,600,000], the number of hidden layers and the number of neurons were combined to be (2,32), (3,64), (3,128), and (4, 128), respectively.The activation function was the rectified linear unit function (ReLU) [39], the learning rate is 0.001 and the epoch number was 50.
Table 4 compares the learning results after training of DNNs, and it can be observed that when 8 DNNs are learned cooperatively, the average prediction error of (Ψ:4, CFG:2) is better; and when the number of datasets is increased, the overall quality of learning is also improved.In addition, Table 4 also shows that the quality of learning tends to be similar to the assessed values for the various MDE-RRLS outcomes shown in Table 3.When the dataset is large enough, the results tend to be more consistent.Moreover, when the number of partitions reaches a certain number, the decrease in prediction error becomes less obvious, and this effect also reflect in the evaluation of MDE-RRLS.Thus, the MDE-RRLS evaluation can guide the partitioning of the dataset, resulting in an improved quality of learning.
It should be noted that even if the data number increases, none of the single neural network solutions in scheme (No Partition) can get good solution quality.Even with the largest dataset in the table, the average error is still five times higher compared to the partitioning scheme (Ψ:4, CFG:2) for the same dataset.

Comparison with Literature Cases
To verify the results of the proposed approach, a previous four-linkage-bar synthesis case [17] is used here for a comparative study.In the original study, both the setup in Figure 9 was chosen with the origin as A and AD coinciding with the x-axis, which is equivalent to Figure 1a.For the sake of fairness, the other setting as that of the previous work is also used, where the information of the linkage parameters is defined in terms of the endpoint coordinates of the link-bars, e.g., the coordinates of the joint A point are denoted as (x A , y A ).In addition, datasets of the same size (i.e., 60,000 data volume) were used.
Machines 2023, 11, x FOR PEER REVIEW 15 of 21 largest dataset in the table, the average error is still five times higher compared to the partitioning scheme (Ψ:4, CFG:2) for the same dataset.

Comparison with Literature Cases
To verify the results of the proposed approach, a previous four-linkage-bar synthesis case [17] is used here for a comparative study.In the original study, both the setup in Figure 9 was chosen with the origin as A and AD coinciding with the x-axis, which is equivalent to Figure 1a.For the sake of fairness, the other setting as that of the previous work is also used, where the information of the linkage parameters is defined in terms of the endpoint coordinates of the link-bars, e.g., the coordinates of the joint A point are denoted as ( ,  ).In addition, datasets of the same size (i.e., 60,000 data volume) were used.It should be noted that the original study used a single ANN as the solution method; however, as mentioned above, datasets with multiple solutions will make the ANN training converge poorly.Therefore, the original study restricted parameter ranges to a limited region where the link-bar scale is small, the inverse solution exists, and the mechanism will not get stuck in the simulation.The conditional rule enhances the coupling success rate, but its extensiveness can be relatively limited (e.g., the selected parameter region will only produce Crank-Rocker bodies).
In this synthesis problem, eight DNNs are trained using the partition scheme mentioned earlier (Ψ:4, CFG:2).Figure 10 shows the comparison between the proposed multi-DNNs scheme and the results of the previous work, where the scheme proposed in this paper obtains better solutions in the first and second cases and comparable solutions in the third and fourth cases.Figure 11 shows that the MFQuery method obtains additional good solutions after making predictions using vertical and horizontal projection curves, and the more suitable solutions are selected by the boxes.In the second and fourth cases, the queries by projection curves obtain obviously better coupling solutions compared to the original curve.It should be noted that the original study used a single ANN as the solution method; however, as mentioned above, datasets with multiple solutions will make the ANN training converge poorly.Therefore, the original study restricted parameter ranges to a limited region where the link-bar scale is small, the inverse solution exists, and the mechanism will not get stuck in the simulation.The conditional rule enhances the coupling success rate, but its extensiveness can be relatively limited (e.g., the selected parameter region will only produce Crank-Rocker bodies).
In this synthesis problem, eight DNNs are trained using the partition scheme mentioned earlier (Ψ:4, CFG:2).Figure 10 shows the comparison between the proposed multi-DNNs scheme and the results of the previous work, where the scheme proposed in this paper obtains better solutions in the first and second cases and comparable solutions in the third and fourth cases.Figure 11 shows that the MFQuery method obtains additional good solutions after making predictions using vertical and horizontal projection curves, and the more suitable solutions are selected by the boxes.In the second and fourth cases, the queries by projection curves obtain obviously better coupling solutions compared to the original curve.
Machines 2023, 11, x FOR PEER REVIEW 15 of 21 largest dataset in the table, the average error is still five times higher compared to the partitioning scheme (Ψ:4, CFG:2) for the same dataset.

Comparison with Literature Cases
To verify the results of the proposed approach, a previous four-linkage-bar synthesis case [17] is used here for a comparative study.In the original study, both the setup in Figure 9 was chosen with the origin as A and AD coinciding with the x-axis, which is equivalent to Figure 1a.For the sake of fairness, the other setting as that of the previous work is also used, where the information of the linkage parameters is defined in terms of the endpoint coordinates of the link-bars, e.g., the coordinates of the joint A point are denoted as ( ,  ).In addition, datasets of the same size (i.e., 60,000 data volume) were used.It should be noted that the original study used a single ANN as the solution method; however, as mentioned above, datasets with multiple solutions will make the ANN training converge poorly.Therefore, the original study restricted parameter ranges to a limited region where the link-bar scale is small, the inverse solution exists, and the mechanism will not get stuck in the simulation.The conditional rule enhances the coupling success rate, but its extensiveness can be relatively limited (e.g., the selected parameter region will only produce Crank-Rocker bodies).
In this synthesis problem, eight DNNs are trained using the partition scheme mentioned earlier (Ψ:4, CFG:2).Figure 10 shows the comparison between the proposed multi-DNNs scheme and the results of the previous work, where the scheme proposed in this paper obtains better solutions in the first and second cases and comparable solutions in the third and fourth cases.Figure 11 shows that the MFQuery method obtains additional good solutions after making predictions using vertical and horizontal projection curves, and the more suitable solutions are selected by the boxes.In the second and fourth cases, the queries by projection curves obtain obviously better coupling solutions compared to the original curve.The output (linkage) parameters obtained in this study are shown in Table 5.Although the impact of  variation vanishes after the normalization process, inverse normalization is still required for an inverse rotation during the final coupling stage, with the amount of rotation provided by  .

Application to Design an Industrial Six-Bar Ladle Mechanism
To verify the effectiveness of the proposed method in practical applications, this paper discusses how to expand the application of the proposed method in practical cases through a six-linkage-bar mechanism design case.As illustrated in Figure 12, this mechanism is used for metal-mold die-casting system in loading the liquid metal [22], and in the actual production,  is driven by an electric motor, and the tail end will be configured with a soup spoon.As shown in Figure 12c, while the OU bar is rotating, the mechanism loads the liquid metal (such as aluminum liquid) from the boiler, moves around the boiler wall, and finally arrives at the location of the pouring hole.The output (linkage) parameters obtained in this study are shown in Table 5.Although the impact of θ 1 variation vanishes after the normalization process, inverse normalization is still required for an inverse rotation during the final coupling stage, with the amount of rotation provided by θ 1 .

Application to Design an Industrial Six-Bar Ladle Mechanism
To verify the effectiveness of the proposed method in practical applications, this paper discusses how to expand the application of the proposed method in practical cases through a six-linkage-bar mechanism design case.As illustrated in Figure 12, this mechanism is used for metal-mold die-casting system in loading the liquid metal [22], and in the actual production, θ 1 is driven by an electric motor, and the tail end will be configured with a soup spoon.As shown in Figure 12c, while the OU bar is rotating, the mechanism loads the liquid metal (such as aluminum liquid) from the boiler, moves around the boiler wall, and finally arrives at the location of the pouring hole.The output (linkage) parameters obtained in this study are shown in Table 5.Although the impact of  variation vanishes after the normalization process, inverse normalization is still required for an inverse rotation during the final coupling stage, with the amount of rotation provided by  .

Application to Design an Industrial Six-Bar Ladle Mechanism
To verify the effectiveness of the proposed method in practical applications, this paper discusses how to expand the application of the proposed method in practical cases through a six-linkage-bar mechanism design case.As illustrated in Figure 12, this mechanism is used for metal-mold die-casting system in loading the liquid metal [22], and in the actual production,  is driven by an electric motor, and the tail end will be configured with a soup spoon.As shown in Figure 12c, while the OU bar is rotating, the mechanism loads the liquid metal (such as aluminum liquid) from the boiler, moves around the boiler wall, and finally arrives at the location of the pouring hole.Figure 13 shows the trajectory curves of each solution, with the markers in the upper half of the curve being the desired precise point locations.In addition, since this problem is a practical application and the design of the mechanism does not allow for vertically or horizontally projected installation, only the original trajectory curves from MFQuery are used to predict the linkage parameters in this design problem.shows the results of the eight trained DNNs.Notably, the values of  ,  , and  obtained via inverse normalization are presented despite their omission from the DNN training parameters.they are the corresponding values obtained from the inverse normalization.Figure 13 shows the trajectory curves of each solution, with the markers in the upper half of the curve being the desired precise point locations.In addition, since this problem is a practical application and the design of the mechanism does not allow for vertically or horizontally projected installation, only the original trajectory curves from MFQuery are used to predict the linkage parameters in this design problem.  Figure 14 shows the better solutions 2, 4 and 6, respectively, which contain each linkage configuration with its corresponding trajectory curve.Observing the motion curves in the figure, the trajectory curves are close to the desired precise points.Therefore, the design requirements can be achieved, and the other solutions, such as solutions 3, 7 and 8, are also solutions that can be considered with some fine-tuning if only the loading and injection points are the focal points.Figure 14 shows the better solutions 2, 4 and 6, respectively, which contain each linkage configuration with its corresponding trajectory curve.Observing the motion curves in the figure, the trajectory curves are close to the desired precise points.Therefore, the design requirements can be achieved, and the other solutions, such as solutions 3, 7 and 8, are also solutions that can be considered with some fine-tuning if only the loading and injection points are the focal points.

Design Refinement in a Short-Time Response
Since the trained DNNs can compute (predict) the output linkage parameters quite quickly, the proposed scheme can respond fast to the linkage redesign with the change of the precise points.Figure 15 shows that the corresponding design is obtained by simulating the drag-and-move interactive design when a precise point is moved from A-point to B-point, where four consecutive changes are made.Due to the fast computation capabilities of the trained DNNs (the computation time is less than 1 s in the tested environment), their performance can be applied to applications that require a short response time, which can provide designers with considerable real-time options.

Conclusions
The linkage synthesis problem described by the Fourier descriptor and normalization allows for a systematic representation of coupled trajectory curves.However, a single neural network for synthesizing methods results in poor learning quality due to multiple solutions existing in the dataset.Therefore, this paper proposes using the MDE-RRLS method to enhance the partition scheme of the solution space, employing multiple DNNs to learn the partitioned subspaces, and using the MFQuery method on the trained DNNs to predict additional candidate solutions.Finally, the candidate solutions are combined to obtain a single optimal solution by the voting method or multiple feasible solutions by a threshold.
By comparing with the four-linkage-bar synthesis cases in the literature, the proposed scheme can obtain better or at least competitive solutions.When applied to the design of an industrial six-bar ladle mechanism, the proposed approach can successfully

Design Refinement in a Short-Time Response
Since the trained DNNs can compute (predict) the output linkage parameters quite quickly, the proposed scheme can respond fast to the linkage redesign with the change of the precise points.Figure 15 shows that the corresponding design is obtained by simulating the drag-and-move interactive design when a precise point is moved from A-point to B-point, where four consecutive changes are made.Due to the fast computation capabilities of the trained DNNs (the computation time is less than 1 s in the tested environment), their performance can be applied to applications that require a short response time, which can provide designers with considerable real-time options.

Design Refinement in a Short-Time Response
Since the trained DNNs can compute (predict) the output linkage parameters quite quickly, the proposed scheme can respond fast to the linkage redesign with the change of the precise points.Figure 15 shows that the corresponding design is obtained by simulating the drag-and-move interactive design when a precise point is moved from A-point to B-point, where four consecutive changes are made.Due to the fast computation capabilities of the trained DNNs (the computation time is less than 1 s in the tested environment), their performance can be applied to applications that require a short response time, which can provide designers with considerable real-time options.

Conclusions
The linkage synthesis problem described by the Fourier descriptor and normalization allows for a systematic representation of coupled trajectory curves.However, a single neural network for synthesizing methods results in poor learning quality due to multiple solutions existing in the dataset.Therefore, this paper proposes using the MDE-RRLS method to enhance the partition scheme of the solution space, employing multiple DNNs to learn the partitioned subspaces, and using the MFQuery method on the trained DNNs to predict additional candidate solutions.Finally, the candidate solutions are combined to obtain a single optimal solution by the voting method or multiple feasible solutions by a threshold.
By comparing with the four-linkage-bar synthesis cases in the literature, the proposed scheme can obtain better or at least competitive solutions.When applied to the design of an industrial six-bar ladle mechanism, the proposed approach can successfully

Conclusions
The linkage synthesis problem described by the Fourier descriptor and normalization allows for a systematic representation of coupled trajectory curves.However, a single neural network for synthesizing methods results in poor learning quality due to multiple solutions existing in the dataset.Therefore, this paper proposes using the MDE-RRLS method to enhance the partition scheme of the solution space, employing multiple DNNs to learn the partitioned subspaces, and using the MFQuery method on the trained DNNs to predict additional candidate solutions.Finally, the candidate solutions are combined to obtain a single optimal solution by the voting method or multiple feasible solutions by a threshold.
By comparing with the four-linkage-bar synthesis cases in the literature, the proposed scheme can obtain better or at least competitive solutions.When applied to the design of an industrial six-bar ladle mechanism, the proposed approach can successfully synthesize several candidate solutions by applying the proposed partition and training processes.

Figure 1 .
Figure 1.Coordinate system and parameters of a four-linkage-bar.(a) Simplified structure diagram.(b) General analysis diagram.

Figure 1 .
Figure 1.Coordinate system and parameters of a four-linkage-bar.(a) Simplified structure diagram.(b) General analysis diagram.

Figure 2 .
Figure 2. Example of the normalized trajectory curve of a linkage-bar.(a) Original P-point trajectory.(b) Translation normalization by zeroing  .(c) Scale and rotation normalization by standardizing the value of  .

Figure 2 .Figure 3 .
Figure 2. Example of the normalized trajectory curve of a linkage-bar.(a) Original P-point trajectory.(b) Translation normalization by zeroing c 0 .(c) Scale and rotation normalization by standardizing the value of c −1 .Machines 2023, 11, x FOR PEER REVIEW 7 of 21

Figure 3 .
Figure 3. Synthesizing the mapping between Fourier coefficients and linkage parameters.

Figure 3 .
Figure 3. Synthesizing the mapping between Fourier coefficients and linkage parameters.

Figure 7 .
Figure 7. Proposed DNN learning and predicting flows.(a) Dataset partition and generation for DNN training flow.(b) Predicting Flow to Obtain One or Multiple Solutions.

Figure 7 .
Figure 7. Proposed DNN learning and predicting flows.(a) Dataset partition and generation for DNN training flow.(b) Predicting Flow to Obtain One or Multiple Solutions.
Then, ps k,i = 0 /* Count numbers only if more than one solution is in the same region */

Figure 15 .
Figure 15.Redesign case due to local path changes.

Figure 15 .
Figure 15.Redesign case due to local path changes.

Figure 15 .
Figure 15.Redesign case due to local path changes.

Table 1 .
List of the publications in linkage synthesis based on neural networks.

Table 2 .
Comparison of learning the l − to − θ mapping in the Slider-Crank mechanism.
* Remark: Bold numbers indicate the best scores.

Table 3 .
MDE-RRLS evaluation results for the solution space partitions.
* Remark: The partitioning setup is shown as (parameter):(partitioned region number).

Table 4 .
Comparison of learning quality of trained DNNs.

Table 5 .
Synthesis results for linkage parameters.

Table 5 .
Synthesis results for linkage parameters.

Table 5 .
Synthesis results for linkage parameters.

Table 7 .
Prediction results of the trained DNNs.

Table 7 .
Prediction results of the trained DNNs.