Robot path planning method based on improved dung beetle optimization algorithm
By introducing multiple strategies and adaptive grid maps into the dung beetle optimization algorithm, the problems of uneven distribution and local optimality of traditional algorithms in complex terrain are solved, and the efficiency and quality of robot path planning are improved.
Patent Information
- Application Number
- CN202410676545.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-29
- Publication Date
- 2024-09-20
AI Technical Summary
The traditional dung beetle optimization algorithm has uneven initial population distribution, balance problems between global search and local development, and is prone to falling into local optimal solutions in complex terrain environments, which affects the convergence speed and accuracy.
The dung beetle optimization algorithm is enhanced with multiple strategies, including global exploration strategy, random exploration improved rolling ball behavior, triangle cosine search strategy, adaptive wandering strategy and flying crossover strategy, combined with adaptive grid map and real-time environment data update, Optimize path planning.
It significantly improves the convergence accuracy, speed and stability of path planning, improves the efficiency and quality of path planning, effectively avoids local optimal traps, and enhances global search capabilities.
Smart Images

Figure CN118670413A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent driving technology, and in particular to a robot path planning method based on an improved dung beetle optimization algorithm. Background Art
[0002] With the rapid development of robotics, path planning in complex terrains has received widespread attention. Path planning, as an important part of robot autonomous navigation, is the key to enabling robots to complete tasks efficiently, safely, and accurately. In complex terrain environments such as mountains, deserts, and mining areas, due to the undulating terrain and numerous obstacles, traditional path planning methods often fail to achieve ideal results. Therefore, it is of great significance to study robot path planning methods suitable for complex terrain environments.
[0003] In recent years, swarm intelligence optimization algorithms have shown good application prospects in the field of path planning. Among them, the Dung Beetle Optimizer (DBO), as a classic swarm intelligence optimization algorithm, has been widely used in the field of robot path planning due to its strong global search capability and robustness. However, the traditional dung beetle optimization algorithm still has many problems in complex terrain environments, such as: the uneven distribution of the initial population may lead to some areas not being fully explored; the balance between global search and local development may restrict the overall performance of the algorithm; when faced with complex problems, the algorithm is prone to fall into the local optimal solution, thus affecting the convergence speed and accuracy. Summary of the invention
[0004] In order to solve the above technical problems, the present invention proposes a robot path planning method based on an improved dung beetle optimization algorithm. In the method, a dung beetle optimization algorithm enhanced by multiple strategies is proposed, which achieves significant improvements in convergence accuracy, speed, global search capability, stability, etc., and can effectively improve the efficiency and quality of path planning.
[0005] In order to achieve the above object, the technical solution of the present invention is as follows:
[0006] A robot path planning method based on an improved dung beetle optimization algorithm comprises the following steps:
[0007] Construct an adaptive grid map, set the location of obstacles and mark the starting and ending points; update and optimize the adaptive grid map in real time based on the robot's movement trajectory and real-time collected environmental data;
[0008] The paths randomly formed by the robots between the starting point and the end point in the adaptive grid map are used as population individuals;
[0009] The robot is path-planned based on a multi-strategy enhanced dung beetle optimization algorithm to obtain an optimal path, wherein the multi-strategy enhanced dung beetle optimization algorithm uses a global exploration strategy and random exploration to improve rolling behavior, dancing behavior, breeding behavior optimized by introducing a triangular cosine search strategy, foraging behavior and stealing behavior improved by an adaptive wandering strategy, and a flight crossing strategy to exchange and reorganize information among individuals of the population;
[0010] The optimal path is smoothed to obtain the optimal planning path.
[0011] Preferably, the multi-strategy enhanced dung beetle optimization algorithm further includes the following steps:
[0012] Initialize the population to obtain the original population;
[0013] Based on the original population, an elite reverse learning strategy is carried out to construct a reverse population;
[0014] Calculate the fitness of each individual in the reverse population and the initial population respectively, and retain the individuals with larger fitness as the initialization population.
[0015] Preferably, the rolling ball behavior improved by using a global exploration strategy and random exploration specifically includes the following steps:
[0016] 1) The global exploration strategy improves the dung beetle rolling behavior as follows:
[0017] The target of each dung beetle in improving the dung beetle rolling behavior uses formula (3), which is as follows:
[0018] FX i ={X k |k∈{1,2,…,N}∧F k <F i}∪{X best}#(3
[0019] Among them, FX i is the position set of the i-th dung beetle; X best is the best position of dung beetle; X k is the position of the kth dung beetle; F k is the fitness value of the kth dung beetle; F i is the fitness value of the i-th dung beetle,
[0020] The improved dung beetle rolling behavior after adopting the global exploration strategy is shown in formula (4), which is as follows:
[0021] X i (t+1)=X i (t)+rand·(S·F i (t)-Ⅰ·Xi (t))#(4)
[0022] Among them, t represents the current iteration number; X i (t) represents the position of the i-th dung beetle at the t-th iteration; rand is a randomly generated random number between [0, 1]; F i (t) is the fitness value; S is a random number between [0,1]; I is a random number in the set {1,2},
[0023] After bringing the dung ball to the appropriate location, the dung beetle moves within a small range near the current location. The dung beetle position is updated as shown in formula (5), which is as follows:
[0024]
[0025] Among them, Ub i and Lb i are the upper and lower bounds of the i-th dung beetle, and rand is a randomly generated random number between [0, 1]. Each time the fitness values of the positions before and after the move are compared, the one with the better fitness value is taken as the new position. The formula is shown in (6). The formula is as follows:
[0026]
[0027] Among them, F i (t+1) is the current fitness value,
[0028] 2) Randomly explore and optimize the rolling behavior as follows:
[0029] The mathematical expression of random exploration is shown in formula (7), which is as follows:
[0030] X i (t) = {0, cumsum[2rand(t 1 )-1],…,cumsum[2rand(t n )-1]}#(7)
[0031] Among them, X i (t) represents the set of random exploration steps; cumsum is used to calculate the cumulative sum; t is the number of random exploration steps; rand(t) is a random function whose value is given by formula (8), which is as follows:
[0032]
[0033] Considering that the movement trajectory of dung beetles is limited to a certain range, the above formula is further improved and normalized using formula (9) to ensure that the movement of dung beetles to update their positions is kept within a certain range. Formula (9) is as follows:
[0034]
[0035] Where, X i (t) represents the position of the i-th dung beetle in the t-th iteration; a i and b i are the minimum and maximum values of the random exploration variable of the i-th dung beetle; c i (t) and d i (t) are the minimum and maximum values of the random exploration variable of the i-th dung beetle in the t-th iteration.
[0036] Preferably, a triangular cosine search strategy is introduced to optimize the reproduction behavior, which specifically includes the following steps:
[0037] The mathematical expression of the cosine search strategy of the triangle is shown in formula (12), which is as follows:
[0038] S 1 =X * (t)-B i (t),
[0039] S 2 =rand×S 1 ,
[0040] β=2×Pi×rand#(12)
[0041] Among them, X * (t) is the current local optimal solution; S 1 For the current egg ball B i (t) and X * (t) The distance between 2 is the search step range; β is the walking direction; Pi = 3.14159 is the pi,
[0042] The spawning area is dynamically adjusted with iterations, and the position of the egg ball is updated as shown in formula (13):
[0043]
[0044] Among them, rand is a random number in the range of [0, 1], B i (t+1) is the current position vector of the dung beetle, and cos(θ) is the search direction.
[0045] Preferably, the foraging behavior disturbed by the adaptive wandering strategy specifically includes the following steps:
[0046] The foraging behavior of the dung beetle is combined with the adaptive wandering strategy perturbation to As a mutation operator, the position of the dung beetle is disturbed, and the position update is shown in formula (16), which is as follows:
[0047]
[0048] Among them, X i (t+1) is the optimal solution of the i-th dung beetle at the t+1th iteration; is the optimal solution of the i-th dung beetle at the t-th iteration; is the mutation operator.
[0049] Preferably, a flight crossing strategy is used to exchange and reorganize information of population individuals, which specifically includes the following steps:
[0050] 1) Horizontal flight crossing strategy
[0051] The dung beetle individuals in the population are randomly paired, and each pair of dung beetle individuals is subjected to horizontal flight crossover. and is the paired parent dung beetle individual, and its offspring is represented by and According to formula (18),
[0052]
[0053]
[0054] Among them, r 1 and r 2 is a random number uniformly distributed in the range (0, 1); c 1 and c 2 It is a random number uniformly distributed in the range of (-1, 1). The generated offspring are compared with their parents respectively, and the individuals with smaller fitness values of the objective function are retained;
[0055] 2) Vertical flight crossing strategy
[0056] When performing vertical flight crossing, the offspring dung beetle individuals Randomly select parents Two dimensions d 1 and d 2 When vertical crossover occurs, it is calculated according to formula (19), and the remaining dimensions are consistent with the parent generation.
[0057]
[0058] Among them, r is a random number uniformly distributed in the range of (0, 1). The generated offspring are compared with their parents respectively, and the individuals with smaller fitness values of the objective function are retained.
[0059] Preferably, the method further comprises the following steps:
[0060] Optimize the flight crossing strategy and introduce the flight crossing strategy factor fly t , when rand>fly t When rand = a random number generated between [0, 1], the entire dung beetle population is disturbed using the flight crossover strategy, as shown in formula (20). The formula is as follows:
[0061] fly t =2 / 3(1-(t / M) 2 )#(20)
[0062] Where t represents the current iteration number, and M represents the total iteration number.
[0063] Preferably, the optimization objective function in the multi-strategy enhanced dung beetle optimization algorithm is as follows:
[0064]
[0065] Among them, F(x) is the fitness value of the objective function, which is determined by the starting point S(x i ,y i ) to the end point E(x i+n ,y i+n ) is calculated by accumulating the Euclidean distance of the free grid;
[0066] To avoid collision with obstacles, the feasibility of the solution is forced by adding a penalty term related to the constraint violation amount to the optimization objective function, as shown in the following formula:
[0067]
[0068] in, is the set of all obstacles, where σ is a penalty weight greater than zero, used to adjust the penalty for violating the constraint; k is the number of obstacles, C k is the violation of the kth constraint.
[0069] Based on the above technical scheme, the beneficial effects of the present invention are: a robot path planning method based on the improved dung beetle optimization algorithm of the present invention is characterized in that an adaptive grid map is constructed, the positions of obstacles are set and the starting and ending positions are marked; the adaptive grid map is updated and optimized in real time according to the movement trajectory of the robot and the environmental data collected in real time; the path randomly composed between the starting and ending points of the robot in the adaptive grid map is used as a population individual; the robot is path planned based on the dung beetle optimization algorithm enhanced by multiple strategies to obtain the optimal path, wherein the dung beetle optimization algorithm enhanced by multiple strategies includes using global exploration strategy and random exploration to improve rolling behavior, dancing behavior, breeding behavior optimized by introducing a cosine search strategy of a triangle, foraging behavior improved by an adaptive wandering strategy, stealing behavior, and using a flight crossing strategy to exchange and reorganize information of population individuals; the optimal path is smoothed to obtain the optimal planned path. The present invention optimizes the initial population setting by incorporating path initialization mapping and reverse learning strategies; uses global exploration strategies and random exploration to improve the rolling behavior of dung beetles, improves the algorithm's exploration ability in the solution space, and prevents premature convergence; in addition, introduces a triangular cosine search strategy to optimize the reproduction behavior, expand the search range, and assist the algorithm in effectively avoiding local optimal traps; at the same time, an adaptive wandering strategy is used to improve the foraging behavior to improve the accuracy of the search. Finally, a flight crossover strategy is used to exchange and reorganize information between population individuals, further improving the algorithm's search accuracy and performance, and effectively improving the efficiency and quality of path planning. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 is a schematic flow chart of a robot path planning method based on an improved dung beetle optimization algorithm in an embodiment;
[0071] Figure 2 is a flow chart of improving the dung beetle optimization algorithm in an embodiment;
[0072] Figure 3 This is a comparison chart of the optimal paths found by the MSEDBO algorithm and the DBO algorithm in a 20*20 grid map;
[0073] Figure 4 It is a comparison chart of the convergence curves of the MSEDBO algorithm and the DBO algorithm in a 20*20 grid map;
[0074] Figure 5 This is a comparison chart of the optimal paths found by the MSEDBO algorithm and the DBO algorithm in a 40*40 grid map;
[0075] Figure 6This is a comparison chart of the convergence curves of the MSEDBO algorithm and the DBO algorithm in a 40*40 grid map. DETAILED DESCRIPTION
[0076] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0077] like Figure 1 As shown, this embodiment provides a robot path planning method based on an improved dung beetle optimization algorithm, comprising the following steps:
[0078] Step 1: Build an adaptive grid map, set the location of obstacles and mark the starting and ending points; update and optimize the adaptive grid map in real time according to the robot's movement trajectory and real-time collected environmental data.
[0079] Step 2, taking the paths randomly formed between the starting point and the end point of the robot in the adaptive grid map as population individuals;
[0080] Step 3, based on the multi-strategy enhanced dung beetle optimization algorithm, path planning is performed on the robot to obtain the optimal path, wherein the multi-strategy enhanced dung beetle optimization algorithm includes initializing the population, using the global exploration strategy and random exploration to improve the rolling behavior, dancing behavior, introducing the triangular cosine search strategy to optimize the breeding behavior, using the adaptive wandering strategy to improve the foraging behavior, stealing behavior, and using the flight crossing strategy to exchange and reorganize the information of the population individuals;
[0081] Step 4: Smooth the optimal path to obtain the optimal planned path.
[0082] This embodiment uses a multi-strategy enhanced DungBeetle Optimizer (MSEDBO) algorithm to plan the path of the robot to obtain an optimal path, and smoothes the optimal path to obtain an optimal planned path.
[0083] The dung beetle optimization algorithm enhanced by multiple strategies is described in detail as follows.
[0084] 1. Initialize the population
[0085] The population initialization of the original dung beetle optimization algorithm relies on pseudo-random sequences, which cannot ensure that the dung beetle individuals have a uniform initial distribution in the search space, affecting the algorithm's search speed and optimization ability. The dual population is generated by combining path initialization mapping with a random reverse learning strategy to improve the distribution quality of the initial population in the algorithm, ensure that the distribution of dung beetle individuals in the search space is more uniform, and thus enhance the global search ability.
[0086] 1.1 Path initialization mapping
[0087] Construct a two-dimensional grid map G = [rows, cols], set 0 to be a free grid and 1 to be an obstacle.
[0088] The population size is composed of pop(population)*dim(dimension, which is the number of columns minus the starting and ending points, i.e. cols-2) individual paths, and each individual represents a potential solution path route. When initializing the population, a population individual is generated by randomly selecting one from the free grid to obtain the original population.
[0089] Specific method: First, create a zero matrix x of size (pop, dim); then traverse each column of G, find all free grids with value 0, and store their row and column indexes in the free_cells list; next, by randomly selecting an element in free_cells, set the value of the corresponding free grid to 1. Finally, return the generated matrix x.
[0090] 1.2 Elite Reverse Learning Strategy
[0091] The reverse learning strategy is used to accelerate the convergence speed of the algorithm. The core idea is to generate a reverse solution based on the current solution in the process of population optimization, and then compare the objective function values of the current solution and the reverse solution to select the better one to enter the next iteration. Elite reverse learning is to construct the reverse solution of the feasible solution of the current problem to increase the diversity of the population, and select the optimal solution from the current solution and the reverse solution as the new generation of individuals. It is assumed that the extreme point corresponding to the individual in the population is the elite individual, that is, (i=1,2,…,m;j=1,2,…,d), its reverse solution The mathematical expression of is shown in formula (2).
[0092]
[0093] in, For elite individuals; is the reverse solution; a random number between rand∈[0,1]; Lb=min(X ij ), Ub=max(X ij ), X ij represents the position of the i-th dung beetle in the j-th dimension.
[0094] 1.3 Generate the initial population
[0095] The two populations generated by path initialization mapping and random reverse learning are merged. After comparing the objective function values of the current solution and the reverse solution, the first several individuals with higher fitness are selected as the initialization population to speed up the convergence of the algorithm and avoid the generated population from falling into local extreme values. The generated population is more evenly distributed. The introduction of random reverse learning strategy increases the scope of exploration of the solution space, improves the diversity of the population, speeds up the convergence process of the algorithm, and improves the accuracy and efficiency of the solution.
[0096] 2. Improved rolling ball behavior using global exploration strategy and random exploration
[0097] 2.1 Global exploration strategy to improve dung beetle rolling behavior
[0098] The original dung beetle rolling behavior realizes global search by independently responding to environmental cues (such as light intensity). In the algorithm, the position update of each dung beetle depends on its previous position X i (t-1), the global worst position X w The dung beetle adjusts its moving direction according to the change in light intensity Δx, and the change in light intensity affects its moving distance, so each dung beetle acts independently without exerting a group effect. This embodiment adopts a global exploration strategy to replace the position update formula in the rolling ball stage. In the improved dung beetle rolling ball behavior, each dung beetle regards the position of the dung ball individual of other dung beetles with good objective function values in the search space as a target.
[0099] Use the global exploration strategy to improve the dung beetle ball rolling behavior, assuming that the goal of each dung beetle rolling the dung ball is FX i , (3).
[0100] FX i ={X k |k∈{1,2,…,N}∧F k <F i}∪{X best}#(3)
[0101] Among them, FX i is the position set of the i-th dung beetle; X best is the best position of dung beetle; X k is the position of the kth dung beetle selected; F k is the fitness value of the kth dung beetle; F i is the fitness value of the i-th dung beetle.
[0102] The improved dung beetle rolling behavior using the global exploration strategy is shown in formula (4).
[0103] X i (t+1)=X i (t)+rand·(S·F i(t)-I·X i (t))#(4)
[0104] Among them, t represents the current iteration number; X i (t) represents the position of the i-th dung beetle at the t-th iteration; rand is a randomly generated random number between [0, 1]; F i (t) is the fitness value; S is a random number between [0,1]; I is a random number in the set {1,2}.
[0105] After bringing the dung ball to the appropriate location, the dung beetle moves within a small range near the current location, and the dung beetle position is updated as shown in formula (5).
[0106]
[0107] Among them, Ub i and Lb i are the upper and lower bounds of the i-th dung beetle; rand is a randomly generated random number between [0, 1]. Each time the fitness values of the positions before and after the move are compared, the one with the better fitness value is taken as the new position. The formula is shown in (6).
[0108]
[0109] Among them, F i (t+1) is the current fitness value; F i (t) is the fitness value of the previous generation.
[0110] 2.2 Random Exploration Strategy to Optimize Rolling Behavior
[0111] The rolling behavior of the dung beetle is responsible for the global position search and determines the optimization ability of the entire algorithm. In order to improve the global exploration performance of the algorithm, this paper uses random exploration for perturbation. Random exploration is a random search technique that helps the algorithm get rid of the local optimum when dealing with high-dimensional and complex optimization problems, thereby having a greater chance of finding the global optimal solution. In order to keep the time complexity of the original algorithm unchanged, it is chosen to check the changes in the optimal value of fitness during the iteration process. If the optimal value has not changed, it indicates that the algorithm may have fallen into a local optimum. At this time, random exploration should be used for perturbation to help the algorithm get rid of the local optimum. If the optimal value changes, it means that the algorithm is still searching effectively and no perturbation is needed.
[0112] The mathematical expression of random exploration is shown in formula (7).
[0113] X i (t) = {0, cumsum[2rand(t 1 )-1],…,cumsum[2rand(t n )-1]}#(7)
[0114] Among them, X i (t) represents the set of random exploration steps; cumsum is used to calculate the cumulative sum; t is the number of random exploration steps; rand(t) is a random function whose value is given by formula (8).
[0115]
[0116] Considering that the movement trajectory of dung beetles is limited to a certain range, the above formula is further improved and normalized using formula (9) to ensure that the movement of dung beetles to update their positions remains within a certain range.
[0117]
[0118] Where, X i (t) represents the position of the i-th dung beetle at the t-th iteration; X i (t+1) represents the position of the i-th dung beetle at the t+1-th iteration; a i and b i are the minimum and maximum values of the random exploration variable of the i-th dung beetle; c i (t) and d i (t) are the minimum and maximum values of the random exploration variable of the i-th dung beetle in the t-th iteration.
[0119] 3. Dancing behavior
[0120] When dung beetles deviate from their original direction or lose navigation clues, they reposition themselves through dancing. This behavior helps to balance global search and local development. The mathematical expression of the dance behavior is shown in formula (10).
[0121] X i (t+1)=X i (t)+tan(θ)|X i (t)-X i (t-1)|#(10)
[0122] Among them, θ∈(0,π) range, tan(θ) represents the rotation direction.
[0123] 4. Reproduction Behavior of the Cosine Search Strategy for Triangles
[0124] During the optimization process, dung beetles with good performance reproduce and produce offspring, which continue to search for better solutions in the search space. The mathematical model of reproduction behavior is shown in formula (11).
[0125] Lb * =max(X * ×(1-R), Lb)#(11)
[0126] Ub * =min(X * ×(1+R),Ub)
[0127] Among them, Lb * and Ub * Indicates the lower and upper limits of the spawning area; X * represents the current local optimal solution; represents the maximum number of iterations; Lb and Ub represent the lower bound and upper bound of the optimization problem respectively.
[0128] By adopting the triangular cosine search strategy, the randomness of the dung beetle in the search process is increased, and at the same time, the dung beetle has a greater opportunity to explore the search space, avoid the algorithm from falling into the local optimal solution, and improve the global search ability of the algorithm. The mathematical expression of the triangular cosine search strategy is shown in formula (12).
[0129] S 1 =X * (t)-B i (t),
[0130] S 2 =rand×S 1 ,
[0131] β=2×Pi×rand#(12)
[0132] Among them, X * (t) is the current local optimal solution; S 1 For the current egg ball B i (t) and X * (t) The distance between 2 is the search step range; β is the walking direction; Pi = 3.14159 is the pi.
[0133] The spawning area is dynamically adjusted with iterations, and the position of the egg ball is updated as shown in formula (13).
[0134]
[0135] Here, r is a random number in the range [0, 1].
[0136] 5. Improved foraging behavior with adaptive wandering strategy
[0137] Dung beetles forage for food based on the distribution of resources in the environment, and their position is updated as shown in formula (14).
[0138] Lb b =max(X b ×(1-R), Lb)
[0139] Ub b =min(X b ×(1+R),Ub)#(14)
[0140] Among them, Lb b and Ub b represents the lower and upper bounds of the optimal foraging area; X b represents the global optimal position.
[0141] When rand>0.5, the position of the dung beetle is updated according to formula (7). Formula (15) is as follows:
[0142] X i (t+1)=X i (t)+C 1 (X i (t)-Lb b )+C 2 (X i (t)-Ub b )#(15)
[0143] Among them, C 1 is a random number that follows a normal distribution; C 2 Get a random vector in the range (0, 1).
[0144] When rand ≤ 0.5, the foraging behavior is improved by the adaptive wandering strategy, and the position update formula of the dung beetle is shown in formula (16).
[0145] The foraging behavior of the dung beetle is combined with the adaptive wandering strategy, and the number of iterations is used as the mutation operator to perturb the position of the solution, thereby further enhancing the algorithm's ability to jump out of the local optimal solution. In order to reflect the volatility level of the environment, a volatility adjustment factor is introduced, and an adaptive parameter is used to control the shape of the perturbation term. This helps to adapt to different search environments and thus improve the performance of the algorithm. Formula (16) is as follows:
[0146]
[0147] Among them, X i (t+1) is the optimal solution of the i-th dung beetle at the t+1th iteration; is the optimal solution before mutation; as the degrees of freedom parameter of the disturbance.
[0148] 6. Theft
[0149] Some dung beetles will try to steal food collected by other dung beetles. The position update of this behavior is shown in formula (17).
[0150] X i (t+1)=X b+S×g×(|X i (t)X * |+|X i (t))-X b |)#(17)
[0151] Where S is a constant; g is a random vector of 1×N service normal distribution; X * represents the current local optimal solution; X b represents the global optimal position.
[0152] 7. Flight Crossover Strategy Optimization of Dung Beetle Population
[0153] Using the horizontal flight crossover strategy in the dung beetle population helps to explore the search space and effectively reduce search blind spots; vertical crossover can stimulate the stagnant dimensions in the evolutionary process and get rid of premature convergence; horizontal flight crossover and vertical flight crossover strategies are executed alternately. In addition, a competition mechanism is designed in the flight crossover strategy to compare the newborn offspring with the parent generation, retain the population with higher fitness, and accelerate the convergence speed.
[0154] 7.1 Horizontal flight crossing strategy
[0155] The horizontal flight crossover strategy refers to the exchange of information between the same dimensions of different dung beetle individuals in the population. First, the dung beetle individuals in the population are randomly paired, and then the horizontal flight crossover strategy is performed on each pair of individuals. Assume and is the paired parent dung beetle individual, and its offspring is represented by and Calculated according to formula (18).
[0156]
[0157]
[0158] Among them, r 1 and r 2 is a random number uniformly distributed in the range (0, 1); c 1 and c 2 It is a random number uniformly distributed in the range of (-1, 1). The generated offspring are compared with their parents respectively, and the individuals with smaller fitness values of the objective function are retained;
[0159] 7.2 Vertical Flight Crossing Strategy
[0160] The vertical flight crossover strategy operates on different dimensions of a single dung beetle individual, encouraging dimensions that are stagnant during the evolution process. Each dung beetle individual undergoes only one vertical crossover, and only updates the value of one dimension, while the other dimensions remain unchanged. The dimension that is stuck in stagnation is given an opportunity to jump out of the local optimum without destroying other dimensions that may be optimal. When performing vertical crossover, the offspring individual Randomly select parents Two dimensions d 1 and d 2 When vertical crossover occurs, it is calculated according to formula (19), and the remaining dimensions remain consistent with the parent generation.
[0161]
[0162] Among them, r is a random number uniformly distributed in the range of (0, 1). The generated offspring are compared with their parents respectively, and the individuals with smaller fitness values of the objective function are retained.
[0163] In order not to increase the complexity of the algorithm, the flight crossing strategy is optimized and the flight crossing strategy factor fly is introduced. t , when rand>fly t When rand = a random number generated between [0, 1], the entire dung beetle population is disturbed using the flight crossover strategy, as shown in formula (20).
[0164] fly t =2 / 3(1-(t / M) 2 )#(20)
[0165] Where t represents the current iteration number, and M represents the total iteration number.
[0166] 8.MSEDBO algorithm flow
[0167] The pseudo code of the MSEDBO algorithm of the dung beetle optimizer improved by integrating multiple strategies is shown in Table 1, and the flow chart is shown in Figure 2 shown.
[0168] Table 1 Pseudocode of MSEDBO algorithm
[0169]
[0170]
[0171] 9. Fitness function fitness algorithm
[0172] The fitness value of the path is calculated to find the optimal path from the starting point to the end point. By simulating the evolution process of dung beetles in nature, the path is continuously optimized through iteration and selection to find the shortest path or a path that meets specific conditions. In order to avoid collisions with obstacles, a penalty function method based on sequential unconstrained minimization technology (SUMT) is designed. A penalty term related to the amount of constraint violation is added to the objective function to force the feasibility of the solution.
[0173] Optimization objective function:
[0174] Among them, F(x) is the fitness value of the objective function, which is determined by the starting point S(x i ,y i ) to the end point E(x i+n ,y i+n ) is calculated by accumulating the Euclidean distance of the free grid;
[0175] To avoid collision with obstacles, the feasibility of the solution is forced by adding a penalty term related to the constraint violation amount to the optimization objective function, as shown in the following formula:
[0176]
[0177] in, is the set of all obstacles, where σ is a penalty weight greater than zero, used to adjust the penalty for violating the constraint; k is the number of obstacles, C k is the violation of the kth constraint.
[0178] There are two types of path distance calculations, as follows:
[0179] The first type, adjacent node G 1 (x1,y1) and G 2 (x2,x2) is a free grid using Euclidean distance calculation:
[0180]
[0181] The second type: adjacent node G 1 (x1,y1) and G 2 (x2,x2) is an obstacle and is calculated using Manhattan distance:
[0182] C k (G 1 ,G 2 )=|x 1 -x 2 +|y 1 -y 2 |;
[0183]
[0184] experiment
[0185] Experiment 1, see Figure 3 , 4 The optimal path is found by the original DBO algorithm and the MSEDBO algorithm in a 20*20 grid map. The shortest path obtained by the MSEDBO algorithm is about 6.8% higher than that of the DBO algorithm in a 20*20 grid map. The shortest path obtained by the DBO algorithm is 30.4548; the shortest path obtained by the MSEDBO algorithm is 28.3803.
[0186] Experiment 2, see Figure 5 , 6 , the optimal path is found by the original DBO algorithm and the MSEDBO algorithm in the 40*40 grid map. In the 40*40 grid map, the shortest path obtained by MSEDBO is about 17.39% higher than that of DBO; the shortest path obtained by the DBO algorithm is: 72.8448; the shortest path obtained by the MSEDBO algorithm is: 60.1793.
[0187] It should be understood that, although the various steps in the above-mentioned flow chart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the above-mentioned flow chart may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0188] The above is only a preferred implementation of a robot path planning method based on an improved dung beetle optimization algorithm disclosed in the present invention, and is not intended to limit the protection scope of the embodiments of this specification. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the embodiments of this specification shall be included in the protection scope of the embodiments of this specification.
Claims
1. A robot path planning method based on an improved dung beetle optimization algorithm, characterized in that: The steps include: Construct an adaptive grid map, set the location of obstacles and mark the starting and ending points; update and optimize the adaptive grid map in real time based on the robot's movement trajectory and real-time collected environmental data; The paths randomly formed by the robots between the starting point and the end point in the adaptive grid map are used as population individuals; The robot is path-planned based on a multi-strategy enhanced dung beetle optimization algorithm to obtain an optimal path, wherein the multi-strategy enhanced dung beetle optimization algorithm uses a global exploration strategy and random exploration to improve the rolling behavior, dancing behavior, breeding behavior optimized by introducing a triangular cosine search strategy, foraging behavior and stealing behavior improved by an adaptive wandering strategy, and a flight crossing strategy to exchange and reorganize information among individuals of the population; The optimal path is smoothed to obtain the optimal planning path.
2. The robot path planning method based on the improved dung beetle optimization algorithm according to claim 1 is characterized in that: The multi-strategy enhanced dung beetle optimization algorithm further includes the following steps: Initialize the population to obtain the original population; Based on the original population, an elite reverse learning strategy is carried out to construct a reverse population; Calculate the fitness of each individual in the reverse population and the initial population respectively, and retain the individuals with larger fitness as the initialization population.
3. The robot path planning method based on the improved dung beetle optimization algorithm according to claim 1 is characterized in that: The improved rolling ball behavior using global exploration strategy and random exploration includes the following steps: 1) The global exploration strategy improves the dung beetle rolling behavior as follows: The target of each dung beetle in improving the dung beetle rolling behavior uses formula (3), which is as follows: FX i ={X k |k∈{1,2,…,N}∧F k <F i }∪{X best }#(3) Among them, FX i is the position set of the i-th dung beetle; X best is the best position of dung beetle; X k is the position of the kth dung beetle; F k is the fitness value of the kth dung beetle; F i is the fitness value of the i-th dung beetle, The improved dung beetle rolling behavior after adopting the global exploration strategy is shown in formula (4), which is as follows: X i (t+1)=X i (t)+rand(S·F i (t)-I·X i (t))#(4) Among them, t represents the current iteration number; X i (t) represents the position of the i-th dung beetle at the t-th iteration; rand is a randomly generated random number between [0, 1]; F i (t) is the fitness value; S is a random number between [0,1]; I is a random number in the set {1,2}, After bringing the dung ball to the appropriate location, the dung beetle moves within a small range near the current location. The dung beetle position is updated as shown in formula (5), which is as follows: Among them, Ub i and Lb i are the upper and lower bounds of the i-th dung beetle, and rand is a randomly generated random number between [0, 1]. Each time the fitness values of the positions before and after the move are compared, the one with the better fitness value is taken as the new position. The formula is shown in (6). The formula is as follows: Among them, F i (t+1) is the current fitness value, 2) Randomly explore and optimize the rolling behavior as follows: The mathematical expression of random exploration is shown in formula (7), which is as follows: X i (t)={0,cumsum[2rand(t1)-1],…,cumsum[2rand(t n )-1]}#(7) Among them, X i (t) represents the set of random exploration steps; cumsum is used to calculate the cumulative sum; t is the number of random exploration steps; rand(t) is a random function whose value is given by formula (8), which is as follows: Considering that the movement trajectory of dung beetles is limited to a certain range, the above formula is further improved and normalized using formula (9) to ensure that the movement of dung beetles to update their positions is kept within a certain range. Formula (9) is as follows: Where, X i (t) represents the position of the i-th dung beetle in the t-th iteration; a i and b i are the minimum and maximum values of the random exploration variable of the i-th dung beetle; c i (t) and d i (t) are the minimum and maximum values of the random exploration variable of the i-th dung beetle in the t-th iteration.
4. The robot path planning method based on the improved dung beetle optimization algorithm according to claim 3 is characterized in that: The cosine search strategy of the triangle is introduced to optimize the reproduction behavior, which includes the following steps: The mathematical expression of the cosine search strategy of the triangle is shown in formula (12), which is as follows: S1=X * (t)-B i (t), S2=rand×S1, β=2×Pi×rand#(12) Among them, X * (t) is the current local optimal solution; S1 is the current egg ball B i (t) and X * (t); S2 is the search step range; β is the walking direction; Pi = 3.14159 is the pi, The spawning area is dynamically adjusted with iterations, and the position of the egg ball is updated as shown in formula (13): Among them, rand is a random number in the range of [0, 1], B i (t+1) is the current position vector of the dung beetle, and cos(θ) is the search direction.
5. The robot path planning method based on the improved dung beetle optimization algorithm according to claim 4 is characterized in that: The foraging behavior perturbed by the adaptive wandering strategy includes the following steps: The foraging behavior of the dung beetle is combined with the adaptive wandering strategy perturbation to As a mutation operator, the position of the dung beetle is disturbed, and the position update is shown in formula (16), which is as follows: Among them, X i (t+1) is the optimal solution of the i-th dung beetle at the t+1th iteration; is the optimal solution of the i-th dung beetle at the t-th iteration; is the mutation operator.
6. The robot path planning method based on the improved dung beetle optimization algorithm according to claim 5 is characterized in that: The flight crossing strategy is used to exchange and reorganize information of population individuals, which specifically includes the following steps: 1) Horizontal flight crossing strategy The dung beetle individuals in the population are randomly paired, and each pair of dung beetle individuals is subjected to horizontal flight crossover. and is the paired parent dung beetle individual, and its offspring is represented by and According to formula (18), Among them, r1 and r2 are random numbers uniformly distributed in the range of (0, 1); c1 and c2 are random numbers uniformly distributed in the range of (-1, 1). The generated offspring are compared with their parents respectively, and the individuals with smaller fitness values of the objective function are retained; 2) Vertical flight crossing strategy When performing vertical flight crossing, the offspring dung beetle individuals Randomly select parents The two dimensions d1 and d2 cross vertically, calculated according to formula (19), and the remaining dimensions remain the same as the parent. Among them, r is a random number uniformly distributed in the range of (0, 1). The generated offspring are compared with their parents respectively, and the individuals with smaller fitness values of the objective function are retained.
7. The robot path planning method based on the improved dung beetle optimization algorithm according to claim 6 is characterized in that: The following steps are also included: Optimize the flight crossing strategy and introduce the flight crossing strategy factor fly t , when rand>fly t When rand = a random number generated between [0, 1], the entire dung beetle population is disturbed using the flight crossover strategy, as shown in formula (20). The formula is as follows: fly t =2 / 3(1-(t / M) 2 ) #(20) Where t represents the current iteration number; M represents the total iteration number.
8. The robot path planning method based on the improved dung beetle optimization algorithm according to claim 1 is characterized in that: The optimization objective function in the multi-strategy enhanced dung beetle optimization algorithm is as follows: Among them, F(x) is the fitness value of the objective function, which is determined by the starting point S(x i ,y i ) to the end point E(x i+n ,y i+n ) is calculated by accumulating the Euclidean distance of the free grid; To avoid collision with obstacles, the feasibility of the solution is forced by adding a penalty term related to the constraint violation amount to the optimization objective function, as shown in the following formula: in, is the set of all obstacles, where σ is a penalty weight greater than zero, used to adjust the penalty for violating the constraint; k is the number of obstacles, C k is the violation of the kth constraint.
Citation Information
Cited By
Multi-constraint parking path planning method and device and automobile control system
CN119408532A
Intelligent trolley path tracking method and device, intelligent trolley and medium
CN119596960A
Vertical mill hydraulic control method and system based on improved dung beetle optimization algorithm
CN119689982A
