Add octave reference values computation

This commit is contained in:
Marco Miozzo
2011-07-18 13:45:20 +02:00
parent 27dd732919
commit 5fa075585a
12 changed files with 368 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
function g = loss_COST231_large_cities_urban(d, hb, hm, f)
%%
%% function g = gain_freespace(d, c)
%%
%% returns the loss at d meters for f frequency and mobile height m and
%% base station height of hb
assert(isscalar(f));
assert(f > 0);
Fhm = 3.2*(log10(11.75*hm))^2;
C = 3;
g = zeros(size(d));
g(find(d > 0)) = 46.3 + (33.9*log10(f)) - (13.82*log10(hb)) + (44.9-(6.55*log10(hb))).*log10(d) - Fhm + C;
g(find(d <= 0)) = 1;

View File

@@ -0,0 +1,20 @@
function g = loss_COST231_small_cities_urban(d, hb, hm, f)
%%
%% function g = gain_freespace(d, c)
%%
%% returns the loss at d meters for f frequency and mobile height m and
%% base station height of hb
assert(isscalar(f));
assert(f > 0);
Fhm = (1.1*log10(f)) -(0.7*hm) -(1.56*log(f)) -0.8;
C = 0;
g = zeros(size(d));
g(find(d > 0)) = 46.3 + (33.9*log10(f)) - (13.82*log10(hb)) + (44.9-(6.55*log10(hb))).*log10(d) - Fhm + C;
g(find(d <= 0)) = 1;

View File

@@ -0,0 +1,32 @@
function g = loss_ITU1238 (d, f, n_floors, build_t)
%%
%% function g = loss_ITU1411_NLOS_street_canyons(d, c)
%%
%% returns the loss at d meters for f frequency and mobile height m and
%% base station height of hb
%% build_t = 0:residential; 1:office; 2:commercial
assert(isscalar(f));
assert(f > 0);
lambda = 300000000.0 / f;
if (build_t ==1)
N = 28;
Lf = 4*n_floors;
elseif (build_t==2)
N = 20
Lf = 15+4*(n_floors-1);
else
N = 22;
Lf = 6 + 3*(n_floors-1);
endif
g(find(d > 0)) = 20*log10(f) + (N*log10(d)) + Lf - 28;
g(find(d <= 0)) = 1;

View File

@@ -0,0 +1,28 @@
function g = loss_ITU1411_LOS (d, hb, hm, hr, f)
%%
%% function g = loss_ITU1411_LOS(d, c)
%%
%% returns the loss at d meters for f frequency and mobile height m and
%% base station height of hb
assert(isscalar(f));
assert(f > 0);
lambda = 300000000.0 / f;
Lbp = abs(20*log10(lambda^2/(8*pi*hb*hm)));
Rbp = (4*hb*hm) / lambda;
if (d<=Rbp)
Ll = Lbp + 20.*log10(d./Rbp);
Lu = Lbp + 20 + 25.*log10(d./Rbp);
else
Ll = Lbp + 40.*log10(d./Rbp);
Lu = Lbp + 20 + 40.*log10(d./Rbp);
endif
g = zeros(size(d));
g(find(d > 0)) = (Ll.+Lu)./2;
g(find(d <= 0)) = 1;

View File

@@ -0,0 +1,74 @@
function g = loss_ITU1411_NLOS_over_rooftop (d, hb, hm, hr, f, l, b, st_w, phi, big)
%%
%% function g = loss_ITU1411_LOS(d, c)
%%
%% returns the loss at d meters for f frequency and mobile height m and
%% base station height of hb
assert(isscalar(f));
assert(f > 0);
lambda = 300000000.0 / f;
Dhb = hb - hr;
ds = (lambda.*(d).^2)/Dhb^2;
if (l>ds)
if (big==1)
kf = 1.5*((f/925)-1);
else
kf = 0.7*((f/925)-1);
endif
if (hb>hr)
kd = 18;
ka = 54;
Lbsh = -18*log10(1+Dhb);
else
kd = 18 - 15*(Dhb/hr);
Lbsh = 0;
if (d>=500)
ka = 54-0.8*Dhb;
else
ka = 54-1.6*Dhb;
endif
endif
Lmsd = Lbsh + ka + kd.*log10(d./1000) + kf*log10(f) - 9*log10(b);
else
theta = atan (Dhb /b);
rho = sqrt(Dhb^2 + b^2);
if (hb-hr<1)
Qm = b./d;
elseif (hb>hr)
Qm = 2.35*((dhb./d)*sqrt(b/lamda))^0.9;
else
Qm = (b/2*pi.*d)*sqrt(lambda/rho)*((1/theta)-(1/(2*pi+theta)));
endif
Lmsd = -10*log(Qm^2);
endif
Dhm = hr-hm;
if (phi<35)
Lori = -10+(0.354*phi);
elseif (phi<55)
Lori = 2.5+0.075*(phi-35);
else
Lori = 4- 0.114*(phi-55);
endif
Lrts = -8.2 -10*log10(st_w) + 10*log10(f) + 20*log10(Dhm) + Lori;
Lbf = 32.4 +20*log10(d/1000) + 20*log10(f);
g = zeros(size(d));
if (Lrts+Lmsd>0)
L = Lbf + Lrts + Lmsd;
else
L0 Lbf
endif
g(find(d > 0)) = L;
g(find(d <= 0)) = 1;

View File

@@ -0,0 +1,37 @@
function g = loss_ITU1411_NLOS_street_canyons (d, f, w1, w2, x1, x2, alpha)
%%
%% function g = loss_ITU1411_NLOS_street_canyons(d, c)
%%
%% returns the loss at d meters for f frequency and mobile height m and
%% base station height of hb
assert(isscalar(f));
assert(f > 0);
lambda = 300000000.0 / f;
if (alpha <= 0.33)
f_alpha = -41+110*alpha;
elseif (alpha <=0.42)
f_alpha = -13.94+28*alpha;
elseif (alpha <=0.71)
f_alpha = -5.33+7.51*alpha;
else
f_alpha = 0;
endif
Lr = -20*log10(x1+x2) + (x1*x2*(f_alpha/(w1*w2))) - 20*log10((4*pi)/lambda);
Da = -1*(40/(2*pi))*(atan(x2/w2)+atan(x1/w1)-(pi/2));
Ld = -10*log10(x2*x1*(x1+x2))+ 2*Da + 0.1*(90-(alpha*(180/pi))) -20*log10((4*pi)/lambda);
g(find(d > 0)) = -10*log10(10^(Lr/10)+10^(Ld/10));
g(find(d <= 0)) = 1;

View File

@@ -0,0 +1,17 @@
function g = loss_OH_2_6GHz (d)
%%
%% function g = gain_freespace(d, c)
%%
%% returns the loss at d meters for f frequency and mobile height m and
%% base station height of hb
%assert(isscalar(f));
%assert(f > 0);
g = zeros(size(d));
g(find(d > 0)) = 36 + 26.*log10(d);
g(find(d <= 0)) = 1;

View File

@@ -0,0 +1,24 @@
function g = loss_OH_large_cities_urban(d, hb, hm, f)
%%
%% function g = gain_freespace(d, c)
%%
%% returns the loss at d meters for f frequency and mobile height m and
%% base station height of hb
assert(isscalar(f));
assert(f > 0);
if (f<200)
Ch = 8.29*(log10(1.54*hm))^2-1.1;
else
Ch = 3.2*(log10(11.75*hm))^2-4.97;
endif
g = zeros(size(d));
g(find(d > 0)) = 69.55 + (26.16*log10(f)) - (13.82*log10(hb)) + (44.9-(6.55*log10(hb))).*log10(d) - Ch;
g(find(d <= 0)) = 1;

View File

@@ -0,0 +1,18 @@
function g = loss_OH_openareas (d, hb, hm, f)
%%
%% function g = gain_freespace(d, c)
%%
%% returns the loss at d meters for f frequency and mobile height m and
%% base station height of hb
assert(isscalar(f));
assert(f > 0);
Ch = 0.8 + (1.1*log10(f)-0.7)*hm -(1.56*log10(f));
g = zeros(size(d));
g(find(d > 0)) = 69.55 + (26.16*log10(f)) - (13.82*log10(hb)) + (44.9-(6.55*log10(hb))).*log10(d) - Ch -4.70*(log10(f))^2 + 18.33*log10(f) -40.94;
g(find(d <= 0)) = 1;

View File

@@ -0,0 +1,20 @@
function g = loss_OH_small_cities_urban(d, hb, hm, f)
%%
%% function g = gain_freespace(d, c)
%%
%% returns the loss at d meters for f frequency and mobile height m and
%% base station height of hb
assert(isscalar(f));
assert(f > 0);
Ch = 0.8 + (1.1*log10(f)-0.7)*hm -(1.56*log10(f));
g = zeros(size(d));
g(find(d > 0)) = 69.55 + (26.16*log10(f)) - (13.82*log10(hb)) + (44.9-(6.55*log10(hb))).*log10(d) - Ch;
g(find(d <= 0)) = 1;

View File

@@ -0,0 +1,18 @@
function g = loss_OH_suburban(d, hb, hm, f)
%%
%% function g = gain_freespace(d, c)
%%
%% returns the loss at d meters for f frequency and mobile height m and
%% base station height of hb
assert(isscalar(f));
assert(f > 0);
Ch = 0.8 + (1.1*log10(f)-0.7)*hm -(1.56*log10(f));
g = zeros(size(d));
g(find(d > 0)) = 69.55 + (26.16*log10(f)) - (13.82*log10(hb)) + (44.9-(6.55*log10(hb))).*log10(d) - Ch - 2*(log10(f/28))^2 -5.4;
g(find(d <= 0)) = 1;

View File

@@ -0,0 +1,60 @@
clear all;
close all;
%% LTE pathloss model
%% ITU1411, ITU1238, COST231, OH, etc.
f = 2160e6; % carrier freq Hz, EARFCN = 500 (downlink)
d = 100;
hb = 30;
hm = 1;
hr = 20;
g = loss_COST231_large_cities_urban (d, hb, hm, f);
disp ("The value of COST231 for large cities is:"), disp (g)
g = loss_COST231_small_cities_urban (d, hb, hm, f);
disp ("The value of COST231 for small cities is:"), disp (g)
g = loss_OH_large_cities_urban (d, hb, hm, f);
disp ("The value of OH for large cities is:"), disp (g)
g = loss_OH_small_cities_urban (d, hb, hm, f);
disp ("The value of OH for small cities is:"), disp (g)
g = loss_OH_suburban (d, hb, hm, f);
disp ("The value of OH in suburban is:"), disp (g)
g = loss_OH_openareas (d, hb, hm, f);
disp ("The value of OH in openareas is:"), disp (g)
g = loss_OH_2_6GHz (d);
disp ("The value of OH at 2.6 GHz is:"), disp (g)
g = loss_ITU1411_LOS (d, hb, hm, hr, f);
disp ("The value of ITU1411 in LOS is:"), disp (g)
l = 80;
b = 50;
st_w = 20;
phi = 45;
big = 1; % metropolitan centre
g = loss_ITU1411_NLOS_over_rooftop (d, hb, hm, hr, f, l, b, st_w, phi, big);
disp ("The value of ITU1411 in NLOS over the roof-top is:"), disp (g)
w1 = 30;
w2 = 30;
x1 = 40;
x2 = 40;
alpha = 0.5;
g = loss_ITU1411_NLOS_street_canyons (d, f, w1, w2, x1, x2, alpha);
disp ("The value of ITU1411 in NLOS within street canyons is:"), disp (g)
g = loss_ITU1238 (d, hb, hm, f);
disp ("The value of ITU1238 is:"), disp (g)
%%snr = txPsd + g - kT - nf ; % dB