Disclosure of Invention
The invention aims to provide a mobile robot path planning method based on dynamic self-adaptive parameter adjustment, which can overcome the defects of slow convergence speed, easy sinking into local optimum and the like of the traditional mayday algorithm, and not only improves the quality of obtaining the global optimal solution of the robot path planning, but also improves the convergence speed.
The technical scheme adopted for solving the technical problems is as follows:
a mobile robot path planning method based on a dayfish algorithm of dynamic self-adaptive parameter adjustment comprises the following steps:
Initializing an environment, digitally encoding a motion environment, and mapping a 0-1 matrix obtained by encoding into a raster pattern model;
Step 2, initializing fixed parameters of the algorithm, namely the position x, the speed v, the number n, the positive attraction coefficient a 3, the vision coefficient beta, the random walk coefficient fl, the speed maximum value Velmax, the speed minimum value Velmin, the iteration number T and the dance coefficient dance of the male-female-type;
Step 3, updating the self-adaptive parameter value, namely positive suction coefficient a 1,a2 and inertia weight g
Step 4, evaluating individual fitness, finding out an individual optimal pbest and a group optimal position gbest, and calculating the fitness according to a formula (1);
Step 5, updating the male and female position speeds through formulas (2) - (5), and evaluating the fitness;
Where r p,rg is the Cartesian distance between x i and local and global optima, e is a random number of [ -1,1], and r mf is the Cartesian distance between male and female.
Step 6, sequencing male and female dayfles according to the fitness from low to high, and sequentially carrying out male and female mating through formulas (6) and (7);
offspring1=L*male+(1-L)*female (6)
offspring2=L*female+(1-L)*male (7)
where males are male parents, female is female parent, and L is a random value of [0,1 ].
Step 7, randomly dividing the offspring into male and female;
step 8, sorting male and female parents according to the fitness, reserving the first n excellent individuals, and updating the optimal positions of the individuals and the optimal positions of groups;
step 9, judging whether the iteration stop condition is met, if yes, executing step 10, otherwise, increasing the cycle number by 1, and executing step 3;
step 10 outputs the saved optimal path.
The method has the advantages that the method improves the f-type algorithm based on a dynamic self-adaptive parameter adjustment strategy, can obtain the global optimal solution, improves the efficiency and stability of path planning and solving, improves the balance of local searching capability and global searching capability through dynamic self-adaptive parameter adjustment, accelerates the execution efficiency of the algorithm, and improves the optimizing capability of the algorithm. Simulation experiment results show that the performance of the Alfa algorithm is obviously improved by adopting the novel dynamic self-adaptive parameter adjustment improvement strategy.
Detailed Description
The invention aims to provide a mobile robot path planning method of a dynamic self-adaptive parameter adjustment strategy, which overcomes the defects of slow convergence speed, easy local optimization and the like of the traditional dayf algorithm, improves the quality of obtaining the global optimal solution of the robot path planning, and improves the convergence speed.
In path planning research, environmental modeling is the primary work, and so far, there are many related environmental modeling methods applied to path planning problems, such as a grid graph method, a topology graph method, a visual graph method, and the like. The grid pattern method is widely applied due to the characteristics of simple modeling and easy realization, so the grid pattern method is selected as an environment modeling method. In the raster pattern model, a blank grid is typically used to represent a movable grid, and a black grid is used to represent an obstacle grid, i.e., a non-passable. FIG. 1 is a schematic diagram of a raster image environment.
In the process of path planning by the traditional dayfish algorithm, the inertia weight and the positive attraction coefficient are usually set to a fixed value, which makes the local searching capability and the global searching capability unbalanced, is easy to sink into local optimum and limits the iteration speed. After the inertia weight is set as the self-adaptive parameter, the particle can be given a larger speed in the early period of optimization, the capacity of searching the global optimal solution can be improved, and when the optimal solution is approached in the later period, the speed is reduced, so that the particle speed is not excessively high and deviates from an optimal position area, and the global optimal solution is missed and falls into local optimal. And after the positive attraction coefficient is also set as the self-adaptive parameter, the local optimization and the global optimization of the algorithm are kept balanced, the experience obtained from the algorithm is increased in the early stage, the diversity of the algorithm result is increased, the situation of being trapped into the local optimization is avoided, the later-stage experience is more from the group, and the accuracy of the result is increased.
In the improved dayf algorithm of dynamic adaptive parameter adjustment strategy, the adaptive parameters are set as in formulas (8) - (10)
The technical scheme adopted for solving the technical problems is as follows:
A mobile robot path planning method for an improved dayf algorithm for dynamic adaptive parameter adjustment strategy, comprising the steps of:
Initializing an environment, digitally encoding a motion environment, and mapping a 0-1 matrix obtained by encoding into a raster pattern model;
Step 2, initializing fixed parameters of the algorithm, namely the position x, the speed v, the number n, the positive attraction coefficient a 3, the vision coefficient beta, the random walk coefficient fl, the speed maximum value Velmax, the speed minimum value Velmin, the iteration number T and the dance coefficient dance of the male-female-type;
Step 3, updating the self-adaptive parameter value, namely positive suction coefficient a 1,a2 and inertia weight g
Step 4, evaluating individual fitness, finding out an individual optimal pbest and a group optimal position gbest, and calculating the fitness according to a formula (1);
Step 5, updating the male and female position speeds through formulas (2) - (5), and evaluating the fitness;
Where r p,rg is the Cartesian distance between x i and local and global optima, e is a random number of [ -1,1], and r mf is the Cartesian distance between male and female.
Step 6, sorting male and female dayfles according to the fitness from low to high, and carrying out male and female mating by the formulas (6) and (7) in sequence
offspring1=L*male+(1-L)*female (6)
offspring2=L*female+(1-L)*male (7)
Where males are male parents, female is female parent, and L is a random value of [0,1 ].
Step 7, randomly dividing the offspring into male and female;
step 8, sorting male and female parents according to the fitness, reserving the first n excellent individuals, and updating the optimal positions of the individuals and the optimal positions of groups;
step 9, judging whether the iteration stop condition is met, if yes, executing step 10, otherwise, increasing the cycle number by 1, and executing step 3;
step 10 outputs the saved optimal path.
The method has the advantages that the method improves the f-type algorithm based on a dynamic self-adaptive parameter adjustment strategy, can obtain the global optimal solution, improves the efficiency and stability of path planning and solving, improves the balance of local searching capability and global searching capability through dynamic self-adaptive parameter adjustment, accelerates the execution efficiency of the algorithm, and improves the optimizing capability of the algorithm.
The effect of the invention can be further illustrated by the following simulation experiments:
To verify the correctness and rationality of the method, the algorithm is simulated under a 20 x 20 grid environment model using python language programming and compared to a basic f-algorithm. The algorithm parameters are set to 10 for the male and female population sizes in the traditional mayday algorithm, the inertia weight g=0.8, the positive attraction coefficient a1=1.0, a2=1.5, a3=1.5, the random walk coefficient fl=0.5, the speed maximum Velmax =20, the speed minimum Velmin = -20, the maximum iteration number T=100, the dance coefficient dance =0.5, and the algorithm g, a1 and a2 are set to the adaptive parameters, and the rest parameters are the same as above.
The simulation results are shown in fig. 2 and 3. The analysis of the simulation result data shows that the optimal path length obtained by the traditional Algorithm is 32.6427, the minimum iteration number is 45 generations, the path length obtained by the dynamic self-adaptive parameter adjustment Algorithm is 28.3583, and the minimum iteration number is 11 generations.
In order to further verify the stability of the improved algorithm provided by the invention, an improved ant colony algorithm recorded in an article of an intelligent trolley path planning based on the ant colony algorithm published in 2021 by journal computer simulation is selected, and the simulation is performed by using the method of the invention under a more complex grid environment of 30 multiplied by 30 recorded in the article.
The simulation results are shown in fig. 4 and 5. It can be seen from the figure that 60 generations of improved dayf algorithm are needed in the literature to converge to the optimal solution 42, while the adaptive parameter adjustment dayf algorithm of the present invention can find the optimal solution 41.7812 only by 18 generations, and in addition, the number of angles of the optimal path obtained by the two algorithms is 8 and 3 respectively.
The comparison simulation can be used for obtaining the conclusion that the dynamic self-adaptive parameter adjustment strategy is adopted to improve the traditional dayf algorithm, so that the early-stage searching effect of the algorithm can be effectively improved, the convergence rate of the algorithm is improved, and the optimizing result and smoothness are better than those of the traditional dayf algorithm and the literature improvement algorithm.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the invention in any way, and any person skilled in the art may make many possible variations and modifications to the technical solution of the present invention or modify the same into equivalent embodiments without departing from the scope of the technical solution of the present invention. Therefore, any simple modification, equivalent substitution, equivalent variation and modification of the above embodiments according to the technical substance of the present invention, which do not depart from the technical solution of the present invention, still fall within the scope of the technical solution of the present invention.