# Z-Shaped Transfer Functions for Binary Particle Swarm Optimization Algorithm

Authors: Sha-sha Guo; Jie-sheng Wang; Meng-wei Guo
Journal: Computational Intelligence and Neuroscience
 (2020)

---

## Abstract

Particle swarm optimization (PSO) algorithm is a swarm intelligent searching algorithm based on population that simulates the social behavior of birds, bees, or fish groups. The discrete binary particle swarm optimization (BPSO) algorithm maps the continuous search space to a binary space through a new transfer function, and the update process is designed to switch the position of the particles between 0 and 1 in the binary search space. Aiming at the existed BPSO algorithms which are easy to fall into the local optimum, a new Z-shaped probability transfer function is proposed to map the continuous search space to a binary space. By adopting nine typical benchmark functions, the proposed Z-probability transfer function and the V-shaped and S-shaped transfer functions are used to carry out the performance simulation experiments. The results show that the proposed Z-shaped probability transfer function improves the convergence speed and optimization accuracy of the BPSO algorithm.


---

## Body

## 1. Introduction

The particle swarm optimization (PSO) algorithm is one of the widely used evolutionary algorithms inspired by animal social behaviors [1, 2]. It has the search speed, high efficiency, simple algorithm, and so on and has been widely used in crystal structure prediction [3], medical detection [4], grid scheduling [5], robot path planning [6], clustering problem [7], neural network, and many other areas [8–10]. However, many optimization problems have binary searching space, so it is necessary to develop binary optimization algorithm to solve them.The binary particle swarm optimization (BPSO) algorithm was proposed by Kennedy and Eberhart in 1997 [11]. Typical binary particle swarm optimization algorithm has two different components: a new transfer function and a different location update program. The transfer function is used to map the continuous search space to a binary space, and the update process is designed to switch the position of the particle between 0 and 1 in the binary searching space. The original version of BPSO algorithm is prone to fall into local extreme, so many scholars have made some improvements to BPSO algorithm. In 2008, Yin proposed a new improved BPSO algorithm, which uses the new updated position formula digital curve with the best polygon approximation [12]. In 2013, Wang et al. [13] used the average information of the individual population and the individual extremum of the particle swarm to determine the current probability value of the particle and removed the influence of the current value of the particle on the next generation. At the same time, the greedy thought is added so that the algorithm not only has the overall optimization characteristics of the particle swarm optimization algorithm but also accelerates the convergence speed of the algorithm. In 2014, Luo [14] revised the sigm function, taking the particle velocity as the correction term of the particle position, fully considering the guiding effect between the particles, and ensuring that the particle follows the optimization mode of the algorithm and applies it to solve the vehicle. On the path problem, the effectiveness of the algorithm is improved. Similarly, many other algorithms reference transfer functions, which are converted to binary versions by their successive versions. In 2013, Sharafi et al. [15] added a transfer function in the tracking mode of cat swarm algorithm, changed the meaning of velocity vector into the probability of mutation in each dimension of cats, and transformed continuous cat swarm algorithm into discrete binary cat swarm algorithm. In 2014, Mirjalili et al. [16] proposed a binary version of the bat algorithm, which is also a probability value that maps velocity values to updated locations using a transfer function. In the same year, Sabba and Chikhi [17] proposed a discrete binary bat algorithm (BINBA) for solving binary space optimization problems. The algorithm is based on the sigmoid function used by Kennedy and Eberhart in the binary particle swarm optimization algorithm proposed in 1997 [11]. BBA was tested on an example of a multidimensional knapsack problem. Compared with other bionic algorithms, the results have a good application prospect. In 2017, Fei [18] proposed a V-shaped transfer function to improve the binary bat algorithm to ensure that the probability of reducing the position of the vector of the position vector of the bat is an element equal to the current best position, and increasing the probability of changing the element of their position vector to the element of the bat is the element of the unequal current optimal position, which helps to enhance the optimization of the binary bat algorithm. In 2015, Emary et al. [19] proposed two new binary wolf optimization algorithms; one of which is to use the sigmoid function to compress the positions of consecutive updates, and then randomly these values are thresholded to obtain an updated double-valued gray wolf position. This method is used for binary gray wolf optimization (BGWO) to find feature subsets to maximize classification accuracy while minimizing the number of affected features. In 2017, Panwar et al. [20] proposed a heuristic binary method for solving the unit commitment problem (UC). This method estimates the continuous and valuable update of the wolves to the global optimal solution, followed by the sigmoid transformation. The simulation results show that BGWO has better performance in solving small- and medium-sized system UC problems compared with other existing heuristic and binary methods. In 2019, Hussien et al. [21] modified the original version of WOA to handle binary optimization problems. To this end, two transfer functions (s-shaped and v-shaped) are proposed to map a continuous search space to a search space. In order to illustrate the function and performance of the proposed binary whale optimization algorithm (BWOA) and apply it to 22 objective functions, 3 engineering optimization problems, and a worldwide sales problem, the results are obtained and the validity is verified. In the same year, Reddy et al. [22] mapped the binary natural PBUC problem to a continuous, real-valued whale position/location mapped to a binary search space through various transformation functions. They introduced three variants of BWOA, using a hyperbolic function, an inverse tangent function, and a sigmoid transfer function, respectively. The convergence characteristics, quality of the solution, and consistency of the results of different BWOA variables are discussed, and the superiority and statistical significance of the proposed method over the existing methods are given.This shows that the transfer function is the most important part of the binary version of the algorithm. In this paper, a new Z-shaped transfer function is proposed and applied to the particle swarm optimization algorithm. The simulation results show that the new transfer function improves the convergence speed and optimization precision of the algorithm. The structure of this paper is organized as follows. Section2 introduces the standard particle swarm algorithm. Section 3 introduces the binary particle swarm algorithm. Section 4 proposes a new Z-shaped transfer function. In Section 5, the effectiveness of the improved algorithm is verified by simulation experiments on typical test functions. Section 6 summarizes the full text and proposes future research directions.


## 2. Particle Swarm Optimization Algorithm

The particle swarm optimization (PSO) algorithm is an intelligent optimization algorithm proposed by Kennedy and Eberhart and Beheshti and Shamsuddin [1, 2] in 1995. It simulates the bird’s flight foraging behavior and optimizes the swarm through collective collaboration between birds. In the PSO algorithm, the potential solution to each optimization problem is a bird in the search space, named as a particle. Later, Shi and Eberhart added a new impact factor w, which improved the detection and exploratory, and formed the current standard particle swarm optimization algorithm [23]. All particles have an appropriate value determined by an optimized function, and each particle has a velocity that determines the direction and distance of their flight. Then, the particle follows the current optimal particle to search in the solution space.The particle’s velocity and position are updated by(1)vid=w∗vid+c1r1pid−xid+c2r2pgd−xid,xid=xid+vid,where vid is the velocity of the ith particle in the dth dimension, pid is the optimal position of the ith particle so far, xid is the position of the current ith particle in the dth dimension, pgd is the optimal position that the particle swarm has searched so far, and w is the inertia weight. In this paper, the linear decreasing weight is used, namely, wmax−t∗wmax−wmin/tmax, where wmax represents the maximum value of inertia weight, wmin represents the minimum value of inertia weight, t represents the current number of iterations, and tmax represents the maximum number of iterations. This principle is still used in binary PSO algorithm. r1 and r2 are two randomly generated acceleration weight coefficients between [0, 1], c1 and c2 are acceleration factors, and the value 2 is taken in this paper [24].There are three parts in the velocity updating formula of particles. The first part is inertia or momentum, which reflects the movement habit of particles, and represents the tendency of particles to maintain their previous velocity. The second part is the cognitive part, which reflects the particle’s memory or recall of its own historical experience, and represents that the particle tends to approach the optimal position of its own history. The third part is the social part, which reflects the collective historical experience of cooperation and knowledge sharing among particles, and represents the tendency of particles to approach the optimal historical position of the community.


## 3. Binary Particle Swarm Optimization Algorithm

In the binary particle swarm optimization (BPSO) algorithm, the velocity update equation has not changed, but a new velocity transfer function has been introduced to map the original continuous search space to the binary search space. The transfer function concept was originally proposed by Kennedy and Eberhart [11], which allows PSO algorithm to run in the binary searching space. In this version, particles can only be zero or 1 by taking their position vector. The effect of velocity is to indicate the probability that the bits take 0 or 1, so they propose a Sigmoid transfer function, as shown in equation (2), which can convert all real values of velocity into probability values [0, 1]:(2)Tvikt=11+e−vikt,where vikt represents the velocity of particle i at iteration t in k dimension.After converting the velocity to a probability value, the position vector can be updated with the probability of its velocity by(3)xikt+1=0,If rand<Tvikt,1,If rand≥Tvikt,where vikt represents the velocity of particle i at iteration t in k dimension.The flowchart of BPSO algorithm is shown in Figure1. According to the experimental analysis, the original BPSO has some shortcomings, such as premature convergence and easy to fall into local optimal, so it has been continuously improved since BPSO was proposed. In 2008, Lee et al. proposed another modification of BPSO algorithm [25], which allows the continuous update velocity and position of PSO algorithm. In this improvement, they replace the velocity with the displacement in the transfer function. The probability formula is described as follows:(4)Txkt=11+e−xikt,where xikt represents the position of particle i at iteration t in k dimension.Figure 1
Flow chart of BPSO algorithm.The corresponding position updating formula is defined as follows:(5)xikt+1=0,If rand<Txikt,1,If rand≥Txikt,where xikt represents the position of particle i at iteration t in k dimension.This transfer function is named as S-shaped transfer function, and a set of S-shaped transfer functions are formed by changing parameters, whose expressions and graphs are shown in Table1 and Figure 2, respectively [24]. It can be seen from Figure 3 that the velocity value of s1 is larger than that of s2, and the saturation speed is also accelerated. Similarly, when the speed becomes smaller, as shown in s3 and s4, the saturation speed will decrease. To sum up, the change probability of position vector increases with the increase of slope of these functions. Therefore, when the velocity is the same, the probability value returned by s1 is the largest. In the following Section 5, the influence of different slopes on solving the function optimization problem will be studied.Table 1
S-shaped transfer functions.
Experiment nameNameExpressionBPSO1s1T1x=1/1+e−2xBPSO2s2T2x=1/1+e−xBPSO3s3T3x=1/1+e−x/2BPSO4s4T4x=1/1+e−x/3Figure 2
S-shaped transfer functions.Figure 3
V-shaped transfer functions.In 2009, Rashedi et al. proposed a new transfer function named as V-shaped transfer function and a new position update strategy [26]. The formula is described as follows:(6)xikt+1=xikt+1−1,If rand<Txikt,xikt,If rand≥Txikt,where xikt represents the velocity of particle i at iteration t in k dimension and xikt+1−1 is the complement of xikt.According to the characteristics of V-shaped transfer function, a series of V-shaped transfer functions are proposed by using different functional equations, whose expressions and graphs are shown in Table2 and Figure 3, respectively.Table 2
V-shaped transfer functions [24].
Experiment nameNameExpressionBPSO5V1T5x=erfπ/2xBPSO6V2T6x=tanhxBPSO7V3T7x=x/1+x2BPSO8V4T8x=2/πarctanπ/2xAccording to Figure3, this function is a symmetric function. When the absolute value of velocity is larger, the probability of particle position change is higher. For different V-shaped functions, it is easy to find that when the slope of the function is higher, the probability of the particle position change is higher. In other words, when the velocity is constant, the function with higher slope has a higher probability of the returned particle change. Similarly, the influence of different slopes on the processing of function optimization problems will be analyzed in Section 5.


## 4. Improved Binary Particle Swarm Optimization Algorithm

Based on the characteristics of binary particle swarm optimization algorithm, the continuous search space is mapped to the discrete binary space. The purpose of the transfer function is to represent the probability that the element of the position vector goes from 0 to 1, so the transfer function must be a bounded function of [0, 1]. In addition, when the velocity value is 0, the probability of change should be relatively small because when the particle finds the optimal value, the velocity should be reduced to 0, and the probability of the position change of the particle should be 0. According to the characteristics of transfer function, a new Z-shaped transfer function is proposed, which is defined as follows:(7)Txikt=1−axikt,where xikt represents the velocity of particle i at iteration t in k dimension and a is a positive integer. By changing the value of a, a set of Z-shaped function families is obtained, whose expressions and figures are shown in Table 3 and Figure 4, respectively.Table 3
Z-shaped transfer functions.
Experiment nameNameExpressionBPSO9Z1T9x=1−2xBPSO10Z2T10x=1−5xBPSO11Z3T11x=1−8xBPSO12Z4T12x=1−20xFigure 4
Z-shaped transfer functions.As shown in Figure4, the mapping function is an asymmetric mapping function. The asymmetric mapping function basically satisfies the absolute value of the velocity to determine the mapping probability of the particle position vector variation, so the convergence speed is fast. When the parameter Dimparticle=DimFunction×15 changes, the slope of the function also changes. The larger Dimparticle=DimFunction×15, the smaller the slope of the function. That is to say, when the speed is the same, the probability that the returned particle position of the parameter Dimparticle=DimFunction×15 is small changes is larger.


## 5. Simulation Experiments and Result Analysis

### 5.1. Selection of Test Functions

The process of mapping continuous search space to discrete search space using the proposed transfer function is shown in Figure5. To represent each continuous variable in binary, 15 bits are adopted. It should be noted that each function variable retains a bit of its sign. Therefore, the particle size is calculated by(8)Dimpracticle=DimFunction×15.Figure 5
Procedure of mapping continuous search space to discrete search space.According to equation (8), when the test function has 5, 10, and 30 dimensions, the corresponding particle sizes are 75, 150, and 450, respectively. In order to evaluate the improved BPSO algorithm based on the Z-shaped transfer functions, the simulation experiments were carried out by using the nine benchmark functions proposed in the CEC special conference. The expressions of the benchmark functions and the three-dimensional graphics are shown in Table 4 and Figure 6, respectively.Table 4
Test functions.
FunctionDimRangFminF1x∑i=1nxi25, 8, 10, 30[−100, 100]0F2x∑i=1nxi+∏i=1nxi5, 8, 10, 30[−10, 10]0F3x=∑i=1n∑j−1nxj25, 8, 10, 30[100, 100]0F4x=∑i=1n−1100xi+1−xi22+xi−125, 8, 10, 30[−30, 30]0F5x=∑i=1nxi+525, 8, 10, 30[−100, 100]0F6x=∑i=1nixi4+random0,15, 8, 10, 30[−1.28, 1.28]0F7x=∑i=1nxi2−10cos2πxi+105, 8, 10, 30[−5.12,−5.12]0F8x=−20exp×−0.21/n∑i=1nxi−exp1/n∑i=1ncos2πxi+20+e5, 8, 10, 30[−32, 32]0F9=π/n10sinπy1+∑i=1n−1yi−121+10sin2πyi+1+yn−12+∑i=1nuxi,10,100,4yi=1+xi+145, 8, 10, 30[−50, 50]0uxi,a,k,m=kxi−amxi>a0−a<xi<ak−xi−amxi<−aF10 [24]:10[−5, 5]360f1∼f2 = Rotated Expanded Scaffer's FF FunctionWhere FF is Shifted Rosenbrock.f3∼f4 = Rastrigin's Functionf5∼f6 = FF4 Functionf7∼f8 = Weierstrass Functionf9∼f10 = Griewank’s Functionσ=1,1,1,1,1,2,2,2,2,2λ=5∗5/100;5/100;5∗1;1;5∗1;1;5∗10;5∗5/200;5/200F11 [24]10[−5, 5]360All settings are the same asF10xj=xjxj−o1j<1/2round2xj/2xj−o1j≥1/2 for j = 1, 2, …, nExceptroundx=a−1ifx≤0&b≥0.51ifb<0.5a1x>0&b≥0.5Wherea is x’s integral part and b is x’s decimal part.F12 [24]10[−5, 5]260f1 = Weierstrass Functionf2 = Rotated Expanded Scaffer's FF FunctionWhere FF is Shifted Rosenbrock.f3 = FF4 FunctionWhere FF is Rastrigin’s Functionf4 = Ackley’s Functionf5 = Rastrigin's Functionf6 = Griewank’s Functionf7 = Noncontinuous Expanded Scaffer’s FF FunctionWhere FF is Shifted Rosenbrock.f8 = Noncontinuous Rastrigin's Functionf9 = High Conditioned Elliptic Functionf10 = Sphere Function with Noise in Fitnessσi=2, for i = 1, 2, …, nλ=10;5/20;1;5/32;1;5/100;5/50;1;5/100;5/100Figure 6
3D graphs of benchmark functions. (a)F1. (b) F2. (c) F3. (d) F4. (e) F5. (f) F6. (g) F7. (h) F8. (i) F9. (j) F10. (k) F11. (l) F12.
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)


### 5.2. Performance Comparison of Z-Shaped Transfer Functions

In order to test the performance of the Z-shaped transfer function, the parameters of the Z-shaped transfer function are set as 2, 5, 8, and 20, respectively, and the influence of different parameter settings on the simulation experiments is analyzed. In order to further verify the optimization accuracy of Z-shaped transfer function, each test function was run 10 times, and the best, worst, average, and STD values of 9 functions in 5 and 30 dimensions were recorded, respectively. The maximum number of iterations isMax_iter=500. The simulation results of D=5 and D=30 are shown in Figures 7 and 8, respectively, and the statistical results are shown in Tables 5 and 6, respectively.Figure 7
Convergence curves of the benchmark functions underD=5. (a) F1. (b) F2. (c) F3. (d) F4. (e) F5. (f) F6. (g) F7. (h) F8. (i) F9.
(a)(b)(c)(d)(e)(f)(g)(h)(i)Figure 8
Convergence curves of the benchmark functions underD=30. (a) F1. (b) F2. (c) F3. (d) F4. (e) F5. (f) F6. (g) F7. (h) F8. (i) F9.
(a)(b)(c)(d)(e)(f)(g)(h)(i)Table 5
Numerical results underD=5.
FunctionArithmeticBestWorstAveStdF1BPSO90.00000.00000.00000.0000BPSO100.00000.00000.00000.0000BPSO110.00000.00000.00000.0000BPSO120.00000.00000.00000.0000F2BPSO90.00000.00000.00000.0000BPSO100.00000.00000.00000.0000BPSO110.00000.00000.00000.0000BPSO120.00000.00000.00000.0000F3BPSO90.00000.00000.00000.0000BPSO100.00000.00000.00000.0000BPSO110.00000.00000.00000.0000BPSO120.00000.00000.00000.0000F4BPSO974.000074.000074.00000.0000BPSO1074.000074.000074.00000.0000BPSO1174.000074.000074.00000.0000BPSO1274.000074.000074.00000.0000F5BPSO918.750018.750018.75000.0000BPSO1018.750018.750018.75000.0000BPSO1118.750018.750018.75000.0000BPSO1218.750018.750018.75000.0000F6BPSO90.00390.08360.02790.0219BPSO100.00020.01300.00440.0043BPSO110.00010.00430.00180.0013BPSO120.00010.00240.00100.0008F7BPSO90.00000.00000.00000.0000BPSO100.00000.00000.00000.0000BPSO110.00000.00000.00000.0000BPSO120.00000.00000.00000.0000F8BPSO98.8818E − 168.8818E − 168.8818E − 160.0000BPSO108.8818E − 168.8818E − 168.8818E − 160.0000BPSO118.8818E − 168.8818E − 168.8818E − 160.0000BPSO128.8818E − 168.8818E − 168.8818E − 160.0000F9BPSO91.37441.37441.37440.0000BPSO101.37441.37441.37440.0000BPSO111.37441.37441.37440.0000BPSO121.37441.37441.37440.0000Table 6
Numerical results underD=30.
FunctionArithmeticBestWorstAveStdF1BPSO92.00007.00004.20001.4697BPSO100.00000.00000.00000.0000BPSO110.00000.00000.00000.0000BPSO120.00000.00000.00000.0000F2BPSO92.00008.00004.50001.9621BPSO100.00000.00000.00000.0000BPSO110.00000.00000.00000.0000BPSO120.00000.00000.00000.0000F3BPSO99.00002683.00001517.0000890.0239BPSO100.00000.00000.00000.0000BPSO110.00000.00000.00000.0000BPSO120.00000.00000.00000.0000F4BPSO9449.00002041.00001205.2000434.1667BPSO10449.0000449.0000449.00000.0000BPSO11449.0000449.0000449.00000.0000BPSO12449.0000449.0000449.00000.0000F5BPSO9118.5000124.5000120.90001.9596BPSO10112.5000112.5000112.50000.0000BPSO11112.5000112.5000112.50000.0000BPSO12112.5000112.5000112.50000.0000F6BPSO9210.84451124.7927618.0885271.3089BPSO100.00010.05260.02160.0155BPSO110.00000.01320.00420.0039BPSO120.00040.00490.00180.0012F7BPSO91.00007.00004.90001.8682BPSO100.00000.00000.00000.0000BPSO110.00000.00000.00000.0000BPSO120.00000.00000.00000.0000F8BPSO98.8818E − 160.49270.30650.1329BPSO108.8818E − 168.8818E − 168.8818E − 160.0000BPSO118.8818E − 168.8818E − 168.8818E − 160.0000BPSO128.8818E − 168.8818E − 168.8818E − 160.0000F9BPSO91.22091.28111.25200.0176BPSO101.21081.21081.21080.0000BPSO111.21081.21081.21080.0000BPSO121.21081.21081.21080.0000It can be seen from Figure7 and Table 5 that when the test functions have 5 dimensions, changing the parameters has no effect on the final convergence results, and the final convergence results are the same. However, the rate of convergence will be different. In the function convergence curves, it can be seen that increasing the value of parameters can improve the convergence speed of the algorithm, but it is not the case that the larger the parameters are, the faster the convergence speed will be. In the convergence curves of F1, F2, F3, F7, and F9, the transfer function whose parameter is set to 20 has the fastest convergence speed. In the convergence curves of F4, F5, and F8, the transfer function with parameter set to 8 has the fastest convergence speed.It can be seen from Figure8 and Table 6 that when the test functions have 30 dimensions, changing the size of parameters has no obvious influence on the convergence speed of the algorithm, but has an influence on the final convergence result. In the functions F1, F2, F3, F4, F5, F7, F8, and F9, the parameters are set to 5, 8, and 20, and the effect is better when the parameter is 2, that is to say that increasing the parameter can improve the accuracy of the algorithm. However, when the parameters are set to 5, 8, and 20, the results are the same. That is to say, it is not the case that the larger the parameters setting, the better the performance. When the parameters are set to a certain size, increasing the parameters will not improve the accuracy of the algorithm.


### 5.3. Performance Comparison of Z-Shaped, S-Shaped, and V-Shaped Transfer Functions

#### 5.3.1. Test Function Results and Analysis

To further investigate the validity of the Z-shaped transfer function, the Z-shaped transfer function is compared to the S-shaped and the V-shaped transfer function. Through the above analysis, it can be concluded that when the parameter of the Z-shaped transfer function is set to 5, the convergence precision and convergence speed are optimal. Therefore, in this set of simulation experiments, the parameter of the new Z-shaped transfer function is set as 5, the selected 12 test functions have 10 dimensions, and the maximum number of iterations is 500. The simulation results and numerical analysis are shown in Figure9 and Table 7, respectively.Figure 9
Convergence curves of the benchmark functions. (a)F1. (b) F2. (c) F3. (d) F4. (e) F5. (f) F6. (g) F7. (h) F8. (i) F9. (j) F10. (k) F11. (l) F12.
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)Table 7
Numerical statistics.
FunctionArithmeticBestWorstAveStdF1BPSO120.000025.000023.70001.4177BPSO228.000034.000030.80001.8330BPSO336.000041.000038.40001.6852BPSO438.000044.000042.10001.5780BPSO52.000014.00007.70002.9343BPSO64.00009.00005.70001.5524BPSO73.00007.00005.00001.3416BPSO82.00007.00004.00001.4142BPSO100.00000.00000.00000.0000F2BPSO121.000028.000024.90001.9723BPSO228.000035.000032.50002.1095BPSO338.000042.000039.20001.1662BPSO438.000043.000041.40001.7436BPSO54.000012.00007.60002.3324BPSO64.000010.00006.80001.8868BPSO72.00007.00004.70001.6155BPSO81.00006.00003.80001.6000BPSO100.00000.00000.00000.0000F3BPSO12.0936E + 042.9895E + 042.4866E + 043.0074E + 03BPSO23.5023E + 044.7871E + 044.0582E + 044.5452E + 03BPSO34.0798E + 047.7036E + 046.3317E + 049.7782E + 03BPSO46.1630E + 048.7746E + 047.4415E + 047.9859E + 03BPSO59.2100E + 027.8520E + 033.2089E + 031.9484E + 03BPSO62.6700E + 024.6020E + 032.1907E + 031.3673E + 03BPSO79.2000E + 013.1230E + 031.0619E + 031.0267E + 03BPSO81.5600E + 022.5080E + 031.0006E + 038.4595E + 02BPSO100.00000.00000.00000.0000F4BPSO13651.00004256.00003899.0000155.1722BPSO24072.00004657.00004406.2000159.0540BPSO34163.00004971.00004750.7000219.8095BPSO44771.00005162.00004963.3000103.9173BPSO51828.00003047.00002207.5000324.0522BPSO61937.00002454.00002135.4000210.8327BPSO71643.00002650.00002179.6000355.8585BPSO81640.00002848.00002175.5000386.0337BPSO10149.0000149.0000149.00000.0000F5BPSO185.500089.500087.50001.7889BPSO297.5000107.5000102.50003.6056BPSO3105.5000117.5000112.30003.8158BPSO4115.5000125.5000119.90003.2000BPSO537.500061.500052.10006.3906BPSO645.500053.500050.30002.4000BPSO741.500053.500047.70004.1425BPSO843.500047.500045.50001.7889BPSO1037.500037.500037.50000.0000F6BPSO11174.21461680.98511489.1710149.4409BPSO21760.86192317.80851949.8876155.5235BPSO32496.65272707.55562584.312163.7418BPSO42691.96042984.03082850.7730103.5472BPSO5225.0052567.0026401.3030109.7147BPSO6162.0050665.0021346.3023133.7193BPSO7145.0009504.0035245.7022113.2767BPSO8144.0011482.0005297.3014114.2555BPSO100.00010.01010.00350.0028F7BPSO122.000028.000025.30002.2383BPSO229.000034.000032.00001.4142BPSO336.000040.000038.10001.0440BPSO435.000044.000040.80002.7129BPSO54.00009.00006.40001.4283BPSO61.000011.00006.50002.6926BPSO72.00007.00004.80001.9391BPSO81.00006.00003.30001.4866BPSO100.00000.00000.00000.0000F8BPSO11.44201.59791.51530.0418BPSO21.68371.86671.75070.0513BPSO31.84181.96251.91710.0450BPSO41.91532.05321.99890.0400BPSO50.45661.00660.78340.1726BPSO60.64261.00660.80870.1022BPSO70.32390.84570.67320.1405BPSO80.32390.90280.65730.1738BPSO108.88178E − 168.88178E − 168.8818E − 160.0000F9BPSO11.96872.20832.07530.0814BPSO22.18862.43742.30500.0850BPSO32.55782.74762.64940.0629BPSO42.56832.79732.71200.0743BPSO51.36661.60741.49110.0771BPSO61.36661.54721.43090.0552BPSO71.36661.57731.46900.0634BPSO81.33651.49751.40680.0486BPSO101.21081.21081.21080.0000F10BPSO1833.4458897.9789859.971423.8603BPSO2797.1630894.5194855.812729.2840BPSO3822.1992935.9137871.306631.0668BPSO4801.6173922.5607860.147640.3582BPSO5819.9967922.3191864.506632.5671BPSO6798.7684903.6756848.358132.5885BPSO7803.2907904.1978862.332135.3385BPSO8833.7166898.4921865.766424.2585BPSO10732.3788790.8776764.520620.0896F11BPSO1811.5518896.1991860.367426.4694BPSO2797.1630905.6025854.538229.9453BPSO3822.1992935.9137862.455036.2997BPSO4801.6173888.0983849.774628.6370BPSO5819.9967922.3191868.316329.5430BPSO6798.7684903.6756844.825835.6381BPSO7803.2907904.1978865.276129.1488BPSO8788.3447898.6084866.700437.5416BPSO10732.3788790.5087758.083722.0786F12BPSO1761.2894912.1116863.035543.0973BPSO2803.8999897.6278850.460632.1798BPSO3835.9801912.0372878.087423.8546BPSO4772.1731916.9646858.773544.5248BPSO5765.3802900.9199859.808241.3350BPSO6810.4896900.3629856.824828.2321BPSO7820.4377918.6237873.290030.3881BPSO8811.3776885.9333852.604220.1360BPSO10693.7516811.1792758.920038.4465It can be seen from the convergence curves that the proposed new transfer function improves the convergence speed of the algorithm. According to the data shown in Table7, the new transfer function improves the accuracy of the BPSO algorithm. In particular, for functions F1, F2, F3, and F7, the optimal value of the function can be accurately derived. Similarly, for functions F8, the accuracy is 15 orders of magnitude higher than other transfer functions. For the composite functions F10∼F12, BPSO10 improves the convergence accuracy and convergence speed of the algorithm, but the optimal value of the function cannot be found, which will be the focus of future research and learning. In other functions, it also improves the convergence speed and convergence precision of the algorithm compared to other transfer functions.


#### 5.3.2. Nonparametric Test Analysis

In order to verify the stability of the algorithm, we perform a nonparametric test on the optimal value of the test function. In this work, Wilcoxon rank sum test [27] is used as a nonparametric statistical test to determine the importance of the results. Table 8 depicts the 5% p value obtained from this test. It can be seen from Table 8 that the p values for all test functions are much less than 0.05, highlighting the significant advantages of BPSO10 over other versions of the binary particle swarm algorithm based on the p value (less than 0.05) algorithm.Table 8
Nonparametric test results.
BPSO10vsBPSO1BPSO10vsBPSO2BPSO10vsBPSO3BPSO10vsBPSO4BPSO10vsBPSO5BPSO10vsBPSO6BPSO10vsBPSO7BPSO10vsBPSO8F15.721E − 056.386E − 056.069E − 054.880E − 055.893E − 056.069E − 055.849E − 055.763E − 05F25.470E − 056.386E − 055.721E − 055.893E − 056.158E − 056.113E − 056.113E − 056.113E − 05F36.386E − 056.386E − 056.386E − 056.386E − 056.386E − 056.386E − 056.386E − 056.386E − 05F46.386E − 056.386E − 056.294E − 056.386E − 056.386E − 056.340E − 056.386E − 056.386E − 05F55.470E − 055.849E − 055.721E − 056.113E − 052.238E − 045.980E − 056.203E − 055.470E − 05F61.827E − 041.827E − 041.827E − 041.827E − 041.827E − 041.827E − 041.827E − 041.827E − 04F76.113E − 055.849E − 055.470E − 056.113E − 056.113E − 056.249E − 056.069E − 055.849E − 05F85.511E − 056.113E − 055.721E − 056.113E − 056.294E − 056.113E − 056.113E − 056.158E − 05F96.340E − 056.294E − 056.340E − 056.294E − 056.249E − 056.158E − 056.294E − 055.893E − 05F101.806E − 041.806E − 041.806E − 041.806E − 041.806E − 041.806E − 041.806E − 041.806E − 04F111.827E − 041.827E − 041.827E − 041.827E − 041.827E − 041.827E − 041.827E − 042.461E − 04F121.000E − 033.298E − 041.827E − 041.700E − 031.000E − 032.461E − 041.827E − 041.827E − 04


### 5.4. Comparison with Other Versions of Binary Particle Swarm Algorithms

In order to further investigate the effectiveness of the transfer function, this paper compares the test results of BPSO10 with other recent binary particle swarm versions. Firstly, it was compared with the binary algorithm (BPSOGSA) proposed by Mirjalili et al. [28] based on particle swarm optimization algorithm and gravity search algorithm. The dimension of the test function was 5, and the comparison result was shown in Table 9. At the same time, it also proposed binary hybrid topology particle swarm optimization (BHTPSO) and binary hybrid topology particle swarm optimization quadratic interpolation (BHTPSO-QI), proposed by Beheshti et al. [29], and swarm optimization algorithm based on genetic algorithm is put forward by the quantum-behaved particle swarm optimization (SOGA) by Sun et al. [30] are compared. The dimension of the test function was 8 dimensions, and the comparison result is shown in Table 10.Table 9
Comparison results between BPSO10 and BPSOGSA.
FunctionBPSO10BPSOGSA [28]F1Ave0.00000.7539Std0.00000.7441F2Ave0.00000.1584Std0.00000.1219F3Ave0.000045.2867Std0.000094.4522F4Ave74.0000281.4150Std0.0000667.8743F5Ave18.75008.0937Std0.000017.6706F6Ave0.00440.0064Std0.00430.0089F7Ave0.00001.8752Std0.00001.2717F8Ave8.8818E − 160.5412Std0.00000.8005F9Ave1.37440.3702Std0.00000.4851Table 10
Comparison results of BPSO10 with BHTPSO, BHTPSO-QI, and SOGA.
FunctionBPSO10BHTPSO [29]BHTPSO-QI [29]SOGA [30]F1Ave0.00000.00100.00080.0002Std0.00000.00290.00210.0005F2Ave0.00000.00800.00820.0026Std0.00000.01540.01530.0005F3Ave0.000036.150035.02001919.6076Std0.000066.330078.35001078.9650F5Ave3.00000.00000.00000.1000Std0.00000.00000.00000.4026F6Ave0.00070.00280.0033Std0.00050.00200.0022F8Ave8.8818E − 16−136.5000−137.00001.3614Std0.00001.78501.72401.1703F8Ave2.40531.4639Std0.00001.4386It can be seen from the data in Tables9 and 10 that when the test function is 5 or 8 dimensions, the test results of the newly proposed z-type transfer function are significantly higher than those of BPSOGSA, BHTPSO, BHTPSO-QI, and SOGA proposed in recent studies. In particular, in the test functions F1, F2, and F3, BPSO10 can still accurately find the optimal value, and the STD data shows that the value is 0, indicating that the algorithm is very stable and has strong robustness. Among other test functions, BPSO10 also improves the optimization accuracy of the algorithm to varying degrees. Therefore, the newly proposed z-type transfer function has good optimization ability.


## 5.1. Selection of Test Functions

The process of mapping continuous search space to discrete search space using the proposed transfer function is shown in Figure5. To represent each continuous variable in binary, 15 bits are adopted. It should be noted that each function variable retains a bit of its sign. Therefore, the particle size is calculated by(8)Dimpracticle=DimFunction×15.Figure 5
Procedure of mapping continuous search space to discrete search space.According to equation (8), when the test function has 5, 10, and 30 dimensions, the corresponding particle sizes are 75, 150, and 450, respectively. In order to evaluate the improved BPSO algorithm based on the Z-shaped transfer functions, the simulation experiments were carried out by using the nine benchmark functions proposed in the CEC special conference. The expressions of the benchmark functions and the three-dimensional graphics are shown in Table 4 and Figure 6, respectively.Table 4
Test functions.
FunctionDimRangFminF1x∑i=1nxi25, 8, 10, 30[−100, 100]0F2x∑i=1nxi+∏i=1nxi5, 8, 10, 30[−10, 10]0F3x=∑i=1n∑j−1nxj25, 8, 10, 30[100, 100]0F4x=∑i=1n−1100xi+1−xi22+xi−125, 8, 10, 30[−30, 30]0F5x=∑i=1nxi+525, 8, 10, 30[−100, 100]0F6x=∑i=1nixi4+random0,15, 8, 10, 30[−1.28, 1.28]0F7x=∑i=1nxi2−10cos2πxi+105, 8, 10, 30[−5.12,−5.12]0F8x=−20exp×−0.21/n∑i=1nxi−exp1/n∑i=1ncos2πxi+20+e5, 8, 10, 30[−32, 32]0F9=π/n10sinπy1+∑i=1n−1yi−121+10sin2πyi+1+yn−12+∑i=1nuxi,10,100,4yi=1+xi+145, 8, 10, 30[−50, 50]0uxi,a,k,m=kxi−amxi>a0−a<xi<ak−xi−amxi<−aF10 [24]:10[−5, 5]360f1∼f2 = Rotated Expanded Scaffer's FF FunctionWhere FF is Shifted Rosenbrock.f3∼f4 = Rastrigin's Functionf5∼f6 = FF4 Functionf7∼f8 = Weierstrass Functionf9∼f10 = Griewank’s Functionσ=1,1,1,1,1,2,2,2,2,2λ=5∗5/100;5/100;5∗1;1;5∗1;1;5∗10;5∗5/200;5/200F11 [24]10[−5, 5]360All settings are the same asF10xj=xjxj−o1j<1/2round2xj/2xj−o1j≥1/2 for j = 1, 2, …, nExceptroundx=a−1ifx≤0&b≥0.51ifb<0.5a1x>0&b≥0.5Wherea is x’s integral part and b is x’s decimal part.F12 [24]10[−5, 5]260f1 = Weierstrass Functionf2 = Rotated Expanded Scaffer's FF FunctionWhere FF is Shifted Rosenbrock.f3 = FF4 FunctionWhere FF is Rastrigin’s Functionf4 = Ackley’s Functionf5 = Rastrigin's Functionf6 = Griewank’s Functionf7 = Noncontinuous Expanded Scaffer’s FF FunctionWhere FF is Shifted Rosenbrock.f8 = Noncontinuous Rastrigin's Functionf9 = High Conditioned Elliptic Functionf10 = Sphere Function with Noise in Fitnessσi=2, for i = 1, 2, …, nλ=10;5/20;1;5/32;1;5/100;5/50;1;5/100;5/100Figure 6
3D graphs of benchmark functions. (a)F1. (b) F2. (c) F3. (d) F4. (e) F5. (f) F6. (g) F7. (h) F8. (i) F9. (j) F10. (k) F11. (l) F12.
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)


## 5.2. Performance Comparison of Z-Shaped Transfer Functions

In order to test the performance of the Z-shaped transfer function, the parameters of the Z-shaped transfer function are set as 2, 5, 8, and 20, respectively, and the influence of different parameter settings on the simulation experiments is analyzed. In order to further verify the optimization accuracy of Z-shaped transfer function, each test function was run 10 times, and the best, worst, average, and STD values of 9 functions in 5 and 30 dimensions were recorded, respectively. The maximum number of iterations isMax_iter=500. The simulation results of D=5 and D=30 are shown in Figures 7 and 8, respectively, and the statistical results are shown in Tables 5 and 6, respectively.Figure 7
Convergence curves of the benchmark functions underD=5. (a) F1. (b) F2. (c) F3. (d) F4. (e) F5. (f) F6. (g) F7. (h) F8. (i) F9.
(a)(b)(c)(d)(e)(f)(g)(h)(i)Figure 8
Convergence curves of the benchmark functions underD=30. (a) F1. (b) F2. (c) F3. (d) F4. (e) F5. (f) F6. (g) F7. (h) F8. (i) F9.
(a)(b)(c)(d)(e)(f)(g)(h)(i)Table 5
Numerical results underD=5.
FunctionArithmeticBestWorstAveStdF1BPSO90.00000.00000.00000.0000BPSO100.00000.00000.00000.0000BPSO110.00000.00000.00000.0000BPSO120.00000.00000.00000.0000F2BPSO90.00000.00000.00000.0000BPSO100.00000.00000.00000.0000BPSO110.00000.00000.00000.0000BPSO120.00000.00000.00000.0000F3BPSO90.00000.00000.00000.0000BPSO100.00000.00000.00000.0000BPSO110.00000.00000.00000.0000BPSO120.00000.00000.00000.0000F4BPSO974.000074.000074.00000.0000BPSO1074.000074.000074.00000.0000BPSO1174.000074.000074.00000.0000BPSO1274.000074.000074.00000.0000F5BPSO918.750018.750018.75000.0000BPSO1018.750018.750018.75000.0000BPSO1118.750018.750018.75000.0000BPSO1218.750018.750018.75000.0000F6BPSO90.00390.08360.02790.0219BPSO100.00020.01300.00440.0043BPSO110.00010.00430.00180.0013BPSO120.00010.00240.00100.0008F7BPSO90.00000.00000.00000.0000BPSO100.00000.00000.00000.0000BPSO110.00000.00000.00000.0000BPSO120.00000.00000.00000.0000F8BPSO98.8818E − 168.8818E − 168.8818E − 160.0000BPSO108.8818E − 168.8818E − 168.8818E − 160.0000BPSO118.8818E − 168.8818E − 168.8818E − 160.0000BPSO128.8818E − 168.8818E − 168.8818E − 160.0000F9BPSO91.37441.37441.37440.0000BPSO101.37441.37441.37440.0000BPSO111.37441.37441.37440.0000BPSO121.37441.37441.37440.0000Table 6
Numerical results underD=30.
FunctionArithmeticBestWorstAveStdF1BPSO92.00007.00004.20001.4697BPSO100.00000.00000.00000.0000BPSO110.00000.00000.00000.0000BPSO120.00000.00000.00000.0000F2BPSO92.00008.00004.50001.9621BPSO100.00000.00000.00000.0000BPSO110.00000.00000.00000.0000BPSO120.00000.00000.00000.0000F3BPSO99.00002683.00001517.0000890.0239BPSO100.00000.00000.00000.0000BPSO110.00000.00000.00000.0000BPSO120.00000.00000.00000.0000F4BPSO9449.00002041.00001205.2000434.1667BPSO10449.0000449.0000449.00000.0000BPSO11449.0000449.0000449.00000.0000BPSO12449.0000449.0000449.00000.0000F5BPSO9118.5000124.5000120.90001.9596BPSO10112.5000112.5000112.50000.0000BPSO11112.5000112.5000112.50000.0000BPSO12112.5000112.5000112.50000.0000F6BPSO9210.84451124.7927618.0885271.3089BPSO100.00010.05260.02160.0155BPSO110.00000.01320.00420.0039BPSO120.00040.00490.00180.0012F7BPSO91.00007.00004.90001.8682BPSO100.00000.00000.00000.0000BPSO110.00000.00000.00000.0000BPSO120.00000.00000.00000.0000F8BPSO98.8818E − 160.49270.30650.1329BPSO108.8818E − 168.8818E − 168.8818E − 160.0000BPSO118.8818E − 168.8818E − 168.8818E − 160.0000BPSO128.8818E − 168.8818E − 168.8818E − 160.0000F9BPSO91.22091.28111.25200.0176BPSO101.21081.21081.21080.0000BPSO111.21081.21081.21080.0000BPSO121.21081.21081.21080.0000It can be seen from Figure7 and Table 5 that when the test functions have 5 dimensions, changing the parameters has no effect on the final convergence results, and the final convergence results are the same. However, the rate of convergence will be different. In the function convergence curves, it can be seen that increasing the value of parameters can improve the convergence speed of the algorithm, but it is not the case that the larger the parameters are, the faster the convergence speed will be. In the convergence curves of F1, F2, F3, F7, and F9, the transfer function whose parameter is set to 20 has the fastest convergence speed. In the convergence curves of F4, F5, and F8, the transfer function with parameter set to 8 has the fastest convergence speed.It can be seen from Figure8 and Table 6 that when the test functions have 30 dimensions, changing the size of parameters has no obvious influence on the convergence speed of the algorithm, but has an influence on the final convergence result. In the functions F1, F2, F3, F4, F5, F7, F8, and F9, the parameters are set to 5, 8, and 20, and the effect is better when the parameter is 2, that is to say that increasing the parameter can improve the accuracy of the algorithm. However, when the parameters are set to 5, 8, and 20, the results are the same. That is to say, it is not the case that the larger the parameters setting, the better the performance. When the parameters are set to a certain size, increasing the parameters will not improve the accuracy of the algorithm.


## 5.3. Performance Comparison of Z-Shaped, S-Shaped, and V-Shaped Transfer Functions

### 5.3.1. Test Function Results and Analysis

To further investigate the validity of the Z-shaped transfer function, the Z-shaped transfer function is compared to the S-shaped and the V-shaped transfer function. Through the above analysis, it can be concluded that when the parameter of the Z-shaped transfer function is set to 5, the convergence precision and convergence speed are optimal. Therefore, in this set of simulation experiments, the parameter of the new Z-shaped transfer function is set as 5, the selected 12 test functions have 10 dimensions, and the maximum number of iterations is 500. The simulation results and numerical analysis are shown in Figure9 and Table 7, respectively.Figure 9
Convergence curves of the benchmark functions. (a)F1. (b) F2. (c) F3. (d) F4. (e) F5. (f) F6. (g) F7. (h) F8. (i) F9. (j) F10. (k) F11. (l) F12.
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)Table 7
Numerical statistics.
FunctionArithmeticBestWorstAveStdF1BPSO120.000025.000023.70001.4177BPSO228.000034.000030.80001.8330BPSO336.000041.000038.40001.6852BPSO438.000044.000042.10001.5780BPSO52.000014.00007.70002.9343BPSO64.00009.00005.70001.5524BPSO73.00007.00005.00001.3416BPSO82.00007.00004.00001.4142BPSO100.00000.00000.00000.0000F2BPSO121.000028.000024.90001.9723BPSO228.000035.000032.50002.1095BPSO338.000042.000039.20001.1662BPSO438.000043.000041.40001.7436BPSO54.000012.00007.60002.3324BPSO64.000010.00006.80001.8868BPSO72.00007.00004.70001.6155BPSO81.00006.00003.80001.6000BPSO100.00000.00000.00000.0000F3BPSO12.0936E + 042.9895E + 042.4866E + 043.0074E + 03BPSO23.5023E + 044.7871E + 044.0582E + 044.5452E + 03BPSO34.0798E + 047.7036E + 046.3317E + 049.7782E + 03BPSO46.1630E + 048.7746E + 047.4415E + 047.9859E + 03BPSO59.2100E + 027.8520E + 033.2089E + 031.9484E + 03BPSO62.6700E + 024.6020E + 032.1907E + 031.3673E + 03BPSO79.2000E + 013.1230E + 031.0619E + 031.0267E + 03BPSO81.5600E + 022.5080E + 031.0006E + 038.4595E + 02BPSO100.00000.00000.00000.0000F4BPSO13651.00004256.00003899.0000155.1722BPSO24072.00004657.00004406.2000159.0540BPSO34163.00004971.00004750.7000219.8095BPSO44771.00005162.00004963.3000103.9173BPSO51828.00003047.00002207.5000324.0522BPSO61937.00002454.00002135.4000210.8327BPSO71643.00002650.00002179.6000355.8585BPSO81640.00002848.00002175.5000386.0337BPSO10149.0000149.0000149.00000.0000F5BPSO185.500089.500087.50001.7889BPSO297.5000107.5000102.50003.6056BPSO3105.5000117.5000112.30003.8158BPSO4115.5000125.5000119.90003.2000BPSO537.500061.500052.10006.3906BPSO645.500053.500050.30002.4000BPSO741.500053.500047.70004.1425BPSO843.500047.500045.50001.7889BPSO1037.500037.500037.50000.0000F6BPSO11174.21461680.98511489.1710149.4409BPSO21760.86192317.80851949.8876155.5235BPSO32496.65272707.55562584.312163.7418BPSO42691.96042984.03082850.7730103.5472BPSO5225.0052567.0026401.3030109.7147BPSO6162.0050665.0021346.3023133.7193BPSO7145.0009504.0035245.7022113.2767BPSO8144.0011482.0005297.3014114.2555BPSO100.00010.01010.00350.0028F7BPSO122.000028.000025.30002.2383BPSO229.000034.000032.00001.4142BPSO336.000040.000038.10001.0440BPSO435.000044.000040.80002.7129BPSO54.00009.00006.40001.4283BPSO61.000011.00006.50002.6926BPSO72.00007.00004.80001.9391BPSO81.00006.00003.30001.4866BPSO100.00000.00000.00000.0000F8BPSO11.44201.59791.51530.0418BPSO21.68371.86671.75070.0513BPSO31.84181.96251.91710.0450BPSO41.91532.05321.99890.0400BPSO50.45661.00660.78340.1726BPSO60.64261.00660.80870.1022BPSO70.32390.84570.67320.1405BPSO80.32390.90280.65730.1738BPSO108.88178E − 168.88178E − 168.8818E − 160.0000F9BPSO11.96872.20832.07530.0814BPSO22.18862.43742.30500.0850BPSO32.55782.74762.64940.0629BPSO42.56832.79732.71200.0743BPSO51.36661.60741.49110.0771BPSO61.36661.54721.43090.0552BPSO71.36661.57731.46900.0634BPSO81.33651.49751.40680.0486BPSO101.21081.21081.21080.0000F10BPSO1833.4458897.9789859.971423.8603BPSO2797.1630894.5194855.812729.2840BPSO3822.1992935.9137871.306631.0668BPSO4801.6173922.5607860.147640.3582BPSO5819.9967922.3191864.506632.5671BPSO6798.7684903.6756848.358132.5885BPSO7803.2907904.1978862.332135.3385BPSO8833.7166898.4921865.766424.2585BPSO10732.3788790.8776764.520620.0896F11BPSO1811.5518896.1991860.367426.4694BPSO2797.1630905.6025854.538229.9453BPSO3822.1992935.9137862.455036.2997BPSO4801.6173888.0983849.774628.6370BPSO5819.9967922.3191868.316329.5430BPSO6798.7684903.6756844.825835.6381BPSO7803.2907904.1978865.276129.1488BPSO8788.3447898.6084866.700437.5416BPSO10732.3788790.5087758.083722.0786F12BPSO1761.2894912.1116863.035543.0973BPSO2803.8999897.6278850.460632.1798BPSO3835.9801912.0372878.087423.8546BPSO4772.1731916.9646858.773544.5248BPSO5765.3802900.9199859.808241.3350BPSO6810.4896900.3629856.824828.2321BPSO7820.4377918.6237873.290030.3881BPSO8811.3776885.9333852.604220.1360BPSO10693.7516811.1792758.920038.4465It can be seen from the convergence curves that the proposed new transfer function improves the convergence speed of the algorithm. According to the data shown in Table7, the new transfer function improves the accuracy of the BPSO algorithm. In particular, for functions F1, F2, F3, and F7, the optimal value of the function can be accurately derived. Similarly, for functions F8, the accuracy is 15 orders of magnitude higher than other transfer functions. For the composite functions F10∼F12, BPSO10 improves the convergence accuracy and convergence speed of the algorithm, but the optimal value of the function cannot be found, which will be the focus of future research and learning. In other functions, it also improves the convergence speed and convergence precision of the algorithm compared to other transfer functions.


### 5.3.2. Nonparametric Test Analysis

In order to verify the stability of the algorithm, we perform a nonparametric test on the optimal value of the test function. In this work, Wilcoxon rank sum test [27] is used as a nonparametric statistical test to determine the importance of the results. Table 8 depicts the 5% p value obtained from this test. It can be seen from Table 8 that the p values for all test functions are much less than 0.05, highlighting the significant advantages of BPSO10 over other versions of the binary particle swarm algorithm based on the p value (less than 0.05) algorithm.Table 8
Nonparametric test results.
BPSO10vsBPSO1BPSO10vsBPSO2BPSO10vsBPSO3BPSO10vsBPSO4BPSO10vsBPSO5BPSO10vsBPSO6BPSO10vsBPSO7BPSO10vsBPSO8F15.721E − 056.386E − 056.069E − 054.880E − 055.893E − 056.069E − 055.849E − 055.763E − 05F25.470E − 056.386E − 055.721E − 055.893E − 056.158E − 056.113E − 056.113E − 056.113E − 05F36.386E − 056.386E − 056.386E − 056.386E − 056.386E − 056.386E − 056.386E − 056.386E − 05F46.386E − 056.386E − 056.294E − 056.386E − 056.386E − 056.340E − 056.386E − 056.386E − 05F55.470E − 055.849E − 055.721E − 056.113E − 052.238E − 045.980E − 056.203E − 055.470E − 05F61.827E − 041.827E − 041.827E − 041.827E − 041.827E − 041.827E − 041.827E − 041.827E − 04F76.113E − 055.849E − 055.470E − 056.113E − 056.113E − 056.249E − 056.069E − 055.849E − 05F85.511E − 056.113E − 055.721E − 056.113E − 056.294E − 056.113E − 056.113E − 056.158E − 05F96.340E − 056.294E − 056.340E − 056.294E − 056.249E − 056.158E − 056.294E − 055.893E − 05F101.806E − 041.806E − 041.806E − 041.806E − 041.806E − 041.806E − 041.806E − 041.806E − 04F111.827E − 041.827E − 041.827E − 041.827E − 041.827E − 041.827E − 041.827E − 042.461E − 04F121.000E − 033.298E − 041.827E − 041.700E − 031.000E − 032.461E − 041.827E − 041.827E − 04


## 5.3.1. Test Function Results and Analysis

To further investigate the validity of the Z-shaped transfer function, the Z-shaped transfer function is compared to the S-shaped and the V-shaped transfer function. Through the above analysis, it can be concluded that when the parameter of the Z-shaped transfer function is set to 5, the convergence precision and convergence speed are optimal. Therefore, in this set of simulation experiments, the parameter of the new Z-shaped transfer function is set as 5, the selected 12 test functions have 10 dimensions, and the maximum number of iterations is 500. The simulation results and numerical analysis are shown in Figure9 and Table 7, respectively.Figure 9
Convergence curves of the benchmark functions. (a)F1. (b) F2. (c) F3. (d) F4. (e) F5. (f) F6. (g) F7. (h) F8. (i) F9. (j) F10. (k) F11. (l) F12.
(a)(b)(c)(d)(e)(f)(g)(h)(i)(j)(k)(l)Table 7
Numerical statistics.
FunctionArithmeticBestWorstAveStdF1BPSO120.000025.000023.70001.4177BPSO228.000034.000030.80001.8330BPSO336.000041.000038.40001.6852BPSO438.000044.000042.10001.5780BPSO52.000014.00007.70002.9343BPSO64.00009.00005.70001.5524BPSO73.00007.00005.00001.3416BPSO82.00007.00004.00001.4142BPSO100.00000.00000.00000.0000F2BPSO121.000028.000024.90001.9723BPSO228.000035.000032.50002.1095BPSO338.000042.000039.20001.1662BPSO438.000043.000041.40001.7436BPSO54.000012.00007.60002.3324BPSO64.000010.00006.80001.8868BPSO72.00007.00004.70001.6155BPSO81.00006.00003.80001.6000BPSO100.00000.00000.00000.0000F3BPSO12.0936E + 042.9895E + 042.4866E + 043.0074E + 03BPSO23.5023E + 044.7871E + 044.0582E + 044.5452E + 03BPSO34.0798E + 047.7036E + 046.3317E + 049.7782E + 03BPSO46.1630E + 048.7746E + 047.4415E + 047.9859E + 03BPSO59.2100E + 027.8520E + 033.2089E + 031.9484E + 03BPSO62.6700E + 024.6020E + 032.1907E + 031.3673E + 03BPSO79.2000E + 013.1230E + 031.0619E + 031.0267E + 03BPSO81.5600E + 022.5080E + 031.0006E + 038.4595E + 02BPSO100.00000.00000.00000.0000F4BPSO13651.00004256.00003899.0000155.1722BPSO24072.00004657.00004406.2000159.0540BPSO34163.00004971.00004750.7000219.8095BPSO44771.00005162.00004963.3000103.9173BPSO51828.00003047.00002207.5000324.0522BPSO61937.00002454.00002135.4000210.8327BPSO71643.00002650.00002179.6000355.8585BPSO81640.00002848.00002175.5000386.0337BPSO10149.0000149.0000149.00000.0000F5BPSO185.500089.500087.50001.7889BPSO297.5000107.5000102.50003.6056BPSO3105.5000117.5000112.30003.8158BPSO4115.5000125.5000119.90003.2000BPSO537.500061.500052.10006.3906BPSO645.500053.500050.30002.4000BPSO741.500053.500047.70004.1425BPSO843.500047.500045.50001.7889BPSO1037.500037.500037.50000.0000F6BPSO11174.21461680.98511489.1710149.4409BPSO21760.86192317.80851949.8876155.5235BPSO32496.65272707.55562584.312163.7418BPSO42691.96042984.03082850.7730103.5472BPSO5225.0052567.0026401.3030109.7147BPSO6162.0050665.0021346.3023133.7193BPSO7145.0009504.0035245.7022113.2767BPSO8144.0011482.0005297.3014114.2555BPSO100.00010.01010.00350.0028F7BPSO122.000028.000025.30002.2383BPSO229.000034.000032.00001.4142BPSO336.000040.000038.10001.0440BPSO435.000044.000040.80002.7129BPSO54.00009.00006.40001.4283BPSO61.000011.00006.50002.6926BPSO72.00007.00004.80001.9391BPSO81.00006.00003.30001.4866BPSO100.00000.00000.00000.0000F8BPSO11.44201.59791.51530.0418BPSO21.68371.86671.75070.0513BPSO31.84181.96251.91710.0450BPSO41.91532.05321.99890.0400BPSO50.45661.00660.78340.1726BPSO60.64261.00660.80870.1022BPSO70.32390.84570.67320.1405BPSO80.32390.90280.65730.1738BPSO108.88178E − 168.88178E − 168.8818E − 160.0000F9BPSO11.96872.20832.07530.0814BPSO22.18862.43742.30500.0850BPSO32.55782.74762.64940.0629BPSO42.56832.79732.71200.0743BPSO51.36661.60741.49110.0771BPSO61.36661.54721.43090.0552BPSO71.36661.57731.46900.0634BPSO81.33651.49751.40680.0486BPSO101.21081.21081.21080.0000F10BPSO1833.4458897.9789859.971423.8603BPSO2797.1630894.5194855.812729.2840BPSO3822.1992935.9137871.306631.0668BPSO4801.6173922.5607860.147640.3582BPSO5819.9967922.3191864.506632.5671BPSO6798.7684903.6756848.358132.5885BPSO7803.2907904.1978862.332135.3385BPSO8833.7166898.4921865.766424.2585BPSO10732.3788790.8776764.520620.0896F11BPSO1811.5518896.1991860.367426.4694BPSO2797.1630905.6025854.538229.9453BPSO3822.1992935.9137862.455036.2997BPSO4801.6173888.0983849.774628.6370BPSO5819.9967922.3191868.316329.5430BPSO6798.7684903.6756844.825835.6381BPSO7803.2907904.1978865.276129.1488BPSO8788.3447898.6084866.700437.5416BPSO10732.3788790.5087758.083722.0786F12BPSO1761.2894912.1116863.035543.0973BPSO2803.8999897.6278850.460632.1798BPSO3835.9801912.0372878.087423.8546BPSO4772.1731916.9646858.773544.5248BPSO5765.3802900.9199859.808241.3350BPSO6810.4896900.3629856.824828.2321BPSO7820.4377918.6237873.290030.3881BPSO8811.3776885.9333852.604220.1360BPSO10693.7516811.1792758.920038.4465It can be seen from the convergence curves that the proposed new transfer function improves the convergence speed of the algorithm. According to the data shown in Table7, the new transfer function improves the accuracy of the BPSO algorithm. In particular, for functions F1, F2, F3, and F7, the optimal value of the function can be accurately derived. Similarly, for functions F8, the accuracy is 15 orders of magnitude higher than other transfer functions. For the composite functions F10∼F12, BPSO10 improves the convergence accuracy and convergence speed of the algorithm, but the optimal value of the function cannot be found, which will be the focus of future research and learning. In other functions, it also improves the convergence speed and convergence precision of the algorithm compared to other transfer functions.


## 5.3.2. Nonparametric Test Analysis

In order to verify the stability of the algorithm, we perform a nonparametric test on the optimal value of the test function. In this work, Wilcoxon rank sum test [27] is used as a nonparametric statistical test to determine the importance of the results. Table 8 depicts the 5% p value obtained from this test. It can be seen from Table 8 that the p values for all test functions are much less than 0.05, highlighting the significant advantages of BPSO10 over other versions of the binary particle swarm algorithm based on the p value (less than 0.05) algorithm.Table 8
Nonparametric test results.
BPSO10vsBPSO1BPSO10vsBPSO2BPSO10vsBPSO3BPSO10vsBPSO4BPSO10vsBPSO5BPSO10vsBPSO6BPSO10vsBPSO7BPSO10vsBPSO8F15.721E − 056.386E − 056.069E − 054.880E − 055.893E − 056.069E − 055.849E − 055.763E − 05F25.470E − 056.386E − 055.721E − 055.893E − 056.158E − 056.113E − 056.113E − 056.113E − 05F36.386E − 056.386E − 056.386E − 056.386E − 056.386E − 056.386E − 056.386E − 056.386E − 05F46.386E − 056.386E − 056.294E − 056.386E − 056.386E − 056.340E − 056.386E − 056.386E − 05F55.470E − 055.849E − 055.721E − 056.113E − 052.238E − 045.980E − 056.203E − 055.470E − 05F61.827E − 041.827E − 041.827E − 041.827E − 041.827E − 041.827E − 041.827E − 041.827E − 04F76.113E − 055.849E − 055.470E − 056.113E − 056.113E − 056.249E − 056.069E − 055.849E − 05F85.511E − 056.113E − 055.721E − 056.113E − 056.294E − 056.113E − 056.113E − 056.158E − 05F96.340E − 056.294E − 056.340E − 056.294E − 056.249E − 056.158E − 056.294E − 055.893E − 05F101.806E − 041.806E − 041.806E − 041.806E − 041.806E − 041.806E − 041.806E − 041.806E − 04F111.827E − 041.827E − 041.827E − 041.827E − 041.827E − 041.827E − 041.827E − 042.461E − 04F121.000E − 033.298E − 041.827E − 041.700E − 031.000E − 032.461E − 041.827E − 041.827E − 04


## 5.4. Comparison with Other Versions of Binary Particle Swarm Algorithms

In order to further investigate the effectiveness of the transfer function, this paper compares the test results of BPSO10 with other recent binary particle swarm versions. Firstly, it was compared with the binary algorithm (BPSOGSA) proposed by Mirjalili et al. [28] based on particle swarm optimization algorithm and gravity search algorithm. The dimension of the test function was 5, and the comparison result was shown in Table 9. At the same time, it also proposed binary hybrid topology particle swarm optimization (BHTPSO) and binary hybrid topology particle swarm optimization quadratic interpolation (BHTPSO-QI), proposed by Beheshti et al. [29], and swarm optimization algorithm based on genetic algorithm is put forward by the quantum-behaved particle swarm optimization (SOGA) by Sun et al. [30] are compared. The dimension of the test function was 8 dimensions, and the comparison result is shown in Table 10.Table 9
Comparison results between BPSO10 and BPSOGSA.
FunctionBPSO10BPSOGSA [28]F1Ave0.00000.7539Std0.00000.7441F2Ave0.00000.1584Std0.00000.1219F3Ave0.000045.2867Std0.000094.4522F4Ave74.0000281.4150Std0.0000667.8743F5Ave18.75008.0937Std0.000017.6706F6Ave0.00440.0064Std0.00430.0089F7Ave0.00001.8752Std0.00001.2717F8Ave8.8818E − 160.5412Std0.00000.8005F9Ave1.37440.3702Std0.00000.4851Table 10
Comparison results of BPSO10 with BHTPSO, BHTPSO-QI, and SOGA.
FunctionBPSO10BHTPSO [29]BHTPSO-QI [29]SOGA [30]F1Ave0.00000.00100.00080.0002Std0.00000.00290.00210.0005F2Ave0.00000.00800.00820.0026Std0.00000.01540.01530.0005F3Ave0.000036.150035.02001919.6076Std0.000066.330078.35001078.9650F5Ave3.00000.00000.00000.1000Std0.00000.00000.00000.4026F6Ave0.00070.00280.0033Std0.00050.00200.0022F8Ave8.8818E − 16−136.5000−137.00001.3614Std0.00001.78501.72401.1703F8Ave2.40531.4639Std0.00001.4386It can be seen from the data in Tables9 and 10 that when the test function is 5 or 8 dimensions, the test results of the newly proposed z-type transfer function are significantly higher than those of BPSOGSA, BHTPSO, BHTPSO-QI, and SOGA proposed in recent studies. In particular, in the test functions F1, F2, and F3, BPSO10 can still accurately find the optimal value, and the STD data shows that the value is 0, indicating that the algorithm is very stable and has strong robustness. Among other test functions, BPSO10 also improves the optimization accuracy of the algorithm to varying degrees. Therefore, the newly proposed z-type transfer function has good optimization ability.


## 6. Conclusions

In this paper, a new Z-shaped transfer function is proposed to improve BPSO algorithm. The simulation results on three sets’ data show that the newly proposed Z-shaped transfer function improves the convergence speed and convergence precision of BPSO algorithm. In addition, by changing the slope of the Z-shaped transfer function, it is found that when the test function dimension is low, the slope has no effect on the final convergence result, but it will affect the convergence speed. When the test function dimension is high, the slope has no effect on the convergence speed. However, it will affect the convergence result. Combined with three sets of experiments, it is found that when the parameter is set as 5, the convergence speed is the fastest and the precision is highest. In the future research, BPSO algorithm can be improved by using the new transfer function as a direction of exploration. In addition, certain family functions with different slopes are used for comparative study to find the optimal algorithm.



---

*Source: 6502807-2020-06-08.xml*