A working path planning method and system for grain surface leveling equipment
By using a particle swarm optimization algorithm improved by genetic algorithm and a fast expanding random tree algorithm improved by artificial potential field method, the problem of time-consuming and labor-intensive grain pile and grain surface leveling in traditional grain storage has been solved, realizing intelligent and efficient operation of grain surface leveling equipment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ACAD OF NAT FOOD & STRATEGIC RESERVES ADMINISTRATION
- Filing Date
- 2024-02-22
- Publication Date
- 2026-07-03
Smart Images

Figure CN118123817B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of control methods in grain storage. More specifically, it relates to a working path planning method and system for grain surface leveling equipment. Background Technology
[0002] After grain is conveyed into the warehouse, it naturally scatters and piles up into heaps of varying sizes. Mechanical equipment or manual labor is typically required to level these heaps to facilitate quantity and quality management during storage, the deployment of grain condition monitoring facilities, and the application of storage technologies and processes. Therefore, the final step after grain is received and stored is leveling the grain heaps and surface. Traditional methods include manual leveling upon entering the warehouse and manual operation of machinery to level the grain heaps and surface. Given that the average capacity of grain storage warehouses in my country is 5,000 tons, both methods require significant manpower and time, leading to delays in leveling and safety hazards such as people being buried in the grain heaps. Summary of the Invention
[0003] The purpose of this invention is to provide a working path planning method and system for grain surface leveling equipment, so as to solve at least one of the problems existing in the prior art.
[0004] To achieve the above objectives, the present invention adopts the following technical solution:
[0005] The first aspect of the present invention provides a working path planning method for a grain surface leveling device, the method comprising:
[0006] A map is constructed based on the location information of grain piles and grain pits in the granary, and parameters are set according to the preset anti-collision distance.
[0007] Global path planning for the grain surface leveling equipment is performed based on the map and using a particle swarm optimization algorithm improved from a genetic algorithm.
[0008] Based on the results of the global path planning, and using the tabular operation method, the local path planning for the grain leveling equipment is carried out from the grain pile to the grain pit.
[0009] Based on the results of the local path planning, and using the improved fast extended random tree algorithm with the artificial potential field method and the set parameters, obstacle avoidance optimization is performed on the grain surface leveling equipment.
[0010] Optionally, the step of constructing a map based on the location information of grain piles and grain pits within the grain warehouse includes...
[0011] Based on the morphological characteristics of each grain pile, determine the position coordinates of the main valley peak and the distance from the sub-valley peak to the bottom of the sub-valley in each grain pile, and calculate the volume of the protruding grain pile of all valley peaks and the volume of the concave grain pile of the sub-valley bottom.
[0012] A map is constructed based on the location coordinates of the main grain peak in each grain pile.
[0013] Optionally, the parameter setting based on the preset anti-collision distance includes
[0014] Based on the preset anti-collision distance, the target bias probability, repulsion gain coefficient, gravity gain coefficient, repulsion range parameter, and allowable error parameter in the artificial potential field algorithm are set.
[0015] Optionally, the step of performing global path planning for the grain surface leveling equipment based on the map and using a particle swarm optimization algorithm improved from a genetic algorithm includes...
[0016] Initialize the population parameters in the particle swarm optimization algorithm;
[0017] The fitness function of each initialized particle is calculated using the particle swarm optimization algorithm.
[0018] Update the velocity and position of each particle, calculate the updated fitness function value of each particle, and update the local first prediction value of each particle and the global first prediction value of the particle swarm based on the updated fitness function value of each particle.
[0019] Genetic algorithms are used to perform crossover and mutation operations on particles whose fitness function values exceed a preset value.
[0020] Optionally, the step of calculating the fitness function for each initialized particle using the particle swarm optimization algorithm includes...
[0021] Obtain the number of grain piles and the number of particles in the particle swarm;
[0022] The fitness function value of the position data of each particle is calculated using the number of grain piles as the spatial dimension.
[0023] Optionally, the step of using a genetic algorithm to perform crossover and mutation operations on particles whose fitness function values exceed a preset value includes...
[0024] Select particles whose fitness function value exceeds a preset value as the parent of the crossover operation, and perform multi-point crossover operation on the parent.
[0025] The system determines whether to mutate the particles based on the preset mutation probability. If necessary, it randomly selects multiple nodes in the particles for exchange and selects particles with fitness function values lower than the preset value to save to the next generation.
[0026] When the preset number of iterations is reached, particles with fitness function values lower than the preset value are output.
[0027] Optionally, the step of performing local path planning from grain pile to grain pit leveling for the grain surface leveling equipment based on the results of the global path planning and using the tabular operation method includes...
[0028] Establish a first matrix including the distances between multiple sub-valley peaks and multiple sub-valley bottoms, as well as the volumes of the protruding grain piles of multiple sub-valley peaks and the volumes of the concave grain piles of multiple sub-valley bottoms, and establish a mathematical model of the number of times and routes of grain leveling from multiple sub-valley peaks to multiple sub-valley bottoms.
[0029] Define the elements in the first matrix as input variables, and use the northwest corner method to solve for the initial basis matrix;
[0030] The initial basis matrix is tested using the potential method to obtain the test number matrix, and the initial basis is used to determine whether it is the first solution.
[0031] If the initial basis is not the first solution, the initial basis matrix is adjusted using the closed-loop method to obtain the adjusted initial basis matrix, and the adjusted test matrix is calculated based on the adjusted initial basis matrix. Finally, the adjusted initial basis is used to determine whether the adjusted initial basis is the first solution.
[0032] Repeat the adjustment until the adjusted initial basis is the first solution.
[0033] Optionally, the obstacle avoidance optimization of the grain surface leveling equipment based on the results of the local path planning and using the improved fast expanding random tree algorithm with the artificial potential field method set with the parameters includes:
[0034] The space where the local path planning is located is initialized, and the initial point, target point, number of random tree nodes, and step size between random tree nodes are defined;
[0035] A random point is randomly generated in the space to obtain a random point, and the point closest to the random point is found in the point set of the known random tree. The known point is intercepted in the straight line direction from the nearest point to the random point with the step size to obtain the intercept point.
[0036] A target gravity function is introduced for each of the random tree nodes, and the position of the target point is used as heuristic information to guide the random tree to grow toward the target point based on the position of the target point;
[0037] Select a first parent node in the neighborhood of the random point, and determine whether there is an obstacle between the nearest point and the cut-off point. If there is an obstacle, discard the random point and add the cut-off point to the random tree.
[0038] Optionally, selecting the first parent node in the neighborhood of the random point includes
[0039] Connect the random point to the nearest point;
[0040] Using the random point as the center and n times the step size as the radius, a set of potential parent nodes is obtained by searching on the random tree, where n is a positive integer;
[0041] Calculate the cost of the original path from the initial point to the nearest point to the random point;
[0042] Calculate the cost of the current path between the current potential parent node and the random point, and determine whether the cost of the current path is less than the cost of the original path. If it is less, perform collision detection. If it is not less, calculate the cost of the next path between the next potential parent node and the random point.
[0043] Determine whether the collision detection is successful. If it fails, the current potential parent node is not the first parent node, and calculate the cost of the next path between the next potential parent node and the random point. If it succeeds, the current potential parent node is the first parent node, and delete the path between the random point and the nearest point, and add the path from the first parent node to the random point.
[0044] A second aspect of the present invention provides a working path planning system for a grain surface leveling device, the system comprising:
[0045] The map building module is used to build a map based on the location information of grain piles and grain pits in the granary, and to set parameters according to the preset anti-collision distance.
[0046] A global path planning module is used to perform global path planning for the grain surface leveling equipment based on the map and using a particle swarm algorithm improved from a genetic algorithm.
[0047] The local path planning module is used to perform local path planning for the grain surface leveling equipment based on the results of the global path planning and using the tabular operation method.
[0048] The obstacle avoidance optimization module is used to optimize the obstacle avoidance of the grain surface leveling equipment based on the results of the local path planning and using a fast extended random tree algorithm improved by the artificial potential field method with the parameters set.
[0049] The beneficial effects of this invention are as follows:
[0050] This invention provides a working path planning method for grain surface leveling equipment, which enables intelligent and efficient grain leveling operations, reduces labor costs, and improves work efficiency. Attached Figure Description
[0051] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
[0052] Figure 1 The flowchart illustrates a working path planning method for a grain surface leveling device provided in an embodiment of the present invention.
[0053] Figure 2 This diagram illustrates the shortest optimized distance in the working path planning method for grain surface leveling equipment provided in an embodiment of the present invention.
[0054] Figure 3 This diagram illustrates a comparison of the shortest distance and average distance for each generation in the working path planning method for grain surface leveling equipment provided in an embodiment of the present invention. Detailed Implementation
[0055] To more clearly illustrate the present invention, the following description, in conjunction with embodiments and accompanying drawings, further explains the invention. Similar components in the drawings are indicated by the same reference numerals. Those skilled in the art should understand that the specific description below is illustrative rather than restrictive and should not be construed as limiting the scope of protection of the present invention.
[0056] Traditional grain leveling methods include manual entry of grain into the warehouse and manual operation of machinery to level grain piles and surfaces. Since the average capacity of grain storage warehouses in my country is 5,000 tons, both methods of leveling grain piles and surfaces require a lot of manpower and time, resulting in problems such as untimely leveling and safety hazards such as people being buried in grain piles.
[0057] In view of this, one embodiment of the present invention provides a working path planning method for a grain surface leveling device. The method includes: constructing a map based on the location information of grain piles and grain pits in a grain warehouse, and setting parameters according to a preset anti-collision distance; performing global path planning for the grain surface leveling device based on the map and using a particle swarm optimization algorithm improved by a genetic algorithm; performing local path planning for the grain surface leveling device from grain piles to grain pits based on the results of the global path planning and using a table-based operation method; and optimizing obstacle avoidance for the grain surface leveling device based on the results of the local path planning and using a fast expanding random tree algorithm improved by an artificial potential field method with the parameters set.
[0058] In a specific example, such as Figure 1 As shown, a working path planning method for a grain surface leveling device in a flat warehouse is proposed. S1: Parameters are set based on the location information of the grain pile and grain pit, and the reserved anti-collision distance. S2: A combination of genetic algorithm and particle swarm optimization algorithm is used to solve the global path planning from grain pile to grain pile. S3: The table-based operation method of operations research is used to solve the local path planning for different grain piles and grain pits. S4: Obstacle avoidance optimization is performed on the local path planning using a combination of Rapidly-exploring Random Tree (RRT*) algorithm and artificial potential field method.
[0059] The optimal grain leveling path method combined with machine learning provided in this embodiment is used by automatic grain pile and grain surface leveling equipment to efficiently and intelligently carry out grain leveling operations, thereby making grain leveling operations intelligent and efficient, reducing labor costs and improving work efficiency.
[0060] In one possible implementation, the step of constructing a map based on the location information of grain piles and grain pits in the granary includes: determining the position coordinates of the main valley peak and the distance from the sub-valley peak to the bottom of the sub-valley in each grain pile based on the morphological characteristics of each grain pile, and calculating the volume of the protruding grain pile of all valley peaks and the volume of the concave grain pile at the bottom of the sub-valley; and constructing a map based on the position coordinates of the main valley peak in each grain pile.
[0061] In a specific example, step S1 includes:
[0062] S11: Based on the obtained grain pile morphology information, determine the valley peak coordinates and the distance from the local grain pile valley peak to the valley bottom, as well as the calculated volume of the protruding grain pile at the valley peak and the volume of the concave grain pile at the valley bottom.
[0063] Specifically, morphological feature information is acquired using a 3D laser scanner. After processing the information, the coordinates of the valley peaks of the grain pile and the distance from the valley peak to the valley bottom of a local grain pile are obtained. The x-coordinate and y-coordinate of all valley peaks are:
[0064] x=[-1.75201, -1.56119, -4.78398, -5.83525, 4.65246, 5.34, 2.4354,6.4656, 7.01564, 5.9451, -1.8273, 1.8326, 5.5164, -0.2418, -0.4085, 3.9733,3.6929, 5.3941, -0.6075, 0.8256];
[0065] y=[21.1074, 16.7143, 16.9581, 24.8577, 19.0503, 18.543, 20.4354,29.5, 23.544, 22.454, 23.6710, 21.4887, 22.0462, 21.2493, 27.4576, 25.8450,17.8116, 27.6747, 15.4121, 29.1717].
[0066] In a specific example, step S1 further includes: constructing a corresponding map of the grain piles in the grain warehouse based on the obtained parameters.
[0067] Specifically, due to the limited map space, the locations of grain piles can be viewed as discrete nodes, and the movement route of the grain leveling equipment can be simplified using line segments. Therefore, this example uses a topological map for path planning. During the grain leveling process, a two-dimensional path represents the movement trajectory of the grain leveling device, nodes represent the current location of the grain pile and its destination, and line segments represent the movement route and direction of the grain leveling device.
[0068] In one possible implementation, setting parameters according to the preset anti-collision distance includes setting the target bias probability, repulsion gain coefficient, attraction gain coefficient, repulsion range parameter, and allowable error parameter in the artificial potential field algorithm according to the preset anti-collision distance.
[0069] In a specific example, step S11 further includes: setting initialization parameters;
[0070] Specifically, to ensure that the robotic arm of the grain leveling equipment avoids collisions along its planned path, the target bias probability p in the artificial potential field algorithm is set to 0.3, and the gain coefficients for both repulsion and attraction are set to 1. Furthermore, the range of the repulsion force is set to 0.25 meters, with an allowable error of 1.5 steps.
[0071] This embodiment, by adjusting these parameters, can better control collisions during obstacle avoidance in the robotic arm's path planning process. Specifically, adjusting the target bias probability can affect the exploratory nature of the path planning algorithm. When p is large, the algorithm tends to explore towards the target point, helping to accelerate the convergence to the target. Conversely, when p is small, the algorithm focuses more on exploring the entire space, potentially searching for potential paths more comprehensively.
[0072] In one possible implementation, the global path planning for the grain surface leveling equipment based on the map and using a particle swarm optimization algorithm improved by a genetic algorithm includes: initializing the population parameters in the particle swarm optimization algorithm; calculating the fitness function for each initialized particle using the particle swarm optimization algorithm; updating the velocity and position of each particle, and calculating the updated fitness function value of each particle, and updating the local first prediction value of each particle and the global first prediction value of the particle swarm based on the updated fitness function value of each particle; and using a genetic algorithm to perform crossover and mutation operations on particles whose fitness function values exceed a preset value.
[0073] In one specific embodiment, step S2 includes:
[0074] S21: Initialize population parameters;
[0075] S22: The fitness function is calculated using the particle swarm optimization algorithm;
[0076] S23: Update particle velocity and position, and update the local optimal prediction value of each particle and the global optimal prediction value of each particle swarm by statistically analyzing the updated particle fitness values.
[0077] S24: Select individuals with high fitness values and perform crossover and mutation using a genetic algorithm.
[0078] In a specific example, step 21 further includes:
[0079] Initialize the position and velocity of the particle swarm. Select 2000 particles M and obtain the initial fitness value of each particle. Use the initial fitness value as the local optimum of each particle, save the optimal position of each particle, find the optimal value among them, use it as the initial value of the global optimum, and record its position.
[0080] In one possible implementation, the step of using the particle swarm optimization algorithm to calculate the fitness function for each initialized particle includes: obtaining the number of grain piles and the number of particles in the particle swarm; and calculating the fitness function value of the position data of each particle using the number of grain piles as the spatial dimension.
[0081] In a specific example, step S22 further includes:
[0082] Given a particle swarm with 20 grain piles and 2000 particles, find the optimal position in N-dimensional space. i The position data of each particle is
[0083]
[0084] In the formula, For the first i The position of each particle in 1-dimensional space; For the first i The position of each particle in 2-dimensional space; For the first i Individual particles N The location of 4-dimensional space, M The number of particles.
[0085] Furthermore, Substitute the values into the objective function to calculate the fitness value, and measure the quality based on the fitness value; during each search process, record the... i The optimal position of each particle is
[0086]
[0087] In the formula, For the first i The optimal position of a particle in 1-dimensional space; For the first iThe optimal position of each particle in 2D space; For the first i Individual particles N The optimal position in 3D space.
[0088] In this search process, the optimal solution for the optimal position of all particles can be regarded as the optimal position of the entire particle swarm, and the position of the th particle is recorded. i The optimal position of each particle is
[0089]
[0090] In the formula, For the first i The optimal solution for the optimal position of a particle in 1-dimensional space; For the first i The optimal solution for the optimal position of a particle in 2D space; For the first i Individual particles N The optimal solution for the optimal position in 3D space.
[0091] In a specific example, step S23 further includes:
[0092] The search process for the grain pile is repeated (i.e., iterative) until the global optimum is found. Of course, after each path search, the particle's velocity and position should be updated, and the result is recorded as follows: i The velocity of each particle is
[0093]
[0094] In the formula, For the first i The velocity of a particle in one-dimensional space; For the first i The position of each particle in 2-dimensional space; For the first i Individual particles N The location in 3D space.
[0095] Furthermore, the first i The method for updating the position of each particle is as follows:
[0096]
[0097] In the formula, For the first i Individual particles d The location of 4-dimensional space; These are constraint factors, the purpose of which is to control the weight of speed; For the first i Individual particles d The speed of 3D space.
[0098] Furthermore, the first i The method for updating the velocity of each particle is as follows:
[0099]
[0100] In the formula, The inertia factor is a non-negative number that helps the algorithm converge. The larger the value, the wider the range of particle leaps, making it easier to find the global optimum, but it may also miss the ability to search locally. The first acceleration constant is a parameter that adjusts the weight of local optima. If it is 0, it means that there is no personal experience and only social experience during the search process, which makes it easy to get trapped in local optima. The first random number within the range [0, 1]; The second acceleration constant is a parameter that adjusts the weight of the global optimum. If it is 0, it means that there is only social experience and no personal experience, which often leads to getting stuck in local optima. The second random number is within the range [0, 1]. For the first i Individual particles d The local optimum in 3D space; For the first i Individual particles d The location of 4-dimensional space; For the first i Individual particles d The globally optimal position in 3D space; i =1,2,..., M ; d =1,2,..., N .
[0101] In one possible implementation, the step of using a genetic algorithm to perform crossover and mutation operations on particles with fitness function values exceeding a preset value includes: selecting particles with fitness function values exceeding a preset value as the parent of the crossover operation, and performing multi-point crossover operations on the parent; determining whether to perform mutation operations on the particles based on a preset mutation probability, and if so, randomly selecting multiple nodes among the particles for exchange, and selecting particles with fitness function values lower than a preset value to save to the next generation; and when iterating to a preset number of times, outputting particles with fitness function values lower than the preset value.
[0102] In a specific example, step S24 includes:
[0103] S241: Select individuals with high fitness values as the parent of the crossover operation, and then perform the crossover operation using sequential crossover.
[0104] S242: Determine whether to mutate an individual based on a certain number of mutated individuals. If mutation is required, randomly select two nodes of the individual for swapping. Select some individuals with the best fitness to directly retain them to the next generation. Other individuals in the next generation are selected according to the individual's fitness.
[0105] S243: After a certain number of iterations, output the individual with the best fitness.
[0106] In a specific example, the roulette wheel method is used to select the cross parent.
[0107] In a specific example, a multi-point crossover method is selected with a crossover probability Pc = 0.8 to select two paired chromosome individuals A and B, where A = 1 2 | 3 4 5 6 | 7 8 9; B = 9 8 | 7 6 5 4 | 3 2 1, where | represents the selected crossover point.
[0108] Furthermore, by adding the region where B needs to mate to the front or back of A, we get A′= 8 7 6 5 | 1 2 3 45 6 7 8 9; B′= 4 5 6 7 | 9 8 7 6 5 4 3 2 1.
[0109] Furthermore, in A′, the numbers that are the same as those in the mating area are deleted after the mating area, resulting in two offspring: A″=8 7 6 5 4 1 2 3 9; B″=4 5 6 7 9 8 3 2 1.
[0110] This embodiment can also produce a certain mutation effect when the two parent generations are the same, which can maintain the diversity of the population and avoid the "premature convergence" phenomenon of the algorithm.
[0111] In a specific example, such as Figure 2 and Figure 3 As shown, with the mutation probability set to 0.1, the experiment was iterated for a certain number of times. When iterated 2000 times, the shortest global path was 57.6m.
[0112] In one possible implementation, the local path planning for leveling grain piles to grain pits using the table-based operation method based on the global path planning results includes: establishing a first matrix comprising the distances between multiple sub-valley peaks and multiple sub-valley bottoms, as well as the volumes of protruding grain piles at multiple sub-valley peaks and concave grain piles at multiple sub-valley bottoms; establishing a mathematical model of the number of times grains are leveled from multiple sub-valley peaks to multiple sub-valley bottoms and the route; defining the elements in the first matrix as input variables, and solving for the initial basis matrix using the northwest corner method; calculating the test number matrix for the initial basis matrix using the potential method, and determining whether the initial basis is the first solution based on the test number matrix; if the initial basis is not the first solution, adjusting the initial basis matrix using the closed-loop method to obtain an adjusted initial basis matrix, calculating the adjusted test number matrix based on the adjusted initial basis matrix, and determining whether the adjusted initial basis is the first solution based on the adjusted test number matrix; repeating the adjustment until the adjusted initial basis is the first solution.
[0113] In a specific example, step S3 includes:
[0114] S31: Establish a mathematical model of the number of times and routes for leveling grain from multiple grain piles to multiple grain pits;
[0115] S32: Define the input and use the tabular method to find the initial basic feasible solution;
[0116] S33: Use the potential method to find the test number and determine whether it is the optimal solution;
[0117] S34: Improved closed-loop adjustment method.
[0118] In a specific example, step S31 includes
[0119] In this example, the distance from the local grain pile to the valley floor and the volume of the unevenness are shown in Table 1:
[0120] Table 1. Distance from peak to valley floor and volume of local grain piles
[0121]
[0122] In a specific example, the mathematical model is:
[0123]
[0124]
[0125] In the formula, The distance from the peak to the bottom of the local grain pile and the variable in the first row and first column of the concave-convex volume table; The distance from the peak to the bottom of the local grain pile and the variable in the first row and second column of the concave-convex volume table; The distance from the peak to the bottom of the local grain pile and the variable in the 1st row and 3rd column of the concave-convex volume table; The distance from the peak to the bottom of the local grain pile and the variable in the 1st row and 4th column of the concave-convex volume table; The distance from the peak to the bottom of the local grain pile and the variable in the second row and first column of the concave-convex volume table; The distance from the peak to the bottom of the local grain pile and the variable in the second row and second column of the concave-convex volume table; The distance from the peak to the bottom of the local grain pile and the variable in the second row and third column of the concave-convex volume table; The distance from the peak to the bottom of the local grain pile and the variable in the 2nd row and 4th column of the concave-convex volume table; The distance from the peak to the bottom of the local grain pile and the variable in the 3rd row and 1st column of the concave-convex volume table; The distance from the peak to the bottom of the local grain pile and the variable in the 3rd row and 2nd column of the concave-convex volume table; The distance from the peak to the bottom of the local grain pile and the variable in the 3rd row and 3rd column of the concave-convex volume table; The distance from the peak to the bottom of the local grain pile and the variable in the 3rd row and 4th column of the concave-convex volume table are used.
[0126] In a specific example, step S32 includes:
[0127] The initial basis is solved using the northwest corner method. First, the northwest corner (top left corner) of Table 1 is selected to mark the basic variables. Then, the volumes that the rows and columns of the basic variables can provide are compared. Finally, the minimum value is selected as the value of the basic variable, and the rows or columns that satisfy the transport volume are removed. This process is repeated until m1+n1+1 transport volumes are satisfied, where m1 and n1 are the number of rows and columns in Table 1. The resulting initial basis is shown in Tables 2.1 and 2.2.
[0128] Table 2.1 Initial Baseline of Local Grain Pile Peak-to-Valley Transport Volume
[0129]
[0130] Table 2.2 Initial baseline of transport distance from peak to valley floor in local grain piles
[0131]
[0132] In a specific example, step S33 includes
[0133] Distance corresponding to the initial basis It is divided into two parts, namely ,in and Table 2.2 corresponds to k lines and j The potential quantities of the column are given by the following equations:
[0134]
[0135] In the formula, This is the distance from the first row and first column of the initial basis; This is the distance from the first row and second column corresponding to the initial basis; This is the distance in the second row and second column corresponding to the initial basis; This is the distance in the 2nd row and 3rd column corresponding to the initial basis; This is the distance from the initial basis at the 3rd row and 3rd column. This is the distance from the initial basis in the 3rd row and 4th column. This is the potential quantity in the first row; This refers to the potential quantity in column 1; This refers to the potential quantity in column 2; This represents the position of the second row; This is the potential quantity in column 3; This represents the position of the 3rd row; This is the potential quantity in column 4.
[0136] In a specific example, we can arbitrarily assume that one of the unknowns is 0, for example... Then, all the unknowns can be solved according to the equation, and the quasi-test number table is shown in Table 3.
[0137] Table 3 Standard Test Number Table
[0138]
[0139] Furthermore, by judging the test number When the value is positive, the solution is determined to be the optimal solution.
[0140] Furthermore, the freight rate table minus the standard inspection number table equals the inspection number table, resulting in the inspection number table shown in Table 4.
[0141] Table 4 Test Number Table
[0142]
[0143] In a specific example, step S34 includes:
[0144] The test results indicate that the proposed solution is not optimal. Adjustments are made using the closed-loop method, selecting the minimum transport value among the odd-numbered turning points along the closed loop as the adjustment amount. The adjusted test results are shown in Table 5.
[0145] Table 5 Adjusted Test Numbers
[0146]
[0147] In a specific example, this embodiment uses 1m per transport. 3 Based on volume, the shortest distance for transporting grain is 282m.
[0148] In one possible implementation, the obstacle avoidance optimization of the grain surface leveling equipment based on the results of the local path planning and using the improved fast expanding random tree algorithm with the artificial potential field method set by the parameters includes: initializing the space where the local path planning is located, and defining an initial point, a target point, the number of random tree nodes, and the step size between random tree nodes; randomly generating a point in the space to obtain a random point, finding the point closest to the random point in the known set of points of the random tree as the nearest point, and intercepting the known point in the straight line direction from the nearest point to the random point with the step size to obtain an intercept point; introducing a target gravity function to each random tree node, using the position of the target point as heuristic information, and guiding the random tree to grow towards the target point according to the position of the target point; selecting a first parent node in the neighborhood of the random point, and determining whether there is an obstacle between the nearest point and the intercept point. If there is, discarding the random point and adding the intercept point to the random tree.
[0149] In one specific embodiment, S4 includes:
[0150] S41: Initialize the entire space, defining the initial point, the ending point, the number of sampling points, and the step size between points. t Information such as;
[0151] S42: Randomly generate a point in space. x rand Find the point closest to this random point in the set of points in the known tree. x near ,exist x near arrive x rand From the straight direction x near With step size t intercept point x new ;
[0152] S43: The target gravity function in the artificial potential field method is added to the RRT* algorithm, and the position of the target point is used as heuristic information to guide the random tree to grow in the target direction;
[0153] S44: Select the best parent node from the neighborhood of the nearest neighbor node, and determine from... x near arrive x new Are there any obstacles between them? If so, discard that point.x new The point is added to the tree set.
[0154] In a specific example, step S41 includes:
[0155] Construct a topological map, using black squares to represent obstacles such as grain piles on the path. Create a tree with a starting point [0, 0], an ending point [999, 999], and a step size of [0, 0]. t Set the value to 20, the obstacle influence range to 40, and the number of random tree nodes to 5000.
[0156] In a specific example, step S43 includes:
[0157] The location of the target point is used as heuristic information to guide the random tree to grow in the direction of the target.
[0158] Furthermore, a target gravity function is introduced at each node, wherein the target gravity function is:
[0159]
[0160] In the formula, The location of the target point; The location of the point closest to the random point; It is a norm; This is the gravitational gain coefficient; For a certain point Potential function.
[0161] Furthermore, the relationship between the extended guidance function, the target gravity function, and the growth function resulting from random sampling of the random tree is as follows:
[0162]
[0163] In the formula, This is an extended guidance function for random trees; The growth function resulting from random sampling; n for.
[0164] Furthermore, the generation function for the new node is:
[0165]
[0166] In the formula, To capture the new target point; The location of the point closest to the random point; Parameters for controlling the step size of node expansion; This refers to the direction pointing to random sampling points, used for exploring space; To enhance the tendency to move towards the target point.
[0167] In one possible implementation, selecting the first parent node in the neighborhood of the random point includes: connecting the random point to the nearest point; searching the random tree for a set of potential parent nodes, where n is a positive integer, with the random point as the center and n times the step size as the radius; calculating the cost of the original path from the initial point to the random point via the nearest point; calculating the cost of the current path between the current potential parent node and the random point, and determining whether the cost of the current path is less than the cost of the original path. If it is less, a collision detection is performed; if it is not less, the cost of the next path between the next potential parent node and the random point is calculated; determining whether the collision detection is successful. If it fails, the current potential parent node is not the first parent node, and the cost of the next path between the next potential parent node and the random point is calculated; if it succeeds, the current potential parent node becomes the first parent node, and the path between the random point and the nearest point is deleted, and the path from the first parent node to the random point is added.
[0168] In a specific example, in this embodiment, the connection x rand and x near ,by x rand Centered on, R Using a radius, search for nodes in the tree to find the set of potential parent nodes. X potential_parent Its purpose is to update x rand To find if there is a better parent node than a given potential parent node. x potential_parent Start by considering and calculating x parent The cost of being a parent node will be x potential_parent and x rand Connect them and calculate the cost of this path.
[0169] Furthermore, the cost of the new path is compared with the cost of the original path. If the cost of the new path is lower, collision detection is performed; if the cost of the new path is higher, it becomes the next potential parent node.
[0170] Further, collision detection is performed. If it fails, the potential parent node is not considered as the new parent node, and the next potential parent node is considered. This process is repeated until the cost is lower and the collision detection passes. The previous edge is then removed from the tree, and the new edge is added.x potential_parent As x parent Iterate through all potential parent nodes to obtain the updated tree.
[0171] Another embodiment of the present invention provides a working path planning system for a grain surface leveling device. The system includes a map building module for building a map based on the location information of grain piles and grain pits within a grain warehouse, and setting parameters according to a preset anti-collision distance; a global path planning module for performing global path planning for the grain surface leveling device based on the map and using a particle swarm optimization algorithm improved from a genetic algorithm; a local path planning module for performing local path planning for the grain surface leveling device based on the results of the global path planning and using a table-based operation method; and an obstacle avoidance optimization module for performing obstacle avoidance optimization for the grain surface leveling device based on the results of the local path planning and using a fast expanding random tree algorithm improved from an artificial potential field method with the set parameters.
[0172] The optimal grain leveling path planning system combined with machine learning provided in this embodiment is used by automatic grain pile and grain surface leveling equipment to efficiently and intelligently carry out grain leveling operations, thereby making grain leveling operations intelligent and efficient, reducing labor costs and improving work efficiency.
[0173] In the description of this invention, it should be noted that the terms "upper," "lower," etc., indicating the orientation or positional relationship are based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. Unless otherwise expressly specified and limited, the terms "installed," "connected," and "linked" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication between two elements. For those skilled in the art, the specific meaning of the above terms in this invention can be understood according to the specific circumstances.
[0174] It should also be noted that in the description of this invention, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0175] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. For those skilled in the art, other variations or modifications can be made based on the above description. It is impossible to exhaustively list all the implementation methods here. All obvious variations or modifications derived from the technical solutions of the present invention are still within the protection scope of the present invention.
Claims
1. A method for planning a work path for a grain smoothing device, characterized in that, The method includes: A map is constructed based on the location information of grain piles and grain pits in the granary, and parameters are set according to the preset anti-collision distance. Global path planning for the grain surface leveling equipment is performed based on the map and using a particle swarm optimization algorithm improved from a genetic algorithm. Based on the results of the global path planning, and using the tabular operation method, the local path planning for the grain leveling equipment is carried out from the grain pile to the grain pit. Based on the results of the local path planning, and using the improved fast extended random tree algorithm with the artificial potential field method set with the parameters, obstacle avoidance optimization is performed on the grain surface leveling equipment. The global path planning for the grain surface leveling equipment based on the map and using a particle swarm optimization algorithm improved from a genetic algorithm includes: Initialize the population parameters in the particle swarm optimization algorithm; The fitness function of each initialized particle is calculated using the particle swarm optimization algorithm. Update the velocity and position of each particle, calculate the updated fitness function value of each particle, and update the local first prediction value of each particle and the global first prediction value of the particle swarm based on the updated fitness function value of each particle. Genetic algorithms are used to perform crossover and mutation operations on particles whose fitness function values exceed a preset value. The step of performing local path planning from grain pile to grain pit leveling for the grain surface leveling equipment based on the results of the global path planning and using the tabular operation method includes: Establish a first matrix including the distances between multiple sub-valley peaks and multiple sub-valley bottoms, as well as the volumes of the protruding grain piles of multiple sub-valley peaks and the volumes of the concave grain piles of multiple sub-valley bottoms, and establish a mathematical model of the number of times and routes of grain leveling from multiple sub-valley peaks to multiple sub-valley bottoms. Define the elements in the first matrix as input variables, and use the northwest corner method to solve for the initial basis matrix; The initial basis matrix is tested using the potential method to obtain the test number matrix, and the initial basis is used to determine whether it is the first solution. If the initial basis is not the first solution, the initial basis matrix is adjusted using the closed-loop method to obtain the adjusted initial basis matrix, and the adjusted test matrix is calculated based on the adjusted initial basis matrix. Finally, the adjusted initial basis is used to determine whether the adjusted initial basis is the first solution. Repeat the adjustment until the adjusted initial basis is the first solution.
2. The working path planning method for grain surface leveling equipment according to claim 1, characterized in that, The process of constructing a map based on the location information of grain piles and grain pits within the granary includes: Based on the morphological characteristics of each grain pile, determine the position coordinates of the main valley peak and the distance from the sub-valley peak to the bottom of the sub-valley in each grain pile, and calculate the volume of the protruding grain pile of all valley peaks and the volume of the concave grain pile of the sub-valley bottom. A map is constructed based on the location coordinates of the main grain peak in each grain pile.
3. The working path planning method for grain surface leveling equipment according to claim 2, characterized in that, The parameters set according to the preset anti-collision distance include: Based on the preset anti-collision distance, the target bias probability, repulsion gain coefficient, gravity gain coefficient, repulsion range parameter, and allowable error parameter in the artificial potential field algorithm are set.
4. The working path planning method for grain surface leveling equipment according to claim 1, characterized in that, The step of calculating the fitness function for each initialized particle using the particle swarm optimization algorithm includes: Obtain the number of grain piles and the number of particles in the particle swarm; The fitness function value of the position data of each particle is calculated using the number of grain piles as the spatial dimension.
5. The working path planning method for grain surface leveling equipment according to claim 4, characterized in that, The method of using a genetic algorithm to perform crossover and mutation operations on particles whose fitness function values exceed a preset value includes: Select particles whose fitness function value exceeds a preset value as the parent of the crossover operation, and perform multi-point crossover operation on the parent. The system determines whether to mutate the particles based on the preset mutation probability. If necessary, it randomly selects multiple nodes in the particles for exchange and selects particles with fitness function values lower than the preset value to save to the next generation. When the preset number of iterations is reached, particles with fitness function values lower than the preset value are output.
6. The working path planning method for grain surface leveling equipment according to claim 1, characterized in that, The obstacle avoidance optimization of the grain surface leveling equipment based on the results of the local path planning and using the improved fast extended random tree algorithm with the artificial potential field method set with the parameters includes: The space where the local path planning is located is initialized, and the initial point, target point, number of random tree nodes, and step size between random tree nodes are defined; A random point is randomly generated in the space to obtain a random point, and the point closest to the random point is found in the point set of the known random tree. The known point is intercepted in the straight line direction from the nearest point to the random point with the step size to obtain the intercept point. A target gravity function is introduced for each of the random tree nodes, and the position of the target point is used as heuristic information to guide the random tree to grow toward the target point based on the position of the target point; Select a first parent node in the neighborhood of the random point, and determine whether there is an obstacle between the nearest point and the cut-off point. If there is an obstacle, discard the random point and add the cut-off point to the random tree.
7. The working path planning method for grain surface leveling equipment according to claim 6, characterized in that, The step of selecting the first parent node in the neighborhood of the random point includes: Connect the random point to the nearest point; Using the random point as the center and n times the step size as the radius, a set of potential parent nodes is obtained by searching on the random tree, where n is a positive integer; Calculate the cost of the original path from the initial point to the nearest point to the random point; Calculate the cost of the current path between the current potential parent node and the random point, and determine whether the cost of the current path is less than the cost of the original path. If it is less, perform collision detection. If it is not less, calculate the cost of the next path between the next potential parent node and the random point. Determine whether the collision detection is successful. If it fails, the current potential parent node is not the first parent node, and calculate the cost of the next path between the next potential parent node and the random point. If it succeeds, the current potential parent node is the first parent node, and delete the path between the random point and the nearest point, and add the path from the first parent node to the random point.
8. A working path planning system for a grain smoothing device, characterized in that, The system includes: The map building module is used to build a map based on the location information of grain piles and grain pits in the granary, and to set parameters according to the preset anti-collision distance. A global path planning module is used to perform global path planning for the grain surface leveling equipment based on the map and using a particle swarm algorithm improved from a genetic algorithm. The local path planning module is used to perform local path planning for the grain surface leveling equipment based on the results of the global path planning and using the tabular operation method. The obstacle avoidance optimization module is used to optimize the obstacle avoidance of the grain surface leveling equipment based on the results of the local path planning and using the fast extended random tree algorithm improved by the artificial potential field method with the parameters set. The global path planning for the grain surface leveling equipment based on the map and using a particle swarm optimization algorithm improved from a genetic algorithm includes: Initialize the population parameters in the particle swarm optimization algorithm; The fitness function of each initialized particle is calculated using the particle swarm optimization algorithm. Update the velocity and position of each particle, calculate the updated fitness function value of each particle, and update the local first prediction value of each particle and the global first prediction value of the particle swarm based on the updated fitness function value of each particle. Genetic algorithms are used to perform crossover and mutation operations on particles whose fitness function values exceed a preset value. The step of performing local path planning from grain pile to grain pit leveling for the grain surface leveling equipment based on the results of the global path planning and using the tabular operation method includes: Establish a first matrix including the distances between multiple sub-valley peaks and multiple sub-valley bottoms, as well as the volumes of the protruding grain piles of multiple sub-valley peaks and the volumes of the concave grain piles of multiple sub-valley bottoms, and establish a mathematical model of the number of times and routes of grain leveling from multiple sub-valley peaks to multiple sub-valley bottoms. Define the elements in the first matrix as input variables, and use the northwest corner method to solve for the initial basis matrix; The initial basis matrix is tested using the potential method to obtain the test number matrix, and the initial basis is used to determine whether it is the first solution. If the initial basis is not the first solution, the initial basis matrix is adjusted using the closed-loop method to obtain the adjusted initial basis matrix, and the adjusted test matrix is calculated based on the adjusted initial basis matrix. Finally, the adjusted initial basis is used to determine whether the adjusted initial basis is the first solution. Repeat the adjustment until the adjusted initial basis is the first solution.