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, screening candidate paths, and using swarm intelligence optimization algorithm and adaptive non-dominated sorting, the problem of insufficient path planning efficiency in a greenhouse environment is solved, and efficient and accurate path planning is achieved to meet multi-task requirements.
Patent Information
- Application Number
- CN202510862494.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2045-06-25
AI Technical Summary
Existing path planning methods are inefficient in greenhouse environments, easily produce invalid paths, and cannot flexibly respond to multi-task requirements. In addition, traditional multi-objective optimization algorithms are inefficient when processing large-scale populations, and the mismatch between the encoding method and the task decision sequence leads to illegal paths.
A path planning method based on multi-objective optimization is adopted. By generating a two-dimensional grid map, marking task points, screening candidate paths, calculating the total path length and turning angles, and using a swarm intelligence optimization algorithm to screen the optimal solution set, a modified congestion distance based on adaptive non-dominated sorting and local density factor is combined to perform partial matching crossover and inversion mutation operations to ensure the legitimacy and integrity of the path.
The efficiency and stability of greenhouse agricultural robot path planning have been improved, and it can quickly handle large-scale populations, meet real-time planning requirements, ensure that robots can operate efficiently and accurately in complex environments, reduce calculation time, and avoid invalid path problems.
Smart Images

Figure CN120702494A_ABST
Abstract
Description
Technical Field
[0001] The present invention 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 Art
[0002] Greenhouse agriculture, a key component of modern agriculture, increases crop yields and efficiency through precise control of environmental conditions. With the rapid expansion of greenhouse areas worldwide, agricultural robots are increasingly used in greenhouses, undertaking tasks such as spraying, inspection, and harvesting. However, the complex greenhouse environment, characterized by dense steel frames, irrigation facilities, and densely planted crops, poses challenges for robot path planning. Robots must not only frequently avoid obstacles but also efficiently handle diverse task requirements, such as selective spraying and prioritizing urgent tasks.
[0003] Traditional path planning methods, such as full-coverage path planning, can traverse the entire greenhouse area, but they suffer from path redundancy and resource waste, and are unable to flexibly respond to multi-task requirements. Furthermore, traditional single-objective optimization methods focus solely on the shortest path, ignoring the impact of turning angles on energy consumption and mechanical wear. While existing multi-objective optimization algorithms can optimize paths to a certain extent, they still have shortcomings in greenhouse environments. Traditional non-dominated sorting methods are inefficient when processing large populations and cannot meet the requirements of real-time planning in greenhouse environments. Furthermore, due to the mismatch between the encoding method and the permutation characteristics of greenhouse task decision sequences, crossover and mutation operations can easily disrupt the parent path, leading to multi-objective optimization algorithms being prone to generating invalid paths. Summary of the Invention
[0004] In view of the above analysis, an embodiment of the present invention aims 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 existing complex environments.
[0005] In one aspect, an embodiment of the present invention provides a greenhouse agricultural robot path planning method based on multi-objective optimization, the method comprising:
[0006] Scan the greenhouse to generate a two-dimensional grid map and divide it into free grid and obstacle grid, and mark the task points on the free grid;
[0007] Arrange and encode all task points to generate multiple paths, and select candidate paths that meet greenhouse constraints;
[0008] Calculate the total path length and total turning angle of each candidate path;
[0009] Taking minimizing the total path length and minimizing the total turning angle as the dual objective function, the optimal solution set is screened out through the swarm intelligence optimization algorithm;
[0010] The candidate path with the best comprehensive performance is selected from the optimal solution set as the final planning path.
[0011] As a further improvement of the present application, minimizing the total path length and minimizing the total turning angle as a dual objective function, and screening out the optimal solution set through a swarm intelligence optimization algorithm include:
[0012] A population is constructed based on candidate paths. Each individual in the population is a candidate path. The following steps are performed on the population in a loop until the termination condition is met:
[0013] Perform non-dominated sorting on all individuals in the population to divide the frontier level;
[0014] Calculate the improved crowding distance of individuals at each frontier level in the target space;
[0015] Select excellent individuals to enter the next generation population according to the frontier level and the improved crowding distance;
[0016] Select parent candidate paths from the next generation population through a tournament selection mechanism;
[0017] Perform partial matching crossover and inversion mutation operations on the parent candidate path to generate the child candidate path;
[0018] Merge the parent candidate path and the child candidate path to form a new population;
[0019] After the termination condition is met, the loop stops and the new population obtained from the last loop is used as the final population;
[0020] Extract the optimal solution set from the final population.
[0021] As a further improvement of the present application, performing non-dominated sorting on all individuals in the population to divide the frontier level includes:
[0022] Compare dominance relationships among individuals in a population;
[0023] Based on the dominance relationship, non-dominated sorting is performed to divide the frontier levels of individuals in the population; wherein the first frontier level includes all non-dominated solutions, and the non-dominated solutions are individuals that are not dominated by any other individuals; the nth frontier level includes solutions dominated by the n-1th frontier level, n = 2, 3...N.
[0024] As a further improvement of the present application, calculating the improved crowding distance of each frontier level individual in the target space includes:
[0025] For each individual, calculate the difference in target value between it and the previous adjacent individual and the next adjacent individual on each target function, where the adjacent individuals are directly adjacent individuals in the same frontier level after being sorted in ascending or descending order of target function values;
[0026] Calculate the maximum and minimum values of each objective function at the current frontier level;
[0027] Add the target value differences between each target function and the previous adjacent individual and the next adjacent individual to obtain the sum of the target value differences in each target direction;
[0028] Normalizing the sum of the target value differences based on the maximum and minimum values of the target function at the current frontier level to generate a normalized difference value;
[0029] constructing a local density factor based on the normalized difference value;
[0030] Based on the local density factor, the difference between each objective function and the adjacent individual target value, and the maximum and minimum values of each objective function at the current frontier level, the improved crowding distance of the individuals at the current frontier level in the target space is calculated.
[0031] As a further improvement of the present application, the method for constructing the local density factor includes:
[0032] The normalized difference value is mapped to a local density factor through an exponential function, which is inversely proportional to the sparsity of the candidate path in the target space.
[0033] As a further improvement of the present application, the improved congestion distance is shown in the following formula:
[0034]
[0035] Among them, CD i is the improved crowding distance of individual i, M is the number of objective functions, m is the number of objective functions, is the difference between the target value of individual i and the next adjacent individual on the mth objective function, is the difference between the target value of individual i and the previous adjacent individual on the mth target function; f max (m) is the maximum value of the mth objective function at the current frontier level, f max (m) is the minimum value of the mth objective function at the current frontier level, DF i is the local density factor.
[0036] As a further improvement of the present application, the local density factor is shown in the following formula:
[0037]
[0038] in, is the difference between the target value of individual i and the previous adjacent individual on the mth objective function, is the difference in target value between individual i and the next adjacent individual on the mth target function.
[0039] As a further improvement of the present application, selecting excellent individuals to enter the next generation population according to the frontier level and the improved crowding distance includes:
[0040] Select outstanding individuals in order from low to high frontier levels to enter the next generation population;
[0041] For individuals at the same frontier level, individuals with a larger improved crowding distance are preferentially selected to enter 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, non-dominated sorting is performed based on dominance relationships, and the frontier levels of individuals in the population are divided into the following:
[0043] When the population size is less than or equal to the preset size threshold, the ENS-SS method is selected for non-dominated sorting;
[0044] When the population size is larger than the preset size threshold, the T-ENS method is selected for non-dominated sorting.
[0045] As a further improvement of the present application, selecting a candidate path with the best comprehensive performance from the optimal solution set as the final planned path includes:
[0046] Construct a decision matrix for each candidate path in the optimal solution set, and obtain a standardized matrix after normalization.
[0047] 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;
[0048] determining positive and negative ideal solutions in the weighted normalized matrix;
[0049] Calculate the distance of each candidate path to the positive ideal solution and the negative ideal solution;
[0050] 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;
[0051] The candidate path with the highest comprehensive score is selected as the final planned path.
[0052] Compared with the prior art, the present invention can achieve at least one of the following beneficial effects:
[0053] 1. The present invention adopts total path length and total turning angle as dual objective functions, combines adaptive non-dominated sorting strategy and improved crowding distance calculation of local density factor, effectively improves the efficiency of greenhouse agricultural robot path planning in complex environments, can quickly process large-scale populations, reduce calculation time, meet the requirements of real-time planning in greenhouse environments, thereby ensuring that the robot can respond to multi-task requirements in a timely manner and improve overall operation efficiency.
[0054] 2. The present invention ensures the legitimacy and integrity of the generated path through the arrangement coding method and partial matching crossover and inversion mutation operations, and can more accurately screen out high-quality paths that meet the constraints of the greenhouse environment. It effectively avoids the invalid path problem caused by the mismatch between the coding method 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 a complex greenhouse environment.
[0055] In the present invention, the above-mentioned technical solutions can be combined with each other to achieve more preferred combinations. Other features and advantages of the present invention will be described in the following description, and some advantages will become apparent from the description or be learned through practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the contents particularly pointed out in the description and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] The accompanying drawings are only used for the purpose of illustrating specific embodiments and are not to be considered as limiting the present invention. Throughout the drawings, the same reference symbols denote the same components.
[0057] Figure 1 A schematic flow chart of a greenhouse agricultural robot path planning method based on multi-objective optimization provided by one embodiment of the present invention;
[0058] Figure 2 A schematic diagram of a process for selecting an optimal solution set through a swarm intelligence optimization algorithm according to an embodiment of the present invention. DETAILED DESCRIPTION
[0059] The preferred embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, and are not used to limit the scope of the present invention.
[0060] A specific embodiment of the present invention discloses a greenhouse agricultural robot path planning method based on multi-objective optimization, such as Figure 1 The method includes:
[0061] S1. Scan the greenhouse to generate a two-dimensional grid map and divide it into a free grid and an obstacle grid, and mark the task points on the free grid.
[0062] A mobile robot equipped with a 2D lidar, combined with odometry and SLAM technology, scans the greenhouse environment, acquiring environmental point cloud data and the robot's own position information. This environmental data is converted into a 2D grid map, with each grid representing a small area of the environment. Its status is determined based on the lidar data. If there is no obstacle within a grid, meaning the reflected signal is weak or the distance is greater than a safety threshold, the grid is marked as free, typically denoted by 0. If there is an obstacle, meaning the reflected signal is strong and the distance is less than the safety threshold, the grid is marked as obstructed, typically denoted by 1.
[0063] On the constructed grid map, locations that the robot needs to visit are marked as task points on the free grid, based on specific greenhouse tasks, such as plant inspection and pesticide spraying. Task points are represented as specific coordinates on the grid map. The greenhouse can be divided into planting areas, equipment areas, and access areas. The planting areas are where the robot performs tasks, including short and long ridge planting areas; the equipment areas are used to store greenhouse environmental control equipment, tools, and supplies; and the access areas are the passageways connecting different areas of the greenhouse and serve as the robot's movement paths. Task points can be randomly generated to ensure that they meet the robot's reachable constraints. The number and distribution density of task points can be adjusted according to specific needs.
[0064] S2. Arrange and encode all task points to generate multiple paths, and select candidate paths that meet greenhouse constraints.
[0065] The path is generated by permutation coding. Each path represents a different order for the robot to visit all the task points. 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 the task point number). The 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 in the greenhouse (numbered 1 to 12), the possible encoding of an individual is <p3,p1,p5,p 12 ,p8,p6,p2,p 10 ,p4,p9,p7,p 11 > indicates that the robot will sequentially visit task point 3, task point 1, task point 5, and so on, until all task points have been visited. The task decision sequence for each path is randomly generated. The specific operation is to first create a list containing all task point numbers, then randomly shuffle the list to obtain a random permutation, which serves as the code for each individual. Repeating this process N times will generate N paths.
[0066] Each generated path is checked for legality to ensure it satisfies the greenhouse constraints. This includes checking for obstacle conflicts, accessibility to task points, and path completeness. Individuals that satisfy the greenhouse constraints are retained as candidate paths.
[0067] Specifically, checking for obstacle conflicts involves checking whether an individual path conflicts with obstacles based on the greenhouse grid map. This is done by verifying that the path passes through each task point, and that each task point can only be passed through once. If a conflict exists, the individual is regenerated. Checking task point reachability ensures that every task point in the path is reachable by the robot, that is, verifying that each task point in the path lies on a free grid. Checking path completeness ensures that the path covers all task points, with no missed or duplicated task points.
[0068] S3. Calculate the total path length and 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. The cost function is f(n)=g(n)+h(n), where g(n) is the actual moving 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, if 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 path sequence is <p2, p3, p1>, and the total path length L = 4.1 meters. The total shortest path between the multiple task points is taken as the total path length.
[0070] To calculate the total turning angle, for each point in the path's task point sequence, the specific coordinates of the current, previous, and next task points are first obtained. The direction vector is then calculated based on the coordinate difference. The forward vector is calculated by subtracting the corresponding coordinates of the previous task point from the horizontal and vertical coordinates of the current task point, respectively. The backward vector is calculated by subtracting the corresponding coordinates of the current task point from the horizontal and vertical coordinates of the next task point. The dot product is then obtained by multiplying the horizontal and vertical coordinates of the forward and backward vectors, respectively, and summing them. The moduli of the two vectors are then calculated. Finally, the cosine of the angle is obtained by dividing the dot product by the product of the two moduli, representing the turning angle of the path.
[0071] Therefore, for the path <p1,p2,...,p n >, the total turning angle of the path is:
[0072] Among them, v i For mobile robots from p i-1 to p i The direction vector, that is, the forward vector, vi+1 For mobile robots from p i to p i+1 The direction vector, that is, the backward vector, ||v i || and ||v i+1 || is the vector v i and v i+1 The modulus of the vector 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. Minimizing the total path length and minimizing the total turning angle are used as dual objective functions, and the optimal solution set is screened out through the swarm intelligence optimization algorithm.
[0074] A swarm intelligence optimization algorithm is used to evaluate and screen candidate paths. By simulating the natural evolutionary process, individuals in the population (i.e., candidate paths) are selected, crossover, and mutated to gradually evolve a more optimal solution. In each evolutionary generation, individuals are evaluated based on a dual objective function, and the best individuals are selected to enter the next generation. Crossover and mutation operations are also used to generate new individuals, increasing the diversity of the population. Iterations continue until a preset termination condition is met: reaching the maximum number of iterations or the population converges.
[0075] like Figure 2 As shown, specifically, the optimal solution set screened out by the swarm intelligence optimization algorithm includes:
[0076] A population is constructed based on candidate paths. Each individual in the population is a candidate path. The following steps are performed on the population in a loop until the termination condition is met:
[0077] S41. Perform non-dominated sorting on all individuals in the population to divide the frontier level.
[0078] Performing non-dominated sorting on all individuals in the population to divide the frontier level includes:
[0079] Compare dominance relationships among individuals in a population;
[0080] Based on the dominance relationship, non-dominated sorting is performed to divide the frontier levels of individuals in the population; wherein the first frontier level includes all non-dominated solutions, and the non-dominated solutions are individuals that are not dominated by any other individuals; the nth frontier level includes solutions dominated by the n-1th frontier level, n = 2, 3...N.
[0081] For any two individuals A and B in a population, if A is not inferior to B on all objective functions and is superior to B on at least one objective function, then A is said to dominate B. Traverse all individuals in the population and find all those that are not dominated by any other individual. These individuals constitute the first frontier level. After removing individuals assigned to the first frontier level from the population, repeat the above process for the remaining individuals to find the next frontier level. Continue this process until all individuals have been assigned to the corresponding frontier level. The nth frontier level contains solutions dominated by the n-1th frontier level.
[0082] Based on the dominance relationship, the frontier level of individuals in the population is divided into:
[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 larger than the preset size threshold, the T-ENS method is selected for non-dominated sorting.
[0085] An adaptive non-dominated sorting strategy is employed to flexibly select the appropriate sorting method to improve computational 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. This involves a double loop traversing all individuals in the population and comparing their dominance relationships one by one. Each individual is sequentially checked to see if it is dominated by another, and a non-dominated front is constructed based on this. This method ensures high sorting accuracy when computational resources are sufficient. For larger populations (i.e., the number of individuals N > 200), the T-ENS (tree-structured) non-dominated sorting method is employed. By constructing a dominance relationship tree, hierarchical indexing and hierarchical traversal are employed to efficiently screen for non-dominated solutions. During the construction process, individuals are sequentially inserted into the tree structure according to their target values. Each new individual only needs to be compared with a subset of existing individuals, avoiding global traversal and reducing unnecessary dominance judgments. This significantly improves computational efficiency when processing large populations.
[0086] S42. Calculate the improved crowding distance of individuals at each frontier level in the target space.
[0087] Calculating the improved crowding distance of individuals at each frontier level in the target space includes:
[0088] S421. For each individual, calculate the target value difference between it and the previous adjacent individual and the target value difference between it and the next adjacent individual on each objective function, where the adjacent individuals are directly adjacent individuals in the same frontier level after being sorted in ascending or descending order of objective function values;
[0089] S422, calculating the maximum and minimum values of each objective function at the current frontier level;
[0090] S423, adding the target value differences between each target function and the previous adjacent individual and the next adjacent individual to obtain the sum of the target value differences in each target direction;
[0091] S424: normalizing the sum of the target value differences based on the maximum and minimum values of the target function at the current frontier level to generate a normalized difference value;
[0092] S425, constructing a local density factor based on the normalized difference value;
[0093] S426. Calculate the improved crowding distance of individuals at the current frontier level in the target space based on the local density factor, the difference between each objective function and the adjacent individual's objective value, and the maximum and minimum values of each objective function at the current frontier level.
[0094] The improved congestion distance is shown in the following formula:
[0095]
[0096] Among them, CD i is the improved crowding distance of individual i, M is the number of objective functions, m is the number of objective functions, is the difference between the target value of individual i and the next adjacent individual on the mth objective function, is the difference between the target value of individual i and the previous adjacent individual on the mth target function; f max (m) is the maximum value of the mth objective function at the current frontier level, f max (m) is the minimum value of the mth objective function at the current frontier level, DF i is the local density factor.
[0097] The improved crowding distance of each individual in multi-objective optimization is calculated. By processing the individuals within each frontier, the crowding degree of each individual in the target space is calculated. The traditional improved crowding distance formula is based only on the target value difference between adjacent individuals and does not consider the impact of obstacle distribution on path density in a greenhouse environment, resulting in an uneven distribution of the solution set in the target space. Compared with the traditional improved crowding distance calculation method, this application introduces a local density factor when calculating the improved crowding distance. The sparsity of adjacent individuals in the target space is quantified by an exponential function, and the improved crowding distance weight can be dynamically adjusted.
[0098] The method for constructing the local density factor includes:
[0099] The normalized difference value is mapped to a local density factor through an exponential function, which is inversely proportional to the sparsity of the candidate path in the target space.
[0100] The local density factor is shown in the following formula:
[0101]
[0102] in, is the difference between the target value of individual i and the previous adjacent individual on the mth objective function, is the difference in target value between individual i and the next adjacent individual on the mth target function.
[0103] The introduction of a local density factor appropriately reduces the improved crowding distance of individuals in dense areas, while amplifying it in sparse areas, thereby strengthening the selection bias toward sparse areas. Furthermore, the improved crowding distance of individuals at the edge of the population is set to infinity to prioritize the retention of extreme solutions. Individuals are sorted based on their improved crowding distance, with those with the largest improved crowding distance being prioritized for the next generation.
[0104] S43. Select outstanding individuals to enter the next generation population based on the frontier level and the improved crowding distance.
[0105] Specifically, selecting excellent individuals to enter the next generation population according to the frontier level and the improved crowding distance includes:
[0106] Select outstanding individuals in order from low to high frontier levels to enter the next generation population;
[0107] For individuals at the same frontier level, individuals with a larger improved crowding distance are preferentially selected to enter the next generation population; until the number of individuals in the next generation population reaches the preset population size.
[0108] The selection process is based on the individual's frontier level, starting from the lowest frontier level, and selecting individuals to enter the next generation of the population. If individuals at the same frontier level are encountered, the individual with the larger improvement crowding distance is selected first. The selection process continues until the number of individuals in the next generation of the population reaches the preset population size.
[0109] S44. Select parent candidate paths from the next generation population through a tournament selection mechanism.
[0110] The natural selection process is simulated by tournament selection, and the fitness between individuals is compared to select better individuals as parents to generate the next generation of individuals. The fitness value is an indicator for quantitatively evaluating the quality of an individual in the optimization goal. In the present invention, it is used to measure the performance of the candidate path in terms of the two goals of total path length and total turning angle. The better the fitness value, the more consistent the individual is with the optimization goal. The fitness value is converted into a column vector, and then all fitness matrices are merged. The duplicate fitness values are removed by deduplication, and the fitness of each individual is sorted to obtain the ranking of each individual. Initialize the selected parent individuals, perform N K-tournament selections, and randomly select K individuals from the population to participate in the competition each time. The fitness of the selected K individuals is ranked, and the individual with the best ranking, that is, the smallest fitness, is selected. The selected individuals are added to the selected individual list to eventually form the parent individual list.
[0111] S45. Perform a partial matching crossover operation and a reverse mutation operation on the parent candidate path to generate a 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 result in a poor solution. The present invention performs a partial matching crossover operation and an inversion mutation operation to generate a child candidate path.
[0113] When performing a partial matching crossover, the relevant parameters are first read, including the two parent solutions, Parent1 and Parent2, and the crossover probability proC. Each solution represents a path containing multiple task points. The parent individuals are traversed and a crossover operation is performed according to the crossover probability proC. A partial matching crossover (PMX) is designed for sequence encoding. Two crossover points, cx_start and cx_end, are randomly selected to determine the crossover interval. The genes (pathway nodes) of Parent1 and Parent2 within the crossover interval are swapped, while ensuring the legitimacy of the path order and avoiding node duplication. When performing a reverse mutation operation, reverse mutation is used, selecting offspring individuals for mutation with a certain probability (default setting is 0.1). A random mutation interval [startIdx, endIdx] is selected, and the order of the path nodes within the selected interval is reversed, adjusting the individual structure and increasing population diversity.
[0114] S46: Merge the parent candidate path and the child candidate path to form a new population.
[0115] The parent population (size N) is merged with the offspring population (size N) to form an extended population containing 2N individuals. This extended population contains high-quality individuals from the previous generation, as well as new individuals generated through crossover and mutation.
[0116] S47. After the termination condition is met, the loop is stopped and the new population obtained from the last loop is used as the final population.
[0117] When the preset number of iterations is reached or the population converges, the loop stops and the new population obtained from the last loop is used as the final population.
[0118] S48. Extract the optimal solution set from the final population.
[0119] The optimal solution set is extracted from the final population, which represents the solution set consisting 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 the entropy weight TOPSIS method 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 normalization.
[0122] A decision matrix is constructed for each candidate path in the optimal solution set, and normalization is performed to obtain a standardized matrix. When constructing the decision matrix, the values of each candidate path on each objective function are used as matrix elements. Normalization converts these values to a uniform scale. Common methods include linear normalization and vector normalization to eliminate dimension and magnitude differences. The normalization process is shown in the following formula:
[0123]
[0124] Transform the data to the interval [0,1], 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 normalization matrix based on the weight of each objective function.
[0126] For each objective function j, its information entropy is calculated as follows;
[0127]
[0128] Among them, p ijis the ratio of the value of the i-th candidate path on the j-th objective function in the normalized matrix to the sum of the values of all candidate paths on the j-th objective function, and ò is a very small constant used to avoid the calculation of ln(0).
[0129]
[0130] is the value of the i-th candidate path on the j-th objective function in 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] The larger the weight, the more important the objective function is, where n is the total number of objective functions. The weighted standardized decision matrix is obtained by multiplying each standardized data in the decision matrix with the corresponding weight.
[0134] S53. Determine positive ideal solutions and negative ideal solutions in the weighted normalization matrix.
[0135] The positive ideal solution is the optimal value (minimum value) of each objective function in the weighted normalized matrix, while the negative ideal solution is the worst value (maximum value) of each objective function in the weighted normalized matrix.
[0136] The positive ideal solution is shown below;
[0137]
[0138] The negative ideal solution is shown below;
[0139]
[0140] in, is the positive ideal solution of the j-th objective function, is the negative ideal solution of the j-th objective function, is the weighted normalized 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 ideal solution and the negative ideal solution using the Euclidean distance formula, as shown below;
[0143]
[0144] is the distance from the i-th candidate path to the positive ideal solution, is the distance from the i-th candidate path to the negative ideal solution.
[0145] S55. Calculate a comprehensive score of each candidate path based on the distance from 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 is the comprehensive score of the candidate paths. A higher score indicates that the solution is closer to the ideal solution and farther away from the negative ideal solution. The solution with the highest score is selected as the optimal solution, that is, the solution with the highest score is selected as the final planning path.
[0149] The above embodiments of the present invention have at least the following beneficial effects:
[0150] The present invention adopts total path length and total turning angle as dual objective functions, combines adaptive non-dominated sorting strategy and improved crowding distance calculation of local density factor, effectively improves the efficiency of greenhouse agricultural robot path planning in complex environments, can quickly process large-scale populations, reduce calculation time, and meet the requirements of real-time planning in greenhouse environments, thereby ensuring that the robot can respond to multi-task requirements in a timely manner and improve overall operation efficiency; the present invention ensures the legitimacy and integrity of the generated path through arrangement coding method and partial matching crossover and inversion mutation operations, can more accurately screen out high-quality paths that meet greenhouse environmental constraints, effectively avoids the invalid path problem caused by the mismatch between the coding method and the greenhouse task decision sequence in traditional methods, improves the stability and reliability of path planning, and ensures the efficient and accurate operation of the robot in a complex greenhouse environment.
[0151] Those skilled in the art will appreciate that all or part of the process steps of the above-described embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, such as a magnetic disk, an optical disk, a read-only memory, or a random access memory.
[0152] The above description is only a preferred specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by any technician familiar with this technical field within the technical scope disclosed by the present invention should be covered by the scope of protection of the present invention.
Claims
1. A greenhouse agricultural robot path planning method based on multi-objective optimization, characterized in that: The method comprises: Scan the greenhouse to generate a two-dimensional grid map and divide it into free grid and obstacle grid, and mark the task points on the free grid; Arrange and encode all task points to generate multiple paths, and select candidate paths that meet greenhouse constraints; Calculate the total path length and total turning angle of each candidate path; Taking minimizing the total path length and minimizing the total turning angle as the dual objective function, the optimal solution set is screened out through the swarm intelligence optimization algorithm; The candidate path with the best comprehensive performance is selected from the optimal solution set as the final planning path.
2. The method according to claim 1, characterized in that The optimal solution set calculated by the swarm intelligence optimization algorithm using minimizing the total path length and minimizing the total turning angle as a dual objective function includes: A population is constructed based on candidate paths. Each individual in the population is a candidate path. The following steps are performed on the population in a loop until the termination condition is met: Perform non-dominated sorting on all individuals in the population to divide the frontier level; Calculate the improved crowding distance of individuals at each frontier level in the target space; Select excellent individuals to enter the next generation population according to the frontier level and the improved crowding distance; Select parent candidate paths from the next generation population through a tournament selection mechanism; Perform partial matching crossover and inversion mutation operations on the parent candidate path to generate the child candidate path; Merge the parent candidate path and the child candidate path to form a new population; After the termination condition is met, the loop stops and the new population obtained from the last loop is used as the final population; Extract the optimal solution set from the final population.
3. The method according to claim 2, characterized in that Performing non-dominated sorting on all individuals in the population to divide the frontier level includes: Compare dominance relationships among individuals in a population; Based on the dominance relationship, non-dominated sorting is performed to divide the frontier levels of individuals in the population; wherein the first frontier level includes all non-dominated solutions, and the non-dominated solutions are individuals that are not dominated by any other individuals; the nth frontier level includes solutions dominated by the n-1th frontier level, n = 2, 3...N.
4. The method according to claim 2, characterized in that Calculating the improved crowding distance of individuals at each frontier level in the target space includes: For each individual, calculate the difference in target value between it and the previous adjacent individual and the next adjacent individual on each target function, where the adjacent individuals are directly adjacent individuals in the same frontier level after being sorted in ascending or descending order of target function values; Calculate the maximum and minimum values of each objective function at the current frontier level; Add the target value differences between each target function and the previous adjacent individual and the next adjacent individual to obtain the sum of the target value differences in each target direction; Normalizing the sum of the target value differences based on the maximum and minimum values of the target function at the current frontier level to generate a normalized difference value; constructing a local density factor based on the normalized difference value; Based on the local density factor, the difference between each objective function and the adjacent individual target value, and the maximum and minimum values of each objective function at the current frontier level, the improved crowding distance of the individuals at the current frontier level in the target space is calculated.
5. The method according to claim 4, characterized in that The method for constructing the local density factor includes: The normalized difference value is mapped to a local density factor through an exponential function, which is inversely proportional to the sparsity of the candidate path in the target space.
6. The method according to claim 5, characterized in that The improved congestion distance is shown in the following formula: Among them, CD i is the improved crowding distance of individual i, M is the number of objective functions, m is the number of objective functions, is the difference between the target value of individual i and the next adjacent individual on the mth objective function, is the difference between the target value of individual i and the previous adjacent individual on the mth target function; f max (m) is the maximum value of the mth objective function at the current frontier level, f max (m) is the minimum value of the mth objective function at the current frontier level, DF i is the local density factor.
7. The method according to claim 6, characterized in that The local density factor is shown in the following formula: in, is the difference between the target value of individual i and the previous adjacent individual on the mth objective function, is the difference in target value between individual i and the next adjacent individual on the mth target function.
8. The method according to claim 2, characterized in that The selection of excellent individuals into the next generation population based on the frontier level and improved crowding distance includes: Select outstanding individuals in order from low to high frontier levels to enter the next generation population; For individuals at the same frontier level, individuals with a larger improved crowding distance are preferentially selected to enter the next generation population; until the number of individuals in the next generation population reaches the preset population size.
9. The method according to claim 2, characterized in that Based on the dominance relationship, the frontier level of individuals in the population is divided into: When the population size is less than or equal to the preset size threshold, the ENS-SS method is selected for non-dominated sorting; When the population size is larger than the preset size threshold, the T-ENS method is selected for non-dominated sorting.
10. The method according to claim 1, characterized in that Selecting the candidate path with the best comprehensive performance from the optimal solution set as the final planning path includes: Construct a decision matrix for each candidate path in the optimal solution set, and obtain a standardized matrix after normalization. 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; determining positive and negative ideal solutions in the weighted normalized matrix; Calculate the distance of each candidate path to the positive ideal solution and the negative ideal solution; 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; The candidate path with the highest comprehensive score is selected as the final planned path.
Citation Information
Patent Citations
Multi-agent multi-target task allocation optimization method fusing global path planning
CN117709648A
NSGA-II algorithm-based intensive storage network vehicle path crowd target optimization method
CN119647715A
Indoor nuclear environment multi-target-point inspection path planning method for mobile robot
CN119665979A
Method, system and computer program product for computing routes
EP3546890A1
Real-time mission adaptable route planner
US6259988B1