| 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 asptleakynlms() is given by
asptleakynlms() for an FIR adaptive filter of 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 |
% 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 ));gridRunning 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
|
| Algorithm |
Similar to asptnlms(), asptleakynlms() performs the following operations
|
| 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.
|
| Resources |
The resources required to implement the Leaky NLMS algorithm for a transversal adaptive FIR filter of
|
| See Also |
| INIT_ LEAKYNLMS, MODEL_ LEAKYNLMS, ASPTNLMS. |
| Reference |
| [11] and [4] for extensive analysis of the NLMS and the steepest-descent search method. |