Improved particle swarm optimization hybrid intelligent agricultural machinery path planning algorithm based on climbing strategy
By improving the particle swarm optimization algorithm and combining it with a hill-climbing strategy, accurate and safe planning of agricultural machinery paths in dynamic environments was achieved. This solved the problem of inaccurate path planning in obstacle environments by existing agricultural machinery navigation systems, and improved the efficiency and accuracy of path search.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-02
- Publication Date
- 2026-03-27
AI Technical Summary
Existing agricultural machinery automatic navigation systems are unable to autonomously perceive and actively avoid obstacles in dynamic environments, resulting in inaccurate and unsafe path planning and difficulty in achieving effective obstacle avoidance in complex environments.
An improved particle swarm optimization algorithm with a fusion hill-climbing strategy is proposed. The particle swarm is initialized through Tent chaotic mapping, and the learning factor is updated by random inertia weight and adjusted asynchronously and dynamically. The hill-climbing algorithm is combined to refine the path optimization, thereby improving the global search performance and path optimization accuracy.
It improves path optimization accuracy, reduces the number of population iterations, enhances path search efficiency in complex environments, and can find better paths in obstacle environments.
Smart Images

Figure CN116245267B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application discloses an improved particle swarm hybrid intelligent agricultural machine path planning algorithm fusing a climbing strategy, and belongs to the path planning field. BACKGROUND
[0002] At present, an autonomous operation task for an outdoor farmland, especially an agricultural machine automatic navigation system based on a predefined path, has been relatively mature, however, the navigation environment sensing capability of the system is weak, the expected path and the control strategy are generated before operation, and the system cannot respond to a dynamic environment after repeated operation. In a natural environment, the farmland environment is complex and changeable, when unknown obstacles appear, a traditional navigation system based on a predefined path cannot perform autonomous sensing and active obstacle avoidance control. For example, when a baling machine performs a round field operation, the baling machine is affected by the position of a grass bale, so that a tractor needs to avoid obstacles according to the position of the grass bale when the tractor drags the baling machine to perform automatic operation; a harvester needs to avoid obstacles when encountering an obstacle such as a telegraph pole. The automatic obstacle avoidance technology is a key technology for avoiding collision in the automatic driving process of the agricultural machine. In the obstacle avoidance technology, path planning is the core, which mainly updates the path in real time according to a certain algorithm to bypass obstacles and reach a target point under the condition that an external environment is unknown. At present, common methods include an artificial potential field method, a region division method, a grid method and a visual graph method. The common obstacle avoidance algorithm has a large performance overhead, cannot solve the problem of real-time planning of an optimal obstacle avoidance path according to the relative position relationship information between the agricultural machine and the obstacle at the current moment, and is difficult to realize accurate, reliable and safe path planning in a complex and dynamically changing environment. The application proposes a hybrid path planning algorithm, enhances the random search capability of the algorithm, improves the global search performance of the algorithm, and combines the global search with the local search to improve the overall search performance of the algorithm. SUMMARY
[0003] Based on the above problems, the application proposes an improved path planning algorithm fusing a climbing strategy and a particle swarm, so as to improve the global path optimization capability and the ability to jump out of a local optimum of the algorithm, and to perform path optimization on a rugged road surface with obstacles. The hybrid algorithm can effectively improve the path optimization precision, reduce the population iteration number, improve the path search efficiency, and find a relatively optimal path on a complex rugged road surface with obstacles. The technical scheme is as follows,
[0004] An improved particle swarm hybrid intelligent agricultural machine path planning algorithm fusing a climbing strategy, comprising the following steps,
[0005] S1. Input path planning data, assume that each particle represents a path, and initialize the particle swarm position in the improved particle swarm algorithm by using a Tent chaotic mapping algorithm;
[0006] S2. The velocity and position of the particles are updated using a random inertia weight update strategy and a particle velocity update formula, and the learning factor is dynamically adjusted using an asynchronous dynamic adjustment algorithm.
[0007] S3. Determine whether the termination conditions of the path planning data are met. If the termination conditions are not met, re-execute S2.
[0008] S4. For the initial solution that satisfies the termination condition, use it as input for the hill climbing algorithm to continue path optimization. After the hill climbing algorithm searches, output the overall optimal particle, i.e. the optimal path.
[0009] Preferably, the path planning data includes the particle's starting point Pstart, ending point Pgoal, map, particle swarm population size N_pop, number of iterations of the improved particle swarm algorithm N_iter, and the number of scattered points contained in a particle n_size.
[0010] Preferably, in step S1, a chaotic mapping method is used to initialize the particle swarm, as follows:
[0011]
[0012] Equation (1) is the Tent chaotic mapping, P k Let P be the coordinates of the k-th particle on the x and y axes. k The value of P is in the range [0, α). k+1 The value range of P is [0,1). k Chaotic mapping initialization is performed in the x and y directions respectively. During initialization, the initial value P0 cannot be the same as the system parameter α.
[0013] Preferably, in step S2, the particle population is updated using random inertia weights, and the specific method is as follows:
[0014] In the standard particle swarm optimization algorithm, the particle velocity update is related to the particle's current velocity v. i individual historical best position pbest i , Group optimal position gbest i The specific formulas are as shown in equations (2) and (3), where r1 and r2 are random numbers ranging from (0,1), c1 and c2 represent the individual learning rate and the group learning rate of the particles, and w is the particle's inertia factor.
[0015] In equation (3), P i k This represents the x and y coordinates of the k-th particle at time i. This represents the velocity of the k-th particle at time i;
[0016]
[0017]
[0018] ω = μ min + (μ max - μ min ) * rand(0, 1) + σ * N(0, 1) (4)
[0019] The inertia weight random update formula is as formula (4), wherein N(0, 1) represents a standard normal distribution, rand(0, 1) is a random number between 0 and 1, μ min , μ max , and σ are all constants.
[0020] Preferably, the particle population is asynchronously dynamically adjusted by using a learning factor in step S2, which means that c1 and c2 dynamically change with the iteration process, and the change trends of the two are just opposite,
[0021]
[0022] In formula (5), c1 is an individual learning factor, and c2 is a social learning factor; t is the iteration number, and T is the total iteration number; wherein c 1,s , c 1,e respectively represent the starting value and the ending value of c1, and c 2,s , c 2,e respectively represent the starting value and the ending value of c2; c1 gradually linearly decreases with the increase of the iteration, and c2 linearly increases.
[0023] Preferably, the particle population is optimized by using iteration acceleration in step S2, and the specific method is as follows,
[0024] Acceleration is introduced into the particle velocity update formula,
[0025]
[0026]
[0027] In formula (6), a i (k, t+1) represents the acceleration of the kth particle at the t+1th iteration, B is an acceleration range coefficient, which is a constant; fit k (k, t) is the fitness of the kth particle at the tth iteration, ave(t) represents the average fitness of the particle population at the tth iteration, and best(t) is the optimal fitness of the particle population at the tth iteration.
[0028] Preferably, in step S3, the end condition of the path planning data is determined as follows: when the current iteration number t is greater than the iteration number N iter of the improved particle swarm algorithm, step S4 is executed; when the current iteration number t is less than or equal to the iteration number N iter of the improved particle swarm algorithm, step S2 is executed.
[0029] Preferably, the improved particle swarm algorithm is iterated several times, and the top 10% of individuals in all global historical optimal values are selected, each individual corresponding to a feasible path to be selected, and the selected individuals are used as initial solutions as input values of the hill climbing algorithm.
[0030] The maximum random search step step and the total iteration number n_clim_iter of the hill climbing algorithm are set, and the initial solution is iterated and optimized, and the overall optimal particle f_p is output after the hill climbing algorithm is searched.
[0031] Preferably, in step S4, the current individual is stored in P0 during the hill climbing algorithm search, and the randomly searched individual is stored in P1, the particle generation value cost corresponding to the two is compared, and the smaller one is written into P0, so that the better individual is always saved in P0 after each iteration, and the particle generation value cost is expressed as follows:
[0032] cost = path_len * (1 + 1000 * violation) (8)
[0033] The higher the generation value, the easier it is to be eliminated in the iteration process, path_len is the path length of the path corresponding to the particle, violation is the collision coefficient of the path and the obstacle, if the path penetrates more obstacles, and is closer to the center position of the obstacle, violation is larger, if the path does not pass through the obstacle, violation is 0.
[0034] Advantages
[0035] 1. In the aspect of particle swarm initialization, Tent chaotic mapping is used to initialize the particle swarm, so that the initial particles are more uniformly distributed in the global, and the randomness and ergodicity of the algorithm are enhanced.
[0036] 2. For the inertia weight, a random weight updating strategy is adopted, so that the influence of individual historical speed on current speed is random, so as to enhance the random optimization performance of the particle.
[0037] 3. For the individual learning factor, an asynchronous dynamic adjustment method is adopted to help the particle jump out of the local optimum, and the global search ability and the local search ability are balanced, and the acceleration is introduced into the speed updating formula to help the particle jump out of the local optimum.
[0038] 4. On the basis of the improved PSO algorithm, the climbing algorithm is added to carry out the secondary path fine optimization. After the iteration of the improved PSO algorithm ends, the climbing algorithm is used to take several global optimal individuals as initial solutions, and the fine optimization is carried out in a certain range near the initial solution with a random step length. BRIEF DESCRIPTION OF DRAWINGS
[0039] Figure 1 The flowchart of the present application.
[0040] Figure 2 The flowchart of the path optimization of particles in the x-axis.
[0041] Figure 3 The particle population frequency distribution diagram of the four initialization methods.
[0042] Figure 4 The terrain one path planning result.
[0043] Figure 5 The terrain two path planning result.
[0044] Figure 6 The terrain three path planning result.
[0045] Figure 7 The terrain four path planning result.
[0046] Figure 8 The terrain one optimal cost iteration diagram.
[0047] Figure 9 The terrain two optimal cost iteration diagram.
[0048] Figure 10 The terrain two optimal cost iteration diagram local enlargement diagram.
[0049] Figure 11 The terrain three optimal cost iteration diagram.
[0050] Figure 12 The terrain four optimal cost iteration diagram. DETAILED DESCRIPTION
[0051] The following detailed description is exemplary in nature and is intended to provide further description of the present application. Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. It is to be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the exemplary embodiments according to the present application.
[0052] An improved particle swarm hybrid intelligent agricultural machinery path planning algorithm fusing climbing strategy, comprising the following steps,
[0053] S1. Input path planning data, assume each particle represents a path, use Tent chaotic mapping algorithm to initialize particle swarm position in improved particle swarm optimization algorithm; each path is uniquely determined by fitting a number of scattered points (a particle includes a number of scattered points) and the start point and end point through cubic spline data interpolation, so a particle can uniquely determine a path;
[0054] The path planning data includes the start point Pstart of the particle, the end point Pgoal, the map map, the particle swarm population number N_pop, the improved particle swarm optimization algorithm iteration number N_iter, and the number of scattered points n_size contained in a particle.
[0055] The initial position of the particle swarm is also very important for the subsequent iteration process. If the initial particle swarm is distributed in a corner of the overall search region, the search efficiency of the algorithm will be greatly reduced, and the global optimality of the searched particle will also be limited. If each individual of the particle swarm is uniformly and randomly distributed in the entire search space, the ergodicity and randomness of the algorithm in the entire search space will be greatly improved, which will certainly improve the search efficiency and global search performance of the algorithm. Chaotic phenomenon has the characteristics of progressive self-similarity, non-periodicity and order, and is widely used in global optimization processing mechanism. Chaotic mapping has randomness, ergodicity and complexity, so using chaotic mapping to initialize the particle swarm can make the particles more randomly and uniformly distributed in the overall interval, which helps to improve the global search performance of the algorithm. Compared with the general random initialization method, the particle distribution will be more random and ergodic when using chaotic mapping to initialize the particle swarm.
[0056]
[0057] Formula (1) is Tent chaotic mapping, P k is the coordinate position of the kth particle in the x and y axes, when P k is in the range of [0, α), P k+1 is in the range of [0, 1), and P k is initialized in the x and y directions respectively. The initial value P0 cannot be the same as the system parameter α when initializing. When α = 0.5, the entire system will exhibit a small periodic state, which will greatly reduce the randomness and ergodicity of the system. When initializing, pay attention to the fact that the initial value P0 cannot be the same as the system parameter α, otherwise the particle swarm will become a regular periodic distribution.
[0058] Figure 3From the simulation process, it can be seen that the particle distribution is more random, uniform and ergodic by using Tent chaotic mapping to initialize the population in the specified area. Therefore, in order to make the initial particle population uniformly, randomly and ergodically distributed in the entire search area, the algorithm uses Tent chaotic mapping to initialize the particle population.
[0059] S2. The speed and position of the particle are updated by using a random inertia weight update strategy and a particle speed update formula, and the learning factor is dynamically adjusted by using an asynchronous dynamic adjustment algorithm.
[0060] S2-1 updates the particle population by using a random inertia weight.
[0061] In the standard particle swarm optimization algorithm, the update of the particle speed is related to the current time speed (v i ), the individual historical optimal position (pbest i ), and the group optimal position (gbest i ). The specific formula is as shown in equations (2) and (3), where r1 and r2 are random numbers with a value range of (0, 1). c1 and c2 represent the individual learning rate and the group learning rate of the particle, which measure the rate of the particle approaching the group historical optimum and the individual historical optimum in the iteration process. The greater the value, the more the particle tends to the optimal position in the iteration process. However, the value of c1 and c2 should not be too large, otherwise the algorithm will be too premature. w is the inertia factor of the particle, which measures the influence of the previous time speed on the current time speed.
[0062] In equation (3), P i k represents the coordinate position of the kth particle in the i time on the x and y axes, represents the speed of the kth particle at i time;
[0063]
[0064]
[0065] ω=μ min +(μ max -μ min )*rand(0,1)+σ*N(0,1) (4)
[0066] The inertia weight random update formula is as shown in equation (4), where N(0,1) represents a standard normal distribution, rand(0,1) is a random number between 0 and 1, μ min , μ max , and σ are all constants.
[0067] The standard particle swarm optimization algorithm balances the exploration and utilization ability of the algorithm through w, r1, r2, the selection of the three parameters affects the path optimization performance of the whole algorithm, and the three parameters in the traditional particle swarm optimization algorithm are usually fixed, which is also the deficiency of the traditional particle swarm optimization algorithm. In the iteration process, the related parameters can be dynamically adjusted according to different search periods, which will greatly improve the search performance of the algorithm. In the algorithm, the inertia weight adopts a random updating strategy to make the influence of the individual historical speed on the current speed random. Compared with the inertia weight updating method of linearly decreasing or equal proportionally decreasing with the iteration number, the random weight updating strategy can improve the exploration ability of the particles, help to jump out of the local optimum, enhance the global exploration performance of the particles, and make the cost function in the particle swarm optimization algorithm quickly decrease to find the corresponding global optimal cost. Especially in the process of finding the global optimum of the multi-peak function, the algorithm can greatly avoid falling into the local optimum.
[0068] S2-2. Asynchronously dynamically adjusting the particle population with a learning factor;
[0069] The learning factor in the PSO algorithm is a measure of the tendency of the individual position at the next moment to the individual historical optimum and the global optimum. The former represents the spatial exploration development of the particle swarm optimization algorithm, and the latter represents the utilization of the particle swarm optimization algorithm. Reasonably balancing the relationship between exploration and utilization in different search periods of the particle swarm optimization algorithm is of great significance to improve the global search performance of the whole algorithm. The traditional particle swarm optimization algorithm directly sets the individual learning factor c1 and the social learning factor c2 to fixed values in the iteration process. This processing method does not comprehensively balance the relationship between the exploration performance and the utilization performance of the PSO algorithm, and the search performance and utilization performance are not maximized in the iteration process of the algorithm, and the optimization exploration performance of the algorithm will be reduced. In the improved particle swarm optimization algorithm, the learning factor is dynamically and asynchronously updated to maximize the exploration performance and utilization performance of the algorithm. The so-called asynchronous dynamic adjustment of the learning factor means that c1 and c2 dynamically change with the iteration process, and the change trend of the two is exactly opposite.
[0070]
[0071] In formula (5), c1 is the individual learning factor, c2 is the social learning factor, t is the iteration number, T is the total iteration number equal to N_iter, and in the formula, c 1,s , c 1,e represent the starting value and the ending value of c1 respectively, and c 2,s , c 2,eThe initial value and the end value of c2 are represented respectively, c1 is gradually linearly decreased with the increase of iterations, and c2 is linearly increased, because in the early stage of algorithm search, the particles should pay more attention to the exploration performance and traverse the entire search space as much as possible, and in the later stage of search, the use of the experience of the early search should be strengthened, so the proportion of the global historical optimum is gradually increased with the increase of the number of iterations, and the proportion of individual experience is reduced, the exploration ability and utilization ability of the particles are balanced through the asynchronous update of the individual learning factor and the social learning factor, and the local search performance and the global search performance of the algorithm are also better balanced, so as to improve the overall search optimization ability of the algorithm.
[0072] S2-3. Optimizing the particle population by iteration acceleration;
[0073] One of the most common problems of traditional particle algorithms is that particles are too premature and easy to fall into local optimum, and for those particles falling into local optimum, it is difficult to jump out of it without the help of external factors, so the acceleration is introduced into the particle velocity update formula to help the algorithm jump out of the local optimum, enhance the search performance, and improve the global search ability of the algorithm.
[0074]
[0075]
[0076] In formula (6), a i (t+1) represents the acceleration of the kth particle at the t+1th iteration, B is the acceleration range coefficient, which is a constant; fit k (t) is the fitness of the kth particle at the tth iteration, ave(t) represents the average fitness of the particle group at the tth iteration, and best(t) is the optimal fitness of the particle group at the tth iteration.
[0077] From formula (6), if the fitness of the kth particle at the tth iteration is greater than the optimal fitness of the group at the tth iteration, the acceleration will be greater, and the size and direction of the corresponding particle's next moment speed will also change. At the same time, the search step will be larger, and compared with the traditional particle swarm algorithm, the search space of the particle at the next moment will be expanded, and the probability of jumping out of the local optimum will be increased. Formula (7) is the formula for updating the iteration of the particle swarm velocity after introducing the acceleration.
[0078] S3. Determine whether the end condition of the path planning data is met, and if not, execute S2 again. In step S3, the end condition of the path planning data is determined as follows: if the current iteration number t is greater than the improved particle swarm algorithm iteration number N_iter, execute step S4; if the current iteration number t is less than or equal to the improved particle swarm algorithm total iteration number N_iter (equal to T), execute step S2.
[0079] S4. For the initial solution that meets the end condition, continue to path optimization as the input of the hill climbing algorithm, and output the overall optimal particle, i.e. the optimal path, after searching by the hill climbing algorithm.
[0080] First, the improved particle swarm optimization algorithm is used for several iterations, and then the top 10% of all global historical optimal individuals searched by the improved PSO algorithm are selected, each individual corresponding to a feasible path to be selected. Finally, these selected individuals are used as initial solutions (assuming the particle population size is N_pop and the iteration number is N_iter, then there will be N_pop*N_iter individuals after the improved particle swarm optimization algorithm is iterated, which are sorted from small to large according to the generation value, and the top N_pop*10% individuals with the smallest generation value are selected as the initial individuals of the hill climbing algorithm), and the random search hill climbing algorithm is used for fine optimization in the initial solution neighborhood area. The selection of the maximum random search step has a huge impact on the search performance of the hill climbing algorithm. If the maximum random search step is too large, the particle is easy to jump from one local optimum to another local optimum, and if it is too small, the search area of each iteration will be too small, which cannot jump out of the current local optimum. Therefore, the step value should not be too large, and in this algorithm, the step value is taken as After several iterations of searching in the initial solution neighborhood area by the hill climbing algorithm, the individual with the smallest generation value in the overall particle is output, and the path corresponding to the individual is the final output path of the overall algorithm. Table 1: Pseudocode of the overall algorithm
[0081] Table 1
[0082]
[0083]
[0084] POSstart, POSgoal, map, N_pop, N_iter, n_size are start point, goal point, map, particle population number, improved particle swarm optimization algorithm iteration total number and a particle contains the number of scatter points, n_clim_iter is the total number of iterations of hill climbing algorithm in the vicinity of an initial solution (j is the number of hill climbing algorithm iterations). The maximum random search step step in the hill climbing algorithm takes one percent of the boundary length boder_length, which ensures the accuracy of the optimization and also takes into account the exploration ability of the algorithm. In the process of hill climbing algorithm search, the current individual is stored in P0, and the individual searched randomly is stored in P1. The values of the two corresponding particle generations are compared, and the point with smaller value is written into P0. This approach can ensure that the better individual is saved in P0 at the end of each iteration, so that the data can be output immediately. After the improved particle swarm optimization algorithm iteration is completed, the global historical optimal particle is obtained, which is used as the input of the hill climbing algorithm to continue the path optimization. After the hill climbing algorithm search, the overall optimal particle f_p is output.
[0085] cost is the particle generation value, the higher the generation value, the easier it is to be eliminated in the iteration process, path_len is the path length of the particle corresponding path, violation is the collision coefficient of the path and the obstacle, if the path penetrates more obstacles, and is closer to the center position of the obstacle, violation is larger, if the path does not pass through the obstacle, violation is 0, by introducing the collision coefficient, the particle can "consciously" avoid the obstacle as much as possible in the iteration process.
[0086] cost = path_len * (1 + 1000 * violation) (8)
[0087] The verification process is as follows:
[0088] Figures 2-3 In order to verify that the Tent chaotic mapping initialization population can make the particles more random, traversal and uniformly distributed in the whole interval, the following particle swarm initialization comparison test is designed.
[0089] Four methods of random initialization of population particles (Rand), continuous uniform distribution of random initialization (Unifrnd), Tent chaotic mapping initialization population and Logistic chaotic mapping initialization population are used to initialize the particle swarm. In order to simplify the experiment, this experiment only studies the distribution of particles on the x-axis (the distribution of y-axis is the same as that of x-axis), and the coordinate distribution interval of particles on the x-axis in the four initialization methods is (0, 1). Each initialization method is set to 500 particles, x k represents the coordinate of the kth particle on the x-axis,
[0090] x k+1 = μx k (1 - x k ), k = 1, 2, 3,... (9)
[0091] Equation (9) is the iteration formula of Logistic chaotic mapping. When the initial value x1 of Logistic chaotic mapping is in the range of (0, 1) and 0 < μ <= 4, the value range of x k (k = 2, 3, 4,...) is also in the range of (0, 1).
[0092] Figure 2 Fig. 1 is a frequency distribution histogram of four initialization methods of random function (Rand ()), random uniform distribution function (Unifrnd ()), Tent chaotic mapping and Logistic chaotic mapping. The number of particles of the four initialization methods is 500. The interval [0, 1] is divided into 20 intervals. The horizontal axis is each interval. The four bars in each interval from left to right correspond to random function (Rand ()), random uniform distribution function (Unifrnd ()), Tent chaotic mapping and Logistic chaotic mapping respectively. The vertical axis is the number of particles in the corresponding interval under each initialization method. Since the generation method of the x and y axes of the particle coordinates is the same, only the data of the x axis is analyzed. From Fig. 1, it is difficult to see the specific difference between the four initialization methods. Figure 2 To specifically quantify the uniformity and randomness of each initialization method, the distribution number of the four particle swarm initialization methods in the x axis 30 intervals is counted. There are 30 integers in each data set, each integer represents the number of particles in the interval. Four sets of data correspond to the four methods. Then the standard deviations of the four sets of data are calculated. The results are shown in Table 2. Table 3 is the average value of the standard deviations of the four methods obtained by 10000 times of repeated independent experiments.
[0093] Table 2
[0094]
[0095] Table 3
[0096]
[0097] From Tables 2-3, it can be seen that std3 (Tent chaotic mapping) has the smallest value, that is, using Tent chaotic mapping to initialize the particle swarm can make the particles more randomly and uniformly distributed in the entire interval.
[0098] In order to reduce the randomness of simulation experiment, 10000 random independent repeated simulation experiments are carried out for the four initialization methods, and the standard deviation std of the particle distribution result of each time is recorded, and the average value is calculated, as shown in Table 3. The average value S3 of the standard deviation of the Tent chaotic mapping method is the smallest, so the Tent chaotic mapping is used to initialize the particle swarm in this paper, so that the uniformity, randomness and ergodicity of the particle swarm distribution are stronger.
[0099] Algorithm path optimization comparison simulation experiment
[0100] In order to verify the feasibility and strong path optimization of the algorithm (IPSO-HCA) proposed in this paper, the simulation experiment related environment is win11, matlab2018b, and the α in the Tent chaotic mapping initialization of particle is set to 0.499; the number of scatter points n_size contained by a particle is 3; the value of σ in the random inertia weight is 0.35, and the value of μ max and μ min are 0.7 and 0.4 respectively; the parameter value of the learning factor is c 1,s =2.5; c 1,e =0.5; c 2,s =0.5; c 2,e =2.5; the acceleration range coefficient B in the speed update formula is 0.1 in this experiment. And set three different complex terrain maps, terrain one (simple obstacle terrain), terrain two (U-shaped obstacle), terrain three (simple obstacle terrain) and terrain four (rough curved surface terrain), and the hybrid optimization algorithm (ABC-PSO) combined with artificial bee colony and particle swarm algorithm, the improved particle swarm algorithm (IPSO) with Logistic initialization particle swarm and linearly decreasing inertia weight are used for comparison experiment.
[0101] The number of population individuals of the three algorithms is 150, and the iteration times of IPSO, ABC-PSO and IPSO-HCA in four scenarios are 50, 50 and 30 respectively.
[0102] The starting and ending coordinates of the terrains one, two and three are (0, 0), (4, 6), (5, 0), (5, 6), (0, 0), (8, 8), respectively. The solid line, the dashed line and the dotted line represent the feasible paths found by IPSO-HCA, IPSO and ABC-PSO, respectively. The small squares in the figure represent the starting points, the pentagrams represent the ending points, and the circles and rectangles represent the obstacles. Terrain four is a curved surface terrain, and the starting and ending points are (-3, -3, 0) and (3, 3, 0), respectively. The circles on the curved surface represent obstacles, and the solid line, the dashed line and the dotted line represent the paths corresponding to IPSO-HCA, ABC-PSO and IPSO, respectively. It can be seen from the figure that the path length of the algorithm proposed in this paper is obviously slightly lower than that of the other two algorithms, and the turning amplitude of the path is also obviously smaller than that of the IPSO algorithm.
[0103] The path lengths of IPSO, ABC-PSO and IPSO-HCA in the simple obstacle terrain are 9.2117, 7.5649 and 7.5490, respectively. Compared with IPSO and ABC-PSO, the path lengths are shortened by 1.6627 m and 0.0159 m, respectively. It can be seen from the optimal cost iteration diagram that the optimization speed of IPSO-HCA is greatly improved.
[0104] Table 4: The final path lengths of the three algorithms in the four terrains
[0105]
[0106] In the U-shaped obstacle terrain, in order to increase the difficulty of path search, the starting point and the ending point are set to be located at the low part and the top of the obstacle, respectively, and the coordinates are (5, 0) and (5, 6), respectively. The path lengths of IPSO, ABC-PSO and IPSO-HCA in the U-shaped obstacle terrain are 9.4071 m, 9.2477 m and 9.1090 m, respectively. Compared with IPSO and ABC-PSO, the path lengths are shortened by 0.2981 m and 0.1387 m, respectively. It can be seen from the iteration diagram that IPSO-HCA quickly finds the optimal path from the beginning of the iteration.
[0107] In order to further demonstrate the advantages of IPSO-HCA, a comparative experiment is conducted in a complex scenario where circular obstacles and rectangular obstacles coexist. In this simulation experiment, the starting point and the ending point are set to be (0, 0) and (8, 8), respectively, and many obstacles are set around the ending point to increase the difficulty of path planning. The path lengths of IPSO, ABC-PSO and IPSO-HCA are 14.1201 m, 13.6502 m and 13.1905 m, respectively. Compared with IPSO and ABC-PSO, the path lengths are shortened by 0.4699 m and 0.4597 m, respectively.
[0108] The last group of simulation comparison experiments is set in a rugged curved surface with multiple circular obstacles, and the starting and ending points are (-3, -3, 0) and (3, 3, 0), respectively. From the final search path map, the path lengths of IPSO, ABC-PSO and IPSO-HCA are 9.9884 m, 8.8130 m and 8.7796 m, respectively. Compared with the IPSO and ABC-PSO methods, the path lengths are shortened by 1.2088 m and 0.0334 m, respectively. And through the optimal cost iteration graph, it can be seen that the path length of IPSO-HCA algorithm is relatively long after the iteration of the improved particle algorithm, but after the further optimization of the hill climbing algorithm, the path length is quickly reduced to 8.7796 m. It can be seen that the hill climbing algorithm has improved the optimization performance of IPSO.
[0109] From the above several groups of simulation experiments, it can be seen that the IPSO-HCA algorithm has improved the length and efficiency of path optimization, especially in the number of iterations. Although in different obstacle terrains, the path length found by IPSO-HCA is shorter than that found by IPSO and ABC-PSO methods, so the algorithm has certain robustness to different obstacle terrains. And IPSO-HCA also has obvious advantages in the number of iterations.
[0110] The data acquisition (sensors, cameras), data output and image processing techniques involved in this application are prior art and will not be repeated here.
Claims
1. An improved particle swarm optimization method for intelligent agricultural machinery path planning that integrates hill-climbing strategies, characterized in that, Includes the following steps, S1. Input path planning data, assuming each particle represents a path, and use the Tent chaotic mapping algorithm to initialize the particle swarm positions in the improved particle swarm algorithm; The path planning data includes the particle's starting point. Pstart ,end Pgoal ,map map Particle swarm population size N_ pop Improve the number of iterations in the particle swarm optimization algorithm. N_iter The number of scattered points contained in a particle n_size; S2. The velocity and position of the particles are updated using a random inertia weight update strategy and a particle velocity update formula, and the learning factor is dynamically adjusted using an asynchronous dynamic adjustment algorithm. ; The inertia factor of the particle. N (0,1) represents the standard normal distribution. rand (0,1) is a random number between 0 and 1. All are constants; The particle population is adjusted asynchronously and dynamically using a learning factor. Asynchronous and dynamic adjustment of the learning factor refers to... c 1 and c 2 It changes dynamically with the iteration process, and the two trends are exactly opposite, as shown in the following formula: (5); In formula (5) c 1 For individual learning factors, c 2 As a social learning factor; t For the number of iterations, T The total number of iterations is denoted by ; where c 1,s , c 1,e Represent c 1 The starting and ending values are similar. c 2,s , c 2,e Represent c 2 The starting and ending values, c 1 It gradually decreases linearly with increasing iterations, while c 2 It is linearly increasing; Introduce acceleration into the particle velocity update formula: (6); In formula (6) Indicates the first k Individual particles t The acceleration at +1 iteration, where B is the acceleration range coefficient; For the first k The particle in the first t Fitness at the next iteration Indicates the particle swarm in the th t Average fitness at the nth iteration best(t) For the particle swarm in the th t The optimal fitness at the next iteration; S3. Determine whether the termination conditions of the path planning data are met. If the termination conditions are not met, re-execute S2. S4. For the initial solution that satisfies the termination condition, use it as input for the hill climbing algorithm to continue path optimization. After the hill climbing algorithm searches, output the overall optimal particle, i.e. the optimal path.
2. The improved particle swarm optimization intelligent agricultural machinery path planning method based on a hill-climbing strategy as described in claim 1, characterized in that, Step S1 uses a chaotic mapping method to initialize the particle swarm, as follows: ; Equation (1) is the Tent chaotic mapping. For the first k Individual particles x, y The coordinate position on the axis, when The value range is [0, ... ), The value range of is [0,1). exist x and y Chaotic mapping initialization is performed in each direction, with initial values during initialization. P 0 Cannot be used with system parameters They have the same value.
3. The improved particle swarm optimization intelligent agricultural machinery path planning method based on the fusion of hill-climbing strategies according to claim 1, characterized in that, In step S2, iterative acceleration is used to optimize the particle population. The specific method is as follows: (7); Indicates the first k The particle in the first i Always x, y Coordinate position on the axis Indicates the first k Individual particles i Speed in a given moment; r 1 , r 2 A random number ranging from (0,1); the individual's historical best position. Optimal position of the group .
4. The improved particle swarm optimization intelligent agricultural machinery path planning method based on the fusion of hill-climbing strategies according to claim 1, characterized in that, In step S3, the termination condition for determining whether the path planning data is satisfied is: the current iteration number. t> Improve the number of iterations in the particle swarm optimization algorithm N_iter Execution steps S4 Current iteration number t≤ Improve the number of iterations in the particle swarm optimization algorithm N_ iter hour , Execution steps S2 .
5. The improved particle swarm optimization intelligent agricultural machinery path planning method based on the fusion of hill-climbing strategies according to claim 1, characterized in that, By performing several iterations using an improved particle swarm optimization algorithm, the top 10% of individuals among all global historical optima are selected. Each individual corresponds to a feasible path to be selected. These selected individuals are used as the initial solutions and as the input values for the hill climbing algorithm. Set the maximum random search step size for the hill-climbing algorithm. step and total number of iterations n_clim_iter, Based on the input path planning data, iterative optimization is performed near the initial solution. After the hill-climbing algorithm searches, the overall optimal particle is output. f_p .
6. The improved particle swarm optimization intelligent agricultural machinery path planning method based on the fusion of hill-climbing strategies according to claim 1, characterized in that, In step S4, during the hill-climbing algorithm search process, the current individual is stored in P0 In the process, randomly searched individuals are stored in P1 In the process, the particle generation value cost corresponding to the two is compared, and the one with the smaller particle generation value is written into the middle. P0 In this process, the best individuals are guaranteed to be retained after each iteration. P0 In this context, the expression for the cost of a particle generation is as follows: (8); The higher the value, the easier it is to be eliminated during the iteration process. path_len is the path length of the path corresponding to the particle, and violation is the collision coefficient between the path and the obstacle. The more obstacles the path passes through and the closer it is to the center of the obstacle, the greater the violation. If the path does not pass through any obstacle, the violation is 0.