Intel® Integrated Performance Primitives (Intel® IPP) Developer Guide and Reference

ID 790148
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

FIRLMS

Filters a vector through the FIR least mean squares (LMS) filter.

Syntax

IppStatus ippsFIRLMS_32f(const Ipp32f* pSrc, const Ipp32f* pRef, Ipp32f* pDst, int len, float mu, IppsFIRLMSState_32f* pState);

IppStatus ippsFIRLMS32f_16s(const Ipp16s* pSrc, const Ipp16s* pRef, Ipp16s* pDst, int len, float mu, IppsFIRLMSState32f_16s* pState);

Include Files

ipps.h

Domain Dependencies

Headers: ippcore.h, ippvm.h

Libraries: ippcore.lib, ippvm.lib

Parameters

pState

Pointer to the FIR LMS filter state structure.

pSrc

Pointer to the source vector .

pRef

Pointer to the reference signal

pDst

Pointer to the output signal

len

Number of elements in the vector.

mu

Adaptation step.

Description

Before calling this function, compute the size of the buffer required for the pState structure using FIRLMSGetStateSize and initialize the structure using FIRLMSInit.

This function filters a source vector pSrc using an adaptive FIR LMS filter.

Each of len iterations performed by the function consists of two main procedures. First, ippsLMS filters the current element of the source vector pSrc and stores the result in pDst. Next, the function updates the current taps using the reference signal pRef, the computed result signal pDst, and the adaptation step mu.

The filtering procedure can be described as a FIR filter operation:



Here the input sample to be filtered is denoted by x(n), the taps are denoted by h(i), and y(n) is the return value.

The function updates the filter coefficients that are stored in the filter state structure pState. Updated filter coefficients are defined as hn+1(i) = hn(i) + 2* mu* errVal * x(n-i),

where hn+1(i) denotes new taps, hn(i) denotes initial taps, mu and errVal are the adaptation step and adaptation error value, respectively. An adaptation error value errVal is computed inside the function as the difference between the output and reference signals.

Return Values

ippStsNoErr

Indicates no error.

ippStsNullPtrErr

Indicates an error when one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error when len is less than, or equal to 0.

ippStsContextMatchErr

Indicates an error when the state identifier is incorrect.