summaryrefslogtreecommitdiff
path: root/Wireless_Communications_and_Networking_by_V._Garg/ch17.ipynb
diff options
context:
space:
mode:
authorThomas Stephen Lee2015-09-07 17:46:06 +0530
committerThomas Stephen Lee2015-09-07 17:46:06 +0530
commit79c8f29f70cc014d5fd8b9900d3c19309134bc1d (patch)
treeb26d3d68ef4d478b7f75a3ec1c5076027bef56ce /Wireless_Communications_and_Networking_by_V._Garg/ch17.ipynb
parent64419e47f762802600b3a2b6d8c433a16ccd3d55 (diff)
downloadPython-Textbook-Companions-79c8f29f70cc014d5fd8b9900d3c19309134bc1d.tar.gz
Python-Textbook-Companions-79c8f29f70cc014d5fd8b9900d3c19309134bc1d.tar.bz2
Python-Textbook-Companions-79c8f29f70cc014d5fd8b9900d3c19309134bc1d.zip
add/update books
Diffstat (limited to 'Wireless_Communications_and_Networking_by_V._Garg/ch17.ipynb')
-rwxr-xr-xWireless_Communications_and_Networking_by_V._Garg/ch17.ipynb769
1 files changed, 769 insertions, 0 deletions
diff --git a/Wireless_Communications_and_Networking_by_V._Garg/ch17.ipynb b/Wireless_Communications_and_Networking_by_V._Garg/ch17.ipynb
new file mode 100755
index 00000000..708d447e
--- /dev/null
+++ b/Wireless_Communications_and_Networking_by_V._Garg/ch17.ipynb
@@ -0,0 +1,769 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:029905df97aa37359789733a28b442f75b82e79e7e96006449e39c092f0d4cca"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 17: Planning and Design of a Wireless Network"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.1, Page 597"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "Susage=150.;#subscriber usage per month in mins\n",
+ "days=24;#days per month\n",
+ "busyhrs=6;#in a day\n",
+ "BW=4.8*10**3; #in kHz\n",
+ "Freqreuse=4./12;#Frequency reuse plan\n",
+ "chwidth=200; #in kHz\n",
+ "subscriber=50000;#Present subscriber count\n",
+ "Sgrowth=0.05;#Growth rate per year\n",
+ "Area=500; #in km\n",
+ "BTScapacity=30; #in Erlangs\n",
+ "N=4; #Initial installation design years\n",
+ " \n",
+ "#Calculations&Results\n",
+ "Erlangspersub=Susage/(days*busyhrs*60);\n",
+ "print 'Average busy-hour traf\ufb01c per subscriber is %.4f Erlangs'%Erlangspersub;\n",
+ "RFcarriers=BW/chwidth;\n",
+ "RFcarrier_percell=RFcarriers/((Freqreuse**-1)*4); #freq reuse factor of 4\n",
+ "\n",
+ "#Assuming 2 control channels per cell\n",
+ "CC=2;#control channels\n",
+ "TC_percell=2*RFcarriers/3-CC;\n",
+ "#Referring Erlang-B table in Appendix A\n",
+ "print \"Referring Erlang-B table in Appendix A,Traf\ufb01c capacity of a GSM cell at 2% GoS for 14 channels = 8.2 Erlangs \"\n",
+ "Tcapacity=8.2;# in Erlangs\n",
+ "print \"There are 3 cells per BTS\"\n",
+ "BTS=3;\n",
+ "Traffic_perBTS=Tcapacity*BTS;\n",
+ "print 'Traffic capacity per BTS is %.1f Erlangs'%Traffic_perBTS\n",
+ "print \"Therefore, Traffic per BTS is less than BTS capacity(30 Erlangs)\"\n",
+ "maxsubscriber=Traffic_perBTS/Erlangspersub;\n",
+ "initialsub=subscriber*(1+Sgrowth)**N;\n",
+ "BTS_perZone=initialsub/maxsubscriber;\n",
+ "print 'The required number of base stations per zone are %d'%(round(BTS_perZone));\n",
+ "cellRadius=(Area/(BTS_perZone*2.6))**0.5;\n",
+ "print 'The hexagonal cell radius is %.1f km'%cellRadius;"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Average busy-hour traf\ufb01c per subscriber is 0.0174 Erlangs\n",
+ "Referring Erlang-B table in Appendix A,Traf\ufb01c capacity of a GSM cell at 2% GoS for 14 channels = 8.2 Erlangs \n",
+ "There are 3 cells per BTS\n",
+ "Traffic capacity per BTS is 24.6 Erlangs\n",
+ "Therefore, Traffic per BTS is less than BTS capacity(30 Erlangs)\n",
+ "The required number of base stations per zone are 43\n",
+ "The hexagonal cell radius is 2.1 km\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.2, Page 598"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "usage=150.; #subscriber usage per month in mins\n",
+ "days=24;#Days in a month\n",
+ "BHrs=6;#Busy hours per day\n",
+ "BW=4.8; #in MHz\n",
+ "RFch=200; #in kHz\n",
+ "Psubscribers=50000;#present subscriber count\n",
+ "growth=0.05;#subscriber growth per year\n",
+ "rollover=4;#network roll over period\n",
+ "NPCS=5;#Number of packet calls per session \n",
+ "NPP=25;#Number of packets within a packet call \n",
+ "Tr=120;#Reading time between packet calls(sec)\n",
+ "NBP=480*8;#Packet size(in bits)\n",
+ "Tint=0.01;#Time interval between two packets(sec)\n",
+ "Ttot=3000;#Total packet service holding time\n",
+ "BH_PS=0.15;#Busy hour packet sessions per subscriber\n",
+ "Penetration=0.25;\n",
+ "datarate=48; #in kbps\n",
+ "PTT=10;#Packet transmission time(sec)\n",
+ "BTS=40;#NO of BTS sites\n",
+ "\n",
+ "#Calculations&Results\n",
+ "Bitstx_duringPTT=NPCS*NPP*NBP/1000; \n",
+ "PST=PTT+Tr*(NPCS-1)+Tint*(NPP-1);\n",
+ "PT_duringBH=BH_PS*Ttot/PST;\n",
+ "Bits_persub_persec=Bitstx_duringPTT*PT_duringBH/(60*60);\n",
+ "VoiceErlangs=usage/(days*BHrs*60);\n",
+ "Initial_subscribers=round(Psubscribers*(1+growth)**rollover);\n",
+ "Data_subscribers=Initial_subscribers*Penetration;\n",
+ "Totalvoice=Initial_subscribers*VoiceErlangs;\n",
+ "Voicetraffic_perBTS=Totalvoice/BTS;\n",
+ "print 'Voice Traffic per Cell(sector) is %.2f Erlangs'%(Voicetraffic_perBTS/3);\n",
+ "Totaldata=Data_subscribers*Bits_persub_persec;\n",
+ "Datathroughput_perBTS=Totaldata/BTS;\n",
+ "print 'Data throughput per Cell(sector) is %.2f kbps'%(Datathroughput_perBTS/3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Voice Traffic per Cell(sector) is 8.79 Erlangs\n",
+ "Data throughput per Cell(sector) is 15.50 kbps\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.3, Page 600"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Holdtime=120;#Average holding time during Busy Hours(in sec)\n",
+ "Tx=3;# No of transreceivers\n",
+ "TSsig=3;#No of TSs per cell for signaling\n",
+ "RLC=0.80;#Radio link control efficiency\n",
+ "Radioblocks=9000;#Total numbers of transmitted radio blocks\n",
+ "TSdata=3;#TSs allocated for data traf\ufb01c per cell\n",
+ "Datarate=15.5; #From eg 17.2\n",
+ "Voicetraffic=8.82; #From eg.17.2\n",
+ "Duration=0.02;#Duration of block in sec\n",
+ "\n",
+ "#Calculations&Results\n",
+ "DataEr=Radioblocks*Duration/Holdtime;\n",
+ "print 'Data Erlangs = %.1f'%DataEr;\n",
+ "TSuti=DataEr/TSsig;\n",
+ "print 'Time Slot(TS) utilization = %.1f'%TSuti;\n",
+ "Throughput=(Datarate/TSdata)*RLC;\n",
+ "TScap=Throughput/TSuti;\n",
+ "print 'TS capacity is %.2f kbps'%TScap;"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Data Erlangs = 1.5\n",
+ "Time Slot(TS) utilization = 0.5\n",
+ "TS capacity is 8.27 kbps\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.4, Page 602"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Pt=36;#Base station transmitted power in dBm\n",
+ "Pms=24;#mobile station transmitted power in dBm\n",
+ "Nms=8;#mobile station noise figure in dB\n",
+ "Nbs=5;#Base station nise figure in dB\n",
+ "Ga=18;#Base station transmit and receive antenna gain in dBi\n",
+ "Gm=0;#Mobile antenna gain in dBi\n",
+ "SNR=12;# in dB\n",
+ "Lc_TX=5;#BS transmit antenna cable, connector, and \ufb01lter losses in dB\n",
+ "Lc_RX=2;#BS receiver antenna cable, connector, and \ufb01lter losses in dB\n",
+ "Bodyloss=3;# Body losses at mobile\n",
+ "fading=10.2;# in dB\n",
+ "ThermalNoise=-174;# in dBm/Hz\n",
+ "Gdiversity=5;#Antenna diversity gain at BS in dB\n",
+ "#Assuming standard value of RF channel as \n",
+ "RFch=200*10**3; #in Hz\n",
+ "\n",
+ "#Calculations\n",
+ "N=ThermalNoise+10*math.log10(RFch)+Nms;\n",
+ "Smin=N+SNR;\n",
+ "Smean=Smin+fading+Bodyloss;\n",
+ "Lp=Pt-Lc_TX+Ga-Smean;\n",
+ "N1=ThermalNoise+10*math.log10(RFch)+Nbs;\n",
+ "Smin=N1+SNR-Gdiversity;\n",
+ "Smean1=Smin+fading+Bodyloss;\n",
+ "Lp1=Pms-Smean1+Ga-Lc_RX;\n",
+ "R=10**((Lp1-133.2)/33.8);\n",
+ "\n",
+ "#Result\n",
+ "print 'Cell radius is %.1f km'%R;"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Cell radius is 1.2 km\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.5, Page 608"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Ri=12.2*10**3;#Information rate in bps\n",
+ "Rc=3.84*10**6;#Chip rate in cps(chips per second)\n",
+ "Eb_Nt=4.; #in dB\n",
+ "Imargin=2.; #Interference margin(3 dB)\n",
+ "B=0.5;#Interference factor due to other cells\n",
+ "Vi=0.65;#Channel activity factor\n",
+ "\n",
+ "#Calculations&Results\n",
+ "Eb_Ntreqd=10**(Eb_Nt/10);\n",
+ "LF_peruser=(1+B)*(1./(1+(Rc/Ri)*(1./Eb_Ntreqd)*(1./Vi))); #M(no of users=1) in Eq 17.13\n",
+ "print 'Cell load factor per voice user is %.5f'%LF_peruser;\n",
+ "CellLoading=(Imargin-1)/Imargin;\n",
+ "VoiceUsers=CellLoading/LF_peruser;\n",
+ "print 'No of Voice Users are %d per cell'%VoiceUsers;\n",
+ "#From EQ 17.6 assuming Power control efficiency=1\n",
+ "Polecap=Rc/(Ri*Vi*(1+B)*Eb_Ntreqd);\n",
+ "print 'Pole Capacity is %d'%Polecap;"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Cell load factor per voice user is 0.00774\n",
+ "No of Voice Users are 64 per cell\n",
+ "Pole Capacity is 128\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.6, Page 608"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Eb_Nt=1.; #in dB\n",
+ "cellLoading=0.5;#Required interference margin(3 dB)\n",
+ "B=0.5;#Interference factor due to other cells\n",
+ "Vi=1;#Channel activity factor\n",
+ "\n",
+ "#Calculations\n",
+ "Eb_Ntreqd=10**(Eb_Nt/10);\n",
+ "#Assuming standard value of chip rate as 3.84Mcps\n",
+ "Rc=3.84*10**6;#in cps(chips per second)\n",
+ "Throughput=(cellLoading*Rc)/(Eb_Ntreqd*(1+B));\n",
+ "\n",
+ "#Result\n",
+ "print 'Uplink Throughput is %d kbps'%(Throughput/1000);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Uplink Throughput is 1016 kbps\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.7, Page 610"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Ri=12.2*10**3;#Information rate in bps\n",
+ "Rc=3.84*10**6;# Chip rate in chips per second\n",
+ "Eb_Nt=4.; # in dB\n",
+ "Eb_Nt=10**(Eb_Nt/10);\n",
+ "B=0.5;#Average interference factor due to other cells\n",
+ "Zeta=0.6; # orthogonality factor\n",
+ "Imargin=2.;#Interference margin(3 dB)\n",
+ "Vi=0.65 #assuming Channel activity factor as 0.65\n",
+ "\n",
+ "#Calculations&Results\n",
+ "Loadfactor_peruser=(Zeta+B)*(1./((Rc/Ri)*(1./Eb_Nt)*(1./Vi)))\n",
+ "print 'Downlink cell load factor is %.4f'%Loadfactor_peruser;\n",
+ "cellLoading=(Imargin-1)/Imargin;\n",
+ "Voiceusers=cellLoading/Loadfactor_peruser;\n",
+ "print 'No of voice users per cell are %d'%Voiceusers;"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Downlink cell load factor is 0.0057\n",
+ "No of voice users per cell are 87\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.8, Page 610"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "N0=-174;#Noise density in dBm/Hz\n",
+ "Bc=1.25;#Channel bandwidth in mHz\n",
+ "Rc=1.2288;#Chip rate in Mcps\n",
+ "Nf=6; #Receiver Noise figure in dB\n",
+ "Pt=27; #Effective radiated power from mobile in dBm\n",
+ "Lct=0.5; #Transmitter cable and connector loss in dBm\n",
+ "Lbody=1.5;#Body loss in dB\n",
+ "Lcr=2; #Receiver cable and connector loss in dB\n",
+ "Mint=0; #Interference margin in dB\n",
+ "Mfading=2;#fast fadinf margin in dB\n",
+ "Lpent=8;#Penetration loss in dB\n",
+ "Gm=0;#Transmitter antennna gain in dBi\n",
+ "Gb=12;#Receiver antenna gain in dBi\n",
+ "Fm=8;#Fade margin in dB\n",
+ "Eb_Nt=7;# in dB\n",
+ "\n",
+ "#Calculations\n",
+ "Nth=N0+Nf;\n",
+ "S_Nt=Eb_Nt+10*math.log10((Rc*10**6)/(Bc*10**6));\n",
+ "Smin=S_Nt+10*math.log10(Rc*10**6)+Nth;\n",
+ "Lpmax=(Pt-Smin)+(Gb+Gm)-(Lbody+Lct+Lcr+Fm+Lpent)-Mint-Mfading;\n",
+ "\n",
+ "#Results\n",
+ "print 'Minimum signal power required is %.2f dBm'%Smin;\n",
+ "print 'Maximum allowable path loss is %.2f dB'%Lpmax;"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Minimum signal power required is -100.18 dBm\n",
+ "Maximum allowable path loss is 117.18 dB\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.9, Page 612"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Rc=3.84;#Chip rate in Mcps\n",
+ "Ri=16;#Data rate in kbps\n",
+ "UL=0.5;#UL loading factor\n",
+ "DL=0.9;#DL loading factor\n",
+ "Eb_NtU=4;#in dB\n",
+ "Eb_NtD=6;# in dB\n",
+ "Gm=0;#Mobile antenna gain in dBi\n",
+ "Gb=18;#Base station gain in dBi\n",
+ "\n",
+ "#Calculations\n",
+ "R=10**((139.65-138.5)/35.7);\n",
+ "print 'Cell Radius is %.3f km'%R;\n",
+ "Area=round(2.6*R**2);\n",
+ "\n",
+ "#Results\n",
+ "print 'Area covered by hexagonal cell is %d km**2'%Area;\n",
+ "print 'Number of BTSs required to cover an area of 2400 Km**2 are %d'%(2400/Area);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Cell Radius is 1.077 km\n",
+ "Area covered by hexagonal cell is 3 km**2\n",
+ "Number of BTSs required to cover an area of 2400 Km**2 are 800\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.10, Page 614"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Rc=3.84;#chip rate in Mcps\n",
+ "N=3.;#Noise rise in dB\n",
+ "OF=0.8;#orthogonality factor\n",
+ "B=0.55;#Interference from other cells \n",
+ "Eb_N0=4.;#in dB\n",
+ "Sec_Eff=0.85;#Sector efficiency\n",
+ "Pwr_Eff=0.80;#Power control efficiency\n",
+ "Y=1.2; #Retransmit rate\n",
+ "X=10.; #10MB at 384Kbps\n",
+ "X1=2.; #2MB at 144Kbps\n",
+ "X2=1.; #1MB at 64Kbps\n",
+ "\n",
+ "#Calculations\n",
+ "#Assuming Voice activity=Vf=1\n",
+ "Vf=1;\n",
+ "AvgDR=Y*X*10**6*(1./3600)+Y*X1*10**6*(1./3600)+Y*X2*10**6*(1./3600);\n",
+ "CLoad=(N-1)/(N+1);\n",
+ "DLcap=(Rc*10**6*Pwr_Eff*Sec_Eff)/(((10**(Eb_N0/10))*(B+OF)*Vf));\n",
+ "Allowcap=CLoad*DLcap;\n",
+ "users=Allowcap/AvgDR;\n",
+ "\n",
+ "#Result\n",
+ "print 'NO of users that can be supported on the downlink of the WCDMA network are %d'%(round(users));"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "NO of users that can be supported on the downlink of the WCDMA network are 89\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.11, Page 616"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "P1=1./2;#relative frequency of packets for user class1 \n",
+ "P2=1./3;#relative frequency of packets for user class2\n",
+ "P3=1./6;#relative frequency of packets for user class3\n",
+ "R1=16; #data rate in kbps for P1\n",
+ "R2=64; #data rate in kbps for P2\n",
+ "R3=1024; #data rate in kbps for P3\n",
+ "S1=16;#number of slots assigned to the R1 user\n",
+ "S2=8;#number of slots assigned to the R2 user\n",
+ "S3=2;#number of slots assigned to the R3 user\n",
+ "\n",
+ "#Calculations\n",
+ "#Using Equation 17.20 from page no 616\n",
+ "Ravg=(P1*R1*S1+P2*R2*S2+P3*R3*S3)/(P1*S1+P2*S2+P3*S3);\n",
+ "# For equal latency, using Eq 17.18\n",
+ "Rav=1./(P1/R1+P2/R2+P3/R3);\n",
+ "# For Latency ratio=4, using Eq 17.19 from page no 616\n",
+ "PL=4;\n",
+ "C=(P1+P2+PL*P3)/(P1/R1+P2/R2+P3/R3);\n",
+ "\n",
+ "#Results\n",
+ "print 'The average throughput for equal access condition is %.1f kbps'%Ravg;\n",
+ "print 'The average throughput by considering equal latency is %.1f kbps'%Rav;\n",
+ "print 'The average throughput by considering latency ratio as 4 is %.2f kkbps'%C\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The average throughput for equal access condition is 58.2 kbps\n",
+ "The average throughput by considering equal latency is 27.3 kbps\n",
+ "The average throughput by considering latency ratio as 4 is 40.96 kkbps\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.12, Page 620"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Ec_Nt=-23.;#in dB\n",
+ "DRC=-1.5;#DRC gain with respect to pilot in dB\n",
+ "Tg=3.75; # Traf\ufb01c channel gain with respect to pilot in dB\n",
+ "B=0.85;#Interference factor due to other cells \n",
+ "\n",
+ "#Calculations\n",
+ "Mmax=(1./(1+10**(DRC/10)+10**(Tg/10)))*(1./((10**(Ec_Nt/10)*(1+B))));\n",
+ "#The sector loading can be expressed as a fraction of the pole capacity Mmax. This is typically 70% of the pole capacity. \n",
+ "M_allow=int(0.7*Mmax);\n",
+ "#From table 17.2 we get Traffic channel rate as 9.6kbps since we are given traffic channel gain with respect to pilot as 3.75 dB\n",
+ "Ri=9.6; #in kbps(see table 17.2)\n",
+ "Tput=Ri*M_allow;\n",
+ "\n",
+ "#Result\n",
+ "print 'Allowable reverse link throughput is %d kbps'%(round(Tput));"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Allowable reverse link throughput is 173 kbps\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.13, Page 623"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Ptmax=5.5;#Maximum transmit power of DSCH in watts\n",
+ "Pbs=18;# Total base station power in watts\n",
+ "alpha=0.2;#downlink orthogonality factor \n",
+ "G=0.363;# geometry factor\n",
+ "SF=16; #Spreading Factor for DSCH;fixed at value of 16\n",
+ "\n",
+ "#Calculations\n",
+ "# Using equation no 17.27 given on page no 623\n",
+ "SINR=SF*(Ptmax/(Pbs*(1-alpha+(1/G))));\n",
+ "# In dB\n",
+ "SINR_db=10*math.log10(SINR);\n",
+ "\n",
+ "#Result\n",
+ "print 'The average SINR of HSDPA is %.4f dB(%.1fdB)'%(SINR,SINR_db);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The average SINR of HSDPA is 1.3753 dB(1.4dB)\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.14, Page 624"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Users=350;#no of users supported\n",
+ "ExpectedTraf=1.8; # From section 17.7 (in Kbps)\n",
+ "BHTraf=1.785;#Busy hour traffic in kbps\n",
+ "BTS=180;\n",
+ "\n",
+ "#Calculations\n",
+ "IubBW=(ExpectedTraf*Users*BHTraf)/1000; # in Mbps\n",
+ "TotalBW=BTS*IubBW;\n",
+ "\n",
+ "#Result\n",
+ "print 'Required total bandwidth of Iub Interface is %.2f Mbps'%TotalBW;"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Required total bandwidth of Iub Interface is 202.42 Mbps\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 17.15, Page 625"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "BTS=800.;#No of BTS sites\n",
+ "Sec=3;#No of sectors per BTS\n",
+ "freq_sec=2;#No of frequencies used per sector\n",
+ "cellsRNC=1152;#Maximum capacity of cellRNC\n",
+ "btsRNC=384;#One RNC can support btsRNC(BTSs)\n",
+ "VE=25;#Voice service(mErl/subscriber)\n",
+ "BRV=16;# bitrate Voice\n",
+ "CS1=10;#CS data service 1(mErl/subscriber)\n",
+ "BRC1=32;#bit rate for CS1 in kbps\n",
+ "CS2=5;#CS data service 2(mErl/subscriber)\n",
+ "BRC2=64;##bit rate for CS2 in kbps\n",
+ "PSdata=0.2;#PS data service(kbps per subscriber)\n",
+ "PSoverhead=0.15;\n",
+ "SHO=0.4;#40%\n",
+ "Totalsub=350000;#Total subsribers\n",
+ "Maxcap=196;#Maximum Iub capacity of tpRNC (in Mbps)\n",
+ "FR1=0.9;FR2=0.9;FR3=0.9;#Filler rates\n",
+ "\n",
+ "#Calculations&Results\n",
+ "RNCreqd=(BTS*Sec*freq_sec)/(cellsRNC*FR1);#from eqn 17.28\n",
+ "print 'using equation 17.28,Number of RNC required are %d'%(round(RNCreqd));\n",
+ "RNC_reqd=BTS/(btsRNC*FR2);#from eqn 17.29\n",
+ "print 'using equation 17.29,Number of RNC required are %d'%(round(RNC_reqd));\n",
+ "RNCrequired=((VE/1000*BRV+CS1/1000*BRC1+CS2/1000*BRC2+(PSdata/(1-PSoverhead)))*(1+SHO)*Totalsub)/(Maxcap*1000*FR3);#from eqn 17.30\n",
+ "print 'using equation 17.30,Number of RNC required are %d'%(round(RNCrequired));\n",
+ "print 'We select first value which is %d RNCs'%(round(RNCreqd));"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "using equation 17.28,Number of RNC required are 5\n",
+ "using equation 17.29,Number of RNC required are 2\n",
+ "using equation 17.30,Number of RNC required are 1\n",
+ "We select first value which is 5 RNCs\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file