FIR adaptive filter that uses gradient lattice
ha = adaptfilt.gal(l,step,leakage,offset,rstep,delta,
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.gal.
Length of the joint process filter coefficients. It must be a positive integer and must be equal to the length of the reflection coefficients plus one. l defaults to 10.
Joint process step size of the adaptive filter. This scalar should be a value between zero and one. step defaults to 0.
Leakage factor of the adaptive filter. It must be a scalar between 0 and 1. Setting leakage less than one implements a leaky algorithm to estimate both the reflection and the joint process coefficients. leakage defaults to 1 (no leakage).
Specifies an optional offset for the denominator of the step size normalization term. It must be a scalar greater or equal to zero. A non-zero offset is useful to avoid divide-by-near-zero conditions when the input signal amplitude becomes very small. offset defaults to 1.
Reflection process step size of the adaptive filter. This scalar should be a value between zero and one. rstep defaults to step.
Initial common value of the forward and backward prediction error powers. It should be a positive value. 0.1 is the default value for delta.
Specifies the averaging factor used to compute the exponentially windowed forward and backward prediction error powers for the coefficient updates. lambda should lie in the range (0, 1]. lambda defaults to the value (1 - step).
Vector of initial reflection coefficients. It should be a length (l-1) vector. rcoeffs defaults to a zero vector of length (l-1).
Vector of initial joint process filter coefficients. It must be a length l vector. coeffs defaults to a length l vector of zeros.
Vector of the backward prediction error states of the adaptive filter. states defaults to a zero vector of length (l-1).
Since your adaptfilt.gal 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.gal objects. To show you the properties that apply, this table lists and describes each property for the affine projection filter object.
Defines the adaptive filter algorithm the object uses during adaptation
Specifies the averaging factor used to compute the exponentially-windowed forward and backward prediction error powers for the coefficient updates. Same as the input argument lambda.
Returns the minimum mean-squared prediction error. Refer to  in the bibliography 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
Returns the minimum mean-squared prediction error in the forward direction. Refer to  in the bibliography for details about linear prediction.
0 to 1
Leakage parameter of the adaptive filter. If this parameter is set to a value between zero and one, you implement a leaky GAL algorithm. leakage defaults to 1 — no leakage provided in the algorithm.
Offset for the normalization terms in the coefficient updates. Use this to avoid dividing by zero or by very small numbers when input signal amplitude becomes very small. offset 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.
Coefficients determined for the reflection portion of the filter during adaptation.
Size of the steps used to determine the reflection coefficients.
Vector of elements
Vector of the adaptive filter states. states defaults to a vector of zeros which has length equal to (l + projectord - 2).
0 to 1
Specifies the step size taken between filter coefficient updates
Perform a Quadrature Phase Shift Keying (QPSK) adaptive equalization using a 32-coefficient adaptive filter over 1000 iterations.
D = 16; % Number of delay samples b = exp(1j*pi/4)*[-0.7 1]; % Numerator coefficients a = [1 -0.7]; % Denominator coefficients 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) L = 32; % filter length mu = 0.007; % Step size ha = adaptfilt.gal(L,mu); [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;
To see the results, look at this figure.
Griffiths, L.J. "A Continuously Adaptive Filter Implemented as a Lattice Structure," Proc. IEEE® Int. Conf. on Acoustics, Speech, and Signal Processing, Hartford, CT, pp. 683-686, 1977
Haykin, S.,Adaptive Filter Theory, 3rd Ed., Upper Saddle River, NJ, Prentice Hall, 1996