How to make microphone array with 192 kHz sampling

If you have a simple question and just want an answer.
Post Reply
tribolaboy
New User
Posts: 2
Joined: Fri Aug 31, 2018 3:57 pm

How to make microphone array with 192 kHz sampling

Post by tribolaboy »

I am looking for a way to make a mic array, but I need the high sampling rate of 192 kHz.
Initially, I don't mind the configuration of the microphone array,
but at a later stage, I might want to change the number of mics (e.g. to 16 or 32) or the spacing between them.

-- Scenario 1--
The xCORE Array Microphone [USB] [https://www.xmos.com/support/boards?product=20258]
seems like a good start, but:
- It is limited to sampling frequency of 48 kHz.
- If I need to change number of channels, I'll need to move to another platform
Problem to solve:
- Get the device to sample at 192 kHz.

What I checked:
I looked in the documentation of the lib_mic_array library [https://www.xmos.com/download/private/l ... rc1%29.pdf]
and found that the final output at 48 kHz is a result of several decimations.
p. 10 of the user guide says that "Each delay line sample is clocked at the PDM clock rate divided by 8, that is, 384kHz for a 3.072MHz PDM clock"
Then the decimators are applied until the sampling frequency is reduced to the one of: 8, 12, 16, 24 or 48kHz

Question 1:
- Is it possible to somehow hack into the thing and get the 192 kHz of sampling.


-- Scenario 2--
The xCORE-200 Multichannel Audio Platform [https://www.xmos.com/support/boards?product=18334]
seems to solve the problem with the sampling frequency
as it provides 8 channels analog input coming out as PCM 384kHz at 16, 24 or 32 bits.
But if i need to increase the number of channels, I would need to use a couple of boards and find a way to synchronize the acquisition.

Question 2:
- Is it possible to synchronize the acquisition from several xCORE-200 Multichannel Audio Platform boards? How?

Thanks for any pointers
Last edited by tribolaboy on Sat Sep 01, 2018 1:35 am, edited 1 time in total.


RitchRock
XCore Addict
Posts: 186
Joined: Tue Jan 17, 2017 9:25 pm

Post by RitchRock »

tribolaboy wrote: -- Scenario 2--
The xCORE-200 Multichannel Audio Platform seems to solve the problem with the sampling frequency
as it provides 8 channels analog input coming out as PCM 384kHz at 16, 24 or 32bits.
But if i need to increase the number of channels, I would need to use a couple of boards and find a way to synchronize the acquisition.

Question 2:
- Is it possible to synchronize the acquisition from several xCORE-200 Multichannel Audio Platform boards? How?
Maybe it's possible to implement multiple instances of lib_i2s across several cores? It looks like one instance can support 8 channels at 192kHz: https://www.xmos.com/download/private/l ... rc1%29.pdf
tribolaboy
New User
Posts: 2
Joined: Fri Aug 31, 2018 3:57 pm

Post by tribolaboy »

Hello Ritch

I read up a bit on I2S and the lib_i2s on the link, which you provided. As I understand it,
for one device, the core is the master device on the I2S bus providing the clock and getting the data from the slave device on the I2S bus.
A number of slaves can be attached to the master. Then for multiple cores, I guess the architecture would look something like this:
  • core 1 (master)
    -> ch1.1 (slave)
    -> ch1.2 (slave)
    -> ...
    ->core 2 (slave)
    • --->ch2.1 (slave)
      --->ch2.2 (slave)
      ---> ...
Can a core be configured as a slave on the I2S bus?
Is my understanding correct and are there examples implementing something like this?
User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am
Contact:

Post by infiniteimprobability »

Re:

a) Ability to decimate to 192kHz from lib_mic_array

b) Interfacing to >8 channels at 192kHz

a) Is technically possible but the decimators are fixed to /8 (gets to 384kHz) followed by /4 (to 96kHz) followed by /n to get to something more typical. You would need to break the connection, pick up samples from pdm_rx (which also has the /8) and implement your own /2 FIR, which needs to be quite a long filter (the last stage is typically the long filter with a sharp rolloff). Filters are all specified in detail in the lib_mic_array docs at the end. This is doable, but involves filter design and getting into the internals of lib_mic_array. Noise from the modulation will get worse because you are looking at a much wider band - consult your PDM datasheet.

b) Should be possible. We actually test up to 768kHz 8in 8out in lib_i2s (frame based i2s version) so 192 @ 16i 16o would be fine.
<edit> Looks like the latest i2s (3.0 that has frame based master and slave) hasn't been through publishing yet so you'll need to pick it up from:
https://github.com/xmos/lib_i2s

You can certainly synchronise multiple boards using I2S - as long as there is only one I2S master. You will need to also synch MCLKs - might need a small board mod (and maybe coax cable rather than flying leads). MCLK is used to calculate asynch feedback for USB.
Post Reply