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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
close all
clear all
%file_indices = [32 50 51];
%file_indices = [27 28 32 33 50 51 52];
files = {'/extras/kaltenbe/EMOS/data/20071126_MU_Outdoor/results_v2_idx_32.mat', ...
'/extras/kaltenbe/EMOS/data/20080205_MU_Indoor_EN_EC/results_v2_idx_100.mat',...
'/extras/kaltenbe/EMOS/data/20080213_MU_Outdoor/results_v2_idx_52.mat'};
files_DPC = {'/extras/kaltenbe/EMOS/data/20071126_MU_Outdoor/results_DPC_idx_32.mat', ...
'/extras/kaltenbe/EMOS/data/20080205_MU_Indoor_EN_EC/results_DPC_4x1_idx_100.mat',...
'/extras/kaltenbe/EMOS/data/20080213_MU_Outdoor/results_DPC_4x1_idx_52.mat'};
NIdx = length(files);
SNR = 10;
plot_style_ZF = {'b-','b--','b:'};
plot_style_MMSE = {'r-','r--','r:'};
for idx = 1:NIdx
disp(sprintf('[eval_data_MU] Processing file %d of %d',idx, NIdx));
% filename_mat = sprintf('results_idx_%d.mat',idx);
filepath = 'figs';
load(files{idx});
load(files_DPC{idx});
% post processing
%[Cap_4U_SUTS_f,Cap_4U_SUTS_x] = ecdf(CAP_4U_SUTS(:));
[Cap_4U_ZF_f,Cap_4U_ZF_x] = ecdf(CAP_4U_ZF(:));
[Cap_4U_MMSE_f,Cap_4U_MMSE_x] = ecdf(CAP_4U_MMSE(:));
%[Cap_2U_ZF_f,Cap_2U_ZF_x] = ecdf(CAP_2U_ZF(:));
%[Cap_2U_MMSE_f,Cap_2U_MMSE_x] = ecdf(CAP_2U_MMSE(:));
[Cap_4U_AS_ZF_f,Cap_4U_AS_ZF_x] = ecdf(CAP_4U_AS_ZF(:));
[Cap_4U_AS_MMSE_f,Cap_4U_AS_MMSE_x] = ecdf(CAP_4U_AS_MMSE(:));
%[Cap_2U_AS_ZF_f,Cap_2U_AS_ZF_x] = ecdf(CAP_2U_AS_ZF(:));
%[Cap_2U_AS_MMSE_f,Cap_2U_AS_MMSE_x] = ecdf(CAP_2U_AS_MMSE(:));
[Cap_4U_4x1_DPC_f,Cap_4U_4x1_DPC_x] = ecdf(CAP_4U_4x1_DPC(:));
[Cap_SU_TDMA_CL_ML_f,Cap_SU_TDMA_CL_ML_x] = ecdf(max(reshape(CAP_SU_TDMA_CL_ML,4,[]),[],1));
% use the following color coding
% ZF = blue, MMSE = red, SUTS = black, BD = cyan, MMSE AS = magenta,
% 4U = '-', 2U = '--'
% measured = 2pt, iid = 1pt
%%
h_fig = figure(10);
plot(Cap_4U_ZF_x,Cap_4U_ZF_f,plot_style_ZF{idx},'Linewidth',2)
hold on
plot(Cap_4U_MMSE_x,Cap_4U_MMSE_f,plot_style_MMSE{idx},'Linewidth',2)
%%
h_fig = figure(11);
plot(Cap_4U_AS_ZF_x,Cap_4U_AS_ZF_f,plot_style_ZF{idx},'Linewidth',2)
hold on
plot(Cap_4U_AS_MMSE_x,Cap_4U_AS_MMSE_f,plot_style_MMSE{idx},'Linewidth',2)
%%
h_fig = figure(12);
plot(Cap_4U_4x1_DPC_x,Cap_4U_4x1_DPC_f,plot_style_ZF{idx},'Linewidth',2)
hold on
plot(Cap_SU_TDMA_CL_ML_x,Cap_SU_TDMA_CL_ML_f,plot_style_MMSE{idx},'Linewidth',2)
%% calculate the Rx correlation matrix between users taking the first Rx antenna
NUser=4;
NTx=4;
n = 0:3;
m = 0;
for k1=0:3
for k2=0:3
tmp = R(k1+n*NUser+m*NUser*NTx+1,k2+n*NUser+m*NUser*NTx+1);
% RRx(k1+1,k2+1) = mean(tmp(:));
RRx(k1+1,k2+1) = sum(diag(tmp));
end
end
figure(13)
subplot(2,4,idx)
imagesc(abs(RRx),[0,10])
set(gca,'xtick',1:4)
set(gca,'ytick',1:4)
%% calculate the Tx correlation matrix taking the first Rx antenna
k = 0:3;
m = 0;
for n1=0:3
for n2=0:3
tmp = R(k+n1*NUser+m*NUser*NTx+1,k+n2*NUser+m*NUser*NTx+1);
RTx(n1+1,n2+1) = sum(diag(tmp));
end
end
figure(13)
subplot(2,4,4+idx)
imagesc(abs(RTx),[0,10])
set(gca,'xtick',1:4)
set(gca,'ytick',1:4)
%%
end
% h_fig = figure(10);
% load('Cap_iid_N_Rx=1.mat')
% plot(Cap_4U_ZF_iid_x,Cap_4U_ZF_iid_f,'b--','Linewidth',1)
% hold on
% plot(Cap_4U_MMSE_iid_x,Cap_4U_MMSE_iid_f,'r','Linewidth',1)
%%
figure(13)
cmap = colormap('gray');
cmap = cmap(end:-1:1,:);
colormap(cmap);
hcolorbar = subplot(2,4,[4 8]);
colorbar(hcolorbar);
set(hcolorbar,'YTick',linspace(1,64,6))
set(hcolorbar,'YTicklabel',0:1:10)
%%
subplot(2,4,1)
title('outdoor far')
ylabel('Rx corr')
subplot(2,4,2)
title('indoor')
subplot(2,4,3)
title('outdoor near')
subplot(2,4,5)
ylabel('Tx corr')
drawnow
%%
h_fig = figure(10);
legend('MU-MIMO ZF Measurement 1','MU-MIMO MMSE Measurement 1',...
'MU-MIMO ZF Measurement 2','MU-MIMO MMSE Measurement 2',...
'MU-MIMO ZF Measurement 3','MU-MIMO MMSE Measurement 3'...
,'Location','SouthEast')
title('Multi-user Capacity for M=4, K=4, N=1, and SNR=10dB','Fontsize',14)
xlabel('bits/channel use','Fontsize',12)
xlim([0 18])
ylabel('CDF','Fontsize',12)
grid on
annotation('ellipse','Position',[0.1339 0.5215 0.1625 0.05952]);
annotation('textbox','String',{'MU-MIMO ZF'}, 'LineStyle','none',...
'Position',[0.1295 0.5881 0.1972 0.05]);
annotation('ellipse','Position',[0.3589 0.6253 0.1196 0.05952]);
annotation('textbox','String',{'MU-MIMO MMSE'},'LineStyle','none',...
'Position',[0.4746 0.6062 0.2433 0.07143]);
filename_cap = 'capacity_comp_multiple_measurements_ZF_MMSE.eps';
saveas(h_fig, filename_cap, 'epsc2');
system(['epstopdf ' filename_cap]);
h_fig = figure(11);
legend('M32 ZF 4U','M32 MMSE 4U','M50 ZF 4U','M50 MMSE 4U','M51 ZF 4U','M51 MMSE 4U','Location','SouthEast')
title('Multi-user Capacity for NTx=4 with antenna selection and SNR=10dB')
xlabel('bits/sec/Hz')
xlim([0 18])
ylabel('CDF')
grid on
filename_cap = 'capacity_comp_multiple_measurements_AS.eps';
saveas(h_fig, filename_cap, 'epsc2');
system(['epstopdf ' filename_cap]);
h_fig = figure(12);
legend('MU-MIMO DPC Measurement 1','SU-MISO TDMA Measurement 1',...
'MU-MIMO DPC Measurement 2','SU-MISO TDMA Measurement 2',...
'MU-MIMO DPC Measurement 3','SU-MISO TDMA Measurement 3'...
,'Location','SouthEast')
title('Multi-user Capacity for M=4, K=4, N=1, and SNR=10dB','Fontsize',14)
xlabel('bits/channel use','Fontsize',12)
xlim([0 18])
ylabel('CDF','Fontsize',12)
grid on
annotation('ellipse','Position',[0.3171 0.6548 0.1026 0.05952]);
annotation('ellipse','Position',[0.5156 0.5586 0.1026 0.05952]);
annotation('textbox','String',{'SU-MISO TDMA'},'LineStyle','none',...
'Position',[0.1599 0.6976 0.1972 0.05]);
annotation('textbox','String',{'MU-MIMO DPC'},'LineStyle','none',...
'Position',[0.621 0.5157 0.2018 0.07143]);
filename_cap = 'capacity_comp_multiple_measurements_DPC_SU.eps';
saveas(h_fig, filename_cap, 'epsc2');
system(['epstopdf ' filename_cap]);