Documentation Center |
FIR adaptive filter that uses gradient lattice
ha = adaptfilt.gal(l,step,leakage,offset,rstep,delta,
lambda,...rcoeffs,coeffs,states)
ha = adaptfilt.gal(l,step,leakage,offset,rstep,delta,
lambda,...rcoeffs,coeffs,states) constructs a
gradient adaptive lattice FIR 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.
Entries in the following table describe the input arguments for adaptfilt.gal.
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 reflection coefficients plus one. l defaults to 10. |
step | Joint process step size of the adaptive filter. This scalar should be a value between zero and one. step defaults to 0. |
leakage | 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). |
offset | 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. |
rstep | Reflection process step size of the adaptive filter. This scalar should be a value between zero and one. rstep defaults to step. |
delta | 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. |
lambda | 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). |
rcoeffs | Vector of initial reflection coefficients. It should be a length (l-1) vector. rcoeffs defaults to a zero vector of length (l-1). |
coeffs | Vector of initial joint process filter coefficients. It must be a length l vector. coeffs defaults to a length l vector of zeros. |
states | 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.
Name | Range | Description |
---|---|---|
Algorithm | None | Defines the adaptive filter algorithm the object uses during adaptation |
AvgFactor | 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. | |
BkwdPredErrorPower | Returns the minimum mean-squared prediction error. 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 |
FwdPredErrorPower | Returns the minimum mean-squared prediction error in the forward direction. Refer to [2] in the bibliography for details about linear prediction. | |
Leakage | 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 | 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. | |
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. |
ReflectionCoeffs | Coefficients determined for the reflection portion of the filter during adaptation. | |
ReflectionCoeffsStep | Size of the steps used to determine the reflection coefficients. | |
States | Vector of elements | Vector of the adaptive filter states. states defaults to a vector of zeros which has length equal to (l + projectord - 2). |
StepSize | 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