使用贝塞尔函数法对各个频率点的权值进行计算调整,实现恒定波束的形成,算法的效果不是很好,应该是算法的应用场景上有限制。本质上这就是一种时域内通过滤波器组实现恒定波束的方法。
clc
clear
close all
M = 5;
d = 0.043;
c = 343;
thetas = 0*pi/180;
f = 400:200:4000;
Lf = length(f);
vs = exp(-1j*2*pi*f'*(0:(M-1))*d*sin(thetas)/c).';
theta_scan = (-90:1:90);
Lt = length(theta_scan);
Bp = zeros(Lf,Lt);
for i = 1:Lf
fi = f(i);
v_scan = exp(-1j*2*pi*fi*(0:(M-1))'*d*sin(theta_scan*pi/180)/c);
Bp(i,:) = 20*log10(abs(v_scan'*vs(:,i)));
Bp(i,:) = Bp(i,:) - max(Bp(i,:));
end
figure
plot(theta_scan,Bp)
xlabel('angle/deg')
ylabel('Bp(dB)')
grid on
xlim([-90,90])
title('cbf')
orders = 50;
Tf_ref = zeros(Lf,M,2*orders + 1);
for i = 1:Lf
fi = f(i);
for j = 1:M
besselj_params = 2*pi*fi*d*(j - 1)/c;
Tf_ref(i,j,:) = besselj(-orders:1:orders,besselj_params);
end
end
for iloop1 = 1:30
Tref = squeeze(Tf_ref(1,:,:));
Bp_cb = zeros(Lf,Lt);
fcenter = 400 + 100*iloop1;
for i = 1:Lf
fi = f(i);
for j = 1:Lt
vs_ref = exp(-1j*2*pi*fcenter*(0:(M-1))'*d*sin(theta_scan(j)*pi/180)/c);
Tf = squeeze(Tf_ref(i,:,:));
T = Tref * pinv(Tf'*Tf)*Tf';
weight = T' *vs_ref;
Bp_cb(i,j) = 20*log10(abs(weight' * vs(:,i)));
end
Bp_cb(i,:) = Bp_cb(i,:) - max(Bp_cb(i,:));
end
figure
plot(theta_scan,Bp_cb)
xlabel('angle/deg')
ylabel('Bp(dB)')
grid on
xlim([-90 90])
title('constane beamwith bf')
end