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

17 views (last 30 days)
I want to plot the channel capacity for MIMO , SISO , SIMO and MISO and And I work on a comparison between them .

Answers (2)

Tercio Rodovalho
Tercio Rodovalho on 31 Jul 2017
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 Comments
Ramalakshmi R
Ramalakshmi R on 3 Oct 2021
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 on 7 Jul 2022
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

Sign in to comment.


Ali Ahmed
Ali Ahmed on 5 Feb 2022
plot(SNRdB,C SISO,'r - .',SNRdB,C SIMO,'b - o',SNRdB,C MISO,'m',SNRdB,C MIMO,'k - *')
this error
  1 Comment
V. Sai Shruthik
V. Sai Shruthik on 7 Jul 2022
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

Sign in to comment.

Categories

Find more on Exponents and Logarithms in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!