ADAU1787 Matrix Multiplication?
Hello.
I am currently working on noise cancellation for an earphone. I am planning to implement a custom Adaptive RLS filter for this task.
I have the ADAU1787 Sigma IC evaluation board with me. In order to implement the filter, I need to do some matrix multiplications and update the filter coefficients adaptively.
Can I achieve this with the ADAU1787?
I would also like to know if there is a way to store a set of coefficients in some memory block to be used for the next calculation.
Thanks.
Dhanuja.
Edit Notes
I have ADAU1787 Sigma IC
[edited by: dhanuja at 6:53 AM (GMT -4) on 9 Jul 2023]
adau1452
software
ADAU1787
sigmaStudio 4.7
adau1467
matrix
Noise cancellation
Show More
Hi dhanuja,
I'm going to look into this question for you and get back to you as soon as I can. I will consult with some other ADI team members and get back to you with an example project that hopefully clears up your confusion.
I'll reach back out soon.
Best,
TM
I am looking forward to a solution. Thank you.
Hi Dhanuja,
After consulting with some other team members, the ADAU1787 is not powerful enough to iteratively generate new coefficients for ANC on its own.
The FDSP core would be the ideal core you would use for ANC on the 1787 as it uses a RISC architecture (i.e., reduced instruction set) in order to achieve minimal latency, but is limited to 64 instructions per frame. You would not try to setup this type of project using the SigmaDSP as this core is stream-based and typically used for instructions such as volume control, sensor level readings, or higher latency tasks.
Realistically, you would need an external device, such as a Microcontroller, to calculate and update your adaptive filer coefficients via I2C or SPI to write to the Parameter Memory of the ADAU1787.
However, the FDSP core does include a useful feature known as Parameter Bank Switching. With this feature you can utilize 3 banks of parameters, or 3 sets of filter coefficients, and set one of these filter banks active to the FDSP at any given time. These coefficients are stored in a different section of the memory called Parameter Memory.
So, in theory, you could use an external device to calculate your coefficients and write these values into the Parameter Memory of one of the inactive Parameter Banks, and then switch the active filter bank to this newly written Filter Bank on the next frame. You could then toggle back and forth by filtering with Bank A (or B) while writing a new set of coefficients to Bank B (or A) and switching the active filter bank to the newest set of coefficients. Alternatively, the 3rd option of Filter Bank C could serve as a Bypass set of coefficients that allow you to hear the unprocessed signal to gauge the performance of your ANC model.
However, the setup for this theoretical model is a bit out-of-scope for trying to setup an example project for you. The ADAU1787 Datasheet specifies the Parameter Bank Switching, Parameter Memory, and Filter Coefficient Format starting around page 41. These sections also mention the necessary bits that must change to initiate the Parameter Bank Switching, additionally with the help of Interrupts/Flags and Conditional Executions.
Lastly, the FDSP core utilizes biquad filters that use a maximum of 5 coefficients per filter bank with 28 bits of resolution, where 5 bits are left of decimal point, and 23 bits are for right of the decimal point. So, your filter design may need to be readjusted to accommodate this format.
I hope this explanation helped clear up some confusion, and that my suggestions can help you utilize the ADAU1787 for your project.
If you were interested in a product that could calculate its own filter coefficients, I would suggest the ADAU1452, as it should have enough processing power your project calls for from a standalone device.
If you had anymore insight into your project you could share, that could be helpful for me to continue to help with the customer support. Hope you found all this information helpful!
Best,
TM
Hello TMB,
Thank you very much for this detailed answer. It seems that we (our team) will not be able to implement the adaptive RLS filter with the ADAU1787S chip that we have.
But, I have a related question about adaptive filter implementation using ADAU1787. In SigmaStudio it shows that ADAU1787S(Sigma Core) supports an adaptive filter of type NLMS (Normalized Least Mean Squares). It is found under ADAU1787S->filters->FIR->adaptive->NLMS filter. But we were unable to get any satisfactory level of noise cancellation with this filter.
Does not ADAU1787S support NLMS filter although it is given in SigmaStudio? Can you provide some clarification about this.
Best Regards,
dhanuja
Hi Dhanuja,
The reason why the ADAU1787S supports the NLMS filter is because it is a Sigma200 Core and previous ADI parts that have this type of core, but no FastDSP core, used this algorithm to achieve applications like echo cancellation and noise removal.
Here's a link to example code for Acoustic Echo Cancellation and Noise Removal using the ADAU1452 and ADAU1467 boards - Here
Essentially, the SigmaStudio programming environment will include all algorithm blocks that are available to a Sigma200 core since the ADAU1787 uses that same core. However, with the addition of the FastDSP core, any ANC applications are best suited for the FDSP core due its low latency advantages.
I unfortunately do not have any good ANC example projects that utilize the FDSP core, but if you wanted to send me your example project, I'd be happy to take a look and help with the setup. Though it may take until next week for me to get back to you.
Best,
TM
Hello TBM,
Thank you again for the detailed answer. From what I understood the NLMS algorithm available for ADAU1787S (SigmaDSP core) may not be optimized for ANC applications. We are planning to give another go with the ADAU1787S chip we have (maybe by adding some filters). I will send you more details of our ANC implementation if further support is needed.
The support you gave is greatly appreciated. Keep up the good work.
Best Regards,
Dhanuja.
Please log in to reply.