<?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: Nonlinear acoustics with chirp input signals</title>
		<link>http://www.k-wave.org/forum/topic/nonlinear-acoustics-with-chirp-input-signals</link>
		<description>Support for the k-Wave MATLAB toolbox</description>
		<language>en-US</language>
		<pubDate>Tue, 12 May 2026 23:33:17 +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/nonlinear-acoustics-with-chirp-input-signals" rel="self" type="application/rss+xml" />

		<item>
			<title>alex_wang on "Nonlinear acoustics with chirp input signals"</title>
			<link>http://www.k-wave.org/forum/topic/nonlinear-acoustics-with-chirp-input-signals#post-5575</link>
			<pubDate>Tue, 05 Jul 2016 15:03:04 +0000</pubDate>
			<dc:creator>alex_wang</dc:creator>
			<guid isPermaLink="false">5575@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Bradley,&#60;/p&#62;
&#60;p&#62;noted with great thanks!&#60;/p&#62;
&#60;p&#62;Alex
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Nonlinear acoustics with chirp input signals"</title>
			<link>http://www.k-wave.org/forum/topic/nonlinear-acoustics-with-chirp-input-signals#post-5574</link>
			<pubDate>Tue, 05 Jul 2016 09:10:41 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">5574@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Alex,&#60;/p&#62;
&#60;p&#62;The temporal frequency of your signal is also encoded in the spatial frequency (or wavelength) of the waves propagating through the domain (these are related by the sound speed). At each time step, the energy at each spatial frequency can be calculated using a spatial Fourier transform, and modified accordingly. Very loosely speaking, this is how the fractional Laplacian derivative operator works. Thus k-Wave considers absorption at all frequencies at once.&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>alex_wang on "Nonlinear acoustics with chirp input signals"</title>
			<link>http://www.k-wave.org/forum/topic/nonlinear-acoustics-with-chirp-input-signals#post-5566</link>
			<pubDate>Tue, 05 Jul 2016 05:14:58 +0000</pubDate>
			<dc:creator>alex_wang</dc:creator>
			<guid isPermaLink="false">5566@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Bradley,&#60;/p&#62;
&#60;p&#62;Many thanks for your valuable reply, currently the simulation was much much faster. the input was indeed a chirp signal. the frequency linearly changes with time but in a very small range.my question regarding the attenuation is that the Attenuation is a function of frequency, and in my case, the frequency changes at each time step, how could k-wave consider this frequency variation? For the fractional Laplacian derivative operator, I am really not sure how it works.&#60;/p&#62;
&#60;p&#62;regards&#60;/p&#62;
&#60;p&#62;Alex
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Bradley Treeby on "Nonlinear acoustics with chirp input signals"</title>
			<link>http://www.k-wave.org/forum/topic/nonlinear-acoustics-with-chirp-input-signals#post-5562</link>
			<pubDate>Mon, 04 Jul 2016 16:19:53 +0000</pubDate>
			<dc:creator>Bradley Treeby</dc:creator>
			<guid isPermaLink="false">5562@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hi Alex,&#60;/p&#62;
&#60;p&#62;I'm not sure I follow your first question? k-Wave models absorption following a frequency power law. It models this, for mathematical convenience, using a fractional Laplacian derivative operator. There are more details about this &#60;a href=&#34;http://www.k-wave.org/papers/2010-Treeby-JASA.pdf&#34;&#62;here&#60;/a&#62;.&#60;/p&#62;
&#60;p&#62;For a 2D simulation, the best way to speed up the simulations is to use a modern GPU (if you have access to one). Running your code on an older Telsa C2070, I get a speed up of ~5 by setting `'DataCast', 'gpuArray-single'.&#60;/p&#62;
&#60;p&#62;Two additional points. First, you might want to add &#60;code&#62;&#38;#39;PlotScale&#38;#39;, [-1, 1]*source_mag&#60;/code&#62; to your list of input options to be able to visualise the field. Second, it doesn't seem like your simulation uses a chirp input (maybe this was intentional).&#60;/p&#62;
&#60;p&#62;Brad.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>alex_wang on "Nonlinear acoustics with chirp input signals"</title>
			<link>http://www.k-wave.org/forum/topic/nonlinear-acoustics-with-chirp-input-signals#post-5553</link>
			<pubDate>Mon, 27 Jun 2016 13:48:05 +0000</pubDate>
			<dc:creator>alex_wang</dc:creator>
			<guid isPermaLink="false">5553@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Dear k-WAVE,&#60;/p&#62;
&#60;p&#62;Currently, I am trying to see the nonlinear acoustic field with a chirp input. I have some questions regarding the simulation, even though K-wave could give me some initial results.&#60;br /&#62;
1) the power law effect,  as the frequency at each instantaneous moment was different(time dependent), how did k-wave consider this alteration ? and how could k-wave consider the frequency change at each moment? &#60;/p&#62;
&#60;p&#62;2) the simulation time, as the chirp time used in the simulation is a little bit long (around 1ms) and the working frequency is 3MHz, the current simulation takes a very long, is there any ways to speed up &#60;/p&#62;
&#60;p&#62;please find my code below&#60;br /&#62;
clear all;&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% SIMULATION&#60;br /&#62;
% =========================================================================&#60;br /&#62;
PML_size=20;&#60;br /&#62;
DATA_CAST = 'single';       % set to 'single' or 'gpuArray-single' to speed up computations&#60;br /&#62;
% create the computational grid&#60;br /&#62;
Nx = 1024-2*PML_size;           % number of grid points in the x (row) direction&#60;br /&#62;
Ny = 1024-2*PML_size;            % number of grid points in the y (column) direction&#60;br /&#62;
dx = 1e-4;    	% grid point spacing in the x direction [m]&#60;br /&#62;
dy = dx;            % grid point spacing in the y direction [m]&#60;br /&#62;
kgrid = makeGrid(Nx, dx, Ny, dy);&#60;br /&#62;
% define a curved transducer element&#60;br /&#62;
R=0.0626;  % tranducer focal length&#60;br /&#62;
r1=0.032;  % Aperture size-outer radius&#60;br /&#62;
r2=0.0113; % Aperture size-iner radius&#60;br /&#62;
% I=zeros(Nx,Ny);&#60;br /&#62;
angle1=asin(r1/R);&#60;br /&#62;
angle2=asin(r2/R);&#60;br /&#62;
L_shift_1=round(0.01/dx);&#60;br /&#62;
L_shift_2=round(0.02/dx);&#60;br /&#62;
R_size=round(R/dx);&#60;br /&#62;
circle1 = makeCircle(Nx, Ny,Nx/2,Ny/2+L_shift_2,R_size,angle1);&#60;br /&#62;
circle2 = makeCircle(Nx, Ny,Nx/2,Ny/2+L_shift_2,R_size,angle2);&#60;br /&#62;
circle3 = flipud(circle1);&#60;br /&#62;
circle4 = flipud(circle2);&#60;br /&#62;
circle5=circle3-circle4;&#60;br /&#62;
source.p_mask=circle1-circle2+circle5;&#60;br /&#62;
% define the properties of the propagation medium&#60;br /&#62;
% water&#60;br /&#62;
medium.sound_speed = 1500*ones(Nx,Ny);  % [m/s]&#60;br /&#62;
medium.alpha_power = 2;   % [dB/(MHz^y cm)]&#60;br /&#62;
medium.alpha_coeff = 0.0022*ones(Nx,Ny);  % [dB/(MHz^y cm)]&#60;br /&#62;
medium.BonA=5*ones(Nx,Ny);&#60;br /&#62;
medium.density=1000*ones(Nx,Ny);&#60;br /&#62;
% phantom property&#60;br /&#62;
medium.sound_speed(:,Ny/2+L_shift_2:Ny) = 1544;  % [m/s]&#60;br /&#62;
% medium.alpha_power(:,412:1024) = 1.1;   % [dB/(MHz^y cm)]&#60;br /&#62;
medium.alpha_coeff(:,Ny/2+L_shift_2:Ny) = 0.015;  % [dB/(MHz^y cm)]&#60;br /&#62;
medium.density(:,Ny/2+L_shift_2:Ny)=1044;&#60;br /&#62;
% create the time array&#60;br /&#62;
dt=4e-8;&#60;br /&#62;
tend=1e-4;&#60;br /&#62;
kgrid.t_array=0:dt:tend;&#60;/p&#62;
&#60;p&#62;% define a time varying sinusoidal source&#60;br /&#62;
source_freq = 1.0e6;       % [Hz]&#60;br /&#62;
source_mag = 600E3;           % [Pa]&#60;br /&#62;
delta_freq=0.4e6;&#60;br /&#62;
source.p = source_mag*sin(2*pi*(source_freq+delta_freq*kgrid.t_array/tend).*kgrid.t_array);&#60;/p&#62;
&#60;p&#62;% filter the source to remove high frequencies not supported by the grid&#60;br /&#62;
source.p = filterTimeSeries(kgrid, medium, source.p);&#60;/p&#62;
&#60;p&#62;% create a display mask to display the transducer&#60;br /&#62;
display_mask = source.p_mask;&#60;/p&#62;
&#60;p&#62;% create a sensor mask covering the entire computational domain using the&#60;br /&#62;
% opposing corners of a rectangle&#60;br /&#62;
sensor.mask = [1, 1, Nx, Ny].';&#60;/p&#62;
&#60;p&#62;% set the record mode capture the final wave-field and the statistics at&#60;br /&#62;
% each sensor point&#60;br /&#62;
sensor.record = {'p_final', 'p_min', 'p_rms'};&#60;/p&#62;
&#60;p&#62;% assign the input options&#60;br /&#62;
input_args = {'DisplayMask', display_mask, 'PMLInside', false, 'PlotPML', false,'DataCast', DATA_CAST, 'DataRecast', true};&#60;/p&#62;
&#60;p&#62;% run the simulation&#60;br /&#62;
sensor_data = kspaceFirstOrder2D(kgrid, medium, source, sensor, input_args{:});&#60;/p&#62;
&#60;p&#62;% =========================================================================&#60;br /&#62;
% VISUALISATION&#60;br /&#62;
% =========================================================================&#60;/p&#62;
&#60;p&#62;% add the source mask onto the recorded wave-field&#60;br /&#62;
sensor_data.p_final(source.p_mask ~= 0) = 1;&#60;br /&#62;
sensor_data.p_min(source.p_mask ~= 0) = 1;&#60;br /&#62;
sensor_data.p_rms(source.p_mask ~= 0) = 1;&#60;/p&#62;
&#60;p&#62;% plot the final wave-field&#60;br /&#62;
figure;&#60;br /&#62;
subplot(1, 3, 1), imagesc(kgrid.y_vec*1e3, kgrid.x_vec*1e3, sensor_data.p_final, [-1e6 1e6]);&#60;br /&#62;
colormap(getColorMap);&#60;br /&#62;
ylabel('x-position [mm]');&#60;br /&#62;
xlabel('y-position [mm]');&#60;br /&#62;
axis image;&#60;br /&#62;
title('Final Wave Field');&#60;/p&#62;
&#60;p&#62;% plot the maximum recorded pressure&#60;br /&#62;
subplot(1, 3, 2), imagesc(kgrid.y_vec*1e3, kgrid.x_vec*1e3, sensor_data.p_min, [-1e6 1e6]);&#60;br /&#62;
colormap(getColorMap);&#60;br /&#62;
ylabel('x-position [mm]');&#60;br /&#62;
xlabel('y-position [mm]');&#60;br /&#62;
axis image;&#60;br /&#62;
title('Minimum Pressure');&#60;/p&#62;
&#60;p&#62;% plot the rms recorded pressure&#60;br /&#62;
subplot(1, 3, 3), imagesc(kgrid.y_vec*1e3, kgrid.x_vec*1e3, sensor_data.p_rms, [-1e6 1e6]);&#60;br /&#62;
colormap(getColorMap);&#60;br /&#62;
ylabel('x-position [mm]');&#60;br /&#62;
xlabel('y-position [mm]');&#60;br /&#62;
axis image;&#60;br /&#62;
title('RMS Pressure');&#60;br /&#62;
scaleFig(2, 1);
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
