Field II 超声声场仿真(1): 发射声场(原理&代码)

系列一:利用Field II仿真计算发射声场强度

0. 基本参数定义

c = 1540;                   % Speed of sound
f0 = 2.5e6;                 % Transducer center frequency [Hz]
fs = 100e6;                 % Sampling frequency [Hz]
lambda = c/f0;              % Wavelength
element_height = 13/1000;   % Height of element [m] (elevation direction)
element_width = 18.5/1000;  % Element width [m] (azimuth direction)
kerf = 0;
focus = [0 0 60]/1000;      % Fixed emitter focal point [m] (irrelevant for single element transducer)
N_elements = 1;             % Number of physical elements in array
N_sub_x = 1;                % Element sub division in x-direction
N_sub_y = 1;                % Element subdivision in y-direction

1. 定义发射孔径

Filed II中使用xdc_命令设置换能器的基本参数,xdc_linear_array命令创建一个线阵换能器。

线阵换能器示意图

emit_aperture = xdc_linear_array (N_elements, element_width, element_height, kerf, N_sub_x, N_sub_y, focus);

#####1.1 单阵元换能器

定义单阵元换能器,阵元个数为1,x和y方向上的子阵个数也设置为1:N_elements = 1, N_sub_x=1; N_sub_y=1.
绘制换能器,结果如下图所示。

N_sub_x=1; N_sub_y=1

view in 3D

可以看出当阵元数等于1时(N_elements=1),阵元在x轴方向上的长度等于element_width,在y轴方向上的宽度等于element_height。而N_sub_xN_sub_y只是进行进一步的子阵划分,并不影响仿真计算的结果。

N_sub_x=90; N_sub_y=90

view in 3D

#####1.2 换能器阵列

使用xdc_focus_array指令创建聚焦换能器阵列,如下图所示

element_height = 13/1000;   % Height of element [m] (elevation direction)
pitch = 0.290/1000;         % Distance between element centers
kerf = 0.025/1000;          % Width of fill material between the ceramic elements
element_width = pitch-kerf; % Element width [m] (azimuth direction)
Rfocus = 60/1000;           % Elevation lens focus (or radius of curvature, ROC) 
focus = [0 0 60]/1000;      % Fixed emitter focal point [m] (irrelevant for single element transducer)
N_elements = 64;            % Number of physical elements in array
N_sub_x = 1;                % Element sub division in x-direction
N_sub_y = 2;                % Element subdivision in y-direction

emit_aperture = xdc_focused_array (N_elements, element_width, element_height, kerf, Rfocus, N_sub_x, N_sub_y, focus);

N_elements = 64; N_sub_x = 1; N_sub_y = 2

其中,Rfocus定义了换能器的曲率半径。

Rfocus=60mm, view in 3D

2. 设置换能器的激励和脉冲响应

定义好发射孔径之后,使用xdc_excitation()函数设置发射孔径的激励脉冲Excitation,此处设置激励脉冲的中心频率为2.5MHz,脉冲长度为1.5个周期。

ex_periods = 1.5;
t_ex=(0:1/fs:ex_periods/f0);
excitation=square(2*pi*f0*t_ex);
xdc_excitation (emit_aperture, excitation);

之后,使用xdc_impulse()函数设置换能器发射孔径的脉冲响应Transducer impulse response.

t_ir = -2/f0:1/fs:2/f0;
Bw = 0.6;    %带宽设为0.6
impulse_response=gauspuls(t_ir,f0,Bw);
set_sampling(fs);
xdc_impulse (emit_aperture, impulse_response);

换能器发射孔径的激励和脉冲响应

3. 计算发射声场强度

#####3.1 一个点处的声场强度

比如,选择(0, 0, 60)mm处为测量点。

使用calc_h()函数计算该点处的空间脉冲响应Spatial impulse response.

calc_h()函数

使用calc_hp()函数计算该点处的声场强度Transmit pressure.

calc_hp()函数

(1) 单阵元测量结果

单阵元(0,0,60)mm处测量示意图

单阵元(0,0,60)mm处的空间脉冲响应和声场强度

(2) 聚焦换能器阵列测量结果

聚焦换能器阵列(0,0,60)mm处测量示意图

聚焦换能器阵列(0,0,60)mm处的空间脉冲响应和声压

#####3.2 一条线上的声场强度

(1) 横向计算结果

若干点可以组成一条线,在(-20,0,60)mm到(20,0,60)mm处选择101个测量点形成一条线,计算聚焦换能器阵列在60mm深度处的空间脉冲响应和声场强度。

聚焦换能器阵列60mm深度处测量示意图

60mm深度处的空间脉冲响应

60mm深度处的声场强度

(2) 径向计算结果:计算声轴上声压分布

在(0,0,5)mm到(0,0,150)mm处选择101个测量点形成一条测量线

测量示意图

Rfocus = 60mm; focus = [0 0 60]mm; 声轴上声压分布

改变焦点位置

Rfocus = 60/1000;           % Elevation lens focus (or radius of curvature, ROC) 
focus = [0 0 30]/1000;      % Fixed emitter focal point [m] (irrelevant for single element transducer)

Rfocus = 60mm; focus = [0 0 30]mm; 声轴上声压分布

改变换能器阵元数,从64减少至32

Rfocus = 60mm; focus = [0 0 60]mm; N_elements=32; 声轴上声压分布

3.3 一个平面的声场强度(xz平面)

选择81x59个测量点,计算xz切面方向上的声场强度,其中x的变化范围为-15mm至15mm,z的变化范围为5mm至150mm。

xz平面计算示意图.png

xz平面声场强度(聚焦换能器)

4. 增加变迹函数

4.1 boxcar变迹函数

boxcar变迹函数

xz平面声场强度(聚焦换能器)

4.2 Hanning变迹函数

Hanning变迹函数

xz平面声场强度(聚焦换能器)

代码请加QQ:2971319104

  • 17
    点赞
  • 113
    收藏
    觉得还不错? 一键收藏
  • 6
    评论
以下是使用 MATLAB 的 Field II 工具箱进行超声声场仿真代码示例: ```matlab % 定义超声波源和声场参数 f0 = 6e6; % 超声波频率 fs = 100e6; % 采样频率 c = 1540; % 声速 lambda = c/f0; % 超声波波长 width = lambda/2; % 超声波源宽度 element_height = 5/1000; % 超声波源高度 kerf = 0.1/1000; % 超声波源之间的间隙 element_pitch = element_height + kerf; % 超声波源间距 N_elements = 128; % 超声波源个数 N_active_elements = 64; % 激活的超声波源个数 x = (-(N_elements-1)/2:(N_elements-1)/2) * element_pitch; % 超声波源位置 focus = [0 0 60]/1000; % 超声波源聚焦点位置 % 生成 Field II 模型 field_init(-1); set_field('c', c); set_field('fs', fs); xmit = xdc_linear_array(N_elements, element_height, width, kerf, 1, 1, focus); % 超声波源 xdc_impulse(xmit, sin(2*pi*f0*(0:1/fs:width/c))); % 超声波源激励信号 % 定义接收器位置 receive_aperture = xdc_linear_array(N_elements, element_height, width, kerf, 1, 1, focus); set_field('use_rectangles', 1); set_field('rectangle_corners', [-width/2 -width/2 width/2 width/2; 0 -N_elements*element_pitch/2 -N_elements*element_pitch/2 0; 0 0 0 0]); % 计算声场传播并绘制声压分布图 [rf, tstart] = calc_scat(xmit, receive_aperture, phantom_positions); % phantom_positions 为声场中物体的位置 figure; imagesc(x*1000, (tstart + (0:size(rf, 1)-1)/fs)*c/2*1000, abs(hilbert(rf))); colormap(gray); xlabel('Lateral distance (mm)'); ylabel('Axial distance (mm)'); title('Pressure field'); ``` 以上代码仅为示例,具体实现要根据实际需求进行调整。该代码使用 Field II 工具箱生成超声波源和接收器,计算声场传播并绘制声压分布图。其中,`calc_scat` 函数用于计算声场传播,`imagesc` 函数用于绘制声压分布图。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值