How can I plot the Channel Capacity for MIMO , SISO , SIMO and MISO ??

17 ビュー (過去 30 日間)
khalil Z. Abu-Haltam
khalil Z. Abu-Haltam 2015 年 9 月 30 日
コメント済み: V. Sai Shruthik 2022 年 7 月 7 日
I want to plot the channel capacity for MIMO , SISO , SIMO and MISO and And I work on a comparison between them .

回答 (2 件)

Tercio Rodovalho
Tercio Rodovalho 2017 年 7 月 31 日
if true
Ergodic Capacity: MATLAB code - Slight modi¯cation for outage code
% mT, Number of transmitting antennas
% mR, Number of transmitting antennas
% ITER, number of trials
% SNRdB, Range of SNR in dB
% C SISO, variable for capacity of a SISO system
% C SIMO, variable for capacity of a SIMO system
% C MISO, variable for capacity of a MISO system
% C MIMO, variable for capacity of a MIMO system
% h SISO, random channel for SISO (with zero mean unit variance)
% h SIMO, random channel for SIMO
% h MISO, random channel for MISO
% h MIMO, random channel for MIMO
clc;
close all;
clear all;
mT = 2;
mR = 2;
ITER = 1000;
SNRdB = [0:25];
SNR = 10.^(SNRdB/10);
C SISO = zeros(1,length(SNR));
C SIMO = zeros(1,length(SNR));
C MISO = zeros(1,length(SNR));
C MIMO = zeros(1,length(SNR));
for ite = 1:ITER
h SISO = (randn +j*randn)/sqrt(2);
h SIMO = (randn(mR,1)+j*randn(mR,1))/sqrt(2);
h MISO = (randn(1,mT)+j*randn(1,mT))/sqrt(2);
h MIMO = (randn(mR,mT)+j*randn(mR,mT))/sqrt(2);
for K = 1:length(SNR)
C SISO(K) = C SISO(K) + log2(1+ SNR(K)*norm(h SISO)^2);
C SIMO(K) = C SIMO(K) + log2(1+ SNR(K)*norm(h SIMO)^2);
C MISO(K) = C MISO(K) + log2(1+ SNR(K)*norm(h MISO)^2/mT);
C MIMO(K) = C MIMO(K) + log2(abs(det(eye(mR)+SNR(K)*h MIMO*h MIMO'/mT)));
end
end
C SISO = C SISO/ITER;
C SIMO = C SIMO/ITER;
C MISO = C MISO/ITER;
C MIMO = C MIMO/ITER;
plot(SNRdB,C SISO,'r - .',SNRdB,C SIMO,'b - o',SNRdB,C MISO,'m',SNRdB,C MIMO,'k - *')
legend('SISO','SIMO','MISO','MIMO',2)
xlabel('SNR in dB')
ylabel('Capacity (b/s/Hz)')
title('Capacity Vs. SNR')
grid;
end
  3 件のコメント
Ramalakshmi R
Ramalakshmi R 2021 年 10 月 3 日
plot(SNRdB,C SISO,'r - .',SNRdB,C SIMO,'b - o',SNRdB,C MISO,'m',SNRdB,C MIMO,'k - *')
Invalid expression. Check for missing multiplication operator, missing or unbalanced delimiters, or other syntax error.
To construct matrices, use brackets instead of parentheses.
V. Sai Shruthik
V. Sai Shruthik 2022 年 7 月 7 日
if true
%Ergodic_Capacity: MATLAB code - Slight modi¯cation for outage code
% mT, Number of transmitting antennas
% mR, Number of transmitting antennas
% ITER, number of trials
% SNRdB, Range of SNR in dB
% C SISO, variable for capacity of a SISO system
% C SIMO, variable for capacity of a SIMO system
% C MISO, variable for capacity of a MISO system
% C MIMO, variable for capacity of a MIMO system
% h SISO, random channel for SISO (with zero mean unit variance)
% h SIMO, random channel for SIMO
% h MISO, random channel for MISO
% h MIMO, random channel for MIMO
clc;
close all;
clear all;
mT = 2;
mR = 2;
ITER = 1000;
SNRdB = [0:25];
SNR = 10.^(SNRdB/10);
C_SISO = zeros(1,length(SNR));
C_SIMO = zeros(1,length(SNR));
C_MISO = zeros(1,length(SNR));
C_MIMO = zeros(1,length(SNR));
for ite = 1:ITER
h_SISO = (randn +1i*randn)/sqrt(2);
h_SIMO = (randn(mR,1)+1i*randn(mR,1))/sqrt(2);
h_MISO = (randn(1,mT)+1i*randn(1,mT))/sqrt(2);
h_MIMO = (randn(mR,mT)+1i*randn(mR,mT))/sqrt(2);
for K = 1:length(SNR)
C_SISO(K) = C_SISO(K) + log2(1+ SNR(K)*norm(h_SISO)^2);
C_SIMO(K) = C_SIMO(K) + log2(1+ SNR(K)*norm(h_SIMO)^2);
C_MISO(K) = C_MISO(K) + log2(1+ SNR(K)*norm(h_MISO)^2/mT);
C_MIMO(K) = C_MIMO(K) + log2(abs(det(eye(mR)+SNR(K)*h_MIMO*h_MIMO'/mT)));
end
end
C_SISO = C_SISO/ITER;
C_SIMO = C_SIMO/ITER;
C_MISO = C_MISO/ITER;
C_MIMO = C_MIMO/ITER;
plot(SNRdB,C_SISO,'r',SNRdB,C_SIMO,'b',SNRdB,C_MISO,'m',SNRdB,C_MIMO,'k')
legend('SISO','SIMO','MISO','MIMO')
xlabel('SNR in dB')
ylabel('Capacity (b/s/Hz)')
title('Capacity Vs. SNR')
grid;
end
TRY THIS

サインインしてコメントする。


Ali Ahmed
Ali Ahmed 2022 年 2 月 5 日
plot(SNRdB,C SISO,'r - .',SNRdB,C SIMO,'b - o',SNRdB,C MISO,'m',SNRdB,C MIMO,'k - *')
this error
  1 件のコメント
V. Sai Shruthik
V. Sai Shruthik 2022 年 7 月 7 日
He forgot underscore ig
if true
%Ergodic_Capacity: MATLAB code - Slight modi¯cation for outage code
% mT, Number of transmitting antennas
% mR, Number of transmitting antennas
% ITER, number of trials
% SNRdB, Range of SNR in dB
% C SISO, variable for capacity of a SISO system
% C SIMO, variable for capacity of a SIMO system
% C MISO, variable for capacity of a MISO system
% C MIMO, variable for capacity of a MIMO system
% h SISO, random channel for SISO (with zero mean unit variance)
% h SIMO, random channel for SIMO
% h MISO, random channel for MISO
% h MIMO, random channel for MIMO
clc;
close all;
clear all;
mT = 2;
mR = 2;
ITER = 1000;
SNRdB = [0:25];
SNR = 10.^(SNRdB/10);
C_SISO = zeros(1,length(SNR));
C_SIMO = zeros(1,length(SNR));
C_MISO = zeros(1,length(SNR));
C_MIMO = zeros(1,length(SNR));
for ite = 1:ITER
h_SISO = (randn +1i*randn)/sqrt(2);
h_SIMO = (randn(mR,1)+1i*randn(mR,1))/sqrt(2);
h_MISO = (randn(1,mT)+1i*randn(1,mT))/sqrt(2);
h_MIMO = (randn(mR,mT)+1i*randn(mR,mT))/sqrt(2);
for K = 1:length(SNR)
C_SISO(K) = C_SISO(K) + log2(1+ SNR(K)*norm(h_SISO)^2);
C_SIMO(K) = C_SIMO(K) + log2(1+ SNR(K)*norm(h_SIMO)^2);
C_MISO(K) = C_MISO(K) + log2(1+ SNR(K)*norm(h_MISO)^2/mT);
C_MIMO(K) = C_MIMO(K) + log2(abs(det(eye(mR)+SNR(K)*h_MIMO*h_MIMO'/mT)));
end
end
C_SISO = C_SISO/ITER;
C_SIMO = C_SIMO/ITER;
C_MISO = C_MISO/ITER;
C_MIMO = C_MIMO/ITER;
plot(SNRdB,C_SISO,'r',SNRdB,C_SIMO,'b',SNRdB,C_MISO,'m',SNRdB,C_MIMO,'k')
legend('SISO','SIMO','MISO','MIMO')
xlabel('SNR in dB')
ylabel('Capacity (b/s/Hz)')
title('Capacity Vs. SNR')
grid;
end
TRY THIS CODE IT WORKED FOR ME

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeExponents and Logarithms についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by