{
 "metadata": {
  "name": "",
  "signature": "sha256:7edf74a31616935eaae1cc73e55fbdbf296ee54d0cd2e485e516cd600a46b210"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 21 : Consumer communication systems"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 21.1  Page No : 637"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math \n",
      "\n",
      "# Variables\n",
      "D1 = 5.;\n",
      "\n",
      "# Calculations and Results\n",
      "GR1 = 3*D1**2*(1+D1);\n",
      "print 'The reciever procesmath.sing gain is GR1 =  %.0f '%(GR1);\n",
      "\n",
      "Bt = 200.*10**3;     #bandwisth in Hz\n",
      "W = 53.*10**3;        #highest modulating frequency in Hz\n",
      "D2 = Bt/(2*W)-1;    #deviation ratio\n",
      "print 'D2 = %.3f'%(D2);\n",
      "\n",
      "GR2 = 3*D2**2*(1+D2);\n",
      "print 'The reciever procesmath.sing gain for sterio FM is GR2 =  %.3f '%(GR2);\n",
      "print 'The ratio of the two gains is GR2/GR1 =  %.4f  dB'%(GR2/GR1);\n",
      "\n",
      "dBdiffrence = 10*math.log10(GR2/GR1)\n",
      "print 'dB diffrence =  %.0f dB'%(dBdiffrence);\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The reciever procesmath.sing gain is GR1 =  450 \n",
        "D2 = 0.887\n",
        "The reciever procesmath.sing gain for sterio FM is GR2 =  4.451 \n",
        "The ratio of the two gains is GR2/GR1 =  0.0099  dB\n",
        "dB diffrence =  -20 dB\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 21.2  Page No : 644"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Results\n",
      "print 'The percentage is %.0f '%(483./525*100)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The percentage is 92 \n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 21.3  Page No : 644"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "# Calculations\n",
      "D = 25./15;\n",
      "\n",
      "# Results\n",
      "print 'The deviation ratio is D = %.3f '%(D)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The deviation ratio is D = 1.667 \n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 21.4  Page No : 644"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "# Variables\n",
      "delta_f = 25  #KHz\n",
      "W = 15;      #KHz\n",
      "\n",
      "# Calculations\n",
      "Bt = 2*(delta_f+W)     #bandwidth\n",
      "\n",
      "# Results\n",
      "print 'The bandwidth is Bt = %i KHz'%(Bt)\n"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "The bandwidth is Bt = 80 KHz\n"
       ]
      }
     ],
     "prompt_number": 4
    }
   ],
   "metadata": {}
  }
 ]
}