FIR adaptive filter that uses filteredx LMS
adaptfilt.filtxlms
has been removed. Use dsp.FilteredXLMSFilter
instead.
ha = adaptfilt.filtxlms(l,step,leakage,pathcoeffs,
pathest,...errstates,pstates,coeffs,states)
ha = adaptfilt.filtxlms(l,step,leakage,pathcoeffs,
constructs
an filteredx LMS adaptive filter
pathest,...errstates,pstates,coeffs,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.filtxlms
.
Input Argument  Description 

 Adaptive filter length (the number of coefficients or
taps) and it must be a positive integer. 
 Filtered LMS step size. it must be a nonnegative scalar. 
 is the filteredx LMS leakage factor. it must be a scalar
between 0 and 1. If it is less than
one, a leaky version of 
 is the secondary path filter model. this vector should contain the coefficient values of the secondary path from the output actuator to the error sensor. 
 is the estimate of the secondary path filter model. 
 is a vector of filtered input states of the adaptive
filter. 
 are the secondary path FIR filter states. it must be
a vector of length equal to the ( 
 is a vector of initial filter coefficients. it must
be a length 
 Vector of initial filter states. 
In the syntax for creating the adaptfilt
object,
the input options are properties of the object created. This table
lists the properties for the adjoint 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 

 Vector of filtered input states with length equal to 
 Any positive integer  Reports the length of the filter, the number of coefficients or taps 
 Vector of elements  Vector of the adaptive filter states. 
 No default  A vector that contains the coefficient values of your secondary path from the output actuator to the error sensor 

 An estimate of the secondary path filter model 
 Vector of size (  The states of the secondary path FIR filter — the unknown system 
 0.1  Sets the filteredx 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. 
Demonstrate active noise control of a random noise signal over 1000 iterations.
As the figure that follows this code demonstrates, the filteredx LMS filter successfully controls random noise in this context.
x = randn(1,1000); % Noise source g = fir1(47,0.4); % FIR primary path system model n = 0.1*randn(1,1000); % Observation noise signal d = filter(g,1,x)+n; % Signal to be cancelled b = fir1(31,0.5); % FIR secondary path system model mu = 0.008; % FilteredX LMS step size ha = adaptfilt.filtxlms(32,mu,1,b); [y,e] = filter(ha,x,d); plot(1:1000,d,'b',1:1000,e,'r'); title('Active Noise Control of a Random Noise Signal'); legend('Original','Attenuated'); xlabel('Time Index'); ylabel('Signal Value'); grid on;
Kuo, S.M., and Morgan, D.R. Active Noise Control Systems: Algorithms and DSP Implementations, New York, N.Y: John Wiley & Sons, 1996.
Widrow, B., and Stearns, S.D. Adaptive Signal Processing, Upper Saddle River, N.J: Prentice Hall, 1985.