M
Well I'm back with an update.
For my ultrasonic application I have managed to obtain a sampling rate of ~256kHz so I'm good for frequency content close to 100kHz. I'm using PDM microphones and a PDM to I2S conversion chip that can handle untrasonic frequencies. At this sampling frequency I start to see the SCLK voltage degrading smewhat and at higher clock rates it collapses so there are definite limits on what we can get out of the K210 for beamforming applications.
I've also developed a better understanding of what the beamformer generates as output. As noted earlier it provides 512 element buffers with data for 16 directions. Each buffer is the average of the delayed signals from each microphone given the direction that is being evaluated. The APU demo evaluates each of the directions by performing a sum of squares of data from each buffer and the direction with the largest result is taken as the true direction to the source of the sound.
For a 22kHz tone from my phone, with the array positioned so the source is located at the ~2:00 position, I get the following from my barchart plot...
The weighted average angle for this sample comes in at 43.4 deg. This is based on 5 data points that are related in that the points on either side of the peak smoothly roll off. If I only used the direction of the peak value then that would be 22.5deg * 2 = 45deg and the results would always be multiples of 22.5 deg (=360/16). This is my method but there are probably better ways of caculating the angle to source.
I was curious to know what the raw data from the buffers looks like when plotted so I captured that for this example and dumped it in Excel for analysis/charting. The plot is shown here:
There is a definite periodicity to this. It'll be interesting to examine detail at the beginning of the chart as well as detail for a subset of points.
For startup we can see the effects of delaying the samples and that we have to wait for about 32 samples before we are into a steady state condition.
Detail on the samples from points 32-64 shows that the local plot matches the overall result perfectly, at least for this example. The local peak is for buffer #2, followed by 1, 3, 0, 4, ... perfect agreement with the sum of squares method and the earlier barchart plot
The results are interesting but I don't know if there is any value in processing the data further. I wanted the understand the beamformer better and now I do so I thought I'd share.
Cheers!