Directional mems from omni stereo pair (Help)

stuartiannaylor
Posts: 17
Joined: Wed Dec 02, 2020 6:02 pm

Directional mems from omni stereo pair (Help)

Postby stuartiannaylor » Tue Dec 08, 2020 5:27 am

In the Invensense Application Note AN-1140 there is some great info on Microphone Array Beamforming
https://invensense.tdk.com/wp-content/u ... orming.pdf

Which for many applications would be real neat but thinking to help improve far field an endfire 2nd order beamformer would actually be relatively easy to make.
So here is my disclaimer as my ESP32 & C knowledge currently is truly woeful so calling out for help if you can.
As if I can grab your skills just to test how that application note pans out before hacking some truly woeful code it might be better if someone else gives a helping hand.

I have created a repo https://github.com/StuartIanNaylor/esp32-i2s-endfire which is wishful thinking or even better if you wish to take the project on then please do.

The code is fairly simple as the speed of sound is 343m/s and the sampling rate max is 48Khz which a single sample equates to 7.15mm.
I am going to follow what is documented at first with a 2-microphone differential array beamformer on a 21 mm spacing and its surprising simple what we need in code.

Rather than L/R the mics will be F/R (Front / Rear) and because 21 mm is 3 x 7.15 mm we should have 3 samples offset due to the speed of sound travelling the axis of an endfire array.

According to Application Note AN-1140 all we need to do is invert the rear signal add a delay of the mic distance and sum with the front to create a directional mono mic pattern.

So its 3 registers R-delay0, R-delay1, R-delay2

Then sum F0 & - R-delay2 and output into a raw stream.
R-delay2 = R-delay1
R-delay1 = R-delay0
R-delay0 = R0

In the app note if you read about Frequency response
The differential array beamformer does not have a flat frequency response, but rather has a high-pass filter response characteristic up to the null frequency.
Which because of the ADF EQ component it should be no problem to flatten the response characteristic but that is it simple endfire beamformer that should give a degree of noise suppression and far field directionality.
It will not compete with advanced highspeed audio processors / beamformers but might be a simple way that is fit for purpose that has advantages over plain omni mems for far field.
I would really like to test it out and rather make a hash of things give a shout out here.

I am still trying to get my head round the ADF and really not sure where to begin but also with the Resample component does that just sum the stereo stream?
As thinking the incoming stream could just have the rear channel modified with the inverted delay value and the summing could take place via the resample component as it would be great to downsample to 16Khz.
My problem then is that the EQ component supports a range of sample rates but not 16Khz so EQ would have to come before the Resample and wondering if that is a lot of unnessacary load.
Stereo 48kz EQ sounds like it would create considerable load but again my lack of knowledge is a huge gap where to start.

So if anyone can help and provide considerable handholding then please do, if its of interest to take up the project and provide something of your own that is even better as to be honest currently I am fairly bamboozled.

Anyone up for seeing if we can make this app note work on a ESP32?

Who is online

Users browsing this forum: No registered users and 50 guests