Dear all,
I want to simulate the process of receiving ultrasonic signals with a finite size transducer.
In the program below, the total number of transducers is 360, with each transducer being 10mm (amount to 101 grid points) in diameter.I used the makeMultiArc function to create so many transducers. In my expectation, the resulting sensor_data should be an array of 36360×2226. However, as the warning suggests 'WARNING: 25 arcs are overlapping', some of the receiving points must have overlapped. Is there a way for me to isolate the data received by the 360 transducers from sensor_data? Or, is there any other way to get what I want. For example, I tried a method of setting up just one transducer and rotating it 360 times by 1 degree each time, which is 360 repetitions and output the data for each calculation. This approach serves my purpose, but it takes too much time to compute.
I hope someone can help me solve this problem.
Dr. Zeng
clearvars;
% =========================================================================
% SIMULATION
% =========================================================================
% load the initial pressure distribution from an image and scale
p0_magnitude = 2;
p0 = p0_magnitude * loadImage('EXAMPLE_source_two.bmp');
% assign the grid size and create the computational grid
PML_size = 20; % size of the PML in grid points
Nx = 540 - 2 * PML_size; % number of grid points in the x direction
Ny = 540 - 2 * PML_size; % number of grid points in the y direction
x = 50e-3; % total grid size [m]
y = 50e-3; % total grid size [m]
dx = x / Nx; % grid point spacing in the x direction [m]
dy = y / Ny; % grid point spacing in the y direction [m]
kgrid = kWaveGrid(Nx, dx, Ny, dy);
% resize the input image to the desired number of grid points
p0 = resize(p0, [Nx, Ny]);
% smooth the initial pressure distribution and restore the magnitude
p0 = smooth(p0, true);
% assign to the source structure
source.p0 = p0;
% define the properties of the propagation medium
medium.sound_speed = 1500; % [m/s]
% create the time array
Ts = 21e-9 ; % Sampling interval 50ns
sf = 1/Ts ; % Sampling frequency 50 [MHz]
kgrid.Nt = 2226 ; % sampling points
kgrid.t_array = (0:kgrid.Nt-1)*Ts ;
%--------------------------------------------------------------
num_arcs = 360 ; % Number of transducers
scanning_radius = 23e-3 ; % Scanning radius actual length [m]
trans_diameter = 10e-3 ; % sensor size [m]
diameter = round(trans_diameter/dx)+1 ; % Transducer surface detection number, must be odd number
% define element parameters
radius = round(scanning_radius/dx) ; % [grid points]
focus_pos = [1, 1] * Nx/2;
%-------------Location of the center of the transducer-----------
arc_pos = makeCartCircle(scanning_radius, num_arcs, [1, 1] * x / 2).';
% convert the Cartesian arc positions to grid points
arc_pos = round(arc_pos/dx);
temp = makeMultiArc([Nx,Ny], arc_pos, radius, diameter, focus_pos, 'Plot', true);
sensor.mask = temp;
% set the input options
input_args = {'Smooth', false, 'PMLInside', false, 'PlotPML', false};
% run the simulation
sensor_data = kspaceFirstOrder2D(kgrid, medium, source, sensor, input_args{:});