A path optimization method based on cooperative aggregation and branch bias
By designing a fitness function and a collaborative aggregation strategy to optimize path planning, the problems of insufficient speed, accuracy and adaptability of existing algorithms are solved, and more efficient path planning is achieved, avoiding local optima and planning paths that are closer to the optimal connection between the start and end points.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JIANGSU OCEAN UNIV
- Filing Date
- 2022-12-30
- Publication Date
- 2026-04-21
AI Technical Summary
Existing path planning algorithms are insufficient in terms of speed, accuracy, and adaptability, and suffer from local optima, resulting in significant differences between the planned path and the shortest connection between the start and end points, leading to low search efficiency and speed.
A path optimization method based on cooperative aggregation and branch deviation is adopted. A fitness function is designed, and branch deviation, path turning penalty and path length are combined. The population is optimized through cooperative aggregation strategy and replacement strategy to enhance the search ability of the algorithm and avoid local optima.
It improves the search capability and convergence speed of path planning, and the planned path is closer to the optimal connection between the start and end points, thus shortening the planned path length and convergence time.
Smart Images

Figure CN116295398B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to robot path planning methods, and more particularly to a path optimization method based on cooperative aggregation and branch deviation. Background Technology
[0002] With the continuous development of control technology and artificial intelligence, robots are widely used in various fields such as production, military, and daily life. The key to path planning lies in the selection of the path search algorithm. As the demand for robot autonomy increases across various fields, traditional path planning algorithms are no longer sufficient to meet the requirements in terms of speed, accuracy, and adaptability. As a necessary condition for robots to perform various tasks, path planning algorithms play an irreplaceable role in robot movement.
[0003] One way to improve algorithm performance is to design corresponding strategies to enhance the algorithm's capabilities by addressing its inherent problems; or to introduce relevant mathematical models to solve its shortcomings. Another approach is to integrate with other algorithms to achieve complementary advantages.
[0004] Both domestic and international researchers have conducted relevant studies on these two methods. Currently, improvements to the algorithms themselves mainly focus on slightly enhancing their convergence speed and population diversity, resulting in limited applicability. Algorithm fusion, on the other hand, allows for complementary strengths and significantly enhances capabilities. Existing path planning methods primarily focus on improving search speed and individual update methods, with relatively little research on fitness function improvements, despite the fitness function being one of the most crucial factors in an algorithm's optimization ability. Furthermore, existing algorithms still find a discrepancy between the final path searched and the shortest connection between the start and end points, leading to low search efficiency and speed; local optima can still occur during iteration.
[0005] Patent application CN 115469671A proposes a robot path planning method based on a clustering-permutation strategy. This method considers the combined effects of path length, angle, and robot energy consumption on path planning and proposes a new fitness function to balance the relationship between path length, angle, and robot energy consumption. It introduces a clustering strategy to enhance the search capability of the solution space, while utilizing a permutation strategy to enable the algorithm to quickly escape local optima, effectively avoiding the algorithm getting trapped in local optima and accelerating convergence speed, thus maximizing the algorithm's performance. However, this method's fitness function only considers path length and corner energy consumption, which leads to a certain difference between the planned path and the shortest connection between the start and end points, resulting in less than ideal planning efficiency and the final planned path. Furthermore, the clustering strategy of this method moves individuals with poor fitness closer to the optimal position in each iteration, which also exacerbates the possibility of getting trapped in local optima to some extent. Summary of the Invention
[0006] Purpose of the invention: To address the problems existing in the prior art, the purpose of this invention is to provide a path optimization method based on cooperative aggregation and branch deviation, and to apply it to robot path planning. This method effectively enhances the search capability of the algorithm, while also taking into account the convergence speed and the ability to escape local optima, thus greatly shortening the final planned path length and convergence time of traditional algorithms.
[0007] Technical solution: A path optimization method based on collaborative aggregation and branch deviation, comprising the following steps:
[0008] (1) Initialize the population and variables, and randomly divide the population into two subpopulations s1 and s2, with the total number of individuals in subpopulations s1 and s2 being n1 and n2, respectively.
[0009] (2) Design a fitness function based on branch deviation, path turning penalty, path length, and normalization; the expression of the fitness function is as follows:
[0010]
[0011] Where n is the number of individuals in the population; f1(n) is the branch bias, f2(n) is the path turning penalty, and f3(n) is the path length; μ is the mean of f1(n), f2(n), and f3(n), and ξ is the standard deviation of f1(n), f2(n), and f3(n); α, β, and γ are the weight coefficients of f1(n), f2(n), and f3(n), respectively.
[0012] The fitness of individuals in subpopulations s1 and s2 is calculated based on the fitness function. Based on the fitness value, the individuals in the two subpopulations are sorted from smallest to largest, and the optimal individuals gb1 and gb1 in subpopulations s1 and s2 are selected respectively. The optimal individuals gb1 and gb1 are the individuals with the smallest fitness values in subpopulations s1 and s2 respectively.
[0013] (3) Keep the i1 and i2 individuals with the highest fitness ranking in subpopulations s1 and s2 respectively, and take the remaining n1-i1 and n2-i2 individuals in subpopulations s1 and s2 as clustered individuals b1 and b2.
[0014] (4) Use the collaborative aggregation strategy to act on aggregated individuals b1 and b2 respectively;
[0015] (5) Based on fitness, the top m1% and m2% of s1 and s2 are taken respectively to synthesize a new population s3, m1% + m2% = 100%;
[0016] (6) Randomly update individual s3 using a replacement strategy, and update the globally optimal individual;
[0017] (7) Determine whether the termination condition has been met. If not, use the crossover operator and mutation operator to increase population diversity.
[0018] (8) Iterate according to steps (2)-(7) until stopping, and output the optimal path.
[0019] Furthermore, the calculation process for the branch bias in the fitness function is as follows:
[0020] Connect the starting point to each path node in a feasible path and find the slopes of these lines.
[0021] The branch deviation angle σ is defined as the angle between each slope and the slope of the line connecting the starting point and the ending point. The formula for calculating σ is as follows:
[0022] σ=|arctan k-45°|
[0023] Where k is the slope of the straight line formed by the starting point and a path node in the path;
[0024] A deviation penalty L is applied to each branch deviation angle, then the total branch deviation is:
[0025]
[0026] Where i represents the i-th node in the path, and N represents the total number of nodes in the path.
[0027] Preferably, the deviation penalty applied based on the deviation angle is as follows:
[0028]
[0029] Furthermore, the calculation process for the path turning penalty in the fitness function is as follows:
[0030] Assuming the three nodes in the path are P1(x1,y1), P2(x2,y2), and P3(x3,y3), and the sides of the triangle formed by these three points are a, b, and c, then the angle with P2 as the vertex is the corresponding path angle θ, calculated using the following formula:
[0031]
[0032]
[0033]
[0034]
[0035] A turning energy consumption penalty P is applied based on the path angle to constrain the energy consumption in robot path planning;
[0036] Continue sequentially down one path node until all turning energy penalties have been calculated. The path turning penalty is then:
[0037]
[0038] Where i represents the i-th node in the path, P(i) represents the turning energy penalty of the i-th node, and N represents the total number of nodes in the path.
[0039] Preferably, the applied steering energy penalty is:
[0040]
[0041] Furthermore, the formula for calculating the path length in the fitness function is as follows:
[0042]
[0043] In the formula, N represents the number of path nodes, x i Let y represent the x-coordinate of the i-th path node. i This represents the ordinate of the i-th path node.
[0044] Furthermore, the normalization process of the fitness function is as follows:
[0045] Assign different weights to the three metrics: branch deviation, path turning penalty, and path length, and define the initial fitness function F(n):
[0046] F(n)=αf1(n)+βf2(n)+γf3(n)
[0047] Where α, β, and γ are the weight coefficients of f1(n), f2(n), and f3(n), respectively;
[0048] Calculate the mean values of f1(n), f2(n), and f3(n):
[0049]
[0050] Calculate the standard deviations of f1(n), f2(n), and f3(n):
[0051]
[0052] Based on the mean and variance, the initial fitness function is normalized to obtain the dimensionless fitness function F′(n):
[0053]
[0054] Furthermore, in step (4), the collaborative aggregation strategy uses the distance between the individual whose position needs to be updated and the optimal individual as the step size to update the individual position near the global optimal individual position, and updates the individual position through two different group strategies respectively; the specific steps are as follows:
[0055] (4-1) Determine whether the fitness of the aggregated individual in the subpopulation is greater than 1 / 2 of the total subpopulation;
[0056] (4-2) If lo is greater than 1 / 2 of the total population of the subpopulation, the individual updates its position towards the optimal individual; otherwise, the individual updates its position randomly.
[0057] Specifically, if an individual's fitness ranking position is less than half of the total subpopulation, the individual's position is updated using the following formula:
[0058] P′(num)=P gb +|P(num)-P gb |*A + *L
[0059] num represents the ranking position of the remaining co-aggregated individuals within the entire population; P gb This refers to the optimal position occupied by the individual with the highest fitness in this iteration. Let A be a 1×D matrix, where each element is randomly assigned 1 or -1. + =A T (AA T ) -1 L is a 1×D dimensional matrix where every element is 1;
[0060] If an individual's fitness ranking position is greater than half of the total subpopulation, the individual's position is randomly updated using the following formula:
[0061]
[0062] num represents the ranking position of the remaining co-aggregated individuals within the entire population; P W This represents the position of the worst-fit individual from the previous generation; Q is a normally distributed random number.
[0063] (4-3) Repeat steps (4-1)-(4-2) until all aggregated individuals have updated their positions;
[0064] (4-4) Update the individuals in the updated subpopulation s1; preferably, use the flocking foraging strategy to update the velocity and particles of the individuals in the subpopulation s1.
[0065] (4-5) Use the spider population strategy to update the s2 individuals in the subpopulation.
[0066] Beneficial effects
[0067] Compared with the prior art, the present invention has the following significant advantages:
[0068] (1) In terms of fitness function design, a new branch deviation concept is used to enable the algorithm to select a path that better fits the line connecting the start and end points in space while ensuring that the robot avoids obstacles. The new fitness function balances the relationship between length, angle and robot energy consumption.
[0069] (2) A collaborative aggregation strategy is proposed to optimize the population. Two different population strategies are combined to update the two sub-populations, which further enhances the path search capability and significantly improves the algorithm's optimization capability. In order to avoid the algorithm getting trapped in local optima, a permutation strategy is used to explore the unsearched solution space, and a specific operator is used to enhance the diversity of the population.
[0070] (3) Compared with the invention patent application with publication number CN 115469671A, this algorithm has better running efficiency and search ability, and the planned route is closer to the optimal connection between the starting point and the end point while avoiding obstacles. Attached Figure Description
[0071] Figure 1 This is a flowchart illustrating the implementation of the present invention;
[0072] Figure 2 Path map generated for PSO;
[0073] Figure 3 The path graph generated for PSO_GA;
[0074] Figure 4 The path graph generated for IDPS;
[0075] Figure 5 Path map generated for GB_PSO;
[0076] Figure 6 This is the path diagram generated for this invention. Detailed Implementation
[0077] The embodiments of the technical solution of the present invention will now be described in detail with reference to the accompanying drawings. These embodiments are merely illustrative of the technical solution of the present invention and are therefore intended to limit the scope of protection of the present invention.
[0078] Reference Figure 1 The preferred embodiment shown indicates that the present invention includes the following steps:
[0079] (1) Initialize the population and variables, and divide the population into two subpopulations s1 and s2 according to a 50% ratio. Each subpopulation contains n individuals.
[0080] (2) Design a fitness function based on branch deviation, path turning penalty, path length and normalization; calculate the fitness of individuals in subpopulations s1 and s2 according to the fitness function; sort the individuals in the two subpopulations from smallest to largest according to the fitness value, and select the optimal individuals gb1 and gb1 in subpopulations s1 and s2 respectively. The optimal individuals gb1 and gb1 refer to the individuals with the smallest fitness value in subpopulations s1 and s2.
[0081] (3) Keep the i individuals with the highest fitness ranking in subpopulations s1 and s2 respectively (preferably keep 10%-20% of the individuals with the highest fitness ranking), and take the remaining individuals in subpopulations s1 and s2 as clustered individuals b1 and b2.
[0082] (4) Use the collaborative aggregation strategy to act on the aggregated individuals b1 and b2 respectively.
[0083] (5) Based on fitness, the first 50% of s1 and s2 are used to synthesize a new population s3.
[0084] (6) Use a replacement strategy to randomly update the s3 individuals and update the global optimal individuals.
[0085] (7) Determine whether the termination condition has been met. If not, use the crossover operator and mutation operator to increase population diversity.
[0086] (8) Iterate according to steps (2)-(7) until stopping, and output the optimal path.
[0087] 1. Fitness Function Design
[0088]
[0089] In equation (1), n is the number of individuals in the population; f1(n) is the branch deviation, f2(n) is the path turning penalty, f3(n) is the path length; μ is the mean of f1(n), f2(n) and f3(n), ξ is the standard deviation of f1(n), f2(n) and f3(n); α, β and γ are the weight coefficients of f1(n), f2(n) and f3(n) respectively.
[0090] In step (2), the fitness function design mainly includes four parts: branch bias, path turning penalty, path length, and normalization. Each part is described below.
[0091] 1) Branch deviation
[0092] In fitness function design, this invention proposes a new concept of branch deviation. The shortest path from the starting point to the ending point is the path connecting the starting point and the ending point. Due to the existence of obstacles, feasible paths will inevitably deviate from this connecting line, which is called branch deviation. Branch deviation reflects the degree of deviation of the straight-line distance to the destination in path planning. Therefore, this invention believes that it can serve as an important basis for fitness evaluation in the evolutionary process. This invention connects the starting point to each path node in a feasible path and calculates the slope of these straight lines. The angle deviation between each slope and the slope of the line connecting the starting point and the ending point is called the branch deviation angle σ. The formula for calculating σ is shown in formula (2).
[0093] σ=|arctan k-45°| (2)
[0094] In formula (2), k is the slope of the straight line formed by the starting point and a path node. Assuming the path node is P4(x4,y4) and the coordinates of the starting point are fixed at (0,0), then...
[0095] A deviation penalty L is applied to each branch deviation angle, and the value of the deviation penalty L is as follows:
[0096]
[0097] The total branch deviation is:
[0098]
[0099] Where i represents the i-th node in the path, and N represents the total number of nodes in the path.
[0100] 2) Path turning penalty
[0101] This metric primarily evaluates the magnitude of the turning angle and energy consumption during the iteration process of this invention. The path turning angle is determined by sequentially selecting three path nodes starting from the origin. A turning angle can be calculated from these three points, and this invention applies a turning penalty based on the magnitude of this turning angle. This process is then repeated sequentially, one path node at a time, until all turning penalties have been calculated. The specific implementation process is as follows:
[0102] Assume that the three nodes in the path are P1(x1,y1), P2(x2,y2) and P3(x3,y3), and the three sides of the triangle formed by these three points are a, b and c. Then the angle with P2 as the vertex is the corresponding path angle θ, which can be obtained according to formula (5).
[0103]
[0104] A penalty is applied based on the size of the path angle to constrain energy consumption in robot path planning.
[0105] Optionally, the energy consumption penalty applied is shown in Equation (6).
[0106]
[0107] The path angle penalty is then:
[0108]
[0109] Where i represents the i-th node in the path, and N represents the total number of nodes in the path;
[0110]
[0111]
[0112]
[0113] 3) Path length
[0114] The path length is calculated using Euclidean distance, as shown in formula (11).
[0115]
[0116] In the formula, N represents the number of path nodes, x i Let y represent the x-coordinate of the i-th path node. i This represents the ordinate of the i-th path node.
[0117] 4) Normalization processing
[0118] Since the three indicators have different dimensions, and as the size of the raster map increases, the influence of path length is much greater than that of the other two indicators, which will weaken or even render the evaluation ability of path turning penalty and deviation penalty ineffective. Therefore, this invention introduces a normalization operation into the fitness function to eliminate the influence of different dimensions.
[0119] Based on the fitness function design above, different weights are assigned to the three indicators, and the form of the initial fitness function is shown in formula (12).
[0120] F(n)=αf1(n)+βf2(n)+γf3(n) (12)
[0121] Preferably, α, β, and γ are 0.5, 0.3, and 0.2, respectively.
[0122] The mean values of f1(n), f2(n), and f3(n):
[0123]
[0124] The standard deviations of f1(n), f2(n), and f3(n) are:
[0125]
[0126] From formula (14), it can be seen that the optimal path is one with a shorter path length, lower energy consumption at path turns, and a closer fit to the line connecting the starting and ending points. Furthermore, the optimal path has the lowest fitness value. After normalization, the final form of the fitness function is:
[0127]
[0128] 2. Fitness ranking process
[0129] In this invention, the initial population size is 2n. Therefore, after dividing the population into two subpopulations, the total number of individuals in each subpopulation is n during the initial fitness sort. At this time, each individual in the two subpopulations is arranged in ascending order of fitness. After generating new individual positions using a cooperative aggregation strategy, a portion of the fitness from each of the two subpopulations is taken to synthesize a new population of 2n. The individuals in the new population are updated using a replacement strategy. It is then determined whether the maximum number of iterations has been reached. If the maximum number of iterations has been reached, the iteration ends. Otherwise, a new population of 2n individuals is generated using crossover and mutation operators, at which point the total number of individuals in the population is 4n. The fitness of the 4n individuals is calculated, and the top 2n individuals with the highest fitness are retained for the next iteration.
[0130] 3. Collaborative aggregation strategy
[0131] Step (4) of this invention proposes a collaborative aggregation strategy, specifically utilizing an aggregation strategy and two group strategies to collaboratively enhance the performance of the algorithm. The specific steps are as follows:
[0132] (4-1) Determine the fitness of b1 and b2 in the order of subpopulations s1 and s2 respectively.
[0133] (4-2) If the fitness ranking position of b1 and b2 is less than n / 2, update the position of b1 and b2; otherwise, update the position of b1 and b2 randomly.
[0134] (4-3) Repeat steps (4-1)-(4-2) until all remaining individuals in the population have been traversed.
[0135] (4-4) Update the velocity and position of individuals in subpopulation s1.
[0136] (4-5) Use the spider population strategy to update the s2 individuals in the subpopulation.
[0137] The collaborative clustering strategy primarily guides individuals with moderate fitness to move closer to the position of the individual with optimal fitness, while allowing individuals with poor fitness to randomly explore the solution space, thereby enhancing the algorithm's search capability. At the same time, it updates the individual positions using two different group strategies to further enhance the path search capability.
[0138] See Algorithm 1 for the specific strategy implementation.
[0139]
[0140]
[0141] The core idea of the clustering strategy is: first, sort the population by fitness and find the best individuals; retain a portion of the excellent individuals and update the positions of the remaining individuals using the clustering strategy; the remaining individuals are divided into medium and poor individuals according to the criteria and updated in different ways (if the ranked individuals are less than 1 / 2 of the total population, these individuals are considered medium individuals, otherwise they are poor individuals).
[0142] The new way to locate the medium-sized individual is as shown in formula (15):
[0143] P′(num)=P gb +|P(num)-P gb |*A + *L (15)
[0144] The new method for determining the location of the weaker individuals is shown in formula (16):
[0145]
[0146] In formulas (15) and (16), num represents the ranking position of the remaining individuals that co-aggregate within the entire population; P gb This is the optimal position occupied by the individual with the highest fitness in this iteration, P. W This represents the position of the worst-fit individual from the previous generation. A is a 1×D matrix where each element is randomly assigned 1 or -1, and A... + =A T (AA T ) -1 Q is a normally distributed random number, and L is a 1×D matrix in which every element is 1.
[0147] To enhance the algorithm's optimization capabilities, a hybrid population strategy is proposed in the collaborative aggregation strategy. One approach involves updating the velocity and particle count of individuals in the subpopulation s1, preferably using a mathematical model of velocity and position updates based on bird flock foraging behavior. The other approach uses a mathematical model simulating spider behavior. These two population strategies are described below.
[0148] (1) Bird flock foraging strategies
[0149] The main process of bird flock foraging behavior involves searching and updating using speed and the position of each bird. In this strategy, the mathematical model for updating bird speed is shown in formula (17).
[0150] V i+1 =wV i +C1random(0,1)(P i -X i )+C2random(0,1)(P g -X i (17)
[0151] Where w is called the inertia factor, and C1 and C2 are called acceleration constants, generally C1 = C2. random(0,1) represents a random number in the interval (0,1). P i Let P represent the extreme value of an individual in the i-th iteration. g X represents the global optimal extreme value; i V represents the position of the i-th particle; i V represents the velocity of the particle in this iteration. i+1 The method for updating the particle's velocity and position in the next iteration is as follows:
[0152] X i+1 =X i +V i+1 (18)
[0153] (2) Spider group strategy
[0154] Spider swarm strategy originates from the Black Widow algorithm, whose core is a mathematical model of three behaviors: reproduction, cannibalism, and mutation.
[0155] Reproductive behavior is used to increase the diversity of individuals in a population. The mathematical model of the reproductive process is as follows:
[0156]
[0157] Where x1 and x2 are parent individuals, and y1 and y2 are offspring individuals; α is a generated random number array, and any parent individual included in the array will engage in reproductive behavior.
[0158] The cannibalistic strategy primarily enhances the population's global search capabilities. Specific descriptions of reproduction and cannibalistic strategies are shown below.
[0159] Step 1: For 1 to pop (total number of individuals)
[0160] Step 2: Randomly select two individuals from the population as parents.
[0161] Step 3: Use formula (19) to generate offspring D
[0162] Step 4: Randomly destroy a parent.
[0163] Step 5: Destroy a portion of the offspring individuals based on the probability of cannibalism.
[0164] Step 6: Retain the remaining individuals as the parents for the next iteration.
[0165] Step 7: End
[0166] To compare the performance of this invention with other algorithms under different simulation environments and verify the effectiveness and applicability of this invention (hereinafter referred to as the PBAR algorithm) for path planning problems, this embodiment compares the PSO algorithm, PSO_GA algorithm, GB_PSO algorithm, IDPS algorithm, and PBAR algorithm on the Matlab R2020b simulation platform. The parameter settings of the algorithms are shown in Table 1.
[0167] Table 1 Experimental parameter settings
[0168]
[0169] To obtain accurate data to verify the effectiveness of the algorithms, 30 independent experiments were conducted on each of the five algorithms. Simulation experiments were performed on a 100x100 map, with 100 iterations. The path trajectory obtained by the algorithm in one iteration is compared to... Figures 2-6 As shown in the figure. The experimental results are shown in Table 2.
[0170] Table 2 Comparison of 100×100 Simulation Experiment Results
[0171] algorithm Shortest path / cm Longest path / cm Average path / cm Convergent Algebra PSO 337.63 375.2 352.79 90 PSO_GA 302.45 341.58 329.32 76 IDPS 301.13 340.86 322.18 60 GB_PSO 253.84 281.61 266.14 70 PBAR 196.82 210 201.15 65
[0172] Depend on Figures 2-6 The path trajectory shows that the planned path of this invention is smoother, has fewer corners, and is closer to the shortest line segment between the starting and ending points compared to other algorithms. Regarding optimization capability, Table 2 shows that the length of the final path found by this invention is superior to other algorithms, reducing the length by 42.98%, 38.92%, 37.57%, and 24.42% compared to PSO, PSO_GA, IDPS, and GB_PSO, respectively. Regarding convergence speed, the convergence speed of this invention is comparable to the IDPS algorithm and superior to the PSO, PSO_GA, and GB_PSO algorithms.
[0173] In summary, this invention incorporates a branch deviation index into its fitness function to measure the degree of difference from the optimal route. While ensuring other indicators are maintained, it selects the path with the smallest deviation from the optimal route. Furthermore, it introduces two group strategies into the aggregation strategy and proposes a collaborative aggregation strategy to strengthen the aggregation strategy and avoid getting trapped in local optima. Comparative verification shows that this invention generally outperforms the previous one in terms of final path length and time efficiency, and effectively avoids getting trapped in local optima.
[0174] The above embodiments are merely some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
Claims
1. A path optimization method based on cooperative aggregation and branch deviation, characterized in that, Includes the following steps: (1) Initialize the population and variables, and randomly divide the population into two subpopulations. , subpopulation , The total number of individuals are respectively n 1 、n 2 ; (2) Design a fitness function based on branch deviation, path turning penalty, path length, and normalization; the expression of the fitness function is as follows: in, The number of individuals in the population; For branch deviation, For path turning penalties, This is the path length; yes , and The mean, for , and Standard deviation; , , They are respectively , , Weighting coefficients; Calculate the subpopulation based on the fitness function. , The fitness of individuals in the two subpopulations was used to rank the individuals in the two subpopulations from smallest to largest, and the subpopulations were selected from each subpopulation. , The best individual The optimal individual Sub-populations , The individual with the lowest fitness value; (3) Retain subpopulations separately , Those ranked higher by fitness i 1 , i 2 Individuals, subgroups , The remaining ones n 1 - i 1 、n 2 -i 2 Individuals as aggregates , ; (4) Utilize collaborative aggregation strategies to act on aggregated individuals separately. , The collaborative aggregation strategy uses the distance between the individual whose position needs to be updated and the optimal individual as the step size to update the individual position near the globally optimal individual position, and updates the individual position through two different group strategies respectively; the specific steps are as follows: (4-1) Determine the position of the fitness of the aggregated individual within the subpopulation. lo Is it greater than 1 / 2 of the total subpopulation? (4-2) If lo Greater than 1 / 2 of the total subpopulation , The individual updates its position towards the optimal individual; otherwise, the individual updates its position randomly; if the individual's fitness ranking position is less than 1 / 2 of the total subpopulation, the individual's position is updated using the following formula: This is the optimal position occupied by the individual with the highest fitness in this iteration. This represents a matrix with dimension 1×D. Each element is randomly assigned 1 or -1, and ; It is a 1×D dimensional matrix where every element is 1; If an individual's fitness ranking position is greater than half of the total subpopulation, the individual's position is randomly updated using the following formula: This indicates the position of the worst-fitting individual from the previous generation; It is a normally distributed random number; (4-3) Repeat steps (4-1)-(4-2) until all aggregated individuals have updated their positions; (4-4) For the updated subpopulation Individuals update their velocity and particles; (4-5) Update subpopulations using spider colony strategies individual; (5) Take according to fitness respectively , The former m 1 %, m 2 % Synthetic new population , m 1 %+ m 2 %=100%; (6) Update randomly using a replacement strategy Individual, and update the globally optimal individual; (7) Determine whether the termination condition has been met. If not, use the crossover operator and mutation operator to increase population diversity. (8) Iterate according to steps (2)-(7) until stopping, and output the optimal path.
2. The path optimization method based on collaborative aggregation and branch deviation according to claim 1, characterized in that, The calculation process for the branch deviation is as follows: Connect the starting point to each path node in a feasible path and find the slopes of these lines. Define the angle deviation between each slope and the slope of the line connecting the starting and ending points as the branch deviation angle. , The calculation formula is as follows: in, k The slope of the straight line formed by the starting point and a path node in the path; A deviation penalty is applied based on the deviation angle of each branch. Then the total branch deviation is: in, Indicates the first in the path 1 node This indicates the total number of nodes in the path.
3. The path optimization method based on collaborative aggregation and branch deviation according to claim 2, characterized in that, The deviation penalty applied based on the deviation angle is as follows: 。 4. The path optimization method based on collaborative aggregation and branch deviation according to claim 1, characterized in that, The calculation process for the path turning penalty is as follows: Assume the three nodes in the path are , and The three sides of the triangle formed by these three points are as follows: , , Then The angle at a vertex is the corresponding path angle. The calculation formula is as follows: Apply a steering energy penalty based on the path angle. To constrain energy consumption in robot path planning; Continue sequentially down one path node until all turning energy penalties have been calculated. The path turning penalty is then: in, Indicates the first in the path 1 node No. Steering energy consumption penalty at each node This indicates the total number of nodes in the path.
5. The path optimization method based on cooperative aggregation and branch deviation according to claim 4, characterized in that, The applied steering energy penalty is: 。 6. The path optimization method based on collaborative aggregation and branch deviation according to claim 1, characterized in that, The formula for calculating the path length is as follows: In the formula Indicates the number of path nodes. Indicates the first The x-coordinate of each path node, Indicates the first The ordinate of each path node.
7. The path optimization method based on collaborative aggregation and branch deviation according to claim 1, characterized in that, The specific process of the normalization is as follows: Assign different weights to the three metrics: branch deviation, path turning penalty, and path length, and define the initial fitness function. : in, , , They are respectively , , Weighting coefficients; calculate , and Mean: calculate , and Standard deviation: The initial fitness function is normalized based on the mean and variance to obtain the dimensionless fitness function. : 。 8. The path optimization method based on collaborative aggregation and branch deviation according to claim 1, characterized in that, In step (4-4), the bird flocking foraging strategy is used to target subpopulations. Individuals update their speed and particles.
Citation Information
Patent Citations
Robot path planning method based on aggregation-replacement strategy
CN115469671A