| CMSIS-DSP Verison 1.4.1 CMSIS DSP Software Library

- CMSIS
- CORE
- DSP
- RTOS API
- SVD

- Main Page
- Usage and Description
- Reference

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Signal Convergence Example
Examples

Description:

  Demonstrates the ability of an adaptive filter to "learn" the transfer function of a FIR lowpass filter using the Normalized LMS Filter, Finite Impulse Response (FIR) Filter, and Basic Math Functions.

Algorithm:

  The figure below illustrates the signal flow in this example. Uniformly distributed white noise is passed through an FIR lowpass filter. The output of the FIR filter serves as the reference input of the adaptive filter (normalized LMS filter). The white noise is input to the adaptive filter. The adaptive filter learns the transfer function of the FIR filter. The filter outputs two signals: (1) the output of the internal adaptive FIR filter, and (2) the error signal which is the difference between the adaptive filter and the reference output of the FIR filter. Over time as the adaptive filter learns the transfer function of the FIR filter, the first output approaches the reference output of the FIR filter, and the error signal approaches zero.

  The adaptive filter converges properly even if the input signal has a large dynamic range (i.e., varies from small to large values). The coefficients of the adaptive filter are initially zero, and then converge over 1536 samples. The internal function test_signal_converge() implements the stopping condition. The function checks if all of the values of the error signal have a magnitude below a threshold DELTA.

Block Diagram:

Variables Description:

  - `testInput_f32` points to the input data
  - `firStateF32` points to FIR state buffer
  - `lmsStateF32` points to Normalised Least mean square FIR filter state buffer
  - `FIRCoeff_f32` points to coefficient buffer
  - `lmsNormCoeff_f32` points to Normalised Least mean square FIR filter coefficient buffer
  - `wire1`, wir2, wire3 temporary buffers
  - `errOutput`, err_signal temporary error buffers

CMSIS DSP Software Library Functions Used:

  - arm_lms_norm_init_f32()
  - arm_fir_init_f32()
  - arm_fir_f32()
  - arm_lms_norm_f32()
  - arm_scale_f32()
  - arm_abs_f32()
  - arm_sub_f32()
  - arm_min_f32()
  - arm_copy_f32()

Refer arm_signal_converge_example_f32.c