• 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

OP
NTK

NTK

Major Contributor
Forum Donor
Joined
Aug 11, 2019
Messages
2,719
Likes
6,010
Location
US East
I'll run simulations to test, and will give an update probably this weekend. I'll also try and see how a horizontal line scan will work too.
I've (again) over-estimated my ability to get stuff done. Will need another 2-3 days. Sorry.
 

Few

Member
Joined
Oct 27, 2020
Messages
91
Likes
95
No problem. I’m wrestling with the geometry of a 3-cable robot. I keep thinking I’ve found the problem, only to discover there are others. So you’re not the rate-limiting step.
 

Kessito

Member
Joined
May 18, 2020
Messages
54
Likes
99
Hi all,

I have been very busy this year (trying to make enough money not to let our company go bankrupt due to covid consequences) but now I finally have some energy again to pick this awesome topic up.
I thing I am starting to gain enough understanding to start doing some coding in Matlab to try and replicate your results NTK.
What would be helpfull is to get some intermediate resultas from your calculations so I can check my results step-by step
I can read and understand (mostly) your code, but I dont have python skills (and really no time to learn yet another language at this time)

I hav also been pondering on a hardware setup and have come up with something that might work and be easy and cheap to implement.
I was thinking along these lines (see attachd drawing):

-lasercut a 2.5mm steel double ring with gear teeth already cut in in the outside ring for stepper motor 2

-add 16x mems pdm mic on the half inner circle in 10degree steps
-add 16x mems pdm mic on the half outher circle in 10degree steps
https://nl.mouser.com/ProductDetail/Knowles/SPH0655LM4H-1/?qs=/ha2pyFaduhvp7CqAAKzBBNK2rEwhn0N%2B8ibYkFktxzfMhqYbHKVqA==

-use 2x minidsp mchstreamer to convert the pdm signals to usb https://www.minidsp.com/products/usb-audio-interface/mchstreamer

-attach stepper motor 2 on the axe of stepper motor 1.

-the ring (it will be lightweight, approx 3,5 kg) rests on the gearwheel of stepper motor2

stepper motor 1: this is the horizontal rotationand will make all angles possible

- use stepper motor 2 to roll the complete semi circle +-10degree, this will make alle vertical angles possible

to perform the amount amir does (ca. 1100) will take the time of 34 measurements, so should take approx: 5 seconds sweep for high dynamic range+5 seconds movement=10*34=340seconds =~5minutes

to perform a full 5 degree resolution dual layer sphere measurement (35*71*=4970measurments) , will take the time of 155 measurments =~25minutes

I have tested the mems mics (8 pieces so far) ; they are fantastic in consistency and live up to the specs, to even further improve calibration measurements can be performed for every mic.
I am highly critical in this topic; part of my daytime job is developing type1 soundlevel meters and I own a bunch of different type1 measurement gear.

estimated BOM costs are approx.
2x mchstreamer = 230 dollar
32x mems mic=32
steel lasercut ring=200 (checked with supplier)
steel structure=200
2x stepper motor=100
cabling and a rest material=200
Total = approx. =~ 960 dollar

of course the semi circle could also be a full circle so you coul use only 2 mics, but I really dont see an advantage in that since the mems are so good .

@ NTK; would this be the most optimum mic placement (the consistent r values)? I thought I could conclude that from your part 5 post but don't know if I fully understood

Let me know what you guys think!

Cheers,
Kees

wheel design.png
 

maxxevv

Major Contributor
Joined
Apr 12, 2018
Messages
1,872
Likes
1,964
I have to ask, with the above;

i) How are you going to be measuring the varying distances from the center point since all the microphones are equidistant from the center point ?
You probably need some automated and controlled way of adjusting the distance of the microphones from the center point such as a linear
actuator for each microphone so that their distances can be varied.

So it would either have to the individual microphones each having a linear actuator to vary their distance from the center point
OR
There is one microphone that slides (motor controlled and actuated) along the ring and can be linearly adjusted in position to vary its distance
from the center point.

ii) Unless there is a height adjustment, you will have problems with different speakers with different center points of interest.
Which can be either via the speaker stand or the overhanging jig of course, whichever is more convenient.

iii) In 3 dimensions, when rotating about the vertical axis, the lower portion of the ring will hit the speaker support stand as you show in your diagram above. The stand will have to be cantilivered from the right side to avoid this issue.

But I like the overall concept for its neatness.
 

Few

Member
Joined
Oct 27, 2020
Messages
91
Likes
95
Kees,
if you make any headway with the Matlab implementation and are willing to share, I’d be very interested. Of course I’d be happy to reciprocate if I come up with anything useful.
Few
 

Kessito

Member
Joined
May 18, 2020
Messages
54
Likes
99
I have to ask, with the above;

i) How are you going to be measuring the varying distances from the center point since all the microphones are equidistant from the center point ?
You probably need some automated and controlled way of adjusting the distance of the microphones from the center point such as a linear
actuator for each microphone so that their distances can be varied.

So it would either have to the individual microphones each having a linear actuator to vary their distance from the center point
OR
There is one microphone that slides (motor controlled and actuated) along the ring and can be linearly adjusted in position to vary its distance
from the center point.

ii) Unless there is a height adjustment, you will have problems with different speakers with different center points of interest.
Which can be either via the speaker stand or the overhanging jig of course, whichever is more convenient.

iii) In 3 dimensions, when rotating about the vertical axis, the lower portion of the ring will hit the speaker support stand as you show in your diagram above. The stand will have to be cantilivered from the right side to avoid this issue.

But I like the overall concept for its neatness.

Hi maxxevv,

1-I have spaced 2 rings of 16 microphones ( maybe not so clear in this picture,) ring 2 has the same angles as ring 1 but a extra distance of 100mm
so 32 mics in total.

2-yes ther should be a height adjustment, sketch is pretty rough at the moment

3-yes, there should be some sort of curve in the stand (and maybe guide rollers)

@Few, sure I can share code once I have something working , but it won't be a speedy process... :)

Cheers,
Kees
 

Few

Member
Joined
Oct 27, 2020
Messages
91
Likes
95
No problem—very slow Matlab programming is my specialty. I typically use a random walk through programming space in the hope that I’ll eventually trip over something useful. I appreciate your willingness to share the product of your efforts.
 
OP
NTK

NTK

Major Contributor
Forum Donor
Joined
Aug 11, 2019
Messages
2,719
Likes
6,010
Location
US East
Sorry guys and gals. It took longer than I had anticipated, but finally I got some simulation results to show, and they look encouraging. (I am not going to fault anybody for not understanding my code. I haven't looked at it for almost a year and it took me more than a few hours to figure out what my code was trying to do :facepalm:)

So far I've only tested the simplest reconstructions (no sound field separation yet) and at only one frequency (1200 Hz). Higher frequencies will be more difficult.

Baseline: The first set of figures are for the baseline using full double spherical measurements (1000 pts). The first figure shows the measurement points, the 4 simulated point sources near center, and the gray (horizontal) surface is where sound pressure reconstruction is performed. The second figure show the reconstruction with expansion order N=6. The height of the shape represent the magnitude of the sound pressure. The third figure is the error plot. You can see that by N=6 the maximum actual reconstruction error was well below 1%.
000_baseline_grids.png 000_baseline_mix_1200N6.png 000_baseline_err_mix_1200.png

Double planar: Basically the same figures with the N=10 reconstruction plot added. You can see reconstruction errors (the ripples) near the YZ plane at N=6, and they disappear at N=10.
001_planar_grids.png 001_planar_mix_1200N6.png 001_planar_mix_1200N10.png 001_planar_err_mix_1200.png

Double semi-spherical: A bit better than double planar as we got to the minimum error with lower N's (but errors rose quickly again with increasing N).
002_semi_spherical_grids.png 002_semi_spherical_mix_1200N6.png 002_semi_spherical_mix_1200N10.png 002_semi_spherical_err_mix_1200.png
 
OP
NTK

NTK

Major Contributor
Forum Donor
Joined
Aug 11, 2019
Messages
2,719
Likes
6,010
Location
US East
No problem—very slow Matlab programming is my specialty. I typically use a random walk through programming space in the hope that I’ll eventually trip over something useful. I appreciate your willingness to share the product of your efforts.
The central part of the math (solving for the expansion coefficients) isn't that complicated. I do have MATLAB (R2018a) and I'll attempt to port the solver part to MATLAB. Will keep you posted.
 
  • Like
Reactions: Few
OP
NTK

NTK

Major Contributor
Forum Donor
Joined
Aug 11, 2019
Messages
2,719
Likes
6,010
Location
US East
Hi all,

I have been very busy this year (trying to make enough money not to let our company go bankrupt due to covid consequences) but now I finally have some energy again to pick this awesome topic up.
I thing I am starting to gain enough understanding to start doing some coding in Matlab to try and replicate your results NTK.
What would be helpfull is to get some intermediate resultas from your calculations so I can check my results step-by step
I can read and understand (mostly) your code, but I dont have python skills (and really no time to learn yet another language at this time)

I hav also been pondering on a hardware setup and have come up with something that might work and be easy and cheap to implement.
I was thinking along these lines (see attachd drawing):

-lasercut a 2.5mm steel double ring with gear teeth already cut in in the outside ring for stepper motor 2

-add 16x mems pdm mic on the half inner circle in 10degree steps
-add 16x mems pdm mic on the half outher circle in 10degree steps
https://nl.mouser.com/ProductDetail/Knowles/SPH0655LM4H-1/?qs=/ha2pyFaduhvp7CqAAKzBBNK2rEwhn0N%2B8ibYkFktxzfMhqYbHKVqA==

-use 2x minidsp mchstreamer to convert the pdm signals to usb https://www.minidsp.com/products/usb-audio-interface/mchstreamer

-attach stepper motor 2 on the axe of stepper motor 1.

-the ring (it will be lightweight, approx 3,5 kg) rests on the gearwheel of stepper motor2

stepper motor 1: this is the horizontal rotationand will make all angles possible

- use stepper motor 2 to roll the complete semi circle +-10degree, this will make alle vertical angles possible

to perform the amount amir does (ca. 1100) will take the time of 34 measurements, so should take approx: 5 seconds sweep for high dynamic range+5 seconds movement=10*34=340seconds =~5minutes

to perform a full 5 degree resolution dual layer sphere measurement (35*71*=4970measurments) , will take the time of 155 measurments =~25minutes

I have tested the mems mics (8 pieces so far) ; they are fantastic in consistency and live up to the specs, to even further improve calibration measurements can be performed for every mic.
I am highly critical in this topic; part of my daytime job is developing type1 soundlevel meters and I own a bunch of different type1 measurement gear.

estimated BOM costs are approx.
2x mchstreamer = 230 dollar
32x mems mic=32
steel lasercut ring=200 (checked with supplier)
steel structure=200
2x stepper motor=100
cabling and a rest material=200
Total = approx. =~ 960 dollar

of course the semi circle could also be a full circle so you coul use only 2 mics, but I really dont see an advantage in that since the mems are so good .

@ NTK; would this be the most optimum mic placement (the consistent r values)? I thought I could conclude that from your part 5 post but don't know if I fully understood

Let me know what you guys think!

Cheers,
Kees
Your concept looks awesome. Thanks for sharing. My one concern is the mics in the inner ring may diffract the sound waves and impact the measurements taken by the mics in the outer ring, but I may just have too much paranoia in me.

Regarding where to locate the arc, from what I understand from the math, it is optimal that the center of the measurement sphere to be coincide with the acoustic center of the speaker-under-test. Of course, the acoustic center of the speaker shifts according to which driver is active at the time. Since it is more critical to match the two at higher frequencies, it is probably best to match the center of the tweeter (or the half way point between the tweeter and the mid-range) to the arc center.

Please let me know if you have any more questions or need assistance, and best wishes for the well being of your business.
 

Valhalla

Active Member
Joined
Jan 16, 2021
Messages
110
Likes
170
really interesting subject. subscribed! I hope there will be a poor man's 3D scanner system at the end.
 

Count Arthur

Major Contributor
Joined
Jan 10, 2020
Messages
2,249
Likes
5,037
If you're using multiple microphones, wouldn't something like Dynaudio's set-up be easier?:

1613217818607.png


Presumably, the arc of microphones just rotates 180 degrees around the centre point.

If you're using a single microphone, could you build something like a flat bed plotter for the X and Y position, but with a column up and down which the microphone can be moved for the Z position. How important is it that the microphone is pointed towards the centre/axis of the speaker?
 

Few

Member
Joined
Oct 27, 2020
Messages
91
Likes
95
NTK: you are using a point source for your simulations, is that right? If so, I wonder if a finite line source would better match the concentric cylinders while the point source is better with the concentric spherical shells. A truly infinite line source would likely only need points in a horizontal plane, since the behavior at all altitudes would be identical. Does that match your understanding?
Few
 
OP
NTK

NTK

Major Contributor
Forum Donor
Joined
Aug 11, 2019
Messages
2,719
Likes
6,010
Location
US East
NTK: you are using a point source for your simulations, is that right? If so, I wonder if a finite line source would better match the concentric cylinders while the point source is better with the concentric spherical shells. A truly infinite line source would likely only need points in a horizontal plane, since the behavior at all altitudes would be identical. Does that match your understanding?
Few
I use 4 point sources in my simulation to create lobes in 3D at different frequencies to test how well the reconstruction can resolve the directivity pattern. The centers of each of the 4 sources is shown with a 3D magenta cross. Below are balloon plots of the 1200 and 4000 Hz cases (the plots show the directivity balloons at 1 m).

In my earlier post (#188) I chose to present the reconstruction results a bit differently. The directivity balloons are great for visualizing the directivity. However, they show results at a single radial distance (r) only. In post 188, I wanted to show (assess) the reconstruction accuracy at different r, and therefore I used a different style of plot.

If what I say in this post doesn't make sense, please let me know and I will try explaining in more details.

p2fig1_1200.png
p2fig1_4000.png
 

Kessito

Member
Joined
May 18, 2020
Messages
54
Likes
99
The central part of the math (solving for the expansion coefficients) isn't that complicated. I do have MATLAB (R2018a) and I'll attempt to port the solver part to MATLAB. Will keep you posted.

That would be highly appreciated! I have written 3d array simuation software in matlab in the past so I can very easily test the algorithms with that ( compare direct simulated and reconstructed results as frequency/ phase spectra at given points).
I also have some balloon ( 5 degree) datasets from actual measured speakers in a real anechoic room, it would be nice to test the algorithm with this too
 
Last edited:

Kessito

Member
Joined
May 18, 2020
Messages
54
Likes
99
Sorry guys and gals. It took longer than I had anticipated, but finally I got some simulation results to show, and they look encouraging. (I am not going to fault anybody for not understanding my code. I haven't looked at it for almost a year and it took me more than a few hours to figure out what my code was trying to do :facepalm:)

So far I've only tested the simplest reconstructions (no sound field separation yet) and at only one frequency (1200 Hz). Higher frequencies will be more difficult.

Baseline: The first set of figures are for the baseline using full double spherical measurements (1000 pts). The first figure shows the measurement points, the 4 simulated point sources near center, and the gray (horizontal) surface is where sound pressure reconstruction is performed. The second figure show the reconstruction with expansion order N=6. The height of the shape represent the magnitude of the sound pressure. The third figure is the error plot. You can see that by N=6 the maximum actual reconstruction error was well below 1%.
View attachment 112188 View attachment 112189 View attachment 112196

Double planar: Basically the same figures with the N=10 reconstruction plot added. You can see reconstruction errors (the ripples) near the YZ plane at N=6, and they disappear at N=10.
View attachment 112191 View attachment 112192 View attachment 112193 View attachment 112194

Double semi-spherical: A bit better than double planar as we got to the minimum error with lower N's (but errors rose quickly again with increasing N).
View attachment 112198 View attachment 112199 View attachment 112200 View attachment 112197

Interesting, could you also try cylindrical?
( would make the measurement setup much simpler)

Ps you really dont have to apologize for any delays, we all understand that available time is limited and the fact that you share these efforts deserve MUCH respect! :)
 
OP
NTK

NTK

Major Contributor
Forum Donor
Joined
Aug 11, 2019
Messages
2,719
Likes
6,010
Location
US East
Interesting, could you also try cylindrical?
( would make the measurement setup much simpler)

Ps you really dont have to apologize for any delays, we all understand that available time is limited and the fact that you share these efforts deserve MUCH respect! :)
No. I haven't tried cylindrical yet. Since the double planar results look promising, I'd think concentric cylindrical would be better. I'll try run some case in the next few days. I'd like to get started on the MATLAB port first. May be I should try that as my test case for the MATLAB port :)
 
OP
NTK

NTK

Major Contributor
Forum Donor
Joined
Aug 11, 2019
Messages
2,719
Likes
6,010
Location
US East
@Kessito I forgot to ask. You are interfacing the MEMS mics digitally (pdm to miniDSP to computer through USB). How do you time synchronize all the measurements and to the stimulus (reference) signal? Since REW can perform multi-channel analysis using the UMIK-X mic array, this can definitely be done. I am just curious to know what it takes.
 

Ron Texas

Master Contributor
Forum Donor
Joined
Jun 10, 2018
Messages
6,246
Likes
9,378
This is way over my head. I'm going to have to stick to simple stuff like time travel.
 

Kessito

Member
Joined
May 18, 2020
Messages
54
Likes
99
@Kessito I forgot to ask. You are interfacing the MEMS mics digitally (pdm to miniDSP to computer through USB). How do you time synchronize all the measurements and to the stimulus (reference) signal? Since REW can perform multi-channel analysis using the UMIK-X mic array, this can definitely be done. I am just curious to know what it takes.

Disclaimer; I havent build the system with the minidsp yet, but have experience with other multichannel systems.
The timing synchronisation between the channels is guaranteed by the xmos processor on the minidsp boards and the asio driver on the pc ( sample accurate) and if absolute time-of-flight info from the speaker to the mics is required for the calculations (is it? or can you you input the measured r?)
a loopback channel can be added.
For my current measurements that i also made with another automated matlab system, with one mic and 2 axis rotation, I dont care about the absolute time of flight, only about the time differences between all measurements.
 
Top Bottom