{
"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
}