# Dynamic Matching of Reconstruction and Anti-Aliasing Filters in Adaptive Active Noise Control
## 3 An Active Noise Control System with Dynamically Adapted Reconstruction and Anti-Aliasing Filters
### Data-Driven Dynamic Matching of Reconstruction Filters  
The negative impacts of the mirror noise comprise two aspects: (1) the signal output of the reconstruction filter propagates directly to the human ear via the power amplifier and loudspeaker, directly affecting the listener's experience; (2) after the reconstructed mirror noise is propagated through the sound field, it is picked up again by the error microphone and reference microphone, which may introduce more aliasing noise. Therefore, the dynamic matching of the reconstruction filter is extremely important. During the control process, a set of reference signal data and error signal data with a high sampling rate are cached after certain periods of time for power spectrum estimation. The calculation formula is  
\[\begin{array}{l}\hat{S}_{xx,k}(m)=\lambda\hat{S}_{xx,k}(m-1)+(1-\lambda) \big{|}X_{h,k}(m)\big{|}^{2}\\ \hat{S}_{ee,k}(m)=\lambda\hat{S}_{ee,k}(m-1)+(1-\lambda)\big{|}E_{h,k}(m)\big{|} ^{2}\\ \hat{S}_{uu,k}(m)=\lambda\hat{S}_{uu,k}(m-1)+(1-\lambda)\big{|}U_{h,k}(m) \big{|}^{2}\end{array} \tag{14}\]  
where \(\lambda\) is the forgetting factor; and \(X_{h,k}(m)\), \(E_{h,k}(m)\), and \(U_{h,k}(m)\) represent the spectra at the kth frequency point of \(x_{h}(n)\), \(e_{h}(n)\), and \(u_{h}(n)\) in the mth iteration, respectively. The estimated power spectral density of the mirror noise introduced at the position of the error microphone \(u_{h}(n)\) is  
\[\hat{S}_{ue,k}(m)=\big{|}\hat{S}se_{h,k}(m)\big{|}^{2}\hat{S}_{uu,k}(m) \tag{15}\]  
where \(\hat{S}se_{h,k}(m)\) denotes the high-sampling-rate-based estimate of the transfer function from the loudspeaker to the error microphone.  
Next, we set the allowed upper limit of the power spectral density (PSD) of the mirror noise. In order to improve the comfort of an active noise control system such as an active headrest, it is necessary to consider the impact of mirror noise on the control system in different scenarios: (1) when the high-frequency noise contained in the sound source is easily heard, it is only required that the magnitude of mirror noise should not exceed that of the primary sound source; (2) when the high-frequency noise of the primary sound source is hardly heard, it is necessary to improve the high-frequency sensation brought by the mirror noise. Hence, for the frequency coefficient \(k>\frac{k_{L}}{2}\), where \(k_{L}\) is the frequency coefficient corresponding to the low sampling rate, the following constraints are set:  
\[\left\{\begin{array}{l}|T_{ud}(k)|^{2}\hat{S}_{ue,k}(m)\leq C_{1}(k)\hat{S}_ {ee,k}(m),\quad|A(k)|^{2}\hat{S}_{ee,k}(m)>P_{t,k}(m)\\ |A(k)|^{2}|T_{ud}(k)|^{2}\hat{S}_{ue,k}(m)\leq P_{t,k}(m),\quad|A(k)|^{2}\hat{ S}_{ee,k}(m)\leq P_{t,k}(m)\end{array}\right. \tag{16}\]  
where \(C_{1}(k)\) denotes the power spectral ratio of the specified mirror noise with respect to the actually received mirror noise, and \(P_{t,k}(m)\) denotes multiplication of the maximum value of \(\hat{S}_{ee,k}(m)\) (where \(0<k<\frac{k_{L}}{2}\)) when weighted by the equal-response curve \(A(k)\)[20]. If the primary sound source has weak high-frequency content, the upper limit of the allowedpower spectrum of the mirror noise is given by \(P_{t,k}(m)\). However, if the proportion of the high-frequency components is significant, then the upper limit is decided by \(C_{1}(k)\hat{S}_{\alpha\kappa,k}(m)\).  
\[P_{t,k}(m)=C_{2}(k)\cdot\max\limits_{0<k<\frac{k_{1}}{2}}\left[|A(k)|^{2}\hat{ S}_{\alpha\kappa,k}(m)\right],\ \ \ k>\frac{k_{1}}{2} \tag{17}\]  
where \(C_{2}(k)\) denotes the margin coefficient preset before the ANC starts.  
Finally, the group delays \(\tau_{ud}\) are compared for the meeting of the filter groups in Equation (16) in the digital filter library, and the filter group with the smallest average group delay in the control frequency band is selected as the reconstruction filter in this study.