Robot Workspace Optimization based on Monte Carlo Method and Multi Island Genetic Algorithm

to measure the working ability of parallel robot. to maximize the workspace of parallel robot, this paper solves the workspace of robot by using Monte Carlo method, and obtains that the workspace volume is 2.142×10 6 mm 3 , which is optimized by the multi Island genetic algorithm in the global optimization algorithm. After optimization, the workspace volume increases to 8.25×10 6 mm 3 , the volume of workspace before and after optimization is increased by 3.85 times. The influence of various structural parameters of the parallel robot on the workspace volume is analyzed and studied. It is obtained that the rod length ratio of the connecting rod and the driving rod has the greatest influence on the workspace volume, followed by the ratio of the center angle of the long and short sides, and the radius of the moving platform has the least influence. Furthermore, the influence of single parameter on the workspace volume is analyzed. When other parameters remain unchanged, the maximum workspace volume can be achieved when the rod length ratio of connecting rod and driving rod is 1.25, or the ratio of center angle of long and short sides is 1.53.


Introduction
With the construction of 5 g intelligent mine [1][2][3], the automation degree of underground mining equipment is increasing, and the underground detection robot of coal mine is also developing. The detection robot can quickly and accurately obtain the on-site information after the mine collapse accident, so as to provide convenience for subsequent rescue tasks. For the design and research of parallel detection robot, workspace analysis is an indispensable part of robot research. It is an important factor to measure the working ability of parallel robot. The size, shape and continuity of workspace directly affect the operating performance of the robot, which is very important for the later control research of robot [4][5].
In the research of parallel robot workspace, scholars from various countries in the industry have also made many contributions. By establishing the constrained optimization equation, Monsarrat et al. Optimized the workspace of a new 6-DOF parallel robot [6]. Kang et al. Used the three-dimensional boundary search method to solve the workspace of 6-PTRT parallel robot, and used the polar coordinate method to solve the workspace volume [7]. Hao et al. solved the Stewart workspace by using the parallel mechanism scale synthesis method of interval analysis, obtained the corresponding workspace point set, and optimized the Stewart workspace and position accuracy through design domain sampling [8]. Based on the 3-PSS parallel mechanism, Jiang used the three-dimensional search method to study the workspace of the robot and obtained the workspace distribution of the robot [9]. Jiao studied a 6-DOF 3branched chain parallel robot, analyzed two models of 3-UPS and 3-URS, and obtained the workspace of the parallel robot through the limit boundary search method [10]. Zhou proposed a new type of symmetrical 3-crcr / RPU parallel mechanism. On this basis, the workspace under the constraints of each joint of the mechanism is given, and the pose space of an inclined hexahedron is obtained. The influence of the structural parameters of the parallel mechanism on the workspace is also analyzed [11]. Cao and others used exhaustive search method and curve fitting method to optimize 6rss workspace, and obtained the corresponding optimization results [12]. By discretizing the pose of the six degree of freedom parallel robot model, the universal numerical algorithm in various spaces is obtained [13]. Kai uses the arc intersection method to calculate the fixed attitude workspace and obtain its section shape. The volume of the workspace of 8-spu parallel robot is calculated and optimized through trapezoidal integration [14]. Boudreau uses genetic algorithm to solve the optimal workspace volume problem of 3-DOF planar parallel mechanism and Stewart mechanism [15][16]. Jiang conducted simulation research on the workspace of delta robot with few degrees of freedom through three simulation methods, and verified its effectiveness [17].
On the premise of positioning posture, this paper studies the reachable space of the robot, and puts forward the combination of Monte Carlo method and multi Island genetic algorithm to find the robot parameters with the maximum motion space. The Monte Carlo method is used to solve the workspace of the robot, and on this basis, the multi Island genetic algorithm is used to optimize the structural parameters of the robot to obtain a larger workspace, and the influence of each structural parameter on the workspace volume is further analyzed.

Monte Carlo method for solving robot space
The basic principle of Monte Carlo method is solved by the constraints affecting the workspace [18]. A search algorithm based on the inverse kinematics of the robot uses random sampling to obtain the required numerical results. Repeating a large number of random sampling can improve the number of qualified samples and make the sample space more accurate.

Determination of constraints
The main body of the six-legged parallel robot studied in this paper is a six degree of freedom parallel platform mechanism, which is composed of six symmetrically distributed kinematic branches and two upper and lower platforms; The upper and lower platforms are respectively provided with three supporting legs, and six leg joints are symmetrically distributed in space; The parallel mechanism platform is divided into upper and lower platforms. The upper platform is a dynamic working platform and the lower platform is a static working platform; As shown in Fig 1. The connecting rod and the driving rod connect the upper and lower platforms through a spherical joint. With the rotation of the motor, the driving rod rotates, and the corresponding connecting rod generates linkage, so as to convert the attitude of the moving platform at different positions. For the parallel mechanism, its advantage is that the motion of the moving platform is determined by the joint rotation of six motion branches. With the rotation of the driving rod, the corresponding connecting rod is driven to rotate, and finally the action on the platform is realized, forming a regular rhythmic motion. This special structure increases the stiffness of the system, improves the bearing capacity of the mechanism, and can realize more accurate positioning. In the Hexapod parallel robot, the structure of each branch kinematic chain is composed of a rotating pair R and two ball pairs s in series. In the movement of robot joints, low pair, i.e. surface contact, is generally used to make the mechanism more stable and reliable. In the six legged parallel robot, the size of the workspace will be limited by the constraints of each joint [19][20][21]. In order to meet the kinematic characteristics of the robot, the constraints of the joint are taken as the constraints for the solution of the robot workspace. The mathematical description of each joint is as follows: 1. Rotation angle range of driving input joint of parallel robot (0, ) i   . 2. Definition δ is the included angle between the drive rod and the connecting rod, as shown in Fig. 2 ai and bi is the length of the driving rod and the connecting rod. Considering the minimum included angle between the driving rod and the connecting rod in the structural design, the ball pair constraint condition of the parallel robot is The common normal length between adjacent connecting rods is di. And the perpendicular foot vector between the common normal and the two connecting rods is and +1, the diameter of the connecting rod is defined as D, and the constraint condition of no interference is di > D. The specific process of solving workspace based on Monte Carlo method is as follows: 1. Firstly, a sampling space containing the robot workspace is sampled by uniform distribution to obtain enough spatial sampling point sets.
2. After the sampling points are obtained, they are substituted into the inverse kinematics program of the parallel robot to judge whether the obtained structural parameters meet the constraints. The sampling points that belong to the workspace and meet the constraints are assigned as 1, and the sampling points that do not belong to the workspace and do not meet the constraints are assigned as 0.
3. Accumulate all sampling points with a value of 1, and divide the sum of the obtained values by the total number of sampling points, that is, the proportion of the workspace of the parallel robot to the sampling space, so the volume of the workspace is equal to the proportion of the sampling space multiplied by the volume of the sampling space. Based on the six legged parallel robot, the volume of the workspace is solved, and its non-optimized parallel mechanism parameters are shown in Table 1, The corresponding structure diagram of relevant parameters in the table is shown in Fig. 3. Table 1 Parameters of non-optimized parallel robot  The number of sampling points in the random sampling space is 20000, and the volume of the sampling space is 2.4 × 10 7 mm 3 , the distribution of space sampling points obtained by Monte Carlo method is shown in Fig. 4, and the distribution of workspace points obtained by Monte Carlo method is shown in Fig. 5. At this time, the number of sampling points in the workspace is 1785, the workspace proportion of the Hexapod parallel robot is (1785 ⁄ 20000) * 100 % = 8.925 %, and the workspace volume is 2.142 × 10 6 mm 3 .

Multi Island genetic algorithm mechanism parameter optimization
In order to improve the effectiveness of workspace optimization of the parallel robot, the improved multi Island genetic algorithm [22][23][24][25][26] based on genetic algorithm is selected. It is helpful for the parallel robot to obtain the optimal set of spatial solutions, which provides conditions for the study of the control strategy of the robot. Reasonable and effective workspace optimization can make the robot move faster and move more stably and smoothly.

Implementation of multi Island genetic algorithm
The workspace optimization of parallel robot takes the maximum workspace volume as the optimization objective to find the global optimization problem. The mechanism parameter affecting the workspace volume is ai, bi, ϕ, r, R so it is necessary to determine the value range of these six parameters and find the optimal solution satisfying the constraints. The values of various parameters are shown in Table 2.
Taking the maximum workspace volume of the parallel robot under constant attitude as the optimization objective, the structural parameters of the parallel mechanism are optimized, and the optimization function satisfying the limiting conditions is obtained as follows: , where: F * is the function of calculating the maximum space volume; t is the six design variables of constraints; di is the common normal length between adjacent connecting rods; and D represents the section diameter of connecting rods.
According to multi Island genetic algorithm, the optimization process of Hexapod parallel robot is designed. The basic operations are as follows: 1. Design the calculation process of the volume ratio of work space, and input the corresponding design parameters in the input link according to the calculation method of work space proportion, such as , , , , , , ii a b r R  the output link will output the corresponding volume proportion.
2. The global optimization algorithm based on multi Island genetic algorithm is implemented. The optimi-zation objective converges to a fixed value after several iterative calculations, and the corresponding optimized workspace volume proportion and structure size parameters are obtained.
Based on the global optimization of multi-Island genetic algorithm, the corresponding parameters are set as shown in Table 3.

Parameter optimization of robot mechanism
The optimization system is designed as shown in Fig. 6. The optimized control program is programmed with MATLAB software, constraint conditions are set, and the system optimization simulation flow chart is built in the optimization software Isight. During the system simulation, the optimized control program in MTALAB is called by Monte Carlo method to optimize the workspace of the parallel robot. After several iterations of MIGA algorithm, the convergence value was obtained and analyzed as the optimization result of the optimization space to determine the optimal value of the structure parameters of the parallel robot. At this time, the workspace volume of the parallel robot reached the maximum value.
According to the established optimization system flow chart, the workspace is optimized. The results of the five optimizations during the optimization test are shown in Table 4.  Table 4, the optimized mechanism parameters have little difference and are within a reasonable range. Then, after multiple optimization with MIGA algorithm, the final workspace optimization results are obtained, as shown in Table 5. Table 4 Optimization results of five tests Analyze and compare the parameter values before and after optimization, and draw the three-dimensional workspace scatter diagram according to the optimization results, as shown in Fig. 7. It is found that the workspace volume increases significantly after optimization. After analysis, the proportion of workspace of the parallel robot changes from 8.925% before optimization to 34.375%, the overall workspace changes to 3.85 times of the original, and the workspace volume is 8.25 × 10 6 mm 3 , from which it can be concluded that the volume of the workspace is optimized reasonably. The effects of six structural parameters of the parallel robot on the workspace volume are analyzed and compared. Based on the experimental design method in the ISIGHT optimization design software, the relationship between the structural parameters and the robot workspace is studied and processed. The experimental parameters are reasonably determined from three aspects: test planning, test implementation and result analysis. In the experimental design method, Latin hypercube design method (LHD) is selected to fit the nonlinear response. The flow of experimental design is shown in Fig. 8.
It is defined that the length ratio of connecting rod and driving rod is P, the center angle corresponding to long side and short side is Q, and the radii of static platform and dynamic platform are R and R respectively. The proportion of the influence of various parameters on the workspace is obtained, as shown in Fig. 9. As shown in Fig. 9, P has the highest impact on the workspace, and the optimization parameter P should be mainly considered. Fix other parameters, study the influence of parameter P on the proportion of workspace, and get the curve as shown in Fig. 10. The proportion curve of workspace first increases and then decreases. When parameter P is about 1.25, the proportion of workspace reaches the maximum, and the volume of workspace reaches the maximum. Fig. 9 Influence of various parameters on workspace As shown in Fig. 11, the volume proportion of the workspace is inversely proportional to the radius of the circumscribed circle of the static platform, that is, it decreases with the increase of the radius of the circumscribed circle of the static platform, and is directly proportional to the radius of the circumscribed circle of the moving platform, that is, it increases with the increase of the radius of the circumscribed circle of the moving platform. As shown in Fig. 12, the proportion of workspace increases first and then decreases with the increase of parameter Q. when Q is 1.53, the proportion of workspace reaches the maximum, and the workspace volume of robot mechanism is the largest.

Robot prototype test
In order to verify the feasibility of robot space optimization design, the built robot is tested as shown in Fig.  13. After gait test, several typical gait and corresponding data are obtained. The research and analysis of the robot moving along the y-axis direction, moving along the y-axis direction plus steering and the robot turning in place are mainly carried out. It is concluded that the motion of the robot is relatively stable. From the motion curve of the robot, it can be seen that the motion is fast and smooth. The prototype experiment shows that the motion performance of the parallel robot is good, which meets the requirements of robot structure design and gait simulation test.  Fig. 14, it can be seen that the displacement curve of the robot along the Y axis fluctuates with time, but it has a bending growth trend as a whole. In Fig. 15, it can be seen that the angular displacement curve of the robot in the Z direction gradually increases with the turning of the robot, and shows a linear increasing trend, with good linearity. In Fig.16, when the parallel robot moves forward and turns along the Y direction, the simulation curve has good linearity and smooth transition, which is in line with the stability of the robot action. 1. The workspace of the robot is solved by Monte Carlo method, and the workspace volume is 2.142×10 6 mm 3 and optimized by multi Island genetic algorithm in global optimization algorithm. Before and after optimization, the workspace volume is increased by 3.85 times and increased to 8.25×10 6 mm 3 .
2. The influence of various structural parameters of the parallel robot on the workspace volume is analyzed and studied. It is obtained that the rod length ratio p of the connecting rod and the driving rod has the greatest influence on the workspace volume, which is 47.8 %. The second is the ratio Q of the center angle of the long side to the center angle of the short side, and the smallest influence is the radius of the moving platform.
3. The influence of single parameter on the space proportion is analyzed. It is obtained that when the single parameter P is 1.25, it has the greatest influence on the workspace proportion, that is, the workspace volume reaches the maximum. When the single parameter Q is 1.53, the workspace volume of the parallel robot is the largest.
4. Through the experimental verification of the robot prototype, the research and analysis of the robot moving along the y-axis direction, moving along the y-axis direction plus steering and the robot turning in place are mainly carried out. It is concluded that the motion of the robot is relatively stable. From the motion curve of the robot, it can be seen that the motion is fast and smooth, which verifies the feasibility of space optimization.