Klippel Near Field Scanner on a Shoestring

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.
 
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).
Yes, this can be done, but has not been investigated as to how accurate it is.
 
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..
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.
 
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, ...
This is exactly what I have done, except that I use a stationary mic and rotate the speaker - a trivially easy solution, especially manually.
 
  • Like
Reactions: b_force
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.
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.

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:
  • Like
Reactions: b_force
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.
I know, I used to work (briefly) for a company who did those things! 🙂

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.
 
  • Like
Reactions: Kravchenko_Audio
You keep referring to the set of equations needing to be linearly dependent, which is backwards.
I don't think I have knowingly made this statement anywhere that a set of equations need to be linearly dependent to be solvable.
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

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.)
I completely agree

AT LFs the equations are indeed linearly dependent and as such matrix inversion requires SVD - the condition number becomes quite low.
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.
Perhaps you meant that the condition number becomes high at LFs?
 
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.
Thank you 🙂
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 🙂
 
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,

1708618192264.png


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,
1708618764660.png
, or by its spherical polar coordinates,
1708618804244.png
. The symmetry of the problem makes spherical polar coordinates more convenient, so we are trying to characterize
1708618667187.png
.

Here's the key point: In an idealized situation with true spherical symmetry, the dependence of sound pressure on the coordinates
1708618959561.png
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
1708619101550.png
  • The radial function,
    1708619240887.png
    , describes the way the sound pressure varies with distance from the source, independent of angle.
  • The product
    1708619306477.png
    captures the angular (directional) dependence.
In equation (2.1) above, the two-variable angular functions
1708619468199.png
play the role of the product
1708619363539.png
. The
1708620619329.png
functions are called the associated legendre polynomials (a bit of a mess most easily understood by seeing them tabulated or graphed), and the
1708620756622.png
dependence is based on
1708620725438.png
, where
1708620793885.png
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
1708620134353.png
at all points so the
1708620416519.png
dependence is replaced by a constant. The pressure in the plane is then given by just
1708620481795.png
. As Earl pointed out, the function
1708620545535.png
is the same with or without
1708620416519.png
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
 

Attachments

  • 1708618554772.png
    1708618554772.png
    506 bytes · Views: 36
  • 1708618634556.png
    1708618634556.png
    413 bytes · Views: 44
No wonder papers like this have been read quite a few times in the past years:
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.

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.
 
  • Like
Reactions: vineethkumar01
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

1708627514607.png

Looks promising...
 
  • Like
Reactions: witwald
@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?
 
Last edited:
Now I'm a bit confused...

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.
This states m=0. I have used that for the 2D approach as can be seen in this piece of code:

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

ONly positive values of n need to be used. m can be + and -
This is what is used for the 3D approach as can be seen in this original code snippet from NTK's toolbox.


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: