No it doesn't work like that, 3D measurements for Spherical functions, 2D measurements need different functions. I'm sure Earl can explain more clearly what the specific differences are.
The 2D functions for the radial modes are the same in 2D and 3D, the 2D angular functions are simply the spherical harmonics with m=0 which then simplify to the Legendre polynomials.
Yes, this can be done, but has not been investigated as to how accurate it is.This brings the important question of whether we can solve for the entire thing using an underdetermined set of equations and recent ideas from compressive sensing including l1 norm minimization (from signal processing) rather than using an over determined system of equations and least squares kind of methods (l2 norm minimization).
You keep referring to the set of equations needing to be linearly dependent, which is backwards. If the equations are all linearly dependent then the matrix is singular and has no unique solution. (They need to be linearly independent to have a solution.) AT LFs the equations are indeed linearly dependent and as such matrix inversion requires SVD - the condition number becomes quite low.One good way to check whether we will be able to solve such a system of equations properly with l2 norm minimization (least squares) is to check the matrix condition number (ratio of largest eigen value to smallest eigen value). If it is not low enough, it might get difficult to proceed..
This is exactly what I have done, except that I use a stationary mic and rotate the speaker - a trivially easy solution, especially manually.I would love to have what you did available: 2D without SFS. I think it could be an intermittent goal. It shares parts/capabilities with the full blown diy Klippel: automated measurements, something rotates, translation of measurements to coefficients, evaluation on a denser grid, ...
What we have with a MEMs mic is consistency. Calibration is not impossible. I tried searching for quite a few when thee was discussion on the QuantAsylum forum about this. And the best ones are bottom hole types. It would need to be worked out that the PCB is designed that way.Getting MEMS calibrated can be a bit of a challenge.
On paper it works great, in practice there are not many of the shelf variants available for users.
Multiple mic setup, especially an array, will also become expensive very quickly.
Edit: Many of us have good reference mics. A few candidate MEMS mics could be tested and correction graphs worked out if we have a standard test method. Even inexpensive Electret mics are quite accurate, USB mics with calibration are accurate enough. What many people who do not use mics regularly fail to comprehend is how dominant a microphones placement in comparison to the DUT has a much greater effect on the measurement than does the microphones own characteristic response.
Last edited:
I know, I used to work (briefly) for a company who did those things! 🙂What we have with a MEMs mic is consistency. Calibration is not impossible. I tried searching for quite a few when thee was discussion on the QuantAsylum forum about this. And the best ones are bottom hole types. It would need to be worked out that the PCB is designed that way.
But looking from the open source character of the project, it's just not really a practical solution for the average user I think.
Similar like scripting and coding.
I don't think I have knowingly made this statement anywhere that a set of equations need to be linearly dependent to be solvable.You keep referring to the set of equations needing to be linearly dependent, which is backwards.
I know that a system of equations needs to be linearly independent to be solvable. I apologize if my writing conveyed the opposite meaning.. 🙂
All I was trying to convey in the above posts was that equations being linearly dependent is what will not help us with solving the set of equations.
I was also interested to see if the linear dependence is what caused problems with Tom's reconstruction of the field with measurement points spaced uniformly in a circle compared to the seemingly random distribution of points shown here: https://www.diyaudio.com/community/...d-scanner-on-a-shoestring.318151/post-7604604
I completely agreeIf the equations are all linearly dependent then the matrix is singular and has no unique solution. (They need to be linearly independent to have a solution.)
As far as I am aware, condition number becoming quite low and closer to 1 is what will indicate a well-conditioned matrix suitable for inversion. Condition number becoming high causes an ill-conditioned matrix and causes all sorts of problems with inversion/solving the set of equations.AT LFs the equations are indeed linearly dependent and as such matrix inversion requires SVD - the condition number becomes quite low.
Perhaps you meant that the condition number becomes high at LFs?
Thank you 🙂How much smoothing of the measurements will this introduce is the question an engineer will need to know. I am not a great mathematician, but I understand your clear explanations and appreciate it! The resolution that we are looking at is down to 1/24th octave. That is where we see the beginnings of harmonics and nulls and peaks in the reproduction of the music, or the test signals.
I am an engineer as well (compared to being a mathematician. Some amount of math gets stuck in anybody's head as part of doctoral research in EE, I guess) 😀
As far as I am aware & as Dr Geddes pointed out, the L1 minimization-based method for "solving" an underdetermined system of equations has not been tried out in the context we are currently interested in (finding out scaling coefficients for the basis functions used for the pressure field reconstruction at points in 3D space). So, it needs to be tried out and seen how good the method is/ how much the resolution of the directivity data thus obtained will have. However, compressive sampling/sensing and reconstruction of the original signal from the measurements thus obtained has been a very hot topic in signal processing during the past 12-15 years or so. These techniques have been applied in various disciplines, and very encouraging results have been obtained. No wonder papers like this have been read quite a few times in the past years: https://arxiv.org/abs/math/0503066 🙂
In short, obtaining theoretical performance guarantees involves some amount of math heavy lifting for the time being. But I am very curious to try out the method itself in this problem. Intuitively, due to the nature of the problem, I feel that it will work well. But one of these days, I will definitely have to try it out and see 🙂
Then you don't understand what scripts are all about. I give up, again.I am no fan of scripting for this kind of working because it requires me to remember lines of code and scripting language.
I posted the Weinreich paper in this thread a few days ago.the problem I currently have is just even to find a document where the higher level physics (math) is explained
It's hard to keep up with this fast moving thread, so I apologize if this is redundant or just unnecessary. I just thought I'd take a stab at teasing apart the notation a bit in case the underlying mathematics is obscured. Starting with this previously posted equation for an approximation for the sound pressure,
one way to view the problem is to select a single frequency of interest, and then characterize the three dimensional soundfield where each location around the speaker can be identified by its Cartesian coordinates,
, or by its spherical polar coordinates,
. The symmetry of the problem makes spherical polar coordinates more convenient, so we are trying to characterize
.
Here's the key point: In an idealized situation with true spherical symmetry, the dependence of sound pressure on the coordinates
is separable, meaning we can rewrite our one function of three variables, as the product of three functions, each depending on only one variable. So
play the role of the product
. The
functions are called the associated legendre polynomials (a bit of a mess most easily understood by seeing them tabulated or graphed), and the
dependence is based on
, where
and m determines the number of nodes.
The two-variable angular functions are known as the spherical harmonics and they show up throughout physics, chemistry, engineering.... If you specify the values of n and m, you select one of the spherical harmonics, which in turn describes a specific angular dependence. The first several shapes are shown in this video.
If you're working only in a horizontal plane containing the origin, then
at all points so the
dependence is replaced by a constant. The pressure in the plane is then given by just
. As Earl pointed out, the function
is the same with or without
dependence.
I hope this helps more than it obscures! If you look online for spherical harmonics information, be aware that different fields have different definitions of the angular variables so you have to establish the definition being used before diving in. Also, l and m are sometimes used instead of m and n as indices for the spherical harmonics. Just details, but they can add to the confusion.
Few
one way to view the problem is to select a single frequency of interest, and then characterize the three dimensional soundfield where each location around the speaker can be identified by its Cartesian coordinates,
Here's the key point: In an idealized situation with true spherical symmetry, the dependence of sound pressure on the coordinates
- The radial function,
- The product
The two-variable angular functions are known as the spherical harmonics and they show up throughout physics, chemistry, engineering.... If you specify the values of n and m, you select one of the spherical harmonics, which in turn describes a specific angular dependence. The first several shapes are shown in this video.
If you're working only in a horizontal plane containing the origin, then
I hope this helps more than it obscures! If you look online for spherical harmonics information, be aware that different fields have different definitions of the angular variables so you have to establish the definition being used before diving in. Also, l and m are sometimes used instead of m and n as indices for the spherical harmonics. Just details, but they can add to the confusion.
Few
Attachments
I think that we are on the same page, just mixing up our terms a bit. The point is that at LFs the matrices become unstable, high condition number and as such need something like SVD to calculate. I had some success along these lines but nothing production ready as the SVD did not always work.I completely agree
I have been out of the loop for at least 10 years and can see that techniques have evolved that I am not aware of. Figures!! One has to stay on top of this stuff as it moves fast.No wonder papers like this have been read quite a few times in the past years:
I would like to see some investigation into using signal processing to extend the impulse response beyond the first reflection. I know this can be done in theory. If this can be done effectively then the sound field separation (the most difficult part) becomes redundant and the setup becomes orders of magnitude simpler. If I were still doing research into these kinds of measurements that is the way that I would proceed.
The 2D functions for the radial modes are the same in 2D and 3D, the 2D angular functions are simply the spherical harmonics with m=0 which then simplify to the Legendre polynomials.
I hacked this into NTK's code. I tried Octave's legendre function, but I'm not shure that is the one we need. After that I had to switch the plane. Actual changes I neded to make were minimal : do only m = 0 iso a loop over -n -> n

Looks promising...
@Tom Kamphuys: If possible, can you check the condition number of the matrices in your two examples (the random-looking distribution of measurement points vs the circular distribution of points) here: https://www.diyaudio.com/community/...d-scanner-on-a-shoestring.318151/post-7604604
Also, in the random-looking setup, was it a uniform random sampling of points within a bounded region in the xy plane?
I had to look up wat condition number is. And still not sure how to calculate it.
The random sampling was only r : 1 + uniform sampling (I think)
In the mean time I'm a little bit less hopefull as other source distributions and SFS don't look that promising...
Total stab in the dark here. Is Scilab a potentially useful place to put all the programming goodness? It seems easy to generate a GUI. I saw a little bit of information that Octave can have some GUI features as well.
Basically if this is going to get more widespread use a command line method of working with the interface will make it much less attractive to most people. I will try with whatever we get as I am definitely going to give this a go. Too many current uses for me not to be invested in this project.
Edit: In my naivete I stumbled upon the term Jupyter Notebook and remembered the NTK made up his code in this in the first place. So, maybe this is useful after all?
Basically if this is going to get more widespread use a command line method of working with the interface will make it much less attractive to most people. I will try with whatever we get as I am definitely going to give this a go. Too many current uses for me not to be invested in this project.
Edit: In my naivete I stumbled upon the term Jupyter Notebook and remembered the NTK made up his code in this in the first place. So, maybe this is useful after all?
Last edited:
Maybe. Octave has some (very) basic gui stuff also. I chose Octave years ago over Scilab. Can't remember why.
I'd rather have a specialized GUI language/library and call Octave when needed.
I'd rather have a specialized GUI language/library and call Octave when needed.
ONly positive values of n need to be used. m can be + and -do only m = 0 iso a loop over -n -> n
Now I'm a bit confused...
Edit: Now I remember I hacked out SFS. No wonder that didn't work 🤦♂️
This states m=0. I have used that for the 2D approach as can be seen in this piece of code:The 2D functions for the radial modes are the same in 2D and 3D, the 2D angular functions are simply the spherical harmonics with m=0 which then simplify to the Legendre polynomials.
Code:
m = 0;
for n = 0:N
hn1 = spherical_hn1(n, kr);
jn = spherical_jn(n, kr);
j = (n^2 + n + m) + 1;
sph_harm = AKsh(n, 0, rad2deg(phi), rad2deg(theta));
PSI_mat(:, j) = sph_harm .* hn1;
end
This is what is used for the 3D approach as can be seen in this original code snippet from NTK's toolbox.ONly positive values of n need to be used. m can be + and -
Code:
for n = 0:N
hn1 = spherical_hn1(n, kr);
jn = spherical_jn(n, kr);
for m = -n:n
j = (n^2 + n + m) + 1;
sph_harm = AKsh(n, m, rad2deg(phi), rad2deg(theta));
PSI_mat(:, j) = sph_harm .* hn1;
end
end
Edit: Now I remember I hacked out SFS. No wonder that didn't work 🤦♂️
Last edited:
- Home
- Design & Build
- Software Tools
- Klippel Near Field Scanner on a Shoestring