FIR adaptive filter that uses delayed LMS
adaptfilt.dlms
has been removed. Use dsp.LMSFilter
, dsp.BlockLMSFilter
, dsp.RLSFilter
, dsp.FastTransversalFilter
, dsp.AffineProjectionFilter
, dsp.AdaptiveLatticeFilter
, dsp.FilteredXLMSFilter
, dsp.FrequencyDomainAdaptiveFilter
,
or dsp.AffineProjectionFilter
instead.
ha = adaptfilt.dlms(l,step,leakage,delay,errstates,coeffs,
...states)
ha = adaptfilt.dlms(l,step,leakage,delay,errstates,coeffs,
constructs an FIR delayed LMS adaptive
filter
...states)ha
.
For information on how to run data through your adaptive filter
object, see the Adaptive Filter Syntaxes section of the reference
page for filter
.
Entries in the following table describe the input arguments
for adaptfilt.dlms
.
Input Argument  Description 

 Adaptive filter length (the number of coefficients or
taps) and it must be a positive integer. 
 LMS step size. It must be a nonnegative scalar. You can
use 
 Your LMS leakage factor. It must be a scalar between
0 and 1. When 
 Update delay given in time samples. This scalar should
be a positive integer — negative delays do not work. 
 Vector of the error states of your adaptive filter. It
must have a length equal to the update delay ( 
 Vector of initial filter coefficients. it must be a length 
 Vector of initial filter states for the adaptive filter.
It must be a length 
In the syntax for creating the adaptfilt
object,
the input options are properties of the object you create. This table
lists the properties for the block LMS object, their default values,
and a brief description of the property.
Property  Default Value  Description 

 None  Defines the adaptive filter algorithm the object uses during adaptation 
 Vector of elements  Vector containing the initial filter coefficients. It
must be a length 
 1  Specifies the update delay for the adaptive algorithm. 
 Vector of zeros with the number of elements equal to  A vector comprising the error states for the adaptive filter. 
 Any positive integer  Reports the length of the filter, the number of coefficients or taps. 
 1  Specifies the leakage parameter. Allows you to implement a leaky algorithm. Including a leakage factor can improve the results of the algorithm by forcing the algorithm to continue to adapt even after it reaches a minimum value. Ranges between 0 and 1. 

 Determine whether the filter states get restored to their
starting values for each filtering operation. The starting values
are the values in place when you create the filter if you have not
changed the filter since you constructed it. 
 0.1  Sets the LMS algorithm step size used for each iteration of the adapting algorithm. Determines both how quickly and how closely the adaptive filter converges to the filter solution. 
 Vector of elements, data type double  Vector of the adaptive filter states. 
System identification of a 32coefficient FIR filter. Refer to the figure that follows to see the results of the adapting filter process.
x = randn(1,500); % Input to the filter b = fir1(31,0.5); % FIR system to be identified n = 0.1*randn(1,500); % Observation noise signal d = filter(b,1,x)+n; % Desired signal mu = 0.008; % LMS step size. delay = 1; % Update delay ha = adaptfilt.dlms(32,mu,1,delay); [y,e] = filter(ha,x,d); subplot(2,1,1); plot(1:500,[d;y;e]); title('System Identification of an FIR Filter'); legend('Desired','Output','Error'); xlabel('Time Index'); ylabel('Signal Value'); subplot(2,1,2); stem([b.',ha.coefficients.']); legend('Actual','Estimated'); grid on; xlabel('Coefficient #'); ylabel('Coefficient Value');
Using a delayed LMS adaptive filter in the process to identify an unknown filter appears to work as planned, as shown in this figure.
Shynk, J.J.,"FrequencyDomain and Multirate Adaptive Filtering," IEEE^{®} Signal Processing Magazine, vol. 9, no. 1, pp. 1437, Jan. 1992.