A mobile robot path planning method based on three-swarm particle swarm optimization strategy
By adopting three types of swarm optimization strategies in mobile robot path planning, combining adaptive velocity particle swarm optimization, linear cognitive coefficient adjustment strategy, improved YOLOv11 model, and random search strategy, the problems of local optimization and premature convergence are solved, and the stability and accuracy of path planning are improved.
Patent Information
- Application Number
- CN202411793449.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-12-09
AI Technical Summary
The existing particle swarm optimization algorithms are prone to local optimization and premature convergence in mobile robot path planning, and lack environmental constraints, resulting in insufficient stability and accuracy of path planning.
Using a method based on three-swarm particle swarm optimization strategy, the adaptive velocity particle swarm optimization algorithm, linear cognitive coefficient adjustment strategy combined with the improved YOLOv11 deep learning model, and a random search strategy, is divided into three subpopulations for particle state updates to improve the stability and accuracy of path planning.
It effectively solves the problems of local optimization and premature convergence, improves the stability and accuracy of path planning, and enhances the adaptability to environmental constraints.
Smart Images

Figure CN119270879B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of mobile robots, and in particular relates to a mobile robot path planning method based on a three-swarm particle swarm optimization strategy. Background Art
[0002] With the rapid development of robotics technology and the widespread penetration of unmanned equipment in various industries, the core position of robots in the fields of intelligent manufacturing, medical health, logistics distribution and education has become increasingly prominent. In the key technical system of mobile robots, the navigation function occupies a vital position. It is not only related to the robot's accurate perception of its own position, but also involves efficient and safe path planning and execution.
[0003] As a core component of navigation technology, path planning aims to generate the optimal or suboptimal path from the starting point to the end point while strictly avoiding collisions with obstacles. Its core is to ensure that the robot arrives at the destination safely and minimize the cost of the movement process, including key factors such as distance, energy consumption and time.
[0004] Path planning technology can be divided into two categories: global path planning and local path planning, depending on the degree of understanding of environmental information. Global path planning relies on detailed environmental data acquired in advance (such as maps, obstacle locations, starting and ending point information) to build a complete collision-free path, which is particularly suitable for mission scenarios that require long-term or continuous execution, such as Dijkstra algorithm, artificial potential field method, and rapidly exploring random trees (RRT). Local path planning focuses on using real-time sensor data of robots to dynamically adjust the path to flexibly respond to unknown or changing obstacles, such as ant colony optimization (ACO), genetic algorithm (GA), particle swarm optimization (PSO) and neural network-based methods.
[0005] Although heuristic algorithms have significant advantages in efficiency, they are still subject to great attention due to their lack of guarantee in finding the optimal solution and their tendency to fall into local optimality. However, traditional particle swarm optimization (PSO) algorithms are prone to local optimality and premature convergence in path planning, which limits their performance. Summary of the invention
[0006] In view of the deficiencies in the prior art, the present invention provides a mobile robot path planning method based on a three-swarm particle swarm optimization strategy, which can solve the problems of lack of environmental constraints, easy falling into local optimality and premature convergence, and improve the stability and accuracy of path planning.
[0007] The present invention provides the following technical solutions:
[0008] A mobile robot path planning method based on three-swarm particle swarm optimization strategy, comprising:
[0009] Obtain the current position of the mobile robot, the target position, and the positions and sizes of all obstacles between the current position and the target position;
[0010] The particle swarm optimization algorithm based on three swarms is used to find the optimal path between the current position and the target position of the mobile robot. The specific process is as follows:
[0011] Generate a particle swarm randomly and divide it into three sub-populations;
[0012] The first sub-population uses the adaptive velocity particle swarm optimization algorithm to update the particle state. The second sub-population uses the linear cognitive coefficient adjustment strategy combined with the improved YOLOv11 deep learning model to update the particle state. The third sub-population uses random search and incorporates random components into the velocity update process to update the particle state.
[0013] After each state update of the sub-population, the global optimal solution of each sub-population is compared with the fitness value of the overall global optimal solution of the particle swarm to retain or update the overall global optimal solution of the particle swarm and pass it to each sub-population;
[0014] Repeat the state update of the sub-population and the overall global optimal solution update until the termination condition is met, and then output the overall global optimal solution of the particle swarm. The overall global optimal solution is the optimal path of the mobile robot.
[0015] Optionally, the first subpopulation updates the particle state by an adaptive velocity particle swarm optimization algorithm, including velocity update and position update of particle i in the first subpopulation, and when updating the velocity of the particle, introduces the optimal solution of the randomly selected particle;
[0016] The velocity update equation of particle i in the first sub-population is:
[0017]
[0018] The position update equation of particle i in the first sub-population is:
[0019]
[0020] in, and are the d-th dimension velocities of particle i at time t+1 and t, respectively. and are the positions of particle i in the dth dimension at time t+1 and t, respectively. is the inertia weight of the first subpopulation, For the entire particle group Moment The global optimal position of Particles selected from a random uniform distribution The optimal position of the individual in the dth dimension at time t; is the discriminant function representing the velocity direction of particle i in the dth dimension at time t; A random number used to adjust the particle movement step size; is the individual optimal position of particle i in the dth dimension at time t;
[0021] The inertia weight for:
[0022]
[0023] in, for The corresponding moderation value; for The corresponding moderation value;
[0024] The fitness value of particle i in the first subpopulation for:
[0025]
[0026] in, and are the inertia weight for balancing the path length and the inertia weight for balancing the collision risk in the first subpopulation, respectively. For particles The number of segments of the corresponding path, and Points The horizontal and vertical coordinates of and Points The horizontal and vertical coordinates of and Represents particles The starting point and end point of the ath segment in the corresponding path, For particles The total number of obstacles in the corresponding path, is the current position of the mobile robot, is the location of the obstacle, A constant that adjusts the collision risk in the first subpopulation.
[0027] Optionally, the second subpopulation adopts a linear cognitive coefficient adjustment strategy combined with an improved YOLOv11 deep learning model to update the particle state, including:
[0028] At each state update, the trained improved YOLOv11 model is used to predict the fitness values of the paths corresponding to all particles of the second sub-population; the speed and position of the particles are updated according to the predicted fitness value and the actual fitness value of each path; when updating the speed of the particles, the individual cognitive coefficient and the social cognitive coefficient are linearly adjusted.
[0029] Optionally, the improved YOLOv11 model introduces multi-scale feature fusion and dual-branch prediction into the YOLOv11 model.
[0030] Optionally, the trained improved YOLOv11 model is used to predict fitness values of all particles of the second subpopulation, including predicting fitness values of particle j of the second subpopulation, and obtaining the predicted fitness value of particle j. The specific process is as follows:
[0031] Extract the path feature vector corresponding to particle j , and perform multi-scale feature fusion operation; the path feature vector Including the total length of the path, the turning angle in the path and the minimum distance between each point on the path and the obstacle;
[0032] Input the feature map after multi-scale feature fusion into the attention mechanism;
[0033] Performing dual-branch prediction on the feature graph processed by the attention mechanism, wherein the dual-branch prediction includes path length prediction and collision risk prediction;
[0034] The results of the double-branch prediction are weighted to obtain the path prediction fitness value corresponding to the final particle j ;
[0035] =
[0036] in, For the whole The set of weights of the model, is the fully connected layer operation, is the convolution operation, is the feature map processed by the attention mechanism, and They are the weight matrices of the convolutional layers corresponding to path length prediction and collision risk prediction respectively; and They are the weight matrices of the fully connected layers corresponding to path length prediction and collision risk prediction, respectively.
[0037] Optionally, the path feature vector corresponding to the extracted particle j is , and perform multi-scale feature fusion operation. The specific process of multi-scale feature fusion operation is:
[0038] The path feature vector corresponding to particle j Perform convolution, downsampling, upsampling and splicing operations to obtain feature maps after multi-scale feature fusion;
[0039]
[0040]
[0041]
[0042]
[0043] in, , and They are feature maps of three different scales. , and are the convolution kernel weights of three scales respectively. is the feature map after multi-scale feature fusion, is the convolution operation, is the downsampling operation, is the upsampling operation, It is the concatenation operation of feature maps.
[0044] Optionally, the updating of the speed and position of each particle according to the predicted fitness value and the actual fitness value of each particle includes updating the speed and position of particle j in the second sub-population;
[0045] Among them, the velocity update formula of particle j in the second sub-population is:
[0046]
[0047] The position update formula of particle j in the second sub-population is:
[0048]
[0049] in, and are the d-th dimension velocities of particle j at time t+1 and t, respectively. and are particle j in and the position in d dimension at time t, is the inertia weight of the second subpopulation, and are the individual cognition coefficient and social cognition coefficient of the second sub-population, and are two random numbers set for the second sub-population, is the adjustment factor, is the individual optimal position of particle j in d dimension at time t, is the position of particle j in d dimension at time t, For the entire particle group Moment The global optimal position of is the predicted fitness value of particle j output by the trained YOLOv11 model, is the actual fitness value of particle j;
[0050] The actual fitness value of the particle j for:
[0051]
[0052] in, For particles The total length of the corresponding path, and are the weight coefficients of the model’s balanced path length and balanced collision risk, respectively; For particles The total number of obstacles in the corresponding path, For particles A node in the path corresponding to The distance of obstacles, For particles The corresponding path is used to adjust the constant of the sensitivity of the inflation risk calculation;
[0053] The individual cognitive coefficient for:
[0054]
[0055] The social cognition coefficient for:
[0056]
[0057] in, and are the minimum and maximum values set for the individual cognitive coefficients, and are the minimum and maximum values set for the social cognition coefficient, is the maximum number of iterations, is the current iteration number.
[0058] Optionally, the third subpopulation adopts random search and incorporates random components in the velocity update process to perform particle state update, including updating the velocity and position of particles q in the third subpopulation;
[0059] The velocity update formula of particle q in the third sub-population is:
[0060]
[0061] The position update formula of particle q in the third sub-population is:
[0062]
[0063] in, and are the d-th dimension velocities of particle q at time t+1 and t, respectively. is the inertia weight of the third sub-population, and The individual cognition coefficient and social cognition coefficient of the third sub-population are respectively, , and are three random numbers set for the third sub-population, is the individual optimal position of particle q in d dimension at time t, For the entire particle group Moment The global optimal position of and are the positions of particle q in the dth dimension at time t+1 and t, respectively. is the coefficient of the random component, For the range arrive A random component uniformly distributed between .
[0064] Optionally, after each sub-population state is updated, a condition is included to determine whether the current sub-population triggers random perturbation, and when the random perturbation is triggered, random perturbation is added to the speed and position of each particle in each sub-population:
[0065] After adding random disturbance, the fitness value of each particle is recalculated. If the fitness value of the particle after the disturbance is better, the position and velocity after the disturbance are used as the state update result of the particle. Otherwise, the position and velocity before the disturbance are used as the state update result of the particle.
[0066] Optionally, the condition for triggering random disturbance is: whether the number of iterations in which the global optimal solution of the current sub-population has not been updated reaches a set threshold.
[0067] Compared with the prior art, the present invention has the following beneficial effects:
[0068] The first subpopulation of the three-population particle swarm optimization algorithm of the present invention is equivalent to the exploration subpopulation, focusing on enhancing the exploration ability of the population on the global solution space; the second subpopulation is equivalent to the development subpopulation, focusing on more detailed search in the existing optimal solution area to find a better solution; the third subpopulation is equivalent to the enhanced subpopulation, focusing on random search, not relying on local and global optimal solutions, thereby increasing the chance of discovering new solutions; combining the subpopulations of three different strategies can solve the problems of lack of environmental constraints, easy to fall into local optimality and premature convergence in the existing path planning algorithm, thereby improving the overall stability and robustness of the three-population particle swarm optimization algorithm, and improving the stability and accuracy of path planning. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] Figure 1 It is a flow chart of the present invention for finding the optimal path between the current position and the target position of a mobile robot by using a three-swarm particle swarm optimization algorithm.
[0070] Figure 2 It is a path diagram generated by four algorithms in four environments in the specific example provided by the present invention.
[0071] Figure 3 These are the statistical results of path planning using four algorithms in the specific example provided by the present invention.
[0072] Figure 4 These are four algorithm fitness value training curves in the specific example provided by the present invention. DETAILED DESCRIPTION
[0073] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.
[0074] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the term "comprising" and any of its variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0075] Example 1
[0076] A mobile robot path planning method based on a three-swarm particle swarm optimization strategy is provided, comprising the following steps:
[0077] Step I: Obtain the current position of the mobile robot, the target position, and the positions and sizes of all obstacles between the current position and the target position.
[0078] The method of obtaining the current position of the mobile robot and the position and size of the obstacle refers to the prior art. Optionally, the method can be obtained from a global map or a sensor installed on the travel path.
[0079] Step II: Use the three-swarm based particle swarm optimization algorithm to find the optimal path between the current position and the target position of the mobile robot.
[0080] like Figure 1 As shown, the specific steps of step II are:
[0081] S1: Randomly generate a particle swarm and divide it into three sub-populations.
[0082] Initialize the three sub-populations; specifically, randomly set the initial positions and velocities of the particles in the three sub-populations. At the same time, determine the initial local optimal position for each particle, find the particle position with the best fitness in the entire particle swarm, and set it as the global optimal position.
[0083] The number of particles in the three subpopulations is equal.
[0084] S2: The first subpopulation updates the particle state through the adaptive speed particle swarm optimization algorithm, the second subpopulation adopts the linear cognitive coefficient adjustment strategy combined with the improved YOLOv11 deep learning model to update the particle state, and the third subpopulation adopts random search and incorporates random components in the speed update process to update the particle state.
[0085] In the process of particle state updating, different methods are used to update the speed and position of particles according to the characteristics of the sub-populations; each particle represents a path; specifically, the first sub-population considers the particle solution quality and the optimal solution of randomly selected particles when updating the speed; the second sub-population adopts a linear cognitive coefficient adjustment strategy; the third sub-population introduces a larger random component.
[0086] After the status of each sub-population is updated, the following operations are performed:
[0087] The fitness values of all particles in each sub-population are calculated separately. The fitness value evaluates the quality of the path represented by the particle based on the path length and collision risk, that is, the fitness value is used as a rating indicator for the particle state update effect.
[0088] The fitness value is compared with the historical individual optimal fitness value of the particle. If the current fitness value is better, the local optimal solution is updated.
[0089] The fitness value of the particle is compared with the global optimal fitness value of the current sub-population. If it is better, the global optimal solution of the current sub-population is updated.
[0090] S3: After each state update of the sub-population, the global optimal solution of each sub-population is compared with the fitness value of the overall global optimal solution of the particle swarm to retain or update the overall global optimal solution of the particle swarm and pass it to each sub-population.
[0091] The update of the overall global optimal solution enables each sub-population to share the current optimal information, increasing the efficiency of convergence, while retaining the diversity of search through the diversified strategies of different sub-populations.
[0092] S4: Repeat the state update of the sub-population and the update of the overall global optimal solution until the termination condition is met, and then output the overall global optimal solution of the particle swarm. The overall global optimal solution is the optimal path of the mobile robot.
[0093] The termination condition is the maximum number of iterations of the Three-Population Particle Swarm Optimization (TPPSO), which is used to control when the TPPSO algorithm stops searching.
[0094] The first subpopulation of the TPPSO algorithm is equivalent to the exploration subpopulation, which focuses on enhancing the population's ability to explore the global solution space. The second subpopulation is equivalent to the development subpopulation, which focuses on more detailed searches within the existing optimal solution area to find better solutions. The third subpopulation is equivalent to the total enhanced subpopulation, which focuses on random searches and does not rely on local and global optimal solutions, thereby increasing the chances of discovering new solutions. Combining subpopulations with three different strategies can solve the problems of lack of environmental constraints, easy falling into local optimality and premature convergence in existing path planning algorithms, thereby improving the overall stability and robustness of the TPPSO algorithm and improving the stability and accuracy of path planning.
[0095] In some other embodiments, step II further includes the following steps:
[0096] After each sub-population state is updated, it is determined whether the current sub-population has triggered the random perturbation condition, and when the random perturbation is triggered, random perturbations are added to the speed and position of each particle in each sub-population:
[0097] After adding random disturbance, the fitness value of each particle is recalculated. If the fitness value of the particle after the disturbance is better, the position and velocity after the disturbance are used as the state update result of the particle. Otherwise, the position and velocity before the disturbance are used as the state update result of the particle.
[0098] The condition for triggering random disturbance is: whether the number of iterations during which the global optimal solution of the current sub-population has not been updated reaches a set threshold.
[0099] Specifically, as the number of iterations increases, the algorithm may fall into a local optimal solution. For this reason, a random perturbation strategy is introduced to reactivate the algorithm's search process, get rid of the local optimal solution, enhance the diversity of particles, and explore the solution space more effectively; for the first sub-population and the second sub-population, an additional random increment is added to the speed update formula, and the particles of the first sub-population In the Add the velocity update formula in the dimension The random disturbance term, The random generation range is , the same is true for the particle j of the second sub-population. For the third sub-population (enhanced sub-population), the random offset of its position can be further increased , The random generation range is .
[0100] In this embodiment, step S2 also includes steps S2.1 to S2.3:
[0101] Step S2.1: The first sub-population updates the particle state through the adaptive velocity particle swarm optimization algorithm.
[0102] For the velocity update and position update of particle i in the first sub-population, when updating the velocity of the particle, the optimal solution of the randomly selected particle is introduced.
[0103] The principle of the first subpopulation algorithm is to enhance the exploration ability of the population in the global solution space by evaluating the quality of the particles and comparing their current fitness values with the global optimal solution. In the initialization phase of the algorithm, the positions of all particles are randomly set, and the individual optimum and the global optimum are initialized. During the iteration process, the particle speed is adjusted according to the fitness value of the particle to reflect its attraction to the global optimal solution. By introducing a counter to monitor the number of iterations in which the global optimal solution has not been improved, and applying random perturbations to the three subpopulations when the preset threshold is reached, the algorithm effectively enhances the population diversity and improves the ability to escape the local optimum. While promoting an extensive search of the global solution space, this strategy can revitalize the algorithm when the search is stagnant, achieving a balance between global exploration and local development, thereby increasing the possibility of discovering the global optimal solution.
[0104] The self-adaptive velocity particle swarm optimization (SAVPSO) algorithm significantly optimizes the particle search behavior by accurately defining the location of the feasible region, analyzing connectivity and shape complexity, and considering the ratio of the feasible region to the search space, ensuring that the algorithm can effectively plan a collision-free and efficient optimal path in a complex environment. In the context of mobile robot path planning, the feasible region corresponds to the area outside the obstacles. To adapt to this constraint, SAVPSO optimizes the particle velocity and position update equations of the first sub-swarm in the equation.
[0105] Specifically, the velocity update equation of particle i in the first sub-population is:
[0106]
[0107] The position update equation of particle i in the first sub-population is:
[0108]
[0109] in, and are the d-th dimension velocities of particle i at time t+1 and t, respectively. and are the positions of particle i in the dth dimension at time t+1 and t, respectively. is the inertia weight of the first sub-population, which is used to control the influence of the previous velocity of the particle on the current velocity. For the entire particle group Moment The global optimal position of Particles selected from a random uniform distribution The optimal position of the individual in the dth dimension at time t; is the discriminant function representing the velocity direction of particle i in the dth dimension at time t, with negative values indicating movement to the left and positive values indicating movement to the right; A random number used to adjust the particle movement step size; is the individual optimal position of particle i in the dth dimension at time t.
[0110] The inertia weight affects the search behavior. If the inertia weight value is relatively large, the particles will accelerate their movement, thereby enhancing their global search ability, because the particles can now explore a wider search space. Conversely, a smaller inertia weight value will cause the particles to slow down, which is conducive to a more in-depth search of the neighboring area, thereby improving the local search ability. In the field of optimization problems, the evaluation of the solution quality usually depends on the fitness value. When updating the speed, the subpopulation will consider the current solution quality of the particle (reflected by comparing the current fitness value with the global fitness value) and the optimal solution of the randomly selected particle. This strategy will enhance the global search ability of the particle, enabling it to explore the search space more widely and find potential better solutions. The setting range of the inertia weight is [0.5,1.5].
[0111] Inertia Weight for:
[0112]
[0113] in, for The corresponding moderation value; for The corresponding appropriate value.
[0114] The fitness value of particle i in the first subpopulation The calculation formula is:
[0115]
[0116] in, and are the inertia weight for balancing the path length and the inertia weight for balancing the collision risk in the first subpopulation, respectively. For particles The number of segments of the corresponding path, and Points The horizontal and vertical coordinates of and Points The horizontal and vertical coordinates of and Represents particles The starting point and end point of the ath segment in the corresponding path, For particles The total number of obstacles in the corresponding path, is the current position of the mobile robot, is the location of the obstacle, A constant that adjusts the collision risk in the first subpopulation.
[0117] In the calculation formula, the path length corresponding to particle i is obtained by calculating the sum of the Euclidean distances between adjacent points.
[0118] Step S2.2: The second subpopulation adopts the linear cognitive coefficient adjustment strategy combined with the improved YOLOv11 deep learning model to update the particle state.
[0119] Specifically, step S2.2.1: using the trained improved YOLOv11 model to predict the fitness values of the paths corresponding to all particles of the second sub-population;
[0120] Step S2.2.2: Update the speed and position of the particle according to the predicted fitness value and the actual fitness value of each path; when updating the speed of the particle, linearly adjust the individual cognitive coefficient and the social cognitive coefficient.
[0121] The improved YOLOv11 model introduces multi-scale feature fusion and dual-branch prediction into the YOLOv11 model.
[0122] Training the improved YOLOv11 model includes: using historical path data to construct a training set, taking the feature vector of each path as the input of the model, and the label fitness value of the path as the output target of the model; through supervised learning, using a loss function to compare the predicted fitness value of the path with the label fitness value to minimize the loss; and continuously adjusting the model parameters of the improved YOLOv11 model through back propagation until the improved YOLOv11 model meets the set target optimization conditions.
[0123] The loss function of the training process can be a common loss function, such as mean square error loss.
[0124] The fitness value of particle j in the second sub-population is predicted to obtain the predicted fitness value of particle j. The specific process is as follows:
[0125] Step (a): Extract the path feature vector corresponding to particle j , and perform multi-scale feature fusion operations; path feature vector It includes the total length of the path, the turning angles in the path, and the minimum distance between each point on the path and obstacles.
[0126] The specific process of multi-scale feature fusion operation is as follows: the path feature vector corresponding to particle j Convolution, downsampling, upsampling and splicing operations are performed to obtain the feature map after multi-scale feature fusion.
[0127] The formula is:
[0128]
[0129]
[0130]
[0131]
[0132] in, , and They are feature maps of three different scales. , and They are the convolution kernel weights of three scales, which are used to extract features of different scales. is the feature map after multi-scale feature fusion, is a convolution operation used to extract features. Downsampling operations, such as maximum pooling, are used to reduce the spatial resolution of feature maps. Upsampling operations, such as bilinear interpolation, are used to restore the spatial resolution of feature maps. It is the concatenation operation of feature maps, which is used to merge feature maps of different scales.
[0133] Step (b): Input the feature map after multi-scale feature fusion into the attention mechanism.
[0134] The specific formula is:
[0135]
[0136]
[0137]
[0138]
[0139]
[0140]
[0141] in, is a convolution operation used to generate an attention map. is the activation function, which converts the feature map into an attention map. and are the convolution kernel weights for generating channel attention maps and spatial attention maps, respectively. is the channel attention map, is the spatial attention map, is an element-wise multiplication for applying the attention map to the feature map, is the final attention map, It is the feature map processed by the attention mechanism;
[0142] Step (c): Perform dual-branch prediction on the feature map processed by the attention mechanism. The dual-branch prediction includes path length prediction and collision risk prediction.
[0143] Dual branch prediction can predict path quality more accurately.
[0144] The specific formula is:
[0145]
[0146]
[0147] in, is the predicted value of the path length, is the predicted value of collision risk; is the fully connected layer operation, and They are and The weight matrix of the corresponding convolutional layer; and They are and The corresponding weight matrix of the fully connected layer.
[0148] Step (d): Weight the results of the dual-branch prediction to obtain the final path prediction fitness value corresponding to particle j ;
[0149] Weight the results of the dual-branch prediction to obtain the final path prediction fitness value ;
[0150]
[0151] in, and They are and The weight coefficient of .
[0152] Combining the above formulas, we can know that:
[0153] =
[0154] in, For the whole The set of weights of the model, is the fully connected layer operation, is the convolution operation, is the feature map processed by the attention mechanism, and They are the weight matrices of the convolutional layers corresponding to path length prediction and collision risk prediction respectively; and They are the weight matrices of the fully connected layers corresponding to path length prediction and collision risk prediction, respectively.
[0155] Step S2.2.2 includes updating the velocity and position of particle j in the second sub-population.
[0156] Among them, the velocity update formula of particle j in the second sub-population is:
[0157]
[0158] The position update formula of particle j in the second sub-population is:
[0159]
[0160] in, and are the d-th dimension velocities of particle j at time t+1 and t, respectively. and are particle j in and the position in d dimension at time t, is the inertia weight of the second subpopulation, and are the individual cognition coefficient and social cognition coefficient of the second sub-population, and are two random numbers set for the second sub-population, is the adjustment factor, is the individual optimal position of particle j in d dimension at time t, is the position of particle j in d dimension at time t, For the entire particle group Moment The global optimal position of is the predicted fitness value of particle j output by the trained YOLOv11 model, is the actual fitness value of particle j;
[0161] The actual fitness value of the particle j for:
[0162]
[0163] in, For particles The total length of the corresponding path, and are the weight coefficients of the model’s balanced path length and balanced collision risk, respectively; For particles The total number of obstacles in the corresponding path, For particles A node in the path corresponding to The distance of obstacles, For particles The corresponding path is used to adjust the constant of the sensitivity of the inflation risk calculation.
[0164] The calculation of the path label fitness value of the improved YOLOv11 model during the training process refers to the formula of the actual fitness value of the path.
[0165] Step S2.2.2 also includes linearly adjusting the individual cognitive coefficient and the social cognitive coefficient.
[0166] Individual cognitive coefficient for:
[0167]
[0168] Social Cognition Coefficient for:
[0169]
[0170] in, and are the minimum and maximum values set for the individual cognitive coefficients, and are the minimum and maximum values set for the social cognition coefficient, is the maximum number of iterations, is the current iteration number.
[0171] Step S2.3: The third subpopulation uses random search and incorporates random components into the velocity update process to update the particle state.
[0172] The third subpopulation is more inclined to random search rather than relying solely on local and global optimal solutions. Adding a larger random component to the speed update formula reduces the influence of individual and global optimal solutions. Reducing the influence of local and global optimal solutions in the speed update formula can make particles more independent and random during the search process, thereby increasing the chance of discovering new solutions.
[0173] The velocity update formula of particle q in the third sub-population is:
[0174]
[0175] The position update formula of particle q in the third sub-population is:
[0176]
[0177] in, and are the d-th dimension velocities of particle q at time t+1 and t, respectively. is the inertia weight of the third sub-population, and The individual cognition coefficient and social cognition coefficient of the third sub-population are respectively, , and are three random numbers set for the third sub-population, is the individual optimal position of particle q in d dimension at time t, For the entire particle group Moment The global optimal position of and are the positions of particle q in the dth dimension at time t+1 and t, respectively. is the coefficient of the random component, For the range arrive A random component uniformly distributed between .
[0178] The calculation formula for solving the fitness value of each particle in the third sub-population can refer to the first sub-population.
[0179] Example 2
[0180] A specific example of a mobile robot path planning method based on a three-swarm particle swarm optimization strategy is provided.
[0181] Experimental environment and settings
[0182] 1. Hardware environment
[0183] The experiment was conducted on a computer equipped with an Intel i7 3.0GHz CPU and 32GB memory, running Windows 10. This hardware configuration can meet the computing requirements of the algorithm and ensure that the algorithm can efficiently handle various computing tasks in the path planning problem, such as updating the particle position and velocity, calculating fitness values, and processing different sub-populations.
[0184] 2. Software environment and algorithm implementation
[0185] Choose Python programming language to implement each algorithm. Python has rich libraries and concise syntax, which makes it easy to implement complex algorithm logic.
[0186] The simulation environment is set to a 10×10 standard grid map. In this map, each square represents a unit area, and the robot can move in these squares. Obstacles can be set in the map, and their positions are represented by coordinates.
[0187] For the PSO-based algorithm, a unified initialization procedure is used to determine the initial position and velocity of each particle. This initialization procedure randomly assigns an initial position and an initial velocity vector to each particle in the map space according to the set parameter range.
[0188] 3. The specific parameter settings are as follows:
[0189] PSO and SAVPSO algorithm parameters:
[0190] Cognitive coefficient , social cognition coefficient , inertia weight .
[0191] TPPSO algorithm parameters:
[0192] Maximum cognitive coefficient , the minimum value of the cognitive coefficient .
[0193] The criterion for triggering the random perturbation strategy is when the global optimal solution is observed to remain unchanged for 10 consecutive iterations.
[0194] Each algorithm uses the same fitness function, where the parameters associated with this function are and .
[0195] Other parameters of PSO based algorithms:
[0196] The number of iterations is set to 100, which means the algorithm will perform 100 iterations to find the optimal path.
[0197] The population size is also set to 100, that is, the number of particles participating in the calculation in each iteration is 100.
[0198] In each iteration, the robot's movement step is set to 1, which means that the robot moves one square on the map in each iteration.
[0199] The target sampling rate is set to 0.1, which means that the probability of sampling near the target is 10%. For example, if the target position is in a certain area of the map, then there is a 10% probability that the squares around the area will be selected as sampling points.
[0200] The nearest neighbor search radius is set to 1.5. This parameter is used to determine how far around a particle the search is for other particles or information.
[0201] 4. Algorithm Execution
[0202] 4.1 Initialization phase
[0203] In the initialization stage, according to the above parameter settings, the initial position of each particle in the three particle groups is generated by a random function. and speed For example, for a two-dimensional map ( ), the position of the particle can be In coordinate form, the speed can be At the same time, an initial local optimal position is determined for each particle , this position can be initially set as the initial position of the particle, and then updated according to the fitness value during the iteration. By comparing the fitness values of all particles (measured by the fitness value), the particle position with the best fitness is found as the global optimal position .
[0204] 4.2 Iteration process
[0205] Start iteration, and perform the following detailed operations in each iteration:
[0206] 4.2.1 Update of three sub-populations.
[0207] For each particle in the subpopulation, the fitness value is calculated according to the formula:
[0208] in, and is the weight coefficient, and are related to the path length and the number of obstacles, respectively. represents the robot position, Indicates The obstacle location, is a constant used to adjust the collision risk calculation. For example, in the calculation path length section, for adjacent path points and , find the distance between the two points by taking the square root of the sum of the squares of their coordinate differences, and then sum the distances between all path points. In the calculation of collision risk section, calculate the square of the distance between the robot and each obstacle and divide it by Then take the opposite of the exponent and sum it up for all obstacles.
[0209] 4.2.2 Local and global optimal solution update
[0210] The calculated fitness value is compared with the historical individual optimal fitness value of the particle. If the current fitness value is better, the local optimal solution is updated, that is, the local optimal position of the current particle is changed to Update to current location Then compare the fitness value with the global optimal fitness value. If it is better, update the global optimal solution, that is, change the global optimal position Update to the current particle position .
[0211] Update particle speed and position based on subpopulation characteristics, including:
[0212] Update the particle velocity and position of the first subpopulation:
[0213] According to the formula Calculating Inertia Weight In the formula, is the global optimal position The corresponding appropriate value, It is a particle In Dimension Previous Current Location The inertia weight is dynamically adjusted by comparing the global and current particle fitness values to balance the global and local search capabilities of the particle.
[0214] Update the particle speed according to the speed update formula of the first sub-population (combining the inertia part of the particle, consideration of individual optimality and global optimality, etc.) For example, in two dimensions, the velocity update formula might include the particle's and The velocity update part in the direction. The position update equation is , that is, the particle's position in the new iteration is the current position plus the updated velocity.
[0215] Update the particle speed and position of the second subpopulation:
[0216] According to the current number of iterations , update the cognitive coefficient and The specific formula is and For example, if the maximum number of iterations is , the current number of iterations , , ,but Similarly, we can calculate .
[0217] Update the particle speed using the speed update formula of the second sub-population .here and is a random number used to adjust the particle moving step. The position update equation is .
[0218] Update the particle velocity and position of the third sub-population:
[0219] Update the particle speed according to the third sub-population speed update equation .here is the inertia weight, and is the cognitive coefficient, , and is a random number, is a larger coefficient used to enhance the influence of random components. Indicated in arrive Uniform random distribution between .
[0220] 4.3 Determine whether random disturbance is triggered
[0221] If the perturbation count reaches a predetermined threshold, the random perturbation strategy is triggered. For the first and second sub-populations, an additional random increment is added to the speed update formula , whose random generation range is For example, if the particle Speed in direction Originally 0.5, after adding random increments, it may become a value between 0.45 and 0.55. For the third sub-population (enhanced sub-population), increase the random offset of its position , whose random generation range is For example, if the particle is located at , after adding the random offset, it may become arrive Then recalculate the fitness value of each particle. If the fitness value is better after the disturbance, the optimal solution of the state update after the disturbance is accepted; otherwise, it is not accepted.
[0222] 4.4 End condition judgment
[0223] Check whether the number of iterations reaches the preset maximum number of iterations If the maximum number of iterations is reached, for example 100, the algorithm ends and the global optimal solution and its corresponding fitness value, i.e. the optimal path, are output.
[0224] 5. Simulation and analysis
[0225] To evaluate the effectiveness of the proposed TPPSO algorithm in mobile robot path planning, experiments were conducted in four simulation environments. The experiments were conducted on a Windows 10 system equipped with an Intel i7-3.0 GHz CPU and 32 GB memory. The simulation environment was set to a 10×10 standard grid map.
[0226] 5.1 Experimental Setup
[0227] The TPPSO algorithm is compared with PSO, SAVPSO, and RRT*. RRT* is an enhanced algorithm derived from RRT and is commonly used in path planning algorithms. It systematically generates and optimizes tree structures to quickly explore high-dimensional state spaces to find near-optimal paths. Each algorithm is implemented in the Python programming language and uses a unified procedure to initialize the position and velocity of each particle in the PSO-based algorithm.
[0228] In the PSO and SAVPSO algorithms, the parameters are set as: =2, =1. The parameter configuration of TTPPSO is =2, The criterion for triggering the random perturbation strategy is based on observing that the global optimal solution remains unchanged for 10 consecutive iterations. In addition, the three algorithms use the same fitness function, where the parameters associated with this function are and Set to 0.8 and 0.3 respectively.
[0229] The PSO-based algorithm uses a consistent configuration, and the number of iterations and population size are both set to 100. In each iteration, the robot's moving step is set to 1, and the target sampling rate is set to 0.1, indicating that the probability of sampling near the target is 10%. In addition, the nearest neighbor search radius is set to 1.5.
[0230] 5.2 Benchmark function test
[0231] When evaluating the performance of heuristic algorithms, benchmark functions are usually used as standard optimization problems. As shown in Table 1, this experiment uses the benchmark functions in CEC2005, including F1 (unimodal function), F4 (unimodal function with noise), and F9 (multimodal function). Each benchmark function is set to 10 dimensions, and each algorithm is run independently 30 times, with 1000 iterations each time.
[0232] Table 1 Three benchmark functions
[0233]
[0234] As shown in Table 2, the average values and standard deviations of the three algorithms on the three benchmark functions are shown. For the F1 function, the TPPSO algorithm has the lowest average value; for the F4 function, TPPSO performs best in both average value and standard deviation; for the F9 function, TPPSO is also better than PSO and SAVPSO in terms of average value and standard deviation. Therefore, TPPSO shows obvious advantages in dealing with various problem scenarios.
[0235] Table 2 Performance comparison of PSO, SAVPSO and TPPSO
[0236]
[0237] 5.3 Performance Comparison
[0238] To evaluate the performance of the TPPSO algorithm in path planning, it was compared with PSO, SAVPSO, and RRT* in four different environment models. The starting and ending points of the mobile robot were always fixed to (0.5, 0.5) and (9.5, 9.5).
[0239] The paths generated by each algorithm are as follows Figure 2 As shown; among them, Figure 2 (a) in the figure is the path diagram generated by the four algorithms in the first environment. Figure 2 (b) is the path diagram generated by the four algorithms in the second environment. Figure 2 (c) in the figure is the path diagram generated by the four algorithms in the third environment. Figure 2 (d) in the figure is the path diagram generated by the four algorithms under the fourth environment.
[0240] like Figure 2 As shown in the figure, all four algorithms successfully generated feasible paths and were able to avoid obstacles, but there were differences in path lengths. The path of TPPSO was more efficient, effectively avoiding obstacles and reducing unnecessary detours, showing a stronger ability to find the optimal solution. In terms of path quality, the rankings were: TPPSO performed best, followed by SAVPSO, PSO, and RRT*.
[0241] like Figure 3 As shown in the figure, the statistical results of the four algorithms in different environmental models are shown in the bar graph. The analysis shows that the TPPSO algorithm can produce the shortest average path length in each environmental model. Each bar graph contains an error bar to represent the standard deviation, thus providing information about the variability and consistency of the performance of each algorithm. The detailed values of these standard deviations are clearly listed in Table 2. The TPPSO algorithm is not only Figure 2 The shortest path length is achieved and the smallest standard deviation is shown, indicating that its path quality has the highest consistency.
[0242] like Figure 4 As shown in the figure, the PSO algorithm clearly shows irregular and random changes. The update of the optimal solution is significantly reduced at about 40 and 80 iterations, which may be trapped in the local optimum. TPPSO can still find further optimal solutions after the optimal solution update stagnates between 20 and 60 iterations. This shows that TPPSO has better exploration ability and can get rid of the local optimum and find improved solutions.
[0243] Combination Figure 2-Figure 4 It can be seen that the TPPSO algorithm proposed in this invention, by dividing into three sub-populations, enhances the global search, local optimization and random search capabilities respectively, and introduces a random perturbation mechanism to overcome the local optimum and premature convergence problems. The three-population strategy effectively increases the diversity of search and the quality of solutions, while the random perturbation method helps to overcome the local optimum. Through comparative experiments in four different environmental models, the results show that TPPSO is superior to PSO, SAVPSO and RRT* algorithms in solving robot path planning challenges, confirming the potential of the algorithm in diversified and global path planning scenarios, and also providing strong support for the autonomous navigation of mobile robots in practical applications.
[0244] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0245] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present invention or certain parts of the embodiments.
[0246] The above are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should be regarded as the protection scope of the present invention.
Claims
1. A mobile robot path planning method based on three-swarm particle swarm optimization strategy, characterized in that: include: Obtain the current position of the mobile robot, the target position, and the positions and sizes of all obstacles between the current position and the target position; The particle swarm optimization algorithm based on three swarms is used to find the optimal path between the current position and the target position of the mobile robot. The specific process is as follows: Generate a particle swarm randomly and divide it into three sub-populations; The first sub-population uses the adaptive velocity particle swarm optimization algorithm to update the particle state. The second sub-population uses the linear cognitive coefficient adjustment strategy combined with the improved YOLOv11 deep learning model to update the particle state. The third sub-population uses random search and incorporates random components into the velocity update process to update the particle state. After each state update of the sub-population, the global optimal solution of each sub-population is compared with the fitness value of the overall global optimal solution of the particle swarm to retain or update the overall global optimal solution of the particle swarm and pass it to each sub-population; Repeat the state update of the sub-population and the overall global optimal solution update until the termination condition is met, and then output the overall global optimal solution of the particle swarm. The overall global optimal solution is the optimal path of the mobile robot. The second subpopulation adopts a linear cognitive coefficient adjustment strategy combined with an improved YOLOv11 deep learning model to update particle states, including: At each state update, the trained improved YOLOv11 model is used to predict the fitness values of the paths corresponding to all particles of the second sub-population; the speed and position of the particles are updated according to the predicted fitness value and the actual fitness value of each path; when updating the speed of the particles, the individual cognitive coefficient and the social cognitive coefficient are linearly adjusted; The improved YOLOv11 model introduces multi-scale feature fusion and dual-branch prediction into the YOLOv11 model; The improved YOLOv11 model after training is used to predict the fitness values of the paths corresponding to all particles of the second sub-population, including predicting the fitness value of particle j of the second sub-population, and obtaining the predicted fitness value of particle j. The specific process is as follows: Extract the path feature vector corresponding to particle j , and perform multi-scale feature fusion operation; the path feature vector Including the total length of the path, the turning angle in the path and the minimum distance between each point on the path and the obstacle; Input the feature map after multi-scale feature fusion into the attention mechanism; Performing dual-branch prediction on the feature graph processed by the attention mechanism, wherein the dual-branch prediction includes path length prediction and collision risk prediction; The results of the double-branch prediction are weighted to obtain the path prediction fitness value corresponding to the final particle j ; = ; in, For the whole The set of weights of the model, is the fully connected layer operation, is the convolution operation, is the feature map processed by the attention mechanism, and They are the weight matrices of the convolutional layers corresponding to path length prediction and collision risk prediction respectively; and They are the weight matrices of the fully connected layers corresponding to path length prediction and collision risk prediction respectively; The path feature vector corresponding to the extracted particle j , and perform multi-scale feature fusion operation. The specific process of multi-scale feature fusion operation is: The path feature vector corresponding to particle j Perform convolution, downsampling, upsampling and splicing operations to obtain feature maps after multi-scale feature fusion; ; ; ; ; in, , and They are feature maps of three different scales. , and are the convolution kernel weights of three scales respectively. is the feature map after multi-scale feature fusion, is the convolution operation, is the downsampling operation, For the upsampling operation, It is the concatenation operation of the feature map; The updating of the speed and position of the particle according to the predicted fitness value and the actual fitness value of each path includes updating the speed and position of the particle j in the second sub-population; Among them, the velocity update formula of particle j in the second sub-population is: ; The position update formula of particle j in the second sub-population is: ; in, and are the d-th dimension velocities of particle j at time t+1 and t, respectively. and are particle j in and the position in d dimension at time t, is the inertia weight of the second subpopulation, and are the individual cognition coefficient and social cognition coefficient of the second sub-population, and are two random numbers set for the second sub-population, is the adjustment factor, is the individual optimal position of particle j in d dimension at time t, is the position of particle j in d dimension at time t, For the entire particle group Moment The global optimal position of is the predicted fitness value of particle j output by the trained YOLOv11 model, is the actual fitness value of particle j.
2. The mobile robot path planning method based on three-swarm particle swarm optimization strategy according to claim 1 is characterized in that: The first subpopulation updates the particle state by using an adaptive velocity particle swarm optimization algorithm, including velocity update and position update of particle i in the first subpopulation, and introduces the optimal solution of randomly selected particles when updating the velocity of the particles; The velocity update equation of particle i in the first sub-population is: ; The position update equation of particle i in the first sub-population is: ; in, and are the d-th dimension velocities of particle i at time t+1 and t, respectively. and are the positions of particle i in the dth dimension at time t+1 and t, respectively. is the inertia weight of the first subpopulation, For the entire particle group Moment The global optimal position of Particles selected from a random uniform distribution The optimal position of the individual in the dth dimension at time t; is the discriminant function representing the velocity direction of particle i in the dth dimension at time t; A random number used to adjust the particle movement step size; is the individual optimal position of particle i in the dth dimension at time t; The inertia weight for: ; in, for The corresponding moderate value; for The corresponding moderate value; The fitness value of particle i in the first subpopulation for: ; in, and are the inertia weight for balancing the path length and the inertia weight for balancing the collision risk in the first subpopulation, respectively. For particles The number of segments of the corresponding path, and Points The horizontal and vertical coordinates of and Points The horizontal and vertical coordinates of and Represents particles The starting point and end point of the ath segment in the corresponding path, For particles The total number of obstacles in the corresponding path, is the current position of the mobile robot, is the location of the obstacle, A constant that adjusts the collision risk in the first subpopulation.
3. The mobile robot path planning method based on three-swarm particle swarm optimization strategy according to claim 1 is characterized in that: The actual fitness value of the particle j for: ; in, For particles The total length of the corresponding path, and are the weight coefficients for balancing the path length and balancing the collision risk respectively; For particles The total number of obstacles in the corresponding path, For particles A node in the path corresponding to The distance of obstacles, For particles The corresponding path is used to adjust the constant of the collision risk calculation sensitivity; The individual recognition coefficient of the second subpopulation for: ; The social cognition coefficient of the second subpopulation for: ; in, and are the minimum and maximum values set for the individual cognitive coefficients, and are the minimum and maximum values set for the social cognition coefficient, is the maximum number of iterations, is the current iteration number.
4. The mobile robot path planning method based on three-swarm particle swarm optimization strategy according to claim 1 is characterized in that: The third sub-population adopts random search and incorporates random components in the velocity update process to update the particle state, including updating the velocity and position of the particle q in the third sub-population; The velocity update formula of particle q in the third sub-population is: ; The position update formula of particle q in the third sub-population is: ; in, and are the d-th dimension velocities of particle q at time t+1 and t, respectively. is the inertia weight of the third sub-population, and The individual cognition coefficient and social cognition coefficient of the third sub-population are respectively, , and are three random numbers set for the third sub-population, is the individual optimal position of particle q in d dimension at time t, For the entire particle group Moment The global optimal position of and are the positions of particle q in the dth dimension at time t+1 and t, respectively. is the coefficient of the random component, For the range arrive A random component uniformly distributed between .
5. The mobile robot path planning method based on three-swarm particle swarm optimization strategy according to claim 1 is characterized in that: It also includes the conditions for judging whether the current sub-population triggers random perturbations after each sub-population state is updated, and adding random perturbations to the speed and position of each particle in each sub-population when random perturbations are triggered: After adding random disturbance, the fitness value of each particle is recalculated. If the fitness value of the particle after the disturbance is better, the position and velocity after the disturbance are used as the state update result of the particle. Otherwise, the position and velocity before the disturbance are used as the state update result of the particle.
6. The mobile robot path planning method based on three-swarm particle swarm optimization strategy according to claim 5 is characterized in that: The condition for triggering random disturbance is: whether the number of iterations during which the global optimal solution of the current sub-population has not been updated reaches a set threshold.
Citation Information
Patent Citations
Improved particle swarm optimization-based mobile robot path planning method
CN107065876A
Power generation dispatching method and system in power system
CN115085276A