| Filter Design Toolbox | ![]() |
Construct an FFT-based block LMS FIR adaptive filter
Syntax
Description
ha = adaptfilt.blmsfft(l,step,leakage,blocklen,coeffs,states)
constructs an FIR block LMS adaptive filter object ha where l is the adaptive filter length (the number of coefficients or taps) and must be a positive integer. l defaults to 10. step is the block LMS step size. It must be a nonnegative scalar. The function maxstep may be helpful to determine a reasonable range of step size values for the signals you are processing. step defaults to 0.
leakage is the block LMS leakage factor. It must also be a scalar between 0 and 1. When leakage is less than one, the adaptfilt.blmsfft implements 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
is a power of two; otherwise, an adaptfilt.blms algorithm is used for adapting. Larger block lengths result in faster execution times, with poor adaptation characteristics as the cost of the speed gained. blocklen defaults to l. Enter your initial filter coefficients in coeffs, a vector of length l. When omitted, coeffs defaults to a length l vector of all zeros. states contains a vector of initial filter states; it must be a length l vector. states defaults to a length l vector of all zeros when you omit the states argument in the calling syntax.
adaptfilt.blmsfft Object Properties
In the syntax for creating the adaptfilt object, the input options are properties of the object you create. This table list all the properties for the block LMS object, their default values, and a brief description of the property.
Example
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'); xlabel('Coefficient #'); ylabel('Coefficient Value'); grid on;
As a result of running the adaptation process, filter object ha now matches the unknown system FIR filter b.
See Also
adaptfilt.blms, adaptfilt.fdaf, adaptfilt.lms, filter
Reference
J.J. Shynk, "Frequency-Domain and Multirate Adaptive Filtering," IEEE Signal Processing Magazine, vol. 9, no. 1, pp. 14-37, Jan. 1992.
| adaptfilt.blms | adaptfilt.dlms | ![]() |
Learn more about the latest releases of MathWorks products: |
| © 1994-2009 The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |