Effacer les filtres
Effacer les filtres

lot of throughput doesn't shown

1 vue (au cours des 30 derniers jours)
Shahd Altalhi
Shahd Altalhi le 15 Nov 2019
Commenté : Stephen23 le 18 Nov 2019
clc;
close all;
%common parameters
f=6; %Frequency band [GHz]
pt=33; %transmitter power[dBm]
pr=27; %Receiver power[dBm]
n=5; %Noise figure [dBm]
Amu=10; %The median attenuation relative to free space
gt=6; %Transmitter Antenna Gain [dBi]
gr_s=2; %Receiver Antenna Gain [dBi] (stations)
B=20; %Bandwidth [MHz]
L=0.3; %Connector loss [dB]
I=1; %Interference margin loss [dB]
rs_t=-89; %Transmitter Rx Sensitivity [dBm]
rs_s=-91 ; %Receiver Rx Sensitivity [dBm]
d=0:1:10; %The range of the distance between TX and RX
%Data from user
area_type =input ('Enter type of city (1 - urban, 2 - suburban, 3 - rural):','s');
ht=input('Enter the receiver antenna height 30m<hre<1000m : ');
hr=input('Enter the receiver antenna height 1m<hre<10m : '); % Mobile Antenna Height
% Okumura Propagation Model
Lf=32.44+20*log(f)+20*log(d); %Free Space Propagation Loss
Ght=20*log(ht/200); %Transmitter Antenna Height Gain Factor
if(hr<3) %Reciver Antenna Height Gain Factor
Ghr=20*log(hr/3);
else
Ghr=10*log(hr/3);
end
Garea=13;
L50=Lf+Amu-Ght-Ghr-Garea;
Rss=pt+gt+gr_s-L50-L;
SNIR=Rss/(n+I);
Throughput=B.*log2(1+(10.^(SNIR(end)/10)));
for r=1:10
L50=Lf+Amu-Ght-Ghr-Garea;
Rss=[Rss*(pt+gt+gr_s-L50(end)-L)];
SNIR=[SNIR*(Rss(end)/(n+I))];
Throughput=Throughput.*(B.*log2(1+(10.^(SNIR(end)/10))));
end
hold on;
figure (1)
subplot(2,2,1)
plot(d,L50,'LineWidth',1.5)
title('Okumura Model Analysis- Urban');
xlabel(' distance (Km)');
ylabel('Propagation Path loss(dB)');
subplot(2,2,2)
plot(d,Rss,'LineWidth',1.5)
title('Okumura Model Analysis- Urban');
xlabel(' distance (Km)');
ylabel('RSS');
subplot(2,2,3);
plot(d,SNIR,'LineWidth',1.5)
title('Okumura Model Analysis- Urban');
xlabel(' distance (Km)');
ylabel('SNIR');
subplot(2,2,4);
plot(d,Throughput,'LineWidth',1.5)
title('Okumura Model Analysis- Urban');
xlabel(' distance (Km)');
ylabel('Throughput');
hold off;
  1 commentaire
the cyclist
the cyclist le 15 Nov 2019
I answered what appears to be the identical question here.

Connectez-vous pour commenter.

Réponses (1)

Siriniharika Katukam
Siriniharika Katukam le 18 Nov 2019
Hi
The variable “Throughput” is defined in two ways in your code
Throughput=B.*log2(1+(10.^(SNIR(end)/10)));
Throughput=Throughput.*(B.*log2(1+(10.^(SNIR(end)/10))));
Make sure that you defined it properly. Moreover, this variable is a scalar since you used SNIR(end), hence it cannot be plotted unless it is an array of values.
  1 commentaire
Stephen23
Stephen23 le 18 Nov 2019
"hence it cannot be plotted unless it is an array of values."
Actually scalars can be plotted, but because the default LineSpec has no markers the points are not visible... but the points can certainly be plotted without error (i.e. the line objects will exist, even if they do not show in the axes).

Connectez-vous pour commenter.

Catégories

En savoir plus sur Antennas, Microphones, and Sonar Transducers dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by