Research on 6-DOF robot inverse kinematics based on blended optimization algorithm of ELM- SSA-SCA

To enhance the resolution timeliness and accuracy of inverse kinematics of industrial robots, a robot inverse kinematics method based on ELM-SSA-SCA was proposed. The positive kinematic model of the mechanical arm with Six Degrees of Freedom was established using D-H method, and ELM (extreme learning machine) with fast training speed was used to predict the initial resolution of robot inverse kinematics. The blended optimization method of SSA (Sparrow Search Algorithm) and SCA (Sine Cosine Algorithm) was applied to optimize the obtained initial inverse solution. The position under the optimum fitness was used as the output, so as to obtain the optimum solution of inverse kinematics. It is shown from the experimental results that the algorithm based on SSA-SCA-ELM achieved inverse solutions with faster convergence rate, higher precision and better timeliness compared to the solution method based on PSA-BP neural network.


Introduction
With the gradual improvement of AI technology and further intelligentization of the manufacturing industry, the industrial robots with a certain degree of AI technology are used more widely in the production line. Since the machinery equipment with higher precision and efficiency is required in the modern manufacturing industry, the control requirement for industrial robots is also getting increasingly strict. The positive inversion of industrial robots plays an important role in the Robotics research. It is aimed to establish a mapping relation between Cartesian space coordinates and joint space coordinates for the end effector of robots. Generally, the algebraic method and analytical method are mainly utilized to obtain the inverse solution of robots. As the intelligentization of intelligent robots deepens continuously, and the structure is also getting increasingly complicated, stronger timeliness is required for calculation. Thus, the disadvantages of the traditional methods are getting more and more obvious, such as being not timely, being not applicable to high redundant robots, and so on. In recent years, many researchers made use of neural network algorithms, genetic algorithms, and some other intelligent optimization algorithms to resolve the problem of robot solution reversion and obtained good effects. [1][2][3][4] To optimize and resolve redundant inverse kinematics of the mechanical arm, Youxing et al. 5 proposed an improved hill-climbing method, which does not require calculating anti-trigonometric function or matrix inversion. It was proved through derivation and calculation that without many operands, this algorithm is simple, and it is featured by fast convergence rate, strong stability and good universality. Aiming at the self-developed 6-DOF modularized mechanical arm, Jiang Hongchao adopted the analytical method of matrix multiplication inversion to resolve the positive kinetic model of the mechanical arm via analyzing the solvability of the positive kinematic model, and obtained the complete analytical solution of the inverse kinematics for this category of mechanical arms. Aiming at a parallel mechanical arm, Rolland and Chandra 6 proposed an optimization method based on a genetic algorithm and transformed the problems of nonlinear equation systems into an one-by-one optimization process and established the kinetic model. Shi et al. 7 put forward an inverse kinematics solution method on the basis of an improved clone selection method. This algorithm introduces a multi-strategy mechanism with the synchronous evolution of the top layer and the bottom layer, which solved the problems such as local convergence that is easy to occur in such algorithms, endowing the algorithm with a strong capability of population diversity retention and achieving a good effect in the resolution process of inverse kinematics for robots. 8 Xihua et al. 9 established an objective function by taking the minimization of the pose error of the end effector as the optimization index and achieved good effects. Lin et al. 10 proposed a high-precision parallel inversion algorithm for general robots based on a multipopulation genetic algorithm which utilizes the immigrant operators that combine the population replacement and individual replacement to avoid local convergence, and obtained good effects.
Inspired by the above intelligent optimization algorithms with perspective features, an Extreme Learning Machines hybrid optimization method by blending Sparrow Search Algorithm and Sine Cosine Algorithm (ELM-SSA-SCA) was proposed in this study to realize inverse solution of industrial robots. Extreme Learning Machines (ELM), based on a single hidden layer feedforward neural network, is able to ensure the accuracy and timeliness of the inverse solution when calculating the initial inversion solution. Sparrow Search Algorithm (SSA) 11 has a strong local searching ability and fast convergence rate, but it is weak in global searching. Compared to genetic algorithm or particle swarm optimization method, Sine Cosine Algorithm (SCA) is featured by simple structure, few parameters and good feasibility in solving the multiple-input-multiple-output problem. The method in the present study gives play to the global searching ability of SSA and good robustness and prominent applicability of SCA to the greatest extent and ensures the speed and precision of inversion solution calculation of mechanical arms. 12 The results of the simulation and experiment have demonstrated that the algorithm in this study showed a fast convergence rate and good timeliness, and the inversion solution obtained was relatively high in precision.
ELM-SSA-SCA hybrid optimization algorithm ELM algorithm ELM, proposed by professor Huang Guangbin, 13 is an algorithm to resolve a single hidden layer neural network, which can achieve a better calculation speed on the premise of ensuring learning precision. During the training stage, ELM randomly initializes the hidden layer and output weight, and maps the data to the feature space to establish the mapping relation. Therefore, the training speed is faster than that of the general methods.
The output of the i-th hidden layer node h i (x) is: where X j is the input vector, the weight vector W i = w i1, w i2, , . . . , w in, ½ T , is the vector of input weights between all input layer neurons connecting the i-th hidden layer neuron .and b i is the offset of i-th hidden layer node. Sigmoid function and Gaussian function are commonly used. If Sigmoid function is used, the weight Â Ã T will be output, denotes the vector of weights of the i-th hidden layer neuron connecting all output neurons. and then the output function of the feedforward neural network of the single hidden layer is: In order to achieve good effect on the training sample set, the error should be minimized, so that the minimum solution of the objective function is the optimum solution. Hence, the objective function is as follows: Among them: The input weight W and hidden layer offset b are generated randomly. Through the linear algebra and theory of matrices, the optimum solution for formulate(3) can be derived as: where H y is the generalized inverse matrix of H.
In the algorithm, the initial inversion solution value of the 6-DOF industrial robots was obtained through ELM. 14 Firstly, the node number if the hidden layer and the weight of the input layer were initialized. Then, the mapping relation between the joint vector and the pose of end effector was established through forming the data pairs u, T ð Þ, with the joint vector u = u 1 , u 2 , u 3 , u 4 , u 5 , u 6 ð Þof industrial robots as the training set of the ELM algorithm, and the pose of end effector as the output value. After the model was well established, the pose T = p x , p y , p z , o x , o y , o z , a x , a y , a z , n x , n y , n z À Á of the end effector that can be achieved by industrial robots was input, and the joint angle vector u = u 1 , u 2 , u 3 , u 4 , u 5 , u 6 ð Þ of the mechanical arm was output by the ELM algorithm. Thus, the initial inverse kinematics of the mechanical arm was obtained.
From the above ELM principle, it can be known that the weight of the input layer was initialized in a random way, thus bringing blindness to and the initial weight and threshold generated each time. 15 However, the initial weight has a great impact on the prediction result of the whole model, so SSA was used to optimize the initial weight of ELM.
SSA-SCA hybrid optimization method SSA algorithm, inspired by the sparrow's behavior of foraging and escaping from predators, is a kind of intelligent optimization algorithm with strong optimization capability and fast convergence rate. The population composed of n sparrows can be expressed in the following way: . .
where d stands for the dimension of the problem variable to be optimized. The fitness value of all sparrows can be expressed as follows: . . .
where f stands for fitness value. The fitness function of SSA algorithm is designed as follows: The sum of mean square errors of the training set and test set is called as fitness function, and the smaller the error is, the more accurate the prediction is. In SSA, the sparrow with better fitness value will discover food first, and during this process, the position of the discoverer will be updated with the change of iteration times, which is described as follows: where t represents the current iteration number, j = 1, 2, 3, . . . , d; item max represents for the maximum iteration times set, which is usually a constant; a 2 (0, 1 is a random number; R 2 2 (0, 1 and ST 2 (0:5, 1 represent the prewarning value and safe value, respectively; X i, j represents for the position of the i-th sparrow in the dimension j; Q is the random number obeying normal distribution; L represents a 1 3 d matrix, and each element inside the matrix is 1.
In the basic SSA algorithm, when R 2 \ST, the individual dimension of sparrow will decrease with the iteration, which increases the possibility of local optimization. Therefore, in the algorithm of this study, the SCA algorithm was blended in the position update way of the discoverer to improve this condition. Specifically, a big sine factor was used during the previous searching stage to facilitate the global searching of the algorithm; in the later period, a small sine factor was used to enhance the exploitation capability of the algorithm and avoid local optimization. The sine factor and improved position of discoverer are expressed as follows: In Formula (10), r 1 and r 2 are the random numbers within the ranges of [0, 2p] and [0, 2] respectively.
When SSA iterates for certain times with the fitness value unchanged, the follower becomes the discoverer. To enhance the global searching ability and avoid local optimization, the Levy flying strategy was introduced in the update formula of followers, and the improved Formula (10) is expressed as follows: is the optimum position of the current discoverer. The flight mechanism of Levy is as follows: where r 3 , r 4 are the random numbers within the range of[0, 1], j is set as 1.5, and s is calculated as follows: Hence, for the blended optimization algorithm (ELM-SSA-SCA), firstly, N sub-populations formed by the initial inversion solution predicted by ELM are randomly initialized. Then SSA is adopted to optimize N sub-populations respectively, and the optimization result is used to construct the optimization group. After that, SCA algorithm is applied to the optimization group to judge whether the stopping criterion of SCA algorithm is met. If it is met, the optimum solution will be output, and if it is not met, iteration will be continued. The flow chart of ELM-SSA-SCA algorithm is shown in Figure 1.

Solution of inverse kinematics based on ELM-SSA-SCA industrial robots
To verify the performance of the algorithm proposed in this study, the proposed blended optimization algorithm (SSA-ELM-SCA) verified by certain 6-DOF industrial robot was used to confirm the accuracy of the inversion solution of 6-DOF industrial robots. 16 6-DOF industrial robots are shown in Figure 2.
The mapping relation of the joint space and Cartesian space F u 1 , u 2 , u 3 , u 4 , u 5 , u 6 ð Þ = p x , p y , p z , o x , À o y , o z , a x , a y , a z , n x , n y , n z Þ was used to construct the training set, in which the pose parameter of the end effector of 6-DOF industrial robots is T p x , p y , p z , o x , o y , o z , a x , a y , a z , n x , n y , n z À Á , and the joint angle is u = u 1 , u 2 , u 3 , u 4 , u 5 , u 6 ð Þ . In this experiment, there were a total of 4000 groups of data in the data set, with 70% of the samples randomly selected from them as the training set, and the remaining 30% as the testing set. The number of input nodes and output nodes of ELM were set as 12 and 6, respectively. Sigmoid was used as the stimulation function of ELM, and the number of the hidden layer nodes was 30. The maximum number of iterations item max in the hybrid SSA-SCA optimization method is set to 200, the prewarning value R 2 is a random number in (0, 1, and the safe value ST is set to 0.8. Inversion solution verification of blended optimization algorithm (ELM-SSA-SCA) Table 1 reveals the comparison results of the inverse kinematics errors of six poses. Ten point locations within the accessible spaces of industrial robots were selected randomly, and the geodetic coordinate system was used as the standard to record the Cartesian coordinates corresponding to these point locations. 17 The blended optimization algorithm (ELM-SSA-SCA) proposed in this study was used to calculate the inverse solution and corresponding poses, as well as the inversion solution error, with mm as the unit of the error.
It can be observed from Table 1 that, as verified by the 6-DOF robot, the inversion solution obtained using the blended optimization method (SSA-ELM-SCA) has smaller errors, no greater than 0.16%, which is within the normal error range of the robot equipment. The iteration times and convergence curves of the blended optimization method (SSA-ELM-SCA) are shown in Figure 3.
According to Figure 3, the optimum solution can be speedily obtained by the blended optimization method (SSA-ELM-SCA) when iteration starts. The fitness value of the algorithm is less than that of using the SSA algorithm alone. The convergence rate is fast, the curve is stable and the timeliness is also fine. The root mean squared error (RMSE) indicates the degree of curve fit between the predicted value and the true value. The algorithm in this paper is set as follows: where X i denotes the true value, and X 0 i denotes the predicted value. The comparison of the results between the training set and testing set is shown in Figure 4.
The training of 2800 groups was carried out for the ELM-SSA-SCA algorithm, and 10 groups of poses were selected from the trained models to conduct experiment, thus obtaining the curve of real values and prediction values of 2800 groups of training sets ( Figure  4(a)) and the curve of real value and prediction value of 10 groups of testing groups (Figure 4(b)). Figure 4 shows that there is little fluctuation in the error of prediction values and real values using the blended optimization method (SSA-ELM-SCA), the RMSE of the 2800 training sets is 0.17782 and the RMSE of the 10 test sets is 0.19542, with fluctuations below 5 mm, which is within the normal probability error of the intelligent optimization algorithm, indicating that the blended optimization method (SSA-ELM-SCA) is of excellent prediction precision.

Conclusion
The blended optimization method (SSA-ELM-SCA) was proposed to obtain the solution of 6-DOF inverse kinematics. During the stage of initial solution, ELM with the feature of fast convergence was utilized to get the initial inversion solution speedily, which enhances the timeliness of the algorithm to obtain inverse solution. Then the SSA algorithm with strong global searching ability was used, and the SCA algorithm was applied to select the optimum solution from the obtained pose group. Thus, the speed and precision of the solving process were improved obviously. The experiment has also verified the high speed and precision of the blended optimization method (SSA-ELM-SCA) in the solving process of the industrial robots. The algorithm proposed in this study outperforms other algorithms in terms of convergence speed, precision and timeliness.