1. Introduction
Mobile robots with obstacle-crossing capabilities can perform wider and more efficient searches, so they are often used in complex work environments [
1]. The movement mode of the obstacle-crossing robots is more complex and diverse than those that cannot cross the obstacles, which can open up new paths but also bring new challenges to path-planning technology [
2].
Robot path planning refers to the mobile robot independently designing a safe and collision-free path with the shortest distance from the starting point to the end point, taking the least time. Algorithm is the core of robot path planning [
3]. The path-planning algorithm can be roughly classified as (1) path-planning algorithms based on map search, such as the A-star algorithm [
4,
5,
6], artificial potential field algorithm [
7,
8], etc., (2) sampling-based path-planning algorithms, such as the RRT algorithm [
9,
10,
11], PRM algorithm [
12], etc., and (3) swarm intelligence algorithms based on global optimization, such as the ant colony optimizer [
13,
14,
15], artificial bee colony optimizer [
16,
17], algorithms based on deep learning [
18,
19,
20], etc.
The GWO is a kind of swarm intelligence algorithm [
21]. Because of its strong convergence performance and relatively simple algorithm structure, it has been applied to parameter optimization [
22,
23], fault diagnosis [
24,
25], path planning [
26,
27,
28] and other fields. However, the GWO also has problems, such as a too singular initial population, slow convergence speed and the ease with which it falls into the local optimum. To solve these problems, Shitu Singh [
29] proposed an improved grey wolf algorithm driven by mutation, which used the Levy flight model to perform mutation operation on the population and the greedy selection method to update the path. Amir Seyyedabbasi [
30] proposed two grey wolf algorithms for position updating based on alpha wolves and all wolves, respectively, and analyzed the advantages and disadvantages of the two algorithms and their usage scenarios. Kazem Meidani [
31] proposed a grey wolf algorithm with an adaptive convergence factor and convergence times, which calculates the next convergence factor and determines whether to end the program using historical optimization data. Dong Lin [
32] proposed a multi-strategy integrated improved grey wolf algorithm, which improved the GWO in many aspects and formulated new leader election rules. Farzad Kiani [
33] proposed two different strategies to improve the grey wolf algorithm and applied them to the 3D environmental path planning of agricultural robots. Huaiqin Liu [
34] combined BPNN and ALGWO to enhance the unpredictable behavior and exploration ability of the grey wolf algorithm and applied it to the PID control model.
Although the performance of the GWO has been significantly improved by the efforts of many scholars, there are still problems such as a single initial population, slow convergence speed in the later stage and the ease with which it falls into the local optimum, and when it is used in the path planning of obstacle-crossing robots, because the path selection of the robot is more diversified, the shortcomings are more prominent. Aiming at this problem, this paper proposes an improved GWO based on the golden sine strategy. Firstly, a piecewise chaotic map is introduced to generate the distribution and initial population. Secondly, the nonlinear convergence factor and dynamic weight index are used to balance the global search and local search ability of the algorithm, so as to avoid falling into the local optimum and find the optimal solution as accurately as possible. Finally, the golden sine strategy is introduced to perform secondary convergence of the population, optimize the optimization method and enhance the search ability of the algorithm. At the same time, the feasibility of the application of the algorithm in the path planning of the obstacle-crossing robot is discussed. The grey obstacle-surmountable area is added to the traditional path-planning map and given a certain traffic cost. By quantifying the cost of the robot’s obstacle-crossing, the robot makes a better choice between obstacle crossing and obstacle avoidance and further optimizes the path while adapting to the obstacle-crossing function.
2. Grey Wolf Optimizer
The GWO is an algorithm that imitates the hunting mechanism of wolves to achieve the purpose of optimization. The algorithm divides the wolves into the head wolf
who guides the wolves to hunt, wolf
, assisting the head wolf in hunting,
, responsible for reconnaissance and sentry, and the other wolf
. The hunting behavior of wolves is mainly divided into three stages: encirclement, pursuit and attack. In the encirclement phase, the algorithm updates the position using the following equation:
where
and
are the position vectors of grey wolf and prey, respectively.
and
are coefficient vectors. The definition of
is the convergence factor.
and
are random numbers between [0, 1].
and
are the current number of iterations and the maximum number of iterations, respectively.
In the pursuit and attack phase, the algorithm updates the location through the following equation:
where
,
and
represent the location update influence factors of the
,
and
wolves, respectively.
3. Golden Sine Grey Wolf Optimizer
In this section, aiming at the shortcomings of the grey wolf algorithm, it is improved in four aspects, and the operation logic of the algorithm is introduced at the end of the section.
3.1. Piecewise Linear Chaotic Map
The GWO uses a random method to generate the initial population, which makes it difficult to guarantee the ergodicity and diversity of the initial population. Aiming at the problem of the single initial population of the algorithm, a piecewise linear chaotic map is introduced to generate the initial population. The piecewise linear chaotic map (PWLCM) can generate chaotic sequences with good randomness and ergodicity for the initial population by using a simple mathematical model. The piecewise linear chaotic sequence is defined as follows:
where
is the
nth item in the sequence,
is the number of individuals in the population and
is a constant between [0, 0.5].
According to Equation (7), it is possible to generate a sequence of uniform distribution between [0, 1] of any length based on the randomly generated
. The effect is shown in
Figure 1.
After generating a sequence, the number in the sequence is converted into the value in the search area of the algorithm by Equation (8):
where
is the characteristic of the individual with sequence number
in the initial population and
and
are the upper and lower bounds of the search region, respectively.
3.2. Nonlinear Convergence Factor
The convergence factor of the GWO is an important parameter of the convergence speed of the control algorithm. When the convergence factor is large, the algorithm tends to global search, and the convergence speed is faster, but it falls into the local optimum more easily. When the convergence factor is small, the algorithm tends to local search, and the convergence speed is slow, but there is a greater probability of jumping out of the local optimum. The convergence factor of the GWO shown in Equation (4) is linearly decreasing between 2 and 0. In order to more effectively balance the global search ability and local search ability of the algorithm, it is improved. The improved convergence factor is shown in Equation (9):
where
and
are the upper and lower limits of the convergence factor, respectively.
and
are the constants of the control search interval and the curvature of the function, respectively. The larger
is, the less the global search time is. The larger
is, the higher the curvature of the function is. After testing, the appropriate parameters
and
are obtained.
The improved convergence factor change diagram is shown in
Figure 2. Compared with the linear convergence factor, the improved nonlinear convergence factor has improved the global search ability in the early stage and the local search ability in the later stage. At the same time, the global search time is increased, the local search time is reduced to balance the two search capabilities of the algorithm and the efficiency of the algorithm is improved as much as possible under the same number of iterations.
3.3. Dynamic Weight Coefficient
The weight coefficient of the GWO shown in Equation (6) is 1:1:1, which means that the three wolves of , and are equally important for the position guidance of wolves. However, in the practical application of the algorithm, the weight coefficient is not necessarily the ideal position update direction and may be far from the ideal direction.
In order to solve the above problems, a dynamic weight coefficient based on fitness function is proposed. The individuals with higher fitness in the three-headed wolves can obtain higher weights so that the population is more inclined to move in the direction of high fitness and improve the speed of the algorithm. The specific rules are as shown in Equations (10) and (11):
where
,
and
represent the weight coefficients of the
,
and
wolves, respectively.
is the path cost of the corresponding wolf. The higher the path cost is, the lower the fitness is.
is the theoretical minimum cost under unconstrained conditions, where is the Euclidean distance from the starting point to the end point of the path.
3.4. Golden Sine Strategy
The golden sine algorithm [
35] is a mathematical model-based meta-heuristic algorithm proposed by Tanyildizi in 2017. It traverses all points on the circle through the sine function and reduces the search space through the golden section coefficient, so that the algorithm can have higher search efficiency without falling into the local optimum.
The position update equation of the golden sine algorithm is as follows:
where
is the convergence direction of the golden sine algorithm.
and
are random numbers between [0, 2π] and [0, π], respectively.
and
are the golden section coefficients.
is the golden section number, take
. The values of
and
are set to −π and π and then change with the target value.
The update rule after introducing the golden sine search strategy into the grey wolf algorithm is as follows: when , the iteration enters the local search stage; after obtaining , it will converge twice. The golden sine convergence position is calculated by Equation (12), and then the cost between and is compared, and the better one is taken. Because of the ergodicity of the golden sine algorithm and the high efficiency of the search range, the grey wolf algorithm is quadratically convergent after the position update is completed. It can also jump out of the local optimum while ensuring the convergence speed in the later stage.
3.5. Logic and Process of Algorithm
The pseudo-code of the Algorithm 1 is as follows:
Algorithm 1: Golden Sine Grey Wolf Optimizer (GSGWO) |
Input: , , , , , |
Output: |
1: Initialize , and wolf; |
2: Initialize |
3: for = 1 to |
4: Calculate with Equation (9); |
5: for = 1 to |
6: Update the location with Equations (10) and (11); |
7: if |
8: Perform secondary convergence with Equations (12) and (13); |
9: end |
10: end |
11: Update α, β and δ wolf; |
10: end |
11: Return α; |
4. Application of the GSGWO in Path Planning of Obstacle-Crossing Robot
This section adjusts the three aspects of working environment modeling, path generation and fitness function so that the algorithm can be applied to the path-planning problem of an obstacle-surmounting robot.
4.1. Working Environment Model
The working environment models of path planning include grid maps, vector maps, point cloud maps and so on. As the most widely used environmental model, a grid map has the advantages of simplicity and intuition, so a grid map is used as the environmental model of the obstacle-crossing robot.
The core idea of the general path-planning algorithm is obstacle avoidance, so the map is simply divided into accessible areas represented by white and non-accessible areas represented by black when establishing the environmental model. This division method is not applicable in the path planning of the obstacle-crossing robot. In this paper, an environmental model is proposed to add a grey obstacle-surmountable area between the two-color areas and give it a certain passage cost. The model can quantify the obstacle-crossing action cost of the obstacle-crossing robot so that the robot can make better choices in obstacle crossing and avoiding and achieve good cooperation with the obstacle-crossing function of the robot.
Taking the real map shown in
Figure 3a as an example, the environment models without an obstacle-surmountable area and with an obstacle-surmountable area are shown in
Figure 3b,c, respectively.
The map adopts a discrete node processing method. Each grid represents a node. The corresponding relationship between the node number and the coordinates is as follows:
where
is the number of rows or columns of the map.
4.2. Path Generation
The generation and optimization steps of the path are as follows: (1) At the beginning of the generated path, a random node is first generated by a chaotic sequence in each row between the starting point and the end point of the map, and all nodes are placed in the path in order as a grey wolf individual. (2) After generating the individual, the connection between the individuals may pass through the black impassable area, so the intermediate value is inserted in the middle of each two nodes through a specific interpolation program so that the path is continuous and does not pass through the obstacle. (3) Although the interpolated path can guide the robot to move from the starting point to the end point without obstacles, the path often has redundant inflection points and too large corners, so it is necessary to perform node optimization operations. The basic logic of the node optimization operation is when the connection between two points does not pass through any impassable area, and the path cost of the connection between two points is less than the original path cost, the original path is cleared and replaced by the connection between two points, as shown in
Figure 4:
The path before optimization is {1, 12, 22, 32, 42, 53, 64, 75, 86, 87, 88, 89, 100}, and the optimized path is {1, 53, 86, 100}. The detailed data are shown in
Table 1. It can be seen that the optimized path length is shorter, the inflection point is less and the corner is smaller.
4.3. Fitness Function
The fitness function is a function that measures the pros and cons of candidate solutions in solving problems. A better fitness function can play an important role in guiding the convergence process of the algorithm. The general path-planning algorithm uses the path length equation as the fitness function, and some algorithms also introduce the influencing factors of the inflection point. In the path planning of an obstacle-crossing robot, the cost of obstacle-crossing action must be introduced as one of the evaluation criteria. Therefore, the fitness function used in this paper is as follows:
where
is the total cost of the path, and the greater the cost, the lower the fitness.
is the total path length.
and
are the turning cost and obstacle-crossing cost of the path, respectively.
and
are the weight coefficients of turning and obstacle crossing, respectively.
The evaluation of turning cost adopts the method of hierarchical processing. The larger the turning angle is, the larger the cost coefficient is. The specific rules are shown in Equation (16). The obstacle-crossing cost is classified: if the path passes through the center point of the obstacle area, it is regarded as a bilateral obstacle crossing, and the obstacle-crossing cost is 1. If the connection of the path passes through the obstacle area and does not pass through the center point of the area, it is regarded as a unilateral obstacle crossing, and the obstacle-crossing cost is 0.5.
where
is the corner size, and the unit is the radian system.
6. Conclusions and Future Work
In order to solve the problems of a single initial population, slow convergence speed in the later stage and the ease with which it falls into the local optimum when the GWO is used in the path planning of an obstacle-surmounting robot, an improved GWO with the golden sine strategy is proposed. The piecewise chaotic sequence, nonlinear convergence factor and golden sine strategy are introduced to improve the performance of the GWO, and the path-planning problem of the obstacle-crossing robot is adapted by improving the working environment, path generation mode and fitness function. According to the results of the simulation experiment, the comparison diagram shown in
Figure 9 can be calculated. It can be seen that compared with the GWO, the path length planned by the GSGWO in 20 × 20, 30 × 30 and 40 × 40 maps is optimized by 3.45%, 11.2% and 15.6%, respectively, the number of inflection points is optimized by 28.57%, 22.22% and 57.14%, respectively, and the path cost is optimized by 32.5%, 40.32% and 54.69%, respectively. Although the randomness of the map environment has a certain influence on judging the change rule of the data, the overall optimization rate increases with the increase in the complexity of the map. At the same time, the rotation angle of the path planned by the GSGWO and the stability of the algorithm are also optimized to a certain extent. The feasibility of the path-planning field of the GSGWO obstacle-crossing robot is proved.
According to the content described above, some characteristics of the algorithm can be summarized: (1) The GSGWO is improved on the basis of the GWO and can be used to solve single-objective optimization problems. (2) Because the GSGWO adopts the golden sine strategy for secondary convergence, it has a larger amount of calculation and higher requirements for equipment than the GWO when the parameters are the same. (3) The appropriate interval of the weight coefficients and in Equation (15) will change due to the different performance of the map and the obstacle-surmounting robot, so the GSGWO is suitable for robots that often perform tasks within a fixed range.
For the subsequent improvement and application expansion of the GSGWO, the following ideas are proposed: (1) Adaptive adjustment of and . The preliminary idea is to extract map features such as map size, number of obstacles, average obstacle size and starting and ending positions. The mathematical relationship between these features and and is analyzed through experiments. Finally, the values of and are calculated by establishing a mathematical equation between the features and and . If the adaptive adjustment of and can be achieved, the GSGWO will be able to process new maps through a small map processing program, and robots equipped with the GSGWO will be able to perform tasks in areas that have never been explored. (2) Enrich the types of obstacle-surmountable passage areas. In the actual scene, there are many kinds of obstacle-crossing robots that can cross obstacles, and the ways and costs of obstacle-crossing are not the same. By classifying the obstacle-crossing areas into roadblocks, slopes, gullies, grasses, etc., it can make the GSGWO more intelligent in path selection and reduce the probability of accidents.