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

    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 :

    or labview

    and also with arduino :

    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.


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

    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:

    in the code, search for:

    void xanr ()

    You can find a WIKI explaining spectral weighting algorithms here:

    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