Greenhouse agricultural robot path planning method based on multi-objective optimization

By generating a two-dimensional grid map in a greenhouse environment, marking task points, filtering candidate paths, and using a dual objective function and swarm intelligence optimization algorithm, the problem of insufficient path planning efficiency in a greenhouse environment is solved, achieving efficient and accurate path planning to meet the needs of multiple tasks.

CN120702494BActive Publication Date: 2026-03-27CHINA AGRI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-25
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing path planning methods are inefficient in greenhouse environments, easily generating invalid paths, and cannot flexibly cope with the needs of multiple tasks. Furthermore, traditional multi-objective optimization algorithms are inefficient when processing large-scale populations, and the coding method does not match the task decision sequence, resulting in invalid paths.

Method used

A path planning method based on multi-objective optimization is adopted. By generating a two-dimensional grid map, marking task points, and filtering candidate paths, the total path length and total turning angle are used as bi-objective functions. The optimal solution set is selected using a swarm intelligence optimization algorithm. Combined with adaptive non-dominated sorting and improved crowding distance calculation based on local density factor, excellent individuals are selected, and partial matching crossover and inversion mutation operations are performed to generate the final planned path.

Benefits of technology

It improves the efficiency and stability of path planning for greenhouse agricultural robots, enabling them to quickly handle large-scale populations, meet real-time planning requirements, and ensure that robots can complete tasks efficiently and accurately in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120702494B_ABST
    Figure CN120702494B_ABST
Patent Text Reader

Abstract

The application relates to a greenhouse agricultural robot path planning method based on multi-objective optimization and belongs to the technical field of robot path planning, solving the problems of insufficient path planning efficiency and easy generation of invalid paths in the prior art under a complex environment. The greenhouse agricultural robot path planning method based on multi-objective optimization comprises the following steps: generating a two-dimensional grid map by scanning a greenhouse and dividing the two-dimensional grid map into free grids and obstacle grids, and marking task points on the free grids; arranging and encoding all the task points to generate multiple paths, and screening candidate paths meeting greenhouse constraint conditions; calculating the total path length and the total turning angle of each candidate path; taking the minimization of the total path length and the minimization of the total turning angle as double-objective functions, calculating an optimal solution set through a swarm intelligence optimization algorithm, and preferably selecting a candidate path with the best comprehensive performance from the optimal solution set as a final planning path.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of robot path planning, and in particular to a greenhouse agricultural robot path planning method based on multi-objective optimization. BACKGROUND

[0002] As a key component of modern agriculture, greenhouse agriculture improves crop yield and efficiency through precise environmental control. With the rapid expansion of global greenhouse areas, agricultural robots are increasingly used in greenhouses to perform tasks such as spraying, inspection, and harvesting. However, the complexity of the greenhouse environment, such as dense steel frames, irrigation facilities, and high-density crop planting, poses challenges for robot path planning. Robots not only need to frequently avoid obstacles, but also need to efficiently handle diverse task requirements, such as selective spraying and emergency task prioritization.

[0003] Traditional path planning methods, such as full coverage path planning, while able to traverse the entire greenhouse area, have issues of path redundancy, resource waste, and inability to flexibly handle multi-task requirements. In addition, traditional single-objective optimization methods only focus on the shortest path, ignoring the impact of turning angles on energy consumption and mechanical wear. Although existing multi-objective optimization algorithms can optimize paths to some extent, they still have deficiencies in the greenhouse environment. Traditional non-dominated sorting methods are inefficient when dealing with large populations and cannot meet the real-time planning requirements of the greenhouse environment. At the same time, due to the mismatch between the encoding method and the arrangement characteristics of the greenhouse task decision sequence, the crossover and mutation operations easily destroy the parent path, leading to the generation of invalid paths by multi-objective optimization algorithms. SUMMARY

[0004] In view of the above analysis, the embodiments of the present application aim to provide a greenhouse agricultural robot path planning method based on multi-objective optimization to solve the problems of insufficient path planning efficiency and easy generation of invalid paths in the existing complex environment.

[0005] In one aspect, the embodiments of the present application provide a greenhouse agricultural robot path planning method based on multi-objective optimization, which comprises:

[0006] Generating a two-dimensional grid map by scanning the greenhouse and dividing it into free grids and obstacle grids, and marking task points on the free grids;

[0007] Arranging and encoding all task points to generate multiple paths, and screening out candidate paths that meet the greenhouse constraint conditions;

[0008] Calculating the total path length and total turning angle of each candidate path;

[0009] Taking the minimization of total path length and total turning angle as a double-objective function, and screening out the optimal solution set through a swarm intelligence optimization algorithm;

[0010] selecting a candidate path with the best comprehensive performance from the optimal solution set as the final planning path.

[0011] As a further improvement of the present application, the double objective functions of minimizing the total path length and minimizing the total turning angle are screened by a swarm intelligence optimization algorithm to obtain an optimal solution set, which includes:

[0012] A population is constructed based on the candidate paths, each individual in the population is a candidate path, and the following steps are executed on the population in a loop until a termination condition is met:

[0013] Non-dominated sorting is performed on all individuals in the population to divide them into front ranks;

[0014] The improved crowding distance of each individual in each front rank in the objective space is calculated;

[0015] Excellent individuals are selected from the front ranks and the improved crowding distance to enter the next generation population;

[0016] Parent candidate paths are selected from the next generation population by a tournament selection mechanism;

[0017] Partial match crossover and inversion mutation operations are performed on the parent candidate paths to generate child candidate paths;

[0018] The parent candidate paths and the child candidate paths are merged to form a new population;

[0019] After the termination condition is met, the loop is stopped, and the new population obtained in the last loop is taken as the final population;

[0020] An optimal solution set is extracted from the final population.

[0021] As a further improvement of the present application, the non-dominated sorting performed on all individuals in the population to divide them into front ranks includes:

[0022] The dominance relationship between individuals in the population is compared;

[0023] The non-dominated sorting is performed based on the dominance relationship to divide the front ranks of the individuals in the population; wherein the first front rank includes all non-dominated solutions, the non-dominated solution is an individual that is not dominated by any other individual; the nth front rank includes solutions dominated by the (n-1)th front rank, n=2, 3,..., N.

[0024] As a further improvement of the present application, the improved crowding distance of each individual in each front rank in the objective space includes:

[0025] For each individual, calculate the difference in target value between it and the previous neighboring individual and the next neighboring individual on each objective function, wherein the neighboring individuals are those directly adjacent after being sorted in ascending or descending order of objective function values ​​within the same frontier level;

[0026] Calculate the maximum and minimum values ​​of each objective function at the current frontier level;

[0027] The differences in target values ​​between each objective function and the previous and next adjacent individuals are summed to obtain the sum of the differences in target values ​​in each objective direction;

[0028] The sum of the differences in the objective value is normalized based on the maximum and minimum values ​​of the objective function at the current frontier level to generate a normalized difference value.

[0029] A local density factor is constructed based on the normalized difference value;

[0030] Based on the local density factor, the difference between the objective value of each objective function and the objective value of neighboring individuals, and the maximum and minimum values ​​of each objective function at the current frontier level, the improved crowding distance of individuals at the current frontier level in the objective space is calculated.

[0031] As a further improvement to this application, the method for constructing the local density factor includes:

[0032] The normalized difference values ​​are mapped to local density factors by an exponential function, and the local density factors are inversely proportional to the sparsity of the candidate paths in the target space.

[0033] As a further improvement to this application, the improved congestion distance is shown in the following formula;

[0034]

[0035] Among them, CD i Let M be the improved crowding distance for individual i, M be the number of objective functions, and m be the index of the objective function. Let be the difference between the target value of individual i and its next neighboring individual on the m-th objective function. f is the difference between the target value of individual i and the target value of its previous neighbor on the m-th objective function; max (m) f is the maximum value of the m-th objective function at the current frontier level. max (m) Let DF be the minimum value of the m-th objective function at the current frontier level. i This is the local density factor.

[0036] As a further improvement to this application, the local density factor is shown in the following formula;

[0037]

[0038] wherein, is the difference between the objective value of individual i on the mth objective function and the previous adjacent individual, is the difference between the objective value of individual i on the mth objective function and the next adjacent individual.

[0039] As a further improvement of the present application, the selecting of the excellent individuals into the next generation population according to the front level and the improved crowding distance comprises:

[0040] selecting the excellent individuals into the next generation population in turn according to the front level from low to high;

[0041] for the individuals in the same front level, preferentially selecting the individual with a larger improved crowding distance into the next generation population; until the number of individuals in the next generation population reaches the preset population size.

[0042] As a further improvement of the present application, the non-dominated sorting based on the dominance relationship and the division of the front level of the individuals in the population comprises:

[0043] when the population size is less than or equal to the preset size threshold, selecting the ENS-SS method for non-dominated sorting;

[0044] when the population size is greater than the preset size threshold, selecting the T-ENS method for non-dominated sorting.

[0045] As a further improvement of the present application, the selecting of the candidate path with the best comprehensive performance from the optimal solution set as the final planning path comprises:

[0046] constructing a decision matrix for each candidate path in the optimal solution set, and obtaining a normalized matrix after standardization processing;

[0047] calculating the information entropy of each objective function, determining the weight of each objective function based on the information entropy, and constructing a weighted normalized matrix based on the weight of each objective function;

[0048] determining the positive ideal solution and the negative ideal solution in the weighted normalized matrix;

[0049] calculating the distance of each candidate path to the positive ideal solution and the negative ideal solution;

[0050] calculating the comprehensive score of each candidate path based on the distance of each candidate path to the positive ideal solution and the negative ideal solution;

[0051] selecting the candidate path with the highest comprehensive score as the final planning path.

[0052] Compared with the prior art, the present application can at least realize one of the following beneficial effects:

[0053] 1、The application effectively improves the efficiency of greenhouse agricultural robot path planning in complex environment by adopting total path length and total turning angle as double objective functions, combining improved crowding distance calculation of adaptive non-dominated sorting strategy and local density factor, can quickly process large-scale population, reduce calculation time, meet the requirements of real-time planning in greenhouse environment, so as to ensure that the robot can respond to multi-task demand in time, improve the overall operation efficiency.

[0054] 2、The application ensures the legality and integrity of the generated path by permutation coding mode and partial matching crossover and inversion mutation operation, can more accurately screen out high-quality paths meeting the constraints of greenhouse environment, effectively avoids the invalid path problem caused by the mismatch between the coding mode and the greenhouse task decision sequence in the traditional method, improves the stability and reliability of path planning, and ensures the efficient and accurate operation of the robot in complex greenhouse environment.

[0055] In the application, the above technical solutions can be combined with each other to realize more preferred combination solutions. Other features and advantages of the application will be described in the subsequent specification, and some advantages will become apparent from the specification or by implementing the application. The purpose and other advantages of the application can be realized and obtained from the contents specifically pointed out in the specification and the drawings. BRIEF DESCRIPTION OF DRAWINGS

[0056] The accompanying drawings are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and serve to explain the principles of the application, and are not intended to limit the scope of the application.

[0057] Figure 1 A flowchart of a greenhouse agricultural robot path planning method based on multi-objective optimization provided by an embodiment of the application is shown in the figure.

[0058] Figure 2 A flowchart of screening an optimal solution set by a swarm intelligence optimization algorithm provided by an embodiment of the application is shown in the figure. DETAILED DESCRIPTION

[0059] The preferred embodiments of the application will be specifically described below in combination with the drawings, wherein the drawings constitute a part of this application, and are used to illustrate the principles of the embodiments of the application, and are not intended to limit the scope of the application.

[0060] One specific embodiment of the application discloses a greenhouse agricultural robot path planning method based on multi-objective optimization, as shown in the figure. Figure 1 The method comprises:

[0061] S1, a two-dimensional grid map is generated by scanning the greenhouse and divided into free grids and obstacle grids, and task points are marked on the free grids.

[0062] A mobile robot equipped with a two-dimensional laser radar is used to scan the greenhouse environment in combination with a odometer and SLAM technology to obtain environmental point cloud data and the robot's own pose information. The environmental data is converted into a two-dimensional grid map, each grid representing a small area of the environment, and its state is determined according to the laser radar data. If there are no obstacles in the grid, i.e. the reflection signal is weak or the distance is greater than a safety threshold, it is marked as a free grid, usually represented by 0; if there are obstacles, i.e. the reflection signal is strong and the distance is less than a safety threshold, it is marked as an obstacle grid, usually represented by 1.

[0063] On the constructed grid map, according to the specific tasks in the greenhouse, such as plant inspection, pesticide spraying, etc., the locations that the robot needs to visit on the free grid are marked as task points, which are represented as specific coordinates on the grid map. The greenhouse can be divided into planting areas, equipment areas and passage areas, etc., among which the planting areas are the places where the robot performs tasks, including short ridge planting areas and long ridge planting areas, etc.; the equipment areas are used to place greenhouse environmental control equipment, tools and supplies; the passage areas are the passages connecting different areas of the greenhouse and are the paths for the robot to move. Randomly generated task points can be used to ensure that the task points meet the constraints of the robot's accessibility, and the number and distribution density of the task points can be adjusted according to specific requirements.

[0064] S2, arrange and encode all task points to generate multiple paths, and select candidate paths that meet the greenhouse constraints.

[0065] The arrangement and encoding method is used to generate paths, each path representing a different order of visiting all task points, and each path is encoded as a sequence with a length equal to the number of task points. Each element in the sequence represents a unique task point identifier (such as task point number), and the arrangement order of the elements in the sequence represents the order in which the robot visits these task points. For example, if there are 12 task points (numbered 1 to 12) in the greenhouse, a possible encoding for an individual is <p3, p1, p5, p8, p6, p2, p4, p9, p7, p10, p11, p12>, which means the robot visits task point 3, task point 1, task point 5, and so on, until it visits all task points. The task decision sequence of each path is randomly generated. The specific operation is as follows: first, create a list containing all task point numbers, then randomly shuffle the list to get a random arrangement, which is used as the encoding of an individual. Repeat this process N times to generate N paths. 12 10 11

[0066] ​​​A legality check is performed on each generated path to ensure that it satisfies the greenhouse constraints. The legality check includes checking for obstacle collision, checking for task point reachability, and checking for path completeness. Individuals that satisfy the greenhouse constraints are kept as candidate paths.

[0067] Specifically, checking for obstacle collision includes checking whether the individual path collides with obstacles according to the greenhouse grid map. The specific method is to verify whether the path passes through each task point and each task point can only pass through once. If there is a collision, the individual is regenerated. Checking for task point reachability is to ensure that each task point in the path is reachable by the robot, i.e., to verify whether each task point in the path is located on a free grid. Checking for path completeness is to ensure that the path covers all task points and there are no missed or repeatedly visited task points.

[0068] S3, calculate the total path length and the total turning angle of each candidate path.

[0069] When calculating the total path length, the A* algorithm is used to calculate the shortest path between task points and task points respectively, and the cost function is f(n) = g(n) + h(n), where g(n) is the actual movement cost and h(n) is the Euclidean distance from the current node to the end point. The total path length L = ∑A*(p i ,p i+1 ), for example, there are three task points, the path from p2 to p3 is 2.5 meters, and the path from p3 to p1 is 1.6 meters, then the total path length of the path sequence <p2, p3, p1> is L = 4.1 meters. The total shortest path between multiple task points is taken as the total path length.

[0070] When calculating the total turning angle, for each point in the task point sequence of the path, first get the specific coordinates of the current task point, the previous task point and the next task point, calculate the direction vector based on the coordinate difference. When calculating the direction vector, the forward vector is obtained by subtracting the corresponding coordinates of the previous task point from the horizontal and vertical coordinates of the current task point, and the backward vector is obtained by subtracting the corresponding coordinates of the current task point from the horizontal and vertical coordinates of the next task point. Then, the dot product value is obtained by multiplying the horizontal and vertical coordinates of the forward vector and the backward vector respectively and summing them up, and the lengths of the two vectors are calculated respectively. Finally, the cosine value of the included angle is obtained by dividing the dot product by the product of the lengths of the two vectors, which represents the turning angle of the path.

[0071] Thus, for a path <p1, p2,..., p n >, the total turning angle of the path is:

[0072] where v i is the direction vector of the mobile robot from p i-1 to p i , i.e., the forward vector, vi+1 The direction vector of the mobile robot from p i to p i+1 , i.e. the backward vector, ||v i || and ||v i+1 || are the lengths of vectors v i and v i+1 , the vector length is the square root of the sum of the squares of the horizontal and vertical coordinates, and n is the total number of task points.

[0073] S4, taking the minimization of the total path length and the minimization of the total turning angle as a double objective function, screening the optimal solution set through a swarm intelligence optimization algorithm.

[0074] The swarm intelligence optimization algorithm is used to evaluate and screen the candidate paths. By simulating the natural evolution process, the individuals (i.e. candidate paths) in the population are selected, crossed and mutated to gradually evolve better solutions. In each generation of evolution, the individuals are evaluated according to the double objective function, and the better individuals are selected to enter the next generation population. At the same time, new individuals are generated through crossing and mutation operations to increase the diversity of the population. Iteration is continuously performed until the preset termination condition is met, and the termination condition is to reach the maximum number of iterations or the population converges.

[0075] As shown in Figure 2 , specifically, the optimal solution set is screened through the swarm intelligence optimization algorithm, which includes:

[0076] A population is constructed based on the candidate paths, each individual in the population is a candidate path, and the following steps are executed on the population in a loop until the termination condition is met:

[0077] S41, non-dominated sorting is performed on all individuals in the population to divide the front levels.

[0078] The non-dominated sorting of all individuals in the population to divide the front levels includes:

[0079] Comparing the dominance relationship between individuals in the population;

[0080] Non-dominated sorting based on the dominance relationship to divide the front levels of the individuals in the population; wherein the first front level includes all non-dominated solutions, which are individuals not dominated by any other individual; the nth front level includes solutions dominated by the (n-1)th front level, n = 2, 3...N.

[0081] For any two individuals A and B in the population, if individual A is not worse than individual B on all objective functions and better than individual B on at least one objective function, individual A is said to dominate individual B. All individuals in the population are traversed to find all individuals that are not dominated by any other individual, which constitute the first front rank. After removing the individuals that have been assigned to the first front rank from the population, the above process is repeated on the remaining individuals to find the next front rank. This process continues until all individuals are assigned to the corresponding front ranks. The nth front rank includes solutions dominated by the (n-1)th front rank.

[0082] Non-dominated sorting based on the dominance relationship and dividing the front ranks of individuals in the population includes:

[0083] When the population size is less than or equal to the preset size threshold, the ENS-SS method is selected for non-dominated sorting;

[0084] When the population size is greater than the preset size threshold, the T-ENS method is selected for non-dominated sorting.

[0085] An adaptive non-dominated sorting strategy is adopted to flexibly select a suitable sorting method to improve the calculation efficiency. When the population size is small (i.e., the number of individuals N≤200), the ENS-SS (sequential search method) is used for non-dominated sorting. That is, all individuals in the population are traversed using double loops, and their dominance relationship is compared one by one. By sequentially checking whether each individual is dominated by other individuals, a non-dominated front is constructed, which can guarantee high sorting accuracy when the calculation resources are sufficient. For the case where the population size is large (i.e., the number of individuals N>200), the T-ENS (tree structure) is used for non-dominated sorting. By constructing a dominance relationship tree, the non-dominated solutions are efficiently screened using hierarchical indexing and level traversal. In the construction process, individuals are inserted into the tree structure in order of their target values. Each new individual only needs to be compared with a part of the existing individuals, avoiding global traversal and reducing unnecessary dominance judgments, which can significantly improve the calculation efficiency when dealing with large-scale populations.

[0086] S42, calculating the improved crowding distance of each individual in the target space.

[0087] Calculating the improved crowding distance of each individual in the target space includes:

[0088] S421, for each individual, calculating the difference between its target value and the target value of the previous adjacent individual and the difference between its target value and the target value of the next adjacent individual in each objective function, wherein the adjacent individuals are directly adjacent individuals in the same front rank after sorting in ascending or descending order of the target function value;

[0089] S422, calculating the maximum value and the minimum value of each objective function in the current front rank;

[0090] S423. Add the differences in target values ​​between each objective function and the previous and next adjacent individuals to obtain the sum of the differences in target values ​​in each objective direction;

[0091] S424. Normalize the sum of the differences in the objective value based on the maximum and minimum values ​​of the objective function at the current frontier level to generate a normalized difference value.

[0092] S425. Construct a local density factor based on the normalized difference value;

[0093] S426. Based on the local density factor, the difference between the target value of each objective function and that of neighboring individuals, and the maximum and minimum values ​​of each objective function at the current frontier level, calculate the improved crowding distance of the individuals at the current frontier level in the target space.

[0094] The improved congestion distance is shown in the following formula;

[0095]

[0096] Among them, CD i Let M be the improved crowding distance for individual i, M be the number of objective functions, and m be the index of the objective function. Let be the difference between the target value of individual i and its next neighboring individual on the m-th objective function. f is the difference between the target value of individual i and the target value of its previous neighbor on the m-th objective function; max (m) f is the maximum value of the m-th objective function at the current frontier level. max (m) Let DF be the minimum value of the m-th objective function at the current frontier level. i This is the local density factor.

[0097] This paper calculates the improved crowding distance for each individual in multi-objective optimization by processing each individual within the frontier and calculating the crowding degree of each individual in the target space. Traditional improved crowding distance formulas only consider the difference in target values ​​between adjacent individuals, neglecting the impact of obstacle distribution on path density in a greenhouse environment, leading to uneven distribution of the solution set in the target space. Compared to traditional improved crowding distance calculation methods, this application introduces a local density factor when calculating the improved crowding distance, quantifying the sparsity of adjacent individuals in the target space through an exponential function, and dynamically adjusting the weight of the improved crowding distance.

[0098] The method for constructing the local density factor includes:

[0099] The normalized difference value is mapped to a local density factor by an exponential function, which is inversely proportional to the sparsity of the candidate path in the objective space.

[0100] The local density factor is shown in the following formula:

[0101]

[0102] wherein, is the difference of the objective value of individual i on the mth objective function and the previous adjacent individual, is the difference of the objective value of individual i on the mth objective function and the next adjacent individual.

[0103] The introduction of the local density factor makes the improvement crowding distance of individuals in dense areas be properly reduced, while the improvement crowding distance of individuals in sparse areas be amplified, thereby enhancing the selection tendency to sparse areas. Meanwhile, the improvement crowding distance of boundary individuals is set to infinity to ensure the priority reservation of extreme solutions. And the individuals are sorted according to the improved improvement crowding distance, and the individuals with larger improvement crowding distance are preferentially reserved to enter the next generation population.

[0104] S43, selecting excellent individuals into the next generation population according to the front level and the improvement crowding distance.

[0105] Specifically, the step of selecting excellent individuals into the next generation population according to the front level and the improvement crowding distance comprises:

[0106] selecting excellent individuals into the next generation population in order from low to high according to the front level;

[0107] for individuals at the same front level, preferentially selecting individuals with larger improvement crowding distance into the next generation population; until the number of individuals in the next generation population reaches the preset population size.

[0108] selecting individuals into the next generation population according to the front level of the individuals, starting from the lowest front level, and selecting individuals into the next generation population in order. If individuals at the same front level are encountered, preferentially selecting individuals with larger improvement crowding distance, and continuously selecting until the number of individuals in the next generation population reaches the preset population size.

[0109] S44, selecting parent candidate paths from the next generation population through a tournament selection mechanism.

[0110] The tournament selection simulates the natural selection process, compares the fitness of individuals to select better individuals as parents to generate the next generation of individuals. The fitness value is a quantitative evaluation of the individual's performance in the optimization target. In this invention, it is used to measure the performance of the candidate path in the two targets of total path length and total turning angle. The better the fitness value, the more the individual fits the optimization target. Convert the fitness value into a column vector, then combine all the fitness matrices, remove duplicate fitness values by de-duplication operation, and sort the fitness of each individual to get the ranking of each individual. Initialize the selected parent individuals, perform N times K-tournament selection, and randomly select K individuals from the population each time to participate in the competition. Rank the selected K individuals by fitness, and select the individual with the best ranking, i.e. the smallest fitness. Add the selected individual to the selected individual list, and finally form the parent individual list.

[0111] S45, perform partial match crossover operation and reverse mutation operation on the parent candidate path to generate child candidate path.

[0112] In the traditional NSGA-II algorithm, a single encoding method (such as real number encoding) is usually used to represent the solution, which may lead to poor solutions. The invention performs partial match crossover operation and reverse mutation operation to generate child candidate paths.

[0113] When performing partial match crossover operation, first read the relevant parameters, including two parent solutions Parent1 and Parent2 and crossover probability proC, where each solution represents a path including multiple task points. Traverse the parent individuals and perform crossover operation according to the crossover probability proC. For sequence encoding, design partial match crossover (PMX), randomly select two crossover points cx_start and cx_end to determine the crossover interval. Exchange the genes (path nodes) of Parent1 and Parent2 in the crossover interval, while ensuring the legality of the path order and avoiding duplicate nodes. When performing reverse mutation operation, inverse order mutation is used, i.e. with a certain probability (default setting is 0.1) to select offspring individuals for mutation. Randomly select a mutation interval [startIdx, endIdx], reverse the order of path nodes in the selected interval, adjust the individual structure, and increase the population diversity.

[0114] S46, merge the parent candidate paths and the child candidate paths to form a new population.

[0115] Merge the parent population (size N) and the child population (size N) to form an expanded population containing 2N individuals. The expanded population contains high-quality individuals from the previous generation, as well as new individuals generated by crossover and mutation.

[0116] S47, after meeting the termination condition, stop the loop, and take the new population obtained in the last loop as the final population.

[0117] When the preset number of iterations or population convergence is reached, stop the loop, and take the new population obtained in the last loop as the final population.

[0118] S48, extract the optimal solution set from the final population.

[0119] Extract the optimal solution set from the final population, and the optimal solution set represents a solution set composed of candidate paths that perform best in terms of total path length and total turning angle.

[0120] S5, select the candidate path with the best comprehensive performance from the optimal solution set as the final planning path. A dynamic weight allocation method based on entropy weight TOPSIS is used to select the candidate path with the best comprehensive performance from the optimal solution set as the final planning path. Specifically, selecting the candidate path with the best comprehensive performance as the final planning path includes:

[0121] S51, construct a decision matrix for each candidate path in the optimal solution set, and obtain a standardized matrix after standardization.

[0122] Construct a decision matrix for each candidate path in the optimal solution set, and obtain a standardized matrix after standardization. When constructing the decision matrix, the values of each candidate path on each objective function are taken as the matrix elements. Standardization converts these values to a uniform scale, and common methods include linear standardization, vector standardization, etc., to eliminate dimensional and magnitude differences. Standardization is shown in the following formula:

[0123]

[0124] Transform the data to the [0, 1] interval, where x ij is the value of the i-th candidate path in the decision matrix on the j-th objective function, min(x j ) and max(x j ) are the minimum and maximum values of the j-th objective function, respectively.

[0125] S52, calculate the information entropy of each objective function, determine the weight of each objective function based on the information entropy, and construct a weighted standardized matrix based on the weight of each objective function.

[0126] For each objective function j, the information entropy is calculated as follows:

[0127]

[0128] where p ijò is the ratio of the value of the i-th candidate path in the j-th objective function to the sum of the values ​​of all candidate paths in the j-th objective function in the standardized matrix. ò is a very small constant used to avoid the calculation of ln(0).

[0129]

[0130] Let be the value of the i-th candidate path in the j-th objective function within the standardized decision matrix.

[0131] Based on the calculated information entropy, the weight of each objective function is determined as shown in the following formula;

[0132]

[0133] A larger weight indicates a more important objective function, where n is the total number of objective functions. The weighted standardized decision matrix is ​​obtained by multiplying each standardized data point in the decision matrix by its corresponding weight.

[0134] S53. Determine the positive and negative ideal solutions in the weighted standardized matrix.

[0135] A positive ideal solution is the optimal (minimum) value of each objective function in the weighted normalization matrix, while a negative ideal solution is the worst (maximum) value of each objective function in the weighted normalization matrix.

[0136] The ideal solution is shown in the following equation;

[0137]

[0138] The negative ideal solution is shown in the following equation;

[0139]

[0140] in, Let j be the positive ideal solution of the j-th objective function. Let j be the negative ideal solution of the j-th objective function. It is the weighted standardized value of the i-th candidate path on the j-th objective function.

[0141] S54. Calculate the distance from each candidate path to the positive ideal solution and the negative ideal solution.

[0142] Calculate the distance from each candidate path to the positive and negative ideal solutions using the Euclidean distance formula, as shown below;

[0143]

[0144] Let be the distance from the i-th candidate path to the positive ideal solution. Distance of the ith candidate path to the negative ideal solution.

[0145] S55, calculate the comprehensive score of each candidate path based on the distance of each candidate path to the positive ideal solution and the negative ideal solution.

[0146] The comprehensive score of each candidate path is calculated as follows:

[0147]

[0148] S i The comprehensive score of the candidate path, the higher the score, the closer the solution to the ideal solution, and the farther away from the negative ideal solution. Select the solution with the highest score as the optimal solution, that is, select the solution with the highest score as the final planning path.

[0149] The above embodiments of the present application have at least the following beneficial effects:

[0150] The present application effectively improves the efficiency of greenhouse agricultural robot path planning in complex environment by using total path length and total turning angle as double objective function, combining adaptive non-dominated sorting strategy and improved crowding distance calculation of local density factor, can quickly process large-scale population, reduce calculation time, meet the requirements of real-time planning in greenhouse environment, so as to ensure that the robot can respond to multi-task demand in time, improve the overall operation efficiency; The present application ensures the legality and integrity of the generated path through permutation coding mode and partial matching crossover and reverse mutation operation, can more accurately screen out high-quality path that meets the constraints of greenhouse environment, effectively avoids the invalid path problem caused by the mismatch between coding mode and greenhouse task decision sequence in traditional method, improves the stability and reliability of path planning, ensures the efficient and accurate operation of robot in complex greenhouse environment.

[0151] Those skilled in the art can understand that all or part of the processes of the above-mentioned embodiments can be completed by a computer program instructing related hardware, and the program can be stored in a computer readable storage medium. Among them, the computer readable storage medium is a disk, an optical disk, a read-only memory or a random access memory, etc.

[0152] The above is only the preferred specific embodiment of the present application, but the protection scope of the present application is not limited thereto, any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the present application, which should be covered within the protection scope of the present application.

Claims

1. A path planning method for greenhouse agricultural robots based on multi-objective optimization, characterized in that, The method includes: A two-dimensional raster map is generated by scanning the greenhouse and divided into free grids and obstacle grids. Task points are marked on the free grids. All task points are arranged and coded to generate multiple paths, and candidate paths that meet the greenhouse constraint conditions are selected. Calculate the total path length and total turning angle for each candidate path; Minimizing the total path length and minimizing the total turning angle are used as dual objective functions, and the optimal solution set is selected through a swarm intelligence optimization algorithm. Select the candidate path with the best overall performance from the optimal solution set as the final planned path; The process of using minimizing the total path length and minimizing the total turning angle as dual objective functions, and calculating the optimal solution set through a swarm intelligence optimization algorithm, includes: A population is constructed based on candidate paths, where each individual in the population represents a candidate path. The following steps are iteratively executed on the population until a termination condition is met: Perform non-dominated sorting on all individuals in the population to determine the frontier hierarchy; Calculate the improved crowding distance of each individual at the frontier level in the target space; Based on the aforementioned frontier hierarchy and improved crowding distance, select outstanding individuals to enter the next generation of the population; The parental candidate path is selected from the next generation population through a tournament selection mechanism; Perform partial matching crossover and inversion mutation operations on the parent candidate paths to generate the offspring candidate paths; The parent candidate paths and the offspring candidate paths are merged to form a new population; After the termination condition is met, the loop stops, and the new population obtained in the last loop is taken as the final population. Extract the optimal solution set from the final population; The calculation of the improved crowding distance for each frontier level individual in the target space includes: For each individual, calculate the difference in target value between it and the previous neighboring individual and the next neighboring individual on each objective function, wherein the neighboring individuals are those directly adjacent after being sorted in ascending or descending order of objective function values ​​within the same frontier level; Calculate the maximum and minimum values ​​of each objective function at the current frontier level; The differences in target values ​​between each objective function and the previous and next adjacent individuals are summed to obtain the sum of the differences in target values ​​in each objective direction; The sum of the differences in the objective value is normalized based on the maximum and minimum values ​​of the objective function at the current frontier level to generate a normalized difference value. A local density factor is constructed based on the normalized difference value; Based on the local density factor, the difference between the objective value of each objective function and the objective value of neighboring individuals, and the maximum and minimum values ​​of each objective function at the current frontier level, the improved crowding distance of individuals at the current frontier level in the objective space is calculated.

2. The method according to claim 1, characterized in that, Performing a non-dominated ordination of all individuals in the population to determine the frontier hierarchy includes: Compare the dominance relationships among individuals in a population; Non-dominated sorting is performed based on dominance relationships to divide the frontier levels of individuals in the population; wherein, the first frontier level includes all non-dominated solutions, which are individuals not dominated by any other individual; the nth frontier level includes solutions dominated by the (n-1)th frontier level, and n=2, 3...N.

3. The method according to claim 2, characterized in that, The method for constructing the local density factor includes: The normalized difference values ​​are mapped to local density factors by an exponential function, and the local density factors are inversely proportional to the sparsity of the candidate paths in the target space.

4. The method according to claim 3, characterized in that, The improved congestion distance is shown in the following formula; in, For individual i, the improved crowding distance Let m be the number of objective functions, and m be the index of the objective function. Let be the difference between the target value of individual i and its next neighboring individual on the m-th objective function. Let be the difference between the target value of individual i and the target value of the previous neighboring individual on the m-th objective function; Let m be the maximum value of the m-th objective function at the current frontier level. Let m be the minimum value of the m-th objective function at the current frontier level. This is the local density factor.

5. The method according to claim 4, characterized in that, The local density factor is shown in the following formula; in, Let be the difference between the target value of individual i and its previous neighboring individual on the m-th objective function. Let be the difference between the target value of individual i and the next adjacent individual on the m-th objective function.

6. The method according to claim 1, characterized in that, Selecting superior individuals for the next generation of the population based on the aforementioned frontier hierarchy and improved crowding distance includes: Select the best individuals to enter the next generation of the population in order of increasing frontier level; For individuals at the same frontier level, prioritize those with a larger crowding distance to enter the next generation of the population; until the number of individuals in the next generation reaches the preset population size.

7. The method according to claim 1, characterized in that, Non-dominated ranking based on dominance relationships, dividing the frontier hierarchy of individuals in a population includes: When the population size is less than or equal to a preset size threshold, the ENS-SS method is selected for non-dominated sorting. When the population size exceeds a preset size threshold, the T-ENS method is selected for non-dominated sorting.

8. The method according to claim 1, characterized in that, Selecting the candidate path with the best overall performance from the optimal solution set as the final planned path includes: For each candidate path in the optimal solution set, a decision matrix is ​​constructed, and the standardized matrix is ​​obtained after standardization. Calculate the information entropy of each objective function, determine the weight of each objective function based on the information entropy, and construct a weighted normalization matrix based on the weight of each objective function; Determine the positive and negative ideal solutions in the weighted standardized matrix; Calculate the distance from each candidate path to the positive and negative ideal solutions; The comprehensive score of each candidate path is calculated based on the distances of each candidate path to the positive and negative ideal solutions. The candidate path with the highest overall score is selected as the final planned path.