| Filter Design Toolbox™ | ![]() |
ha = adaptfilt.ftf(l,lambda,delta,gamma,gstates,coeffs,
states)
ha = adaptfilt.ftf(l,lambda,delta,gamma,gstates,coeffs,
states) constructs a fast transversal least squares
adaptive filter object ha.
Entries in the following table describe the input arguments for adaptfilt.ftf.
Input Argument | Description |
|---|---|
l | Adaptive filter length (the number of coefficients or taps) and it must be a positive integer. l defaults to 10. |
lambda | RLS forgetting factor. This is a scalar that should lie in the range (1-0.5/l, 1]. lambda defaults to 1. |
delta | 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. |
gamma | Conversion factor. gamma defaults to one specifying soft-constrained initialization. |
gstates | States of the Kalman gain updates. gstates defaults to a zero vector of length l. |
coeffs | Length l vector of initial filter coefficients. coeffs defaults to a length l vector of zeros. |
states | Vector of initial filter States. states defaults to a zero vector of length (l-1). |
Since your adaptfilt.ftf filter is an object, it has properties that define its operating behavior. Note that many of the properties are also input arguments for creating adaptfilt.ftf objects. To show you the properties that apply, this table lists and describes each property for the fast transversal least squares 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. |
ConversionFactor | Conversion factor. Called gamma when it is an input argument, it defaults to the matrix [1 -1] that specifies soft-constrained initialization. | |
FilterLength | Any positive integer | Reports the length of the filter, the number of coefficients or taps |
ForgettingFactor | RLS forgetting factor. This is a scalar that should lie in the range (1-0.5/l, 1]. lambda defaults to 1. | |
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. | |
KalmanGain | Empty when you construct the object, this gets populated after you run the filter. | |
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 + projectord - 2). |
System Identification of a 32-coefficient FIR filter by running the identification process for 500 iterations.
x = randn(1,500); % Input to the filter
b = fir1(31,0.5); % FIR system to be identified
n = 0.1*randn(1,500); % Observation noise signal
d = filter(b,1,x)+n; % Desired signal
N = 31; % Adaptive filter order
lam = 0.99; % RLS forgetting factor
del = 0.1; % Soft-constrained
% initialization factor
ha = adaptfilt.ftf(32,lam,del);
[y,e] = filter(ha,x,d);
subplot(2,1,1); plot(1:500,[d;y;e]);
title('System Identification of an FIR Filter');
legend('Desired','Output','Error');
xlabel('Time Index'); ylabel('signal value');
subplot(2,1,2); stem([b.',ha.Coefficients.']);
legend('Actual','Estimated');
xlabel('coefficient #'); ylabel('Coefficient Value');
grid on;For this example of identifying an unknown system, the figure shows that the adaptation process identifies the filter coefficients for the unknown FIR filter within the first 150 iterations.

adaptfilt.swftf, adaptfilt.rls, adaptfilt.lsl
D.T.M. Slock and Kailath, T., "Numerically Stable Fast Transversal Filters for Recursive Least Squares Adaptive Filtering," IEEE® Trans. Signal Processing, vol. 38, no. 1, pp. 92-114.
![]() | adaptfilt.filtxlms | adaptfilt.gal | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |