Unmanned driving path planning method based on krill swarm optimization algorithm
Through the path planning method based on the krill swarm optimization algorithm, three-branch clustering and dynamic inertial weight factor optimization are used to solve the problem of local optimal paths in drone path planning, and the path quality and efficiency in complex environments are improved.
Patent Information
- Application Number
- CN202411145483.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2024-12-03
AI Technical Summary
There is an impact of local optimal paths on global path planning in UAV path planning, and traditional algorithms find it difficult to quickly find safe and effective flight paths in complex environments.
The path planning method based on the krill group optimization algorithm is adopted. By initializing the krill group, the fitness function is constructed, the krill group is divided into the core domain, edge domain and trivial domain using three clusters, and the inertial weight factor is dynamically updated to optimize the Krill search behavior to improve path quality.
In complex environments, search efficiency and path quality can be improved, and can converge to better solutions faster, balance global search and local search capabilities, reduce search space, and enhance the robustness and adaptability of the algorithm.
Smart Images

Figure CN119063727A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of unmanned aerial vehicles, and in particular to an unmanned driving path planning method based on a krill swarm optimization algorithm. Background Art
[0002] With the development of drone technology, drones have been widely used in logistics distribution, agricultural monitoring, disaster relief and other fields. The effective operation of drones is highly dependent on efficient path planning algorithms, especially the ability to quickly find safe and effective flight paths in complex and changing environments. Traditional path planning methods, such as A* algorithm, Dijkstra algorithm, genetic algorithm, particle swarm optimization algorithm, etc., although they perform well in simple environments, often seem to be unable to cope with high-dimensional, dynamically changing complex environments. Therefore, researching and developing drone path planning algorithms suitable for complex environments has become one of the current research hotspots.
[0003] Patent CN117968689A "UAV path planning method and system based on genetic particle hybrid algorithm" combines the advantages of genetic algorithm and particle swarm algorithm to solve the problems existing in UAV path planning, especially the problem of difficulty in three-dimensional constraints. However, it may fall into local optimality when facing complex environments.
[0004] Krill Herd Algorithm (KHA) has received extensive attention as a heuristic optimization algorithm. KHA simulates the migration behavior of krill swarms in nature and seeks the optimal solution by simulating factors such as food attraction, peer influence, and random motion. KHA has global search capabilities and strong robustness, and can be applied to the field of UAV path planning. However, using KHA alone may encounter problems such as low search efficiency and easy to fall into local optimality in certain specific environments.
[0005] Patent CN112926825B "Multi-UAV task allocation method based on multi-objective quantum krill swarm mechanism" uses the krill swarm mechanism to solve the multi-objective joint solution problem of multi-UAV combat tasks. Although the krill algorithm is applied to the UAV field, it focuses on multi-objective UAV task allocation and does not focus on the UAV path planning problem.
[0006] Clustering algorithm is a commonly used unsupervised learning method used to divide data sets into multiple categories. The data points within each category are similar to each other, while the data points between different categories are quite different. Combining clustering algorithm with KHA can overcome the limitations of KHA to a certain extent and improve search efficiency and optimization quality. Three-branch clustering is a clustering method that is more adaptable to complex environments and is established on the basis of three-branch decision theory. By dividing the decision object into a certain domain, a boundary domain, and an unknown domain, the uncertainty in the decision process can be managed more meticulously. In the path planning of unmanned aerial vehicles, by introducing three-branch clustering, the krill group is divided into a core domain, an edge domain, and a trivial domain, which can more accurately control the search behavior of krill, thereby improving search efficiency and path quality. This method can not only overcome the shortcomings of KHA in certain specific environments, but also enhance the overall performance of the algorithm, making it more suitable for the path planning of unmanned aerial vehicles in complex environments. Summary of the invention
[0007] The main purpose of the present invention is to provide an unmanned driving path planning method based on a krill swarm optimization algorithm to solve the problem of the influence of the local optimal path on the global path planning in the unmanned aerial vehicle path planning.
[0008] In order to solve the above problems, the technical solution adopted by the present invention is: an unmanned driving path planning method based on krill swarm optimization algorithm, comprising the following steps:
[0009] S1. Initialize the krill group, including the group size n, the position of each krill x id and speed v id ;
[0010] S2, construct a fitness function based on the path length and obstacle collision function, and calculate the fitness value fit of each krill i , obtain and record the individual optimal solution P best and the global optimal solution G best ;
[0011] S3, sorting the fitness values of the updated krill group in ascending order, selecting the first K krill as the class center, calculating the Euclidean distance between each krill and the class center, and classifying it into the class with the closest distance;
[0012] S4, calculating the similarity of krill within the class, and using the three-branch clustering method to divide the krill within the class into core domains and edge domains according to the threshold α;
[0013] S5. According to different domains in step S4, the inertia weight factor ω is dynamically updated, and the positions of all krill are updated according to the position iteration formula and the speed iteration formula of the krill swarm algorithm;
[0014] S6. Set the termination condition. If the termination condition is met, the algorithm stops the program and outputs the optimal krill fitness value and location. Otherwise, return to S2.
[0015] In the preferred solution, in step S2, the fitness function is established, and the fitness function is composed of a path length function and a ground obstacle function. The specific calculation formula is:
[0016] fit i =ω1fit1+ω2fit2;
[0017] Among them, fit i is the fitness function value, fit1 is the path length function, fit2 is the ground obstacle collision function, and ω1 and ω2 represent the weights of the two.
[0018] In the preferred solution, the fitness function fit is established using cylindrical functions and spherical functions i , specifically including the following sub-steps:
[0019] S01. Calculate the path length function. One krill is a path. When establishing the path length function, a single peak or multi-peak function is used. The single peak path length function and the multi-peak path length function are as follows:
[0020]
[0021] Among them, (x i ,y i ) is the current location;
[0022] S02. Calculate the obstacle collision function. The shape of the ground obstacle is a regular sphere. When the driving flight altitude is lower than the obstacle height and the distance from the obstacle center point is less than the obstacle radius, it is considered that a collision has occurred. The ground obstacle collision function is as follows:
[0023]
[0024] Among them, (x i ,y i ,z i ) is the position of the i-th krill individual; z represents the radius of the j-th spherical obstacle, (x j ,y j ) represents the center coordinate of the jth obstacle, C i,j represents the distance from the i-th krill to the center of obstacle j, T represents the number of obstacles, and N represents the number of iterations of a krill.
[0025] In the preferred solution, in step S2, the individual optimal solution P is obtained and recorded. best and the global optimal solution G best , the specific process is:
[0026] S11. Calculate the individual fitness value of krill according to the target fitness function fit i ;
[0027] S12, if krill fitness value is fit i Better than the best position of krill before P best Fitness value, then fit i Assign to P best ;
[0028] S13. Find the individual with the smallest fitness value P from all krill best Assign to the global optimal value G best .
[0029] In the preferred solution, in step S3, after the cluster center is determined, the Euclidean distance between each krill and the cluster center is calculated to classify it into the nearest cluster. The Euclidean distance calculation formula is:
[0030]
[0031] Among them, 1≤i≤n, 1≤j≤m, X i is the i-th krill, C j represents the center point of the jth class, r is the total dimension of the space, X ie represents the component of the i-th krill in the e-th dimension, C je Represents the component of the e-th dimension of the j-th center point.
[0032] In the preferred solution, in step S4, the similarity calculation formula between the krill in the class and the best krill in the class is:
[0033]
[0034] Among them, 1≤i≤n, 1≤j≤m, X i is the i-th krill, B j is the best krill in the class, and r is the total dimension of the space.
[0035] In the preferred embodiment, in step S4, the krill in each class are divided into a core domain Co (C) and a marginal domain Fr (C) according to the three-branch clustering rule. The specific process is as follows:
[0036] S21. After the classification is completed, the similarity of krill within the class is calculated using a formula;
[0037] S22, using a pair of thresholds α, the krill in the class are divided into two domains, namely the core domain Co(C) and the edge domain Fr(C(;
[0038] S23, division of core domain and edge domain;
[0039] Si ≥α then X i ∈Co(C);
[0040] S i <α then X i ∈Fr(C);
[0041] Among them, X i is the i-th krill, S i is the similarity between the i-th krill and the best krill in the class.
[0042] In the preferred solution, in step S5, the inertia weight factor ω is dynamically updated according to different domains in step S4, and a time-varying inertia weight ω′ is added. The time-varying inertia weight ω′ is a parabola opening downward, and the specific formula is:
[0043]
[0044] where ω max is the maximum value of the inertia weight, ω min is the minimum value of the inertia weight, t is the current iteration number, t max is the maximum number of iterations, and the inertia weight ω is a linearly decreasing curve. The specific formula is:
[0045]
[0046] The weight of the core domain is the time-varying inertia weight ω′, and the weight of the edge domain is the inertia weight ω.
[0047] In the preferred solution, in step S6, the maximum number of iterations is set as the termination condition.
[0048] The present invention provides an unmanned driving path planning method based on a krill swarm optimization algorithm, aiming to solve the problem of unmanned aerial vehicle path planning. The krill swarm optimization algorithm proposed in the unmanned driving path system is used for path planning to improve system performance, and a fitness function is constructed based on the path length and the ground roadblock collision function. The entire krill swarm is divided into several classes according to the initial position, and each class is divided into a core domain, an edge domain and a trivial domain through three clusters. Finally, the position of the krill is adjusted by adopting different rules for the krill in each domain, and the inertia weight factor ω is dynamically updated to adapt to the local search and global search capabilities of the krill swarm optimization algorithm, and the optimal krill fitness value and location are output.
[0049] The beneficial effects of the present invention are:
[0050] 1) Taking into account the path length and obstacle collision factors, this makes the algorithm more suitable for practical application scenarios that require obstacle avoidance.
[0051] 2) The three-branch clustering idea is introduced, and the inertia weight factor is dynamically adjusted according to the different domains to which the krill belong. This method helps the algorithm converge to a better solution faster, reduces the search space, and improves the search efficiency. The three-branch clustering algorithm effectively describes the distribution details of the boundary points of the class.
[0052] 3) By dynamically updating the inertia weight factor, the algorithm can better balance global search and local search, improve the robustness of the search process, and thus find a better path in a complex environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The present invention will be further described below in conjunction with the accompanying drawings and embodiments:
[0054] Figure 1 It is a flow chart of the unmanned driving path planning method based on the krill swarm optimization algorithm of the present invention;
[0055] Figure 2 is a fitness function curve convergence diagram in an embodiment of the present invention;
[0056] Figure 3 It is the test function image in the embodiment of the present invention. DETAILED DESCRIPTION
[0057] Example 1
[0058] like Figures 1 to 3 As shown, an unmanned driving path planning method based on a krill swarm optimization algorithm comprises the following steps:
[0059] S1. Initialize the krill group, including the group size n, the position of each krill x id and speed v id ;
[0060] S2, construct a fitness function based on the path length and obstacle collision function, and calculate the fitness value fit of each krill i , obtain and record the individual optimal solution P best and the global optimal solution G best ;
[0061] S3, sorting the fitness values of the updated krill group in ascending order, selecting the first K krill as the class center, calculating the Euclidean distance between each krill and the class center, and classifying it into the class with the closest distance;
[0062] S4, calculating the similarity of krill within the class, and using the three-branch clustering method to divide the krill within the class into core domains and edge domains according to the threshold α;
[0063] S5. According to different domains in step S4, the inertia weight factor ω is dynamically updated, and the positions of all krill are updated according to the position iteration formula and the speed iteration formula of the krill swarm algorithm;
[0064] S6. Set the termination condition. If the termination condition is met, the algorithm stops the program and outputs the optimal krill fitness value and location. Otherwise, return to S2.
[0065] The present invention integrates three-branch clustering into the krill swarm optimization algorithm, and proposes an unmanned driving path planning method based on the krill swarm optimization algorithm. While retaining the global search capability and strong robustness of the krill swarm optimization algorithm, the three-branch clustering is used to solve the ownership problem of uncertain objects, and the local search and global search capabilities of the krill swarm algorithm are compromised, helping the krill swarm algorithm to jump out of the local optimum, further optimizing the clustering problem and improving the optimization effect.
[0066] In the preferred solution, in step S2, the fitness function is established, and the fitness function is composed of a path length function and a ground obstacle function. The specific calculation formula is:
[0067] fit i =ω1fit1+ω2fit2;
[0068] Among them, fit i is the fitness function value, fit1 is the path length function, fit2 is the ground obstacle collision function, and ω1 and ω2 represent the weights of the two.
[0069] The above preferred solution aims to quantify the quality of each krill by constructing a fitness function that includes a path length function and a ground obstacle collision function. The fitness function comprehensively considers the length of the path and the relative position to the obstacle, ensuring that the krill swarm algorithm can effectively find a short and safe path in a complex environment. By assigning different weights to path length and obstacle collision, this method helps to balance the relationship between exploration and development and promote the algorithm to quickly converge to the global optimal solution. This strategy not only improves the overall efficiency and effectiveness of the algorithm, but also demonstrates good robustness and adaptability in path planning problems.
[0070] In the preferred solution, the fitness function fit is established using cylindrical functions and spherical functions i , specifically including the following sub-steps:
[0071] S01. Calculate the path length function. One krill is a path. When establishing the path length function, a single peak or multi-peak function is used. The single peak path length function and the multi-peak path length function are as follows:
[0072]
[0073] Among them, (x i ,y i ) is the current location;
[0074] S02. Calculate the obstacle collision function. The shape of the ground obstacle is a regular sphere. When the driving flight altitude is lower than the obstacle height and the distance from the obstacle center point is less than the obstacle radius, it is considered that a collision has occurred. The ground obstacle collision function is as follows:
[0075]
[0076] Among them, (x i ,y i ,z i ) is the position of the i-th krill individual; z represents the radius of the j-th spherical obstacle, (x j ,y j ) represents the center coordinate of the jth obstacle, C i,j represents the distance from the i-th krill to the center of obstacle j, T represents the number of obstacles, and N represents the number of iterations of a krill.
[0077] The fitness function is constructed by using cylindrical functions and spherical functions, aiming to accurately evaluate the quality of the path represented by each krill. By defining a unimodal or multimodal path length function, the length of the path is quantified, and the krill swarm is guided to move in the direction of a shorter path. Since there may be multiple optimal values in reality, the unimodal or multimodal path length function is randomly determined, which can be used to test the ability of the drone to jump out of the local optimal value. With the help of the spherical obstacle collision function, the possibility of collision between krill (i.e., path) and obstacles is effectively avoided. This design not only ensures that the krill swarm algorithm can operate efficiently in a complex environment, but also promotes the algorithm to converge to the optimal solution faster by accurately controlling the path length and avoiding obstacles, thereby improving the safety and effectiveness of the search process.
[0078] In the preferred solution, in step S2, the individual optimal solution P is obtained and recorded. best and the global optimal solution G best , the specific process is:
[0079] S11. Calculate the individual fitness value of krill according to the target fitness function fit i ;
[0080] S12, if krill fitness value is fit i Better than the best position of krill before P best Fitness value, then fit i Assign to P best ;
[0081] S13. Find the individual with the smallest fitness value P from all krill best Assign to the global optimal value G best .
[0082] Obtain and record the individual optimal solution and the global optimal solution in the krill swarm. Calculate the fitness value of each krill according to the fitness function; if the new fitness value of a krill is better than its historical best value, update its individual optimal solution; select the krill with the smallest fitness value from the entire krill swarm and use it as the global optimal solution. This process not only helps the algorithm remember and track the optimal path, but also promotes the evolution of the krill swarm towards a more optimal solution, thereby accelerating the convergence speed of the algorithm and improving the optimization efficiency.
[0083] In the preferred solution, in step S3, after the cluster center is determined, the Euclidean distance between each krill and the cluster center is calculated to classify it into the nearest cluster. The Euclidean distance calculation formula is:
[0084]
[0085] Among them, 1≤i≤n, 1≤j≤m, X i is the i-th krill, C j represents the center point of the jth class, r is the total dimension of the space, X ie represents the component of the i-th krill in the e-th dimension, C je Represents the component of the e-th dimension of the j-th center point.
[0086] By calculating the Euclidean distance between each krill and each class center, the krill clustering is achieved. It ensures that each krill can be assigned to the class of the class center closest to it. In this way, the algorithm can effectively distinguish different subgroups in the krill group, and then perform more refined operations according to the characteristics of the subgroups. It can enhance the local search ability of the algorithm and speed up the optimization process. It also helps to avoid falling into the problem of local optimal solutions, and lays the foundation for the subsequent division of core domains and edge domains, further improving the overall performance and optimization efficiency of the algorithm.
[0087] In the preferred solution, in step S4, the similarity calculation formula between the krill in the class and the best krill in the class is:
[0088]
[0089] Among them, 1≤i≤n, 1≤j≤m, X i is the i-th krill, B j is the best krill in the class, and r is the total dimension of the space.
[0090] By calculating the similarity between the krill in the class and the best krill in the class, the goal is to measure the proximity between the krill. This helps to distinguish between core domains and edge domains, ensuring that the algorithm can adjust the search strategy according to the characteristics of different domains. In this way, the efficiency and quality of the search can be improved, and the relationship between global search and local search can be better balanced.
[0091] In the preferred embodiment, in step S4, the krill in each class are divided into a core domain Co (C) and a marginal domain Fr (C) according to the three-branch clustering rule. The specific process is as follows:
[0092] S21. After the classification is completed, the similarity of krill within the class is calculated using a formula;
[0093] S22, using a pair of thresholds α, the krill in the class are divided into two domains, namely the core domain Co(C) and the edge domain Fr(C);
[0094] S23, division of core domain and edge domain;
[0095] S i ≥α then X i ∈Co(C);
[0096] S i <α then X i ∈Fr(C);
[0097] Among them, X i is the i-th krill, S i is the similarity between the i-th krill and the best krill in the class.
[0098] By calculating the similarity of krill within a class and using thresholds to divide krill into core and edge domains, the aim is to refine the management strategy of krill swarms. This helps the algorithm adopt differentiated search strategies based on the different areas where the krill are located. Krill in the core domain are considered to be closer to the optimal solution, while krill in the edge domain may contain more exploration opportunities. This not only enhances the algorithm's ability to approximate the optimal solution, but also promotes the diversity and exploratory nature of the krill swarm, thereby accelerating the optimization process and improving overall performance.
[0099] In the preferred solution, in step S5, the inertia weight factor ω is dynamically updated according to different domains in step S4, and a time-varying inertia weight ω′ is added. The time-varying inertia weight ω′ is a parabola opening downward, and the specific formula is:
[0100]
[0101] where ω max is the maximum value of the inertia weight, ω min is the minimum value of the inertia weight, t is the current iteration number, t max is the maximum number of iterations, and the inertia weight ω is a linearly decreasing curve. The specific formula is:
[0102]
[0103] The weight of the core domain is the time-varying inertia weight ω′, and the weight of the edge domain is the inertia weight ω.
[0104] By dynamically updating the inertia weight factor, the search strategy is adjusted according to the different domains (core domain or edge domain) where the krill is located. The core domain krill uses a time-varying inertia weight, which gradually decreases with the increase in the number of iterations, following a parabolic change law that opens downward, which helps to maintain sufficient exploration capabilities in the early stage of the search and gradually turns to development as the iteration deepens. The edge domain krill uses a linearly decreasing inertia weight to maintain a certain degree of exploration capability. This strategy helps to balance global search and local search, which can not only ensure that the algorithm widely explores the solution space in the early stage, but also ensure that it quickly converges to the optimal solution in the later stage, improving the overall performance and optimization efficiency of the algorithm.
[0105] In the preferred solution, in step S6, the maximum number of iterations is set as the termination condition.
[0106] By setting the maximum number of iterations as the termination condition of the algorithm, it is ensured that the algorithm stops automatically after reaching the predetermined number of iterations. This helps to avoid infinite loops and control the time and resource consumption of the algorithm. In addition, by limiting the number of iterations, the algorithm can also be prompted to find the optimal solution or approximate optimal solution as efficiently as possible within a limited time, which is very important for real-time and resource constraints in practical applications.
[0107] Example 2
[0108] Further illustrate with reference to Example 1, Figure 1-3 As shown in the figure, an unmanned driving path planning method based on krill swarm optimization algorithm:
[0109] Step 1: Initialize the krill group, set the group size n, and randomly initialize the position x of each krill id and speed v id .
[0110] Step 2: Construct a fitness function based on the path length and obstacle collision function to calculate the fitness value of each krill. i , obtain and record the individual optimal solution P best and the global optimal solution G best .
[0111] The fitness function is established. The fitness function is composed of the path length function and the ground obstacle function. The specific calculation formula is:
[0112] fit i =ω1fit1+ω2fit2;
[0113] Among them, fit i is the fitness function value, fit1 is the path length function, fit2 is the ground obstacle collision function, and ω1 and ω2 represent the weights of the two.
[0114] Use cylindrical and spherical functions to establish the fitness function fit i , including:
[0115] 1) Calculate the path length function. One krill is a path. When establishing the path length function, a single peak or multi-peak function is used. The single peak path length function and the multi-peak path length function are as follows:
[0116]
[0117] Among them, (x i ,y i ) is the current location.
[0118] 2) Calculate the obstacle collision function. The shape of the ground obstacle is a regular sphere. When the driving flight altitude is lower than the obstacle height and the distance from the obstacle center point is less than the obstacle radius, it is considered that a collision has occurred. The ground obstacle collision function is as follows:
[0119]
[0120] Among them, (x i ,y i ,z i ) is the position of the i-th krill individual; z represents the radius of the j-th spherical obstacle, (x j ,y j ) represents the center coordinate of the jth obstacle, C i,j represents the distance from the i-th krill to the center of obstacle j, T represents the number of obstacles, and N represents the number of iterations of a krill.
[0121] Obtain and record the individual optimal solution P best and the global optimal solution G best , the specific process is:
[0122] 1) Calculate the individual fitness value of krill according to the target fitness function fit i .
[0123] 2) If the krill fitness value is fit i Better than the best position of krill before P best Fitness value, then fit i Assign to P best .
[0124] 3) Find the individual with the smallest fitness value P from all krill best Assign to the global optimal value G best .
[0125] Step 3: Arrange the fitness values of the updated krill group in ascending order, select the first K krill as the class center, calculate the Euclidean distance between each krill and the class center, and divide it into the class with the closest distance.
[0126] When the cluster center is determined, the Euclidean distance between each krill and the cluster center is calculated and divided into the nearest cluster. The Euclidean distance calculation formula is:
[0127]
[0128] Among them, 1≤i≤n, 1≤j≤m, X i is the i-th krill, C j represents the center point of the jth class, r is the total dimension of the space, X ie represents the component of the i-th krill in the e-th dimension, C je Represents the component of the e-th dimension of the j-th center point.
[0129] Step 4: Calculate the krill similarity within the class, and divide the krill in each class into core domains and edge domains according to the three-branch clustering rule.
[0130] The similarity calculation formula from krill within a class to the best krill within the class is:
[0131]
[0132] Among them, 1≤i≤n, 1≤j≤m, X i is the i-th krill, B j is the best krill in the class, and r is the total dimension of the space.
[0133] In each class, the krill in the class are divided into core domains and edge domains according to the three-branch clustering rule. The specific process is as follows:
[0134] S21. After the classification is completed, the similarity of krill within the class is calculated using a formula;
[0135] S22. Using a pair of thresholds α, the krill in the class are divided into two domains, namely the core domain and the edge domain.
[0136] S23, division of core domain and edge domain;
[0137] S i ≥α then X i ∈Co(C);
[0138] S i <α then X i ∈Fr(C);
[0139] Among them, X i is the i-th krill, S iis the similarity between the i-th krill and the best krill in the class.
[0140] Step 5: According to different domains, the inertia weight factor ω is dynamically updated, and the positions of all krill are updated according to the position iteration formula and velocity iteration formula of the krill swarm algorithm.
[0141] According to different domains, the inertia weight factor ω is dynamically updated, and the time-varying inertia weight ω′ is added. The time-varying inertia weight ω′ is a parabola opening downward. The specific formula is:
[0142]
[0143] where ω max is the maximum value of the inertia weight, ω min is the minimum value of the inertia weight, t is the current number of iterations, and t max is the maximum number of iterations, and the inertia weight ω is a linearly decreasing curve. The specific formula is:
[0144]
[0145] The weight of the core domain is the time-varying inertia weight ω′, and the weight of the edge domain is the inertia weight ω.
[0146] Step 6: Set the termination condition. If the termination condition is met, the algorithm stops the program and outputs the best krill fitness value and location. Otherwise, it returns to S2. Set the maximum number of iterations as the termination condition.
[0147] Three-branch clustering krill swarm optimization algorithm, namely TWCKH, standard krill swarm algorithm, referred to as KH, Figure 2 The fitness function curve convergence diagram of the three methods: three-branch clustering krill swarm optimization algorithm, standard krill swarm algorithm and SCKH algorithm, as shown in the figure Figure 2 As shown, the three-branch clustering krill swarm optimization algorithm involved in the present invention has the lowest fitness function value and higher convergence accuracy.
[0148] The path simulation comparison of the three-branch krill swarm optimization algorithm, the standard krill swarm algorithm, and the SCKH algorithm is shown in the figure. Figure 3 As shown in the figure, it can be seen that under the premise of ensuring a faster convergence speed, the optimization effect of the three-branch clustering krill swarm optimization algorithm is obvious. Due to the standard krill swarm algorithm and SCKH, the three-branch clustering krill swarm optimization algorithm better coordinates the global search and local search, and the optimization effect is significantly improved.
[0149] In order to ensure the results of the experiment and avoid the influence of randomness on the algorithm, 30 independent tests were conducted on the three algorithms, and the maximum, minimum, average and standard deviation of the fitness of the three algorithms were calculated respectively. The test results are shown in Table 1. By comparing and analyzing the data, it can be concluded that the present invention is significantly better than the other two algorithms in path optimization quality, and the optimization ability of the three-branch clustering krill swarm optimization algorithm proposed in the present invention is more stable.
[0150] Table 1 Comparison of 30 experiments of three algorithms
[0151]
[0152] The above embodiments are only preferred technical solutions of the present invention and should not be regarded as limiting the present invention. The protection scope of the present invention shall be the technical solutions recorded in the claims, including equivalent replacement solutions of the technical features in the technical solutions recorded in the claims. That is, equivalent replacement improvements within this scope are also within the protection scope of the present invention.
Claims
1. An unmanned driving path planning method based on krill swarm optimization algorithm, characterized in that: The following steps are involved: S1. Initialize the krill group, including the group size n, the position of each krill x id and speed v id ; S2, construct a fitness function based on the path length and obstacle collision function, and calculate the fitness value of each krill fit i , obtain and record the individual optimal solution P best and the global optimal solution G best ; S3, sorting the fitness values of the updated krill group in ascending order, selecting the first K krill as the class center, calculating the Euclidean distance between each krill and the class center, and classifying it into the class with the closest distance; S4, calculating the similarity of krill within the class, and dividing the krill within the class into core domains and edge domains using a three-branch clustering method according to a threshold α; S5. According to different domains in step S4, the inertia weight factor ω is dynamically updated, and the positions of all krill are updated according to the position iteration formula and the speed iteration formula of the krill swarm algorithm; S6. Set the termination condition. If the termination condition is met, the algorithm stops the program and outputs the optimal krill fitness value and location. Otherwise, return to S2.
2. The unmanned driving path planning method based on krill swarm optimization algorithm according to claim 1 is characterized in that: In step S2, the fitness function is established. The fitness function is composed of the path length function and the ground obstacle function. The specific calculation formula is: fit i =ω1fit1+ω2fit2; Among them, fit i is the fitness function value, fit1 is the path length function, fit2 is the ground obstacle collision function, and ω1 and ω2 represent the weights of the two.
3. The unmanned driving path planning method based on krill swarm optimization algorithm according to claim 2 is characterized in that: Use cylindrical and spherical functions to establish the fitness function fit i , specifically including the following sub-steps: S01. Calculate the path length function. One krill is a path. When establishing the path length function, a single peak or multi-peak function is used. The single peak path length function and the multi-peak path length function are as follows: Among them, (x i ,y i ) is the current location; S02. Calculate the obstacle collision function. The shape of the ground obstacle is a regular sphere. When the driving flight altitude is lower than the obstacle height and the distance from the obstacle center point is less than the obstacle radius, it is considered that a collision has occurred. The ground obstacle collision function is as follows: Among them, (x i ,y i ,z i ) is the position of the i-th krill individual; z represents the radius of the j-th spherical obstacle, (x j ,y j ) represents the center coordinate of the jth obstacle, C i,j represents the distance from the i-th krill to the center of obstacle j, T represents the number of obstacles, and N represents the number of iterations of a krill.
4. The unmanned driving path planning method based on krill swarm optimization algorithm according to claim 1 is characterized in that: In step S2, obtain and record the individual optimal solution P best and the global optimal solution G best , the specific process is: S11. Calculate the individual fitness value of krill according to the target fitness function fit i ; S12, if krill fitness value is fit i Better than the best position of krill before P best Fitness value, then fit i Assign to P best ; S13. Find the individual with the smallest fitness value P from all krill best Assign to the global optimal solution G best .
5. The unmanned driving path planning method based on krill swarm optimization algorithm according to claim 1 is characterized in that: In step S3, after the cluster center is determined, the Euclidean distance between each krill and the cluster center is calculated and it is divided into the nearest cluster. The Euclidean distance calculation formula is: Among them, 1≤i≤n, 1≤j≤m, X i is the i-th krill, C j represents the center point of the jth class, r is the total dimension of the space, X ie represents the component of the i-th krill in the e-th dimension, C je Represents the component of the e-th dimension of the j-th center point.
6. The unmanned driving path planning method based on krill swarm optimization algorithm according to claim 1 is characterized in that: In step S4, the similarity calculation formula between the krill in the class and the best krill in the class is: Among them, 1≤i≤n, 1≤j≤m, X i is the i-th krill, B j is the best krill in the class, and r is the total dimension of the space.
7. The unmanned driving path planning method based on krill swarm optimization algorithm according to claim 1 is characterized in that: In step S4, in each class, the krill in the class are divided into a core domain Co(C) and an edge domain Fr(C) according to the three-branch clustering rule. The specific process is as follows: S21. After the classification is completed, the similarity of krill within the class is calculated using a formula; S22, using a pair of thresholds α, the krill in the class are divided into two domains, namely the core domain Co(C) and the edge domain Fr(C); S23, division of core domain and edge domain; S i ≥α then X i ∈Co(C); S i <α then X i ∈Fr(C); Among them, X i is the i-th krill, S i is the similarity between the i-th krill and the best krill in the class.
8. The unmanned driving path planning method based on krill swarm optimization algorithm according to claim 1 is characterized in that: In step S5, according to the different domains in step S4, the inertia weight factor ω is dynamically updated, and the time-varying inertia weight ω′ is added. The time-varying inertia weight ω′ is a parabola opening downward, and the specific formula is: where ω max is the maximum value of the inertia weight, ω min is the minimum value of the inertia weight, t is the current iteration number, t max is the maximum number of iterations, and the inertia weight ω is a linearly decreasing curve. The specific formula is: The weight of the core domain is the time-varying inertia weight ω′, and the weight of the edge domain is the inertia weight ω.
9. The unmanned driving path planning method based on krill swarm optimization algorithm according to claim 1 is characterized in that: In step S6, the maximum number of iterations is set as the termination condition.
