Klippel Near Field Scanner on a Shoestring

We will have to continue to disagree on this point...

It's not clear to me exactly what point you dispute in my post, hopefully not all of it.
So I will outline the steps in the maths, which was what I promised Aaron in the first place, and for Kessito I have picked explicit examples to help make it more concrete.
Then you can tell me at what point we cease to be in accord.

Ok, as already discussed the analysis into Spherical Harmonics is similar to a Fourier Analysis.
In fact the Spherical Harmonics are essentially Sines and Cosines wrapped around a sphere.
That becomes clearer if you skip the complicated definitions and just look at the actual values of the first few.
Table of spherical harmonics - Wikipedia.
The multiplier at the front of each harmonic is just to scale them.
There are different scale conventions used in different parts of science, so that can be a point to watch.
But within acoustics it is conventional to normalize them so that any harmonic multiplied by itself = 1 (you need to define that suitably for complex numbers but that's the idea.)
And any harmonic multiplied by any different harmonic = 0 (there is a neat mathematical symbol called Kronecker Delta to express that more compactly).
So they are "orthonormalized".
There is one other multiplier that you may see, it's a (-1) factor that quantum physicists find convenient, called the Condon-Shortly phase.
We don't use it so no problem, just don't worry if you see the term.

Now look at the table of values. .
The superscript is usually denoted l and called the degree, while the subscript is m and called the order.
m is limited to values from -l to l.
Look at where the Y values have a superscript of 0.
Y 0,1 is just some number times Cos(theta).
Y 0,2 is some number times an expression of Cos squared (theta).
There is an formula (identity) to convert the Cos**2 (theta) expression to one in Cos (2*theta).
Similarly with the others, so they are essentially a sequence of first, second, third...harmonics.
These are the solutions for an axi-symmetric source, what Earl uses.
The Y with a non zero superscript represent the extra terms to represent variation in the phi co-ordinate.
Which is as you would expect, they have a phi term after all.
They are also essentially Sine and Cos functions, just expressed in complex numbers (which deserves a whole post to itself).
Now, the number of possible harmonics with phi terms increases as the theta harmonics increase.

So the most basic approximation is just the Y 0,0 mode.
1 term - and it's the monopole mode.
Next we have the l=1 and m=-l to l, so -1,0+1.
3 terms - these are the dipoles oriented in the x, y and z directions.
That's a total of 4 terms to capture the first 2 modes.
Next mode requires we have l=3 with 5 possible m values.
So a total of 9 terms = 3 modes.
And so on.
So to fully express the first 20 modes requires 20**2 = 400 terms, with 400 coefficients that requires...
So that's where the 400 measurement estimate came from.

If we do less that a full Spherical Harmonic analysis then I don't see how to do the 2 layer data extraction to remove room echoes.
It looks possible to do an analysis with fine theta and coarse phi and winnow the theta data to have full SH but at lower number of modes for the low frequency data that needs the 2 layer treatment.

Best wishes
David
 
Last edited:
By "give it a try" do you mean the GUI? Wouldn't it be a good idea to outline what the GUI should look like? The basic functionality is pretty straightforward - read data, plot data, etc. but the specific implementation of how to display a full 3D data set is not that straightforward.

I would suggest that I post the VB.Net DLL interface statements to the code that I have now and you write a GUI that can plot and run the existing code, and then we can move to the 3D implementation. In other words, complete step 1 above using your GUI.

Does that sound reasonable? If so I will post the VB.Net interface code and you can work from that.
 
It's not clear to me exactly what point you dispute in my post, hopefully not all of it.

...


If we do less that a full Spherical Harmonic analysis then I don't see how to do the 2 layer data extraction to remove room echoes.
It looks possible to do an analysis with fine theta and coarse phi and winnow the theta data to have full SH but at lower number of modes for the low frequency data that needs the 2 layer treatment.

Its not worth arguing about the number of terms required, that will get sorted out in the end. The goal, however is to minimize this number since the rotations will be manual.

It may not be possible to do the 2 layer data extraction without the full 3D modes, but that is step 4 anyways and we haven't yet completed step 2. But I am also not sure that it isn't possible either, I have never looked into this as I have not found a need for it. If one can measure in the near field then the issue of room reflections becomes far less of an issue and gating works just fine unless one is in a very small room. I use my living room and don't have a problem.

Your last sentence is exactly the point, except that there are other ways of doing the low frequencies than the 2 layer treatment. People do near-field LF estimation all the time in non-anechoic rooms.
 
By "give it a try" do you mean the GUI? Wouldn't it be a good idea to outline what the GUI should look like? The basic functionality is pretty straightforward - read data, plot data, etc. but the specific implementation of how to display a full 3D data set is not that straightforward.
by give it a try I mean creating a python wrapper (using f2py) and verifying that this works for your particular library.

discussing what the gui should look like can continue in parallel of course
 
I found this;
barrowes/consulting/consultingIndex.html
A fortran to matlab translator.
Would it be ok that, as a parallel trajectory, I try to make your code work in matlab/octave dr. Geddes?
I understand that the python wrapper with dll's would be able to turn into something good and I understand and respect your project goals, but I personally would like to learn something from the project, and this would certainly help. If I get it to work I would of course make the code available here so more people could learn.

I am very grateful that you took the effort to write down the math and have studied it a bit. Problem for me is that I don't understand a lot of the advanced math notation conventions. (Sadly I never got decent math in my educations)
I have found a retired math professor from uni, who is willing to give me private lessons to get this kind of stuff up to speed, just because he likes doing it! (much respect for all the retired people who share there lifelong knowledge with the "youngsters"), but that will start in the winter season so no use now.

Being able to read the actual code would make understanding a lot easier, and also transferring this knowledge to others.
The way David has described some things in his last post clears up a lot for me, I am always amazed how complex stuff looks if you don,'t really understand the advanced math notation.

Cheers,
Kees
 
Would it be ok that, as a parallel trajectory, I try to make your code work in matlab/octave dr. Geddes?

Cheers,
Kees

Kees,

At this point I have not offered my code, just a compiled DLL. You should understand that the two things are quite different as far as IP goes. Once I send you or anyone else the code its gone for good, and if this project does not result in anything then I have gained nothing but lost a lot.

I understand that it is unfair to expect the GUI code to be public and not my own, and so I have come up with this plan. Once the 3D GUI and FORTRAN DLL have been proven out and released to the community and the GUI code has been released to the public then I will release mine. If this project does not see fruition then the code will remain proprietary.

This is the best that I can do given my position.

I will gladly answer any questions that you have about the theory however.
 
As to the GUI, I suggest the same basic format that my current GUI uses.

- lower plot is a contour map of angle versus frequency from 0 - 90, or -90 - 90, or -180 - 180, over Phi angle chosen by a dial on the right hand of the plot. A cursor on the polar map will show the frequency response on a top plot that has the power response and DI plotted as well for the chosen Phi and Theta on the lower plots.

I've played with lots of ways to show the data and this, to me, seems to be the best.
 
Thank you Dr. Geddes,

I completely understand your position and I think that the scheme you have come up with is pretty fair.

The fortran dll can also be called from matlab, so if you would allow for the dll to be used in this way also I could already start this way and hopefully expand to the real code in time. My personal goal would certainly still be to completely understand the math and implement everything in matlab, as I have the feeling that this will lead to a lot of new insights which is off course always desirable.
edit: the printouts from matcad would be very welcome, and a good brain exercise to chew on :)
 
Last edited:
Kessito

Let me think about that, because there is no risk to me, but everything that you want to see is hidden in the DLL. It would be a fairly large document to describe all the ins and outs of the DLL, but I am going to have to do that at some point anyways. So if I get that document done then sure, you can use the DLL.

Honestly the MathCad document would be a better learning tool.
 
Below is an HTML of the MathCad file.

Note that I can't actually run this file because I no longer have the data that it wants to read. But the calcs are there if you work through it.

Note here that I do not use the Spherical Hankel functions, because this is NOT a nearfield calculation so they are not needed. In other words this code fits the modes measured at R to the expected pressure at R. If one measures at R- << R+ then the modes need to be corrected with the Hankel functions before they are summed. I'll look for code that does this, but I may only have done this is FORTRAN.
 

Attachments

  • Modal_calcs_farfield.pdf
    116.2 KB · Views: 78