# Smart City Landscape Design Based on Improved Particle Swarm Optimization Algorithm

Authors: Wenting Yao; Yongjun Ding
Journal: Complexity
 (2020)

---

## Abstract

Aiming at the shortcomings of standard particle swarm optimization (PSO) algorithms that easily fall into local optimum, this paper proposes an optimization algorithm (LTQPSO) that improves quantum behavioral particle swarms. Aiming at the problem of premature convergence of the particle swarm algorithm, the evolution speed of individual particles and the population dispersion are used to dynamically adjust the inertia weights to make them adaptive and controllable, thereby avoiding premature convergence. At the same time, the natural selection method is introduced into the traditional position update formula to maintain the diversity of the population, strengthen the global search ability of the LTQPSO algorithm, and accelerate the convergence speed of the algorithm. The improved LTQPSO algorithm is applied to landscape trail path planning, and the research results prove the effectiveness and feasibility of the algorithm.


---

## Body

## 1. Introduction

On the premise of prioritizing environmental beautification, the optimal path design of landscape trails in the green belt should be people-oriented. Landscape trails are places for people to take a leisurely stroll. Therefore, establishing an optimal road model is essential for designing landscape trails that are convenient for pedestrians. People have carried out many aspects of research on landscape trail design and proposed some related optimization algorithms. Among them, the particle swarm optimization algorithm (PSO algorithm) was proposed by Russell Eberhart and James Kennedy in 1995. The algorithm is derived from the bird predation behavior of the group [1–3]. The PSO algorithm is simple to operate and has the characteristics of portability, easy implementation, fast convergence, and so forth and can obtain satisfactory solutions through self-adjustment, so it has received extensive attention from many scholars. At present, the theoretical research on particle swarm optimization algorithm is mainly to analyze the convergence of the algorithm. Due to the randomness of the particle swarm optimization algorithm, it is not very good to use some mathematical methods to verify the convergence effect of the algorithm. Therefore, it is particularly important to study the trajectory of particles in the algorithm, the distribution of particles in the group, and its mathematical theory. Rabanel et al. [4] studied the trajectory of a single particle in the population and related parameters in the algorithm. Xie et al. [5] studied the convergence of the particle swarm optimization algorithm and gave the parameter value range to improve the algorithm’s search ability. Cui et al. [6] introduced a compression factor in the algorithm to control the particle trajectory and ensure the convergence of the algorithm. Qi et al. [7] analyzed the stability of the particle swarm optimization algorithm from the perspective of dynamics by using the Lyapunov stability and passive system theory in mathematics. Jatana and Suri [8] analyzed and verified the convergence of the algorithm from the interaction between particles. Yadav [9] theoretically analyzed the impact of speed on the convergence of the particle swarm optimization algorithm and gave a concrete proof. Chen and Li [10] used Markov’s related theories to derive the necessary conditions for the convergence of the standard particle swarm optimization algorithm.The research on the improvement of particle swarm optimization algorithm is mainly in the following aspects: the particle swarm optimization algorithm is improved from the perspective of inertia weight, learning factor, position and velocity update formula, and fusion with other algorithms [11–14]. In terms of inertia weight improvement, Li et al. [15] proposed a particle swarm optimization algorithm with linearly decreasing inertia weight, which improved the overall search ability of the algorithm. Nagra et al. [16] used random strategies to improve inertia weights. The improved algorithm not only improved the accuracy of the solution but also improved the solution speed of the algorithm. Elbaz et al. [17] used the cosine function to make nonlinear adjustments to the inertia weight, which improved the search efficiency of the algorithm and could effectively improve the premature phenomenon. In terms of learning factors, Wang et al. [18] proposed a particle swarm algorithm with variable acceleration factor, which improved the overall search ability of the algorithm. In terms of algorithm update formula improvement, Wei et al. [19] removed the speed formula in the algorithm and only the position update formula in the algorithm and proved the convergence of the improved algorithm; the algorithm became simpler and more efficient. Xu et al. [20] used the linear combination of the individual optimal position and the global optimal position to modify the individual optimal position and the global optimal position in the velocity formula, and the convergence speed of the algorithm was greatly improved. Luo and Gao [21] improved the location update formula, which effectively improved the search efficiency of the algorithm. In terms of fusion with other algorithms, Zheng et al. [22] added the selection mechanism in the genetic algorithm to the particle swarm optimization algorithm. The improved algorithm has an obvious optimization effect in solving the optimization problem of high-dimensional complex functions. Meshkati and Safi-Esfahani [23] merged the artificial bee colony algorithm with the particle algorithm optimization algorithm and successfully applied it to image segmentation. Che et al. [2] introduced the ant colony algorithm, and the improved particle swarm optimization algorithm has played a good optimization effect on solving the multiprocessor scheduling problem. Saffaran et al. [24] integrated the mechanism of the simulated annealing algorithm into the particle swarm optimization algorithm, thereby speeding up the algorithm's convergence speed and improving the algorithm's solution accuracy. Tang et al. [25] merged the differential evolution algorithm with the particle swarm algorithm to speed up the convergence speed of the algorithm. Wu et al. [26] designed an improved quantum evolution algorithm IPOQEA based on a niche coevolution strategy and enhanced particle swarm optimization (PSO). A method of boarding gate allocation based on IPOQEA is proposed, which allocates flights to appropriate boarding gates in different time periods. Finally, the actual operation data of Baiyun Airport is taken as an example to verify the effectiveness of the proposed method. In order to solve these problems, Wu et al. [27] designed an optimal mutation strategy based on the complementary advantages of five mutation strategies to develop a new improved DE algorithm WMSDE with wavelet basis functions, which can improve search quality and accelerate convergence to avoid falling into local optima and stagnation.Although the above algorithm has achieved good results, the PSO algorithm is still easy to fall into the local optimum. This will not only not achieve better experimental results but also increase time consumption. Therefore, this paper proposes an optimization algorithm based on improved particle swarms. The contributions of this article are as follows:(1)
Aiming at the problem of premature convergence of the particle swarm algorithm, this paper uses the evolution speed of individual particles and the population dispersion to dynamically adjust the inertia weights to make them adaptive and controllable, thereby avoiding premature convergence.(2)
This paper introduces the natural selection method into the traditional location update formula to maintain the diversity of the population, strengthen the global search ability of the LTQPSO algorithm, and accelerate the convergence speed of the algorithm.


## 2. Particle Swarm Optimization Algorithm

### 2.1. Introduction to Particle Swarm Optimization Algorithm

The particle swarm optimization algorithm [28] is a mathematical simulation model of the process of birds looking for food. In particle swarm optimization (PSO), two simple equations of motion are designed to guide particles to find the global optimal solution in order to simulate the predator-prey flight behavior of birds, thus realizing the mathematical modelling of swarm behavior. At the same time, as an iterative algorithm based on population, the concept of PSO algorithm is simple and easy to implement. In solving real engineering optimization problems, PSO algorithm has been successfully applied in many fields [29].In the basic particle swarm optimization algorithm, each particle is regarded as a potential solution of the problem to be optimized, and each particle has a fitness value determined by the optimization function. At the same time, each particle continuously iteratively updates its own speed and position, and the global optimal position finally found is the optimal solution to the problem to be optimized found by the algorithm.


### 2.2. Basic Principles of Particle Swarm Optimization Algorithm

Assuming that, in ann1-dimensional target search space, there are n2 particles in the population, the position of the i-th particle can be expressed as Ai=ai1,...,ain1, and the velocity of the particle is Bi=bi1,...,bin1, where i=1,...,n2. The optimal position searched by the i-th particle itself so far is denoted as la, and the optimal position found by the entire particle swarm is denoted as lb. Equations (1) and (2) give the particle speed and position update formulas: (1)Bip+1=Bip+k1l1la−Aip+k2l2lb−Aip,(2)Aip+1=Aip+Bip+1.Among them,Bip in formula (1) represents the velocity of the i-th particle in the p-th iteration; Aip represents the position of the i-th particle in the p-th iteration; k1 and k2 are learning factors, and usually c1 = c2 = 2; l1 and l2 are two random numbers with values within [0.1]; p represents the current iteration number of the algorithm.The inertia weightf is introduced and formula (1) is improved. The revised speed update formula is as follows: (3)Bip+1=fBip+k1l1la−Aip+k2l2lb−Aip.The experimental results in [30] show that when the inertia weight value f > 1.2, the particles can be developed in a larger search space, thereby improving the accuracy of the algorithm; when the inertia weight value f < 0.8, the particle will quickly move closer to the global optimal solution, and the algorithm can perform a fine search in a local area. Then when the value range of the inertia weight is within [0.8, 1.2], the algorithm may obtain the global optimal value, and it also requires a suitable number of iterations. Reference [30] also shows that introducing the inertia weight of the linear decrement strategy in formula (3) can significantly improve the performance of the algorithm.


### 2.3. Basic Steps and Flowchart of Particle Swarm Optimization Algorithm

The basic steps of the particle swarm optimization algorithm are as follows:Step 1: Set relevant parameters in the particle swarm algorithmStep 2: Initialize the position and velocity of all particles in the populationStep 3: Calculate the fitness value of each particle in the particle swarm algorithm, and calculate the optimal position of the particle and the optimal position of the entire group at the same timeStep 4: Use formulas (2) and (3) to update the velocity and position of the particlesStep 5: If the maximum number of iterations is reached, the algorithm stops calculating and enters Step 6; otherwise, it returns to Step 3Step 6: Output the optimal valueThe flow chart of the particle swarm optimization algorithm is shown in Figure1.Figure 1
Flow chart of particle swarm optimization algorithm.


### 2.4. Problems of Particle Swarm Optimization Algorithm

Because the particle swarm optimization algorithm has the advantages of simple concept, few adjustment parameters, simple programming, and easy implementation, it has been successfully applied in many practical engineering optimization fields, but the particle swarm optimization algorithm itself still has the following problems [31, 32].


#### 2.4.1. Improvement of Inertia Weight Strategy

The improvement strategy of inertia weight has always been a hot research topic of many scholars. The general improvement strategy is based on the following idea: in the early stage of algorithm search, the inertia weight can obtain a larger weight, and the algorithm’s global search ability is strengthened. In the later stage of the algorithm search, the inertia weight can obtain a smaller weight, which is beneficial to the algorithm for local search. However, most of the improved inertia weighting strategies based on this idea lack rigorous theoretical proofs. Sometimes, the improved algorithm based on this strategy will decrease particle velocity in the late search period, leading to the tendency of particles in the population to the optimal solution position, the diversity of the population will be gradually lost, and the search efficiency of the algorithm will also be gradually weakened, resulting in the inability of the algorithm to jump out of the local optimum.


#### 2.4.2. Parameter Setting

In the particle swarm optimization algorithm, when different parameters are selected with different values, the optimization results of the particle swarm optimization algorithm are also different; for different improved algorithms, there is no specific parameter setting standard to solve the problem. For particle swarm optimization algorithm in specific practical applications, the improved algorithm may not be able to achieve good optimization performance, and sometimes it is necessary to combine the problem itself to make corresponding improvements to the algorithm.


#### 2.4.3. Algorithm Convergence Speed and Solution Accuracy

For most improved particle swarm optimization algorithms, when solving multimodal function problems, the algorithm may often fall into the local optimal value point. As a result, the particles may not be able to escape the local optimum in the subsequent search process and premature convergence appears. The accuracy of the solution is also difficult to improve. For most improved particle swarm algorithms, how to improve the convergence speed of the algorithm after reaching the specified accuracy is also one of the main research problems of the particle swarm algorithm.


## 2.1. Introduction to Particle Swarm Optimization Algorithm

The particle swarm optimization algorithm [28] is a mathematical simulation model of the process of birds looking for food. In particle swarm optimization (PSO), two simple equations of motion are designed to guide particles to find the global optimal solution in order to simulate the predator-prey flight behavior of birds, thus realizing the mathematical modelling of swarm behavior. At the same time, as an iterative algorithm based on population, the concept of PSO algorithm is simple and easy to implement. In solving real engineering optimization problems, PSO algorithm has been successfully applied in many fields [29].In the basic particle swarm optimization algorithm, each particle is regarded as a potential solution of the problem to be optimized, and each particle has a fitness value determined by the optimization function. At the same time, each particle continuously iteratively updates its own speed and position, and the global optimal position finally found is the optimal solution to the problem to be optimized found by the algorithm.


## 2.2. Basic Principles of Particle Swarm Optimization Algorithm

Assuming that, in ann1-dimensional target search space, there are n2 particles in the population, the position of the i-th particle can be expressed as Ai=ai1,...,ain1, and the velocity of the particle is Bi=bi1,...,bin1, where i=1,...,n2. The optimal position searched by the i-th particle itself so far is denoted as la, and the optimal position found by the entire particle swarm is denoted as lb. Equations (1) and (2) give the particle speed and position update formulas: (1)Bip+1=Bip+k1l1la−Aip+k2l2lb−Aip,(2)Aip+1=Aip+Bip+1.Among them,Bip in formula (1) represents the velocity of the i-th particle in the p-th iteration; Aip represents the position of the i-th particle in the p-th iteration; k1 and k2 are learning factors, and usually c1 = c2 = 2; l1 and l2 are two random numbers with values within [0.1]; p represents the current iteration number of the algorithm.The inertia weightf is introduced and formula (1) is improved. The revised speed update formula is as follows: (3)Bip+1=fBip+k1l1la−Aip+k2l2lb−Aip.The experimental results in [30] show that when the inertia weight value f > 1.2, the particles can be developed in a larger search space, thereby improving the accuracy of the algorithm; when the inertia weight value f < 0.8, the particle will quickly move closer to the global optimal solution, and the algorithm can perform a fine search in a local area. Then when the value range of the inertia weight is within [0.8, 1.2], the algorithm may obtain the global optimal value, and it also requires a suitable number of iterations. Reference [30] also shows that introducing the inertia weight of the linear decrement strategy in formula (3) can significantly improve the performance of the algorithm.


## 2.3. Basic Steps and Flowchart of Particle Swarm Optimization Algorithm

The basic steps of the particle swarm optimization algorithm are as follows:Step 1: Set relevant parameters in the particle swarm algorithmStep 2: Initialize the position and velocity of all particles in the populationStep 3: Calculate the fitness value of each particle in the particle swarm algorithm, and calculate the optimal position of the particle and the optimal position of the entire group at the same timeStep 4: Use formulas (2) and (3) to update the velocity and position of the particlesStep 5: If the maximum number of iterations is reached, the algorithm stops calculating and enters Step 6; otherwise, it returns to Step 3Step 6: Output the optimal valueThe flow chart of the particle swarm optimization algorithm is shown in Figure1.Figure 1
Flow chart of particle swarm optimization algorithm.


## 2.4. Problems of Particle Swarm Optimization Algorithm

Because the particle swarm optimization algorithm has the advantages of simple concept, few adjustment parameters, simple programming, and easy implementation, it has been successfully applied in many practical engineering optimization fields, but the particle swarm optimization algorithm itself still has the following problems [31, 32].


### 2.4.1. Improvement of Inertia Weight Strategy

The improvement strategy of inertia weight has always been a hot research topic of many scholars. The general improvement strategy is based on the following idea: in the early stage of algorithm search, the inertia weight can obtain a larger weight, and the algorithm’s global search ability is strengthened. In the later stage of the algorithm search, the inertia weight can obtain a smaller weight, which is beneficial to the algorithm for local search. However, most of the improved inertia weighting strategies based on this idea lack rigorous theoretical proofs. Sometimes, the improved algorithm based on this strategy will decrease particle velocity in the late search period, leading to the tendency of particles in the population to the optimal solution position, the diversity of the population will be gradually lost, and the search efficiency of the algorithm will also be gradually weakened, resulting in the inability of the algorithm to jump out of the local optimum.


### 2.4.2. Parameter Setting

In the particle swarm optimization algorithm, when different parameters are selected with different values, the optimization results of the particle swarm optimization algorithm are also different; for different improved algorithms, there is no specific parameter setting standard to solve the problem. For particle swarm optimization algorithm in specific practical applications, the improved algorithm may not be able to achieve good optimization performance, and sometimes it is necessary to combine the problem itself to make corresponding improvements to the algorithm.


### 2.4.3. Algorithm Convergence Speed and Solution Accuracy

For most improved particle swarm optimization algorithms, when solving multimodal function problems, the algorithm may often fall into the local optimal value point. As a result, the particles may not be able to escape the local optimum in the subsequent search process and premature convergence appears. The accuracy of the solution is also difficult to improve. For most improved particle swarm algorithms, how to improve the convergence speed of the algorithm after reaching the specified accuracy is also one of the main research problems of the particle swarm algorithm.


## 2.4.1. Improvement of Inertia Weight Strategy

The improvement strategy of inertia weight has always been a hot research topic of many scholars. The general improvement strategy is based on the following idea: in the early stage of algorithm search, the inertia weight can obtain a larger weight, and the algorithm’s global search ability is strengthened. In the later stage of the algorithm search, the inertia weight can obtain a smaller weight, which is beneficial to the algorithm for local search. However, most of the improved inertia weighting strategies based on this idea lack rigorous theoretical proofs. Sometimes, the improved algorithm based on this strategy will decrease particle velocity in the late search period, leading to the tendency of particles in the population to the optimal solution position, the diversity of the population will be gradually lost, and the search efficiency of the algorithm will also be gradually weakened, resulting in the inability of the algorithm to jump out of the local optimum.


## 2.4.2. Parameter Setting

In the particle swarm optimization algorithm, when different parameters are selected with different values, the optimization results of the particle swarm optimization algorithm are also different; for different improved algorithms, there is no specific parameter setting standard to solve the problem. For particle swarm optimization algorithm in specific practical applications, the improved algorithm may not be able to achieve good optimization performance, and sometimes it is necessary to combine the problem itself to make corresponding improvements to the algorithm.


## 2.4.3. Algorithm Convergence Speed and Solution Accuracy

For most improved particle swarm optimization algorithms, when solving multimodal function problems, the algorithm may often fall into the local optimal value point. As a result, the particles may not be able to escape the local optimum in the subsequent search process and premature convergence appears. The accuracy of the solution is also difficult to improve. For most improved particle swarm algorithms, how to improve the convergence speed of the algorithm after reaching the specified accuracy is also one of the main research problems of the particle swarm algorithm.


## 3. Hybrid Improved Quantum Behavior Particle Swarm Optimization Algorithm

### 3.1. QPSO Algorithm

According to the basic convergence properties of particle swarms and inspired by the basic theories of quantum physics, Sun et al. proposed the Quantum Particle Swarm Optimization (QPSO) algorithm. This algorithm improves the search strategy of the entire PSO algorithm. Its evolution equation does not require a velocity vector and has a simple form, fewer parameters, and easier control. The QPSO algorithm is superior to all developed PSO algorithms in terms of search capabilities.To transform the PSO algorithm, the equation expression obtained is as follows:(4)Aijp+1=Cijp+λ|Djp−Aijp|ln1y,(5)Cij=ξlaijp+1−ξlbjp,(6)lm=D1p,…,Ddp=1n∑i=1nlai1p,…,1n∑i=1nlai1p,(7)ξ=k1l1k1l1+k2l2.Among them, the position of thei-th particle at time p is Ai=Ai,1p,…,ai,Dp, the best position of the individual is lai=lai1p,…,laidp, the best position of the group is lbi=lbi1p,…,lbidp, the average best position is lm=D1p,…,Ddp, the dimension and number of particles are d and n, respectively, λ is expansion-compression factor, k1 and k2 represent learning factors, and l1 and l2 represent uniformly distributed values.The particle swarm algorithm of formula (5) is collectively called the quantum behavior particle swarm optimization algorithm.


### 3.2. The Principle of Hybrid Improved Quantum Behavior Particle Swarm Optimization Algorithm

In the evolutionary algorithm, reasonable algorithm control parameters have a greater impact on the performance of the algorithm. In order to improve the convergence of the QPSO algorithm, its evolutionary expressions (4) and (7) have been studied. According to the attraction point of the particle Cijp+1, formula (5) can be transformed into(8)Cijp+1=lbijp+ξlbijp−lbijp.From equations (4) and (8), we can see that there is a certain relationship between the point of attraction Cijp+1 of the updated particle and the best position lbp of the global population and the best position lap of the current particle. Aijp+1 is also related to the difference between the current particle's average position lm and its own position Ap. At present, many researchers have studied the influence of the average position lm of the entire group on the search behavior of the particle group during the search process. For the average position lm of the entire group, many methods for controlling parameters have been proposed. The inertial weight is an important part of the adjustable parameters of QPSO. When the inertial weight becomes larger, the global search performance of the algorithm can be improved, and the little the inertial weight can enhance the local search performance of the algorithm. However, the inertia weight value of the QPSO algorithm will decrease linearly as the evolutionary algebra becomes larger. If this method is used to describe the actual nonlinear and complex search process, the algorithm is more likely to fall into the local optimization extremum prematurely. As a result, the convergence speed of the algorithm also slows down.In the selection of algorithm parameters, this paper uses the evolution speed of individual particles and the dispersion of the group to dynamically adjust the weight of inertia, so that the weight of inertia is adaptive, so as to avoid falling into the local optimum; at the same time, natural selection is introduced into the optimal position postprocessing. The advantage of this method is to maintain the diversity and stability of the population, strengthen the global search ability of the QPSO algorithm, and improve the convergence speed of the algorithm.Assuming thatFlbp and FCip, respectively, represent the fitness value of the global optimal position and the fitness value of the current optimal position, the evolution speed of individual particles is defined as(9)gip=FlbpFCip.In the range of 0 <g ≤ 1, the smaller the value of g is, the faster the evolution speed will be. The particle position is consistent with its historical optimal position, and the current fitness value is compared with the changed particle fitness value. When the value of g remains at 1, it can be determined that the algorithm has obtained the optimal solution of the particle.Suppose that the standard deviation of the best position of the particle in the dimension of the particle isAp=C1lai,1p,...,Cdlai,dp, and, at the same time, the separation of the particle population in the evolution process is (10)Hip=Hi1p,...,Hidp=∂D1lai1p∂A1Ai1p,…,∂Ddlaicp∂AdAicp.It can be seen from formula (10) that H can describe the degree of discretization of particles and the diversity of the population. If the value of H increases, the degree of discretization of particles increases, but the diversity of particle populations will decrease. When H = 1, the best position la is exactly the same as the current position A, but the value of H will continue to change.We use standard functions to test the proposed inertia weights. The selected test functions are two nonlinear unimodal functions Sphere and two nonlinear multimodal raster functions. The number of test particles is 20, the maximum number of iterations is 100, and the particle dimension is 4. In the QPSO algorithm,k1 = 1, k2 = 2.1, and the expansion-contraction coefficient decreases from 1.0 to 0.5 in turn. In the maximum number of iterations, the floating range of individual particle evolution velocity is 0 ∼ 1, and the degree of population dispersion approximates 1 after constant oscillation, so it can be seen that the inertia weight can maintain the stability and diversity of the population. Using the above-mentioned transformation equation based on inertia weight to improve the QPSO algorithm, the equation for the improved QPSO algorithm is (11)Cijp+1=lbijp+ξgiplbijp−lbijp,(12)Aijp+1=Cijp+λp|lm−HjjpAijp|ln1y.It can be seen from equations (11) and (12) that the velocity parameters of individual particles have a greater impact on the changes in the best position of the particles and the optimal position of the global population. In the process of adjusting the particle position of the population dispersion, these parameters are dynamic control parameters.In order to improve the accuracy and stability of the algorithm in this paper, the natural selection algorithm is used to select the position of the particles. In the iterative process, the particles are arranged according to the function value from good to bad, and the state quantity of the best particle is selected according to the selection rule. The worst particle is finally sorted with the changed particle population. Equation (12) sorts the previous particle population and saves the historical optimal solution of each individual. Figure 2 shows the basic flow of the LTQPSO algorithm.Figure 2
Flow chart of LTQPSO algorithm.


## 3.1. QPSO Algorithm

According to the basic convergence properties of particle swarms and inspired by the basic theories of quantum physics, Sun et al. proposed the Quantum Particle Swarm Optimization (QPSO) algorithm. This algorithm improves the search strategy of the entire PSO algorithm. Its evolution equation does not require a velocity vector and has a simple form, fewer parameters, and easier control. The QPSO algorithm is superior to all developed PSO algorithms in terms of search capabilities.To transform the PSO algorithm, the equation expression obtained is as follows:(4)Aijp+1=Cijp+λ|Djp−Aijp|ln1y,(5)Cij=ξlaijp+1−ξlbjp,(6)lm=D1p,…,Ddp=1n∑i=1nlai1p,…,1n∑i=1nlai1p,(7)ξ=k1l1k1l1+k2l2.Among them, the position of thei-th particle at time p is Ai=Ai,1p,…,ai,Dp, the best position of the individual is lai=lai1p,…,laidp, the best position of the group is lbi=lbi1p,…,lbidp, the average best position is lm=D1p,…,Ddp, the dimension and number of particles are d and n, respectively, λ is expansion-compression factor, k1 and k2 represent learning factors, and l1 and l2 represent uniformly distributed values.The particle swarm algorithm of formula (5) is collectively called the quantum behavior particle swarm optimization algorithm.


## 3.2. The Principle of Hybrid Improved Quantum Behavior Particle Swarm Optimization Algorithm

In the evolutionary algorithm, reasonable algorithm control parameters have a greater impact on the performance of the algorithm. In order to improve the convergence of the QPSO algorithm, its evolutionary expressions (4) and (7) have been studied. According to the attraction point of the particle Cijp+1, formula (5) can be transformed into(8)Cijp+1=lbijp+ξlbijp−lbijp.From equations (4) and (8), we can see that there is a certain relationship between the point of attraction Cijp+1 of the updated particle and the best position lbp of the global population and the best position lap of the current particle. Aijp+1 is also related to the difference between the current particle's average position lm and its own position Ap. At present, many researchers have studied the influence of the average position lm of the entire group on the search behavior of the particle group during the search process. For the average position lm of the entire group, many methods for controlling parameters have been proposed. The inertial weight is an important part of the adjustable parameters of QPSO. When the inertial weight becomes larger, the global search performance of the algorithm can be improved, and the little the inertial weight can enhance the local search performance of the algorithm. However, the inertia weight value of the QPSO algorithm will decrease linearly as the evolutionary algebra becomes larger. If this method is used to describe the actual nonlinear and complex search process, the algorithm is more likely to fall into the local optimization extremum prematurely. As a result, the convergence speed of the algorithm also slows down.In the selection of algorithm parameters, this paper uses the evolution speed of individual particles and the dispersion of the group to dynamically adjust the weight of inertia, so that the weight of inertia is adaptive, so as to avoid falling into the local optimum; at the same time, natural selection is introduced into the optimal position postprocessing. The advantage of this method is to maintain the diversity and stability of the population, strengthen the global search ability of the QPSO algorithm, and improve the convergence speed of the algorithm.Assuming thatFlbp and FCip, respectively, represent the fitness value of the global optimal position and the fitness value of the current optimal position, the evolution speed of individual particles is defined as(9)gip=FlbpFCip.In the range of 0 <g ≤ 1, the smaller the value of g is, the faster the evolution speed will be. The particle position is consistent with its historical optimal position, and the current fitness value is compared with the changed particle fitness value. When the value of g remains at 1, it can be determined that the algorithm has obtained the optimal solution of the particle.Suppose that the standard deviation of the best position of the particle in the dimension of the particle isAp=C1lai,1p,...,Cdlai,dp, and, at the same time, the separation of the particle population in the evolution process is (10)Hip=Hi1p,...,Hidp=∂D1lai1p∂A1Ai1p,…,∂Ddlaicp∂AdAicp.It can be seen from formula (10) that H can describe the degree of discretization of particles and the diversity of the population. If the value of H increases, the degree of discretization of particles increases, but the diversity of particle populations will decrease. When H = 1, the best position la is exactly the same as the current position A, but the value of H will continue to change.We use standard functions to test the proposed inertia weights. The selected test functions are two nonlinear unimodal functions Sphere and two nonlinear multimodal raster functions. The number of test particles is 20, the maximum number of iterations is 100, and the particle dimension is 4. In the QPSO algorithm,k1 = 1, k2 = 2.1, and the expansion-contraction coefficient decreases from 1.0 to 0.5 in turn. In the maximum number of iterations, the floating range of individual particle evolution velocity is 0 ∼ 1, and the degree of population dispersion approximates 1 after constant oscillation, so it can be seen that the inertia weight can maintain the stability and diversity of the population. Using the above-mentioned transformation equation based on inertia weight to improve the QPSO algorithm, the equation for the improved QPSO algorithm is (11)Cijp+1=lbijp+ξgiplbijp−lbijp,(12)Aijp+1=Cijp+λp|lm−HjjpAijp|ln1y.It can be seen from equations (11) and (12) that the velocity parameters of individual particles have a greater impact on the changes in the best position of the particles and the optimal position of the global population. In the process of adjusting the particle position of the population dispersion, these parameters are dynamic control parameters.In order to improve the accuracy and stability of the algorithm in this paper, the natural selection algorithm is used to select the position of the particles. In the iterative process, the particles are arranged according to the function value from good to bad, and the state quantity of the best particle is selected according to the selection rule. The worst particle is finally sorted with the changed particle population. Equation (12) sorts the previous particle population and saves the historical optimal solution of each individual. Figure 2 shows the basic flow of the LTQPSO algorithm.Figure 2
Flow chart of LTQPSO algorithm.


## 4. Results and Discussion

### 4.1. LTQPSO Algorithm Parameters

For the path planning of the particle swarm algorithm, repeated simulation experiments are usually required. In the evolutionary algorithm, the number of particles, the particle dimension, and the maximum number of iterations are three crucial parameters. When planning the optimal path, first determine the basic parameters and then consider the working environment and establish an estimation method for the relationship between the parameters to realize the connection path planning. In this paper, through a convergent and feasible parameter simulation experiment based on the LTQPSO algorithm in a barrier-free environment, a linear regression equation of the basic parameters is obtained.In order to further analyze the relationship between the change of particle dimension and the number of iterations, this paper uses Matlab 2014a for simulation, the particle dimension isd (5 ≤d ≤ 20), the learning factors k1 = 2 and k2 = 2.1, and expansion-contraction coefficient is successively decreased from 1.0 to 0.5. Using the method where the values of k1 and k2 are fixed and λ decreases in sequence, the optimal path using polar coordinates and rectangular coordinates in a barrier-free environment is 14.14 m. Because the initial distribution has an effect on the convergence speed, the initial distribution is set to a uniform distribution and a normal distribution.The specific method of the simulation experiment is as follows: according to the order of the particle dimensions, the number of particles and the number of iterations are sequentially increased to repeat the experiment, and the average value of the optimal solution is obtained by performing 100 experiments and recording the largest and smallest values when the standard deviation is less than 0.05. The feasible convergence interval can be represented by the maximum value and the minimum value. For the parameters of the algorithm in this paper, the regression analysis of the two initial distributions is performed, respectively. Figure3 shows the maximum and minimum number of particles and the number of iterations of 100 experimental results obtained by averaging the initial distribution of LTQPSO under the change of particle dimensions.Figure 3
Simulation results of uniform distribution.From Figure3, we can see the change characteristics of the number of particles and the number of iterations. The change of its parameters is similar to that of the exponential function, so a one-variable linear regression equation can be used to express the basic parameters of path planning. Table 1 lists the regression analysis results of the basic parameters obtained by using the Matlab regression analysis “Regress” command.Table 1
Parametric regression analysis results for uniform distribution.
ParameterMinMaxRegression coefficientsb0−1.4432−0.8512b11.87011.7805Coefficient areab0(−1.71, −1.13)(−1.06, −0.58)b1(1.78, 1.87)(1.52, 1.79)StatisticsR211F1478.11385.9P00α00From the experimental results of the parameter regression analysis in Table1, it can be seen that the regression variation difference of the maximum value of the basic parameters of the LTQPSO algorithm is better than the minimum value. The unary linear regression equation of the basic parameters is(13)S=round0.4123L1.7091.The number of particles that converged in the average initial distribution and the number of iterations can be calculated by formula (13) according to the change of the number of particles in the LTQPSO algorithm.According to the above method, using the LTQPSO algorithm to perform 100 experiments on the particle dimensions under a normal distribution, the maximum number of particles, the minimum number of particles, and the number of iterations obtained are shown in Figure4.Figure 4
Simulation results of normal distribution.The change characteristics of the number of particles and the number of iterations can be seen in Figure4. The change of parameters is similar to that of the exponential function, so a linear regression equation can be used to express the basic parameters of path planning.Table2 lists the regression analysis results of the basic parameters obtained by using the Matlab regression analysis “Regress” command. According to the experimental results of parameter regression analysis in Table 2, the regression variation difference of the maximum value of the basic parameters of the LTQPSO algorithm is better than the minimum value. The unary linear regression equation of the basic parameters is(14)S=round0.3107L1.0865.Table 2
Parameter regression analysis results of normal distribution.
ParameterMinMaxRegression coefficientsb0−1.7086−1.1562b11.99061.8865Coefficient areab0(−2.11, −1.33)(−1.76, −0.98)b1(1.98, 2.17)(1.72, 1.99)StatisticsR20.9881F778.11125.9P00α0.0110In summary, in the path planning of mobile robots based on the LQPSO algorithm proposed in this paper, the LTQPSO algorithm can use equations (13) and (14) to determine the basic parameters, so it can be used for path planning of landscape trails.


### 4.2. Comparison Algorithm

Using the adaptive BP algorithm with momentum term, basic particle swarm optimization (BPSO) algorithm and improved particle swarm optimization (LTQPSO) algorithm’s error curve is shown in Figure5.Figure 5
Error curve of particle swarm optimization algorithm.It can be seen from Figure5 that the improved particle swarm optimization algorithm achieves the given error accuracy at about 260 steps, while the basic particle swarm optimization algorithm and the adaptive BP algorithm with momentum term use about 880 steps and 1,900 steps, respectively. By comparing the optimization error curves of different algorithms, the results show that the improved PSO has a much faster convergence rate, and the proposed algorithm has a smaller error.Using improved particle swarm optimization to approximate the given function, the curve obtained is shown in Figure6. Linear regression analysis is performed on the optimized simulation output results and target results, and the analysis results are shown in Figure 7. It can be seen from Figure 7 that the correlation coefficient between the optimized output result and the target result reaches 0.999.Figure 6
Optimized function approximation effect diagram.Figure 7
Regression analysis results after optimization.In order to verify the effectiveness of the proposed improved particle swarm algorithm, the above test function was optimized with 200 steps, and the test was repeated 30 times. The test results of the network mean square error obtained by the optimization of the three algorithms are shown in Table3.Table 3
Comparison of the mean square error results of the three algorithms on the test function.
MethodsBPBPSOLTQPSOOptimal MSE0.00180.00370.0009Worst MSE0.03210.09780.0015Mean0.01870.02650.0018Variance0.00120.00240.0006The test results in Table3 show that the optimal MSE and the worst MSE of the proposed algorithm are the lowest, and the variance is also the smallest, which shows that the algorithm proposed in this paper has strong stability. It can be known from the experimental results that the improved particle swarm optimization algorithm effectively improves the optimization accuracy and efficiency compared with the BP algorithm and the basic particle swarm algorithm.


### 4.3. Comparison of Algorithm Running Time and Number of Iterations

The traditional design method consumes huge computing resources and wastes time. The design of the optimization algorithm in this paper solves this problem well. The genetic algorithm has the best effect at present. The biggest feature of particle swarm optimization algorithm is that it can save time and computing resources more than genetic algorithm. The comparison result is shown in Figure8.Figure 8
Comparison of fitness function values and iteration times of the four algorithms.It can be seen from Figure8 that the algorithm in this paper can complete convergence in about 500 generations, while the genetic algorithm needs 1100 generations, and other algorithms need more than that. At the same time, comparing the running times of the algorithms, the running time of the genetic algorithm is 369.43 s, and the particle swarm optimization algorithm only takes 146.97 s. It is shown that the particle swarm optimization algorithm is faster than the genetic algorithm in design. Combined with the performance comparison in Table 3, it can be seen that the particle swarm optimization algorithm has improved the design efficiency of landscape trail path planning.Table4 shows the running time results of different algorithms. The computational complexity of the algorithm is proportional to the running time. It can be seen from Table 4 that the complexity of the algorithm in this paper is the lowest, and the corresponding running time is also the lowest.Table 4
Comparison of the running time results of the four algorithms.
MethodsBP (s)BPSO (s)GA (s)LTQPSO (s)Time0.1150.1371.0020.019


## 4.1. LTQPSO Algorithm Parameters

For the path planning of the particle swarm algorithm, repeated simulation experiments are usually required. In the evolutionary algorithm, the number of particles, the particle dimension, and the maximum number of iterations are three crucial parameters. When planning the optimal path, first determine the basic parameters and then consider the working environment and establish an estimation method for the relationship between the parameters to realize the connection path planning. In this paper, through a convergent and feasible parameter simulation experiment based on the LTQPSO algorithm in a barrier-free environment, a linear regression equation of the basic parameters is obtained.In order to further analyze the relationship between the change of particle dimension and the number of iterations, this paper uses Matlab 2014a for simulation, the particle dimension isd (5 ≤d ≤ 20), the learning factors k1 = 2 and k2 = 2.1, and expansion-contraction coefficient is successively decreased from 1.0 to 0.5. Using the method where the values of k1 and k2 are fixed and λ decreases in sequence, the optimal path using polar coordinates and rectangular coordinates in a barrier-free environment is 14.14 m. Because the initial distribution has an effect on the convergence speed, the initial distribution is set to a uniform distribution and a normal distribution.The specific method of the simulation experiment is as follows: according to the order of the particle dimensions, the number of particles and the number of iterations are sequentially increased to repeat the experiment, and the average value of the optimal solution is obtained by performing 100 experiments and recording the largest and smallest values when the standard deviation is less than 0.05. The feasible convergence interval can be represented by the maximum value and the minimum value. For the parameters of the algorithm in this paper, the regression analysis of the two initial distributions is performed, respectively. Figure3 shows the maximum and minimum number of particles and the number of iterations of 100 experimental results obtained by averaging the initial distribution of LTQPSO under the change of particle dimensions.Figure 3
Simulation results of uniform distribution.From Figure3, we can see the change characteristics of the number of particles and the number of iterations. The change of its parameters is similar to that of the exponential function, so a one-variable linear regression equation can be used to express the basic parameters of path planning. Table 1 lists the regression analysis results of the basic parameters obtained by using the Matlab regression analysis “Regress” command.Table 1
Parametric regression analysis results for uniform distribution.
ParameterMinMaxRegression coefficientsb0−1.4432−0.8512b11.87011.7805Coefficient areab0(−1.71, −1.13)(−1.06, −0.58)b1(1.78, 1.87)(1.52, 1.79)StatisticsR211F1478.11385.9P00α00From the experimental results of the parameter regression analysis in Table1, it can be seen that the regression variation difference of the maximum value of the basic parameters of the LTQPSO algorithm is better than the minimum value. The unary linear regression equation of the basic parameters is(13)S=round0.4123L1.7091.The number of particles that converged in the average initial distribution and the number of iterations can be calculated by formula (13) according to the change of the number of particles in the LTQPSO algorithm.According to the above method, using the LTQPSO algorithm to perform 100 experiments on the particle dimensions under a normal distribution, the maximum number of particles, the minimum number of particles, and the number of iterations obtained are shown in Figure4.Figure 4
Simulation results of normal distribution.The change characteristics of the number of particles and the number of iterations can be seen in Figure4. The change of parameters is similar to that of the exponential function, so a linear regression equation can be used to express the basic parameters of path planning.Table2 lists the regression analysis results of the basic parameters obtained by using the Matlab regression analysis “Regress” command. According to the experimental results of parameter regression analysis in Table 2, the regression variation difference of the maximum value of the basic parameters of the LTQPSO algorithm is better than the minimum value. The unary linear regression equation of the basic parameters is(14)S=round0.3107L1.0865.Table 2
Parameter regression analysis results of normal distribution.
ParameterMinMaxRegression coefficientsb0−1.7086−1.1562b11.99061.8865Coefficient areab0(−2.11, −1.33)(−1.76, −0.98)b1(1.98, 2.17)(1.72, 1.99)StatisticsR20.9881F778.11125.9P00α0.0110In summary, in the path planning of mobile robots based on the LQPSO algorithm proposed in this paper, the LTQPSO algorithm can use equations (13) and (14) to determine the basic parameters, so it can be used for path planning of landscape trails.


## 4.2. Comparison Algorithm

Using the adaptive BP algorithm with momentum term, basic particle swarm optimization (BPSO) algorithm and improved particle swarm optimization (LTQPSO) algorithm’s error curve is shown in Figure5.Figure 5
Error curve of particle swarm optimization algorithm.It can be seen from Figure5 that the improved particle swarm optimization algorithm achieves the given error accuracy at about 260 steps, while the basic particle swarm optimization algorithm and the adaptive BP algorithm with momentum term use about 880 steps and 1,900 steps, respectively. By comparing the optimization error curves of different algorithms, the results show that the improved PSO has a much faster convergence rate, and the proposed algorithm has a smaller error.Using improved particle swarm optimization to approximate the given function, the curve obtained is shown in Figure6. Linear regression analysis is performed on the optimized simulation output results and target results, and the analysis results are shown in Figure 7. It can be seen from Figure 7 that the correlation coefficient between the optimized output result and the target result reaches 0.999.Figure 6
Optimized function approximation effect diagram.Figure 7
Regression analysis results after optimization.In order to verify the effectiveness of the proposed improved particle swarm algorithm, the above test function was optimized with 200 steps, and the test was repeated 30 times. The test results of the network mean square error obtained by the optimization of the three algorithms are shown in Table3.Table 3
Comparison of the mean square error results of the three algorithms on the test function.
MethodsBPBPSOLTQPSOOptimal MSE0.00180.00370.0009Worst MSE0.03210.09780.0015Mean0.01870.02650.0018Variance0.00120.00240.0006The test results in Table3 show that the optimal MSE and the worst MSE of the proposed algorithm are the lowest, and the variance is also the smallest, which shows that the algorithm proposed in this paper has strong stability. It can be known from the experimental results that the improved particle swarm optimization algorithm effectively improves the optimization accuracy and efficiency compared with the BP algorithm and the basic particle swarm algorithm.


## 4.3. Comparison of Algorithm Running Time and Number of Iterations

The traditional design method consumes huge computing resources and wastes time. The design of the optimization algorithm in this paper solves this problem well. The genetic algorithm has the best effect at present. The biggest feature of particle swarm optimization algorithm is that it can save time and computing resources more than genetic algorithm. The comparison result is shown in Figure8.Figure 8
Comparison of fitness function values and iteration times of the four algorithms.It can be seen from Figure8 that the algorithm in this paper can complete convergence in about 500 generations, while the genetic algorithm needs 1100 generations, and other algorithms need more than that. At the same time, comparing the running times of the algorithms, the running time of the genetic algorithm is 369.43 s, and the particle swarm optimization algorithm only takes 146.97 s. It is shown that the particle swarm optimization algorithm is faster than the genetic algorithm in design. Combined with the performance comparison in Table 3, it can be seen that the particle swarm optimization algorithm has improved the design efficiency of landscape trail path planning.Table4 shows the running time results of different algorithms. The computational complexity of the algorithm is proportional to the running time. It can be seen from Table 4 that the complexity of the algorithm in this paper is the lowest, and the corresponding running time is also the lowest.Table 4
Comparison of the running time results of the four algorithms.
MethodsBP (s)BPSO (s)GA (s)LTQPSO (s)Time0.1150.1371.0020.019


## 5. Conclusion

The landscape trail optimization model designed by the improved particle swarm algorithm is feasible and effective and can reduce the construction cost of landscape trails. This paper proposes an optimization algorithm for improving quantum behavioral particle swarms (LTQPSO). Aiming at the problem of premature convergence of the particle swarm algorithm, the evolution speed of individual particles and the population dispersion are used to dynamically adjust the inertia weights to make them adaptive and controllable, thereby avoiding premature convergence. At the same time, the natural selection method is introduced into the traditional position update formula to maintain the diversity of the population, strengthen the global search ability of the LTQPSO algorithm, and accelerate the convergence speed of the algorithm. The improved LTQPSO algorithm is applied to landscape trail path planning. The research results prove that the algorithm is easier to guide and has a more efficient global search capability, showing higher efficiency and robustness.



---

*Source: 6693411-2020-12-01.xml*