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