• No results found

6.7 ADAPTATION FILTERING ALGORITHMS

ECHO CANCELLATION

6.7 ADAPTATION FILTERING ALGORITHMS

The echo path consists of a linear and a nonlinear part. The linear part is modeled as a fi nite impulse response (FIR) or a moving average (MA) fi lter. G.168 [ITU - T - G.168 (2004) ] has eight echo path models that work exactly as FIR fi lters. The nonlinear part requires higher order fi lter models. Volterra fi lters [(Mathews et al. (2000) , Borys (2001) ] model higher order nonlinear terms. In the literature, the applicability of Volterra fi lters were proved to be suitable for echo cancellation [Borys (2001) ], but the utility is limited because of the higher memory and processing requirements of the Voltera fi lters. Non- linear echo cancellation with higher order fi lters is beyond the scope of this book.

ADAPTATION FILTERING ALGORITHMS 133 Linear part adaptation is estimated using popular least mean square (LMS) [Haykin and Widrow (2003) , Haykin (1996) ] and recursive least squares (RLS) based algorithms. LMS was widely adapted in the early designs of the adaptive fi lters. LMS algorithms are simple and stable as well as consume less memory and processing. These fi lters are updated in either the frequency domain or the time domain. If the fi lter span is longer, frequency - domain techniques are advantageous. The main disadvantage of LMS algorithms are that they adapt slowly. However, these algorithms were able to achieve the G.168 require- ments. LMS algorithm adaptation further slows down with low signal levels. Normalized LMS (NLMS) normalizes signals that improve adaptation even for low - volume signals. For every sample of new input, these adaptive fi lters can be updated. To save computation, a block of samples is used to update the adaptive fi lter. This block operation is known by name block NLMS. Several other LMS derivatives work in both time and frequency domains. In wideband applications and acoustic echo cancellation, total signal frequency bandwidth is split into lower and upper bands or multiple bands. The purpose is to create an adaptive algorithm in multiple sub - bands. It saves processing time and

allows certain processing scaling to consider only required sub - bands for

updates. Similar concepts of LMS, blocks, and sub - bands are applicable to the other adaptive algorithms such as affi ne projections and RLS.

6.7.1 Adaptive Transversal Filter with LMS

In a digital echo canceller, both the reference and the echo signal are available as digital samples. Therefore, the overall infl uence of echo path impulse

response is represented in digital form by h k [ ] as represented in Fig. 6.6 (a).

In the absence of speech from near - end phone - A, the input signal S in is equal

to the echo signal r(i) that has to be cancelled. The reference signal R in ( i ) is

denoted as y ( i ) in the following equations: r i h y i kk k N ( ) = ( − ) = −

0 1 (6.4)

where r ( i ) is the echo signal at sample index “ i ” and “ N ” denotes the number of taps in the fi lter as marked in Fig. 6.6 (b).

The adaptive fi lter can cater to only the linear part. The echo path impulse response of a fi nite “ N ” nonzero coeffi cients linear system is represented as [Haykin (1996) ] ˆr i k a y i kk N ( ) = ( − ) = −

0 1 (6.5)

The goal is to adjust a k such that rˆ ( i ) = r ( i ). When a k = h k , for k = 0, 1 . . . N − 1 the returned and estimated echoes are identical, which results in cancellation

The coeffi cients of the traversal fi lter are updated to match the slowly time - varying echo path impulse response by minimizing the mean - squared residual error e 2 ( i ) = [ r ( i ) rˆ ( i )] 2 . The update of the coeffi cients at each iteration i is

controlled by step size β . The typical value of β is 2 − 8 . Here iteration is the

sample index for every new sample.

a ik( +1) = ( ) +a ikE e i y i k[ ( ) ( − )] (6.6)

where i = current sample index, and fi lter taps k = 0, 1, 2 … N − 1.

The expectation of error and input signal requires prior knowledge of the reference signal probability distribution. Common practice is to use an unbi- ased estimate of the gradient, which is based on time - averaged correlation error. Thus, replacing the expectation operator with short time average gives [URL (SPRA129) , URL (SPRA188) ]:

Figure 6.6. Adaptive fi ltering. (a) LMS - based fi ltering. (b) Basic echo path modeled as FIR fi lter.

ADAPTATION FILTERING ALGORITHMS 135 a i a i M e i m y i m k k k m M + ( ) = ( ) + ( − ) ( − − ) = −

1 2 0 1 β (6.7)

When M = 1, Eq. (6.7) is simplifi ed as

a ik( +1) = ( ) +a ike i y i k( ) ( − ) (6.8)

The current error e ( i ) is correlated with y ( i ), and up to y ( i − N − 1) to update

coeffi cients a k . It is called the standard LMS algorithm or the stochastic gradi-

ent algorithm, which works better with noisy conditions. The convergence time

of the algorithm is determined by step size β and the power of the far end

signal y ( i ). In general, making β a higher value speeds up the convergence,

whereas a smaller β reduces the asymptotic cancellation error. The conver-

gence time constant is inversely proportion to the power of y ( i ). The algorithm will converge very slowly for low signal levels. To overcome this situation, the loop gain is normalized by an estimate of the far - end signal power. This type of normalization is known as NLMS. The normalization is performed on step size β .

2β=2β( ) =i β1 P iy( ) (6.9)

In the equation, β 1 is the compromise value of the step size as 0 < step size

β 1 < 2/input power. Power P y ( i ) is an estimate of the average power of y ( i )

at sample index i . The algorithm converges quickly with the larger step size, but the steady state error level will be more. If step size is small, the steady state error will be less, but its convergence is slow. A typical value of

β 1 is 2 − 8. This method optimizes the convergence time constant. Power is

estimated as

P iy( ) =

[

L iy( )

]

L iy( ) = −( )L iy( − ) + y i( ) 2

1 1

and ρ ρ (6.10)

This type of power estimate is used because the calculation of the exact

average power is computationally expensive. The recommended value of ρ is

2 − 7 [URL (SPRA129) ].

Block NLMS Algorithm. In the block NLMS algorithm, instead of updating all the fi lter coeffi cients for each input sample, a set of fi lter coeffi cients is updated for each sample. After some blocks of input samples, all fi lter coeffi - cients are updated. In the block update approach, the coeffi cients may be updated less frequently within a thinning ratio of up to M called the block NLMS algorithm. The block NLMS algorithm performs better than the stan- dard LMS algorithm with noise and speech signals and is computationally faster [URL (SPRA129) , URL (SPRA188) ].

a ik M a ik e i M m y i M m k m M + + ( ) = ( ) + ( + − ) ( + − − ) = −

1 2 0 1 β (6.11)

Generally, a smaller block size is chosen for the implementation because it takes advantage of the coeffi cient multiply and accumulate capabilities of the processor. For the block size M = 16 and fi lter coeffi cients N = 256 for 32 ms,

during each sample period of 125 µ s, 16 of 256 coeffi cients are updated using

correlation of the 16 past error and signal values. After a block of 16 samples, all fi lter coeffi cients are updated. The NLMS algorithm uses a more accurate estimate of the gradient vector because of the time averaging. Estimation accuracy increases with block size. This scheme allows an echo tail program- ming resolution of 2 ms for a block length of 16 samples.

Leaky LMS . The possibility of sensitivity to round off errors and other dis- turbances exists because the LMS update equation is essentially an integrator. The introduction of the small leakage parameter can guard against such numerical problems. The formulation for leaky LMS is shown below:

a i M lm lm a i e i M m y i M m k k k m M + + ( ) = − ( ) + ( + − ) ( + − − ) = −

1 1 2 0 1 β (6.12)

Additionally, if the reference signal is a pure sinusoid, then the adaptive fi lter will diverge and then become unstable. The inclusion of the leakage factor

[( lm 1)/ lm ] in Eq. (6.12) has the equivalent effect of adding a white - noise

sequence of zero mean and variance 1/ lm to the input processes y ( i ). As a result of this operation, fi lter stability will improve for tones and will prevent overfl ow [Haykin (1996) ]. The value of this leak depends on the level of can- cellation required. The usual value of lm is less than or equal to 32767. In actual

implementation ( lm 1)/ lm is made equal to 32767 in a 16 - bit numbering

representation [ITU - T - G.191 STL (2005) ]. The leak factor should be bigger to avoid rapid decay of fi lter coeffi cients.

As per G.168, the adaptation has to be inhibited once the echo canceller is fully converged. Then after two minutes, the output residual echo level should not decrease more than 10 dB with respect to the steady state value. If the leak factor is applied for each block, the leak will not support the two - minute test. To achieve this, the leak factor is to be introduced for every fourth to tenth block instead of for every block.

6.7.2 Overview on Adaptive Filtering with RLS and Affi ne Projections

Two other algorithms popularly considered are the affi ne projection algorithm and RLS. An overview on these two algorithms is given here.

The RLS algorithm is the method of least squares that will be used to derive a recursive algorithm for automatically adjusting the coeffi cients of a tapped -

delay - line fi lter, without invoking assumptions on the statistics of the input signals. The RLS algorithm estimate is based on minimizing the sum of the squares of instantaneous error values. The procedure, in the RLS algorithm, is capable of realizing a rate of convergence that is much faster than the LMS algorithm, because the RLS algorithm uses all the information contained in the input data from the start of the adaptation up to the present.

In the LMS algorithm the correction fi lter coeffi cients are based on the instantaneous sample value of the tap - input vector and the error signal. On the other hand, in the RLS algorithm, the computation of this correction uses all the past available information. The RLS algorithm has the effect of decor- relating the successive tap inputs, thereby making the RLS algorithm self - orthogonalizing. RLS algorithms are suitable for very large scale integration (VLSI) implementation. RLS is always preferred to make more channel echo cancellers with a single dedicated chip.

The LMS algorithm requires approximately 20 N iterations to converge in mean square, where N is the number of tap coeffi cients contained in the adap- tive fi lter. On the other hand, the RLS algorithm converges in mean square within less than 2 N iterations. The rate of convergence of the RLS algorithm is, therefore, in general, faster than that of the LMS algorithm by an order of magnitude.

RLS Disadvantages. The RLS algorithm demands much higher computa- tion and memory. The RLS algorithm requires a total of 3 N (3 + N) /2 multi- plications, which increases as the square of N , the number of fi lter coeffi cients. LMS algorithm requires 2 N + 1 multiplication, increasing linearly with N. Numerical instability is also one of the major concerns with RLS algorithms. In general, RLS is stated as a higher computation operation, but fast algo- rithms such as fast RLS, QR decomposition RLS (QRD - RLS) are used in RLS that reduce computation requirements.

Affi ne Projection Algorithm. Affi ne projection algorithms are a family of LMS algorithms with higher order. These algorithms provide added benefi t of catering to wideband voice and acoustic echo cancellation. Under least order, affi ne projection algorithms work like LMS algorithms. Affi ne with higher order gives faster convergence and low steady state echo residue compared with LMS algorithms.