A Path Planning Method for Inspection Robots Based on Improved Grey Wolf Algorithm

By improving the initial population and convergence factor function of the Gray Wolf algorithm and adding the turning penalty term in the path planning, the Gray Wolf algorithm is easily trapped in the local optimality and slow convergence speed in the path planning of the inspection robot, achieving better path planning and shorter path planning time.

CN115113628BActive Publication Date: 2025-06-13ZHONGTAI HUITONG (TIANJIN) TECHNOLOGY DEVELOPMENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210956948.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-10
Publication Date
2025-06-13
Estimated Expiration
2042-08-10

AI Technical Summary

Technical Problem

In the path planning of inspection robots, the gray wolf algorithm is prone to fall into local optimality, slow late convergence, poor selection accuracy and poor stability.

Method used

By improving the gray wolf algorithm, including applying cross-mutation ideas and roulette ideas in the initialized population, a nonlinear convergence factor function that can adjust the turning point is proposed, and the number of turns and turning angles of the path are added to the fitness function.

Benefits of technology

The improved Gray Wolf algorithm outputs better paths in different map environments, with shorter path planning time, improving solution accuracy, stability and convergence.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115113628B_ABST
    Figure CN115113628B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of inspection robot path planning, and particularly relates to a path planning method for inspection robots based on an improved gray wolf algorithm. Step 1: Use the ideas of crossover mutation and roulette wheel to form an initial population; Step 2: Add the number of turns and the turning angle as penalty values to the fitness function, calculate the fitness of the gray wolf individuals, and save the three best wolves in terms of fitness; Step 3: Update the positions of the gray wolves and the values of the coefficient vectors according to the formula, improve the decreasing curve of the convergence factor by using the arctangent function and the logarithmic function, and update the convergence factor. Step 4: Calculate the fitness of the gray wolf individuals, and update the fitness and positions of the three best wolves; Step 5: Determine whether the maximum number of iterations has been reached. After reaching it, output the position of the leading wolf α as the optimal solution. The present invention improves the gray wolf algorithm in three aspects: population initialization, convergence factor function, and fitness function, and can output the optimal inspection path.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of inspection robot path planning, and in particular relates to an inspection robot path planning method based on an improved grey wolf algorithm. Background Art

[0002] The path planning of the inspection robot is to enable the inspection robot to automatically find a collision-free trajectory from the starting point to the target point based on the surrounding environment information. The path planning algorithm of the inspection robot is the core of the inspection robot's path planning. The path planning of the inspection robot means that after perceiving the surrounding environment, it can automatically plan an optimal moving path from the starting point to the end point. This optimal moving path can meet the requirements of the shortest moving path, shortest time consumption, and least energy consumption.

[0003] According to current research results, the Gray Wolf Algorithm is a new intelligent optimization algorithm that simulates the hunting behavior of gray wolves and can also be applied to the field of path planning. However, the Gray Wolf Algorithm has the following shortcomings: (1) When determining the position of the population, the individual positions of the gray wolves are randomly determined, which makes the algorithm blind and random. (2) The position update of the Gray Wolf Algorithm is based on the encirclement formed by the first three leader wolves and the target object for hunting, and the average distance of each wolf from the target position is used to update the position, but the target of this method is not necessarily exactly at the average point of its distance. (3) When the Gray Wolf Algorithm falls into a local optimal solution, there is no measure to help it jump out of the local optimal solution. Therefore, the Gray Wolf Algorithm still has defects in path planning applications, such as easy to fall into local optimality, slow convergence in the later stage, poor selection accuracy and poor stability. When performing path planning for inspection robots, it often fails to achieve ideal path planning results. Summary of the invention

[0004] The main purpose of the present invention is to solve the problems existing in the prior art and to provide a patrol robot path planning method based on an improved gray wolf algorithm. The method improves the gray wolf algorithm through three aspects: population initialization, convergence factor function, and fitness function, and applies the improved gray wolf algorithm to the path planning of the patrol robot to output the optimal patrol path.

[0005] The technical problem solved by the present invention is achieved by adopting the following technical solution: a path planning method for an inspection robot based on an improved grey wolf algorithm,

[0006] Step 1: Improve the gray wolf algorithm for path planning. The initial population N1 is a randomly generated path node in the grid map. Each path is connected by the same number of nodes to form a gray wolf individual. The initial population N1 is crossed to obtain the population N2. Then, the roulette idea is used to calculate the population N with the best fitness among the populations N1 and N2 as the initial population N for iterative update. The convergence factor is set. Coefficient vector Value;

[0007] Step 2: The fitness function of the improved grey wolf algorithm applied to path planning is the sum of the distances of each node on the path calculated by the Euclidean distance, and the number of turns and turning angles of the obtained path are added to the fitness function as penalty values. Calculate the fitness of the grey wolf individuals according to the fitness function formula. The better the fitness of the grey wolf individuals, the stronger the superiority of the path. Save the three best wolves with the best fitness as the α wolf, β wolf, and δ wolf, and the rest of the wolf pack as ω wolves;

[0008] Step 3: Calculate and update the position of the grey wolf according to the mathematical model of the grey wolf surrounding the prey, and calculate and update the coefficient vector according to the coefficient vector formula Value, use the arctangent function and logarithmic function to improve the decreasing curve of the convergence factor And apply the ratio of the number of obstacles to the map area to the improvement of the convergence factor Curve improvement, and the improved convergence factor Curve forms a convergence factor function model, and calculate and update the convergence factor according to the convergence factor function model

[0009] Step 4: Calculate the fitness of the grey wolf individuals according to the fitness function formula, update the fitness of the three leading wolves, and update and calculate the positions of the three leading wolves according to the mathematical model of the grey wolf attacking the prey;

[0010] Step 5: Determine whether the maximum number of iterations has been reached. After reaching the maximum number of iterations, output the position of the leading wolf α wolf calculated according to the update process formula as the optimal solution to obtain the optimal inspection path of the inspection robot. Otherwise, return to Step 3 to continue the loop calculation.

[0011] Furthermore, the mathematical model of the grey wolf surrounding the prey is

[0012]

[0013]

[0014] where t is the current iteration number, Represents the length vector between the grey wolf and the prey, Represents the position vector of the current prey, Represents the position vector of the current grey wolf, Represents the position vector of the updated grey wolf individual, And Are coefficient vectors.

[0015] Furthermore, the coefficient vector formula is

[0016]

[0017]

[0018] Among them, and are coefficient vectors, and are random numbers between [0, 1], is the convergence factor.

[0019] Furthermore, the convergence factor function model is

[0020]

[0021]

[0022] where k is the adjustment parameter, p is the base of the logarithmic function, T is the maximum number of iterations, and t is the current number of iterations.

[0023] Furthermore, the fitness function formula is

[0024] L = L(i) + fix(M)

[0025]

[0026]

[0027]

[0028] θ i = |θ 2 - θ 1 |

[0029] where L(i) is the sum of the nodes of the path, fix() is the floor function, (x, y) is the current node coordinate in the grid map, (x 1 , y 1 ) is the previous node coordinate, (x 2 , y 2 ) is the next node coordinate, θ 1 , θ 2 are the tangent angles generated by the current node and the previous node, and the current node and the next node, and θ i is the angle difference between the two tangent angles, that is, the angle generated by the current turn.

[0030] Furthermore, the number of turns and the turning angle are normalized using the arc radius M, and the penalty value fix(M) of the number of turns and the turning angle can be obtained by calculating the arc radius M. The normalization formula is

[0031]

[0032]

[0033]

[0034] Among them, θ i is the angle generated by the current turn, θ is the total turning angle, A is the angle determination value, and V is the number of turns.

[0035] Furthermore, the mathematical model for the gray wolf to attack prey is

[0036]

[0037] Among them, and respectively represent the distance vectors between the lead wolves α, β, and δ and the gray wolf individual ω, and respectively represent the current position vectors of the lead wolves α, β, and δ, and respectively represent the coefficient vectors of the gray wolf ω with respect to the lead wolves α, β, and δ, represents the position vector of the gray wolf ω.

[0038] Furthermore, the formula for the update process

[0039]

[0040]

[0041] Among them, respectively represent the updated position vectors between the gray wolf individual ω and the lead wolves α, β, and δ, A 1 , A 2 , A 3 respectively represent the coefficient vectors of the gray wolf individual ω with respect to the lead wolves α, β, and δ, and respectively represent the distance vectors between the lead wolves α, β, and δ and the gray wolf individual ω, and respectively represent the current position vectors of the lead wolves α, β, and δ, represents the vector sum of, that is, the final updated position of the gray wolf individual ω.

[0042] The beneficial effects of the present invention are:

[0043] The present invention uses the Grey Wolf Optimization (GWO) algorithm to increase the number of the initialized population by means of the ideas of crossover mutation and roulette wheel, and proposes a non-linear convergence factor function with adjustable turning points, which can not only expand the search range in the early stage, but also accelerate the convergence speed in the later stage. At the same time, the number of turning times and turning angles of the calculated path are added to the fitness function of path planning to improve the path selection accuracy. Finally, the improved Grey Wolf Optimization (TPGWO) algorithm is applied to the path planning of the inspection robot. The output path of the improved Grey Wolf Optimization (TPGWO) algorithm is better and the path planning time is shorter in different map environments, improving the solution accuracy, stability and convergence of the output path. Brief Description of the Drawings

[0044] Figure 1 It is a flowchart of a path planning method for an inspection robot based on an improved Grey Wolf Optimization algorithm of the present invention.

[0045] Figure 2 It is a flowchart of the improvement process of the improved Grey Wolf Optimization algorithm of the present invention.

[0046] Figure 3 It is a schematic diagram of the improvement of population initialization of the present invention.

[0047] Figure 4 It is a schematic diagram of the change curve of the convergence factor when the logarithmic function of the present invention has a base of 1 / 2.

[0048] Figure 5 It is a schematic diagram of the change curve of the convergence factor when the logarithmic function of the present invention has a base of 1 / 3.

[0049] Figure 6 It is a schematic diagram of the change curve of the convergence factor when the logarithmic function of the present invention has a base of 2 / 3.

[0050] Figure 7 It is a schematic diagram of the change curves of different convergence factor functions of the present invention.

[0051] Figure 8 It is a schematic diagram of the normalization of the number of turning times and turning angles of the present invention.

[0052] Figures 9(a)-9(c) It is a path planning result diagram of PSO, GWO, and TPGWO of the present invention in a 10*10 grid map.

[0053] Figures 10(a)-10(c) It is a convergence curve diagram of path planning of PSO, GWO, and TPGWO of the present invention in a 10*10 grid map.

[0054] Figures 11(a)-11(c) It is a path planning result diagram of PSO, GWO, and TPGWO of the present invention in a 15*15 grid map.

[0055] Figures 12(a)-12(c) Convergence curve graphs of PSO, GWO, and TPGWO for path planning under a 15*15 grid map of the present invention.

[0056] Figures 13(a)-13(c) Result graphs of path planning of PSO, GWO, and TPGWO of the present invention under a 20*20 grid map.

[0057] Figures 14(a)-14(c) Convergence curve graphs of PSO, GWO, and TPGWO for path planning under a 20*20 grid map of the present invention.

[0058] Figures 15(a)-15(b) Convergence factor of the present invention Result graph of path planning under a map with fewer and simpler obstacles.

[0059] Figures 16(a)-16(b) Convergence factor of the present invention Convergence curve graph of path planning under a map with fewer and simpler obstacles.

[0060] Figures 17(a)-17(b) Convergence factor of the present invention Result graph of path planning under a map with more and more complex obstacles.

[0061] Figures 18(a)-18(b) Convergence factor of the present invention Convergence curve graph of path planning under a map with more and more complex obstacles. Detailed implementation manners

[0062] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art without creative efforts based on the embodiments of the present invention fall within the protection scope of the present invention.

[0063] In the description of the present invention, it should be noted that the orientation or positional relationship indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. is based on the orientation or positional relationship shown in the accompanying drawings. It is only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus cannot be understood as a limitation to the present invention. In addition, the terms "first", "second", "third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0064] In the description of the present invention, it should be noted that unless otherwise clearly specified and defined, the terms "installation", "connection", and "coupling" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, and it can be the communication inside two components. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific situations.

[0065] As Figures 1-8 shown, a path planning method for an inspection robot based on an improved gray wolf algorithm provided by the present invention

[0066] Step 1: The initial population N1 applied in the path planning by the improved gray wolf algorithm is the path nodes randomly generated in the grid map. Each path is composed of the same number of nodes connected to form a gray wolf individual. The initial population N1 is crossed to obtain the population N2, and then the roulette wheel idea is used to calculate the population N with the best fitness in the populations N1 and N2 as the initial population N for iterative update, and the convergence factor coefficient vector value is set;

[0067] Step 2: The fitness function applied in the path planning by the improved gray wolf algorithm is the sum of the distances of each node of the path calculated by the Euclidean distance, and the number of turns and the turning angles of the obtained path are used as penalty values and added to the fitness function. According to the fitness function formula, the fitness of the gray wolf individual is calculated. The better the fitness of the gray wolf individual, the stronger the superiority of the path. The three wolves with the best fitness are saved as the α wolf, the β wolf, and the δ wolf, and the remaining wolf packs are the ω wolves;

[0068] Step 3: Update the position of the gray wolf according to the mathematical model of the gray wolf surrounding the prey, and update the coefficient vector value according to the coefficient vector formula. The decreasing curve of the convergence factor is improved by using the arctangent function and the logarithmic function, and the ratio of the number of obstacles to the map area is applied to the improvement of the convergence factor curve. After improvement, the convergence factor curve forms a convergence factor function model, and the updated convergence factor

[0069] is calculated according to the convergence factor function model;

[0070] Step 5: Determine whether the maximum number of iterations is reached. After reaching the maximum number of iterations, output the position of the alpha wolf calculated according to the update process formula as the optimal solution to obtain the optimal inspection path of the inspection robot; otherwise, return to Step 3 to continue the loop calculation.

[0071] Furthermore, the mathematical model for grey wolves surrounding prey is

[0072]

[0073]

[0074] where t is the current iteration number, represents the length vector between the grey wolf and the prey, represents the position vector of the current prey, represents the position vector of the current grey wolf, represents the position vector of the grey wolf individual after update, and are coefficient vectors.

[0075] Furthermore, the coefficient vector formula is

[0076]

[0077]

[0078] where and are coefficient vectors, and are random numbers between [0, 1], is the convergence factor.

[0079] Furthermore, the convergence factor function model is

[0080]

[0081]

[0082] where k is the adjustment parameter, p is the base of the logarithmic function, T is the maximum number of iterations, and t is the current iteration number.

[0083] Furthermore, the fitness function formula is

[0084] L = L(i) + fix(M)

[0085]

[0086]

[0087]

[0088] θ i = |θ 2 - θ 1 |

[0089] Among them, L(i) is the sum of each node of the path, fix() is the function of rounding down to the left. In the grid map, (x, y) is the coordinate of the current node, (x 1 , y 1 ) is the coordinate of the previous node, (x 2 , y 2 ) is the coordinate of the next node, θ 1 , θ 2 are the tangent angles generated by the current node and the previous node, and the current node and the next node, θ i is the angle difference between the two tangent angles, that is, the angle generated by the current turn.

[0090] Furthermore, the number of turns and the turning angle are normalized using the arc radius M. By calculating the arc radius M, the penalty value fix(M) of the number of turns and the turning angle can be obtained. The normalization formula is

[0091]

[0092]

[0093]

[0094] Among them, θ i is the angle generated by the current turn, θ is the total turning angle, A is the angle judgment value, and V is the number of turns.

[0095] Furthermore, the mathematical model of the gray wolf attacking the prey is

[0096]

[0097] Among them, and respectively represent the distance vectors between the lead wolves α, β, and δ and the gray wolf individual ω, and respectively represent the current position vectors of the lead wolves α, β, and δ, and respectively represent the coefficient vectors of the gray wolf ω and the lead wolves α, β, and δ, represents the position vector of the gray wolf ω.

[0098] Furthermore, the update process formula

[0099]

[0100]

[0101] Among them, respectively represent the updated position vectors between the gray wolf individual ω and the alpha wolf α, beta wolf β, and delta wolf δ. A 1 , A 2 , A 3 respectively represent the coefficient vectors between the gray wolf individual ω and the alpha wolf α, beta wolf β, and delta wolf δ. and respectively represent the distance vectors between the alpha wolf α, beta wolf β, and delta wolf δ and the gray wolf individual ω. and respectively represent the current position vectors of the alpha wolf α, beta wolf β, and delta wolf δ. represents the vector sum of, that is, the final updated position of the gray wolf individual ω.

[0102] Embodiment

[0103] As Figures 1-8 shown, the present invention takes the path planning of the inspection robot as the research object, takes the obtained optimal path as the objective function, and takes the environment as the constraint condition. Aiming at the defects of the gray wolf optimization algorithm (GWO) in the application of path planning, such as being prone to falling into local optimum, slow convergence in the later stage, poor selection accuracy, and poor stability, an improved gray wolf optimization algorithm (TPGWO) is proposed. It is improved from three aspects: population initialization, convergence factor function, and fitness function, and the improved gray wolf algorithm (TPGWO) is applied to the path planning of the inspection robot. The optimization performance of the TPGWO algorithm is verified through test functions and simulation experiments. The specific implementation process is as follows.

[0104] Step 1: The initialized population N1 of the improved gray wolf algorithm applied to path planning is the path nodes randomly generated in the grid map. Each path is composed of the same number of nodes connected to form a gray wolf individual. The initialized population N1 is crossed to obtain the population N2, and then the roulette wheel idea is used to calculate the population N with the best fitness in the populations N1 and N2 as the initialized population N for iterative update. Set the convergence factor coefficient vector value.

[0105] The initial population of the standard Grey Wolf Optimization (GWO) algorithm is randomly generated, which has the disadvantages of a small population size and being prone to falling into local optima. To improve the diversity of the initial population of the GWO algorithm, the population initialization of the GWO algorithm is improved using the ideas of population crossover and roulette wheel. In the application of the improved Grey Wolf Optimization (TPGWO) algorithm to the path planning of inspection robots, its initial population represents each path, and the better the fitness of a grey wolf individual, the better the superiority of the path. The initial population in the application of the GWO algorithm to path planning is the path nodes randomly generated in the grid map. Each path is composed of connected nodes to form a grey wolf individual. Therefore, under the same map, the number of path nodes for each path is the same. As Figure 3 shown, the TPGWO algorithm crosses the initially obtained population N1 to obtain population N2, and then uses the roulette wheel idea to calculate the population N with the best fitness in populations N1 and N2 as the initial population for iterative update, which can not only expand the search range of the initial population but also improve the quality of the initial population.

[0106] Step 2: The fitness function of the improved Grey Wolf Optimization (TPGWO) algorithm applied to path planning is the sum of the distances of each node on the path calculated by the Euclidean distance, and the number of turns and turning angles of the obtained path are used as penalty values and added to the fitness function. According to the fitness function formula, the fitness of the grey wolf individual is calculated. The better the fitness of the grey wolf individual, the stronger the superiority of the path. The three wolves with the best fitness are saved as the α wolf, β wolf, and δ wolf, and the remaining wolf packs are ω wolves.

[0107] In the application of the improved Grey Wolf Optimization (TPGWO) algorithm to path planning, its fitness function is the sum of the distances of each node on the path calculated by the Euclidean distance. At the same time, the number of turns and turning angles of the obtained path are used as penalty values and added to the fitness function to improve the accuracy of the selected path. In the constructed grid map, (x, y) is the current node coordinate, (x 1 , y 1 ) is the previous node coordinate, (x 2 , y 2 ) is the next node coordinate, V is the number of turns, θ is the turning angle, and r and c are the number of rows and columns of the map, respectively.

[0108] Furthermore, the fitness function formula is

[0109] L = L(i) + fix(M)

[0110]

[0111]

[0112]

[0113] θ i= |θ 2 -θ 1 |

[0114] where L(i) is the sum of the nodes of the path, fix() is the floor function, (x, y) is the current node coordinate in the grid map, (x 1 , y 1 ) is the coordinate of the previous node, (x 2 , y 2 ) is the coordinate of the next node, θ 1 , θ 2 are the tangent angles generated by the current node and the previous node, and the current node and the next node, θ i is the angle difference between the two tangent angles, that is, the angle generated by the current turn. In path planning, if the obtained path has an angle change, there will be an angle difference between the tangent angles between the nodes. Therefore, in the calculation of the fitness function, when tanθ 1 ≠tanθ 2 , it means that the path makes a turn, then V = V + 1. In path planning, every time a turn occurs, a turning angle is generated. In order to facilitate adding the number of turns and the turning angle to the fitness function, the number of turns and the turning angle are normalized.

[0115] The normalization method is as Figure 8 shown. In the figure, V is the number of turns (V = 1, 2,...), θ is the total turning angle, and the turning angle generated each time is 0 - 360°. When the number of turns is 1, it is 0 - 4; when the number of turns is 2, it is 0 - 8; when the number of turns is 3, it is 0 - 12. When the number of turns is n, it is 0 - 3n. The number of turns and the turning angle are normalized using the radius M of the arc, Figure 8 and the meaning expressed is as follows: when 0 ≤ M < 1, let f = 0; when 1 ≤ M < 2, let f = 1; when 2 ≤ M < 3, let f = 2; when 3 ≤ M < 4, let f = 3;...; when n - 1 ≤ M < n, let f = n - 1, where M is the corresponding radius of the arc and f is the floor function. Therefore, the penalty values of the number of turns and the turning angle can be determined by calculating the radius M of the arc, and the radius of the arc can be determined by Figure 8 the horizontal and vertical coordinates in.

[0116] Furthermore, the number of turns and the turning angle are normalized using the radius M of the arc. By calculating the radius M of the arc, the penalty values of the number of turns and the turning angle fix(M) can be obtained. The normalization formula is

[0117]

[0118]

[0119]

[0120] Among them, θ i is the angle generated by the current turn, θ is the total turning angle, A is the angle determination value, and V is the number of turns. The angle determination value A is Figure 8 the ordinate of Figure 8 and the number of turns V is Figure 8 the abscissa of

[0121] Step 3: Calculate and update the positions of the grey wolves according to the mathematical model of grey wolves surrounding prey, and calculate and update the coefficient vectors according to the coefficient vector formula value, use the arctangent function and the logarithmic function to improve the decreasing curve of the convergence factor and apply the ratio of the number of obstacles to the map area to the improvement of the convergence factor curve. After improvement, the convergence factor curve forms a convergence factor function model, and calculate and update the convergence factor according to the convergence factor function model

[0122] The basic idea of improving the grey wolf algorithm is to initialize the wolf pack, select the three wolves with the best fitness as the lead wolves, which are defined as α, β, and δ respectively. The remaining wolf pack ω updates its position according to the distance from the prey under the leadership of the lead wolves and then hunts the prey. The position of the prey represents the optimal solution. The grey wolf algorithm mainly establishes a mathematical model by searching for the prey, surrounding the prey, and attacking the prey.

[0123] Furthermore, the mathematical model of grey wolves surrounding prey is

[0124]

[0125]

[0126] The above two formulas respectively represent the distance between the grey wolf and the prey and the position update of the grey wolf individual. Among them, t is the current iteration number, represents the length vector between the grey wolf and the prey, represents the position vector of the current prey, represents the position vector of the current grey wolf, represents the position vector of the updated grey wolf individual, and are coefficient vectors.

[0127] Furthermore, the coefficient vector formula is

[0128]

[0129]

[0130] Among them, and are coefficient vectors, and are random numbers between [0, 1], is the convergence factor. As the number of iterations linearly decreases from 2 to 0, also decreases accordingly, and its range changes within the interval [-a, a]. When is within the interval, the next position of the gray wolf can be at any position between its current position and the prey position. When , the wolf pack attacks the prey, which represents the exploitation ability of the gray wolf algorithm, but it is easy to fall into local optima; when , the gray wolf does not attack the prey and forces the gray wolf to separate from the prey to find a more suitable prey, which emphasizes the exploration ability of the gray wolf algorithm and can search for the global optimal solution. From the coefficient vector formula, it can be obtained that is a random value between [0, 2], different from , is a non-linear change, representing the random weight of the position of the gray wolf on the prey, indicates a large influence weight, and vice versa, indicating a small influence weight. The randomness of

[0131] helps the GWO algorithm avoid falling into local optima during the optimization process. The convergence factor of the standard gray wolf algorithm (GWO) is a linearly decreasing function from 2 to 0, and its update mechanism is that the convergence factor searches within the range [2, 1] and converges within the range [1, 0]. Therefore, there are defects such as being easy to fall into local optima and slow convergence speed. Therefore, the arctangent function and the logarithmic function are used to improve the decreasing curve of the convergence factor , so that the search range in the early stage of the convergence factor is wider and the convergence speed in the later stage is faster. On this basis, the ratio of the number of obstacles to the map area is applied to it, and the parameter values in the function model can be appropriately adjusted to change the turning point of the convergence factor to achieve the optimal selection. The convergence factor function model of the improved gray wolf algorithm is as follows.

[0132] Furthermore, the convergence factor function model is

[0133]

[0134]

[0135] Among them, k is the adjustment parameter, p is the base of the logarithmic function, T is the maximum number of iterations, and t is the current number of iterations.

[0136] (1) Taking T = 600 as an example, when the logarithmic function has a base of 1 / 2,

[0137]

[0138]

[0139] The above formula is the improved convergence factor function when the logarithmic function has a base of 1 / 2. Figure 4 For its variation curve, when the logarithmic function has a base of 1 / 2, the denominator of the adjustment parameter k in the above formula corresponds to 300.

[0140] (2) Taking T = 600 as an example, when the logarithmic function has a base of 1 / 3,

[0141]

[0142]

[0143] The above formula is the improved convergence factor function when the logarithmic function has a base of 1 / 3. Figure 5 For its variation curve, when the logarithmic function has a base of 1 / 3, the denominator of the adjustment parameter k in the above formula corresponds to 200.

[0144] (3) Taking T = 600 as an example, when the logarithmic function has a base of 2 / 3,

[0145]

[0146]

[0147] The above formula is the improved convergence factor function when the logarithmic function has a base of 2 / 3. Figure 6 For its variation curve, when the logarithmic function has a base of 2 / 3, the denominator of the adjustment parameter k in the above formula corresponds to 400.

[0148] In path planning research, it is difficult to find the optimal path in an environmental map with a large number of complex obstacles. In contrast, it is relatively easy to find the optimal path in an environmental map with a small number of simple obstacles. Therefore, in an environmental map with a large number of complex obstacles, the search range and search time of the optimization algorithm can be appropriately increased to find the optimal path. On the contrary, in an environmental map with a small number of simple obstacles, the search range and search time of the optimization algorithm can be appropriately reduced to find the optimal path. Therefore, according to the above rules, the ratio of the number of obstacles to the map area can be applied to the function model. When the number of obstacles is large and complex, the turning point can be delayed, the number of iterations of the search time can be increased, and the number of iterations at convergence can be reduced. When the number of obstacles is small and simple, the turning point can be advanced, the number of iterations during the search can be reduced, and the number of iterations at convergence can be increased.

[0149] The base p of the logarithmic function, as a variable value, can only be used as a fine-tuning parameter in the application of the ratio of the number of obstacles to the map area. As shown in the following formula, taking the maximum number of iterations of 600 as an example, when the number of obstacles is relatively small, let p = 280 / 600 to reduce the search time of the algorithm and improve the convergence speed. When the number of obstacles is relatively large and complex, let p = 320 / 600 to increase the search time of the algorithm, avoid falling into local optima, and improve the accuracy of the selected path. is the convergence factor function when the base of the logarithmic function remains unchanged; is the convergence factor function when the base of the logarithmic function is decreased; is the convergence factor function when the base of the logarithmic function is increased; is the convergence factor function of the standard grey wolf algorithm. Figure 7 is the convergence factor function and are the comparative curves of the changes.

[0150]

[0151]

[0152]

[0153]

[0154]

[0155]

[0156]

[0157] Step 4: Calculate the fitness of the grey wolf individuals according to the fitness function formula, update the fitness of the three leading wolves, and update and calculate the positions of the three leading wolves according to the mathematical model of the grey wolves attacking the prey.

[0158] During the predation process, the gray wolf gradually approaches and surrounds the prey, and finally launches an attack on the prey. With continuous iteration, all initial solutions continuously approach the optimal solution, and finally the optimal solution is obtained. That is, the optimal solution is the alpha wolf, and the second and third solutions are the beta wolf and the delta wolf respectively.

[0159] Furthermore, the mathematical model of the gray wolf attacking the prey is

[0160]

[0161] Where and represent the distance vectors between the alpha wolf, beta wolf, and delta wolf and the gray wolf individual ω respectively. and represent the current position vectors of the alpha wolf, beta wolf, and delta wolf respectively. and represent the coefficient vectors of the gray wolf ω with respect to the alpha wolf, beta wolf, and delta wolf respectively. represents the position vector of the gray wolf ω.

[0162] Step 5: Determine whether the maximum number of iterations has been reached. After reaching the maximum number of iterations, output the position of the alpha wolf calculated according to the update process formula as the optimal solution to obtain the optimal inspection path of the inspection robot. Otherwise, return to Step 3 to continue the loop calculation.

[0163] Furthermore, the update process formula

[0164]

[0165]

[0166] The above two formulas respectively represent the position update of the gray wolf individual ω and the final moving position of the gray wolf individual ω. Where represent the updated position vectors between the gray wolf individual ω and the alpha wolf, beta wolf, and delta wolf respectively. A 1 , A 2 , A 3 represent the coefficient vectors of the gray wolf individual ω with respect to the alpha wolf, beta wolf, and delta wolf respectively. and represent the distance vectors between the alpha wolf, beta wolf, and delta wolf and the gray wolf individual ω respectively. and represent the current position vectors of the alpha wolf, beta wolf, and delta wolf respectively. represents the vector sum of, that is, the final updated position of the gray wolf individual ω.

[0167] The optimization process of the TPGWO algorithm starts with randomly initializing the population. During the iteration process, the positions are updated according to the distances between the three wolves with the best fitness, α, β, and δ, and the prey. The range of the random variable determines that the grey wolf is approaching the prey. It means that the grey wolf is forced to move away from the prey to find a more suitable one and find the best prey (optimal solution) in the last iteration.

[0168] To verify that the TPGWO algorithm has a better path and shorter path planning time than the PSO algorithm and the GWO algorithm in different map environments, the improved grey wolf algorithm (TPGWO), the standard grey wolf algorithm (GWO), and the particle swarm optimization algorithm (PSO) are respectively applied to path planning for simulation tests. Let the initial population size N = 30 and the maximum number of iterations t max = 600 for the three algorithms. The fitness function formula in step 2, and the environmental maps are grid maps with three area sizes of 10*10, 15*15, and 20*20. Different numbers of obstacles are randomly generated for each grid map. Finally, the path lengths and path planning times obtained by the three algorithms in the three different maps are analyzed. The simulation test results are as Figures 9(a) to 14(c) shown.

[0169] Table 1. Operating results of different algorithms in different map environments

[0170]

[0171] Figures 9(a) to 14(c) They are respectively the path diagrams and convergence curves of the three algorithms for path planning in the grid maps of 10*10, 15*15, and 20*20. It can be seen from the figure that with the same maximum number of iterations and initialized population, all three algorithms can find an accessible path from the starting point to the target point. Among them, the TPGWO algorithm has a higher convergence accuracy in the grid maps of the three different areas. And during the convergence process, both the PSO algorithm and the GWO algorithm are prone to falling into local optima, while the TPGWO algorithm can better jump out of local optima, search for the global optimum, and improve the accuracy. And from the operating results in Table 1, it can be seen that the path selected by the TPGWO algorithm is better and the time required for path planning is less. Therefore, with the same maximum number of iterations and initialized population, the TPGWO algorithm can find an accessible path from the starting point to the target point better and faster than the PSO algorithm and the GWO algorithm in the path planning of inspection robots.

[0172] To verify that the convergence factor function in the TPGWO algorithm can improve the convergence speed and accuracy by adjusting the parameter values, simulations are carried out in maps with different numbers of obstacles. Taking a 15*15 grid map as an example, a map with fewer and simpler obstacles and a map with more and more complex obstacles are randomly generated. The initial population size N of the algorithm is 30, and the maximum number of iterations t max = 600, and the convergence factor functions are respectively The simulation test results are as Figures 15(a) to 18(b) shown.

[0173] Table 2. Running results of different convergence factor functions in maps with the same area but different obstacles

[0174]

[0175] Figures 15(a) to 18(b) are the path diagrams and convergence curves of the TPGWO algorithm under three convergence factor functions. It can be analyzed from the figure that in the 15*15 grid map with fewer and simpler obstacles, using the convergence factor function with a slightly earlier turning point and using the convergence factor function with an unchanged turning point can obtain the same effective path, but the former has a faster convergence speed; in the 15*15 grid map with more and more complex obstacles, using the convergence factor function with a slightly later turning point has a higher accuracy than using the function to obtain the path. It can be seen from the data in Table 2 that the convergence factor function can effectively improve the planning time of the algorithm, and the convergence factor function can effectively improve the accuracy of the algorithm. Therefore, when the map area and the number of obstacles are certain, appropriately adjusting the turning point of the convergence factor curve according to the ratio of the number of obstacles to the map area can effectively improve the convergence speed and convergence accuracy of the TPGWO algorithm in the path planning application of inspection robots.

[0176] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A path planning method for inspection robots based on an improved grey wolf algorithm, characterized in that: Step 1. The initial population N1 of the improved grey wolf algorithm applied to path planning is randomly generated path nodes in the grid map. Each path is composed of the same number of nodes connected to form a grey wolf individual. The initial population N1 is crossed to obtain the population N2, and then the roulette wheel idea is used to calculate the population N with the best fitness in the populations N1 and N2 as the initial population N for iterative update, and the convergence factor is set. Coefficient vector Value; Step 2: The fitness function applied to path planning in the improved grey wolf algorithm is the sum of the distances of each node on the path calculated by the Euclidean distance, and the number of turns and turning angles of the obtained path are used as penalty values and added to the fitness function. Calculate the fitness of the grey wolf individuals according to the fitness function formula. The better the fitness of the grey wolf individuals, the stronger the superiority of the path. Save the three wolves with the best fitness as the α wolf, β wolf, and δ wolf, and the remaining wolf packs as ω wolves; Step 3: Calculate and update the position of the grey wolves according to the mathematical model of grey wolves surrounding prey, and calculate and update the coefficient vector according to the coefficient vector formula value. Use the arctangent function and the logarithmic function to improve the decreasing curve of the convergence factor , and apply the ratio of the number of obstacles to the map area to the improvement of the convergence factor curve. After improvement, the convergence factor curve forms a convergence factor function model, and calculate and update the convergence factor according to the convergence factor function model Step 4: Calculate the fitness of the grey wolf individuals according to the fitness function formula, and update the fitness of the three leading wolves. Update and calculate the positions of the three leading wolves according to the mathematical model of the grey wolf attacking the prey; Step 5: Determine whether the maximum number of iterations has been reached. After reaching the maximum number of iterations, output the position of the leading wolf α wolf calculated according to the update process formula as the optimal solution to obtain the optimal inspection path of the inspection robot. Otherwise, return to Step 3 and continue the loop calculation.

2. The path planning method for inspection robots based on the improved grey wolf algorithm according to claim 1, characterized in that: The mathematical model of the grey wolf surrounding the prey is where t is the current iteration number, represents the length vector between the grey wolf and the prey, represents the position vector of the current prey, represents the position vector of the current grey wolf, represents the position vector of the grey wolf individual after update, and is the coefficient vector.

3. The path planning method for inspection robots based on the improved grey wolf algorithm according to claim 1, characterized in that: The coefficient vector formula is Among them, and are coefficient vectors, and are random numbers between [0, 1], is the convergence factor.

4. The path planning method for inspection robots based on the improved grey wolf algorithm according to claim 1, characterized in that: The convergence factor function model is where k is an adjustment parameter, p is the base of the logarithmic function, T is the maximum number of iterations, and t is the current number of iterations.

5. The path planning method for inspection robots based on the improved grey wolf algorithm according to claim 1, characterized in that: The fitness function formula is L = L(i) + fix(M) θ i = |θ 2 - θ 1 | Among them, L(i) is the sum of the nodes of the path, fix() is the floor function. In the grid map, (x, y) is the coordinate of the current node, (x 1 , y 1 ) is the coordinate of the previous node, (x 2 , y 2 ) is the coordinate of the next node, θ 1 , θ 2 are the tangent angles generated by the current node and the previous node, and the current node and the next node, respectively. θ i is the angle difference between the two tangent angles, that is, the angle generated by the current turn.

6. The path planning method for inspection robots based on the improved grey wolf algorithm according to claim 5, characterized in that: Normalize the number of turns and turning angles using the arc radius M. Calculate the arc radius M to obtain the penalty value fix(M) of the number of turns and turning angles. The normalization formula is Among them, θ i is the angle generated by the current turn, θ is the total sum of the turning angles, A is the angle determination value, and V is the number of turns.

7. The path planning method for inspection robots based on the improved grey wolf algorithm according to claim 1, characterized in that: The mathematical model of the grey wolf attacking the prey is Among them, and respectively represent the distance vectors of the lead wolves α, β, and δ from the gray wolf individual ω, and respectively represent the current position vectors of the lead wolves α, β, and δ, and respectively represent the coefficient vectors of the gray wolf ω from the lead wolves α, β, and δ, represents the position vector of the gray wolf ω.

8. The path planning method for inspection robots based on the improved grey wolf algorithm according to claim 1, characterized in that: The update process formula Among them, respectively represent the updated position vectors between the gray wolf individual ω and the alpha wolf α, beta wolf β, and delta wolf δ. A 1 , A 2 , A 3 respectively represent the coefficient vectors between the gray wolf individual ω and the alpha wolf α, beta wolf β, and delta wolf δ. and respectively represent the distance vectors between the alpha wolf α, beta wolf β, and delta wolf δ and the gray wolf individual ω. and respectively represent the current position vectors of the alpha wolf α, beta wolf β, and delta wolf δ. represents 's vector sum, that is, the final updated position of the gray wolf individual ω.

Citation Information

Patent Citations

  • Unmanned aerial vehicle route planning method based on sparrow search algorithm

    CN114485665A

  • Method and system for planning path of unmanned surface vehicle based on forward / reverse data-driven linear parameter-varying genetic algorithm

    WO2021035911A1