Okumura Model
Okumura Model
Okumura Model
html#channel-modeling
clc;
clear all;
close all;
Hte=30:1:100; % Base Station Antenna Height
Hre=input('Enter the receiver antenna height 3m<hre<10m : '); % Mobile Antenna
Height
d =input('Enter distance from base station 1Km<d<100Km : '); % Distance 30 Km
f=input('Enter the frequency 150Mhz<f<1920Mhz : ');
c=3*10^8;
lamda=(c)/(f*10^6);
Lf = 10*log((lamda^2)/((4*pi)^2)*d^2); % Free Space Propagation Loss
Amu = 35; % Median Attenuation Relative to Free Space (900 MHz and 30 Km)
Garea = 9; % Gain due to the Type of Environment (Suburban Area)
Ghte = 20*log(Hte/200); % Base Station Antenna Height Gain Factor
if(Hre>3)
Ghre = 20*log(Hre/3);
else
Ghre = 10*log(Hre/3);
end
% Propagation Path Loss
L50 = Lf+Amu-Ghte-Ghre-Garea;
display('Propagation pathloss is : ');
disp(L50);
plot(Hte,L50,'LineWidth',1.5);
title('Okumura Model Analysis');
xlabel('Transmitter antenna Height (Km)');
ylabel('Propagation Path loss(dB) at 50 Km');
grid on;
clc;
close all;
clear all;
d = 1:0.01:20;
hm = 5;
hb1 = 30;
hb2 = 100;
hb3 = 200;
fc = 1000;
% a. For Large Cities
% fc >= 400MHz
% A. Typical Urban
% C. Typical Rural
figure(1);
plot(d, L50urban1, 'r', d, L50urban2, '--r', d, L50urban3,':r');
hold on;
plot(d, L50suburban1, 'b', d, L50suburban2, '--b', d, L50suburban3, ':b');
hold on;
plot(d, L50rural1, 'g', d, L50rural2, '--g', d, L50rural3, ':g');
hold on;
grid on;
xlabel('d [km]');
ylabel('L [dB]');
title('Hata Model for different base station ant. ht. in different
environments');
Simaple path loss model
clc;
close all;
clear all;
f = input('Enter carrrier frequency(MHz)');
c = 300;
d = 1:1:10000;
Lp =((4*pi*d*f)/c).^2;
subplot(2,1,1);
plot(d,Lp,'b');
xlabel('x--> D (distance in Km)');
ylabel('y--> Lp (path loss)');
title('Free space model');
grid on
subplot(2,1,2);
plot(d,10*log(Lp),'r');
xlabel('x--> D (distance in Meter)');
ylabel('y--> Lp (Path loss in dB)');
title('Free space model');
grid on;
clc;
clear all;
close all;
%%%%Parameters Setting%%%%%
d0=1;%1 meter
d=1;%meter
LightSpeedC=3e8;
WCDMACellular=2100*1000000;%hz
% LTECellular=2000*1000000;%hz
Freq=WCDMACellular
TXAntennaGain=1; %db
RXAntennaGain=1; %db
PTx=1e-03; % i.e. .001 watt assumptation
PathLossExponent=2; %Line Of sight
PTxdBm=10*log10(PTx*1000);
e=input ('Enter type of Environment (1 - Free Space, 2 - Urban area cellular radio, 3 -
Shadowed urban cellular radio, 4 - In building line-of-sight, 5 - Obstructed in
factories, 6 - Obstructed in building)--:');
% u=input ('Enter type of city (1 - urban , 2 - suburban, 3-rural)--:');
ht=input('Enter height of transmitting antenna(30 to 200m)--:');
hr=input('Enter height of receiving antenna(1 to 10m)--:');
d=input('Enter Distance in meter from 100 to 2000--:');
display('The Received Power for your given data is Pr0 in dB is');
if e==1
PathLossExponent=2;
elseif e==2
PathLossExponent=3.1;
elseif e==3
PathLossExponent=4;
elseif e==4
PathLossExponent=1.7;
elseif e==5
PathLossExponent=2.5;
else
PathLossExponent=5;
end
Wavelength=LightSpeedC/Freq;
Pr0=PTxdBm + TXAntennaGain + RXAntennaGain- (10*PathLossExponent*log10(4*pi/Wavelength))
display(Pr0);
figure
d=1;
% plot for entire range of frequencies
display('The plot for entire range of Distance from 100 to 2000 is shown in the plot');
h = waitbar(0,'plotting the Received Power for the entire range of Distance please
wait......');
% log normal Shadowing Radio Propagation model:
% Pr0 = friss(d0)
% Pr(db) = Pr0(db) - 10*PathLossExponent*log(d/d0) + n
% where n is a Gaussian random variable with zero mean and a variance in db
% Pt * Gt * Gr * (Wavelength^PathLossExponent) d0^PathLossExponent (n/10)
% Pr = ---------------------------------------------*-----------------------*10
% 4 *pi * d0^PathLossExponent d^PathLossExponent
% get power loss by adding a log-normal random variable (shadowing)
% the power loss is relative to that at reference distance d0
% reset rand does influcence random
rstate = randn('state');
randn('state', d);
%GaussRandom=normrnd(0,6)%mean+randn*sigma; %Help on randn
GaussRandom= (randn*0.1+0);
%disp(GaussRandom);
for d=100:2:2000
Pr1=Pr0-(10*2* log10(d/d0))+GaussRandom;
randn('state', rstate);
subplot(1,1,1);
plot(d,Pr1,'g','DisplayName','Free Space 2');hold on;
Pr2=Pr0-(10*3.1* log10(d/d0))+GaussRandom;
plot(d,Pr2,'k','DisplayName','Urban area 3.1');
Pr3=Pr0-(10*4* log10(d/d0))+GaussRandom;
plot(d,Pr3,'r','DisplayName','Shadowed urban 4');
Pr4=Pr0-(10*1.7* log10(d/d0))+GaussRandom;
plot(d,Pr4,'b','DisplayName','In building LOS 1.7');
Pr5=Pr0-(10*2.5* log10(d/d0))+GaussRandom;
plot(d,Pr5,'c','DisplayName','In factory 2.5');
title('The plot for entire range of Distance from 100 meters to 2000 meters');
legend('show','Location','southwest')
xlabel('Distance (in meters)');ylabel('Received Power (in dB)');
waitbar(d / 2000)
end
close(h);