Path planning method for mobile robot based on improved butterfly optimization algorithm
By introducing dynamic sensory modality, genetic algorithm selection factor and dynamic parameter optimization variability factors are solved in the butterfly optimization algorithm, the algorithm's slow convergence speed and easy to fall into local optimality, and the efficiency and stability of mobile robot path planning are achieved.
Patent Information
- Application Number
- CN202211622467.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-16
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2042-12-16
AI Technical Summary
The butterfly optimization algorithm has problems such as slow convergence speed and easy to fall into local optimality in path planning, resulting in poor performance of mobile robots in terms of pathfinding efficiency and path length.
Dynamic sensory modality was introduced in the butterfly fragrance calculation stage of the butterfly optimization algorithm, selection factors of genetic algorithm were introduced in the global search stage, and variation factors of dynamic parameter optimization were introduced in the local search stage to improve the algorithm's convergence speed and ability to jump out of local extreme values.
Through the improved butterfly optimization algorithm, mobile robots achieve higher pathfinding efficiency and longer path lengths in path planning, significantly improving the performance of path planning.
Smart Images

Figure CN115933669B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of path planning, and in particular to a mobile robot path planning method based on an improved butterfly optimization algorithm. Background Art
[0002] Path planning refers to searching for a complete path from the initial starting point to the target end point that avoids obstacles in a given area containing obstacles. Global path planning is to find the optimal path in the overall environment where the map information is completely known. As one of the cores of mobile robot research, global path planning has become the research object of many scholars. For global path planning, scholars have proposed artificial potential field methods for local obstacle avoidance, intelligent A* algorithms based on geometric models, deep reinforcement learning algorithms based on artificial intelligence, and heuristic intelligent algorithms based on intelligent search, such as artificial bee colony algorithms (ABC), grey wolf optimization algorithms (GWO), and whale optimization algorithms (WOA). In the study of path planning, in addition to classical algorithms, many scholars have continuously improved algorithms to achieve the purpose of shortening the driving path, reducing working time, or minimizing energy consumption. Fan Linan adopted an adaptive genetic ant colony hybrid algorithm to shorten the total distance of path planning, but there are many intersections in the delivery path and it needs to be optimized; K. Shi et al. greatly reduced the iteration times of the shortest path through a combination strategy, but the total distance of the optimal path was still large; Long Shanshan et al. used a composite-inspired ant colony algorithm to have better path quality and efficient path-finding ability, making the path obtained when planning a path smoother; Jiang Ming et al. improved the actual work efficiency of the robot by improving the ant colony algorithm, but compared with the butterfly optimization algorithm, it has the disadvantages of low operating efficiency, many path turning points and insufficient stability.
[0003] The Butterfly Optimization Algorithm (DOA) is a meta-heuristic intelligent algorithm proposed by Arora in 2018. It is inspired by the foraging process of butterflies. Compared with other algorithms, it has the characteristics of strong optimization ability. However, it is easy to fall into local optimality during the search process. In the iterative process, it has disadvantages such as slow convergence speed. The use of this improved butterfly optimization algorithm makes the mobile robot have low path finding efficiency and short path when performing path planning. Summary of the invention
[0004] The invention provides a mobile robot path planning method based on an improved butterfly optimization algorithm. Aiming at the shortcomings of the butterfly optimization algorithm, such as slow convergence speed and easy falling into local optimum, an improved butterfly optimization algorithm is proposed. Firstly, aiming at the problem of slow convergence speed of the algorithm, a dynamic sensory modality is introduced in the butterfly fragrance calculation stage to improve the fragrance calculation formula, and the fragrance value of the butterfly is gradually enhanced with the continuous advancement of the iterative process, so as to improve the convergence speed of the algorithm; then, a selection factor of a genetic algorithm is introduced in the global search stage of the butterfly optimization algorithm to improve the global formula, so as to improve the convergence speed of the algorithm; then, aiming at the easy falling into local optimum in the butterfly optimization algorithm, a variation factor of dynamic parameter optimization is introduced in the local search stage of the algorithm, and the variation factor enhances the ability of jumping out of the local extreme value; finally, the improved butterfly optimization algorithm is applied to the path planning of the mobile robot, so that the mobile robot has higher path finding efficiency and longer path length when performing path planning.
[0005] The present invention is achieved through the following technical solutions:
[0006] A mobile robot path planning method based on an improved butterfly optimization algorithm, comprising:
[0007] S1. Introducing dynamic sensory modality into the butterfly scent calculation stage of the original butterfly optimization algorithm, introducing the selection factor of the genetic algorithm into the global search stage of the original butterfly optimization algorithm, and introducing the mutation factor of dynamic parameter optimization into the local search stage of the original butterfly optimization algorithm to obtain an improved butterfly optimization algorithm with faster convergence speed in the iterative process;
[0008] S2, setting the relevant parameters of the improved butterfly optimization algorithm and the number of butterflies;
[0009] S3, construct a grid map, set the starting point and end point of the mobile robot and initialize the number of butterflies;
[0010] S4, setting the adaptability function;
[0011] S5, calculating the fragrance of each butterfly based on the improved butterfly optimization algorithm, and obtaining the best butterfly with the strongest initial fragrance;
[0012] S6, iterating each butterfly based on the best butterfly with the strongest initial fragrance by improving the butterfly optimization algorithm, calculating the selection factor and the mutation factor, so as to perform local search or global search;
[0013] S7, determine whether the maximum number of iterations has been reached, if so, jump to S8, otherwise, return to S6;
[0014] S8. Output the optimal path and fitness value, and end.
[0015] As an optimization, in S1, the specific formula of the optimized butterfly fragrance is obtained by introducing the dynamic sensory modality in the butterfly fragrance calculation stage of the original butterfly optimization algorithm:
[0016] f(z i )=c i I a ;
[0017] Among them, c i represents the sensory modal parameters at the current iteration i, I is the stimulus factor, a is the response intensity, and its value range is (0,1), z i represents the i-th butterfly, f(z i ) is a measure of the scent value of each butterfly.
[0018] As an optimization, the stimulation factor I is inversely proportional to the fitness function, and the fitness function is specifically:
[0019]
[0020] Where n represents the total number of initial butterfly groups, Z i represents the path of the i-th butterfly, d is the dimension of the butterfly, that is, the number of nodes on the butterfly's path, k ranges from 1 to d-1, (x k ,y k )、(x k+1 ,y k+1 ) are the node coordinates on the butterfly’s path, where (x k+1 ,y k+1 ) is (x k ,y k )’s next node’s coordinates.
[0021] As an optimization, the specific formula of the dynamic sensory modality is:
[0022]
[0023] Among them, c i represents the dynamic sensory modal parameters at the current i-th iteration, c i+1 represents the dynamic sensory modal parameters of the next iteration, N iter is the total number of iterations.
[0024] As an optimization, in S1, the selection factor p in the genetic algorithm is introduced in the global search phase. i The specific calculation formula for the butterfly to perform global search is:
[0025]
[0026] in, represents the solution vector of the ith butterfly in the t+1th iteration, represents the solution vector of the ith butterfly in the tth iteration; p i is the selection factor in the genetic algorithm; g * represents the current optimal solution vector, that is, the butterfly with the smallest fitness function value; f(z i ) represents the scent value of the i-th butterfly; f(z i ) represents the scent value of the i-th butterfly.
[0027] As an optimization, the selection factor p in the genetic algorithm i The specific formula is:
[0028]
[0029] Where M represents the number of butterflies in the population, f(z i ) represents the scent value of the i-th butterfly.
[0030] As an optimization, in S1, a dynamic parameter optimization mutation factor p is introduced in the local search phase. c The specific calculation formula for the butterfly to perform local search is:
[0031]
[0032] in, represents the solution vector of the ith butterfly in the t+1th iteration, represents the solution vector of the ith butterfly in the tth iteration, denote the solution vectors of the randomly selected j-th butterfly and the k-th butterfly in the t-th iteration, r is a random number, and f(z i ) represents the scent value of the i-th butterfly, g * represents the current optimal solution vector, that is, the butterfly with the smallest fitness function value; f(z i ) represents the scent value of the i-th butterfly.
[0033] As an optimization, the mutation factor p c The specific formula is:
[0034]
[0035] Among them, t is the current iteration number, N iter is the total number of iterations, and b is the weight coefficient of the mutation factor.
[0036] As an optimization, in S6, the switching probability m is set, and each butterfly randomly generates a random number r in each iteration. The switching probability m and the random number r are compared to decide whether each butterfly performs a global search or a local search.
[0037] As an optimization, the specific formula of the random number r is as follows:
[0038] r=rand(0,1).
[0039] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0040] The invention is based on the original butterfly optimization algorithm, introduces a dynamic sensory mode in the butterfly fragrance calculation stage to improve the fragrance calculation formula, gradually enhances the fragrance value of the butterfly as the iterative process continues to advance, and improves the convergence speed of the original butterfly optimization algorithm; introduces a selection factor of a genetic algorithm in the global search stage of the butterfly optimization algorithm to improve the global formula, and improves the convergence speed of the butterfly optimization algorithm; in view of the butterfly optimization algorithm being prone to falling into a local optimum, introduces a variation factor of dynamic parameter optimization in the local search stage of the butterfly optimization algorithm, and the variation factor enhances the ability to jump out of the local extreme value; finally, the improved butterfly optimization algorithm is applied to the path planning of a mobile robot, so that the mobile robot has higher path finding efficiency and longer path length when performing path planning. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other relevant drawings can be obtained based on these drawings without creative work. In the drawings:
[0042] Figure 1 It is a flow chart of a mobile robot path planning method based on an improved butterfly optimization algorithm according to the present invention;
[0043] Figure 2 is a graph of the benchmark function graph set; among them, Figure 2 (a), (b), (c), (d), (e), and (f) are comparison diagrams of benchmark function F1, benchmark function F2, benchmark function F3, benchmark function F4, benchmark function F5, and benchmark function F6 of BOA and BOA-GA respectively;
[0044] Figure 3 It is a raster map MAP2 path planning atlas, where: Figure 3 (a), (b), (c), and (d) are A * , comparison diagram of path planning 1, path planning 2, path planning 3 and path planning 4 of BOA and BOA-GA;
[0045] Figure 4It is a raster map MAP2 path planning atlas, where: Figure 4 (a), (b), (c), and (d) are A * , comparison diagram of path planning 1, path planning 2, path planning 3 and path planning 4 of BOA and BOA-GA;
[0046] Figure 5 Schematic diagram of the starting position of the mobile robot in the embodiment;
[0047] Figure 6 Schematic diagram of key positions of the mobile robot in the embodiment;
[0048] Figure 7 It is a path map planned by using the original butterfly optimization algorithm in the embodiment;
[0049] Figure 8 This is a path diagram planned using the improved butterfly optimization algorithm of the present invention in the embodiment. DETAILED DESCRIPTION
[0050] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments and drawings. The exemplary embodiments of the present invention and their description are only used to explain the present invention and are not intended to limit the present invention.
[0051] Example
[0052] Before introducing the present invention, the butterfly optimization algorithm is first introduced.
[0053] The Butterfly Optimization Algorithm (BOA) is a search intelligent algorithm that imitates the foraging behavior of butterflies in the biological world. The algorithm is simple to implement and has strong optimization capabilities. In BOA, butterflies are search agents of BOA, used to perform the process of path optimization, and each butterfly represents a feasible path. Butterflies produce a certain intensity of fragrance related to their fitness function, that is, when a butterfly moves from one position to another, its fitness will change accordingly. When a butterfly can perceive the fragrance of any other butterfly, the current butterfly will move towards the butterfly with the best fragrance. This stage is called the global search of BOA in the proposed algorithm. In another case, when the butterfly cannot perceive the fragrance of the surrounding environment, it will move randomly. This stage is called the local search of BOA in the proposed algorithm. Each butterfly emits fragrance, and the fragrance size is related to the physical intensity of the stimulus. The specific calculation formula is:
[0054] f(z i )=cI a (1
[0055] Where c represents the sensory modality of each butterfly; I is the stimulus factor, which is related to the adaptability function, as shown in the following formula (2); a is the response intensity. In nature, the stimulus felt by organisms is not as strong as the changes in the environment itself, so the response intensity is response compression, with a value range of (0,1); f(z i ) is a measure of the scent value of each butterfly.
[0056] In BOA, in order to evaluate the performance and value of each butterfly, a fitness function needs to be set. Among them, the butterfly with the smallest fitness value (the result of the fitness function) can be used as the current optimal solution. The present invention sets the Euclidean distance calculation formula as the fitness function of each butterfly, and the specific calculation formula is as follows:
[0057]
[0058] Global search phase:
[0059] When a butterfly can sense the scent of other butterflies, the current butterfly will move towards the target with the strongest scent. This process is the global search of BOA. The specific calculation formula is:
[0060]
[0061] in, represents the solution vector of the ith butterfly in the tth iteration; r is a random number with a value range of (0,1); g * represents the current optimal solution vector, that is, the butterfly with the smallest fitness function value; f(z i ) represents the scent value of the i-th butterfly.
[0062] Local search phase:
[0063] When the butterfly cannot sense the surrounding fragrance, it will move randomly. This process is the local search of BOA. The specific calculation formula is:
[0064]
[0065] in, They represent the solution vectors of the jth butterfly and the kth butterfly in the tth iteration respectively. In the foraging process of butterflies, both global and local searches will occur. Therefore, a switching probability p is set to switch between ordinary global search and intensive local search. In each iteration, a random number r is randomly generated using formula (5) and compared with the switching probability p to decide whether to perform global search or local search. The specific formula is as follows:
[0066] r=rand(0,1)(5
[0067] From the design of the Butterfly Optimization Algorithm (BOA), it can be seen that each butterfly will move towards the optimal butterfly individual because of the fragrance. This optimizes the position of the butterfly individual update to a certain extent. However, in the global search stage, the random number r prevents the butterfly individual from moving quickly to the position of the best butterfly, resulting in a decrease in the convergence speed. Secondly, in the local search stage, when the butterfly individual cannot perceive the fragrance nearby, it performs a random search near itself. Due to the limited search range, the probability of the butterfly individual moving to the optimal butterfly individual is low. At the same time, when the optimal value near itself is searched, it is difficult to jump out of the local optimum.
[0068] Therefore, if Figure 1 As shown, the present invention discloses a mobile robot path planning method based on an improved butterfly optimization algorithm. First, an improved butterfly optimization algorithm is designed. S1, a dynamic sensory modality is introduced in the butterfly fragrance calculation stage of the original butterfly optimization algorithm, a selection factor of a genetic algorithm is introduced in the global search stage of the original butterfly optimization algorithm, and a variation factor of dynamic parameter optimization is introduced in the local search stage of the original butterfly optimization algorithm to obtain an improved butterfly optimization algorithm with a faster convergence speed in the iteration process; a dynamic sensory modality c is introduced in the butterfly fragrance calculation stage of the BOA algorithm i , so that as the iteration continues, each butterfly will emit a stronger fragrance, accelerating the convergence speed; then this paper makes improvements in the global search stage and local search stage of the BOA algorithm. On the one hand, in the global search stage, the selection factor of the genetic algorithm is introduced to replace the random number r, so that the next generation of butterfly individuals move faster to the optimal butterfly individual of the current iteration, thereby improving the convergence of the algorithm. On the other hand, in the local search stage, the dynamic mutation factor and the current optimal butterfly individual are introduced to increase the population diversity, so that the butterfly's search range increases while moving towards the optimal butterfly, avoiding falling into the local optimum.
[0069] Specifically, during the entire search process of the butterfly optimization algorithm, each butterfly will emit fragrance, and each butterfly will move towards the target with the strongest fragrance. As the iterative process continues, each butterfly gradually approaches the optimal butterfly. In the iterative process, the dynamic sensory modality c can be introduced to i To replace the sensory modality c in formula (1), update c to c i To speed up the convergence speed. Therefore, the calculation formula of butterfly scent after dynamic sensory mode optimization is:
[0070] f(z i )=c i I a (6)
[0071] Among them, c irepresents the sensory modal parameters at the current iteration i, I is the stimulus factor, a is the response intensity, and its value range is (0,1), z i represents the i-th butterfly, f(z i ) is a measure of the fragrance value of each butterfly. In this embodiment, the stimulation factor I is inversely proportional to the adaptability function fit, and the adaptability function is specifically:
[0072]
[0073] Where n represents the total number of initial butterfly groups, Z i represents the path of the i-th butterfly, d is the dimension of the butterfly, that is, the number of nodes on the butterfly's path, k ranges from 1 to d-1, (x k ,y k )、(x k+1 ,y k+1 ) are the node coordinates on the butterfly’s path, where (x k+1 ,y k+1 ) is (x k ,y k )’s next node’s coordinates.
[0074] Dynamic sensory mode c i The update formula is as follows:
[0075]
[0076] Among them, c i represents the sensory modal parameters at the current i-th iteration, c i+1 represents the sensory modal parameters of the next iteration, N iter is the total number of iterations. As i increases, c i+1 It also gradually increases, the convergence speed gradually accelerates, and the search efficiency also improves accordingly.
[0077] Improvements to the global search algorithm:
[0078] In the global search process of the butterfly optimization algorithm, the random number r is an important parameter of the algorithm. r mainly determines the moving position of the next generation of butterflies. When formula (5) is used to calculate r, the butterflies obtained by the algorithm are relatively scattered, which will cause the next generation of butterfly individuals to move slower toward the current optimal individual, thereby reducing the convergence speed of the algorithm. If r is too large, the convergence speed is extremely fast, and the butterfly individual always stays at the current optimal butterfly individual position and falls into the local optimum; if r is too small, the butterfly individual performs random search, which increases the diversity of the population, but the convergence speed is extremely slow. In order to improve the convergence speed of the algorithm while ensuring the diversity of the population, the selection factor p in the genetic algorithm is introduced. i To replace the random number r:
[0079]
[0080] Where M is the number of butterflies in the population. The selection factor p i represents the probability of the i-th butterfly moving to the best butterfly under the current number of iterations. i The larger the value, the more likely the next generation of the butterfly will be. The optimal solution vector g of the butterfly under the current number of iterations * The greater the possibility of movement, the formula after optimizing the global search in the butterfly optimization algorithm using the selection factor in the genetic algorithm is:
[0081]
[0082] Improvements to the local search algorithm:
[0083] In the local search process of the butterfly optimization algorithm, since butterflies cannot perceive the surrounding fragrance, they only move randomly near their own positions. The individual movement range is limited, so the probability of reaching the optimal position is low, and it is easy to fall into the local optimum. In order to solve the above problem, the mutation factor is introduced to improve the local search in the butterfly optimization algorithm. The mutation factor p of dynamic parameter optimization is c The introduction of the optimal butterfly individuals increases the population diversity, expands the exploration range of butterfly individuals, increases the probability of moving to the optimal position, and avoids falling into the local optimum.
[0084] At the beginning of the local search, the mutation factor p c The value of is large, resulting in the butterfly position vector The possibility of mutation is large; however, as the number of iterations increases, the possibility of mutation decreases. At the end of the iteration, the probability of mutation gradually decreases from b to 0. Therefore, in the early stage of local search, the algorithm can jump out of the local optimum and find the optimal solution; in the late stage of iteration, when the convergence requirements are met, the mutation factor approaches 0, making the search stable. The specific expression is:
[0085]
[0086] Among them, t is the current iteration number, N iter is the total number of iterations, and b is the weight coefficient of the mutation factor. From the above formula, we can see that the value range of the mutation factor is [0, b], and the value decreases with the increase of the number of iterations. The formula after local search optimization is:
[0087]
[0088] in, represents the solution vector of the ith butterfly in the t+1th iteration, represents the solution vector of the ith butterfly in the tth iteration, denote the solution vectors of the randomly selected j-th butterfly and the k-th butterfly in the t-th iteration, r is a random number, and f(z i ) represents the scent value of the i-th butterfly, g * represents the current optimal solution vector, that is, the butterfly with the smallest fitness function value; f(z i ) represents the scent value of the i-th butterfly.
[0089] After the improved butterfly optimization algorithm is established, S2, set the relevant parameters of the improved butterfly optimization algorithm and the number of butterflies; specifically, set the number of butterflies M, the initial sensory modality c i , response intensity a, maximum number of iterations N iter and the switching probability m.
[0090] S3, construct a grid map, set the starting point and end point of the mobile robot and initialize the number of butterflies;
[0091] S4, setting the adaptability function;
[0092] S5, calculating the fragrance of each butterfly according to formula (7) based on the improved butterfly optimization algorithm, and obtaining the best butterfly with the strongest initial fragrance;
[0093] S6. Based on the best butterfly with the strongest initial fragrance, the butterfly optimization algorithm is improved to iterate each butterfly, and the selection factor and the mutation factor are calculated to perform local search or global search; in each iteration, each butterfly randomly generates a random number r, and the switching probability m is compared with the random number r to determine whether each butterfly performs global search or local search;
[0094] S7, determine whether the maximum number of iterations has been reached, if so, jump to S8, otherwise, return to S6;
[0095] S8. Output the optimal path and fitness value, and end.
[0096] The pseudo code of this part is as follows:
[0097]
[0098]
[0099] Next, the improved butterfly optimization algorithm in the present invention is tested.
[0100] Firstly, the performance of the improved butterfly optimization algorithm (BOA_GA) and the butterfly optimization algorithm (BOA) is tested by using a benchmark function set; among them, the improved butterfly optimization algorithm shows better performance. Then, the search performance of the three algorithms, the A* algorithm, the butterfly optimization algorithm and the improved butterfly optimization algorithm, in a grid system with known environmental information is discussed and compared; among them, the improved butterfly optimization algorithm has an average reduction of 61.3% in convergence time and 4.01% in path length compared with the A* algorithm in multiple path planning, and an average reduction of 19.1% in convergence time and 2.85% in path length compared with the butterfly optimization algorithm. Finally, the butterfly optimization algorithm and the improved butterfly optimization algorithm are tested in actual sites; among them, the improved butterfly optimization algorithm shortens the path length by 4.82%.
[0101] Specifically, perform performance testing:
[0102] Each novel optimization algorithm must be tested with the benchmark optimization function. For this part of the performance test, the algorithm running environment is Microsoft Windows 11; MATLAB R2019b; processor AMD Ryzen 5 5600U; memory 16GB. The parameters are initialized according to the butterfly optimization algorithm proposed by Arora. In each run, 100 iterations are used as the termination criterion. For the butterfly optimization algorithm (BOA): the number of butterflies M = 100, the perception state c = 0.01, the response strength a = 0.1, and the switching probability m = 0.8. For the improved butterfly optimization algorithm (BOA_GA): the number of butterflies M = 100, the perception state c = 0.01, the response strength a = 0.1, the switching probability m = 0.8, and the weight coefficient b in the variation factor = 0.1.
[0103] In order to evaluate the performance of the improved butterfly optimization algorithm (BOA_GA) proposed in this paper and compare it with the butterfly optimization algorithm (BOA), this paper selected different subsets of the benchmark functions listed in Arora's paper, as shown in Table 1 below. Six different benchmark functions were simulated. Various characteristics of the algorithm were determined, such as fast convergence, obtaining a large number of local minimum points, the ability to jump out of local optimality, and avoiding premature convergence. In order to reduce statistical errors and generate statistically significant results, each function was repeated 30 times Monte Carlo runs. The mean and standard deviation of BOA and BOA_GA were recorded. A total of six benchmark functions were tested, and the test results are as follows Figure 2 The corresponding test data are shown in Table 2 below.
[0104] Table 1 Benchmark function set
[0105]
[0106]
[0107] From the performance test results Figure 2 It can be seen that compared with BOA, BOA_GA has a faster convergence speed and is closer to the optimal convergence result of the benchmark function, reflecting better performance. Specifically, the test results in the single-peak benchmark functions F2 and F6 show that BOA_GA has a slightly improved performance in terms of convergence speed compared with BOA; this shows that BOA_GA has the same excellent ability as BOA to quickly converge to the global optimum while avoiding premature convergence. The test results in the multi-peak benchmark functions F1, F3, F4 and F5 show that BOA_GA has significantly improved performance in terms of convergence speed compared with BOA; this shows that BOA_GA has both the best optimization performance and the highest stability like BOA, and BOA_GA converges faster and the convergence process is smoother. From the above performance test results, it can be seen that the improvements made by the improved butterfly optimization algorithm in the global search stage and the local search stage to address the problems of the butterfly optimization algorithm are feasible and reflect better performance.
[0108] Table 2 Benchmark function results
[0109]
[0110]
[0111] Table 2 lists the average and standard deviation values obtained by BOA and BOA_GA on various test bench benchmark functions. The average values in bold indicate superiority. From the performance test results in Table 2, it can be seen that compared with BOA, BOA_GA is closer to the optimal convergence results of the benchmark functions in both single-peak benchmark functions F2 and F6 and multi-peak benchmark functions F1, F3, F4 and F5 tests, reflecting better performance. This shows that BOA_GA has an excellent ability to quickly converge to the global optimum while avoiding premature convergence. BOA_GA also shows its dominant performance in most multimodal functions.
[0112] Simulation test and analysis:
[0113] This section mainly discusses the search performance of the three algorithms, A* algorithm, butterfly optimization algorithm, and improved butterfly optimization algorithm, in the grid system under known environmental information. In this part of the simulation experiment, the algorithm running environment is Microsoft Windows 11; MATLAB R2019b; processor AMD Ryzen 5 5600U; memory 16GB. The parameters are initialized according to the butterfly optimization algorithm proposed by Arora. In each run, 500 iterations are used as the termination criterion. For the butterfly optimization algorithm (BOA): the number of butterflies M = 30, the perception state c = 0.01, the response strength a = 0.1, and the switching probability m = 0.8. For the improved butterfly optimization algorithm (BOA_GA): the number of butterflies M = 30, the perception state c = 0.01, the response strength a = 0.1, the switching probability m = 0.8, and the weight coefficient b in the variation factor = 0.1.
[0114] In the case of the same grid environment map, the A* algorithm, butterfly optimization algorithm, and improved butterfly optimization algorithm are used for path planning respectively, and then the size of the environment and the coverage of obstacles are changed to reflect the effectiveness and superiority of the improved butterfly optimization algorithm for path search. The experimental environment maps in this part are all from the public data set of Moving AI Lab. The first environment MAP1 is a grid map of size 512×512, with the starting point coordinates of (146,434). The end point coordinates are changed and four path plannings are completed. The simulation results of the path planning of the three algorithms are as follows Figure 3 The second environment MAP2 is a 512×512 grid map with a starting point coordinate of (146,434). The end point coordinates are changed and four path plannings are completed. The simulation results of the path planning of the three algorithms are as follows Figure 4 As shown. The grid map size and obstacle coverage rate are different in different environments. Among them, the green square represents an obstacle, the white square represents a passable area, the green dot represents the starting position, the red dot represents the ending position, and the line graph represents the optimal path selected after multiple iterations. In the two grid map environments, the running time, path turning points and improved algorithm time reduction rate of the A* algorithm, butterfly optimization algorithm and improved butterfly optimization algorithm planning paths are shown in Table 3 below, and the path length and path ratio are shown in Table 4 below;
[0115] From the simulation test results Figure 3 and Figure 4It can be seen that in this environment, the A* algorithm, the butterfly optimization algorithm and the improved butterfly optimization algorithm can all plan a complete path that completely avoids obstacles. Table 3 lists the running time, the time reduction rate of the improved algorithm and the number of path turning points of the A* algorithm, the butterfly optimization algorithm and the improved butterfly optimization algorithm in two different grid maps, respectively, from the same starting point to four different end point paths. It can be seen that, on the one hand, from the convergence speed research, in the four path planning completed by the first grid map MAP1, the A* algorithm has the longest running time, and the improved butterfly optimization algorithm has the shortest running time, with an average time reduction of 53.2%; compared with the butterfly optimization algorithm, the average time reduction is 20.4%. At the same time, in the four path planning completed by the second grid map MAP2, the A* algorithm also has the longest running time, and the improved butterfly optimization algorithm has the shortest running time, with an average time reduction of 69.4%; compared with the butterfly optimization algorithm, the average time reduction is 17.7%. On the other hand, from the perspective of the number of inflection points, in the four path plannings completed on the first grid map MAP1, the average number of path inflection points of the A* algorithm is 357, the butterfly optimization algorithm is 2.5, and the improved butterfly optimization algorithm is 3. At the same time, in the four path plannings completed on the second grid map MAP2, the average number of path inflection points of the A* algorithm is 339, the butterfly optimization algorithm is 1.25, and the improved butterfly optimization algorithm is 1.25.
[0116] Table 3 Duration and number of inflection points of three algorithms
[0117]
[0118] Therefore, the above simulation test results show that compared with the A* algorithm, the butterfly optimization algorithm and the improved butterfly optimization algorithm have the advantages of short running time, fast convergence speed, fewer path inflection points and smoother paths; among them, the running time of the improved butterfly optimization algorithm is shortened by an average of 61.3%, and the number of path inflection points is reduced by an average of 346. At the same time, compared with the butterfly optimization algorithm, the improved butterfly optimization algorithm has the advantages of shorter running time and faster convergence speed, and the running time is shortened by an average of 19.1%, which is consistent with the performance test results and shows better performance.
[0119] Table 4 Path lengths of three algorithms
[0120]
[0121]
[0122] Table 4 lists the path lengths and path ratios of the A* algorithm, the butterfly optimization algorithm, and the improved butterfly optimization algorithm in two different grid maps, with the same starting point for four different end points. It can be seen from Table 4 that in the four path plannings carried out on the two grid maps, the path length ratios of the A* algorithm, the butterfly optimization algorithm, and the improved butterfly optimization algorithm are all greater than 1, indicating that among the paths planned by the three algorithms, the path length planned by the improved butterfly optimization algorithm is the shortest. In the grid map MAP1, compared with the butterfly optimization algorithm, the path length of the improved butterfly optimization algorithm is shortened by an average of 2.85%. In the grid map MAP2, compared with the A* algorithm, the path length of the improved butterfly optimization algorithm is shortened by an average of 4.01%.
[0123] In general, since turning will cause wear and tear on the robot in physical experiments, considering factors such as convergence time, number of path turning points, and total path length in the simulation test results of this part, it can be seen that the improved butterfly optimization algorithm shows better performance.
[0124] Finally, the AUTOLABOR robot was used to conduct tests in a field of 4.5m×6m. Figure 5 The position of the mobile robot is taken as the starting point. Figure 6 The robot moves to the car position as the end point. The car is 80cm long and 60cm wide (including tires).
[0125] Through simulation experiments, it can be seen that the performance of the improved butterfly optimization algorithm is better than that of the butterfly optimization algorithm. Therefore, in the physical experiment, the butterfly optimization algorithm is used to compare with the improved butterfly optimization algorithm. The black color in the map represents obstacles, the green line represents the planned path, and the yellow car pattern represents the car. Figure 7 This is the path planned by the butterfly optimization algorithm, with a length of 9.13 meters. Figure 8 This is the path planned by the improved butterfly optimization algorithm, with a length of 8.69 meters, which is 4.82% shorter.
[0126] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A mobile robot path planning method based on an improved butterfly optimization algorithm, characterized in that: include: S1. Introducing dynamic sensory modality into the butterfly scent calculation stage of the original butterfly optimization algorithm, introducing the selection factor of the genetic algorithm into the global search stage of the original butterfly optimization algorithm, and introducing the mutation factor of dynamic parameter optimization into the local search stage of the original butterfly optimization algorithm to obtain an improved butterfly optimization algorithm with faster convergence speed in the iterative process; In S1, the specific formula of the optimized butterfly fragrance obtained by introducing the dynamic sensory modality in the butterfly fragrance calculation stage of the original butterfly optimization algorithm is: ; in, Indicates the current The sensory modal parameters at the iteration, It is a stimulating factor. is the response intensity, ranging from , represents the i-th butterfly, It is a measure of the scent value of each butterfly; Introducing the selection factor in the genetic algorithm in the global search phase The specific calculation formula for the butterfly to perform global search is: ; in, Indicates A butterfly in the The solution vector in the iteration, Indicates A butterfly in the The solution vector in iterations; is the selection factor in the genetic algorithm; represents the current optimal solution vector, that is, the butterfly with the smallest fitness function value; Indicates The scent value of a butterfly; Introducing mutation factors for dynamic parameter optimization in the local search phase The specific calculation formula for the butterfly to perform local search is: ; in, Indicates A butterfly in the The solution vector in the iteration, Indicates A butterfly in the The solution vector in the iteration, , Represents the randomly selected Butterfly, A butterfly in the The solution vector in the iteration, is a random number, Indicates The scent of a butterfly, represents the current optimal solution vector, that is, the butterfly with the smallest fitness function value; S2, setting the relevant parameters of the improved butterfly optimization algorithm and the number of butterflies; S3, construct a grid map, set the starting point and end point of the mobile robot and initialize the number of butterflies; S4, setting the adaptability function; S5, calculating the fragrance of each butterfly based on the improved butterfly optimization algorithm, and obtaining the best butterfly with the strongest initial fragrance; S6, iterating each butterfly based on the best butterfly with the strongest initial fragrance by improving the butterfly optimization algorithm, calculating the selection factor and the mutation factor, so as to perform local search or global search; S7, determine whether the maximum number of iterations has been reached, if so, jump to S8, otherwise, return to S6; S8. Output the optimal path and fitness value, and end.
2. A mobile robot path planning method based on an improved butterfly optimization algorithm according to claim 1, characterized in that: The stimulating factor It is inversely proportional to the fitness function, which is specifically: ; Where n represents the total number of initial butterfly groups, represents the path of the i-th butterfly, d is the dimension of the butterfly, that is, the number of nodes on the butterfly's path, and k ranges from 1 to d-1. , )、( , ) are the node coordinates on the butterfly’s path, where ( , )for( , )’s next node’s coordinates.
3. A mobile robot path planning method based on an improved butterfly optimization algorithm according to claim 1, characterized in that: The specific formula of the dynamic sensory modality is: ; in, Indicates the current The dynamic sensory modal parameters at the iteration, represents the dynamic feeling modal parameters of the next iteration, is the total number of iterations.
4. A mobile robot path planning method based on an improved butterfly optimization algorithm according to claim 1, characterized in that: Selection Factors in Genetic Algorithms The specific formula is: ; Where M represents the number of butterflies in the population, Indicates The scent of a butterfly.
5. The mobile robot path planning method based on the improved butterfly optimization algorithm according to claim 1 is characterized in that: The mutation factor The specific formula is: ; in, is the current iteration number, is the total number of iterations, is the weight coefficient of the variation factor.
6. The mobile robot path planning method based on the improved butterfly optimization algorithm according to claim 1 is characterized in that: In S6, the switching probability m is set, and each butterfly randomly generates a random number r in each iteration. The switching probability m and the random number r are compared to determine whether each butterfly performs a global search or a local search.
7. A mobile robot path planning method based on an improved butterfly optimization algorithm according to claim 6, characterized in that: The specific formula of the random number r is as follows: 。