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

		<item>
			<title>Anthony on "output signal in the chirp signal"</title>
			<link>http://www.k-wave.org/forum/topic/output-signal-in-the-chirp-signal#post-5342</link>
			<pubDate>Fri, 04 Dec 2015 16:27:08 +0000</pubDate>
			<dc:creator>Anthony</dc:creator>
			<guid isPermaLink="false">5342@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;Hello rajiva, &#60;/p&#62;
&#60;p&#62;could you also post the code of the function you call 'my_chirp'? It does not run without it...&#60;/p&#62;
&#60;p&#62;Best regards,&#60;br /&#62;
Anthony
&#60;/p&#62;</description>
		</item>
		<item>
			<title>rajiva on "output signal in the chirp signal"</title>
			<link>http://www.k-wave.org/forum/topic/output-signal-in-the-chirp-signal#post-5341</link>
			<pubDate>Thu, 03 Dec 2015 14:16:23 +0000</pubDate>
			<dc:creator>rajiva</dc:creator>
			<guid isPermaLink="false">5341@http://www.k-wave.org/forum/</guid>
			<description>&#60;p&#62;I have looking into the effect of the size of the source for the output signal for giving input chirp signal.&#60;br /&#62;
I am getting quite different output signal why? here is the code.&#60;br /&#62;
clear all;clc;close all&#60;br /&#62;
% set the size of the perfectly matched layer (PML)&#60;br /&#62;
PML_X_SIZE = 20;            % [grid points]&#60;br /&#62;
PML_Y_SIZE = 20;            % [grid points]&#60;br /&#62;
% set total number of grid points not including the PML&#60;br /&#62;
Nx = 128 - 2*PML_X_SIZE;    % [grid points]&#60;br /&#62;
Ny = 128 - 2*PML_Y_SIZE;    % [grid points]&#60;br /&#62;
% set desired grid size in the x-direction not including the PML&#60;br /&#62;
x = 25e-3;                  % [m]&#60;/p&#62;
&#60;p&#62;% calculate the spacing between the grid points&#60;br /&#62;
dx = x/Nx;                  % [m]&#60;br /&#62;
dy = dx;                    % [m]&#60;/p&#62;
&#60;p&#62;% create the k-space grid&#60;br /&#62;
kgrid = makeGrid(Nx, dx, Ny, dy);&#60;br /&#62;
% define the properties of the propagation medium&#60;br /&#62;
medium.sound_speed = 1500;  % [m/s]&#60;br /&#62;
medium.alpha_coeff = 0.75;  % [dB/(MHz^y cm)]&#60;br /&#62;
medium.alpha_power = 1.5;&#60;br /&#62;
% create the time array&#60;br /&#62;
[kgrid.t_array, dt] = makeTime(kgrid, medium.sound_speed,[], 100e-6);&#60;/p&#62;
&#60;p&#62;% define a single source point&#60;br /&#62;
source.p_mask = zeros(Nx, Ny);&#60;br /&#62;
source.p_mask(end - Nx/4, Ny/2) =1;&#60;/p&#62;
&#60;p&#62;% define a time varying sinusoidal source&#60;br /&#62;
source_freq1 = 0.5e6;   % [Hz]&#60;br /&#62;
source_freq2=4e6;&#60;br /&#62;
source_mag = 2;         % [Pa]&#60;br /&#62;
%input_signal =sin(2*pi*source_freq1*kgrid.t_array);%&#60;br /&#62;
input_signal=my_chirp(kgrid.t_array,source_freq1,source_freq2,100e-6);&#60;br /&#62;
source.p = source_mag*input_signal;&#60;/p&#62;
&#60;p&#62;%%&#60;br /&#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;% define a single sensor point&#60;br /&#62;
sensor.mask = zeros(Nx, Ny);&#60;br /&#62;
sensor.mask(Nx/4, Ny/2) = 1;&#60;/p&#62;
&#60;p&#62;% define the acoustic parameters to record&#60;br /&#62;
sensor.record = {'p', 'p_final'};&#60;/p&#62;
&#60;p&#62;% % run the simulation&#60;br /&#62;
sensor_data = kspaceFirstOrder2D(kgrid, medium, source, sensor);&#60;br /&#62;
%%&#60;br /&#62;
% plot the final wave-field&#60;br /&#62;
figure;&#60;br /&#62;
imagesc(kgrid.y_vec*1e3, kgrid.x_vec*1e3, sensor_data.p_final + source.p_mask + sensor.mask, [-1 1]);&#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;/p&#62;
&#60;p&#62;% plot the simulated sensor data&#60;br /&#62;
figure(1);&#60;br /&#62;
[t_sc, scale, prefix] = scaleSI(max(kgrid.t_array(:)));&#60;/p&#62;
&#60;p&#62;subplot(2, 1, 1), plot(kgrid.t_array*scale, source.p, 'k-');grid on&#60;br /&#62;
xlabel(['Time [' prefix 's]']);&#60;br /&#62;
ylabel('Signal Amplitude');&#60;br /&#62;
axis tight;&#60;br /&#62;
title('Input Pressure Signal');&#60;/p&#62;
&#60;p&#62;subplot(2, 1, 2), plot(kgrid.t_array*scale, sensor_data.p, 'r-');grid on;&#60;br /&#62;
xlabel(['Time [' prefix 's]']);&#60;br /&#62;
ylabel('Signal Amplitude');&#60;br /&#62;
axis tight;&#60;br /&#62;
title('Sensor Pressure Signal');&#60;br /&#62;
%%&#60;br /&#62;
figure(2)&#60;br /&#62;
[f_input, as_input] = spect([input_signal, zeros(1, 2*length(input_signal))], 1/kgrid.dt);&#60;br /&#62;
subplot(211),plot(f_input/1e6, as_input./max(as_input(:)), 'k-');&#60;br /&#62;
title('spectrum of chirp  input signal')&#60;br /&#62;
xlabel('frequency MHz')&#60;br /&#62;
ylabel('normalized value')&#60;br /&#62;
axis('tight')&#60;/p&#62;
&#60;p&#62;[f_input, as_input] = spect([source.p, zeros(1, 2*length(source.p))], 1/kgrid.dt);&#60;br /&#62;
subplot(223),plot(f_input/1e6, as_input./max(as_input(:)), 'k-');&#60;br /&#62;
title('spectrum of source signal')&#60;br /&#62;
xlabel('frequency MHz')&#60;br /&#62;
ylabel('normalized value')&#60;br /&#62;
axis('tight')&#60;/p&#62;
&#60;p&#62;[f_output, as_output] = spect([sensor_data.p, zeros(1, 2*length(sensor_data.p))], 1/kgrid.dt);&#60;br /&#62;
subplot(224),plot(f_output/1e6, as_output./max(as_output(:)), 'r-');&#60;br /&#62;
title('spectrum of sensor output signal')&#60;br /&#62;
xlabel('frequency MHz')&#60;br /&#62;
ylabel('normalized value')&#60;br /&#62;
axis('tight')&#60;/p&#62;
&#60;p&#62;display(dx)&#60;/p&#62;
&#60;p&#62;But for smaller size (i am taking 1 grid size) i am getting output signal increases with the frequency. but for lager size( for grid size 3 to 5)  i am getting output signal amplitude decreases with the frequency (that what we expect).
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
