<?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: Problem met with when simulating small scatters</title>
		<link>http://www.k-wave.org/forum/topic/problem-met-with-when-simulating-small-scatters</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Wed, 13 May 2026 09:00:13 +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/problem-met-with-when-simulating-small-scatters" rel="self" type="application/rss+xml" />

		<item>
			<title>cryospherewang@163.com on "Problem met with when simulating small scatters"</title>
			<link>http://www.k-wave.org/forum/topic/problem-met-with-when-simulating-small-scatters#post-7683</link>
			<pubDate>Thu, 02 Jul 2020 21:12:51 +0000</pubDate>
			<dc:creator>cryospherewang@163.com</dc:creator>
			<guid isPermaLink="false">7683@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Brad,&#60;/p&#62;
&#60;p&#62;Thanks for your response.&#60;/p&#62;
&#60;p&#62;Yes, the source signal comes from the transducer.&#60;/p&#62;
&#60;p&#62;Please see the image of the scatter &#60;a href=&#34;https://i.imgur.com/4bxiUHx.jpg&#34; rel=&#34;nofollow&#34;&#62;https://i.imgur.com/4bxiUHx.jpg&#60;/a&#62;.&#60;br /&#62;
the image of the sensor data (Time series * Element) after the same windowing operation as your examples &#60;a href=&#34;https://i.imgur.com/CqnxG1a.jpg&#34; rel=&#34;nofollow&#34;&#62;https://i.imgur.com/CqnxG1a.jpg&#60;/a&#62;&#60;br /&#62;
and the plot of a single element sensor data (Magnitude * Time series) &#60;a href=&#34;https://i.imgur.com/wNH7Lty.jpg&#34; rel=&#34;nofollow&#34;&#62;https://i.imgur.com/wNH7Lty.jpg&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;It can be seen that the response I got has some unreasonable components, could you please tell me whether there are some errors in my simulation that result in such weird echoes? Thank you very much.&#60;/p&#62;
&#60;p&#62;Best,&#60;br /&#62;
Bingxue
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Problem met with when simulating small scatters"</title>
			<link>http://www.k-wave.org/forum/topic/problem-met-with-when-simulating-small-scatters#post-7551</link>
			<pubDate>Sat, 06 Jun 2020 13:25:39 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">7551@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Bing,&#60;/p&#62;
&#60;p&#62;Could you post a picture? Is it the source signal from the transducer, i.e., the waves travelling directly from the source to the sensor across the face of the transducer?&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>cryospherewang@163.com on "Problem met with when simulating small scatters"</title>
			<link>http://www.k-wave.org/forum/topic/problem-met-with-when-simulating-small-scatters#post-7490</link>
			<pubDate>Sat, 09 May 2020 17:34:10 +0000</pubDate>
			<dc:creator>cryospherewang@163.com</dc:creator>
			<guid isPermaLink="false">7490@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Brad,&#60;/p&#62;
&#60;p&#62;Thanks for your reply!&#60;br /&#62;
The signals do not make sense before windowing. I tried version 1.3 and ran the same script, unfortunately, the unreasonable strong signals that can mask the weak echoes from a single, small scatter still exist. I am not sure is that because the frequency response of a small scatter is infinite and this will introduce some problems.&#60;/p&#62;
&#60;p&#62;Regards,&#60;br /&#62;
Bing
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Problem met with when simulating small scatters"</title>
			<link>http://www.k-wave.org/forum/topic/problem-met-with-when-simulating-small-scatters#post-7463</link>
			<pubDate>Fri, 01 May 2020 09:19:14 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">7463@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Bing,&#60;/p&#62;
&#60;p&#62;I haven't run your code. Do you signals make sense before the windowing operation? Note, if you're using k-Wave V1.3, combine_sensor_data is automatically called inside kspaceFirstOrder3DC/G.&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>cryospherewang@163.com on "Problem met with when simulating small scatters"</title>
			<link>http://www.k-wave.org/forum/topic/problem-met-with-when-simulating-small-scatters#post-7386</link>
			<pubDate>Sun, 12 Apr 2020 13:52:33 +0000</pubDate>
			<dc:creator>cryospherewang@163.com</dc:creator>
			<guid isPermaLink="false">7386@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;I just tried to play with k-Wave using different parameters and see what happened. Then when I was simulating a linear medium with a small scatter, which has a radius of 1 (i know this small radius does not make much sense and is not practical), I got some strange sensor data.&#60;/p&#62;
&#60;p&#62;Following is my code:&#60;/p&#62;
&#60;p&#62;'%% define medium, scatter and grid points&#60;br /&#62;
clc;&#60;br /&#62;
clearvars;&#60;/p&#62;
&#60;p&#62;% set the size of the perfectly matched layer (PML)&#60;br /&#62;
pml_x_size = 10; % [grid points]&#60;br /&#62;
pml_y_size = 10; % [grid points]&#60;br /&#62;
pml_z_size = 10; % [grid points]&#60;/p&#62;
&#60;p&#62;% set total number of grid points not including the PML&#60;br /&#62;
Nx = 190 - 2*pml_x_size; % [grid points]&#60;br /&#62;
Ny = 100 - 2*pml_y_size; % [grid points]&#60;br /&#62;
Nz = 600 - 2*pml_z_size; % [grid points]&#60;/p&#62;
&#60;p&#62;% define the properties of the propagation medium&#60;br /&#62;
c0=1500;&#60;br /&#62;
rho0=1040;&#60;/p&#62;
&#60;p&#62;tone_burst_freq = 3e6;&#60;br /&#62;
tone_burst_cycles = 4;&#60;br /&#62;
source_strength = 1e6; % [Pa]&#60;/p&#62;
&#60;p&#62;% at least 3 points per wavelength is recommended&#60;br /&#62;
dx = c0/tone_burst_freq/4; % grid point spacing in the x direction [m]&#60;br /&#62;
dy = dx;&#60;br /&#62;
dz = dx;&#60;/p&#62;
&#60;p&#62;kgrid = kWaveGrid(Nz,dz,Nx, dx, Ny, dy);&#60;br /&#62;
kgrid.makeTime(c0, 0.3, (Nz * dz) * 2 / c0);&#60;/p&#62;
&#60;p&#62;input_signal = toneBurst(1/kgrid.dt, tone_burst_freq, tone_burst_cycles);&#60;br /&#62;
input_signal = (source_strength ./ (c0 * rho0)) .* input_signal;&#60;br /&#62;
%% Create The Transducer&#60;br /&#62;
% physical properties of the transducer&#60;br /&#62;
transducer.number_elements = 80; % total number of transducer elements&#60;br /&#62;
transducer.element_width = round(0.23e-3/dx); % width of each element [grid points]&#60;br /&#62;
transducer.element_length = round(6.5e-3/dx); % length of each element [grid points]&#60;br /&#62;
transducer.element_spacing = round(0.04e-3/dx); % spacing (kerf width) between the elements [grid points]&#60;br /&#62;
transducer.radius = inf; % radius of curvature of the transducer [m]&#60;/p&#62;
&#60;p&#62;% calculate the width of the transducer in grid points&#60;br /&#62;
transducer_width = transducer.number_elements * transducer.element_width ...&#60;br /&#62;
+ (transducer.number_elements - 1) * transducer.element_spacing;&#60;/p&#62;
&#60;p&#62;% use this to position the transducer in the middle of the computational grid&#60;br /&#62;
transducer.position = round([1, Nx/2-transducer_width/2, Ny/2-transducer.element_length/2]);&#60;br /&#62;
%transducer_central.position = [z x y];&#60;/p&#62;
&#60;p&#62;% properties used to derive the beamforming delays&#60;br /&#62;
transducer.sound_speed = c0; % sound speed [m/s]&#60;br /&#62;
transducer.focus_distance = inf; % focus distance [m]&#60;br /&#62;
transducer.elevation_focus_distance = 77e-3; % focus distance in the elevation plane [m]&#60;br /&#62;
transducer.steering_angle = 0; % steering angle [degrees]&#60;/p&#62;
&#60;p&#62;% apodization&#60;br /&#62;
transducer.transmit_apodization = 'Hanning';&#60;br /&#62;
transducer.receive_apodization = 'Hanning';&#60;/p&#62;
&#60;p&#62;% define the transducer elements that are currently active&#60;br /&#62;
number_active_elements = transducer.number_elements;&#60;br /&#62;
transducer.active_elements = ones(transducer.number_elements, 1);&#60;/p&#62;
&#60;p&#62;% append input signal used to drive the transducer&#60;br /&#62;
transducer.input_signal = input_signal;&#60;/p&#62;
&#60;p&#62;% create the transducer using the defined settings&#60;br /&#62;
transducer = kWaveTransducer(kgrid, transducer);&#60;/p&#62;
&#60;p&#62;% print out transducer properties&#60;br /&#62;
transducer.properties;&#60;/p&#62;
&#60;p&#62;%% DEFINE THE MEDIUM PROPERTIES&#60;/p&#62;
&#60;p&#62;% define properties&#60;br /&#62;
sound_speed_map = c0 * ones(Nz, Nx, Ny) ;&#60;br /&#62;
density_map = rho0 * ones(Nz, Nx, Ny) ;&#60;br /&#62;
scatterRadius = 1;&#60;br /&#62;
scatterCoef = 1.06;&#60;/p&#62;
&#60;p&#62;% define a sphere for a highly scattering region&#60;br /&#62;
scattering_region1 = makeBall(Nz, Nx, Ny, 4*Nz/5, ...&#60;br /&#62;
Nx/2, Ny/2, scatterRadius(1));&#60;/p&#62;
&#60;p&#62;% assign region&#60;br /&#62;
sound_speed_map(scattering_region1 == 1) = c0*scatterCoef(1);&#60;br /&#62;
density_map(scattering_region1 == 1) = rho0*scatterCoef(1);&#60;/p&#62;
&#60;p&#62;medium.sound_speed = sound_speed_map;&#60;br /&#62;
medium.density = density_map;&#60;/p&#62;
&#60;p&#62;voxelPlot(single(transducer.mask &#124; scattering_region1));&#60;br /&#62;
view(142,25);&#60;/p&#62;
&#60;p&#62;%% simulation&#60;br /&#62;
input_args = {...&#60;br /&#62;
'PMLInside', false, 'PMLSize', [pml_x_size, pml_y_size, pml_z_size], ...&#60;br /&#62;
'DataCast', 'gpuArray-single', 'DataRecast', true};&#60;/p&#62;
&#60;p&#62;% run the simulation&#60;br /&#62;
tic&#60;br /&#62;
sensor_data = kspaceFirstOrder3DG(kgrid, medium, transducer, transducer, input_args{:});&#60;br /&#62;
toc&#60;/p&#62;
&#60;p&#62;%% sensor_data&#60;br /&#62;
sensor_data_com = transducer.combine_sensor_data(sensor_data);&#60;br /&#62;
data_win = getWin(kgrid.Nt * 2, 'Tukey', 'Param', 0.05).';&#60;br /&#62;
data_win = [zeros(1, ceil(length(transducer.input_signal) * 2)), data_win(1:end/2 - ceil(length(transducer.input_signal) * 2))];&#60;/p&#62;
&#60;p&#62;figure;&#60;br /&#62;
subplot(211);&#60;br /&#62;
plot(sensor_data_com(40,:));title('before windowing');&#60;/p&#62;
&#60;p&#62;subplot(212);&#60;br /&#62;
sensor_data_com = bsxfun(@times, data_win, sensor_data_com);&#60;br /&#62;
plot(sensor_data_com(40,:));title('after windowing');'&#60;/p&#62;
&#60;p&#62;If you have tried the code above, you may have already seen the sensor_data after the windowing operation, some strong signals appeared in the near field and around the half of the time series, but there were no scatter points, can you please tell me is there anything wrong with my code or is it hard to simulate such a small scatter in k-Wave? If it is the latter, why is it?&#60;/p&#62;
&#60;p&#62;And I noticed that if the scan_line() method is used, I will get one smooth sensor_data plot, does anyone know what operation was done beneath scan_line() function?&#60;/p&#62;
&#60;p&#62;Thank you for your responses in advance.&#60;/p&#62;
&#60;p&#62;Kind regards,&#60;br /&#62;
Bing
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
