<?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: Power Law Loss Equation Verification</title>
		<link>http://www.k-wave.org/forum/topic/power-law-loss-equation-verification</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Wed, 13 May 2026 06:53:53 +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/power-law-loss-equation-verification" rel="self" type="application/rss+xml" />

		<item>
			<title>Bradley Treeby on "Power Law Loss Equation Verification"</title>
			<link>http://www.k-wave.org/forum/topic/power-law-loss-equation-verification#post-7711</link>
			<pubDate>Tue, 28 Jul 2020 09:02:21 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">7711@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi vibhav,&#60;/p&#62;
&#60;p&#62;I haven't run your code, but if you don't simulate an infinite plane wave, then the wave will also decay due to geometric spreading as well as absorption (this is expected).&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>vibhav on "Power Law Loss Equation Verification"</title>
			<link>http://www.k-wave.org/forum/topic/power-law-loss-equation-verification#post-7703</link>
			<pubDate>Wed, 22 Jul 2020 10:40:50 +0000</pubDate>
			<dc:creator>vibhav</dc:creator>
			<guid isPermaLink="false">7703@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Bradley,&#60;br /&#62;
Thanks for the suggestion, it was helpful. Although i noticed that this example done in a 1D space. If the same simulation were to be done in using 'kspaceFirstOrder2D', i see the observed and theoretical losses do not match (the lines are parallel, but with an separation of roughly 10dB). Any reason why this may happen? Please find below the code used.&#60;/p&#62;
&#60;p&#62;%-----------------------------------------------------------------&#60;/p&#62;
&#60;p&#62;Nx = 1024;                      % [grid points]&#60;br /&#62;
x = 12.8e-3;                    % [m]&#60;br /&#62;
dx = 1e-5;%x / Nx;                    % [m]&#60;br /&#62;
kgrid = kWaveGrid(Nx, dx,Nx,dx);&#60;/p&#62;
&#60;p&#62;% define the properties of the propagation medium&#60;br /&#62;
medium.sound_speed = 5702;      % [m/s]&#60;br /&#62;
medium.density=3.772e6;&#60;br /&#62;
% define time array&#60;br /&#62;
t_end = 3e-6;&#60;/p&#62;
&#60;p&#62;kgrid.makeTime(medium.sound_speed, [], t_end);&#60;/p&#62;
&#60;p&#62;% create a spatial delta pulse&#60;br /&#62;
source_pos = 20;              % [grid points]&#60;br /&#62;
source.p_mask=zeros(Nx,Nx);&#60;br /&#62;
source.p_mask(source_pos,Nx/2)=1;&#60;br /&#62;
source.p = 100 * sin(2 * pi * 10e6 * kgrid.t_array(1:20));&#60;/p&#62;
&#60;p&#62;% define the sensor positions&#60;br /&#62;
source_sensor_dist = 5e-4;    % [m]&#60;br /&#62;
sensor_sensor_dist = 5e-3;      % [m]&#60;br /&#62;
sensor_pos_1 = source_pos + round(source_sensor_dist / dx);&#60;br /&#62;
sensor_pos_2 = source_pos + round((source_sensor_dist + sensor_sensor_dist) / dx);&#60;/p&#62;
&#60;p&#62;% calculate discrete distance between the sensor positions&#60;br /&#62;
d = (sensor_pos_2 - sensor_pos_1) * dx;     % [m]&#60;br /&#62;
d_cm = d * 100;                             % [cm]&#60;/p&#62;
&#60;p&#62;% index where the relative dispersion is defined&#60;br /&#62;
f_index = 30;&#60;/p&#62;
&#60;p&#62;% create a Binary sensor mask&#60;br /&#62;
sensor.mask = zeros(Nx,Nx);&#60;br /&#62;
sensor.mask(sensor_pos_1,Nx/2) = 1;&#60;br /&#62;
sensor.mask(sensor_pos_2,Nx/2) = 1;&#60;/p&#62;
&#60;p&#62;% define the absorption properties of the propagation medium&#60;br /&#62;
medium.alpha_coeff = 1.2;&#60;br /&#62;
medium.alpha_power = 1;&#60;br /&#62;
medium.alpha_mode='no_dispersion';&#60;br /&#62;
% run the simulation without visualisation&#60;/p&#62;
&#60;p&#62;sensor_data = kspaceFirstOrder2D(kgrid, medium, source, sensor);&#60;/p&#62;
&#60;p&#62;% calculate the amplitude and phase spectrum at the two sensor&#60;br /&#62;
% positions&#60;br /&#62;
[f1, as1, ps1] = spect(sensor_data(1, :), 1/kgrid.dt,'Plot',[true false]);&#60;br /&#62;
[f2, as2, ps2] = spect(sensor_data(2, :), 1/kgrid.dt,'Plot',[true false]);&#60;/p&#62;
&#60;p&#62;% calculate the attenuation from the amplitude spectrums&#60;br /&#62;
attenuation = -20 * log10(as2 ./ as1);&#60;/p&#62;
&#60;p&#62;% calculate the corresponding theoretical attenuation in dB/cm&#60;br /&#62;
attenuation_th = d_cm*medium.alpha_coeff .* (f2 .* 1e-6).^medium.alpha_power;&#60;/p&#62;
&#60;p&#62;% calculate the dispersion (dependence of the sound speed on frequency)&#60;br /&#62;
% from the phase spectrums&#60;br /&#62;
cp = 2 .* pi .* f2 .* d ./ (unwrap(ps1) - unwrap(ps2));&#60;/p&#62;
&#60;p&#62;% calculate the corresponding theoretical dispersion using the&#60;br /&#62;
% Kramers-Kronig relation for power law absorption&#60;br /&#62;
cp_kk = powerLawKramersKronig(2 * pi * f2, 2 * pi * f2(f_index), cp(f_index), db2neper(medium.alpha_coeff, medium.alpha_power), medium.alpha_power);&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% VISUALISATION&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#62;% set downsampling factor so there is sufficient space between plot markers&#60;br /&#62;
ds = 8;&#60;/p&#62;
&#60;p&#62;% plot the attenuation&#60;br /&#62;
figure;&#60;br /&#62;
f_max = 50;     % [MHz]&#60;br /&#62;
plot(f2.* 1e-6, attenuation);&#60;br /&#62;
hold on;plot(f2 .* 1e-6, attenuation_th,'r');&#60;br /&#62;
legend('observed loss','calculated loss');&#60;br /&#62;
set(gca, 'XLim', [0, f_max]);&#60;br /&#62;
box on;&#60;br /&#62;
xlabel('Frequency [MHz]');&#60;br /&#62;
ylabel('loss [dB]');
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Power Law Loss Equation Verification"</title>
			<link>http://www.k-wave.org/forum/topic/power-law-loss-equation-verification#post-7700</link>
			<pubDate>Mon, 20 Jul 2020 09:30:29 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">7700@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi vibhav,&#60;/p&#62;
&#60;p&#62;Have you looked at the &#60;a href=&#34;http://www.k-wave.org/documentation/example_na_modelling_absorption.php&#34;&#62;Modelling Power Law Absorption Example&#60;/a&#62;? You can open this in the MATLAB help browser to access the documentation and the code.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>vibhav on "Power Law Loss Equation Verification"</title>
			<link>http://www.k-wave.org/forum/topic/power-law-loss-equation-verification#post-7698</link>
			<pubDate>Mon, 20 Jul 2020 07:20:17 +0000</pubDate>
			<dc:creator>vibhav</dc:creator>
			<guid isPermaLink="false">7698@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi,&#60;br /&#62;
I am trying to verify the power law absorption equation provided in the kwave documentation. From what i read the transmission loss is given by &#34;alpha_coeff*distance*(frequency)^y&#34;.&#60;br /&#62;
I am simulating a case where a transducer source and sensor are separated by 5mm distance, and comparing the input/output values seen. I have added the script used below.&#60;/p&#62;
&#60;p&#62;Theoretically, on calculating the loss i get a value of 18.97dB. But on observing the data recorded I get a value of 38.63dB. I am calculating the observed loss as 10log10(input_signal/output_signal).&#60;/p&#62;
&#60;p&#62;Is there a loss that i am not taking into account, like the electromechanical coupling?&#60;br /&#62;
Or am i calculating the loss incorrectly? Any feedback here would be helpful.&#60;/p&#62;
&#60;p&#62;Thanks in advance.&#60;br /&#62;
%----------------------------------&#60;/p&#62;
&#60;p&#62;medium.sound_speed(:,:,:)=5702;&#60;br /&#62;
medium.density(:,:,:)=3.2777e6;&#60;/p&#62;
&#60;p&#62;%grid setup, step size 10^-4m(0.1mm)&#60;br /&#62;
kgrid = kWaveGrid(100, 1e-4, 100, 1e-4, 100, 1e-4);&#60;br /&#62;
kgrid.makeTime(max(medium.sound_speed(:)));&#60;/p&#62;
&#60;p&#62;medium.alpha_coeff = 1.2;  % [dB/(MHz^y cm)]&#60;br /&#62;
medium.alpha_power = 1.5;&#60;/p&#62;
&#60;p&#62;grid=zeros(100,100,100);&#60;br /&#62;
grid(31,50,50)=1;&#60;br /&#62;
grid(81,50,50)=1;&#60;br /&#62;
sensor.mask=grid;&#60;/p&#62;
&#60;p&#62;source_strength = 100;          % [MPa]&#60;br /&#62;
tone_burst_freq = 10e6;        % [Hz]&#60;br /&#62;
tone_burst_cycles = 5;&#60;br /&#62;
input_signal = toneBurst(40e6, tone_burst_freq, tone_burst_cycles,'Envelope','Rectangular');&#60;br /&#62;
input_signal = (source_strength ./ (max(medium.sound_speed(:))*max(medium.density(:)))) .* input_signal;&#60;/p&#62;
&#60;p&#62;settings.number_elements = 1;&#60;br /&#62;
settings.active_elements = 1;&#60;br /&#62;
settings.element_width = 1;                         % width of each element [grid points]&#60;br /&#62;
settings.element_length = 1;                        % length of each element [grid points]&#60;br /&#62;
settings.element_spacing = 0;                       % spacing (kerf width) between the elements [grid points]&#60;br /&#62;
settings.radius = inf;                              % radius of curvature of the transducer [m]&#60;br /&#62;
settings.position = [31,50,50];                     % position of transducer&#60;br /&#62;
settings.sound_speed =max(medium.sound_speed(:));   % sound speed [m/s]&#60;br /&#62;
settings.focus_distance = 20e-3;                    % focus distance [m]&#60;br /&#62;
settings.elevation_focus_distance = 19e-3;          % focus distance in the elevation plane [m]&#60;br /&#62;
settings.steering_angle = 0;                        % steering angle [degrees]&#60;br /&#62;
settings.input_signal = input_signal;&#60;/p&#62;
&#60;p&#62;transducer = kWaveTransducer(kgrid, settings);&#60;br /&#62;
transducer.properties&#60;/p&#62;
&#60;p&#62;input_args = {'RecordMovie', true, 'MovieName', 'loss_verify'};&#60;br /&#62;
[sensor_data] = kspaceFirstOrder3D(kgrid, medium,transducer,sensor,input_args{:});
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
