Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mlib_signalnlmsfilternonadapt_f32s_f32s(3mlib) [opensolaris man page]

mlib_SignalNLMSFilter(3MLIB)				    mediaLib Library Functions				      mlib_SignalNLMSFilter(3MLIB)

NAME
mlib_SignalNLMSFilter, mlib_SignalNLMSFilterInit_S16_S16, mlib_SignalNLMSFilterInit_S16S_S16S, mlib_SignalNLMSFilterInit_F32_F32, mlib_Sig- nalNLMSFilterInit_F32S_F32S, mlib_SignalNLMSFilter_S16_S16_Sat, mlib_SignalNLMSFilter_S16S_S16S_Sat, mlib_SignalNLMSFilter_F32_F32, mlib_SignalNLMSFilter_F32S_F32S, mlib_SignalNLMSFilterNonAdapt_S16_S16_Sat, mlib_SignalNLMSFilterNonAdapt_S16S_S16S_Sat, mlib_SignalNLMS- FilterNonAdapt_F32_F32, mlib_SignalNLMSFilterNonAdapt_F32S_F32S, mlib_SignalNLMSFilterFree_S16_S16, mlib_SignalNLMSFilterFree_S16S_S16S, mlib_SignalNLMSFilterFree_F32_F32, mlib_SignalNLMSFilterFree_F32S_F32S - normalized least mean square (NLMS) adaptive filtering SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ] #include <mlib.h> mlib_status mlib_SignalNLMSFilterInit_S16_S16(void **filter, const mlib_f32 *flt, mlib_s32 tap, mlib_f32 beta); mlib_status mlib_SignalNLMSFilterInit_S16S_S16S(void **filter, const mlib_f32 *flt, mlib_s32 tap, mlib_f32 beta); mlib_status mlib_SignalNLMSFilterInit_F32_F32(void **filter, const mlib_f32 *flt, mlib_s32 tap, mlib_f32 beta); mlib_status mlib_SignalNLMSFilterInit_F32S_F32S(void **filter, const mlib_f32 *flt, mlib_s32 tap, mlib_f32 beta); mlib_status mlib_SignalNLMSFilter_S16_S16_Sat(mlib_s16 *dst, const mlib_s16 *src, const mlib_s16 *ref, void *filter, mlib_s32 n); mlib_status mlib_SignalNLMSFilter_S16S_S16S_Sat(mlib_s16 *dst, const mlib_s16 *src, const mlib_s16 *ref, void *filter, mlib_s32 n); mlib_status mlib_SignalNLMSFilter_F32_F32(mlib_f32 *dst, const mlib_f32 *src, const mlib_f32 *ref, void *filter, mlib_s32 n); mlib_status mlib_SignalNLMSFilter_F32S_F32S(mlib_f32 *dst, const mlib_f32 *src, const mlib_f32 *ref, void *filter, mlib_s32 n); mlib_status mlib_SignalNLMSFilterNonAdapt_S16_S16_Sat(mlib_s16 *dst, const mlib_s16 *src, const mlib_s16 *ref, void *filter, mlib_s32 n); mlib_status mlib_SignalNLMSFilterNonAdapt_S16S_S16S_Sat(mlib_s16 *dst, const mlib_s16 *src, const mlib_s16 *ref, void *filter, mlib_s32 n); mlib_status mlib_SignalNLMSFilterNonAdapt_F32_F32(mlib_f32 *dst, const mlib_f32 *src, const mlib_f32 *ref, void *filter, mlib_s32 n); mlib_status mlib_SignalNLMSFilterNonAdapt_F32S_F32S(mlib_f32 *dst, const mlib_f32 *src, const mlib_f32 *ref, void *filter, mlib_s32 n); void mlib_SignalNLMSFilterFree_S16_S16(void *filter); void mlib_SignalNLMSFilterFree_S16S_S16S(void *filter); void mlib_SignalNLMSFilterFree_F32_F32(void *filter); void mlib_SignalNLMSFilterFree_F32S_F32S(void *filter); DESCRIPTION
The normalized LMS adaptive algorithm is summarized as follows: 1. Initialize the weights Wk(i), i = 0, 1, ..., tap - 1. 2. Initialize previous source elements Xo(i), i = 0, 1, ..., tap - 1. 3. Read Xk(t) from src and Yk(t) from ref, t = 0, 1, ..., n - 1. 4. Compute filter output: nk = sum(Wk(i) * Xk(t - i)), i = 0, 1, ..., tap - 1. If i > t, use previous source elements stored in the Xo vector. 5. Compute source elements power: Pwk = sum(Xk(t - i) * Xk(t - i)), i = 0, 1, ..., tap - 1. If i > t, use previous source elements stored in the Xo vector. 6. Store filter output : dst[t] = nk. 7. Compute the error estimate: Ek = Yk - nk. 8. Compute factor BE0 = 2 * beta * Ek / Pwk. 9. Update filter weights: Wk(i) += BE0 * Xk(t - i), i = 0, 1, ..., tap - 1. If i > t, use previous source elements stored in the Xo vector. 10. Next t, go to step 3. 11. Store N ending source elements in previous source elements vector Xo: if N > n, N = n; else N = tap. Each of the FilterInit functions allocates memory for the internal filter structure and converts the parameters into the internal represen- tation. Each of the Filter functions applies the NLMS adaptive filter on one signal packet and updates the filter states. Each of the FilterNoAdapt functions applies the NLMS filter on one signal packet and updates the filter states but without changing the filter weights. Each of the FilterFree functions releases the memory allocated for the internal filter structure. PARAMETERS
Each of the functions takes some of the following arguments: filter Internal filter structure. flt Filter coefficient array. tap Taps of the filter. beta Error weighting factor. 0 < beta < 1. dst Destination signal array. src Source signal array. ref Reference or "desired" signal array. n Number of samples in the source signal array. RETURN VALUES
Each of the FilterInit, Filter and FilterNonAdapt functions returns MLIB_SUCCESS if successful. Otherwise it returns MLIB_FAILURE. The Fil- terFree functions don't return anything. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Committed | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
mlib_SignalLMSFilter(3MLIB), attributes(5) SunOS 5.11 10 Sep 2007 mlib_SignalNLMSFilter(3MLIB)
Man Page