# A Four-Stage Method for Active Control with Online Feedback Path Modelling Using Control Signal
## 2 Proposed Method
The nominal estimate of \(F(z)\) can be obtained as:  
\[\hat{f}_{n}(n)=\text{IFFT}\left(\frac{M(\omega)}{Y(\omega)}\right), \tag{5}\]  
where IFFT denotes the inverse Fourier transform, \(\hat{f}_{n}(n)\) is the impulse response vector of the nominal estimate, \(M(\omega)\) is the FFT of the microphone signal \(m(n)\), and \(Y(\omega)\) is the FFT of \(y(n)\). Although Equation (5) might not provide an exact estimate of \(F(z)\) because the reference signal is contaminated, it can be used to stabilize the system for further feedback path modelling. It should be noted that the magnitude of \(y(n)\) should be quite large in the above identification because it makes the power of the residual error signal \(e(n)\) about 20 dB higher than the power of \(p(n)\) when howling happens. If there is no howling, the controller \(G\) is increased from a small pre-defined value (for example, \(G=1\%\) of the maximal gain can be applied on the system without causing howling) by 2 times each step until \(\sigma_{\text{e}}^{2}(n)>\sigma_{\text{P}}^{2}(n)\). That means the system stays in the first stage until \(\sigma_{\text{e}}^{2}(n)>\sigma_{\text{P}}^{2}(n)\) without causing howling. Once the system is stable and the above condition is satisfied, it is ready to enter the second stage. In the second stage, \(\text{K}_{1}\) and \(\text{K}_{3}\) are turned on and the other switches are turned off. The feedback path \(F(z)\) is estimated as an FIR filter \(\hat{F}(z)\) using the control signal as the excitation signal. The initial impulse response vector of \(\hat{F}(z)\) can be a vector of zeros if no howling occurs in the first stage or the one obtained with Equation (5) if howling occurs. Because the control signal \(y(n)\) and reference signal \(r(n)\) are correlated, the obtained model is biased. Although a delay present in the control filter in the first stage can reduce correlation somehow, normalized least mean square (NLMS) decorrelation filters are used in this stage to whiten the signals used in the feedback path modelling process to increase the convergence speed and reduce the bias of the adaptive filter [19; 20]. Two identical adaptive decorrelation filters \(L(z)=1-z^{-1}A(z)\) are employed to address the bias and slow convergence issue of feedback path modelling in the second stage, where \(A(z)\) is the \(z\)-transform of \(\mathbf{a}(n)=[a_{0}(n),a_{1}(n),\dots,\ a_{N-1}(n)]^{\text{T}}\) with \(N\) denoting the tap-weight length of \(A(z)\). The feedback compensated signal \(x(n)=r(n)+f(n)-\hat{f}(n)\) passes through the adaptive decorrelation filter to provide the signal \(x^{\prime}(n)=x(n)-\mathbf{a}^{\text{T}}(n)\mathbf{x}_{1}(n)\), where \(\mathbf{x}_{1}(n)=[x(n-1),\ x(n-2),\ \dots,\ x(n-N)]^{\text{T}}\). Similarly, the control signal \(y(n)\) passes through the decorrelation filter to provide \(y^{\prime}(n)=y(n)-\mathbf{a}^{\text{T}}(n)\mathbf{y}_{1}(n)\), where \(\mathbf{y}_{1}(n)=[y(n-1),\ y(n-2),\ \dots,\ y(n-N)]^{\text{T}}\). The pre-whitened signals \(y^{\prime}(n)\) and \(x^{\prime}(n)\) are used to update the filter \(\hat{F}(z)\). The adaptive decorrelation filter is updated using the NLMS algorithm as:  
\[\mathbf{a}(n+1)=\mathbf{a}(n)+\mu_{l}\frac{x^{\prime}(n)\mathbf{x}_{1}(n)}{\mathbf{x}_{1}^{ \text{T}}(n)\mathbf{x}_{1}(n)+\delta} \tag{6}\]  
where \(\mu_{l}\) is the step size and \(\delta\) is used to avoid divide by zero. The tap-weights of the of \(\hat{F}(z)\) are updated as:  
\[\hat{\mathcal{J}}(n+1)=\hat{\mathcal{J}}(n)+\mu_{l}\frac{x^{\prime}(n)\mathbf{y}^ {\prime}(n)}{\mathbf{y}^{\prime\text{T}}(n)\mathbf{y}^{\prime}(n)+\varepsilon} \tag{7}\]  
where \(\mu_{l}\) is the step size, \(\varepsilon\) is used to avoid divide by zero, and \(\mathbf{y}^{\prime}(n)=[y^{\prime}(n),\ y^{\prime}(n-1),\ \dots,\ y^{\prime}(n-L_{l}+1)]^{\text{T}}\). It is to be noted that the method described above is applicable for broadband control only. In this stage, the feedback path modelling is carried out for a certain time, which depends on the feedback signal to reference signal amplitude ratio.