**3. The Proposed Algorithm of Particle Swarm Optimization–Butterfly Optimization Algorithm**

*3.1. The Particle Swarm Optimization (PSO)*

PSO [23] is a swarm intelligence optimization algorithm that mimics the search for food by a moving flock of birds in a multidimensional search space. PSO is widely adopted in solving optimization problems of nonlinear systems, owing to its advantages of rapid convergence and straightforward implementation. The velocity and position update formulas in the PSO algorithm are, respectively, expressed in Equations (6) and (7):

$$v\_{i}^{t+1} = \omega \cdot v\_{i}^{t} + c\_1 \cdot rand\_1 \left(p\_{\text{best}} - x\_i^t\right) + c\_2 \cdot rand\_2 \left(g\_{\text{best}} - x\_i^t\right) \tag{6}$$

$$x\_{i}^{t+1} = x\_{i}^{t} + v\_{i}^{t+1} \tag{7}$$

where *v<sup>t</sup> <sup>i</sup>* and *<sup>v</sup>t*+<sup>1</sup> *<sup>i</sup>* are the velocities of the *i*-th particle at the (*t*) and (*t* + 1) iterations; *pbest* and *gbest* represent the local and global optimal positions of particles. Generally, *c*<sup>1</sup> and *c*<sup>2</sup> are the acceleration factors. In the reference [23], the stochastic factors (*rand*<sup>1</sup> and *rand*2) were multiplied by a factor of 2 to achieve a mean value of 1. This adjustment was made to ensure that the particles would "overfly" the target about half of the time. Therefore, the *c*<sup>1</sup> and *c*<sup>2</sup> are equal to 2 in this paper; *rand*<sup>1</sup> and *rand*<sup>2</sup> are the random numbers that range from 0 to 1; *ω* represents the inertia weight.

#### *3.2. The Butterfly Optimization Algorithm (BOA)*

The BOA [29] mimics the habits of butterflies searching for food and seeking mates in their natural habitat. Setting the BOA apart from other optimization algorithms is that each butterfly in the algorithm is equipped with its own unique odor, leading to the generation of distinct odor intensities between individuals. By releasing a higher level of odor intensity, a butterfly can attract and be perceived by neighboring butterflies. The intensity of an individual's odor is perceived by other butterflies, which is denoted by Equation (8):

$$f(\mathbf{x}) = \mathcal{cl}^a \tag{8}$$

where *f*(*x*) represents the perceived magnitude of fragrance; *c* is the sensory modality; *I* corresponds to the stimulus intensity; and *a* is the power exponent that relates to the degree of fragrance absorption and is limited to [0, 1].

In theory, the sensory modality coefficient *c* can be assigned a value within the range [0, ∞]. However, in the iterative process, the specific value of *c* is determined by the particular optimization problem. During the optimal search phase of the algorithm, the sensory modality *c* is expressed using the following formulation:

$$c\_{t+1} = c\_t + \left[\frac{0.025}{c\_t \cdot T\_{\text{max}}}\right] \tag{9}$$

where *T*max represents the upper bound of the number of iterations; generally, the initial value of parameter *ct* is 0.01 [40].

Butterflies are capable of finding food and mating partners through both global and local search strategies in nature. The BOA utilizes a switching probability, denoted as "*p*", that governs the shift from a wide-ranging global exploration to a concentrated local exploration. Based on a comparison of the switching probability '*p*' with a random number, the BOA decides whether to execute a local search or a global search. The position updating formula is demonstrated by Equation (10), as follows:

$$\mathbf{x}\_{i}^{t+1} = \begin{cases} \mathbf{x}\_{i}^{t} + (r^{2} \cdot \mathbf{g}^{\*} - \mathbf{x}\_{i}^{t}) f\_{i} \; p < rand\\ \mathbf{x}\_{i}^{t} + (r^{2} \cdot \mathbf{x}\_{a}^{t} - \mathbf{x}\_{b}^{t}) f \; p \ge rand \end{cases} \tag{10}$$

where *g*∗ is the current best-performing one in all the solutions that have been generated in the current stage; *x<sup>t</sup> <sup>a</sup>* and *x<sup>t</sup> <sup>b</sup>* represent the spatial positions of the *a*-th and *b*-th butterflies in the *t*-th iteration, and when *a* = *b*, the butterfly performs a local random search; *r* is a number that is generated randomly, 0 < *r* < 1; and *fi* is the fragrance produced by the *i*-th butterfly.
