# An Improved Particle-Swarm-Optimization Algorithm for a Prediction Model of Steel Slab Temperature
## 3 Improved Particle-Swarm-Optimization Algorithm
### Improvement Strategies of the XPSO Algorithm  
The basic PSO algorithm is a non-globally-convergent optimization algorithm [29]. To reduce the premature probability of falling into a local optimal solution and improve the convergence speed of the basic PSO, an improved PSO (named XPSO) algorithm is proposed based on the multi-strategy co-evolutionary approach. Four specific improvements are described as follows. 1. Improving the positional initialization of the particle swarm: one randomly generated and the other uniformly generated. In a basic PSO algorithm, all of the particles are randomly initialized. The expression is given as follows: \[X_{ND}= \begin{bmatrix}lx_{11}&x_{12}&\cdots&x_{1D}\\ x_{21}&x_{22}&\cdots&x_{2D}\\ \vdots&\vdots&\ddots&\vdots\\ x_{N1}&x_{N2}&\cdots&x_{ND}\end{bmatrix} \] (5) An increase in the positional diversity of particle swarms can facilitate the exploration of global range. However, increasing the diversity of particle swarms also makes it difficult to converge to the global optimum every time. Hence, an improved approach, based on the \"double-edged sword\" nature of particle swarm's diversity, is proposed to improve the algorithm's stability. During the initialization of the particle swarm, a dimension called X-Dim in the position matrix is randomly selected. The positional information of the particle in X-Dim is generated according to a uniform distribution, as shown in Equation (6). \[x_{ij}=\frac{O_{\max}-O_{\min}}{N}*i\] (6) where \(j\) is the randomly selected dimension; and \(O_{max}\) and \(O_{min}\) are the upper and lower limits of the value range of independent variables in different dimensions, respectively. 2. The mutation strategy is introduced into the position updating of particle swarm to compensate for the decline in the overall diversity of particle swarm after improved initialization. Unlike some other meta-heuristic algorithms, standard PSO has no evolution operators such as crossover or mutation. The mutation strategy will be implemented by screening the particles in each iteration. If the corresponding fitness function value of someone particle is lower than the average fitness function value, the mutation strategy is performed in the current iteration. The formula of positional mutation is: \[x_{ij}^{*}(k)=x_{ij}(k)-wv_{ij}(k)-w(g-p_{i})\] (7) where \(x^{*}\) denotes the position of the particle after mutation. 3. The adjustment of inertia weight is given to improve the flexibility of particle flight speed change, and the idea of \"stepped\" adaptive change is injected into the updating of inertia weight. Inertia weight \(w\) is directly related to the convergence speed. Most researches use the subtraction function as its updating formula for inertia weight [30]. Some others use the \"stepped\" improvement method to update the inertia weight [31]. In our method, the inertia weight is adjusted by combining the strategy of decreasing function and the \"stepped\" improvement. The specific change is given as follows: * A \"three-step\" strategy is proposed to switch the range \([w_{s},w_{e}]\) of inertia weight by determining the fitness function value of the best position so far. The switching formula is given as follows: \[[w_{s},w_{e}]= \begin{cases}[w_{s1},w_{e1}]&f(g)\gg Fitness1\\ &\\ [w_{s2},w_{e2}]&\text{\it Fitness2}<f(g)<\text{\it Fitness1}\\ &\\ [w_{s3},w_{e3}]&f(g)\ll Fitness2\end{cases} \] (8) where \([w_{s},w_{e}]\) is the range of inertia weight; \(f(g)\) is the fitness function value corresponding to the global optimal solution; \(\text{\it Fitness1}\) and \(\text{\it Fitness2}\) are the autonomous set values. The values of \(([w_{s1},w_{e2}],[w_{s2},w_{e2}]\) and \([w_{s3},w_{e3}])\) need to be adjusted according to the conditions of the objective function in different application contexts. * After the ranges of the inertia weight \([w_{s},w_{e}]\) have been determined, a decreasing function is introduced to adjust the \(w\). The switching condition is related to the fitness function value of the best position so far.