Contents

dsp.FastTransversalFilter System object

Package: dsp

Fast Transversal filter

Description

The dsp.FastTransversalFilter computes output, error and coefficients using a fast transversal least-squares FIR adaptive filter.

To implement the adaptive FIR filter object:

  1. Define and set up your adaptive FIR filter object. See Construction.

  2. Call step to implement the filter according to the properties of dsp.FastTransversalFilter. The behavior of step is specific to each object in the toolbox.

Construction

H = dsp.FastTransversalFilter returns a System object™, H, which is a fast transversal, least-squares FIR adaptive filter. This System object is used to compute the filtered output and the filter error for a given input and desired signal.

H = dsp.FastTransversalFilter('PropertyName', PropertyValue,...) returns a FastTransversalFilter System object, H, with each specified property set to the specified value.

H = dsp.FastTransversalFilter(LEN,'PropertyName',PropertyValue,...) returns a FastTrasversalFilter System object, H. In this case, the Length property set to LEN, and other specified properties set to the specified values.

Properties

Method

Method to calculate filter coefficients

Specify the method used to calculate filter coefficients as one of 'Fast transversal least-squares' |'Sliding-window fast transversal least-squares'. The default value is ‘Fast transversal least-squares'. For algorithms used to implement these three different methods, refer to [1]. This property is nontunable.

Length

Length of filter coefficients vector

Specify the length of the FIR filter coefficients vector as a positive integer value. This property is nontunable.

The default value is 32.

SlidingWindowBlockLength

Width of sliding window

Specify the width of the sliding window as a positive integer value greater than or equal to the Length property value. This property applies only if the Method property is set to 'Sliding-window fast transversal least-squares'. The default vale is the value of the Length property. This property is nontunable.

ForgettingFactor

Fast transversal filter forgetting factor

Specify the fast transversal filter forgetting factor as a positive numeric value. Setting this value to 1 denotes infinite memory while adaptation. Setting this property value to 1 denotes infinite memory while adapting to find the new filter. For best results, set this property to a value that lies in the range (1-0.5/L, 1], where L is the Length property value. This property applies only if the Method property is set to 'Fast transversal least-squares'. The default value is 1.

InitialPredictionErrorPower

Initial prediction error power

Specify the initial value of the forward and backward prediction error vectors as a positive numeric scalar. This scalar should be sufficiently large to maintain stability and prevent an excessive number of Kalman gain rescues. The default value is 10.

InitialConversionFactor

Initial conversion factor (gamma)

Specify the initial value of the conversion factor of the fast transversal filter. If the Method property is set to 'Fast transversal least-squares', this property must be a positive numeric value less than or equal to 1. In this case, the default value is 1. If the Method property is set to 'Sliding-window fast transversal least-squares', this property must be a 2-element numeric vector. The first element of this vector must lie within the range (0,1], and the second element must be less than or equal to -1. In this case, the default value is [1, -1].

InitialCoefficients

Initial coefficients of the filter

Specify the initial values of the FIR adaptive filter coefficients as a scalar or a vector of length equal to the value of the Length property. The default value is 0.

LockCoefficients

Locked status of the coefficient updates

Specify whether to lock the filter coefficient values. By default, the value of this property is false, and the object continuously updates the filter coefficients. If this property is set to true, the filter coefficients do not update and their values remain the same.

Methods

cloneCreate Fast Transversal filter object with same property values
isLockedLocked status for input attributes and nontunable properties
msesimMean-square error for Fast Transversal filter
releaseAllow property value and input characteristics changes
resetReset filter states for Fast Transversal filter
stepApply Fast Transversal filter to input

Examples

expand all

System Identification Using Fast Transversal Filter

hftf1 = dsp.FastTransversalFilter(11,'ForgettingFactor',0.99);
hfilt = dsp.FIRFilter;
hfilt.Numerator = fir1(10,.25);
x = randn(1000,1);
d = step(hfilt,x) + 0.01*randn(1000,1);
[y,e] = step(hftf1,x,d);
w = hftf1.Coefficients;
subplot(2,1,1);
plot(1:1000,[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([hfilt.Numerator; w].');
legend('Actual','Estimated');
xlabel('coefficient #');
ylabel('coefficient value');

References

[1] Haykin, Simon. Adaptive Filter Theory, 4th Ed. Upper Saddle River, NJ: Prentice Hall, 2002

Was this topic helpful?