{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Chapter 8 : The Telephone System"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 3 : pg 323"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The net loss is 0.8 dB\n"
     ]
    }
   ],
   "source": [
    " \n",
    "# page no 323\n",
    "# prob no 8.3\n",
    "#calculate the net loss\n",
    "#A telephone signal takes 3 ms to reach its destination\n",
    "#given\n",
    "t=2.;\n",
    "#calculations\n",
    "#Determination of net loss VNL reqd for acceptable amount of echo.\n",
    "VNL=(0.2*t)+0.4;\n",
    "#results\n",
    "print 'The net loss is',VNL,'dB'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 5 : pg 326"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The value of carrier freq for channel 5 is 92.0 kHz\n"
     ]
    }
   ],
   "source": [
    " \n",
    "# page no 326\n",
    "# prob no 8.5\n",
    "#calculate the carrier freq value\n",
    "#given\n",
    "#Refering the fig.8.15 channel 12 has lowest carrierr freq 64 kHz\n",
    "F=64.;\n",
    "c_total=12.;\n",
    "#Carrier freq goes up 4kHz per channel\n",
    "f_up=4;\n",
    "#Determination of carrier freq for channel 5\n",
    "c=5;\n",
    "#calculations\n",
    "fc=F+(f_up*(c_total-c));\n",
    "#results\n",
    "print 'The value of carrier freq for channel 5 is',fc,'kHz'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Example 6 : pg 328"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The tone appear in the supergroup output at frequency of 426.0 kHz\n"
     ]
    }
   ],
   "source": [
    " \n",
    "#page no 328\n",
    "#prob no 8.6\n",
    "#calculate the tone \n",
    "# 2kHz tone is present on channel 5 of group 3 of a supergroup\n",
    "# refer to example 8.5, calculated fc=92kHz\n",
    "#given\n",
    "fc=92.;#in kHz\n",
    "#calculations\n",
    "# Here signal is lower sideband,the 2kHz baseband signal therefore will be\n",
    "fg=fc-2;\n",
    "#from fig 10.15,group 3 in the supergroup is moved to the range 408-456 kHz, with a suppressed carrier frequency of 516kHz.\n",
    "fsc=516;# in kHz\n",
    "#the modulation is lower sideband,so the supergroup o/p freq will be 90kHz lower than carrier freq\n",
    "fsg=fsc-fg;\n",
    "#results\n",
    "print 'The tone appear in the supergroup output at frequency of',fsg,'kHz'"
   ]
  }
 ],
 "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.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}