{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter19 Satellite Communications"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 19.14.1,Pg.no.737"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The carrier to noise ratio in dB is 93.88\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "#given\n",
    "P_HPA=600.0\n",
    "TFL_dB=1.5\n",
    "G_dB_ES=50.0\n",
    "RFL_dB=1\n",
    "GTR_dB_SAT =-8\n",
    "FSL_dB=200\n",
    "AML_dB=0.5\n",
    "PL_dB=0.5\n",
    "AA_dB=1\n",
    "#Determination of carrier to noise ratio\n",
    "P_dB_HPA=10*math.log10(P_HPA/1)\n",
    "EIRP_dB=P_dB_HPA -TFL_dB+G_dB_ES\n",
    "TPL_dB=FSL_dB+AML_dB+PL_dB+AA_dB\n",
    "CNoR_dB=EIRP_dB -TPL_dB -RFL_dB+GTR_dB_SAT+228.6\n",
    "CNoR_dB=round(CNoR_dB,2)\n",
    "print 'The carrier to noise ratio in dB is',CNoR_dB"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 19.14.2,Pg.no.739"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The carrier to noise ratio is 78.23\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "from math import pi\n",
    "f=14*10**9\n",
    "BO_dB=10\n",
    "GTR_dB_SAT=3\n",
    "RFL_dB=1\n",
    "phi_dB=-98\n",
    "c=3*10**8\n",
    "#Determination of carrier to noise ratio\n",
    "wav=c/f\n",
    "x=0.00003654067   #x=((wav**2)/(4*pi))\n",
    "Ao_dB=10*math.log10(x)\n",
    "CNo_dB=phi_dB -BO_dB+GTR_dB_SAT -RFL_dB+Ao_dB+228.6\n",
    "CNo_dB=round(CNo_dB,2)\n",
    "print 'The carrier to noise ratio is',CNo_dB"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 19.16.1,Pg.no.741"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The overall carrier to noise ratio is 79.59\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "CNo_dB_U=88\n",
    "CNo_dB_D=78\n",
    "NoC_U=10**(-CNo_dB_U/10)\n",
    "NoC_D=10**(-CNo_dB_D/10)\n",
    "NoC=NoC_U+NoC_D\n",
    "CNo_dB=10*math.log10(1/NoC)\n",
    "CNo_dB=round(CNo_dB,2)\n",
    "print 'The overall carrier to noise ratio is',CNo_dB"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 19.17.1,Pg.no.742"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The ratio C/No is 71.49\n"
     ]
    }
   ],
   "source": [
    "import math\n",
    "#given\n",
    "Eb_N0=9.6           #ratio expessed in dB\n",
    "Rb=1.544*10**6      #bit rate expessed in bps\n",
    "#The bit rate in dB relative to 1bps is\n",
    "R_dB_b=10*math.log10(Rb)\n",
    "#The required CN0 ratio is\n",
    "CNo_db=Eb_N0+R_dB_b\n",
    "CNo_db=round(CNo_db,2)\n",
    "print 'The ratio C/No is',CNo_db "
   ]
  }
 ],
 "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.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}