• 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,708
Likes
5,975
Location
US East
source separation with offset destection working pretty well:
Cardioid with 2 disturbing sources outside measurment cylinder: max 0.5dB deviation @ 250 Hz with 9th order

Next step I will use aktools room to simulate a " real" reflective small room around the setup

biggest challenge now is getting high enough order fit without "exploding" least squares I think
...
SFS is pretty magical, but not quite able-to-raise-the-dead level magical. It works well at the lower frequencies when the sound field is not excessively complicated. It also helps when there is only one driver active in a speaker most of the time.

Klippel's mitigation strategies are:
  1. For line arrays with multiple drivers active at the same time, Klippel measures one driver at a time, and use vector sum to get the final combined results.
  2. Switch to time gated measurements at higher frequencies (above ~1.5-3 kHz) and not use SFS.
  3. Measure very close to the speaker to maximize the ratio between direct sound to reflections.
The Magnepan LRS is an example of a difficult to measure speaker for the NFS because of its extremely complicated radiation pattern. Amir doubled his typical number of measurements points to over 2000 points, and the fitting errors still climbed above 1% starting at 3 kHz.
 

Ulf

Member
Joined
May 11, 2021
Messages
9
Likes
12
I haven't come across any work on finding the optimal measurement grids. Doesn't necessarily mean that there aren't any. The complication is that this will require a very elaborate robotic measurement system.

I am not sure that you need to be super accurate with the positions (errors will show up as noise in the measurement which you are dealing with anyway), but maybe for very dense grids it doesn't matter as much which grid is used. But I think the weighting of the points is important no matter what grid you end up with. Otherwise, when you regularize the least square problem, you will bias the solution towards the angles where you have more points.
 

Kessito

Member
Joined
May 18, 2020
Messages
54
Likes
99
You can still use Gauss-Legendre in the z direction (maybe you are?). Not so much to save measurement time, but to make the solution more accurate. When you regularize in your least square solution you want the vector norm to correspond to the physical energy of the wave field, and the grid weights (can) give you that.

Hmm, interesting..
We could also try spherical cap extrapolation from the aktools to extrapolate the measured points to the exact needed grids maybe?

I am working on a script with databases from berlin and aachen in which we can place a genelec 8020 or QSCK8 that was measured as sofa dataset in an anechoicroom (6211positions) in a virtual room.

The output can be the impulse responses of any combination of direct and reflected sound at any position in space ( in the scripts the spherical harmonics transforms are used to high order on the anechoic data ) , so that should enable us to test the methods fairly well.
 
Last edited:

Kessito

Member
Joined
May 18, 2020
Messages
54
Likes
99
I found these functions in the spherical harmonics folder of the ITA toolbox, maybe they can be helpfull for more robust/weighted fitting?
 

Attachments

  • @itaSuperSph.zip
    6.8 KB · Views: 89
OP
NTK

NTK

Major Contributor
Forum Donor
Joined
Aug 11, 2019
Messages
2,708
Likes
5,975
Location
US East
Welcome to ASR.

Thanks for sharing the paper. The technique described is very interesting. It uses patch measurements and the measurement surfaces are planar. This makes measurements much simpler as it wouldn't require a robot to go fully around the speaker to test.

This will take quite a bit of time and work to fully understand what the authors were doing, as the method is very different from the Helmholtz equation least squares method that the current work is based on. I am not proficient in nor familiar with the (Green's function based) mathematics they used.
 

Dave Zan

Active Member
Joined
Nov 19, 2019
Messages
169
Likes
490
Location
Canberra, Australia
....this is not a dead project. So much promise here. And so useful to have if it is successful.
I finally took the first step and, after many Covid caused delays, acquired a stable measurement mic (a Bruel and Kjaer clone by MicW/BSWA).
It has been checked by comparison with a friend's Earthworks and the supplied calibration looks accurate.
So now I am back at work to earn some extra money for the stepper motors, electronics and hardware for the scanner.
Unfortunately, now I have the money I don't have the time - too busy at work!
(At least the work has made me revise my statistics, my task is not so different from the famous Sean Olive speaker metrics project.
Statistically any way - the actual situation is very different but the maths is similar.)
Hopefully there will be some more activity in the not too distant future.
If so I look forward to report it here.

Best wishes
David
 
Last edited:

mwmkravchenko

Active Member
Joined
Nov 20, 2018
Messages
181
Likes
196
Location
Perth Ontario
I know those problems well. Many decades of this! I wish you the best David.
 

mwmkravchenko

Active Member
Joined
Nov 20, 2018
Messages
181
Likes
196
Location
Perth Ontario
It is werry werry qwiet ( Elmer Fud ) (He didn't work for Klippel)
 

Valhalla

Active Member
Joined
Jan 16, 2021
Messages
110
Likes
170
I finally took the first step and, after many Covid caused delays, acquired a stable measurement mic (a Bruel and Kjaer clone by MicW/BSWA).
It has been checked by comparison with a friend's Earthworks and the supplied calibration looks accurate.
So now I am back at work to earn some extra money for the stepper motors, electronics and hardware for the scanner.
Unfortunately, now I have the money I don't have the time - too busy at work!
(At least the work has made me revise my statistics, my task is not so different from the famous Sean Olive speaker metrics project.
Statistically any way - the actual situation is very different but the maths is similar.)
Hopefully there will be some more activity in the not too distant future.
If so I look forward to report it here.

Best wishes
David
David your endeavor is much appreciated by the community. Actually, a couple of months ago we designed and built a turntable with stepper motor mechanism with an enough tall tower for the speaker to time-window the early reflections in measurements. I have no idea about your idea for the scanner, but just wanted to let you guys know we have the capabilities and machining equipment to design and build a prototype when the algorithm is working properly. Maybe the current turntable could be used for initial measurements. The idea was to keep the measurement mic steady and turn the speaker around it's acoustic center. The tower is tilted, so the speaker front baffle will remain in the dead center in all 360 degrees, and we didn't have to install it in one side, so the load is distributed evenly on the turntable beneath.

0.PNG1.PNG2.PNG3.PNG4.PNG
 

Attachments

  • 8.jpg
    8.jpg
    96 KB · Views: 94
  • 7.jpg
    7.jpg
    149.9 KB · Views: 90
  • 6.jpg
    6.jpg
    116.4 KB · Views: 96
  • 5.jpg
    5.jpg
    122.3 KB · Views: 92
  • 4.jpg
    4.jpg
    114.5 KB · Views: 95
  • 3.jpg
    3.jpg
    90.3 KB · Views: 100
  • 2.jpg
    2.jpg
    139.2 KB · Views: 93
  • 1.jpg
    1.jpg
    78.2 KB · Views: 86
  • 9.jpg
    9.jpg
    103.1 KB · Views: 95
Last edited:

mwmkravchenko

Active Member
Joined
Nov 20, 2018
Messages
181
Likes
196
Location
Perth Ontario
David your endeavor is much appreciated by the community. Actually, a couple of months ago we designed and built a turntable with stepper motor mechanism with an enough tall tower for the speaker to time-window the early reflections in measurements. I have no idea about your idea for the scanner, but just wanted to let you guys know we have the capabilities and machining equipment to design and build a prototype when the algorithm is working properly. Maybe the current turntable could be used for initial measurements. The idea was to keep the measurement mic steady and turn the speaker around it's acoustic center. The tower is tilted, so the speaker front baffle will remain in the dead center in all 360 degrees, and we didn't have to install it in one side, so the load is distributed evenly on the turntable beneath.

View attachment 210742View attachment 210743View attachment 210744View attachment 210745View attachment 210746
Kind on interesting. I like the thinking involved in this. And the ease in which you can set the microphone to a true constant distance from the loudspeaker baffle. For the rotary part I have purchased a heavy duty aluminium lazy Susan bearing. They are not expensive and are purpose designed for this kind of rotation. The good ones have plenty of ball bearings for ease of rotation and axial stiffness. For rotary table that the device under test can sit in I have purchased a remote controlled 35cm table that will step in various increments. This I have to figure out how to hack into it and set that up to be software controlled. But for right now it is a press of a remote button so tedious but possible. I will mock something up and let the other very intelligent fellows critique the ideas.
 

mwmkravchenko

Active Member
Joined
Nov 20, 2018
Messages
181
Likes
196
Location
Perth Ontario


Food for thought.

Linear rails can be done dirt cheap with these:


At first glance you think that these may be a little pricey and they can be purchased for less, this is a simple and quick search. But they are literally screw in place. The alignment is done. The weight capacities are already more than enough. The over rating is for stiffness. There is another much less expensive way that requires a little reworking of regular drawer slides. And this can be shown in a video if it of interest. The cost savings is quite high if you are on a tight budget. You pay for the monetary reduction by adding some sweat equity to the problem.


Opera Snapshot_2022-06-04_115317_www.amazon.ca.png


If you cut off this tab that the rubber stop is attached to you can with some fiddling chain these slides to any desired length and have a linear rail for very little money. Some quality time with a good file or grinder will get you a nice smooth connection between the rails.

I am not the best at the high level math. But I have been engineering and creating wild and whooly things for decades. If there is interest I can make this up and post a video of the different elements. I think I will try the method outlined in this post:


I can compare it to a true anechoic measurement. I do these when I have to.

20180708_180534.jpg
20161010_113135.jpg



20210502_162347 (Large).jpg


Yes those are audiophile approved wire nuts in series connection for the signal wire.
 

No. 5

Active Member
Joined
Nov 1, 2019
Messages
144
Likes
121
[I think I will try the method outlined in this post:

Even without precession placement you can get pretty good results with that method!

The below is a Behringer 2030P: red is 20 measurements points, taken outside without microphone calibration, manually moving the mic stand, low signal level so as to not disrupt the neighbors, and construction noise (no IR window or smoothing has been applied); Green is the same model speaker measured by Amir on the NFS.
ASR.jpg


Those are excellent recommendations on the photography turntable and drawer slides. I need to make some changes to my measurement rig now...
 

Zink

Member
Joined
Jan 12, 2024
Messages
9
Likes
21
Location
Australia
Unsure if this project is completely abandoned but i saw a mention of isogeometric analysis a few pages back and thought i would mention a recent thesis i read which has a section on inverse acoustic scattering problems and field recreation using IGA (among some other very intriguing topics). For those unaware IGA is essentially the next evolution of the finite element method that using NURBS splines to represent geometry which have numerically stable refinement properties unlike FEM, as such much higher accuracy can be obtained using this technique which is growing in popularity slowly. While IGA has mostly been used for material stress analysis a few papers are stating to pop up for acoustics recently. There is some dificulty using 3D volumes in IGA to represent fields and there is some older tools using a blend of boundy element method and IGA to reduce solution dificulty among seveal other techniques.

Publication: Locally refined splines for optimisation and inverse problems in acoustics - Javier Videla Marió (2023)

Sadly the section for inverse scattering problems (chapter 6, pg 149) is only in 2D but is discusses several techniques and optimizations and has refreences to other articles but the paper has fairly detailed explinations for the mathematics and techniques used which might be of use. The author uses a modified (unreleased) version of this MATLAB code modified to use the helmholtz equation but the base tools are already fairly useful.
The least squares method is still used but also applies particle swarm optimisation and PHT-Splines to represent the solution, also including an adaptive mesh refinemet method which significantly decreases calculation time.

inversehelmholtz.png


I assume the same techniques can be applied to real measurement data from microphones.
Hopefully this is atleast somewhat relevant or inciteful and could be of use for improving the analysis of data from the DIY scanner.

Unrelated to this thread's topic but chapter 3 (pg 47) and chapter 4 (pg 89) preforming shape optimisation on 2d and 3d geometry is very intriguing and i think has high appeal for future audio design.
 
OP
NTK

NTK

Major Contributor
Forum Donor
Joined
Aug 11, 2019
Messages
2,708
Likes
5,975
Location
US East
Unsure if this project is completely abandoned but i saw a mention of isogeometric analysis a few pages back and thought i would mention a recent thesis i read which has a section on inverse acoustic scattering problems and field recreation using IGA (among some other very intriguing topics). For those unaware IGA is essentially the next evolution of the finite element method that using NURBS splines to represent geometry which have numerically stable refinement properties unlike FEM, as such much higher accuracy can be obtained using this technique which is growing in popularity slowly. While IGA has mostly been used for material stress analysis a few papers are stating to pop up for acoustics recently. There is some dificulty using 3D volumes in IGA to represent fields and there is some older tools using a blend of boundy element method and IGA to reduce solution dificulty among seveal other techniques.

Publication: Locally refined splines for optimisation and inverse problems in acoustics - Javier Videla Marió (2023)

Sadly the section for inverse scattering problems (chapter 6, pg 149) is only in 2D but is discusses several techniques and optimizations and has refreences to other articles but the paper has fairly detailed explinations for the mathematics and techniques used which might be of use. The author uses a modified (unreleased) version of this MATLAB code modified to use the helmholtz equation but the base tools are already fairly useful.
The least squares method is still used but also applies particle swarm optimisation and PHT-Splines to represent the solution, also including an adaptive mesh refinemet method which significantly decreases calculation time.

View attachment 342460

I assume the same techniques can be applied to real measurement data from microphones.
Hopefully this is atleast somewhat relevant or inciteful and could be of use for improving the analysis of data from the DIY scanner.

Unrelated to this thread's topic but chapter 3 (pg 47) and chapter 4 (pg 89) preforming shape optimisation on 2d and 3d geometry is very intriguing and i think has high appeal for future audio design.
It seems to me building the robotic measurement system is now the biggest barrier for DIYer's to build a 3D scanner.

FEM (or BEM) is not used in the mathematical analysis part of NFS, so I am not sure if isogeometric analysis is going to help. This IGA technique looks interesting, though. My understanding of the mathematics behind FEM (and BEM) is extremely rudimentary. Trying to get myself familiar with another new technique is going to be tough on my remaining active brain cells :D
 

Few

Member
Joined
Oct 27, 2020
Messages
91
Likes
95
Great to see this thread still twitching! NTK, my impression is that most of the later software development was focused on Matlab/Octave. I'm trying to add Python programming to my set of "skills" (a bit of a stretch in my case) and was curious whether any of your early NFS Jupyter notebooks were updated in parallel with the Matlab developments. I was hoping that seeing similar functionality in the two languages would help me learn to translate between them. To be clear, this isn't a request that you take on more work if the Python stuff is lagging the Matlab work!

Few
 
OP
NTK

NTK

Major Contributor
Forum Donor
Joined
Aug 11, 2019
Messages
2,708
Likes
5,975
Location
US East
Great to see this thread still twitching! NTK, my impression is that most of the later software development was focused on Matlab/Octave. I'm trying to add Python programming to my set of "skills" (a bit of a stretch in my case) and was curious whether any of your early NFS Jupyter notebooks were updated in parallel with the Matlab developments. I was hoping that seeing similar functionality in the two languages would help me learn to translate between them. To be clear, this isn't a request that you take on more work if the Python stuff is lagging the Matlab work!

Few
Honestly, I probably haven't looked at my Python code for this project for maybe 2 years.

The Python code should have all the functionalities of the MATLAB/Octave versions, but may be scattered around in multiple different notebooks. The MATLAB/Octave code was written specifically to illustrate the steps of the NFS math process for the members who were interested in it at the time, and thus it was more focused. Don't hesitate to ask me if you have any questions. I do have some bandwidth (a few hours a week) available to work on this project at least in the next couple of months (that's my foreseeable future at the moment :)).
 

Few

Member
Joined
Oct 27, 2020
Messages
91
Likes
95
Great. Thanks very much. I was rereading some of your original documents and caught some things I wasn’t in the position to appreciate the first time. I have been pondering how singular value decomposition (SVD) could be brought to bear on this problem, and just noticed that you mentioned that the Python code actually already does that under the hood, through the linear regression algorithm. Excellent! Now I just need to improve my understanding of how that works. The SVD trick seems semi-magical.

On the “robot” front, and in the spirit of minimizing complexity and also acoustic reflections, I wonder if a hybrid between Klippel’s design and the “strings” approach I was exploring might have merit. If working with concentric cylinders is sufficient, then using a pivot arm whose axis is above the speaker could be used to suspend the mic by stretch-proof strings. The strings could be reeled in or out with a single motor for vertical positioning, and the arm could be rotated by a second motor for angle adjustments. The signals to the motors would be much simpler and more intuitive than those needed in the three-spools mechanism I proposed back in the day. The radial direction could be addressed in a few different ways—manually, or motorized—but again more intuitively than in my three-spools design. I can create a sketch or two if I’m just inducing head-scratching at this point. The main point is that very little hardware would be required, and only the mic and its cable (and the suspension strings) would occupy the volume most likely to cause reflection issues.

Few
 

KLang1

Member
Joined
Feb 25, 2020
Messages
53
Likes
172
Location
Alman
It seems to me building the robotic measurement system is now the biggest barrier for DIYer's to build a 3D scanner.
You basically need a turntable for the speaker and a microphone arm that goes up and down, right? Doesn't sound like a big barrier. I could recycle my 3d printer into that.
 
Top Bottom