A 3D path planning method for UUV particle swarm with adaptive parameter adjustment
By adaptively adjusting parameters and introducing adaptive mutation and step-size local search, the three-dimensional path planning method of UUV is improved, and the problem of sensitive parameter settings and long running time is solved, achieving more efficient and stable path planning.
Patent Information
- Application Number
- CN202410902565.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-07
- Publication Date
- 2025-07-01
- Estimated Expiration
- 2044-07-07
AI Technical Summary
In the three-dimensional path planning of UUV, the particle swarm algorithm has the problem of sensitive parameter settings, difficulty in achieving global search and long running time.
A three-dimensional path planning method for UUV particle swarm with adaptive parameter adjustment is proposed. By adaptively adjusting inertial weights and learning factors, combining adaptive variation and adaptive step size local search, path planning is optimized.
More effective path optimization is achieved, the stability and reliability of the algorithm is improved, the running time is shortened, and the generated paths are more reasonable, shorter and smoother.
Smart Images

Figure CN118760173B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to ocean engineering equipment, particularly to the field of path planning for Unmanned Underwater Vehicles (UUVs), and more particularly to a three-dimensional path planning method for UUV particle swarm with adaptive parameter adjustment. Background Art
[0002] UUVs are increasingly widely used in the field of ocean engineering, covering multiple aspects such as ocean exploration, ocean environmental services, environmental monitoring of ocean water quality and ecological elements, ocean resource development, ocean safety rescue, ocean material science research, and protection of ocean cultural heritage. The realization of these applications depends on the efficient path planning ability of UUVs to ensure that they can safely and economically complete tasks in complex three-dimensional underwater environments.
[0003] However, the path planning of UUVs faces many challenges, including the complexity of the underwater environment, the energy and communication limitations of UUVs themselves, and the requirements for compressive strength. Effective path planning can not only save energy and shorten the voyage, but also improve the success rate of tasks.
[0004] Although there are various path planning methods, such as Dijkstra algorithm, A* algorithm, depth-first search, breadth-first search, genetic algorithm, Q-learning, deep reinforcement learning, etc., they all have limitations. For example, many algorithms perform well in two-dimensional space but may not meet the complex obstacle avoidance requirements in three-dimensional space.
[0005] The particle swarm optimization algorithm shows advantages in three-dimensional path planning due to its simplicity, global search ability, and robustness. However, there are still some problems in its practical application that require further research and improvement.
[0006] (1) Sensitive to parameter settings: The performance and convergence speed of the particle swarm algorithm are affected by parameters such as the number of particles, inertia weight, and acceleration factors. Improper parameter selection may lead to slow algorithm convergence or failure to obtain an ideal solution;
[0007] (2) The particle swarm depends on information sharing among particles, which may cause the algorithm to stagnate near the local optimal solution, especially in complex problem spaces, making it difficult to achieve global search;
[0008] (3) The particle swarm algorithm may require multiple iterations to find the optimal solution, which increases the computing time. Especially in three-dimensional complex environments, time efficiency becomes a limiting factor for its application.
[0009] Meanwhile, compared with the present invention, the following methods have the following differences:
[0010] The differences between the improved method provided in the paper "An Improved Particle Swarm Hybrid Path Planning Algorithm Incorporating Hill-Climbing Strategy" and the method described in the present invention are as follows: Using Tent chaotic mapping to initialize the particle swarm will reduce the diversity of the particle swarm, thus reducing the coverage of the search space. Especially in complex spaces, the algorithm may be difficult to jump out of the local optimum; Adopting asynchronous update of individual and social learning factors may affect the convergence speed of the algorithm because different particles are updated at different times, which may lead to inconsistent search directions.
[0011] The differences between the improved method provided in the paper "UAV Urban Area 3D Path Planning Based on Improved PSO Algorithm" and the method described in the present invention are as follows: Searching only through adaptive inertia weight and learning factor will lead to too fast convergence to the local optimum, and the lack of more refined local search will cause the algorithm to be unstable in some cases.
[0012] The differences between the improved method provided in the invention patent (application number: CN 202311868668.3) "A 3D Path Planning Method for UUV Particle Swarm with Multi-Constraint Optimization" and the method described in the present invention are as follows: The inertia weight and learning factor are fixed values, and the mutation rate and local search step size are also fixed values, resulting in too long running time.
[0013] In order to solve the problems such as high requirements for parameter settings of the particle swarm, difficulty in achieving global search, and long running time of the fixed-parameter algorithm, the present invention proposes a 3D path planning method for UUV particle swarm with adaptive parameter adjustment, enabling the parameters to be adaptively and dynamically adjusted, and adding adaptive mutation and adaptive step-size local search to solve parameter settings, achieve global search, and shorten the running time. Summary of the Invention
[0014] In order to solve the problems that occur in the above path planning, the present invention proposes the following technical solutions: Design a 3D path planning method for UUV particle swarm with adaptive parameter adjustment, and establish a 3D map model including mountain obstacles; Then, initialize the particle swarm parameters, calculate the fitness value by the weighted method; Subsequently, find the initial extreme value by traversing the population, record the historical optimal solution, and calculate the adaptive inertia weight and learning factor to update the particle velocity and position; In addition, update the population through adaptive temperature, perform adaptive mutation and adaptive step-size local search to further optimize the UUV navigation path, and finally obtain the final solution. Specifically, it includes the following steps:
[0015] Step 1:
[0016] Establish a 3D map model with mountain obstacles, set the starting point and the ending point, and complete the initialization of the UUV's environment.
[0017] Step 2:
[0018] Initialize the particle swarm parameters, including the population size pop, the maximum gene value pop max and the minimum gene value pop min , the total number of iterations iterations, the maximum cognitive factor value c 1_max and the maximum social factor value c 2_max , the maximum inertia weight value w max and the minimum inertia weight value w min , the speed range v min and v max , the initial temperature temp and the cooling rate r t .
[0019] Step 3:
[0020] Calculate the initial fitness value. Use the weighted method to linearly weight the following four aspects: distance d, height h, average curvature m k and the penalty term res. Combine the above calculation results and use the weighting coefficient to obtain the objective function value fitness. The formula is as follows:
[0021]
[0022] fitness = 0.9 * d + 0.05 * h + 0.05 * m + res * 10 3 (4)
[0023] where d is the length of the path; h is the total height of the UUV heave during navigation; m k is the average curvature of the path; res is the penalty term; fitness is the objective function value, i.e., the fitness value.
[0024] Step 4:
[0025] Find the initial extreme value. Set the initial optimal fitness value fitness best , traverse the fitness values of each individual in the population. If the fitness value of an individual is less than the current optimal fitness value fitness best , then update fitness best to the fitness value of this individual and record the corresponding as the global extreme fitness value, which represents the fitness value of the individual with the optimal fitness value in the entire population.
[0026] Step 5:
[0027] Record the historical optimal solution. Define an array History to record the optimal solutions found during each iteration and update the current iteration's optimal solution to this array.
[0028] Step 6:
[0029] Calculate the adaptive inertia weight, the formula is as follows:
[0030]
[0031] Where, w is the inertia weight; w max is the maximum value of the inertia weight; w min is the minimum value of the inertia weight; iter is the current iteration number; iterations is the total number of iterations.
[0032] Calculate the learning factor, the formula is as follows:
[0033]
[0034] Where, c1 is the cognitive factor; c 1_max is the maximum value of the cognitive factor; c2 is the social factor; c 2_max is the maximum value of the social factor; is a random number of a normal distribution with a mean of 0 and a standard deviation of 0.2.
[0035] Then limit the range of the learning factor, the formula is as follows:
[0036]
[0037] Step 7:
[0038] Update the velocity of the particle, the formula is as follows:
[0039] V t+1 = wV t + c1r1(pbest - x t ) + c2r2(zbest - x t ) (8)
[0040] Where, V t+1 is the velocity of the particle at time t + 1; w is the inertia weight; V t is the velocity of the particle at time t; c1 is the cognitive factor, c2 is the social factor, c1 c2 are adaptively adjusted constants; r1 and r2 are random numbers between [0, 1]; pbest is the historical best position of the particle; zbest is the historical best position extreme value of the particle swarm; x t is the current position of the particle at time t.
[0041] To ensure that the velocity value is maintained within v min and v max For any velocity that exceeds this interval, make appropriate adjustments, the formula is as follows:
[0042]
[0043] Among them, V t+1 is the velocity of the particle at time t + 1; V t is the velocity of the particle at time t; v min is the lower bound of the velocity; v max is the upper bound of the velocity.
[0044] Update the position of the particle, and the formula is as follows:
[0045] x t+1 = x t + η * v t+1 (10)
[0046] Among them, V t+1 is the velocity of the particle at time t + 1; x t+1 is the position of the particle at time t + 1; η is a random factor, usually drawn from a uniform distribution on [0, 1], and is used to introduce randomness.
[0047] To ensure that the particle position does not exceed the range, adjust its position, and the formula is as follows:
[0048]
[0049] Among them, x t+1 is the position of the particle at time t + 1; pop max is the upper bound of the gene maximum value to control the particle position; pop min The gene minimum value controls the lower bound of the particle position; r i is a random factor, usually drawn from a uniform distribution on [0, 1], and is used to add a small random offset to x t+1
[0050] Step 8:
[0051] Calculate the new fitness value according to the velocity and position of the new particle, and then update the individual optimum.
[0052] Step 9:
[0053] Update the population according to the adaptive temperature. First, calculate the difference in fitness, and the formula is as follows:
[0054] df = fit1 - fitness (12)
[0055] Among them, fit1 is the fitness value of the new particle; fitness is the fitness value of the particle.
[0056] If df < 0, then the new solution fit1 is a better solution, directly accept it, and update the velocity and position of the particle; or when When taking, it also accepts the new solution fit1 and updates the velocity and position of the particle. Among them, r is a random number with a value range of [0, 1), and temp iter is the current adaptive temperature value.
[0057] Step 10:
[0058] Perform adaptive mutation on the particles in the population. First, set the basic mutation rate r b and the basic mutation rate decay rate r d . Then calculate the dynamic mutation rate r h so that the adaptive mutation rate can gradually decrease with the progress of iteration. The formula is as follows:
[0059]
[0060] Among them, iter is the current iteration number; iterations is the total number of iterations.
[0061] Then calculate the mutation adjustment factor r f based on fitness so that the smaller the fitness value, the higher the mutation rate. The formula is as follows:
[0062]
[0063] Among them, fitness is the current fitness value; is the historical maximum fitness value.
[0064] Finally, combine the dynamic mutation rate r h and the mutation adjustment factor r f based on fitness to obtain the adaptive mutation rate r m , and the formula is as follows:
[0065] r m = r h *(1 + 0.5 * r f ) (15)
[0066] And perform range limitation on the adaptive mutation rate to ensure that the calculated mutation rate remains within a reasonable range, that is, between 0 and 1. The formula is as follows:
[0067] r m ' = min(max(r m , 0), 1) (16)
[0068] Traverse the particles for mutation. First, randomly select a dimension dim, and then calculate the mutation step size m step , and the formula is as follows:
[0069] m step = (pop dim - gbestdim )*r m ' (17)
[0070] Among them, pop dim is the value of the particle in the dim dimension; gbest dim is the historical maximum value of the particle in the dim dimension; r m ' is the corrected adaptive mutation rate.
[0071] Adjust the mutation amplitude according to the fitness, and the formula is as follows:
[0072]
[0073] Among them, m fb is the adjustment factor based on the fitness; fitness is the current fitness value; is the historical maximum fitness value.
[0074] Mutate the particle population, multiply the mutation step size m step by the adjustment factor m fb based on the fitness, and then add it to the dim dimension of the particle to achieve mutation. The formula is as follows:
[0075] pop dim ' = m step *m fb (19)
[0076] Among them, pop dim ' is the value of the mutated particle in the dim dimension; m step is the mutation step size; m fb is the adjustment factor based on the fitness.
[0077] Check and correct the mutated value. The position of the mutated particle is between [pop min , pop max , and update the record of the individual best and the group best after mutation.
[0078] Step 11:
[0079] Sort the fitness values to obtain the fitness values from small to large, and record and store them. Set the initial step size of reflection to α, the initial step size of scaling to β, set the attenuation ratio α s for controlling the reflection step size, and the attenuation ratio β s for controlling the scaling step size, and then perform local search.
[0080] First, calculate the mean x4 of the particle positions except for the worst particle, then calculate the reflection point x5 of the worst particle and x4, correct x5 to ensure that it does not exceed the boundary, and calculate the fitness value of the reflection point x5 If then calculate the expansion point. First, calculate the adaptive step size α z , and the formula is as follows:
[0081] α z = α * α s iter-1 (20)
[0082] where fit worst is the worst fitness value; α is the initial reflection step size; α s is the reflection step size decay ratio; iter is the current iteration number.
[0083] Then calculate the expansion point x6, and the calculation formula is as follows:
[0084] x6 = x4 + α z * (x worst - x4) (21)
[0085] where x worst is the position of the worst particle in the particle swarm.
[0086] Then correct x6 to ensure that it does not exceed the boundary, and calculate the fitness value of the expansion point x6 If then replace the worst particle x worst with x6; otherwise, replace the worst particle x worst .
[0087] If then calculate the contraction point. First, calculate the adaptive step size β z , and the formula is as follows:
[0088] β z = β * β s iter-1 (22)
[0089] where fit worst-1 is the second-worst fitness value; β is the initial contraction step size; β s is the contraction step size decay ratio; iter is the current iteration number.
[0090] Then calculate the contraction point x7, and the calculation formula is as follows:
[0091] x7 = x4 + β z * (x4 - x worst ) (23)
[0092] where x worst is the position of the worst particle in the particle swarm.
[0093] Then correct x7 to ensure that it does not exceed the boundary, and calculate the fitness value of the expanded point x7. If then replace the worst particle x with x7 worst ; otherwise, continue to generate the scaled point x8.
[0094] If the position of x8 is not better than the worst particle, then select a new particle x9 between the best particle and the second-worst particle x worst-1 After correcting x9, replace the worst particle x with x9 worst .
[0095] After local search, reorder the particle swarm according to the fitness value and obtain the optimal particle.
[0096] Step 12:
[0097] Update the array History to record the optimal value of the particle population and update the optimal value.
[0098] Step 13:
[0099] Judge whether the entire population iteration times are reached. If so, enter Step 14; otherwise, return to Step 6.
[0100] Step 14:
[0101] Output the optimal value.
[0102] The present invention has the following beneficial effects:
[0103] (1) The method of the present invention takes the entire path length of the UUV movement as the main part of the fitness value, and also considers the turning amplitude and heave height of the UUV movement. The path generated by the method of the present invention is significantly superior to the traditional particle swarm and the fixed-parameter particle swarm in terms of fitness value. The average fitness value is 176.1, which is about 19.7% lower than that of the traditional particle swarm and about 1.8% lower than that of the fixed-parameter particle swarm. This shows that the method of the present invention is more effective in path optimization and can find a better path solution.
[0104] (2) In the method of the present invention, by adaptively adjusting the inertia weight and learning factors, the inertia weight decreases as the number of iterations increases, ensuring that the algorithm has better exploration ability in the initial stage, and gradually increasing the exploitation of the optimal solution as the iteration progresses, thus avoiding premature convergence. The learning factors are randomly adjusted based on the normal distribution while ensuring that they are within a reasonable range. The introduction of randomness enhances the exploration ability of the algorithm, and the adaptive adjustment maintains the flexibility and robustness of the algorithm. In terms of the fitness value, the standard deviation of the method of the present invention is 9.2, which is much lower than 35.4 of the traditional particle swarm and 11.4 of the particle swarm with fixed parameters, and the variance of 85.6 is also significantly lower than 1251.3 of the traditional particle swarm and 129.2 of the particle swarm with fixed parameters. This shows that the method of the present invention has higher stability and reliability.
[0105] (3) In the method of the present invention, particles with lower fitness values are subjected to mutation operations, and the mutation amplitude is inversely proportional to the fitness, encouraging particles with low fitness to explore new regions, increasing the possibility of the algorithm jumping out of the local optimum, and at the same time maintaining the population diversity. Adaptive step-size local search is adopted to flexibly adjust the search intensity according to the characteristics of the current search region. The execution probability of local search decreases as the number of iterations increases, which helps to find a better solution in the solution space.
[0106] (4) The method of the present invention has a more stable and efficient running speed. The average running time of the method of the present invention is 10.66 seconds, which is 7.44 seconds faster than the particle swarm with fixed parameters. This shows that the method of the present invention is relatively efficient in running time while ensuring the optimization quality. In addition, the standard deviation and variance of the running time of the method of the present invention are 0.08 and 0.007 respectively, showing efficient and stable performance. Description of the Drawings
[0107] Figure 1 It is a flow chart of a three-dimensional path planning method for UUV particle swarm considering adaptive parameters;
[0108] Figure 2 It is a path diagram generated by three methods;
[0109] Figure 3 It is a fitness value diagram obtained by three methods. Detailed Implementation Manner
[0110] Figure 1 It is a flow chart of a three-dimensional path planning method for UUV particle swarm with adaptive parameter adjustment according to the present invention, including the following steps:
[0111] Step 1:
[0112] First, create a grid, then obtain the grid coordinate data, generate three-dimensional vectors, set mountain-shaped obstacles, and form a three-dimensional map model with mountain obstacles. Then, set the starting coordinate [1, 10, 3] and the ending coordinate [93, 83, 4]. At this point, the three-dimensional map is completed, and the initialization of the UUV's environment is finished.
[0113] Step 2:
[0114] Initialize the particle swarm parameters. Set the population size pop = 100; set the maximum gene value pop max = 1 and the minimum gene value pop min = 0 to control the upper and lower bounds of the particle positions and prevent the particles from going out of bounds; set the total number of iterations iterations = 100; set the maximum cognitive factor value c 1_max = 2.5 and the maximum social factor value c 2_max = 2.5. A larger c1 can promote the particles to explore new areas more actively, while a larger c2 can strengthen the movement of the particles towards the global optimal solution; set the maximum inertia weight value w max = 0.9 and the minimum inertia weight value w min = 0.4 to control the persistence of the particle velocity, balance global exploration and local exploitation, affect the convergence speed, and avoid premature convergence; set the velocity range v min = -0.5 and v max = 0.5 to limit the change range of the particle velocity and ensure the rationality of the particle velocity.
[0115] Step 3:
[0116] Calculate the initial fitness value. Use the weighted method to linearly weight the following four aspects: distance d, height h, average curvature m k and the penalty term res. Combine the above calculation results and use the weighting coefficient to obtain the objective function value fitness. The formula is as follows:
[0117]
[0118] fitness = 0.9 * d + 0.05 * h + 0.05 * m + res * 10 3 (4)
[0119] where d is the length of the path; h is the total height of the UUV's heave during navigation; m k is the average curvature of the path; res is the penalty term; fitness is the objective function value, that is, the fitness value.
[0120] Step 4:
[0121] Find the initial extreme value. Set the initial optimal fitness value fitness best= +∞, traverse the fitness values of each individual in the population. If the fitness value of an individual is less than the current optimal fitness value fitness best , then update fitness best to the fitness value of this individual and record the corresponding as the global best fitness value, representing the fitness value of the individual with the optimal fitness value in the entire population.
[0122] Step 5:
[0123] Record the historical optimal solution. Define an array History to record the optimal solutions found in each iteration, and update the current iteration's optimal solution to this array.
[0124] Step 6:
[0125] Calculate the adaptive inertia weight. The formula is as follows:
[0126]
[0127] where w is the inertia weight; w max is the maximum value of the inertia weight; w min is the minimum value of the inertia weight; iter is the current iteration number; iterations is the total number of iterations.
[0128] Calculate the learning factors. The formula is as follows:
[0129]
[0130] where c1 is the cognitive factor; c 1_max is the maximum value of the cognitive factor; c2 is the social factor; c 2_max is the maximum value of the social factor; is a random number from a normal distribution with a mean of 0 and a standard deviation of 0.2.
[0131] Then limit the range of the learning factors. The learning factors c1 and c2 are restricted to the range of 1 to 2.5 to prevent them from being too large or too small. The formula is as follows:
[0132]
[0133] Step 7:
[0134] Update the velocity of the particle. The formula is as follows:
[0135] V t+1 = wV t + c1r1(pbest - x t ) + c2r2(zbest - x t ) (8)
[0136] Among them, V t+1 is the velocity of the particle at time t + 1; w is the inertia weight; V t is the velocity of the particle at time t; c1 is the cognitive factor, c2 is the social factor, and c1 and c2 are constants for adaptive adjustment; r1 and r2 are random numbers between [0, 1]; pbest is the historical best position of the particle; zbest is the historical best position extremum of the particle swarm; x t is the current position of the particle at time t.
[0137] To ensure that the velocity value is maintained within v min and v max For any velocity exceeding this interval, appropriate adjustment is made, and the formula is as follows:
[0138]
[0139] Among them, V t+1 is the velocity of the particle at time t + 1; V t is the velocity of the particle at time t; v min is the lower bound of the velocity; v max is the upper bound of the velocity.
[0140] Update the position of the particle, and the formula is as follows:
[0141] x t+1 = x t + η * v t+1 (10)
[0142] Among them, V t+1 is the velocity of the particle at time t + 1; x t+1 is the position of the particle at time t + 1; η is a random factor, usually drawn from a uniform distribution in [0, 1], and is used to introduce randomness.
[0143] To ensure that the particle position does not exceed the range, adjust its position, and the formula is as follows:
[0144]
[0145] Among them, x t+1 is the position of the particle at time t + 1; pop max is the upper bound of the gene maximum value to control the particle position; pop min gene minimum value controls the lower bound of the particle position; r i is a random factor, usually drawn from a uniform distribution in [0, 1], and is used to add a small random offset to x t+1 .
[0146] Step 8:
[0147] Calculate the new fitness value fit1 based on the velocity and position of the new particle, and then update the individual optimum.
[0148] Step 9:
[0149] First, calculate the difference in fitness, with the formula as follows:
[0150] df = fit1 - fitness (11)
[0151] Where fit1 is the fitness value of the new particle; fitness is the fitness value of the particle.
[0152] If df < 0, then the new solution fit1 is a better solution and is directly accepted, and the velocity and position of the particle are updated; or when is taken, the new solution fit1 is also accepted, and the velocity and position of the particle are updated. r is a random number with a value range of [0, 1), and temp iter is the current adaptive temperature value.
[0153] Step 10:
[0154] First, set the basic mutation rate r b = 0.1, and set the decay rate of the basic mutation rate r d = 0.001. Then calculate the dynamic mutation rate r h such that the adaptive mutation rate can gradually decrease as the iteration progresses. The formula is as follows:
[0155]
[0156] Where iter is the current iteration number; iterations is the total number of iterations.
[0157] Then calculate the mutation adjustment factor r f based on fitness such that the lower the fitness value, the higher the mutation rate. The formula is as follows:
[0158]
[0159] Where fitness is the current fitness value; is the historical maximum fitness value.
[0160] Finally, combine the dynamic mutation rate r h and the mutation adjustment factor r f based on fitness to obtain the adaptive mutation rate r m , with the formula as follows:
[0161] r m = r h *(1 + 0.5 * r f) (14)
[0162] And impose a range limit on the adaptive mutation rate to ensure that the calculated mutation rate remains within a reasonable range, that is, between 0 and 1. The formula is as follows:
[0163] r m ' = min(max(r m , 0), 1) (15)
[0164] Traverse the particles for mutation. First, randomly select a dimension dim, and then calculate the mutation step size m step , and the formula is as follows:
[0165] m step = (pop dim - gbest dim ) * r m ' (16)
[0166] Where pop dim is the value of the particle in the dim dimension; gbest dim is the historical maximum value of the particle in the dim dimension; r m ' is the corrected adaptive mutation rate.
[0167] Adjust the mutation amplitude according to the fitness. The formula is as follows:
[0168]
[0169] Where m fb is the adjustment factor based on the fitness; fitness is the current fitness value; is the historical maximum fitness value.
[0170] Mutate the particle population. Multiply the mutation step size m step by the adjustment factor m fb based on the fitness, and then add it to the dim dimension of the particle to achieve mutation. The formula is as follows:
[0171] pop dim ' = m step * m fb (18)
[0172] Where pop dim ' is the value of the mutated particle in the dim dimension; m step is the mutation step size; m fb is the adjustment factor based on the fitness.
[0173] Check and correct the mutated value. The position of the mutated particle is in [pop min , pop maxbetween
[0174] Update the individual best and the group best after mutation.
[0175] Step 11:
[0176] Sort the fitness values to obtain the fitness values from smallest to largest, and record and store them. Set the initial step size of reflection to α = 3, the initial step size of scaling to β = 0.3, set the decay ratio α s = 0.98 for controlling the step size of reflection, and the decay ratio β s = 0.98 for controlling the step size of scaling. Perform adaptive local search with a probability of 0.6.
[0177] First, calculate the mean x4 of the positions of the particles except the worst particle, then calculate the reflection point x5 of the worst particle and x4, correct x5 to ensure it does not exceed the boundary, and calculate the fitness value of the reflection point x5 If then calculate the expansion point. First, calculate the adaptive step size α z as follows:
[0178] α z = α * α s iter-1 (19)
[0179] where fit worst is the worst fitness value; α is the initial step size of reflection; α s is the decay ratio of the step size of reflection; iter is the current iteration number.
[0180] Then calculate the expansion point x6, and the calculation formula is as follows:
[0181] x6 = x4 + α z * (x worst - x4) (20)
[0182] where x worst is the position of the worst particle in the particle swarm.
[0183] Then correct x6 to ensure it does not exceed the boundary, and calculate the fitness value of the expansion point x6 If then replace the worst particle x worst with x6; otherwise replace the worst particle x worst with x5.
[0184] If then calculate the contraction point. First, calculate the adaptive step size β z as follows:
[0185] β z = β * βs iter-1 (21)
[0186] Among them, fit worst-1 is the second-worst fitness value; β is the initial scaling step size; β s is the scaling step size decay ratio; iter is the current iteration number.
[0187] Then calculate the scaling point x7, and the calculation formula is as follows:
[0188] x7 = x4 + β z *(x4 - x worst ) (22)
[0189] Among them, x worst is the position of the worst particle in the particle swarm.
[0190] Then correct x7 to ensure that it does not exceed the boundary, and calculate the fitness value fit x7 of the expansion point x7. If fit x7 < fit worst , then replace the worst particle x worst with x7; otherwise, continue to generate the scaling point x8. If the position of x8 is not better than the worst particle, then select a new particle x9 between the best particle x zbest and the second-worst particle x worst-1 . After correcting x9, replace the worst particle x worst with x9.
[0191] After the local search is completed, reorder the particle swarm according to the fitness value. And obtain the optimal particle x zbest .
[0192] Step 12:
[0193] Update the array History to record the optimal value of the particle population and update the optimal value fitness zbest .
[0194] Step 13:
[0195] Judge whether the entire population iteration number reaches 100. If so, enter Step 14; otherwise, return to Step 6.
[0196] Step 14:
[0197] Output the optimal value.
[0198] Simulate the method of the present invention through MATLAB software, Figure 2This is a path simulation diagram generated for a UUV from the starting point S[1, 10, 3] to the ending point F[93, 83, 4] under a three-dimensional map with mountain obstacles. The unit of the coordinate axis is km. The solid line is the path generated by the present invention, the dashed line is the path generated by the traditional particle swarm algorithm, and the cross-dashed line is the path generated by the fixed-parameter particle swarm algorithm. By comparing different paths, it can be obtained that the path generated by the method of the present invention does not have unnecessary heaving movement in the vertical direction, while the paths generated by the traditional particle swarm and the fixed-parameter particle swarm both have obvious "redundant" paths in the heaving direction, and the path generated by the method of the present invention is more reasonable, shorter and smoother. Figure 3 This is a graph showing the change of fitness values of three methods. When the number of particle swarm iterations of the three methods is the same, the method of the present invention runs relatively efficiently and has the lowest fitness value. Ten experiments are carried out on different methods to avoid accidental events, and the following two tables are obtained: Table 1 is a comparison of the fitness values of the three methods; Table 2 is a comparison of the running times of the three methods. Method 1 is the traditional particle swarm, and Method 2 is the fixed-parameter particle swarm. Since the fitness not only includes the length of the path, the fitness value has no unit, and the smaller the fitness value, the better the method.
[0199] It can be intuitively obtained from Table 1 that the average value of the fitness values of the paths generated by the traditional particle swarm in 10 experiments is 219.3, the standard deviation is 35.4, and the variance is 1251.3. The average value of the fitness values of the paths generated by the fixed-parameter particle swarm in 10 experiments is 179.4, the standard deviation is 11.4, and the variance is 129.2. The average value of the fitness values of the paths generated by the method of the present invention in 10 experiments is 176.1, the standard deviation is 9.2, and the variance is 85.6. According to the above analysis, the method of the present invention shows significant superiority in optimizing the path. The lowest fitness value of 176.1 is achieved in terms of the average fitness value. The method of the present invention also performs best in terms of stability, with the smallest standard deviation of 9.2 and variance of 85.6. This shows that the method of the present invention can stably generate high-quality solutions with less volatility of the solutions.
[0200] Table 1 Comparison of fitness values of three methods
[0201]
[0202] It can be intuitively obtained from Table 2 that the average running time of the traditional particle swarm in 10 experiments is 9.88 seconds, the standard deviation is 0.24, and the variance is 0.055. The average running time of the fixed-parameter particle swarm in 10 experiments is 17.32 seconds, the standard deviation is 0.60, and the variance is 0.361. The average running time of the method described in the present invention in 10 experiments is 10.66 seconds, the standard deviation is 0.08, and the variance is 0.007. According to the above analysis, the average running time of the method described in the present invention is 10.66 seconds, which is between that of the traditional particle swarm and the fixed-parameter particle swarm, but closer to the traditional particle swarm, indicating that the method described in the present invention is relatively efficient in terms of running time. Moreover, the running time of the method described in the present invention has the smallest standard deviation of 0.1 and variance of 0.017, showing efficient and stable performance.
[0203] Combined with Table 1 above, in terms of running time, the method described in the present invention is only slightly slower than the traditional particle swarm, but the fitness value of 176.1 generated by the method described in the present invention is much lower than the fitness value of 219.3 generated by the traditional particle swarm.
[0204] Table 2 Comparison of running times of three methods
[0205]
[0206] Based on Table 1, Table 2 and the above analysis, it can be concluded that the average fitness value of the method described in the present invention is 176.1, which is about 19.7% lower than the average fitness value of the traditional particle swarm and about 1.8% lower than the average fitness value of the fixed-parameter particle swarm. The standard deviation of the method described in the present invention in terms of fitness value is 9.2, which is about 74.0% lower than the standard deviation of the traditional particle swarm in terms of fitness value and about 19.3% lower than the standard deviation of the fixed-parameter particle swarm in terms of fitness value. The variance of the method described in the present invention in terms of fitness value is 85.6, which is about 93.2% lower than the variance of the traditional particle swarm in terms of fitness value and about 33.8% lower than the variance of the fixed-parameter particle swarm in terms of fitness value. This indicates that the method described in the present invention has higher stability and reliability while generating high-quality solutions.
[0207] The average running time of the method described in the present invention is 10.66 seconds, which is about 7.89% slower than the running time of the traditional particle swarm, but about 42.96% faster than the running time of the fixed-parameter particle swarm. The standard deviation of the method described in the present invention in terms of running time is 0.08, which is about 66.67% lower than the standard deviation of the traditional particle swarm in terms of running time and 86.67% lower than the standard deviation of the fixed-parameter particle swarm in terms of running time. The variance of the method described in the present invention in terms of running time is 0.007, which is about 82.27% lower than the variance of the traditional particle swarm in terms of running time and 98.06% lower than the variance of the fixed-parameter particle swarm in terms of running time. This indicates that the method described in the present invention is not only efficient but also stable in terms of running time.
[0208] The method described in the present invention has an increase in running time compared with the traditional particle swarm optimization algorithm, but shows higher efficiency and stability compared with the fixed-parameter particle swarm optimization algorithm. This indicates that the method described in the present invention is more excellent in terms of both efficiency and stability.
[0209] In summary, the method described in the present invention improves the problems of low path quality and slow running time of the fixed-parameter particle swarm optimization algorithm in the path planning problem.
Claims
1. A UUV particle swarm three-dimensional path planning method with adaptive parameter adjustment, characterized in that: The following steps are involved: Step 1: Establish a three-dimensional map model with mountain obstacles, set the starting point and end point, and complete the initialization of the UUV's environment; Step 2: Initialize the particle swarm parameters, population size pop, gene maximum value pop max and the minimum value of gene pop min , total number of iterations, maximum value of cognitive factor c 1_max and the maximum value of social factor c 2_max , the maximum inertia weight w max and the minimum inertia weight w min , speed range v min and v max , initial temperature temp cooling rate r t ; Step 3: Calculate the initial fitness value and use the weighted method to linearly weight the following four aspects: distance d, height h, curvature mean m k And the penalty term res, combine the above calculation results, and use the weighted coefficient to get the objective function value; Step 4: Find the initial extreme value and set the initial optimal fitness value fitness best , traverse the fitness value of each individual in the population, if the fitness value of the individual is less than the current optimal fitness value fitness best , then update fitness best is the fitness value of the individual, and records the corresponding is the extreme fitness value of the group; Step 5: Record the historical optimal solution, define an array History to record the optimal solution found in each iteration, and Update to this array; Step 6: Calculate the adaptive inertia weight using the following formula: Among them, w is the inertia weight; w max is the maximum value of inertia weight; w min is the minimum inertia weight; iter is the current iteration number; iterations is the total iteration number; Calculate the learning factor, the formula is as follows: Among them, c1 is the cognitive factor; c 1_max is the maximum value of cognitive factor; c2 is the social factor; c 2_max is the maximum value of the social factor; is a normally distributed random number with a mean of 0 and a standard deviation of 0.2; Then, the range of the learning factor is limited to prevent the learning factor from being too large or too small; Step 7: Update and correct the particle's velocity to ensure that the velocity value remains within the normal range, and update and correct the particle's position to ensure that the particle position does not exceed the range; Step 8: Calculate the new fitness value according to the speed and position of the new particle, and then update the individual optimum; Step 9: To update the population according to the adaptive temperature, first calculate the difference in fitness, the formula is as follows: df = fit1 - fitness (3) Among them, fit1 is the fitness value of the new particle; fitness is the fitness value of the particle; If df<0, the new solution fit1 is a better solution, which is directly accepted and the particle velocity and position are updated; or when When taking, the new solution fit1 is also accepted, and the velocity and position of the particle are updated; Step 10: Adaptively mutate the particles in the population, first set the basic mutation rate r b and the base mutation rate decay rate r d , and then calculate the dynamic mutation rate r h The adaptive mutation rate can be gradually reduced as the iteration proceeds. The formula is as follows: Among them, iter is the current iteration number; iterations is the total iteration number; Then calculate the fitness-based mutation adjustment factor r f The smaller the fitness value, the higher the mutation rate. The formula is as follows: Finally, combined with the dynamic mutation rate r h and the fitness-based mutation adjustment factor r f Get adaptive mutation Rate m , the formula is as follows: r m =r h *(1+0.5*r f )(6) And limit the range of adaptive mutation rate to ensure that the calculated mutation rate remains reasonable In the range of , that is, from 0 to 1, the formula is as follows: r m '=min(max(r m ,0),1)(7) Traverse the particles to mutate, first randomly select a dimension dim, and then calculate the variable step length m step , The formula is as follows: m step =(pop dim -gbest dim )*r m '(8) Among them, pop dim is the value of the particle in the dim dimension; gbest dim is the history of the particle in dim dimension Maximum value; r m ' is the modified adaptive mutation rate; The variation range is adjusted according to the fitness. The formula is as follows: Among them, m fb is the adjustment factor based on fitness; Mutate the particle population to change the step length m step Multiply by the fitness-based adjustment factor m fb , Then add it to the dim dimension of the particle to achieve mutation. The formula is as follows: pop dim '=m step *m fb (10) Among them, pop dim ' is the value of the particle in dim dimension after mutation; m step To change the asynchronous length; m fb Based on Adjustment factor for fitness; Check and correct the mutated value. The position of the mutated particle is in [pop min ,pop max ], after mutation, update and record the individual optimal and group optimal; Step 11: Sort the fitness values to get the fitness values from small to large, record and store them, set the initial step size of reflection to α, the initial step size of scaling to β, and set the attenuation ratio α that controls the reflection step size s , controls the attenuation ratio of the scaling step β s , and then perform a local search. First, calculate the mean value x4 of the particle positions except the worst particle, then calculate the reflection point x5 of the worst particle and x4, and correct x5 to ensure that it does not exceed the boundary, and calculate the fitness value of the reflection point x5 if Then calculate the expansion point, first calculate the adaptive step size α z , the formula is as follows: α z =α*α s iter-1 (11) Among them, fit worst is the worst fitness value; α is the initial step length of reflection; α s is the reflection step attenuation ratio; iter is the current iteration number; Then calculate the expansion point x6, the calculation formula is as follows: x6=x4+α z *(x worst -x4) (12) Among them, x worst is the position of the worst particle in the particle group; Then, x6 is corrected to ensure that it does not exceed the boundary, and the fitness value of the expansion point x6 is calculated. if Then replace the worst particle x with x6 worst ; Otherwise replace the worst particle x with x5 worst ,if Then calculate the scaling point, first calculate the adaptive step size β z , the formula is as follows: β z =β*β s iter-1 (13) Among them, fit worst-1 is the second worst fitness value; β is the initial step size of scaling; β s is the scaling step attenuation ratio; iter is the current iteration number; Then calculate the scaling point x7, the calculation formula is as follows: x7=x4+β z *(x4-x worst ) (14) Among them, x worst is the position of the worst particle in the particle group; Then, x7 is corrected to ensure that it does not exceed the boundary, and the fitness value of the expansion point x7 is calculated. if Then replace the worst particle x with x7 worst ; Otherwise, continue to generate scaling point x8. If the x8 position is not better than the worst particle, then the optimal particle and the penultimate particle x worst-1 Select a new particle x9, modify x9, and replace the worst particle x with x9 worst After the local search is completed, the particle swarm is reordered according to the fitness value, and the optimal particle is obtained Step 12: Update the array History to record the optimal value of the particle population and update Step 13: Determine whether the number of iterations of the entire population has been reached, if yes, go to step 14; otherwise, go back to step 6; Step 14: Output the optimal value.
Citation Information
Patent Citations
A three-dimensional path planning method for UUV particle swarm based on multi-constraint optimization
CN117830571B
Temperature compensation method and system for silicon micro-accelerometer based on improved PSO (Particle Swarm Optimization) optimized neural network
CN108120451A
UUV path planning method based on particle swarm algorithm
CN111381600A