• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

DIY 3D Speaker Scanner - the Mathematics and Everything Else

Dave Zan

Active Member
Joined
Nov 19, 2019
Messages
169
Likes
490
Location
Canberra, Australia
Hi Dave, these impressive noise levels have been pretty common now for years in MEMS mics.

Thanks for the links, the noise is better than the ones I remember and indeed impressive.

...you must appreciate about a MEMS data sheet is that it is completely spec'd. Few conventional mics are....
1) https://www.invensense.com/download-pdf/ics-52000-data-sheet/
2) https://www.invensense.com/products/analog/ics-40618/

Better spec'ed in some areas, a bit short on details in others, no polars?
Should be close to omni if it can be mounted in a sufficiently tiny probe so probably not an issue..
The TDK in your second link is low noise but much worse frequency response compared to the AD devices plots you showed.
Practically +-10 dB from 20 Hz to 20 kHz.
I know this can be included in a calibration file but it doesn't fill me with enthusiasm.
Spec'd for tolerance at 1 kHz but no frequency band tolerance?
Probably very repeatable but it would be nice to have a spec.
I do think phase match will be a problem for an array version of this project but I am really happy to have learned about the current state of the art in MEMS microphones.

Best wishes
David
 
Last edited:

No. 5

Active Member
Joined
Nov 1, 2019
Messages
144
Likes
121
The MEMS mic idea raises a practical positive if a single one was used in that such a small microphone would allow very lightweight hardware with very minimal acoustic reflection. Along those lines, I have been thinking a Panasonic WM-61a capsule at the end of some light tubing for the same reasons. Nevertheless, given the comments, a "real" measurement microphone may be required.

@No. 5 I still haven't had the time to send you the sketches but "Real Soon Now"!
No problem, I'm patient. :)
 

QAMatt

Member
Audio Company
Joined
Mar 1, 2019
Messages
29
Likes
100
Hi @Dave Zan

MEMS are all omni. Invensense has a plot in their beamforming document (see fig 2 in the link below). The final mechanics has a much larger impact on the pattern, of course

> The TDK in your second link is low noise but much worse frequency response compared to the AD devices plots you showed.

As I understand it, the peaking comes from internal resonances given the very small size. The silicon inside the MEMS has a very flat response well beyond 20k. But once the silicon goes into its package, you get some high-end peakiing and some low frequency roll-off. And then when you put that package into your own mechanical design, you get more variation.

But yes, these would be dialed out in the software.

> I do think phase match will be a killer for an array version of this project

Since MEMS mics are overwhelmingly used in beamforming and noise cancelling applications, the phase match has to be excellent otherwise those technologies don't work. There's an issue at lower frequencies related to assembly tolerance (eg putting the MEMS silicon into its package). This can result in variations around 30-40 Hz that causes problems for beam forming and noise cancelling. That could be an issue at very low frequencies (sub 40 Hz)

> Spec'd for tolerance at 1 kHz but no frequency band tolerance?

Yes, that would be preferred for sure. It's out there for some mics. My guess is that it's so consistent it's not tested. There's a lot of parameters on semiconductors that are like that too. I did take a look this afternoon at what kind of consistency would be needed. NTK's review of the literature suggests 3 mm of positioning accuracy is needed. The plots below are a measurement of a large (~500W) powered speaker in the near field. The amplitude changes about 0.1dB when the mic (Earthworks M23R) is moved forward about 3mm. So, I'll take that is the required amplitude matching would be required from a mic array, and on first thought, yes, that looks very tight for MEMS

https://www.invensense.com/wp-content/uploads/2015/02/Microphone-Array-Beamforming.pdf
 

Attachments

  • mic5mm.png
    mic5mm.png
    137 KB · Views: 147

QAMatt

Member
Audio Company
Joined
Mar 1, 2019
Messages
29
Likes
100
The MEMS mic idea raises a practical positive if a single one was used in that such a small microphone would allow very lightweight hardware with very minimal acoustic reflection.

Take a look at delta pick and place machines. If the thing you are moving is very light, the delta machines are unbelievable simple and they scale easily to very large sizes. Every axis is identical. There are a lot of hobbyists going this route for large 3D printers and so there's a fair bit of ground already broken there in terms of linkages. These are 3D printers that a person can fit inside.

The math might seem difficult, but it's not. You have 3 motors driving a carriage on a rail, and the location of the head is completely constrained by the location of the motors. Plus, the head stays in a constant orientation during all movements.


 

Dave Zan

Active Member
Joined
Nov 19, 2019
Messages
169
Likes
490
Location
Canberra, Australia
MEMS are all omni...The final mechanics...on the pattern, of course

Yes, that was more or less my point, even a 6 mm electret capsule has to allow for the physical mount to achieve accurate free field response.

As I understand it...internal resonances

The very reliable JCX (John Cox) on DIYaudio wrote that it's the Helmholtz resonance, consistent with what you understand.

> I do think phase match will be a killer for an array version of this project
...There's an issue at lower frequencies related to assembly tolerance...This can result in variations around 30-40 Hz that causes problems...That could be an issue at very low frequencies (sub 40 Hz)

After I posted I decided that "killer" was excessive and edited it to "problem" but we must have cross-posted.
Unfortunately low frequencies is where we need phase match.
Also the response is about 10 dB down at 20 Hz so we will need substantial boost, maybe makes the problem worse?

NTK's review of the literature...3 mm...accuracy is needed.

Actually I think it was more that 3 mm is what Klippel claim.
Presumably it's in the ballpark- it is adequate, and they would make it cheaper and sloppier if it was wildly more than needed.
I suspect it's more that we need a certain rotational accuracy, say 0.01 radian combined with certain radial position accuracy, say 3 mm, or whatever.
Not sure we need your 0.1 dB accuracy match, so maybe it doesn't constrain MEMS mics?
I hated to work out this kind of error sensitivity analysis at university!
Maybe just do a few Monte Carlo simulations to arrive at reasonable values

I still think a movable mic may be simpler but thanks for more links, always fun to learn.
Looks like MEMS would be the sensor to measure compression driver wavefronts.

Best wishes
David
 
Last edited:
OP
NTK

NTK

Major Contributor
Forum Donor
Joined
Aug 11, 2019
Messages
2,708
Likes
5,976
Location
US East
A quick update. I got some preliminary results with the double concentric spheres sound field separation. It looks like it can outperform my previous method by a pretty large margin. I'll need to run more tests, clean up my code, and write the report. May take another couple of days (or more).

Then I'll go onto error sensitivity tests (using Monte Carlo simulations). For that I'd like to try using regularized regression to improve the robustness of the numerical method. But first I'll need to spend sometime reading up on regularization and learning how it works.
 
OP
NTK

NTK

Major Contributor
Forum Donor
Joined
Aug 11, 2019
Messages
2,708
Likes
5,976
Location
US East
Take a look at delta pick and place machines. If the thing you are moving is very light, the delta machines are unbelievable simple and they scale easily to very large sizes. Every axis is identical. There are a lot of hobbyists going this route for large 3D printers and so there's a fair bit of ground already broken there in terms of linkages. These are 3D printers that a person can fit inside.

The math might seem difficult, but it's not. You have 3 motors driving a carriage on a rail, and the location of the head is completely constrained by the location of the motors. Plus, the head stays in a constant orientation during all movements.
I have thought about using a standard configuration robot too (I was thinking of a 5 revolute axes one). The problem I couldn't figure how to overcome is reach. It will take a pretty huge robot (or a robot with lots of joints) to be able to position the mic(s) all around the speaker.

May be there are cleverer ways I don't know about.
 
OP
NTK

NTK

Major Contributor
Forum Donor
Joined
Aug 11, 2019
Messages
2,708
Likes
5,976
Location
US East
Hope you have not given up on this project. Any progress?
Thanks for expressing interest. I much appreciate that :D

I actually have been working pretty hard on this (the mathematics part) for the last few weeks, just that I got nothing to show :facepalm:

I started a few weeks back with pretty good sound field reconstruction results from the double concentric spherical measurement method. I then wanted to experiment with adding measurement errors, using convergence as a metric to estimate solution progress and to find the optimal expansion order (N), and looking into regularized regression methods and solvers. It was clear that expanding the code I cobbled together earlier (and I ain't no software engineer) to add new functionalities was not going to work. So I decided to reorganize of my code.

What ensued is totally predictable. I, being a completely unprepared amateur, wandered into the wilderness of coding and got myself completely lost :facepalm:. It took me a couple of weeks to find my way back. But I am back now and am making progress again. I actually have some results I am in the process of preparing to share, hopefully by tomorrow :)
 
OP
NTK

NTK

Major Contributor
Forum Donor
Joined
Aug 11, 2019
Messages
2,708
Likes
5,976
Location
US East
Attached is Part 5--the alternate sound field separation method. This double concentric surface measurement method seems to work much much better than my previous one.

I need to clean up my code a little bit and will post them tomorrow. I welcome any comments/suggestions/corrections or anything else. [Edit:] Code uploaded.
 

Attachments

  • Part_5.pdf
    974.3 KB · Views: 268
  • Jupyter Notebooks Version Mar-2020.zip
    59.2 KB · Views: 195
Last edited:

briskly

Active Member
Joined
Jul 10, 2019
Messages
115
Likes
153
The true errors are calculated similarly but is referenced against the theoretical solution

What is this a solution to? The four point sources?
 
OP
NTK

NTK

Major Contributor
Forum Donor
Joined
Aug 11, 2019
Messages
2,708
Likes
5,976
Location
US East
What is this a solution to? The four point sources?
Yes. Solution was my wrong choice of word.

Everything was just simulation and the sound pressure field was known (generated by 4 interior point sources and 4 exterior). There was no "unknown" that needed to be solved.
 

Kessito

Member
Joined
May 18, 2020
Messages
54
Likes
99
NTK,
Thank you SO much for this work! I have been trying to get my head around this for 2 years and with the way you are explaining it I am finally starting to, slowly, understand it.
I will read the code another 100 times and then I will try to replicate your results in matlab, since I am not comfortable with python.
Please keep up the good work!
Kees
 

phoenixdogfan

Major Contributor
Forum Donor
Joined
Nov 6, 2018
Messages
3,327
Likes
5,218
Location
Nashville
As someone who has measured a lot of speakers at home, I can't begin to tell you how encouraging it is that you are attempting to improve access to this technology. Existing measurement methods are arguably good enough but leave a lot to be desired.

Let me know if you would like to discuss barriers to producing a prototype robot - I have no idea what that would look like but I tried to create an automated turntable some time ago for polars and learned a great deal.
If you could make one similar to what I put out on my lawn with a similar price tag, you've found your first customer.

https://www.amazon.com/gp/product/B...iveASIN=B07TXGTTHQ&linkCode=as2&tag=tcb504-20
 
OP
NTK

NTK

Major Contributor
Forum Donor
Joined
Aug 11, 2019
Messages
2,708
Likes
5,976
Location
US East
NTK,
Thank you SO much for this work! I have been trying to get my head around this for 2 years and with the way you are explaining it I am finally starting to, slowly, understand it.
I will read the code another 100 times and then I will try to replicate your results in matlab, since I am not comfortable with python.
Please keep up the good work!
Kees
You are very welcome :) You can find the most important pieces of the calculations in Step 4 and 5 in the Part 4 report.

MATLAB doesn't have its built-in spherical harmonics functions, but you can find one here. It also doesn't have the spherical Bessel functions either, but you can build your own using the ordinary Bessel functions (which are available) and the formulas from Wikipedia.
 

Few

Member
Joined
Oct 27, 2020
Messages
91
Likes
95
Just “jingling” this thread to ask whether the activity continues behind the scenes.

I also wanted to toss in a thought. If one were willing to give up full spinorama capability for a first attempt, it seems that a fairly simple to implement—and easy to assemble/disassemble as needed—system might be built out of three orthogonal linear translations. Two perpendicular sets of tracks temporarily laid on the floor could take care of x and y (parallel to the floor) and a slender vertical translator could provide z. Even though such a system lacks a pivot, it could be assembled out of very readily available parts, and any desired surface could be traced out within its range of motion. Nothing would have to support a cantilevered load, so more slender structures could be used.

I would never have room for a pivot-based robot that can reach anywhere within a 2 m diameter sphere, but leaning some tracks in the corner of my shop between measuring sessions seems within reach. This approach would also make it easy to adapt the sphere, or cylinder, or plane of measurement to the geometry of the speaker. Perhaps this was discussed and dismissed but I didn’t see it in the discussion.

Few

Edit: I should acknowledge that a pivot-based system could be disassembled as well, so perhaps my mental image of ease of storage is skewed. Nonetheless, the Cartesian system with nothing but linear slides seems worth considering for some applications.
 
Last edited:
OP
NTK

NTK

Major Contributor
Forum Donor
Joined
Aug 11, 2019
Messages
2,708
Likes
5,976
Location
US East
Just “jingling” this thread to ask whether the activity continues behind the scenes.

I also wanted to toss in a thought. If one were willing to give up full spinorama capability for a first attempt, it seems that a fairly simple to implement—and easy to assemble/disassemble as needed—system might be built out of three orthogonal linear translations. Two perpendicular sets of tracks temporarily laid on the floor could take care of x and y (parallel to the floor) and a slender vertical translator could provide z. Even though such a system lacks a pivot, it could be assembled out of very readily available parts, and any desired surface could be traced out within its range of motion. Nothing would have to support a cantilevered load, so more slender structures could be used.

I would never have room for a pivot-based robot that can reach anywhere within a 2 m diameter sphere, but leaning some tracks in the corner of my shop between measuring sessions seems within reach. This approach would also make it easy to adapt the sphere, or cylinder, or plane of measurement to the geometry of the speaker. Perhaps this was discussed and dismissed but I didn’t see it in the discussion.

Few

Edit: I should acknowledge that a pivot-based system could be disassembled as well, so perhaps my mental image of ease of storage is skewed. Nonetheless, the Cartesian system with nothing but linear slides seems worth considering for some applications.
I haven't done anything on this since my March post, nor am I aware of anybody else doing anything.

Thanks for sharing your idea. It is very interesting and it got me thinking again. My thought follows along the line of your idea by making measurements on flat planes. Say we make measurements on a plane in front of the speaker. We then move the measurement rig and repeat the measurements for the left, right, and rear planes. We would have some "measurement data holes" for the top and bottom planes. However, if we are mostly concerned about getting data for the horizontal orbit, perhaps gathering data on these 4 planes would be sufficient (simulations will be useful to get some ideas). And if the speaker isn't a monster, we can flip it on its side and measure the vertical orbit. (Planar speakers will be difficult to flip and so will probably be out-of-luck.)

The trick is to make sure the speaker doesn't move during the entire process (we need all the reflected sounds to stay the same throughout the whole measurement process), and we need to have the precise positional coordinates of all the measurement points.

Overall I think it is a promising idea.
 
Top Bottom