xdc_focus_times for 2D array transducer in Field2

5 views (last 30 days)
Hi,
I'm trying to simulate time delays for each element in a 2D array transducer using field2 program.
I only managed to use the xdc_focus_times function to add delays for 1D array and not 2D.
Is there any way to do it for 2D transducer created with xdc_2d_array() ?
thank you in advance.

Answers (1)

karthik kumar k
karthik kumar k on 9 Feb 2025
To set delays for a 2D transducer array in Field II, calculate the delays for each element and use xdc_focus() to apply the focus. Here's how:Steps:
1. Create the 2D Array:
Nx = 16; Ny = 16; % Number of elements
width = 0.5e-3; height = 0.5e-3; % Element dimensions
kerf_x = 0.1e-3; kerf_y = 0.1e-3; % Spacing
focus = [0, 0, 0.04]; % Focus point
Th = xdc_2d_array(Nx, Ny, width, height, kerf_x, kerf_y, focus);
2. Calculate Delays:
c = 1540; % Speed of sound (m/s)
[elem_x, elem_y] = ndgrid(...
linspace(-Nx/2, Nx/2-1, Nx) * (width + kerf_x), ...
linspace(-Ny/2, Ny/2-1, Ny) * (height + kerf_y));
element_positions = [elem_x(:), elem_y(:), zeros(numel(elem_x), 1)];
delays = sqrt(sum((element_positions - focus).^2, 2)) / c;
3. Assign Delays:
xdc_focus(Th, 0, delays);

Categories

Find more on Ultrasound Imaging in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!