Method and device for path planning optimization of a mobile robot

By combining the adaptive particle swarm optimization algorithm and the bat algorithm, and optimizing the search parameters, the problems of local optima and slow convergence speed in robot path planning are solved, and more efficient path planning is achieved.

CN117405138BActive Publication Date: 2026-08-25LIAONING UNIVERSITY OF TECHNOLOGY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311561425.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-21
Publication Date
2026-08-25
Estimated Expiration
2043-11-21

AI Technical Summary

Technical Problem

Robot path planning is prone to getting stuck in local optima and slow convergence.

Method used

Combining the adaptive particle swarm optimization algorithm and the bat algorithm, the optimal positions of the current group and individuals are determined by the fitness function through parameter initialization and population initialization. The search parameters, including the loudness attenuation coefficient and the pulse emission rate enhancement coefficient, are iteratively updated and optimized until the target path is generated after a preset number of iterations.

Benefits of technology

It effectively avoids local optima, improves the convergence speed and accuracy of path planning, and achieves better path search.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117405138B_ABST
    Figure CN117405138B_ABST
Patent Text Reader

Abstract

The application provides a path planning optimization method and device for a mobile robot, and relates to the field of path planning. The method comprises the following steps: obtaining a starting position and a terminal position, performing parameter initialization and population initialization, and obtaining a current particle state and a current bat state; determining a current group optimal position and a current individual optimal position based on the current particle state and a fitness function; performing an iteration on an adaptive particle swarm algorithm to update the current particle state; obtaining search parameters corresponding to the bat according to the current individual position, performing an iteration on the bat algorithm based on the search parameters, updating the current bat state to obtain a current best bat; updating the current group optimal position based on the best search parameters corresponding to the current best bat, returning to the step of updating the current particle state, and generating a target path when a second preset iteration number is reached. The adaptive particle swarm algorithm and the bat algorithm are organically combined, and problems such as slow convergence speed and falling into a local optimal solution are avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of path planning technology, and more specifically, to a method and apparatus for optimizing path planning for a mobile robot. Background Technology

[0002] With the continuous development of robotics technology, mobile robots with autonomous navigation capabilities are being used more and more widely in fields such as mining, rescue, aerospace, and agriculture. The quality of autonomous navigation performance mainly depends on path planning capabilities.

[0003] Traditional path planning is generally based on A * Algorithms, artificial potential field methods, and greedy algorithms are used to achieve autonomous path planning for robots. However, these algorithms typically have high computational complexity, numerous control parameters, and poor adaptability to complex environments. In recent years, swarm intelligence optimization algorithms have been increasingly applied to robot path planning due to their superior search capabilities and simpler models. Among these, particle swarm optimization and bat algorithms are the most widely used. However, these algorithms have also gradually revealed drawbacks in practical applications, such as being prone to getting trapped in local optima and slow convergence speed, becoming a pressing problem to be solved in the field of robot path planning. Summary of the Invention

[0004] The problem addressed by this invention is how to avoid robots from getting trapped in local optima and having slow convergence speed during path planning.

[0005] To address the above problems, this invention provides a path planning optimization method for a mobile robot, comprising the following steps:

[0006] Step 1: Obtain the starting and ending positions of the path planning, initialize the parameters and population of the preset adaptive particle swarm algorithm and the preset bat algorithm respectively, and obtain the current particle state and the current bat state.

[0007] Step 2: Based on the current particle state and the preset fitness function, determine the current optimal position of the population and the current optimal position of the individual.

[0008] Step 3: Based on the current optimal position of the swarm and the current optimal position of the individual, perform one iteration of the adaptive particle swarm algorithm to update the current particle state, wherein the current particle state includes the current individual position and current individual velocity of each particle;

[0009] Step 4: Obtain the search parameters corresponding to each bat in the bat algorithm based on the current individual position, and perform one iteration of the bat algorithm based on the search parameters to update the current bat state and obtain the current best bat. The search parameters include loudness attenuation coefficient and pulse emission rate enhancement coefficient.

[0010] Step 5: Update the optimal position of the current group based on the optimal search parameters corresponding to the current best bat, and update the optimal position of the current individual based on the current individual position, and return to Step 3 until the bat algorithm reaches the second preset number of iterations to generate the target path from the starting position to the ending position.

[0011] Optionally, the current individual position includes the initial individual position, and step two includes:

[0012] The initial individual position is taken as the current optimal individual position;

[0013] Based on the fitness function and the initial individual position, a first fitness value is obtained for each particle, and the initial individual position corresponding to the particle with the largest first fitness value is taken as the optimal position of the current group.

[0014] Optionally, step three includes:

[0015] The current individual speed is updated, and the speed update satisfies:

[0016]

[0017] The current individual location is updated, and the location update satisfies:

[0018]

[0019] Where k represents the number of iterations; i represents the i-th particle; This represents the current individual velocity of the i-th particle at the k-th iteration; This represents the current individual position of the i-th particle at the k-th iteration; This represents the optimal position of the current individual corresponding to the i-th particle in the k-th iteration; λ represents the optimal position of the current group at the k-th iteration; r1 and r2 represent random numbers in [0,1]; c1 represents the individual consciousness weight coefficient, c2 represents the group consciousness weight coefficient; λ represents the linear adjustment variable.

[0020] Optionally, the individual consciousness weighting coefficient satisfies:

[0021]

[0022] The group consciousness weight coefficient satisfies:

[0023]

[0024] Among them, c 1i c represents the first preset initial value corresponding to the individual consciousness weight coefficient; 1f c represents the first preset final value corresponding to the individual consciousness weight coefficient; 2i c represents the second preset initial value corresponding to the group consciousness weight coefficient; 2f k represents the second preset final value corresponding to the group consciousness weight coefficient. max This indicates the first preset number of iterations.

[0025] Optionally, the linear adjustment variable satisfies:

[0026]

[0027] in, Let represent the evolution factor at the k-th iteration, wherein the evolution factor satisfies:

[0028]

[0029] in, This represents the average distance between the optimal particle at the current optimal position of the population and other particles at the k-th iteration. and These represent the maximum and minimum average distances between any given particle and the other particles, respectively.

[0030] Optionally, step four includes:

[0031] The search parameters are obtained by using the two-dimensional coordinates corresponding to the current individual position as a two-dimensional vector composed of the loudness attenuation coefficient and the pulse emission rate enhancement coefficient;

[0032] The bat algorithm is iterated once based on the search parameters to update the current bat state, wherein the current bat state includes the current bat position and the current bat speed;

[0033] Based on the fitness function and the current bat position, a second fitness value is obtained for each bat, and the bat with the largest second fitness value is taken as the current best bat.

[0034] Optionally, step five includes:

[0035] The two-dimensional vector corresponding to the optimal search parameters is used as the two-dimensional coordinate value corresponding to the optimal position of the current group.

[0036] Update the optimal position of the current individual based on the current individual position, and return to step three;

[0037] When the bat algorithm reaches the second preset number of iterations, the target path is obtained based on the current best bat.

[0038] Optionally, when the bat algorithm reaches the second preset number of iterations, obtaining the target path based on the current best bat includes:

[0039] The path corresponding to the current best bat is taken as the intermediate path, and the intermediate path is smoothed using a preset continuous high-order Bézier curve to obtain the target path.

[0040] This invention, by obtaining the start and end positions of path planning, facilitates the determination of the search space for this path planning, ensuring that the path planning results meet actual needs. Based on this, parameter initialization and population initialization are performed on the preset adaptive particle swarm optimization (PSO) algorithm and the preset bat algorithm, respectively, to obtain the current particle state and the current bat state, providing a foundation for subsequent target path generation. After parameter initialization and population initialization, based on the current particle state and the preset fitness function, the optimal position of the current population and the optimal position of the current individual can be determined, providing a data foundation for the iterative search of the subsequent algorithm. Based on the current optimal position of the population and the optimal position of the current individual, the adaptive PSO algorithm is iterated once, updating the current individual velocity and thus the current individual position, providing a data foundation for determining the search parameters of the bat algorithm. The search parameters for each bat in the bat algorithm are determined based on the current individual position obtained from the adaptive PSO algorithm. These search parameters include the loudness attenuation coefficient and the pulse emission rate enhancement coefficient, which are important parameters affecting the performance of the bat algorithm, helping to avoid problems such as slow convergence speed and getting trapped in local optima that are easily caused by using fixed search parameters. Based on this, the bat algorithm is iterated once based on the search parameters to update the current bat state and obtain the current best bat, providing a basis for determining the optimal position of the current group in the subsequent adaptive particle swarm optimization (APS) algorithm. Simultaneously, the optimal position of the current group is updated based on the optimal search parameters corresponding to the current best bat, providing reliable feedback for subsequent iterations of the APS algorithm, which is beneficial for the APS algorithm to find better search parameters. The optimal position of the current individual is updated based on the current individual position, and the process returns to step three until the bat algorithm generates the target path after reaching the second preset number of iterations. This achieves an organic combination of the APS algorithm and the bat algorithm. The APS algorithm continuously optimizes the search parameters for the bat algorithm, and the bat algorithm iterates based on the search parameters to search for the optimal target path. Furthermore, after each iteration, the bat algorithm feeds back the current optimal search parameters corresponding to the current best bat to the APS algorithm as its current optimal group position. This allows the APS algorithm to continuously optimize the search parameters based on the actual search situation of the target path by the bat algorithm, thereby helping the bat algorithm find the optimal solution while improving the convergence speed. This avoids the slow convergence speed and getting trapped in local optima caused by fixed search parameters in existing bat algorithms during path planning.

[0041] The present invention also provides a path planning optimization device for a mobile robot, comprising:

[0042] The initialization module is used to obtain the starting and ending positions of the path planning, and to initialize the parameters and population of the preset adaptive particle swarm algorithm and the preset bat algorithm respectively, so as to obtain the current particle state and the current bat state.

[0043] The fitness evaluation module is used to determine the optimal position of the current population and the optimal position of the current individual based on the current particle state and a preset fitness function.

[0044] The first iteration module is used to perform one iteration of the adaptive particle swarm algorithm based on the current optimal position of the swarm and the current optimal position of the individual, and update the current particle state, wherein the current particle state includes the current individual position and the current individual velocity corresponding to each particle;

[0045] The second iteration module is used to obtain the search parameters corresponding to each bat in the bat algorithm based on each current individual position, and to perform one iteration of the bat algorithm based on the search parameters to update the current bat state and obtain the current best bat. The search parameters include loudness attenuation coefficient and pulse emission rate enhancement coefficient.

[0046] The path generation module is used to update the optimal position of the current group based on the optimal search parameters corresponding to the current best bat and to update the optimal position of the current individual based on the current individual position. It also returns the step of performing one iteration of the adaptive particle swarm algorithm based on the optimal position of the current group and the optimal position of the current individual, and updating the current particle state, until the bat algorithm reaches the second preset number of iterations to generate the target path from the starting position to the ending position.

[0047] The path planning optimization device for mobile robots provided by this invention has essentially the same advantages as the path planning optimization method for mobile robots compared to existing technologies, and will not be elaborated further here.

[0048] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the path planning optimization method for a mobile robot as described above.

[0049] The advantages of the computer-readable storage medium and the path planning optimization method for the mobile robot provided by this invention are basically the same as those of the prior art, and will not be repeated here. Attached Figure Description

[0050] Figure 1 This is a flowchart of a path planning optimization method for a mobile robot according to an embodiment of the present invention;

[0051] Figure 2 This is a flowchart of a path planning optimization method for a mobile robot according to another embodiment of the present invention. Detailed Implementation

[0052] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Although some embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present invention. It should be understood that the accompanying drawings and embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of protection of the present invention.

[0053] It should be understood that the various steps described in the method embodiments of the present invention may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present invention is not limited in this respect.

[0054] The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments"; the term "optionally" means "optional embodiments". Definitions of other terms will be given in the following description. It should be noted that the concepts of "first", "second", etc., mentioned in this invention are used only to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies.

[0055] It should be noted that the terms "a" and "a plurality of" used in this invention are illustrative rather than restrictive. Those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0056] like Figure 1 As shown, this embodiment provides a path planning optimization method for a mobile robot, including the following steps:

[0057] Step 1: Obtain the starting and ending positions of the path planning, initialize the parameters and population of the preset adaptive particle swarm algorithm and the preset bat algorithm respectively, and obtain the current particle state and the current bat state.

[0058] Specifically, in this embodiment, the adaptive particle swarm optimization algorithm is mainly used to optimize the search parameters that affect the performance of the bat algorithm, while the bat algorithm is mainly used to iterate based on the search parameters provided by the particle swarm optimization algorithm to search for the optimal target path between the starting position and the ending position. Before using the preset adaptive particle swarm optimization algorithm and the bat algorithm for path planning, it is necessary to obtain the starting position and the ending position of this path planning. For example, if the robot needs to go from the current position to the target position to perform a task, then the starting position of this path planning is the current position, and the ending position is the target position. Based on this, an environment model corresponding to the bat algorithm can be constructed based on the starting position and the ending position. Preferably, the positions and sizes of obstacles between the starting position and the ending position can also be obtained and reflected in the environment model. For example, a two-dimensional environment grid map can be created, with the starting point and the ending point set based on the starting position and the ending position, and the obstacle positions defined as black squares and the feasible space as white empty spaces. After constructing the environment model, the preset adaptive particle swarm optimization algorithm and the preset bat algorithm are initialized with parameters such as defining the population size and the maximum number of iterations, providing a basis for subsequent algorithm iterations. Based on this, the adaptive particle swarm optimization algorithm undergoes population initialization to generate initial particle states (such as initial individual positions and initial individual velocities), which serve as the current particle states; similarly, the bat algorithm undergoes population initialization to generate initial bat states (such as initial bat positions and initial bat velocities), which serve as the current bat states. The population initialization method can employ random initialization, for example, randomly generating a set of initial solutions for velocity and position within a preset range around the starting position to complete the population initialization.

[0059] In this embodiment, obtaining the start and end positions of the path planning helps determine the search space for this path planning and ensures that the path planning result meets the actual needs. Based on this, the parameters and population of the preset adaptive particle swarm algorithm and the preset bat algorithm are initialized respectively to obtain the current particle state and the current bat state, providing a basis for the subsequent generation of the target path.

[0060] Step 2: Based on the current particle state and the preset fitness function, determine the current optimal position of the population and the current optimal position of the individual.

[0061] Specifically, in this embodiment, the current particle state can include the current individual position and the current individual velocity. It should be understood that after parameter initialization and population initialization for the adaptive particle swarm optimization (PSO) and bat algorithm, the current individual position is the initial individual position after population initialization. Evaluating each particle based on the fitness function and the initial individual position determines the current optimal position for the swarm and the current optimal position for the individual. For example, path length can be used as the fitness function; the shorter the path for a particle, the higher the fitness value obtained based on the fitness function. It should be understood that in this embodiment, after parameter initialization and population initialization, the initial individual position for each particle is randomly generated. For a single particle, the initial individual position is the current individual position, and also the current optimal position for that particle. For the particle swarm, evaluating each particle based on the fitness function and the current individual position, the current individual position corresponding to the particle with the highest fitness value is the current optimal position for the swarm.

[0062] In this embodiment, after parameter initialization and population initialization, the optimal position of the current population and the optimal position of the current individual can be determined based on the current particle state and the preset fitness function, providing a data foundation for the iterative search of the subsequent algorithm.

[0063] Step 3: Perform one iteration of the adaptive particle swarm optimization algorithm based on the current optimal position of the swarm and the current optimal position of the individual particle, and update the current particle state. The current particle state includes the current individual position and current individual velocity of each particle.

[0064] Specifically, the adaptive particle swarm optimization (ASO) algorithm iterates primarily through velocity and position updates. For a single particle, the updated position is determined by its current position and velocity. Velocity updates are influenced by three main factors: inertia, individual cognition, and swarm cognition. Inertia is mainly determined by the particle's current state, individual cognition by its current optimal position, and swarm cognition by the current optimal swarm position. Therefore, given the current particle state, the ASO algorithm can update the current particle state based on the current optimal swarm position and the current optimal individual position, thus completing one iteration.

[0065] In this embodiment, the adaptive particle swarm optimization algorithm is iterated once based on the current optimal position of the group and the current optimal position of the individual, updating the current individual velocity and thus updating the current individual position, providing a data basis for determining the search parameters of the bat algorithm in the future.

[0066] Step 4: Obtain the search parameters for each bat in the bat algorithm based on the current individual position, and perform one iteration of the bat algorithm based on the search parameters to update the current bat state and obtain the current best bat. The search parameters include the loudness attenuation coefficient and the pulse emission rate enhancement coefficient.

[0067] Specifically, the current individual position obtained after the adaptive particle swarm optimization algorithm optimizes the search parameters once can be used as the solution for the search parameters. For example, the x-coordinate corresponding to the current individual position can be used as the loudness attenuation coefficient, and the y-coordinate as the pulse emission rate enhancement coefficient. Based on this, the bat algorithm is used to update the current bat state. In the bat algorithm, the loudness attenuation coefficient determines the loudness of the bat, while the pulse emission rate enhancement coefficient determines the pulse emission rate of the bat. These two are important parameters affecting the update of the current bat state (i.e., position update and velocity update) by the bat algorithm. When the loudness of the bat gradually increases, the convergence process is slow, which provides sufficient time for the algorithm to search, thus making it more likely to find the optimal solution, but at the same time, it will also increase the computation time. If the loudness of the bat is too small, the convergence speed of the algorithm will be faster, but it is also more prone to premature convergence. When the pulse emission rate enhancement coefficient gradually increases, the convergence speed of the algorithm's global search is slower; when the pulse emission rate enhancement coefficient gradually decreases, the individual searches near the current best bat position. Although the search speed will be faster, it is easy to be attracted by the optimal value and get trapped in local optima. Therefore, the search parameters determine the performance of the bat algorithm. Reasonable search parameters can avoid problems such as slowed convergence and getting trapped in local optima. On the other hand, the speed and position updates of the bat algorithm are mainly determined by the current bat state and the current best bat position. The current bat state includes the current bat position and the current bat speed. Bats are evaluated based on a preset fitness function, and the bat with the highest fitness is selected as the current best bat. The position corresponding to the current best bat is the current best bat position.

[0068] In this embodiment, the search parameters for each bat in the bat algorithm are determined based on the current individual position obtained from the adaptive particle swarm optimization algorithm. These search parameters include the loudness attenuation coefficient and the pulse emission rate enhancement coefficient, which are crucial parameters affecting the performance of the bat algorithm. Using fixed search parameters helps avoid problems such as slow convergence and getting trapped in local optima. Based on these parameters, the bat algorithm is iterated once to update the current bat state and obtain the current optimal bat, providing a foundation for determining the optimal position of the current group in the subsequent adaptive particle swarm optimization algorithm.

[0069] Step 5: Update the optimal position of the current group based on the optimal search parameters corresponding to the current best bat, and update the optimal position of the current individual based on the current individual position, and return to Step 3 until the bat algorithm reaches the second preset number of iterations to generate the target path from the starting position to the ending position.

[0070] Specifically, unlike the current individual optimal position and the current group optimal position, which both rely on evaluating whether a better solution has emerged after each iteration using a fitness function to determine whether to update the optimal solution, this embodiment updates the current individual optimal position using a fitness function. However, the current group optimal position is updated based on the current best search parameters corresponding to the current best bat in the Bat Algorithm, achieving an organic combination of adaptive particle swarm optimization and the Bat Algorithm. After one iteration of the Bat Algorithm, the bats are evaluated based on the updated current bat state and fitness function to obtain the current best bat (i.e., the bat with the highest fitness value in the current iteration). The two-dimensional array of the best search parameters corresponding to the current best bat is used as the position coordinates corresponding to the current group optimal position in the particle swarm optimization algorithm, and the process returns to step three. This process continues until the Bat Algorithm reaches the second preset number of iterations. The path represented by the current best bat is then the optimal path from the starting position to the ending position, yielding the target path for this path planning.

[0071] In this embodiment, obtaining the start and end positions of the path planning helps determine the search space for this path planning, ensuring that the path planning results meet actual needs. Based on this, parameter initialization and population initialization are performed on the preset adaptive particle swarm optimization algorithm and the preset bat algorithm, respectively, to obtain the current particle state and the current bat state, providing a basis for subsequent target path generation. After parameter initialization and population initialization, based on the current particle state and the preset fitness function, the optimal position of the current group and the optimal position of the current individual can be determined, providing a data foundation for the iterative search of the subsequent algorithm. The adaptive particle swarm optimization algorithm is iterated once based on the current optimal position of the group and the optimal position of the current individual, updating the current individual velocity and thus updating the current individual position, providing a data foundation for determining the search parameters of the bat algorithm. The search parameters for each bat in the bat algorithm are determined based on the current individual position obtained from the adaptive particle swarm optimization algorithm. The search parameters include the loudness attenuation coefficient and the pulse emission rate enhancement coefficient, which are important parameters affecting the performance of the bat algorithm, helping to avoid problems such as slow convergence speed and getting trapped in local optima when using fixed search parameters. Based on this, the bat algorithm is iterated once using the search parameters to update the current bat state and obtain the current best bat, providing a basis for determining the optimal position of the current group in the subsequent adaptive particle swarm optimization (APS) algorithm. Furthermore, the optimal position of the current group is updated based on the optimal search parameters corresponding to the current best bat, providing reliable feedback for subsequent iterations of the APS algorithm, which helps the APS algorithm find better search parameters. Simultaneously, the optimal position of the current individual is updated based on the current individual position, and the process returns to step three until the bat algorithm generates the target path after reaching the second preset number of iterations. This achieves an organic combination of the APS algorithm and the bat algorithm. The APS algorithm continuously optimizes the search parameters for the bat algorithm, and the bat algorithm iterates based on the search parameters to search for the optimal target path. At the same time, after each iteration, the bat algorithm feeds back the current optimal search parameters corresponding to the current best bat to the APS algorithm as its current optimal group position. This allows the APS algorithm to continuously optimize the search parameters based on the actual search situation of the target path by the bat algorithm, thereby helping the bat algorithm find the optimal solution while improving the convergence speed. This avoids the slow convergence speed and getting trapped in local optima caused by fixed search parameters in existing bat algorithms during path planning.

[0072] Optionally, the current individual position includes the initial individual position; step two of the path planning optimization method for the mobile robot includes:

[0073] The initial individual position is taken as the optimal position of the current individual;

[0074] The first fitness value for each particle is obtained based on the fitness function and the initial individual position, and the initial individual position of the particle with the largest first fitness value is taken as the optimal position of the current group.

[0075] In this embodiment, after initializing the population for the adaptive particle swarm optimization algorithm, a set of initial solutions for the current particle state (including initial individual position and initial individual velocity) is randomly generated. Before the first iteration, the current individual position is the initial individual position. At this time, the current particle state has only one set of initial solutions; therefore, the initial individual position is the current optimal individual position. Based on this, the fitness of each particle is evaluated based on the fitness function and the initial individual position, obtaining the first fitness value for each particle. The particle with the largest first fitness value is the current optimal particle, and the initial individual position corresponding to the optimal particle is taken as the current optimal position of the swarm. The current optimal individual position obtained in this way provides a basis for the individual consciousness part corresponding to the velocity update of the subsequent adaptive particle swarm optimization algorithm, and the current optimal swarm position provides a basis for the group consciousness part corresponding to the velocity update. Thus, position update is achieved on the basis of velocity update, completing one algorithm iteration.

[0076] Optionally, step three of the path planning optimization method for mobile robots includes:

[0077] Update the current individual speed, and the speed update satisfies:

[0078]

[0079] Update the current individual's location, satisfying the following conditions:

[0080]

[0081] Where k represents the number of iterations; i represents the i-th particle; This represents the current individual velocity of the i-th particle at the k-th iteration; This represents the current individual position of the i-th particle at the k-th iteration; This represents the current optimal position of the i-th particle at the k-th iteration; λ represents the current optimal position of the group at the k-th iteration; r1 and r2 represent random numbers in [0,1]; c1 represents the individual consciousness weight coefficient, c2 represents the group consciousness weight coefficient; λ represents the linear adjustment variable.

[0082] In this embodiment, c1 represents the individual consciousness weight coefficient, c2 represents the group consciousness weight coefficient, and λ represents the linear adjustment variable. These three coefficients can be preset during the parameter initialization phase or adjusted according to a preset update formula. In the speed update formula, Corresponding to this is the inertial component, which in this embodiment adopts a fractional-order form, which is beneficial for enhancing global search capabilities and convergence speed. Simultaneously, it allows the adaptive particle swarm optimization algorithm to better adapt to nonlinear optimization problems, helping the bat algorithm find better search parameters and further improving the algorithm's convergence and global search capabilities. Based on this, the current individual position can be updated according to the current individual position and the updated current individual velocity, completing one round of parameter optimization.

[0083] Optionally, the individual consciousness weighting coefficient satisfies:

[0084]

[0085] The group consciousness weight coefficient satisfies:

[0086]

[0087] Among them, c 1i c represents the first preset initial value corresponding to the individual consciousness weight coefficient; 1f c represents the first preset final value corresponding to the individual consciousness weight coefficient; 2i c represents the second preset initial value corresponding to the group consciousness weight coefficient; 2f k represents the second preset final value corresponding to the group consciousness weight coefficient. max This indicates the first preset number of iterations.

[0088] In this embodiment, the first preset initial value and the first preset final value corresponding to the individual consciousness weight coefficient, the second preset initial value and the second preset final value corresponding to the group consciousness weight coefficient, and the first preset iteration number (i.e., the maximum iteration number) corresponding to the adaptive particle swarm algorithm can all be preset during parameter initialization. Compared to using a single fixed parameter to set the individual consciousness weight coefficient and the group consciousness weight coefficient, in this embodiment, the two coefficients are updated based on the preset initial value and preset final value with each algorithm iteration. As the number of iterations increases, the weight coefficients corresponding to the individual consciousness part and the group consciousness part show a decreasing trend as the particles gradually approach the optimal solution. In the early stage of iteration, larger c1 and c2 correspond to a larger step size in the algorithm, which helps to quickly explore the search space. As the number of iterations increases, the smaller step size helps the particles search the local area more finely, thereby improving the convergence and accuracy of the algorithm.

[0089] Optionally, the linear adjustment variable satisfies:

[0090]

[0091] in, Let the evolution factor be the evolution factor at the k-th iteration, and let the evolution factor satisfy:

[0092]

[0093] in, This represents the average distance between the optimal particle at the current optimal position in the population and other particles at the k-th iteration. and These represent the maximum and minimum average distances between any particle and other particles, respectively.

[0094] Specifically, the inertial part of the velocity update, in addition to using fractional order, introduces a linear adjustment variable. This linear adjustment variable is related to the iteration number and the evolutionary factor corresponding to the current iteration number, and the evolutionary factor is determined by the distance between particles. The average distance (hereinafter referred to as the average distance) between the i-th particle and other particles in the k-th iteration can be expressed as:

[0095]

[0096] in, Let S represent the average distance of the i-th particle in the k-th iteration, and j represent the j-th particle among all other particles excluding the i-th particle; S represents the overall size of the particle swarm; and D represents the dimension of each particle. S and D can be set in advance during parameter initialization.

[0097] In this embodiment, the distance between particles generally tends to decrease with increasing iteration count, and the evolution factor... This will gradually increase, which in turn will cause the linear adjustment variable λ to gradually decrease. This allows the particle to quickly explore the search space in the early stages of iteration, while the linear adjustment variable λ gradually decreases as the number of iterations increases, which helps to prevent the algorithm from getting trapped in a local optimum too early.

[0098] Optionally, step four of the path planning optimization method for mobile robots includes:

[0099] The search parameters are obtained by using the two-dimensional coordinates corresponding to the current individual position as a two-dimensional vector composed of the loudness attenuation coefficient and the pulse emission rate enhancement coefficient;

[0100] The bat algorithm is iterated once based on the search parameters to update the current bat state, which includes the current bat position and the current bat speed.

[0101] The second fitness value for each bat is obtained based on the fitness function and the current bat position. The bat with the largest second fitness value is then selected as the current best bat.

[0102] In this embodiment, after the adaptive particle swarm optimization algorithm provides search parameters for the bat algorithm, an iteration of the bat algorithm is performed based on these search parameters to obtain the current bat speed and position for each bat, thus updating the current bat state. A fitness function is then used to evaluate the fitness of each bat, yielding a second fitness value for each bat. The bat with the highest second fitness value is selected as the current best bat. Compared to using a single fixed search parameter to determine the bat's loudness and pulse emission rate, this embodiment utilizes the adaptive particle swarm optimization algorithm to help the bat algorithm find better search parameters, which helps avoid problems such as slow convergence and getting trapped in local optima during path planning.

[0103] For example, the process of one iteration of the Bat Algorithm is now illustrated with a specific embodiment:

[0104] The parameters of the bat algorithm are initialized by defining the population size, maximum number of iterations (i.e., the second preset number of iterations), initial loudness and initial pulse emission rate, and the population is initialized. A set of initial solutions is randomly generated within a preset range of the starting position, including the initial bat speed and the initial bat position. Before the first iteration, the current best bat is selected based on the initial bat speed and the fitness function.

[0105] In one iteration, the bat's speed, position, and frequency will be updated.

[0106] Speed ​​update satisfies:

[0107] v i (k+1)=v i (k)+(z i (k+1)-z * )f i ;

[0108] Location update satisfies:

[0109] z i (k+1)=z i (k)+v i (k+1);

[0110] Frequency update satisfies:

[0111] f i =f min +(f max -f min )*β i ;

[0112] Among them, v i (k) represents the current bat speed of the i-th bat in the k-th iteration; z i(k) represents the current bat position corresponding to the i-th bat at the k-th iteration; f i represents the frequency corresponding to the i-th bat; z * represents the current best position corresponding to the current best bat; β i = k * e (-ρ*r) , where r is a random number within [0, 1], and ρ represents an environment-related parameter that can be set in advance during parameter initialization. In this embodiment, ρ = 0.01. In this embodiment, as the number of iterations increases, the frequency of the bat gradually increases, which is beneficial to improving the global search performance of the algorithm.

[0113] On this basis, a first random number rand1 (0 < rand1 < 1) is generated. If rand1 is greater than the current pulse emission rate (at the first iteration, the current pulse emission rate corresponds to the initial pulse emission rate), local search is performed, and a new solution is locally generated for each bat using random walk, denoted as z new . Otherwise, local search is not performed, and global search continues. Among them, z new satisfies:

[0114] z new = z old + εA(k);

[0115] where ε is a random number within [-1, 1]; z old represents z * before generating the new solution; A(k) represents the average loudness of all bats at the k-th iteration (at the first iteration, the loudness of the bat is the initial loudness).

[0116] After that, a second random number rand2 (0 < rand2 < 1) is generated. If rand2 is less than the current loudness of the bat and the fitness value corresponding to z new is less than the fitness value corresponding to z * , then the loudness and pulse emission rate of the bat are updated, the new solution z new is accepted, and z * is updated.

[0117] It should be understood that different from the way of updating the loudness and pulse emission rate with fixed search parameters, the search parameters in this embodiment are obtained according to the current individual position corresponding to the adaptive particle swarm algorithm. The two-dimensional coordinates corresponding to the current individual position are used as a two-dimensional vector composed of the loudness attenuation coefficient and pulse emission rate enhancement coefficient corresponding to the corresponding bat to obtain the search parameters, and the loudness and pulse emission rate of the bat are determined based on the search parameters, which is beneficial to improving the search performance of the bat algorithm.

[0118] The loudness of the bat satisfies:

[0119] Ai (k+1)=αA i (k);

[0120] The pulse emission rate satisfies:

[0121] r i (k+1)=r i (0)[1-exp(-γk)];

[0122] Among them, A i (k+1) represents the loudness of the i-th bat in the (k+1)-th iteration; α represents the loudness attenuation coefficient; r i (k+1) represents the pulse emission rate of the i-th bat in the (k+1)-th iteration; r i (0) represents the initial pulse emission rate corresponding to the i-th bat; γ represents the pulse emission rate enhancement coefficient.

[0123] Therefore, after completing one iteration of the bat algorithm, it is necessary to evaluate the fitness of each bat by combining the fitness function and the current bat state, and select the best bat. When using the bat algorithm for path search, the number of waypoints corresponding to the path can be predetermined between the start and end positions during parameter initialization. After each iteration of the bat algorithm, the position corresponding to each waypoint is assigned according to the current bat position, and a path can be obtained based on the waypoints. For example, if the number of waypoints is predetermined to be 5, for a single bat, the position corresponding to each waypoint is determined according to the updated current bat position after one iteration, and the lines connecting the 5 waypoints to the start and end positions constitute a path. In this embodiment, the fitness function consists of path length, path smoothness, and collision risk, and the fitness function satisfies:

[0124] fitness=a×L(P)+b×R(X rob X obs )+c×S(P);

[0125] Where L(P) represents the path length, S(P) represents the path smoothness, and R(X) represents the path length. rob X obs Let f(x) represent the path collision risk function, where a, b, and c are all weight coefficients, and a+b+c=1.

[0126] The path length L(P) satisfies:

[0127]

[0128] The path smoothness S(P) satisfies:

[0129]

[0130] Among them, P i Let P represent the i-th waypoint, and Q represent the number of road segments between waypoints; i+1 -P i || represents P i+1 To P i The Euclidean distance between them.

[0131] Path collision risk function R(X) rob X obs )satisfy:

[0132]

[0133]

[0134] After obtaining the path corresponding to each bat, the risk of a mobile robot colliding with obstacles between its starting and ending positions while traveling along that path can be simulated. In the above formula, R... rob,obsj (X rob X obsj ) represents the collision risk function of the mobile robot at the j-th obstacle. n represents the total number of preset obstacles, which can be defined in advance when building the environment model; X rob X represents the position vector of the mobile robot in a pre-built environmental model. obsj R represents the position vector of the j-th obstacle in the pre-built environment model; j R represents the influence range of the j-th obstacle. To ensure that the influence range of the obstacle is regional, in this embodiment, R... j The value is selected as 1.5R. rob , and R rob The inner radius of the mobile robot can be obtained in advance and set during parameter initialization; ρ represents the obstacle area influence parameter, and C represents the obstacle effective range influence parameter. ρ and C can be set in advance during parameter initialization. Preferably, in this embodiment, ρ = 3 and C = 1.

[0135] Therefore, we can obtain the second fitness value for each bat, and select the bat with the largest second fitness value as the current best bat.

[0136] Optionally, such as Figure 2 As shown, step five of the path planning optimization method for mobile robots includes:

[0137] Use the two-dimensional vector corresponding to the best search parameters as the two-dimensional coordinate value corresponding to the optimal position of the current group;

[0138] Update the optimal position of the current individual based on the current individual position, and return to step three;

[0139] When the bat algorithm reaches the second preset number of iterations, the target path is obtained based on the current best bat.

[0140] In this embodiment, after obtaining the current best bat, the search parameters corresponding to the current best bat are obtained as the optimal search parameters. The two-dimensional vector corresponding to the optimal search parameters is denoted as Gbest, and Gbest = [α n γ n ], α n γ represents the loudness attenuation coefficient corresponding to the current optimal bat. n This represents the pulse emission rate enhancement coefficient corresponding to the current optimal bat position. The two-dimensional vector is used as the two-dimensional coordinate value x corresponding to the current optimal position of the group. n Then x n =[α n γ n This allows us to determine the current optimal position of the swarm corresponding to the adaptive particle swarm optimization algorithm. Based on this, the current fitness value is calculated using the fitness function and the updated current individual position. For a single particle, if the current fitness value is higher than the fitness value corresponding to the current optimal position, it means a better solution has been found. This better solution is taken as the optimal solution, i.e., the current individual position generated after this iteration is taken as the current optimal individual position. After updating the current optimal individual position and the current optimal swarm position, we return to step three and let the adaptive particle swarm optimization algorithm perform another iteration. This process is repeated until the number of iterations of the bat algorithm reaches the maximum number of iterations (i.e., the second preset number of iterations), indicating that the iteration is complete. The current best bat corresponds to the global optimal solution, and the path traversed by the current best bat is the global optimal path. Using this as the target path completes one path planning.

[0141] Optionally, such as Figure 2 As shown, when the bat algorithm reaches the second preset number of iterations, the target path is obtained based on the current best bat, including:

[0142] The path corresponding to the current best bat is taken as the intermediate path, and the intermediate path is smoothed by a preset continuous high-order Bézier curve to obtain the target path.

[0143] In this embodiment, the intermediate path corresponding to the current best bat may have many sharp angles or straight lines, which is not conducive to directly guiding the movement of the mobile robot. The target path is obtained by smoothing the intermediate path with a preset continuous high-order Bézier curve, which helps to reduce unnecessary oscillations or shaking, avoid the mobile robot from tipping over due to uneven path, and improve the safety of subsequent mobile robot operation.

[0144] In this embodiment, a continuous high-order Bézier curve P(t) is used for path smoothing to satisfy the following:

[0145]

[0146] Where, p i =(x i y i ) T It represents a coordinate vector consisting of the x-axis and y-axis coordinate components corresponding to the i-th waypoint on the intermediate path; T represents the transpose; t represents different positions on the Bézier curve.

[0147] B i,n (t) represents a Bessel polynomial of degree n, i = 0, 1, ..., n. i,n (t) satisfies:

[0148]

[0149] For example, the first derivative of a Bézier curve Second derivative And in the two-dimensional plane, the curvature κ(t) along the Bézier curve satisfies:

[0150]

[0151]

[0152] in, and Represent the x-axis and y-axis components of the first derivative of the Bézier curve; and This represents the x-axis and y-axis coordinate components of the second derivative of a Bézier curve. Similarly, derivatives and curvatures of other orders can be obtained from a known order.

[0153] It should be understood that when using low-order Bézier curves for path smoothing, the shape of the path is easily constrained, and the shape of the curve is limited by control points, which can easily lead to path discontinuities and poor path smoothness at connection points. This embodiment uses high-order Bézier curves for path smoothing, which overcomes the limitations of using low-order Bézier curves and improves the smoothness of the path.

[0154] Another embodiment of the present invention provides a path planning optimization device for a mobile robot, comprising:

[0155] The initialization module is used to obtain the starting and ending positions of the path planning, and to initialize the parameters and population of the preset adaptive particle swarm algorithm and the preset bat algorithm respectively, so as to obtain the current particle state and the current bat state.

[0156] The fitness evaluation module is used to determine the optimal position of the current population and the optimal position of the current individual based on the current particle state and the preset fitness function.

[0157] The first iteration module is used to perform one iteration of the adaptive particle swarm algorithm based on the current optimal position of the current swarm and the current optimal position of the current individual, and update the current particle state, where the current particle state includes the current individual position and the current individual velocity of each particle;

[0158] The second iteration module is used to obtain the search parameters corresponding to each bat in the bat algorithm based on the current individual position, and to perform one iteration of the bat algorithm based on the search parameters to update the current bat state and obtain the current best bat. The search parameters include the loudness attenuation coefficient and the pulse emission rate enhancement coefficient.

[0159] The path generation module is used to update the optimal position of the current group based on the optimal search parameters corresponding to the current best bat and to update the optimal position of the current individual based on the current individual position. It returns the steps of performing one iteration of the adaptive particle swarm algorithm based on the current optimal position of the group and the current optimal position of the individual, updating the current particle state, until the bat algorithm reaches the second preset number of iterations to generate the target path from the starting position to the ending position.

[0160] The path planning optimization device for mobile robots provided in this embodiment achieves essentially the same technical effect as the path planning optimization method for mobile robots, and will not be described in detail here.

[0161] Another embodiment of the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the path planning optimization method for a mobile robot as described above.

[0162] The computer-readable storage medium provided in this embodiment achieves essentially the same technical effect as the path planning optimization method for mobile robots, and will not be described in detail here.

[0163] The present invention will now describe electronic devices that can serve as servers or clients of the present invention, which are examples of hardware devices that can be applied to various aspects of the present invention. Electronic devices are intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic devices can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0164] Electronic devices include a computing unit that can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) or loaded from a storage unit into random access memory (RAM). The RAM can also store various programs and data required for device operation. The computing unit, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.

[0165] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other.

[0166] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc. In this application, the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of the present invention according to actual needs. Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units can be implemented in hardware or as software functional units.

[0167] While the present invention has been disclosed above, its scope of protection is not limited thereto. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the invention, and all such changes and modifications will fall within the scope of protection of the present invention.

Claims

1. A path planning optimization method for a mobile robot, characterized in that, Includes the following steps: Step 1: Obtain the starting and ending positions of the path planning, initialize the parameters and population of the preset adaptive particle swarm algorithm and the preset bat algorithm respectively, and obtain the current particle state and the current bat state. Step 2: Based on the current particle state and the preset fitness function, determine the current optimal position of the population and the current optimal position of the individual. Step 3: Based on the current optimal position of the swarm and the current optimal position of the individual, perform one iteration of the adaptive particle swarm algorithm to update the current particle state, wherein the current particle state includes the current individual position and current individual velocity of each particle; Step 4: Obtain the search parameters corresponding to each bat in the bat algorithm based on the current individual position, and perform one iteration of the bat algorithm based on the search parameters to update the current bat state and obtain the current best bat. The search parameters include loudness attenuation coefficient and pulse emission rate enhancement coefficient. Step 5: Update the optimal position of the current group based on the optimal search parameters corresponding to the current best bat, and update the optimal position of the current individual based on the current individual position, and return to Step 3 until the bat algorithm reaches the second preset number of iterations to generate the target path from the starting position to the ending position.

2. The path planning optimization method for a mobile robot according to claim 1, characterized in that, The current individual position includes the initial individual position, and step two includes: The initial individual position is taken as the current optimal individual position; Based on the fitness function and the initial individual position, a first fitness value is obtained for each particle, and the initial individual position corresponding to the particle with the largest first fitness value is taken as the optimal position of the current group.

3. The path planning optimization method for a mobile robot according to claim 1, characterized in that, Step three includes: The current individual speed is updated, and the speed update satisfies: The current individual location is updated, and the location update satisfies: Where k represents the number of iterations; i represents the i-th particle; This represents the current individual velocity of the i-th particle at the k-th iteration; This represents the current individual position of the i-th particle at the k-th iteration; This represents the optimal position of the current individual corresponding to the i-th particle in the k-th iteration; λ represents the optimal position of the current group at the k-th iteration; r1 and r2 represent random numbers in [0,1]; c1 represents the individual consciousness weight coefficient, c2 represents the group consciousness weight coefficient; λ represents the linear adjustment variable.

4. The path planning optimization method for a mobile robot according to claim 3, characterized in that, The individual consciousness weighting coefficient satisfies: The group consciousness weight coefficient satisfies: Among them, c 1i c represents the first preset initial value corresponding to the individual consciousness weight coefficient; 1f c represents the first preset final value corresponding to the individual consciousness weight coefficient; 2i c represents the second preset initial value corresponding to the group consciousness weight coefficient; 2f k represents the second preset final value corresponding to the group consciousness weight coefficient. max This indicates the first preset number of iterations.

5. The path planning optimization method for a mobile robot according to claim 3, characterized in that, The linear adjustment variable satisfies: in, Let represent the evolution factor at the k-th iteration, wherein the evolution factor satisfies: in, This represents the average distance between the optimal particle at the current optimal position of the population and other particles at the k-th iteration. and These represent the maximum and minimum average distances between any given particle and the other particles, respectively.

6. The path planning optimization method for a mobile robot according to any one of claims 1-5, characterized in that, Step four includes: The search parameters are obtained by using the two-dimensional coordinates corresponding to the current individual position as a two-dimensional vector composed of the loudness attenuation coefficient and the pulse emission rate enhancement coefficient; The bat algorithm is iterated once based on the search parameters to update the current bat state, wherein the current bat state includes the current bat position and the current bat speed; Based on the fitness function and the current bat position, a second fitness value is obtained for each bat, and the bat with the largest second fitness value is taken as the current best bat.

7. The path planning optimization method for a mobile robot according to claim 6, characterized in that, Step five includes: The two-dimensional vector corresponding to the optimal search parameters is used as the two-dimensional coordinate value corresponding to the optimal position of the current group. Update the optimal position of the current individual based on the current individual position, and return to step three; When the bat algorithm reaches the second preset number of iterations, the target path is obtained based on the current best bat.

8. The path planning optimization method for a mobile robot according to claim 7, characterized in that, When the bat algorithm reaches the second preset number of iterations, obtaining the target path based on the current best bat includes: The path corresponding to the current best bat is taken as the intermediate path, and the intermediate path is smoothed using a preset continuous high-order Bézier curve to obtain the target path.

9. A path planning and optimization device for a mobile robot, characterized in that, include: The initialization module is used to obtain the starting and ending positions of the path planning, and to initialize the parameters and population of the preset adaptive particle swarm algorithm and the preset bat algorithm respectively, so as to obtain the current particle state and the current bat state. The fitness evaluation module is used to determine the optimal position of the current population and the optimal position of the current individual based on the current particle state and a preset fitness function. The first iteration module is used to perform one iteration of the adaptive particle swarm algorithm based on the current optimal position of the swarm and the current optimal position of the individual, and update the current particle state, wherein the current particle state includes the current individual position and the current individual velocity corresponding to each particle; The second iteration module is used to obtain the search parameters corresponding to each bat in the bat algorithm based on each current individual position, and to perform one iteration of the bat algorithm based on the search parameters to update the current bat state and obtain the current best bat. The search parameters include loudness attenuation coefficient and pulse emission rate enhancement coefficient. The path generation module is used to update the optimal position of the current group based on the optimal search parameters corresponding to the current best bat and to update the optimal position of the current individual based on the current individual position. It also returns the step of performing one iteration of the adaptive particle swarm algorithm based on the optimal position of the current group and the optimal position of the current individual, and updating the current particle state, until the bat algorithm reaches the second preset number of iterations to generate the target path from the starting position to the ending position.

10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the path planning optimization method for a mobile robot as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Path planning method based on bat algorithm and reinforcement learning

    CN110632922A

  • Hybrid path planning method for indoor mobile robot

    CN111930121A