next up previous contents
Next: 8 asptlclms Up: 4 Transversal and Linear Previous: 6 asptdrnlms   Contents


7 asptleakynlms

Purpose
Sample per sample filtering and coefficient update using the Leaky Normalized LMS algorithm.

Syntax
[w,y,e,p]= asptleakynlms(x,w,d,mu,a)
[w,y,e,p]= asptleakynlms(x,w,d,mu,a,p,b)

Description
asptleakynlms() implements the Leaky NLMS adaptive algorithm used to update transversal adaptive filters. Referring to the general adaptive filter shown in Fig. 2.6, asptleakynlms() takes an input samples delay line $x(n)$, a desired sample $d(n)$, the vector of the adaptive filter coefficients from previous iteration $w(n-1)$, the step size $mu$, and returns the filter output $y(n)$, the error sample $e(n)$ and the updated vector of filter coefficients $w(n)$. Similar to the NLMS, the Leaky NLMS also estimates the instantaneous power of the input signal $p(n)$ and normalizes the step size $mu$ by this estimate to make the update algorithm independent of the input signal energy. If the input parameters $p$ and $b$ are given, an efficient recursive estimation of $x(n)$ is used, otherwise the inner product of $x(n)$ with itself is used instead. The update equation of asptleakynlms() is given by
\begin{displaymath}
\vw (n) = \alpha \vw (n) + (\frac{\mu}{p}) e(n) \vx (n).
\end{displaymath} (30)

Where $\alpha$ is the leak factor, a scalar constant in the range ($ 0<\alpha<1$). The effect of the leak is identical to adding white noise to the filter input with noise variance $\sigma_{n}^2$ given by $\sigma_{n}^2 = (1 - \alpha) / (2 \mu)$. This might be helpful in several applications such as antenna sidelobe cancelers and echo cancelers. The direct effect of the leak is that the filter coefficients tend to decay exponentially to zero when the step size $\mu$ is set to zero, so that the adaptation of the filter will not stall and the filter has to keep adapting to minimize the mean square error. The input and output parameters of asptleakynlms() for an FIR adaptive filter of $L$ coefficients are summarized below.

Input Parameters [Size]:: 
   x   : input samples delay line [L x 1]
   w   : filter coefficients vector w(n-1) [L x 1]
   d   : desired output d(n) [1 x 1]
   mu  : adaptation constant
   a   : leak factor (0 < a < 1)
   p   : last estimated power of x p(n-1) 
   b   : AR pole for recursive calculation of p
Output parameters::
   w   : updated filter coefficients w(n)
   y   : filter output y(n)
   e   : error signal; e(n) = d(n)-y(n)
   p   : new estimated power of x p(n)



Example
Figure 4.8: The cascade of the channel and the adaptive filter coefficients after convergence (left), and the learning curve for the inverse modeling problem using the Leaky NLMS algorithm (right).
% Leaky NLMS used in an inverse modeling application (channel 
% equalizer). By the end of this script the adaptive filter w 
% should have the inverse response of the filter h so that the 
% cascade conv(w,h) = delta(t-D), is a pure delay of D samples.

iter = 5000;                 % Number of samples to process
h    = impz(.3,[1 -.7],10);  % channel to be equalized
x1   = 2*(rand(iter,1)-0.5); % system input.
x2   = osfilter(h,x1);       % channel output = filter input 
en   = zeros(iter,1);        % vector to collect the error
D    = 3;                    % inversion delay
% Initialize the Leaky NLMS algorithm with a filter of 10 coef.
[w,x,d,y,e,p]=init_leakynlms(10); 

%% Processing Loop
for (m=1:iter-D)	
   x = [x2(m+D,:); x(1:end-1,:)];  % update the input delay line
   d = x1(m,:);                    % desired = delayed sys input 
   % call Leaky NLMS to calculate the filter output, estimation 
   % error and update the coefficients. 
   [w,y,e,p]= asptleakynlms(x,w,d,0.01,(1-1e-5),p,0.98);
   % save the last error sample to plot later
   en(m,:) = e;  
end;

% display the results
subplot(2,2,1);stem(conv(h,w)); grid;
subplot(2,2,2);
eb = filter(.1,[1 -0.9], en .* conj(en));
plot(10*log10(eb  ));grid
Running the above script will produce the graph shown in Fig. 4.8. The left side graph of the figure shows the cascade of the channel and the adaptive filter coefficients after convergence. This cascade should be a pure delay equals to $D$ for perfect equalization. The right side graph shows the mean square error in dB versus time during the adaptation process, which is usually called the learning curve.


\epsfig{file=/home/john/winD/docs/aspt/aspt/figs/leakyex1.eps,width=0.9\textwidth}


Algorithm
Similar to asptnlms(), asptleakynlms() performs the following operations
  • Filter the input signal $x(n)$ through the adaptive filter $w(n-1)$ to produce the filter output $y(n)$.
  • Calculates the error sample $e(n) = d(n) - y(n)$.
  • Estimates the input signal power $p$ and normalizes the step size $mu$ by this estimate.
  • Updates the adaptive filter coefficients using the error $e(n)$ and the delay line of input samples $x(n)$ resulting in $w(n)$.

Remarks
The LEAKY NLMS is a stochastic implementation of the steepest-descent algorithm where the mean value of the filter coefficients converge towards their optimal solution biased by the variance of the equivalent input additive noise due to the leak. Therefore, the filter coefficients will fluctuate about their optimum values given by the Wiener solution. The amplitude of the fluctuations is partly controlled by the step size and partly by the leak factor. The smaller the step size, the smaller the fluctuations (less final misadjustment) but also the slower the adaptive coefficients converge to their optimal values. Note also the following.
  • The LEAKY NLMS algorithm estimates the energy of the input signal each sample and normalizes (divides) the step size by this estimate, therefore selecting a step size inversely proportion to the instantaneous input signal power. Although this improves the convergence properties in comparison to the LMS, it does not solve the eigenvalue spread problem.
  • The LEAKY NLMS algorithm shows stable convergence behavior only when the step size $mu$ (convergence constant) takes a value between zero and an upper limit defined by the statistics of the filter's input signal. The fastest convergence will be achieved for a white noise input sequence. Such white input signal has all its eigenvalues equal to the noise variance $\sigma^2$ and therefore has a diagonal autocorrelation matrix with diagonal values equal to $\sigma^2$.
  • The more colored the spectrum of the input signal, the slower the convergence will be. This is due to the large eigenvalue spread for such colored signals. This makes the convergence composed of several modes, each associated with one of the eigenvalues.
  • asptleakynlms() supports both real and complex data and filters. The adaptive filter for the complex Leaky NLMS algorithm converges to the complex conjugate of the optimum solution.
  • asptleakynlms() does not update the input delay line for $x(n)$, this has been chosen to provide more flexibility. Delay line update, by inserting the newest sample at the beginning of the buffer and shifting the rest of the samples to the right, has to be done before calling asptleakynlms() as in the example above.



Resources
The resources required to implement the Leaky NLMS algorithm for a transversal adaptive FIR filter of $L$ coefficients in real time is given in the table below. The computations given are those required to process one sample and assumes that recursive estimation of the input power is used.


MEMORY $2L+8$
MULTIPLY $3L + 4$
ADD $2L + 2$
DIVIDE 1


See Also
INIT_ LEAKYNLMS, MODEL_ LEAKYNLMS, ASPTNLMS.

Reference
[11] and [4] for extensive analysis of the NLMS and the steepest-descent search method.


next up previous contents
Next: 8 asptlclms Up: 4 Transversal and Linear Previous: 6 asptdrnlms   Contents