# Laboratory Test of a Vehicle Active Noise-Control System Based on an Adaptive Step Size Algorithm
## 2 Methods
### Adaptive Step Size Algorithm, Based on Particle Swarm Optimization  
As parameters \(a\) and \(c\) play an important role in the process of adjusting the step size parameters, the values of \(a\) and \(c\) are correspondingly different for noise levels of different forms and amplitudes. Therefore, the particle swarm optimization algorithm is adopted in this study to select the parameter values in detail and further improve the convergence speed of the algorithm. The principle of an iterative variable step size algorithm based on particle swarm optimization is shown in Figure 4. For the key parameters \(a\) and \(c\), which control the step size, the particle swarm optimization algorithm is adopted to optimize them, and the optimal value is selected for the given particle position range. Figure 3: Step function curve. We set the values of parameters \(a\) and \(c\) as particles \(\varphi=[a\;c]\), then assume that the number of particles is \(p\) and the number of iterations of the FxLMS algorithm is \(k\). Thus, the corresponding matrix of particles is initialized as:  
\[\varphi_{\mathbf{P}}= \begin{bmatrix}a_{1}&c_{1}\\ a_{2}&c_{2}\\ \vdots&\vdots\\ a_{p}&c_{p}\end{bmatrix}  \tag{10}\]  
Each row of the vector \(\varphi_{\mathbf{P}}\) represents the corresponding parameter value of a particle, and the corresponding step size is initialized as:  
\[\mathbf{u}_{\mathbf{P}}(k)= \begin{bmatrix}u_{1}(k)&u_{2}(k)&\cdots&u_{p}(k) \end{bmatrix} ^{T}. \tag{11}\]  
The number of filter taps is \(L\), and the weight coefficient at time \(k\) is expressed in the form of a matrix:  
\[\mathbf{W}_{\mathbf{P}}(k)= \begin{bmatrix}w_{11}&w_{12}&\ldots&w_{1L}\\ w_{21}&w_{22}&\ldots&w_{2L}\\ \vdots&\vdots&\ddots&\vdots\\ w_{p1}&w_{p2}&\ldots&w_{pL}\end{bmatrix} . \tag{12}\]  
The weight coefficient can be written as:  
\[\mathbf{W}_{\mathbf{P}}(k+1)=\mathbf{W}_{\mathbf{P}}(k)+\mathbf{u}_{\mathbf{ P}}(k)\mathbf{e}_{\mathbf{P}}^{\mathsf{T}}(k)\mathbf{X}_{\mathbf{P}}(k) \tag{13}\]  
where \(\mathbf{X}_{\mathbf{P}}(k)\) is a matrix consisting of \(p\) identical \(\mathbf{X}(k)\) vectors with \(p\) rows and \(L\) columns. The output signal of the filter is:  
\[\mathbf{y}_{\mathbf{P}}(k)=\mathbf{W}_{\mathbf{P}}(k)\mathbf{X}^{T}(k)= \begin{bmatrix}y_{1}(k)&y_{2}(k)&\cdots&y_{p}(k)\end{bmatrix} ^{\mathsf{T}}. \tag{14}\]  
The error signal corresponding to each particle is obtained by the superposition of the offset signal and the primary channel signal:  
\[\mathbf{e}_{\mathbf{P}}(k)=\mathbf{d}_{\mathbf{P}}(k)-\mathbf{y}_{\mathbf{P} }^{{}^{\prime}}(k). \tag{15}\]  
Figure 4: Principle diagram of the FxLMS algorithm system for particle swarm optimization with adaptive step size. In this way, we can obtain the error signal corresponding to each particle. In this paper, the mean square error is adopted as the objective function of the particle swarm optimization algorithm, and the mean square error of \(K\) iterations is selected to update the position and velocity of the particle. The expression is as follows:  
\[\psi=\frac{1}{K}\sum_{k=1}^{K}\{e(k)\}^{2}. \tag{16}\]  
In the first \(r\) iterations of the particle swarm optimization algorithm, we will find the particle with the minimum mean square error value as the current individual optimal solution, \(\varphi_{\text{pb}}(r)\). If the mean square error of the next iteration of the particle \(\varphi(r+1)\) is smaller, \(\varphi(r+1)\) will replace \(\varphi_{\text{pb}}(r)\) as the individual optimal solution, \(\varphi_{\text{pb}}(r+1)\). At this time, the particles in the whole population where the minimum MSE value is found are taken as the optimal solution of the whole population and denoted as \(\varphi_{\text{gb}}(r)\). If the particles in the next iteration particle swarm find a smaller MSE value, then \(\varphi\text{gb}(r+1)\) replaces \(\varphi_{\text{gb}}(r)\) as the optimal solution for the whole population.