?? advantage_csit.m
字號:
% comparision of mimo with and without having CSIT
clear all; close all;
clc;
Nt=2; Nr=2;
N0 = 1e-4; % noise spectral density
B = 1;% normalized channel bandwidth
N_it = 1e3; % No.of iterations
SNR_V_db = -10:2:20;
SNR_V = 10.^(SNR_V_db/10);
color = ['b';'r';];
notation = ['-*';'-o'];
x=1;
for i = 1 : length(SNR_V)
Pt = N0 * SNR_V(i); % total average power
for j = 1 : N_it
H = random('rayleigh',1,Nr,Nt);
[S V D] = svd(H);
lambda(:,j) = diag(V); % lambda are singular values
[Cap_CSIT(i,j),Pow_lvl] = waterFilling(Pt,lambda(:,j),B,N0); %capacity with water filling lagirithm
Cap(i,j)=log2(det(eye(Nr)+(SNR_V(i)/Nt)*H*H'));% is equal to sum(log(1+(SNR/Nt)*eigen));
end
end
clear lambda;
hold on;
plot(SNR_V_db,mean(Cap_CSIT'),notation(x,:),'color',color(x,:)); x=x+1;
plot(SNR_V_db,mean(Cap'),notation(x,:),'color',color(x,:)); grid on;
xlabel('SNR in dB'); ylabel('Ergodic Capacity in BPS/Hz');
title(' ERGODIC CAPACITY of 2x2 MIMO with/without CSIT');
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -