This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.


Least squares lattice adaptive filter

adaptfilt.lsl will be removed in a future release. Use dsp.AdaptiveLatticeFilter instead.


ha = adaptfilt.lsl(l,lambda,delta,coeffs,states)


ha = adaptfilt.lsl(l,lambda,delta,coeffs,states) constructs a least squares lattice adaptive filter 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.

Input Arguments

Entries in the following table describe the input arguments for adaptfilt.lsl.

Input Argument



Length of the joint process filter coefficients. It must be a positive integer and must be equal to the length of the prediction coefficients plus one. L defaults to 10.


Forgetting factor of the adaptive filter. This is a scalar and should lie in the range (0, 1]. lambda defaults to 1. lambda = 1 denotes infinite memory while adapting to find the new filter.


Soft-constrained initialization factor in the least squares lattice algorithm. It should be positive. delta defaults to 1.


Vector of initial joint process filter coefficients. It must be a length l vector. coeffs defaults to a length l vector of all zeros.


Vector of the backward prediction error states of the adaptive filter. states defaults to a length l vector of all zeros, specifying soft-constrained initialization for the algorithm.


Since your adaptfilt.lsl filter is an object, it has properties that define its behavior in operation. Note that many of the properties are also input arguments for creating adaptfilt.lsl objects. To show you the properties that apply, this table lists and describes each property for the filter object.






Defines the adaptive filter algorithm the object uses during adaptation.



Returns the predicted samples generated during adaptation. See References — Adaptive Filters for details about linear prediction.


Vector of elements

Vector containing the initial filter coefficients. It must be a length l vector where l is the number of filter coefficients. coeffs defaults to length l vector of zeros when you do not provide the argument for input.


Any positive integer

Reports the length of the filter, the number of coefficients or taps.



Forgetting factor of the adaptive filter. This is a scalar and should lie in the range (0, 1]. It defaults to 1. Setting forgetting factor = 1 denotes infinite memory while adapting to find the new filter. Note that this is the lambda input argument.



Contains the predicted values for samples during adaptation. Compare these to the actual samples to get the error and power.



Soft-constrained initialization factor. This scalar should be positive and sufficiently large to prevent an excessive number of Kalman gain rescues. delta defaults to one.


false or true

Determine whether the filter states get restored to their starting values for each filtering operation. The starting values are the values in place when you create the filter if you have not changed the filter since you constructed it. PersistentMemory returns to zero any state that the filter changes during processing. States that the filter does not change are not affected. Defaults to false.


Vector of elements, data type double

Vector of the adaptive filter states. states defaults to a vector of zeros which has length equal to l.


Demonstrate Quadrature Phase Shift Keying (QPSK) adaptive equalization using a 32-coefficient adaptive filter running for 1000 iterations. After you review the example code, the figure shows the results of running the example to use QPSK adaptive equalization with a 32nd-order FIR filter. The error between the in-phase and quadrature components, as shown by the errors plotted in the upper plots, falls to near zero. Also, the equalized signal shows the clear quadrature nature.

D  = 16;                      % Number of samples of delay
b  = exp(1j*pi/4)*[-0.7 1];    % Numerator coefficients of channel
a  = [1 -0.7];                % Denominator coefficients of channel
ntr= 1000;                    % Number of iterations
s  = sign(randn(1,ntr+D))+1j*sign(randn(1,ntr+D));  % QPSK signal
n  = 0.1*(randn(1,ntr+D) + 1j*randn(1,ntr+D));      % Noise signal
r  = filter(b,a,s)+n;         % Received signal
x  = r(1+D:ntr+D);            % Input signal (received signal)
d  = s(1:ntr);                % Desired signal (delayed QPSK signal)
lam = 0.995;                  % Forgetting factor
del = 1;                      % initialization factor
ha = adaptfilt.lsl(32,lam,del);
[y,e] = filter(ha,x,d);
subplot(2,2,1); plot(1:ntr,real([d;y;e]));
title('In-Phase Components');
xlabel('Time Index'); ylabel('Signal Value');
subplot(2,2,2); plot(1:ntr,imag([d;y;e]));
title('Quadrature Components');
xlabel('Time Index'); ylabel('Signal Value');
subplot(2,2,3); plot(x(ntr-100:ntr),'.');  axis([-3 3 -3 3]);
title('Received Signal Scatter Plot');  axis('square');
xlabel('Real[x]'); ylabel('Imag[x]');  grid on;
subplot(2,2,4); plot(y(ntr-100:ntr),'.');  axis([-3 3 -3 3]);
title('Equalized Signal Scatter Plot');  grid on;
axis('square'); xlabel('Real[y]'); ylabel('Imag[y]');


Haykin, S., Adaptive Filter Theory, 2nd Edition, Prentice Hall, N.J., 1991

Introduced in R2011a

Was this topic helpful?