Sign-data FIR adaptive filter
adaptfilt.sd will be removed in a future
ha = adaptfilt.sd(l,step,leakage,coeffs,states)
ha = adaptfilt.sd(l,step,leakage,coeffs,states) constructs
an FIR sign-data adaptive filter object
For information on how to run data through your adaptive filter
object, see the Adaptive Filter Syntaxes section of the reference
Entries in the following table describe the input arguments
Adaptive filter length (the number of coefficients or
taps) and it must be a positive integer.
SD step size. It must be a nonnegative scalar.
Your SD leakage factor. It must be a scalar between 0
and 1. When
Vector of initial filter coefficients. it must be a length
Vector of initial filter states for the adaptive filter.
It must be a length
In the syntax for creating the
the input options are properties of the object you create. This table
lists the properties for sign-data objects, their default values,
and a brief description of the property.
Defines the adaptive filter algorithm the object uses during adaptation.
Vector containing the initial filter coefficients. It
must be a length
Reports the length of the filter, the number of coefficients or taps.
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. Defaults to 0.
Determine whether the filter states and coefficients
get restored to their starting values for each filtering operation.
The starting values are the values in place when you create the filter.
Vector of the adaptive filter states.
Sets the SD 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.
Adaptive line enhancement using a 32-coefficient FIR filter
to perform the enhancement. This example runs for 5000 iterations,
as you see in property
d = 1; % Number of samples of delay ntr= 5000; % Number of iterations v = sin(2*pi*0.05*[1:ntr+d]); % Sinusoidal signal n = randn(1,ntr+d); % Noise signal x = v(1:ntr)+n(1:ntr); % Input signal d = v(1+d:ntr+d)+n(1+d:ntr+d); % Desired signal mu = 0.0001; % Sign-data step size. ha = adaptfilt.sd(32,mu); [y,e] = filter(ha,x,d); subplot(2,1,1); plot(1:ntr,[d;y;v(1:end-1)]); axis([ntr-100 ntr -3 3]); title('Adaptive Line Enhancement of a Noisy Sinusoidal Signal'); legend('Observed','Enhanced','Original'); xlabel('Time Index'); ylabel('Signal Value'); [pxx,om] = pwelch(x(ntr-1000:ntr)); pyy = pwelch(y(ntr-1000:ntr)); subplot(2,1,2); plot(om/pi,10*log10([pxx/max(pxx),pyy/max(pyy)])); axis([0 1 -60 20]); legend('Observed','Enhanced'); xlabel('Normalized Frequency (\times \pi rad/sample)'); ylabel('Power Spectral Density'); grid on;
Each of the variants — sign-data, sign-error, and sign-sign
— uses the same example. You can compare the results by viewing
the figure shown for each adaptive filter method —
Moschner, J.L., "Adaptive Filter with Clipped Input Data," Ph.D. thesis, Stanford Univ., Stanford, CA, June 1970.
Hayes, M., Statistical Digital Signal Processing and Modeling, New York Wiley, 1996.