{
 "metadata": {
  "name": "",
  "signature": "sha256:c0e331b614f072bb0c21b302f0e54b6a8366fa46ba53ae4810b072360f344e0d"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 10: Power Amplifiers"
     ]
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 10.1 Page No.345"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "#Given\n",
      "RL=16                                                     # Ohms, load resistance\n",
      "RLd=10000.0                                         # Ohms ,effective load resistance\n",
      "\n",
      "#Calculation\n",
      "import math\n",
      "N12=math.sqrt(RLd/RL)                               #N12=N1/N2\n",
      "\n",
      "# Result\n",
      "print \" The Transformer Turns Ratio is N1/N2\",N12,\":1\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The Transformer Turns Ratio is N1/N2 25.0 :1\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 10.2 Page No.345"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "#Given Circuit Data\n",
      "Rl=8.0                                        #Ohms, load resistance\n",
      "N12=15.0                                  #N12=N1/N2, transformer turns ratio\n",
      "\n",
      "#Calculation\n",
      "Rld=(N12)**2*Rl                 #effective resistance\n",
      "\n",
      "# Result\n",
      "print \" The Effective Resistance seen looking into the Primary, Rld =  \",Rld/10**3,\"k ohm\""
     ],
     "language": "python",
     "metadata": {},
     "outputs": []
    },
    {
     "cell_type": "heading",
     "level": 3,
     "metadata": {},
     "source": [
      "Example 10.3  Page No.353"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "\n",
      "I1=15                                            #A\n",
      "I2=1.5                                           #A\n",
      "I3=1.2                                           #A\n",
      "I4=0.5                                           #A\n",
      "\n",
      "#Calculation\n",
      "D2=(I2/I1)*100                               #percentage harmonic distribution of component  2\n",
      "D3=(I3/I1)*100                               #percentage harmonic distribution of component  3\n",
      "D4=(I4/I1)*100                               #percentage harmonic distribution of component  4\n",
      "\n",
      "#Result\n",
      "print \" The Second Harmonic Distortion is, D2 =  percent .\",D2\n",
      "print \" The Third  Harmonic Distortion is, D3 =  percent .\",D3\n",
      "print \" The Fourth Harmonic Distortion is, D4 =  percent .\",round(D4,2)\n",
      "\n",
      "#(b)\n",
      "import math\n",
      "P1=1        #say\n",
      "\n",
      "#Calculation\n",
      "D=math.sqrt(D2**2+D3**2+D4**2)    #Distortion Factor\n",
      "P=(1+(D/100)**2)*P1\n",
      "Pi=((P-P1)/P1)*100\n",
      "\n",
      "#Result\n",
      "print \"The Percentage Increase in Power because of Distortion is, Pi (in percent)= \",round(Pi,2)"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        " The Second Harmonic Distortion is, D2 =  percent . 10.0\n",
        " The Third  Harmonic Distortion is, D3 =  percent . 8.0\n",
        " The Fourth Harmonic Distortion is, D4 =  percent . 3.33\n",
        "The Percentage Increase in Power because of Distortion is, Pi (in percent)=  1.75\n"
       ]
      }
     ],
     "prompt_number": 1
    }
   ],
   "metadata": {}
  }
 ]
}