Sunteți pe pagina 1din 4

clc;

clear all;
close all;
Du = 2; % distance of the reciever in meter
Dr = 5
Pb = 0.01; % bit error for voice
Pbl= 0.001; % bit error for live str
Pbe = 0.000001; % bit error for e-mail
sigmau = 9; % variance for urban
sigmar = 6; % variance for rural
rn = 2;
% radius for live streaming
rs=-96;
theta=0:0.01:2*pi;
snr = (qfuncinv(Pb))^2/2; % snr
snrul = (qfuncinv(Pbl))^2/2;% snr corresponding to the bit error rate
for live streaming
snrue= (qfuncinv(Pbe))^2/2;
mu = sigmau*qfuncinv(1-0.85); % margin for urban area
mr = sigmar*qfuncinv(1-0.75); % margin for rural area
ht = 50; % height of the transmitter
hr = 7; % height of the reciever
f = 2350; % carrier frequency

display('The median path loss in urban area for your given data is L50
dB is');
% using the hata model
cfu = 3.2*(log(11.75*hr))*(log(11.75*hr))-4.97;
L50u = 69.55 + 26.16*log(f)-13.82*log(ht)-cfu;
display(L50u)
ptu=L50u+rs+mu+snr; % transmitted power in urban areas
ptul=L50u+rs+mu+snrul; % transmitted power in urban area for live
streaming
ptue=L50u+rs+mu+snrue % transmitted power in urban area for E-mail
rl=(ptu/ptul)*Dr; %radius for live streaming
re= (ptu/ptue)*Dr; % radius for E-mail
hold on
xn=rn*cos(theta);
yn=rn*sin(theta);
plot(xn,yn);
xv=rl*cos(theta);
yv=rl*sin(theta);
plot(xv,yv);
xe = re*cos(theta);
ye = re*sin(theta);
plot(xe,ye);
title('coverage for different services in urban area');
legend('voice','live streaming','E-mail');
hold off
display('transmitted power in urban area: ');
display(ptu);
display('transmitted power for urban area for live streaming');

1
display(ptul);
cfr = (1.1*log(f)-0.7)*hr-(1.566*log(f)-0.8);
L50r = 69.55 + 26.16*log(f) - 13.82*log(f)-40.94;
display('The median path loss in rural area for your given data is L50
in dB is');
display(L50r);
ptr = L50r+rs+mr+snrul; % transmitted power in rural area
ptrl=L50r+rs+mu+snrul; % transmitted power in urban area for live
streaming
ptre=L50r+rs+mu+snrue % transmitted power in rural area for E-mail
rlr=(ptr/ptrl)*Dr;
rer=(ptr/ptre)*Dr;
figure
hold on
xr=Dr*cos(theta);
yr=Dr*sin(theta);
plot(xr,yr);
xrl=rlr*cos(theta);
yrl=rlr*sin(theta);
plot(xrl,yrl);
xre=rer*cos(theta);
yre=rer*sin(theta);
plot(xre,yre);
title('coverage for different services in rural area');
legend('voice','live streaming','E-mail');
hold off
display('transmitted power in rural area: ');
display(ptr);

Dr =

The median path loss in urban area for your given data is L50 dB is

L50u =

161.2870

ptue =

85.9124

transmitted power in urban area:

ptu =

77.3208

transmitted power for urban area for live streaming

ptul =

2
79.3897

The median path loss in rural area for your given data is L50 in dB is

L50r =

124.3952

ptre =

49.0206

transmitted power in rural area:

ptr =

37.2169

3
Published with MATLAB® R2016a

S-ar putea să vă placă și