*2.3. PSO Optimization*

The PSO algorithm will make the population evolve more intelligently after each iteration and can accumulate search knowledge, which is called an evolutionary algorithm [29–31]. The PSO algorithm does not use the survival of the fittest but uses a mechanism in which each individual in the population competes with the others to generate the global optimal solution. It generates the optimal solution through information sharing and a mechanism of cooperation between the individuals in the population [32,33].

Suppose the PSO consists of multiple particles. In the *D*-dimensional search space, the particle swarm contains *n* particles. The position of the *n*th particle in the *D*-dimensional space is defined as *xi*:

$$\mathbf{x}\_{i} = (\mathbf{x}\_{i1}, \mathbf{x}\_{i2}, \cdots, \mathbf{x}\_{iD}), \quad i = 1, 2, \cdots, n. \tag{5}$$

Suppose the current velocity of particle *xi* and its individual optimal historical position are *vi* and *pi*, respectively, as follows:

$$\begin{array}{l}v\_{i} = (v\_{i1}, v\_{i2}, \dots, v\_{iD})\\p\_{i} = (p\_{i1}, p\_{i2}, \dots, p\_{iD}).\end{array} \tag{6}$$

Then, for the entire particle swarm, the global optimal position is *Pg*:

$$p\_{\mathbb{X}} = (p\_{\mathbb{X}^1}, p\_{\mathbb{X}^2}, \dots, p\_{\mathbb{X}^D}).\tag{7}$$

At the *t*th moment, the velocity update formula of the *d*th dimension of particle *xi* is:

$$
\omega\_{\rm id}(t+1) = \omega v\_{\rm id}(t) + c\_1 r\_1 (p\_{\rm id}(t) - \mathbf{x}\_{\rm id}(t)) + c\_2 r\_2 (p\_{\mathcal{K}}(t) - \mathbf{x}\_{\rm id}(t)),
\tag{8}
$$

where *ω* is the inertia weight and is in the range [0, 1]. *c*1 and *c*2 are the acceleration coefficients. *r*1 and *r*2 are random coefficients, both of which are in [0, 1], which determine the motion of semirandom particles affected by the single and global optimal solutions.

The particle velocity update process has three main parts: the current initial velocity, the self-motion trajectory and self-trajectory correction. The influence of the current speed on the particle update speed can be adjusted by the inertia weight. The influence of the particle's own trajectory on the particle update speed can be adjusted by the acceleration coefficients and the random coefficients. When the trajectory is inaccurate, it needs to be corrected with the help of global optimization.

For particle *xi*, we can update the position *xid* of the *d*th dimension according to the velocity:

$$
\dot{x}\_{id}(t+1) = \dot{x}\_{id}(t) + \upsilon\_{id}(t+1). \tag{9}
$$
