# Path Optimization of Agricultural Robot Based on Immune Ant Colony: B-Spline Interpolation Algorithm

Authors: Kai Feng; Xiaoning He; Maoli Wang; Xianggang Chu; Dongwei Wang; Dansong Yue
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

This study presents a path planning algorithm based on immune ant colony B spline interpolation to eliminate path duplication and corner inflection points, increase the smoothness of the agricultural robot’s path trajectory, and enhance the path planning performance. Firstly, this study improves the convergence speed of the algorithm by introducing an adaptive factor that obeys the normal distribution to optimize the path heuristic function. Secondly, to strengthen the variety of the target path search, an immune algorithm was utilized to perform a global investigation of the appropriate routes and assign the initial pheromones of the ant colony. Then, the adaptive judgment factor is introduced based on the incentive degree function and the pheromone evaporation coefficient, and the update formula are adjusted to promote the algorithm’s flexibility while suppressing the optimal regional problem. Finally, the pathways are processed using a cubic B spline interpolation method to remove the edges and minimize the peak inflection points. To verify the specific optimization performance of the algorithm in this paper, we have selected the same type of improved algorithm as a comparison and tested it in a raster map model. The simulation results demonstrate that the values of the proposed algorithm paths and the standard deviation of the tracks are smaller than the comparison algorithm, which indicates the higher performance of the algorithm in searching the optimal routes and more flexible and accurate search. Compared with the comparison algorithm, the average time-consuming reduction rate of the algorithm in this paper is between 38% and 45% in different grid maps, and the number of turns is reduced by 33% to 58%. It meets the requirements of the actual work on the robot.


---

## Body

## 1. Introduction

Path planning is one of the primary study areas in mobile robots, which is essentially a problem of obtaining the optimal or viable solutions under specified parameters [1, 2]. When a robot works in a complex environment, some information is unknown. It optimizes its route using path planning algorithms based on operational and environmental data. The algorithm’s performance directly impacts whether the robot can perform the task efficiently and flexibly. Some scholars have elected to apply machine learning algorithms, such as neural networks [3, 4] and RRT [5, 6], to path-planning, with certain limitations while obtaining the desired optimization effect. However, with the increase in the complexity of the working environment and structural performance of mobile robots, the application research of intelligent optimization algorithms and related improved algorithms has become increasingly mature. Among them, there are several types of frequently applied algorithms. The first category is swarm optimization algorithms, including particle swarm algorithms and [7, 8] ant colony algorithms [9, 10]. The second category has evolutionary algorithms, including genetic algorithms and [11, 12] immune algorithms [13]. Another class for other algorithms is mainly the A-star algorithms [14, 15] and the artificial potential field method [16, 17]. The above algorithms have matured in the static path planning research conditions and have produced excellent results. Nonetheless, there are issues, such as the algorithms’ lack of stability and adaptability, their computationally demanding nature, and their inefficiency in dealing with complicated circumstances. As a result, algorithm development and optimization must continue.As one of the most effective and mature algorithms, the ant colony algorithm is more suitable for the path-finding of robots in the practical working environment. However, it inevitably suffers from the initial blind search, slow convergence speed, and proclivity to fall into local optimum and deadlock. Therefore, scholars have committed to optimizing the ant colony algorithm’s structure, parameters, initial pheromone strategy, and amended regulations. Some researchers have also improved the performance of the ant colony algorithm by introducing related mechanisms or merging it with other algorithms. The literature [18] used the pseudorandom state transfer probability rules to select the paths with optimal and worst solutions to improve global pheromone updates combined with dynamic penalty methods to resolve the lock-up problem. The literature [19] proposed a 16-directional 24-neighborhood ant search method combined with vector pinch angles to calculate the heuristic information. It regulated the search range of the algorithm by adjusting the transfer probability control parameters. The literature [20] offers an adaptive lone wolf-ant colony combination strategy. The isolated wolf field-of-view mechanism and adaptive enhancement function are in place to maximize the elite ant colony’s search mechanism. Improving the pheromone update rule for the lone wolf escape method increases the global search capability of the hybrid algorithm. The literature [21] integrates potential artificial fields and ant colony algorithms. It optimizes the incentive factors and pheromone update mechanism by improving the probable field force to overcome the inertia of the ant colony and avoid the algorithm from falling into a local optimum. Literature [22] proposed an improved immune genetic optimization ant colony algorithm, adding another threshold update heuristic function and improving mutation operators and immune operators to optimize the pheromone update mechanism. The literature [23] optimizes the initial pheromone assignment by introducing a coefficient on the positive interval 0–1. Then, the simulated annealing algorithm’s internal energy is linked to the target path, and temperature is invoked as the path control function. Finally, each temperature value is checked to correspond to a track, and the pheromone concentration is controlled by iteratively calculating the deviation between the target path and the temperature path for differential assignments. The literature [24] integrates the firework explosion and migration strategies to enhance the interaction mechanism, thus improving the pheromone update formulation. The literature [10] proposed an improved adaptive ant colony algorithm by introducing discrete adaptive factors for the ACO transfer probability and pheromone update rules. The literature [25] merged the A-star algorithm with the ant colony algorithm. The objective is to improve the pheromone-giving mechanism to ensure that the robot finds the shortest path in complex environments. The literature [26] fused the ACS and MMAS algorithms and introduced a multirole adaptive collaboration mechanism. The literature [27] proposed an adaptive improved ant colony algorithm built on population information entropy by establishing a pheromone diffusion model and a pheromone update mechanism based on the evolutionary characteristics of the population. In addition, the literature [28] introduced a path correction mechanism to improve the path heuristic function to assure that the target point path is optimal and then presented a node optimization method to smoothen the trail. The literature [29] introduced an ant age correction mechanism to optimize the ant colony algorithm and tested it against GA, PSO, and traditional ABC algorithms in static and dynamic environments.The analysis shows that the current strategy can resolve most route planning challenges. However, traditional algorithms still have poor adaptability, path redundancy, many corner turning points, and inadequate matching of hybrid algorithms. In particular, most algorithms use optimum route length and algorithm time efficiency as indices of algorithm excellence, which ignores the variety and flexibility of hybrid algorithms to some degree. Therefore, this paper offers an immune ant colony B spline interpolation path-finding algorithm. Then, we selected the same type of comparison algorithm and conducted simulation experiments in different map models to further explore the path planning performance of agricultural robots. The following are the paper’s primary contributions:(1)
The introduction of an adaptive factor obeying the normal distributionM,β2 improves the route heuristic function of the ant colony algorithm and the method’s convergence speed and accuracy.(2)
By introducing an adaptive judgment factor, a pheromone assignment judgment mechanism based on an immune algorithm is developed with the aim of screening pheromones and avoiding blind searches. Then, the resistant excitation degree value is combined with the pheromone evaporation coefficient to improve the pheromone update strategy, enhance the matching degree of the fusion algorithm, and increase the diversity and flexibility of the target path search.(3)
The immune ant colony B spline interpolation method is presented based on the hybrid concept to smooth the global route, reduce superfluous edges, decrease the overall path length, and dramatically increase the robot path-finding efficiency.This study’s primary organizational structure is as follows: Section2 describes the map model and related issues in this paper. Section 3 discusses the principle of the ant colony algorithm and related improvement work. Section 4 focuses on the immune ant colony B spline interpolation algorithm theory and analyzes the fusion and improvement of algorithms in depth. Section 5 tests and analyzes the performance of the algorithm in this paper. The last part outlines the conclusions and future work.


## 2. Problem Description

### 2.1. Environmental Modeling

This study requires a 2D raster map to simulate a robot operation scene in a 3D agricultural environment. Suppose the robot works on a flat map-A with an areaMM×MM and labels information on the map by the ordinal method. The top left corner of the map is the origin. The grid is labeled from left to right and top to bottom with serial numbers 1,2,3,…,n. The horizontal direction of the map matrix is the X-axis, the vertical direction is the Y-axis, and the grid points have unique coordinates, as shown in Figure 1.Figure 1
Grid model.Assume that the initial point coordinates areS0.5,h, where h=MM−0.5 and the target point is Emi,ni. The ordinal method formula indicates the position corresponding to the target, where MM denotes the number of ranks, as shown in(1)mi=MM−0.5,ni=MM+0.5−ceilDMM.In equation (1), D denotes the serial number corresponding to the target point. If the target point-E is expressed in the right-angle coordinates, as shown in the following equation:(2)mi=l×modD−1,MM+0.5,ni=l×MM+0.5−ceilDMM,where l is the edge length of each small grid pixel, ceil(a) means taking the smallest integer greater than or equal to the value k, and mod (a, b) means taking the remainder of a divided by b. Calculate the path length from the starting point S to the target point-E as follows:(3)dSE=ni−h2+mi−0.52.In this study, two types of environmental models, 20 × 20 and 30 × 30, are randomly built, and only two models, simple and complex, are set because of space limitations. The raster maps are shown in Figures2 and 3, respectively, (a) for the simple model and (b) for the complex model, where the raster area is stationary and does not change in size randomly.Figure 2
20 × 20 grid map models. (a) Simple mode; (b) complex mode.
(a)(b)Figure 3
30 × 30 grid map models. (a) Simple mode; (b) complex mode.
(a)(b)


### 2.2. Related Descriptions

The relevant notes for the experimental model of this study are as follows:(1)
In the static environment, the shape of the actual obstacle is irregular. Therefore, considering the current state of the study, the grid is fixed as a rectangle, the size and position of the grid are known, the grid area is equally divided, and the amount of information about the relevant environment is stored. When there is less than one grid, it is treated as one. The model diagram has two parts: the feasible and infeasible zones.(2)
Suppose the robot’s starting position in the model map is S and E’s target position. The robot is considered a mass point and occupies a grid during its movement, and all its movable directions are shown in Figure4, which are up, right up, right, right down, down, left down, left, left up in a clockwise direction.Figure 4
Direction of movement.


### 2.3. Description of the Complexity of the Fusion Algorithm

A path planning algorithm describes the solution steps of a path-finding problem with both time complexity and space complexity. Commonly used measurement perspectives include time and space size, entropy, amount of information, and fitness value. Judgment indicators utilized are selected based on the demands of the study. Typically, the time complexity is quantified in terms of the algorithm’s running time, while the space complexity is quantified in terms of the spatial memory occupied by the method. In this study, the layering principle is used to address the fusion algorithm’s complexity effectively.This part provides an overview of the theoretical position regarding algorithmic complexity, and the experimental portion details the detailed comparison study.


## 2.1. Environmental Modeling

This study requires a 2D raster map to simulate a robot operation scene in a 3D agricultural environment. Suppose the robot works on a flat map-A with an areaMM×MM and labels information on the map by the ordinal method. The top left corner of the map is the origin. The grid is labeled from left to right and top to bottom with serial numbers 1,2,3,…,n. The horizontal direction of the map matrix is the X-axis, the vertical direction is the Y-axis, and the grid points have unique coordinates, as shown in Figure 1.Figure 1
Grid model.Assume that the initial point coordinates areS0.5,h, where h=MM−0.5 and the target point is Emi,ni. The ordinal method formula indicates the position corresponding to the target, where MM denotes the number of ranks, as shown in(1)mi=MM−0.5,ni=MM+0.5−ceilDMM.In equation (1), D denotes the serial number corresponding to the target point. If the target point-E is expressed in the right-angle coordinates, as shown in the following equation:(2)mi=l×modD−1,MM+0.5,ni=l×MM+0.5−ceilDMM,where l is the edge length of each small grid pixel, ceil(a) means taking the smallest integer greater than or equal to the value k, and mod (a, b) means taking the remainder of a divided by b. Calculate the path length from the starting point S to the target point-E as follows:(3)dSE=ni−h2+mi−0.52.In this study, two types of environmental models, 20 × 20 and 30 × 30, are randomly built, and only two models, simple and complex, are set because of space limitations. The raster maps are shown in Figures2 and 3, respectively, (a) for the simple model and (b) for the complex model, where the raster area is stationary and does not change in size randomly.Figure 2
20 × 20 grid map models. (a) Simple mode; (b) complex mode.
(a)(b)Figure 3
30 × 30 grid map models. (a) Simple mode; (b) complex mode.
(a)(b)


## 2.2. Related Descriptions

The relevant notes for the experimental model of this study are as follows:(1)
In the static environment, the shape of the actual obstacle is irregular. Therefore, considering the current state of the study, the grid is fixed as a rectangle, the size and position of the grid are known, the grid area is equally divided, and the amount of information about the relevant environment is stored. When there is less than one grid, it is treated as one. The model diagram has two parts: the feasible and infeasible zones.(2)
Suppose the robot’s starting position in the model map is S and E’s target position. The robot is considered a mass point and occupies a grid during its movement, and all its movable directions are shown in Figure4, which are up, right up, right, right down, down, left down, left, left up in a clockwise direction.Figure 4
Direction of movement.


## 2.3. Description of the Complexity of the Fusion Algorithm

A path planning algorithm describes the solution steps of a path-finding problem with both time complexity and space complexity. Commonly used measurement perspectives include time and space size, entropy, amount of information, and fitness value. Judgment indicators utilized are selected based on the demands of the study. Typically, the time complexity is quantified in terms of the algorithm’s running time, while the space complexity is quantified in terms of the spatial memory occupied by the method. In this study, the layering principle is used to address the fusion algorithm’s complexity effectively.This part provides an overview of the theoretical position regarding algorithmic complexity, and the experimental portion details the detailed comparison study.


## 3. Ant Colony Algorithm and Improvement

### 3.1. Traditional Ant Colony Algorithm

Ant colony algorithm (ACO) is a heuristic algorithm. There are two crucial factors influencing path search: pheromone concentration and distance heuristic function. The pheromone concentration characterizes the length of the path, and the higher the attention, the shorter the corresponding path distance, and vice versa, the longer the distance.Then, the transfer probabilityPijkt during the movement of ant-k from raster −i to j is as follows:(4)Pijkt=τijtαηijtβ∑s∈allowedkτijtαηijtβ,s∈allowedk,0other.The parameterτijt denotes the concentration of path pheromone. The parameter ηijt represents the path heuristic function, and ηijt=1/dij where dij is the distance heuristic function, which means the Euclidean distance between the centers of raster−i and j. The parameter a is the pheromone enhancement coefficient, which indicates the importance of the pheromone and is proportional to the number of ants passing along the path. The parameter ß is the expected heuristic information coefficient. The parameter allowedk denotes all possible nodes that ant k may pass through when it moves. In the iterative process, the pheromone update equation is as follows:(5)τijt+1=τijt⋅1−ρ+Δτijt⋅ρ,Δτijt=Q/Lk,i,j∈t,0,other.In equations (5) and (6), the parameter ρ denotes the pheromone evaporation coefficient and represents the global pheromone concentration. The parameter Q denotes the pheromone intensity coefficient, which is a constant. Furthermore, the parameter Lk means the shortest path established by the kth ant in the iteration.


### 3.2. Algorithm Improvement

If the number of optimization iterations is too small, the algorithm cannot correctly search for the optimum solution. As the number of iterations increases, the time consumption of the algorithm increases, and the convergence speed decreases, which affects the quality and timeliness of the algorithm. The convergence speed is accelerated during ant colony search and stagnation is avoided when the algorithm searches for paths. This paper chooses to, firstly, improve the path heuristic functionηijt by introducing an adaptive factor ξ that obeys the normal distribution M,β2, and the improved path heuristic function is as follows:(6)ηijt=1dij⋅ξ.In (6),(7)ξ=1β⋅2π⋅exp−K−M22β2−α.In the above equation, the coefficientξ is a Gaussian distribution that obeys the mathematical expectation M and the standard variance β, and its value does not affect the algorithm’s effectiveness but only indicates the numerical magnitude. In this experiment, M denotes the number of ant colonies, and K represents the maximum number of algorithm iterations (adaptively adjusted according to the parameters). Compared with the traditional ant colony algorithm, the improved algorithm has significantly improved the timeliness and flexibility in searching and reduced the convergence time. Still, there will be definite problems, and further improvements are needed, which are further explained in the subsequent section of the link.


## 3.1. Traditional Ant Colony Algorithm

Ant colony algorithm (ACO) is a heuristic algorithm. There are two crucial factors influencing path search: pheromone concentration and distance heuristic function. The pheromone concentration characterizes the length of the path, and the higher the attention, the shorter the corresponding path distance, and vice versa, the longer the distance.Then, the transfer probabilityPijkt during the movement of ant-k from raster −i to j is as follows:(4)Pijkt=τijtαηijtβ∑s∈allowedkτijtαηijtβ,s∈allowedk,0other.The parameterτijt denotes the concentration of path pheromone. The parameter ηijt represents the path heuristic function, and ηijt=1/dij where dij is the distance heuristic function, which means the Euclidean distance between the centers of raster−i and j. The parameter a is the pheromone enhancement coefficient, which indicates the importance of the pheromone and is proportional to the number of ants passing along the path. The parameter ß is the expected heuristic information coefficient. The parameter allowedk denotes all possible nodes that ant k may pass through when it moves. In the iterative process, the pheromone update equation is as follows:(5)τijt+1=τijt⋅1−ρ+Δτijt⋅ρ,Δτijt=Q/Lk,i,j∈t,0,other.In equations (5) and (6), the parameter ρ denotes the pheromone evaporation coefficient and represents the global pheromone concentration. The parameter Q denotes the pheromone intensity coefficient, which is a constant. Furthermore, the parameter Lk means the shortest path established by the kth ant in the iteration.


## 3.2. Algorithm Improvement

If the number of optimization iterations is too small, the algorithm cannot correctly search for the optimum solution. As the number of iterations increases, the time consumption of the algorithm increases, and the convergence speed decreases, which affects the quality and timeliness of the algorithm. The convergence speed is accelerated during ant colony search and stagnation is avoided when the algorithm searches for paths. This paper chooses to, firstly, improve the path heuristic functionηijt by introducing an adaptive factor ξ that obeys the normal distribution M,β2, and the improved path heuristic function is as follows:(6)ηijt=1dij⋅ξ.In (6),(7)ξ=1β⋅2π⋅exp−K−M22β2−α.In the above equation, the coefficientξ is a Gaussian distribution that obeys the mathematical expectation M and the standard variance β, and its value does not affect the algorithm’s effectiveness but only indicates the numerical magnitude. In this experiment, M denotes the number of ant colonies, and K represents the maximum number of algorithm iterations (adaptively adjusted according to the parameters). Compared with the traditional ant colony algorithm, the improved algorithm has significantly improved the timeliness and flexibility in searching and reduced the convergence time. Still, there will be definite problems, and further improvements are needed, which are further explained in the subsequent section of the link.


## 4. Immune Ant Colony B Spline Interpolation Algorithm

The ant colony algorithm updates the parameters by filtering the path pheromone content and then selecting a new path. The drawback is that it updates the information and path selection probability in a relatively fixed mode, which overly reinforces the optimal information feedback. The improved ant colony algorithm (IACA) avoids the problem of premature maturity of the algorithm to a certain extent. However, when the solution space is ample, the convergence speed of the algorithm tends to be slower, which causes the algorithm to fall into local optimums or even deadlock in the iterations, resulting in ineffective algorithm search. Figure5 illustrates the pertinent issue model.Figure 5
Invalid result. (a) Error path. (b) Deadlock.
(a)(b)This paper introduces the immune algorithm based on the analysis above. Here is the associated theoretical survey.


### 4.1. Immunity Algorithm

An immunity algorithm is an intelligent adaptive optimization algorithm that imitates biological autoimmune protection mechanisms [30]. The global search capability of the immune algorithm can be to optimize the IACA to avoid the ant colony algorithm falling into local optimum and enhance the robustness of the algorithm. The following describes the basic parameters of the immune algorithm:


#### 4.1.1. Affinity

The functionaffx:S∈R denotes the affinity evaluation operator, where S is the feasible solution interval of the problem and R is the domain of real numbers [31]. The calculation formula affabi,abj is as follows:(8)affabi,abj=1,affabi=affabj,11+affabi−affabj,affabi≠affabj.Whenaffabi,abj=1, antibody-i and antigen j match the highest degree, and antibody-i is the optimal solution i∈i1,i2,…,iD.


#### 4.1.2. Antibody Concentration:

Antibody concentration is an indicator to measure the degree of excellent or lousy diversity of antibody populations with the following formula:(9)denabi=1N∑j=0N−1Sabi,abj.The parameter N denotes the population size, andSabi,abj indicates the similarity between antibodies. Equation (10) below shows that the coefficient d is the similarity threshold.(10)Sabi,abj=1,affabi,abj<δ,0,affabi,abj≥δ.


#### 4.1.3. Motivation Degree

The degree of excitation needs to consider the affinity and concentration of the antibody. Generally, antibodies with high affinity and low concentration will produce a more significant degree of excitation [32].(11)simabi=a×affabi−b×affabj.In the formula, the parametersa and b are the excitation coefficients, and the values are all constants.


### 4.2. Immune Ant Colony Algorithm (IACA)

The immune algorithm has the advantage of a global parallel distributed search capability and diversity preservation mechanism. The study incorporates the respective edges of the immune algorithm and the ant colony algorithm. On the one hand, the immune algorithm’s global parallel distributed search capability is utilized to perform a fast and international search for feasible solutions, ensuring the quality of the solution while improving the convergence speed. On the other hand, random search uses its diversity preservation mechanism to provide the diversity and flexibility of the population and prevent the algorithm from falling into deadlock or wrong paths. Optimization measures are as follows:(1)
Introduction of adaptive judgment factor: usually, the ant colony skips some unexplored paths when performing a local search because of the pheromone evaporation factorρ. The direct consequence is that the amount of information acquired will be zero, and the algorithm loses its global search capability. When the value of ρρ is too large, it affects the global search capability of the algorithm, and when the value of ρ is too small, it decreases the convergence speed of the algorithm. Based on the above analysis, this study introduces an adaptive judgment factor ρ based on the incentive degree for adaptive improvement of ρ.(12)ρt+1=0.6ρt,ρt≥λ,ρmin,ρt≤λ,whereλ=Maxi+Mini/2, and Maxi is the maximum value in the excitation degrees, Mini is the minimum value, and the value of ρ is a constant.(2)
The pheromone update formula for the immune ant colony algorithm is as follows:(13)τijnewt=1−ρ⋅τijoldt+affabi,abj⋅ρ⋅Δτijoldt.The above optimization speeds up the global convergence of the algorithm, safeguards the global search capability while enhancing the chance of excellent antibody convergence affinity maturation, and effectively prevents the algorithm from falling into local extremes. It mainly reflects in the following aspects: (1) the presence of the adaptive judgment factor makes it impossible to form problematic nodes because there is always an upper limit to the pheromone release. (2) The initial parallel-style search in different directions by the immune algorithm avoids the blind behavior of the ant colony. (3) Since the immune antibody has a memory function, the pheromone update formula is optimized by the antibody affinity, avoiding too much pheromone concentration while the affinity is updated again. If a deadlock occurs, the affinity of the current antibody and the antigen cannot be matched. Hence, the antibody is updated, causing the ant colony to search again and exit the current deadlock situation. The following experiments show a detailed description with detailed data proof analysis.


### 4.3. Path Smoothing

In general, the obtained path curves are fold lines. Hence, there are problems with unsmooth path curves and more edges. Therefore, to pave the path and reduce the edges, this study adopts the three-time B spline interpolation method to grind the course, which can avoid the collision of agricultural robots with obstacles in actual work and effectively reduce the energy loss of robots.Assuming there ism + n+1 planes or spatial control points Pii=0,1,2,…,m+n, then the nth B spline curve is defined as follows:(14)Pk,nu=∑i=0nGi,nu⋅Ni+k.Gi,n(u) denotes the basis function of the nth B spline interpolation, u∈[0, 1], as shown in (15) below.(15)Gi,nu=u−uiui+n−uiGi,n−1u+ui+n+1−uui+n+1−ui+kGi+1,n−1u,n≥1,where the node vector u=u0,u1,⋯,un. Define recursively for (15) above.(16)Gi,0u=0,ui≤u≤ui+1,1,u<uioru>ui+1.The cubic B spline curve interpolation formula used in this research is as follows:(17)G0,3u=16−u2+3u2−3u+1,G1,3u=163u3−6u2+4,G2,3u=16−3u3−3u2+3u+1,G1,3u=16u3,,u∈0,1.Then, the cubic B spline curve segmentP0,3u is as follows:(18)P0,3u=161uu2u31−33−140−63133−30001P0P1P2P3,u∈0,1.To further illustrate the use of the above equations in the algorithm, the control points are fitted according to equations (15) and (19) combined with the grid map model for illustration, where k = 3, i = 0, 1, 2, 3, in the above equation. Assume that the four control points are u0, u1, u2, and u3. A uniform B spline interpolation curve can be defined when the nodes are evenly distributed using these four points, as shown in Figure 6(a). Figure 6(b) illustrates the model map’s B spline interpolation route curve.Figure 6
B spline interpolation path smoothing. (a)Schematic diagram of triple B spline curve segment. (b) Path Curve.
(a)(b)Suppose the starting positionSxs,ys and the target position ExE,yE are known. Two jump points are as follows: Q1 and Q2. The jump points are chosen randomly during the search process, and the search starting point S is used as the first path smoothing point. Next, after the obstacles, connect the point-Q1 and point-Q2, in turn, and finally reach the search endpoint E (the last path smoothing point). As shown in Figure 6(b), a sound and good smoothing effect can be obtained.


### 4.4. Algorithm Steps

The specific implementation steps of the algorithm in this work are as mentioned below, and the flow chart is in Figure7.Step 1: establish the grid map models based on the environmental information and path conditions obtained in the actual operations of the agricultural robot. In this work, two models, 20 × 20 and 30 × 30, are produced.Step 2: initialize the parameters related to the immunization algorithms and the ant colony algorithm. The first one mainly includes the immune individual dimensionD, the maximum resistant generation KI, the excitation coefficients a and b, and the antibody concentration in the immune algorithm. The second one is the parameters M, K, α, β, ρ and the adaptive factor ρ in the ant colony algorithm.Step 3: start the ant colony algorithm and find the path. Set the initial pheromone and start from the starting pointS0.5,h. Then, select the next passable grid according to the roulette strategy. Meanwhile, update the taboo table and ant status and record the routes traveled. The immunization algorithm starts when all ants have completed one search.Step 4: update the local pheromone and start the immunization algorithm to determine the antigens and antibodies. The sequence of position coordinates of all paths in the contraindication table of the ant colony algorithm is set as antibodyi. Antigen j is the shortest route length in the modern antibody population.Step 5: calculate the affinity. Calculate the relationship between the antibody and antigen according to (7), determine whether feasible paths searched for KI time satisfy the end condition, and execute step 6 if the condition is satisfied. Otherwise, continue the iteration.Step 6: perform clonal propagation, mutation, and selection. Use individuals with a high affinity for reproduction, high-frequency modification, and picking operations. Calculate the incentive degree and get the optimal fitness value according to (9), update the immune population, and update the global pheromone of ACO according to (13).Step 7: determine whether the ant colony has reached its end. If all the ants converge to one path or get the set maximum iteration threshold, record the optimal path information and end the loop. Otherwise, go to step 3.Step 8: output the globally optimal path in the current search, utilize the three-time B spline interpolation function to smoothen the trail, and finally output the path trajectory curve.Figure 7
Immune ant colony algorithm flow.


## 4.1. Immunity Algorithm

An immunity algorithm is an intelligent adaptive optimization algorithm that imitates biological autoimmune protection mechanisms [30]. The global search capability of the immune algorithm can be to optimize the IACA to avoid the ant colony algorithm falling into local optimum and enhance the robustness of the algorithm. The following describes the basic parameters of the immune algorithm:


### 4.1.1. Affinity

The functionaffx:S∈R denotes the affinity evaluation operator, where S is the feasible solution interval of the problem and R is the domain of real numbers [31]. The calculation formula affabi,abj is as follows:(8)affabi,abj=1,affabi=affabj,11+affabi−affabj,affabi≠affabj.Whenaffabi,abj=1, antibody-i and antigen j match the highest degree, and antibody-i is the optimal solution i∈i1,i2,…,iD.


### 4.1.2. Antibody Concentration:

Antibody concentration is an indicator to measure the degree of excellent or lousy diversity of antibody populations with the following formula:(9)denabi=1N∑j=0N−1Sabi,abj.The parameter N denotes the population size, andSabi,abj indicates the similarity between antibodies. Equation (10) below shows that the coefficient d is the similarity threshold.(10)Sabi,abj=1,affabi,abj<δ,0,affabi,abj≥δ.


### 4.1.3. Motivation Degree

The degree of excitation needs to consider the affinity and concentration of the antibody. Generally, antibodies with high affinity and low concentration will produce a more significant degree of excitation [32].(11)simabi=a×affabi−b×affabj.In the formula, the parametersa and b are the excitation coefficients, and the values are all constants.


## 4.1.1. Affinity

The functionaffx:S∈R denotes the affinity evaluation operator, where S is the feasible solution interval of the problem and R is the domain of real numbers [31]. The calculation formula affabi,abj is as follows:(8)affabi,abj=1,affabi=affabj,11+affabi−affabj,affabi≠affabj.Whenaffabi,abj=1, antibody-i and antigen j match the highest degree, and antibody-i is the optimal solution i∈i1,i2,…,iD.


## 4.1.2. Antibody Concentration:

Antibody concentration is an indicator to measure the degree of excellent or lousy diversity of antibody populations with the following formula:(9)denabi=1N∑j=0N−1Sabi,abj.The parameter N denotes the population size, andSabi,abj indicates the similarity between antibodies. Equation (10) below shows that the coefficient d is the similarity threshold.(10)Sabi,abj=1,affabi,abj<δ,0,affabi,abj≥δ.


## 4.1.3. Motivation Degree

The degree of excitation needs to consider the affinity and concentration of the antibody. Generally, antibodies with high affinity and low concentration will produce a more significant degree of excitation [32].(11)simabi=a×affabi−b×affabj.In the formula, the parametersa and b are the excitation coefficients, and the values are all constants.


## 4.2. Immune Ant Colony Algorithm (IACA)

The immune algorithm has the advantage of a global parallel distributed search capability and diversity preservation mechanism. The study incorporates the respective edges of the immune algorithm and the ant colony algorithm. On the one hand, the immune algorithm’s global parallel distributed search capability is utilized to perform a fast and international search for feasible solutions, ensuring the quality of the solution while improving the convergence speed. On the other hand, random search uses its diversity preservation mechanism to provide the diversity and flexibility of the population and prevent the algorithm from falling into deadlock or wrong paths. Optimization measures are as follows:(1)
Introduction of adaptive judgment factor: usually, the ant colony skips some unexplored paths when performing a local search because of the pheromone evaporation factorρ. The direct consequence is that the amount of information acquired will be zero, and the algorithm loses its global search capability. When the value of ρρ is too large, it affects the global search capability of the algorithm, and when the value of ρ is too small, it decreases the convergence speed of the algorithm. Based on the above analysis, this study introduces an adaptive judgment factor ρ based on the incentive degree for adaptive improvement of ρ.(12)ρt+1=0.6ρt,ρt≥λ,ρmin,ρt≤λ,whereλ=Maxi+Mini/2, and Maxi is the maximum value in the excitation degrees, Mini is the minimum value, and the value of ρ is a constant.(2)
The pheromone update formula for the immune ant colony algorithm is as follows:(13)τijnewt=1−ρ⋅τijoldt+affabi,abj⋅ρ⋅Δτijoldt.The above optimization speeds up the global convergence of the algorithm, safeguards the global search capability while enhancing the chance of excellent antibody convergence affinity maturation, and effectively prevents the algorithm from falling into local extremes. It mainly reflects in the following aspects: (1) the presence of the adaptive judgment factor makes it impossible to form problematic nodes because there is always an upper limit to the pheromone release. (2) The initial parallel-style search in different directions by the immune algorithm avoids the blind behavior of the ant colony. (3) Since the immune antibody has a memory function, the pheromone update formula is optimized by the antibody affinity, avoiding too much pheromone concentration while the affinity is updated again. If a deadlock occurs, the affinity of the current antibody and the antigen cannot be matched. Hence, the antibody is updated, causing the ant colony to search again and exit the current deadlock situation. The following experiments show a detailed description with detailed data proof analysis.


## 4.3. Path Smoothing

In general, the obtained path curves are fold lines. Hence, there are problems with unsmooth path curves and more edges. Therefore, to pave the path and reduce the edges, this study adopts the three-time B spline interpolation method to grind the course, which can avoid the collision of agricultural robots with obstacles in actual work and effectively reduce the energy loss of robots.Assuming there ism + n+1 planes or spatial control points Pii=0,1,2,…,m+n, then the nth B spline curve is defined as follows:(14)Pk,nu=∑i=0nGi,nu⋅Ni+k.Gi,n(u) denotes the basis function of the nth B spline interpolation, u∈[0, 1], as shown in (15) below.(15)Gi,nu=u−uiui+n−uiGi,n−1u+ui+n+1−uui+n+1−ui+kGi+1,n−1u,n≥1,where the node vector u=u0,u1,⋯,un. Define recursively for (15) above.(16)Gi,0u=0,ui≤u≤ui+1,1,u<uioru>ui+1.The cubic B spline curve interpolation formula used in this research is as follows:(17)G0,3u=16−u2+3u2−3u+1,G1,3u=163u3−6u2+4,G2,3u=16−3u3−3u2+3u+1,G1,3u=16u3,,u∈0,1.Then, the cubic B spline curve segmentP0,3u is as follows:(18)P0,3u=161uu2u31−33−140−63133−30001P0P1P2P3,u∈0,1.To further illustrate the use of the above equations in the algorithm, the control points are fitted according to equations (15) and (19) combined with the grid map model for illustration, where k = 3, i = 0, 1, 2, 3, in the above equation. Assume that the four control points are u0, u1, u2, and u3. A uniform B spline interpolation curve can be defined when the nodes are evenly distributed using these four points, as shown in Figure 6(a). Figure 6(b) illustrates the model map’s B spline interpolation route curve.Figure 6
B spline interpolation path smoothing. (a)Schematic diagram of triple B spline curve segment. (b) Path Curve.
(a)(b)Suppose the starting positionSxs,ys and the target position ExE,yE are known. Two jump points are as follows: Q1 and Q2. The jump points are chosen randomly during the search process, and the search starting point S is used as the first path smoothing point. Next, after the obstacles, connect the point-Q1 and point-Q2, in turn, and finally reach the search endpoint E (the last path smoothing point). As shown in Figure 6(b), a sound and good smoothing effect can be obtained.


## 4.4. Algorithm Steps

The specific implementation steps of the algorithm in this work are as mentioned below, and the flow chart is in Figure7.Step 1: establish the grid map models based on the environmental information and path conditions obtained in the actual operations of the agricultural robot. In this work, two models, 20 × 20 and 30 × 30, are produced.Step 2: initialize the parameters related to the immunization algorithms and the ant colony algorithm. The first one mainly includes the immune individual dimensionD, the maximum resistant generation KI, the excitation coefficients a and b, and the antibody concentration in the immune algorithm. The second one is the parameters M, K, α, β, ρ and the adaptive factor ρ in the ant colony algorithm.Step 3: start the ant colony algorithm and find the path. Set the initial pheromone and start from the starting pointS0.5,h. Then, select the next passable grid according to the roulette strategy. Meanwhile, update the taboo table and ant status and record the routes traveled. The immunization algorithm starts when all ants have completed one search.Step 4: update the local pheromone and start the immunization algorithm to determine the antigens and antibodies. The sequence of position coordinates of all paths in the contraindication table of the ant colony algorithm is set as antibodyi. Antigen j is the shortest route length in the modern antibody population.Step 5: calculate the affinity. Calculate the relationship between the antibody and antigen according to (7), determine whether feasible paths searched for KI time satisfy the end condition, and execute step 6 if the condition is satisfied. Otherwise, continue the iteration.Step 6: perform clonal propagation, mutation, and selection. Use individuals with a high affinity for reproduction, high-frequency modification, and picking operations. Calculate the incentive degree and get the optimal fitness value according to (9), update the immune population, and update the global pheromone of ACO according to (13).Step 7: determine whether the ant colony has reached its end. If all the ants converge to one path or get the set maximum iteration threshold, record the optimal path information and end the loop. Otherwise, go to step 3.Step 8: output the globally optimal path in the current search, utilize the three-time B spline interpolation function to smoothen the trail, and finally output the path trajectory curve.Figure 7
Immune ant colony algorithm flow.


## 5. Experiment and Analysis

Relevant experiments are required to illustrate the algorithm’s performance in this paper. The simulation software is MATLAB 2019 (a). Firstly, the performance of the improved ant colony algorithm in Section3.2 and the immune ant colony algorithm in Section 4.2 are analyzed. Then, to further verify the performance of IAC-BSA, a comparison test with several other methods was established. The main aspects of validation are as follows:(1)
The applicable parameters of IAC-BSA and the diversity of solutions during iteration were studied and analyzed.(2)
The research examines the real-time nature of IACA and the influence of IAC-BSA on route smoothing.(3)
A comparative analysis of IAC-BSA with the traditional ant colony algorithm (TACO) and the methods proposed in the literature [31–33] was set up in two map environments, 20 × 20 and 30 × 30. The factors for selecting comparative literature trials are model similarity, operability, and workload.All algorithms began with the same starting parameters: the total number of ant coloniesM = 50, the maximum number of iterations Kmax = 100, the initial pheromone evaporation coefficient ρ (0) = 1, the pheromone intensity coefficient Q = 1, the grid length l = 1, the pheromone enhancement coefficient a = 1, the number of individual immune dimensions D = 20, the population size N = 50, the maximum resistant generation KI = 500, and the incentive coefficients a = 2, b = 1.


### 5.1. Analysis of IAC-BSA Parameters and Solutions

In the IAC-BSA, two parameters have a more significant impact on the search accuracy:ß and δ. Generally, the larger the value of β, the faster the convergence speed, however, the optimal route of ant colony search will lose its randomness, and it is easy to fall into a local optimum. Similarly, the value of d is proportional to both the antibody concentration and the diversity of the population. However, too high a concentration of antibodies will cause the search to concentrate on one region, which is not conducive to global optimization. Based on the above analysis, it is necessary to determine the appropriate values to ensure the comprehensive performance of the algorithm. Since both ß and d are related to pheromones, consider the two algorithms’ mutual influence after fusion. Consequently, based on the experiments and relevant analysis of the literature, we choose the final value range of ß and δ: β∈6,10, and δ∈0.2,0.6.The default value is selected within the defined range and floats no more than ±15% of the respective field: (1)β0=ceilβmax1−15%; (2) δ0=ceilδmin1+15%.This validation was conducted in a complicated 30 × 30 scenario to demonstrate how each algorithm parameter adapts to its surroundings. The validation of both independent variable parametersβ and α was performed 20 times to ensure accuracy and objectivity, taking into account the influence of randomness factors. Tables 1 and 2 include the relevant experimental findings (MSE indicates the mean square error of the path length).Table 1
Path result afterß change (d = δ0).
IndicatorsOptimalLongestAverageVarianceMSE647.698575.840656.401853.45757.3114772.083345.526956.341573.61448.5799845.698563.840652.972532.11705.6671945.112754.941148.40114.58832.14201055.598045.941148.76296.47842.5453Table 2
Path result afterd change (ß = ß0).
IndicatorsOptimalLongestAverageVarianceMSE0.245.698568.183852.648242.66786.53210.345.112754.941148.40114.85532.14200.446.284365.840652.519933.62745.79890.567.254845.698552.331138.16446.17730.646.526973.254852.172540.23516.3431The parameter optimization results in Tables1 and 2 show that the path is optimal when the value of ß is 9, and the trail is optimal when the value of d is 0.3. In summary, the optimal combination of parameters in this experiment is β = 9 and δ = 0.3.This experiment illustrates the global merit-seeking capability of IAC-BSA by two functions, accuracy and diversity. The accuracy function is the standard deviation of the path SE (i), and the diversity function is the difference of the path solutions DF (i).From (19), the smaller the SE (i) value, the higher the solution’s degree of variability and accuracy. From equation (20), the more significant and more stable the DF (i) value, the greater the probability that the ant colony will find different solutions. Thus, the higher the possibility of determining the optimal global solution. Figure 8 depicts the accuracy and diversity curves acquired throughout the experiment.(19)SEi=∑i=1KLi,m−Li¯2M−1,(20)DFi=Li¯−Lbest,where Li,m denotes the path length of m ants in the ith iteration, Li¯ represents the average value of feasible paths, and Lbest indicates the optimal path value.Figure 8
Accuracy and diversity curves.As shown in Figure8, the accuracy curve gradually decreases as the algorithm iterates. It then fluctuates within an interval. The angle stabilizes when the standard deviation reduces to a certain degree, which indicates that the algorithm has good stability and reflects the high precision of the algorithm solution. The diversity curve first rises, then falls, and finally stabilizes, and the absolute value is greater than 0. The analysis of the curve trend shows that the algorithm has no duplicate solutions and the solutions have excellent diversity. It also indicates that the ant’s local and global search abilities are strong, and early maturity is low.


### 5.2. Comparison of Optimal Path Smoothing

The session focuses on validating the performance of the improved ant colony algorithm in Section3.2 and the immune ant colony algorithm in Section 4.2. Firstly, experiments are held separately for the improved ant colony algorithm and the immune ant colony algorithm in the same environment, and the results are analyzed. Secondly, after the above immune ant colony algorithm searches the paths, it introduces cubic B spline interpolation curves to smoothen them.Figure9 illustrates the optimization results for the improved ant colony algorithm and the immune ant colony method. Both methods can find the optimal path accurately, and neither of them has the problem of local optimum and deadlock compared with the standard ant colony algorithm. The comparative analysis shows that the improved ant colony algorithm has more turning points, which indicates that its global search capability needs further improvement. In contrast, the immune ant colony algorithm proposed on this basis has fewer turning points, which suggests that the timeliness and search flexibility of the latter are significantly higher.Figure 9
30 × 30 complex environment path optimization results. (a) Improved ant colony algorithm. (b) Immune ant colony algorithm.
(a)(b)Figure10 illustrates the immune ant colony algorithm’s route curve smoothing using three-time B spline interpolation (the red curve is the path after smoothing, and the black dashed line is the path before grinding). The research demonstrates that the smoothed route curve is smoother at the turning locations because of eliminating the edges. It is closer to the motion trajectory of the robot in actual work, which, in turn, improves the smoothness and flexibility of the robot’s motion in different working environments and reduces the energy consumption of the robot in real work to a certain extent.Figure 10
Smoothing treatment.


### 5.3. Algorithm Comparison Analysis

In this study, the model sizes established are 20 × 20 and 30 × 30, each set up in two modes: simple and complex, and the method of this paper is compared with other studies to conduct experiments. The algorithm selection principles of this comparative experiment are mainly in three aspects: (1) the same model type: it can be run in a raster map. (2) It has operability: the actual algorithm can be simulated based on experimental descriptions in the literature. (3) The workload is consistent. Firstly, the TACO, literature [31], literature [32], and IAC-BSA are run 20 times each in a 20 × 20 map environment. Secondly, the traditional ACO, literature [33], and IAC-BSA are run 20 times each in a 30 × 30 map environment. The experiments are analyzed in terms of path length, convergence times, time spent, and the number of turns. The complexity, flexibility, and superiority of the algorithm are verified by the standard deviation index.


#### 5.3.1. 20 × 20 Environments

The path-finding results of each algorithm in complex and straightforward modes are illustrated in Figure11 and 12, respectively, and Table 3 contains the related simulation data. The cyan circle in the figure is the path start point S0.5,0.5, and the magenta pentagram indicates the path target point E19.5,19.5.Figure 11
Path optimization results in 20 × 20 simple environment. (a) TACO; Literature; (c) Literature; (d) IAC-BSA.
(a)(b)(c)(d)Figure 12
Path optimization results in 20 × 20 complex environment. (a) TACO; Literature; (c) Literature (d) IAC-BSA.
(a)(b)(c)(d)Table 3
Comparison of simulation results of each algorithm in a 20 × 20 environment.
TACOLiterature [31]Literature [32]IAC-BSASimpleComplexSimpleComplexSimpleComplexSimpleComplexOptimal path28.041628.627428.627429.213231.799030.384828.041628.6274Worst path28.041630.384830.870133.799040.041637.79928.041629.2132Average path28.041629.066630.232431.476835.720334.911228.041628.8647SDPath7.2900E-150.41981.24521.11712.33011.76807.290E-150.2920(Convergence)Min1042100100100100611(Convergence)Max21831001001001001227(Convergence)Avg1560100100100100919Shortest time/s4.26454.41944.46684.72194.25734.78382.38542.5194Longest time/s4.93615.30275.47455.31165.34545.22812.67572.8921Average time/s4.66934.74824.92064.94744.58094.96472.53892.7082SDTime0.18600.22650.26550.17670.25890.11130.07870.1054Number of turns61061361245As the algorithms iterate, the initial pheromone concentrations are distributed nonuniformly under the effect of the positive pheromone feedback mechanism. The algorithms have suitable initial values at the beginning of the iteration, which can guarantee the subsequent algorithms. Although the algorithm is guaranteed to search the path effectively, more edges are inevitable. Analysis shows that the turning points of each algorithm route in Figure11 are roughly the same, and none of them fall into the optimal local problem, which indicates that each algorithm has achieved the expected search effect. In Figure 12, each algorithm’s number of turning points increases significantly, especially in Figure 12(b), which has the most turning issues. The path curve of this paper has fewer inflection points, high smoothness, and more realistic path steering, which has higher superiority and universality.By combining Figure13 and the analysis in Table 3, it is evident that each algorithm can obtain the optimal solution. Still, there are significant differences in the solution quality, mainly in the following aspects: (1) the research method and the traditional ant colony algorithm can obtain optimal paths in simple and complex models. In contrast, the routes received in the literature [31, 32] are not optimal. They are significantly more extensive and converge more than a threshold, indicating that they are less adaptable, fall into a local optimum, and merge relatively slowly in the environmental model of this paper. (2) In terms of time consumption, the traditional ant colony algorithm is similar to the literature [31, 32], with an average time consumption of 4.5 to 5 s. In both map environments, IAC-BSA takes the least time on average, 2.5389s and 2.7082s, respectively. On the one hand, for the analysis of the running time consumption aspect, IAC-BSA reduces 46% and 43% compared to TACO, 48% and 45% compared to the literature [27], and 45% compared to the literature [28], respectively. It shows that the algorithm in this paper has a faster convergence rate and higher efficiency. On the other hand, the SDTime (time-consuming standard deviation) of IAC-BSA is the least, indicating that the algorithm in this paper has the fastest read speed and significantly lower time complexity than other algorithms. (3) IAC-BSA has the most negligible average convergence yield of 9 and 19, with a 40% and 68% reduction compared to the basic ACO algorithm. Compared to the literature [31, 32], the average convergence rate is reduced by 91% and 81%, respectively. It shows the fast convergence of the algorithm in this article. (4) The path standard deviation of this paper’s algorithm is 7.290E-15 and 0.2920, respectively, the smallest compared with the other three algorithms. It shows the higher stability of this research method. (5) The number of turns of IAC-BSA is 4 and 5, which are 33% and 50% reductions compared to both the traditional ant colony algorithm and the literature [31], respectively. Compared with the literature [32], the contractions are 33% and 58%, respectively. It indicates that IAC-BSA is more practical and reduces the energy consumption of the robot when steering.Figure 13
Path length trend in 20 × 20 environment. (a) Simple model. (b) Complex model.
(a)(b)The results reveal that the proposed algorithm has faster convergence per unit of running time, shorter path length, and considerably higher efficiency, reflecting that the spatial complexity of the algorithm in this paper is also lower than other algorithms. Therefore, IAC-BSA possesses greater practicality and flexibility.


#### 5.3.2. 30 × 30 Environments

Figures13 and 14 illustrate the path-finding results of each algorithm in simple and complex modes, respectively, and the corresponding simulation data are recorded in Table 4. The green circle in the figure is the path starting point S, and the magenta diamond indicates the path target point S29.5,29.5.Figure 14
Path optimization results in a 30 × 30 simple environment. (a) TACO. (b) Literature. (c) IAC-BSA.
(a)(b)(c)Table 4
Comparison of simulation results of each algorithm in a 30 × 30 environment.
TACOLiterature [33]IAC-BSASimpleComplexSimpleComplexSimpleComplexOptimal path42.769646.526942.769646.284342.769645.6985Worst path43.355369.598045.112751.598042.769649.3553Average path42.798954.450343.450349.104442.769647.4834SDPath0.13107.77550.70221.54321.458E-140.9903(Convergence)Min506122203022(Convergence)Max8610042554252(Convergence)Avg668633373740SDConvergence11.105213.60735.42418.77563.28438.5918Shortest time/s23.641918.454821.160616.254810.09039.4487Longest time/s24.878124.249124.628325.192512.918813.8194Average time/s24.272721.802223.801520.005510.657612.2670SDTime0.37061.05210.74633.03410.65411.0661Number of turns92051959The comprehensive analysis of Figure14–16 and Table 4 data shows that as the map size and environmental complexity increase, the difference in performance between the algorithms becomes more prominent, mainly in the following aspects: (1) the traditional ant colony algorithm falls into a local optimum in simple and complex modes. The conventional ant colony algorithm does not achieve the expected effect of finding the optimum, as shown in Figures 14(a) and 15(a) (red circled part), and there is also a particular deadlock problem. (2) The algorithm described in the literature [33] can search for paths reasonably accurately, and as shown in Figure 16(a), convergence is relatively fast and works reasonably well in simple models. However, it is less effective in finding optimal paths in complex patterns graphs. In particular, the literature [33] has more turning points and the edges of the path curve in the complex map, and the absolute path does not reach the optimal value. 3) The number of iterations of each algorithm is increased. IAC-BSA consumes 54% and 43% less time than TACO, respectively. Meanwhile, the elapsed time of IAC-BSA is reduced by 53% and 38%, respectively, compared to the literature [29]. As the map environment becomes complex, the number of operations of IAC-BSA increases, which causes the SDTime of IAC-BSA to be larger than TACO. However, the SDTime of IAC-BSA was smaller than the literature [29]. It indicates that the algorithm in this paper has superior realism and usability, low time complexity, and meets the standard requirements. (4) As far as the average number of iterations is concerned, the difference between this algorithm and the literature [33] is insignificant. However, for the same number of iterations, the path average of the IAC-BSA is the smallest. The difference between the two values is 0.6807 and 1.6210, respectively. As it is evident, the method discussed in this section is far more robust in terms of convergence speed and the ability to find the best solution. (5). The number of turns of IAC-BSA is 5 and 9, which are 44% and 55% less than the traditional ACO turning tips, respectively, and 53% less than the number of turns in the literature [33] in a complex environment, thus proving that the algorithm in this paper has lower energy consumption in practical applications.Figure 15
Path optimization results in a 30 × 30 complex environment. (a) TACO. (b) Literature. (c) IAC-BSA.
(a)(b)(c)Figure 16
Path length trend in 30 × 30 environment. (a) Simple model. (b) Complex model.
(a)(b)In terms of path standard deviation and convergence standard deviation, IAC-BSA is significantly smaller than other algorithms, indicating that the algorithm has higher stability and optimization accuracy. Overall, the algorithm still shows good superiority and robustness when path optimization in a 30 × 30 environment.The comprehensive analysis demonstrates that the method of this study exhibits better performance and effectiveness on different maps than the selected algorithms of the same type. On the other hand, with the increase of model size and terrain complexity, this paper’s algorithm helps improve adaptability, flexibility, and robustness. In particular, since the algorithm searches for fewer turn points, it indicates that the actual working time of the robot is shorter, which reduces energy consumption and enhances practicality.


## 5.1. Analysis of IAC-BSA Parameters and Solutions

In the IAC-BSA, two parameters have a more significant impact on the search accuracy:ß and δ. Generally, the larger the value of β, the faster the convergence speed, however, the optimal route of ant colony search will lose its randomness, and it is easy to fall into a local optimum. Similarly, the value of d is proportional to both the antibody concentration and the diversity of the population. However, too high a concentration of antibodies will cause the search to concentrate on one region, which is not conducive to global optimization. Based on the above analysis, it is necessary to determine the appropriate values to ensure the comprehensive performance of the algorithm. Since both ß and d are related to pheromones, consider the two algorithms’ mutual influence after fusion. Consequently, based on the experiments and relevant analysis of the literature, we choose the final value range of ß and δ: β∈6,10, and δ∈0.2,0.6.The default value is selected within the defined range and floats no more than ±15% of the respective field: (1)β0=ceilβmax1−15%; (2) δ0=ceilδmin1+15%.This validation was conducted in a complicated 30 × 30 scenario to demonstrate how each algorithm parameter adapts to its surroundings. The validation of both independent variable parametersβ and α was performed 20 times to ensure accuracy and objectivity, taking into account the influence of randomness factors. Tables 1 and 2 include the relevant experimental findings (MSE indicates the mean square error of the path length).Table 1
Path result afterß change (d = δ0).
IndicatorsOptimalLongestAverageVarianceMSE647.698575.840656.401853.45757.3114772.083345.526956.341573.61448.5799845.698563.840652.972532.11705.6671945.112754.941148.40114.58832.14201055.598045.941148.76296.47842.5453Table 2
Path result afterd change (ß = ß0).
IndicatorsOptimalLongestAverageVarianceMSE0.245.698568.183852.648242.66786.53210.345.112754.941148.40114.85532.14200.446.284365.840652.519933.62745.79890.567.254845.698552.331138.16446.17730.646.526973.254852.172540.23516.3431The parameter optimization results in Tables1 and 2 show that the path is optimal when the value of ß is 9, and the trail is optimal when the value of d is 0.3. In summary, the optimal combination of parameters in this experiment is β = 9 and δ = 0.3.This experiment illustrates the global merit-seeking capability of IAC-BSA by two functions, accuracy and diversity. The accuracy function is the standard deviation of the path SE (i), and the diversity function is the difference of the path solutions DF (i).From (19), the smaller the SE (i) value, the higher the solution’s degree of variability and accuracy. From equation (20), the more significant and more stable the DF (i) value, the greater the probability that the ant colony will find different solutions. Thus, the higher the possibility of determining the optimal global solution. Figure 8 depicts the accuracy and diversity curves acquired throughout the experiment.(19)SEi=∑i=1KLi,m−Li¯2M−1,(20)DFi=Li¯−Lbest,where Li,m denotes the path length of m ants in the ith iteration, Li¯ represents the average value of feasible paths, and Lbest indicates the optimal path value.Figure 8
Accuracy and diversity curves.As shown in Figure8, the accuracy curve gradually decreases as the algorithm iterates. It then fluctuates within an interval. The angle stabilizes when the standard deviation reduces to a certain degree, which indicates that the algorithm has good stability and reflects the high precision of the algorithm solution. The diversity curve first rises, then falls, and finally stabilizes, and the absolute value is greater than 0. The analysis of the curve trend shows that the algorithm has no duplicate solutions and the solutions have excellent diversity. It also indicates that the ant’s local and global search abilities are strong, and early maturity is low.


## 5.2. Comparison of Optimal Path Smoothing

The session focuses on validating the performance of the improved ant colony algorithm in Section3.2 and the immune ant colony algorithm in Section 4.2. Firstly, experiments are held separately for the improved ant colony algorithm and the immune ant colony algorithm in the same environment, and the results are analyzed. Secondly, after the above immune ant colony algorithm searches the paths, it introduces cubic B spline interpolation curves to smoothen them.Figure9 illustrates the optimization results for the improved ant colony algorithm and the immune ant colony method. Both methods can find the optimal path accurately, and neither of them has the problem of local optimum and deadlock compared with the standard ant colony algorithm. The comparative analysis shows that the improved ant colony algorithm has more turning points, which indicates that its global search capability needs further improvement. In contrast, the immune ant colony algorithm proposed on this basis has fewer turning points, which suggests that the timeliness and search flexibility of the latter are significantly higher.Figure 9
30 × 30 complex environment path optimization results. (a) Improved ant colony algorithm. (b) Immune ant colony algorithm.
(a)(b)Figure10 illustrates the immune ant colony algorithm’s route curve smoothing using three-time B spline interpolation (the red curve is the path after smoothing, and the black dashed line is the path before grinding). The research demonstrates that the smoothed route curve is smoother at the turning locations because of eliminating the edges. It is closer to the motion trajectory of the robot in actual work, which, in turn, improves the smoothness and flexibility of the robot’s motion in different working environments and reduces the energy consumption of the robot in real work to a certain extent.Figure 10
Smoothing treatment.


## 5.3. Algorithm Comparison Analysis

In this study, the model sizes established are 20 × 20 and 30 × 30, each set up in two modes: simple and complex, and the method of this paper is compared with other studies to conduct experiments. The algorithm selection principles of this comparative experiment are mainly in three aspects: (1) the same model type: it can be run in a raster map. (2) It has operability: the actual algorithm can be simulated based on experimental descriptions in the literature. (3) The workload is consistent. Firstly, the TACO, literature [31], literature [32], and IAC-BSA are run 20 times each in a 20 × 20 map environment. Secondly, the traditional ACO, literature [33], and IAC-BSA are run 20 times each in a 30 × 30 map environment. The experiments are analyzed in terms of path length, convergence times, time spent, and the number of turns. The complexity, flexibility, and superiority of the algorithm are verified by the standard deviation index.


### 5.3.1. 20 × 20 Environments

The path-finding results of each algorithm in complex and straightforward modes are illustrated in Figure11 and 12, respectively, and Table 3 contains the related simulation data. The cyan circle in the figure is the path start point S0.5,0.5, and the magenta pentagram indicates the path target point E19.5,19.5.Figure 11
Path optimization results in 20 × 20 simple environment. (a) TACO; Literature; (c) Literature; (d) IAC-BSA.
(a)(b)(c)(d)Figure 12
Path optimization results in 20 × 20 complex environment. (a) TACO; Literature; (c) Literature (d) IAC-BSA.
(a)(b)(c)(d)Table 3
Comparison of simulation results of each algorithm in a 20 × 20 environment.
TACOLiterature [31]Literature [32]IAC-BSASimpleComplexSimpleComplexSimpleComplexSimpleComplexOptimal path28.041628.627428.627429.213231.799030.384828.041628.6274Worst path28.041630.384830.870133.799040.041637.79928.041629.2132Average path28.041629.066630.232431.476835.720334.911228.041628.8647SDPath7.2900E-150.41981.24521.11712.33011.76807.290E-150.2920(Convergence)Min1042100100100100611(Convergence)Max21831001001001001227(Convergence)Avg1560100100100100919Shortest time/s4.26454.41944.46684.72194.25734.78382.38542.5194Longest time/s4.93615.30275.47455.31165.34545.22812.67572.8921Average time/s4.66934.74824.92064.94744.58094.96472.53892.7082SDTime0.18600.22650.26550.17670.25890.11130.07870.1054Number of turns61061361245As the algorithms iterate, the initial pheromone concentrations are distributed nonuniformly under the effect of the positive pheromone feedback mechanism. The algorithms have suitable initial values at the beginning of the iteration, which can guarantee the subsequent algorithms. Although the algorithm is guaranteed to search the path effectively, more edges are inevitable. Analysis shows that the turning points of each algorithm route in Figure11 are roughly the same, and none of them fall into the optimal local problem, which indicates that each algorithm has achieved the expected search effect. In Figure 12, each algorithm’s number of turning points increases significantly, especially in Figure 12(b), which has the most turning issues. The path curve of this paper has fewer inflection points, high smoothness, and more realistic path steering, which has higher superiority and universality.By combining Figure13 and the analysis in Table 3, it is evident that each algorithm can obtain the optimal solution. Still, there are significant differences in the solution quality, mainly in the following aspects: (1) the research method and the traditional ant colony algorithm can obtain optimal paths in simple and complex models. In contrast, the routes received in the literature [31, 32] are not optimal. They are significantly more extensive and converge more than a threshold, indicating that they are less adaptable, fall into a local optimum, and merge relatively slowly in the environmental model of this paper. (2) In terms of time consumption, the traditional ant colony algorithm is similar to the literature [31, 32], with an average time consumption of 4.5 to 5 s. In both map environments, IAC-BSA takes the least time on average, 2.5389s and 2.7082s, respectively. On the one hand, for the analysis of the running time consumption aspect, IAC-BSA reduces 46% and 43% compared to TACO, 48% and 45% compared to the literature [27], and 45% compared to the literature [28], respectively. It shows that the algorithm in this paper has a faster convergence rate and higher efficiency. On the other hand, the SDTime (time-consuming standard deviation) of IAC-BSA is the least, indicating that the algorithm in this paper has the fastest read speed and significantly lower time complexity than other algorithms. (3) IAC-BSA has the most negligible average convergence yield of 9 and 19, with a 40% and 68% reduction compared to the basic ACO algorithm. Compared to the literature [31, 32], the average convergence rate is reduced by 91% and 81%, respectively. It shows the fast convergence of the algorithm in this article. (4) The path standard deviation of this paper’s algorithm is 7.290E-15 and 0.2920, respectively, the smallest compared with the other three algorithms. It shows the higher stability of this research method. (5) The number of turns of IAC-BSA is 4 and 5, which are 33% and 50% reductions compared to both the traditional ant colony algorithm and the literature [31], respectively. Compared with the literature [32], the contractions are 33% and 58%, respectively. It indicates that IAC-BSA is more practical and reduces the energy consumption of the robot when steering.Figure 13
Path length trend in 20 × 20 environment. (a) Simple model. (b) Complex model.
(a)(b)The results reveal that the proposed algorithm has faster convergence per unit of running time, shorter path length, and considerably higher efficiency, reflecting that the spatial complexity of the algorithm in this paper is also lower than other algorithms. Therefore, IAC-BSA possesses greater practicality and flexibility.


### 5.3.2. 30 × 30 Environments

Figures13 and 14 illustrate the path-finding results of each algorithm in simple and complex modes, respectively, and the corresponding simulation data are recorded in Table 4. The green circle in the figure is the path starting point S, and the magenta diamond indicates the path target point S29.5,29.5.Figure 14
Path optimization results in a 30 × 30 simple environment. (a) TACO. (b) Literature. (c) IAC-BSA.
(a)(b)(c)Table 4
Comparison of simulation results of each algorithm in a 30 × 30 environment.
TACOLiterature [33]IAC-BSASimpleComplexSimpleComplexSimpleComplexOptimal path42.769646.526942.769646.284342.769645.6985Worst path43.355369.598045.112751.598042.769649.3553Average path42.798954.450343.450349.104442.769647.4834SDPath0.13107.77550.70221.54321.458E-140.9903(Convergence)Min506122203022(Convergence)Max8610042554252(Convergence)Avg668633373740SDConvergence11.105213.60735.42418.77563.28438.5918Shortest time/s23.641918.454821.160616.254810.09039.4487Longest time/s24.878124.249124.628325.192512.918813.8194Average time/s24.272721.802223.801520.005510.657612.2670SDTime0.37061.05210.74633.03410.65411.0661Number of turns92051959The comprehensive analysis of Figure14–16 and Table 4 data shows that as the map size and environmental complexity increase, the difference in performance between the algorithms becomes more prominent, mainly in the following aspects: (1) the traditional ant colony algorithm falls into a local optimum in simple and complex modes. The conventional ant colony algorithm does not achieve the expected effect of finding the optimum, as shown in Figures 14(a) and 15(a) (red circled part), and there is also a particular deadlock problem. (2) The algorithm described in the literature [33] can search for paths reasonably accurately, and as shown in Figure 16(a), convergence is relatively fast and works reasonably well in simple models. However, it is less effective in finding optimal paths in complex patterns graphs. In particular, the literature [33] has more turning points and the edges of the path curve in the complex map, and the absolute path does not reach the optimal value. 3) The number of iterations of each algorithm is increased. IAC-BSA consumes 54% and 43% less time than TACO, respectively. Meanwhile, the elapsed time of IAC-BSA is reduced by 53% and 38%, respectively, compared to the literature [29]. As the map environment becomes complex, the number of operations of IAC-BSA increases, which causes the SDTime of IAC-BSA to be larger than TACO. However, the SDTime of IAC-BSA was smaller than the literature [29]. It indicates that the algorithm in this paper has superior realism and usability, low time complexity, and meets the standard requirements. (4) As far as the average number of iterations is concerned, the difference between this algorithm and the literature [33] is insignificant. However, for the same number of iterations, the path average of the IAC-BSA is the smallest. The difference between the two values is 0.6807 and 1.6210, respectively. As it is evident, the method discussed in this section is far more robust in terms of convergence speed and the ability to find the best solution. (5). The number of turns of IAC-BSA is 5 and 9, which are 44% and 55% less than the traditional ACO turning tips, respectively, and 53% less than the number of turns in the literature [33] in a complex environment, thus proving that the algorithm in this paper has lower energy consumption in practical applications.Figure 15
Path optimization results in a 30 × 30 complex environment. (a) TACO. (b) Literature. (c) IAC-BSA.
(a)(b)(c)Figure 16
Path length trend in 30 × 30 environment. (a) Simple model. (b) Complex model.
(a)(b)In terms of path standard deviation and convergence standard deviation, IAC-BSA is significantly smaller than other algorithms, indicating that the algorithm has higher stability and optimization accuracy. Overall, the algorithm still shows good superiority and robustness when path optimization in a 30 × 30 environment.The comprehensive analysis demonstrates that the method of this study exhibits better performance and effectiveness on different maps than the selected algorithms of the same type. On the other hand, with the increase of model size and terrain complexity, this paper’s algorithm helps improve adaptability, flexibility, and robustness. In particular, since the algorithm searches for fewer turn points, it indicates that the actual working time of the robot is shorter, which reduces energy consumption and enhances practicality.


## 5.3.1. 20 × 20 Environments

The path-finding results of each algorithm in complex and straightforward modes are illustrated in Figure11 and 12, respectively, and Table 3 contains the related simulation data. The cyan circle in the figure is the path start point S0.5,0.5, and the magenta pentagram indicates the path target point E19.5,19.5.Figure 11
Path optimization results in 20 × 20 simple environment. (a) TACO; Literature; (c) Literature; (d) IAC-BSA.
(a)(b)(c)(d)Figure 12
Path optimization results in 20 × 20 complex environment. (a) TACO; Literature; (c) Literature (d) IAC-BSA.
(a)(b)(c)(d)Table 3
Comparison of simulation results of each algorithm in a 20 × 20 environment.
TACOLiterature [31]Literature [32]IAC-BSASimpleComplexSimpleComplexSimpleComplexSimpleComplexOptimal path28.041628.627428.627429.213231.799030.384828.041628.6274Worst path28.041630.384830.870133.799040.041637.79928.041629.2132Average path28.041629.066630.232431.476835.720334.911228.041628.8647SDPath7.2900E-150.41981.24521.11712.33011.76807.290E-150.2920(Convergence)Min1042100100100100611(Convergence)Max21831001001001001227(Convergence)Avg1560100100100100919Shortest time/s4.26454.41944.46684.72194.25734.78382.38542.5194Longest time/s4.93615.30275.47455.31165.34545.22812.67572.8921Average time/s4.66934.74824.92064.94744.58094.96472.53892.7082SDTime0.18600.22650.26550.17670.25890.11130.07870.1054Number of turns61061361245As the algorithms iterate, the initial pheromone concentrations are distributed nonuniformly under the effect of the positive pheromone feedback mechanism. The algorithms have suitable initial values at the beginning of the iteration, which can guarantee the subsequent algorithms. Although the algorithm is guaranteed to search the path effectively, more edges are inevitable. Analysis shows that the turning points of each algorithm route in Figure11 are roughly the same, and none of them fall into the optimal local problem, which indicates that each algorithm has achieved the expected search effect. In Figure 12, each algorithm’s number of turning points increases significantly, especially in Figure 12(b), which has the most turning issues. The path curve of this paper has fewer inflection points, high smoothness, and more realistic path steering, which has higher superiority and universality.By combining Figure13 and the analysis in Table 3, it is evident that each algorithm can obtain the optimal solution. Still, there are significant differences in the solution quality, mainly in the following aspects: (1) the research method and the traditional ant colony algorithm can obtain optimal paths in simple and complex models. In contrast, the routes received in the literature [31, 32] are not optimal. They are significantly more extensive and converge more than a threshold, indicating that they are less adaptable, fall into a local optimum, and merge relatively slowly in the environmental model of this paper. (2) In terms of time consumption, the traditional ant colony algorithm is similar to the literature [31, 32], with an average time consumption of 4.5 to 5 s. In both map environments, IAC-BSA takes the least time on average, 2.5389s and 2.7082s, respectively. On the one hand, for the analysis of the running time consumption aspect, IAC-BSA reduces 46% and 43% compared to TACO, 48% and 45% compared to the literature [27], and 45% compared to the literature [28], respectively. It shows that the algorithm in this paper has a faster convergence rate and higher efficiency. On the other hand, the SDTime (time-consuming standard deviation) of IAC-BSA is the least, indicating that the algorithm in this paper has the fastest read speed and significantly lower time complexity than other algorithms. (3) IAC-BSA has the most negligible average convergence yield of 9 and 19, with a 40% and 68% reduction compared to the basic ACO algorithm. Compared to the literature [31, 32], the average convergence rate is reduced by 91% and 81%, respectively. It shows the fast convergence of the algorithm in this article. (4) The path standard deviation of this paper’s algorithm is 7.290E-15 and 0.2920, respectively, the smallest compared with the other three algorithms. It shows the higher stability of this research method. (5) The number of turns of IAC-BSA is 4 and 5, which are 33% and 50% reductions compared to both the traditional ant colony algorithm and the literature [31], respectively. Compared with the literature [32], the contractions are 33% and 58%, respectively. It indicates that IAC-BSA is more practical and reduces the energy consumption of the robot when steering.Figure 13
Path length trend in 20 × 20 environment. (a) Simple model. (b) Complex model.
(a)(b)The results reveal that the proposed algorithm has faster convergence per unit of running time, shorter path length, and considerably higher efficiency, reflecting that the spatial complexity of the algorithm in this paper is also lower than other algorithms. Therefore, IAC-BSA possesses greater practicality and flexibility.


## 5.3.2. 30 × 30 Environments

Figures13 and 14 illustrate the path-finding results of each algorithm in simple and complex modes, respectively, and the corresponding simulation data are recorded in Table 4. The green circle in the figure is the path starting point S, and the magenta diamond indicates the path target point S29.5,29.5.Figure 14
Path optimization results in a 30 × 30 simple environment. (a) TACO. (b) Literature. (c) IAC-BSA.
(a)(b)(c)Table 4
Comparison of simulation results of each algorithm in a 30 × 30 environment.
TACOLiterature [33]IAC-BSASimpleComplexSimpleComplexSimpleComplexOptimal path42.769646.526942.769646.284342.769645.6985Worst path43.355369.598045.112751.598042.769649.3553Average path42.798954.450343.450349.104442.769647.4834SDPath0.13107.77550.70221.54321.458E-140.9903(Convergence)Min506122203022(Convergence)Max8610042554252(Convergence)Avg668633373740SDConvergence11.105213.60735.42418.77563.28438.5918Shortest time/s23.641918.454821.160616.254810.09039.4487Longest time/s24.878124.249124.628325.192512.918813.8194Average time/s24.272721.802223.801520.005510.657612.2670SDTime0.37061.05210.74633.03410.65411.0661Number of turns92051959The comprehensive analysis of Figure14–16 and Table 4 data shows that as the map size and environmental complexity increase, the difference in performance between the algorithms becomes more prominent, mainly in the following aspects: (1) the traditional ant colony algorithm falls into a local optimum in simple and complex modes. The conventional ant colony algorithm does not achieve the expected effect of finding the optimum, as shown in Figures 14(a) and 15(a) (red circled part), and there is also a particular deadlock problem. (2) The algorithm described in the literature [33] can search for paths reasonably accurately, and as shown in Figure 16(a), convergence is relatively fast and works reasonably well in simple models. However, it is less effective in finding optimal paths in complex patterns graphs. In particular, the literature [33] has more turning points and the edges of the path curve in the complex map, and the absolute path does not reach the optimal value. 3) The number of iterations of each algorithm is increased. IAC-BSA consumes 54% and 43% less time than TACO, respectively. Meanwhile, the elapsed time of IAC-BSA is reduced by 53% and 38%, respectively, compared to the literature [29]. As the map environment becomes complex, the number of operations of IAC-BSA increases, which causes the SDTime of IAC-BSA to be larger than TACO. However, the SDTime of IAC-BSA was smaller than the literature [29]. It indicates that the algorithm in this paper has superior realism and usability, low time complexity, and meets the standard requirements. (4) As far as the average number of iterations is concerned, the difference between this algorithm and the literature [33] is insignificant. However, for the same number of iterations, the path average of the IAC-BSA is the smallest. The difference between the two values is 0.6807 and 1.6210, respectively. As it is evident, the method discussed in this section is far more robust in terms of convergence speed and the ability to find the best solution. (5). The number of turns of IAC-BSA is 5 and 9, which are 44% and 55% less than the traditional ACO turning tips, respectively, and 53% less than the number of turns in the literature [33] in a complex environment, thus proving that the algorithm in this paper has lower energy consumption in practical applications.Figure 15
Path optimization results in a 30 × 30 complex environment. (a) TACO. (b) Literature. (c) IAC-BSA.
(a)(b)(c)Figure 16
Path length trend in 30 × 30 environment. (a) Simple model. (b) Complex model.
(a)(b)In terms of path standard deviation and convergence standard deviation, IAC-BSA is significantly smaller than other algorithms, indicating that the algorithm has higher stability and optimization accuracy. Overall, the algorithm still shows good superiority and robustness when path optimization in a 30 × 30 environment.The comprehensive analysis demonstrates that the method of this study exhibits better performance and effectiveness on different maps than the selected algorithms of the same type. On the other hand, with the increase of model size and terrain complexity, this paper’s algorithm helps improve adaptability, flexibility, and robustness. In particular, since the algorithm searches for fewer turn points, it indicates that the actual working time of the robot is shorter, which reduces energy consumption and enhances practicality.


## 6. Conclusion

This article presents a fusion method for agricultural robot route planning based on the immune algorithm, the ant colony algorithm, and cubic B spline interpolation. The approach combines the benefits of the three algorithms, significantly increasing the flexibility and variety of route planning and avoiding the energy consumption issue associated with excessive robot rotations. To validate the performance of the method suggested in this research, we conducted comparison tests with algorithms reported in the literature [31, 32], and [33] on several map models. The experimental results show that compared with the same type of path planning algorithms, the algorithm in this paper has the following advantages:(1)
Compared with other algorithms of the same type, the algorithm in this paper plans relatively shorter paths. The standard deviation of the obtained routes is significantly smaller than different algorithms, which improves the accuracy and flexibility of path planning and is more suitable for finding optimal paths in raster maps.(2)
In the model, the algorithm in this paper has relatively more minor algorithm running time when performing path planning. Compared with other algorithms, the minimum reduction in time consumption is 38%, and the maximum deduction is 54%, which indicates that the algorithm in this paper is more adaptable in the unknown model, so it takes less time and is more efficient.(3)
The algorithm in this paper makes the path turning points significantly reduced due to the smoothing process of the track. Compared with other algorithms, the number of turns is reduced by at least 33% and at most 58%, which reduces the energy consumption of robot walking, improves the robustness and is more in line with the walking pattern of the robot in practice.The path planning algorithm proposed in this paper, although it has achieved specific research results, also has the following problems and shortcomings:



---

*Source: 2585910-2022-04-22.xml*