| Filter Design Toolbox™ | ![]() |
ha = adaptfilt.lsl(l,lambda,delta,coeffs,states)
ha = adaptfilt.lsl(l,lambda,delta,coeffs,states) constructs a least squares lattice adaptive filter ha.
Entries in the following table describe the input arguments for adaptfilt.lsl.
Input Argument | Description |
|---|---|
l | 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. |
lambda | 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. |
delta | Soft-constrained initialization factor in the least squares lattice algorithm. It should be positive. delta defaults to 1. |
coeffs | Vector of initial joint process filter coefficients. It must be a length l vector. coeffs defaults to a length l vector of all zeros. |
states | 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.
Name | Range | Description |
|---|---|---|
Algorithm | None | Defines the adaptive filter algorithm the object uses during adaptation. |
BkwdPrediction | Returns the predicted samples generated during adaptation. Refer to [2] in the bibliography for details about linear prediction. | |
Coefficients | 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. |
FilterLength | Any positive integer | Reports the length of the filter, the number of coefficients or taps. |
ForgettingFactor | 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. | |
FwdPrediction | Contains the predicted values for samples during adaptation. Compare these to the actual samples to get the error and power. | |
InitFactor | 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. | |
PersistentMemory | 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. |
States | 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(j*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)) + j*sign(randn(1,ntr+D));% Baseband
% QPSK signal
n = 0.1*(randn(1,ntr+D) + j*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; % Soft-constrained 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');
legend('Desired','Output','Error');
xlabel('Time Index'); ylabel('Signal Value');
subplot(2,2,2); plot(1:ntr,imag([d;y;e]));
title('Quadrature Components');
legend('Desired','Output','Error');
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');
axis('square');
xlabel('Real[y]'); ylabel('Imag[y]');
grid on;

adaptfilt.qrdlsl, adaptfilt.gal, adaptfilt.ftf, adaptfilt.rls
Haykin, S., Adaptive Filter Theory, 2nd Edition, Prentice Hall, N.J., 1991
![]() | adaptfilt.lms | adaptfilt.nlms | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |