next up previous contents
Next: 5 asptdrlms Up: 4 Transversal and Linear Previous: 3 asptblms   Contents


4 asptbnlms

Purpose
Performs filtering and coefficient update using the Block Normalized Least Mean Squares (BNLMS) algorithm. BNLMS updates the N filter coefficients once every block of L samples.

Syntax
[w,x,y,e,p] = asptbnlms(x,xn,dn,w,mu,p,b)

Description
Unlike asptnlms() which updates all the filter coefficients every sample, asptbnlms() updates the coefficients every $L$ samples. asptbnlms() takes a block of input samples $xn(k)$, a block of desired samples $dn(k)$, the vector of adaptive filter coefficients from the previous iteration $\vw (k-1)$, the step size $\mu$, the previous estimate of the input signal power $p$, and returns a block of filter output samples $\vy (k)$, a block of error samples $\ve (k)$, the updated power estimate, and the updated vector of filter coefficients $\vw (k)$. The update equation of asptblms() is given by
\begin{displaymath}
\vw (k+1) = \vw (k) + \frac{\mu_{B}}{Lp} \sum \limits_{i=0}^{L-1} e(kL+i) \vx (kL+i),
\end{displaymath} (29)

where $L$ is the block length, $k$ is the block index, and $\mu_{B}$ is the algorithm step-size parameter. The input and output parameters of asptbnlms() for an FIR adaptive filter of $N$ coefficients are summarized below.
Input Parameters [Size]:: 
   x  : previous input delay line [N x 1]
   xn : new block of input samples [L x 1]
   dn : new block of desired samples [L x 1]
   w  : vector of filter coefficients [N x 1]
   mu : adaptation constant (step size) [1 x 1]
   p  : previous estimate of the input power [1 x 1]
   b  : pole of the IIR filter used to estimate the input signal power

Output parameters::
   w  : updated filter coefficients 
   x  : updated delay line of input signal
   y  : block of filter output samples 
   e  : block of error samples 
   p  : updated estimate of the input signal power.



Example
Figure 4.5: The adaptive filter coefficients after convergence and the learning curve for the complex FIR system identification problem using the BNLMS algorithm.
% BNLMS used in a simple system identification application.
% By the end of this script the adaptive filter w 
% should have the same coefficients as the unknown filter h.
iter = 5000;                  % Number of samples to process
% Complex unknown impulse response
h    = [.9 + i*.4; 0.7+ i*.2; .5; .3+i*.1; .1];    
xt   = 2*(rand(iter,1)-0.5);  % Input signal, zero mean random.
% although xn is real, dn will be complex since h is complex
dt   = osfilter(h,xt);        % Unknown filter output 
en   = zeros(iter,1);         % vector to collect the error
% Initialize BNLMS with a filter of 5 coef. and block of 5 samples.
[w,x,dn,e,y,p]=init_bnlms(5,5);

%% Processing Loop
for (m=1:L:iter-L)
   xn = xt(m:m+L-1,:);
   dn = dt(m:m+L-1,:)+ 1e-3*rand;    
   % call BNLMS to calculate the filter output, estimation error
   % and update the coefficients. 
   [w,x,y,e,p] = asptbnlms(x,xn,dn,w,.05,p,.98);
   % save the last error block to plot later
   en(m:m+L-1,:) = e;  
end;

% display the results
subplot(2,2,1);stem([real(w) -imag((w))]); grid;
subplot(2,2,2);eb = filter(.1, [1 -.9], en(1:m) .* conj(en(1:m)));
plot(10*log10(eb +eps ));grid
Running the above script will produce the graph shown in Fig. 4.5. The left side graph of the figure shows the adaptive filter coefficients after convergence which are almost identical to the unknown filter h. The right side graph shows the square error in dB versus time during the adaptation process, which is usually called the learning curve. The lower limit of the error signal power in the learning curve is defined here by the additive white noise added at the filter output (-60 dB).


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

Algorithm
The current implementation of asptbnlms() performs the following operations
  • Filters each of the new input samples through the adaptive filter $\vw (k-1)$ to produce the block of filter output samples $\vy (k)$.
  • Calculates the block of error samples $\ve (n) = \vd (n) - \vy (n)$.
  • Updates the estimate of the input signal power.
  • Updates the adaptive filter coefficients once per block using the update equation (4.3).
  • Updates the delay line for processing the next block.

Remarks
The BNLMS is a block implementation of the NLMS algorithm, and therefore, BNLMS has similar properties to those of the NLMS. The main difference between the BNLMS and NLMS is that the former updates all the filter coefficients once every L samples while the latter updates all the filter coefficients once every sample. The following remarks are also of interest.
  • The convergence behaviors of the BNLMS and NLMS are identical.
  • From equation 4.3, to obtain the same final misadjustment for NLMS and BNLMS, the following should hold, $\mu_B / L = \mu$, where $\mu_B$ is the step size for BNLMS and $\mu$ is the step size for the NLMS algorithm. However, the current implementation of asptbnlms() assumes that the division by $L$ in equation 4.3 has been absorbed in the algorithm step size.
  • Like all block processing algorithms, the BNLMS introduces a delay of $L$ samples in the input-output path. This is the time required to collect a block of input data.
  • asptbnlms() supports both real and complex data and filters. The adaptive filter for the complex BNLMS algorithm converges to the complex conjugate of the optimum solution.
  • asptbnlms() updates the input delay line internally.



Resources
The resources required to implement the BNLMS algorithm for a transversal adaptive FIR filter of $N$ coefficients using a block of $L$ samples in real time is given in the table below. The computations given are those required to process one sample.


MEMORY $2N + 5L + 2$
MULTIPLY $N(2L + 1)/L + 4$
ADD $N(2L + 1)/L + 1$
DIVIDE $1/L$

See Also
INIT_ BNLMS, ASPTBLMS, ASPTBFDAF, ASPTNLMS.

Reference
[11] and [4] for extensive analysis of the LMS and the steepest-descent search method and [1] and [2] for BNLMS.

next up previous contents
Next: 5 asptdrlms Up: 4 Transversal and Linear Previous: 3 asptblms   Contents