A Modified Fast block LMS Acoustic Feedback Cancellation for Hearing Aids H. Charafeddine, V. Groza University of Ottawa/School of Electrical Engineering and Computer Science Ottawa, Canada {HChar099,VGroza}@uOttawa.ca Abstract—Conventional adaptive feedback cancellers (FBC) exhibit poor performance for acoustic leakage reduction in hearing aids. In this paper, a modified frequency domain fast block least mean square (LMS) adaptive feedback canceller is proposed that provides good cancellation efficiency, convergence behavior, and more efficient hardware complexity when compared to the time domain LMS approach.
I. INTRODUCTION The hearing aid acoustic leakage from the receiver to the microphone causes a feedback loop, which causes oscillation and results in a squealing sound. This is a very serious problem at high gains, which render the hearing aid useless. Acoustic signal processing provides cost effective solutions for this problem such as simple stochastic gradient-based algorithms. Most of the adaptive cancellation algorithms of the hearing aids use time domain LMS filters with various added techniques to optimize the performance, such as using delay taps to match the length of the feedback impulse response in order to cover its most significant part. Others use band pass filters in order to target the oscillating frequency band only. Frequency domain block LMS (BLMS) algorithms can be used in order to reduce the hardware complexity of the time domain LMS. However, frequency domain block adaptive filters require buffering of an entire time frame before it is loaded to the adaptive filter in addition to the two-DFT (FFTs that resides in the filter path) delay that makes the hearing aid adaptive canceller impossible to work because it cannot tolerate a delay of more than 10 ms (including the processing delay of the hearing aid itself). Otherwise, the delay caused by the BLMS is very noticeable to a human ear. In this paper, we suggest a new frequency domain BLMS adaptive filter that enables us to not only reduce the hardware complexity significantly but also to have subband decomposition capabilities using the short time Fourier transform of the BLMS. The BLMS algorithm enables us to use different LMS step size for different frequencies, which provides better convergence than the conventional time domain LMS. II. ADAPTIVE FEEDBACK CANCELLATION The adaptive feedback canceller is required to perform a system identification problem to cancel the acoustic leakage path by an internal feedback path. Figure 1 shows a hearing aid diagram where the output of the internal feedback path is subtracted from the input signal at the microphone to remove the feedback acoustic leakage.
Figure 1 A hearing aid with adaptive feedback cancellation and a simulated feedback path.
The impulse response of the leakage path is time variant. Thus, it is required to continuously update the FBC impulse response. The hearing aid of Figure 1 without the FBC has the following acoustic transfer function [2],
TF =
F (e jw ) (1 − F (e jw )G (e jw ))
(1)
Where F (e jw ) comprises the electroacoustic transfer function of the receiver, the acoustic feedback path, and the acoustic electric transfer function of the microphone.
G (e jw ) is the transfer function of the amplifier circuit. Oscillation occurs at those frequencies, where the openloop transfer function meets the Nyquist criteria, which states the following [2], (2) F (e jw )G (e jw ) ≥ 1 Hence, the FBC is required to have higher gain at the oscillating frequency than that of the oscillating frequency gain. III. THE LMS ADAPTIVE ALGORITHM The LMS algorithm minimizes the error iteratively between the output of the hearing aid x(n) and the reference signal d(n) of Fig. 1. The Mean Square Error MSE cost function is, 2 J = ⎡ d ( n) − w H ( n ) x ( n ) ⎤ ⎢⎣ ⎥⎦
(3)
Hence the cost function is, J = σ d2 − P H w(n) − w H (n) P + w H (n) Rw(n)
(4)
Where σ d2 is the variance of the desired signal, P is the cross correlation between the input signal and the desired signal, R is the autocorrelation of the input signal, and w(n) is the LMS weights. To minimize the cost function we find the gradient of J with respect to w H , and set it to 0, ∇ j = − P + R × W (n)
(5)
Figure 2 shows the block diagram of the LMS algorithm that has been discussed in this section. IV. THE BLOCK LMS (BLMS) ALGORITHM The block LMS algorithm is a frequency domain implementation of the LMS algorithm. The key of the BLMS is the use of the fast Fourier transform (FFT) and inverse fast Fourier transform (IFFT) to achieve linear convolution instead of using an FIR filter, which can results in more hardware cost. The BLMS is described with details in [1]. Therefore, we will only present the block diagram in Figure 2, and leave the mathematical derivations to the reader.
− P + R × W ( n) = 0 , W0 = R −1 P Using equation (4), the resulting minimum MSE is: J min = σ d2 − P H R −1 P = σ d2 − P H w0
(6)
Instead of using the matrix inversion we use a gradient search to solve for J min , which is quadratic and will converge to a unique minimum. Using the steepest descent (SD) algorithm we define: (7) w(k ) = w(k − 1) + μ (−∇ j )
V. A NEW FAST BLMS FEEDBACK CANCELLER The size of the hearing aids device restricts the hardware complexity and emphasizes the necessity of very efficient implementation methods for DSP algorithms. The time domain LMS adaptive filter requires significant hardware Resources compared to the Fast BLMS algorithm. In this section, we will introduce a new hybrid Fast BLMS system that reduces the complexity ratio and does not violate the delay restrictions of the hearing aids. Old New Canceller x x Input Concatenate Two Blocks x(n)
Hence, w(k − 1) + μ[ P − Rw(k − 1)], k = 1,2,...
(8)
FFT
X(k)
×
Y(k)
Canceller Save Last Output y(n) Block
IFFT
W(k)
The LMS algorithm instantaneous values,
estimates P and R based
∇ j (k ) = − X (k ) D (k ) + X (k ) X H (k ) w(k )
on
× [ D H (k ) + X H (k ) w(k − 1)]
y
W(k+1)
(9)
Σ
2µI
If we plug equation (9) in equation (7), we obtain w(k ) = w(k − 1) + μ (k ) X (k )
...
z-1
(10)
× Gradient Constraint
FFT
w(k ) = w(k − 1) + μ (k ) X (k ) E PH (k )
Conjugate XH(k)
Append Zero Block
Grad
Delete last block
Grad
0
...
IFFT
× E(k)
FFT
Insert Zero Block 0
e
Error e(n) Σ
-
+ Desired d(n) response
Figure 3. The BLMS algorithm.
Figure 2. The LMS algorithm.
The new algorithm estimates the gradient constraint by performing a linear cross-correlation using the OverlapSave DFT method. While the linear convolution of the
input signal with the filter coefficients is done in time domain, the new adaptive feedback canceller filtering (linear convolution) works on a sample-by-sample basis, while the tap weights vector gets updated every one block of input samples. Figure 3 shows the new BLMS adaptive feedback canceller. The inputs to the adaptive feedback canceller filter (output of the hearing aids processor) are directed to a new path where they get buffered into a block of M samples, where M is the length of the adaptive filter. The same operation is performed on the error side where the error inputs to the feedback canceller are also buffered into a block of M samples. The two blocks (error and input signal) are pre-zero padded by L samples (L=M) to perform the overlap-save cross correlation by means of the DFT. Note that the maximum efficiency of the overlap-save method is achieved when L=M. The first M samples of the IFFT output correspond to the linear cross correlation of the error vector e(n) with the input vector u(n) and the last M samples are dropped. The computational complexity of the new fast block LMS algorithm described in Figure 3 is now compared with that of the conventional LMS algorithm operating in time domain. The comparison is based on the count of the total multiplications involved in each of these two implementations for a block size M. Consider first the conventional time domain LMS algorithm, with M tap weights operating on real data. M multiplications are required to compute the output and another M multiplication is performed to update the tap weights for a total of 2 M multiplications per sample and 2M 2 multiplications per block of M samples. Now consider the new fast BLMS algorithm: Each 2M point FFT requires 2 M log 2 2M multiplications (Alan V. Oppenheim & Ronald W. Schafer, Discrete-time Signal Processing), the algorithm has three FFT, which therefore account for 6M log 2 2 M . In addition to 8M multiplications for the frequency domain multiplication of the two FFT outputs and in addition to the M multiplications that are required to compute the output per sample and M 2 multiplications per block, the complexity ratio of the new fast BLMS to the conventional time domain LMS is given by,
6M log 2 2M + M 2 + 8M 2M 2 6 log 2 M + M + 14 η= 2M
η=
stable is now scaled down by a factor of L. if the input signal has a large Eigenvalue spread, then the BLMS algorithm can converge more slowly than the LMS because of the upper tighter bound on μ . This could be a problem for applications that require fast convergence [1]. VI. COMPUTER SIMULATIONS The performance of the new Fast BLMS adaptive feedback cancelation algorithm proposed in this paper is evaluated using Matlab computer simulations. A hearing aid acoustic feedback leakage impulse responses recorded at 32 KHz is used to simulate the feedback leakage path. The input signal is white additive Gaussian noise (AWGN) for the preliminary testing and a speech waveform recorded at 32 KHz sampling rate using the MATLAB wavrecord function. y(n)
+
d(n) +
Leakage path
e(n)
Microphone input ỹ(n)
The complexity ratio is reduced to η = 0.62 , for a filter length of 256, thus decreasing the hardware complexity of almost half of the complexity of the conventional time domain LMS. It is not only the complexity ratio reduction that emphasizes the use of the fast BLMS but it is also a more accurate gradient estimate because M terms has been averaged (ensemble averaging) for each update [1]. The maximum value of the step size such that the algorithm is
Receiver
FIR LMS W(k) 0 u
W(k)
Insert zero block
z-1 W(k+1) Σ
2µI 0 e Insert zero block
× Delete last block
(11)
For M=64 the complexity ratio is equal to, 6 log 2 M + M + 14 η= = 0.89 2M
x(n)
Hearing Aid Processor
FFT
FFT Grad ...
IFFT E(k)
×
Conjugate U(k)*
Figure 4. The new fast BLMS algorithm.
Conventional hearing aids comprise an AGC that has a maximum gain of about 85 dB and a specific peak to peak output voltage range. The simulations shown in Figure 4 represent white noise input signals to the hearing aid at various AGC gains, with the feedback adaptive canceller enabled and disabled. It is clear from Figure 4 that the hearing aid without feedback canceller would not start to oscillate until the AGC gain is equal or above the oscillation frequency gain, which is about 21 dB for this particular case. The AGC gain is 23 dB for the blue curve of Figure 4, which exceeds the threshold and it starts to oscillate. However, the hearing aid is required to amplify
The spectral regions of Figure 6 outside of the oscillating frequencies are not adapted by the new Fast BLMS algorithm but this behavior can be better regulated by the adjustment of the hearing aid AGC gain. Since the gain in the computer simulations is tuned manually and not using an automatic gain control algorithm (AGC), the results might not reflect the best performance of the algorithm. The gain setting can play a major factor in the obtained results as shown in Figure 7 by the impulse responses of the acoustic leakage and the feedback canceller, where both appear to match very closely compared to Figure 5.
The hearing aid output signals for various AGC gains, with and without feedback canceller 2 AGC gain is 23dB, No BLMS AGC gain is 23dB, with BLMS 1.5 AGC gain is 20dB, No BLMS AGC gain is 0dB, No BLMS 1
(volt)
0.5
-3
6
Impulse responses
x 10
Leakage path BLMS filter 4
2
0
-2
-4
-6
0
20
40
60
80 100 120 140 Discrete time samples
160
180
200
Figure 6 The impulse responses of the acoustic leakage and the new Fast BLMS.
It is also important to verify the frequency domain response convergence shown in Figure 8, which shows the magnitude spectrums of the acoustic leakage and the feedback canceller, which shows better results compared to Figure 6. Magnitude spectrums -20 Leakage path BLMS filter
-30 -40 -50 -60 (dB)
the weak input signal and make it audible, thus we cannot limit the AGC gain to stay below 21 dB, but we can use a feedback canceller to optimize the amplification gain without causing any oscillation behavior. The orange curve of Figure 4 shows the output with 23 dB gain with the new fast BLMS enabled, clearly the FBC tracked the acoustic leakage and adapted to its impulse response as described in Figure 5, thus, the system stayed in steady state. Notice, that the adaptive feedback canceller concentrates its adaptation to the oscillation frequency region as shown in Figure 6. The oscillation frequencies are concentrated around 3.6 KHz, this region of the spectrum is matched (identified) perfectly by the adaptive filter. The spectral regions of Figure 6 outside of the oscillating frequencies are not adapted by the new Fast BLMS algorithm but this behavior can be better regulated by the adjustment of the hearing aid AGC gain. Since the gain in the computer simulations is tuned manually and not using an automatic gain control algorithm (AGC), the results might not reflect the best performance of the algorithm. The gain setting can play a major factor in the obtained results as shown in Figure 7 by the impulse responses of the acoustic leakage and the feedback canceller, where both appear to match very closely compared to Figure 5.
-70 -80 -90 -100 -110
0
0.5
1
1.5 2 frequency in (Hz)
2.5
3
3.5 4
x 10
Figure 7. The Magnitude spectrums of the acoustic leakage and the new Fast BLMS.
-3
6
Impulse responses
x 10
Leakage path BLMS filter 4
0 2
-0.5 0
-1 -1.5 -2
-2
0
5000 10000 Discrete time samples
15000
Figure 5. The hearing aids output for various AGC gain, with and without the feedback canceller.
-4
-6
0
20
40
60
80 100 120 140 Discrete time samples
160
180
200
Figure 8. The impulse response of the acoustic leakage and the BLMS, with the tuned AGC gain.
Magnitude spectrums -20
0.1
Leakage path BLMS filter
-30
The refrence audio signal 0.05
-40
0
-50
-0.05 -0.1
(dB)
-60
0
2
4
6
8
10
(a)
4
x 10
-70
Hearing aid wihtout FBC
-80
2
-90
0
-100 -110
-2 1 0
0.5
1
1.5 2 frequency in (Hz)
2.5
3
3
4
5 (b)
6
7
8
9 4
x 10
4
x 10
Figure 9. The magnitude spectrums of the acoustic leakage and the BLMS, with the tuned AGC gain.
We should also mention the importance of the step size in the convergence of the new Fast BLMS filter. It is important to mention that the new Fast BLMS algorithm is also normalized because the step size µ is normalized with the norm of the time domain input vector u(n) as shown in Figure 3. Before we further discuss how the step size adaptation can be enhanced we have to present the audio input simulation results. An audio input signal of the statement “How are you today?” was recorded at a 32 KHz sampling rate. The audio signal was used as an input to the hearing aid: The simulation was done for a hearing aid without a feedback canceller (FBC) and with a FBC. The results displayed in Figure 9 (b) demonstrate the oscillatory behavior when the FBC is not used in the hearing aid. The waveform displayed in Figure 9 (c) shows the output of the hearing aid when the FBC is enabled, demonstrating the importance of the FBC and its efficiency in hearing aids. VII. DISCUSSION OF THE BLMS FEEDBACK CANCELLER The simulation results that we discussed in the previous section proved the capabilities of the new Fast BLMS algorithm. However, it is important to mention that in addition to the reduction in the hardware complexity ratio and the better estimate of the gradient constraint achieved by ensemble averaging over an entire block, the new algorithm convergence ratio is equivalent to the time domain block LMS. A very important feature of the frequency domain BLMS is the capability to adapt each filter coefficient to a various step size value as described in the following equation [1],
μ m (k ) =
2
3.5
μ 2
(α + X m (k ) )
(12)
This feature improves the convergence of the BLMS algorithm remarkably. Therefore, we should seek a new method to implement the new Fast BLMS algorithm while taking into account the individual step size adaptation of each filter coefficient.
Hearing aid wiht FBC
0.1 0.05 0 -0.05 -0.1 0
2
4
6
8
(c)
4
x 10
Figure 10 Waveforms of the hearing aid output when the sentence "How are you today?" was used as an input: (a) the reference signal, (b) the hearing aid output without FBC, (c) the hearing aid output with FBC.
VIII. AN IMPROVED VERSION OF THE NEW FAST BLMS ALGORITHM The convergence rate improvement of the fast BLMS filter requires different step size adaptations per filter coefficient. This is only possible if the filter weights update is done in frequency domain. In this section, we will introduce a new improved version of the Fast BLMS algorithm. The benefit of the new filter lies in its convergence enhancement while the tradeoff is in hardware complexity. As shown in Figure 10, the new Fast BLMS algorithm has an additional three FFT cores to take care of the frequency domain filter weights update. Thus, the new amount of multiplications required for each M inputs (one block) is given by, (13) 12 M log 2 M + M 2 + 8M 2
Therefore, the complexity ratio of the new BLMS algorithm to the conventional time domain LMS algorithm is given by, 12M log 2 2M + M 2 + 8M 2M 2 12 log 2 M + M + 20 η= 2M
η=
(14)
For M=64 the complexity ratio is equal to 1.2, the previous value is almost equal to one, which makes the new BLMS more favorable because of its improved convergence ratio. Furthermore, designers can better improve the performance of the filter by turning on and off the FFT bins of the input frequency vector U(k) and
the input frequency error vector E(K)[2], depending on the oscillation frequencies regions. This is similar to the use of band pass filters in front of the input to the FBC and the error input to the FBC. Hence, the new algorithm enables frequency domain subband filtering. The hardware complexity of the algorithm described in Figure 10 reduces to 0.9 when M is equal to 128, indicating that the hardware efficiency is better than the conventional LMS system when the FBC is longer than 128
use of different step sizes at different frequencies which improves the overall performance of the system. In addition, the system will not cause any delay compared to case of the frequency domain LMS that is described in section 5, because it does not contain an FFT on the main path of the hearing aid, hence there is no need to buffer the input signal. REFERENCES
y(n)
Microphone input +
[1]
Leakage path
[2] d(n) +
e(n)
x(n)
Hearing Aid Processor
ỹ(n)
Receiver
[3] FIR LMS w(k) 0
w(k) Insert zero block
w 0
Delete last block
FFT
u Insert zero block
z-1
w
[4]
[5]
...
w(k+1)
[6]
IFFT Σ
W(k)
2µI
[7]
× FFT
Insert zero block
0 e
[8]
Delete last block
Grad
0
Delete last block
Grad
...
FFT
FFT
IFFT E(k)
[9] Conjugate
[10]
*
×
U(k)
[11]
Figure 11 The Fast BLMS FBC, with frequency domain weights update. [12]
CONCLUSION An overview of several adaptive feedback cancellers for hearing aids has been studied and simulated in this paper. The Fast BLMS algorithm described in section 8 is most likely to be adopted. The algorithm will enable the
[13]
John J. Shynk, “Frequency-Domain and Multirate Adaptive Filtering”, IEEE Signal Processing Magazine, vol. 9, pp. 14-37, 1992, January 1992 Hsiang-Feng Chi, Shawn X. Gao, Sigfrid D. Soli, Abeer Alwan, “Band-limited feedback cancellation with a modified filtered-X LMS algorithm for hearing aids”, Speech Communication Special issue on speech processing for hearing aids archive, Vol. 39, Issue 1-2, pp. 147-161, January 2003 Johan Helgren, “Analysis of Feedback Cancellation in Hearing Aids With Filtered-X LMS and the Direct Method of Closed Loop Identification”, IEEE TRANSACTIONS ON SPEECH AND AUDIO PROCESSING, VOL. 10, NO. 2, FEBRUARY 2002 Alan V. Oppenheim & Ronald W. Schafer, Discrete-time Signal Processing, Second edition, Prentice Hall Signal Processing series, 1999. Simon Haykin, Adaptive Filter Theory, Fourth Edition, Prentice Hall Information and System Sciences Series, Upper Saddle River, New Jersey 07458, 2002. Thipphayathetthana, S.; Chinrungrueng, C, “ Variable step-size of the least-mean-square algorithm for reducing acoustic feedback in hearing aids”, Circuits and Systems, 2000. IEEE APCCAS 2000. Page(s): 407 - 410 Plate, R.S.; Yongchao Wang; Zhi-Quan Luo; Gao, C, “Adaptive Feedback Cancellation in Hearing Aids Using the IPLS Algorithm”, Acoustic Speech and Signal Processing (ICASSP), 2010 IEEE International Conference. 2010 , Page(s): 177 – 180. Sakai, H., “Analysis of an adaptive algorithm for feedback cancellation in hearing aids for sinusoidal signals”, Circuit Theory and Design, 2007. ECCTD 2007. 18th European Conference, 2007 , Page(s): 416 – 419. Siqueira, M.G.; Alwan, A. “Steady-state analysis of continuous adaptation in acoustic feedback reduction systems for hearingaids”, 2000 , Page(s): 443 – 453. Wyrsch, S.; Kaelin, A. “Adaptive feedback cancelling in subbands for hearing aids”, 1999 , Page(s): 921 - 924 vol.2. Estermann, P.; Kaelin, A. “Feedback cancellation in hearing aids: results from using frequency-domain adaptive filters”, 1994 , Page(s): 257 - 260 vol.2. Kates, J.M. “Feedback cancellation in hearing aids: results from a computer simulation”, 1991 , Page(s): 553 – 562. Kates, J.M. “Feedback cancellation in hearing aids”, 1990 , Page(s): 1125 - 1128 vol.2.