<?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: Signal emission frequency</title>
		<link>http://www.k-wave.org/forum/topic/signal-emission-frequency</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Tue, 12 May 2026 23:08:54 +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/signal-emission-frequency" rel="self" type="application/rss+xml" />

		<item>
			<title>Bradley Treeby on "Signal emission frequency"</title>
			<link>http://www.k-wave.org/forum/topic/signal-emission-frequency#post-7962</link>
			<pubDate>Fri, 27 Nov 2020 13:41:22 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">7962@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Florian,&#60;/p&#62;
&#60;p&#62;Thanks for your patience - it took me a while to find time to take a look.&#60;/p&#62;
&#60;p&#62;The frequency shift is expected behaviour when you have a mass source as used in k-Wave. If you look in the k-Wave manual, in Eq. (2.9) you can see that the mass source term has a time derivative when it appears in the wave equation. If you consider a point source in free-space, the solution to the wave equation can then be written as the convolution between this source term and the Green's function.&#60;/p&#62;
&#60;p&#62;In 1D, because the Green's function is a unit step, the convolution will integrate out the time derivative, so the output will look exactly as the input. In 3D, because the Green's function is a delta function, the time derivative will remain after the convolution. In 2D, you'll get something in-between.&#60;/p&#62;
&#60;p&#62;If you have a time derivative, the frequency content will change (d/dt is equivalent to multiplying by i*omega in the frequency domain).&#60;/p&#62;
&#60;p&#62;I've written a &#60;a href=&#34;http://www.k-wave.org/downloads/forum_freq_shift.m&#34;&#62;simple example&#60;/a&#62; which shows these three behaviours.&#60;/p&#62;
&#60;p&#62;Hope that helps,&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>flomomo01 on "Signal emission frequency"</title>
			<link>http://www.k-wave.org/forum/topic/signal-emission-frequency#post-7848</link>
			<pubDate>Wed, 23 Sep 2020 16:02:58 +0000</pubDate>
			<dc:creator>flomomo01</dc:creator>
			<guid isPermaLink="false">7848@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;This is how I compute the FFT.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;figure; plot(sensor_data(1,:));
[f,Y_fft]=fft_amp(sensor_data(1,:),kgrid.dt);
Y=abs(fftshift(fft(sensor_data(1,:))));
fs=1/kgrid.dt;
N=length(sensor_data(1,:));
fax_bins=[0: N-1];
N2=ceil(length(sensor_data(1,:))/2);
fax_Hz=(fax_bins-N2)*fs/N;
plot(fax_Hz,Y);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Thank you again for your help
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Signal emission frequency"</title>
			<link>http://www.k-wave.org/forum/topic/signal-emission-frequency#post-7846</link>
			<pubDate>Tue, 22 Sep 2020 17:46:53 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">7846@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Thanks - can you edit to also include the part of the code where you calculate the frequency?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>flomomo01 on "Signal emission frequency"</title>
			<link>http://www.k-wave.org/forum/topic/signal-emission-frequency#post-7845</link>
			<pubDate>Tue, 22 Sep 2020 16:37:46 +0000</pubDate>
			<dc:creator>flomomo01</dc:creator>
			<guid isPermaLink="false">7845@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Mr.Treeby,&#60;/p&#62;
&#60;p&#62;Thank you for your help. You can find below the example I worked with.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;clearvars;

% =========================================================================
% SIMULATION
% =========================================================================

% create the computational grid
Nx = 128;           % number of grid points in the x (row) direction
Ny = 128;           % number of grid points in the y (column) direction
dx = 0.1e-3;        % grid point spacing in the x direction [m]
dy = 0.1e-3;        % grid point spacing in the y direction [m]
kgrid = kWaveGrid(Nx, dx, Ny, dy);

% define the properties of the propagation medium
medium.sound_speed = 1500 * ones(Nx, Ny);   % [m/s]
medium.sound_speed(1:Nx/2, :) = 1800;       % [m/s]
medium.density = 1000 * ones(Nx, Ny);       % [kg/m^3]
medium.density(:, Ny/4:Ny) = 1200;          % [kg/m^3]

% create initial pressure distribution using makeDisc
disc_magnitude = 5; % [Pa]
disc_x_pos = 50;    % [grid points]
disc_y_pos = 50;    % [grid points]
disc_radius = 8;    % [grid points]
disc_1 = disc_magnitude * makeDisc(Nx, Ny, disc_x_pos, disc_y_pos, disc_radius);

disc_magnitude = 3; % [Pa]
disc_x_pos = 80;    % [grid points]
disc_y_pos = 60;    % [grid points]
disc_radius = 5;    % [grid points]
disc_2 = disc_magnitude * makeDisc(Nx, Ny, disc_x_pos, disc_y_pos, disc_radius);

% source.p0 = disc_1 + disc_2;

% define a centered circular sensor
sensor_radius = 4e-3;   % [m]
num_sensor_points = 50;
sensor.mask = makeCartCircle(sensor_radius, num_sensor_points);

kgrid.Nt=725;
kgrid.dt=1.667e-8;

sampling_freq = 1/(1*kgrid.dt); % [Hz]
tone_burst_freq = 750e3; % [Hz]
tone_burst_cycles = 3;

source.p = toneBurst(sampling_freq, tone_burst_freq, tone_burst_cycles);
source.p=source.p/max(abs(source.p));
source.p_mask=cart2grid(kgrid,sensor.mask(:,1));

% run the simulation with optional inputs for plotting the simulation
% layout in addition to removing the PML from the display
sensor_data = kspaceFirstOrder2D(kgrid, medium, source, sensor, ...
    &#38;#39;PlotLayout&#38;#39;, false, &#38;#39;PlotPML&#38;#39;, false);

figure; plot(sensor_data(1,:));&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Signal emission frequency"</title>
			<link>http://www.k-wave.org/forum/topic/signal-emission-frequency#post-7843</link>
			<pubDate>Tue, 22 Sep 2020 13:50:00 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">7843@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Florian,&#60;/p&#62;
&#60;p&#62;Can you post a complete working example? I'll take a look. It may be related to spectral leakage in your FFT if you haven't set your sampling to be an integer number of points-per-period.&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>flomomo01 on "Signal emission frequency"</title>
			<link>http://www.k-wave.org/forum/topic/signal-emission-frequency#post-7838</link>
			<pubDate>Mon, 21 Sep 2020 22:20:07 +0000</pubDate>
			<dc:creator>flomomo01</dc:creator>
			<guid isPermaLink="false">7838@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I am currently working on ultrasound simulations. I have started to work with k-wave and I have an issue regarding signal emission frequency.&#60;/p&#62;
&#60;p&#62;In your example you provided named &#34;example_ivp_heterogeneous_medium.m&#34;, I tried to emit a 750kHz toneburst signal by adding these following lines before running the simulation and commenting the line when you define the uniform pressure:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;kgrid.Nt=725;
kgrid.dt=1.667e-8;

sampling_freq = 1/(1*kgrid.dt); % [Hz]
tone_burst_freq = 750e3; % [Hz]
tone_burst_cycles = 3;

source.p = toneBurst(sampling_freq, tone_burst_freq, tone_burst_cycles);
source.p=source.p/max(abs(source.p));
source.p_mask=cart2grid(kgrid,sensor.mask(:,1));&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;But when I tried to check the signal emission frequency by doing a FFT and plot the amplitude of the frequency components, I do not have 750kHz as expected but around 814kHz.&#60;/p&#62;
&#60;p&#62;Is it a phenomenon I should expect with the simulations ?&#60;/p&#62;
&#60;p&#62;Kind regards,&#60;br /&#62;
Florian M.
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
