Acoustic Feedback Cancellation Algorithm for Hearing Aids Based on a Weighted Error Adaptive Filter

: Acoustic feedback is a common phenomenon that occurs during hearing aid use, limiting the maximum gain that a hearing aid can provide. Effective cancellation of acoustic feedback is an essential feature of hearing aids. However, due to the complex environments in which hearing aids are used and the frequently changing acoustic feedback path, it is difﬁcult for existing adaptive ﬁlter-based acoustic feedback cancellation algorithms to balance both convergence speed and steady-state error. For this reason, based on the nonparametric variable step size (NPVSS) algorithm, a weighted NPVSS algorithm that also introduces a prediction error method is proposed in this paper. First, by introducing the prediction error method, the adaptive ﬁlter bias caused by the nonwhite source signal is effectively reduced. Second, the proposed weighting mechanism weights the error signal according to the adaptive ﬁlter misalignment, which enhances the steady-state robustness of the algorithm while accelerating its convergence. In addition, a new low-complexity method is herein proposed for source signal energy estimation by reusing the misalignment information to solve the step size calculation problem of the NPVSS algorithm. Simulation results show that the new algorithm exhibits greater robustness and faster convergence than similar algorithms. The proposed algorithm is implemented with a real hearing aid and its performance is measured on a dummy head in a soundproof room. The test results demonstrate that the proposed algorithm achieves a 35% reduction in convergence time compared with PEM-IMLMS and a 60% reduction compared with PEM-NLMS. Furthermore, the proposed algorithm reduces the sound pressure level of acoustic feedback residues compared with PEM-IMLMS and PEM-NLMS by approximately 2 dB SPL and 6 dB SPL, respectively. These results indicate that the new algorithm can provide timely and stable cancellation of acoustic feedback.


Introduction
Hearing aids are a common real-time sound amplification system in which a sound signal is first picked up by a microphone, then processed and amplified by an electroacoustic forward path, and subsequently reproduced by a loudspeaker in real time.As the microphone of a hearing aid system is located in the same acoustic environment as the loudspeaker, the microphone will inevitably pick up the amplified sound again (i.e., acoustic feedback signal), and if the gain is too high and meets certain phase conditions, howling will be generated [1].The occurrence of howling not only compromises the sound amplification function of the device but also can cause damage to the human ear.Acoustic feedback cancellation can increase the maximum stable gain (MSG) of the hearing aid to meet the high gain requirements of patients with severe hearing loss.
Currently, the adaptive filtering method is the mainstream acoustic feedback cancellation algorithm, widely used in various applications, including public address systems [2,3], active noise reduction systems [4][5][6], and hearing aids [7].In particular, for hearing aids, this approach employs an adaptive filter (AF) to model the feedback path between the hearing aid microphone and the speaker and subtracts the acoustic feedback signal component estimated by the AF from the microphone signal to achieve acoustic feedback cancellation.Some studies have investigated algorithms that combine AF with other methods, such as probe noise injection [8][9][10][11][12], and spatial filtering [13,14].While probe noise can help AF accurately estimate feedback paths and maintain a perceptual evaluation of speech quality (PESQ) score of up to 4.28, the sudden injection of noise during use can negatively impact the user experience.Previous research works [13,14] have proposed a multiple microphone AF that uses beamforming, and achieves an additional gain of 7-8 dB.However, in practical hearing aids, the limited size usually means that up to two microphones are available, reducing beamforming accuracy.In addition, in research conducted by [15], a method is presented that decomposes a long adaptive filter into shorter ones using nearest Kronecker product, which achieves an additional stable gain (ASG) improvement of about 2 dB compared to the affine projection algorithm (APA).Despite the numerous improvements mentioned above, the performance of adaptive filters remains constrained by several problems.
First, the hearing aid is a closed-loop system.Due to the existence of the forward path, the speaker signal is correlated with the source signal.If the source signal is nonwhite, this correlation can lead to a pseudo path that is related to the spectrum of source signal between the microphone and the speaker, resulting in a biased estimation of the feedback path [16].Previous studies have identified three potential methods for addressing this issue, namely the delay insertion method [17], phase modulation method [18,19], and prediction error method (PEM) [2,15,[20][21][22][23][24][25][26][27][28][29].However, the phase modulation and delay insertion method directly affect the forward path and may have a negative impact on the sound quality of hearing aids.As a result, these methods are less preferable.In contrast, PEM can effectively reduce acoustic feedback residuals by pre-whitening the signals while maintaining sound quality.An ASG of 20 dB higher than the Filter-X algorithm can be obtained with time-varying input signals, making it a promising option for addressing this issue [24].
Second, due to the uncertainty of the environment when the hearing aid is worn, the energy of the sound signal may fluctuate greatly.This can lead to large jitter in the tapping coefficients of the filter.To improve the robustness of the adaptive filtering algorithm, methods such as the sign algorithm [30][31][32][33][34] and M-estimate have been proposed.However, the sign algorithm tends to converge more slowly.This is because it only considers the polarity of the error signal and ignores its amplitude, so more iterations are required to reach a steady state [34].As for the M-estimate [35][36][37][38][39][40], its performance depends on the chosen threshold, and improper selection can lead to degraded performance and reduced robustness.Unfortunately, threshold selection is usually a subjective process.Therefore, these methods need to be improved.
In addition, practical hearing aid applications require consideration not only of performance but also of the limited computing power, which is constrained by latency, power consumption, and size.Algorithms based on APA and affine projection like (APL) [2,26,34,35,[40][41][42][43]] contain many matrix operations.Meanwhile, algorithms based on the subband adaptive filter (SAF) [29][30][31][32]44,45] require many filtering operations during subband analysis and synthesis.It is very difficult to implement these algorithms on embedded processors with limited computing power and power sensitivity.Therefore, these algorithms are predominantly considered at the theoretical level, and normalized least mean square (NLMS)-based algorithms are more commonly used in real hearing aids.
In particular, more sophisticated algorithms based on NLMS include the variable step size NLMS (VSS-NLMS) [23][24][25][46][47][48][49] and the dual adaptive filter algorithm [50][51][52].Among them, the variable step size algorithm has been widely studied in hearing aid feedback cancellation scenarios due to its fast convergence and low resource consumption [52,53] and has also been an active research topic in recent years.Among the VSS-NLMS-based algorithms, nonparametric variable step size (NPVSS) [47] is simple and effective, but its ability to model the closed-loop system needs to be improved.Therefore, in this paper, based on the NPVSS algorithm, a new weighting mechanism-based algorithm with PEM introduced is proposed (i.e., PEM Weighted NPVSS-NLMS, or PEM-WNPVSS).
The proposed algorithm calculates the level of short-time misalignment (STML) of the AF and weights the error signal accordingly to improve the convergence speed and anti-interference ability at steady state.At the same time, a method that reuses the STML to estimate the power of the source signal is proposed to solve the step size calculation problem of some VSS-NLMS algorithms (including NPVSS) in practical applications.In addition, the proposed algorithm uses PEM to reduce modeling bias in the acoustic feedback path by decorrelating the source signal and the desired signal of the AF.
The main contributions of this paper are as follows: 1.
A new weighting method is proposed, in which the STML of the AF is calculated and the error signal is weighted accordingly.This method avoids subjective determination of the threshold in M-estimate and has a finer control granularity, which not only retains its ability to resist interference, but also accelerates filter convergence.

2.
A new method for estimating the source signal power using STML is proposed, which solves the step size calculation problem of some VSS-NLMS algorithms in practical applications.The reuse of STML represents a low-cost solution to this issue.

3.
PEM is introduced to improve the performance of the NPVSS algorithm in closed-loop systems.In this study, PEM is implemented in actual hearing aids, whereas previous research on hearing aid algorithms only used PEM for simulation.
The remaining sections are structured as follows.The principles of the proposed algorithm are detailed in Section 2. In Section 3, the algorithm is simulated on a computer, and the simulation results are analyzed.Section 4 presents the algorithm performance results for measurements in a soundproof room.Finally, concluding remarks are given in Section 5.

Theoretical Basis
A conventional implementation of AF-based acoustic feedback cancellation is shown in Figure 1.G(n) is the electroacoustic forward path, which is used to provide the gain of the hearing aid, y(n) is the signal about to be played by the speaker, d(n) is the signal picked up by the microphone, and n represents the signal sampling moment.Define the feedback signal as f (n) and the sound source signal as v(n).
1.A new weighting method is proposed, in which the STML of the the error signal is weighted accordingly.This method avoids su tion of the threshold in M-estimate and has a finer control granula retains its ability to resist interference, but also accelerates filter c 2. A new method for estimating the source signal power using which solves the step size calculation problem of some VSS-N practical applications.The reuse of STML represents a low-cost s 3. PEM is introduced to improve the performance of the NPVSS a loop systems.In this study, PEM is implemented in actual hearin vious research on hearing aid algorithms only used PEM for sim The remaining sections are structured as follows.The principles gorithm are detailed in Section 2. In Section 3, the algorithm is simul and the simulation results are analyzed.Section 4 presents the algorit sults for measurements in a soundproof room.Finally, concluding r Section 5.

Theoretical Basis
A conventional implementation of AF-based acoustic feedback ca in Figure 1. ( ) G n is the electroacoustic forward path, which is used of the hearing aid, ( ) y n is the signal about to be played by the speake picked up by the microphone, and n represents the signal sampling feedback signal as ( ) f n and the sound source signal as ( ) v n .
The acoustic feedback path ( ) U n is modeled by the AF ( ) W n deviation between ( ) W n and ( ) U n is called misalignment (MIS) small, ( ) e f n , the output signal of ( )  The acoustic feedback path U(n) is modeled by the AF W(n), and the degree of deviation between W(n) and U(n) is called misalignment (MIS).When the MIS is small, f e (n), the output signal of W(n), is approximately equal to f (n).
From Figure 1, the error signal e(n) can be expressed as where is the coefficient vector of W(n), L is the AF length, and [•] T denotes the transpose operator.
For W(n) to converge to U(n), e(n) can be minimized in the mean square sense, i.e., the following cost function is minimized: where E[•] is the mathematical expectation.Due to the correlation between d(n) and y(n), solving for w(n) in the above equation is complicated, and since U(n) is dynamic when the hearing aid is in operation, an iterative approach is used to make W(n) approach U(n).
Based on the steepest descent principle, if the AF is iterated with the instantaneous gradient values used in Equation (3) and by normalizing the energy of y(n), then the AF coefficients w(n + 1) at the moment of n + 1 can be expressed as NLMS, NPVSS, etc., are the most common algorithms based on the steepest descent principle.They are differentiated by their selection of µ(n).In the NLMS algorithm, µ(n) is a constant, and in the NPVSS algorithm, µ(n) can be expressed as [47]: where σ v (n) and σ e (n) are the square roots of σ 2 v (n) and σ 2 e (n), respectively.σ 2 v (n) and σ 2 e (n) are the powers of v(n) and e(n), respectively, where v(n) is unknown in practice.

The Proposed Algorithm
Based on the above theoretical foundation, a PEM-WNPVSS algorithm is proposed in this paper.Although the NPVSS algorithm provides a useful variable step size scheme, there are still some problems that require solving.First, the algorithm is not specifically optimized for closed-loop systems.That is, it does not solve the problem of biased estimation of AFs in hearing aids.Second, the algorithm does not converge fast enough in practical applications, and the robustness is not strong in the steady state.Finally, the algorithm assumes that σ 2 v is known and does not provide a real-time estimation method for it.For the problem of biased estimation, this paper introduces the PEM to prewhiten d(n) and y(n).Regarding issues of low convergence speed and susceptibility to interference, this paper proposes an error weighting mechanism.In addition, an estimation method for σ 2  v is proposed in this paper.The block diagram of the proposed algorithm is shown in Figure 2, where the signals with the "w" corner marker represent the whitened version of the original signal.W m (n) is the mirror filters of W(n), which means they have the same coefficients.In Figure 2, the solid line represents the signal flow, the "dash" line represents the reference to the data, and the "dash-dot" line represents the acoustic signal flow.
The pseudocode of the algorithm is given in Appendix A. The principle and derivation of the algorithm are as follows.

Prewhitening
Since the source signal ( ) v n is usually colored and correlated with the feedback signal ( ) f n , this can cause a bias between ( ) W n and ( ) U n , limiting the system MSG.PEM is a decorrelation method with low impact on sound quality, which decorrelates ( ) d n and ( ) y n by whitening them.The method is based on the assumption that the sound signal is an autoregressive (AR) process [2,23], i.e., ( ) v n is the output of an allpole filter ( ) H n with white noise ( ) x n input.Define ( ) A n as the inverse filter of ( ) H n , that is: Clearly, ( ) A n is an all-zero filter.Since ( ) v n is correlated with ( ) f n , if ( ) A n can be obtained, ( ) A n can be used to whiten both ( ) where ( ) n d is the vector of ( ) d n and ( ) n y is the vector of ( ) y n .The order of ( ) A n is usually taken as 20, and higher orders do not significantly improve the prewhitening effect but rather attenuate the energy of the signal.

Error Signal Weighting
To improve the resistance of the algorithm to interference, the M-estimate method has been used in some previous studies [35][36][37][38][39][40].This method uses a modified Huber function to classify the error signal ( w ( ) e n in Figure 2), and the samples of the error signal above the threshold are identified as interference and do not participate in calculating ( ) W n .Although this approach is simple and easy to implement, it suffers from two main drawbacks.One drawback is that the threshold is not adjusted according to the MIS of the AF.In fact, in the convergence stage of the AF, the MIS of ( ) W n is larger, and to ensure The pseudocode of the algorithm is given in Appendix A. The principle and derivation of the algorithm are as follows.

Prewhitening
Since the source signal v(n) is usually colored and correlated with the feedback signal f (n), this can cause a bias between W(n) and U(n), limiting the system MSG.
PEM is a decorrelation method with low impact on sound quality, which decorrelates d(n) and y(n) by whitening them.The method is based on the assumption that the sound signal is an autoregressive (AR) process [2,23], i.e., v(n) is the output of an all-pole filter H(n) with white noise x(n) input.Define A(n) as the inverse filter of H(n), that is: Clearly, A(n) is an all-zero filter.Since v(n) is correlated with f (n), if A(n) can be obtained, A(n) can be used to whiten both d(n) and y(n).When W(n) converges to U(n), e(n) converges to v(n), so e(n) can be used to model A(n) approximately at this time.Since R ee (n), the autocorrelation matrix of e(n), is a Toeplitz matrix, the coefficients a(n) of A(n) can be obtained by the Levinson-Durbin algorithm.
The pre-whitened signals d w (n) and y w (n) can be expressed as where d(n) is the vector of d(n) and y(n) is the vector of y(n).The order of A(n) is usually taken as 20, and higher orders do not significantly improve the prewhitening effect but rather attenuate the energy of the signal.

Error Signal Weighting
To improve the resistance of the algorithm to interference, the M-estimate method has been used in some previous studies [35][36][37][38][39][40].This method uses a modified Huber function to classify the error signal (e w (n) in Figure 2), and the samples of the error signal above the threshold are identified as interference and do not participate in calculating W(n).Although this approach is simple and easy to implement, it suffers from two main drawbacks.One drawback is that the threshold is not adjusted according to the MIS of the AF.In fact, in the convergence stage of the AF, the MIS of W(n) is larger, and to ensure the convergence speed of W(n), e w (n) should be relatively in a larger range, so there should be a higher threshold during this stage; however, in the steady-state stage, the MIS of W(n) is smaller, and to enhance the robustness, the threshold should be appropriately reduced.The other drawback is that the threshold of the method is not easy to determine.If the threshold is too high, it is easy to classify the interference signal as a normal signal, and the algorithm loses its function.If the threshold is too low, it will slow down the AF convergence.
To overcome the drawbacks of M-estimate, a new method, i.e., weighting e w (n) by MIS, is proposed here as a replacement for simple classification.In the convergence phase, the MIS is large, so e w (n) can be weighted according to the level of MIS, and by doing so, e(n) will be scaled up appropriately to obtain faster convergence.In the steady-state phase, the MIS is small, so e w (n) can be scaled down to enhance the robustness of the algorithm.However, in practical applications, U(n) is unknown; thus, MIS can only be obtained by estimation.
Considering the system shown in Figure 2, its system function can be written as Since W m (n) has the same coefficients as W(n), the acoustic feedback residual of this system can be written as Thus, e(n).e The cross-correlation between e(n) and y(n) can be written as where e(n) is the vector of e(n).
It is clear that the magnitude of r ey,0 (n) is determined by both the feedback path (the first term of Equation ( 12)) and the forward path (the second term).When the AF is not working, S(n) is a closed-loop system, so ε(n) is repeatedly played back and amplified in the system.Thus, the first term is much larger, resulting in a strong correlation between e(n) and y(n).As the iterative process begins, W(n) gradually converges to U(n).At this point, the ε(n) component in e(n) is canceled, and S(n) degenerates to G(n), so the correlation between e(n) and y(n) is caused only by G(n) and will be significantly weaker than before.If there is some delay in G(n) or if G(n) is a nonlinear system, the correlation will be much weaker [18,53].Based on these factors, the degree of similarity between e(n) and y(n) characterizes the level of MIS of the AF.
However, Equation ( 12) is ideal and cannot be applied directly, so we consider the short-time correlation function of e(n) and y(n), i.e., where k ∈ [0, K], K is the maximum frame shift of the short-time correlation function and h(n) is the time domain window.To avoid chance results, r ey (n, k) can be obtained recursively, i.e., where α is the forgetting factor, usually taking a value between 0.9 and 0.999.Taking the maximum of the absolute values of the K data calculated by the above equation and performing energy normalization yields where • 2 represents the 2-norm of the vector and m is the index when r ey (n, k) takes the maximum value.Notably, Equation (15) represents the short-time energy similarity (STES) between e(n) and y(n).
Using the short-time stationary assumption of the sound signal, calculating the mathematical expectation of Equation ( 15) and abbreviating r 2 ey (n, m), we obtain where N is the width of h(n) which can be set to 1 to reduce the complexity of the algorithm.Equation ( 16) is then used to define the short-time misalignment weighting (STMW): where β is a weighting factor to adjust the dynamic range of STMW, and the value is related to G(n).When the correlation caused by G(n) is small, the dynamic range of the STMW is large, and the value of β is approximately 1.If the correlation caused by G(n) is large, the value of β can be increased accordingly.σ 2 e and σ 2 y in Equation ( 17) can be obtained recursively as follows.
Using STMW to weight e(n), the iterative formula for the coefficients of the proposed algorithm can then be written as To ensure convergence of the AF, the product of µ NPVSS (n) and M(n) can be constrained to a range.
p min ≤ µ NPVSS (n)M(n) ≤ p max (21) where p max and p min are the maximum and minimum values that the product can take, respectively, with the maximum value generally being 1 and the minimum value being a small positive number.

Power Estimation Method of Source Signal
As mentioned in the introduction, most VSS-NLMS algorithms need a priori information such as σ 2 v when calculating the step size, but in practice, only d(n), e(n) and y(n) are directly available, so σ 2 v can only be obtained by estimation.An estimation method is given in the literature [29], but it has a high computational complexity and is therefore only suitable for cases where the number of AF taps is relatively small.To reduce the computational complexity of Equation (20), this section proposes an estimation method for σ 2 v (σ 2 v,w in Figure 2) by reusing STES.
Similar to e(n), e w (n) can be rewritten as Squaring both sides of the above equation and finding the mathematical expectation yields Since v w (n) and y w (n) are effectively decorrelated after prewhitening, the third term in the above equation can be ignored, i.e., As mentioned in the previous section, R(n) mainly reflects the short-time energy similarity between e(n) and y(n), so R(n)σ 2 e (n) represents the energy of the similar part of e(n), and therefore, R(n)σ 2 e,w (n) represents the energy of the similar part after prewhitening.From Equation (13), when the disorder is large, ε w (n) represents the main contribution to the similar part of the energy, and σ 2 ε,w (n) can be replaced with R(n)σ 2 e,w (n) at this time.That is: As the filter converges, the degree of similarity is mainly contributed by v w (n), at which point it is necessary to compensate for σ 2 v,w (n) in Equation (26).Therefore, σ 2 v,w (n) can be obtained using the recursive method: where σ 2 e,w and σ 2 y,w are obtained in the same way as σ 2 e and σ 2 y , respectively, and δ is the compensation factor and can be taken as a value less than 0.1.

Parameter Setting
In this section, the performance of PEM-WNPVSS is simulated on a computer.The MIS and ASG of the algorithm are tested with nonstationary input signals to evaluate its performance.The results are compared with the performances of NLMS, PEM-NLMS, PEM-IMLMS [23] and CNLMS algorithms [51], where CNLMS is an algorithm that uses a combination of dual AFs.The aspects analyzed include convergence performance, steadystate performance, interference resistance (transient performance), sound quality, and computational complexity.
In the simulation, the speech signal used is D8_752 from the Tsinghua THCHS-30 library, the music signal used is "Summer" by Joe Hisaishi, and the impulse noise used is a section of gas stove ignition sound, as shown in Figure 3.The gain of G(n) is 10 dB, and a delay of 1 ms is simulated.Since the performance gap between algorithms can be shown more clearly when the AF is slightly longer, L = 512 is chosen in the simulation.In addition, µ = 0.05 for NLMS and PEM-NLMS, µ 0 = 0.05 for PEM-IMLMS, µ 0 = 0.001 for the small step size of CNLMS, µ 1 = 0.1 for the large step size of CNLMS, and β = 4, δ = 0.04, p max = 1, p min = 10 −4 , K = L for PEM-WNPVSS.The window width is 1, the forgetting factor α is 0.999, and the PEM order is 20.The feedback path U(n) is switched at the 6 × 10 4 th iteration, i.e., the system to be identified is replaced, but the coefficients of the AF are not cleared.The acoustic feedback paths before and after switching are shown in Figure 4. , K L  for PEM-WNPVSS.The window width is 1, the forgetting factor α is 0.999, and the PEM order is 20.The feedback path ( ) U n is switched at the 6 × 10 4 th iteration, i.e., the system to be identified is replaced, but the coefficients of the AF are not cleared.The acoustic feedback paths before and after switching are shown in Figure 4.In the simulation, we recorded and plotted the MIS and ASG of the five algorithms.Additionally, we analyzed the PESQ scores of each algorithm before becoming unstable, with step increments of 0.5 dB.Where MIS, ASG and PESQ can be explained as follows.
MIS: MIS represents the ability of an algorithm to identify unknown systems; if the coefficient of ( ) ASG: The ASG of an algorithm indicates the additional gain that the algorithm can provide to the hearing aid, which can be introduced by the MSG.The MSG is defined by the maximum error in the frequency domain between the estimated feedback path ( ) W n and the true feedback path ( ) U n .The physical meaning of MSG is the maximum gain that hearing aids can achieve at the threshold where howling is about to occur.They can be calculated as follows [2].In the simulation, we recorded and plotted the MIS and ASG of the five algorithms.Additionally, we analyzed the PESQ scores of each algorithm before becoming unstable, with step increments of 0.5 dB.Where MIS, ASG and PESQ can be explained as follows.
MIS: MIS represents the ability of an algorithm to identify unknown systems; if the coefficient of ASG: The ASG of an algorithm indicates the additional gain that the algorithm can provide to the hearing aid, which can be introduced by the MSG.The MSG is defined by the maximum error in the frequency domain between the estimated feedback path W(n) and the true feedback path U(n).The physical meaning of MSG is the maximum gain that hearing aids can achieve at the threshold where howling is about to occur.They can be calculated as follows [2].
PESQ: PESQ is a standardized objective method for assessing the quality of speech signals.

It was developed by the ITU-T (International Telecommunication Union-Telecommunication
Standardization Sector) and is defined in ITU-T Recommendation P.862.The method compares a reference (original) signal to a degraded (processed) signal, and calculates a score between 0 and 5.0, with higher scores indicating better speech quality.Studies have shown that PESQ correlates well with other objective metrics, such as the Mean Opinion Score (MOS) in echo cancellation [54], which is based on subjective listening tests.

Results Analysis
Steady-state performance: As shown in Figures 5 and 6, the steady-state MIS and ASG of the NLMS and CNLMS algorithms demonstrate worse performance and greater variation compared to other algorithms.The poor performance is mainly due to the correlation between y(n) and d(n), causing bias in estimating U(n).The greater variation is because the energy of the unwhitened d(n) fluctuates more, and therefore, W(n) fluctuates as well.The other three algorithms, including the algorithm proposed in this paper, benefit from the PEM, which makes the input signal closer to white noise, and therefore can maintain MIS at a low level and ASG at a high level in the steady state.Among them, the steady-state fluctuations of the algorithms in this paper are smaller than those of PEM-NLMS and PEM-IMLMS because the STMW calculated by Equation ( 17) is close to zero at steady state, so e w (n) is reduced to a very low level after weighting, and therefore, this algorithm is more robust.
greater variation compared to other algorithms.The poor performance is mainly d the correlation between ( ) y n and ( ) d n , causing bias in estimating ( ) U n .The gr variation is because the energy of the unwhitened ( ) d n fluctuates more, and there ( ) W n fluctuates as well.The other three algorithms, including the algorithm propos this paper, benefit from the PEM, which makes the input signal closer to white noise therefore can maintain MIS at a low level and ASG at a high level in the steady Among them, the steady-state fluctuations of the algorithms in this paper are smaller those of PEM-NLMS and PEM-IMLMS because the STMW calculated by Equation ( close to zero at steady state, so w ( ) e n is reduced to a very low level after weighting therefore, this algorithm is more robust.greater variation compared to other algorithms.The poor performance is mainly du the correlation between ( ) y n and ( ) d n , causing bias in estimating ( ) U n .The gr variation is because the energy of the unwhitened ( ) d n fluctuates more, and there ( ) W n fluctuates as well.The other three algorithms, including the algorithm propos this paper, benefit from the PEM, which makes the input signal closer to white noise therefore can maintain MIS at a low level and ASG at a high level in the steady s Among them, the steady-state fluctuations of the algorithms in this paper are smaller those of PEM-NLMS and PEM-IMLMS because the STMW calculated by Equation (1 close to zero at steady state, so w ( ) e n is reduced to a very low level after weighting therefore, this algorithm is more robust.Interference resistance: The simulation results presented in Figure 7 demonstrate the transient response of these algorithms to impulse noise.Notably, NLMS and CNLMS exhibit more susceptible to such noise, as evidenced by their large jitter range in ASG and MIS.Although prewhitening filters can provide some whitening and attenuation effects on impulse noise, PEM-NLMS and PEM-IMLMS are still vulnerable to severe energy spikes, which manifest as fluctuations in ASG and MIS with some lag.
transient response of these algorithms to impulse noise.Notably, NLMS and CNLMS exhibit more susceptible to such noise, as evidenced by their large jitter range in ASG and MIS.Although prewhitening filters can provide some whitening and attenuation effects on impulse noise, PEM-NLMS and PEM-IMLMS are still vulnerable to severe energy spikes, which manifest as fluctuations in ASG and MIS with some lag.In particular, although the proposed algorithm in this paper is also affected by impulse noise, it is able to adjust to steady-state in a timely manner.Additionally, due to the presence of a weighting mechanism, w ( ) e n is reduced when the value of MIS is low, resulting in a relatively smooth overall trend for both the ASG and MIS of this algorithm, demonstrating strong resistance to interference.
Sound quality: As shown in Figure 8, at lower gain levels before reaching the MSG, the two algorithms without using PEM exhibit slightly better PESQ than the other three algorithms.However, as the gain increases, the two algorithms become unstable first, resulting in a sharp decrease in their PESQ to around 1. Because the proposed algorithm in this paper has the highest ASG among these five algorithms, the PESQ of this algorithm is the last to be reduced.Computational complexity: Computational complexity usually limits the scenarios in which algorithms can be applied.In this paper, the computational complexity of the five algorithms in simulation is measured by the number of operations of addition, multiplication, and division.The Levinson-Durbin algorithm is listed separately as "L-D", and the results are shown in Table 1.In particular, although the proposed algorithm in this paper is also affected by impulse noise, it is able to adjust to steady-state in a timely manner.Additionally, due to the presence of a weighting mechanism, e w (n) is reduced when the value of MIS is low, resulting in a relatively smooth overall trend for both the ASG and MIS of this algorithm, demonstrating strong resistance to interference.
Sound quality: As shown in Figure 8, at lower gain levels before reaching the MSG, the two algorithms without using PEM exhibit slightly better PESQ than the other three algorithms.However, as the gain increases, the two algorithms become unstable first, resulting in a sharp decrease in their PESQ to around 1. Because the proposed algorithm in this paper has the highest ASG among these five algorithms, the PESQ of this algorithm is the last to be reduced.
MIS.Although prewhitening filters can provide some whitening and attenuation effects on impulse noise, PEM-NLMS and PEM-IMLMS are still vulnerable to severe energy spikes, which manifest as fluctuations in ASG and MIS with some lag.In particular, although the proposed algorithm in this paper is also affected by impulse noise, it is able to adjust to steady-state in a timely manner.Additionally, due to the presence of a weighting mechanism, w ( ) e n is reduced when the value of MIS is low, resulting in a relatively smooth overall trend for both the ASG and MIS of this algorithm, demonstrating strong resistance to interference.
Sound quality: As shown in Figure 8, at lower gain levels before reaching the MSG, the two algorithms without using PEM exhibit slightly better PESQ than the other three algorithms.However, as the gain increases, the two algorithms become unstable first, resulting in a sharp decrease in their PESQ to around 1. Because the proposed algorithm in this paper has the highest ASG among these five algorithms, the PESQ of this algorithm is the last to be reduced.Computational complexity: Computational complexity usually limits the scenarios in which algorithms can be applied.In this paper, the computational complexity of the five algorithms in simulation is measured by the number of operations of addition, multiplication, and division.The Levinson-Durbin algorithm is listed separately as "L-D", and the results are shown in Table 1.Computational complexity: Computational complexity usually limits the scenarios in which algorithms can be applied.In this paper, the computational complexity of the five algorithms in simulation is measured by the number of operations of addition, multiplication, and division.The Levinson-Durbin algorithm is listed separately as "L-D", and the results are shown in Table 1.Although the proposed algorithm has slightly increased complexity compared to PEM-NLMS and PEM-IMLMS, it exhibits improved convergence speed and steady-state robustness.The complexity and the convergence speed of this algorithm are close to those of CNLMS, but this algorithm has higher steady-state robustness, significantly reduced steady-state MIS, and improved ASG.

Test Environment
We evaluate the proposed algorithm in this section on a hearing aid equipped with Bestechnic's BES2700 chip, which features a dedicated Cortex-M55 signal processing core and supports vector expansion instructions through Arm Helium technology.This chip provides a speaker reference channel for acoustic feedback cancellation, and the Cortex-M55 can execute the algorithm in real-time.Our test is conducted using a sampling rate of 16 kHz for both ADC and DAC, a sampling depth of 24 bits, and half-precision floatingpoint numbers for the algorithm.In total, three algorithms, PEM-NLMS, PEM-IMLMS and PEM-WNPVSS, are implemented on the hearing aid.The combination factor of the CNLMS algorithm depends on a priori information of U(n), and the estimation method is not provided in the literature, so it can only be used for simulation.
The test was performed by placing the hearing aid on a dummy model in a soundproof room shown in Figure 9.An APx555 analyzer is used to record the sound in the dummy ear canal.During the test, the switching of algorithms and the adjustment of parameters are controlled via Bluetooth using a smartphone.The app interface is shown in Figure 10.
Although the proposed algorithm has slightly increased complexity com PEM-NLMS and PEM-IMLMS, it exhibits improved convergence speed and ste robustness.The complexity and the convergence speed of this algorithm are clos of CNLMS, but this algorithm has higher steady-state robustness, significantly steady-state MIS, and improved ASG.

Test Environment
We evaluate the proposed algorithm in this section on a hearing aid equip Bestechnic's BES2700 chip, which features a dedicated Cortex-M55 signal proces and supports vector expansion instructions through Arm Helium technology.provides a speaker reference channel for acoustic feedback cancellation, and th M55 can execute the algorithm in real-time.Our test is conducted using a samp of 16 kHz for both ADC and DAC, a sampling depth of 24 bits, and half-precision point numbers for the algorithm.In total, three algorithms, PEM-NLMS, PEM-IM PEM-WNPVSS, are implemented on the hearing aid.The combination fact CNLMS algorithm depends on a priori information of ( ) U n , and the estimation is not provided in the literature, so it can only be used for simulation.
The parameters set for the algorithms include: μ 0.01  for PEM-NLMS; for PEM-IMLMS; A n is updated every 256 samples.The test was performed by placing the hearing aid on a dummy model in proof room shown in Figure 9.An APx555 analyzer is used to record the sou dummy ear canal.During the test, the switching of algorithms and the adjustm rameters are controlled via Bluetooth using a smartphone.The app interface is Figure 10.During the test, the energy and sound pressure level first, the hearing aid parameters are adjusted using a smar in the ear canal of the dummy is recorded using an APx55 data is first squared and then moving averaged to obtain curve is converted to SPL according to the sensitivity of th In addition, the corresponding software of APx555 allows f

Test Methods and Results
The evaluation metrics considered in this study incl steady-state performance, interference resistance, power complexity), sound quality, and system latency.Specificall metrics include both MSG and acoustic feedback residua evaluate the audio performance of the system in steady sta Convergence performance test: During the test, the creased from 0 dB to 30 dB, during which the hearing aid p the howling disappearing.The duration of the howling is gence performance.During the test, the energy and sound pressure level (SPL) are obtained as follows: first, the hearing aid parameters are adjusted using a smartphone app, and then the audio in the ear canal of the dummy is recorded using an APx555 analyzer.The recorded audio data is first squared and then moving averaged to obtain an energy curve.The energy curve is converted to SPL according to the sensitivity of the microphone in the ear canal.In addition, the corresponding software of APx555 allows for real-time audio observation.

Test Methods and Results
The evaluation metrics considered in this study include convergence performance, steady-state performance, interference resistance, power (computational complexity), sound quality, and system latency.Specifically, the steady-state performance metrics include both MSG and acoustic feedback residual (i.e., MIS), which are used to evaluate the audio performance of the system in steady state.
Convergence performance test: During the test, the gain of the hearing aid is increased from 0 dB to 30 dB, during which the hearing aid produces howling, followed by the howling disappearing.The duration of the howling is counted to analyze the convergence performance.
Steady-state performance test: In this test, speech and music are played through the speaker at approximately 60 dB SPL.During the convergence phase of the AF, the hearing aid produces whistling.After the whistling disappears for some time, we fix the coefficients.The MSG is then obtained by continuously adjusting the gain.The acoustic feedback residual is tested by playing white noise at approximately 30 dB SPL and adjusting the hearing aid gain to 30 dB.
Interference resistance test: To conduct the test, white noise at 30 dB SPL is played through the speaker, while the AF is continuously iterated.Since white noise is completely random and contains various frequency components, continuous iterations can reflect the algorithm's transient performance.During the test, the standard deviation of the acoustic feedback residual is recorded to measure the anti-interference performance of the device.The smaller the standard deviation is, the better the resistance to interference.
Power consumption test: We measure the power consumption of the entire machine using a Keysight N6705B.To perform this test, we use the DC output of the instrument, providing a voltage of 3.7 V, instead of a battery.The test is conducted for 30 s, and we take the average power consumption as the final result.
Sound quality test: To test the sound quality, the simultaneous playback and recording feature of the APx555 is used.This means that the microphone records while the speaker plays a sound.The recorded sound is scored based on the played sound.The sound quality of the three algorithms is tested using the speech and music in Figure 3 at low, medium, and high gain, respectively.The AF coefficients are fixed during the test.
The specific experimental results are shown in Tables 2 and 3.

Results Discussion
Convergence performance: From the results presented in Table 2, when the input signal is speech, the convergence speed of PEM-WNPVSS is improved by 32.23% compared to PEM-IMLMS and 63.22% compared to PEM-NLMS.The convergence speed of PEM-WNPVSS is improved by 42.89% and 61.84%, respectively, compared to PEM-IMLMS and PEM-NLMS when the input signal is music.
PEM-IMLMS has a variable step size, which allows it to maintain a large step size in the convergence phase and thus achieves a shorter convergence time than PEM-NLMS.However, according to Equation (20), the algorithm proposed in this paper not only bears a variable step size but also has an error weighting mechanism, thus achieving the fastest convergence speed among the three algorithms.In the convergence stage, the MIS of the AF is large, so the STMW estimated by Equation ( 17) is also large, so the error signal has a higher weight, so the AF can be adjusted to the steady state faster than PEM-IMLMS.
Steady-state performance: From Table 2, the SPL of the feedback residual for PEM-WNPVSS is approximately 3 dB SPL lower than that of the PEM-IMLMS algorithm and approximately 7 dB SPL lower than that of the PEM-NLMS algorithm.The MSG is improved by approximately 2.5 dB and 8.5 dB, respectively.
The step size of PEM-IMLMS is variable and is small at steady state, so W(n) is less prone to oscillation, and therefore, the level of acoustic feedback is lower and the MSG is higher compared to PEM-NLMS.In particular, since the MIS of the AF is small at steady state, the STMW calculated by Equation (17) proposed in this paper will also be small, so e w (n) has a lower weight and is reduced.Thus, the weighting mechanism helps the AF to stabilize better at steady state, so this algorithm has a lower residual level and a higher MSG than PEM-IMLMS.
Interference resistance: At steady state, the SPL jitter range is approximately 3.97 dB SPL for PEM-NLMS, 1.89 dB SPL for PEM-IMLMS, and 1.56 dB SPL for PEM-WNPVSS.The interference resistance of PEM-WNPVSS is improved by 60.65% over PEM-NLMS and 16.93% over PEM-IMLMS.
PEM-IMLMS and PEM-WNPVSS have a smaller step size at steady state, so the interference resistance is higher than that of PEM-NLMS.In particular, PEM-WNPVSS benefits not only from the variable step size but also from the weighting mechanism, so that the jitter in e w (n) introduced by d(n) is effectively reduced after being weighted by the STMW, and thus, the stability is improved compared with PEM-IMLMS.
Power consumption: From Table 2, the net power of PEM-NLMS, PEM-IMLMS and PEM-WNPVSS are 2.32 mW, 1.91 mW and 2.76 mW, respectively.The net power confirms the complexity in Table 1.Although the power and the complexity are not strictly proportional, this is mainly due to the presence of the PEM and other program logic, which generates additional power consumption.Compared to the base power, the increase in power due to the increased complexity of the algorithms has little effect on the hearing aid.
Sound quality: As shown in Table 3, the PESQ score without the algorithm is approximately 3.6, which is lower than the simulation results by approximately 1.This difference is primarily due to variations in the audio signal as it passes through different components, such as speakers, microphones, and hearing aids, as well as environmental factors, including acoustics path and background noise.Although the sound remains clear, the deviation from the original audio leads to a lower PESQ score.In addition, the application of different algorithms can lead to varying degrees of degradation in PESQ scores.The measured results presented in Table 3 demonstrate good agreement with the simulation results in terms of overall trend.

Conclusions
Based on the NPVSS algorithm, this paper innovatively proposes a PEM-WNPVSS algorithm with error weighting, which exhibits high robustness and can balance convergence speed and steady-state performance.
First, inspired by M-estimate, this paper uses the STMW to weight the error signal of the AF, which effectively enhances the steady-state resistance of the algorithm to interference while improving the convergence speed.Then, to control the complexity of the algorithm, a new method for power estimation of source signal is proposed by reusing the STES, thus achieving a low-complexity step size calculation method.In addition, to make the algorithm more suitable for hearing aid scenarios, the PEM is used to reduce the bias of the AF for acoustic feedback path estimation.
Computer simulation results show that the proposed algorithm achieves higher MSG, faster convergence and lower MIS than PEM-NLMS, PEM-IMLMS and CNLMS, which are also based on NLMS, when the input signal is nonstationary speech or a music signal.In addition, the proposed algorithm demonstrates higher interference resistance when processing impulsive noise.The proposed algorithm maintains better performance without significant degradation in sound quality and even shows better sound quality at high gain.The results of tests in real hearing aids agree with the simulation results.The new algorithm achieves better performance and greater robustness without a significant increase in complexity and can provide timely and effective cancellation of acoustic feedback.
Future work will focus on investigating the relationship between the STMW and the MIS of the AF to further explore the performance of the weighting mechanism since the STMW may not be linearly related to the real MIS of the AF.

Figure 1 .
Figure 1.Schematic of AF-based acoustic feedback cancellation.

Figure 1 .
Figure 1.Schematic of AF-based acoustic feedback cancellation.

Figure 8 .
Figure 8. PESQ score of five algorithms when the inputs are: (a) speech; (b) music.

Figure 7 .
Figure 7. Performance of five algorithms with an impulse noise input: (a) MIS; (b) ASG.

Figure 8 .
Figure 8. PESQ score of five algorithms when the inputs are: (a) speech; (b) music.

Figure 8 .
Figure 8. PESQ score of five algorithms when the inputs are: (a) speech; (b) music.
 and L=128 .All three algorithms use a mirror filter for the calculation The order of PEM is 20, and ( )

Figure 9 .
Figure 9. Performance test scenario for acoustic feedback cancellation.

Figure 10 .
Figure 10.App interface for algorithm parameter adjustment.

Table 1 .
Computational complexity of the five algorithms in simulation.

Table 2 .
Acoustic feedback cancellation performance of the three algorithms.

Table 3 .
PESQ score of the three algorithms.