# Trajectory Tracking of Soccer Motion Based on Multiobject Detection Algorithm

Authors: Yuping Xie
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

In order to improve the tracking ability of soccer robot in the complicated static and dynamic environment, a method of soccer trajectory tracking based on multiobject detection algorithm is proposed. This method makes use of the advantages of convenient polar coordinate calculation and realistic path simulation and puts the path coding of the soccer robot in two-dimensional polar coordinates. Then, the distance relationship between the current path point, the next path point, and the obstacle point is used to judge whether to carry out path planning. When the obstacle is encountered, the improved PSO algorithm with nonlinear inertia weight is called to carry out path planning. The simulation results show that under two obstacles, when the number of iterations isT=19, the soccer robot starts to avoid obstacles and intercept. When iteration number T=10, the soccer robot starts to avoid obstacles and intercept side by side. Under multiple obstacles, when T=19, the soccer robot starts to avoid obstacles and intercept in front. When T=30, the soccer robot reaches the target point. The convergence of the improved PSO algorithm and the effectiveness of path planning are verified.


---

## Body

## 1. Introduction

Soccer robot not only contains all the contents of multiagent system but also contains a more demanding dynamic environment and real-time requirements than the general system. First of all, soccer robot competition is a distributed multirobot system in which a group of robots fight against another group of robots, in which each robot is an intelligent body with decision-making ability [1]. In the course of the game, each robot can not only exert its individual ability but also exert its collective strength through coordination and cooperation. Second, the robots of each team on the playing field run everywhere for shooting or defending, making it a very complex dynamic environment that changes from moment to moment. Third, in order to defeat the other side, the robot teams of both sides must understand the dynamic changes of their own and the enemy camps in real time and make behavioral decisions based on the dynamic changes, namely, strategic issues such as overall attack, partial attack, or defense [2]. At the same time, in order to implement this decision, all agents must solve the problem of coordination and cooperation through communication [3]. Similarly, path planning has a wide range of applications, such as cruise missile path planning, aircraft path planning, robot manipulator path planning, TSP and its derivation of virtual assembly path planning and vehicle (VRP) path planning, road network based path planning, routing problems, electronic map GPS navigation path search and planning. In recent years, the research on robot path planning has made great progress in the depth and scope of the problem and formed a multidimensional research integrating theory, algorithm, and application. At the same time, some new intelligent algorithms have made significant breakthroughs with the gradual deepening of people’s research on natural phenomena and biological populations. Intelligent algorithm is the focus and hotspot of current path planning method research. Many new intelligent optimization algorithms have been applied in path planning, such as immune algorithm, immune genetic algorithm, immune chaos algorithm, particle swarm algorithm, ant colony algorithm, hybrid optimization algorithm, and heuristic search method. The emergence of these new intelligent optimization algorithms that simulate or refer to biological behaviors further stimulates the enthusiasm of researchers for theoretical and applied research on intelligent information processing systems and improves the development speed of highly intelligent information processing systems. Figure 1 shows a robust target tracking method and process that integrates detection processes.Figure 1
A robust target tracking method and process integrating detection process.


## 2. Literature Review

The early work on mobile robot path planning mainly focused on mobile robot obstacle avoidance in a static obstacle environment, which has been very mature. At present, the research focuses on dynamic path planning of mobile robots in a complex environment, including obstacle avoidance between mobile robots and static obstacles and collision avoidance between dynamic obstacles. To solve these problems, scholars at home and abroad have proposed a variety of dynamic path planning methods and achieved some results. Huang et al. proposed the method of rectangular wave transmission in the path planning process. In the transmission process, it is assumed that the wave reaches the grid cells of eight adjacent positions at the same time, which is easy to realize, but it is easy to cause the generated actual path is not the shortest path [4]. Therefore, Liu et al. proposed to replace a rectangular wave with the circular wave, assuming that the wave first reaches four grid units in horizontal and vertical directions and then four grid units on diagonal lines during transmission [5]. The circular wave solves the problem of the arrival of grid waves in different directions but increases the complexity of implementation. Kim et al. proposed the double-wave propagation algorithm, which reduced the time and space costs, and also took into account the influence of different terrain environments on path planning [6]. Aharonov et al. discussed the wave propagation path planning algorithm based on a fan-shaped grid map in polar coordinates and solved the problem of circular wave propagation radius by introducing the concepts of ring channel and ring region [7]. Zhang et al. proposed a multirobot global path planning algorithm combining an improved genetic algorithm and coevolution mechanism, which solved the local optimal problem in genetic algorithm path planning and achieved faster convergence speed [8]. Hong et al. proposed an immune genetic algorithm to complete path exploration in the complex environment [9]. Nabavi et al. proposed a static path planning method combining gravity search and particle swarm optimization, which transformed the multiobjective optimal solution problem into the optimal solution problem of a single objective, ensuring the maximum distance between the path and obstacles [10]. Malik et al. used the greedy algorithm to carry out path planning. When there were obstacles on the optimal path, they sought a new path through a turning point setting to reduce the system resources consumed by the algorithm. As the demand for robot intelligence increases, the environment it faces becomes more and more complex, and the focus of path planning research gradually turns to application research in the complex dynamic environment [11].At present, there are several common algorithms that can be used for the path planning of soccer robot. The basic idea of the artificial potential field method is to design an abstract virtual force field to deal with the movement of robot. The target produces “gravitation” to the robot, and the obstacle produces “repulsion” to the robot. The combined force of the target can be used to control the robot’s action, which can be applied to the path planning, but the problems of local minimum and unreachable target will occur. Ant colony algorithm is a global path planning algorithm, which can search the optimal path. However, the ant colony algorithm is affected by the location of the starting and ending points and the distribution of obstacles. When the environment space of the mobile robot is complex, the optimization convergence speed of the ant colony algorithm slows down, and the ants tend to fall into the infeasible point, and even the problem of path derouting and locking appears, which reduces the efficiency of path planning. Particle swarm optimization algorithm (ParticleSwarmOptimization) due to the search ability and convergence speed and higher efficiency, in the industrial production process and theory study, is widely used. It has great advantages in optimization problems, but the algorithm will converge to the local optimal solution prematurely in the process of search mechanism and optimization [12]. Static obstacle avoidance of the robot is carried out by adding dynamic inertial weights. The improved particle swarm optimization (PSO) algorithm is applied to dynamic and static obstacle avoidance of robots, which overcomes some shortcomings of pSO in the application field, such as nonconvergence, premature algorithm, and algorithm not adapting to the dynamic environment, and achieves good results.


## 3. The Research Methods

### 3.1. Soccer Robot Environment Modeling

#### 3.1.1. Idea of Modeling

In the path planning of a soccer robot, the robot should anticipate every advance. If there is an obstacle between the current point and the next point, the PSO algorithm is used to plan the path; otherwise, the robot continues to advance along the straight line of the target point according to the specified step size (ρ) [13].In order to make the calculation more convenient, the reciprocal formula of polar coordinates and Cartesian coordinates is shown as follows:(1)x=ρcosθ,y=ρsinθ,x2+y2=ρ2.


#### 3.1.2. Obstacle Judgment

Given a polar coordinate radiusρ and its moving step is equal to ρ, the circle with the current point as the center and radius ρ will judge whether there is an obstacle. If so, it will judge whether there is an obstacle between the current point and the next point. If so, the PSO algorithm will be called. The mathematical description of the judgment criteria is as follows.First, it is assumed that the robot is a small ball with radiusr, the moving step size is ρ, the current point is (A1, B1), the next point is (A2, B2), and the obstacle point is (C1, D1). Then, when r+ρ>A1−C12+B1−D12, it means that there are obstacles in the moving range. If A1−A22+B1−B22=A1−C12+B1−D12+A2−C12+B2−D12 indicates that the obstacle is on the line between the current point and the next point, then the PSO algorithm is called to carry out path planning; otherwise, the obstacle walks along a straight line.


#### 3.1.3. PSO Path Planning

The current point and the next point are divided intoN equal parts, each with width P/N, and a point is connected on the bisector, namely, a path Lj is obtained. Then, Lj is a particle j1≪j≪M，M， particles), and the dimension of the particle is, namely, a particle swarm of M × N is generated to solve the global optimal solution, namely, the optimal path.


### 3.2. Improved PSO Algorithm

#### 3.2.1. Fitness Function (Fit)

On the basis of taking the path length as a fitness function, the safety degree was added, and all parameters were weighted and averaged. The objective function of the shortest path length is shown in the following formula:(2)Yfi1=∑i=1nxji−xji−12+yji−yji−12,xji, yji is the coordinates of point i on path j, and xji−1, yji−1 is the coordinates of a point xji, yji on path j. At this point, the coordinate of the next point predicted by robot path planning is xjn, yjn, and this point and target point g1, g2 need to be connected to calculate the path. The length function of the entire path is shown in the following formulas:(3)Yfit2=xjn−g12+yjn−g22,(4)Y=Yfit1+Yfit2.Degree of avoiding obstacles—degree of safety (assuming that regional robots are all circles with radiusr, then the critical safety distance is 2r)—is shown in the following formula:(5)OBi=min0,xji−xk2+yji−yk2−2r.


#### 3.2.2. Constraint Function

If all the obstacles fall outside the circular area with robot centerO as the center and radius of 2r, the soccer robot can directly generate a straight path from the starting point to the end point. Similarly, the range of this path can be approximated as a rectangular area with a width of 4r and two boundary functions as the upper and lower limits. The function is shown in the following formula:(6)y=kx,kx−2r1+k2⩾y,kx+2r1+k2⩽y.Based on the above fitness functions,F=A×Y+B×OBi can be obtained, where A and B are the weighting factors of the two functions and are any real numbers greater than or equal to zero [14]. The proportion of Y and OBi in the fitness function can be adjusted by adjusting the size of A and B. For example, A = 1 and B = 0 represent the fitness function of path length only. In order to completely avoid obstacles, generally B ＜ A.


#### 3.2.3. PSO Algorithm for Nonlinear Dynamic Adjustment of Inertia Weight

The iterative formula of particle swarm velocity is shown in the following equation:(7)Vi,jt+1=wVi,jt+c1r1Pi,jt−xi,jt+c2r2Pg,jt−xi,jt,where r1, r2 are random real numbers greater than 0 and less than 1, c1andc2 are learning factors, Pi,j is the optimal location of particle i so far, and Pg,j is the global optimal location.According to Equation (7), the inertia weight factor (Weight) is used to control the influence of the velocity of the previous iteration on the current velocity and has the ability to balance the global search and local search of particles: the larger the w value is, the larger the global search ability is, and the weaker the local search ability is. The smaller the w value is, the stronger the local search capability is, and the weaker the global search capability is [15]. Theoretically, as the number of iterations increases, the inertia factor of weight should gradually decrease, so that the PSO algorithm has a strong global search ability at the beginning and strong local convergence ability at the later stage.Therefore, experts put forward the particle swarm optimization algorithm with linear decreasing law to change the inertia weight, as shown in the following formula:(8)w=wmax−wmax−wmin×KKmax.However, the optimal effect of Equation (8) in PSO is not obvious. According to the idea of decreasing inertia weight, a particle swarm optimization algorithm of dynamic nonlinear decreasing inertia weight is proposed, as shown in the following equation:(9)wk+1=wmin+wk−wmin×Kmax−kKmaxn,where wk is the value obtained in the current iteration, and its initial value is wmax; k represents the current iteration number; Kmax indicates the maximum number of iterations. The inertia weight wk+1 decreases nonlinearly from the initial value wmax with the different value of n and the iteratively varying value of wk [16, 17]. When k =0, wk+1 = wmax, it goes down to a minimum of wmin at k = Kmax. According to the different regions of individual particles and particle swarm, the inertia weight can decrease by different nonlinear exponents. When the individual particle and particle swarm are in the central region far from the individual extreme value and the global extreme value, take n =1.1. According to Equation (9), it can be seen that the inertia weight decreases slowly, so that the inertia weight has A large value in this stage, and the particle swarm will fly to the optimal position of the swarm at A fast speed. When individual particles and particle swarm gradually approach the target optimal value, n =0.9 can be taken after entering the central range. It can be seen from Equation (9) that the inertial weight drops faster, and particles conduct a more detailed search for the optimization target in the region where the optimal value is located [18].In order to verify the convergence of the improved algorithm, Ackley function was used for testing, as shown in the following formula:(10)fx=20+e−20×exp−0,2×0.5×x2+y2−exp0,5×cos2πx+cos2πy,where e=2.71282Function at (0,0,0,0, ..., 0) has a minimum value of 0. As shown in Figure2, it can be seen that the global optimal value of the Ackley function converges to 0. After adding dynamic nonlinear inertia weight, the global optimal value converges from 120 times to 70 times. In general, the improved algorithm converges faster and more accurately.Figure 2
Convergence curve of Ackley function.


### 3.3. Improve PSO Path Planning Algorithm Flow

Algorithm flow chart can be described as follows:(1)
Set the maximum value of inertia weightwmax and minimum value wmin, learning factor c1andc2, group D, and maximum iteration number Dmax. If constraint conditions are not met, take the current point as the origin and ρ as the radius for polar coordinates and carry out ρ equal portions; otherwise, generate a linear path from the starting point to the next path point.(2)
Randomly generatem particles and their positions Xi and velocity Vi. Set the current optimal position Pi=pi1,pi2,…,pd, form the initial population t0, Pbesti represents the optimal value searched by the i th particle, and Gbest represents the optimal value searched by the whole cluster.(3)
The initial population fitness value was calculated, and the global optimal valuePg was updated [19].(4)
A new particle swarmt1 was generated according to the velocity and position iterative formula.(5)
Calculate the fitness value oft1. If it is better than the previous generation, the next generation particle swarm t2 will be generated; otherwise, it will be converted to Cartesian coordinates [20].(6)
The algorithm is over. If the maximum number of iterations is reached or the accuracy requirements are met, the constraint conditions are judged again; otherwise, the loop is continued to iterate to update the particle swarm.


## 3.1. Soccer Robot Environment Modeling

### 3.1.1. Idea of Modeling

In the path planning of a soccer robot, the robot should anticipate every advance. If there is an obstacle between the current point and the next point, the PSO algorithm is used to plan the path; otherwise, the robot continues to advance along the straight line of the target point according to the specified step size (ρ) [13].In order to make the calculation more convenient, the reciprocal formula of polar coordinates and Cartesian coordinates is shown as follows:(1)x=ρcosθ,y=ρsinθ,x2+y2=ρ2.


### 3.1.2. Obstacle Judgment

Given a polar coordinate radiusρ and its moving step is equal to ρ, the circle with the current point as the center and radius ρ will judge whether there is an obstacle. If so, it will judge whether there is an obstacle between the current point and the next point. If so, the PSO algorithm will be called. The mathematical description of the judgment criteria is as follows.First, it is assumed that the robot is a small ball with radiusr, the moving step size is ρ, the current point is (A1, B1), the next point is (A2, B2), and the obstacle point is (C1, D1). Then, when r+ρ>A1−C12+B1−D12, it means that there are obstacles in the moving range. If A1−A22+B1−B22=A1−C12+B1−D12+A2−C12+B2−D12 indicates that the obstacle is on the line between the current point and the next point, then the PSO algorithm is called to carry out path planning; otherwise, the obstacle walks along a straight line.


### 3.1.3. PSO Path Planning

The current point and the next point are divided intoN equal parts, each with width P/N, and a point is connected on the bisector, namely, a path Lj is obtained. Then, Lj is a particle j1≪j≪M，M， particles), and the dimension of the particle is, namely, a particle swarm of M × N is generated to solve the global optimal solution, namely, the optimal path.


## 3.1.1. Idea of Modeling

In the path planning of a soccer robot, the robot should anticipate every advance. If there is an obstacle between the current point and the next point, the PSO algorithm is used to plan the path; otherwise, the robot continues to advance along the straight line of the target point according to the specified step size (ρ) [13].In order to make the calculation more convenient, the reciprocal formula of polar coordinates and Cartesian coordinates is shown as follows:(1)x=ρcosθ,y=ρsinθ,x2+y2=ρ2.


## 3.1.2. Obstacle Judgment

Given a polar coordinate radiusρ and its moving step is equal to ρ, the circle with the current point as the center and radius ρ will judge whether there is an obstacle. If so, it will judge whether there is an obstacle between the current point and the next point. If so, the PSO algorithm will be called. The mathematical description of the judgment criteria is as follows.First, it is assumed that the robot is a small ball with radiusr, the moving step size is ρ, the current point is (A1, B1), the next point is (A2, B2), and the obstacle point is (C1, D1). Then, when r+ρ>A1−C12+B1−D12, it means that there are obstacles in the moving range. If A1−A22+B1−B22=A1−C12+B1−D12+A2−C12+B2−D12 indicates that the obstacle is on the line between the current point and the next point, then the PSO algorithm is called to carry out path planning; otherwise, the obstacle walks along a straight line.


## 3.1.3. PSO Path Planning

The current point and the next point are divided intoN equal parts, each with width P/N, and a point is connected on the bisector, namely, a path Lj is obtained. Then, Lj is a particle j1≪j≪M，M， particles), and the dimension of the particle is, namely, a particle swarm of M × N is generated to solve the global optimal solution, namely, the optimal path.


## 3.2. Improved PSO Algorithm

### 3.2.1. Fitness Function (Fit)

On the basis of taking the path length as a fitness function, the safety degree was added, and all parameters were weighted and averaged. The objective function of the shortest path length is shown in the following formula:(2)Yfi1=∑i=1nxji−xji−12+yji−yji−12,xji, yji is the coordinates of point i on path j, and xji−1, yji−1 is the coordinates of a point xji, yji on path j. At this point, the coordinate of the next point predicted by robot path planning is xjn, yjn, and this point and target point g1, g2 need to be connected to calculate the path. The length function of the entire path is shown in the following formulas:(3)Yfit2=xjn−g12+yjn−g22,(4)Y=Yfit1+Yfit2.Degree of avoiding obstacles—degree of safety (assuming that regional robots are all circles with radiusr, then the critical safety distance is 2r)—is shown in the following formula:(5)OBi=min0,xji−xk2+yji−yk2−2r.


### 3.2.2. Constraint Function

If all the obstacles fall outside the circular area with robot centerO as the center and radius of 2r, the soccer robot can directly generate a straight path from the starting point to the end point. Similarly, the range of this path can be approximated as a rectangular area with a width of 4r and two boundary functions as the upper and lower limits. The function is shown in the following formula:(6)y=kx,kx−2r1+k2⩾y,kx+2r1+k2⩽y.Based on the above fitness functions,F=A×Y+B×OBi can be obtained, where A and B are the weighting factors of the two functions and are any real numbers greater than or equal to zero [14]. The proportion of Y and OBi in the fitness function can be adjusted by adjusting the size of A and B. For example, A = 1 and B = 0 represent the fitness function of path length only. In order to completely avoid obstacles, generally B ＜ A.


### 3.2.3. PSO Algorithm for Nonlinear Dynamic Adjustment of Inertia Weight

The iterative formula of particle swarm velocity is shown in the following equation:(7)Vi,jt+1=wVi,jt+c1r1Pi,jt−xi,jt+c2r2Pg,jt−xi,jt,where r1, r2 are random real numbers greater than 0 and less than 1, c1andc2 are learning factors, Pi,j is the optimal location of particle i so far, and Pg,j is the global optimal location.According to Equation (7), the inertia weight factor (Weight) is used to control the influence of the velocity of the previous iteration on the current velocity and has the ability to balance the global search and local search of particles: the larger the w value is, the larger the global search ability is, and the weaker the local search ability is. The smaller the w value is, the stronger the local search capability is, and the weaker the global search capability is [15]. Theoretically, as the number of iterations increases, the inertia factor of weight should gradually decrease, so that the PSO algorithm has a strong global search ability at the beginning and strong local convergence ability at the later stage.Therefore, experts put forward the particle swarm optimization algorithm with linear decreasing law to change the inertia weight, as shown in the following formula:(8)w=wmax−wmax−wmin×KKmax.However, the optimal effect of Equation (8) in PSO is not obvious. According to the idea of decreasing inertia weight, a particle swarm optimization algorithm of dynamic nonlinear decreasing inertia weight is proposed, as shown in the following equation:(9)wk+1=wmin+wk−wmin×Kmax−kKmaxn,where wk is the value obtained in the current iteration, and its initial value is wmax; k represents the current iteration number; Kmax indicates the maximum number of iterations. The inertia weight wk+1 decreases nonlinearly from the initial value wmax with the different value of n and the iteratively varying value of wk [16, 17]. When k =0, wk+1 = wmax, it goes down to a minimum of wmin at k = Kmax. According to the different regions of individual particles and particle swarm, the inertia weight can decrease by different nonlinear exponents. When the individual particle and particle swarm are in the central region far from the individual extreme value and the global extreme value, take n =1.1. According to Equation (9), it can be seen that the inertia weight decreases slowly, so that the inertia weight has A large value in this stage, and the particle swarm will fly to the optimal position of the swarm at A fast speed. When individual particles and particle swarm gradually approach the target optimal value, n =0.9 can be taken after entering the central range. It can be seen from Equation (9) that the inertial weight drops faster, and particles conduct a more detailed search for the optimization target in the region where the optimal value is located [18].In order to verify the convergence of the improved algorithm, Ackley function was used for testing, as shown in the following formula:(10)fx=20+e−20×exp−0,2×0.5×x2+y2−exp0,5×cos2πx+cos2πy,where e=2.71282Function at (0,0,0,0, ..., 0) has a minimum value of 0. As shown in Figure2, it can be seen that the global optimal value of the Ackley function converges to 0. After adding dynamic nonlinear inertia weight, the global optimal value converges from 120 times to 70 times. In general, the improved algorithm converges faster and more accurately.Figure 2
Convergence curve of Ackley function.


## 3.2.1. Fitness Function (Fit)

On the basis of taking the path length as a fitness function, the safety degree was added, and all parameters were weighted and averaged. The objective function of the shortest path length is shown in the following formula:(2)Yfi1=∑i=1nxji−xji−12+yji−yji−12,xji, yji is the coordinates of point i on path j, and xji−1, yji−1 is the coordinates of a point xji, yji on path j. At this point, the coordinate of the next point predicted by robot path planning is xjn, yjn, and this point and target point g1, g2 need to be connected to calculate the path. The length function of the entire path is shown in the following formulas:(3)Yfit2=xjn−g12+yjn−g22,(4)Y=Yfit1+Yfit2.Degree of avoiding obstacles—degree of safety (assuming that regional robots are all circles with radiusr, then the critical safety distance is 2r)—is shown in the following formula:(5)OBi=min0,xji−xk2+yji−yk2−2r.


## 3.2.2. Constraint Function

If all the obstacles fall outside the circular area with robot centerO as the center and radius of 2r, the soccer robot can directly generate a straight path from the starting point to the end point. Similarly, the range of this path can be approximated as a rectangular area with a width of 4r and two boundary functions as the upper and lower limits. The function is shown in the following formula:(6)y=kx,kx−2r1+k2⩾y,kx+2r1+k2⩽y.Based on the above fitness functions,F=A×Y+B×OBi can be obtained, where A and B are the weighting factors of the two functions and are any real numbers greater than or equal to zero [14]. The proportion of Y and OBi in the fitness function can be adjusted by adjusting the size of A and B. For example, A = 1 and B = 0 represent the fitness function of path length only. In order to completely avoid obstacles, generally B ＜ A.


## 3.2.3. PSO Algorithm for Nonlinear Dynamic Adjustment of Inertia Weight

The iterative formula of particle swarm velocity is shown in the following equation:(7)Vi,jt+1=wVi,jt+c1r1Pi,jt−xi,jt+c2r2Pg,jt−xi,jt,where r1, r2 are random real numbers greater than 0 and less than 1, c1andc2 are learning factors, Pi,j is the optimal location of particle i so far, and Pg,j is the global optimal location.According to Equation (7), the inertia weight factor (Weight) is used to control the influence of the velocity of the previous iteration on the current velocity and has the ability to balance the global search and local search of particles: the larger the w value is, the larger the global search ability is, and the weaker the local search ability is. The smaller the w value is, the stronger the local search capability is, and the weaker the global search capability is [15]. Theoretically, as the number of iterations increases, the inertia factor of weight should gradually decrease, so that the PSO algorithm has a strong global search ability at the beginning and strong local convergence ability at the later stage.Therefore, experts put forward the particle swarm optimization algorithm with linear decreasing law to change the inertia weight, as shown in the following formula:(8)w=wmax−wmax−wmin×KKmax.However, the optimal effect of Equation (8) in PSO is not obvious. According to the idea of decreasing inertia weight, a particle swarm optimization algorithm of dynamic nonlinear decreasing inertia weight is proposed, as shown in the following equation:(9)wk+1=wmin+wk−wmin×Kmax−kKmaxn,where wk is the value obtained in the current iteration, and its initial value is wmax; k represents the current iteration number; Kmax indicates the maximum number of iterations. The inertia weight wk+1 decreases nonlinearly from the initial value wmax with the different value of n and the iteratively varying value of wk [16, 17]. When k =0, wk+1 = wmax, it goes down to a minimum of wmin at k = Kmax. According to the different regions of individual particles and particle swarm, the inertia weight can decrease by different nonlinear exponents. When the individual particle and particle swarm are in the central region far from the individual extreme value and the global extreme value, take n =1.1. According to Equation (9), it can be seen that the inertia weight decreases slowly, so that the inertia weight has A large value in this stage, and the particle swarm will fly to the optimal position of the swarm at A fast speed. When individual particles and particle swarm gradually approach the target optimal value, n =0.9 can be taken after entering the central range. It can be seen from Equation (9) that the inertial weight drops faster, and particles conduct a more detailed search for the optimization target in the region where the optimal value is located [18].In order to verify the convergence of the improved algorithm, Ackley function was used for testing, as shown in the following formula:(10)fx=20+e−20×exp−0,2×0.5×x2+y2−exp0,5×cos2πx+cos2πy,where e=2.71282Function at (0,0,0,0, ..., 0) has a minimum value of 0. As shown in Figure2, it can be seen that the global optimal value of the Ackley function converges to 0. After adding dynamic nonlinear inertia weight, the global optimal value converges from 120 times to 70 times. In general, the improved algorithm converges faster and more accurately.Figure 2
Convergence curve of Ackley function.


## 3.3. Improve PSO Path Planning Algorithm Flow

Algorithm flow chart can be described as follows:(1)
Set the maximum value of inertia weightwmax and minimum value wmin, learning factor c1andc2, group D, and maximum iteration number Dmax. If constraint conditions are not met, take the current point as the origin and ρ as the radius for polar coordinates and carry out ρ equal portions; otherwise, generate a linear path from the starting point to the next path point.(2)
Randomly generatem particles and their positions Xi and velocity Vi. Set the current optimal position Pi=pi1,pi2,…,pd, form the initial population t0, Pbesti represents the optimal value searched by the i th particle, and Gbest represents the optimal value searched by the whole cluster.(3)
The initial population fitness value was calculated, and the global optimal valuePg was updated [19].(4)
A new particle swarmt1 was generated according to the velocity and position iterative formula.(5)
Calculate the fitness value oft1. If it is better than the previous generation, the next generation particle swarm t2 will be generated; otherwise, it will be converted to Cartesian coordinates [20].(6)
The algorithm is over. If the maximum number of iterations is reached or the accuracy requirements are met, the constraint conditions are judged again; otherwise, the loop is continued to iterate to update the particle swarm.


## 4. Results Analysis

### 4.1. Static Obstacle Avoidance with Particle Swarm Optimization

Particle swarm optimization algorithm with dynamic nonlinear inertial weights was used for robot path planning (static obstacles) [21].Simulation parameters are starting point [5, 5], target point [25, 25], polar radius = 5, obstacle point [20, 20], [8, 10], [10, 10], [12, 10], [24, 20], [18, 20]; learning factorc1 = c2  = 1.4962; inertia weight wmax = 0.9; wmin =0.4; dimension of search space m =10; population number N =30, iteration number T, maximum iteration number DTmax = 2000;As can be seen in Figure3, when T =5, the football robot starts to avoid the obstacle point [10, 10]. When T =15, the football robot starts to avoid the obstacle point [20, 20]. The inertia weight changes according to the linear decreasing law, and the path planned by PSO can avoid obstacles, but the effect is not very obvious [22]. As can be seen in Figure 4, when T =5, the football robot starts to avoid the obstacle point [10, 10]. When T =16, the football robot starts to avoid the obstacle point [20, 20]. Inertial weights change according to nonlinear dynamic laws, and the path planned by PSO can not only avoid obstacles but also have obvious effects [23].Figure 3
Robot path planning diagram of PSO algorithm before improvement.Figure 4
Improved PSO algorithm robot path planning diagram.


### 4.2. Dynamic Obstacle Avoidance with Particle Swarm Optimization

Particle swarm optimization (PSO) with dynamic nonlinear inertial weights is used for robot path planning (dynamic obstacles).Simulation parameters are starting point [0,0], target point [30, 30], polar radiusρ =2, learning factor c1 = c2 =1.4962; inertia weight wmax =0.9; wmin =0.4; dimension of search space m =10; population number N =30, iteration number T, maximum iteration number DTmax =2000; robot speed Vr = (1.5, 1.5);Figure5 shows (22, 22), Vo = (−0.06, −0.06).Figure 5
Frontal intercept obstacle avoidance.Figure6 shows 1 (10, 12), 2 (22, 22), and Vo1 = (−0.06, −0.06), Vo2 =(−0.1, 0.1).Figure 6
Frontal side intercept obstacle avoidance.Figure7 shows 1 (20, 10), 2 (22, 22), 3 (24, 20), and Vo1 =(-0.35, 0.35), Vo2 =(−0.1, −0.1), Vo3 =(0, 0.23), Vg =(−0.04, 0.04).Figure 7
Multiple obstacles intercept obstacle avoidance chase and target.In Figure5, when the iteration times T=19, the soccer robot starts to avoid obstacles and intercept in front. In Figure 6, when the iterations times T=10, the football robot starts to avoid the side intercept of obstacles, and when T=19, the football robot starts to avoid the front intercept of obstacles [24]. In Figure 7, when T=30, the soccer robot reaches the target point. As can be seen from Figures 5–7, the football robot can avoid obstacles in real time when facing moving obstacles in front and side interception, and chasing target points, with obvious effects [25].


## 4.1. Static Obstacle Avoidance with Particle Swarm Optimization

Particle swarm optimization algorithm with dynamic nonlinear inertial weights was used for robot path planning (static obstacles) [21].Simulation parameters are starting point [5, 5], target point [25, 25], polar radius = 5, obstacle point [20, 20], [8, 10], [10, 10], [12, 10], [24, 20], [18, 20]; learning factorc1 = c2  = 1.4962; inertia weight wmax = 0.9; wmin =0.4; dimension of search space m =10; population number N =30, iteration number T, maximum iteration number DTmax = 2000;As can be seen in Figure3, when T =5, the football robot starts to avoid the obstacle point [10, 10]. When T =15, the football robot starts to avoid the obstacle point [20, 20]. The inertia weight changes according to the linear decreasing law, and the path planned by PSO can avoid obstacles, but the effect is not very obvious [22]. As can be seen in Figure 4, when T =5, the football robot starts to avoid the obstacle point [10, 10]. When T =16, the football robot starts to avoid the obstacle point [20, 20]. Inertial weights change according to nonlinear dynamic laws, and the path planned by PSO can not only avoid obstacles but also have obvious effects [23].Figure 3
Robot path planning diagram of PSO algorithm before improvement.Figure 4
Improved PSO algorithm robot path planning diagram.


## 4.2. Dynamic Obstacle Avoidance with Particle Swarm Optimization

Particle swarm optimization (PSO) with dynamic nonlinear inertial weights is used for robot path planning (dynamic obstacles).Simulation parameters are starting point [0,0], target point [30, 30], polar radiusρ =2, learning factor c1 = c2 =1.4962; inertia weight wmax =0.9; wmin =0.4; dimension of search space m =10; population number N =30, iteration number T, maximum iteration number DTmax =2000; robot speed Vr = (1.5, 1.5);Figure5 shows (22, 22), Vo = (−0.06, −0.06).Figure 5
Frontal intercept obstacle avoidance.Figure6 shows 1 (10, 12), 2 (22, 22), and Vo1 = (−0.06, −0.06), Vo2 =(−0.1, 0.1).Figure 6
Frontal side intercept obstacle avoidance.Figure7 shows 1 (20, 10), 2 (22, 22), 3 (24, 20), and Vo1 =(-0.35, 0.35), Vo2 =(−0.1, −0.1), Vo3 =(0, 0.23), Vg =(−0.04, 0.04).Figure 7
Multiple obstacles intercept obstacle avoidance chase and target.In Figure5, when the iteration times T=19, the soccer robot starts to avoid obstacles and intercept in front. In Figure 6, when the iterations times T=10, the football robot starts to avoid the side intercept of obstacles, and when T=19, the football robot starts to avoid the front intercept of obstacles [24]. In Figure 7, when T=30, the soccer robot reaches the target point. As can be seen from Figures 5–7, the football robot can avoid obstacles in real time when facing moving obstacles in front and side interception, and chasing target points, with obvious effects [25].


## 5. Conclusion

In this essay, the path planning of soccer robot is accomplished by using the polar coordinate modeling method and improved particle swarm optimization algorithm with dynamic noninertial weights. The convergence of the algorithm is verified by the Ackley function, and the optimal path for obstacle avoidance is obtained in the face of static and dynamic obstacles. Static obstacle avoidance of the robot is carried out by adding dynamic inertial weights. The improved particle swarm optimization (PSO) algorithm is applied to dynamic and static obstacle avoidance of robots, which overcomes some shortcomings of pSO in the application field, such as nonconvergence, premature algorithm, and algorithm not adapting to the dynamic environment, and achieves good results. The simulation results show that the improved algorithm theory achieves the research purpose, and the data fitting can meet the real-time requirements in practical application.



---

*Source: 3602074-2022-08-27.xml*