PKŠ„I;d‚Z$Z$<Wireless Communications Principles and Practices/Chap2.ipynb{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter No.2 : Appendix B Noise figure calculations for link budgets"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no B.1 Page no. 613"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" SNR at the detector output stage = 14 dB\n"
]
}
],
"source": [
"# To determine SNR at the detector output stage\n",
"\n",
"\n",
"# Given data\n",
"SNRin=20# # SNR at the receiver antenna input terminal in dB\n",
"F=6# # Noise figure in dB\n",
"\n",
"# SNR at the detector output stage\n",
"SNRout=SNRin-F# # SNR at the detector output stage in dB\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n SNR at the detector output stage = %0.0f dB'%(SNRout)#"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no B.2 Page no. 613"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Noise figure of mobile receiver system = 9 dB\n"
]
}
],
"source": [
"from __future__ import division\n",
"from math import log10\n",
"#To compute noise figure of mobile receiver system\n",
"\n",
"\n",
"#Given data\n",
"F1=3# #Coaxial cable loss in dB\n",
"F1=10**(F1/10)# #Coaxial cable loss\n",
"F2=6# #Noise figure of phone in dB\n",
"F2=10**(F2/10)# #Noise figure of phone\n",
"\n",
"Fsys=F1+((F2-1)/0.5)# #Noise figure of mobile receiver system\n",
"Fsys=10*log10(Fsys)# #Noise figure of mobile receiver system in dB\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n Noise figure of mobile receiver system = %0.0f dB'%(Fsys)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no B.3 Page no. 614"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Average output thermal noise power = -119.5 dBm\n"
]
}
],
"source": [
"from __future__ import division\n",
"from math import log10\n",
"# To determine average output thermal noise power\n",
"\n",
"\n",
"# Given data\n",
"T0=300# # Ambient room temperature in K\n",
"Fsys=8# # Noise figure of the system\n",
"Tant=290# # Effective temperature of antenna in K\n",
"K=1.38*10**-23# # Boltzmann's constant in J/K\n",
"B=30000# # Effective bandwidth in Hz\n",
"\n",
"Te=(Fsys-1)*T0# # Effective noise temperature in K\n",
"Ttotal=Tant+Te# # Overall system noise temperature in K\n",
"\n",
"# To determine average output thermal noise power\n",
"Pn=(1+(Ttotal/T0))*K*T0*B# # Average output thermal noise power in W\n",
"Pn=10*log10(Pn/(10**-3))# # Average output thermal noise power in dBm\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n Average output thermal noise power = %0.1f dBm'%(Pn)#"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no B.4 Page no. 614"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Average signal strength at the antenna terminal to provide 30dB SNR = -89.5 dBm\n"
]
}
],
"source": [
"# To determine average signal strength at the antenna terminal \n",
"\n",
"\n",
"# Given data\n",
"Pn=-119.5# # Average output thermal noise power in dBm\n",
"SNR=30# # SNR at the receiver output in dB\n",
"\n",
"# To determine average signal strength at the antenna terminal to provide 30dB SNR\n",
"Ps=SNR+Pn# # Average signal strength at the antenna terminal\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n Average signal strength at the antenna terminal to provide 30dB SNR = %0.1f dBm'%(Ps)#"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no B.5 Page no. 615"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Average signal strength at the antenna terminal to provide 30dB SNR = -68.5 dBm\n"
]
}
],
"source": [
"# To determine average signal strength at the antenna terminal \n",
"\n",
"\n",
"# Given data\n",
"Pn=-104.5# # Average output thermal noise power in dBm\n",
"SNR=36# # SNR at the receiver output in dB\n",
"\n",
"# To determine average signal strength at the antenna terminal to provide 36dB SNR\n",
"Ps=SNR+Pn# # Average signal strength at the antenna terminal\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n Average signal strength at the antenna terminal to provide 30dB SNR = %0.1f dBm'%(Ps)#"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no B.6 Page no. 615"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Noise figure of mobile receiver system = 11 dB\n"
]
}
],
"source": [
"from __future__ import division\n",
"from math import log10\n",
"#To compute noise figure of mobile receiver system\n",
"\n",
"\n",
"#Given data\n",
"F1=5# #Coaxial cable loss in dB\n",
"F1=10**(F1/10)# #Coaxial cable loss\n",
"F2=8# #Noise figure of phone in dB\n",
"F2=10**(F2/10)# #Noise figure of phone\n",
"\n",
"Fsys=F1+((F2-1)/0.5)# #Noise figure of mobile receiver system\n",
"Fsys=10*log10(Fsys)# #Noise figure of mobile receiver system in dB\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n Noise figure of mobile receiver system = %0.0f dB'%(Fsys)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no B.7 Page no. 615"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" SNR at the detector output stage = 24 dB\n"
]
}
],
"source": [
"# To determine SNR at the detector output stage\n",
"\n",
"\n",
"# Given data\n",
"SNRin=30# # SNR at the receiver antenna input terminal in dB\n",
"F=6# # Noise figure in dB\n",
"\n",
"# SNR at the detector output stage\n",
"SNRout=SNRin-F# # SNR at the detector output stage in dB\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n SNR at the detector output stage = %0.0f dB'%(SNRout)#"
]
}
],
"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
}
PKŠ„I;C·½¯e¯e<Wireless Communications Principles and Practices/Chap3.ipynb{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter No.3 : The cellular concept system design fundamentals"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 3.1 Page No.61"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" The number of channels available per cell for 4-cell reuse system = 165 channels\n",
"\n",
" One control channel and 160 voice channels would be assigned to each cell.\n",
"\n",
" \n",
" The number of channels available per cell for 7-cell reuse system = 95 channels\n",
"\n",
" Each cell would have one control channel, four cells would have 90 voice channels and three cells would have 91 voice channels.\n",
"\n",
" \n",
" The number of channels available per cell for 12-cell reuse system = 55 channels\n",
"\n",
" Each cell would have one control channel, eight cells would have 53 voice channels and four cells would have 54 voice channels.\n"
]
}
],
"source": [
"from math import ceil\n",
"# To compute the number of channels available per cell for a)four-cell reuse system a)seven-cell reuse system a)12-cell reuse system\n",
"\n",
"# Given data\n",
"B=33*10**6# # Total bandwidth allocated to particular FDD system in Hz\n",
"Bc=25*10**3# # Bandwidth per channel in Hz\n",
"Nc=2# # Number of simplex channels\n",
"Bc=Bc*Nc# # Channel bandwidth in Hz\n",
"\n",
"Ntotal=B/Bc# # Total number of channels\n",
"\n",
"#a) To compute the number of channels available per cell for four-cell reuse system\n",
"N=4# # frequency reuse factor\n",
"chpercell=Ntotal/N# # number of channels available per cell for four-cell reuse system\n",
"\n",
"# Displaying the result in command window\n",
"print \"\\n The number of channels available per cell for 4-cell reuse system = %0.0f channels\"%(chpercell)\n",
"print \"\\n One control channel and 160 voice channels would be assigned to each cell.\"\n",
"\n",
"# b) To compute the number of channels available per cell for seven-cell reuse system\n",
"N=7# # frequency reuse factor\n",
"chpercell=ceil(Ntotal/N)# # number of channels available per cell for seven-cell reuse system\n",
"\n",
"# Answer is varrying due to round-off error\n",
"\n",
"# Displaying the result in command window\n",
"print \"\\n \\n The number of channels available per cell for 7-cell reuse system = %0.0f channels\"%(chpercell)\n",
"print \"\\n Each cell would have one control channel, four cells would have 90 voice channels and three cells would have 91 voice channels.\"\n",
"\n",
"# c) To compute the number of channels available per cell for 12-cell reuse system\n",
"N=12# # frequency reuse factor\n",
"chpercell=Ntotal/N# # number of channels available per cell for seven-cell reuse system\n",
"\n",
"# Displaying the result in command window\n",
"print \"\\n \\n The number of channels available per cell for 12-cell reuse system = %0.0f channels\"%(chpercell)\n",
"print \"\\n Each cell would have one control channel, eight cells would have 53 voice channels and four cells would have 54 voice channels.\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 3.2 Page No.72"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Signal to noise ratio for n=4 with frequency reuse factor N=7 = 18.66 dB\n",
"\n",
" Signal to noise ratio for n=3 with frequency reuse factor N=7 = 12.05 dB\n",
"\n",
" Signal to noise ratio for n=3 with frequency reuse factor N=12 = 15.56 dB\n",
"\n",
" Since SIR is for n=3 with frequency reuse factor N=7 greater than the minimum required, so N=12 is used.\n"
]
}
],
"source": [
"from math import sqrt, log10\n",
"from __future__ import division\n",
"# To find frequency reuse factor for path loss exponent (n) a)n=4 b)n=3\n",
"\n",
"# Given data\n",
"SIdB=15# # Signal to interference(dB)\n",
"io=6# # Number of cochannel cell\n",
"\n",
"# For n=4\n",
"n1=4# # Path loss exponent\n",
"N1=7# # First consideration: frequency reuse factor N=7\n",
"DR1=sqrt(3*N1)# # Co-channel reuse ratio\n",
"si1=(1/io)*(DR1)**n1# # Signal to interference\n",
"sidB1=10*log10(si1)# # Signal to interference(dB)\n",
"\n",
"# For n=3\n",
"n2=3# # Path loss exmponent\n",
"si=(1/io)*(DR1)**n2# # Signal to interference for first consideration: frequency reuse factor N=7\n",
"sidB=10*log10(si)# # Signal to interference(dB)\n",
"\n",
"N2=12# # second consideration : frequency reuse factor N=12 since sidB 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
}
PKŠ„Ikò‘aÄmÄm<Wireless Communications Principles and Practices/Chap5.ipynb{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter No.5 : Mobile radio propagation small scale propagation"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 5.1 Page no. 180"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" The received carrier frequency when mobile is moving towards the transmitter = 1850.00017 MHz\n",
"\n",
" The received carrier frequency when mobile is moving away from the transmitter = 1849.999901 MHz\n",
"\n",
" The received carrier frequency when mobile is moving in the direction perpendicular to arrival direction of transmitted signal = 1850 MHz\n"
]
}
],
"source": [
"from __future__ import division\n",
"from math import cos\n",
"# To compute received carrier frequency if mobile is moving a)towards the transmitter b)away from the transmitter c)in the direction perpendicular to arrival direction of transmitted signal\n",
"\n",
"\n",
"# Given data\n",
"fc=1850*10**6# # Carrier frequency in Hz\n",
"c=3*10**8# # Speed of ligth in m/s\n",
"v=60# # Speed of receiver (vehicle) in mph\n",
"v=v*0.44704# # Speed of receiver (vehicle) in m/s\n",
"lamda=0.162##c/f# # Wavelength in m\n",
"\n",
"# a)To compute received carrier frequency if mobile is moving towards the transmitter\n",
"theta=0# # Angle between direction of receiver and transmitter\n",
"fd=(v/lamda)*cos(theta)# # Doppler shift\n",
"f=(fc+fd)*10**-6# # Received carrier frequency in MHz\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The received carrier frequency when mobile is moving towards the transmitter = %0.5f MHz'%(f)#\n",
"\n",
"# b)To compute received carrier frequency if mobile is moving away from the transmitter\n",
"theta=180# # Angle between direction of receiver and transmitter\n",
"fd=(v/lamda)*cos(theta)# # Doppler shift\n",
"f=(fc+fd)*10**-6# # Received carrier frequency in MHz\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The received carrier frequency when mobile is moving away from the transmitter = %0.6f MHz'%(f)#\n",
"\n",
"# c)To compute received carrier frequency if mobile is moving in the direction perpendicular to arrival direction of transmitted signal\n",
"theta=90# # Angle between direction of receiver and transmitter\n",
"fd=(v/lamda)*cos(theta)# # Doppler shift\n",
"f=(fc+fd)*10**-6# # Received carrier frequency in MHz\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The received carrier frequency when mobile is moving in the direction perpendicular to arrival direction of transmitted signal = %0.0f MHz'%(f)#"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 5.2 Page no. 189"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" The time delay width for RF radio channels = 1.5625 microsecond\n",
"\n",
" The time delay width for microcellular channels = 62.5 nanosecond\n",
"\n",
" The time delay width for indoor channels = 7.8125 nanosecond\n",
"\n",
" The maximum RF bandwidth for RF radio channels = 1.28 MHz\n",
"\n",
" The maximum RF bandwidth for microcellular channels = 32 MHz\n",
"\n",
" The maximum RF bandwidth for indoor channels = 256 MHz\n"
]
}
],
"source": [
"from __future__ import division\n",
"# To find a)time delay width (deltat) b)maximum RF bandwidth\n",
"\n",
"\n",
"# Given data\n",
"tN1=100*10**-6# # Excess delays for RF radio channels\n",
"tN2=4*10**-6# # Excess delays for microcellular channels\n",
"tN3=500*10**-9# # Excess delays for indoor channels\n",
"N=64# # Number of multipath bins\n",
"\n",
"# a)To find time delay width (deltat)\n",
"deltat1=(tN1/N)*10**6# # Time delay width for RF radio channels\n",
"deltat2=(tN2/N)*10**9# # Time delay width for microcellular channels\n",
"deltat3=(tN3/N)*10**9# # Time delay width for indoor channels\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The time delay width for RF radio channels = %0.4f microsecond'%(deltat1)#\n",
"print '\\n The time delay width for microcellular channels = %0.1f nanosecond'%(deltat2)#\n",
"print '\\n The time delay width for indoor channels = %0.4f nanosecond'%(deltat3)#\n",
"\n",
"#b)To find maximum RF bandwidth\n",
"bandwidth1=(2/deltat1)# #Maximum RF bandwidth for RF radio channels in MHZ\n",
"bandwidth2=(2/deltat2)*10**3# #Maximum RF bandwidth for microcellular channels in MHZ\n",
"bandwidth3=(2/deltat3)*10**3# #Maximum RF bandwidth for indoor channels in MHZ\n",
"\n",
"#Displaying the result in command window\n",
"print '\\n The maximum RF bandwidth for RF radio channels = %0.2f MHz'%(bandwidth1)#\n",
"print '\\n The maximum RF bandwidth for microcellular channels = %0.0f MHz'%(bandwidth2)#\n",
"print '\\n The maximum RF bandwidth for indoor channels = %0.0f MHz'%(bandwidth3)#"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 5.3 Page no. 190"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" The narrowband instantaneous power = 292 pW\n",
"\n",
" The narrowband instantaneous power (at t=0.1s) = 79.3 pW\n",
"\n",
" The narrowband instantaneous power (at t=0.2s) = 79.3 pW\n",
"\n",
" The narrowband instantaneous power (at t=0.3s) = 292 pW\n",
"\n",
" The narrowband instantaneous power (at t=0.4s) = 79.3 pW\n",
"\n",
" The narrowband instantaneous power (at t=0.5s) = 79.3 pW\n",
"\n",
" An average narrowband instantaneous power = 150 pW\n",
"\n",
" The wideband received power = 150 pW\n",
"\n",
" Comparing narrowband and wideband received power, it is observed that they are vertually identical. But CW signal fades over observation interval (0-0.5S)\n"
]
}
],
"source": [
"from __future__ import division\n",
"from math import cos,pi,sqrt,sin\n",
"# To find average narrowband power & to compare average narrow band and wideband power\n",
"\n",
"\n",
"# Given data\n",
"v=10# # Velocity of moving mobile\n",
"f=1000*10**6# # Carrier frequency in Hz\n",
"c=3*10**8# # Speed of ligth in air (m/s)\n",
"P1=-70# # Received power of first component in dBm\n",
"P2=P1-3# # Received power of second component in dBm\n",
"theta=0# # Initial phase for both component\n",
"P1=(10**(P1/10))*10**-3# # Received power of first component in Watt\n",
"P2=(10**(P2/10))*10**-3# # Received power of second component in Watt\n",
"lamda=c/f# # Wavelength\n",
"\n",
"# Narrowband instantaneous power \n",
"rt2=(sqrt(P1)*cos(0)+sqrt(P2)*cos(0))**2# # Narrowband instantaneous power in pW\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The narrowband instantaneous power = %0.0f pW'%(rt2*10**12)#\n",
"\n",
"# Answer is varrying due to round-off error\n",
"\n",
"# To find average narrowband instantaneous power \n",
"t=0.1# # Time interval in seconds\n",
"theta=((2*pi*v*t)/lamda)/10# # Phase interval in rad\n",
"theta=theta*(180/pi)# # Phase interval in degree\n",
"theta1=theta# # Phase of first component at t=0.1s\n",
"theta2=-theta# # Phase of second component at t=0.1s\n",
"rt21=(sqrt(P1)*(complex(cos(pi/180*theta1),sin(pi/180*theta1)))+sqrt(P2)*(complex(cos(pi/180*theta2),sin(pi/180*theta2))))**2# # Narrowband instantaneous power in pW at t=0.1s\n",
"mgrt21=sqrt(((rt21.real))**2+((rt21.imag))**2)#\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The narrowband instantaneous power (at t=0.1s) = %0.1f pW'%(mgrt21*10**12)#\n",
"\n",
"theta1=theta1+theta# # Phase of first component at t=0.2s\n",
"theta2=theta2-theta# # Phase of second component at t=0.2s\n",
"rt22=(sqrt(P1)*(complex(cos(pi/180*theta1),sin(pi/180*theta1)))+sqrt(P2)*(complex(cos(pi/180*theta2),sin(pi/180*theta2))))**2# # Narrowband instantaneous power in pW at t=0.2s\n",
"mgrt22=sqrt(((rt22.real))**2+((rt22.imag))**2)#\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The narrowband instantaneous power (at t=0.2s) = %0.1f pW'%(mgrt22*10**12)#\n",
"\n",
"theta1=theta1+theta# # Phase of first component at t=0.3s\n",
"theta2=theta2-theta# # Phase of second component at t=0.3s\n",
"rt23=(sqrt(P1)*(complex(cos(pi/180*theta1),sin(pi/180*theta1)))+sqrt(P2)*(complex(cos(pi/180*theta2),sin(pi/180*theta2))))**2# #Narrowband instantaneous power in pW at t=0.3s\n",
"mgrt23=sqrt(((rt23.real))**2+((rt23.imag))**2)#\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The narrowband instantaneous power (at t=0.3s) = %0.0f pW'%(mgrt23*10**12)#\n",
"\n",
"mgrt24=mgrt21# # Narrowband instantaneous power in pW at t=0.4s due to repeating phase\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The narrowband instantaneous power (at t=0.4s) = %0.1f pW'%(mgrt24*10**12)#\n",
"\n",
"mgrt25=mgrt22# # Narrowband instantaneous power in pW at t=0.5s due to repeating phase\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The narrowband instantaneous power (at t=0.5s) = %0.1f pW'%(mgrt25*10**12)#\n",
"\n",
"rt=(rt2+mgrt21+mgrt22+mgrt23+mgrt24+mgrt25)/6# # The average narrowband instantaneous power in pW\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n An average narrowband instantaneous power = %0.0f pW'%(rt*10**12)#\n",
"\n",
"# Wideband power\n",
"Pwb=(P1+P2)# # Widebnd received power in pW\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The wideband received power = %0.0f pW'%(Pwb*10**12)#\n",
"\n",
"print '\\n Comparing narrowband and wideband received power, it is observed that they are vertually identical. But CW signal fades over observation interval (0-0.5S)'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 5.4 Page no. 201"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" The RMS delay spread = 0.5 microseconds\n",
"\n",
" The maximum bit rate = 200 kbps\n"
]
}
],
"source": [
"from __future__ import division\n",
"from math import sqrt\n",
"#To compute a)RMS delay spread b)maximum bit rate\n",
"\n",
"\n",
"#Given data\n",
"t1=0# #Excess delay of first signal\n",
"a1=0# #Power level of first signal in dB\n",
"t2=1*10**-6# #Excess delay of second signal\n",
"a2=0# #Power level of second signal in dB\n",
"a1=10**(a1)# #Power level of first signal in Watt\n",
"a2=10**(a2)# #Power level of second signal in Watt\n",
"\n",
"#a)To compute RMS delay spread\n",
"t=((a1*t1+a2*t2)/(a1+a2))*10**6# #Mean excess delay\n",
"t2=((a1*t1**2+a2*t2**2)/(a1+a2))*10**12# #Mean square excess delay\n",
"sigmat=sqrt(t2-t**2)# #RMS delay spread in microseconds\n",
"\n",
"#Displaying the result in command window\n",
"print '\\n The RMS delay spread = %0.1f microseconds'%(sigmat)#\n",
"\n",
"#b)To compute maximum bit rate\n",
"Ts=(sigmat*10**-6)/0.1# #Sampling time of BPSK modulated signal\n",
"Rs=(1/Ts)*10**-3# #Maximum bit rate in kbps\n",
"\n",
"#Displaying the result in command window\n",
"print '\\n The maximum bit rate = %0.0f kbps'%(Rs)#"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 5.5 Page no. 202"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" The maximum excess delay (10 dB) = 5 microsecond\n",
"\n",
" The mean excess delay = 4.38 microsecond\n",
"\n",
" The RMS delay spread = 1.37 microsecond\n",
"\n",
" The coherence bandwidth = 146 KHz\n",
"\n",
" Since coherence bandwidth is greater than 30 KHz, AMPS will work without an equalizer. However, GSM requires 200 KHz bandwidth which exceeds coherence bandwidth,\n",
" thus an equalizer would be needed for this channel\n"
]
}
],
"source": [
"from __future__ import division\n",
"from math import sqrt\n",
"# To calculate mean excess delay, rms delay spread and maximum excess delay \n",
"\n",
"\n",
"# Given data\n",
"t10dB=5*10**-6# # By definition of maximum excess delay (10dB)\n",
"t1=0# # Excess delay of first signal in seconds\n",
"a1=-20# # Power level of first signal in dB\n",
"t2=1*10**-6# # Excess delay of second signal in seconds\n",
"a2=-10# # Power level of second signal in dB\n",
"t3=2*10**-6# # Excess delay of third signal in seconds\n",
"a3=-10# # Power level of third signal in dB\n",
"t4=5*10**-6# # Excess delay of fourth signal in seconds\n",
"a4=0# # Power level of fourth signal in dB\n",
"a1=10**(a1/10)# # Power level of first signal in Watt\n",
"a2=10**(a2/10)# # Power level of second signal in Watt\n",
"a3=10**(a3/10)# # Power level of third signal in Watt\n",
"a4=10**(a4/10)# # Power level of fourth signal in Watt\n",
"\n",
"# Mean excess delay\n",
"t=((a1*t1+a2*t2+a3*t3+a4*t4)/(a1+a2+a3+a4))# # Mean excess delay in seconds\n",
"tsquare=((a1*t1**2+a2*t2**2+a3*t3**2+a4*t4**2)/(a1+a2+a3+a4))# # Mean square excess delay\n",
"\n",
"# RMS delay spread\n",
"sigmat=sqrt(tsquare-t**2)# # RMS delay spread\n",
"\n",
"# Coherence bandwidth\n",
"Bc=1/(5*sigmat)# # 50% Coherence bandwidth\n",
"# The answer is varrying due to round-off error\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The maximum excess delay (10 dB) = %0.0f microsecond'%(t10dB*10**6)#\n",
"print '\\n The mean excess delay = %0.2f microsecond'%(t*10**6)#\n",
"print '\\n The RMS delay spread = %0.2f microsecond'%(sigmat*10**6)#\n",
"print '\\n The coherence bandwidth = %0.0f KHz'%(Bc*10**-3)#\n",
"print '\\n Since coherence bandwidth is greater than 30 KHz, AMPS will work without an equalizer. However, GSM requires 200 KHz bandwidth which exceeds coherence bandwidth,\\n thus an equalizer would be needed for this channel'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 5.6 Page no. 204"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" The proper spatial sampling interval for small scale propagation = 1.41 cm\n",
"\n",
" The number of samples required over 10m travel distance = 707\n",
"\n",
" The time required to make these measurements = 0.2 seconds\n",
"\n",
" The Doppler spread for this channel = 316.67 Hz\n"
]
}
],
"source": [
"from __future__ import division\n",
"from math import pi\n",
"# To determine proper spatial sampling interval for small scale propagation, number of samples required over 10m, time required to make these measurements and Doppler spread for this channel\n",
"\n",
"# Given data\n",
"fc=1900*10**6# # Carrier frequency in Hz\n",
"v=50# # Velocity of propagation in m/s\n",
"c=3*10**8# # Speed of ligth in air in m/s\n",
"Tc=(9*c)/(16*pi*v*fc)# # Coherence time\n",
"\n",
"# The spatial sampling interval\n",
"deltax=(v*Tc)/2# # Spatial sampling interval in meter\n",
"\n",
"# The number of samples required over 10m travel distance\n",
"d=10# # Distance to be travelled\n",
"Nx=d/deltax# # Number of samples required over 10m\n",
"# Answer is varrying due to round-off error\n",
"\n",
"# The time required to make these measurements\n",
"t=d/v# # Time required to make these measurements\n",
"\n",
"# Doppler spread for this channel\n",
"BD=(v*fc)/c# # Doppler spread for this channel\n",
"# Answer is varrying due to round-off error\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The proper spatial sampling interval for small scale propagation = %0.2f cm'%(deltax*10**2)#\n",
"print '\\n The number of samples required over 10m travel distance = %0.0f'%(Nx)#\n",
"print '\\n The time required to make these measurements = %0.1f seconds'%(t)#\n",
"print '\\n The Doppler spread for this channel = %0.2f Hz'%(BD)#"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 5.7 Page no. 224"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" The positive-going level crossing rate = 18.44 crossings per second\n",
"\n",
" The maximum velocity of mobile = 24 Km/Hr\n"
]
}
],
"source": [
"from math import exp,pi,sqrt\n",
"from __future__ import division\n",
"# To compute the positive-going lvel crossing rate and maximum velocity of mobile\n",
"\n",
"\n",
"\n",
"# Given data\n",
"rho=1# # Value of normalized level of fading amplitude to rms amplitude\n",
"fm=20# # Maximum Doppler frequency in Hz\n",
"fc=900*10**6# # Carrier frequency in Hz\n",
"c=3*10**8# # Speed of ligth in air in m/s\n",
"\n",
"# The positive-going level crossing rate\n",
"NR=sqrt(2*pi)*fm*rho*exp(-rho**2)# # Number of zero level crossings per second\n",
"lamda=c/fc# # Carrier wavelength\n",
"\n",
"# The maximum velocity of mobile\n",
"v=fm*lamda# # Maximum velocity of mobile in m/s\n",
"v=v*(18/5)# # Maximum velocity of mobile in km/hr\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The positive-going level crossing rate = %0.2f crossings per second'%(NR)#\n",
"print '\\n The maximum velocity of mobile = %0.0f Km/Hr'%(v)#"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 5.8 Page no. 225"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" The average fade duration (for rho = 0.01) = 19.9 microseconds\n",
"\n",
" The average fade duration (for rho = 0.1) = 200 microseconds\n",
"\n",
" The average fade duration (for rho = 1) = 3.43 microseconds\n"
]
}
],
"source": [
"from math import exp,pi,sqrt\n",
"from __future__ import division\n",
"\n",
"# To find the average fade duration\n",
"\n",
"\n",
"# Given data\n",
"rho1=0.01# # Threshold level\n",
"rho2=0.1# # Threshold level\n",
"rho3=1# # Threshold level\n",
"fm=200# # Doppler frequency\n",
"\n",
"t1=(exp(rho1**2)-1)/(rho1*fm*sqrt(2*pi))# # The average fade duration\n",
"t2=(exp(rho2**2)-1)/(rho2*fm*sqrt(2*pi))# # The average fade duration\n",
"t3=(exp(rho3**2)-1)/(rho3*fm*sqrt(2*pi))# # The average fade duration\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The average fade duration (for rho = 0.01) = %0.1f microseconds'%(t1*10**6)#\n",
"print '\\n The average fade duration (for rho = 0.1) = %0.0f microseconds'%(t2*10**6)#\n",
"print '\\n The average fade duration (for rho = 1) = %0.2f microseconds'%(t3*10**3)#"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 5.9 Page no. 225"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" The average fade duration (for rho = 0.707) = 18.3 ms\n",
"\n",
" The bit period = 20 ms\n",
"\n",
" Since the bit period is greater than average fade duration, for 50bps datarate the signal undergoes fast Rayleigh fading.\n",
"\n",
" \n",
" The average fade duration of the threshold level below which bit error occurs (for rho = 0.1) = 0.002\n",
"\n",
" Since the average fade duration of the threshold level below which bit error occurs is less than duration of one bit,\n",
" only one bit on average will be lost\n"
]
}
],
"source": [
"from math import exp,pi,sqrt\n",
"from __future__ import division\n",
"\n",
"# To find the average fade duration and average number of bit errors per second. & to determine whether the fading is slow or fast.\n",
"\n",
"# Given data\n",
"rho=0.707# # Threshold level\n",
"fm=20# # Doppler frequency\n",
"datarate=50# # Bit duration of binary digital modulation in bps\n",
"errho=0.1# # Threshold level below which bit error occurs\n",
"\n",
"t=(exp(rho**2)-1)/(rho*fm*sqrt(2*pi))# # The average fade duration \n",
"tb=1/datarate# # Bit period\n",
"t1=(exp(errho**2)-1)/(errho*fm*sqrt(2*pi))# # The average fade duration \n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The average fade duration (for rho = 0.707) = %0.1f ms'%(t*10**3)#\n",
"print '\\n The bit period = %0.0f ms'%(tb*10**3)#\n",
"print '\\n Since the bit period is greater than average fade duration, for 50bps datarate the signal undergoes fast Rayleigh fading.'\n",
"print '\\n \\n The average fade duration of the threshold level below which bit error occurs (for rho = 0.1) = %0.3f'%(t1)#\n",
"print '\\n Since the average fade duration of the threshold level below which bit error occurs is less than duration of one bit,\\n only one bit on average will be lost'"
]
}
],
"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
}
PKŠ„I¥¦ýí¯í¯<Wireless Communications Principles and Practices/Chap6.ipynb{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter No.6 : Modulation techniques for mobile radio"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 6.1 Page no. 260"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" The carrier power = 8.47 kW\n",
"\n",
" The percentage of total power in carrier power = 84.7 percentage\n",
"\n",
" The power in each sideband = 0.763 kW\n"
]
}
],
"source": [
"# To compute the carrier power, percentage of total power in carrier power and power in each sideband.\n",
"\n",
"\n",
"# Given data\n",
"PAM=10*10**3# # Power of transmitted AM signal\n",
"k=0.6# # Modulation index\n",
"\n",
"# To compute the carrier power\n",
"Pc=PAM/(1+k**2/2)# # The carrier power\n",
"\n",
"# To compute percentage of total power in carrier power\n",
"PercentPc=(Pc/PAM)*100# # Percentage of total power in carrier power\n",
"\n",
"# To compute power in each sideband\n",
"Psideband=(PAM-Pc)/2# # The power in each sideband\n",
"# Answer is varrying due to round-off error\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The carrier power = %0.2f kW'%(Pc*10**-3)#\n",
"print '\\n The percentage of total power in carrier power = %0.1f percentage'%(PercentPc)#\n",
"print '\\n The power in each sideband = %0.3f kW'%(Psideband*10**-3)#"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 6.2 Page no. 265"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" The peak frequency deviation = 40 kHz\n",
"\n",
" The modulation index = 10\n"
]
}
],
"source": [
"# To compute a)the peak frequency deviation b)the modulation index.\n",
"\n",
"\n",
"# Given data\n",
"kf=10*10**3# # Frequency deviation constant gain in Hz/V\n",
"fm=4*10**3# # Modulating frequency in Hz\n",
"A=4# # Maximum instantaneous value of input signal in V\n",
"\n",
"# To compute the peak frequency deviation\n",
"deltaf=A*kf# # The peak frequency deviation in Hz\n",
"\n",
"# To compute the modulation index\n",
"betaf=deltaf/fm# # The modulation index\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The peak frequency deviation = %0.0f kHz'%(deltaf*10**-3)#\n",
"print '\\n The modulation index = %0.0f'%(betaf)#"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 6.3 Page no. 267"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Using Carson rule, the IF bandwidth occupied by FM signal = 1200 kHz\n"
]
}
],
"source": [
"# To determine the IF bandwidth necessary to pass the given signal.\n",
"\n",
"\n",
"# Given data\n",
"fm=100*10**3# # Modulating frequency in Hz\n",
"deltaf=500*10**3# # Peak frequency deviation in Hz\n",
"betaf=deltaf/fm# # Modulation index\n",
"\n",
"# The IF bandwidth occupied by FM signal using Carson's rule\n",
"BT=2*(betaf+1)*fm# # The IF bandwidth necessary to pass the given signal\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n Using Carson rule, the IF bandwidth occupied by FM signal = %0.0f kHz'%(BT*10**-3)#"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 6.4 Page no. 273"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Value of Resistor required for RLC circuit = 1.273 kohm\n",
"\n",
" Value of Inductor required for RLC circuit = 10 microH\n",
"\n",
" Value of Capacitor required for RLC circuit = 10 pF\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAY8AAAEZCAYAAABvpam5AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XmYXGWZ///3JwECIewJq0AiSQhggIAGXBiiKCKrGBRB\nZRgd1HFwH8fRUQNu6Nflp47LICLIIsiqqDCKShCQRUiHgEA0kMiSEFlCyEq2z++P5yn6dKW6u6q7\nuqu66n5dV11dfdanTk76rme7j2wTQggh1GJYowsQQghh6IngEUIIoWYRPEIIIdQsgkcIIYSaRfAI\nIYRQswgeIYQQahbBI7QVSfdL+qc6Hm+BpCPqdbwQhooIHm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Lq5D88HPAO0jJDj9DqhVfBszJu5xMHTvK\nSyJ4hLCx3wBfkHSp7RWSdgPWAH8kZXI+h/Qf9FhS+zLAAtJzsu8GTio71gck3ZQzl06k++ckGJgL\n7CLp5bbvzinDV9peD/wI+BXp8QNLuzlGaHG2T+lm1Zu62f7sgShHBI/Qjip9u39xme0bJe0D3J4H\nXy0jPf+gQ9LPSI9A/gcpzXep9vF14IrcIf7rwvF+RBrlMis3J/wDOJFu+khsr5V0MvA/krYg9bO8\nAVhhe5akpUSTVWgCMUkwhD6SNANYbvsbg3S+XYGbbFcawx/CoIqhuiH0z6B8+5J0GnAH8OnBOF8I\nvYmaRwghhJpFzSOEEELNIniEEEKoWQSPEEIINYvgEUIIoWYRPEIIIdQsgkcIIYSa/f9WprwvSAz2\nxAAAAABJRU5ErkJggg==\n",
"text/plain": [
""
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"from numpy import arange\n",
"from math import sqrt,pi,tan,atan\n",
"%matplotlib inline\n",
"from matplotlib.pyplot import plot,subplot,title,show,xlabel,ylabel\n",
"# To design an RLC network that implements an IF quadrature FM detector \n",
"\n",
"# Given data\n",
"fc=10.7*10**6# #Cut-off frequency in Hz\n",
"B=500*10**3# #Bandwidth in Hz\n",
"phi=5# #phase shift for good system in degree\n",
"Q=tan(pi/180*phi)/((fc+B/2)/fc-fc/(fc+B/2))# #Q-factor\n",
"L=10*10**(-6)# #Chosen value of inductor\n",
"R=Q*2*pi*fc*L# #Value of Resistor\n",
"c1=12.13*10**(-12)# #Chosen value of C1\n",
"c=(Q/(R*2*pi*fc))-c1# #Value of capacitor\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n Value of Resistor required for RLC circuit = %0.3f kohm'%(R*10**(-3))#\n",
"print '\\n Value of Inductor required for RLC circuit = %0.0f microH'%(L*10**(6))#\n",
"print '\\n Value of Capacitor required for RLC circuit = %0.0f pF'%(c*10**(12))#\n",
"\n",
"# Magnitude plot\n",
"f=arange(0.95*10**7,1.2*10**7+0.1,0.05*10**7) # Frequency range for plotting in Hz\n",
"mgh=[]\n",
"for ff in f:\n",
" mgh.append((2*pi*ff*R*c1)/sqrt(1+Q**2*((ff**2-fc**2)/(ff*fc))**2)) # Magnitude transfer function\n",
"subplot(311)#\n",
"plot(f,mgh)#\n",
"#a=gca()#\n",
"#a.data_bounds=[0.95*10**7 0#1.2*10**7 2]# # To see the vertical line hiddden by the y axis\n",
"xlabel(\"Frequency\")#\n",
"ylabel(\"Magnitude\")\n",
"title(\"Magnitude response\")\n",
"\n",
"# Phase plot\n",
"f=0.95*10**7 # Initial frequency for plotting\n",
"phH=[]\n",
"for i in range(0,6):\n",
" if f<1.25*10**7 :\n",
" phH.append((pi/2)+atan(Q*((f**2-fc**2)/(f*fc)))) # Phase transfer function\n",
" f=f+0.05*10**7#\n",
" \n",
"f=arange(0.95*10**7,1.2*10**7+0.1,0.05*10**7)\n",
"subplot(313)#\n",
"plot(f,phH)#\n",
"#a=gca()#\n",
"#a.data_bounds=[0.95*10**7 1.2#1.2*10**7 2]# # To see the vertical line hiddden by the y axis\n",
"xlabel(\"Frequency\")\n",
"ylabel(\"Phase\")\n",
"title(\"Phase response\")\n",
"show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 6.5 Page no. 277"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Using Carson rule, the analog bandwidth at 3 modulation index occupied by FM signal = 40 KHz\n",
"\n",
" Using Carson rule, the analog bandwidth at 5 modulation index occupied by FM signal = 60 KHz\n",
"\n",
" Improvement in output SNR by increasing modulation index = 6.2 dB\n",
"\n",
" \n",
" This improvement is achieved at the expenses of bandwidth. For modulation index = 3, a bandwidth of 40kHz is needed,\n",
" while for modulation index = 5 requires bandwidth = 60kHz.\n"
]
}
],
"source": [
"from math import log10\n",
"# To determine the analog bandwidth, output SNR improvement if modulation index is increased from 3 to 5 and tradeoff bandwidth for this improvement.\n",
"\n",
"\n",
"# Given data\n",
"fm=5*10**3# # Audio bandwidth of FM signal\n",
"betaf1=3# # Initial modulation index\n",
"betaf2=5# # Final modulation index\n",
"\n",
"# To determine analog bandwidth\n",
"BT1=2*(betaf1+1)*fm# # The analog bandwidth\n",
"BT2=2*(betaf2+1)*fm# # The analog bandwidth\n",
"\n",
"# To determine output SNR improvement factor\n",
"SNR1=3*betaf1**3+3*betaf1**2# # Output SNR factor for modulation index=3\n",
"SNR1=10*log10(SNR1)# # Output SNR factor for modulation index=3 in dB\n",
"SNR2=3*betaf2**3+3*betaf2**2# # Output SNR factor for modulation index=3\n",
"SNR2=10*log10(SNR2)# # Output SNR factor for modulation index=3 in dB\n",
"\n",
"# To determine improvement in output SNR by increasing modulation index\n",
"improvedSNR=SNR2-SNR1# # Improvement in output SNR by increasing modulation index\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n Using Carson rule, the analog bandwidth at 3 modulation index occupied by FM signal = %0.0f KHz'%(BT1*10**-3)#\n",
"print '\\n Using Carson rule, the analog bandwidth at 5 modulation index occupied by FM signal = %0.0f KHz'%(BT2*10**-3)#\n",
"print '\\n Improvement in output SNR by increasing modulation index = %0.1f dB'%(improvedSNR)#\n",
"print '\\n \\n This improvement is achieved at the expenses of bandwidth. For modulation index = 3, a bandwidth of 40kHz is needed,\\n while for modulation index = 5 requires bandwidth = 60kHz.'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 6.6 Page no. 280"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" The maximum theoretical datarate = 199.75 kbps\n",
"\n",
" The USDC data rate is 48.6 kbps, which is only about one fourth the theoretical limit under 20dB SNR condition.\n"
]
}
],
"source": [
"from math import log10\n",
"# To determine the maximum theoretical datarate and to compare this rate to US digital cellular standard\n",
"\n",
"\n",
"# Given data\n",
"SNR=20# # Signal to noise ratio of wireless communication link in dB\n",
"B=30*10**3# # RF bandwidth in Hz\n",
"SNR=10**(SNR/10)# # Signal to noise ratio of wireless communication link\n",
"\n",
"# To determine the maximum theoretical datarate \n",
"C=B*(log10(1+SNR)/log10(2))# # The maximum theoretical datarate in bps\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The maximum theoretical datarate = %0.2f kbps'%(C*10**-3)#\n",
"print '\\n The USDC data rate is 48.6 kbps, which is only about one fourth the theoretical limit under 20dB SNR condition.'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 6.7 Page no. 280"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" The maximum theoretical datarate for 10dB SNR = 691.886 kbps\n",
"\n",
" The maximum theoretical datarate for 30dB SNR = 1.99 Mbps\n",
"\n",
" \n",
" The GSM data rate is 270.833 kbps, which is only about 40 percent of the theoretical limit of 10dB SNR condition\n",
" and about 14 percent of theoretical limit of 30dB SNR condition\n"
]
}
],
"source": [
"from math import log10\n",
"# To determine the maximum theoretical datarate and to compare this rate to GSM standard\n",
"\n",
"\n",
"# Given data\n",
"SNR1=10# # Signal to noise ratio in dB\n",
"SNR2=30# # Signal to noise ratio in dB\n",
"B=200*10**3# # RF bandwidth of channel in Hz\n",
"\n",
"SNR1=10**(SNR1/10)# # Signal to noise ratio\n",
"SNR2=10**(SNR2/10)# # Signal to noise ratio\n",
"\n",
"# To determine the maximum theoretical datarate\n",
"C1=B*(log10(1+SNR1)/log10(2))# # The maximum theoretical datarate for SNR=10dB\n",
"C2=B*(log10(1+SNR2)/log10(2))# # The maximum theoretical datarate for SNR=30dB\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The maximum theoretical datarate for 10dB SNR = %0.3f kbps'%(C1*10**-3)#\n",
"print '\\n The maximum theoretical datarate for 30dB SNR = %0.2f Mbps'%(C2*10**-6)#\n",
"print '\\n \\n The GSM data rate is 270.833 kbps, which is only about 40 percent of the theoretical limit of 10dB SNR condition\\n and about 14 percent of theoretical limit of 30dB SNR condition'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 6.8 Page no. 291"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" The first zero-crossing RF bandwidth of rectangular pulse = 48.71 kHz\n",
"\n",
" The first zero-crossing RF bandwidth of cosine filter pulse = 32.88 kHz\n"
]
}
],
"source": [
"# To find the first zero-crossing RF bandwidth of rectangular pulse and compare to raised cosine filter pulse\n",
"\n",
"\n",
"# Given data\n",
"RectTs=41.06*10**-6# # Symbol period of rectangular pulse\n",
"cosineTs=41.06*10**-6# # Symbol period of cosine filter pulse\n",
"alpha=0.35# # Rolloff factor of cosine filter pulse\n",
"\n",
"# To find the first zero-crossing RF bandwidth of rectangular pulse\n",
"B1=2/RectTs# # The first zero-crossing RF bandwidth of rectangular pulse\n",
"\n",
"# The first zero-crossing RF bandwidth of cosine filter pulse\n",
"B2=(1/cosineTs)*(1+alpha)# # The first zero-crossing RF bandwidth of cosine filter pulse\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The first zero-crossing RF bandwidth of rectangular pulse = %0.2f kHz'%(B1*10**-3)#\n",
"print '\\n The first zero-crossing RF bandwidth of cosine filter pulse = %0.2f kHz'%(B2*10**-3)#"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 6.9 Page no. 307"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Phase of signal during transmission of first bit pair 00 = -135 degree\n",
"\n",
" In-phase pulse produced during transmission of first bit pair 00 = -0.707\n",
"\n",
" Quadrature pulse produced during transmission of first bit pair 00 = -0.707\n",
"\n",
" \n",
" Phase of signal during transmission of second bit pair 10 = -180 degree\n",
"\n",
" In-phase pulse produced during transmission of second bit pair 10 = -1\n",
"\n",
" Quadrature pulse produced during transmission of second bit pair 10 = -0\n",
"\n",
" \n",
" Phase of signal during transmission of third bit pair 11 = -135 degree\n",
"\n",
" In-phase pulse produced during transmission of third bit pair 11 = -0.707\n",
"\n",
" Quadrature pulse produced during transmission of third bit pair 11 = -0.707\n"
]
}
],
"source": [
"from math import pi,sin,cos\n",
"# To determine phase and values of Ik and Qk during transmission of bit stream 001011 using pi/4 DQPSK.\n",
"\n",
"\n",
"# Given data\n",
"theta0=0# # Initial phase in rad\n",
"phi1=pi/4# # Carrier phase shift for the input bit pair 11 [Feh91], [Rap91b]\n",
"phi2=(3*pi)/4# # Carrier phase shift for the input bit pair 01 [Feh91], [Rap91b]\n",
"phi3=(-3*pi)/4# # Carrier phase shift for the input bit pair 00 [Feh91], [Rap91b]\n",
"phi4=-pi/4# # Carrier phase shift for the input bit pair 10 [Feh91], [Rap91b]\n",
"\n",
"# For transmission of first pair of bits 00\n",
"theta1=theta0+phi3# # Phase of signal during transmission of first bit pair 00\n",
"I1=cos(theta1)# # In-phase pulse produced at the output of signal mapping\n",
"Q1=sin(theta1)# # Quadrature pulse produced at the output of signal mapping\n",
"\n",
"# For transmission of second pair of bits 10\n",
"theta2=theta1+phi4# # Phase of signal during transmission of second bit pair 10\n",
"I2=cos(theta2)# # In-phase pulse produced at the output of signal mapping\n",
"Q2=sin(theta2)# # Quadrature pulse produced at the output of signal mapping\n",
"\n",
"# For transmission of third pair of bits 11\n",
"theta3=theta2+phi1# # Phase of signal during transmission of third bit pair 11\n",
"I3=cos(theta3)# # In-phase pulse produced at the output of signal mapping\n",
"Q3=sin(theta3)# # Quadrature pulse produced at the output of signal mapping\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n Phase of signal during transmission of first bit pair 00 = %0.0f degree'%(theta1*(180/pi))#\n",
"print '\\n In-phase pulse produced during transmission of first bit pair 00 = %0.3f'%(I1)#\n",
"print '\\n Quadrature pulse produced during transmission of first bit pair 00 = %0.3f'%(Q1)#\n",
"\n",
"print '\\n \\n Phase of signal during transmission of second bit pair 10 = %0.0f degree'%(theta2*(180/pi))#\n",
"print '\\n In-phase pulse produced during transmission of second bit pair 10 = %0.0f'%(I2)#\n",
"print '\\n Quadrature pulse produced during transmission of second bit pair 10 = %0.0f'%(Q2)#\n",
"\n",
"print '\\n \\n Phase of signal during transmission of third bit pair 11 = %0.0f degree'%(theta3*(180/pi))#\n",
"print '\\n In-phase pulse produced during transmission of third bit pair 11 = %0.3f'%(I3)#\n",
"print '\\n Quadrature pulse produced during transmission of third bit pair 11 = %0.3f'%(Q3)#"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 6.10 Page no. 310"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"S1 = 0\n",
"\n",
" S2 = 0\n",
"\n",
" S3 = 1\n",
"\n",
" S4 = 0\n",
"\n",
" S5 = 1\n",
"\n",
" S6 = 1\n"
]
}
],
"source": [
"# To demonstrate how the received signal is detected properly using baseband differential detector.\n",
"\n",
"\n",
"# Given data\n",
"x1=-0.707#\n",
"y1=-0.707#\n",
"x2=0.707#\n",
"y2=-0.707#\n",
"x3=0.707#\n",
"y3=0.707#\n",
"\n",
"if x1<0:\n",
" print 'S1 = 0'\n",
"else:\n",
" print '\\n S1 = 1' \n",
" \n",
"if y1<0:\n",
" print '\\n S2 = 0'\n",
"else:\n",
" print '\\n S2 = 1' \n",
"\n",
"if x2<0 :\n",
" print '\\n S3 = 0'\n",
"else:\n",
" print '\\n S3 = 1' \n",
" \n",
"if y2<0:\n",
" print '\\n S4 = 0'\n",
"else:\n",
" print '\\n S4 = 1' \n",
" \n",
"if x3<0:\n",
" print '\\n S5 = 0'\n",
"else:\n",
" print '\\n S5 = 1' \n",
" \n",
"if y3<0 :\n",
" print '\\n S6 = 0'\n",
"else:\n",
" print '\\n S6 = 1' "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 6.11 Page no. 321"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" The 3-dB bandwidth-bit duration product = 67.500 kHz\n",
"\n",
" The 90 percent power bandwidth = 153.9 kHz\n"
]
}
],
"source": [
"from __future__ import division\n",
"# To find 3-dB bandwidth for gaussian low pass filter to produce 0.25GMSK, 90% power bandwidth.\n",
"\n",
"\n",
"# Given data\n",
"Rb=270*10**3# # Channel data rate in bps\n",
"BT=0.25# # 3-dB bandwidth-bit duration product\n",
"\n",
"T=1/Rb# # Time\n",
"B=BT/T# # 3-dB bandwidth in Hz\n",
"# Answer is varrying due to round-off error\n",
"\n",
"# 90% power bandwidth\n",
"B1=0.57*Rb# # The 90% power bandwidth\n",
"# Answer is varrying due to round-off error\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The 3-dB bandwidth-bit duration product = %0.3f kHz'%(B*10**-3)#\n",
"print '\\n The 90 percent power bandwidth = %0.1f kHz'%(B1*10**-3)#"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 6.12 Page no. 321"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" The 3-dB bandwidth-bit duration product = 66.500 kHz\n",
"\n",
" The 90 percent power bandwidth = 108.3 kHz\n"
]
}
],
"source": [
"from __future__ import division\n",
"# To find 3-dB bandwidth for gaussian low pass filter to produce 0.25GMSK, 90% power bandwidth.\n",
"\n",
"\n",
"# Given data\n",
"Rb=190*10**3# # Channel data rate in bps\n",
"BT=0.35# # 3-dB bandwidth-bit duration product\n",
"\n",
"T=1/Rb# # Time\n",
"B=BT/T# # 3-dB bandwidth in Hz\n",
"# Answer is varrying due to round-off error\n",
"\n",
"# 90% power bandwidth\n",
"B1=0.57*Rb# # The 90% power bandwidth\n",
"# Answer is varrying due to round-off error\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The 3-dB bandwidth-bit duration product = %0.3f kHz'%(B*10**-3)#\n",
"print '\\n The 90 percent power bandwidth = %0.1f kHz'%(B1*10**-3)#"
]
}
],
"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
}
PKŠ„I¯Þu<Wireless Communications Principles and Practices/Chap7.ipynb{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter No.7 : Equalization diversity and channel coding"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 7.3 Page no. 373"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" The maximum Doppler shift = 66.67 Hz\n",
"\n",
" The coherence time of the channel = 6.35 ms\n",
"\n",
" The maximum number of symbols that could be transmitted with symbol rate 24.3 ksymbols/sec = 154 symbols\n"
]
}
],
"source": [
"from __future__ import division\n",
"from math import pi,sqrt\n",
"# To determine a)the maximum Doppler shift b)the coherence time of the channel c)the maximum number of symbolsthat could be transmitted\n",
"\n",
"\n",
"#Given data\n",
"f=900*10**6# # Carrier frequency in Hz\n",
"c=3*10**8# # Speed of ligth in air (m/s)\n",
"v=80# # Velocity of mobile in km/hr\n",
"v=v*(5/18)# # Velocity of mobile in m/s\n",
"lamda=c/f# # Carrier wavelength in meter\n",
"\n",
"# a)To determine the maximum Doppler shift\n",
"fd=v/lamda# # The maximum Doppler shift in Hz\n",
"\n",
"# b)To determine the coherence time of the channel\n",
"Tc=sqrt(9/(16*pi*fd**2))# # The coherence time of the channel\n",
"# Answer is varrying due to round-off error\n",
"\n",
"# c)To determine the maximum number of symbols that could be transmitted with symbol rate 24.3 ksymbols/sec\n",
"Rs=24.3*10**3# # Symbol rate in symbols/sec\n",
"Nb=Tc*Rs# # The maximum number of transmitted symbols\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The maximum Doppler shift = %0.2f Hz'%(fd)#\n",
"print '\\n The coherence time of the channel = %0.2f ms'%(Tc*10**3)#\n",
"print '\\n The maximum number of symbols that could be transmitted with symbol rate 24.3 ksymbols/sec = %0.0f symbols'%(Nb)#"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 7.4 Page no. 383"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Probability that the SNR will drop below 10dB when 4 branch diversity is used = 0.000082\n",
"\n",
" Probability that the SNR will drop below 10dB when single branch diversity is used = 0.095\n",
"\n",
" \n",
" From above results, it is observed that without diversity the SNR drops below the specified threshold with a probability that is three orders of magnitude greater \n",
" than if four branch diversity is used.\n"
]
}
],
"source": [
"from __future__ import division\n",
"from math import exp\n",
"# To determine probability that the SNR will drop below threshold SNR\n",
"\n",
"\n",
"# Given data\n",
"M1=4# # Number of branch diversity\n",
"M2=1# # Number of branch diversity\n",
"gamm=10# # Specified SNR threshold in dB\n",
"gamm=10**(gamm/10)# # Specified SNR threshold\n",
"Gamma=20# # Average SNR in dB\n",
"Gamma=10**(Gamma/10)# # Average SNR\n",
"\n",
"# Probability that the SNR will drop below 10dB when 4 branch diversity is used\n",
"P4=(1-exp(-gamm/Gamma))**M1# # Probability that the SNR will drop below 10dB\n",
"\n",
"# Probability that the SNR will drop below 10dB when single branch diversity is used\n",
"P1=(1-exp(-gamm/Gamma))**M2# # Probability that the SNR will drop below 10dB\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n Probability that the SNR will drop below 10dB when 4 branch diversity is used = %0.6f'%(P4)#\n",
"print '\\n Probability that the SNR will drop below 10dB when single branch diversity is used = %0.3f'%(P1)#\n",
"print '\\n \\n From above results, it is observed that without diversity the SNR drops below the specified threshold with a probability that is three orders of magnitude greater \\n than if four branch diversity is used.'"
]
}
],
"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
}
PKŠ„IÀÚ3*/*/<Wireless Communications Principles and Practices/Chap8.ipynb{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter No. 8 : Speech coding"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 8.1 Page no. 420"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" The mean square error distortion = 0.333\n",
"\n",
" The output signal-to-distortion ratio = 19.82 dB\n",
"\n",
" To minimize the distortion, we need to place the quantization levels closer at amplitudes close to 8 and farther at amplitudes close to zero.\n",
"\n",
" This quantizer would be optimal for an input with a uniform pdf.\n"
]
}
],
"source": [
"from sympy.mpmath import quad\n",
"from math import log10\n",
"# To compute the mean square error distortion and output signal-to-distortion ratio.\n",
"\n",
"#Given data\n",
"l1=1# # 1st Quantization level\n",
"l2=3# # 2nd Quantization level\n",
"l3=5# # 3rd Quantization level\n",
"l4=7# # 4th Quantization level\n",
"\n",
"U1=(l1+l2)/2# # upper boundary of 1st level\n",
"U2=(l2+l3)/2# # upper boundary of 2nd level\n",
"U3=(l3+l4)/2# # upper boundary of 3rd level\n",
"U4=l4+(U1-l1)# # upper boundary of 4th level\n",
"L1=l1-(U1-l1)# # Lower boundary of 1st level\n",
"\n",
"D1=quad(lambda x:(x**3-2*x**2+x)/32,[L1,U1]) # Mean square error distortion of 1st level\n",
"D2=quad(lambda x:(x**3-6*x**2+9*x)/32,[U1,U2])# # Mean square error distortion of 2nd level\n",
"D3=quad(lambda x:(x**3-10*x**2+25*x)/32,[U2,U3])# # Mean square error distortion of 3rd level\n",
"D4=quad(lambda x:(x**3-14*x**2+49*x)/32,[U3,U4])# # Mean square error distortion of 4th level\n",
"D=D1+D2+D3+D4# # Total square error distortion\n",
"\n",
"P=quad(lambda x:x**3/32,[L1,U4])# # Signal power\n",
"\n",
"SDR=10*log10(P/D)# # Output signal-to-distortion ratio.\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The mean square error distortion = %0.3f'%(D)#\n",
"print '\\n The output signal-to-distortion ratio = %0.2f dB'%(SDR)#\n",
"print '\\n To minimize the distortion, we need to place the quantization levels closer at amplitudes close to 8 and farther at amplitudes close to zero.'\n",
"print '\\n This quantizer would be optimal for an input with a uniform pdf.'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 8.2 Page no. 424"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Effective transmission bit rate = 64.5 kbps\n",
"\n",
" Peak signal to quantization noise ratio = 52.93 dB\n",
"\n",
" Average signal to quantization noise ratio = 48.16 dB\n"
]
}
],
"source": [
"# To compute transmission bit rate, average and peak signal to quantization noise ratio\n",
"\n",
"\n",
"# Given data\n",
"fs=8*10**3# # Sampling frequency in Hz\n",
"n=8# # Number of bits per sample\n",
"stepsize=10*10**-3# # Time after which step size is recomputed\n",
"overhead=5# # Number of overhead bits\n",
"\n",
"N=fs*n# # Number of information bits pe second\n",
"Toverhead=overhead/stepsize# # The number of overhead bits/second\n",
"\n",
"# Effective transmission bit rate\n",
"bitrate=N+Toverhead# # Transmission bit rate in bps\n",
"\n",
"# Peak signal to quantization noise ratio\n",
"PSQNR=6.02*n+4.77# # Peak signal to quantization noise ratio in dB\n",
"\n",
"# Average signal to quantization noise ratio\n",
"ASQNR=6.02*n# # Average signal to quantization noise ratio in dB\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n Effective transmission bit rate = %0.1f kbps'%(bitrate*10**-3)#\n",
"print '\\n Peak signal to quantization noise ratio = %0.2f dB'%(PSQNR)#\n",
"print '\\n Average signal to quantization noise ratio = %0.2f dB'%(ASQNR)#"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 8.3 Page no. 427"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Total encoding rate = 8.3 kbps\n"
]
}
],
"source": [
"# To compute the minimum encoding rateof given 4 sub-band coder\n",
"\n",
"\n",
"# Given data\n",
"N=4# # Total number of sub-bands\n",
"L1=225# # Lower limit of first sub-band\n",
"U1=450# # Lower limit of first sub-band\n",
"L2=450# # Lower limit of second sub-band\n",
"U2=900# # Lower limit of second sub-band\n",
"L3=1000# # Lower limit of third sub-band\n",
"U3=1500# # Lower limit of third sub-band\n",
"L4=1800# # Lower limit of fourth sub-band\n",
"U4=2700# # Lower limit of fourth sub-band\n",
"E1=4# # Encoding bit of first sub-band\n",
"E2=3# # Encoding bit of second sub-band\n",
"E3=2# # Encoding bit of third sub-band\n",
"E4=1# # Encoding bit of fourth sub-band\n",
"\n",
"# Sampling rate of the sub-bands according to Nyquist theorem\n",
"sr1=2*(U1-L1)# # Sampling rate of first sub-band in samples/second\n",
"sr2=2*(U2-L2)# # Sampling rate of second sub-band in samples/second\n",
"sr3=2*(U3-L3)# # Sampling rate of third sub-band in samples/second\n",
"sr4=2*(U4-L4)# # Sampling rate of fourth sub-band in samples/second\n",
"\n",
"# Total encoding rate\n",
"SR=sr1*E1+sr2*E2+sr3*E3+sr4*E4# # Total encoding rate in bps\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n Total encoding rate = %0.1f kbps'%(SR*10**-3)#"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 8.4 Page no. 439"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Maximum net data rate = 10.5 kbps\n"
]
}
],
"source": [
"from __future__ import division\n",
"# To find the upper bound of the transmission bit rate\n",
"\n",
"\n",
"# Given data\n",
"FL=810*10**6# # Lower limit of forward channel frequency band\n",
"FU=826*10**6# # Upper limit of forward channel frequency band\n",
"N=1150# # Number of simultaneous users#\n",
"SE=1.68# # Spectral efficiency in bps/Hz\n",
"CR=0.5# # Coder rate\n",
"bandused=90/100# # 90% bandwidth is used\n",
"\n",
"bandwidth=bandused*(FU-FL)# # Total bandwidth available for traffic channels in Hz\n",
"Cbandwidth=bandwidth/N# # Maximum channel bandwidth in Hz\n",
"ChannelDR=SE*Cbandwidth# # Maximum channel data rate in bps\n",
"DR=ChannelDR*CR# # Maximum net data rate in bps\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n Maximum net data rate = %0.1f kbps'%(DR*10**-3)#"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 8.5 Page no. 439"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" The gross channel bit rate = 16.75 kbps\n"
]
}
],
"source": [
"from __future__ import division\n",
"# To compute the gross channel data rate\n",
"\n",
"\n",
"# Given data\n",
"t=20*10**-3# # Duration of encoding of one block in second\n",
"B1=50# # The first bits in Type-1 channel\n",
"CRC1=10# # Number of CRC bits in Type-1 channel\n",
"FEC=0.5# # FEC rate for Type-1 channel\n",
"B2=132# # Next bits in Type-2 channel\n",
"CRC2=5# # Number of CRC bits in Type-2 channel\n",
"B3=78# # The last bits in Type-3 channel\n",
"\n",
"N1=(B1+CRC1)/FEC# # Total number of bits transmitted in Type-1 channel\n",
"N2=(B2+CRC2)# # Total number of bits transmitted in Type-2 channel\n",
"N3=B3# # Total number of bits transmitted in Type-3 channel\n",
"N=N1+N2+N3# # Total number of channel bits transmitted enery t seconda\n",
"\n",
"# The gross channel data rate\n",
"BR=N/t# # The gross channel data rate in bps\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The gross channel bit rate = %0.2f kbps'%(BR*10**-3)#\n"
]
}
],
"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
}
PKŠ„I1 ¶¸,C,C<Wireless Communications Principles and Practices/Chap9.ipynb{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chapter No.9 : Multiple access techniques for wireless communications"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 9.1 Page no. 451"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" IF frequency 1930 MHz lies inside the band\n",
"\n",
" IF frequency 1926 MHz lies inside the band\n",
"\n",
" IF frequency 1922 MHz lies inside the band\n",
"\n",
" IF frequency 1918 MHz lies inside the band\n",
"\n",
" IF frequency 1928 MHz lies inside the band\n",
"\n",
" IF frequency 1924 MHz lies inside the band\n",
"\n",
" IF frequency 1920 MHz lies inside the band\n",
"\n",
" IF frequency 1916 MHz lies inside the band\n",
"\n",
" IF frequency 1932 MHz lies inside the band\n",
"\n",
" IF frequency 1936 MHz lies inside the band\n",
"\n",
" IF frequency 1940 MHz lies inside the band\n",
"\n",
" IF frequency 1944 MHz lies outside the band\n",
"\n",
" IF frequency 1934 MHz lies inside the band\n",
"\n",
" IF frequency 1938 MHz lies inside the band\n",
"\n",
" IF frequency 1942 MHz lies outside the band\n",
"\n",
" IF frequency 1946 MHz lies outside the band\n"
]
}
],
"source": [
"# To find the intermodulation frequencies generated \n",
"\n",
"\n",
"# Given data\n",
"f1=1930# # First carrier frequency\n",
"f2=1932# # second carrier frequency\n",
"F1=1920# # Lower frequency of the band\n",
"F2=1940# # Upper frequency of the band\n",
"\n",
"for n in range(0,4):\n",
" x1=(2*n+1)*f1-2*n*f2\n",
" if x1 <= F2:\n",
" print '\\n IF frequency %0.0f MHz lies inside the band'%(x1)#\n",
" else:\n",
" print '\\n IF frequency %0.0f MHz lies outside the band'%(x1)#\n",
" \n",
"\n",
"\n",
"for n in range(0,4):\n",
" x2=(2*n+2)*f1-(2*n+1)*f2\n",
" if x2 <= F2:\n",
" print '\\n IF frequency %0.0f MHz lies inside the band'%(x2)#\n",
" else:\n",
" print '\\n IF frequency %0.0f MHz lies outside the band'%(x2)#\n",
" \n",
"for n in range(0,4):\n",
" x3=(2*n+1)*f2-2*n*f1\n",
" if x3 <= F2 :\n",
" print '\\n IF frequency %0.0f MHz lies inside the band'%(x3)#\n",
" else:\n",
" print '\\n IF frequency %0.0f MHz lies outside the band'%(x3)#\n",
" \n",
"for n in range(0,4):\n",
" x4=(2*n+2)*f2-(2*n+1)*f1\n",
" if x4 <= F2:\n",
" print '\\n IF frequency %0.0f MHz lies inside the band'%(x4)#\n",
" else:\n",
" print '\\n IF frequency %0.0f MHz lies outside the band'%(x4)#\n",
" "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 9.2 Page no. 452"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" The number of channels available in FDMA system = 416\n"
]
}
],
"source": [
"# To find number of channels available\n",
"\n",
"\n",
"# Given data\n",
"Bt=12.5*10**6# # Total spectrum allocation in Hz\n",
"Bguard=10*10**3# # Guard band allocated in Hz\n",
"Bc=30*10**3# # Channel bandwidth in Hz\n",
"\n",
"# The number of channels available\n",
"N=(Bt-2*Bguard)/Bc# # The number of channels available\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The number of channels available in FDMA system = %0.0f'%(N)#"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 9.3 Page no. 455"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" The number of simultaneous users accommodated in GSM system = 1000\n"
]
}
],
"source": [
"# To find number of simultaneous users accommodated in GSm\n",
"\n",
"\n",
"# Given data\n",
"m=8# # Maximum speech channels supported by single radio channel\n",
"Bc=200*10**3# # Radio channel bandwidth in Hz\n",
"Bt=25*10**6# # Total spectrum allocated for forward link\n",
"Bguard=0# # Guard band allocated in Hz\n",
"\n",
"# The number of simultaneous users accommodated in GSm\n",
"N=(m*(Bt-2*Bguard))/Bc# # The number of simultaneous users\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The number of simultaneous users accommodated in GSM system = %0.0f'%(N)#"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 9.4 Page no. 456"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" The time duration of a bit = 3.692 microseconds\n",
"\n",
" The time duration of a slot = 0.577 ms\n",
"\n",
" The time duration of a frame = 4.615 ms\n",
"\n",
" The arrival time of new frame for its next transmission = 4.615 ms\n"
]
}
],
"source": [
"# To find a)the time duration of a bit b)the time duration of a slot c)the time duration of a frame d)how long must a user occupying single time slot wait between two successive transmission\n",
"\n",
"\n",
"# Given data\n",
"N=8# # Number of time slots in each frame\n",
"Nb=156.25# # Number of in each time slot\n",
"DR=270.833*10**3# # Data rate of transmission in channel\n",
"\n",
"# a)To find the time duration of a bit \n",
"Tb=1/DR# # The time duration of a bit in sec\n",
"\n",
"# b)To find the time duration of a slot\n",
"Tslot=Nb*Tb# # The time duration of a slot\n",
"\n",
"# c)To find the time duration of a frame\n",
"Tf=N*Tslot# # The time duration of a frame\n",
"\n",
"#d) The waiting time between two successive transmission\n",
"Tw=Tf# # The arrival time of new frame for its next transmission\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The time duration of a bit = %0.3f microseconds'%(Tb*10**6)#\n",
"print '\\n The time duration of a slot = %0.3f ms'%(Tslot*10**3)#\n",
"print '\\n The time duration of a frame = %0.3f ms'%(Tf*10**3)#\n",
"print '\\n The arrival time of new frame for its next transmission = %0.3f ms'%(Tw*10**3)#"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 9.5 Page no. 456"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" The frame efficiency = 74.24 percentage\n"
]
}
],
"source": [
"# To find the frame efficiency\n",
"\n",
"\n",
"# Given data\n",
"Btrail=6# # Number of trailing bits per slot\n",
"Bg=8.25# # Number of guard bits per slot\n",
"Btrain=26# # Number of training bits per slot\n",
"Nb=2# # Number of burst\n",
"Bburst=58# # Number of bits in each burst\n",
"Nslot=8# # Number of slots in each frame\n",
"\n",
"N=Btrail+Bg+Btrain+2*Bburst# # Total number of bits in each slot\n",
"Nf=Nslot*N# # Total number of bits in a frame\n",
"bOH=Nslot*Btrail+Nslot*Bg+Nslot*Btrain# # Number of overhead bits per frame\n",
"\n",
"# To find the frame efficiency\n",
"nf=(1-(bOH/Nf))*100# # Frame efficiency\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The frame efficiency = %0.2f percentage'%(nf)#"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 9.6 Page no. 466"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" The maximum throughput using ALOHA = 0.1839\n",
"\n",
" The maximum throughput using slotted ALOHA = 0.3679\n"
]
}
],
"source": [
"from __future__ import division\n",
"from math import exp\n",
"# To determine the maximum throughput using ALOHA and slotted ALOHA\n",
"\n",
"\n",
"#The maximum throughput using ALOHA\n",
"Rmax=1/2# #Maximum rate of arrival calculated by equating ALOHA throughput formula derivative to zero\n",
"T=Rmax*exp(-1)# #The maximum throughput using ALOHA\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The maximum throughput using ALOHA = %0.4f'%(T)#\n",
"\n",
"#The maximum throughput using slotted ALOHA\n",
"Rmax=1# #Maximum rate of arrival calculated by equating slotted ALOHA throughput formula derivative to zero\n",
"T=Rmax*exp(-1)# #The maximum throughput using slotted ALOHA\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n The maximum throughput using slotted ALOHA = %0.4f'%(T)#"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 9.7 Page no. 472"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Minimum C/I for system A when compared to the (C/I)min for particular system = 4.375 dB\n",
"\n",
" Minimum C/I for system B when compared to the (C/I)min for particular system = 1.96 dB\n",
"\n",
" Minimum C/I for system C when compared to the (C/I)min for particular system = 6 dB\n",
"\n",
" Minimum C/I for system D when compared to the (C/I)min for particular system = 9 dB\n",
"\n",
" \n",
" Based on comparison, the smallest value of C/I should be selected for maximum capacity. So, System B offers the best capacity.\n"
]
}
],
"source": [
"from __future__ import division\n",
"from math import log10\n",
"# To evaluate 4 different radio standards and to choose the one with maximum capacity\n",
"\n",
"\n",
"# Given data\n",
"ABc=30*10**3# # Channel bandwidth of system A\n",
"ACImin=18# # The tolerable value of carrier to interference ratio for system A\n",
"BBc=25*10**3# # Channel bandwidth of system B\n",
"BCImin=14# # The tolerable value of carrier to interference ratio for system B\n",
"CBc=12.5*10**3# # Channel bandwidth of system C\n",
"CCImin=12# # The tolerable value of carrier to interference ratio for system C # Value of CCImin is given wrong in book\n",
"DBc=6.25*10**3# # Channel bandwidth of system D\n",
"DCImin=9# # The tolerable value of carrier to interference ratio for system D\n",
"Bc=6.25*10**3# # Bandwidth of particular system\n",
"\n",
"ACIeq=ACImin+20*log10(Bc/ABc)# # Minimum C/I for system A when compared to the (C/I)min for particular system\n",
"BCIeq=BCImin+20*log10(Bc/BBc)# # Minimum C/I for system B when compared to the (C/I)min for particular system\n",
"CCIeq=CCImin+20*log10(Bc/CBc)# # Minimum C/I for system C when compared to the (C/I)min for particular system\n",
"DCIeq=DCImin+20*log10(Bc/DBc)# # Minimum C/I for system D when compared to the (C/I)min for particular system\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n Minimum C/I for system A when compared to the (C/I)min for particular system = %0.3f dB'%(ACIeq)#\n",
"print '\\n Minimum C/I for system B when compared to the (C/I)min for particular system = %0.2f dB'%(BCIeq)#\n",
"print '\\n Minimum C/I for system C when compared to the (C/I)min for particular system = %0.0f dB'%(CCIeq)# \n",
"print '\\n Minimum C/I for system D when compared to the (C/I)min for particular system = %0.0f dB'%(DCIeq)#\n",
"print '\\n \\n Based on comparison, the smallest value of C/I should be selected for maximum capacity. So, System B offers the best capacity.'"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example no 9.9 Page no. 472"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Maximum number of users using omnidirectional base station antenna and no voice activity = 14\n",
"\n",
" Maximum number of users using three-sectors at the base station antenna and voice activity (with alpha=3/8) = 107\n"
]
}
],
"source": [
"# To determine the maximum number of users using a)omnidirectional base station antenna and no voice activity b)three-sectors at the base station and voice activity detection\n",
"\n",
"\n",
"# Given data\n",
"W=1.25*10**6# # Total RF bandwidth in Hz\n",
"R=9600# # Baseband information bit rate in bps\n",
"EbNo=10# # Minimum acceptable SNR in dB\n",
"\n",
"# a)Maximum number of users using omnidirectional base station antenna and no voice activity\n",
"N1=1+(W/R)/EbNo# # Maximum number of users using omnidirectional\n",
"\n",
"# b)Maximum number of users using three-sectors at the base station antenna and voice activity with alpha=3/8\n",
"alpha=3/8# # Voice activity factor\n",
"Ns=1+(1/alpha)*((W/R)/EbNo)# # Maximum number of users\n",
"N2=3*Ns# # Maximum number of users using three-sectors\n",
"\n",
"# Displaying the result in command window\n",
"print '\\n Maximum number of users using omnidirectional base station antenna and no voice activity = %0.0f'%(N1)#\n",
"print '\\n Maximum number of users using three-sectors at the base station antenna and voice activity (with alpha=3/8) = %0.0f'%(N2)#"
]
}
],
"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
}
PKŠ„I;d‚Z$Z$<ÿWireless Communications Principles and Practices/Chap2.ipynbPKŠ„I;C·½¯e¯e<ÿ´$Wireless Communications Principles and Practices/Chap3.ipynbPKŠ„I’1Ù—w—w<ÿ½ŠWireless Communications Principles and Practices/Chap4.ipynbPKŠ„Ikò‘aÄmÄm<ÿ®Wireless Communications Principles and Practices/Chap5.ipynbPKŠ„I¥¦ýí¯í¯<ÿÌpWireless Communications Principles and Practices/Chap6.ipynbPKŠ„I¯Þu<ÿ!Wireless Communications Principles and Practices/Chap7.ipynbPKŠ„IÀÚ3*/*/<ÿ†6Wireless Communications Principles and Practices/Chap8.ipynbPKŠ„I1 ¶¸,C,C<ÿ
fWireless Communications Principles and Practices/Chap9.ipynbPKP©