• 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

The octave/matlab implementation provides this function:
Code:
function [r, theta, z] = extract_measurement_position_from_filename(filename)
    
  position = strrep(filename, '(', '');
  position = strrep(position, ')', '');
  position = strsplit(position, ',');


  r = str2num(position{1})/1000; % convert to meters
  theta = deg2rad(str2num(position{2}));
  z = str2num(position{3})/1000; % convert to meters


endfunction

 
The octave/matlab implementation provides this function:
Code:
function [r, theta, z] = extract_measurement_position_from_filename(filename)
  
  position = strrep(filename, '(', '');
  position = strrep(position, ')', '');
  position = strsplit(position, ',');


  r = str2num(position{1})/1000; % convert to meters
  theta = deg2rad(str2num(position{2}));
  z = str2num(position{3})/1000; % convert to meters


endfunction

After sleeping on it, seems that Matlab converts to spherical coordinates with colatitude but my Python script was giving elevation (angle measured from the azimuth plane), hence the massive fit error. Making a bit more progress now.
 
Coordinate systems are a great source of confusion and errors. Angles are the worst of all.

Code:
function [phi, theta, r] = cart2sph_phys(x, y, z)

  [phi, theta, r] = cart2sph(x, y, z);
  theta = pi/2 - theta;

endfunction
 
1724687032191.png

A graph from Klippel
 
Thank you, I'll take a look at the downloads.

Even with my synthetic IR files (based on 6" piston source) the residual error climbs steeply to double digits above 5KHz when I enforce a N=15 cap.

I guess at this point I need to move on and actually start extracting useful data from the coefficients and see how it looks.

FWIW here is a plot of the harmonic order determined by spatial nyquist limit for a 0.5m sphere. This doesnt mean that is the order we should use, only that angular detail can exist in that range for a given frequency and sphere radius.

KR limit.png
 
Last edited:
Making slow progress... It looks like I've managed to create coefficients from Tom's data, then reconstruct the 'full field' (no sound field separation) at a similar distance as the original measurment. The response looks very close to simply doing an FFT on the closes to on-axis mic in the impulse response files.

On-axis IR file from the input data:

View attachment 452895

Reconstructed FR with 48 points per octave and 'propagated' to 0.32m radius:
View attachment 452898

Same things at +45degree vertical angle. The Xover null is nicely visible.
View attachment 452902

(Data only goes up to 4KHz intentionally)

Unfortunately when I try sound field separation it looks a mess. Also when I try to propagate to a further distance the response seems to get tilted in an unexpected way. Still bugs to figure out that's for sure!

I realise I am currently just reproducing what has already been proven by NTK and Tom. My hope is that if I can get this to work, I can try to make it a little easier to implement - perhaps work with John to get compatibility with REW and draw up a hardware platform. Those are still dreams though, lol!
I would love to see John get involved and we all end up with a Klippel capable measurement method. It's called price driven competition. Right now they are priced as the only game in town. To see that change would be so lovely.

Mark
 
I thought I'd share a little info. I've read differing opinions on whether a dual shell measurement is really needed for sound field separation. Afterall we do have two mics in each axis where the external sound field crosses in to and out of the sphere. In theory it is still possible on a single layer measurement grid. I also note that the Klippel software has a check box to enable or disable dual shell measurements, further suggesting it is not 100% necessary.

I ran a pass with synthetic impulse responses on a single 1m radius grid with 1000 points. In theory there there should be zero data entered in to the D_nm columns that represent external sources. Analysing the coefficients directly we can see that is not quite the case. There are some columns, especially at low frequencies where this holds nearly true, but as frequency increases we see higher vales in the external source columns and it appears in a periodic way.

output.png


Looking at it another way we can compare the ratio of Internal Source values C_nm to external source values D_nm. Again, in theory D_nm should be zero across the board as the input was a reflection free synthetic IR. The mean leakage from C_nm to D_nm increases with frequency, which is what I'd expect given the relationship between sound wavelength and the spacing of mics on opposite sides of the sphere. That said, the Max (dotted red) line suggests at least one mode is leaked from C_nm to D_nm in almost every frequency.

output2.png


If we look at the per-order ratio over frequency we can see that even at 100Hz it's the first order that has a high C_nm to D_nm ratio. None of this is good news for a single shell measurement grid doing sound field separation.

output3.png


Let me know if you interpret things differently though.
 
Although I can't proof it using math, I doubt one sphere of measurements is enough. Yes, you do have two measurements on each axis, but the radiation of the device does not have to be the same forward/backward (left/right, up/down). With only one sphere of measurements you have no way of knowing if the difference you measure between front and back is due to a difference in sound from the speaker or a result of an echo.

My simplified mental image is of measuring vehicles going into and going of out a village. They use 'pneumatic counting hoses' (literal translation from the dutch pneumatische telslangen). If you only have one hose, you can only deduce that there was a vehicle, not which way it was going. You need two hoses after eachother so you can deduce the direction of the vehicle by the order of pressure spikes in the hoses. The amount of traffic on the road in the west doesn' t have to be the same as on the road in the east.

in-de-drechtsteden-liggen-de-komende-maanden-telslangen-op-straat.jpeg69503eee66db_wesley_3_metingen_n381_frysland_verkleind.jpg
 
Last edited:
The goal of the math is to find the coefficients C^out_m,n from the measurements. Since these C coefficients are dependent on r, θ, and ϕ, our measurement points have to cover all 3 variables. Naturally a cylindrical measurement surface will provide some variations in r, but it is likely to be sub-optimal. A single spherical measurement surface (centered to the origin) is certainly insufficient as it has no variation in the r coordinates (i.e. r for all measurement points are the same).
index.php

Equation is from this post.
 
I doubt that. MIght be possible for low order sources (monopole, dipole, ...). Than you could rely on the slowly changing angular sound field and kinda get multiple measurements at different distances. With higher orders this wont work, if you ask me.
 
Can you imagine that all this is exciting for someone like me, who knows about the manual acoustic measurement of loudspeakers, but for whom higher mathematics is decades behind?

No?

But it is and I will continue to follow it with interest.
 
Can you imagine that all this is exciting for someone like me, who knows about the manual acoustic measurement of loudspeakers, but for whom higher mathematics is decades behind?

No?

But it is and I will continue to follow it with interest.
Right beside you! I was never really much good at complex mathematics. But measuring drivers and loudspeakers yes!
 
Can you imagine that all this is exciting for someone like me, who knows about the manual acoustic measurement of loudspeakers, but for whom higher mathematics is decades behind?

No?

But it is and I will continue to follow it with interest.
Same here. I was pretty good in Mathe und Physik at school, but that's decades ago :oops: .
Nevertheless following here is very interesting.
 
Hey guys,

I was so excited by the content of this thread that I jumped right in. However, I realised just now that as a patent exists on this matter I really shouldn't, and don't want, to be involved. I've therefore asked for my previous posts to be removed. I hope you can understand, although it may be disappointing.
 
Hey guys,

I was so excited by the content of this thread that I jumped right in. However, I realised just now that as a patent exists on this matter I really shouldn't, and don't want, to be involved. I've therefore asked for my previous posts to be removed. I hope you can understand, although it may be disappointing.
I certainly don't understand. Were you planning on commercializing this? Patents don't prevent discussion, investigation, reverse engineering, understanding, and discovery. Also, the patent is on the implementation, not the math and physics. This thread isn't even close to patent infringement.
 
Hey guys,

I was so excited by the content of this thread that I jumped right in. However, I realised just now that as a patent exists on this matter I really shouldn't, and don't want, to be involved. I've therefore asked for my previous posts to be removed. I hope you can understand, although it may be disappointing.

Will honor your request regardless of patent questions or not. Others should respect your choice and can message you privately if desired.
 
Will honor your request regardless of patent questions or not. Others should respect your choice and can message you privately if desired.
Thank you Rick. Yes happy to answer any questions by DM.
 
Back
Top Bottom