## 3 Simulation and Experimental Validation
### Controller Optimization and Validation  
Firstly, for frequency discretization, the sampling rate is set to be 40 kHz, corresponding to 512 frequency points in the frequency domain. The weighting coefficient \(w_{1}(\omega)\) is set to 15 from 117.2 Hz to 390.6 Hz and 1 for 39.1 Hz and 1.21 kHz, and the values at the remaining frequency points are obtained using discretized frequency interpolation. This is shown in dB by the blue curve in Figure 6a. The weighting coefficient \(w_{2}(\omega)\) is given a fixed value \(10^{(-3/20)}\) from 1.21 kHz to 20 kHz. For method 2, the weighting coefficient \(w_{3}(\omega)\) is calculated by all the measured secondary path transfer functions and is shown in Figure 6b. The safety factor \(\delta\) is set to be 0.9 and the waterbed suppressing factor \(\chi\) is set to be \(10^{(-5/20)}\). The penalty factors are set to be the same: \(\gamma_{1}=\gamma_{2}=\gamma_{3}=\) 10,000, for simplifying the optimization. For a cascaded IIR controller, the function of \(H_{1}\) is to achieve more noise reduction at low frequencies; \(H_{2}\), \(H_{3}\) and \(H_{4}\) are used to process the waterbed effect in the middle frequency band; and \(H_{5}\) ensures the stability of the ultra-high frequency band above 10 kHz. The upper and lower limits of the filter parameters ub and lb are configured in Table 3 according to the author's experience. In the IGWO algorithm, the population size is set to be 50, the dimension is 16, there are 10,000 iteration  
Figure 5: Secondary path transfer functions used in the two methods, (**a**) amplitude response, (**b**) phase response. Figure 6: (**a**) Primary noise spectrum, red curve; weighting coefficient \(db[w_{1}(\omega)]\), blue curve; (**b**) weighting coefficient \(w_{3}(w)\). times, and the optimization process is repeated 100 times to obtain the global optimal solution. The filter parameters calculated using the two methods are shown in Table 3. The controller responses of the two methods are shown in Figure 7.  
Method 1\({}^{\prime}\)s secondary path transfer function's amplitude being less pronounced in the frequency range of several hundred to three thousand Hertz compared to method 2 necessitates a higher amplitude for the controller to compensate. Method 2 restricts the amplitude beyond 10 kHz to guarantee system stability across various user scenarios and preserves a larger phase margin in the 2 to 5 kHz range to effectively manage the waterbed effect. Next, in addition to the HATS and four subjects on whom the secondary path transfer functions have been tested, four additional subjects are added for the secondary path and noise reduction test, and their parameters are shown in Table 4. \begin{table}
\begin{tabular}{c c c c} \hline \hline  & **Head Circumference (cm)** & **Subject Wear Glasses** & **Headphones Press the Hair** \\ \hline Man 3 & 59.6 & No & Yes \\ Man 4 & 57.3 & No & No \\ Woman 3 & 54.4 & Yes & Yes \\ Woman 4 & 57.1 & No & No \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Parameter of new subjects. Figure 7: (a) Amplitude response of controller; (b) phase response of controller. Noise reduction is simulated for all the measured secondary path transfer functions, with the controllers optimized using method 1 and method 2, and the results are shown in Figures 8a and 8c, respectively. In Figure 8a, the green line denotes the noise reduction simulation result for the secondary path transfer function of the headphones worn normally on the HATS. The gray and blue curves depict the simulated results for other secondary paths under normal and squeezed wearing states, respectively. Figure 8c illustrates the noise reduction simulation results for the secondary path under normal wearing state with the gray and black curves representing these outcomes. In contrast, the blue and cyan curves correspond to the simulated results under a squeezed wearing state, where the black and cyan curves specifically indicate the results for the four newly included subjects.