1 Introduction

Compliant mechanism is a promising platform in accurate positioning engineering. It is widely used across multidisciplinary applications, e.g., micro-electromechanical system, robotics, bioengineering, actuator, and sensor [1,2,3,4,5,6,7,8,9]. In recent years, two degrees of freedom (2-DOF) compliant mechanisms have received much attention in industry and academy because they can provide an ultra-high precision and save manufacturing costs. Additionally, they inherit excellent advantages of monolithic fabrication with a lightweight and a friction free compared to conventional counterparts [10,11,12,13,14].

Until now, modeling of the performance for the compliant mechanisms is an extremely complex task due to an incorporation of compliant elements with rigid ones, and a strictly merging of simultaneously kinematic-and-mechanical behaviors. The kinematic methods are mainly based on a relative movement among links and joints, which ignore the simultaneously kinematic-and-mechanical behaviors. Especially in analyzing a flexible element with largely nonlinear deformation, the applications of kinematic methods are failed. When a flexible element has one more degree of freedoms in movements, the modeling task is more complicated. So, their structures are difficult to analyze and model when they undergo a large nonlinear deformation.

In the last decades, modeling methods for compliant mechanisms have received a great interest by many researchers. Particularly, analytical methods and numerical techniques have been developed such as pseudo-rigid-body model [15], improved pseudo-rigid-body model [16, 17], stiffness matrix [18], kinematic-based methods [4, 19, 20], kineto-static and dynamic model [21], compliance matrix method [22], finite element method (FEM) [23, 24], normalization-based methods [25, 26], nonlinear model [27], and building block [28].

The analytical methods have been successfully applied for modeling simple structures but the state-of-the-art procedures are still challenging due to their complicated applications and even unsolvable for highly nonlinear deformation. Specifically, the pseudo-rigid body model is strongly influenced by assigning the locations of torsional springs and amount of them, and the prediction accuracy is limited. Meanwhile, the compliance matrix method is not capable of analyzing structures with multiple forces.

On the contrary, the FEM method has been successfully employed for analyzing compliant mechanisms due to its efficiency. The FEM can divide each flexible link and rigid into a number of elements and nodes so as to describe a large nonlinear deformation of multiple degree of freedoms compliant mechanisms. The FEM can also analyze complex or irregular shapes. For example, the FEM technique was developed to model the statics and dynamics of circular hinge [29]. And then, this technique was extended for the amplification mechanism with a high accuracy. Additionally, the inverse FEM technique was discovered as a modeling method for compliant mechanism. In this article, microgripper, microvalve, and lens folding devices were illustrated as the irregular shapes or complex structures [30]. The shapes of flexible elements in these devices are irregular curves, and their deformations have very high nonlinearity. For data-based optimization problems in engineering, the FEM is a suitable tool to initialize datasets which are then employed for some tasks such as modeling, prediction, regression, and optimization [31]. So, the FEM is considered as an alternative design method for compliant mechanisms.

In the present work, a computational intelligent method is motivated to solve the compliant mechanisms. The FEM is a key technique which is integrated in the proposed method. The main purpose of the present article is to reach a computation-based intelligent method in modeling and optimization for compliant mechanisms. The suggested method is based on computational intelligence, statistics, fuzzy logic theory, adaptive neuro-fuzzy inference system, finite element method, and metaheuristic algorithm.

In order to enhance the performances of compliant mechanisms, e.g., fatigue life, displacement, parasitic error, stress, frequency, and strain energy, the mechanical structures are almost changed randomly by designer’s experiences. Then, the aforementioned analytical procedures are applied to predict the performances. This improvement process can take a long time and spend a large computing cost. In order to overcome this restriction, researchers have suggested an optimal design method for compliant mechanisms. In the field of optimization, mathematical models of fitness and constraint functions are established, and then a population-based metaheuristic algorithm is applied. Structural optimization is a common type in this field, including topology optimization [32], shape optimization, and size optimization [33,34,35]. The topology optimization and shape optimization are directly related to FEM and evolutionary algorithm while the size optimization is involved to mathematical models. In the light of this problem, the present study focuses on multi-objective optimization (MOO) via the computational intelligent method. Nowadays, MOO issues have been growing by many researchers [36,37,38]. Regarding a general MOO, design parameters should be properly chosen to decrease complexity of the problem. Therefore, this article considers an enough amount of design parameters. This work helps to reduce space of populations and make new ones in modeling and optimization process.

Before implementing the optimization problems, fitness functions and constraint objectives must be formulated. In compliant mechanisms, the performances have high nonlinearity. Hence, the objective and constraint functions are difficult to be established through the traditionally analytical methods. In order to overcome this limitation, approximation models are alternated in the present article. Based on the datasets from the FEM simulations, the approximate models can accurately model the performances of compliant mechanisms. In order to reach a global value, data-driven methods are priority. Data-driven methods allow to build regression models or equations such as the response surface method (RSM) [39,40,41] and Kriging technique [42]. These two methods are still limited because these techniques strongly depend on approximation order, such as linear, second-order, and high polynomial order.

To solve the engineering problems with high nonlinearity behaviors, artificial intelligences (AI) methods or genetic expression programming (GEP) are potential techniques which offer precisely approximate the regression models. Recently, Güllü coupled the AI with genetic expression programming to predict average shear wave velocity which is soil property [43]. Then, the GEP was developed to forecast the rheological behavior of grout with bottom ash in jet grouting columns [44]. The results of this study show that the performance metrics of the develop model are better than the nonlinear regression models. In order to estimate the nonlinearly rheological characteristics of jet grout cement mixtures, the GEP was applied [45]. Güllü and Fedakar developed AI techniques such as radial basis neural network, multilayer perceptron, generalized regression neural network, and adaptive neuro-fuzzy inference system (ANFIS) to predict the unconfined compressive strength of silty soil. The results indicated that the performance indexes of the AI models are better than the nonlinear regression [46]. Next, the GEP was employed to formulate the unconfined compressive strength with high accuracy [47]. Then, the GEP was utilized to predict the peak ground acceleration [48]. In order model the peak ground acceleration, artificial neural network (ANN) was suggested. They found that the ANN technique outperformed to the regression method [49]. In addition, AI techniques have been successfully applied for other areas, e.g., ANN [50,51,52,53,54,55], fuzzy logic [56,57,58,59], and ANFIS [60,61,62]. On the contrary, ANFIS techniques attract much attention because it can accurately formulate a pseudo-fitness function and constraint functions. In order to model the highly nonlinear performances of the 2-DOF compliant mechanism, the ANFIS approach is chosen in this study.

After formulating the approximate models for fitness functions and constraint functions, an optimization method is employed. Until now, a few optimization approaches have been proposed to simultaneously solve the MOO, e.g., desirability [63], gray [64], and Taguchi-combined fuzzy (TCF) [65]. Most of methods are still valuable but the optimal value may trap a local point. Besides, metaheuristic algorithms have been have attracted much attention in MOOs, e.g., genetic algorithm (GA) [66], particle swarm optimization (PSO) [67, 68], differential evolution (DE) [69], improved differential evolution (IDE) [70], cuckoo search algorithm (CSA) [71], improved binary differential evolution algorithm (IBDE) [72], nondominated sorting genetic algorithm II (NSGA-II) [38], interactive Search algorithm (ISA) [73], bi-objective evolutionary algorithm (BOEA) [74], and other algorithms [75,76,77,78]. However, the aforementioned algorithms are quite complicated and require a long computing time because they depend on specific-tuned parameters. If unsuitable parameters are used, the optimal solution is not true. In other words, those algorithms limit to optimization problems with multiple constraints. Hence, researchers developed recent algorithms such as teaching learning-based optimization algorithm (TLBO) [79,80,81], Jaya algorithm [82], and lightning attachment procedure optimization (LAPO) algorithm [83]. These three algorithms have good behaviors but LAPO can be considered as the best one. So, the LAPO is selected to extend for the 2-DOF compliant mechanism.

From this perspective, this study suggests some new contributions as: (1) A large nonlinear deformation of compliant mechanisms can be resolved by nonlinear FEM. (2) The suggested computational intelligence method is capable of making new populations for evolutionary algorithm. (3) The output performances of the 2-DOF mechanism are changed into a single objective function (SOF) by combination of desirability and fuzzy logic. (4) The SOF is modeled by ANFIS. The output of ANFIS is a pseudo-fitness function which is then optimized by LAPO. (5) The suggested method is hybrid combination of intelligent computation, statistics, FEM, ANFIS, and evolutionary algorithms thanks to its robustness and simplicity. (6) The suggested computational intelligence approach can reach a global optimum value.

The goal of the present paper is to suggest a computational intelligence method which is employed for 2-DOF compliant mechanism. The structure of this article includes following parts. The computational intelligence method is presented in Sect. 2. The optimization formulation for 2-DOF compliant mechanism is described in Sect. 3. Section 4 includes results and discussion. Comparison is given in Section 5. Conclusions and future work are made in Section 6.

2 Computational intelligence method

A computational intelligence method is developed to resolve the MOO process of complaint mechanism in this paper. In the field of precise engineering systems, the 2-DOF compliant mechanism simultaneously needs a large displacement and a small parasitic motion [84]. The suggested computational intelligence method undergoes following phases: (1) mechanical structure, (2) desirability’s calculation for objective functions, (3) combination of all objective functions into a single fitness function by fuzzy logic system, (4) modeling the combined fitness function through ANFIS, and (5) maximizing this objective by LAPO algorithm. Figure 1 illustrates the main computational procedure of the suggested method.

Fig. 1
figure 1

Suggested framework of computational intelligence method

Step 1: Design and analysis

Design and analysis undergo the main procedures as follows.

  • Architecture design This mechanism desires to reach a large displacement and a small parasitic error but it must work under an elastic area of material. The displacement is a performance along the desired axis (e.g., x-axis) while the parasitic error motion is an error along the undesired axis (e.g., y-axis). The parasitic motion is perpendicular to the displacement. If parasitic error is limited, and the precision of the mechanism is enhanced.

  • Determination of design variables This an important task to find the main parameters affecting the performances of the mechanism.

  • Objective functions The displacement and the parasitic error are the output performances. Particularly, stress is considered as a constraint.

  • Finite element analysis (FEA) A FEM model is analyzed by FEA implementation to reach the displacement, the parasitic motion, and the equivalent stress (Von Mises stress).

  • Numerical dataset numerical datasets are got from FEA in which design of experiment is generated by central composite design (CCD).

  • Investigation of sensitivity It is analyzed by using analysis of variance (ANOVA) and the Taguchi method.

  • Reduce the space of design variables It helps to find main parameters which contribute to the population space for the LAPO.

  • Rebuild 3D model and recollect numerical dataset Based on the space of new populations, 3D model is rebuilt, and the corresponding numerical datasets are collected again.

Step 2: Desirability calculation

Step 2 changes the displacement and parasitic error to become the desirability index in a range from zero to one. This helps to avoid a deviation of both performances. The displacement and the parasitic error are suitable with the larger-the-bester and the smaller-the-better, respectively [85].

Larger-the-bester:

$$\left\{ \begin{aligned} & D_{i} = 0, \, \quad f^{ * } \le L_{\rm b} \\ & D_{i} = \left( {\frac{{f^{ * } - L_{\rm b} }}{{U_{\rm b} - L_{\rm b} }}} \right)^{r} ,\quad L_{\rm b} \le f^{ * } \le U_{\rm b} \\ & D_{i} = 1,\quad \, f^{ * } \ge U_{\rm b} , \, \\ \end{aligned} \right., \, f^{*} \;{\text{is}}\; \, i{\text{th}}\;{\text{ performance}},\;D_{i} \;{\text{ is}}\;{\text{ desirability}}\;{\text{ value}}{. }\;r\;{\text{ is }}\;{\text{desirability}}\;{\text{ index}}$$
(1)

Smaller-the-bester:

$$\, \left\{ \begin{aligned} & D_{i} = 0, \, f^{ * } \ge U_{\rm b} \\ & D_{i} = \left( {\frac{{f^{ * } - U_{\rm b} }}{{L_{\rm b} - U_{\rm b} }}} \right)^{r} ,\quad L_{\rm b} \le f^{ * } \le U_{\rm b} \\ & D_{i} = 1, \, f^{ * } \le L_{B} , \, \\ \end{aligned} \right.,\quad L_{\rm b} {\text{ and }}\;U_{\rm b} \, \;{\text{are}}\;{\text{ lower}}\;{\text{ and}}\;{\text{ upper}}\;{\text{ range }}$$
(2)

Step 3: Fuzzy logic modeling

This step is aimed to combine the desirability of displacement and the desirability of parasitic error to become a SOF (see in Fig. 1). A fuzzy logic system [86] is utilized to this modeling process. A decision maker with a support of fuzzy inference system (FIS) and fuzzy if–then rules is employed to the fuzzy output into a non-fuzzy SOF. According to the TCF [65], the SOF is maximized through the Taguchi method to reach the local optimum value. In order to avoid the local optimum value, the SOF is modeled by the ANFIS, and then it is maximized by the LAPO later.

Step 4: ANFIS modeling

ANFIS model [87] is developed model the SOF. The goal of this process is to create the SOF model for the optimization (see in Fig. 1).

Step 5: Optimization by LAPO

LAPO is a recent algorithm in which its basic is replied on a lightning phenomenon [83, 88]. This algorithm is expanded to maximize the SOF in reaching a global optimal design for the suggested 2-DOF mechanism. Details of this algorithm are available in references [83, 88, 89]. Its scheme is given in Fig. 1.

3 Numerical example

A 2-DOF mechanism is studied to confirm the usefulness of the suggested computational intelligence method.

3.1 Optimization formulation for 2-DOF compliant mechanism

A 2-DOF mechanism is created, as in Fig. 2. An actuator (green color) applies a load to a mobile table in the y direction. The output displacement is labeled δy. At the same time, the mobile table also makes a parasitic motion in the x-direction (δx). In contrast, if a force comes from the actuator in x direction (yellow color), the platform moves in the x-direction while the y-direction movement is a parasitic motion error. The parasitic motion error reduces the positioning precision of the device, which is an undesired motion. Therefore, the displacement should be maximized and the parasitic error is minimized, simultaneously. Overall device is located at four fixed supports by using screws. In general, a change in geometry, material, or configuration can make an expected large displacement and increase stiffness of undesired motion direction. In this article, we choose stainless steel for material due to its high strength. Besides, leaf springs are adopted for flexure hinges 1 and 2 in order to displace the mobile table because the leaf springs easily fabricate and make a large deformation. As depicted in Fig. 3, the main design parameters consist of a vector of design variable X = [V1, V2, T1, T2, H]T. Moreover, the mechanism must work under an allowable stress. Design parameters and of the suggested mechanism are given (see in Table 1). Stainless steel material is utilized for the mechanism with yield stress (\(\sigma_{Y}\)) of 207 MPa.

Fig. 2
figure 2

Diagram of 2-DOF mechanism (unit: mm)

Fig. 3
figure 3

Meshing of the mechanism

Table 1 Design parameters

According to background of compliant mechanisms [7, 9, 22, 27, 84, 90], the geometrical dimension of flexible hinges is the main design variables which are noted as X = [V1, V2, T1, T2, H]T. The objective functions consist of the displacement (F1(X)) and the parasitic error (F2(X)). Stress (F3(X)) is an extra constraint. The optimization for the suggested 2-DOF mechanism is stated as:

Find X = [T1, T2, V1, V2, H]T

$${\text{Maximize }}F_{1} \left( {\mathbf{X}} \right)$$
(3)
$${\text{Minimize }}F_{2} \left( {\mathbf{X}} \right)$$
(4)

Subject to constraint:

$$F_{3} \left( {\mathbf{X}} \right) \le \frac{{\sigma_{Y} }}{SF}, \, SF{\text{: Safety factor is chosen as 1}}{.5}{\text{.}}$$
(5)

Initial space of design variables:

$$\left\{ \begin{gathered} {0}{\text{.45 mm}} \le T_{1} \le 0.65{\text{ mm}} \hfill \\ {0}{\text{.5 mm}} \le T_{2} \le 0.7{\text{ mm}} \hfill \\ {\text{7 mm}} \le V_{1} \le 11{\text{ mm}} \hfill \\ {\text{8 mm}} \le V_{2} \le 12{\text{ mm}} \hfill \\ {\text{26 mm}} \le H \le 30{\text{ mm}} \hfill \\ \end{gathered} \right.$$
(6)

4 Results and discussion

4.1 Setup of simulations

Thickness of the mechanism (w) is 10 mm (see in Fig. 3). Meshing is implemented with fine mesh at the hinges. The meshing quality is well confirmed by Skewness criteria (see in Fig. 4). A load of 15 N exerted the mobile table along the x-axis. The mechanism is fixed by screws at holes. Stainless steel material is also utilized in the simulations.

Fig. 4
figure 4

Meshing quality distribution

4.2 Sensitivity analysis of design parameters

The aim of the sensitivity analysis is to estimate which design parameter significantly contributes on the performances of the 2-DOF mechanism. Moreover, the sensitivity evaluation can redetermine the best important design variables which largely influence on the displacement, the parasitic error, and the equivalent stress. The results of this analysis can reduce the searching space of design variables that are utilized for the optimization process later.

As shown in Fig. 2, the geometrical factors (T1, T2, V1, V2, and H) are the initial parameters to design the 2-DOF mechanism. Table 2 gives the range of initial parameters. Based on the setup of simulations in Figs. 3 and 4, the initial datasets are collected in Table 3.

Table 2 Overall design parameters
Table 3 Initial datasets

The ANOVA analysis for the displacement found that the parameters T2 and V2 have very low contributions with 1.06% and 0%, respectively (see in Table 4). Then, Taguchi technique is employed to illustrate the effective plot of design parameters. The results of Taguchi indicated that are two parameters T2 and V2 also have smallest influences on the displacement (see in Fig. 5). On the other hand, these two parameters are not significant. They can be abandoned in the modeling and optimizing for the displacement later. Additionally, the results of Table 4 revealed that the p-values of T2 and V2 are larger than 0.05. It means that these two factors do not have significant correlation to the displacement. Meanwhile, the p-values of the remaining parameters are smaller than 0.05, and they are significant factors in designing the displacement.

Table 4 Displacement’s ANOVA
Fig. 5
figure 5

Influencing plot of the displacement

Similarly, the ANOVA is employed for evaluating the parasitic error. The results revealed that the contribution of V1 is very small with 0.64% to the parasitic error (see in Table 5). The result of Taguchi is the same with the results of ANOVA (see in Fig. 6). Besides, the p-value of V1 is higher than 0.05. It is noted that this factor has no significant contribution to the parasitic error. Hence, this factor can be abandoned in modeling and optimizing for the parasitic error.

Table 5 Parasitic error’s ANOVA
Fig. 6
figure 6

Influencing plot of the parasitic error

Lastly, the ANOVA results for the stress indicated that the contributions of V1 and H are very low with 0.19% and 2.26%, respectively (see in in Table 6). From the Taguchi analysis, the results can be concluded the same with the ANOVA results (see in Fig. 7). Moreover, the p-values of these two factors are larger than 0.05. It can conclude that they are not correlated to the stress. So, they can be left from modeling and optimizing for the parasitic error.

Table 6 Stress’s ANOVA
Fig. 7
figure 7

Influencing plot of the stress

4.3 Modeling and optimization

4.3.1 Membership function

Table 7 gives the fuzzy labels for f the FIS modeling. The membership function (MFs) for inputs is assigned in Fig. 8a, b. The MFs of the output (SOF) is determined, as depicted in Fig. 9.

Table 7 Fuzzy labels
Fig. 8
figure 8

MFs for: a the desirability of displacement, b desirability of parasitic error

Fig. 9
figure 9

MFs for the SOF

4.3.2 Numerical example 1

Numerical example 1 is investigated to show the robustness and efficiency of the developed computation method. Based the results of Table 4 and Fig. 5, whole initial space of design variables is reinitialized to create a new population for the flowing modeling and optimization. Three parameters V1, H, and T1 are the main design parameters. The built SOF is then optimized by LAPO. The optimization for example 1 is presented as.

Find X1 = [V1, H, T1]T

$${\text{Max SOF}}_{{\text{numerical example 1}}} \left( {{\mathbf{X}}_{1} } \right)$$
(7)

S.t.

$$\left\{ \begin{gathered} F_{3} \left( {\mathbf{X}} \right) \le \frac{{\sigma_{y} }}{SF} \hfill \\ {\text{7 mm}} \le V_{1} \le 11{\text{ mm}} \hfill \\ {\text{26 mm}} \le H \le 30{\text{ mm}} \hfill \\ {0}{\text{.45 mm}} \le T_{1} \le 0.65{\text{ mm}} \hfill \\ \end{gathered} \right.$$
(8)

The desirability results for the displacement and parasitic error are calculated in Table 8.

Table 8 Numerical results of example 1

The fuzzy if–then-rules are built for two inputs and one output (SOF), as given in Table 9. These rules are designed according to the designer’s experience. The aim of these rules is to find a correct combination of the D1 and D2 values for generating the SOF value.

Table 9 Fuzzy if–then-rules for example 1

Next, the FIS implementation is conducted in MATLAB R2019b. The influencing plot among the two inputs and the output is described (see in Fig. 10). Figure 11 illustrates the rules of fuzzy logic modeling.

Fig. 10
figure 10

Influencing plot among inputs and output

Fig. 11
figure 11

Suggested fuzzy process

The calculations are proceeded in MATLAB and the results of the SOF value for example 1 are given in Table 10.

Table 10 Results of SOF for example 1

Based on a combination of the refined space of design parameters (Table 8) and the calculated SOF value (Table 10), ANFIS model is built to establish the SOF regression model in relation to the design parameters. In the ANFIS modeling, 70% datasets are for training, 15% datasets are for testing, and 15% datasets for validating. And then, MAPE, RMSE, R2, and MSE are used to verify the accuracy of the ANFIS predictor [91,92,93,94].

$${\text{MAPE}} = \frac{100\% }{N}\sum\limits_{i = 1}^{n} {\left| {\frac{{z_{i} - z^{\prime}_{i} }}{{z_{i} }}} \right|} ,\quad {\text{Mean absolute percentage error}}$$
(9)
$${\text{RMSE}} = \sqrt {\frac{1}{N}\sum\limits_{i = 1}^{N} {\left( {z_{i} - z^{\prime}_{i} } \right)^{2} } } , \, \quad {\text{Root mean square error}}$$
(10)
$$R^{2} = 1 - \frac{{\sum\nolimits_{i = 1}^{N} {\left( {z_{i} - z^{\prime }_{i} } \right)^{2} } }}{{\sum\nolimits_{i = 1}^{N} {\left( {z_{i} - \overline{z}_{i} } \right)^{2} } }},\quad {\text{Correlation coefficient}}$$
(11)
$${\text{MSE = }}\frac{1}{N}\sum\limits_{i = 1}^{N} {\left( {z_{i} - z^{\prime}_{i} } \right)^{2} } {\text{, mean square error}}$$
(12)

in which zi is the ith actual value,\(z^{\prime}_{i}\) is the ith predicted value, and \(\overline{z}\) is the average value, and N is number of repetitions.

The results found that the ANFIS parameters include nodes of 78, linear factors of 108, nonlinear factors of 27, total factor of 135, training data of 15, testing data of 5, and fuzzy if–then rules of 27. Besides, the performance indexes are relatively good.

By using the TCF method, the optimal parameters are with V1 = 9 mm, T1 = 0.5 mm, and H = 28 mm. The displacement is about 0.911678 mm and the parasitic error is 0.0009359 mm. These optimum points are local optima thanks to this reasoning is strongly influenced by the Taguchi technique (see in Table 11).

Table 11 Optimal solutions for example 1

On the contrary, LAPO algorithm is extended to reach a global optimum value. From the ANFIS modeling, the SOF is maximized. The optimal parameters determine as V1 = 7 mm, T1 = 0.45 mm, and H = 26 mm. The displacement is approximately 0.6890 mm and the parasitic error is about 0.0018 mm. Because the SOF predicted by the LAPO is higher than that by the TCF, it can conclude that the suggested computational intelligence method is superior to the TCF method (see in Table 11).

4.3.3 Numerical example 2

In this example, a new population is generated by the use of the results of Table 5 and Fig. 6. Four parameters T1, T2, V2, and H are the main design parameters. The optimization for the example 2 is formulated as.

Find X2 = [T1, T2, V2, H)T

$${\text{Max SOF}}_{{\text{numerical example 2}}} \left( {{\mathbf{X}}_{2} } \right)$$
(13)

S.t.

$$\left\{ \begin{gathered} F_{3} \left( {\mathbf{X}} \right) \le \frac{{\sigma_{y} }}{SF} \hfill \\ {0}{\text{.45 mm}} \le T_{1} \le 0.65{\text{ mm}} \hfill \\ {0}{\text{.5 mm}} \le T_{2} \le 0.7{\text{ mm}} \hfill \\ {\text{8 mm}} \le V_{2} \le 12{\text{ mm}} \hfill \\ {\text{26 mm}} \le H \le 30{\text{ mm}} \hfill \\ \end{gathered} \right.$$
(14)

The desirability values for the displacement and the parasitic error are computed in Table 12.

Table 12 Numerical results of example 2

The results of SOF for example 2 are calculated, as given in Table 13.

Table 13 Results of SOF for example 2

By combination of the refined parameters (Table 12) and the SOF (Table 13), ANFIS model is built to establish the SOF model. The ANFIS model incudes nodes of 193, linear factors of 405, nonlinear factors of 36, total factors of 441, training data of 25, testing data of 8, and fuzzy if–then rules of 81. The performance indexes of the established ANFIS model are relatively good.

The optimal parameters are T1 = 0.45 mm, T2 = 0.5 mm, V2 = 12 mm, and H = 30 mm based on the TCF approach (Table 14). Using the TCF, the displacement is found about 2.0433 mm and the parasitic error is approximately 0.0047 mm. Through LAPO algorithm, the parameters are found as T1 = 0.45 mm, T2 = 0.7 mm, V2 = 12 mm, and H = 30 mm. The displacement is 0.9773 mm and the parasitic error is 0.0105 mm. The predicted SOF by the present method has an efficiency better than the TCF method.

Table 14 Optimal solutions for example 2

4.3.4 Numerical example 3

From the results of Table 6 and Fig. 7, three main design parameters include T1, T2, and V2. The optimization of numerical example 3 is presented as follows.

Find X3 = [T1, T2, V2]T

$${\text{Max SOF}}_{{\text{numerical example 3}}} \left( {{\mathbf{X}}_{3} } \right)$$
(15)

S.t.

$$\left\{ \begin{gathered} F_{3} \left( {\mathbf{X}} \right) \le \frac{{\sigma_{y} }}{SF} \hfill \\ {0}{\text{.45 mm}} \le T_{1} \le 0.65{\text{ mm}} \hfill \\ {0}{\text{.5 mm}} \le T_{2} \le 0.7{\text{ mm}} \hfill \\ {\text{8 mm}} \le V_{2} \le 12{\text{ mm}} \hfill \\ \end{gathered} \right.$$
(16)

The results of desirability are given in Table 15.

Table 15 Numerical results of example 3

The SOF value is calculated, as given in Table 16.

Table 16 Results of SOF for example 3

This part builds a relation among the fined parameters (Table 15) and the calculated SOF (Table 16) by establishing ANFIS model. The ANFIS parameters are nodes of 78, linear parameters of 108, nonlinear parameters of 27, total number of parameters of 135, training data of 15, testing data of 5, and fuzzy if–then rules of 27. The performance indexes are calculated with good values for the modeling.

The optimal parameters are T = 0.45 mm, T2 = 0.5 mm, V2 = 10 mm through TCF method (Table 17). The displacement is 1.6126 mm and the parasitic error is 0.0055 mm by the TCF. Then, with the suggested computational method, the optimal parameters are T1 = 0.45 mm, T2 = 0.5 mm, V2 = 12 mm. The results indicated that the displacement is 2.2109 mm and the parasitic error is 0.0028 mm. Additionally, by the present method, the predicted SOF is larger than that of the TCF.

Table 17 Optimal solutions for example 3

4.4 Discussion

In previous section, a comparison based on the optimum values and the predicted SOF value are not enough. This part carries out an error calculation (Ec) among the forecasted value (Vf) and FEA simulation value (Vs). The comparison results are calculated in Table 18. A relative error is defined as.

$$E_{c}\,\left( \% \right) = \left| {\left( {\frac{{v_{f} }}{{v_{s} }} - 1} \right) * 100} \right|$$
(17)
Table 18 Summary of feasible candidates

The errors for three numerical examples are approximately 4–6% by using the present method. Meanwhile, the errors are about 68–97%. This confirms that the suggested computational intelligence method is better than the TCF method. The numerical example 3 is the best choose for the mechanism. Overall optimal parameters and performances are given in Table 18.

5 Comparisons

In this part, a few AI methods such as multilayer perceptron (MLP) [46] and deep neural network (DNN) [95] and multiple-linear regression (MLR) [96] are used in comparison with the developed ANFIS model. Three performance indexes (MSE, RMSE, and R2) in Eqs. (1012) are employed in this comparison. The MLP and DANN include the same basic parameters as follows: (1) number of hidden layers: 2, (2) number of neurons in each hidden layer: 6, (3) activation function for first hidden layer: rectified linear unit, (4) activation function for first hidden layer: tansig, (5) activation function for output layer: pureline, and (6) training algorithm: Levenberg–Marquardt. The datasets are also divided as same as the proposed ANFIS model, including 70% datasets are for training, 15% datasets are for testing, and 15% datasets for validating. The inputs of datasets include the design parameters and the output is the SOF value. The purpose of modeling is to find the best SOF approximate model before transferring it to the optimization process. As shown in Table 19, the results show that the performance indexes of the proposed ANFIS model (R2 is close to 1, MSE is around 10–4, and RMSE is about 10–2) are better than those of the MLP, DNN, and MLR. It means that the developed ANFIS model is the reliable and accurate model in establishing the fitness function for the optimization problem of the 2-DOF compliant mechanism.

Table 19 Comparison among approximate models

Subsequently, the optimal results by the proposed method are compared with the other evolutionary algorithms. The numerical example 3 is a feasibly optimal candidate for the mechanism. In order to confirm the usefulness of the present method, the TLBO [97] and Jaya [98] are integrated with the established ANFIS model for the numerical example 3. Table 20 shows that the estimated displacement and the parasitic error of the present method are better than those of the other methods.

Table 20 Feasible candidates by different methods

The performances of different methods are continued by the use of nonparametric testing techniques Wilcoxon and Friedman [67, 99, 100]. A number of 50 simulation runs are for each method. The results show there is difference among the present method with the two other methods thanks to p-value ≤ 0.001. It can conclude that the present method has a superior behavior compared with other methods (see in Table 21).

Table 21 Wilcoxon results

The results of Friedman analysis also have the same conclusion in the results of Wilcoxon with to p-value ≤ 0.001 (see in Table 22).

Table 22 Friedman results

A few advantages of the computational intelligence method for the compliant mechanisms are as follows: The suggested method deals with the global optimal design of the 2-DOF mechanism with a less computational cost. Besides, the present method also some disadvantages include: FEM model becomes more difficult for compliant mechanisms with more complex structures. So, the FEM takes a large computing time. This can be enhanced via using multiple processors. An adaptive dataset with each design stage is out of the goal of the present study, and it can be a future research direction. Furthermore, the AI techniques can be feasible approaches to become a new design method for compliant mechanisms. However, the AI methods should be only utilized for highly nonlinear behaviors. The mentioned analytical methods in the literature are suitable tools to solve for simple structures of compliant mechanisms. For more compicated structures, the present computaitonal method should be taken into consideration. In future work, the fuzzy logic and ANFIS models can be enhanced if the main parameters can be improved better if their main parameters are properly selected before they are utilized for modeling process.

6 Conclusions

In this article, the computational intelligence method has been devised to resolve the optimal design for the 2-DOF mechanism. It is built by a combination of FEM, statistics, artificial intelligence models, and metaheuristic algorithm. A 2-DOF mechanism is a numerical example to confirm the usefulness of the suggested method. Initially numerical datasets are collected by simulations. ANOVA and Taguchi method are employed in evaluating the parameter’s sensitivity. The analyzed results can generate the new range of design parameters. Based on the datasets from the new design spaces, the desirabilities are determined for the displacement and parasitic error. The calculated results of desirabilities are put into the FIS model as two inputs. The output of the FIS model (SOF) related to the fined design parameters is formulated through ANFIS modeling. The modeled SOF is maximized by LAPO. The results found that the numerical example 3 is determined as the best optimal design for the mechanism.

In evaluating the precision of approximate model, a few AI techniques and regression are utilized in comparison with the developed ANFIS model. The datasets of example 3 are divided into the training, testing, and validating sets for modeling and comparing among the AI and MLR methods. The results indicate that the performance measurements of the proposed ANFIS model (R2 is close to 1, MSE is around 10–4, and RMSE is about 10–2) are better than those of the MLP, DNN, and MLR. Based on the results of by using Wilcoxon and Friedman analysis, the proposed computational intelligence method is more effective than the TCF, ANFIS-integrated TLBO, and ANFIS-integrated Jaya in searching the optimal displacement and parasitic error. The results revealed that the optimal displacement and parasitic error are approximately 2.2109 mm and 0.0028 mm, respectively. In future work, the achieved results can be facilitated to the optimal design for general compliant mechanisms with irregular shapes and complex structures. Some physical prototypes are manufactured to validate the predicted results. Moreover, the main controllable parameters of the AI methods can be optimized to find the best suitable factors for modeling.