Filtered XLMS filter
The dsp.FilteredXLMSFilter computes output, error and coefficients using Filtered-X Least Mean Squares FIR adaptive filter.
To implement the adaptive FIR filter object:
H = dsp.FilteredXLMSFilter returns a filtered-x Least Mean Square FIR adaptive filter System object™, H. This System object is used to compute the filtered output and the filter error for a given input and desired signal.
H = dsp.FilteredXLMSFilter('PropertyName', PropertyValue,...) returns a FilteredXLMSFilter System object, H, with each specified property set to the specified value.
H = dsp.FilteredXLMSFilter(LEN,'PropertyName',PropertyValue,...) returns a FilteredXLMSFilter System object, H, with the Length property set to LEN, and other specified properties set to the specified values. For the algorithm on how to implement this filter, refer to , .
Length of filter coefficients vector
Specify the length of the FIR filter coefficients vector as a positive integer value. This property is nontunable.
The default value is 10.
Adaptation step size
Specify the adaptation step size factor as a positive numeric scalar. The default value is 0.1. This property is tunable.
Adaptation leakage factor
Specify the leakage factor used in a leaky adaptive filter as a numeric value between 0 and 1, both inclusive. When the value is less than 1, the System object implements a leaky adaptive algorithm. The default value is 1, providing no leakage in the adapting method. This property is tunable.
Coefficients of the secondary path filter model
Specify the coefficients of the secondary path filter model as a numeric vector. The secondary path connects the output actuator and the error sensor. The default value is a vector that represents the coefficients of a 10th-order FIR lowpass filter. This property is tunable.
An estimate of the secondary path filter model
Specify the estimate of the secondary path filter model as a numeric vector. The secondary path connects the output actuator and the error sensor. The default value equals to the SecondayPathCoefficients property value. This property is tunable.
Initial coefficients of the filter
Specify the initial values of the FIR adaptive filter coefficients as a scalar or a vector of length equal to the value of the Length property. The default value is 0.
Locked status of the coefficient updates
Specify whether to lock the filter coefficient values. By default, the value of this property is false, and the object continuously updates the filter coefficients. If this property is set to true, the filter coefficients do not update and their values remain the same.
|clone||Create Filtered-X LMS filter object with same property values|
|isLocked||Locked status for input attributes and nontunable properties|
|msesim||Mean-square error for Filtered-X LMS filter|
|release||Allow property value and input characteristics changes|
|reset||Reset filter states for Filtered-X LMS filter|
|step||Apply Filtered-X LMS filter to input|
Active noise control of a random noise signal
Generate noise, create FIR primary path system model, generate observation noise, filter the primary path system model output with added noise, and create FIR secondary path system model:
x = randn(1000,1); g = fir1(47,0.4); n = 0.1*randn(1000,1); d = filter(g,1,x) + n b = fir1(31,0.5);
Use the Filtered-X LMS Filter to compute the filtered output and the filter error for the input and the signal to be cancelled:
mu = 0.008; ha = dsp.FilteredXLMSFilter(32, 'StepSize', mu, 'LeakageFactor', ... 1, 'SecondaryPathCoefficients', b); [y,e] = step(ha,x,d);
Plot the results:
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: John Wiley & Sons, 1996.
 Widrow, B. and Stearns, S.D. Adaptive Signal Processing. Upper Saddle River, N.J: Prentice Hall, 1985.