-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathIRS_MISO_fig5_2.m
118 lines (80 loc) · 2.76 KB
/
IRS_MISO_fig5_2.m
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
%centralized algorithm함수 만들어서 fig5
%d=15,43,50일때 N(the number of refelcting element)가 증가하면 어떻게 SNR이 바뀌는지
clear all
clc
figure(1)
d=15;
i=0;
for N=30:10:100
i=i+1;
%SNR_up(i)=SNR_Upperbound(N,d);
SNR_cen(i)=SNR_opt_IRS(N,d);%centralized 22
SNR_dis(i)=SNR_IRS_dis(N,d);%distributed33
SNR_AuMRT(i)=SNR_A_u_MRT(N,d);%AP-user MRT444
SNR_AIMRT(i)=SNR_A_I_MRT(N,d);%5555
SNR_noIRS(i)=SNR_opt_noIRS(N,d);%%%6
end
hold on
%plot([30:10:100],SNR_up,'-o')%1
plot([30:10:100],SNR_cen,'g')%2
plot([30:10:100], SNR_dis,'--b')%3
plot([30:10:100],SNR_AuMRT,'-.^r')%4
plot([30:10:100],SNR_AIMRT,'-.vc')%5
plot([30:10:100],SNR_noIRS,'s:k')%6
grid on
xlabel('Number of reflecting elements,N');
ylabel('Receive SNR (dB)');
title('Fig. 5 in the Paper d=15m');
legend('joint design centralized','joint design distributed','AP-user MRT','AP-IRS MRT','Wirhout IRS');
%legend('d=15 with IRS','d=15 without IRS','d=50 with IRS','d=50 without IRS');
hold off
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
figure(2)
d=50;
i=0;
for N=30:10:100
i=i+1;
%SNR_up(i)=SNR_Upperbound(N,d);
SNR_cen(i)=SNR_opt_IRS(N,d);%centralized 22
SNR_dis(i)=SNR_IRS_dis(N,d);%distributed33
SNR_AuMRT(i)=SNR_A_u_MRT(N,d);%AP-user MRT444
SNR_AIMRT(i)=SNR_A_I_MRT(N,d);%5555
SNR_noIRS(i)=SNR_opt_noIRS(N,d);%%%6
end
hold on
%plot([30:10:100],SNR_up,'-o')%1
plot([30:10:100],SNR_cen,'g')%2
plot([30:10:100], SNR_dis,'--b')%3
plot([30:10:100],SNR_AuMRT,'-.^r')%4
plot([30:10:100],SNR_AIMRT,'-.vc')%5
plot([30:10:100],SNR_noIRS,'s:k')%6
grid on
xlabel('Number of reflecting elements,N');
ylabel('Receive SNR (dB)');
title('Fig. 5 in the Paper d=50');
legend('joint design centralized','joint design distributed','AP-user MRT','AP-IRS MRT','Wirhout IRS');
%legend('d=15 with IRS','d=15 without IRS','d=50 with IRS','d=50 without IRS');
hold off
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
figure(3)
d=43;
i=0;
for N=30:10:100
i=i+1;
SNR_cen(i)=SNR_opt_IRS(N,d);%centralized 22
SNR_dis(i)=SNR_IRS_dis(N,d);%distributed33
SNR_AuMRT(i)=SNR_A_u_MRT(N,d);%AP-user MRT444
SNR_AIMRT(i)=SNR_A_I_MRT(N,d);%5555
SNR_noIRS(i)=SNR_opt_noIRS(N,d);%%%6
end
hold on
plot([30:10:100],SNR_cen,'g')%2
plot([30:10:100], SNR_dis,'--b')%3
plot([30:10:100],SNR_AuMRT,'-.^r')%4
plot([30:10:100],SNR_AIMRT,'-.vc')%5
plot([30:10:100],SNR_noIRS,'s:k')%6
grid on
xlabel('Number of reflecting elements,N');
ylabel('Receive SNR (dB)');
title('Fig. 5 in the Paper d=43');
legend('joint design centralized','joint design distributed','AP-user MRT','AP-IRS MRT','Wirhout IRS');