−1.5 −1 −0.5 0 0.5 1 1.5 In−Phase Components Time Index Signal Value 0 200 400 600 800 1000 −1.5 −1 −0.5 0 0.5 1 1.5 Quadrature Components Time Index Signal Value −2 0 2 −3 −2 −1 0 1 2 3
Received Signal Scatter Plot
Real[x] Imag[x] −2 0 2 −3 −2 −1 0 1 2 3
Equalized Signal Scatter Plot
Real[y] Imag[y] Desired Output Error Desired Output Error
See Also
adaptfilt.tdafdft,adaptfilt.fdaf,adaptfilt.blmsReferences
Haykin, S.,Adaptive Filter Theory, 3rd Edition, Prentice Hall, N.J., 1996.Purpose
Adaptive filter that uses discrete Fourier transformSyntax
ha = adaptfilt.tdafdft(l,step,leakage,offset, delta,lambda,...coeffs,states)Description
ha = adaptfilt.tdafdft(l,step,leakage,offset,delta,lambda,...coeffs,states)constructs a transform-domain
adaptive filter objecthausing a discrete Fourier transform.
Input Arguments
Entries in the following table describe the input arguments for
adaptfilt.tdafdft.
Input
Argument Description
l Adaptive filter length (the number of coefficients or
taps) and it must be a positive integer. ldefaults
to 10.
step Adaptive filter step size. It must be a nonnegative
scalar. You can usemaxstep to determine a
reasonable range of step size values for the signals being processed. stepdefaults to 0.
leakage Leakage parameter of the adaptive filter. When
you set this argument to a value between zero and one, you are implementing a leaky version of the TDAFDFT algorithm. leakagedefaults to 1 — no
leakage.
offset Offset for the normalization terms in the coefficient
updates. You can use this argument to avoid dividing by zeros or by very small numbers when any of the FFT input signal powers become very small. offset
adaptfilt.tdafdft
Input
Argument Description
delta Initial common value of all of the transform domain
powers. Its initial value should be positive. delta
defaults to 5.
lambda Averaging factor used to compute the
exponentially-windowed estimates of the powers in the transformed signal bins for the coefficient updates. lambdashould lie between zero
and one. For default filter objects, LAMBDA equals (1 -step).
coeffs Initial time domain coefficients of the adaptive filter.
Set it to be a lengthlvector. coeffsdefaults to a
zero vector of lengthl.
states Initial conditions of the adaptive filter. states
defaults to a zero vector with length equal to (l- 1).
Properties
Since youradaptfilt.tdafdftfilter is an object, it has properties thatdefine its behavior in operation. Note that many of the properties are also input arguments for creatingadaptfilt.tdafdftobjects. To
show you the properties that apply, this table lists and describes each property for the transform domain filter object.
Name Range Description
Algorithm None Defines the adaptive filter
algorithm the object uses during adaptation
AvgFactor Averaging factor
used to compute the exponentially-windowed estimates of the powers in the transformed signal bins for the coefficient updates.AvgFactor
Name Range Description
should lie between zero and one. For default filter objects,
AvgFactorequals (1 -step). lambdais the input argument
that representAvgFactor. Coefficients Vector of
elements Vector containing the initialfilter coefficients. It must be a lengthlvector wherelis the
number of filter coefficients.
coeffsdefaults to lengthl
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
Leakage 0 to 1 Leakage parameter of the
adaptive filter. When you set this argument to a value between zero and one, you are implementing a leaky version of the TDAFDFT algorithm.
leakagedefaults to 1 — no
leakage.
Offset Offset for the normalization
terms in the coefficient updates. You can use this argument to avoid dividing by zeros or by very small numbers when any of the FFT input signal powers become very small. offset
adaptfilt.tdafdft
Name Range Description
PersistentMemory falseortrue Determines 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. PersistentMemory
returns to zero any state that the filter changes during processing. States that the filter does not change are not affected. Defaults tofalse. Power 2*l element
vector A vector of 2*initialized with the valuelelements, eachdelta
from the input arguments. As you filter data,Powergets
updated by the filter process.
States Vector of
elements, data type double
Vector of the adaptive filter states. statesdefaults to a
vector of zeros which has length equal to (l+projectord- 2). StepSize 0 to 1 Step size. It must be a
nonnegative scalar, greater than zero and less than or equal to 1. stepdefaults to 0.
Examples
Quadrature Phase Shift Keying (QPSK) adaptive equalization using a 32-coefficient FIR filter (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
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.01; % Step size ha = adaptfilt.tdafdft(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;
All of the time domain adaptive filter reference pages use this QPSK example. By comparing the results for each variation you get an idea of the differences in the way each one performs.
This figure demonstrates the results of running the example code shown.