{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter No.4 : Mobile radio propagation large scale path loss"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 4.1 Page No.109"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Far field distance = 6 meter\n"
]
}
],
"source": [
"from __future__ import division\n",
"# To find far field distance for antenna with maximum dimensions and operating frequency\n",
"\n",
"\n",
"# Given data\n",
"D=1# # Maximum dimension in m\n",
"f=900*10**6# # Operating frequency in Hz\n",
"C=3*10**8# # Speed of light in m/sec\n",
"\n",
"lamda=C/f# # Carrier wavelength in m\n",
"\n",
"# To find far field distance\n",
"df=(2*D**2)/lamda# #Far field distance\n",
"\n",
"#Displaying the result in command window\n",
"print '\\n Far field distance = %0.0f meter'%(df)#"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 4.2 Page No.109"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Transmitter power = 47.0 dBm\n",
"\n",
" Transmitter power = 17.0 dBW\n",
"\n",
" Receiver power = -24.5 dBm\n",
"\n",
" Receiver power at 10km from antenna = -64.5 dBm\n"
]
}
],
"source": [
"from __future__ import division\n",
"from math import log10,pi\n",
"# To find a)transmitter power in dBm b)Transmitter power in dBW and the received power of antenna in dBm at free space distance of 100m from antenna and 10km\n",
"\n",
"\n",
"# Given data\n",
"Pt=50# # Transmitter power in W\n",
"fc=900*10**6# # Carrier frequency in Hz\n",
"C=3*10**8# # Speed of light in m/s\n",
"\n",
"#a)Transmitter power in dBm\n",
"PtdBm=round(10*log10(Pt/(1*10**(-3))))# #Transmitter power in dBm\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n Transmitter power = %0.1f dBm'%(PtdBm)#\n",
"\n",
"#b)Transmitter power in dBW\n",
"PtdBW=round(10*log10(Pt/1))# #Transmitter power in dBW\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n Transmitter power = %0.1f dBW'%(PtdBW)#\n",
"\n",
"# To find receiver power at 100m\n",
"Gt=1# #Transmitter gain\n",
"Gr=1# #Receiver gain\n",
"d=100# #Free space distance from antenna in m\n",
"L=1# #System loss factor since no loss in system\n",
"lamda=C/fc# #Carrier wavelength in m\n",
"Pr=(Pt*Gt*Gr*lamda**2)/((4*pi)**2*d**2*L)# #Receiver power in W\n",
"PrdBm=10*log10(Pr/10**(-3))# #Receiver power in dBm\n",
"\n",
"#Displaying the result in command window\n",
"print '\\n Receiver power = %0.1f dBm'%(PrdBm)#\n",
"\n",
"#For Pr(10km)\n",
"d0=100# #Reference distance\n",
"d=10000# #Free space distance from antenna\n",
"Pr10km=PrdBm+20*log10(d0/d)# #Received power at 10km from antenna in dBm\n",
"\n",
"#Displaying the result in command window\n",
"print '\\n Receiver power at 10km from antenna = %0.1f dBm'%(Pr10km)#"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 4.3 Page no. 112"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Power at receiver = -91.5 dBW\n",
"\n",
" Power at receiver = -61.5 dBm\n",
"\n",
" \n",
" Magnitude of E-field at receiver = 0.0039 V/m\n",
"\n",
" \n",
" RMS voltage applied to receiver input = 0.375 mV\n"
]
}
],
"source": [
"from __future__ import division\n",
"from math import sqrt,pi,log10\n",
"# To find a)power at receiver b)magnitude of E-field at receiver c)rms voltage applied to receiver input\n",
"\n",
"\n",
"# Given data\n",
"Pt=50# # Transmitter power in Watt\n",
"fc=900*10**6# # Carrier frequency in Hz\n",
"Gt=1# # Transmitter antenna gain\n",
"Gr=2# # Receiver antenna gain\n",
"Rant=50# # Receiver antenna resistance in ohm\n",
"\n",
"# a)Power at receiver\n",
"d=10*10**3# # Distance from antenna in meter\n",
"lamda=(3*10**8)/fc# # Carrier wavelength in meter\n",
"Prd1=10*log10((Pt*Gt*Gr*lamda**2)/((4*pi)**2*d**2))# # Power at transmitter in dBW\n",
"Prd=10*log10(((Pt*Gt*Gr*lamda**2)/((4*pi)**2*d**2))/(10**-3))# # Power at transmitter in dBm\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n Power at receiver = %0.1f dBW'%(Prd1)#\n",
"print '\\n Power at receiver = %0.1f dBm'%(Prd)#\n",
"\n",
"# b)Magnitude of E-field at receiver\n",
"Ae=(Gr*lamda**2)/(4*pi)# # Aperture gain\n",
"Pr=10**(Prd1/10)# # Receiver power in W\n",
"E=sqrt((Pr*120*pi)/Ae)# # Magnitude of E-field at receiver\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n \\n Magnitude of E-field at receiver = %0.4f V/m'%(E)#\n",
"\n",
"# c)rms voltage applied to receiver input\n",
"Vant=sqrt(Pr*4*Rant)*10**3# # rms voltage applied to receiver input\n",
"#Answer is varrying due to round-off error\n",
"\n",
"#Displaying the result in command window\n",
"print '\\n \\n RMS voltage applied to receiver input = %0.3f mV'%(Vant)#"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no. 4.5 Page no. 119"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Brewster angle = 26.57 degree\n"
]
}
],
"source": [
"from __future__ import division\n",
"from math import sqrt,asin,degrees\n",
"# To calculate the Brewster angle\n",
"\n",
"\n",
"# Given data\n",
"Er=4# # Permittivity\n",
"x=sqrt((Er-1)/(Er**2-1)) # Sine of brewster angle\n",
"theta=degrees(asin(x)) # Brewster angle\n",
"#Answer is varrying due to round off error\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n Brewster angle = %0.2f degree'%(theta)#"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 4.6 Page no. 125"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Length of antenna = 0.0833 m\n",
" = 8.33 cm\n",
"\n",
" Effective aperture of receiving antenna = 0.016 m**2\n",
"\n",
" \n",
" The received power at mobile = 5.4 X 10**-13 W\n",
" = -122.68 dBW\n",
" = -92.68 dBm\n"
]
}
],
"source": [
"from __future__ import division\n",
"from math import log10,sqrt,pi\n",
"# To find a)the length and effective aperture of receiving antenna b)the received power at mobile\n",
"\n",
"\n",
"# Given data\n",
"d=5*10**3# # distance of mobile from base station in m\n",
"E0=1*10**-3# # E-field at 1Km from transmitter in V/m\n",
"d0=1*10**3# # Distance from transmitter in m\n",
"f=900*10**6# # Carrier frequency used for the system in Hz\n",
"c=3*10**8# # Speed of ligth in m/s\n",
"gain=2.55# # Gain of receiving antenna in dB\n",
"G=10**(gain/10)# # Gain of receiving antenna\n",
"\n",
"# a)To find the length and effective aperture of receiving antenna\n",
"lamda=c/f# # Wavelength\n",
"L=lamda/4# # Length of antenna\n",
"Ae=(G*lamda**2)/(4*pi)# # Effective aperture of receiving antenna\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n Length of antenna = %0.4f m'%(L)#\n",
"print ' = %0.2f cm'%(L*10**2)#\n",
"print '\\n Effective aperture of receiving antenna = %0.3f m**2'%(Ae)#\n",
"\n",
"# b)To find the received power at mobile\n",
"# Given data\n",
"ht=50# # Heigth of transmitting antenna\n",
"hr=1.5# # Heigth of receiving antenna\n",
"ERd=(2*E0*d0*2*pi*ht*hr)/(d**2*lamda)# # Electic field at distance d in V/m\n",
"Prd=((ERd**2/377)*Ae)# # The received power at mobile in W\n",
"PrddB=10*log10(Prd)# # The received power at mobile in dBW\n",
"PrddBm=10*log10(Prd/10**-3)# # The received power at mobile in dBm\n",
"Prd=((ERd**2/377)*Ae)*10**13# # The received power at mobile in 10**-13W\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n \\n The received power at mobile = %0.1f X 10**-13 W'%(Prd)#\n",
"print ' = %0.2f dBW'%(PrddB)#\n",
"print ' = %0.2f dBm'%(PrddBm)#"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 4.7 Page no. 132"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" a) For h=25m Fresnel diffraction parameter v = 2.74\n",
"\n",
" From the plot of Knife-edge diffraction gain as a function of Fresnel diffraction parameter, diffraction loss is 22dB.\n",
"\n",
" Using numerical approximation, diffraction loss for v > 2.4 = 21.7 dB\n",
"\n",
" Fresnel zone within which tip of obstruction lies = 3.75\n",
"\n",
" Therefore, the tip of obstruction completely blocks the first three Fresnel zones.\n",
"\n",
" \n",
" b) For h=0 Fresnel diffraction parameter v = 0\n",
"\n",
" From the plot of Knife-edge diffraction gain as a function of Fresnel diffraction parameter, diffraction loss is 6dB.\n",
"\n",
" Using numerical approximation, diffraction loss for v=0 = 6 dB\n",
"\n",
" Fresnel zone within which tip of obstruction lies = 0\n",
"\n",
" Therefore, the tip of obstruction lies in middle of first Fresnel zone.\n",
"\n",
" \n",
" c) For h=-25m Fresnel diffraction parameter v = -2.74\n",
"\n",
" From the plot of Knife-edge diffraction gain as a function of Fresnel diffraction parameter, diffraction loss is approximately 1dB.\n",
"\n",
" Using numerical approximation, diffraction loss for v < -1 = 0 in dB\n",
"\n",
" Fresnel zone within which tip of obstruction lies = 3.75\n",
"\n",
" Therefore, the tip of obstruction completely blocks the first three Fresnel zones but diffraction loss is negligible.\n"
]
}
],
"source": [
"from __future__ import division\n",
"from math import log10,sqrt,pi\n",
"# To compute diffraction loss and identify Fresnel zone within which tip of obstruction lies for a)h=25m b)h=0 c)h=-25m\n",
"\n",
"# Given data\n",
"lamda=1/3# # Wavelength in meter\n",
"d1=1*10**3# # Distance between transmitter and obstructing screen in m\n",
"d2=1*10**3# # Distance between receiver and obstructing screen in m\n",
"\n",
"# a) For h=25m\n",
"h=25# # Effective heigth of obstruction screen in m\n",
"v=h*sqrt((2*(d1+d2))/(lamda*d1*d2))# # Fresnel diffraction parameter\n",
"print '\\n a) For h=25m Fresnel diffraction parameter v = %0.2f'%(v)#\n",
"print '\\n From the plot of Knife-edge diffraction gain as a function of Fresnel diffraction parameter, diffraction loss is 22dB.'\n",
"Gd=-20*log10(0.225/v)# # Diffraction loss for v>2.4 in dB\n",
"print '\\n Using numerical approximation, diffraction loss for v > 2.4 = %0.1f dB'%(Gd)#\n",
"delta=(h**2/2)*((d1+d2)/(d1*d2))# # Path length difference between direct and diffracted rays\n",
"n=(2*delta)/lamda# # Number of Fresnel zones in which the obstruction lies\n",
"print '\\n Fresnel zone within which tip of obstruction lies = %0.2f'%(n)#\n",
"print '\\n Therefore, the tip of obstruction completely blocks the first three Fresnel zones.'\n",
"\n",
"# b) For h=0\n",
"h=0# # Effective heigth of obstruction screen in m\n",
"v=h*sqrt((2*(d1+d2))/(lamda*d1*d2))# # Fresnel diffraction parameter\n",
"print '\\n \\n b) For h=0 Fresnel diffraction parameter v = %0.0f'%(v)#\n",
"print '\\n From the plot of Knife-edge diffraction gain as a function of Fresnel diffraction parameter, diffraction loss is 6dB.'\n",
"Gd=-20*log10(0.5-0.62*v)# # Diffraction loss for v=0 in dB\n",
"print '\\n Using numerical approximation, diffraction loss for v=0 = %0.0f dB'%(Gd)#\n",
"delta=(h**2/2)*((d1+d2)/(d1*d2))# # Path length difference between direct and diffracted rays\n",
"n=(2*delta)/lamda# # Number of Fresnel zones in which the obstruction lies\n",
"print '\\n Fresnel zone within which tip of obstruction lies = %0.0f'%(n)#\n",
"print '\\n Therefore, the tip of obstruction lies in middle of first Fresnel zone.'\n",
"\n",
"# c) For h=-25m\n",
"h=-25# # Effective heigth of obstruction screen in m\n",
"v=h*sqrt((2*(d1+d2))/(lamda*d1*d2))# # Fresnel diffraction parameter\n",
"print '\\n \\n c) For h=-25m Fresnel diffraction parameter v = %0.2f'%(v)#\n",
"print '\\n From the plot of Knife-edge diffraction gain as a function of Fresnel diffraction parameter, diffraction loss is approximately 1dB.'\n",
"Gd=0# # Diffraction loss for v<-1 in dB\n",
"print '\\n Using numerical approximation, diffraction loss for v < -1 = %0.0f in dB'%(Gd)#\n",
"delta=(h**2/2)*((d1+d2)/(d1*d2))# # Path length difference between direct and diffracted rays\n",
"n=(2*delta)/lamda# # Number of Fresnel zones in which the obstruction lies\n",
"print '\\n Fresnel zone within which tip of obstruction lies = %0.2f'%(n)#\n",
"print '\\n Therefore, the tip of obstruction completely blocks the first three Fresnel zones but diffraction loss is negligible.'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 4.8 Page no. 133"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" The loss due to knife-edge diffraction = 25.5 dB\n",
"\n",
" The heigth of obstacle required to induce 6dB diffraction loss = 4.17 m\n"
]
}
],
"source": [
"from __future__ import division\n",
"from math import log10,sqrt,pi,atan\n",
"# To determine a)the loss due to knife-edge diffraction b)the heigth of obstacle required to induce 6dB diffraction loss\n",
"\n",
"\n",
"# Given data\n",
"f=900*10**6# # Operating frequency in Hz\n",
"c=3*10**8# # Speed of ligth in m/s\n",
"hr=25# # Heigth of receiver in m\n",
"ht=50# # Heigth of transmitter in m\n",
"h=100# # Heigth of obstruction in m\n",
"d1=10*10**3# # Distance between transmitter and obstruction in m\n",
"d2=2*10**3# # Distance between receiver and obstruction in m\n",
"\n",
"# a)To determine the loss due to knife-edge diffraction\n",
"lamda=c/f# # Operating wavelength in m\n",
"ht=ht-hr# # Hegth of transmitter after subtracting smallest heigth (hr)\n",
"h=h-hr# # Heigth of obstruction after subtracting smallest heigth (hr)\n",
"bet=atan((h-ht)/d1)# # From geometry of environment in rad\n",
"gamm=atan(h/d2)# # From geometry of environment in rad\n",
"alpha=bet+gamm# # From geometry of environment in rad\n",
"v=alpha*sqrt((2*d1*d2)/(lamda*(d1+d2)))# # Fresnel diffraction parameter\n",
"\n",
"# the loss due to knife-edge diffraction\n",
"Gd=-20*log10(0.225/v)# # Diffraction loss for v>2.4 in dB\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The loss due to knife-edge diffraction = %0.1f dB'%(Gd)#\n",
"\n",
"# b)To determine the heigth of obstacle required to induce 6dB diffraction loss\n",
"Gd=6# # Diffraction loss in dB\n",
"v=0# # Fresnel diffraction parameter from the plot of Knife-edge diffraction gain as a function of Fresnel diffraction parameter\n",
"# v=0 is possible only if alpha=0. Therefore bet=-gamm\n",
"# By considering this situation, the geometry of environment provides (h/d2)=(ht/(d1+d2))\n",
"h=(ht*d2)/(d1+d2)# # the heigth of obstacle required to induce 6dB diffraction loss\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The heigth of obstacle required to induce 6dB diffraction loss = %0.2f m'%(h)#"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 4.9 Page no. 143"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Loss exponent = 4\n",
"\n",
" The standard deviation about mean value = 6.16 dB\n",
"\n",
" The received power (at d=2 km) = -57.42 dBm\n",
"\n",
" The probability that received signal will be greater than -60dBm = 66.2 percent\n",
"\n",
" The percentage of area within 2 km = 92 percent\n"
]
}
],
"source": [
"from __future__ import division\n",
"from math import log10,sqrt,erf\n",
"# To find a)the minimum mean square error b)the standard deviation about mean value c)received power at d=2 km d)the likelihood that the received signal level at 2 km e) the percentage of area within 2 km \n",
"\n",
"\n",
"# Given data\n",
"d0=100# # First receiver distance in meter\n",
"d1=200# # Second receiver distance in meter\n",
"d2=1000# # Third receiver distance in meter\n",
"d3=3000# # Fourth receiver distance in meter\n",
"p0=0# # Receved power of first receiver in dBm\n",
"p1=-20# # Receved power of second receiver in dBm\n",
"p2=-35# # Receved power of third receiver in dBm\n",
"p3=-70# # Receved power of forth receiver in dBm\n",
"\n",
"# a)To find the minimum mean square error\n",
"n=2887.8/654.306# # Loss exponent after differentiating and equating the squared error function with zero\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n Loss exponent = %0.0f'%(n)#\n",
"\n",
"# b)To find the standard deviation about mean value\n",
"P0=-10*n*log10(d0/100)# # The estimate of p0 with path loss model\n",
"P1=-10*n*log10(d1/100)# # The estimate of p1 with path loss model\n",
"P2=-10*n*log10(d2/100)# # The estimate of p2 with path loss model\n",
"P3=-10*n*log10(d3/100)# # The estimate of p3 with path loss model\n",
"J=(p0-P0)**2+(p1-P1)**2+(p2-P2)**2+(p3-P3)**2# # Sum of squared error\n",
"SD=sqrt(J/4)# # The standard deviation about mean value\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The standard deviation about mean value = %0.2f dB'%(SD)#\n",
"# The decimal point is not given in the answer given in book.\n",
"\n",
"# c)To find received power at d=2 km\n",
"d=2000# # The distance of receiver\n",
"P=-10*n*log10(d/100)# # The estimate of p2 with path loss model\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The received power (at d=2 km) = %0.2f dBm'%(P)#\n",
"# Answer is varying due to round off error\n",
"\n",
"# d)To find the likelihood that the received signal level at 2 km\n",
"gam=-60# # The received power at 2km will be greater than this power\n",
"z=(gam-P)/SD#\n",
"Pr=(1/2)*(1-erf(z/sqrt(2)))# # The probability that received signal will be greater than -60dBm\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The probability that received signal will be greater than -60dBm = %0.1f percent'%(Pr*100)#\n",
"# Answer is varying due to round off error\n",
"\n",
"# e)To find the percentage of area within 2 km \n",
"A=92# # From figure 4.18, area receives coverage above -60dBm\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The percentage of area within 2 km = %0.0f percent'%(A)#"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 4.10 Page no. 152"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" The power at receiver = -95.07 dBm\n"
]
}
],
"source": [
"from __future__ import division\n",
"from math import log10,pi\n",
"# To find the power at receiver\n",
"\n",
"\n",
"# Given data\n",
"d=50*10**3# # Distance between transmitter and receiver in m\n",
"hte=100# # Effective heigth of transmitter in m\n",
"hre=10# # Effective heigth of receiver in m\n",
"EIRP=1*10**3# # Radiated power in Watt\n",
"f=900*10**6# # Operating frequency in Hz\n",
"c=3*10**8# # Speed of ligth in m/s\n",
"lamda=c/f# # operating wavelength in m\n",
"EIRP=20*log10(EIRP)# # Radiated power in dB\n",
"Gr=0# # Receiving gain in dB\n",
"\n",
"Lf=-10*log10(lamda**2/(4*pi*d)**2)# # Free space path loss in dB\n",
"Amu=43# # Attenuation relative to free space in dB from Okumuras curve\n",
"Garea=9# # Gain due to type of environment in dB from Okumuras curve\n",
"Ghte=20*log10(hte/200)# # Base station antenna heigth gain factor for 1000m > hte > 30m\n",
"Ghre=20*log10(hre/3)# # Mobile antenna heigth gain factor for 10m > hre > 3m\n",
"L50=Lf+Amu-Ghte-Ghre-Garea# # Total mean path loss\n",
"\n",
"# The median reeived power\n",
"Pr=EIRP-L50+Gr#\n",
"\n",
"#Displaying the result in command window\n",
"print '\\n The power at receiver = %0.2f dBm'%(Pr)#\n",
"\n",
"#Answer is varrying due to round-off error"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 4.11 Page no. 166"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" The mean path loss at same floor = 130.2 dB\n",
"\n",
" The mean path loss at multiple floor = 108.6 dB\n"
]
}
],
"source": [
"from math import log10\n",
"# To find the mean path loss\n",
"\n",
"\n",
"# Given data\n",
"d0=1# # Reference distance in m\n",
"d=30# # Distance from transmitter in m\n",
"nSF=3.27# # Exponent value for same floor\n",
"nMF=5.22# # Path loss exponent value for multiple floors\n",
"FAF=24.4# # Floor attenuation factor for specified floor in dB\n",
"n=2# # Number of blocks\n",
"PAF=13# # Particular attenuation factor for paricular obstruction in dB\n",
"PLSFd0=31.5# # Attenuation at reference distance for same floor in dB\n",
"PLMFd0=5.5# # Attenuation at reference distance for multiple floor in dB\n",
"\n",
"#Mean path loss at same floor\n",
"PL1=PLSFd0+10*nSF*log10(d/d0)+FAF+n*PAF#\n",
"\n",
"#Mean path loss at multiple floor\n",
"PL2=PLMFd0+10*nMF*log10(d/d0)+n*PAF#\n",
"\n",
"#Displaying the result in command window\n",
"print '\\n The mean path loss at same floor = %0.1f dB'%(PL1)#\n",
"print '\\n The mean path loss at multiple floor = %0.1f dB'%(PL2)#"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 4.12 Page no. 167"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Far field distance = 4 meter\n"
]
}
],
"source": [
"from __future__ import division\n",
"# To find far field distance for antenna with maximum dimensions and operating frequency\n",
"\n",
"\n",
"# Given data\n",
"D=1# # Maximum dimension in m\n",
"f=600*10**6# # Operating frequency in Hz\n",
"C=3*10**8# # Speed of light in m/sec\n",
"\n",
"lamda=C/f# # Carrier wavelength in m\n",
"\n",
"# To find far field distance\n",
"df=(2*D**2)/lamda# #Far field distance\n",
"\n",
"#Displaying the result in command window\n",
"print '\\n Far field distance = %0.0f meter'%(df)#"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"language": "python",
"name": "python2"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.9"
}
},
"nbformat": 4,
"nbformat_minor": 0
}