{
 "metadata": {
  "name": "",
  "signature": "sha256:6766772f83f2596b3b6b7807e5b7d920e722ca1875c73f5ee2febb8d127ad653"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "CHAPTER 10-Wireless Communication Systems\n"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "EXAMPLE 10.1- PG NO.351"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#page 351\n",
      "BW=12.5*10.**3.\n",
      "TDR1=512.#transmission data rate\n",
      "SPef1=TDR1/BW#spectral efficiency\n",
      "\n",
      "TDR2=1200.\n",
      "SPef2=TDR2/BW\n",
      "\n",
      "TDR3=2400.\n",
      "SPef3=TDR3/BW\n",
      "print'%s %.2f %s' %('the spectral efficiency at 512 bps transmission data rate =',SPef1,'bps/Hz')\n",
      "print'%s %.3f %s' %('the spectral efficiency at 1200 bps transmission data rate =',SPef2,'bps/Hz')\n",
      "print'%s %.3f %s' %('the spectral efficiency at 2400 bps transmission data rate =',SPef3,'bps/Hz')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the spectral efficiency at 512 bps transmission data rate = 0.04 bps/Hz\n",
        "the spectral efficiency at 1200 bps transmission data rate = 0.096 bps/Hz\n",
        "the spectral efficiency at 2400 bps transmission data rate = 0.192 bps/Hz\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "EXAMPLE 10.2- PG NO.352"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#page no.352\n",
      "TDR=1200.\n",
      "T=60.\n",
      "TN=TDR*T#total no. of bits in 60 sec\n",
      "NP=576.#no. of bits in the preamble\n",
      "NU=TN-NP#no. of usable bits\n",
      "\n",
      "NS=32.\n",
      "NA=32.\n",
      "N16=16.*NA\n",
      "N1B=NS+N16\n",
      "\n",
      "NBPM=NU/N1B#no. of batches/min.\n",
      "NPAPB=16.\n",
      "NTPM=NBPM*NPAPB#no. of pages transmitted/min.\n",
      "print'%s %d %s' %('no. of pages transmitted/min =',NTPM,'pages')\n",
      "\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "no. of pages transmitted/min = 2100 pages\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "EXAMPLE 10.3- PG NO.353"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#page no.353\n",
      "BW=25.*10.**3.#bandwidth of POCSAG=bandwidth of FLEX system\n",
      "\n",
      "TDR1=1200.# transmission data rate\n",
      "SPef1=TDR1/BW#spectral efficiency\n",
      "\n",
      "TDR2=6400.\n",
      "SPef2=TDR2/BW\n",
      "print '%s %.3f %s' %('the spectral efficiency at 1200 bps transmission data rate in POCSAG paging system is =',SPef1,'bps/Hz')\n",
      "print '%s %.3f %s' %('the spectral efficiency at 6400 bps transmission data rate in FLEX paging system is =',SPef2,'bps/Hz')\n",
      "\n",
      "Cinc=TDR2/TDR1\n",
      "print '%s %.1f %s' %('estimating increase in capacity is =',Cinc,'times')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "the spectral efficiency at 1200 bps transmission data rate in POCSAG paging system is = 0.048 bps/Hz\n",
        "the spectral efficiency at 6400 bps transmission data rate in FLEX paging system is = 0.256 bps/Hz\n",
        "estimating increase in capacity is = 5.3 times\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "EXAMPLE 10.6- PG NO.368"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#page no.368\n",
      "Bt=12.5*10.**6.\n",
      "Bg=10.*10.**3.\n",
      "B2g=2.*Bg#Guard band on both the ends\n",
      "ABW=Bt-B2g\n",
      "Bc=30000.#channel bandwidth\n",
      "N=ABW/Bc\n",
      "print '%s %d %s' %('total no. of channels available in the system is =',N,'channels')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "total no. of channels available in the system is = 416 channels\n"
       ]
      }
     ],
     "prompt_number": 12
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "EXAMPLE 10.8- PG NO.374"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#page no.374\n",
      "ERPmax1dB=6.\n",
      "ERPmax2dB=-2.\n",
      "DiffdB=ERPmax1dB-ERPmax2dB\n",
      "Diff=10.**(DiffdB/10.)\n",
      "Rfree=5.*(Diff)**(1./2.)#free space-case(a)\n",
      "Rtypc=5.*(Diff)**(1./4.)#signal attenuation is proportional to 4th power-case(b)\n",
      "print '%s %.1f %s' %('maximum communication range in a free space propogation condition-case(a) is =',Rfree,'km')\n",
      "print '%s %.1f %s' %('maximum communication range when signal attenuation is proportional to 4th power-case(b) is =',Rtypc,'km')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "maximum communication range in a free space propogation condition-case(a) is = 12.6 km\n",
        "maximum communication range when signal attenuation is proportional to 4th power-case(b) is = 7.9 km\n"
       ]
      }
     ],
     "prompt_number": 13
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "EXAMPLE 10.11- PG NO.381"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#page no. 381\n",
      "import math\n",
      "P4dBW=-34.\n",
      "PdBm4=P4dBW-30.\n",
      "PW4=10.**((PdBm4/10.))\n",
      "print '%s %d %s %s' %('minimum power level of class IV phone is =',round(PW4*10**7),'*10**(-7)','mW')\n",
      "\n",
      "ERP1dBW=6.\n",
      "PdBm1=ERP1dBW-30.\n",
      "PW1=10.**((PdBm1/10.))\n",
      "\n",
      "print '%s %d %s %s' %('ERP of class I phone is =',round(PW1*10**3),'*10**(-3)','mW')\n",
      "R=PW1/PW4\n",
      "RdB=10.*math.log10(R)\n",
      "\n",
      "print '%s %d %s %d' %('minimum power level for a Class I phone is greater than\\nminimum power level of Class IV mobile phone by a factor of',RdB,'dB or',R)\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "minimum power level of class IV phone is = 4 *10**(-7) mW\n",
        "ERP of class I phone is = 4 *10**(-3) mW\n",
        "minimum power level for a Class I phone is greater than\n",
        "minimum power level of Class IV mobile phone by a factor of 40 dB or 10000\n"
       ]
      }
     ],
     "prompt_number": 6
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "EXAMPLE 10.12- PG NO.384"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#page no.384\n",
      "spfl=810*10**6\n",
      "spfu=826*10**6\n",
      "sprl=940*10**6\n",
      "spru=956*10**6\n",
      "BWf=spfu-spfl\n",
      "BWr=spru-sprl\n",
      "\n",
      "BWc=10./100.*BWf#BWf=BWr(universal standard)\n",
      "BWv=BWf-BWc\n",
      "nsc=1150.\n",
      "BWmax=BWv/nsc\n",
      "SPef=1.68\n",
      "CDRmax=BWmax*SPef\n",
      "FECcr=0.5\n",
      "DRnmax=FECcr*CDRmax\n",
      "print '%s %.1f %s' %('there is a speech coder with a max. data rate of is =',DRnmax*10**(-3),'Kbps')\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "there is a speech coder with a max. data rate of is = 10.5 Kbps\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "EXAMPLE 10.13- PG NO.388"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#page no.388\n",
      "d=40.*10.**0.\n",
      "npf=6.\n",
      "dts=d/npf#duration of a time slot of a voice frame\n",
      "nbv=1944.\n",
      "nbpts=nbv/npf#no. of bits per time slot\n",
      "db=d/nbv#duration of a bit in secs\n",
      "npg=6.\n",
      "tg=db*npg#guard time in secs\n",
      "c=3.*10.**8.\n",
      "Disrt=c*tg\n",
      "Dismx=Disrt/2.#max. distance\n",
      "print '%s %.3f %s' %('duration of a time slot of a voice frame is =',dts,'msecs')\n",
      "print '%s %d %s' %('no. of bits per time slot is =',nbpts,'bits')\n",
      "print '%s %.2f %s' %('duration of a bit is',db*1000,'microsecs')\n",
      "print '%s %d %s' %('guard time is =',tg*1000,'microsecs')\n",
      "print '%s %.2f %s' %('maximum distance between a cell site and a mobile is =',Dismx/1000000.,'kilometres')\n",
      "#answers vary due to approximations."
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "duration of a time slot of a voice frame is = 6.667 msecs\n",
        "no. of bits per time slot is = 324 bits\n",
        "duration of a bit is 20.58 microsecs\n",
        "guard time is = 123 microsecs\n",
        "maximum distance between a cell site and a mobile is = 18.52 kilometres\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "EXAMPLE 10.14- PG NO.389"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#page no.389\n",
      "dv=40.*10.**-3.\n",
      "nps=1./dv\n",
      "nbpv=1944.\n",
      "TGrbr=nbpv*25.\n",
      "TGrbaur=TGrbr/2.#2 bits/symbol for pi/4 qpsk mod\n",
      "CBW=30.*10.**3.\n",
      "BWef=TGrbr/CBW\n",
      "print '%s %.1f %s' %('total gross bit rate for the RF signal is=',TGrbr/1000,'Kbps')\n",
      "print '%s %.1f %s' %('total gross baud rate for the RF signal is =',TGrbaur/1000,'Kbps')\n",
      "print '%s %.1f %s' %('bandwidth efficiency is =',BWef,'bps/Hz')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "total gross bit rate for the RF signal is= 48.6 Kbps\n",
        "total gross baud rate for the RF signal is = 24.3 Kbps\n",
        "bandwidth efficiency is = 1.6 bps/Hz\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "EXAMPLE 10.15- PG NO.391"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#PAGE NO. 391\n",
      "Bt=12.5*10**6\n",
      "Bc=30.*10.**3.\n",
      "K=7#frequency reuse factor\n",
      "N=Bt/Bc#total no. of available channels\n",
      "M=N*(1./K)#user capacity per cell \n",
      "\n",
      "Nu=3#no. of users/channel\n",
      "NU=N*Nu\n",
      "K1=4\n",
      "M1=NU*(1./K1)\n",
      "\n",
      "print '%s %d %s' %('capacity of 1G AMPS FDMA analog cellular system is =',round(M),'users per cell')\n",
      "print '%s %d %s' %('capacity of 2G IS-136 TDMA digital cellular system is =',M1,'users per cell')\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "capacity of 1G AMPS FDMA analog cellular system is = 60 users per cell\n",
        "capacity of 2G IS-136 TDMA digital cellular system is = 312 users per cell\n"
       ]
      }
     ],
     "prompt_number": 10
    }
   ],
   "metadata": {}
  }
 ]
}