Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternative referencing scheme for focused sources in WFS #146

Merged
merged 1 commit into from
May 25, 2017
Merged

Conversation

fietew
Copy link
Member

@fietew fietew commented May 12, 2017

I discovered an issue regarding the existing referencing scheme for the focused source in WFS, namely reference_point and reference_line.

Reference Point:

        %         _____________________
        %        |      |xref-x0|
        % g0 = _ |---------------------
        %       \|||xref-x0| - |xs-x0||

Reference Line:

        %        ______________________
        % g0 = \| d_ref / (d_ref - d_s)

Both schemes have the drawback, that the denominator can become zero for non-pathological cases. Hence particular secondary sources have a unreasonably high amplitude. I added a scheme called reference_circle which ensure amplitude correct synthesis on a circle around the focused source, which does not have these issues. Please execute the following example to compare reference_point and reference_circle. The green dots in the plots for reference_point indicate the theoretical coordinates on the circular SSD, where the amplitude of the seconday source is infinity.

conf = SFS_config;

conf.dimension = '2.5D';

conf.plot.normalisation = 'center';

conf.secondary_sources.geometry = 'circular';
conf.secondary_sources.number = 256;
conf.secondary_sources.size = 3;

conf.t0 = 'source';
conf.usetapwin = false;

X = [-1.55, 1.55];
Y = [-1.55, 1.55];
Z = 0;

xs = [0 0.5 0 -sqrt(0.5) -sqrt(0.5) 0]; 
src = 'fs';
t = norm(xs(1:3) - conf.xref)/conf.c;
f = 1000;

conf.driving_functions = 'reference_point';
conf.plot.usedb = true;
sound_field_imp_wfs(X,Y,Z, xs, src, t, conf);
hold on;
xs(1:3) = xs(1:3) - conf.xref;
[phis, rs] = cart2pol(xs(1), xs(2));
r0 = conf.secondary_sources.size/2;
phi0 = [-1,1]*acos(rs/2/r0) + phis;
plot( conf.xref(1) + r0*cos(phi0), conf.xref(2) + r0*sin(phi0), 'o', 'MarkerFaceColor',[0.0,1.0,0.0] );
hold off;
conf.plot.usedb = false;
sound_field_mono_wfs(X,Y,Z, xs, src, f, conf);
hold on;
xs(1:3) = xs(1:3) - conf.xref;
[phis, rs] = cart2pol(xs(1), xs(2));
r0 = conf.secondary_sources.size/2;
phi0 = [-1,1]*acos(rs/2/r0) + phis;
plot( conf.xref(1) + r0*cos(phi0), conf.xref(2) + r0*sin(phi0), 'o', 'MarkerFaceColor',[0.0,1.0,0.0] );
hold off;

conf.driving_functions = 'reference_circle';
conf.plot.usedb = true;
sound_field_imp_wfs(X,Y,Z, xs, src, t, conf);
conf.plot.usedb = false;
sound_field_mono_wfs(X,Y,Z, xs, src, f, conf);

@hagenw
Copy link
Member

hagenw commented May 12, 2017

That's true, interesting problem. Should we just add this as a workaround or is there the possibility to fix the problem in changing the underlying equations for a reference point or line?

/cc @fs446

@fietew
Copy link
Member Author

fietew commented May 12, 2017

The reference point scheme is based on a single stationary phase approximation, while the others include a whole reference trajectory (such as line or circle) and are based on two stationary phase approximations. See also #136. The point is, that the amplitude correct synthesis at a reference point is automatically achieved by any other scheme, if the reference point is part of the reference trajectory. It hence might not be necessary to have reference point scheme anymore (same for point source and plane wave). Note, that the reference line scheme seamlessly works, if the SSD is linear, which is mandatory.

I think we should merge this right now and continue to unify the referencing stuff in #143.

@hagenw hagenw merged commit 9227f71 into master May 25, 2017
@hagenw hagenw deleted the fix_wfs_fs branch May 25, 2017 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants