Filter Design Toolbox    
adaptfilt

Construct an adaptive filter object

Syntax

Description

ha = adaptfilt.algorithm('input1',input2,...) returns the adaptive filter object ha that uses the adaptive filtering technique specified by algorithm. When you construct an adaptive filter object, include an algorithm specifier to implement a specific adaptive filter. Note that you do not enclose the algorithm option in single quotation marks as you do for most strings. To construct an adaptive filter object you must supply an algorithm string--there is no default algorithm, although every constructor creates a default adaptive filter when you do not provide input arguments such as input1 or input2 in the calling syntax.

Algorithms

For adaptive filter (adaptfilt) objects, the algorithm string determines which adaptive filter algorithm your adaptfilt object implements. Each available algorithm entry appears in one of the tables along with a brief description of the algorithm. Click on the algorithm in the first column to get more information about the associated adaptive filter technique.

Least Mean Squares (LMS) Based FIR Adaptive Filters

adaptfilt.algorithm String
Description of the Adapting Algorithm Used to Generate Filter Coefficients During Adaptation
adaptfilt.adjlms
Use the Adjoint LMS FIR adaptive filter algorithm
adaptfilt.blms
Use the Block LMS FIR adaptive filter algorithm
adaptfilt.blmsfft
Use the FFT-based Block LMS FIR adaptive filter algorithm
adaptfilt.dlms
Use the delayed LMS FIR adaptive filter algorithm
adaptfilt.filtxlms
Use the filtered-x LMS FIR adaptive filter algorithm
adaptfilt.lms
Use the LMS FIR adaptive filter algorithm
adaptfilt.nlms
Use the normalized LMS FIR adaptive filter algorithm
adaptfilt.sd
Use the sign-data LMS FIR adaptive filter algorithm
adaptfilt.se
Use the sign-error LMS FIR adaptive filter algorithm
adaptfilt.ss
Use the sign-sign LMS FIR adaptive filter algorithm

For further information about an adapting algorithm, refer to the reference page for the algorithm.

Recursive Least Squares (RLS) Based FIR Adaptive Filters

adaptfilt.algorithm String
Description of the Adapting Algorithm Used to Generate Filter Coefficients During Adaptation
adaptfilt.ftf
Use the fast transversal least squares adaptation algorithm
adaptfilt.qrdrls
Use the QR-decomposition RLS adaptation algorithm
adaptfilt.hrls
Use the householder RLS adaptation algorithm
adaptfilt.hswrls
Use the householder SWRLS adaptation algorithm
adaptfilt.rls
Use the recursive-least squares (RLS) adaptation algorithm
adaptfilt.swrls
Use the sliding window (SW) RLS adaptation algorithm
adaptfilt.swftf
Use the sliding window FTF adaptation algorithm

For more complete information about an adapting algorithm, refer to the reference page for the algorithm.

Affine Projection (AP) FIR Adaptive Filters

adaptfilt.algorithm String
Description of the Adapting Algorithm Used to Generate Filter Coefficients During Adaptation
adaptfilt.ap
Use the affine projection algorithm that uses direct matrix inversion
adaptfilt.apru
Use the affine projection algorithm that uses recursive matrix updating
adaptfilt.bap
Use the block affine projection adaptation algorithm

To find more information about an adapting algorithm, refer to the reference page for the algorithm.

FIR Adaptive Filters in the Frequency Domain (FD)

adaptfilt.algorithm String
Description of the Adapting Algorithm Used to Generate Filter Coefficients During Adaptation
adaptfilt.fdaf
Use the frequency domain adaptation algorithm
adaptfilt.pbfdaf
Use the partition block version of the FDAF algorithm
adaptfilt.pbufdaf
Use the partition block unconstrained version of the FDAF algorithm
adaptfilt.tdafdct
Use the transform domain adaptation algorithm using DCT
adaptfilt.tdafdft
Use the transform domain adaptation algorithm using DFT
adaptfilt.ufdaf
Use the unconstrained FDAF algorithm for adaptation

For more information about an adapting algorithm, refer to the reference page for the algorithm.

Lattice Based (L) FIR Adaptive Filters

adaptfilt.algorithm String
Description of the Adapting Algorithm Used to Generate Filter Coefficients During Adaptation
adaptfilt.gal
Use the gradient adaptive lattice filter adaptation algorithm
adaptfilt.lsl
Use the least squares lattice adaptation algorithm
adaptfilt.qrdlsl
Use the QR decomposition least squares lattice adaptation algorithm

For more information about an adapting algorithm, refer to the reference page for the algorithm.

Properties for all Adaptive Filter Objects

Each reference page for an algorithm and adaptfilt.algorithm object specifies which properties apply to the adapting algorithm and how to use them.

Methods for Adaptive Filter Objects

As is true with all objects, methods enable you to perform various operations on adaptfilt objects. To use the methods, you apply them to the object handle that you assigned when you constructed the adaptfilt object.

Most of the analysis methods that apply to dfilt objects also work with adaptfilt objects. Methods like freqz rely on the filter coefficients in the adaptfilt object. Since the coefficients change each time the filter adapts to data, you should view the results of using a method as an analysis of the filter at a moment in time for the object. Use caution when you apply an analysis method to your adaptive filter objects--always check that your result approached your expectation.

In particular, the Filter Visualization Tool (FVTool) supports all of the adaptfilt objects. Analyzing and viewing your adaptfilt objects is straightforward--use the fvtool method with the name of your object

to lauch FVTool and work with your object.

Some methods share their names with functions in the Signal Processing Toolbox, or even functions in this toolbox. Functions that share names with methods behave in a similar way. Using the same name for more than one function or method is called overloading and is common is many toolboxes.

Method
Description
adaptfilt/coefficients
Return the instantaneous adaptive filter coefficients
adaptfilt/filter
Apply an adaptfilt object to your signal
adaptfilt/freqz
Plot the instantaneous adaptive filter frequency response
adaptfilt/grpdelay
Plot the instantaneous adaptive filter group delay
adaptfilt/impz
Plot the instantaneous adaptive filter impulse response.
adaptfilt/info
Return the adaptive filter information.
adaptfilt/isfir
Test whether an adaptive filter is an finite impulse response (FIR) filters.
adaptfilt/islinphase
Test whether an adaptive filter is linear phase
adaptfilt/ismaxphase
Test whether an adaptive filter is maximum phase
adaptfilt/isminphase
Test whether an adaptive filter is minimum phase
adaptfilt/isreal
True whether an adaptive filter has real coefficients
adaptfilt/isstable
Test whether an adaptive filter is stable
adaptfilt/maxstep
Return the maximum step size for an adaptive filter
adaptfilt/msepred
Return the predicted mean square error
adaptfilt/msesim
Return the measured mean square error via simulation.
adaptfilt/phasez
Plot the instantaneous adaptive filter phase response
adaptfilt/reset
Reset an adaptive filter to initial conditions
adaptfilt/stepz
Plot the instantaneous adaptive filter step response
adaptfilt/tf
Return the instantaneous adaptive filter transfer function
adaptfilt/zerophase
Plot the instantaneous adaptive filter zerophase response
adaptfilt/zpk
Return a matrix containing the instantaneous adaptive filter zero, pole, and gain values
adaptfilt/zplane
Plot the instantaneous adaptive filter in the Z-plane

Working with Adaptive Filter Objects

The next sections cover viewing and changing the properties of adaptfilt objects. Generally, modifying the properties is the same for adaptfit, dfilt, mfilt, and qfilt objects and most of the same methods apply to all.

Viewing Object Properties

As with any object, you can use get to view a adaptfilt object's properties. To see a specific property, use

To see all properties for an object, use

Changing Object Properties

To set specific properties, use

You must use single quotation marks around the property name so MATLAB treats them as strings.

Copying an Object

To create a copy of an object, use copy.

Using Filter States

Two properties control your adaptive filter states.

Examples

Construct an LMS adaptive filter object and use it to identify an unknown system. For this example, use 500 iteration of the adapting process to determine the unknown filter coefficients. Using the LMS algorithm represents one of the most straightforward technique for adaptive filters.

Glancing at the figure shows you the coefficients after adapting closely match the desired unknown FIR filter.

See Also

dfilt, filter, mfilt


  Functions--Alphabetical List adaptfilt.adjlms 

Learn more about the latest releases of MathWorks products:

 © 1994-2009 The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS