• Welcome to ASR. 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

I gave you the hypothesis, some kind of glitch.
I've got an hypothesis:
The bands in the directivity mean that we have large (reconstructed) sound levels in every direction. That means that the omnidirectional N=0 mode (Monopole) is large. Indeed the Monopole is large around 5800Hz.
The fit error is not worse than nearby frequencies, so the incoming Monopole has to compensate the large outgoing Monopole. It is, shifted 180 degrees.
Now it gets more hypothetical. The distance between the two spherical measurement surfaces is 3 cm, half the 5800Hz wavelength. I can image that results in a situation where the difference between incoming and outgoing sound is known, but not the incoming sound strength alone. That degree of freedom is not controlled/measured.
I plan on doing a measurement with a uniform distribution of r for the measurements, but that needs a good night sleep, some programming, bug fixing,...
 
Good observation, Tom! That reminded me of a paper I read during the early part of my research regarding singularities in the field separation math under certain conditions.

singularity)insound_field_separation.png


Klippel sidesteps the problem by using time gating (to remove room reflections rather than using sound field separation) above ~1-3 kHz when poor frequency resolution is no longer a problem.
One can compute the impulse response response from the frequency sweep. Impulse response = inverse FFT of the transfer function (i.e. frequency response with both magnitude and phase). Then the impulse response is time gated to extract the direct sound, and the FFT of the gated response is the free field/anechoic transfer function.


Klippel Field Separation Limit.png
 
I'm thinking of putting the hole setup on a speaker stand in a large barn to start off with a less 'echoic' situation.
I finally relocated the setup.

IMG20240917190859.jpg
IMG20240917195939.jpg
IMG20240917200033.jpg

I used a small dedicated router as the barn has no wifi of its own. Internet is not necessary, but using my phone as a remote control is very handy. At first I tried to use the pi as a router, but I wasn't able to get it working. I decided I didn't want to fight that war and ordered a very small router.

It's running now as a first test. Sometimes the motion system just stops. I can't reproduce it on my test Arduino.
 
I finally relocated the setup.

View attachment 392873
View attachment 392874
View attachment 392875

I used a small dedicated router as the barn has no wifi of its own. Internet is not necessary, but using my phone as a remote control is very handy. At first I tried to use the pi as a router, but I wasn't able to get it working. I decided I didn't want to fight that war and ordered a very small router.

It's running now as a first test. Sometimes the motion system just stops. I can't reproduce it on my test Arduino.
The place looks like a reverb chamber. You are brave!
 
It's back, unfortunately without measurements. Somehow it freezed everytime quite early in the measurement sequence. It has done that every now and then before, but now it seems to do it every time. I changed the arduino and some cabling, but it didn't help. I've been trying to reproduce it with my HIL test, but that never shows the problem.

Now I need to somehow solve this...
 
This is a lot of fun and I watch. Thank you for sharing as you go.
 
I found the problem. When I left the barn, my phone lost the connection to the wifi router. Then the ssh connection was closed, terminal closed, processes started from that terminal were stopped...

I want to improve the cable management of the setup a bit and I need to make the horn standard a bit stronger. Give me some time and I will hopefully report back with some measurements :)
 
I found the problem. When I left the barn, my phone lost the connection to the wifi router. Then the ssh connection was closed, terminal closed, processes started from that terminal were stopped...
In case you don't know already, something like screen will keep the session running when you disconnect, and let you reconnect to it later.
 
Here is a set. It has been a while, so I'm not completely sure which set it is :)


Here is a matlab implementation: https://github.com/TomKamphuys/NTKSPH/tree/feature/3D

I also have some python code. I tried to do stuff on the GPU, but not all functions were supported by cupy. I didn't manage to get a speedup. It would be nice if you could get that to work. I will need to find the code, but if I find it I can share it.

Here is also some information: https://www.diyaudio.com/community/...d-scanner-on-a-shoestring.318151/post-7716506
 
Here is a set. It has been a while, so I'm not completely sure which set it is :)


Here is a matlab implementation: https://github.com/TomKamphuys/NTKSPH/tree/feature/3D

I also have some python code. I tried to do stuff on the GPU, but not all functions were supported by cupy. I didn't manage to get a speedup. It would be nice if you could get that to work. I will need to find the code, but if I find it I can share it.

Here is also some information: https://www.diyaudio.com/community/...d-scanner-on-a-shoestring.318151/post-7716506
Thanks so much Tom! Just a quick check, were these measurments taken using a 'dual channel mode' one that has a reference loopback channel to remove any variations in the audio system latency? Just thinking about any possible excess phase between the IRs which is not related to mic position. I assume it must be okay since you seem to have got some sensible results but just want to be sure for when we come to the higher frequencies.
 
Any excess phase added by the amplifier is not in the reference. I vaguely remember problems with a balanced output amplifier, but can't remember enough to find posts about it
 
Any excess phase added by the amplifier is not in the reference. I vaguely remember problems with a balanced output amplifier, but can't remember enough to find posts about it
Thanks. I was really thinking about audio driver latency as that can vary moment to moment by small amounts, but would be taken out by having a reference channel / loopback as is common in REW or ARTA etc.. I'm back home from traveling today so I will be able to download your files and take a look.
 
Here is my python code, based on @NTK 's. I haven't seen it in a while and it's in the middle of a battle with cupy, so it's not the best code. There is also some data that you might be able to use. It's in a format that the code (scipy) understands and it's used in the test.

 
Here is my python code, based on @NTK 's. I haven't seen it in a while and it's in the middle of a battle with cupy, so it's not the best code. There is also some data that you might be able to use. It's in a format that the code (scipy) understands and it's used in the test.

Thanks for your help, it is invaluable. I got my code trying to run SHE but was getting nearly 100% fit errorr. This morning I realised the file names are cylindrical coordinates not carteasian or spherical, haha. Might get further today.

Are the beam, arm, angle offsets hard coded in the NTKSPH/3D/convert_coefficents.m correct for the wav files you shared above?

beam_offset = 0.025; % meter
arm_offset = 0.0023; % meter
arm_angle = 1.46; % degrees

I note there is something different in the NTKSPH/offsetpositions.csv file.

0.4097,0.4199,-0.0242
0.0005,0.0034,-0.0001

I realise you have not touched any of this for time, so apologies if I'm asking things you don't remember and don't have time to work on.

One more question, do you remember what the DUT was in those wav files? I saw you had some measurments of a Elac speaker as well as a compression driver on an ATH horn. I was trying to center the monopole at 100hz to optimise / confirm the mic offset but was thinking the compression drover might be nothing but noise or not even have a monopole. This was yesterday before I sussed out the coordinates error.
 
Last edited:
Are the beam, arm, angle offsets hard coded in the NTKSPH/3D/convert_coefficents.m correct for the wav files you shared above?

beam_offset = 0.025; % meter
arm_offset = 0.0023; % meter
arm_angle = 1.46; % degrees

Yes:
 
"I note there is something different in the NTKSPH/offsetpositions.csv file.

0.4097,0.4199,-0.0242
0.0005,0.0034,-0.0001
"

I've no idea... Might also be something from earlier 2D trials.
 
By the way, if we simply extract the raw coordinates from the file names in the IR data set from Tom, we can plot them as Cartesian, Cylindrical or Spherical coordinates and it becomes clear they are cylindrical coordinates giving us a oblate (squashed) sphere with two complete shells.

CoordinatePlots.png
 
Back
Top Bottom