Embedded Target for Texas Instruments C6000 DSPs    
LMS Adaptive FIR

Filter a scalar input using least-mean-square adaptive filtering

Library

C62x DSP Library--Filtering

Description

The LMS Adaptive FIR block performs least-mean-square (LMS) adaptive filtering. This filter is implemented using a direct form structure.

The following constraints apply to the inputs and outputs of this block:

This block performs LMS adaptive filtering according to the equations

and

where

For this block, the input and the output are defined by

which combined with the first two equations, result in the following equations that this block follows:

and must be produced externally to the LMS Adaptive FIR block. See Examples below for a sample model where this is done.

The LMS Adaptive FIR block supports discrete sample times and both little-endian and big-endian code generation.

Dialog Box

Number of FIR filter taps
Designate the number of filter taps. The number of taps must be a positive, even integer.
Initial value of filter taps
Enter the initial value of the filter taps.
Output filter coefficients H?
If selected, the filter taps are produced as output H. If not selected, H is suppressed.

Algorithm

In simulation, the LMS Adaptive FIR block is equivalent to the TMS320C62x DSP Library assembly code function DSP_firlms2. During code generation, this block calls the DSP_firlms2 routine to produce optimized code.

Examples

The following model uses the LMS Adaptive FIR block.

The portion of the model enclosed by the dashed line produces the signal and feeds it back into the LMS Adaptive FIR block. The inputs to this region are and the desired signal , and the output of this region is the vector of filter taps . Thus this region of the model acts as a canonical LMS adaptive filter. For example, compare this region to the adaptlms function in the Filter Design Toolbox. adaptlms performs canonical LMS adaptive filtering and has the same inputs and output as the outlined section of this model.

To use the LMS Adaptive FIR block you must create the input in some way similar to the one shown here. You must also provide the signals and . This model simulates the desired signal by feeding into a digital filter block. You can simulate your desired signal in a similar way, or you may bring in from the workspace with a From Workspace or codec block.


  General Real FIR Matrix Multiply