# UCPSO: A Uniform Initialized Particle Swarm Optimization Algorithm with Cosine Inertia Weight

Authors: Jian Zhang; Jianan Sheng; Jiawei Lu; Ling Shen
Journal: Computational Intelligence and Neuroscience
 (2021)

---

## Abstract

The particle swarm optimization algorithm (PSO) is a meta-heuristic algorithm with swarm intelligence. It has the advantages of easy implementation, high convergence accuracy, and fast convergence speed. However, PSO suffers from falling into a local optimum or premature convergence, and a better performance of PSO is desired. Some methods adopt improvements in PSO parameters, particle initialization, or topological structure to enhance the global search ability and performance of PSO. These methods contribute to solving the problems above. Inspired by them, this paper proposes a variant of PSO with competitive performance called UCPSO. UCPSO combines three effective improvements: a cosine inertia weight, uniform initialization, and a rank-based strategy. The cosine inertia weight is an inertia weight in the form of a variable-period cosine function. It adopts a multistage strategy to balance exploration and exploitation. Uniform initialization can prevent the aggregation of initial particles. It distributes initial particles uniformly to avoid being trapped in a local optimum. A rank-based strategy is employed to adjust an individual particle’s inertia weight. It enhances the swarm’s capabilities of exploration and exploitation at the same time. Comparative experiments are conducted to validate the effectiveness of the three improvements. Experiments show that the UCPSO improvements can effectively improve global search ability and performance.


---

## Body

## 1. Introduction

Since the particle swarm optimization algorithm (PSO) was proposed by Kennedy and Eberhart in 1995 [1], it has obtained great achievements in finding the optimal value of continuous nonlinear equations [2]. PSO is a special branch of evolutionary algorithms. It adopts social learning among swarms and the self-cognition of individuals to replace the common theory of evolution algorithms (EAs)-survival of the fittest [3]. The bionics mechanism of PSO gives PSO swarm intelligence [4] and enables PSO to imitate the complex search behaviour of swarms, such as bird swarms, fish schools, and ant colonies. Different from EAs, PSO has a simpler iteration mechanism and fewer control parameters [5]. Therefore, it is widely used in practical engineering areas. For example, PSO is usually applied to image processing [6], parameter optimization [7, 8], scheduling optimization [9], clustering [10], and price forecasting [11].One of the main advantages of PSO is its easy implementation [12]. A large number of numerical experiments also prove that PSO has high convergence accuracy and a fast convergence speed [13]. Consequently, researchers have carried out numerous studies on PSO. However, some limitations of PSO have been found during long-term research work. When facing complex functions, PSO is troubled by falling into a local optimum or premature convergence [14]. Meanwhile, the performance of the original PSO is inadequate and must be improved. To solve these problems, many researchers have proposed improvements. These improvements mainly focus on PSO parameters, particle initialization, and population topology.Inertia weight is a very important parameter in the PSO algorithm. It controls the balance between the two critical behaviours of PSO: global and local search. Researchers have created various forms of inertia weight. These forms of inertia weight enhance the performance of PSO. Shi and Eberhart proposed a parameter called inertia weightω in PSO to balance exploration and exploitation [15]. The appearance of ω created a new way to improve the performance of PSO. Then, Eberhart and Shi introduced a linear decreasing inertia weight [16]. This linear decrease in inertia weight greatly improves the comprehensive performance of PSO. It relieves the problem of falling into a local optimum. Recently, Tian et al. adopted a multistage strategy to refine the change process of inertia weight. They split the curve of inertia weight into two stages to satisfy specific requirements. The variant proposed by them achieves excellent performance in the experiment [17].The quality of the initial particles is related to the PSO results. Many works have been performed to distribute initial particles more dispersedly and make initial particles closer to the global optimum. Tian [18], Zhang [19], and Xu [20] adopted chaotic sequences for particle initialization to increase the diversity of initial particles. Chaotic initialization achieves certain success compared to random initialization under the same conditions. Rahnamayan [21] employed the symmetry strategy in swarm initialization. Symmetry initialization can prevent initial particles from being distant from the global optimum. DMPSO [22] combines chaotic initialization with opposition-based initialization. Experiments validate that the hybrid initialization can recognize the search area better. In addition, MCJPSO [23] randomly divides the entire search space and distributed particles over a search space in independent slots. This semirandom initialization can overcome the limitation of the original PSO. Rauf et al. used the Weibull probability sequence to generate numbers at random locations for swarm initialization. This method is able to enhance the diversity of swarms [24].To enhance the global search ability and the comprehensive performance of PSO, a uniform initialized particle swarm optimization algorithm with cosine inertia weight (UCPSO) is proposed in this paper. UCPSO combines three effective improvements: an inertia weight in the form of a variable-period cosine function, uniform initialization, and a rank-based strategy for individual particle inertia weights. The cosine inertia weight introduced in this paper adopts the multistage strategy. It divides the change process of inertia weight into three stages. It can balance exploration and exploitation more specifically, help particles transform from global search to local search smoothly, and improve the convergence accuracy. Uniform initialization initializes a particle randomly as the basic point and then generates other initial particles based on this basic point. The initial particles are evenly distributed in each dimension, and the positions of each particle in each dimension are random. This mechanism can prevent the aggregation of initial particles. It distributes particles uniformly to recognize the search area more comprehensively. Uniform initialization is able to avoid falling into a local optimum and improve the search efficiency. In addition, this paper employs a rank-based strategy to adjust individual particle inertia weights. It makes the particles that are close to the swarm’s best position focus on mining and makes particles that are far away from the swarm’s best position keep exploring. It can enhance the global and local search ability of swarms at the same time.In recent years, researchers have proposed some effective variants of PSO. Ye et al. proposed an improved multiswarm particle swarm optimization with dynamic learning strategy (PSO-DLS). It classified particles of each subswarm into ordinary particles and communication particles [25]. Lynn and Suganthan proposed the ensemble particle swarm optimizer (EPSO), which combines the characteristics of several PSO variants [26]. In EPSO, the best-performing algorithm for each generation can be determined by a self-adaptive scheme. Heterogeneous comprehensive learning particle swarm optimization (HCLPSO) divides the whole swarm into an exploration subpopulation and an exploitation subpopulation [27]. The CL strategy is used to breed learning exemplars for both of them. Gong et al. proposed genetic learning particle swarm optimization (GLPSO), which adopts selection, mutation, and selection [28]. By performing these operators on the historical information of particles, GLPSO is able to construct diversified and high-qualified learning exemplars to guide the swarm.The purpose of designing UCPSO is to obtain a variant of PSO that has a good comprehensive performance and the ability to escape from a local optimum. In addition, three improvements in UCPSO should be easy to use. They are introduced to help researchers improve the global search ability and performance of PSO. A large number of comparative experiments based on benchmark functions were used to validate the effectiveness of the UCPSO improvements.This paper is organized as follows. Section2 introduces the standard PSO and related research on inertia weight and particle initialization. Section 3 describes the UCPSO and the three improvements in detail. Experiments are presented in Section 4. The conclusion is given in the Section 5.


## 2. Particle Swarm Optimization Algorithms

### 2.1. Standard PSO

PSO is a stochastic algorithm based on population [15]. It finds the optimal solution in a given range by mimicking the behaviour of birds. The particles in the swarm are potential solutions, and n is the total number of particles in the swarm. Every particle remembers its current position Xi, its current velocity Vi, and the best position that it has ever been Pbesti1≤i≤n. The swarm also remembers the swarm’s best position Gbest. The Xi,Vi,Pbesti,Gbest are all D-dimensional vectors, Xi=xi1,xi2,…,xid,…,xiD,Vi=vi1,vi2,…viD,Pbesti=pbesti1,pbesti2,…,pbestid,…,pbestiD,Gbest=gbest1,gbest2,…,gbestd,…,gbestD1≤d≤D. Particles find the optimal solution through iterations. The position and velocity of particles are updated as follows:(1)vidt+1=ω×vidt+c1×r1×pbestid−xidt+c2×r2×gbestd−xidt,(2)xidt+1=xidt+vidt+1,where t denotes the current iteration, t≤tmax. In addition, xid∈xdmin,xdmaxandvid∈vdmin,vdmax. ω is the inertia weight. c1 and c2 are acceleration coefficients, which control the influence of Pbesti, and Gbest in the iteration. r1 and r2 are random numbers in the range 0, 1. PSO is usually terminated after reaching the allowed maximum number of iterations or meeting the stopping criterion. The best solution of a problem is the final Gbest. Figure 1 shows the concept of a particle’s iteration in a graphical way.Figure 1
The concept of a particle’s iteration.In equation (1), ω×vidt represents the effect of inertia, c1×r1×pbestid−xidt represents the effect of self-cognition, and c2×r2×gbestd−xidt represents the effect of social learning. The cooperation between them contributes to finding the optimal solution. The function used to evaluate the position of a particle is usually called the fitness function FXi. To prevent particles from exceeding the search area, the position and velocity of a particle are always limited in the allowed range. When a particle reaches the boundary of the search area, its velocity should be reversed to improve the search efficiency. The pseudocode of the standard PSO is shown as follows (Algorithm 1):Algorithm 1: Pseudocode of the standard PSO.
(1)
Initializen, c1, c2, ω, particles’ position X and velocity V, then find Pbest and Gbest, t = 1;(2)
while (t ≤ tmax or the precision is not met)(3)
fori = 1 : n(4)
ford = 1 : D(5)
Update velocityvid by equation (1);(6)
Update positionxid by equation (2);(7)
End(8)
ifFXi<FPbesti(9)Pbesti=Xi;(10)ifFPbesti<FGbest(11)
Gbest=Pbesti;(12)
End(13)
End(14)
End(15)
t = t+1;(16)
End


### 2.2. Different Forms of Inertia Weight

The inertia weight reflects the influence of the previous velocityVit on the new velocity Vit+1. A large inertia weight can prevent particles from going to the region of interest (hereafter called the ROI) immediately. This makes particles continue to search outside the ROI for a period of time. A small inertia weight can make particles go to the ROI immediately and search in the ROI. That is, a large inertia weight enhances the global search capability (hereafter called exploration), and a small inertia weight enhances the local search capability (hereafter called exploitation). Exploration can prevent particles from falling into a local optimum, but it also leads to low convergence accuracy and a slow convergence speed. Exploitation can accelerate the convergence speed and improve the convergence accuracy, but it makes the algorithm converge prematurely or become trapped in a local optimum easily [29]. These two functions greatly influence the performance of PSO. Therefore, it is very important to choose an appropriate inertia weight.Since inertia weight was proposed, many researchers have made contributions in this field. Some classical forms of inertia weight have been proposed, such as time invariant [15], linear time variant [16, 30], nonlinear time variant [17, 31], and other forms of inertia weight [32–34]. The famous forms of inertia weight mentioned above are described in detail in the subsections below.


#### 2.2.1. Time Invariant Inertia Weight

To improve the performance of the original PSO, Shi and Eberhart proposed a parameter called inertia weightω to balance exploration and exploitation in 1998 [15]. First, the inertia weight appeared in the form of a constant. They found that a large inertia weight facilitates exploration, while a small inertia weight facilitates exploitation. The recommended range of inertia weight is [0.9, 1.2]. The computational results showed that the overall performance of PSO was improved empirically:(3)ω0t=constant,ω0t is easy to implement, so it has been widely used.


#### 2.2.2. Linear Time Variant Inertia Weight

After the concept of inertia weight was proposed, a linear time variant inertia weight was introduced in [16] to further improve the performance of the PSO algorithm. The mechanism of the linear time variant inertia weight ω1t is shown in the following equation:(4)ω1t=ωini−ttmaxωini−ωfin,ωini>ωfin.The initial valueωini to the final value ωfin as the number of iterations increases. The linear time variant inertia weight takes the demands of particles in different periods into account. The recommended values of ωini and ωfin are ωini=1.4andωfin=0.There are many other mechanisms of the linear time variant inertia weight. Specifically, Zheng proposed an increasing linear time variant inertia weightω2tωini<ωfin. It is proven that the increasing mechanism performs better than the decreasing mechanism in some test functions [30]. The mechanism of inertia weight ω2t is (5)ω2t=ωini+ttmaxωfin−ωini,ωini<ωfin.


#### 2.2.3. Nonlinear Time Variant Inertia Weight

Based on the linear time variant inertia weight, some researchers think that the nonlinear mechanism is more suitable for the demand of particles. Therefore, many nonlinear time variant mechanisms have been proposed. Chatterjee [31] introduced a nonlinear time variant inertia weight combined with a quadratic function, and its mechanism is(6)ω3t=ωini+ttmax2ωini−ωfin.For the sake of a better inertia weight, some researchers abandoned the continuous function and began to research the multiple stages of inertia weight. Tian [17] proposed a sigmoid increasing inertia weight ω4t and obtained an algorithm with satisfactory performance. The mechanism of inertia weight ω4t is as follows:(7)ω4t=ωini,t≤0.2×tmax,11+e10t−2tmax/tmax+ωfin,otherwise.


#### 2.2.4. Other Forms of Inertia Weight

Some researchers also proposed other effective strategies to adjust the inertia weight, such as random strategy, chaotic strategy, and self-adaptive strategy.Randomness is the natural property of PSO, and it is also the reason why PSO can be applied to almost all optimization problems. It is difficult to predict whether exploration or exploitation would be better during the iteration. To address this problem, researchers thought of using random strategies to adjust the inertia weight. A random inertia weightω5t was introduced in [32]. The mechanism of inertia weight ω5t is shown in(8)ω5t=0.5+rand2,where rand is a random number in the range [0, 1], so 0.5≤ω5≤1.Feng [33] used a chaotic strategy to adjust the inertia weight and obtain a chaotic inertia weight ω6t. He added a chaotic term zt to the linearly decreasing inertia weight. The mechanism of inertia weight ω6t is(9)ω6t=ωini−ωfintmax−ttmax+ωini×zt,(10)zt+1=4zt1−zt,where the initial value of zt is a random number in the range [0, 1], and zt≠0,0.25,0.5,0.75,1.Different from the random strategy and chaotic strategy, some researchers chose an index to adjust the value of inertia weight in real time. This kind of index can provide feedback on the state of the swarm. Zhang [34] et al. adopted an index φi to monitor the state of each particle, and they proposed a self-adjusted inertia weight ω7t. The mechanism of inertia weight ω7t is shown in the following equations:(11)φit+1=Gbestt−XitPbestit−Xit,(12)ω7t+1=ωini−ωfin1+eφt+1×t−1+lnφt+1×tmax/μ+ωfin,where μ = 100. On the right side of equation (11), the numerator is the Euclidean distance from the position of the ith particle to Gbest, and the denominator is the Euclidean distance from the position of the ith particle to Pbesti. Therefore, the index φi can reflect the state of the ith particle dynamically. The performance of the self-adaptive inertia weight in some test functions is excellent, but the mechanism of the self-adaptive inertia weight is usually very complicated. It is difficult to design a widely used index.


### 2.3. Particle Initialization

In addition, the quality of particle initialization is also critical to the performance of the PSO algorithm. The volatility of particle initialization is the primary cause of the volatility of convergence speed and accuracy.


#### 2.3.1. Random Initialization

The original method of particle initialization is random initialization. The position of each dimension of each particle is distributed in the allowed range independently and randomly, as shown in the following equation:(13)xid=rand×xdmax−xdmin+xdmin.After initialization, if particles are close to the global optimum, PSO tends to have good performance; if the particles are concentrated near the local optimum, PSO tends to fail. The random strategy of particle initialization inevitably leads to volatility of initialization. However, if particle initialization abandons randomness, it is very difficult for PSO to solve various optimization problems without prior knowledge. Fixed initialization can only solve specific problems.


#### 2.3.2. Chaotic Initialization

Chaotic initialization employs chaotic sequences to make particles more scattered. A common chaotic sequence called a logistic map is widely used because of its simple employment [35]. Its mechanism is as follows:(14)ZN=a×ZN−1×1−ZN−1,where ZN1≤N≤n is the chaotic variable, Z1 is a random value in the range 0, 1, and other chaotic variables are obtained by equation (14). To prevent chaotic variables from falling into a cycle, Z1 ≠ 0, 0.25, 0.5, 0.75, and 1. a is a constant that controls the level of chaos, and the recommended range for a is [3.5699, 4]. In this paper, ZN is obtained by equation (14) for 10 iterations to make the initial swarm more chaotic. After n × D chaotic variables are obtained, the chaotic initialization can be completed by replacing the random matrix with chaotic variables during the process of initialization.


#### 2.3.3. Opposition-Based Initialization

For two particles that are symmetrical about the centre of the search area, one particle of the two is closer to the global optimum than the other (it is a special case that the two distances are equal). Opposition-based initialization generates a subswarm randomly and combines it with its symmetric subswarm. Therefore, opposition-based initialization can avoid the situation in which all particles are far from the global optimum. Rahnamayan [21] introduced opposition-based initialization, and the mechanism of opposition-based initialization is shown in(15)xid=xdmax+xdmin−xn+1−id


## 2.1. Standard PSO

PSO is a stochastic algorithm based on population [15]. It finds the optimal solution in a given range by mimicking the behaviour of birds. The particles in the swarm are potential solutions, and n is the total number of particles in the swarm. Every particle remembers its current position Xi, its current velocity Vi, and the best position that it has ever been Pbesti1≤i≤n. The swarm also remembers the swarm’s best position Gbest. The Xi,Vi,Pbesti,Gbest are all D-dimensional vectors, Xi=xi1,xi2,…,xid,…,xiD,Vi=vi1,vi2,…viD,Pbesti=pbesti1,pbesti2,…,pbestid,…,pbestiD,Gbest=gbest1,gbest2,…,gbestd,…,gbestD1≤d≤D. Particles find the optimal solution through iterations. The position and velocity of particles are updated as follows:(1)vidt+1=ω×vidt+c1×r1×pbestid−xidt+c2×r2×gbestd−xidt,(2)xidt+1=xidt+vidt+1,where t denotes the current iteration, t≤tmax. In addition, xid∈xdmin,xdmaxandvid∈vdmin,vdmax. ω is the inertia weight. c1 and c2 are acceleration coefficients, which control the influence of Pbesti, and Gbest in the iteration. r1 and r2 are random numbers in the range 0, 1. PSO is usually terminated after reaching the allowed maximum number of iterations or meeting the stopping criterion. The best solution of a problem is the final Gbest. Figure 1 shows the concept of a particle’s iteration in a graphical way.Figure 1
The concept of a particle’s iteration.In equation (1), ω×vidt represents the effect of inertia, c1×r1×pbestid−xidt represents the effect of self-cognition, and c2×r2×gbestd−xidt represents the effect of social learning. The cooperation between them contributes to finding the optimal solution. The function used to evaluate the position of a particle is usually called the fitness function FXi. To prevent particles from exceeding the search area, the position and velocity of a particle are always limited in the allowed range. When a particle reaches the boundary of the search area, its velocity should be reversed to improve the search efficiency. The pseudocode of the standard PSO is shown as follows (Algorithm 1):Algorithm 1: Pseudocode of the standard PSO.
(1)
Initializen, c1, c2, ω, particles’ position X and velocity V, then find Pbest and Gbest, t = 1;(2)
while (t ≤ tmax or the precision is not met)(3)
fori = 1 : n(4)
ford = 1 : D(5)
Update velocityvid by equation (1);(6)
Update positionxid by equation (2);(7)
End(8)
ifFXi<FPbesti(9)Pbesti=Xi;(10)ifFPbesti<FGbest(11)
Gbest=Pbesti;(12)
End(13)
End(14)
End(15)
t = t+1;(16)
End


## 2.2. Different Forms of Inertia Weight

The inertia weight reflects the influence of the previous velocityVit on the new velocity Vit+1. A large inertia weight can prevent particles from going to the region of interest (hereafter called the ROI) immediately. This makes particles continue to search outside the ROI for a period of time. A small inertia weight can make particles go to the ROI immediately and search in the ROI. That is, a large inertia weight enhances the global search capability (hereafter called exploration), and a small inertia weight enhances the local search capability (hereafter called exploitation). Exploration can prevent particles from falling into a local optimum, but it also leads to low convergence accuracy and a slow convergence speed. Exploitation can accelerate the convergence speed and improve the convergence accuracy, but it makes the algorithm converge prematurely or become trapped in a local optimum easily [29]. These two functions greatly influence the performance of PSO. Therefore, it is very important to choose an appropriate inertia weight.Since inertia weight was proposed, many researchers have made contributions in this field. Some classical forms of inertia weight have been proposed, such as time invariant [15], linear time variant [16, 30], nonlinear time variant [17, 31], and other forms of inertia weight [32–34]. The famous forms of inertia weight mentioned above are described in detail in the subsections below.


### 2.2.1. Time Invariant Inertia Weight

To improve the performance of the original PSO, Shi and Eberhart proposed a parameter called inertia weightω to balance exploration and exploitation in 1998 [15]. First, the inertia weight appeared in the form of a constant. They found that a large inertia weight facilitates exploration, while a small inertia weight facilitates exploitation. The recommended range of inertia weight is [0.9, 1.2]. The computational results showed that the overall performance of PSO was improved empirically:(3)ω0t=constant,ω0t is easy to implement, so it has been widely used.


### 2.2.2. Linear Time Variant Inertia Weight

After the concept of inertia weight was proposed, a linear time variant inertia weight was introduced in [16] to further improve the performance of the PSO algorithm. The mechanism of the linear time variant inertia weight ω1t is shown in the following equation:(4)ω1t=ωini−ttmaxωini−ωfin,ωini>ωfin.The initial valueωini to the final value ωfin as the number of iterations increases. The linear time variant inertia weight takes the demands of particles in different periods into account. The recommended values of ωini and ωfin are ωini=1.4andωfin=0.There are many other mechanisms of the linear time variant inertia weight. Specifically, Zheng proposed an increasing linear time variant inertia weightω2tωini<ωfin. It is proven that the increasing mechanism performs better than the decreasing mechanism in some test functions [30]. The mechanism of inertia weight ω2t is (5)ω2t=ωini+ttmaxωfin−ωini,ωini<ωfin.


### 2.2.3. Nonlinear Time Variant Inertia Weight

Based on the linear time variant inertia weight, some researchers think that the nonlinear mechanism is more suitable for the demand of particles. Therefore, many nonlinear time variant mechanisms have been proposed. Chatterjee [31] introduced a nonlinear time variant inertia weight combined with a quadratic function, and its mechanism is(6)ω3t=ωini+ttmax2ωini−ωfin.For the sake of a better inertia weight, some researchers abandoned the continuous function and began to research the multiple stages of inertia weight. Tian [17] proposed a sigmoid increasing inertia weight ω4t and obtained an algorithm with satisfactory performance. The mechanism of inertia weight ω4t is as follows:(7)ω4t=ωini,t≤0.2×tmax,11+e10t−2tmax/tmax+ωfin,otherwise.


### 2.2.4. Other Forms of Inertia Weight

Some researchers also proposed other effective strategies to adjust the inertia weight, such as random strategy, chaotic strategy, and self-adaptive strategy.Randomness is the natural property of PSO, and it is also the reason why PSO can be applied to almost all optimization problems. It is difficult to predict whether exploration or exploitation would be better during the iteration. To address this problem, researchers thought of using random strategies to adjust the inertia weight. A random inertia weightω5t was introduced in [32]. The mechanism of inertia weight ω5t is shown in(8)ω5t=0.5+rand2,where rand is a random number in the range [0, 1], so 0.5≤ω5≤1.Feng [33] used a chaotic strategy to adjust the inertia weight and obtain a chaotic inertia weight ω6t. He added a chaotic term zt to the linearly decreasing inertia weight. The mechanism of inertia weight ω6t is(9)ω6t=ωini−ωfintmax−ttmax+ωini×zt,(10)zt+1=4zt1−zt,where the initial value of zt is a random number in the range [0, 1], and zt≠0,0.25,0.5,0.75,1.Different from the random strategy and chaotic strategy, some researchers chose an index to adjust the value of inertia weight in real time. This kind of index can provide feedback on the state of the swarm. Zhang [34] et al. adopted an index φi to monitor the state of each particle, and they proposed a self-adjusted inertia weight ω7t. The mechanism of inertia weight ω7t is shown in the following equations:(11)φit+1=Gbestt−XitPbestit−Xit,(12)ω7t+1=ωini−ωfin1+eφt+1×t−1+lnφt+1×tmax/μ+ωfin,where μ = 100. On the right side of equation (11), the numerator is the Euclidean distance from the position of the ith particle to Gbest, and the denominator is the Euclidean distance from the position of the ith particle to Pbesti. Therefore, the index φi can reflect the state of the ith particle dynamically. The performance of the self-adaptive inertia weight in some test functions is excellent, but the mechanism of the self-adaptive inertia weight is usually very complicated. It is difficult to design a widely used index.


## 2.2.1. Time Invariant Inertia Weight

To improve the performance of the original PSO, Shi and Eberhart proposed a parameter called inertia weightω to balance exploration and exploitation in 1998 [15]. First, the inertia weight appeared in the form of a constant. They found that a large inertia weight facilitates exploration, while a small inertia weight facilitates exploitation. The recommended range of inertia weight is [0.9, 1.2]. The computational results showed that the overall performance of PSO was improved empirically:(3)ω0t=constant,ω0t is easy to implement, so it has been widely used.


## 2.2.2. Linear Time Variant Inertia Weight

After the concept of inertia weight was proposed, a linear time variant inertia weight was introduced in [16] to further improve the performance of the PSO algorithm. The mechanism of the linear time variant inertia weight ω1t is shown in the following equation:(4)ω1t=ωini−ttmaxωini−ωfin,ωini>ωfin.The initial valueωini to the final value ωfin as the number of iterations increases. The linear time variant inertia weight takes the demands of particles in different periods into account. The recommended values of ωini and ωfin are ωini=1.4andωfin=0.There are many other mechanisms of the linear time variant inertia weight. Specifically, Zheng proposed an increasing linear time variant inertia weightω2tωini<ωfin. It is proven that the increasing mechanism performs better than the decreasing mechanism in some test functions [30]. The mechanism of inertia weight ω2t is (5)ω2t=ωini+ttmaxωfin−ωini,ωini<ωfin.


## 2.2.3. Nonlinear Time Variant Inertia Weight

Based on the linear time variant inertia weight, some researchers think that the nonlinear mechanism is more suitable for the demand of particles. Therefore, many nonlinear time variant mechanisms have been proposed. Chatterjee [31] introduced a nonlinear time variant inertia weight combined with a quadratic function, and its mechanism is(6)ω3t=ωini+ttmax2ωini−ωfin.For the sake of a better inertia weight, some researchers abandoned the continuous function and began to research the multiple stages of inertia weight. Tian [17] proposed a sigmoid increasing inertia weight ω4t and obtained an algorithm with satisfactory performance. The mechanism of inertia weight ω4t is as follows:(7)ω4t=ωini,t≤0.2×tmax,11+e10t−2tmax/tmax+ωfin,otherwise.


## 2.2.4. Other Forms of Inertia Weight

Some researchers also proposed other effective strategies to adjust the inertia weight, such as random strategy, chaotic strategy, and self-adaptive strategy.Randomness is the natural property of PSO, and it is also the reason why PSO can be applied to almost all optimization problems. It is difficult to predict whether exploration or exploitation would be better during the iteration. To address this problem, researchers thought of using random strategies to adjust the inertia weight. A random inertia weightω5t was introduced in [32]. The mechanism of inertia weight ω5t is shown in(8)ω5t=0.5+rand2,where rand is a random number in the range [0, 1], so 0.5≤ω5≤1.Feng [33] used a chaotic strategy to adjust the inertia weight and obtain a chaotic inertia weight ω6t. He added a chaotic term zt to the linearly decreasing inertia weight. The mechanism of inertia weight ω6t is(9)ω6t=ωini−ωfintmax−ttmax+ωini×zt,(10)zt+1=4zt1−zt,where the initial value of zt is a random number in the range [0, 1], and zt≠0,0.25,0.5,0.75,1.Different from the random strategy and chaotic strategy, some researchers chose an index to adjust the value of inertia weight in real time. This kind of index can provide feedback on the state of the swarm. Zhang [34] et al. adopted an index φi to monitor the state of each particle, and they proposed a self-adjusted inertia weight ω7t. The mechanism of inertia weight ω7t is shown in the following equations:(11)φit+1=Gbestt−XitPbestit−Xit,(12)ω7t+1=ωini−ωfin1+eφt+1×t−1+lnφt+1×tmax/μ+ωfin,where μ = 100. On the right side of equation (11), the numerator is the Euclidean distance from the position of the ith particle to Gbest, and the denominator is the Euclidean distance from the position of the ith particle to Pbesti. Therefore, the index φi can reflect the state of the ith particle dynamically. The performance of the self-adaptive inertia weight in some test functions is excellent, but the mechanism of the self-adaptive inertia weight is usually very complicated. It is difficult to design a widely used index.


## 2.3. Particle Initialization

In addition, the quality of particle initialization is also critical to the performance of the PSO algorithm. The volatility of particle initialization is the primary cause of the volatility of convergence speed and accuracy.


### 2.3.1. Random Initialization

The original method of particle initialization is random initialization. The position of each dimension of each particle is distributed in the allowed range independently and randomly, as shown in the following equation:(13)xid=rand×xdmax−xdmin+xdmin.After initialization, if particles are close to the global optimum, PSO tends to have good performance; if the particles are concentrated near the local optimum, PSO tends to fail. The random strategy of particle initialization inevitably leads to volatility of initialization. However, if particle initialization abandons randomness, it is very difficult for PSO to solve various optimization problems without prior knowledge. Fixed initialization can only solve specific problems.


### 2.3.2. Chaotic Initialization

Chaotic initialization employs chaotic sequences to make particles more scattered. A common chaotic sequence called a logistic map is widely used because of its simple employment [35]. Its mechanism is as follows:(14)ZN=a×ZN−1×1−ZN−1,where ZN1≤N≤n is the chaotic variable, Z1 is a random value in the range 0, 1, and other chaotic variables are obtained by equation (14). To prevent chaotic variables from falling into a cycle, Z1 ≠ 0, 0.25, 0.5, 0.75, and 1. a is a constant that controls the level of chaos, and the recommended range for a is [3.5699, 4]. In this paper, ZN is obtained by equation (14) for 10 iterations to make the initial swarm more chaotic. After n × D chaotic variables are obtained, the chaotic initialization can be completed by replacing the random matrix with chaotic variables during the process of initialization.


### 2.3.3. Opposition-Based Initialization

For two particles that are symmetrical about the centre of the search area, one particle of the two is closer to the global optimum than the other (it is a special case that the two distances are equal). Opposition-based initialization generates a subswarm randomly and combines it with its symmetric subswarm. Therefore, opposition-based initialization can avoid the situation in which all particles are far from the global optimum. Rahnamayan [21] introduced opposition-based initialization, and the mechanism of opposition-based initialization is shown in(15)xid=xdmax+xdmin−xn+1−id


## 2.3.1. Random Initialization

The original method of particle initialization is random initialization. The position of each dimension of each particle is distributed in the allowed range independently and randomly, as shown in the following equation:(13)xid=rand×xdmax−xdmin+xdmin.After initialization, if particles are close to the global optimum, PSO tends to have good performance; if the particles are concentrated near the local optimum, PSO tends to fail. The random strategy of particle initialization inevitably leads to volatility of initialization. However, if particle initialization abandons randomness, it is very difficult for PSO to solve various optimization problems without prior knowledge. Fixed initialization can only solve specific problems.


## 2.3.2. Chaotic Initialization

Chaotic initialization employs chaotic sequences to make particles more scattered. A common chaotic sequence called a logistic map is widely used because of its simple employment [35]. Its mechanism is as follows:(14)ZN=a×ZN−1×1−ZN−1,where ZN1≤N≤n is the chaotic variable, Z1 is a random value in the range 0, 1, and other chaotic variables are obtained by equation (14). To prevent chaotic variables from falling into a cycle, Z1 ≠ 0, 0.25, 0.5, 0.75, and 1. a is a constant that controls the level of chaos, and the recommended range for a is [3.5699, 4]. In this paper, ZN is obtained by equation (14) for 10 iterations to make the initial swarm more chaotic. After n × D chaotic variables are obtained, the chaotic initialization can be completed by replacing the random matrix with chaotic variables during the process of initialization.


## 2.3.3. Opposition-Based Initialization

For two particles that are symmetrical about the centre of the search area, one particle of the two is closer to the global optimum than the other (it is a special case that the two distances are equal). Opposition-based initialization generates a subswarm randomly and combines it with its symmetric subswarm. Therefore, opposition-based initialization can avoid the situation in which all particles are far from the global optimum. Rahnamayan [21] introduced opposition-based initialization, and the mechanism of opposition-based initialization is shown in(15)xid=xdmax+xdmin−xn+1−id


## 3. UCPSO Algorithm

Based on research on inertia weight and particle initialization, UCPSO is proposed to be a competitive variant of PSO. UCPSO adopts three new strategies, and their details are represented in the following sections.


### 3.1. Inertia Weight in the Form of Variable-Period Cosine Function

There is a popular form of nonlinear time variant inertia weight. It maintains a large value in the early stage and keeps a small value in the final stage. In common optimization problems, it can enhance the global search ability of PSO. Then, the multistage inertia weight was proposed. It puts forward more specific requirements for the change process of inertia weight: (a) initial stage: inertia weight keeps a large value for a period of time to carry out global search and reduces the probability of falling into local optimum (this stage is also called global search stage); (b) intermediate stage: inertia weight drops rapidly and transits from global search to local search (this stage is also called decelerating transition stage); (c) the final stage: inertia weight keeps a small value for a long time to help PSO converge to an accurate optimal solution quickly (this stage is also called the local search stage).The change process of the cosine function in the range0,π meets the requirements of the multistage inertia weight. In the range 0,π/6, the cosine function maintains a large value ≤3/2 and changes slowly. In the range π/6,5π/6, the cosine function declines rapidly. In the range 5π/6,π, the cosine function maintains a small value ≤−3/2 and changes slowly. Because the cosine function is simple and easy to use, an inertia weight in cosine form is adopted in this paper. However, the original cosine function is not consistent with the requirements of the multistage inertia weight. Therefore, the original cosine function needs to be adjusted. An iterative term It is added into the cosine function to adjust the period and ωcost is rescaled in the range ωfin,ωini as shown in the following equations:(16)ωcost=ωini+ωfin2+ωini−ωfin2×cosItπtmax,(17)It+1=It+a,I1=0,(18)a=a1,It≤tmax6,a2,tmax6<It≤5tmax6,a3,5tmax6<Ιt≤tmax,where a is a constant that can adjust the period of ωcost. The values of a1, a2, and a3 can control the length of each stage in ωcost According to the requirements of ωcost, we limit the phase Itπ/tmax in the range 0, π and Itπ/tmax is required to increase from 0 to π. While t increases from 0 to tmaxIt needs to increase from 0 to tmax. Therefore, a1, a2, and a3 have to satisfy the following equation:(19)16a1+23a2+16a3=1.The pseudocode of updatingωcos is shown as follows (Algorithm 2):Algorithm 2: Pseudocode of updating ωcos(t).
(1)
Leta = a1;(2)
fort = 1 : tmax(3)
Updateωcost by equation (16);(4)
ifIt≥5tmax/6(5)
a=a3;(6)
else ifIt≥tmax/6(7)
a = a2;(8)
end(9)
It+1=It+a;(10)
EndThe parameter analysis experiment fora1, a2, and a3 is shown in Section 4.2. The recommended configuration of a1,a2,anda3 is a1=4/3,a2=16/3,anda3=2/9. The curves of different inertia weights ω0t∼ω7t and ωcosta1=4/3,a2=16/3,a3=2/9 are displayed in Figures 2–4. In addition, their parameters are also illustrated.Figure 2
Curves of inertia weightω0t∼ω4tandωcost.Figure 3
Curve of inertia weightω5t.Figure 4
Curve of inertia weightω6t.To make the inertia weight have the same value range, in these inertia weights, allωini are set to 0.9, and all ωfin are set to 0.4 forω2t,ωini=0.4,ωfin=0.9,ω0t=0.9,andω5t=0.4+rand/2.


### 3.2. Uniform Initialization

There is no clear mechanism in random initialization, chaotic initialization, and opposition-based initialization to avoid the aggregation of initial particles. This situation will lead some areas to be searched repeatedly and some areas to be ignored. This reduces the search efficiency and the possibility of finding a global optimum.To solve this problem, a particle initialization method with both randomness and uniformity (called uniform initialization) is proposed in this paper. In Algorithm3, Line 1 initializes a particle randomly to be the base point, and X1=X11,X12,…,X1D is the position of the base point. Lines 2–4 generate a D×n−1 random matrix R=R1,R2,…,RD to ensure the randomness of the initial particles. Lines 5–12 divide the length of each dimension by n to obtain the minimum distance between particles in the corresponding dimension. Lines 5–12 distribute particles in each dimension uniformly and avoid the aggregation of particles. If the position of a particle exceeds the allowed range of a dimension, it will subtract the range of the corresponding dimension. The pseudocode of uniform initialization is shown as follows:Algorithm 3: Pseudocode of uniform initialization.
(1)
InitializeX1 in the search area randomly by equation (13);(2)
ford = 1 : D(3)
Randomly rearrange1,2,…,n−1 to get Rd=R1d,R2d,…,Rn−1d;(4)
End(5)
fori = 1 : n(6)
ford = 1 : D(7)
Xid=X1d+Ri−1d÷n×Xdmax−Xdmin;(8)
ifXid>Xdmax(9)
Xid=Xid−Xdmax−Xdmin;(10)
End(11)
End(12)
EndUniform initialization ensures that the distances between particles are larger than a certain value. It can avoid the aggregation of particles and distribute initial particles uniformly to recognize more areas at the beginning. Figure5 represents the result of uniform initialization. We find that the level of aggregation is low, and the distribution of particles is uniform. Uniform initialization is a good combination of randomness and uniformity. Figure 5 is completed under the configuration: n=50,D=2, the search area is a 4 × 4 rectangle.Figure 5
Results of the uniform initialization (2D).


### 3.3. Rank-Based Strategy for Individual Particle’s Inertia Weight (RIW)

The forms of inertia weight mentioned above are all assigned numerical values according to the state of the whole swarm. However, in fact, particles’ states are diverse. The individual particle’s need may not follow the swarm’s need. Particles that are already in the ROI need a small inertia weight to exploit. Particles that are far away from the ROI need a large inertia weight to explore. The single value of inertia weight cannot satisfy both requirements at the same time. Cooperation between these two kinds of particles can maximize the benefit of the whole swarm.A rank-based strategy is adopted by this paper to solve the problem. Generally, the particles with small fitness valuesFXi are in the current ROI, while the particles with large FXi are outside the ROI. Particles are sorted by fitness value from small to large. Adding a rank-based strategy to inertia weight can take both the overall and individual requirements into account simultaneously. The mechanism of the RIWs is shown in equations (20) and (21):(20)ωi=bi×ωswarm,(21)bi=b1,ranki≤n4,b2,otherwise,b3,ranki≥3n4,where ωi denotes the ith particle’s inertia weight, ωswarm denotes the swarm’s inertia weight, bi is the adjustment factor for the ith particle’s inertia weight, and ranki denotes the ranking of the ith particle according to the fitness value.The pseudocode of the RIWs is shown as follows (Algorithm4):Algorithm 4: Pseudocode of RIWs.
(1)
while (t ≤ tmax or the precision is not met)(2)
SortFX to get rank=rank1,rank2,…,rankn;(3)
fori = 1 : n(4)
Updateωswarm;(5)
Updatebi by equation (21);(6)
Updateωi by equation (20);(7)
End(8)
t=t+1;(9)
EndThe parameter analysis experiment forb1, b3 is shown in Section 4.2. The recommended configuration of b1,b2,b3isb1=2/3,b2=1,b3=1.5.This paper adopts the above three mechanisms in the standard PSO and proposes a uniform initialized particle swarm optimization with cosine inertia weight (UCPSO). To elaborate the mechanism of UCPSO, the pseudocode of UCPSO is shown as follows (Algorithm5):Algorithm 5: Pseudocode of UCPSO.
(1)
Initializen,c1,c2,ω, particles’ velocity V and initialize particles’ position X by Algorithm 2, then find Pbest and Gbest, t = 1;(2)
Calculateωcos by Algorithm 3;(3)
while (t≤tmax or the precision is not met)(4)
SortFX to get rank=rank1,rank2,…,rankn;(5)
fori = 1 : n(6)
Updatebi by equation (21);(7)
ω=bi×ωcost;(8)
ford = 1 : D(9)
Update velocityvid by equation (1);(10)
Restrictvid in vdmin,vdmax;(11)
Update positionxid by equation (2);(12)
Restrictxid in xdmin,xdmax;(13)
ifxid==xdminorxid==xdmax(14)
vid=−vid;(15)
End(16)
end(17)
ifFXi<FPbesti(18)
Pbesti=Xi;(19)
ifFPbesti<FGbest(20)
Gbest=Pbesti;(21)
End(22)
End(23)
End(24)
t=t+1;(25)
End


## 3.1. Inertia Weight in the Form of Variable-Period Cosine Function

There is a popular form of nonlinear time variant inertia weight. It maintains a large value in the early stage and keeps a small value in the final stage. In common optimization problems, it can enhance the global search ability of PSO. Then, the multistage inertia weight was proposed. It puts forward more specific requirements for the change process of inertia weight: (a) initial stage: inertia weight keeps a large value for a period of time to carry out global search and reduces the probability of falling into local optimum (this stage is also called global search stage); (b) intermediate stage: inertia weight drops rapidly and transits from global search to local search (this stage is also called decelerating transition stage); (c) the final stage: inertia weight keeps a small value for a long time to help PSO converge to an accurate optimal solution quickly (this stage is also called the local search stage).The change process of the cosine function in the range0,π meets the requirements of the multistage inertia weight. In the range 0,π/6, the cosine function maintains a large value ≤3/2 and changes slowly. In the range π/6,5π/6, the cosine function declines rapidly. In the range 5π/6,π, the cosine function maintains a small value ≤−3/2 and changes slowly. Because the cosine function is simple and easy to use, an inertia weight in cosine form is adopted in this paper. However, the original cosine function is not consistent with the requirements of the multistage inertia weight. Therefore, the original cosine function needs to be adjusted. An iterative term It is added into the cosine function to adjust the period and ωcost is rescaled in the range ωfin,ωini as shown in the following equations:(16)ωcost=ωini+ωfin2+ωini−ωfin2×cosItπtmax,(17)It+1=It+a,I1=0,(18)a=a1,It≤tmax6,a2,tmax6<It≤5tmax6,a3,5tmax6<Ιt≤tmax,where a is a constant that can adjust the period of ωcost. The values of a1, a2, and a3 can control the length of each stage in ωcost According to the requirements of ωcost, we limit the phase Itπ/tmax in the range 0, π and Itπ/tmax is required to increase from 0 to π. While t increases from 0 to tmaxIt needs to increase from 0 to tmax. Therefore, a1, a2, and a3 have to satisfy the following equation:(19)16a1+23a2+16a3=1.The pseudocode of updatingωcos is shown as follows (Algorithm 2):Algorithm 2: Pseudocode of updating ωcos(t).
(1)
Leta = a1;(2)
fort = 1 : tmax(3)
Updateωcost by equation (16);(4)
ifIt≥5tmax/6(5)
a=a3;(6)
else ifIt≥tmax/6(7)
a = a2;(8)
end(9)
It+1=It+a;(10)
EndThe parameter analysis experiment fora1, a2, and a3 is shown in Section 4.2. The recommended configuration of a1,a2,anda3 is a1=4/3,a2=16/3,anda3=2/9. The curves of different inertia weights ω0t∼ω7t and ωcosta1=4/3,a2=16/3,a3=2/9 are displayed in Figures 2–4. In addition, their parameters are also illustrated.Figure 2
Curves of inertia weightω0t∼ω4tandωcost.Figure 3
Curve of inertia weightω5t.Figure 4
Curve of inertia weightω6t.To make the inertia weight have the same value range, in these inertia weights, allωini are set to 0.9, and all ωfin are set to 0.4 forω2t,ωini=0.4,ωfin=0.9,ω0t=0.9,andω5t=0.4+rand/2.


## 3.2. Uniform Initialization

There is no clear mechanism in random initialization, chaotic initialization, and opposition-based initialization to avoid the aggregation of initial particles. This situation will lead some areas to be searched repeatedly and some areas to be ignored. This reduces the search efficiency and the possibility of finding a global optimum.To solve this problem, a particle initialization method with both randomness and uniformity (called uniform initialization) is proposed in this paper. In Algorithm3, Line 1 initializes a particle randomly to be the base point, and X1=X11,X12,…,X1D is the position of the base point. Lines 2–4 generate a D×n−1 random matrix R=R1,R2,…,RD to ensure the randomness of the initial particles. Lines 5–12 divide the length of each dimension by n to obtain the minimum distance between particles in the corresponding dimension. Lines 5–12 distribute particles in each dimension uniformly and avoid the aggregation of particles. If the position of a particle exceeds the allowed range of a dimension, it will subtract the range of the corresponding dimension. The pseudocode of uniform initialization is shown as follows:Algorithm 3: Pseudocode of uniform initialization.
(1)
InitializeX1 in the search area randomly by equation (13);(2)
ford = 1 : D(3)
Randomly rearrange1,2,…,n−1 to get Rd=R1d,R2d,…,Rn−1d;(4)
End(5)
fori = 1 : n(6)
ford = 1 : D(7)
Xid=X1d+Ri−1d÷n×Xdmax−Xdmin;(8)
ifXid>Xdmax(9)
Xid=Xid−Xdmax−Xdmin;(10)
End(11)
End(12)
EndUniform initialization ensures that the distances between particles are larger than a certain value. It can avoid the aggregation of particles and distribute initial particles uniformly to recognize more areas at the beginning. Figure5 represents the result of uniform initialization. We find that the level of aggregation is low, and the distribution of particles is uniform. Uniform initialization is a good combination of randomness and uniformity. Figure 5 is completed under the configuration: n=50,D=2, the search area is a 4 × 4 rectangle.Figure 5
Results of the uniform initialization (2D).


## 3.3. Rank-Based Strategy for Individual Particle’s Inertia Weight (RIW)

The forms of inertia weight mentioned above are all assigned numerical values according to the state of the whole swarm. However, in fact, particles’ states are diverse. The individual particle’s need may not follow the swarm’s need. Particles that are already in the ROI need a small inertia weight to exploit. Particles that are far away from the ROI need a large inertia weight to explore. The single value of inertia weight cannot satisfy both requirements at the same time. Cooperation between these two kinds of particles can maximize the benefit of the whole swarm.A rank-based strategy is adopted by this paper to solve the problem. Generally, the particles with small fitness valuesFXi are in the current ROI, while the particles with large FXi are outside the ROI. Particles are sorted by fitness value from small to large. Adding a rank-based strategy to inertia weight can take both the overall and individual requirements into account simultaneously. The mechanism of the RIWs is shown in equations (20) and (21):(20)ωi=bi×ωswarm,(21)bi=b1,ranki≤n4,b2,otherwise,b3,ranki≥3n4,where ωi denotes the ith particle’s inertia weight, ωswarm denotes the swarm’s inertia weight, bi is the adjustment factor for the ith particle’s inertia weight, and ranki denotes the ranking of the ith particle according to the fitness value.The pseudocode of the RIWs is shown as follows (Algorithm4):Algorithm 4: Pseudocode of RIWs.
(1)
while (t ≤ tmax or the precision is not met)(2)
SortFX to get rank=rank1,rank2,…,rankn;(3)
fori = 1 : n(4)
Updateωswarm;(5)
Updatebi by equation (21);(6)
Updateωi by equation (20);(7)
End(8)
t=t+1;(9)
EndThe parameter analysis experiment forb1, b3 is shown in Section 4.2. The recommended configuration of b1,b2,b3isb1=2/3,b2=1,b3=1.5.This paper adopts the above three mechanisms in the standard PSO and proposes a uniform initialized particle swarm optimization with cosine inertia weight (UCPSO). To elaborate the mechanism of UCPSO, the pseudocode of UCPSO is shown as follows (Algorithm5):Algorithm 5: Pseudocode of UCPSO.
(1)
Initializen,c1,c2,ω, particles’ velocity V and initialize particles’ position X by Algorithm 2, then find Pbest and Gbest, t = 1;(2)
Calculateωcos by Algorithm 3;(3)
while (t≤tmax or the precision is not met)(4)
SortFX to get rank=rank1,rank2,…,rankn;(5)
fori = 1 : n(6)
Updatebi by equation (21);(7)
ω=bi×ωcost;(8)
ford = 1 : D(9)
Update velocityvid by equation (1);(10)
Restrictvid in vdmin,vdmax;(11)
Update positionxid by equation (2);(12)
Restrictxid in xdmin,xdmax;(13)
ifxid==xdminorxid==xdmax(14)
vid=−vid;(15)
End(16)
end(17)
ifFXi<FPbesti(18)
Pbesti=Xi;(19)
ifFPbesti<FGbest(20)
Gbest=Pbesti;(21)
End(22)
End(23)
End(24)
t=t+1;(25)
End


## 4. Experimental Results and Discussion

### 4.1. Experimental Setup

The experiments in Sections4.2–4.4 are performed on benchmark functions f1−f6 [36]. The details of f1−f6 are specified in Table 1. f1−f6 include 2 many-local-minima functions, 2 bowl-shaped functions, and 2 valley-shaped functions. Therefore, f1−f6 are representative. The experiment to compare UCPSO with PSO, MCJPSO [23], PSO-DLS [25], EPSO [26], HCLPSO [27], and GLPSO [28] and is based on CEC2020 benchmark functions, as shown in Table 2. The parameter configurations of the other six algorithms are set according to their original references, which are shown in Table 3.Table 1
Commonly used benchmark functionsf1∼f6.
Benchmark functionExpressionDSearch rangeFX∗Rotated hyper-ellipsoid (10)f1x=∑i=110∑j=1ixj210[−100, 100]100Sphere (10)f2x=∑i=110xi210[−100, 100]100Griewank (20)f6x=∑i=120xi2/4000−∏i=120cosxi/i+120[−600, 600]200Sum squares (20)f4x=∑i=120ixi220[−100, 100]200Dixon-price (30)f5x=x1−12+∑i=230i2xi2−xi−1230[−100, 100]300Sum of different powers (30)f6x=∑i=130xii+130[−100, 100]300Table 2
CEC2020 benchmark functions.
TypeNo.FunctionsSearch rangeUnimodalF1Shifted and rotated bent cigar function[−100, 100]DBasicF2Shifted and rotated Schwefel’s function[−100, 100]DF3Shifted and rotated lunacek bi-Rastrigin function[−100, 100]DF4Expanded Rosenbrock’s plus Griewank’s function[−100, 100]DHybridF5Hybrid function 1 (N = 3)[−100, 100]DF6Hybrid function 2 (N = 4)[−100, 100]DF7Hybrid function 3 (N = 5)[−100, 100]DCompositionF8Composition function 1 (N = 3)[−100, 100]DF9Composition function 2 (N = 4)[−100, 100]DF10Composition function 3 (N = 5)[−100, 100]DTable 3
Parameters settings for the involved algorithms.
AlgorithmsParameter settingsReferencePSOω : 0.9∼0.4, c1 = c2 = 2[15]MCJPSOω : 1∼0, c1 : 1.5∼0, c2 : 0∼1.5, c3 : 1.5∼0, k = 5, α = 30, ε = 0.0001[23]PSO-DLSω : 0.9∼0.4, c1 = c2 = 1.49445, M = 4[25]EPSOPSO:ω : 0.9∼0.2, c1 : 2.5∼0.5, c2 : 0.5∼2.5LIPS: 𝜒 = 0.729, c = 2, nsize = 3FDR-PSO: ω : 0.9∼0.2, 𝜒 = 0.729, c1 = c2 = 1, c3 = 2CLPSO: ω : 0.9∼0.2, c : 3–1.5sHPSO: ω = 0.72, c1 : 2.5∼0.5, c2 : 0.5∼2.5[26]HCLPSOω : 0.99∼0.2, c1 : 2.5∼0.5, c2 = 0.5∼2.5, c : 3∼1.5[27]GLPSOω = 0.7298, c = 1.49618, pm = 0.01, sg = 7[28]The nonparametric Wilcoxon signed-rank test is used to examine the significant difference between algorithms. In this article, a Wilcoxon signed-rank test at a 5% significance level is used. A pairwise comparison is conducted over the results obtained through several runs. The symbol “+” indicates that the proposed algorithm performs significantly better than the compared algorithms. The symbol “=” indicates that the proposed algorithm is not significantly different from the compared algorithm. The symbol “−” indicates that the compared algorithm performs significantly better than the proposed algorithm.The criteria include the mean of the best solutions (Mean), the standard deviation of the best solutions (SD), success rate (SR) [37] and the average number of iterations (Average number). SR reflects the probability of obtaining a satisfactory result. To reduce the impact of extreme values, only the successful iterations are counted when calculating average number. When the algorithm iterates successfully, the current number of iterations will be recorded to calculate average number, and the algorithm will continue to iterate. Average number reflects the convergence speed effectively when combined with SR. Whether the algorithm iterates successfully or unsuccessfully is judged according to the following content:(22)ε=0.001,FX∗=0,0.001×FX∗,FX∗≠0,where ε is the allowed maximum error. ε is often set as 0.001 in the engineering field. If FGbest−FX∗≤ε, the current iteration is successful; if FGbest−FX∗>ε, the current iteration is unsuccessful.For a fair comparison, all algorithms use the following unified configuration:n=20,tmax=2000,vdmin=vdmax=0.1×xdmax−xdmin, and the initial velocity vid1 is set to zero. For each test function, 1000 independent runs are performed in Sections 4.2–4.4, and 30 independent runs are performed in Section 4.5. The allowed maximum number of iterations is used as the termination criterion for all algorithms. All algorithms are implemented in MATLAB R2018b and executed on the same PC with an Intel® Core(TM) i7-7700 CPU @ 3.6 GHz and 16 GB RAM.


### 4.2. Parameter Analysis

Based on the standard PSO withωcost, 15 different configurations of a1, a2, and a3 are compared on the benchmark functions f1∼f6. In these configurations, the duration of each stage changes in the step size of tmax/8. Therefore, a relatively good parameter configuration can be obtained. All variants are tested on the experimental settings in Section 4.1.In Table4, when a1=4/3,a2=16/3,a3=2/9, the best performance is obtained. In Figure 2, we can see that the curve of ωcost with a1=4/3,a2=16/3,anda3=2/9satisfies the requirements of the multistage inertia weight.Table 4
Performance of PSO with differenta1, a2, and a3.
(a1, a2, a3)f1f2f3f4f5f6(4/3, 8/9, 4/3)2.456E − 474.123E − 473.035E − 022.533E − 182.706E + 021.010E + 29(4/3, 16/15, 2/3)9.234E − 571.880E − 572.884E − 025.596E − 233.315E + 022.000E + 31(4/3, 4/3, 4/9)1.125E − 654.724E − 672.720E − 022.273E − 272.604E + 023.051E + 25(4/3, 16/9, 1/3)3.091E − 769.313E − 772.743E − 022.000E + 012.907E + 021.011E + 25(4/3, 8/3, 4/15)6.126E − 864.224E − 862.563E − 023.611E − 364.825E + 022.041E + 27(4/3, 16/3, 2/9)2.466E − 962.674E − 952.397E − 027.000E − 402.111E + 022.010E + 27(2/3, 16/15, 4/3)8.895E − 425.300E − 422.878E − 022.078E − 163.607E + 021.011E + 29(2/3, 4/3, 2/3)4.436E − 501.295E − 512.847E − 021.623E − 204.508E + 021.031E + 25(2/3, 16/9, 4/9)3.922E − 612.144E − 612.672E − 026.873E − 251.900E + 022.010E + 27(2/3, 8/3, 1/3)3.936E − 708.225E − 712.411E − 026.847E − 292.215E + 021.010E + 29(2/3, 16/3, 4/15)4.251E − 816.035E − 802.447E − 024.645E − 332.604E + 024.101E + 23(4/9, 4/3, 4/3)1.855E − 359.454E − 372.865E − 023.827E − 142.522E + 022.010E + 29(4/9, 16/9, 2/3)1.404E − 452.728E − 462.577E − 022.206E − 184.120E + 022.030E + 27(4/9, 8/3, 4/9)3.625E − 558.133E − 562.413E − 029.497E − 232.509E + 021.001E + 29(4/9, 16/3, 1/3)3.834E − 653.807E − 652.330E − 022.433E − 273.512E + 021.000E + 31The best mean of fitness value is shown in bold.The inertia weights of particles that are ranked in the middle remain constant, so the value ofb2 is equal to 1. According to the requirements of the inertia weight of the particles, b1<1,b3>1. Particles that are already in the ROI need a small inertia weight to exploit. Particles that are far away from the ROI need a large inertia weight to explore. Therefore, b1 should be less than 1 and b3 should be greater than 1. A minor adjustment of inertia weight enhances the cooperation between the swarm. If the inertia weight becomes too small, the diversity of the swarm will decrease. This situation will lead to premature convergence. If the inertia weight becomes too large, it will lead to low convergence accuracy because particles outside the ROI insufficiently participate in local search.The effects ofb1 and b3 are relatively independent. Therefore, the effects of different values of b1 or b3 on the standard PSO with RIWs are compared separately. The comparative experiments are based on benchmark functions f1−f6. All variants are tested on the experimental settings in Section 4.1.In Table5, when b1=2/3, the three best results are obtained. In Table 6, when b3=1.5, the three best results are obtained. When b1=2/3andb3=1.5, the adjustment of inertia weight is not large. Therefore, the recommended parameters of RIWs are selected as b1=2/3,b2=1,andb3=1.5.Table 5
Performance of PSO with differentb1.
b1f1f2f3f4f5f62/37.364E − 652.737E − 654.243E − 029.559E − 281.807E + 021.000E + 31½1.360E − 645.581E − 656.441E − 021.114E − 281.198E + 021.000E + 292/51.692E − 631.464E − 647.144E − 021.618E − 281.984E + 021.000E + 271/33.013E − 641.470E − 645.802E − 023.746E − 282.286E + 021.030E + 252/71.061E − 632.657E − 635.469E − 021.588E − 271.696E + 022.020E + 25¼1.296E − 622.972E − 645.336E − 026.460E − 281.305E + 021.010E + 272/94.161E − 631.133E − 635.252E − 021.327E − 271.192E + 022.010E + 251/55.382E − 631.012E − 625.041E − 021.996E − 266.069E + 011.000E + 27The best mean of fitness value is shown in bold.Table 6
Performance of PSO with differentb3.
b3f1f2f3f4f5f61.54.099E − 403.495E − 413.277E − 022.894E − 154.328E + 022.010E + 2926.318E − 406.602E − 413.169E − 024.699E − 154.623E + 024.040E + 272.54.138E − 401.639E − 403.209E − 024.261E − 156.133E + 021.000E + 3131.355E − 401.940E − 403.078E − 022.000E + 015.915E + 021.020E + 293.53.958E − 405.518E − 413.165E − 024.699E − 155.639E + 021.010E + 3142.140E − 404.549E − 413.364E − 023.311E − 155.128E + 021.041E + 274.54.637E − 404.830E − 413.131E − 024.246E − 156.023E + 022.041E + 2757.087E − 416.363E − 413.340E − 022.908E − 157.840E + 021.000E + 33The best mean of fitness value is shown in bold.


### 4.3. Comparing Inertia Weightωcost with Other Forms of Inertia Weight

To compare inertia weightsω0t∼ω7t and ωcost, they are added into the standard PSO. The configurations of ω0t−ω6t and ωcost are elaborated in Section 3.1. In the inertia weight ω7t, ωini=0.9 and ωfin=0.4. For brevity, the standard PSO with inertia weight ω0t is abbreviated as PSO-ω0 and so on. All variants are tested on the experimental settings in Section 4.1.Table7 shows the performance of standard PSO variants with nine different forms of inertia weight. If the SR of a variant is 0, its average number will be omitted. We can find that PSO-ωcos has the highest SR in f1−f5. In f6 PSO-ωcos still obtains the second highest SR. ωcost maintains a large value for a period of time, so its global search ability is improved. PSO-ωcos has the smallest mean of the four benchmark functions and the smallest SD of the three benchmark functions. In f5 and f6, PSO-ω2 has the smallest mean and SD, but its SR is still lower than PSO-ωcos‘s SR. ωcost adopted a multistage strategy to meticulously guide the behaviour of particles at different stages. Therefore, PSO-ωcos obtains a better convergence quality than other variants. PSO-ωcos has the fastest convergence speed in f5 and a moderate convergence speed in the other five benchmark functions.Table 7
Results of the experiment on benchmark functionsf1∼f6.
Benchmark functionVariantMeanSDSR (%)Average numberf1PSO-ω01.433E + 02(+)4.434E + 010—PSO-ω11.266E − 43(+)2.313E − 421009.702E + 02PSO-ω23.008E − 43(+)2.350E − 421009.732E + 01PSO-ω31.924E − 25(+)2.446E − 241001.436E + 03PSO-ω43.686E − 76(+)6.118E − 751007.431E + 02PSO-ω58.088E − 31(+)4.899E − 301002.950E + 02PSO-ω66.636E − 95(+)1.041E − 931003.195E + 02PSO-ω72.146E − 10(+)4.798E − 101001.443E + 03PSO-ωcos3.471E − 967.484E − 951004.878E + 02f2PSO-ω03.265E + 01(+)9.727E + 000—PSO-ω11.322E − 43(+)3.828E − 421009.298E + 02PSO-ω21.420E − 43(+)2.048E − 421008.715E + 01PSO-ω35.474E − 26(+)6.638E − 251001.403E + 03PSO-ω42.540E − 76(+)6.720E − 751007.250E + 02PSO-ω52.549E − 31(+)1.781E − 301002.555E + 02PSO-ω62.688E − 95(+)4.673E − 941002.897E + 02PSO-ω72.774E − 11(+)4.776E − 111001.382E + 03PSO-ωcos8.009E − 979.211E − 961004.759E + 02f3PSO-ω03.524E + 00(+)4.407E − 010—PSO-ω13.281E − 02(+)2.894E − 0213.41.372E + 03PSO-ω22.582E − 02(+)2.629E − 0219.72.413E + 02PSO-ω33.306E − 02(+)3.054E − 02121.738E + 03PSO-ω42.494E − 02(+)2.377E − 0217.89.392E + 02PSO-ω53.599E − 02(+)4.522E − 0212.79.810E + 02PSO-ω62.825E − 02(+)2.657E − 0215.96.970E + 02PSO-ω77.983E − 02(+)7.891E − 021.71.950E + 03PSO-ωcos2.217E − 022.520E − 0222.86.320E + 02f4PSO-ω02.626E + 03(+)4.838E + 020—PSO-ω14.126E − 17(+)2.101E − 161001.356E + 03PSO-ω21.092E − 15(+)1.001E − 141002.571E + 02PSO-ω34.221E − 09(+)1.786E − 081001.749E + 03PSO-ω49.650E − 32(+)1.930E − 301009.382E + 02PSO-ω55.235E − 09(+)2.027E − 081009.729E + 02PSO-ω67.056E − 38(+)1.150E − 361006.657E + 02PSO-ω75.250E − 03(+)3.345E − 029.21.976E + 03PSO-ωcos6.008E − 409.875E − 391006.351E + 02f5PSO-ω02.787E + 06(+)7.504E + 050—PSO-ω12.106E + 02(−)2.115E + 030—PSO-ω21.456E + 00(−)1.213E + 000—PSO-ω31.797E + 02(−)2.037E + 030—PSO-ω43.315E + 02(+)2.841E + 030.91.756E + 03PSO-ω51.065E + 02(−)1.680E + 030—PSO-ω61.204E + 02(−)1.548E + 030.81.514E + 03PSO-ω75.127E + 02(+)3.494E + 030—PSO-ωcos2.410E + 022.449E + 031.21.438E + 03f6PSO-ω02.031E + 25(+)4.468E + 260—PSO-ω11.000E + 29(+)3.161E + 3065.41.810E + 03PSO-ω25.031E + 13(−)7.054E + 1472.28.460E + 02PSO-ω31.000E + 29(+)3.161E + 303.91.977E + 03PSO-ω41.080E + 25(+)3.162E + 2672.11.317E + 03PSO-ω51.000E + 19(−)3.161E + 200.41.827E + 03PSO-ω62.000E + 23(−)4.468E + 2484.81.159E + 03PSO-ω71.030E + 25(=)3.161E + 260—PSO-ωcos1.031E + 253.161E + 2676.41.015E + 03The best results are shown in bold.Figure6 shows the convergence characteristics of the nine variants. The convergence speed of PSO-ωcos is not very fast at the beginning, but PSO-ωcos converges to the smallest fitness value in all six benchmark functions. In f4 and f6, PSO-ωcos outperforms the other variants. PSO-ωcos is able to avoid becoming trapped in the local optimum ωcost converts to local search quickly and smoothly. These factors help PSO-ωcos converge to an accurate solution.Figure 6
The median convergence curves of the standard PSO with inertia weightω0t∼ω7t and ωcost on benchmark functions f1∼f6. (a)f1. (b)f2. (c)f3. (d) f4. (e) f5. (f) f6.
(a)(b)(c)(d)(e)(f)


### 4.4. Comparing Uniform Initialization with Other Particles Initializations

Random initialization, chaotic initialization, opposition-based initialization, and uniform initialization are compared on the benchmark functionsf1−f6. The four particle initializations are all added to the standard PSO-ω1 to be compared. The configurations of random initialization, chaotic initialization and opposition-based initialization are elaborated in Section 2.3. For chaotic initialization, a is set to 4. Uniform initialization adopts the recommended configuration in Section 3.2. The four variants are abbreviated as PSO-rand, PSO-chaotic, PSO-opposition, and PSO-uniform for simplicity. All variants are tested on the experimental settings in Section 4.1.From Table8, it can be seen that PSO-uniform performs better than the compared variants. PSO-uniform obtains the smallest mean in five benchmark functions and the highest SR in four benchmark functions. If the initial particles gather around a local optimum, the iteration is very likely to converge prematurely. Uniform initialization reduces the possibility of this case. It distributes initial particles more uniformly and makes them more likely to approach the global optimum. This improves the SR and convergence quality of the PSO algorithm. Except for f5, PSO-uniform has at least the second smallest average number. In addition, it has the smallest Average number in f1. It can be concluded that PSO-uniform has a better global search ability and a better convergence speed in f1−f6.Table 8
Results of the experiment on benchmark functionsf1∼f6.
Benchmark functionVariantMeanSDSR (%)Average numberf1PSO-rand7.069E − 44(=)7.309E − 431009.682E + 02PSO-chaotic6.130E − 44(=)7.711E − 431009.693E + 02PSO-opposition2.596E − 43(+)6.463E − 421009.687E + 02PSO-uniform5.674E − 446.344E − 431009.679E + 02f2PSO-rand1.167E − 44(=)1.436E − 431009.288E + 02PSO-chaotic1.573E − 44(+)2.384E − 431009.304E + 02PSO-opposition1.056E − 44(=)1.637E − 431009.309E + 02PSO-uniform1.157E − 441.163E − 431009.295E + 02f3PSO-rand3.290E − 02(=)2.851E − 0212.21.359E + 03PSO-chaotic3.547E − 02(+)3.015E − 0211.91.387E + 03PSO-opposition3.231E − 02(=)2.805E − 0211.91.378E + 03PSO-uniform3.217E − 022.925E − 0213.61.361E + 03f4PSO-rand3.935E − 17(=)1.690E − 161001.356E + 03PSO-chaotic3.705E − 17(=)1.998E − 161001.358E + 03PSO-opposition4.928E − 17(+)3.238E − 161001.357E + 03PSO-uniform3.601E − 171.704E − 161001.356E + 03f5PSO-rand1.011E + 02(=)1.484E + 030—PSO-chaotic1.105E + 02(+)1.296E + 030.21.908E + 03PSO-opposition1.315E + 02(=)1.763E + 030—PSO-uniform9.081E + 011.220E + 030—f6PSO-rand1.020E + 27(+)3.161E + 2864.51.814E + 03PSO-chaotic1.040E + 25(+)3.161E + 2668.21.808E + 03PSO-opposition1.010E + 21(+)3.161E + 2283.81.794E + 03PSO-uniform5.061E + 197.053E + 2071.41.805E + 03The best results are shown in bold.


### 4.5. Comparing UCPSO with Other Variants of PSO

To analyse the performance of UCPSO, UCPSO is compared with PSO, MCJPSO [23], PSO-DLS [25], EPSO [26], HCLPSO [27], and GLPSO [28] on the CEC2020 benchmark functions. The problem dimension of the experiment is set to D=20. UCPSO adopts the following configuration: a1=4/3, a2=16/3, a3=2/9, b1=2/3, b2=1, b3=1.5, ωini=0.9, and ωfin=0.4. All algorithms are tested on the experimental settings in Section 4.1. For each test function, 30 independent runs are performed.From Table9, it can be observed that UCPSO outperforms PSO and PSO-DLS in 20-dimensional CEC2020 benchmark functions. Except for F1, F8, and F9, UCPSO has better results than MCJPSO. This indicates that the performance of PSO is enhanced by the proposed three improvements. HCLPSO achieves an excellent result in this experiment. In most benchmark functions, UCPSO can keep up with HCLPSO. In F4 and F10, UCPSO performs almost as well as HCLPSO. In F5, UCPSO achieves the best result. In hybrid and composition functions, UCPSO obtains good results and outperforms GLPSO. This proves that the performance of UCPSO is very competitive and that the proposed three improvements are effective.Table 9
Results of the experiment on 20-Dimensional CEC2020 benchmark functions.
No.TermPSOMCJPSOPSO-DLSEPSOHCLPSOGLPSOUCPSOF1Mean7.657E + 09(+)8.746E + 04(−)4.963E + 08(+)2.724E + 03(−)1.876E + 03(−)5.278E + 03(−)1.623E + 08SD5.706E + 091.160E + 051.125E + 091.727E + 031.945E + 034.114E + 033.203E + 08F2Mean3.133E + 03(+)3.547E + 03(+)4.748E + 03(+)1.839E + 03(−)1.480E + 03(−)1.631E + 03(−)2.595E + 03SD4.421E + 025.693E + 023.487E + 023.804E + 021.779E + 022.585E + 022.013E + 02F3Mean7.972E + 02(+)7.640E + 02(+)7.646E + 02(+)7.502E + 02(=)7.338E + 02(−)7.373E + 02(−)7.505E + 02SD6.769E + 011.579E + 013.554E + 011.768E + 013.273E + 006.877E + 008.305E + 00F4Mean2.972E + 04(+)1.905E + 03(=)4.636E + 03(+)1.903E + 03(=)1.902E + 03(=)1.903E + 03(=)1.904E + 03SD7.159E + 041.195E + 001.150E + 041.064E + 006.273E − 011.613E + 001.336E + 00F5Mean1.766E + 06(+)3.715E + 05(+)3.620E + 05(+)2.233E + 05(+)2.040E + 05(+)1.875E + 05(+)1.153E + 05SD2.832E + 062.189E + 053.937E + 051.786E + 051.480E + 052.730E + 057.666E + 04F6Mean2.212E + 03(+)2.293E + 03(+)1.852E + 03(=)1.617E + 03(−)1.615E + 03(−)1.603E + 03(−)1.898E + 03SD2.999E + 021.341E + 022.004E + 021.884E + 013.539E + 011.471E + 001.314E + 00F7Mean6.251E + 05(+)8.681E + 04(−)9.943E + 04(=)8.347E + 04(=)7.621E + 04(−)1.724E + 05(+)8.730E + 04SD7.390E + 056.811E + 041.245E + 057.031E + 046.545E + 043.510E + 051.186E + 05F8Mean4.349E + 03(+)2.309E + 03(−)3.839E + 03(+)2.301E + 03(−)2.301E + 03(−)3.234E + 03(+)2.740E + 03SD9.377E + 021.335E + 011.881E + 037.741E − 019.830E − 011.241E + 038.641E + 02F9Mean3.019E + 03(+)2.858E + 03(=)2.896E + 03(+)2.768E + 03(−)2.745E + 03(−)2.868E + 03(=)2.856E + 03SD9.117E + 011.012E + 022.139E + 011.166E + 021.198E + 021.922E + 011.865E + 01F10Mean3.181E + 03(+)2.962E + 03(=)2.936E + 03(=)2.948E + 03(=)2.923E + 03(−)2.947E + 03(=)2.947E + 03SD2.558E + 022.810E + 012.327E + 012.485E + 011.467E + 013.382E + 013.501E + 01The best results are shown in bold.In Figure7, the median convergence curves of the four types of benchmark functions are shown. We can see that UCPSO has good convergence performance, especially in the top 500 iterations. UCPSO converges fast and has a high level of convergence accuracy, especially in F4 and F5. UCPSO can maintain a strong exploration and exploitation ability and converge to an accurate solution in a short time.Figure 7
The median convergence curves on 20-Dimensional CEC2020 benchmark functions (a)F1. (b) F4. (c) F5. (d) F8.
(a)(b)(c)(d)


### 4.6. Algorithm Complexity

This section will analyse the computational complexity of UCPSO. The computational cost of the original PSO involves the initializationTini, evaluation Teva, velocity, and position update Tupd for each particle. D is the dimensionality of the search space, and tmax is the allowed maximum number of iterations. The computational complexity of PSO can be estimated as TD=Tini+Teva+Tupdtmax=D+D+2⋅Dtmax=D1+3tmax. Therefore, the computational complexity of the original PSO is OD⋅tmaxωcost can be calculated in advance, so it is used directly during the iteration process. Uniform initialization adds a process of sorting before the iteration begins. RIWs adds the process of sorting and assignment into each iteration. Therefore, the computational complexity of UCPSO can be estimated as follows: TD=Tini+Teva+Tupdtmax=D+D⋅logn+D+2⋅D+logn+Dtmax=D1+logn+4tmax+logntmax. Because the number of particles n is usually small, the computational complexity of UCPSO is OD⋅tmaxtoo.An experiment to compare the computational complexity of UCPSO with other PSO variants is carried out.T0 is the time to run the following codes:(23)Fori=1:200000,x=i+5.5;x=x+x;x=x2,x=x∗x;x=sqrtx;x=logx;x=expx;y=xx;End.where T1 is the time to execute 40,000 evaluations of benchmark function F1 by itself with 20 dimensions and T2 is the mean time to execute the algorithm with 40,000 evaluations of F1 with 20 dimensions over 30 times. The number of particles is 20.According to Table10, UCPSO spends the least time on F1 apart from PSO. PSO-DLS is up to 2 times slower in terms of time than UCPSO. The computational complexity of UCPSO is lower than those of PSO-DLS, EPSO, and HCLPSO. Therefore, UCPSO is a relatively fast PSO algorithm with competitive performance. The three improvements in UCPSO will not greatly increase the computational complexity.Table 10
Algorithm complexity of five algorithms onF1 of 20-dimensional CEC2020 benchmark functions.
AlgorithmT0 (s)T1 (s)T2 (s)(T2 − T1)/T0PSO0.0140.0230.19612.357PSO-DLS0.0140.0230.54637.357EPSO0.0140.0230.49333.571HCLPSO0.0140.0230.36324.286UCPSO0.0140.0230.29819.643


### 4.7. Application to Real-World Problems

In this part, UCPSO is applied to solve real-world engineering optimization problems. PSO and UCPSO are tested onP1 and P4 of the CEC2011 real-world optimization problems, as shown in Table 11. For each test problem, 30 independent runs are performed. The population size is set to 20, and the maximum number of iterations is set to 2000. The allowed maximum number of iterations is used as the termination criterion for all algorithms.Table 11
CEC2011 real-world optimization problems.
No.ProblemsDP1Parameter estimation for frequency-modulated (FM) sound waves6P4Optimal control of a nonlinear stirred tank reactor1


#### 4.7.1. Parameter Estimation for Frequency-Modulated (FM) Sound Waves

Frequency-modulated (FM) sound wave synthesis has an important role in several modern music systems [38]. The object of this problem is to minimize the summation of square errors between the following equations:(24)yt=a1sinω1⋅t⋅θ−a2⋅sinω2⋅t⋅θ+a3⋅sinω3⋅t⋅θ,(25)y0t=1.0sin5.0⋅t⋅θ−1.5⋅sin4.8⋅t⋅θ+2.0⋅sin4.9⋅t⋅θ,where θ=2π/100. The dimension of this problem is 6, and the search range is −6.4,6.35. The fitness function is shown as(26)fx=∑t=0100yt−y0t2.


#### 4.7.2. Optimal Control of a Nonlinear Stirred Tank Reactor

This problem is a multimodal optimal control problem. It describes a first-order irreversible chemical reaction carried out in a continuous stirred tank reactor [38]. This chemical process is modelled by two nonlinear differential equations:(27)x˙1=−2+ux1+0.25+x2+0.5exp25x1x1+2,x˙2=0.5−x2−x2+0.5exp25x1x1+2,where u is the flow rate of the cooling fluid, x1 is the dimensionless steady-state temperature, and x2 is the deviation from the dimensionless steady-state concentration. The fitness function of this problem is(28)J=∫0tf=0.72x12+x22+0.1u2dt.The initial condition isx1=x2=0.09. The search range is unconstrained, but the initial range of u is 0,5. The dimension of this problem is 1.As shown in Table12, the best result of UCPSO is slightly worse than the best result of PSO, but the worst result of UCPSO is better than the worst result of PSO. In Table 13, the best and worst results of UCPSO are better than the best and worst results of PSO, respectively. According to the results on P1 and P4, UCPSO has the ability to solve real-world engineering optimization problems.Table 12
Results onP1 of CEC2011 real-world optimization problems.
AlgorithmTerma1ω1a2ω2a3ω3fxPSOBest−1.000−5.000−1.500−4.800−2.0004.9000UCPSO1.0005.0001.500−4.800−2.0004.9004.563E − 28PSOWorst0.4244.9480.698−2.680−6.4006.2482.333E + 01UCPSO0.407−0.992−2.2181.1603.079−2.6672.277E + 01Table 13
Results onP4 of CEC2011 real-world optimization problems.
AlgorithmTermufxPSOBest1.2131.433E + 01UCPSO0.9601.377E + 01PSOWorst1.7922.108E + 01UCPSO1.7952.096E + 01


## 4.1. Experimental Setup

The experiments in Sections4.2–4.4 are performed on benchmark functions f1−f6 [36]. The details of f1−f6 are specified in Table 1. f1−f6 include 2 many-local-minima functions, 2 bowl-shaped functions, and 2 valley-shaped functions. Therefore, f1−f6 are representative. The experiment to compare UCPSO with PSO, MCJPSO [23], PSO-DLS [25], EPSO [26], HCLPSO [27], and GLPSO [28] and is based on CEC2020 benchmark functions, as shown in Table 2. The parameter configurations of the other six algorithms are set according to their original references, which are shown in Table 3.Table 1
Commonly used benchmark functionsf1∼f6.
Benchmark functionExpressionDSearch rangeFX∗Rotated hyper-ellipsoid (10)f1x=∑i=110∑j=1ixj210[−100, 100]100Sphere (10)f2x=∑i=110xi210[−100, 100]100Griewank (20)f6x=∑i=120xi2/4000−∏i=120cosxi/i+120[−600, 600]200Sum squares (20)f4x=∑i=120ixi220[−100, 100]200Dixon-price (30)f5x=x1−12+∑i=230i2xi2−xi−1230[−100, 100]300Sum of different powers (30)f6x=∑i=130xii+130[−100, 100]300Table 2
CEC2020 benchmark functions.
TypeNo.FunctionsSearch rangeUnimodalF1Shifted and rotated bent cigar function[−100, 100]DBasicF2Shifted and rotated Schwefel’s function[−100, 100]DF3Shifted and rotated lunacek bi-Rastrigin function[−100, 100]DF4Expanded Rosenbrock’s plus Griewank’s function[−100, 100]DHybridF5Hybrid function 1 (N = 3)[−100, 100]DF6Hybrid function 2 (N = 4)[−100, 100]DF7Hybrid function 3 (N = 5)[−100, 100]DCompositionF8Composition function 1 (N = 3)[−100, 100]DF9Composition function 2 (N = 4)[−100, 100]DF10Composition function 3 (N = 5)[−100, 100]DTable 3
Parameters settings for the involved algorithms.
AlgorithmsParameter settingsReferencePSOω : 0.9∼0.4, c1 = c2 = 2[15]MCJPSOω : 1∼0, c1 : 1.5∼0, c2 : 0∼1.5, c3 : 1.5∼0, k = 5, α = 30, ε = 0.0001[23]PSO-DLSω : 0.9∼0.4, c1 = c2 = 1.49445, M = 4[25]EPSOPSO:ω : 0.9∼0.2, c1 : 2.5∼0.5, c2 : 0.5∼2.5LIPS: 𝜒 = 0.729, c = 2, nsize = 3FDR-PSO: ω : 0.9∼0.2, 𝜒 = 0.729, c1 = c2 = 1, c3 = 2CLPSO: ω : 0.9∼0.2, c : 3–1.5sHPSO: ω = 0.72, c1 : 2.5∼0.5, c2 : 0.5∼2.5[26]HCLPSOω : 0.99∼0.2, c1 : 2.5∼0.5, c2 = 0.5∼2.5, c : 3∼1.5[27]GLPSOω = 0.7298, c = 1.49618, pm = 0.01, sg = 7[28]The nonparametric Wilcoxon signed-rank test is used to examine the significant difference between algorithms. In this article, a Wilcoxon signed-rank test at a 5% significance level is used. A pairwise comparison is conducted over the results obtained through several runs. The symbol “+” indicates that the proposed algorithm performs significantly better than the compared algorithms. The symbol “=” indicates that the proposed algorithm is not significantly different from the compared algorithm. The symbol “−” indicates that the compared algorithm performs significantly better than the proposed algorithm.The criteria include the mean of the best solutions (Mean), the standard deviation of the best solutions (SD), success rate (SR) [37] and the average number of iterations (Average number). SR reflects the probability of obtaining a satisfactory result. To reduce the impact of extreme values, only the successful iterations are counted when calculating average number. When the algorithm iterates successfully, the current number of iterations will be recorded to calculate average number, and the algorithm will continue to iterate. Average number reflects the convergence speed effectively when combined with SR. Whether the algorithm iterates successfully or unsuccessfully is judged according to the following content:(22)ε=0.001,FX∗=0,0.001×FX∗,FX∗≠0,where ε is the allowed maximum error. ε is often set as 0.001 in the engineering field. If FGbest−FX∗≤ε, the current iteration is successful; if FGbest−FX∗>ε, the current iteration is unsuccessful.For a fair comparison, all algorithms use the following unified configuration:n=20,tmax=2000,vdmin=vdmax=0.1×xdmax−xdmin, and the initial velocity vid1 is set to zero. For each test function, 1000 independent runs are performed in Sections 4.2–4.4, and 30 independent runs are performed in Section 4.5. The allowed maximum number of iterations is used as the termination criterion for all algorithms. All algorithms are implemented in MATLAB R2018b and executed on the same PC with an Intel® Core(TM) i7-7700 CPU @ 3.6 GHz and 16 GB RAM.


## 4.2. Parameter Analysis

Based on the standard PSO withωcost, 15 different configurations of a1, a2, and a3 are compared on the benchmark functions f1∼f6. In these configurations, the duration of each stage changes in the step size of tmax/8. Therefore, a relatively good parameter configuration can be obtained. All variants are tested on the experimental settings in Section 4.1.In Table4, when a1=4/3,a2=16/3,a3=2/9, the best performance is obtained. In Figure 2, we can see that the curve of ωcost with a1=4/3,a2=16/3,anda3=2/9satisfies the requirements of the multistage inertia weight.Table 4
Performance of PSO with differenta1, a2, and a3.
(a1, a2, a3)f1f2f3f4f5f6(4/3, 8/9, 4/3)2.456E − 474.123E − 473.035E − 022.533E − 182.706E + 021.010E + 29(4/3, 16/15, 2/3)9.234E − 571.880E − 572.884E − 025.596E − 233.315E + 022.000E + 31(4/3, 4/3, 4/9)1.125E − 654.724E − 672.720E − 022.273E − 272.604E + 023.051E + 25(4/3, 16/9, 1/3)3.091E − 769.313E − 772.743E − 022.000E + 012.907E + 021.011E + 25(4/3, 8/3, 4/15)6.126E − 864.224E − 862.563E − 023.611E − 364.825E + 022.041E + 27(4/3, 16/3, 2/9)2.466E − 962.674E − 952.397E − 027.000E − 402.111E + 022.010E + 27(2/3, 16/15, 4/3)8.895E − 425.300E − 422.878E − 022.078E − 163.607E + 021.011E + 29(2/3, 4/3, 2/3)4.436E − 501.295E − 512.847E − 021.623E − 204.508E + 021.031E + 25(2/3, 16/9, 4/9)3.922E − 612.144E − 612.672E − 026.873E − 251.900E + 022.010E + 27(2/3, 8/3, 1/3)3.936E − 708.225E − 712.411E − 026.847E − 292.215E + 021.010E + 29(2/3, 16/3, 4/15)4.251E − 816.035E − 802.447E − 024.645E − 332.604E + 024.101E + 23(4/9, 4/3, 4/3)1.855E − 359.454E − 372.865E − 023.827E − 142.522E + 022.010E + 29(4/9, 16/9, 2/3)1.404E − 452.728E − 462.577E − 022.206E − 184.120E + 022.030E + 27(4/9, 8/3, 4/9)3.625E − 558.133E − 562.413E − 029.497E − 232.509E + 021.001E + 29(4/9, 16/3, 1/3)3.834E − 653.807E − 652.330E − 022.433E − 273.512E + 021.000E + 31The best mean of fitness value is shown in bold.The inertia weights of particles that are ranked in the middle remain constant, so the value ofb2 is equal to 1. According to the requirements of the inertia weight of the particles, b1<1,b3>1. Particles that are already in the ROI need a small inertia weight to exploit. Particles that are far away from the ROI need a large inertia weight to explore. Therefore, b1 should be less than 1 and b3 should be greater than 1. A minor adjustment of inertia weight enhances the cooperation between the swarm. If the inertia weight becomes too small, the diversity of the swarm will decrease. This situation will lead to premature convergence. If the inertia weight becomes too large, it will lead to low convergence accuracy because particles outside the ROI insufficiently participate in local search.The effects ofb1 and b3 are relatively independent. Therefore, the effects of different values of b1 or b3 on the standard PSO with RIWs are compared separately. The comparative experiments are based on benchmark functions f1−f6. All variants are tested on the experimental settings in Section 4.1.In Table5, when b1=2/3, the three best results are obtained. In Table 6, when b3=1.5, the three best results are obtained. When b1=2/3andb3=1.5, the adjustment of inertia weight is not large. Therefore, the recommended parameters of RIWs are selected as b1=2/3,b2=1,andb3=1.5.Table 5
Performance of PSO with differentb1.
b1f1f2f3f4f5f62/37.364E − 652.737E − 654.243E − 029.559E − 281.807E + 021.000E + 31½1.360E − 645.581E − 656.441E − 021.114E − 281.198E + 021.000E + 292/51.692E − 631.464E − 647.144E − 021.618E − 281.984E + 021.000E + 271/33.013E − 641.470E − 645.802E − 023.746E − 282.286E + 021.030E + 252/71.061E − 632.657E − 635.469E − 021.588E − 271.696E + 022.020E + 25¼1.296E − 622.972E − 645.336E − 026.460E − 281.305E + 021.010E + 272/94.161E − 631.133E − 635.252E − 021.327E − 271.192E + 022.010E + 251/55.382E − 631.012E − 625.041E − 021.996E − 266.069E + 011.000E + 27The best mean of fitness value is shown in bold.Table 6
Performance of PSO with differentb3.
b3f1f2f3f4f5f61.54.099E − 403.495E − 413.277E − 022.894E − 154.328E + 022.010E + 2926.318E − 406.602E − 413.169E − 024.699E − 154.623E + 024.040E + 272.54.138E − 401.639E − 403.209E − 024.261E − 156.133E + 021.000E + 3131.355E − 401.940E − 403.078E − 022.000E + 015.915E + 021.020E + 293.53.958E − 405.518E − 413.165E − 024.699E − 155.639E + 021.010E + 3142.140E − 404.549E − 413.364E − 023.311E − 155.128E + 021.041E + 274.54.637E − 404.830E − 413.131E − 024.246E − 156.023E + 022.041E + 2757.087E − 416.363E − 413.340E − 022.908E − 157.840E + 021.000E + 33The best mean of fitness value is shown in bold.


## 4.3. Comparing Inertia Weightωcost with Other Forms of Inertia Weight

To compare inertia weightsω0t∼ω7t and ωcost, they are added into the standard PSO. The configurations of ω0t−ω6t and ωcost are elaborated in Section 3.1. In the inertia weight ω7t, ωini=0.9 and ωfin=0.4. For brevity, the standard PSO with inertia weight ω0t is abbreviated as PSO-ω0 and so on. All variants are tested on the experimental settings in Section 4.1.Table7 shows the performance of standard PSO variants with nine different forms of inertia weight. If the SR of a variant is 0, its average number will be omitted. We can find that PSO-ωcos has the highest SR in f1−f5. In f6 PSO-ωcos still obtains the second highest SR. ωcost maintains a large value for a period of time, so its global search ability is improved. PSO-ωcos has the smallest mean of the four benchmark functions and the smallest SD of the three benchmark functions. In f5 and f6, PSO-ω2 has the smallest mean and SD, but its SR is still lower than PSO-ωcos‘s SR. ωcost adopted a multistage strategy to meticulously guide the behaviour of particles at different stages. Therefore, PSO-ωcos obtains a better convergence quality than other variants. PSO-ωcos has the fastest convergence speed in f5 and a moderate convergence speed in the other five benchmark functions.Table 7
Results of the experiment on benchmark functionsf1∼f6.
Benchmark functionVariantMeanSDSR (%)Average numberf1PSO-ω01.433E + 02(+)4.434E + 010—PSO-ω11.266E − 43(+)2.313E − 421009.702E + 02PSO-ω23.008E − 43(+)2.350E − 421009.732E + 01PSO-ω31.924E − 25(+)2.446E − 241001.436E + 03PSO-ω43.686E − 76(+)6.118E − 751007.431E + 02PSO-ω58.088E − 31(+)4.899E − 301002.950E + 02PSO-ω66.636E − 95(+)1.041E − 931003.195E + 02PSO-ω72.146E − 10(+)4.798E − 101001.443E + 03PSO-ωcos3.471E − 967.484E − 951004.878E + 02f2PSO-ω03.265E + 01(+)9.727E + 000—PSO-ω11.322E − 43(+)3.828E − 421009.298E + 02PSO-ω21.420E − 43(+)2.048E − 421008.715E + 01PSO-ω35.474E − 26(+)6.638E − 251001.403E + 03PSO-ω42.540E − 76(+)6.720E − 751007.250E + 02PSO-ω52.549E − 31(+)1.781E − 301002.555E + 02PSO-ω62.688E − 95(+)4.673E − 941002.897E + 02PSO-ω72.774E − 11(+)4.776E − 111001.382E + 03PSO-ωcos8.009E − 979.211E − 961004.759E + 02f3PSO-ω03.524E + 00(+)4.407E − 010—PSO-ω13.281E − 02(+)2.894E − 0213.41.372E + 03PSO-ω22.582E − 02(+)2.629E − 0219.72.413E + 02PSO-ω33.306E − 02(+)3.054E − 02121.738E + 03PSO-ω42.494E − 02(+)2.377E − 0217.89.392E + 02PSO-ω53.599E − 02(+)4.522E − 0212.79.810E + 02PSO-ω62.825E − 02(+)2.657E − 0215.96.970E + 02PSO-ω77.983E − 02(+)7.891E − 021.71.950E + 03PSO-ωcos2.217E − 022.520E − 0222.86.320E + 02f4PSO-ω02.626E + 03(+)4.838E + 020—PSO-ω14.126E − 17(+)2.101E − 161001.356E + 03PSO-ω21.092E − 15(+)1.001E − 141002.571E + 02PSO-ω34.221E − 09(+)1.786E − 081001.749E + 03PSO-ω49.650E − 32(+)1.930E − 301009.382E + 02PSO-ω55.235E − 09(+)2.027E − 081009.729E + 02PSO-ω67.056E − 38(+)1.150E − 361006.657E + 02PSO-ω75.250E − 03(+)3.345E − 029.21.976E + 03PSO-ωcos6.008E − 409.875E − 391006.351E + 02f5PSO-ω02.787E + 06(+)7.504E + 050—PSO-ω12.106E + 02(−)2.115E + 030—PSO-ω21.456E + 00(−)1.213E + 000—PSO-ω31.797E + 02(−)2.037E + 030—PSO-ω43.315E + 02(+)2.841E + 030.91.756E + 03PSO-ω51.065E + 02(−)1.680E + 030—PSO-ω61.204E + 02(−)1.548E + 030.81.514E + 03PSO-ω75.127E + 02(+)3.494E + 030—PSO-ωcos2.410E + 022.449E + 031.21.438E + 03f6PSO-ω02.031E + 25(+)4.468E + 260—PSO-ω11.000E + 29(+)3.161E + 3065.41.810E + 03PSO-ω25.031E + 13(−)7.054E + 1472.28.460E + 02PSO-ω31.000E + 29(+)3.161E + 303.91.977E + 03PSO-ω41.080E + 25(+)3.162E + 2672.11.317E + 03PSO-ω51.000E + 19(−)3.161E + 200.41.827E + 03PSO-ω62.000E + 23(−)4.468E + 2484.81.159E + 03PSO-ω71.030E + 25(=)3.161E + 260—PSO-ωcos1.031E + 253.161E + 2676.41.015E + 03The best results are shown in bold.Figure6 shows the convergence characteristics of the nine variants. The convergence speed of PSO-ωcos is not very fast at the beginning, but PSO-ωcos converges to the smallest fitness value in all six benchmark functions. In f4 and f6, PSO-ωcos outperforms the other variants. PSO-ωcos is able to avoid becoming trapped in the local optimum ωcost converts to local search quickly and smoothly. These factors help PSO-ωcos converge to an accurate solution.Figure 6
The median convergence curves of the standard PSO with inertia weightω0t∼ω7t and ωcost on benchmark functions f1∼f6. (a)f1. (b)f2. (c)f3. (d) f4. (e) f5. (f) f6.
(a)(b)(c)(d)(e)(f)


## 4.4. Comparing Uniform Initialization with Other Particles Initializations

Random initialization, chaotic initialization, opposition-based initialization, and uniform initialization are compared on the benchmark functionsf1−f6. The four particle initializations are all added to the standard PSO-ω1 to be compared. The configurations of random initialization, chaotic initialization and opposition-based initialization are elaborated in Section 2.3. For chaotic initialization, a is set to 4. Uniform initialization adopts the recommended configuration in Section 3.2. The four variants are abbreviated as PSO-rand, PSO-chaotic, PSO-opposition, and PSO-uniform for simplicity. All variants are tested on the experimental settings in Section 4.1.From Table8, it can be seen that PSO-uniform performs better than the compared variants. PSO-uniform obtains the smallest mean in five benchmark functions and the highest SR in four benchmark functions. If the initial particles gather around a local optimum, the iteration is very likely to converge prematurely. Uniform initialization reduces the possibility of this case. It distributes initial particles more uniformly and makes them more likely to approach the global optimum. This improves the SR and convergence quality of the PSO algorithm. Except for f5, PSO-uniform has at least the second smallest average number. In addition, it has the smallest Average number in f1. It can be concluded that PSO-uniform has a better global search ability and a better convergence speed in f1−f6.Table 8
Results of the experiment on benchmark functionsf1∼f6.
Benchmark functionVariantMeanSDSR (%)Average numberf1PSO-rand7.069E − 44(=)7.309E − 431009.682E + 02PSO-chaotic6.130E − 44(=)7.711E − 431009.693E + 02PSO-opposition2.596E − 43(+)6.463E − 421009.687E + 02PSO-uniform5.674E − 446.344E − 431009.679E + 02f2PSO-rand1.167E − 44(=)1.436E − 431009.288E + 02PSO-chaotic1.573E − 44(+)2.384E − 431009.304E + 02PSO-opposition1.056E − 44(=)1.637E − 431009.309E + 02PSO-uniform1.157E − 441.163E − 431009.295E + 02f3PSO-rand3.290E − 02(=)2.851E − 0212.21.359E + 03PSO-chaotic3.547E − 02(+)3.015E − 0211.91.387E + 03PSO-opposition3.231E − 02(=)2.805E − 0211.91.378E + 03PSO-uniform3.217E − 022.925E − 0213.61.361E + 03f4PSO-rand3.935E − 17(=)1.690E − 161001.356E + 03PSO-chaotic3.705E − 17(=)1.998E − 161001.358E + 03PSO-opposition4.928E − 17(+)3.238E − 161001.357E + 03PSO-uniform3.601E − 171.704E − 161001.356E + 03f5PSO-rand1.011E + 02(=)1.484E + 030—PSO-chaotic1.105E + 02(+)1.296E + 030.21.908E + 03PSO-opposition1.315E + 02(=)1.763E + 030—PSO-uniform9.081E + 011.220E + 030—f6PSO-rand1.020E + 27(+)3.161E + 2864.51.814E + 03PSO-chaotic1.040E + 25(+)3.161E + 2668.21.808E + 03PSO-opposition1.010E + 21(+)3.161E + 2283.81.794E + 03PSO-uniform5.061E + 197.053E + 2071.41.805E + 03The best results are shown in bold.


## 4.5. Comparing UCPSO with Other Variants of PSO

To analyse the performance of UCPSO, UCPSO is compared with PSO, MCJPSO [23], PSO-DLS [25], EPSO [26], HCLPSO [27], and GLPSO [28] on the CEC2020 benchmark functions. The problem dimension of the experiment is set to D=20. UCPSO adopts the following configuration: a1=4/3, a2=16/3, a3=2/9, b1=2/3, b2=1, b3=1.5, ωini=0.9, and ωfin=0.4. All algorithms are tested on the experimental settings in Section 4.1. For each test function, 30 independent runs are performed.From Table9, it can be observed that UCPSO outperforms PSO and PSO-DLS in 20-dimensional CEC2020 benchmark functions. Except for F1, F8, and F9, UCPSO has better results than MCJPSO. This indicates that the performance of PSO is enhanced by the proposed three improvements. HCLPSO achieves an excellent result in this experiment. In most benchmark functions, UCPSO can keep up with HCLPSO. In F4 and F10, UCPSO performs almost as well as HCLPSO. In F5, UCPSO achieves the best result. In hybrid and composition functions, UCPSO obtains good results and outperforms GLPSO. This proves that the performance of UCPSO is very competitive and that the proposed three improvements are effective.Table 9
Results of the experiment on 20-Dimensional CEC2020 benchmark functions.
No.TermPSOMCJPSOPSO-DLSEPSOHCLPSOGLPSOUCPSOF1Mean7.657E + 09(+)8.746E + 04(−)4.963E + 08(+)2.724E + 03(−)1.876E + 03(−)5.278E + 03(−)1.623E + 08SD5.706E + 091.160E + 051.125E + 091.727E + 031.945E + 034.114E + 033.203E + 08F2Mean3.133E + 03(+)3.547E + 03(+)4.748E + 03(+)1.839E + 03(−)1.480E + 03(−)1.631E + 03(−)2.595E + 03SD4.421E + 025.693E + 023.487E + 023.804E + 021.779E + 022.585E + 022.013E + 02F3Mean7.972E + 02(+)7.640E + 02(+)7.646E + 02(+)7.502E + 02(=)7.338E + 02(−)7.373E + 02(−)7.505E + 02SD6.769E + 011.579E + 013.554E + 011.768E + 013.273E + 006.877E + 008.305E + 00F4Mean2.972E + 04(+)1.905E + 03(=)4.636E + 03(+)1.903E + 03(=)1.902E + 03(=)1.903E + 03(=)1.904E + 03SD7.159E + 041.195E + 001.150E + 041.064E + 006.273E − 011.613E + 001.336E + 00F5Mean1.766E + 06(+)3.715E + 05(+)3.620E + 05(+)2.233E + 05(+)2.040E + 05(+)1.875E + 05(+)1.153E + 05SD2.832E + 062.189E + 053.937E + 051.786E + 051.480E + 052.730E + 057.666E + 04F6Mean2.212E + 03(+)2.293E + 03(+)1.852E + 03(=)1.617E + 03(−)1.615E + 03(−)1.603E + 03(−)1.898E + 03SD2.999E + 021.341E + 022.004E + 021.884E + 013.539E + 011.471E + 001.314E + 00F7Mean6.251E + 05(+)8.681E + 04(−)9.943E + 04(=)8.347E + 04(=)7.621E + 04(−)1.724E + 05(+)8.730E + 04SD7.390E + 056.811E + 041.245E + 057.031E + 046.545E + 043.510E + 051.186E + 05F8Mean4.349E + 03(+)2.309E + 03(−)3.839E + 03(+)2.301E + 03(−)2.301E + 03(−)3.234E + 03(+)2.740E + 03SD9.377E + 021.335E + 011.881E + 037.741E − 019.830E − 011.241E + 038.641E + 02F9Mean3.019E + 03(+)2.858E + 03(=)2.896E + 03(+)2.768E + 03(−)2.745E + 03(−)2.868E + 03(=)2.856E + 03SD9.117E + 011.012E + 022.139E + 011.166E + 021.198E + 021.922E + 011.865E + 01F10Mean3.181E + 03(+)2.962E + 03(=)2.936E + 03(=)2.948E + 03(=)2.923E + 03(−)2.947E + 03(=)2.947E + 03SD2.558E + 022.810E + 012.327E + 012.485E + 011.467E + 013.382E + 013.501E + 01The best results are shown in bold.In Figure7, the median convergence curves of the four types of benchmark functions are shown. We can see that UCPSO has good convergence performance, especially in the top 500 iterations. UCPSO converges fast and has a high level of convergence accuracy, especially in F4 and F5. UCPSO can maintain a strong exploration and exploitation ability and converge to an accurate solution in a short time.Figure 7
The median convergence curves on 20-Dimensional CEC2020 benchmark functions (a)F1. (b) F4. (c) F5. (d) F8.
(a)(b)(c)(d)


## 4.6. Algorithm Complexity

This section will analyse the computational complexity of UCPSO. The computational cost of the original PSO involves the initializationTini, evaluation Teva, velocity, and position update Tupd for each particle. D is the dimensionality of the search space, and tmax is the allowed maximum number of iterations. The computational complexity of PSO can be estimated as TD=Tini+Teva+Tupdtmax=D+D+2⋅Dtmax=D1+3tmax. Therefore, the computational complexity of the original PSO is OD⋅tmaxωcost can be calculated in advance, so it is used directly during the iteration process. Uniform initialization adds a process of sorting before the iteration begins. RIWs adds the process of sorting and assignment into each iteration. Therefore, the computational complexity of UCPSO can be estimated as follows: TD=Tini+Teva+Tupdtmax=D+D⋅logn+D+2⋅D+logn+Dtmax=D1+logn+4tmax+logntmax. Because the number of particles n is usually small, the computational complexity of UCPSO is OD⋅tmaxtoo.An experiment to compare the computational complexity of UCPSO with other PSO variants is carried out.T0 is the time to run the following codes:(23)Fori=1:200000,x=i+5.5;x=x+x;x=x2,x=x∗x;x=sqrtx;x=logx;x=expx;y=xx;End.where T1 is the time to execute 40,000 evaluations of benchmark function F1 by itself with 20 dimensions and T2 is the mean time to execute the algorithm with 40,000 evaluations of F1 with 20 dimensions over 30 times. The number of particles is 20.According to Table10, UCPSO spends the least time on F1 apart from PSO. PSO-DLS is up to 2 times slower in terms of time than UCPSO. The computational complexity of UCPSO is lower than those of PSO-DLS, EPSO, and HCLPSO. Therefore, UCPSO is a relatively fast PSO algorithm with competitive performance. The three improvements in UCPSO will not greatly increase the computational complexity.Table 10
Algorithm complexity of five algorithms onF1 of 20-dimensional CEC2020 benchmark functions.
AlgorithmT0 (s)T1 (s)T2 (s)(T2 − T1)/T0PSO0.0140.0230.19612.357PSO-DLS0.0140.0230.54637.357EPSO0.0140.0230.49333.571HCLPSO0.0140.0230.36324.286UCPSO0.0140.0230.29819.643


## 4.7. Application to Real-World Problems

In this part, UCPSO is applied to solve real-world engineering optimization problems. PSO and UCPSO are tested onP1 and P4 of the CEC2011 real-world optimization problems, as shown in Table 11. For each test problem, 30 independent runs are performed. The population size is set to 20, and the maximum number of iterations is set to 2000. The allowed maximum number of iterations is used as the termination criterion for all algorithms.Table 11
CEC2011 real-world optimization problems.
No.ProblemsDP1Parameter estimation for frequency-modulated (FM) sound waves6P4Optimal control of a nonlinear stirred tank reactor1


### 4.7.1. Parameter Estimation for Frequency-Modulated (FM) Sound Waves

Frequency-modulated (FM) sound wave synthesis has an important role in several modern music systems [38]. The object of this problem is to minimize the summation of square errors between the following equations:(24)yt=a1sinω1⋅t⋅θ−a2⋅sinω2⋅t⋅θ+a3⋅sinω3⋅t⋅θ,(25)y0t=1.0sin5.0⋅t⋅θ−1.5⋅sin4.8⋅t⋅θ+2.0⋅sin4.9⋅t⋅θ,where θ=2π/100. The dimension of this problem is 6, and the search range is −6.4,6.35. The fitness function is shown as(26)fx=∑t=0100yt−y0t2.


### 4.7.2. Optimal Control of a Nonlinear Stirred Tank Reactor

This problem is a multimodal optimal control problem. It describes a first-order irreversible chemical reaction carried out in a continuous stirred tank reactor [38]. This chemical process is modelled by two nonlinear differential equations:(27)x˙1=−2+ux1+0.25+x2+0.5exp25x1x1+2,x˙2=0.5−x2−x2+0.5exp25x1x1+2,where u is the flow rate of the cooling fluid, x1 is the dimensionless steady-state temperature, and x2 is the deviation from the dimensionless steady-state concentration. The fitness function of this problem is(28)J=∫0tf=0.72x12+x22+0.1u2dt.The initial condition isx1=x2=0.09. The search range is unconstrained, but the initial range of u is 0,5. The dimension of this problem is 1.As shown in Table12, the best result of UCPSO is slightly worse than the best result of PSO, but the worst result of UCPSO is better than the worst result of PSO. In Table 13, the best and worst results of UCPSO are better than the best and worst results of PSO, respectively. According to the results on P1 and P4, UCPSO has the ability to solve real-world engineering optimization problems.Table 12
Results onP1 of CEC2011 real-world optimization problems.
AlgorithmTerma1ω1a2ω2a3ω3fxPSOBest−1.000−5.000−1.500−4.800−2.0004.9000UCPSO1.0005.0001.500−4.800−2.0004.9004.563E − 28PSOWorst0.4244.9480.698−2.680−6.4006.2482.333E + 01UCPSO0.407−0.992−2.2181.1603.079−2.6672.277E + 01Table 13
Results onP4 of CEC2011 real-world optimization problems.
AlgorithmTermufxPSOBest1.2131.433E + 01UCPSO0.9601.377E + 01PSOWorst1.7922.108E + 01UCPSO1.7952.096E + 01


## 4.7.1. Parameter Estimation for Frequency-Modulated (FM) Sound Waves

Frequency-modulated (FM) sound wave synthesis has an important role in several modern music systems [38]. The object of this problem is to minimize the summation of square errors between the following equations:(24)yt=a1sinω1⋅t⋅θ−a2⋅sinω2⋅t⋅θ+a3⋅sinω3⋅t⋅θ,(25)y0t=1.0sin5.0⋅t⋅θ−1.5⋅sin4.8⋅t⋅θ+2.0⋅sin4.9⋅t⋅θ,where θ=2π/100. The dimension of this problem is 6, and the search range is −6.4,6.35. The fitness function is shown as(26)fx=∑t=0100yt−y0t2.


## 4.7.2. Optimal Control of a Nonlinear Stirred Tank Reactor

This problem is a multimodal optimal control problem. It describes a first-order irreversible chemical reaction carried out in a continuous stirred tank reactor [38]. This chemical process is modelled by two nonlinear differential equations:(27)x˙1=−2+ux1+0.25+x2+0.5exp25x1x1+2,x˙2=0.5−x2−x2+0.5exp25x1x1+2,where u is the flow rate of the cooling fluid, x1 is the dimensionless steady-state temperature, and x2 is the deviation from the dimensionless steady-state concentration. The fitness function of this problem is(28)J=∫0tf=0.72x12+x22+0.1u2dt.The initial condition isx1=x2=0.09. The search range is unconstrained, but the initial range of u is 0,5. The dimension of this problem is 1.As shown in Table12, the best result of UCPSO is slightly worse than the best result of PSO, but the worst result of UCPSO is better than the worst result of PSO. In Table 13, the best and worst results of UCPSO are better than the best and worst results of PSO, respectively. According to the results on P1 and P4, UCPSO has the ability to solve real-world engineering optimization problems.Table 12
Results onP1 of CEC2011 real-world optimization problems.
AlgorithmTerma1ω1a2ω2a3ω3fxPSOBest−1.000−5.000−1.500−4.800−2.0004.9000UCPSO1.0005.0001.500−4.800−2.0004.9004.563E − 28PSOWorst0.4244.9480.698−2.680−6.4006.2482.333E + 01UCPSO0.407−0.992−2.2181.1603.079−2.6672.277E + 01Table 13
Results onP4 of CEC2011 real-world optimization problems.
AlgorithmTermufxPSOBest1.2131.433E + 01UCPSO0.9601.377E + 01PSOWorst1.7922.108E + 01UCPSO1.7952.096E + 01


## 5. Conclusion

In this paper, UCPSO is proposed to prevent PSO from falling into a local optimum and improve the comprehensive performance of PSO. It adopts a variable-period cosine inertia weightωcost, uniform initialization, and rank-based strategy for individual particle inertia weights (RIWs). ωcost can satisfy the requirements of inertia weight at different stages and balance exploration and exploitation better. Uniform initialization is able to avoid the aggregation of initial particles. RIWs increase the diversity of swarms and improves exploration and exploitation at the same time. The above three improvements enhance the global search ability of PSO and ensure a competitive comprehensive performance of UCPSO. Extensive tests based on benchmark functions validate the effectiveness of the improvements and the performance of UCPSO.In future work, the authors will perform more experiments to obtain a better configuration of parameters. We intend to apply UCPSO to practical engineering fields, such as clustering, parameter optimization, image segmentation, and industry scheduling. After that, we will continue to study other forms of inertia weight and research more effective improvements that are easy to implement.



---

*Source: 8819333-2021-03-19.xml*