Plant protection UAV operation path planning method based on intelligent optimization algorithm

Through mixed improvement of genetic algorithms and combined with technical means of multiple intelligent optimization algorithms, the problems of local optimality and low search accuracy in plant protection drone operation path planning are solved, and efficient and fast path planning is achieved, suitable for large-scale farmland areas.

CN117762156BActive Publication Date: 2025-07-25NORTHEAST AGRICULTURAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311690943.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-11
Publication Date
2025-07-25
Estimated Expiration
2043-12-11

AI Technical Summary

Technical Problem

When planning the operation path for plant protection drones, the prior art has problems such as local optimal solutions, low search accuracy, large parameter dependence and easy to fall into local optimality, making it difficult to find the optimal path to meet actual needs in large-scale farmland areas.

Method used

Adopt genetic algorithms based on hybrid improvements, combined with a variety of intelligent optimization algorithms, and use technical means such as sequential coding, bidirectional heuristic cross operators, jump gene operators, local search algorithm 2-Opt, to improve global and local search capabilities, ensure that all farmland areas are covered and the optimal path is found.

Benefits of technology

The solution quality and efficiency of plant protection drone operation path planning is improved, rapid convergence and the generation of diverse solutions are achieved, the possibility of premature convergence is reduced, and the adaptability is strong, and it is suitable for a variety of combination optimization problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117762156B_ABST
    Figure CN117762156B_ABST
Patent Text Reader

Abstract

The present invention is a method for path planning of a plant protection UAV based on an intelligent optimization algorithm. This method adopts a sequential coding method, enabling the genetic algorithm to not require discretization processing when solving the path planning of the plant protection UAV; a bidirectional heuristic crossover operator is adopted, and the crossover operator has heuristic and hereditary properties; a jumping gene operator is adopted; a roulette wheel selection operator based on an order-based combined fitness function is adopted; the local search algorithm introduces the 2-Opt algorithm in the genetic algorithm, having global and local search capabilities. This method is a genetic algorithm based on hybrid improvement, combining the advantages of multiple intelligent optimization algorithms, which can improve the global and local search capabilities of the algorithm, ensure that the operation points cover all farmland areas while obtaining the optimal operation path, and effectively improve the solution quality and efficiency of the plant protection UAV path planning problem.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for operating a plant protection unmanned aerial vehicle, in particular to a method for planning the operation path of a plant protection unmanned aerial vehicle based on an intelligent optimization algorithm. Background Art

[0002] In recent years, with the rapid development of unmanned aerial vehicle technology, its applications in multiple fields such as agriculture, logistics, and medical treatment have been increasing. Especially in the agricultural field, plant protection unmanned aerial vehicles have become a new type of agricultural mechanization equipment, which can efficiently and accurately complete the plant protection operations of farmland. However, how to plan an optimal operation path for the plant protection unmanned aerial vehicle to ensure that all farmland areas are covered and the plant protection tasks are completed efficiently has become a technical problem to be solved urgently.

[0003] Traditional path planning methods, such as genetic algorithms, particle swarm optimization, ant colony algorithms, etc., although have achieved certain effects in some applications, still have some limitations when solving the problem of planning the operation path of plant protection unmanned aerial vehicles. For example, these methods may fall into local optima, or cannot find solutions that meet the actual requirements in large-scale farmland areas.

[0004] To solve the above problems, researchers have begun to explore new optimization algorithms and methods. Among them, the method for planning the operation path of a plant protection unmanned aerial vehicle based on an intelligent optimization algorithm has received extensive attention. This method combines traditional optimization algorithms and modern artificial intelligence technologies, aiming to find an operation path for the plant protection unmanned aerial vehicle that not only meets the actual requirements but also has high optimization performance.

[0005] When the traditional genetic algorithm is used to solve the problem of planning the operation path of a plant protection unmanned aerial vehicle, based on sequential coding, no discretization processing is required, and the offspring generated by crossover and mutation operations meet the coding rules. The standard genetic algorithm has problems such as slow convergence speed and low solution accuracy when solving the problem of planning the operation path of a plant protection unmanned aerial vehicle.

[0006] In actual research applications, a single intelligent optimization algorithm is restricted by the algorithm itself or its principle, and has problems such as low search accuracy, large influence of algorithm performance by parameters, and easy to fall into local optima. The hybrid optimization algorithm combines two or more intelligent optimization algorithms or optimization ideas, and gives full play to the advantages of different intelligent optimization algorithms or optimization ideas, which can greatly improve the global and local search capabilities of the algorithm. In recent years, the hybrid optimization algorithm has received the attention of many scholars and has become a research hotspot in the field of intelligent optimization algorithms.

[0007] Traditional swarm intelligence optimization algorithms were initially mostly proposed for solving continuous problems. Due to the particularity of the solutions of discrete problems, such algorithms cannot be directly used to solve discrete problems. To address this issue, some scholars have studied and given methods for discretizing continuous optimization problems. Summary of the Invention

[0008] The technical problem to be solved by the present invention is to provide a method for planning the operation path of a plant protection UAV based on an intelligent optimization algorithm in view of the deficiencies of the prior art. This method is a hybrid improved genetic algorithm that combines the advantages of multiple intelligent optimization algorithms, which can improve the global and local search capabilities of the algorithm, ensure that all farmland areas are covered by operation points while obtaining the optimal operation path, and effectively improve the solution quality and efficiency of the problem of planning the operation path of a plant protection UAV.

[0009] The technical problem to be solved by the present invention is realized through the following technical solutions. The present invention is a method for planning the operation path of a plant protection UAV based on an intelligent optimization algorithm, and its characteristics are as follows:

[0010] Coding method: Adopt a coding method based on order, so that the genetic algorithm does not need to perform discretization processing when solving the operation path planning of a plant protection UAV;

[0011] Crossover operation: In order to make the crossover operator have heuristic and hereditary properties, a two-way heuristic crossover operator is proposed, which greatly improves the quality of the offspring generated by crossover;

[0012] Mutation operation: Considering the concept of jumping genes in biology and the inspiration of the binary jumping gene operator, a jumping gene operator suitable for solving the operation path planning problem of a plant protection UAV is proposed to improve the convergence speed of the algorithm;

[0013] Selection operation: In order to balance the exploration and exploitation capabilities of the algorithm, a roulette wheel selection operator based on an order-based combined fitness function is proposed;

[0014] Local search: Since the local search algorithm can effectively make up for the deficiency of the local search ability of the genetic algorithm, the 2-Opt algorithm is introduced into the genetic algorithm, so that the hybrid improved genetic algorithm has good global and local search capabilities.

[0015] The technical problem to be solved by the present invention can also be further realized through the following technical solutions. The above-mentioned method for planning the operation path of a plant protection UAV based on an intelligent optimization algorithm of the present invention has the following characteristics:

[0016] The technical problem to be solved by the present invention can also be further realized through the following technical solutions. The above-mentioned method for planning the operation path of a plant protection UAV based on an intelligent optimization algorithm of the present invention has the following characteristics: The specific steps are as follows:

[0017] (1) Parameter setting: The population size of the hybrid genetic algorithm is n, and the crossover probability P c = 0.7, and the mutation probability P m= 0.8, probability of jumping gene P JG = 0.5, the number of elite individuals is 10, the number of iterations of the algorithm is 500, and the initial iteration number gen = 0; the number of UAV operation points is N; the objective function of the UAV path planning problem with N operation points is expressed as:

[0018]

[0019] In the formula, f(T) is the shortest distance that the UAV flies in the UAV path; t i represents the i-th operation point; d(t i , t i +1) represents the distance between the i-th operation point and the (i + 1)-th operation point, which is expressed by the following formula:

[0020]

[0021] (x i , y i ) and (x i+1 , y i+1 ) are the coordinates of t i , t i+1 respectively;

[0022] (2) Encoding method: The hybrid genetic algorithm adopts integer encoding, so that the hybrid genetic algorithm does not need to perform discretization processing when solving the operation path planning of the plant protection UAV; the number of UAV operation points is N, then the individual is initially

[0023] X = randperm(N)(3) where X is an individual with a code length of N, an encoding value of an integer and no repeated values;

[0024] Generate n individuals according to formula (1), and calculate the fitness values of the n individuals according to formula (1);

[0025] (3) If gen meets the maximum iteration condition, output the optimal operation path and the flight length before N operation points, and end the loop, otherwise, go to the next step;

[0026] (4) Save 10 individuals with the smallest fitness values among the n individuals;

[0027] (5) Select the chromosomes participating in crossover, and use the roulette wheel selection operator based on the order-based combined fitness function. The selection probability calculation formula is as follows:

[0028]

[0029] In the formula, n is the population individual, f iis the fitness value of the $i$-th individual in the population. A fitness function calculation method based on order is introduced for the fitness value, and the calculation formula is as follows:

[0030] 3) Linear fitness function based on order

[0031]

[0032] 4) Nonlinear fitness function based on order

[0033] $f$ i = β(1 - β) i-1 (6)

[0034] In the formula, β ∈ (0, 1), generally between 0.01 - 0.3; the fitness function is selected according to the number of iterations. When the number of iterations is even, it is calculated by formula (6), and when the number of iterations is odd, it is calculated by formula (5);

[0035] (6) Adopt a two-way heuristic crossover operator; the crossover operator improves the search ability through crossover operations. The offspring can inherit the excellent genes of the parent generation, combine the valuable information in the parent generation, and generate new individuals that can contain more complex gene structures;

[0036] (7) Combine the $n$ individuals generated by crossover and the 10 elite individuals saved in step (4) to form a new population; calculate the fitness values of the population, and select the optimal $n$ individuals as the individuals in the current population; the 10 elite individuals saved;

[0037] (8) Perform a uniqueness operation; the operation method is as follows: assume that the population size is $n$. After several iterations, if there are two or more identical chromosomes in the population, only one of the multiple identical chromosomes is retained; if the population size becomes $n_1$ after removing the remaining identical chromosomes, in order to keep the population size unchanged, randomly generate $n - n_1$ chromosomes, and use the randomly generated $n - n_1$ chromosomes to replace the $n - n_1$ identical chromosomes removed;

[0038] (9) The $n$ chromosomes after performing the uniqueness operation and the $q$ elite chromosomes retained in step (7) form a new population;

[0039] (10) Sort the individuals in the population in ascending order according to the fitness value;

[0040] (11) Retain $n$ chromosomes with shorter flight route lengths and $q$ elite chromosomes respectively;

[0041] (12) Perform mutation operations on the $n$ retained chromosomes according to the mutation probability $P$ m Give a combined mutation operator that takes into account the exploration ability and development ability of the algorithm:

[0042] 1) Reverse order mutation operator

[0043] Randomly generate two random integers N1 and N2 between [1, m], and reverse the genes between N1 and N2 on a certain chromosome to be mutated to obtain a new chromosome;

[0044] 2) Swap mutation operator

[0045] Randomly generate two random integers N1 and N2 between [1, m], and swap the genes at positions N1 and N2 on a certain chromosome to be mutated to obtain a new chromosome;

[0046] 3) Heuristic mutation operator

[0047] Randomly generate a random integer N1 between [1, m], where N1 is a job point on the chromosome to be mutated, and find the index number of N1 on this chromosome; at the same time, find the other job point N2 that is closest to the job point N1, and insert the job point N2 behind the position where the job point N1 is located;

[0048] The combined mutation operator operation is as follows: at the t-th iteration, for each chromosome to be mutated, a random number r can be randomly generated. If r > Pm, then mutate according to the reverse mutation operator; if r ≤ Pm and r is a multiple of 3, then mutate according to the swap mutation operator; if r ≤ Pm and r is not a multiple of 3, then mutate according to the heuristic mutation operator;

[0049] (13) Mutate nP m The n chromosomes after mutation, the q elite chromosomes retained in step (11), and n chromosomes reconstitute a new population, and q elite chromosomes and n chromosomes with shorter flight route lengths are retained from the new population; denote the population at this time as A;

[0050] (14) Perform the jumping gene operation on A, and denote the population at this time as B; adopt the jumping gene operator to improve the convergence speed of the algorithm;

[0051] (15) Perform the 2-Opt operation on A, and denote the population at this time as C;

[0052] (16) The q elite chromosomes retained in step (13), population B, and population C constitute a new population D;

[0053] (17) Retain q elite chromosomes and n chromosomes with shorter route lengths from D respectively, and return to step (3).

[0054] The technical problem to be solved by the present invention can also be further realized by the following technical solutions. The method for planning the operation path of a plant protection UAV based on an intelligent optimization algorithm described above has the following characteristics: In formula (6), β ∈ (0, 1), and the value is 0.15.

[0055] The technical problem to be solved by the present invention can also be further realized by the following technical solutions. The method for planning the operation path of a plant protection UAV based on an intelligent optimization algorithm described above has the following characteristics: In step (14), the implementation steps of the jump gene operator with sequential coding are as follows:

[0056] Step 1: Let i = 1;

[0057] Step 2: For the i-th chromosome in the population, randomly generate a random number λ between [0, 1]. If P JG > λ, check the (i + 1)-th chromosome in the population. If i ≥ n, stop the jump gene operation; otherwise, go to the next step.

[0058] Step 3: Generate two uniformly distributed random integers jg1 and jg2 between [1, m], and jg1 < jg2; Let the chromosome for which the jump gene operator is executed be A, A = 3 2 6 4 5 1 9 8 7 10, jg1 = 2, jg2 = 8;

[0059] Step 4: The number of genes between jg1 and jg2 is jg2 - jg1 = 6. Randomly generate a 6-bit binary string a. Assume a = 0 1 1 0 1 0. k is the position of the element equal to 1 in a;

[0060] Step 5: In chromosome A, the substring between jg1 and jg2 is b = 6 4 5 1 9 8, c = a.*b. Delete the elements in c that are 0, d = 4 5 9;

[0061] Step 6: The number of elements in d is 3. Generate three random integers e between [1, 3]. Assume e = 3 1 2;

[0062] Step 7: Let the value of the first element in f be equal to the value of the third element in d, the value of the second element in f be equal to the value of the first element in d, and the value of the third element in f be equal to the value of the second element in d. Then f = 9 4 5;

[0063] Step 8: Since k records the position of the element 1 in a, let the value of the second element in b be equal to the value of the first element in f, the value of the third element in b be equal to the value of the second element in f, and the value of the fifth element in b be equal to the value of the third element in f;

[0064] Step 9: If \(i\geq n\), stop the jumping gene operation; otherwise, let \(i\leftarrow i + 1\) and return to Step 2.

[0065] The technical problem to be solved by the present invention can also be further realized by the following technical solutions. The method for planning the operation path of a plant protection UAV based on an intelligent optimization algorithm according to the present invention described above is characterized in that in step (15), the steps of 2 - Opt are as follows:

[0066] Step 1: Select an operation path of the UAV;

[0067] Step 2: Select two different operation points on the path, called operation point a and operation point b;

[0068] Step 3: Reverse the sub - path between operation point a and operation point b on the path, which means reversing the operation order between operation point a and operation point b;

[0069] Step 4: Calculate the total length of the reversed path;

[0070] Step 5: If the reversed path is shorter than the original path, accept this new path; otherwise, keep the original path unchanged;

[0071] Repeat Step 2 to 5, continuously select different pairs of operation points until no further improvement can be made.

[0072] Compared with the prior art, the present invention has the following beneficial effects:

[0073] 1. The present invention can achieve a balance between global and local search capabilities: The algorithm proposed by the present invention combines the advantages of global search and local search, ensuring that in the process of finding the optimal solution, it can widely explore the solution space and deeply search for better solutions in a certain area.

[0074] 2. The method of the present invention has a high convergence speed: Compared with other algorithms, the algorithm of the present invention shows a faster convergence speed in most cases. This means that in a shorter time, the algorithm can find better or near - optimal solutions.

[0075] 3. The method of the present invention has strong adaptability: By adjusting parameters in an adaptive manner, the algorithm can show good performance in different problem instances and different situations.

[0076] 4. The solutions in the present invention have diversity: The algorithm of the present invention can generate a variety of different high - quality solutions, providing more choice spaces for decision - makers.

[0077] 5. The method of the present invention reduces the possibility of premature convergence: A variety of strategies and mechanisms introduced in the algorithm, such as the order-based fitness function, the selection probability of the single mutation operator, etc., all contribute to reducing the risk of the algorithm prematurely converging to the local optimum.

[0078] 6. The present invention has wide applicability: Although this research mainly focuses on the traveling salesman problem, the proposed methods and ideas can be widely applied to other combinatorial optimization problems and have high practical value.

[0079] In summary, the method of the present invention is a hybrid improved genetic algorithm that can effectively solve the operation path planning problem of plant protection UAVs. This algorithm combines the advantages of multiple intelligent optimization algorithms and aims to improve the global and local search capabilities of the algorithm, thereby improving the solution quality and efficiency of the operation path planning problem of plant protection UAVs. Brief Description of the Drawings

[0080] Figure 1 It is a diagram of the jumping gene operation;

[0081] Figure 2 It is a diagram of the situation before using the 2-Opt algorithm for a certain UAV route;

[0082] Figure 3 It is a diagram of the change situation after using the 2-Opt algorithm for a certain UAV route as shown. Detailed Embodiment

[0083] The following further describes the specific technical solutions of the present invention to facilitate those skilled in the art to further understand the present invention without restricting its rights.

[0084] Embodiment 1, A method for planning the operation path of a plant protection UAV based on an intelligent optimization algorithm:

[0085] (1) Parameter setting: The population size of the hybrid genetic algorithm is n, the crossover probability P c = 0.7, the mutation probability P m = 0.8, the jumping gene probability P JG = 0.5, the elite individuals are 10, the number of iterations of the algorithm is 500, and the initial number of iterations gen = 0. The number of UAV operation points is N. The objective function of the UAV path planning problem with N operation points can be expressed as:

[0086]

[0087] In the formula, f(T) is the shortest distance flown by the UAV in the UAV path; t i represents the i-th operation point; d(t i ,t i+1) represents the distance between the i-th operation point and the (i + 1)-th operation point, which is expressed by the following formula:

[0088]

[0089] (x i , y i ) and (x i+1 , y i+1 ) are the coordinates of t i , t i+1 respectively.

[0090] (2) Encoding method: The hybrid genetic algorithm adopts integer encoding, so that the hybrid genetic algorithm does not need to perform discretization processing when solving the operation path planning of plant protection UAVs. If the number of UAV operation points is N, the individual is initially

[0091] X = randperm(N)(3) where X is an individual with a code length of N, an encoding value of an integer, and no repeated values.

[0092] Generate n individuals according to formula (1) and calculate the fitness values of the n individuals according to formula (1).

[0093] (3) If gen meets the maximum iteration condition, output the optimal operation path and the flight length before N operation points, and end the loop; otherwise, go to the next step.

[0094] (4) Save the 10 individuals with the smallest fitness values among the n individuals.

[0095] (5) Select the chromosomes participating in crossover. In order to balance the exploration and development capabilities of the algorithm, a roulette wheel selection operator based on an order-based combined fitness function is proposed. The selection probability calculation formula is as follows:

[0096]

[0097] In the formula, n is the population individual, f i is the fitness value of the i-th individual in the population. The fitness value introduces a calculation method based on an order-based fitness function, and the calculation formula is as follows:

[0098] 5) Order-based linear fitness function

[0099]

[0100] 6) Order-based non-linear fitness function

[0101] f i = β(1 - β) i-1 (6)

[0102] Where β ∈ (0, 1), generally between 0.01 - 0.3, and in this paper, it is taken as 0.15. The fitness function is selected according to the number of iterations. When iterating an even number of times, it is calculated by formula (6), and when iterating an odd number of times, it is calculated by formula (5). The linear fitness function based on order has strong global search ability, and the non-linear fitness function based on order has strong local search ability. The individuals selected in these two ways can not only ensure the diversity of the selected individuals but also guarantee their superiority.

[0103] (6) In order to make the crossover operator have heuristic and hereditary properties, a two-way heuristic crossover operator is proposed, which greatly improves the quality of the offspring generated by crossover.

[0104] The crossover operator is the central link of the genetic algorithm. Through the crossover operation, the search ability of the algorithm can be improved. The offspring can inherit the excellent genes of the parent generation, combine the valuable information in the parent generation, and generate new individuals that can contain more complex gene structures. This paper proposes a two-way heuristic crossover operator and illustrates it with the example of the UAV operation path planning problem with 8 operation points. The distances between the 8 operation points are shown in Table 1.

[0105] Table 1 Distances between 8 operation points

[0106]

[0107]

[0108] A and B are two parent chromosomes selected by the roulette wheel selection method in Section 4.2 for crossover. As follows:

[0109] A = 3 2 1 4 8 7 6 5

[0110] B = 2 4 6 8 1 3 5 7

[0111] The specific steps of the two-way heuristic crossover operator are as follows:

[0112] Step 1: Randomly generate an integer between [1, 8]. Suppose the randomly generated integer is 1, then the first gene position in the generated offspring chromosome is operation point 1.

[0113] O = 1 × × × × × × ×

[0114] Step 2: In the parent chromosomes A and B, starting from 1, rotate in the clockwise and counterclockwise directions respectively, and the following can be obtained:

[0115] A1 = 1 4 8 7 6 5 3 2

[0116] A2 = 1 2 3 5 6 7 8 4

[0117] B1 = 1 3 5 7 2 4 6 8

[0118] B2 = 1 8 6 4 2 7 5 3

[0119] Step 3: Among A1, A2, B1 and B2, compare the distances between job point 1 and its adjacent job points 4, 2, 3, 8, 7 and 5. As can be seen from Table 1, the distance between job point 1 and job point 3 is the shortest, and the second gene position in the offspring chromosome O is job point 3.

[0120] O = 1 3 × × × × × ×

[0121] Step 4: After deleting job point 1, the parental chromosomes A and B become:

[0122] A = 3 2 4 8 7 6 5

[0123] B = 2 4 6 8 3 5 7

[0124] Step 5: Taking job point 3 as the starting point, go to step (2) to obtain:

[0125] A3 = 3 2 4 8 7 6 5

[0126] A4 = 3 5 6 7 8 4 2

[0127] B3 = 3 5 7 2 4 6 8

[0128] B4 = 3 8 6 4 2 7 5

[0129] Step 6: Among A3, A4, B3 and B4, compare the distances between job point 3 and its adjacent job points 2, 5, 8 and 7. As can be seen from Table 2, the distance between job point 3 and job point 5 is the shortest, and the third gene position in the offspring chromosome O is job point 5.

[0130] O = 1 3 5 × × × × ×

[0131] Step 7: Repeat step four and step five to obtain the offspring chromosome O as

[0132] O = 1 3 5 2 7 8 6 4

[0133] When comparing the distances between job points as above, if there are two or more identical shortest distances, a job point can be randomly selected according to the shortest distance.

[0134] (7) Combine the n individuals generated by crossover and the 10 elite individuals saved in (4) to form a new population. Calculate the fitness values of the population and select the optimal n individuals as the individuals in the current population. Save the 10 elite individuals.

[0135] (8) Perform the uniqueness operation. As the number of iterations increases, the number of identical chromosomes in the population of the genetic algorithm will gradually increase. In the extreme case, it is possible that all chromosomes in the population are the same. If there are many identical chromosomes in the population, it is possible that the parent chromosomes participating in crossover are the same. For example:

[0136] A = 3 2 1 4 8 7 6 5

[0137] B = 3 2 1 4 8 7 6 5

[0138] At this time, starting from 1 as the initial point and rotating in the clockwise and counterclockwise directions respectively, the obtained A1 and B1 are the same, and A2 and B2 are the same:

[0139] A1 = 1 4 8 7 6 5 3 2

[0140] A2 = 1 2 3 5 6 7 8 4

[0141] B1 = 1 4 8 7 6 5 3 2

[0142] B2 = 1 2 3 5 6 7 8 4

[0143] Furthermore, it affects the efficiency of the crossover operation and reduces the convergence speed of the genetic algorithm. To avoid the above phenomenon, the uniqueness operation is added in the improved genetic algorithm. The operation method is as follows:

[0144] Assume that the population size is n. After several iterations, if there are two or more identical chromosomes in the population, only one of the multiple identical chromosomes is retained. If the population size is n1 after removing the remaining identical chromosomes, to keep the population size unchanged, randomly generate n - n1 chromosomes and replace the n - n1 identical chromosomes removed with the randomly generated n - n1 chromosomes. The uniqueness operation process is shown in Table 2. X is the population after several iterations, X1 is the population after the uniqueness operation, Y is the newly generated sub-population, and X' is the new population.

[0145] Table 2 Uniqueness operation

[0146]

[0147]

[0148] (9) The n chromosomes after performing the unique operation and the q elite chromosomes retained in step (7) constitute a new population.

[0149] (10) Sort the individuals in the population in ascending order according to the fitness value.

[0150] (11) Retain n chromosomes with shorter flight route lengths and q elite chromosomes respectively.

[0151] (12) Perform a mutation operation on the retained n chromosomes according to the mutation probability P. m Give a combined mutation operator that takes into account the exploration ability and exploitation ability of the algorithm.

[0152] 1) Reverse mutation operator

[0153] Randomly generate two random integers N1 and N2 between [1, m], and reverse the genes between N1 and N2 on a certain chromosome to be mutated to obtain a new chromosome. If the chromosome before mutation is X = 6 5 1 3 2 4 7, N1 = 2, N2 = 5, then the chromosome obtained after reverse mutation is = 6 2 3 1 5 4 7.

[0154] 2) Swap mutation operator

[0155] Randomly generate two random integers N1 and N2 between [1, m], and swap the genes at positions N1 and N2 on a certain chromosome to be mutated to obtain a new chromosome. If the chromosome before mutation is X = 6 5 1 3 2 4 7, N1 = 2, N2 = 5, then the chromosome obtained after swap mutation is = 6 2 1 3 5 4 7.

[0156] 3) Heuristic mutation operator

[0157] Randomly generate a random integer N1 between [1, m], N1 is a job point on the chromosome to be mutated, find the index number of N1 on this chromosome. At the same time, find the other job point N2 that is closest to the job point N1, and insert the job point N2 behind the position where the job point N1 is located. If the chromosome before mutation is X = 6 5 1 3 2 4 7, N1 = 2, and the job point closest to N1 = 2 is N2 = 5, insert N2 = 5 behind N1 = 2, then the chromosome obtained after heuristic mutation is = 6 1 3 2 5 4 7.

[0158] The combined mutation operator operation is as follows: At the t-th iteration, for each chromosome to be mutated, a random number r is randomly generated. If r > Pm, then mutation is performed according to the reverse order mutation operator; if r ≤ Pm and r is a multiple of 3, then mutation is performed according to the swap mutation operator; if r ≤ Pm and r is not a multiple of 3, then mutation is performed according to the heuristic mutation operator. Since the reverse order mutation operator and the swap mutation operator have strong exploration capabilities, and the heuristic mutation operator has strong exploitation capabilities, the combined mutation operator can better balance the exploration and exploitation capabilities of the genetic algorithm.

[0159] (13) Mutated nP m The n chromosomes after mutation, the q elite chromosomes retained in step (11), and n chromosomes reconstitute a new population. From the new population, q elite chromosomes and n chromosomes with shorter flight route lengths are retained. Denote the population at this time as A.

[0160] (14) Perform the jumping gene operation on A and denote the population at this time as B. Considering the concept of jumping genes in biology and the inspiration of the binary jumping gene operator, a jumping gene operator suitable for solving the operation path planning problem of plant protection UAVs is proposed to improve the convergence speed of the algorithm. The implementation steps of the jumping gene operator with sequential encoding are as follows:

[0161] Step 1: Let i = 1.

[0162] Step 2: For the i-th chromosome in the population, randomly generate a random number λ between [0, 1]. If P JG > λ, check the (i + 1)-th chromosome in the population. If i ≥ n, stop the jumping gene operation. Otherwise, go to the next step.

[0163] Step 3: Generate two uniformly distributed random integers jg1 and jg2 between [1, m], and jg1 < jg2. Let the chromosome on which the jumping gene operator operates be A, A = 3 2 6 4 5 1 9 8 7 10, jg1 = 2, jg2 = 8, as Figure 1 shown.

[0164] Step 4: The number of genes between jg1 and jg2 is jg2 - jg1 = 6. Randomly generate a 6-bit binary string a. Assume a = 0 11 0 1 0, and k is the position of the element equal to 1 in a.

[0165] Step 5: In chromosome A, the substring between jg1 and jg2 is b = 6 4 5 1 9 8, c = a.*b. Delete the elements in c that are 0, d = 4 5 9.

[0166] Step 6: The number of elements in d is 3, generate 3 random integers e between [1, 3], let e = 3 1 2.

[0167] Step 7: Let the value of the first element in f be equal to the value of the third element in d, the value of the second element in f be equal to the value of the first element in d, and the value of the third element in f be equal to the value of the second element in d, then f = 9 4 5;

[0168] Step 8: Since k records the position of element 1 in a, so let the value of the element in the second position of b be equal to the value of the element in the first position of f, the value of the third element in b be equal to the value of the element in the second position of f, and the value of the element in the fifth position of b be equal to the value of the element in the third position of f. The chromosome A1 after the jumping gene operation is as Figure 1 shown.

[0169] Step 9: If i ≥ n, then stop the jumping gene operation; otherwise let i ← i + 1, return to (2);

[0170] (15) Perform the 2 - Opt operation on A using Algorithm 1, and denote the population at this time as C.

[0171] Introduce the 2 - Opt algorithm into the genetic algorithm to make the hybrid improved genetic algorithm have better global and local search capabilities. The change situation before and after using the 2 - Opt algorithm for a certain UAV route is as Figure 2 and Figure 3 shown.

[0172] Let c k (k = 1, 2, …, n) represent the job points in the UAV route, and d(c i , c j ) represent the distance between any two points.

[0173] The steps of the 2 - Opt algorithm are as follows:

[0174] Step 1: Select a UAV operation path.

[0175] Step 2: Select two different job points on the path (referred to as job point a and job point b).

[0176] Step 3: Reverse the sub - path between job point a and job point b on the path. This means reversing the job order between job point a and job point b.

[0177] Step 4: Calculate the total length of the reversed path.

[0178] Step 5: If the reversed path is shorter than the original path, accept this new path, otherwise keep the original path unchanged.

[0179] Repeat Steps 2 to 5, continuously select different operation point pairs until no further improvement can be made.

[0180] (16) Combine the q elite chromosomes retained in (13), population B, and population C to form a new population D.

[0181] (17) Retain the q elite chromosomes with shorter route lengths and n chromosomes from D respectively, and return to step (3).

[0182] The present invention proposes an improved hybrid genetic algorithm for solving the operation path of plant protection UAVs. The algorithm mainly includes a bidirectional heuristic crossover operator, a jumping gene operation, a uniqueness operation, a combined mutation, and a local optimization algorithm 2-Opt operation.

[0183] The bidirectional heuristic crossover operator is different from the original crossover operator. It is heuristic and can continuously search for the optimal distance when solving the operation path problem of plant protection UAVs. Therefore, it can improve the local search ability of the algorithm. To reduce the probability of the algorithm falling into stagnation and premature convergence, a combined mutation that comprehensively considers the local search ability and the global search ability is introduced. At the same time, inspired by biological concepts, a jumping gene operation is introduced to further enhance the global search ability of the algorithm. Secondly, considering that the population diversity of the genetic algorithm will gradually decrease with the increase of the number of iterations, in order to reduce the impact of the decrease in population diversity on the algorithm, a uniqueness operation is introduced after the crossover operation to maintain the population diversity during the iterative process of the algorithm. Finally, a local search algorithm is introduced into the improved genetic algorithm to further enhance the local search ability of the algorithm. The performance of the algorithm is verified using standard examples. The results show that compared with the algorithms proposed by the current technology, the hybrid improved genetic algorithm proposed by the present invention has the best solution accuracy, stability, and convergence speed.

Claims

1. A method for planning the operation path of a plant protection UAV based on an intelligent optimization algorithm, characterized in that: Coding method: Adopt a sequence-based coding method, so that the genetic algorithm does not need to perform discretization processing when solving the operation path planning of the plant protection UAV; Crossover operation: Adopt a two-way heuristic crossover operator, and the crossover operator has heuristic and hereditary properties; Mutation operation: Adopt a jumping gene operator; Selection operation: Adopt a roulette wheel selection operator based on an order-based combined fitness function; Local search: The local search algorithm introduces the 2-Opt algorithm in the genetic algorithm and has global and local search capabilities; The specific steps are as follows: (1) Parameter setting: The population size of the hybrid genetic algorithm is n, the crossover probability P c = 0.7, the mutation probability P m = 0.8, the jumping gene probability P JG = 0.5, the elite individuals are 10, the number of iterations of the algorithm is 500, and the initial number of iterations gen = 0; the number of UAV operation points is N; the objective function of the UAV path planning problem with N operation points is expressed as: where \(f(T)\) is the shortest distance that the UAV flies in the UAV path; \(t\) i represents the \(i\)-th operation point; \(d(t\) i ,t i + 1) represents the distance between the \(i\)-th operation point and the \((i + 1)\)-th operation point, which is expressed by the following formula: (x i , y i ) and (x i+1 , y i+1 ) are the coordinates of t i , t i+1 respectively; (2) Coding method: The hybrid genetic algorithm adopts a sequence-based coding method, so that the hybrid genetic algorithm does not need to perform discretization processing when solving the operation path planning of the plant protection UAV; if the number of UAV operation points is N, the individual is initially X = randperm(N) (3) where X is an individual with a code length of N, an encoded value of an integer, and no repeated values; Generate n individuals according to formula (1) and calculate the fitness values of the n individuals according to formula (1); (3) If gen meets the maximum iteration condition, output the optimal operation path and the flight length before N operation points, and end the loop; otherwise, go to the next step; (4) Save 10 individuals with the smallest fitness values among the n individuals; (5) Select the chromosomes participating in crossover, and use a roulette wheel selection operator based on an order-based combined fitness function. The selection probability calculation formula is as follows: where n is the population individual, and f i is the fitness value of the i-th individual in the population. A fitness function calculation method based on order is introduced for the fitness value, and the calculation formula is as follows: 1) Order-based linear fitness function 2) Order-based non-linear fitness function f i =β(1-β) i-1 (6) In the formula, β ∈ (0, 1), generally between 0.01 and 0.3; select the fitness function according to the number of iterations. Calculate according to formula (6) for even-numbered iterations and formula (5) for odd-numbered iterations; (6) Adopt a two-way heuristic crossover operator; the crossover operator improves the search ability through crossover operation. The offspring can inherit the excellent genes of the parent generation, combine the valuable information in the parent generation, and generate new individuals that can contain more complex gene structures; (7) Combine the n individuals generated by crossover and the 10 elite individuals saved in step (4) to form a new population; calculate the fitness values of the population, and select the optimal n individuals as the individuals in the current population; save the 10 elite individuals; (8) Perform a uniqueness operation; the operation method is as follows: Let the population size be n. After several iterations, if there are two or more identical chromosomes in the population, only retain one of the multiple identical chromosomes; if the population size is n1 after removing the remaining identical chromosomes, in order to keep the population size unchanged, randomly generate n - n1 chromosomes, and use the randomly generated n - n1 chromosomes to replace the n - n1 identical chromosomes removed; (9) The n chromosomes after performing the uniqueness operation and the q elite chromosomes retained in step (7) form a new population; (10) Sort the individuals in the population in ascending order according to the fitness values; (11) Retain n chromosomes and q elite chromosomes with shorter flight route lengths respectively; (12) Perform mutation operations on the retained n chromosomes according to the mutation probability P m A combined mutation operator is given to balance the exploration ability and exploitation ability of the algorithm: 1) Reverse mutation operator Randomly generate two random integers N1 and N2 between [1, m], and reverse the genes between N1 and N2 on a certain chromosome to be mutated to obtain a new chromosome; 2) Swap mutation operator Randomly generate two random integers N1 and N2 between [1, m], and swap the genes at positions N1 and N2 on a certain chromosome to be mutated to obtain a new chromosome; 3) Heuristic mutation operator Randomly generate a random integer N1 between [1, m], where N1 is a job point on the chromosome to be mutated. Find the index number of N1 on this chromosome; at the same time, find the other job point N2 that is closest to the job point N1, and insert the job point N2 behind the position where the job point N1 is located; The combined mutation operator operation is as follows: At the t-th iteration, for each chromosome to be mutated, a random number r can be randomly generated. If r > Pm, then mutate according to the reverse mutation operator; if r ≤ Pm and r is a multiple of 3, then mutate according to the swap mutation operator; if r ≤ Pm and r is not a multiple of 3, then mutate according to the heuristic mutation operator; (13) Mutated nP m The q elite chromosomes retained in step (11), the n chromosomes, and the mutated nP reconstitute a new population, and q elite chromosomes and n chromosomes with shorter flight route lengths are retained from the new population; the population at this time is denoted as A; (14) Perform a jumping gene operation on A, and denote the population at this time as B; use the jumping gene operator to improve the convergence speed of the algorithm; (15) Perform a 2-Opt operation on A, and denote the population at this time as C; (16) Combine the q elite chromosomes retained in step (13), population B, and population C to form a new population D; (17) Retain q elite chromosomes and n chromosomes with shorter route lengths from D respectively, and return to step (3).

2. A method for planning the operation path of a plant protection UAV based on an intelligent optimization algorithm according to claim 1, It is characterized in that: In formula (6), β ∈ (0, 1), and the value is 0.

15.

3. A method for planning the operation path of a plant protection UAV based on an intelligent optimization algorithm according to claim 1, characterized in that: In step (14), the implementation steps of the jumping gene operator with sequential encoding are as follows: Step 1: Let i = 1; Step 2: For the i-th chromosome in the population, randomly generate a random number λ between [0, 1]. If P JG > λ, check the (i + 1)-th chromosome in the population. If i ≥ n, stop the jumping gene operation; otherwise, go to the next step; Step 3: Generate two uniformly distributed random integers jg1 and jg2 between [1, m], and jg1 < jg2; assume the chromosome for which the jumping gene operator is performed is A, A = 32645198710, jg1 = 2, jg2 = 8; Step 4: The number of genes between jg1 and jg2 is jg2 - jg1 = 6. Randomly generate a 6-bit binary string a. Assume a = 011010, and k is the position of the elements in a that are equal to 1; Step 5: In chromosome A, the substring between jg1 and jg2 is b = 645198, c = a.*b, delete the elements in c that are 0, d = 459; Step 6: The number of elements in d is 3. Generate three random integers e between [1, 3]. Assume e = 312; Step 7: Let the value of the first element in f be equal to the value of the third element in d, the value of the second element in f be equal to the value of the first element in d, and the value of the third element in f be equal to the value of the second element in d. Then f = 945; Step 8: Since k records the position of element 1 in a, set the value of the element at the second position in b equal to the value of the element at the first position in f, the value of the third element in b equal to the value of the second position element in f, and the value of the fifth position element in b equal to the value of the third position element in f; Step 9: If i ≥ n, stop the jumping gene operation; otherwise, let i ← i + 1 and return to Step 2.

4. A method for planning the operation path of a plant protection UAV based on an intelligent optimization algorithm according to claim 1, characterized in that: In step (15), the steps of 2-Opt are as follows: Step 1: Select a UAV operation path; Step 2: Select two different operation points on the path, called operation point a and operation point b; Step 3: Reverse the sub-path between operation points a and b on the path, which means reversing the operation order between operation points a and b; Step 4: Calculate the total length of the reversed path; Step 5: If the reversed path is shorter than the original path, accept this new path; otherwise, keep the original path unchanged; Repeat Steps 2 to 5, continuously select different pairs of operation points until no further improvement can be made.