C64x LMS Adaptive FIR - LMS adaptive FIR filtering

Library

C64x DSP Library — Filtering

Description

The C64x 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 supports little-endian code generation only.

The rounding mode used is floor, and the saturation mode is wrap. All intermediate products have s32Q30 data type. The update equation is as follows:

where N is the number of filter taps.

Dialog Box

Number of FIR filter taps

Designate the number of filter taps. The number of taps must be a positive integer that is also a multiple of four.

Initial value of filter taps

Enter the initial value of the filter taps.

Output filter coefficients H?

If you select this option, the filter taps are produced as output H. If you do not select this option, H is suppressed.

Algorithm

In simulation, the LMS Adaptive FIR block is equivalent to the TMS320C64x 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 adaptfilt.lms function in Filter Design Toolbox™ software. adaptfilt.lms 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.

  


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