IBOA-Based Optimization of Cross-Sectional Dimension of Rods for a 3-RRR PPM to Minimize Energy Consumption

For obtaining optimal cross-sectional dimensions of rods for a 3-RRR planar parallel manipulator (PPM) to minimize energy consumption, the inverse dynamics of the manipulator is modeled based on the Newton–Euler method, after which the coefficient matrix of the inverse dynamics equation is decomposed based on matrix theory. Hence, the objective function, that is, the logical relationship between the energy consumption of the manipulator and the cross-sectional dimension of each rod, is established. However, in solving the multidimensional constrained single-object optimization problem, there are difficulties such as the penalty function’s sensitivity to the penalty factors if the problem is transformed into the one of unconstrained multiobjective optimization. (erefore, to properly handle the constraints, an improved butterfly optimization algorithm (IBOA) is presented to ensure that the new iterated point always falls into the feasible region according to the butterfly optimization algorithm (BOA). Finally, the comparisons among the IBOA, particle swarm optimization (PSO), and BOA and further experiments of the physical prototype are implemented to validate the effectiveness of the proposed theoretical model and numerical algorithm. Results indicate that the proposed IBOA is more suitable for solving the constrained single-object optimization problem with better convergence speed and accuracy.


Introduction
A 3-RRR planar parallel manipulator (PPM) is a type of manipulator with only three degrees of freedom, in which the symbol 3-RRR expresses three branched chains and includes three revolute (R) pairs in each branched chain, which has the advantages of a simple structure, small additional inertia of the driving motor, large stiffness, large workspace, and small cumulative error. It has been widely used in the fields of plane complex curve creation [1], micronano-precision positioning, measurement, and manufacturing [2,3], pick and place operation robots [4,5], modular, detachable, and reconfigurable robots [6], tactile perception [7,8], and additive manufacturing equipment [9,10].
When the length of each rod is known, the shape, size range, and singular point distribution of the workspace of the 3-RRR PPM are determined by inverse kinematics and workspace analysis [11]. However, the selection of the crosssectional dimension of each rod will inevitably affect its mass distribution and the dynamic indexes, such as rotational inertia and inertial force (moment) of each rod, which will eventually affect the energy consumption of the manipulator. e dynamics is the necessary foundation for energy consumption research. ere are some classical methods for the dynamic modeling of parallel mechanisms based on multirigid-body dynamics theory, such as the principle of virtual work [12][13][14], Kane's equations [15], Lagrange method [5,[16][17][18], and Newton-Euler method [19][20][21][22][23][24].
Although the dynamic modeling of the 3-RRR PPM can choose the methods of Kane or Lagrange, the Newton-Euler method can not only establish its inverse dynamic model but also obtain the relationship between the driving torque and the movement time, as well as the internal force of the hinge and the movement time [24].
In general, after the usage of the manipulator is determined, its motion path in the workspace is determined. In this situation, the optimal masses of each rod can be determined by establishing an optimization model to optimize the energy consumption [21]. For the 3-RRR PPM, the masses of the connecting rods and moving platform were selected as variables (seven variables in total), and the energy consumption of the driving motor was considered as the objective function. Finally, the optimization model is solved using the particle swarm method. However, for the 3-RRR PPM with asymmetric dimensional parameters, even for similar energy consumption optimization problems, it will face three challenges owing to the increase in rectangular cross-sectional parameters: (1) calculation of the objective function, that is, the relationship between the energy consumption of the driving motor and the motion path of the moving platform or the movement time; (2) selection of numerical method, that is, how to seek numerical methods to meet the requirements of the speed and accuracy of convergence and global optimization; (3) handling of constraints.
As aforementioned, once the inverse dynamics model of the 3-RRR PPM is established based on the Newton-Euler method, its inverse dynamics solution can be expressed as a matrix equation. It can be seen from the matrix equation that the inverse dynamic solution, such as the driving torque of the active motor, is closely related to the cross-sectional dimension of each rod. However, the coefficient matrix is only related to the length of each rod, position and orientation of the moving platform, and dynamic displacement of each rod but is not related to the cross-sectional dimension of each rod.
is property means that, through the QR decomposition of the coefficient matrix [25], a logical relationship can be established between the energy consumption of the manipulator and the cross-sectional dimension of each rod.
In recent years, the metaheuristic algorithms have been widely used in solving different optimization problems. In one study [26], summarizing the development history of the metaheuristic or nature inspired algorithms for the last thirty years, Mohamed et al. divided the metaheuristic algorithms into four categories such as evolutionary techniques enlightened by biology, swarm intelligence techniques enlightened by the behavior of social insects or animals, physics-based techniques enlightened by the rules governing a natural phenomenon, and human-related techniques enlightened by body activities or mind activities of the human being. Furthermore, a novel creative algorithm called gaining sharing knowledge-based algorithm (GSK) was proposed to solve optimization problems [26]. In fact, hybridizing different algorithms to benefit from each other is an important method. In that respect, Deng et al. [27][28][29] have made a fruitful contribution: on the basis of the MSIQDE that is an improved quantum-inspired differential evolution (QDE) with a multistrategy algorithm, an enhanced MSIQDE algorithm based on mixing multiple strategies, namely, EMMSIQDE, was presented to address the probable premature convergence, reduced searchability, and trapping in local optima in the QDE [27]; an improved quantum evolutionary algorithm (QEA) based on the niche coevolution strategy and enhanced PSO, namely, IPOQEA, was proposed to solve the three-objective gate allocation model [28]; similarly, QEA and cooperative coevolution evolutionary algorithm (CCEA) were combined to improve the weakness of differential evolution algorithm (DEA) during the solution of the large-scale complex optimization problem. An effective HMCFQDE algorithm based on the CC framework, QEA, and hybrid mutation strategy was presented and established [29]. Besides, the butterfly optimization algorithm (BOA) proposed by Arora and Singh [30,31] is also worth substantial attention. After 30 different benchmark functions and 7 widely used metaheuristic algorithms, which included artificial bee colony (ABC), cuckoo search (CS), differential evolution (DE), firefly algorithm (FA), genetic algorithm (GA), monarch butterfly optimization (MBO), and PSO, being chosen and compared from the view of the statistical assessment for benchmarking the performance of BOA, 6 familiar engineering problems were solved by BOA. erefore, the conclusion that BOA can become an effective tool to solve real-world optimization problems was reached [31]. Nevertheless, the advantages of BOA in solving engineering optimization problems are what we are most interested in.
In addition, for the problem of constrained single-object optimization, the handling of constraints is used by changing the constrained single-object optimization to unconstrained multiobjective optimization through the introduction of the constraints in the objective function [32][33][34]. However, there are also difficulties in implementation; for example, the main drawback of the introduction of the penalty function in the objective function is that the penalty function is exceedingly sensitive to the penalty factors [33]. erefore, to address the problem of the optimal cross-sectional dimension of rods for the 3-RRR PPM to minimize energy consumption, an improved butterfly optimization algorithm (IBOA) is presented to properly handle the constraints of the single-object optimization problem by ensuring that the iteration point always falls into the feasible region. e rest of the paper is organized as follows. In Section 2, the inverse dynamic equations based on the Newton-Euler method are derived, and the detailed process of QR decomposition of the coefficient matrix of the equations is provided. In Section 3, considering the length and width of the rectangular cross-sectional dimension of each rod for the 3-RRR PPM as the variable, the energy consumption of the driving motor as the objective function, and the upper and lower limits of the cross-sectional dimension of each rod as the constraint, the model of the optimal cross-sectional dimension of rods to minimize energy consumption is established. Meanwhile, after the objective function, that is, the logical relationship between the energy consumption of the manipulator and the cross-sectional dimension of each rod is revealed, the algorithm and flowchart for solving the problem of optimal cross-sectional dimension of the rod based on IBOA are presented. In Section 4, the optimization 2 Complexity results of an example are presented and verified experimentally. Finally, the paper is concluded in Section 5.

Modeling of Dynamics.
As is shown in Figure 1(a), there are three branched chains A i B i C i (i � 1, 2, 3 in this paper) connected between the moving platform and the frame, each of which has two rods, A i B i and B i C i , and three revolute pairs, A i , B i , and C i . One end of the three branched chains is connected to the frame at point A i , and the other end is connected to the moving platform triangle C 1 C 2 C 3 at point C i . For the convenience of kinematics and dynamics analysis, as shown in Figures 1(a) and 1(b), the global coordinate system oxy is established on the frame triangle A 1 A 2 A 3 , and the center o of the circumscribed circle of triangle A 1 A 2 A 3 is considered as the coordinate origin, such that the x-axis is parallel to A 2 A 3 and the y-axis passes through point o. e positive direction is determined using the right-hand rule. e local coordinate system G 7 x′y′ is established on triangle C 1 C 2 C 3 , and the center G 7 of the circumscribed circle of triangle C 1 C 2 C 3 is considered as the coordinate origin, such that the x′ axis is parallel to C 2 C 3 and the y′ axis passes through point G 7 . e positive direction is determined by the right-hand rule.
For easy reference, the meaning and symbol of dimension parameters, kinematics, and dynamics parameters for the 3-RRR PPM are listed in Table 1 in Appendix A.
When the inverse displacements θ i of the 3-RRR PPM are solved, the known conditions are as follows: the global coordinate (x, y) of the central point G 7 of the moving platform and orientation angle θ of the moving platform; dimension parameters, including the lengths l i of the active rods A i B i , lengths l i+3 of the passive rod B i C i , lengths a, b, and c of sides of frame triangle A 1 A 2 A 3 , and lengths d, e, and f of the sides of the moving platform triangle C 1 C 2 C 3 , as shown in Figure 1(a). Based on the theory of mechanism, the angular displacements of the active parts can be calculated [11]: Meanwhile, the condition that the solution of equation (1) is a real number is Here, e parameters that are not listed above are presented in Appendix B, equations (B.1)-(B.6).
For the inverse dynamics modeling based on the Newton-Euler method for the 3-RRR PPM, in addition to the conditions given in the previous inverse displacement solution, the remaining known conditions are as follows: the masses m Gi of the active rod A i B i , masses m G (i+3) of the passive rod B i C i , mass m G7 of the moving platform, external forces F ex and F ey of the moving platform, and external moment M e of the moving platform. e solving goal is as follows: the internal forces F Bix and F Biy at point B i , internal forces F Cix and F Ciy at point C i , and the driving moment of the active rod A i B i . As shown in Figure 1(b), the active rod A i B i , passive rod B i C i , and moving platform triangle C 1 C 2 C 3 are considered isolators. e inverse dynamics modeling for the 3-RRR PPM can be expressed as the following matrix [24]: Complexity 3 Here, A ∈ R 21×15 is a sparse matrix, and the nonzero elements are [24] 19,7 � l 1 sinθ 1 /2, a 19,10 � −l 1 cosθ 1 /2; a 20,8 � l 2 sinθ 2 /2, a 20,11 � −l 2 cosθ 2 /2; a 21,9 � l 3 sinθ 3 /2, a 21,12 � −l 3 cosθ 3 /2. e remaining elements that are not listed above in matrix A were 0.
Further, B ∈ R 21×1 is a column vector whose elements include [24] e parameters that are not listed above are presented in Appendix B, equations (B.7)-(B.25).

Numerical Solving for Dynamical Model of the 3-RRR PPM
Based on QR Decomposition. Equation (4) can be solved using the QR decomposition method [25], and for the sparse matrix A ∈ R 21×15 , we can seek an invertible matrix R∈ R 15×15 , and matrix A can be decomposed as follows: where Q∈ R 21×15 . For ease of expression, let a l (l � 1, 2, 3, . . ., 15) be the vector of the column elements in matrix A: Let e vector a l (l � 1, 2, 3, . . ., 15) is orthogonalized based on the Gram-Schmidt orthogonalization method; that is, based on the 15 column vectors, the unit vectors that are orthogonal to each other are generated according to the following rules.
First, vector a 1 is orthogonalized and denoted as q 1 : Second, the vector components parallel to a 1 are removed from a 2 , and q 2 is orthogonalized.
ird, the vector components parallel to a 1 and a 2 are removed from a 3 , and q 3 is orthogonalized. 4 Complexity It can be proved that q l (1 ≤ l ≤ 15) is a group of standard orthogonal bases in the above transformation; that is, erefore, where I 15 ∈ R 15×15 is the unit matrix. is is obtained from equation (6): Equation (4) can be reduced to a simple solution form: erefore, Because matrices A and B are known, matrix Q can be calculated using equations (9)- (12), and then x can be calculated using equations (15) and (17).

Model and Solving of Optimal Cross-Sectional Dimension of Rods
where ρ is the density of the material and the mass of the passive rod B i C i is as follows: e mass of the moving platform is as follows: According erefore, matrix B is related to u 1 -u 7 and v 1 − v 7 , but matrix A is not.
When center G 7 of the mass of the moving platform moves with time t ∈ [t 0 , t n ] during the running of the 3-RRR PPM, the centroid trajectory is expressed as follows: e energy consumption corresponding to the interval [t 0 , t n ] of the movement time satisfies [21,24] where ω i is the angular velocity of the active rod A i B i and τ i is the driving moment of the active rod A i B i . According to equation (17), τ i can be obtained from the thirteenth, fourteenth, and fifteenth row of the vector x; therefore, E (t) in equation (22) is a function of u 1 -u 7 and v 1 − v 7 . Let erefore, the model of the optimal cross-sectional dimension of the rods for the 3-RRR PPM to minimize energy consumption is e calculation process of the objective function (24) to determine the optimal cross-sectional dimensions of the rods for the 3-RRR PPM is shown in Figure 2.
e constraint condition is Complexity 5 where w lb and w ub are the lower limit and the upper limit of w, respectively.

Solving the Model of the Optimal Cross-Sectional Dimension of the Rods for the 3-RRR PPM Based on IBOA.
e BOA, which was inspired by the foraging behavior of butterflies, is a metaheuristic algorithm presented by Arora and Singh in 2018; in particular, the BOA is more efficient than other metaheuristic algorithms for solving engineering problems [30,31]. It is assumed that every butterfly can emit fragrance and attract each other through fragrance; the BOA's key is the concept of fragrance and perception, which is expressed through the power exponent of stimulus intensity as follows [30,31]: where f k (k � 1, 2, . . ., n) is the fragrance of kth butterfly and I k , which is defined by the objective function (24) with w k (u k , v k ) representing the stimulus intensity; in addition, the power exponent a′ and the sensory modality c′ are real numbers in the range [0, 1]. ere are two types of iterative patterns in seeking the optimal objective function (24) in the BOA; that is, the global or local search ensures that any butterfly can move randomly or toward the best butterfly that emits more fragrance. e iterative formula for the global search is [30,31] where w * is the current best solution among w k (u k , v k ) (k � 1, 2, . . ., n) in the current iteration, t is the number of iterations, and r is a random number in [0, 1]. e iterative formula for the local search is [30,31] w t+1 where j ∈ {1, 2, . . ., n}. e problem of the optimal cross-sectional dimension of rods for the 3-RRR PPM in this study is a constrained singleobject optimization because there are difficulties in the process of changing to unconstrained multiobjective optimization; for example, the penalty function is exceedingly sensitive to penalty factors [32,33]. erefore, to properly handle the constraints of the single-object optimization problem, the IBOA is presented. To ensure that the new point iterated always falls into the feasible region, two measures are used in the IBOA, as follows: (1) When the initial population of n butterflies is generated, w k (k � 1, 2, . . ., n) is randomly determined in the feasible region of equation (25): Calculate masses and rotary inertia of rods, and matrix B.
Input dimensional parameters l i , l i+3 , a, b, c, d, e, f; orientation angle θ of the moving platform; centroid trajectory of moving platform.
Inverse kinematics Cross-section dimension w=[u 1 ,v 1 ,u 2 ,v 2 ,…u 7  Accumulate ω i τ i ; Calculating E (w). 6 Complexity w kl � w lbl + λ kl w ubl 1 + λ kl , (29) where k � 1, 2, 3, . . ., n and l � 1, 2, 3, . . ., 14. w lbl and w ubl are lth components of w lb and w ub , w kl is lth component of w k , and λ kl ∈[0, 100] is the ratio (a random number) when w k is calculated according to the formula of definite proportional division point. Meanwhile, the population size n was 50 in literature [31], and the condition that n is greater than 100 is also requested in this paper to ensure population diversity.  (25).
e terminal condition of iteration is as follows: where t max is the maximum number of iterations and E (w * ) t is the value of the objective function corresponding to the best solution w * in the tth iteration. e program flowchart of using IBOA to solve the problem of optimal cross-sectional dimensions of rods for the 3-RRR PPM is shown in Figure 3 (in which red lines are added in the improved parts of BOA). Figure 1

Example and Solving. As shown in
where the units of x and y are meters. e working mode was "--+" for the 3-RRR PPM, orientation angle θ of the moving platform was 0 rad, which is not singular [11], and global coordinates of the central point G 7 of the moving platform were as follows [11,21]: Here, T �15 s. e workspace of the 3-RRR PPM and the spiral trajectory of central point G 7 of the moving platform under "--+" working mode and θ � 0 rad are shown in Figure 4.
Let p � 0.5, c′ � 0.2, t max � 350, w lb � 10 −3 [15,5,15,5,15,5,15,5,15,5,15,5,15,5]  As is shown in Figure 3, the algorithmic complexity of the proposed IBOA in comparison with the BOA is approximately equal to that of the BOA for the following reasons. Double loops in which the number of outer loops is n and the number of inner loops is 14 can be used during generating the initial population of n butterflies according to equation (29), and this operation has little influence on time and space complexity. In addition, after the global or local iteration has been executed in the BOA, an if-else control flow was added to estimate whether the new point iterated falls into the feasible region of equation (25) or not, and this operation does not add space complexity and has little influence on time complexity. In view of the fact that the BOA has been benchmarked [31], combining the algorithmic complexity analysis of the IBOA, the IBOA will be verified through comparing the IBOA with PSO [21] and BOA [30,31] and through further experimental verification of physical prototype. e reason why the PSO and BOA were chosen as benchmarking algorithms is that PSO was used to optimize the link and platform masses for minimizing the electrical energy consumption [21] and BOA was also applied to solve 6 familiar engineering problems [31]. e comparisons among the IBOA, PSO, and BOA were implemented in order to obtain fair results under the following conditions: the population sizes of the IBOA, PSO, and BOA were set as 110, and all initial population was randomly generated according to equation (29); the parameters of the PSO such as the constriction factor, inertia weight, and positive acceleration constants were set according to literature [21], and Complexity the parameters of BOA and IBOA were the same as those previously mentioned. e convergence curves of the three algorithms are shown in Figure 5. e total number of iterations of the IBOA, PSO, and BOA is 107, 90, and 128, respectively; the value of the objective function at the end of the iteration is 0.0764 J, 0.1070 J, and 0.0766 J. And the IBOA is 40 percent more accurate than the PSO and 0.29 percent more accurate than the BOA. Although the IBOA is a little more accurate than the BOA, the former is smaller in the total number of iterations. erefore, the IBOA is more suitable than the PSO and BOA for solving the engineering optimization problems in this paper.

Experimental Verification and Discussion.
e experimental verification system is shown in Figure 6, where the mechanical, control, and test systems of the 3-RRR PPM include a 3-RRR PPM, a personal computer (PC), three servomotors, three matched servomotor drivers of the type TSC06401C2NL/TSTA20 C, and three torque/speed sensors of the type PPCI-L112/JN338-2VE. According to the RS-485 serial bus standard, the 3-RRR PPM is operated by Visual C++ programming [11,24].

Start
Determine the best w* among w k ; t=0. (29); calculate E (w k ) based on Figure 2; input a′, c′, p.
r≤p Calculate f k based on Equation (26); global search based on Equation (27).
Calculate f k ; local search based on Equation (28).

Yes No
No Yes No Yes t=t+1; update a′.

Complexity
After the torque/speed sensor data are obtained, the comparative results of the simulation and experiment for the angular velocities of the active rod A i B i are shown in Figure 7(a), and the comparative results of the simulation and experiment for the driving moment of the active rod A i B i are shown in Figure 7(b). e comparative results of the simulation and experiment for the energy consumption of the 3-RRR PPM are shown in Figure 8.
Employing numerical integration, the total simulation energy consumption was 0.0764 J, and the total experimental energy consumption was 0.0794 J. e latter is slightly larger than the former, and the error is 0.0030 J mainly because the friction dissipation energy of the hinges is not included in the energy consumption model of equation (24). erefore, the error between the total experimental energy consumption and the total simulation energy consumption based on the optimal solution by the IBOA is within the expected range. e results show that the dynamics model based on the Newton-Euler method, numerical solving for the dynamical model of the 3-RRR PPM based on QR decomposition, and numerical solving for optimal cross-sectional dimension of rods to minimize energy consumption based on the IBOA are reasonable and in accordance with the engineering practice. Furthermore, the comparison among the IBOA, PSO, and BOA and experiment results of the physical prototype for the 3-RRR  PPM indicate that the IBOA is suitable for solving the constrained single-object optimization problem and has great potential in solving the optimization problems in engineering practice.

Conclusions
e comparisons between the simulation energy consumption based on the optimal solution by the IBOA and the experimental energy consumption from physical prototype of the 3-RRR PPM show that the dynamics model based on the Newton-Euler method, numerical solving for the dynamical model of the 3-RRR PPM based on QR decomposition, and numerical solving for optimal cross-sectional dimension of rods to minimize energy consumption based on the IBOA are reasonable and in accordance with the engineering practice. e proposed IBOA abandons the constraints processing scheme of transforming constrained single-objective optimization problems into unconstrained multiobjective optimization problems. In the IBOA, the initial population is randomly generated. More importantly, after the global or local search in the BOA, the newly generated iteration point is immediately  judged: whether it falls into the feasible region or not. en, the newly generated iteration points out of the feasible region are replaced by the current optimal points. e results of comparison among the IBOA, PSO, and BOA and experiment results of the physical prototype for the 3-RRR PPM show that the IBOA is suitable for solving the constrained single-object optimization problems and has great potential in the convergence speed and accuracy to solve the optimization problems in engineering practice. where h 2 ′ is the height on the side C 2 C 3 of triangle C 1 C 2 C 3 .