## 2 Proposed PSO-Based ANC System with Switching Filter Selection  
Inspired by convex combination structures based on gradient descent algorithms [8; 9; 10; 11; 12; 13], we present a new variant of the PSO-based ANC structure. Specifically, we introduce for the first time an ANC structure, in which two PSO algorithms are used, to significantly improve the convergence properties. As a consequence, the proposed structure can be used in real acoustic environments. Here, each PSO algorithm has been parameterized under different acceleration coefficients and inertia weights to create a global filter whose performance is better than the PSO-based ANC systems. During the last years, several studies have demonstrated that the convergence behavior of PSO algorithm is determined by the values of the inertia weight and the acceleration coefficients [29; 30; 31]. Although PSO algorithm is considered to be robust in many applications, it fails to find a balance between exploration and exploitation processes [32]. As can be observed from Figure 3, we use two PSO algorithms to create a new PSO-based ANC system. The first \(PSO_{1}\) algorithm is dedicated to perform an efficient exploration process by providing a high convergence speed, while the second \(PSO_{2}\) algorithm is used to efficiently perform the exploitation process by offering a low steady-state MSE. To control the selection between these two algorithms, we employ a selection criteria based on the evaluation of past samples of the error signal \(\mathbf{e}(n)\). In this way, we evaluate the degree of change of the error signal over time. The use of these strategies have allowed us to create a PSO-based adaptive filter with switching filter selection to improve convergence properties compared with existing approaches. Figure 4 shows the control process to perform the proposed PSO-based ANC system by executing the following steps:  
* _Specify the control parameters._ Here, the PSO-based ANC system is composed of \(j\) population matrices \(\mathbf{W}\), where each matrix \(\mathbf{W}\) is composed of \(P\) adaptive filters and each particle represents an adaptive filter, as shown in Equation (1). Therefore, the order \(N\) of each adaptive filter defines the dimension of each particle. The whole population is defined as follows: \[\mathbf{W}_{j}= \begin{bmatrix}w_{1}^{1}&w_{2}^{2}&\ldots&w_{2}^{P}\\ w_{1}^{2}&w_{2}^{2}&\ldots&w_{2}^{P}\\ \vdots&\vdots&\ddots&\vdots\\ w_{N}^{1}&w_{N}^{2}&\ldots&w_{N}^{P}\\ \end{bmatrix} \] (1) where \(j\in\{1,2\}\) is the parameter to select between \(PSO_{1}\) and \(PSO_{2}\). Figure 4: Flowchart of the proposed PSO-based ANC system with switching filter selection. Figure 3: Structure of the proposed PSO-based ANC system with switching filter selection. * _Create an initial population_. At the first iteration \(n=1\), the position \(\mathbf{w}_{i}(n)\) of each particle is initialized for both populations, where \(i=1,2,\,\ldots,\,P\). \[\mathbf{w}_{i}(n)=(ub-lb)\cdot\mathbf{r}+lb\] (2) where \(\mathbf{r}\) is a gaussian process of length \((1,N)\) with zero mean and variance = 0.25. The values \(lb=-1\) is a lower bound and \(ub=1\) is a upper bound, since the impulse response of the primary path is normalized. * _Perform signal filtering and signal counteraction_. The signal \(\mathbf{x}(n)\) travels via primary path to generate the signal \(\mathbf{d}(n)\). In addition, the signal \(\mathbf{x}(n)\) is processed by the PSO algorithm to update its coefficients. Here, each particle is used to compute a single filter at any generation time \(n\). Once the coefficients are updated, signal \(\mathbf{y}(n)\) is produced and it travels via the secondary path \(\mathbf{s}(z)\) to generate the anti-noise signal \(\mathbf{\hat{y}}(n)\). On the other hand, the calculation of signal counteraction or also called residual noise \(\mathbf{e}(n)\) is given by \[\mathbf{e}_{i}(n)=\mathbf{d}(n)+\mathbf{\hat{y}}_{i}(n)\] (3)
* _Evaluate fitness function_.