What is correct to calculate Rate or shannon capacity?

3 ビュー (過去 30 日間)
Praveen Pawar
Praveen Pawar 2018 年 5 月 18 日
編集済み: KALYAN ACHARJYA 2019 年 11 月 20 日
Users are uniformly distributed in the circular area and base station is at the center. If the distance is varied then their corresponding rate should also be different. Here is the code, I am getting the approximate same rate for all users. Where is the mistake in my code? any suggestion is very thankful.
n_users=10;%no. of users
N0dbm=-124; %%%noise power
N0 = 10^((N0dbm-30)/10);
P_MBS=20;%Power in watt
MBS_XY = [0 0];
r_MBS=100;
alpha=0.3; %bandwidth allocation
FREQ = 2.15;
angle_users = 2*pi*rand(n_users,1);
r_users = r_MBS*sqrt(rand(n_users,1));
%x and y coordinate of users
X_users = r_users.*cos(angle_users)+ MBS_XY(1);
Y_users = r_users.*sin(angle_users)+ MBS_XY(2);
XY_users=X_users + 1i.*Y_users;
MBS_XY = MBS_XY(1)+1i*MBS_XY(2);
%%Calculate channel gain
dist_users = abs(XY_users-MBS_XY);
path_loss = 10*alpha*log10(dist_users) + 27.3 + 26*log10(FREQ);
shadowing = 4*ones(size(dist_users));
shadowing = shadowing.*randn(size(shadowing));
sub_power_array = 10.^((shadowing-path_loss)./10); % caculate shadowing
size_h = size(sub_power_array); % caculate h
h = sqrt(0.5)*randn(size_h)+sqrt(0.5)*randn(size_h)*1j;
% final power array
channel_gain = (abs(h)).^2.*sub_power_array;
G_MBS = channel_gain;
%%%%
%%Rate
R_MBS = log2(1+(P_MBS.*G_MBS)./N0); %%Rate or shannon capacity

回答 (1 件)

KALYAN ACHARJYA
KALYAN ACHARJYA 2018 年 5 月 18 日
編集済み: KALYAN ACHARJYA 2018 年 5 月 18 日
The output is not same, where you got the same results if you vary the n_user
  6 件のコメント
Praveen Pawar
Praveen Pawar 2018 年 5 月 18 日
Sir, there is no issue with the uniformly distributed random numbers. If above code is ok, then I need to find the basic conceptual answer. However, something is missing in my code. First, there is no significant variation on the basis of distance between base station (BS) and users. Second, while changing BS power from 20 to 2 watt, still, there is small change in rate.
KALYAN ACHARJYA
KALYAN ACHARJYA 2018 年 5 月 18 日
編集済み: KALYAN ACHARJYA 2019 年 11 月 20 日
Why not plot Shannon's capacity limit graph, you will get the clue whether the results are OK or not?

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

カテゴリ

Help Center および File ExchangeMarine and Underwater Vehicles についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by