UPA beforming

未考虑时延

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
clear;
clc;
% clf;
% close all;

% coordinate theta: 0-180; phi = -180--180
dB = 30;
M = 100;
theta_range = linspace(-pi/2,pi/2,M); % elevation angle
phi_range = linspace(-pi/2,pi/2,M);

DUT_array = 'UPA';

param.ph.c = 299792458; % In m/s
param.ph.freq = 10e9;
param.ph.lambda = param.ph.c/param.ph.freq;


%%% target and interfering signal directions
phi=[-40];
phi_des = deg2rad(phi);
theta=[30];
theta_des = deg2rad(theta);

%%% DUT array configuration

P = 100;%100x100
DUT_3D.N = P;
DUT_3D.d = 0.015;
dd = (0:1:(P-1))*DUT_3D.d;
DUT_3D.x = zeros(1,DUT_3D.N);
DUT_3D.y = dd;
DUT_3D.z = dd;

w = zeros(1,P^2);

% beforming权重计算
for i=1:length(theta_des)
for j=1:length(phi_des)
p_y=exp(-1j*2*pi/param.ph.lambda*cos(theta_des(i))*sin(phi_des(j))*DUT_3D.y);
p_z=exp(-1j*2*pi/param.ph.lambda*sin(theta_des(i))*DUT_3D.z);
a=kron(p_y, p_z);%1x10000
w = w + a;
end
end


%% 3D方向图
% 初始化3D方向图
pattern_3D = zeros(length(theta_range), length(phi_range));
% 3D方向图
for i=1:length(theta_range)
for j=1:length(phi_range)
p_y=exp(1j*2*pi/param.ph.lambda*cos(theta_range(i))*sin(phi_range(j))*DUT_3D.y);
p_z=exp(1j*2*pi/param.ph.lambda*sin(theta_range(i))*DUT_3D.z);
AF=kron(p_y, p_z);
pattern_3D(i,j)=abs(w*AF.');
end
end

% 归一化
pattern_3D = pattern_3D / max(pattern_3D(:));

% 转换为dB
pattern_3D_dB = 20*log10(pattern_3D);
%% 截面图
figure(1);
[~, a] = min(abs(theta_range - theta_des(1)));
plot(rad2deg(phi_range),pattern_3D_dB(a,:),'r','LineWidth', 1.1);
grid on;
xlabel('方位角 [deg]','fontsize',14)
ylabel('归一化功率 [dB]','fontsize',14)
title(sprintf('截面波束方向图(仰角 %d° )', theta(1)),'FontSize', 16);

figure(2);
[~, b] = min(abs(phi_range - phi_des(1)));
plot(rad2deg(theta_range),pattern_3D_dB(:,b),'r','LineWidth', 1.1);
grid on;
xlabel('仰角 [deg]','fontsize',14)
ylabel('归一化功率 [dB]','fontsize',14)
title(sprintf('截面波束方向图(方位角 %d° )',phi(1)),'FontSize', 16);
%% 3D绘图
figure(3);
[Phi, Theta] = meshgrid(rad2deg(phi_range), rad2deg(theta_range));
surf(Phi, Theta, pattern_3D_dB, 'EdgeColor', 'none');
xlabel('方位角 [deg]', 'FontSize', 12);
ylabel('仰角 [deg] ', 'FontSize', 12);
zlabel('归一化频率 [dB]', 'FontSize', 12);
title('UPA波束方向图', 'FontSize', 16);
colorbar;
axis tight;