{
 "metadata": {
  "name": "",
  "signature": "sha256:d8e48debe58189bda0ba7970010a7f3d133d055f445572e1b90b2e8739a1cc2b"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "chapter 7: Satellite Link Design Fundamentals"
     ]
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 7.1, page no-249"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Declaration\n",
      "d=36000 *10**3 #distance of geostationary satellite from earth's surface\n",
      "Gt=100         # Antenna gain of 20dB\n",
      "Pt=10          # Power radiated by earth station\n",
      "\n",
      "#Calculation\n",
      "Prd=Pt*Gt/(4*math.pi*d**2)\n",
      "\n",
      "\n",
      "#Result\n",
      "print(\"Prd = %.4f * 10 ^-12 W/m^2\\nPower received by the receiving antenna is given by  Pr = %.3f pW\"%(Prd*10**12,Prd*10**13))\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Prd = 0.0614 * 10 ^-12 W/m^2\n",
        "Power received by the receiving antenna is given by  Pr = 0.614 pW\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 7.2, page no-262"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#Variable Declaration\n",
      "c=3*10**8        #speed of light \n",
      "R=10000          #path length\n",
      "f=4.0            # operating frequencyin GHz\n",
      "EIRP=50          #in dB\n",
      "gr=20            #antenna gain in dB\n",
      "rp=-120          # received power in dB\n",
      "\n",
      "\n",
      "#Calculation\n",
      "\n",
      "#(a)\n",
      "lamda=c/(f*10**9)\n",
      "pl=20*math.log10(4*math.pi*R/lamda)\n",
      "\n",
      "#(b)\n",
      "Lp=EIRP+gr-rp\n",
      "\n",
      "\n",
      "#Result\n",
      "print(\"(a)\\n Operating wavelength = %.3f m\\n Path loss(in dB) = %.2f dB\"%(lamda,pl))\n",
      "print(\"\\n\\n (b)\\n Path loss = %.0fdB\"%Lp)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)\n",
        " Operating wavelength = 0.075 m\n",
        " Path loss(in dB) = 124.48 dB\n",
        "\n",
        "\n",
        " (b)\n",
        " Path loss = 190dB\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 7.3, page no-262"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Declaration\n",
      "p=75                   # rotation of plane of polarization\n",
      "\n",
      "#Polarization rotation is inversaly propotional to square of the operating frequency\n",
      "\n",
      "f= 5.0                 #frequency increased by factor \n",
      "x=f**2                 #rotation angle will decrease by aa factor of 25\n",
      "\n",
      "\n",
      "#Calculation\n",
      "k=math.pi/180.0\n",
      "p_ex=p/x\n",
      "Apr=-20*math.log10(math.cos(p*k))\n",
      "Apr2=-20*math.log10(math.cos((p_ex)*k))\n",
      "\n",
      "\n",
      "#Result\n",
      "print(\"For polarization  mismatch angle = 75\u00b0\\n Attenuation = %.2f dB\"%Apr)\n",
      "print(\"\\n\\n For polarization  mismatch angle = 3\u00b0 \\n Attenuation = %.3f dB\"%Apr2)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "For polarization  mismatch angle = 75\u00b0\n",
        " Attenuation = 11.74 dB\n",
        "\n",
        "\n",
        " For polarization  mismatch angle = 3\u00b0 \n",
        " Attenuation = 0.012 dB\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 7.4, page no-270"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable Declaration\n",
      "g1=30         #gain of RF stage in dB\n",
      "t1=20         #Noise temperature in K\n",
      "g2=10         #down converter gain in dB\n",
      "t2=360        #noise temperature in K\n",
      "g3=15         #gain of IF stage in dB\n",
      "t3=1000       #noise temperature in K\n",
      "t=290         #reference temperature in K\n",
      "G1=1000.0     #30 dB equivalent gain\n",
      "\n",
      "\n",
      "#Calculation\n",
      "Te=t1+(t2/G1)+t3/(G1*g2)\n",
      "F=1+Te/t\n",
      "\n",
      "\n",
      "#Result\n",
      "print(\"Effective noise temperature, Te = %.2fK\"%Te)\n",
      "print(\"\\n\\nSystem Noise Figure, F = %.2f\"%F)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Effective noise temperature, Te = 20.46K\n",
        "\n",
        "\n",
        "System Noise Figure, F = 1.07\n"
       ]
      }
     ],
     "prompt_number": 7
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 7.5, page no-271"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Variable Declaration\n",
      "g1=30         #gain of RF stage in dB\n",
      "t1=20         #Noise temperature in K\n",
      "g2=10         #down converter gain in dB\n",
      "t2=360.0      #noise temperature in K\n",
      "g3=15         #gain of IF stage in dB\n",
      "t3=1000       #noise temperature in K\n",
      "t=290.0       #reference temperature in K\n",
      "G1=1000.0     #30 dB equivalent gain\n",
      "\n",
      "\n",
      "#Calculation\n",
      "F1=1+t1/t\n",
      "F2=1+t2/t\n",
      "F3=1+t3/t\n",
      "F=F1+((F2-1)/G1)+(F3-1)/(G1*g2)\n",
      "\n",
      "\n",
      "#Result\n",
      "print(\"Noise Figure specificatios of the three stages are as follow,\\n\\n F1 = %.3f\\n F2 = %.2f\\n F3 = %.2f\"%(F1,F2,F3))\n",
      "print(\"\\n\\n The overall noise figure is, F = %.2f\"%F)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Noise Figure specificatios of the three stages are as follow,\n",
        "\n",
        " F1 = 1.069\n",
        " F2 = 2.24\n",
        " F3 = 4.45\n",
        "\n",
        "\n",
        " The overall noise figure is, F = 1.07\n"
       ]
      }
     ],
     "prompt_number": 8
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 7.6, page no-272"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Declaration\n",
      "L=1.778           #Loss factor of the feeder 2.5dB equivalent\n",
      "ts=30             #Noise temperature of sattelite receiver in K\n",
      "t=50              #Noise temperature in K\n",
      "ti=290.0          # reference temperature in K\n",
      "\n",
      "\n",
      "#Calculation\n",
      "x=t/L\n",
      "y=ti*(L-1)/L\n",
      "Te=x+y+ts\n",
      "F1=1+(ts/ti)\n",
      "F2=1+(Te/ti)\n",
      "\n",
      "\n",
      "#Result\n",
      "print(\"contribution of antenna noise temperature when\\n referred to the input of the receiver is %.1f K\"%x)\n",
      "print(\"\\n\\n Contribution of feeder noise when referred to the\\n input of the receiver is %.1f\"%y)\n",
      "print(\"\\n\\n1. Noise figure in first case = %.3f = %.3f dB\"%(F1,10*math.log10(F1)))#answer in book is different 0.426dB\n",
      "print(\"\\n\\n2. Noise figure in second case = %.3f = %.2f dB\"%(F2,10*math.log10(F2)))\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "contribution of antenna noise temperature when\n",
        " referred to the input of the receiver is 28.1 K\n",
        "\n",
        "\n",
        " Contribution of feeder noise when referred to the\n",
        " input of the receiver is 126.9\n",
        "\n",
        "\n",
        "1. Noise figure in first case = 1.103 = 0.428 dB\n",
        "\n",
        "\n",
        "2. Noise figure in second case = 1.638 = 2.14 dB\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 7.7, page no-272"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Declaration\n",
      "Ta=40          #Antenna Noise temperature\n",
      "Ti=290.0       #Reference temperature in K\n",
      "T=50.0         #Effecitve input noise temperatuire\n",
      "\n",
      "#Calculation\n",
      "Tf=Ti\n",
      "L=(Ta-Tf)/(T-Tf)\n",
      "L=math.ceil(L*10**4)/10**4\n",
      "\n",
      "#Result\n",
      "print(\"Loss factor = %.4f = %.3f dB\"%(L,10*math.log10(L)))\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Loss factor = 1.0417 = 0.177 dB\n"
       ]
      }
     ],
     "prompt_number": 10
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 7.8, page no-273"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "\n",
      "#Variable Declaration\n",
      "Ta=50          #Antenna Noise temperature\n",
      "Tf=300         #Thermodynamic temperature of the feeder\n",
      "Te=50          # Effecitve input noise temperatuire\n",
      "\n",
      "\n",
      "#Calculation for (a)\n",
      "Lf=1.0\n",
      "T=(Ta/Lf)+(Tf*(Lf-1)/Lf)+Te\n",
      "\n",
      "#Result for (a)\n",
      "print(\"(a)\\n System noise temperature = %.0fK\"%T)\n",
      "\n",
      "#Calculation for (b)\n",
      "Lf=1.413\n",
      "T=(Ta/Lf)+(Tf*(Lf-1)/Lf)+Te\n",
      "\n",
      "#Result for (b)\n",
      "print(\"\\n\\n (b)\\n System noise temperature = %.3fK\"%(math.ceil(T*10**3)/10**3))\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "(a)\n",
        " System noise temperature = 100K\n",
        "\n",
        "\n",
        " (b)\n",
        " System noise temperature = 173.072K\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 7.9, page no-278"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "\n",
      "#Variable Declaration\n",
      "e=35     #EIRP radiated by satellite in dBW\n",
      "g=50     #receiver antenna gain in dB\n",
      "e1=30    #EIRP of interfacing satellite in dBW\n",
      "theeta=4 #line-of-sight between earth station and interfacing sattelite\n",
      "\n",
      "\n",
      "#Calculation\n",
      "x=(e-e1)+(g-32+25*math.log10(theeta))\n",
      "\n",
      "\n",
      "#Result\n",
      "print(\"carrier-to-interface (C/I) = %.2f dB\"%x)\n",
      "\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "carrier-to-interface (C/I) = 38.05 dB\n"
       ]
      }
     ],
     "prompt_number": 14
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 7.10, page no-279"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "\n",
      "#Variable Declaration\n",
      "ea=80      #EIRP value of earth station A in dBW\n",
      "eb=75      #EIRP value of earth station B in dBW\n",
      "g=50       #transmit antenna gain in dB\n",
      "gra=20     #receiver antenna gain for earth station A in dB\n",
      "grb=15     #receiver antenna gain for earth station B in dB\n",
      "theeta=4   #viewing angle of the sattelite from two earth station\n",
      "\n",
      "\n",
      "#Calculation\n",
      "eirp_d=eb-g+32-25*math.log10(theeta)\n",
      "c_by_i=ea-eirp_d+(gra-grb)\n",
      "\n",
      "\n",
      "#Result\n",
      "print(\"carrier-to-interference ratio at the satellite due to\\n inteference caused by Eart station B is, (C/I) = %.0f dB \"%c_by_i)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "carrier-to-interference ratio at the satellite due to\n",
        " inteference caused by Eart station B is, (C/I) = 43 dB \n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 7.11, page no-279"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "\n",
      "#Variable Declaration\n",
      "\n",
      "\n",
      "u=10000.0    # equivalent to 40dB\n",
      "\n",
      "#carrier sinal strength at eart station by downlink \n",
      "d=3162.28 #equivalent to 35dB\n",
      "\n",
      "\n",
      "#Calculation\n",
      "x=1/((1/u)+(1/d))\n",
      "\n",
      "\n",
      "#Result\n",
      "print(\"Total carrier-to-interference ratio is %.2f = %.1f dB\"%(x,10*math.log10(x)))\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Total carrier-to-interference ratio is 2402.53 = 33.8 dB\n"
       ]
      }
     ],
     "prompt_number": 16
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 7.12, Page no.280"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Declaration\n",
      "theeta=5.0        #Angle form by slant ranges of two satellites\n",
      "dA=42100.0*10**3  #Slant range of satellite A\n",
      "dB=42000.0*10**3  #Slant range of satellite B\n",
      "r=42164.0*10**3   #radius of geostationary orbit\n",
      "\n",
      "\n",
      "#Calculation\n",
      "beeta=((dA**2+dB**2-math.cos(theeta*math.pi/180)*2*dA*dB)/(2*r**2))\n",
      "beeta=math.ceil(beeta*10**3)/10**3\n",
      "beeta=(180/math.pi)*math.acos(1-beeta)\n",
      "\n",
      "#Result\n",
      "print(\"Longitudinal separation between two satellites is %.3f\u00b0\"%beeta)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Longitudinal separation between two satellites is 5.126\u00b0\n"
       ]
      }
     ],
     "prompt_number": 17
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 7.13, Page no.281"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "\n",
      "#Variable Declaration\n",
      "Ga=60.0     #Antenna Gain in dB\n",
      "Ta= 60.0    #Noise teperature of Antenna\n",
      "L1=1.12     #Feeder Loss equivalent to dB\n",
      "T1=290.0    #Noise teperature of stage 1\n",
      "G2=10**6    #Gain of stage 2 in dB\n",
      "T2=140.0    #Noise teperature of stage 2\n",
      "T3=10000.0  #Noise teperature of stage 3\n",
      "G=Ga-0.5    #input of low noise amplifier\n",
      "\n",
      "\n",
      "#Calculation\n",
      "Ts=(Ta/L1)+(T1*(L1-1)/L1)+T2+(T3/G2)\n",
      "Ts=math.floor(Ts*100)/100\n",
      "x=G-10*math.log10(Ts)\n",
      "\n",
      "#Result\n",
      "print(\"Tsi = %.2fK\\n\\n G/T(in dB/K)= %.0f dB/K\"%(Ts,x))\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Tsi = 224.65K\n",
        "\n",
        " G/T(in dB/K)= 36 dB/K\n"
       ]
      }
     ],
     "prompt_number": 18
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 7.14, Page no.282"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "\n",
      "#Variable Declaration\n",
      "Ga=60.0     #Amplifier Gain in dB\n",
      "Ta= 60.0    #Noise teperature of Antenna\n",
      "L1=1.12     #Feeder Loss equivalent to dB\n",
      "T1=290.0    #Noise teperature of stage 1\n",
      "G2=10**6    #Gain of stage 2 in dB\n",
      "T2=140.0    #Noise teperature of stage 2\n",
      "T3=10000.0  #Noise teperature of stage 3\n",
      "G=Ga-0.5    #input of low noise amplifier\n",
      "\n",
      "\n",
      "#Calculation\n",
      "T=Ta+T1*(L1-1)+L1*(T2+(T3/G2))\n",
      "x=G-10*math.log10(T)\n",
      "\n",
      "\n",
      "#Result\n",
      "print(\"T = %.1fK\\n\\n G/T = %.0f dB/k\"%(T,math.ceil(x)))\n",
      "print(\"\\n\\n It is evident from the solutions of the problems 13 and 14\\n that G/T ratio is invarient regardless of the reference point in agreement \\n with a statement made earlier in the text.\")\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": []
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 7.15, Page no.286"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "#Variable Declaration\n",
      "f=6.0*10**9   # uplink frequency\n",
      "eirp=80.0     # Earth station EIRP in dBW\n",
      "r=35780.0     # Earth station satellite distance\n",
      "l=2.0         # attenuation due to atomospheric factors in dB\n",
      "e=0.8         # satellite antenna's aperture efficiency\n",
      "a=0.5         # satellite antenna's aperture area\n",
      "T=190.0       # Satellite receiver's effective noise temperature \n",
      "bw=20.0*10**6 # Satellite receiver's bandwidth\n",
      "cn=25.0       # received carrier-to-noise ratioin dB\n",
      "c=3.0*10**8   # speed of light\n",
      "\n",
      "#Calculation\n",
      "k=1.38*10**-23\n",
      "lamda=c/f\n",
      "G=e*4*math.pi*a/lamda**2\n",
      "G=math.ceil(G*100)/100\n",
      "Gd=10*math.log10(G)\n",
      "p=10*math.log10(k*T*bw)\n",
      "pl=20*math.log10(4*math.pi*r*10**3/lamda)\n",
      "rp=eirp-l-pl+Gd\n",
      "rp=math.floor(rp*100)/100\n",
      "rc=math.floor((rp-p)*100)/100\n",
      "lm=rc-cn\n",
      "\n",
      "#Result\n",
      "print(\"Satellite Antenna gain, G = %.2f = %.2f dB \\n Receivers Noise Power = %.1f dB\\n free-space path loss = %.2f dB \\n received power at satellite = %.2f dB \\n receiver carrier = %.2f is stronger than noise.\\n It is %.2f dB more than the required threshold value.\\n Hence,  link margin = %.2f dB\"%(G,Gd,p,pl,rp,rc,lm,lm))\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Satellite Antenna gain, G = 2010.62 = 33.03 dB \n",
        " Receivers Noise Power = -132.8 dB\n",
        " free-space path loss = 199.08 dB \n",
        " received power at satellite = -88.05 dB \n",
        " receiver carrier = 44.75 is stronger than noise.\n",
        " It is 19.75 dB more than the required threshold value.\n",
        " Hence,  link margin = 19.75 dB\n"
       ]
      }
     ],
     "prompt_number": 1
    }
   ],
   "metadata": {}
  }
 ]
}