A Switched Algorithm for Adaptive Feedback Cancellation Using Pre-Filters in Hearing Aids

Acoustic coupling between microphone and loudspeaker is a significant problem in open-fit digital hearing aids. An open-fit compared to a close-fit hearing aid significantly lowers the signal quality and limits the achievable maximum stable gain. Adaptive feedback cancellation (AFC) enables an efficient approach to reduce the impact of acoustic coupling. However, without careful consideration, it can also introduce bias in estimating the feedback path due to the high correlation between the loudspeaker signal and the incoming signal, especially when the incoming signal is spectrally coloured, e.g., speech and music. The prediction error method (PEM) is well known for reducing this bias. The presented study aims to propose a switched PEM with soft-clipping (swPEMSC) that allows for further improvement in convergence/tracking rates, resulting in a better ability to recover from unstable/howling status. This swPEMSC employs a new update rule inspired by a soft-clipping based stability detector (SCSD). It allows to pick up either the PEMSC-NLMS or PEMSC-APA depending on the magnitude of the effective feedback signal; howling corresponds to a large feedback signal. The PEMSC-NLMS with a small step-size ensures a low steady-state error, but slow convergence/tracking rates, while PEMSC-APA with a large step-size allows for fast convergence/tracking rates, but a high steady-state error. By combining those approaches, the proposed approach can take advantage of good characteristics from both. Experimental results using different types of incoming signals and an abrupt change of feedback paths show that the swPEMSC can shorten unstable periods (howling) by improving the convergence and tracking rates while retaining a low steady-state error and good signal quality.


Introduction
Acoustic feedback occurs due to the acoustic coupling of the loudspeaker signal into the microphone(s). It is a significant problem in public address (PA) systems and open-fit hearing aids (HAs). With the presence of the forward path, the feedback signal is amplified before looping back into the loudspeaker forming a closed-loop system. This feedback signal not only significantly degrades signal quality, but also limits the achievable amplification of those systems. In some particular conditions, it drives the system into an unstable status and howling may occur. The acoustic feedback becomes a more challenging problem for hearing aid applications due to the high demand for small open-fit hearing aids. Many acoustic feedback cancellation methods have been introduced over the last sixty years [1][2][3]. Among them, adaptive feedback cancellation (AFC) has the prominence to reduce the adverse effect of acoustic feedback. This method estimates the acoustic feedback path by using an FIR filter, enabling an estimate of the feedback signal which now can be cancelled from the microphone signal (cf. Figure 1). Due to the closed-loop nature of the HA, the feedback path estimation can produce bias caused by the high correlation between loudspeaker signal and incoming signal [1,2,4]. To reduce this bias, multiple decorrelation methods have been investigated in literature, e.g., delay insertion [1,5], probe noise insertion [6][7][8][9], frequency shifting [10,11], phase modulation [12], and pre-whitening filters [13,14]. Among those methods, prediction error method based adaptive feedback cancellation (PEM-AFC) is well established as it can be effectively applied in both the time domain [14][15][16][17][18][19] and the frequency domain [2,[20][21][22][23][24]. In this method, the input signals of an adaptive filter were pre-whitened by using prefilters, resulting in lower correlation and so bias. Other methods employing sub-band techniques [25][26][27][28], multiple microphones [19,[29][30][31][32][33][34], fast-converging adaptive filtering algorithms [14,15,17,32,[35][36][37], affine combination of filters [23], and variable step-size (VSS) [11,[38][39][40] or combinations of those techniques [31,41,42] for AFC also yielded performance improvement. In [43], an AFC approach based on decomposing a long adaptive filter into a Kronecker Product of two shorter filters has been proposed. Although the above AFC approaches can improve the system performance to a certain degree, the demand for a reliable AFC approach still increases.
In order to further improve the convergence and tracking rates of the previous AFC methods, a hybrid AFC using normalised least mean square algorithm (H-NLMS) has been introduced recently in [44]. The main idea of the H-NLMS was to develop a soft-clipping based stability detector (SCSD) to control the update of the adaptive filter such that the PEMSC-NLMS was chosen during stable periods, otherwise the NLMS algorithm without pre-filters was chosen. This leverages the fact that the NLMS algorithm allows the system to quickly recover from unstable conditions, while the PEMSC-NLMS may provide a lower bias in the estimate of the feedback path.
The purpose of this study is to further improve convergence/tracking rates of the stateof-the-art H-NLMS such that the system can faster recover from unstable/howling status. Inspired by the SCSD, we propose a switched PEM with soft-clipping for AFC in HAs. In contrast to the H-NLMS, first we employ pre-filters to both AFC methods using either the NLMS or the affine projection algorithm (APA) in order to reduce the biased estimate. Then, the SCSD is applied to produce a new update rule for the proposed swPEMSC in such a way that either the PEMSC-NLMS or PEMSC-APA is selected depending on the system converged or unstable, respectively. This is based on an observation that the PEMSC-NLMS with a small step-size provides a low steady-state error, but slow convergence/tracking rates, while the PEMSC-APA with a large step-size obtains much faster convergence/tracking rates, but a high steady-state error. Moreover, PEMSC-APA also faces the trade-off between a low steady-state error and fast convergence/tracking rates when its projection order increases.
Experimental results demonstrate that the proposed method can address those tradeoff problems. Specifically, the proposed swPEMSC not only further improves the conver-gence/tracking rates of the state-of-the-art H-NLMS approach but also achieves a lower steady-state error. It also outperforms other AFC baselines such as PEMSC-NLMS and PEMSC-APA. Furthermore, the speech quality of the proposed swPEMSC is comparable to that of the H-NLMS and much better than the PEMSC-NLMS and PEMSC-APA. Both swPEMSC and H-NLMS obtain very short howling periods occurring at initialisation and at the sudden change of feedback path compared to the PEMSC-NLMS and PEMSC-APA.
Throughout this paper, E{.} and superscript T denote expectation and transposition operations, respectively. We use lower and upper letters in bold to represent vectors and matrices, respectively.
The paper is organised as follows. Section 2 describes the structure of a hearing aid and its acoustic feedback problem. Sections 3 and 4 review the standard AFC method and the PEM-AFC, respectively. The proposed AFC method is presented in Section 5, while the computational complexity of all mentioned methods is compared in Section 6. Experimental results are evaluated in Section 7. Section 8 presents a discussion. Finally, Section 9 concludes the paper.

Hearing Aids and Acoustic Feedback Problem
A hearing aid is an electronic device that allows for assisting hearing impaired people to restore their hearing capability. A simple HA consists of a loudspeaker (receiver), a microphone, an amplifier, and a battery. The microphone of a HA picks up sound waves from the ambient environment. These picked up sound waves are converted into electrical signals (so-called incoming signals) which are then delayed and amplified through a forward path (K(q)) before reaching HA's loudspeaker. Finally, the loudspeaker converts the received electrical signals back into sound waves which are fed to the human ear canal. All electrical elements of a HA are powered by a small battery. Due to a presence of a coupling signal (called feedback signal) from loudspeaker to microphone HA suffers from acoustic feedback problem. Figure 2 illustrates the feedback problem in a HA. The microphone picks up not only the incoming signal but also the acoustic feedback signal, i.e., where m(k), x(k) and v(k) = F(q)u(k) = f T u(k) denote microphone, incoming and feedback signals, respectively, with F(q) the polynomial transfer function in q of the true is a L f -dimensional vector denoting impulse response (IR) of the true feedback path and q = 1 q −1 ... q −L f +1 T with q −1 the discrete-time delay operator. The microphone signal then loops back to the loudspeaker after being processed by a forward path (so-called signal processing path) making HA a closed-loop system. The loudspeaker signal can be expressed as In this paper, we assume that K(q) = |K|q −d k , where |K| and d k represent gain and delay in the forward path, respectively. This delay must be at least one sample, i.e., d k 1. By substituting (1) into (2) we obtain the transfer function of a closed-loop system from the incoming signal to the loudspeaker signal as follows: With the presence of the forward path, the acoustic feedback signal is amplified and looped back into the loudspeaker again and again, which may render the system into unstable conditions. Acoustic feedback is the main problem in HA since it significantly degrades the achievable maximum amplification and output signal quality. The stability of an LTI closed-loop system is based on the Nyquist stability criterion which is stated that a closed-loop system is unstable if conditions for loop gain and loop phase in (4) are met simultaneously.
K e jω F e jω ≥ 1 ∠K e jω F e jω = 2πn, n ∈ Z , where K e jω and F e jω are the frequency responses of the forward path and the acoustic feedback path, respectively, and ω ∈ [0, 2π] is the angular frequency. The Nyquist stability criterion in (4) is essential for acoustic feedback control as acoustic feedback control methods effectively try to avoid either one or both of these conditions to be met [3]. Note that an unstable system will result in an unbounded output but due to a natural limiting circuit in the amplifier and loudspeaker it may result in howling.

Standard AFC Approach
For the sake of simplicity, we assume that incoming signals are stationary and that all AFC systems are discrete and linear time-invariant (LTI). Figure 1 depicts a block diagram of a standard adaptive feedback cancellation system for hearing aids using a single-microphone single-loudspeaker(SMSL). The main idea is to adopt an FIR adaptive filter (F(q)) to estimate the true feedback path (F(q)), then the estimated feedback path is utilised to compute the feedback signal estimate,v(k). The error signal, e(k), is computed by subtractingv(k) from the microphone signal, m(k). This error signal goes through the forward path (K(q)) where it is delayed and amplified before it feeds into the HA's loudspeaker. The error signal utilised for an adaptive estimate of the feedback path is computed as follows: wherev(k) =f T u(k) is a Lf -dimensional vector, and the vectorf = f 0 ,f 1 , . . . ,f Lf −1 T denotes the estimated feedback path of length Lf . The Lf -dimensional vector u(k) is defined as u(k) = u(k), u(k − 1), . . . , u k − Lf + 1 T . In HAs, the loudspeaker signal u(k) is formed by processing the error signal e(k) using the forward path K(q), i.e., u(k) = K(q)e(k).
The transfer function of the closed-loop AFC system is defined as The closed-loop system S(q) is stable if the condition K e jω F e jω −F e jω < 1 is fulfilled.F e jω is the frequency response of the estimated feedback path.
By minimising the cost function J f = E e 2 (k) with respect tof, we obtain an optimal solution asf Substituting (1) into (8) yields [1] f It can be observed that there is a bias in the estimate of feedback path in (9) due to the correlation between the loudspeaker and incoming signals. Thus, the incoming signal acts as a disturbance to the feedback canceller [2]. We recursively approximate the vectorf 0 using the NLMS algorithm as follows: where µ is a fixed step-size and δ NLMS is a small positive value added to avoid division by zero.
In the ideal case where the acoustic feedback path is perfectly estimated, i.e.,F(q) = F(q), we obtain the loudspeaker signal as a delayed and amplified version of the incoming signal.

PEM-AFC
To address the bias in the feedback path estimate, prediction error method based adaptive feedback cancellation (PEM-AFC) has been proposed in [14] and widely used in both time-domain and frequency-domain AFC approaches. Figure 3 depicts the PEM-AFC model for a SMSL hearing aid [2,14,20]. In the PEM-AFC, first pre-filters are employed to pre-whiten the inputs of the adaptive filter, then the adaptive filter coefficients are recursively updated using pre-whitened signals. In this method, the incoming signal is assumed to be modelled by an autoregressive (AR) process, i.e., where w(k) denotes white Gaussian noise and G −1 (q) is a monic and inversely stable all-pole filter. The loudspeaker and microphone signals are pre-whitened by usingĜ(q). TheĜ(q) is the estimated version of G(q).
where m p (k), u p (k), and x p (k) represent pre-whitened microphone, pre-whitened loudspeaker, and pre-whitened incoming signals, respectively. The prediction error signal e p (k) is defined as where The IR of the true feedback path in the PEM-AFC can be estimated by minimising the mean square The optimal solution for (16) can be written as follows: By substituting (11) and (14) into (18), an unbiased estimate of the feedback path can be obtained if the assumption (11) is satisfied,Ĝ(q) = G(q), and at least one delay in the forward path is available. Furthermore, both the feedback path F(q) and the AR model G(q) can be identified in closed-loop without adding a probe signal or nonlinearities if the delay in the forward path is not smaller than the length of AR modelĜ(q) [2,14].
The optimal coefficientsf 0 of the PEM-AFC can be recursively approximated using the NLMS algorithm aŝ

Proposed Method
In this subsection, the structure of the switched prediction error method with soft clipping (swPEMSC) is proposed for adaptive feedback cancellation in hearing aids. Figure 4 illustrates the swPEMSC model. This model is similar to the model of the hybrid NLMS adaptive feedback cancellation algorithm (H-NLMS) using a soft-clipping-based stability detector (SCSD) [44]. The main difference is in the way to update the adaptive filterF(q). In [44], a SCSD is adopted to control the update of the adaptive filter in such a way that the NLMS algorithm is selected when the system is or close to unstable conditions, and the PEMSC-NLMS algorithm is selected when it has converged. This is based on the idea that the NLMS algorithm provides a quick recovery from howling and the PEMSC-NLMS algorithm enables lower misalignment leading to a closer estimate of the true channel. When the feedback is strong,v(k) and v(k) are not close, and thus the feedback contribution will dominate over the incoming signal, i.e., |v(k) −v(k)| |x(k)|. Inspired by bounded loudspeaker signal u(k), in practice, howling will be produced in this case. By choosing suitable parameters, the H-NLMS can significantly shorten the howling periods and improve the signal quality [44]. To further improve the convergence/tracking rates as well as steady-state error, while retaining good output sound quality, we propose a new rule to update the feedback path estimate. We observe that standard adaptive algorithms such as LMS, NLMS, and APA suffer from a trade-off between fast convergence/tracking rates and low steadystate error. Particularly, such algorithms yield fast convergence/tracking rates, but high steady-state error when their step-size is large, and vice versa. Figure 5 illustrates the tradeoff for AFC using PEMSC-NLMS with different step-size values. In addition, the affine projection algorithm (APA) also exposes to this trade-off with respect to (w.r.t) its projection order (P), i.e., the APA provides a fast convergence/tracking, but high steady-state error when P is large and vice versa [45,46]. Figure 6 shows that the PEMSC-APA obtains a higher convergence/tracking rate than the PEMSC-NLMS. Moreover, with a fixed stepsize the PEMSC-APA converges faster but yields a higher steady-state error when the projection order increases to a certain level, for example, from P = 2 to P = 6 in the experiment. With P = 8, there is almost no improvement in the convergence of PEMSC-APA, but the worse steady-state error is obtained compared to the same experiment with P = 6. Therefore, we select P = 6 for PEMSC-APA in Experiments 2 and 3.  The proposed method, swPEMSC, is developed to address the above trade-off problems. It is inspired by the SCSD in [44]. In contrast to the authors of [44], we propose to employ SCSD to control a switch between the prediction error method using soft clipping and NLMS (PEMSC-NLMS) and the PEMSC using APA (PEMSC-APA). Specifically, we utilise pre-filters to pre-whiten the inputs of the adaptive filterF(q) leading to lower bias in the estimate of filter coefficients. Then, we apply SCSD to design a switch that allows the adaptive filter to pick up the PEMSC-NLMS algorithm with a small step-size when the system has converged and the PEMSC-APA with a large step-size and projection order when the system is or close to unstable status. As a result, the proposed swPEMSC can achieve a low steady-state misalignment during stable periods and fast convergence/tracking rates to quickly recover from howling during unstable periods. It also solves the mentioned compromise of the APA w.r.t. its projection order, i.e., when P increases to a certain level, the swPEMSC achieves faster convergence or tracking rate, while still retaining a low steady-state error.
Simulation results show that the proposed swPEMSC outperforms either PEMSC-NLMS or PEMSC-APA for adaptive feedback cancellation in HAs in terms of normalised misalignment (MIS), added stable gain (ASG) and perceptual evaluation of speech quality (PESQ). It also further improves convergence/tracking ability compared to the H-NLMS [44] with a price of higher computational complexity. Furthermore, the proposed method yields a comparable or better output signal quality (PESQ) compared to all mentioned baselines. In the following, formulations of the swPEMSC will be described in detail. Definitions of the microphone, feedback and error signals are similar to those in (1) and (5) The pre-whitened microphone, loudspeaker, and error signals are also defined similar to those in (12), (13), and (15), i.e., where In the proposed method, a soft-clipping (SC) is applied to the error signal yielding the soft-clipping error signal, where α is a scaling parameter. We select α such that the most likely range of the incoming signal lies in the linear range of the tanh-function, i.e., , thus e(k) − e SC (k) may be utilised to detect instability of the AFC. This SC allows for a controlled nonlinearity on the error signal. In this way, the nonlinearity is known and the AFC can be kept linear. As a result, the feedback cancellation performance is improved. We adopt a SCSD to produce a control signal, λ(k), as where γ is a decision threshold determining the sensitivity of the detector and Γ is a binary function returning 1 if the inequality holds and 0 if not. The proposed AFC method integrates a SCSD into the update rule of the adaptive filterF(q) such that the PEMSC-NLMS is selected when the system is converged, and the PEMSC-APA is selected when the system is unstable or close to unstable. We set a small step-size value for the PEMSC-NLMS, and a large step-size value for PEMSC-APA aiming at taking advantage of a low steadystate error of the PEMSC-NLMS with a small step-size and fast convergence/tracking rates of the PEMSC-APA with a large step-size. The proposed update rule is defined as follows: where I P denotes a PxP identity matrix, µ 1 and µ 2 are fixed step-sizes (µ 2 µ 1 ), δ NLMS and δ APA denote regularisation parameters of the NLMS and APA, respectively, and U p (k) is a Lf xP matrix representing P recent loudspeaker signal vectors of length Lf after being pre-whitened by the pre-filterĜ(q), The loudspeaker signal can be computed as Besides, the soft-clipping error signal is used to estimate the pre-filter coefficients via Levinson-Durbin algorithm.

Computational Complexity
In this section, we compare the computational complexity of four considered AFC approaches. The computational complexity for estimating the linear predictor coefficients (LPC) using the autocorrelation matrix and the Levinson-Durbin algorithm is 5N 2 +2LN+N 2L multiplications, where N is the AR-model order and L is the frame length. Additionally, each pre-whitened signal is computed using N multiplications and soft-clipping needs 2 multiplications. Thus the PEMSC requires M = 5N 2 +2LN+N 2L + 2N + 2 multiplications per output sample. For estimating the adaptive filter coefficients using NLMS and APA we need 3Lf + 2 and P 2 + 2P Lf + P 3 + P multiplications, respectively [47], where Lf denotes the adaptive filter order and P is the projection order. Table 1 summarises the number of real multiplications per output sample [48] for each AFC approach, where we assume that a real multiplication and a real division have equal complexity. It can be seen that the PEMSC-NLMS has the lowest complexity. The computational complexity of the H-NLMS is slightly higher than that of the PEMSC-NLMS. The AFC approaches using the APA like PEMSC-APA and swPEMSC yield higher computational complexity than the approaches using only the NLMS due to a large value of P. However, the proposed swPEMSC achieves significant improvement on convergence/tracking rates as well as steady-state error compared to other mentioned AFC approaches. It also provides much higher perceptual speech quality (PESQ score) than the PEMSC-NLMS and PEM-APA, and a comparable PESQ score compared to the H-NLMS for both feedback paths.

AFC Methods
Computational Complexity #

Experimental Results
We use measured feedback paths, so-called free-field (F 1 ) and telephone-near (F 2 ), corresponding to the case without obstacle between loudspeaker and microphone and the case a telephone placed very close to the ear, respectively [49] for Experiments 1-3. Figure 7 depicts the amplitude and phase responses of these measured feedback paths. It can be observed that the F 2 feedback path has a higher amplitude response than the F 1 feedback path due to the effect of the obstacle. To evaluate the performance of AFC approaches, we use two common metrics: normalised misalignment (MIS) and added stable gain (ASG). The normalised misalignment [20] and added stable gain [20,50] are defined in (29) and (30), respectively.
where i is the feedback path index (i = 1, 2), F i e jω andF i e jω denote frequency responses of the ith true and the ith estimated feedback paths at the normalised angular frequency ω respectively and d f b denotes a delay in the feedback canceller's path. The lower value of MIS and higher value of ASG indicate the better AFC approach. In addition, perceptual evaluation of speech quality (PESQ) [51] is utilised to evaluate the quality of the speech signal. The PESQ ranges from −0.5 to 4.5, where the value of −0.5 indicates poor speech quality and the value of 4.5 indicates the highest speech quality. For the PESQ measures, the incoming signal x(k) and the loudspeaker signal u(k) are chosen as the reference and test signals, respectively. We evaluate the convergence/tracking rates of AFC methods based on the necessary time (namely, τ κ i ) for each method to reach a certain level of misalignment (namely κ i ) corresponding to the feedback path F i .
The following parameters are selected for all simulations: forward path delay d k = 96 samples, delay of the feedback canceller's path d f b = 1 sample, and regularisation parameters δ NLMS = δ APA = 10 −6 . Lengths of the true and estimated feedback paths are L f = 100 and Lf = 64, respectively. For the pre-filter estimate,Ĝ(q), a 20-order AR model of the incoming signal is computed for every frame of 160 samples by using the Levinson-Durbin algorithm [52]. For experiments 1-3, the forward path gain |K| = 30 dB and sampling frequency f s = 16 kHz are chosen.
We compare the proposed AFC approach to state-of-the-art baselines such as PEMSC-NLMS, PEMSC-APA (with different projection order), and H-NLMS [44] using different types of incoming signals, e.g., speech and music signals. Figure 8 shows the recorded speech and music signals used as incoming signals in experiments 1-3. The length of these signals is truncated to 60 s. To evaluate the tracking ability of AFC approaches, a sudden change of the feedback path from (F 1 ) to (F 2 ) is employed after half of the simulation time. The following step-sizes are selected for AFC approaches to ensure that each AFC approach achieves its best performance. For H-NLMS and swPEMSC: µ 1 = 0.0008, µ 2 = 0.8. Experiment 1: This experiment aims at finding a suitable value of projection order such that the proposed method achieves a good performance as well as an acceptable complexity. Figure 9 demonstrates the performance of the proposed approach with different projection order P ∈ [2, 4, 6, 8] in term of MIS and ASG. It can be seen that the convergence rate of the swPEMSC is quite similar for P = 2, 4, 8. The tracking rate is improved with an increase of P from 2 to 4 or 6. Further increasing P degrades the system performance. For example, the tracking rate with P = 8 is lowered than that with P = 4 or 6. In the experiment, we found that P = 6 is the best choice as it allows the swPEMSC to achieve the highest convergence/tracking rate while maintaining a similar steady-state misalignment. Similar observations are also reported when using music as the incoming signal, cf. Figure 10. Therefore, we select P = 6 for the proposed swPEMSC.  (b) Figure 9. Performance of the proposed method with P ∈ [2,4,6,8], speech input, feedback path changes from free-field (F 1 ) to telephone-near (  (b) Figure 10. Performance of the proposed method with P ∈ [2,4,6,8], music input, feedback path changes from free-field (F 1 ) to telephone-near (

Experiment 2:
This experiment aims at evaluating the performance of the proposed swPEMSC for recorded speech [30] as the incoming signal. The feedback paths depicted in Figure 7 are selected. We suddenly change the feedback path from F 1 to F 2 after 30 s. The performance of the proposed swPEMSC is evaluated in terms of normalised misalignment (MIS), added stable gain (ASG), signal quality (PESQ) and the necessary time ( τ κ i ). Figure 11 compares the performance of the proposed swPEMSC with state-of-the-art baselines such as PEMSC-NLMS, PEMSC-APA (with P = 6) and H-NLMS. It can be seen that the PEMSC-APA converges quicker than the PEMSC-NLMS. It also tracks a sudden change of the feedback path from free-field (F 1 ) to telephone-near (F 2 ) quicker than the PEMSC-NLMS. However, a higher steady-state error with larger variations can be observed from MIS and ASG of the PEMSC-APA. The H-NLMS yields faster initial convergence and tracking rates than the PEMSC-APA while providing a lower steady-state error compared to both PEMSC-NLMS and PEMSC-APA. The proposed method outperforms all mentioned AFC methods. Particularly, it achieves the fastest convergence/tracking rates and the lowest steady-state error. It also provides the highest ASG, especially during the periods in which the system has converged, for example, the periods between 15 s and 30 s corresponding to the feedback path F 1 and between 45 s and 60 s corresponding to the feedback path F 2 . (b) Figure 11. Compare performance of the proposed method with state-of-the art AFC methods using speech input, a sudden change of the feedback path from free-field (F 1 ) to telephone-near (F 2 ) after 30 s: (a) MIS; (b) ASG. Table 2 summarises the comparison of the swPEMSC with baselines in terms of the necessary time in seconds (τ κ i ) for each AFC approach to reach κ i dB level of misalignment, average normalised misalignment in dB, and average added stable gain in dB corresponding to the ith feedback path (i.e., τ κ i , MIS i , ASG i ), respectively. For recorded speech incoming signal [30], we choose κ 1 = −15 dB, κ 2 = −16 dB. The best values are indicated in bold. It can be seen that the PEMSC-APA has higher MIS i , ASG i and much smaller τ κ i (i = 1, 2) than those of the PEMSC-NLMS. The H-NLMS obtains further improvement in MIS i , ASG i , while retaining similar τ κ 2 and a bit higher τ κ 1 compared to the PEMSC-APA. Among all mentioned AFC approaches, the proposed swPEMSC achieves the best values for all metrics. Specifically, the proposed approach yields approximately 4 dB gain on MIS 1 and ASG 1 , 2.5 dB gain on MIS 2 and ASG 2 compared to the PEMSC-NLMS. It also yields approximately 2 dB gain on MIS i and ASG i for both feedback paths compared to the PEMSC-APA, and 0.7 dB improvement in MIS i and 0.5 dB improvement in ASG i compared to the H-NLMS. Moreover, the proposed approach needs only 0.3 s to reach −15 dB of misalignment (for F 1 ) while the PEMSC-NLMS, PEMSC-APA, and H-NLMS need around 8.3 s, 2.5 s, and 1.7 s, respectively. Similar observations are reported for the case using F 2 . Note that a small value of τ κ 1 implies a faster convergence rate and a small value of τ κ 2 means a faster tracking rate.
We evaluate the speech quality of the compared AFC approaches using the PESQ measure (cf. Table 3). This table shows that H-NLMS and swPEMSC outperform PEMSC-NLMS and PEMSC-APA in terms of PESQ. The swPEMSC yields a slightly higher PESQ for the free-field feedback path (F 1 ) but gets a small drop in PESQ for the telephonenear feedback path (F 2 ) compared to the H-NLMS. Both H-NLMS and swPEMSC obtain high perceptual speech quality with PESQ scores from 3.7 to 4.2. We observe that the misalignment of swPEMSC yields a higher peak (a sign of howling) than that of the H-NLMS after a sudden change of feedback path. However, this high peak lasts only for a very short time before the system quickly returns to a stable state (see Figure 11a). That may be the reason for a small reduction in the PESQ 2 of the swPEMSC compared to that of H-NLMS. To verify this observation, we compute PESQ 2 with incoming signal from 32 s to 60 s (skipping the first 2 s that may contain howling for the H-NLMS and swPEMSC). In this case, the PESQ 2 scores for PEM-NLMS, PEM-APA, H-NLMS, and swPEMSC are 3.571, 4.084, 4.224, and 4.291, respectively. This result means that the three last methods achieve good signal quality (PESQ > 4), but the proposed approach obtains the highest PESQ for the period of the signal without the howling effect. This result matches well with Figure 11a, where the three last methods show quick tracking rates. The PESQ 2 of the PEMSC-NLMS is much lower since this method tracks the change of feedback path slower than other methods resulting in a part of howling still available in the PESQ 2 computing period (32 s-60 s). Table 2. Evaluate performance of PEMSC-NLMS, PEMSC-APA, H-NLMS, and swPEMSC for different types of the incoming signals, feedback path changes from F 1 to F 2 after half of the simulation time, κ 1 = −15 dB, κ 2 = −16 dB (for recorded speech input); κ 1 = −11 dB, κ 2 = −14.5 dB (for recorded music input); and κ 1 = κ 2 = −13.5 dB (for 5 segments of speech input).

AFC Methods
Incoming Those results are consistent with an observation of howling periods in Figure 12. We can see that the PEMSC-APA yields shorter howling than the PEMSC-NLMS. The howling periods of the H-NLMS and the proposed swPEMSC are comparable, but they are much shorter than those of the PEMSC-APA. Therefore, the swPEMSC and H-NLMS can recover from howling periods quicker than the PEMSC-APA and PEMSC-NLMS. Figure 12. Compare howling periods in output signal of the proposed approach with baselines, speech incoming signal, a sudden change of the feedback path from F 1 to F 2 after 30 s.

Experiment 3:
In this experiment, we evaluate the proposed swPEMSC using recorded music [24] as the incoming signal. The recorded music is a segment of the song "Imagine" by John Lennon. We select the feedback paths depicted in Figure 7 and suddenly change the feedback path after half of the simulation time. We set κ 1 = −11 dB and κ 2 = −14.5 dB. Figure 13 demonstrates the performance of the proposed approach in comparison with other baselines. The proposed swPEMSC outperforms all considered AFC approaches. In particular, it achieves faster convergence/tracking rates and lower steady-state error than other baselines. Those observations are consistent with the results shown in Table 2 for the music incoming signal. It is shown that the proposed approach obtains the best values for most of metrics such as MIS 1 ,MIS 2 , ASG 2 , τ κ 1 , and τ κ 2 . The H-NLMS obtains the best value for ASG 1 , while the ASG 1 of swPEMSC is comparable with that of the H-NLMS. (b) Figure 13. Performance of the proposed method state-of-the art AFC methods using music input, a sudden change of the feedback path from free-field (F 1 ) to telephone-near (F 2 ) after 30 s: (a) MIS; (b) ASG. Figure 14 compares howling periods of the proposed approach with those of baselines. It can be seen that the swPEMSC can recover from howling quicker than the PEMSC-NLMS and PEMSC-APA. Its howling length is comparable with that of the H-NLMS.

Experiment 4:
This experiment is conducted to verify the robustness of the proposed approach against different input signals and feedback paths. In particular, we evaluate the proposed swPEMSC using five segments of concatenated speech as the incoming signals and a new feedback path.
Note that the incoming signals in this experiment are not recorded. Each speech segment is generated by randomly selecting and concatenating speech utterances extracted from NOIZEUS database [51]. The length of each segment is 40 s. The measured feedback path [20] is selected for this experiment. This measured feedback path (F 1 ) and the five segments of speech incoming signals are presented in Figures 15 and 16, respectively. The sampling frequency for this experiment is 8 kHz. To evaluate the tracking ability of AFC methods we produce the second feedback path (F 2 ) by right shifting F 1 by 12 samples. In this experiment, we set |K| = 12 dB for the forward path gain, κ 1 = κ 2 = −13.5 dB, and step-size µ = 0.002 for the PEMSC-NLMS. We also select P = 2 for the PEMSC-APA P = 6 for the swPEMSC as they allow the best performance for the corresponding approach. Other parameters are set the same as those in Experiment 2.   Figure 17 shows the average MIS and ASG computed over 5 segments of speech input. The feedback path abruptly changes from F 1 to F 2 after 20 s. It can be seen that the PEMSC-APA and PEMSC-NLMS obtain similar performance, while the H-NLMS achieves quicker convergence/tracking rates and also lower steady-state error. Higher average ASGs for both feedback paths are also observed for the H-NLMS compared to those of PEMSC-NLMS and PEMSC-APA. As expected the swPEMSC outperform all baselines. Those observations match well with the results in Table 2, where the proposed swPEMSC achieves the highest MIS i and ASG i . It also obtains comparable τ κ i compared to the H-NLMS, but those values much lower compared to the PEMSC-APA and PEMSC-NLMS. (b) Figure 17. Compare performance of the proposed method with state-of-the art AFC methods using 5 segments of speech input, a sudden change of the feedback path from F 1 to F 2 after 20 s, MIS (a) and ASG (b) were average values computed over 5 segments of speech input. Table 3 shows the average PESQ scores over five segments of speech input, where PESQ 1 and PESQ 2 are measured over the last 18 s of speech segments corresponding to the feedback path F 1 and F 2 , respectively. It is observed that the PESQ 1 scores of all mentioned AFC methods are very high (approximately 4.1), which reflect the fact that after the first 2 s all AFC methods have converged. These results are consistent with the measures of τ κ 1 in Table 2 which shows that all AFC methods during the period of the feedback path F 1 need around 2 s or less to reach −13.5 dB of misalignment. When the feedback path suddenly changes from F 1 to F 2 , the PEMSC-NLMS and PEMSC-APA need approximately 3 s and 2.8 s to reach that level of misalignment, respectively. It may be the reason for a reduction in PESQ 2 of those methods since the system may still partly unstable during the period PESQ 2 computed. In contrast, the H-NLMS and swPEMSC require a very short time to reach that level of misalignment for both feedback paths, resulting in very high PESQ 2 scores (approximately 4.1).
Although the proposed swPEMSC has comparable signal quality compared to the H-NLMS, it achieves the lowest average MIS, the highest ASG, and faster convergence/tracking rates for most scenarios.
Note that in experiments 2 and 3 the average misalignment (MIS i ) and average added stable gain (ASG i ) corresponding to the ith feedback path (i = 1, 2) are computed over 30 s (i.e., 480,000 samples) of each realisation, while in experiment 4 those values are computed over 20 s (i.e., 160,000 samples).

Discussion
In this study, the MIS, ASG, and PESQ measures are adopted to evaluate the performance of different AFC approaches, namely, the swPEMSC, H-NLMS, PEMSC-APA, and PEMSC-NLMS for different types of incoming signals and an abrupt change of the feedback path. Moreover, this study evaluates the convergence/tracking rates based on the needed time for each considered approach reaching a certain level of normalised misalignment. Experimental results indicate that the proposed swPEMSC achieves a further improvement in the initial convergence and re-convergence than the state-of-the-art H-NLMS for most scenarios. The reason for faster re-convergence is that the swPEMSC uses an APA adaptive filter update with a high step-size and an optimised project order when unstable/howling status is detected, whereas the H-NLMS uses a standard NLMS. Furthermore, the swPEMSC and H-NLMS outperform the PEMSC-APA and PEMSC-NLMS in terms of convergence/tracking rates as well as average MIS and average ASG.
The results also show that there is a dependency of the projection order (for AFC approaches using the APA algorithm) on the performance. This is expected because the projection order of an APA algorithm depends on the signal characteristics. It is observed that the proposed approach employing a fixed pair of step-sizes µ 1 = 0.0008, µ 2 = 0.8, and a projection order of 6 (P = 6) provides better performance than itself with P = 2, 4, 8 for both speech and music input signals as well as for a sudden change of the feedback path.
Generally, the proposed swPEMSC achieves much better speech quality than PEMSC-APA and PEMSC-NLMS in most mentioned scenarios due to its fast convergence and tracking abilities. It also yields similar speech quality compared to the H-NLMS.

Conclusions
In this paper, we propose a new and practical way to improve the AFC performance in open-fit hearing aids. The proposed swPEMSC is developed based on a new update rule for estimating adaptive filter coefficients. This update rule allows a switch from the PEMSC-NLMS to the PEMSC-APA when the system goes from a converged status to an unstable/howling status, and vice versa. This switch is controlled by a control signal produced by using the SCSD. Experimental results show that the proposed swPEMSC outperforms other state-of-the-art AFC approaches such as the PEMSC-NLMS, PEMSC-APA, and H-NLMS for different types of incoming signals (e.g., speech and music) and an abrupt change of feedback paths. In particular, the proposed approach achieves a significant performance improvement in terms of convergence/tracking rates, average MIS and average ASG compared to baselines in most scenarios. It also obtains high perceptual speech quality. The PESQ score as well as the ability to recover from the instability/howling of the proposed approach are comparable to those of the H-NLMS but much better than those of the PEMSC-NLMS and PEMSC-APA. However, the improvements from using swPEMSC come at an increased cost in computational complexity.