Beamforming

1. Problem description:

 The digital beamformer is the foundation of all-digital ultrasound imaging and the guarantee of high-performance color Doppler ultrasound.

Digital beamforming includes two parts: transmitting and receiving. Digital is the key technology for receiving beamforming. It uses sequential storage FIFO or random access memory dual-port RAM to replace the LC delay line in the analog beamformer to achieve beam focusing, that is, the digital delay compensation replaces the analog delay. Time compensation. Digital delay can not only realize accurate delay compensation and realize the so-called point-by-point tracking dynamic focus, but also facilitate the realization of dynamic aperture and dynamic apodization control, overcome many inherent shortcomings of analog delay compensation, and increase the number of channels. The limitation is that the image quality can be comprehensively improved.

2. Part of the program:

 

close all
clear all

%%Beamforming
f=[4000,5000,6000];% signal frequency, in Hz
w=[1,1,1,1,1;% each row represents a weighted
    1,2,4,2,1;
    4,2,1,2,4];
fs=4*f;% sampling frequency is 4 times of signal frequency
T=0.1;% signal length, unit s
N=T*fs;% number of sampling points
c=1500;% Speed ​​of sound, m/s
d=0.15;% element spacing, unit m
jay=sqrt(-1);% complex unit
theta=-90:1:90;% observation angle range, unit degree
tao=d*sin(pi *theta/180)/c;% adjacent array element delay
xx=zeros(3,2400);% ready to generate reference signals at three frequencies

for i=1:3
    xx(i,1:N(i))=exp(jay*(2*pi*f(i)/fs(i)*(0:N(i)-1))); % Reference signal
end at three frequencies

for j=1: 3% three frequency cycles
    for i=1: length(tao)% different angle cycles
        for k=(j-1)*5+1:(j-1)*5+5% The signals of the five elements at the frequency
            x(k,:)=xx(j,:)*exp(-jay*2*pi*f(j)*(k-1)*tao(i));
        end
        r=x((j-1)*5+1:(j-1)*5+5,:)*x((j-1)*5+1:(j-1)*5+5,: )'/N(j);% To find the beam pattern at a certain angle, use the formula B=w*(∑x*x')*w'/N.
        B((j-1)*3+1,i )=w(1,:)*r*w(1,:)';% the first weighted beam pattern output at the jth frequency
        B((j-1)*3+2,i)=w (2,:)*r*w(2,:)';% The second weighted beam pattern output at the jth frequency
        B((j-1)*3+3,i)=w(3, :)*r*w(3,:)';% The third weighted beam pattern output at the jth frequency
    end
end
%c The proof B generated means B=[B11;B12;B13;B21;B22; B23;B31;B32;B33];The first subscript indicates the frequency, and the second subscript indicates the beam obtained by the weighting
for k=1:9%. The 9 beam patterns are respectively normalized Change and take the logarithm
    B(k,:)=real(B(k,:))/max(real(B(k,:)));% normalized
    B(k,:)=20*log10( B(k,:));% takes the logarithm
end
figure(1);% frequency f=4000, weighted different
subplot(3,1,1);
plot(theta,B(1,:)); axis([-90 90 -60 0]);title(' Frequency f=4000, weighted [1,1,1,1,1]');xlabel('angle/°');ylabel('beam pattern/dB');
subplot(3,1,2);
plot( theta,B(2,:)); axis([-90 90 -60 0]); title('frequency f=4000, weighted [1,2,4,2,1]');xlabel('angle/ °');ylabel('Beam pattern/dB');
subplot(3,1,3);
plot(theta,B(3,:)); axis([-90 90 -60 0]);title(' Frequency f=4000, weighted [4,2,1,2,4]'); xlabel('angle/°');ylabel('beam pattern/dB');

figure(2);% frequency f=5000, weighted different
subplot(3,1,1);
plot(theta,B(4,:)); axis([-90 90 -60 0]); title('frequency f=5000, weighted [1,1,1,1,1]');xlabel('angle/°');ylabel('beam pattern/dB');
subplot(3,1,2);
plot(theta ,B(5,:)); axis([-90 90 -60 0]); title('frequency f=5000, weighted [1,2,4,2,1]');xlabel('angle/° ');ylabel('Beam pattern/dB');
subplot(3,1,3);
plot(theta,B(6,:));axis([-90 90 -60 0]);title('frequency f=5000, weighted [4,2,1,2,4]'); xlabel('angle/°');ylabel('beam pattern/dB');

figure(3);% frequency f=6000, weighted different
subplot(3,1,1);
plot(theta,B(7,:)); axis([-90 90 -60 0]); title('frequency f=6000, weighted [1,1,1,1,1]');xlabel('angle/°');ylabel('beam pattern/dB');
subplot(3,1,2);
plot(theta ,B(8,:)); axis([-90 90 -60 0]); title('frequency f=6000, weighted [1,2,4,2,1]');xlabel('angle/° ');ylabel('Beam pattern/dB');
subplot(3,1,3);
plot(theta,B(9,:));axis([-90 90 -60 0]);title('frequency f=6000, weighted [4,2,1,2,4]'); xlabel('angle/°');ylabel('beam pattern/dB');

figure(4);% weighted [1,1,1,1,1], different frequencies
subplot(3,1,1);
plot(theta,B(1,:)); axis([-90 90 -60 0]);title('Frequency f=4000, weighted [1,1,1,1,1]');xlabel('angle/°');ylabel('beam pattern/dB');
subplot(3, 1,2);
plot(theta,B(4,:)); axis([-90 90 -60 0]); title('Frequency f=5000, weighted [1,1,1,1,1]' );xlabel('angle/°');ylabel('beam pattern/dB');
subplot(3,1,3);
plot(theta,B(7,:));axis([-90 90 -60 0]);title('Frequency f=6000, weighted [1,1,1,1,1]');xlabel('angle/°');ylabel('beam pattern/dB');

figure(5);% weighted [1,2,4,2,1], different frequencies
subplot(3,1,1);
plot(theta,B(2,:)); axis([-90 90 -60 0]);title('Frequency f=4000, weighted [1,2,4,2,1]');xlabel('angle/°');ylabel('beam pattern/dB');
subplot(3, 1,2);
plot(theta,B(5,:)); axis([-90 90 -60 0]); title('Frequency f=5000, weighted [1,2,4,2,1]' );xlabel('angle/°');ylabel('beam pattern/dB');
subplot(3,1,3);
plot(theta,B(8,:));axis([-90 90 -60 0]);title('Frequency f=6000, weighted [1,2,4,2,1]');xlabel('angle/°');ylabel('beam pattern/dB');

figure(6);% weighted[4,2,1,2,4], different frequencies
subplot(3,1,1);
plot(theta,B(3,:)); axis([-90 90 -60 0]);title('Frequency f=4000, weighted [4,2,1,2,4]');xlabel('angle/°');ylabel('beam pattern/dB');
subplot(3, 1,2);
plot(theta,B(6,:)); axis([-90 90 -60 0]); title('Frequency f=5000, weighted [4,2,1,2,4]' );xlabel('angle/°');ylabel('beam pattern/dB');
subplot(3,1,3);
plot(theta,B(9,:));axis([-90 90 -60 0]);title('Frequency f=6000, weighted [4,2,1,2,4]');xlabel('angle/°');ylabel('beam pattern/dB');

% Calculate the main lobe width D and side lobe level P
for k=1:9
    [i,j]=find(abs(B(k,:)+3)<0.5); The% error limit is set at 0.5dB.
    D(k)=(j(length(j))-j(1))*1;% between each point is one degree
end% According to the result of calculating D, it can be found that the three weighted resolutions are the highest under the same frequency Is the third, followed by the first. Under the same weighting, the higher the frequency, the higher the resolution.
disp('The parameters of the 9 beam patterns are in order, respectively:');
disp('f=4000, w=[1,1,1,1,1 ];f=4000,w=[1,2,4,2,1];f=4000,w=[4,2,1,2,4]');
disp('f=5000,w=[ 1,1,1,1,1];f=5000,w=[1,2,4,2,1];f=5000,w=[4,2,1,2,4]');
disp ('f=6000, w=[1,1,1,1,1]; f=6000, w=[1,2,4,2,1]; f=6000, w=[4,2,1 ,2,4]');
disp('Beam width is:');
ss=sprintf('%d',D);
disp(ss);
NN=length(theta);% the number of discrete points in each beam pattern
for k=1:9
    for i=(NN-1)/2+1: NN-1% start from the main beam and find the first secondary position
        if B(k,i)>=B(k ,i+1)&&B(k,i)>=B(k,i-1)
            CC(k)=B(k,i);% record the first sub-large decibel number
        end
    end
end
CC(2)=B(2,1); CC(5)=B(5,1); % Since in the range of [-90,90] degrees, the second and fifth cases are not found to be the second largest, so use it to approximate the decibel at -90°.
disp('The side trip level is:');
s=sprintf('%f',CC);
disp(s);

3. Simulation conclusion:

D00003

Guess you like

Origin blog.csdn.net/ccsss22/article/details/114645390
Recommended