A hybrid improved BRO algorithm and its application in inverse kinematics of 7R 6DOF robot

To advance the calculation performance of the battle royale optimization algorithm (BRO), a hybrid improved BRO algorithm (HBC) is proposed in this paper. The level mechanism of the chicken swarm optimization algorithm (CSO) is integrated into the BRO algorithm to divide all into elite players and ordinary players, and the level relationship of different players is established. Then, an elite player update method of random exploring and directional update in a small range is proposed to improve the development ability. The update method of ordinary players improved, the update mechanism of elite random guidance is introduced to make full use of the excellent location information in the population. The performance verification experiment of the HBC algorithm is carried out on 20 benchmark functions and a practical project. Comparing with several other algorithms, the computational performance of the HBC algorithm is the best. Furthermore, the HBC algorithm is applied to solve the inverse kinematics of the 7R 6DOF robot. The experimental results show that the HBC algorithm effectively improves the average convergence accuracy and reduces the running time, compared with the BRO algorithm. This fully shows that the HBC algorithm is more competitive in stability, calculation accuracy, and speed.


Introduction
The optimization problem is a common question in the fields of engineering design, resource allocation and scheduling, agricultural science, and medical applications. How to solve the optimization problem has become a research hotspot. [1][2][3][4] The swarm intelligence algorithm has achieved a good balance between exploration and development, and has the characteristics of simple structure, strong robustness, good scalability, and flexibility. It has been widely used in solving various optimization problems. 5,6 Among them, particle swarm optimization algorithm (PSO), 7 fruit fly optimization algorithm (FOA), 8 CSO algorithm, 9 ant lion optimization algorithm (ALO), 10 11 and other algorithms have shown excellent and unique optimization capabilities.
In recent years, optimization problems have shown the characteristics of high complexity and high dimensionality, 12,13 which cannot be solved by traditional optimization algorithms. Researchers devote more time to proposing new algorithms and improving classic algorithms. New swarm intelligence algorithms include salp swarm algorithm (SSA), 14 grasshopper optimization algorithm (GOA), 15 sparrow search algorithm (SSA), 16 slime mold algorithm (SMA), 17 etc.
There are two main ways to improve the classic swarm intelligence algorithm. The first is to introduce a new update mechanism in the algorithm. Ma et al. 18 proposed an improved moth flame optimization algorithm (DMMFO), which introduces diversity and mutation strategies. It is verified that DMMFO algorithm has better performance on 30 benchmark functions and 3 engineering optimization cases. Zhong and Cheng 19 proposed an improved DE algorithm (EHDE), which introduced two different strategies, and the performance of the EHDE algorithm is verified. Ahmed et al. 20 proposed a knowledge-based artificial bee colony algorithm (K-ABC), which has achieved good results in inverse kinematics of robot and other complex constraint engineering problems. Liang et al. 21 proposed an ICSO algorithm by Le´vy flight and nonlinear weight reduction strategies, and applied it to the robot path planning problem. The algorithm has better convergence performance compared with PSO and CSO algorithms.
The second is to combine an algorithm with other algorithms. Dadvar et al. 22 proposed a new hybrid algorithm (HGPSODE). Comparing with the classic algorithm and other hybrid models, the HGPSODE algorithm has better performance. Xia et al. 23 and Xia and Wu 24 proposed two hybrid multi-objective optimization algorithms, and applied them to solve the problem of dynamic economic emission dispatching in the environment where wind power. One is a hybrid algorithm by equilibrium optimizer (EO) and DE algorithms, and the other is a hybrid algorithm by marine predators (MPA) and DE algorithms. Stephan et al. 25 proposed a new HAW algorithm based on the ABC algorithm and the WOA algorithm, and used the HAW algorithm to optimize the artificial neural network (ANN). At the same time, a computer-aided diagnosis (CAD) system based on improved ANN is established, which improved the accuracy of breast cancer diagnosis. Saafan and El-Gendy 26 proposed a hybrid algorithm (IWOSSA) based on the IWOA algorithm and SSA algorithm, and verified that the IWOSSA algorithm has good computing performance. Abadi et al. 27 proposed a new HSSAGA model based on SSA algorithm and GA algorithm. The calculation performance of the HSSAGA algorithm in nurse scheduling and assignment is relatively good, compared with other existing algorithms.
Through the above-mentioned literature analysis, the method of introducing a new mechanism can change the individual update rules, and improve the algorithm's global exploration ability. The method of combining different algorithms, which can overcome its shortcomings and improve the convergence ability of the algorithm. Both of these two methods can improve the capabilities of the algorithm.
The inverse kinematics problem of robot can be transformed into optimization problem. Solving the inverse kinematics of robots through intelligence methods is a current research hotspot. Shi and Xie 28 and Kucuk and Bingul 29 solved the inverse kinematics of a 6DOF robot with an offset wrist. The former method is Adaboost neural network (ANN), the simulation results show that the ANN method has good performance in terms of accuracy and stability. The latter is to propose a new inverse kinematics algorithm (NIKA), it can be seen from the convergence time and asymptotic performance that NIKA is an effective method for solving inverse kinematics. Dereli and Koker 30,31 solved the inverse kinematics of 7DOF robots by firefly algorithm (FA) and quantum PSO algorithm (QPSO), and compared with the PSO and ABC algorithms. The results show that the QPSO algorithm has the advantages of short calculation time, fewer iterations, and fewer particles. It is more effective than the standard PSO, ABC, and FA algorithms in solving the inverse kinematics solution. Lopez-Franco et al. 32 solved the robot inverse kinematics problem based on eight population intelligence algorithms. Robot types include PUMA560, Baxter arm manipulator, KUKA Youbot arm manipulator, and Anthropomorphic RRR arm manipulator. The results show that the CMA-ES algorithm has the best computational performance. Then, the CMA-ES algorithm is used to solve a real-time path tracking problem, and a good application effect is obtained. Yiyang et al. 33 proposed an improved PSO algorithm to solve the robot inverse kinematics solution, and verified the excellent performance of the algorithm in the NJ-220 general-purpose robot. Dereli and Koker 34 proposed a variant of the PSO algorithm (IW-PSO), the IW-PSO algorithm is very successful in obtaining the optimal inverse kinematics solution. Rahkar Farshi 35 proposed a new swarm intelligence algorithm, called BRO algorithm, and obtained higher optimization results in the inverse kinematics solution of the 6R robot. According to the above literature analysis, the intelligent method is a reliable method to solve the robot inverse kinematics. To further improve the accuracy of inverse kinematics solution, many scholars are exploring the improvement of the intelligent algorithm. Therefore, the BRO algorithm is improved in this paper. This paper proposes a new hybrid algorithm (HBC). First, through the level mechanism of the CSO algorithm, the individuals in the BRO algorithm are divided into elite players and ordinary players, and a level relationship is established. Then, an update rule for elite players is designed, which mixes two methods of random exploring and directional update. Finally, improve the update rules for ordinary players, the rule is that ordinary players update with the index of elite players. Under the new level mechanism of population, individuals explore the solution space in two different ways, which improves the global exploration capability and convergence accuracy of the BRO algorithm. In addition, the performance of the HBC algorithm is verified by multiple benchmark functions and a practical engineering problem. Meanwhile, the HBC algorithm is applied to solve the inverse kinematics solution of 7R 6DOF robot.
The main contributions of this article are as follows: 1. Through the analysis of literature, the latest development and research results of the swarm intelligence algorithm are summarized, which provides more theoretical support for the research of the BRO algorithm. Meanwhile, it also provides a reference for more scholars to study the BRO algorithm. In addition, we also summarized the research results of intelligent algorithms to solve inverse kinematics problem of robot, which provides more basis of feasibility for solving the 7R 6DOF inverse kinematics problem in this paper. the results are analyzed. Finally, the results of this paper are compared with those obtained in other well-known researches, which further proves the superiority of the HBC algorithm in solving the problem. This will be a new attempt to solve the inverse kinematics of the 7R 6DOF robot.
The rest of this paper is organized as follows: Section 2 introduces basic algorithm theory, including BRO algorithm and CSO algorithm. Section 3 proposes the HBC algorithm, and elaborates its principle. Section 4 is to experiment with the HBC algorithm on benchmark functions and a practical engineering problem, and compare with five other algorithms to verify the effectiveness of the HBC algorithm. Section 5 applies the HBC algorithm to the inverse kinematics of the 7R 6DOF robot, and compares it with the BRO algorithm. The conclusion and prospect of this paper is in Section 6.

Battle royale optimization algorithm
Rahkar Farshi proposed the BRO algorithm in 2020. It is inspired by the battle royal video game, in which players need to explore and use the surrounding environment to survive. The challenge of the game involves players trying to defeat each other by shooting weapons, and surviving in a shrinking safe area. Every player outside a safe area will be affected in two different ways, one is the damage caused by the health value, and the other is the risk of being eliminated.
The initial population of the BRO algorithm is composed of n individuals randomly generated in the Ddimensional space. x t i i 2 ½1, n ð Þand x t i, dam represent the position information and damage level of the ith player in the tth iteration among the population, respectively. In the iterative process, the two players with the closest Euclidean distance attack each other. The winner is the player in the better position and stays in the original position, but the damage level is set to 0. The player in poor positions is injured in mutual attacks, so it is called a loser. The damage level of the loser is updated, as shown in equation (1). At the same time, according to the global optimal position and the current position, the position of the loser is updated, as shown in equation (2), which the purpose is to protect itself and attack the enemy from other sides.
Where r is the coefficient (r 2 ½0, 1). Moreover, if this player becomes the winner next time, its damage level will reset to 0. To focus on exploration, if the player's cumulative damage level exceeds the preset value (thre = 3), the player dies and respawns in the current safe area, and the damage level will reset to 0. The ordinary players respawn in the current safe area, as shown in equation (3).
Where ub d and lb d are the lower and upper limit of the safe area, respectively. In addition, in the iterative process, if the number of iterations is greater than the area update threshold (D), the safe area is reduced with the global optimal position as the center, the lower and upper limit are shown in equations (4) and (5).
SD(x d ) is the standard deviation of the population, x best is the current optimal solution. If lb d and ub d exceed the lower and upper limit of the solution space, set to the original ub d and lb d The area update threshold D is updated adaptively, as shown in equation (6).
The initial value D is log 10 (T max ), T max is the maximum number of iterations.
The pseudocode of the BRO algorithm is shown in Algorithm 1.

Chicken swarm optimization algorithm
CSO algorithm is a meta-heuristic algorithm proposed in 2014, which is inspired by the natural behavior of chickens in the process of foraging. By establishing some kind of level mechanism and level relationship among the population individuals, the calculation performance of the algorithm is effectively improved. In the CSO algorithm, the population is divided into three levels: rooster, hen, and chick. And three hierarchical relationships are established, including the rooster randomly leading the population to move, the hen following the rooster, and the chick following the mother hen. In the iterative process, through the update of the level mechanism, the mutual learning and competition between individuals, it is constantly evolving to find the global optimal position.
In the D-dimensional solution space, the number of chickens is set to N. X t i (i 2 ½1, N ) is the position of the ith individual in the tth iteration. The number of rooster individuals is N r , which is the subgroup with the best position in the population, and its position update is shown in equations (7) and (8).
Where randn(0, s 2 ) is a random Gaussian with a mean value of 0 and a standard deviation of s 2 , e is a minimum constant in the computer, k is a random number (k 2 ½1, N r , k 6 ¼ i), f represents the fitness value of an individual.
The number of hens is N h , each hen will update the position with a rooster as the target, and compete with other chickens. The position update is shown in equations (9)-(11).
Where X t r1 represents the position of the rooster followed by the ith hen, X t r2 is a randomly selected rooster or hen position. X t The number of chicks is N c , the chick moves with its mother hen, and its position is updated as shown in equaiton (12).
Algorithm 1. Pseudocode of BRO algorithm

Begin
Randomly initialize a population (x n ), and initialize all parameters; Shrink = ceil(log 10 (T max )); Update the damage level and the position of the loser by Eq.(1) and Eq. (2); else The loser respawn in the current safe area by Eq. (3); Update ub d and lb d by Eq.(4) and Eq. (5); Update the threshold (D) by Eq. (6); end if If lb d =ub d exceed the lower/upper of the solution space, set to the original ub d and lb d ; Record the best individual and its fitness value. end Where X t m is mother hen position, FL(FL 2 ½0, 2) is the following coefficient.
The pseudocode of the CSO algorithm is described in Algorithm 2.

A new hybrid improved algorithm (HBC)
To improve the computational performance of the BRO algorithm, this paper proposes a HBC algorithm, which is a variant of the BRO algorithm. The principle and implementation process of the HBC algorithm are introduced detailedly in the section. Including the algorithm flow chart and pseudocode. And the time complexity of the algorithm is analyzed.

Principle of HBC algorithm
The HBC algorithm refers to the integration of the CSO algorithm hierarchy into the BRO algorithm, and the player population in the BRO algorithm is divided into two subgroups, namely elite players and ordinary players, as shown in equation (13). In the population, the level mechanism is established by defining some players with higher fitness values as elite players, and defining the remaining players as ordinary players. The level relationship is established by randomly assigning each elite player to the ordinary player as its update target. The level mechanism and level relationship are re-established every G n iteration.
Where x a is the elite player subgroup, x b is the ordinary player subgroup.
In the HBC algorithm, the elite player subgroup carries better position information in the population, X t i, a (i 2 ½1, n a ) represents the position information. If it is allowed to continuously explore the nearby area, the accuracy of the algorithm's solution may be improved. Therefore, the elite player update rule is proposed, that alternates between random exploring and directional update. This rule is based on the update rule of the rooster random walk in the CSO algorithm, which increases the ability of elite players to directional exploration. The update rule is shown in equation (14).
Where x best is the global optimal position, randn(0, s 2 ) is a random number that satisfies the Gaussian distribution, where the mean is 0 and the standard deviation is s 2 , the calculation of s 2 is shown in equation (8).
The ordinary players occupy the largest proportion of the population, x t i, b (i 2 ½1, n b ) represents the position information. How to achieve efficient and diversified exploration in the solution space, which may be the key to improving the algorithm's global exploration ability and convergence speed. Therefore, based on the player update rule in the BRO algorithm, the ordinary player update rule is improved in the HBC algorithm, the improvements are as follows. First, the neighbor of the ordinary player is found by calculating the Euclidean distance. Then, calculate the fitness values of the two ordinary players. Among them, the winner (x t j, b ) is the player with a better position, and the damage level is set to 0. The loser (x t i, b ) is a player in a poor position, and the damage level is increased by 1. Finally, to make full use of the excellent position information in the population, the winner is updated with the global optimal position as the target, and the loser is updated with the elite player as the target, as shown in equations (15) and (16).
Where x t k, a is elite player randomly selected, x best is the global optimal position.

Implementation of HBC algorithm
According to the HBC algorithm principle introduced in the previous section, the specific implementation steps of the HBC algorithm are as follows: The parameters such as the number of populations and the proportion of different chickens are set; Randomly initialize the population, t=0; The population is divided into three subgroups (rooster, hen and chick), and the relationship of each subgroup is established; The rooster update is a random exploration, which is implemented by Eq. (7); end for The hen moves with the rooster and competes with another hen, the update is implemented by Eq. (9); end for for i = 1 : N c The chick moves with the mother, and the update is implemented by Eq. (12); end for Evaluate the new solution; Record the best individual and its fitness value. end while Step 1: Set the population size n. The number of elite players (n a ), the number of ordinary players (n b ). Maximum number of iterations (T max ). Regional update threshold (D) and other related parameters, randomly initialize the population and calculate the fitness value.
Step 2: According to the fitness value, the population is divided into elite player subgroups and ordinary player subgroups. And the follow-up relationship between different subgroups is estabilished.
Step 4: Update the safe area of the algorithm by equations (4) to (6), and recalculate the fitness values of all individuals.
Step 5: Record the best fitness value and the best individual.
Step 6: Determine whether the fitness value or the maximum number of iterations meets the termination condition. If it is satisfied, the algorithm ends. Otherwise, return to step 2.
The pseudocode of the HBC algorithm is shown in Algorithm 3, and the flow chart is shown in Figure 1.

Time complexity analysis
The time complexity mainly describes the computing resources of the algorithm in the optimization process, which directly affects the computing time of the algo- In summary, Comparing with the BRO algorithm, the proposed HBC algorithm has the advantage of the lower time complexity.

Simulation experiment and result analysis
In this section, the HBC algorithm and five classical algorithms are tested on 20 benchmark functions, and the convergence, stability, accuracy, non-parametric test, and running time of the experimental results are compared and analyzed. Then, the HBC algorithm is applied to solve a practical engineering problem, and the calculation results are compared with literature 35.

Begin
Randomly initialize the population. Set related parameters; The subgroup of elite players and ordinary players are selected according to fitness value, and establish the level relationship of each individual; end if for i = 1 : n a // Update elite players // Update elite players by Eq. (14); end for for i = 1 : n b // Update ordinary players // Find the closest player x t j, b by calculating the Euclidean distance; Update the winner among ordinary players by Eq. (15); Update the loser among ordinary players by Eq. (16); The loser respawn in the current safe area by Eq. (3);

Experimental environment and parameters
The experimental environment of this paper is introduced as follows: the processor is Intel Ò Coreä i5-3470M CPU @ 3.20 GHZ, the memory is 16 GB, and the operating system is Windows 10 64-bit. The simulation software is Matlab.
The HBC algorithm and the classic PSO, BRO, CSO, ALO, and WOA algorithms experimental evaluation and comparative analysis are carried out on 20 benchmark functions. The evaluation indicators of the algorithm are the average value and standard deviation (the results of 50 independent running experiments). At the same time, sort the average value of the algorithm on each benchmark function. The algorithm with the smallest average has a rank of 1. If the average value of the two algorithms is equal, the rank is the same, but it occupies two positions. Then, the average ranking and total ranking of the algorithm on the 20 benchmark functions are calculated.
In all algorithms, the maximum number of iterations and the population size are 300 and 100, respectively. Table 2 shows other parameters.

The convergence characteristics analysis of the HBC algorithm
This section analyzes the convergence characteristics of the HBC algorithm and other algorithms on the 20 benchmark functions, in the case of D = 30. The convergence curve is shown in Figure 2. Figure 2 shows that the convergence speed and accuracy of the HBC algorithm are significantly higher than other algorithms on the unimodal functions F1-F7. On the multimodal functions F8-F14, the convergence speed and accuracy of the HBC algorithm are still higher than other algorithms. However, only the HBC algorithm achieves convergence on the multimodal functions F8, F9, F10, and F12. The HBC algorithm achieves complete convergence in the hybrid functions F16-F19. In the hybrid function F15, the convergence accuracy of the HBC algorithm is only lower than that of the CSO algorithm. It shows that the HBC algorithm has better optimization ability than other algorithms.

The stability and convergence accuracy analysis of HBC algorithm
In the cases of D = 10 and D = 30, the test results of the HBC algorithm and the classic PSO, BRO, CSO, ALO, and WOA algorithms on 20 benchmark functions are shown in Tables 3 and 4. Each test result is the average value of 50 independent runs of the experiment. From the results of Tables 3 and 4, the following conclusions can be drawn.
From the unimodal functions F1-F7, in all dimensions, the average and standard deviation of the convergence accuracy of the HBC algorithm are better than other algorithms. Convergence accuracy is improved by at least 10 orders of magnitude in F1-F4 and F6-F7 functions. It shows that the convergence accuracy and stability of the HBC algorithm has been significantly improved. From the multimodal functions F8-F14, in all dimensions, we can find that the HBC algorithm achieves complete convergence on functions F8-F10 and F13, and the standard deviation is 0. The HBC algorithm ranks second in the convergence accuracy of functions F11 and F14, under the D = 10 dimension, but the convergence accuracy ranks first under the condition of D = 30 dimension. From the hybrid functions F15-F20, the experimental results show that the optimization performance of the HBC algorithm is significantly better than other algorithms in different dimensions, and only the functions F15 and F19 don't achieve the best optimization effect, but still ranks high. This shows that, compared with the BRO algorithm, the convergence accuracy and stability can been effectively improved in the HBC algorithm.
The average ranking of all algorithm performance is shown in Figure 3. It can be seen from Figure 3 that in different dimensions, the performance of the HBC algorithm ranks first, which more intuitively illustrates the superiority of the HBC algorithm.

Wilcoxon rank sum test
Scientific statistical analysis can reflect the internal connection between data objectively, which is of great significance for displaying experimental results. Therefore, the convergence results of 50 independent runs of all algorithms are divided into five groups of different samples, which are the calculation results of HBC versus CSO, HBC versus BRO, HBC versus PSO, HBC versus ALO, and HBC versus WOA. The parameter a is 0.05, Wilcoxon rank sum test is performed on each group of new samples, and the results are shown in Tables 5 and 6. h = 1 + means that the overall distribution of the two samples is significantly different, and the performance of the HBC algorithm is better than other algorithms. h = 1 2 means that the performance of the HBC algorithm is not as good as the other algorithm, but there is a significant difference in the overall distribution. h = 0 indicates that the two samples have no significant difference in the overall distribution. p = 0 indicates that the two samples have achieved complete convergence in 50 independent experiments.
From a statistical point of view, it clearly shows that the HBC algorithm has more excellent performance than other algorithms. It also further illustrates that our improved methods and theories are meaningful. Table 7

Engineering application case
The purpose of this section is to verify the computational performance of the HBC algorithm on a practical engineering problem. Under the conditions of the same parameters as literature 35, the PUMA 560 robot inverse kinematics problem is solved. And the solution    Table 8 shows the Denavit-Hartenberg (D-H) parameters of the PUMA 560 robot. Take the Euclidean distance between the desired position and the actual position as the objective function, as shown in equation (17).
The inverse kinematics solution of the PUMA 560 robot is calculated by the HBC algorithm, and the result shows the average result of 50 independent experiments, as shown in Table 9. Table 9 shows that the average convergence accuracy of the HBC and BRO algorithms gradually improving, with the increase of population number and the maximum iterations times. The best convergence accuracy of the HBC algorithm is 5.3433E212, and the standard deviation is 2.4220E212. And if the population of the algorithm is more than 50, the convergence accuracy and standard deviation of the HBC algorithm are significantly better than the BRO algorithm. It shows that the HBC algorithm shows higher convergence accuracy and stability than the BRO algorithm, and the solution result of the HBC algorithm is closer to the analytical solution.
Therefore, the robot that have no analytical solution for inverse kinematics (not satisfying Pieper criterion), it is feasible to use the HBC algorithm to solve inverse kinematics. This method has strong versatility and avoids the singularity problem. In Section 5, we take the 7R 6DOF robot as an example to research solving inverse kinematics based on the HBC algorithm.

The application of HBC algorithm in the kinematic inverse of 7R 6DOF robot
The 7R 6DOF robot has the characteristics of the hollow wrist, flexible movement, and wide range of motion, 38,39 and has been widely used in the field of spraying. 40 However, the robot has no analytical solution for inverse kinematics, which limits its development in the field of intelligent spraying. Therefore, this paper first converts the inverse kinematics problem into an optimization problem, 41 Then, HBC algorithm is used to solve inverse kinematics problems from forward kinematics equations. Finally, the accuracy and stability of the algorithm are verified by multiple sets of experiments.

Kinematics and objective function
In the Cartesian space, the end pose of the robot is described in terms of the joint space, that is the forward kinematics of the tandem robot. Therefore, given a set of joint angles ½u 1 , u 2 , Á Á Á , u n , the pose matrix of the end-effector can be calculated by the forward kinematic equation (18).
Where iÀ1 i T (u i ) represents the rotation matrix of joint i. 0 n T represents the pose matrix of the end-effector, which is transformed by the coordinates of each joint.
In this paper, the pose of the end-effector of the 7R 6DOF robot is described by the D-H parameters method. Equation (19) represents the transformation matrix of the coordinate system between two adjacent joints.
Where ½a i , d i , a i , u i represent the link offset, link length, link torsion angle, and joint angle, respectively.
The 7R 6DOF robot is a tandem robot composed of seven revolute joints, what has the characteristics of the non-Spherical wrist. The five-axis and six-axis in the wrist are driven by the same motor, which has the characteristics of the even movement of u 5 = À u 6 . The 7R 6DOF robot solid shape is shown in Figure 4.
According to the D-H parameters modeling method, the forward kinematics equation of the 7R 6DOF robot is shown in equation (20).
The end pose of the 7R 6DOF robot is calculated based on equations (19) and (20), 42 as shown in equation (21).  Inverse kinematics of the robot is a coordinate conversion calculation of the end-effector, which is from  the three-dimensional task space to the joint angle space. Under the condition that the posture matrix of the end-effector of the robot is known, the analytical solution of the joint angle of the robot can be solved. If the mechanical configuration of a robot does not satisfy the Pieper criterion, its inverse kinematics has no analytical solution. The 7R 6DOF robot with a non-spherical wrist does not satisfy the Pieper criterion, which leads to the inverse kinematics solution cannot be solved analytically. Therefore, this paper proposes a method to solve the inverse kinematics problem based on the HBC algorithm. The HBC algorithm directly starts from the positive kinematics equation, and transforms the inverse kinematics problem into an optimization problem for finding the minimum. This method has no requirements on the mechanical configuration of the robot, and the problem of singularity will not occur. In the HBC algorithm, each individual represents a set of joint angles, and the current end-effector posture matrix can be calculated by the forward kinematics equation, as shown in equation (22).
Where R 3 3 3 ð Þ represents the actual posture rotation matrix, and P 1 3 3 ð Þ represents the actual position rotation matrix.
A reasonable objective function is designed to calculate the fitness value of each individual, which makes it possible to achieve the most effective optimization calculation in the iterative process. Therefore, we define the objective function as the error between the desired position and the current position. As shown in equation (23).
Where P 1 3 3 ð Þ represents the desired position rotation matrix.
This paper takes the ABB IRB5400 robot as an example. The D-H parameters of the ABB IRB5400 robot are shown in Table 10. 43

Experiment and result analysis
In order to demonstrate the solving ability of the HBC algorithm. Under the same conditions, the HBC algorithm and the BRO algorithm are used to solve the In the solution space of the robot, 10 average points on a straight line are selected as test points P ð1 3 3Þ (i), the desired position coordinates of each point are shown in Table 11. The joint angle ½u 1 , u 2 , Á Á Á , u n of the robot is used as the position vector of the individual in the algorithm. Calculate the robot end-effector position vector corresponding to each individual by the given test point and forward kinematics equation. The fitness value of the individual is calculated by the objective function. The average results of 30 independent experiments performed at each test point are recorded, and the data results are compared and analyzed. Table 11 records the calculation results of the HBC and BRO algorithms in a single experiment, and Dp x Dp y Dp z represents the error values of each component of the expected position and the actual position, respectively. Table 12 records the average value, standard deviation, average running time, and convergence time of all test point position errors in 30 experiments. The experimental results show that the average calculation accuracy of the HBC algorithm in solving 10 different test points is less than 9.02E28, and the standard deviation of all test results is less than 4.94E27. However, the best average calculation accuracy of the BRO algorithm is 5.91E23, and the standard deviation is 5.66E23. Furthermore, from the average number of times of convergence and running time, it can be found that both the HBC algorithm and the BRO algorithm achieve complete convergence, the running time of the HBC algorithm is lower than the BRO algorithm. This shows that the HBC algorithm has stronger stability, higher calculation accuracy, and speed than the BRO algorithm in solving the inverse kinematics of the 7R 6DOF robot. Table 13 records the results of some other well know studies, which are related to the research content of this article. It mainly includes the solving method of inverse kinematics, robot type, and position error. From the analysis of the results in Table 13, it can be seen that the application of intelligent methods in solving inverse kinematics problems has achieved great success, and the HBC algorithm proposed in this paper is more competitive in the accuracy of the solution. It shows that the HBC algorithm is completely feasible in solving the inverse kinematics problem of the robot.

Conclusion
In this paper, the HBC algorithm is proposed, which is a hybrid improved BRO algorithm. The level mechanism of the CSO algorithm is integrated into the BRO algorithm, which divides its population into elite player subgroups and ordinary player subgroups. The followup relationship between the subgroups is established. The update method for elite players is designed to combine randomly explore and directionally update. The update method of ordinary players has been improved, in which the loser takes the elite player as the update target, and the winner takes the optimal position as the update target. The performance of the HBC algorithm is verified by benchmark functions and a practical engineering problem. The HBC algorithm is used to solve the inverse kinematics of the 7R 6DOF robot. Get the following conclusions: (1) The HBC algorithm achieves complete convergence on most multimodal functions and hybrid functions, and the convergence accuracy on unimodal functions is improved by 10 orders of magnitude, compared with PSO, BRO, CSO, ALO, and WOA algorithms. Meanwhile, the running time of the HBC algorithm is less than the BRO algorithm. This proves that the HBC algorithm has better global exploration ability, convergence speed, and convergence accuracy. (2) The inverse kinematics of the PUMA 560 robot is solved by the HBC algorithm, and its solution accuracy and standard deviation are better than the BRO algorithm. It is further verified that the HBC algorithm also has better performance in solving engineering problems. (3) The inverse kinematics of the 7R 6DOF robot is solved through the HBC algorithm. The accuracy, stability, and running time are better than the BRO algorithm, and the accuracy is higher than 9.02E208. Therefore, the HBC algorithm to solve the inverse kinematics solution of the 7R 6DOF robot is feasible and has good development prospects. In future work, we will conduct in-depth research on the BRO algorithm and improve its computational performance. Meanwhile, we will explore the application of algorithms in different fields, such as solving inverse kinematics posture problems, trajectory optimization, and workshop schedule.

Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.

Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work is supported by the Defense Industrial Technology Development Program under Grant No. JCKY2019411B001.