<?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: What is the cause of the calculation error without using filterTimeSeries</title>
		<link>http://www.k-wave.org/forum/topic/what-is-the-cause-of-the-calculation-error-without-using-filtertimeseries</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Wed, 13 May 2026 01:33:42 +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/what-is-the-cause-of-the-calculation-error-without-using-filtertimeseries" rel="self" type="application/rss+xml" />

		<item>
			<title>bencox on "What is the cause of the calculation error without using filterTimeSeries"</title>
			<link>http://www.k-wave.org/forum/topic/what-is-the-cause-of-the-calculation-error-without-using-filtertimeseries#post-5080</link>
			<pubDate>Sun, 10 May 2015 20:32:04 +0000</pubDate>
			<dc:creator>bencox</dc:creator>
			<guid isPermaLink="false">5080@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Tim, &#60;/p&#62;
&#60;p&#62;An even simpler example will show this error: if you send the toneburst from a point source to a sensor some distance away you will see it. It is an instance where you can see the effect of the underlying numerical scheme that k-Wave uses. You are seeing the effect of the bandlimited interpolant inherent in the k-space pseudospectral scheme. See Fig. 2 in &#60;a href=&#34;http://www.k-wave.org/papers/2011-Treeby-JASA.pdf&#34;&#62;this paper&#60;/a&#62; and the accompanying text for an explanation.&#60;/p&#62;
&#60;p&#62;There are two ways to ameliorate it: ramp up the signal (as you have done using filterTimeSeries) or define a larger source region with the source amplitudes weighted so that it is tapered towards the edges, eg. use a Gaussian as a source rather than a point. &#60;/p&#62;
&#60;p&#62;Hope that helps.&#60;br /&#62;
Ben
&#60;/p&#62;</description>
		</item>
		<item>
			<title>golubyatnikov_tv on "What is the cause of the calculation error without using filterTimeSeries"</title>
			<link>http://www.k-wave.org/forum/topic/what-is-the-cause-of-the-calculation-error-without-using-filtertimeseries#post-5075</link>
			<pubDate>Fri, 08 May 2015 22:30:34 +0000</pubDate>
			<dc:creator>golubyatnikov_tv</dc:creator>
			<guid isPermaLink="false">5075@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hello, my name is Tim. Sorry for my English.&#60;/p&#62;
&#60;p&#62;I try to simulate the acoustic wave propogation with the signal frequency 4kHz. When I use filterTimeSeries function, I get good signal on the receiver. But without using this function I see high-frequency calculation error. &#60;/p&#62;
&#60;p&#62;Here is example image: &#60;img src=&#34;http://imageshack.com/a/img903/8317/hZqxFI.png&#34; /&#62;&#60;/p&#62;
&#60;p&#62;While the simulation was running, I saw:&#60;br /&#62;
&#34;...&#60;br /&#62;
  dt: 4.5045us, t_end: 5ms, time steps: 1111&#60;br /&#62;
  input grid size: 200 by 200 grid points (1 by 1m)&#60;br /&#62;
  maximum supported frequency: 33.3kHz&#60;br /&#62;
  expanding computational grid...&#60;br /&#62;
  computational grid size: 240 by 240 grid points&#60;br /&#62;
&#34;.&#60;/p&#62;
&#60;p&#62;The maximum supported frequency of grid (&#60;strong&#62;33.3kHz&#60;/strong&#62;) is much larger than the signal frequency (&#60;strong&#62;4kHz&#60;/strong&#62;). I can't understand what is the cause of this calculation error? I have not found the explanations in the documentation and on the forum.&#60;/p&#62;
&#60;p&#62;Here is simple code to reproduce this situation:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;% area settings
gridSize = [200, 200];
cellSize = [0.005,0.005]; % [m]

medium.sound_speed = 333;  % [m/s]

ts = [50, 100]; % tranceiver positions
amplitude = 10; % [Pa]
freq = 4000;
emitTime = 0.001; % [s]
modelingTime = 0.005; % [s]

source.p_mask = zeros(gridSize);
source.p_mask(ts(1),ts(2)) = 1;
sensor.mask = source.p_mask;

circleReflectorRadius = 12;
circleReflectorPosition = [150,100];    

kgrid = makeGrid(gridSize(1), cellSize(1), gridSize(2), cellSize(2));
[kgrid.t_array, dt] = makeTime(kgrid, medium.sound_speed, [], modelingTime);

source.p = amplitude * toneBurst(1/dt, freq, ceil(freq*emitTime), &#38;#39;Envelope&#38;#39;, &#38;#39;Rectangular&#38;#39;, &#38;#39;SignalLength&#38;#39;, kgrid.Nt);
%source.p = filterTimeSeries(kgrid, medium, source.p, &#38;#39;ZeroPhase&#38;#39;, true);

disk = makeDisc(gridSize(1), gridSize(2), circleReflectorPosition(1), circleReflectorPosition(2), circleReflectorRadius);
medium.density = ones(gridSize) + disk*100;

% define the acoustic parameters to record
sensor.record = {&#38;#39;p&#38;#39;};

%% prepare display parameters
densityMask = medium.density - 1;
dm = source.p_mask + sensor.mask + densityMask;
dm(dm&#38;gt;0) = 1;
simulationParameters = {&#38;#39;DisplayMask&#38;#39;, dm, &#38;#39;PMLInside&#38;#39;, false, &#38;#39;PlotPML&#38;#39;, false};

% run the simulation
sensor_data = kspaceFirstOrder2D(kgrid, medium, source, sensor, simulationParameters{:});

plot(kgrid.t_array, sensor_data.p);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Thank you.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
