<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>k-Wave User Forum &#187; Topic: Seems attenuation settings (following power law) affect signals&#039; time-of-arrival</title>
		<link>http://www.k-wave.org/forum/topic/seems-attenuation-settings-following-power-law-affect-signals-time-of-arrival</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Tue, 12 May 2026 23:34:20 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.k-wave.org/forum/search.php</link>
		</textInput>
		<atom:link href="http://www.k-wave.org/forum/rss/topic/seems-attenuation-settings-following-power-law-affect-signals-time-of-arrival" rel="self" type="application/rss+xml" />

		<item>
			<title>NicholasHorton on "Seems attenuation settings (following power law) affect signals&#039; time-of-arrival"</title>
			<link>http://www.k-wave.org/forum/topic/seems-attenuation-settings-following-power-law-affect-signals-time-of-arrival#post-9221</link>
			<pubDate>Mon, 14 Jul 2025 07:59:55 +0000</pubDate>
			<dc:creator>NicholasHorton</dc:creator>
			<guid isPermaLink="false">9221@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi everyone,&#60;br /&#62;
I was working on the simulation of ultrasound propagation. I designed three homogeneous mediums. Their speed-of-sounds were 1500 m/s. Their densities were 1000 kg/m^3. Their alpha_power were set as 1.1. Their alpha_coeff were 0.002, 0.7, and 3.0, respectively.&#60;br /&#62;
A sensor was set to record transmitted signal.&#60;br /&#62;
I just found that with different alpha_coeff, the time-of-arrivals of the signals were different. The larger alpha_coeff was, the earlier the signal arrived.&#60;br /&#62;
The change was so significant that it was counter-intuitive. I wonder if dispersion can explain this phenomenon.&#60;br /&#62;
I would like to ask you, is this simulation result consistent with the physical phenomenon? If not, how should I correct my code?&#60;br /&#62;
The code has been attached below.&#60;br /&#62;
Thanks a lot.&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;% To compare TOFs of transmitted signals, with different [constant] att.s or wvfroms.
% * The 2-D numerical simulations are based on k-Wave toolbox
% * Emitted pulse: a 3-cycle tone-burst whose centre-frequency is 2 MHz
% * Emitter and receiver: two points about 25 cm apart, recording transmitted signal
% * Medium: homogeneous, whose attenuation power is 1.1, and attenuation coefficient
%   is 0.002, 0.7 or 3.0 dB/cm/MHz^1.1
clc;clear
close all
%% Define Params
% default medium params
sos_ref                 = 1500;         % [m/s]
density_ref             = 1000;         % [kg/m^3]
att_power               = 1.1;          % y

% define k-Wave Grid
Nx                      = 3072;
dx                      = 1e-4;
kgrid                   = kWaveGrid(Nx, dx, Nx, dx);
t_end                   = Nx * dx / sos_ref * 2;
kgrid.makeTime(sos_ref, 0.5, t_end);                    % CFL = 0.5

% different wvforms and att.s
small_att               = 0.002;        % dB/cm/MHz^y
big_att                 = 0.7;
bigger_att              = 3.0;
wv_tb                   = toneBurst(1./kgrid.dt, 2e6, 3, &#38;#39;SignalLength&#38;#39;, kgrid.Nt);
%% Define numerical phantom
%------------define Medium One, no attenuation at all
medium_noAtt.sound_speed        = sos_ref * ones(Nx);
medium_noAtt.density            = density_ref * ones(Nx);

%------------define Medium Two, with a small atten. coeff.,
medium_smallAtt                 = medium_noAtt;
medium_smallAtt.alpha_power     = att_power;
medium_smallAtt.alpha_coeff     = small_att * ones(Nx);            

%------------define Medium Three, with a big atten. coeff.,
medium_bigAtt                   = medium_smallAtt;
medium_bigAtt.alpha_coeff       = big_att * ones(Nx);

%------------define Medium Three, with a big atten. coeff.,
medium_biggerAtt                = medium_smallAtt;
medium_biggerAtt.alpha_coeff    = bigger_att * ones(Nx);
%% Define source &#38;amp; sensor
source.p_mask                   = zeros(Nx, Nx);
source.p_mask(Nx / 2, 250)      = 1;
sensor.mask                     = zeros(Nx, Nx)
sensor.mask(Nx / 2, Nx - 250)   = 1;
% source.p not defined
%% Execute the simulations
input_args      = {&#38;#39;PMLSize&#38;#39;, &#38;#39;auto&#38;#39;,...
                   &#38;#39;PMLInside&#38;#39;, false,...
                   &#38;#39;PlotPML&#38;#39;, false,...
                   &#38;#39;DisplayMask&#38;#39;, &#38;#39;off&#38;#39;,...
                   &#38;#39;DataPath&#38;#39;, pwd,...
                   &#38;#39;DeleteData&#38;#39;, false};

for medium_name = {&#38;#39;smallAtt&#38;#39;, &#38;#39;bigAtt&#38;#39;, &#38;#39;biggerAtt&#38;#39;}
    cmd         = [&#38;#39;medium  = medium_&#38;#39;, medium_name{1}, &#38;#39;;&#38;#39;];
    eval(cmd)
    source.p    = wv_tb;
    rf_data     = kspaceFirstOrder2DC(kgrid, medium, source, sensor, input_args{:});
    cmd         = [&#38;#39;sig_&#38;#39;, medium_name{1}, &#38;#39; = rf_data;&#38;#39;];
    eval(cmd)
end
%% Visulaization
f1              = figure(&#38;#39;Units&#38;#39;,&#38;#39;centimeters&#38;#39;, &#38;#39;Position&#38;#39;, [2, 2, 25, 40]);
plt_cnt         = 0;
plt_c           = 3;
plt_r           = 1;
range_          = [160, 175] * 1e-6;    % unit: s

for medium_name = { &#38;#39;smallAtt&#38;#39;, &#38;#39;bigAtt&#38;#39;, &#38;#39;biggerAtt&#38;#39;}
    cmd             = [&#38;#39;sig = sig_&#38;#39;, medium_name{1}, &#38;#39;;&#38;#39;];
    eval(cmd)
    env             = abs(hilbert(sig));
    % ----------
    plt_cnt         = plt_cnt + 1; subplot(plt_c, plt_r, plt_cnt)
    plot(kgrid.t_array * 1e6, env, &#38;#39;color&#38;#39;,&#38;#39;r&#38;#39;, &#38;#39;lineWidth&#38;#39;, 1.5)
    grid on
    grid minor
    xlabel(&#38;#39;Time [\mus]&#38;#39;)
    xlim(range_ * 1e6)
    title(medium_name{1}, &#38;#39;Interpreter&#38;#39;, &#38;#39;none&#38;#39;)
end
sgtitle(&#38;#39;Signal Envelope&#38;#39;)&#60;/code&#62;&#60;/pre&#62;</description>
		</item>

	</channel>
</rss>
