Field _II 仿真 学习笔记

  参考Field II的使用说明,进行了四个例子的练习。仿真程序和结果如下:

奋斗PURPOSE1:Calculate the received response from all elements of a linear array and plot the responses and the summed response 【计算来自所有线性阵元的接收响应,并绘制该响应以及叠加响应。】

>> path(path,'D:\MATLAB\R2016a\Field_II_PC7');field_init 

%set initial parameters

>> f0=3e6;%Transducer center frequency

>> fs=100e6;%sampling frequency
>> c=1540;%speed of sound
>> lambda=c/f0;%wave length
>> height=5/1000;%height of element
>> width=1/1000;%width of element
>> kerf=width/4;%distance between transducer elements
>> N_elements=32;%number of elements

>> focus=[0 0 40]/1000;%initial electronic focus

%define the transducer

>> Th=xdc_linear_array(N_elements, width, height ,kerf ,2, 3, focus);%set the impulse response and excitation of the emit aperture
>> impulse_response=sin(2*pi*f0*(0:1/fs:2/f0));
>> impulse_response=impulse_response.*hanning(max(size(impulse_response)))';
>> xdc_impulse(Th,impulse_response);
>> excitation=sin(2*pi*f0*(0:1/fs:2/f0));

>> xdc_excitation(Th,excitation);

%Do the calculation

>> [v,t]=calc_scat_multi(Th,Th,[0 0 20]/1000,1);

%plot the individual response

>> subplot(211)
>> [N,M]=size(v);
>> v=v/max(max(v));
>> for i=1:N_elements
plot((0:N-1)/fs+t,v(:,i)+i),hold on
end
>> hold off
>> title('Individual traces')
>> xlabel('Time [s]')
>> ylabel('Normalized response')
>> subplot(212)
>> plot((0:N-1)/fs+t,sum(v'))
>> title('Summed response')
>> xlabel('Time[s]')
>> ylabel('Normalized response')

>> 
绘制结果:



奋斗PURPOSE2:calculate the received response from all elements of a linear array with 3 transmitting and 16receiving elements and plot the responses and the summed response [计算来自一个带有3个发送和16个接收元的线性阵的所有阵元的接收响应,并绘制该响应和叠加相应。

 f0=3e6;
fs=100e6;
c=1540;
lambda=c/f0;
height=5/1000;
width=1/1000;
kerf=width/5;
N_elements=3;
N_elements2=16;
focus=[0 0 40]/1000;
%define the transducers
Th=xdc_linear_array(N_elements,width,height,kerf,2,3,focus);
Th2=xdc_linear_array(N_elements2,width,height,kerf,2,3,focus);
%Set the impulse response and excitation of the emit aperture
impulse_response =sin(2*pi*f0*(0:1/fs:2/f0));
impulse_response=impulse_response.*hanning(max(size(impulse_response)))';
xdc_impulse(Th,impulse_response);
xdc_impulse(Th2,impulse_response);
excitation=sin(2*pi*f0*(0:1/fs:2/f0));
xdc_excitation(Th,excitation);
%define a small phantom with scatterers
N=200;
x_size = 20/1000;%width of phantom
y_size=10/1000;%transverse width of phantom
z_size=20/1000;%hight of phantom
z_start=5/1000;%start of phantom surface
%creat the general scatters
x=(rand (N,1)-0.5)*x_size;
y=(rand (N,1)-0.5)*y_size;
z=rand (N,1)*z_size + z_start;
positions=[x y z];
%Generate the amplitudes with a Gaussian distribution 
>> amp=randn(N,1);
>> %dO the calculations
>> [v,t]=calc_scat_all(Th,Th2,positions,amp,1);
>> %plot the indicidual response 
>> [N,M]=size(v);
>> scale=max(max(v));
>> v=v/scale;
>> for i=1:M
  plot ((0:N-1)/fs+t,v(:,1)+i,'b'),hold on
end 
>> hold off

>> title ('Individual traces')
>> xlabel('Time[s]')
>> ylabel('Normalized response')
>> axis([t t+N/fs 0 M+1])

得到图:当用三个不同的元发送,得到的16个线性阵列换能器的单个元件的接收电压的痕迹(?)


奋斗PURPOSE3:to show how the procedures can be used for making a phased array scan of a point target【用于说明程序如何可以用于一个点目标的相控阵扫描】

%generate  the transducer aperture for send and receive

f0=3e6;
fs=100e6;
c=1540;
lambda=c/f0;
element_hight=5/1000;
kerf=0.1/1000;
focus

评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值