Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: LMS for ANC with teensy audio board

  1. #1
    Junior Member
    Join Date
    May 2018
    Posts
    1

    LMS for ANC with teensy audio board

    Hi everyone,

    I am currently looking to use teensy 3.6 and sgtl5000 in order to do some acoustic noise cancelling in real time thanks to LMS filtering.

    Does anyone already tried this ? I found some stuffs about the subject on matlab : https://fr.mathworks.com/help/dsp/ex...ation-lms.html

    or labview http://www.ni.com/example/31218/en/

    and also with arduino : https://github.com/wespo/LMS/blob/ma...es/PPG/PPG.ino

    howver it is not clear for me how to use it in real time.

    It would be great if anyone could help to drive me to the solutions.

    Cheers

  2. #2
    Senior Member DD4WH's Avatar
    Join Date
    Oct 2015
    Location
    Central Europe
    Posts
    225
    Hi!
    the ARM libraries make implementation of the LMS algorithms quite easy.
    There are versions for fixed point and for floating point.

    https://www.keil.com/pack/doc/CMSIS/...LMS__NORM.html

    If your realtime signal already has a good SNR, LMS can be very effective. Also an autonotch filter using LMS is very nice to eliminate annoying carriers/single tones.

    However, in low SNR situations, a spectral noise reduction using spectral weighting outperforms the LMS algorithm easily.

    We implemented three algorithms for the Teensy Convolution SDR:
    - LMS
    - leaky LMS (taken from the excellent wdsp library)
    - spectral weighting

    However, you would need to make the Teensy use floating point for all real time audio queuing in order to make the spectral weighting algorithm work.

    You can find code for a Teensy 3.6.-based software defined radio using all three algorithms here:

    https://github.com/DD4WH/Teensy-Conv...lution_SDR.ino

    in the code, search for:

    spectral_noise_reduction
    LMS_NoiseReduction
    void xanr ()

    You can find a WIKI explaining spectral weighting algorithms here:

    https://github.com/df8oe/UHSDR/wiki/Noise-reduction

    Have fun!

    All the best,

    Frank DD4WH

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •