FIR adaptive filter that uses FFT-based BLMS
adaptfilt.blmsfft will be removed in a
ha = adaptfilt.blmsfft(l,step,leakage,blocklen,coeffs,
ha = adaptfilt.blmsfft(l,step,leakage,blocklen,coeffs, constructs an FIR block LMS adaptive
the adaptive filter length (the number of coefficients or taps) and
must be a positive integer.
l defaults to 10.
the block LMS step size. It must be a nonnegative scalar. The function
be helpful to determine a reasonable range of step size values for
the signals you are processing.
step defaults to
leakage is the block LMS leakage factor.
It must also be a scalar between 0 and 1. When
less than one, the
a leaky block LMS algorithm.
leakage defaults to
1 (no leakage).
blocklen is the block length used.
It must be a positive integer such that
blocklen + length(coeffs)
is a power of two; otherwise, an
is used for adapting. Larger block lengths result in faster execution
times, with poor adaptation characteristics as the cost of the speed
blocklen defaults to
Enter your initial filter coefficients in
a vector of length
l. When omitted,
to a length
l vector of all zeros.
a vector of initial filter states; it must be a length
to a length
l vector of all zeros when you omit
states argument in the calling syntax.
For information on how to run data through your adaptive filter
object, see the Adaptive Filter Syntaxes section of the reference
In the syntax for creating the
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.
Defines the adaptive filter algorithm the object uses during adaptation
Any positive integer
Reports the length of the filter, the number of coefficients or taps
Vector of elements
Vector containing the initial filter coefficients. It
must be a length
Vector of elements of length
Vector of the adaptive filter states.
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.
Vector of length
Size of the blocks of data processed in each iteration
Sets the block 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.
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.
Identify an unknown FIR filter with 32 coefficients using 512 iterations of the adapting algorithm.
x = randn(1,512); % Input to the filter b = fir1(31,0.5); % FIR system to be identified no = 0.1*randn(1,512); % Observation noise signal d = filter(b,1,x)+no; % Desired signal mu = 0.008; % Step size n = 16; % Block length ha = adaptfilt.blmsfft(32,mu,1,n); [y,e] = filter(ha,x,d); subplot(2,1,1); plot(1:500,[d(1:500);y(1:500);e(1:500)]); 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');
As a result of running the adaptation process, filter object
matches the unknown system FIR filter
on comparing the filter coefficients derived during adaptation.
Shynk, J.J., "Frequency-Domain and Multirate Adaptive Filtering," IEEE® Signal Processing Magazine, vol. 9, no. 1, pp. 14-37, Jan. 1992.