| Filter Design Toolbox |
 |
adaptfilt.gal
Construct a gradient adaptive lattice FIR filter
Syntax
ha = adaptfilt.gal(l,step,leakage,offset,rstep,delta,lambda,...
rcoeffs,coeffs,states)
Description
ha = adaptfilt.gal(l,step,leakage,offset,rstep,delta,lambda,...
rcoeffs,coeffs,states)
constructs a gradient adaptive lattice FIR filter ha.
Input Arguments
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).
|
adaptfilt.gal Object Properties
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
|
FilterLength
|
Any positive integer
|
Reports the length of the filter, the number of coefficients or taps
|
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.
|
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
|
|
Specifies the step size taken between filter coefficient updates
|
Leakage
|
|
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.
|
ReflectionCoeffs
|
|
|
FwdPredErrorPower
|
|
|
BkwdPredErrorPower
|
|
|
ReflectionCoeffsStep
|
|
|
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.
|
ResetBeforeFiltering
|
off or on
|
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. ResetBeforeFiltering returns to zero any state that the filter changes during processing. States that the filter does not change are not affected. Defaults to 'on'.
|
NumSamplesProcessed
|
Any integer
|
Returns the number of samples processed during filtering. As a check, the number of samples reported processed plus the number of nonprocessed samples should be the total number of input samples. Defaults to zero.
|
Examples
Perform a Quadrature Phase Shift Keying (QPSK) adaptive equalization using a 32-coefficient adaptive filter over 1000 iterations.
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)
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;
See Also
adaptfilt.qrdlsl, adaptfilt.lsl, adaptfilt.tdafdft
References
L.J. Griffiths, "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
S. Haykin, Adaptive Filter Theory, 3rd Ed., Upper Saddle River, NJ, Prentice Hall, 1996
| adaptfilt.ftf | | adaptfilt.hrls |  |
Learn more about the latest releases of MathWorks products:
|