| Filter Design Toolbox | ![]() |
Construct a least-mean-square (LMS) FIR adaptive filter object
Syntax
Description
ha = adaptfilt.lms(l,step,leakage,coeffs,states)
constructs an FIR LMS adaptive filter object ha.
Input Arguments
Entries in the following table describe the input arguments for adaptfilt.lms.
| Input Argument |
Description |
l |
Adaptive filter length (the number of coefficients or taps) and it must be a positive integer. l defaults to 10. |
step |
LMS step size. It must be a nonnegative scalar. You can use maxstep to determine a reasonable range of step size values for the signals being processed. step defaults to 0.1. |
leakage |
Your LMS leakage factor. It must be a scalar between 0 and 1. When leakage is less than one, adaptfilt.lms implements a leaky LMS algorithm. When you omit the leakage property in the calling syntax, it defaults to 1 providing no leakage in the adapting algorithm. |
coeffs |
Vector of initial filter coefficients. it must be a length l vector. coeffs defaults to length l vector with elements equal to zero. |
states |
Vector of initial filter states for the adaptive filter. It must be a length l-1 vector. states defaults to a length l-1 vector of zeros. |
adaptfilt.lms Object Properties
In the syntax for creating the adaptfilt object, the input options are properties of the object created. This table list all the properties for the adaptfilt.lms object, their default values, and a brief description of the property.
Example
Use 500 iterations of an adapting filter system to identify and unknown 32nd-order FIR filter.
x = randn(1,500); % Input to the filterb = fir1(31,0.5); % FIR system to be identifiedn = 0.1*randn(1,500); % Observation noise signald = filter(b,1,x)+n; % Desired signalmu = 0.008; % LMS step size.ha = adaptfilt.lms(32,mu);[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');xlabel('Coefficient #'); ylabel('Coefficient Value'); grid on;
ISee Also
adaptfilt.blms, adaptfilt.blmsfft, adaptfilt.dlms, adaptfilt.nlms, adaptfilt.tdafdft, adaptfilt.sd, adaptfilt.se, adaptfilt.ss
Reference
J.J. Shynk, "Frequency-Domain and Multirate Adaptive Filtering," IEEE Signal Processing Magazine, vol. 9, no. 1, pp. 14-37, Jan. 1992.
| adaptfilt.hswrls | adaptfilt.lsl | ![]() |
Learn more about the latest releases of MathWorks products: |
| © 1994-2009 The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |