| Purpose |
| Performs filtering and coefficient update using the Block Least Mean Squares (BLMS) algorithm. BLMS updates the N filter coefficients once every block of L samples. |
| Syntax |
[w,x,y,e] = asptblms(x,xn,dn,w,mu)
[w,x,y,e] = asptblms(x,xn,dn,w,mu,alg)
|
| Description |
Unlike asptlms() which updates all the filter coefficients every sample,
asptblms() updates the coefficients every asptblms() takes a block of input samples where
asptblms() for an FIR adaptive filter of
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]
alg : specifies the variety of the lms to use in the
update equation. Must be one of the following:
'lms' [default]
'slms' - sign LMS, uses sign(e)
'srlms' - signed regressor LMS, uses sign(x)
'sslms' - sign-sign LMS, uses sign(e) and sign(x)
Output parameters::
w : updated filter coefficients
x : updated delay-line of input signal
y : block of filter output samples
e : block of error samples.
|
| Example |
% BLMS 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 BLMS with a filter of 5 coef. and block of 5 samples. [w,x,dn,e,y]=init_blms(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 BLMS to calculate the filter output, estimation error % and update the coefficients. [w,x,y,e]=asptblms(x,xn,dn,w,0.05,'srlms'); % 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 ));gridRunning the above script will produce the graph shown in Fig. 4.4. 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).
|
| Algorithm |
The current implementation of asptblms() performs the following operations
|
| Remarks |
The BLMS is a block implementation of the LMS algorithm, and therefore, BLMS has similar
properties to those known for the LMS. The main difference between the BLMS and LMS 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.
|
| Resources |
The resources required to implement the BLMS algorithm for a transversal adaptive FIR filter
of
|
| See Also |
| INIT_ BLMS, ASPTBNLMS, ASPTBFDAF, ASPTLMS.. |
| Reference |
| [11] and [4] for extensive analysis of the LMS and the steepest-descent search method and [1] and [2] for BLMS. |