I'll take a look after I figure out what is cause the problem with the measurement data.This also seems interesting:
It has a viewer:
![]()
Same university as ITA toolbox.
I think it is possible that the separation of the measurement points need to be larger. Since the wavelength of a 100 Hz wave is 3.43 m (and longer for lower frequencies), a separation distance of a few cm may not be sufficient to accurately resolve the phase differences (and to calculate the direction of travel of the wave).As if all measurements were taken at the same point? Or 'equivalent' points w.r.t. the spherical harmonics?
I'll see if I have these (hidden?) problems too or that I've changed things.
Wikipedia (https://en.wikipedia.org/wiki/Spherical_harmonics) says this:
..
I kinda expected that that would have meant that whether you fit it with N=1 or N=2, the N=1 coefficients would be the same. They are not. Am I mistaken, or is something else going on?
I'll try to understand what you're saying and report back.Another comment: When you solve the linear system (probably with regularization if it is underdetermined) you can plot the rows of the matrix inverse on your grid. You can think of each row as integration weights for each basis function (spherical harmonic). If the system is well conditioned these weights should be smoothly varying, and kind of look like the spherical harmonic evaluated on the grid. If you instead get very large weights with alternating signs then the method is unstable for some reason, and the fit will be strongly affected by noise.
I'll try to understand what you're saying and report back.
function plot_measurement_influence(r, theta, z, PSI_mat)
[x, y, z] = cyl2cart(r, theta, z);
A = PSI_mat;
B = A'*A;
C = B^-1;
D = C*A';
orders = size(D, 1);
rows = ceil(sqrt(orders));
figure
for ind = 1:orders
subplot(rows, rows, ind)
% scatter(theta, z, [], abs(D(ind,:)), 3, 'filled')
scatter3(x, y, z, 3, abs(D(ind,:)), 'filled');
axis equal;
colormap jet
end
endfunction
Yes, I think it looks quite nice. It would be better to use the same colormap range on all the plots, and add a colorbar, but even now you can see (I think?) that the edges of the cylinder are often weighted strongly. With a colorscale we could see how big the coefficients are, and see if they grow very fast for higher orders.Is this to be expected? What can we learn? ...?
Is it correct that you never get negative weights?Now it becomes clear all 'uneven' cylinders are way darker than the others. I think that means the incoming sound is most influential. Looking back, it was already visible in https://www.audiosciencereview.com/...ematics-and-everything-else.9970/post-1988429
Ah, of course. Well, then the phase can also be interesting. But overall the absolute value shows you that the grid is a bit unbalanced and some points contribute much more than others. If you go to higher orders or more ill conditioned problems you should see that the absolute values grow a lot.I take the absolute value as the weight are complex. Is that to be expected?
Wait.... that might also be the reason it doesn't depend on the angle. I remember something like that in plotting the sperical harmonics.