0% found this document useful (0 votes)
45 views4 pages

Code 2022

The document defines variables and parameters for simulating the sum spectral efficiency of different linear precoding schemes (MR, ZF, RZF, SMMSE, MMSE) in a multi-antenna system. It generates channel realizations, estimates the channel, computes the sum spectral efficiency for each scheme, and averages the results over multiple setups. Plots of the average sum spectral efficiency versus the number of antennas are generated for different subcarrier frequencies.

Uploaded by

mesi tage
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views4 pages

Code 2022

The document defines variables and parameters for simulating the sum spectral efficiency of different linear precoding schemes (MR, ZF, RZF, SMMSE, MMSE) in a multi-antenna system. It generates channel realizations, estimates the channel, computes the sum spectral efficiency for each scheme, and averages the results over multiple setups. Plots of the average sum spectral efficiency versus the number of antennas are generated for different subcarrier frequencies.

Uploaded by

mesi tage
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

close all;

clear;

L =30;

K =50;

Mrange = 10:10:100;

Mmax = max(Mrange);

fRange = [1 2 4];

nbrOfSetups = 1;

nbrOfRealizations = 10;

B = 20e6;

p = 100;

noiseFigure = 7;

noiseVariancedBm = -174 + 10*log10(B) + noiseFigure;

tau_c = 200;

accuracy = 2;

ASDdeg = 10;

sumSE_MR = zeros(length(Mrange),length(fRange),nbrOfSetups);
sumSE_ZF = zeros(length(Mrange),length(fRange),nbrOfSetups);
sumSE_RZF = zeros(length(Mrange),length(fRange),nbrOfSetups);
sumSE_SMMSE = zeros(length(Mrange),length(fRange),nbrOfSetups);
sumSE_MMMSE = zeros(length(Mrange),length(fRange),nbrOfSetups);

for n = 1:nbrOfSetups

disp([num2str(n) ' setups out of ' num2str(nbrOfSetups)]);

[R,channelGaindB] = functionExampleSetup(L,K,Mmax,accuracy,ASDdeg);

channelGainOverNoise = channelGaindB - noiseVariancedBm;

for m = 1:length(Mrange)

disp([num2str(m) ' antennas out of ' num2str(length(Mrange))]);


for s = 1:length(fRange)

f = fRange(s);
[Hhat,C,tau_p,Rscaled] =
functionChannelEstimates(R(1:Mrange(m),1:Mrange(m),:,:,:),channelGainOverNo
ise,nbrOfRealizations,Mrange(m),K,L,p,f);

[SE_MR,SE_RZF,SE_MMMSE,SE_ZF,SE_SMMSE] =
functionComputeSE_UL(Hhat,C,Rscaled,tau_c,tau_p,nbrOfRealizations,Mrange(m)
,K,L,p);

sumSE_MR(m,s,n) = mean(sum(SE_MR,1));
sumSE_ZF(m,s,n) = mean(sum(SE_ZF,1));
sumSE_SMMSE(m,s,n) = mean(sum(SE_SMMSE,1));
sumSE_RZF(m,s,n) = mean(sum(SE_RZF,1));
sumSE_MMMSE(m,s,n) = mean(sum(SE_MMMSE,1));

clear Hhat C Rscaled;

end

end

clear R;

end

for s = 1:length(fRange)

figure(s);
hold on; box on;

plot(Mrange,mean(sumSE_MMMSE(:,s,:),3),'rd-','LineWidth',1);
plot(Mrange,mean(sumSE_SMMSE(:,s,:),3),'b:','LineWidth',1);
plot(Mrange,mean(sumSE_RZF(:,s,:),3),'k-.','LineWidth',1);
plot(Mrange,mean(sumSE_ZF(:,s,:),3),'r--','LineWidth',1);
plot(Mrange,mean(sumSE_MR(:,s,:),3),'bs-','LineWidth',1);

xlabel('Number of antennas (M)');


ylabel('Average sum SE [bit/s/Hz/cell]');
legend('M-MMSE','S-MMSE','RZF','ZF','MR','Location','NorthWest');
ylim([0 60]);

end

close all;
clear;

L = 16;
K = 10;

Mrange = 10:10:100;

Mmax = max(Mrange);

fRange = [1 2 4];

nbrOfSetups =1;
nbrOfRealizations = 50;

B = 20e6;

p = 100;

rho = 100;

noiseFigure = 7;

noiseVariancedBm = -174 + 10*log10(B) + noiseFigure;

tau_c = 200;

accuracy = 2;

ASDdeg = 10;
Function Example Setup=(16,10,100,2,10);
sumSE_MR = zeros(length(Mrange),length(fRange),nbrOfSetups);
sumSE_ZF = zeros(length(Mrange),length(fRange),nbrOfSetups);
sumSE_SMMSE = zeros(length(Mrange),length(fRange),nbrOfSetups);
sumSE_RZF = zeros(length(Mrange),length(fRange),nbrOfSetups);
sumSE_MMMSE = zeros(length(Mrange),length(fRange),nbrOfSetups);

for n = 1:nbrOfSetups

disp([num2str(n) ' setups out of ' num2str(nbrOfSetups)]);

[R,channelGaindB]=functionExampleSetup(L,K,Mmax,accuracy,ASDdeg);

channelGainOverNoise = channelGaindB - noiseVariancedBm;

for m = 1:length(Mrange)

disp([num2str(m) ' antennas out of ' num2str(length(Mrange))]);

for s = 1:length(fRange)

f = fRange(s);
[Hhat,C,tau_p,Rscaled,H] =
functionChannelEstimates(R(1:Mrange(m),1:Mrange(m),:,:,:),channelGainOverNo
ise,nbrOfRealizations,Mrange(m),K,L,p,f);
[SE_hardening_MR,SE_hardening_RZF,SE_hardening_MMMSE,SE_hardening_ZF,SE_har
dening_SMMSE] =
functionComputeSE_DL_hardening(H,Hhat,C,Rscaled,tau_c,tau_p,nbrOfRealizatio
ns,Mrange(m),K,L,p,rho);

[SE_MR,SE_RZF,SE_MMMSE,SE_ZF,SE_SMMSE] =
functionComputeSE_DL_estimation(H,Hhat,C,Rscaled,tau_c,tau_p,nbrOfRealizati
ons,Mrange(m),K,L,p,rho);
SE_MR(SE_hardening_MR>SE_MR) =
SE_hardening_MR(SE_hardening_MR>SE_MR);
SE_RZF(SE_hardening_RZF>SE_RZF) =
SE_hardening_RZF(SE_hardening_RZF>SE_RZF);
SE_MMMSE(SE_hardening_MMMSE>SE_MMMSE) =
SE_hardening_MMMSE(SE_hardening_MMMSE>SE_MMMSE);
SE_ZF(SE_hardening_ZF>SE_ZF) =
SE_hardening_ZF(SE_hardening_ZF>SE_ZF);
SE_SMMSE(SE_hardening_SMMSE>SE_SMMSE) =
SE_hardening_SMMSE(SE_hardening_SMMSE>SE_SMMSE);

sumSE_MR(m,s,n) = mean(sum(SE_MR,1));
sumSE_ZF(m,s,n) = mean(sum(SE_ZF,1));
sumSE_SMMSE(m,s,n) = mean(sum(SE_SMMSE,1));
sumSE_RZF(m,s,n) = mean(sum(SE_RZF,1));
sumSE_MMMSE(m,s,n) = mean(sum(SE_MMMSE,1));

clear H Hhat C Rscaled;

end

end

clear R;

end

for s = 1:length(fRange)

figure(s);
hold on; box on;

plot(Mrange,mean(sumSE_MMMSE(:,s,:),3),'rd-','LineWidth',1);
plot(Mrange,mean(sumSE_SMMSE(:,s,:),3),'b:','LineWidth',1);
plot(Mrange,mean(sumSE_RZF(:,s,:),3),'k-.','LineWidth',1);
plot(Mrange,mean(sumSE_ZF(:,s,:),3),'r--','LineWidth',1);
plot(Mrange,mean(sumSE_MR(:,s,:),3),'bs-','LineWidth',1);

xlabel('Number of antennas (M)');


ylabel('Average sum SE [bit/s/Hz/cell]');
legend('M-MMSE','S-MMSE','RZF','ZF','MR','Location','NorthWest');
ylim([0 60]);

end

You might also like