Engee documentation

EngeeDSP.FastTransversalFilter

Fast transversal adaptive FIR filter using the least squares method.

Library

EngeeDSP

Description

System object EngeeDSP.FastTransversalFilter calculates the output data and the filtering error using a fast transversal adaptive FIR filter using the least squares method.

To implement an adaptive FIR filter, follow these steps:

  1. Create an object EngeeDSP.FastTransversalFilter and set its properties.

  2. Call the object with arguments as if it were a function.

To learn more about how to work with system objects, see Engee System Objects.

Syntax

Creation

  • ftf = EngeeDSP.FastTransversalFilter() — returns the system object of the fast transversal adaptive FIR filter ftf, which works using the least squares method. This object calculates the filtered output signal and the filtering error based on the specified input and required signals.

  • ftf = EngeeDSP.FastTransversalFilter(length) — returns the system object of the fast transversal adaptive FIR filter ftf, working using the least squares method, which has for the property Length value set length.

  • ftf = EngeeDSP.FastTransversalFilter(_,Name=Value) — returns the system object of the fast transversal adaptive FIR filter ftf, working by the least squares method, with the specified properties in the form of a pair Name=Value, where Name — the name of the property, and Value — the appropriate value. You can specify multiple pairs «name-value» the order of the pairs does not matter. Unspecified properties retain their default values.

Using

  • y,err = ftf(x,d) — filters the input signal x using d as the required signal, and returns the filtered signal y, as well as a filtering error err.

Arguments

Input arguments

# x — input signal

+ scalar | column vector

Details

The signal that will be filtered by the fast transversal filter system object. The input signal x and the required signal d they must have the same size and data type.

Типы данных

Float32, Float64

Support for complex numbers

Yes

# d — required signal

+ scalar | column vector

Details

The fast transversal filter adapts its coefficients to minimize error. err and the most accurate approximation of the input signal x to the required signal d.

The input signal x and the required signal d they must have the same size and data type.

Типы данных

Float32, Float64

Support for complex numbers

Yes

Output arguments

# y — filtered output signal

+ scalar | column vector

Details

The filtered output signal returned as a scalar or column vector. The object adapts the filter coefficients for the convergence of the input signal x to the required signal d. The filter outputs a signal that has reached the convergence state.

Типы данных

Float32, Float64

Support for complex numbers

Yes

# err — difference between output and required signals

+ scalar | column vector

Details

The difference between the output signal y and the required signal d, returned as a scalar or column vector. The purpose of the adaptive filter is to minimize this error. The object adapts its coefficients, striving for optimal values at which the output signal is as close as possible to the required one.

Типы данных

Float32, Float64

Support for complex numbers

Yes

Features

# Length — length of the filter coefficient vector
Int64 integer

Details

The length of the vector of filter coefficients, specified as a positive integer.

By default — 32.

# Method — method for calculating filter coefficients
String

Details

The method for calculating the filter coefficients, given as "Fast transversal least-squares" (By default) or "Sliding-window fast transversal least-squares". The algorithms for implementing these two methods are described in [1].

# InitialPredictionErrorPower — the initial power of the prediction error
Real number

Details

The initial value of the forward and reverse prediction error vectors, given as a positive scalar. This value should be large enough to ensure stability and prevent excessively frequent triggering of the Kalman gain recovery mechanism.

By default — 10.

# ForgettingFactor — forgetting factor for fast transversal filter
Real number

Details

The forgetting coefficient for a fast transversal filter, given as a scalar in the range (0, 1]. Value 1 means infinite memory when adapting to find new filter coefficients.

For best results, set the value of this property to the range [1 − 0.5/L, 1], where L — property value Length.

By default — 1.

Dependencies

To use this property, set the property to Method value "Fast transversal least-squares".

# InitialConversionFactor — the initial value of the conversion factor for a fast transversal filter

Details

The initial value of the conversion factor for a fast transversal filter.

The value of this property depends on the property Method:

  • "Fast transversal least-squares" — the InitialConversionFactor property must represent a positive scalar that is less than or equal to 1. In this case, the By default value is 1.

  • "Sliding-window fast transversal least-squares" — the InitialConversionFactor property must be a vector of two elements. The first element of the vector must be in the range [0, 1], and the second is to be less than or equal to −1. In this case, the By default value is [1, −1].

# InitialCoefficients — initial filter coefficients

Details

The initial values of the coefficients of the adaptive FIR filter, set as a scalar or vector, the length of which is equal to the value of the property Length.

By default — 0.

# LockCoefficients — fixing the filter coefficients
Logical

Details

Fixing the values of the filter coefficients, set as false (By default) or true. Value false means that the object continuously updates the filter coefficients. If this property is set to true The filter coefficients are not updated and their values remain unchanged.

# SlidingWindowBlockLength — sliding window width
Real number

Details

The width of the sliding window, set as a positive integer that is greater than or equal to the value of the property Length. The value of the Length property is used By default.

Dependencies

To use this property, set the property to Method value "Sliding-window fast transversal least-squares".

Methods

Common to all system objects

step!

Run the system object operation algorithm

release!

Allow changing the value of a system object property

reset!

Resetting the internal states of a system object

Literature

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