How can I plot the Channel Capacity for MIMO , SISO , SIMO and MISO ??
조회 수: 19 (최근 30일)
이전 댓글 표시
I want to plot the channel capacity for MIMO , SISO , SIMO and MISO and And I work on a comparison between them .
댓글 수: 0
답변 (2개)
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
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
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
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
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 Exchange에서 Exponents and Logarithms에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!