{
 "metadata": {
  "name": "",
  "signature": "sha256:9c9d61e8b5bf885fbdf1f7f9c70abb8dab2f7888d9bcb8fa95f4e55f61bf2198"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Ch-9 : Microwave Solid State Generators & Amplifiers"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Page Number: 448 Example 9.2"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from __future__ import division\n",
      "from math import pi\n",
      "#Given\n",
      "fc=5e9  #Hz\n",
      "Em=2e7  #V/m\n",
      "vs=4e3  #ms/s\n",
      "Xc=1  #ohm\n",
      "\n",
      "#Maximum allowable power\n",
      "Pm=((Em*vs)**2)/(((2*pi*fc)**2)*Xc) \n",
      "print 'Maximum allowable power: %0.3f'%Pm, 'W'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Maximum allowable power: 6.485 W\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Page Number: 451 Example 9.3"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "#Given\n",
      "XeGe=4.0  #eV\n",
      "XeGaAs=4.1  #eV\n",
      "delEgGe=0.78  #eV\n",
      "delEgGaAs=1.42  #eV\n",
      "\n",
      "#Conduction band differential\n",
      "delEc=XeGe-XeGaAs \n",
      "print 'Conduction band differential:' ,delEc,'eV'\n",
      "\n",
      "#Valence band differential\n",
      "delEv=delEgGaAs-delEgGe-delEc \n",
      "print 'Valence band differential:' ,delEv,'eV'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Conduction band differential: -0.1 eV\n",
        "Valence band differential: 0.74 eV\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Page Number: 454 Example 9.4"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "#Given\n",
      "S11=0.89 \n",
      "S12=0.02 \n",
      "S21=3.1 \n",
      "S22=0.78 \n",
      "\n",
      "Del=(S11*S22)-(S12*S21) \n",
      "K=(1-(S11)**2-(S22)**2+(Del)**2 )/(2*S12*S21) \n",
      "if(K<1):\n",
      "    print 'Amplifier is potentially unstable' \n",
      "else:\n",
      "     print 'Amplifier is potentially stable' \n",
      "     \n",
      "    "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Amplifier is potentially unstable\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Page Number: 454 Example 9.5"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "#Given\n",
      "S11=0.40 \n",
      "S12=0.01 \n",
      "S21=2.00 \n",
      "S22=0.35 \n",
      "\n",
      "ZL=20  #ohm\n",
      "ZS=30  #ohm\n",
      "Z0=ZL+ZS  #ohm\n",
      "\n",
      "#Reflection coefficients of source and load\n",
      "TL=(ZL-Z0)/(ZL+Z0) \n",
      "TLm=-TL \n",
      "TS=(ZS-Z0)/(ZS+Z0) \n",
      "TSm=-TS \n",
      "\n",
      "#Reflection coefficients of input and output\n",
      "Tin=S11+((S12*S21*TL)/(1-(S22*TL))) \n",
      "Tout=S22+((S12*S21*TS)/(1-(S22*TS))) \n",
      "\n",
      "#Transducer Gain\n",
      "x=(1-(TSm)**2)/((1-(S11*TSm))**2)  #Value of should be 1.145\n",
      "y=(S21*S21) \n",
      "z=(1-(TLm)**2)/((1-(Tout*TLm))**2) \n",
      "GT=x*y*z \n",
      "print 'Transducer Gain: %0.3f'%GT\n",
      "\n",
      "#Available Power Gain\n",
      "z1=1-(Tout)**2 \n",
      "GA=(x*y)/z1 \n",
      "print 'Available power Gain: %0.3f'%GA\n",
      "\n",
      "#Power Gain\n",
      "z2=1-(Tin)**2 \n",
      "GP=(x*y)/z2 \n",
      "print 'Power Gain: %0.3f'%GP\n",
      "\n",
      "#All the end calculations of finding gain are not accurate in the book, hence the answers dont match"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Transducer Gain: 5.207\n",
        "Available power Gain: 5.257\n",
        "Power Gain: 5.473\n"
       ]
      }
     ],
     "prompt_number": 25
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Page Number: 455 Example 9.6"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import sqrt\n",
      "#Given\n",
      "S11=0.60 \n",
      "S12=0.045 \n",
      "S21=2.50 \n",
      "S22=0.50\n",
      "TS=0.5 \n",
      "TL=0.4 \n",
      "Vrms=10  #V\n",
      "Z0=50  #ohm\n",
      "\n",
      "#(i)Reflection coefficients of input and output\n",
      "Tin=S11+((S12*S21*TL)/(1-(S22*TL))) \n",
      "Tout=S22+((S12*S21*TS)/(1-(S22*TS))) \n",
      "print 'Reflection coefficients of input: %0.3f'%Tin\n",
      "print 'Reflection coefficients of output:' ,Tout\n",
      "\n",
      "#(ii) Gains\n",
      "#Transducer Gain\n",
      "x=(1-(TS)**2)/((1-(S11*TS))**2) \n",
      "y=(S21*S21) \n",
      "z=(1-(TL)**2)/((1-(Tout*TL))**2) \n",
      "GT=x*y*z \n",
      "print 'Transducer Gain: %0.3f'%GT\n",
      "\n",
      "#Available Power Gain\n",
      "z1=1-(Tout)**2 \n",
      "GA=(x*y)/z1 \n",
      "print 'Available power Gain: %0.3f'%GA\n",
      "\n",
      "#Power Gain\n",
      "z2=1-(Tin)**2 \n",
      "GP=(x*y)/z2 \n",
      "print 'Power Gain: %0.3f'%GP\n",
      "\n",
      "#Calculation for Tout and Gains are wrong in the book, hence the answers dont match\n",
      "\n",
      "#(iii) Power available\n",
      "Gt=9.4 \n",
      "Pas=(sqrt(2)*Vrms)**2/(8*Z0) \n",
      "Pal=Gt*Pas \n",
      "print 'Power available at source:' ,Pas,'W'\n",
      "print 'Power available at load:',Pal, 'W'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Reflection coefficients of input: 0.656\n",
        "Reflection coefficients of output: 0.575\n",
        "Transducer Gain: 13.553\n",
        "Available power Gain: 14.291\n",
        "Power Gain: 16.803\n",
        "Power available at source: 0.5 W\n",
        "Power available at load: 4.7 W\n"
       ]
      }
     ],
     "prompt_number": 26
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Page Number: 457 Example 9.7"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "from math import log10 \n",
      "#Given\n",
      "S11=0.90 \n",
      "S12=0 \n",
      "S21=2.40 \n",
      "S22=0.80 \n",
      "\n",
      "Gmax=(S21*S21)/((1-(S11)**2)*(1-(S22)**2)) \n",
      "Gdb=10*log10(Gmax) \n",
      "print 'Maximum gain: %0.3f'%Gdb"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Maximum gain: 19.254\n"
       ]
      }
     ],
     "prompt_number": 27
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Page Number: 468 Example 9.8"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "#Given\n",
      "e=1.6e-19 \n",
      "Nd=1.1e23  #m-3\n",
      "a=0.2e-6  #m\n",
      "er=11.8 \n",
      "e0=8.854e-12 \n",
      "mue=800e-4  #m2/Vs\n",
      "Z=50e-6  \n",
      "L=8.5e-6  #m\n",
      "W0=1  #V\n",
      "Vd=12  #V\n",
      "Vg=1.5  #V\n",
      "\n",
      "#(i) Pinch off voltage and pinch off current\n",
      "Vp=(e*Nd*a*a)/(2*er*e0) \n",
      "print 'Pinch off voltage: %0.3f'%Vp,'V'\n",
      "\n",
      "Ip=(mue*e*e*Nd*Nd*Z*a*a)/(e0*er*L) \n",
      "print 'Pinch off current: %0.3f'%Ip,'A'\n",
      "#Answer for Ip is 55809 A but it is given as 0.00558 A\n",
      "\n",
      "#(ii) Drain and maximum drain current\n",
      "#Taking Ip=5.58mA as given in book\n",
      "Ip1=0.00558  #A\n",
      "x=(2/3)*(((Vd+Vg+W0)/Vp)**(3/2)) \n",
      "y=(2/3)*(((Vg+W0)/Vp)**(3/2)) \n",
      "Id=Ip1*((Vd/Vp)-x+y)\n",
      "print 'Drain current: %0.3f'%-Id,'A'\n",
      "\n",
      "#Saturation Current\n",
      "Is=Ip1*((1/3)-((Vg+W0)/Vp)+((2/3)*(((Vg+W0)/Vp)**(3/2))))\n",
      "print 'Drain saturation current: %0.3e'%Is, 'A'\n",
      "\n",
      "#(iii) Cut off frequency\n",
      "f=(2*mue*e*Nd*a*a)/(pi*er*e0*L*L) \n",
      "print 'Cutt off freqency: %0.3f'%(f/10**9),'GHz'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Pinch off voltage: 3.369 V\n",
        "Pinch off current: 55809.081 A\n",
        "Drain current: 0.011 A\n",
        "Drain saturation current: 9.728e-05 A\n",
        "Cutt off freqency: 4.750 GHz\n"
       ]
      }
     ],
     "prompt_number": 29
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Page Number: 469 Example 9.9"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "#Given\n",
      "e=1.6e-19 \n",
      "Nd=8e23  #m-3\n",
      "a=0.12e-6  #m\n",
      "er=13.2 \n",
      "e0=8.854e-12 \n",
      "\n",
      "#Pinch off voltage\n",
      "Vp=(e*Nd*a*a)/(2*er*e0) \n",
      "print 'Pinch off voltage:' ,Vp,'V'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Pinch off voltage: 7.88549602645 V\n"
       ]
      }
     ],
     "prompt_number": 9
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Page Number: 486 Example 9.10"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "#Given\n",
      "vd=2e5  #m/s\n",
      "L=10e-6  #m\n",
      "Ec=3.2e5  #V/m\n",
      "\n",
      "#Natural frequency\n",
      "f=vd/L \n",
      "print 'Natural frequency:' ,f/10**9,'GHz'\n",
      "\n",
      "#Critical voltage\n",
      "Vc=Ec*L \n",
      "print 'Critical voltage:',Vc, 'V'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Natural frequency: 20.0 GHz\n",
        "Critical voltage: 3.2 V\n"
       ]
      }
     ],
     "prompt_number": 31
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Page Number: 487 Example 9.11"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "#Given\n",
      "n=0.08 \n",
      "A=3e-8  #m2\n",
      "n0=1e21  #m-3\n",
      "e=1.6e-19 \n",
      "vd=1.5e5  #m/s\n",
      "M=3.2\n",
      "E=350e3  #V\n",
      "L=12e-6  #m\n",
      "\n",
      "#Power output\n",
      "Pout=n*A*n0*e*vd*M*L*E \n",
      "print 'Power output:' ,Pout*1000,'mW'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Power output: 774.144 mW\n"
       ]
      }
     ],
     "prompt_number": 11
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Page Number: 487 Example 9.12"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "#Given\n",
      "G=15.85 \n",
      "Rn=75  #ohm\n",
      "\n",
      "Rl=Rn-(Rn/G) \n",
      "C=Rl+(10*1J) \n",
      "print 'Cavity impedance: {:.3f}'.format(C), 'ohms'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Cavity impedance: 70.268+10.000j ohms\n"
       ]
      }
     ],
     "prompt_number": 32
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Page Number: 487 Example 9.13"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "#Given\n",
      "e=1.6e-19 \n",
      "n1=1e16  #m-3\n",
      "mu1=8000e-4  #m2/Vs\n",
      "nu=1e14  #m-3\n",
      "muu=180e-4  #m2/Vs\n",
      "\n",
      "#/Conductivity\n",
      "C=e*((n1*mu1)+(nu*muu)) \n",
      "print 'Conductivity: %0.3f'%(C*1000),'m mho'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Conductivity: 1.280 m mho\n"
       ]
      }
     ],
     "prompt_number": 33
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Page Number: 488 Example 9.14"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "#Given\n",
      "e0=8.854e-12 \n",
      "er=13.1 \n",
      "vd=2.5e5  #m/s\n",
      "e=1.6e-19 \n",
      "mu=0.015  #m2/Vs\n",
      "\n",
      "#Criteria\n",
      "n0L=(e0*er*vd)/(e*mu) \n",
      "print 'n0L should be greater than  %0.3e'%n0L,'m**-3'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "n0L should be greater than  1.208e+16 m**-3\n"
       ]
      }
     ],
     "prompt_number": 34
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Page Number: 488 Example 9.15"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "#Given\n",
      "L=10e-6  #m\n",
      "f=10e9  #Hz\n",
      "e=1.6e-19 \n",
      "n0=2e20  #m3\n",
      "E=3200e2  #V/m\n",
      "\n",
      "#Current density\n",
      "vd=L*f \n",
      "J=n0*e*vd \n",
      "print 'Current density:' ,J,'A/m sqr'\n",
      "\n",
      "#Negative electron mobility\n",
      "mu=-vd/E \n",
      "print 'Negative electron mobility:' ,mu*10000,'cm sqr/Vs'\n",
      "\n",
      "#Answer for Negative electron mobility is 3125 but it is given as 3100"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Current density: 3200000.0 A/m sqr\n",
        "Negative electron mobility: -3125.0 cm sqr/Vs\n"
       ]
      }
     ],
     "prompt_number": 15
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Page Number: 497 Example 9.17"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "#Given\n",
      "n=0.15 \n",
      "Vdc=100  #V\n",
      "Idc=200e-3  #A\n",
      "vd=2e5  #m/s\n",
      "L=6e-6  #m\n",
      "\n",
      "#(i) Maximum CW output power\n",
      "Pdc=Vdc*Idc \n",
      "Pout=n*Pdc \n",
      "print 'Maximum CW power output:' ,Pout,'W'\n",
      "\n",
      "#(ii) Resonant frequency\n",
      "f=vd/(2*L) \n",
      "print 'Resonant frequency:  %0.3f'%(f/10**9),'GHz'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Maximum CW power output: 3.0 W\n",
        "Resonant frequency:  16.667 GHz\n"
       ]
      }
     ],
     "prompt_number": 35
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Page Number: 497 Example 9.18"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "#Given\n",
      "n=0.1 \n",
      "Vdc=100  #V\n",
      "Idc=100e-3  #A\n",
      "vd=2e5  #m/s\n",
      "L=5e-6  #m\n",
      "V0=90  #V\n",
      "k=3 \n",
      "\n",
      "#(i) Maximum CW output power\n",
      "Pdc=Vdc*Idc \n",
      "Pout=n*Pdc \n",
      "print 'Maximum CW power output:' ,Pout,'W'\n",
      "\n",
      "#(ii) Resonant frequency\n",
      "f=vd/(2*L) \n",
      "print 'Resonant frequency:' ,f,'Hz'\n",
      "\n",
      "#(iii)Transit time\n",
      "T=L/vd \n",
      "print 'Transit time:' ,T,'s'\n",
      "\n",
      "#(iv) Avalanche multiplication factor\n",
      "M=1/(1-((Vdc/V0)**k)) \n",
      "print 'Avalanche multiplication factor:  %0.3f'%-M"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Maximum CW power output: 1.0 W\n",
        "Resonant frequency: 20000000000.0 Hz\n",
        "Transit time: 2.5e-11 s\n",
        "Avalanche multiplication factor:  2.690\n"
       ]
      }
     ],
     "prompt_number": 36
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Page Number: 498 Example 9.19"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "#Given\n",
      "n=0.1 \n",
      "Vdc=100  #V\n",
      "Idc=0.9  #A\n",
      "t=0.01e-9  #s\n",
      "f=16e9  #Hz\n",
      "\n",
      "#(i)Power output\n",
      "Pdc=Vdc*Idc \n",
      "Pout=n*Pdc \n",
      "print 'Power output:' ,Pout,'W'\n",
      "\n",
      "#(ii)Duty cycle\n",
      "D=(t/2)+(1/(2*f)) \n",
      "print 'Duty cycle:',D, 's'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Power output: 9.0 W\n",
        "Duty cycle: 3.625e-11 s\n"
       ]
      }
     ],
     "prompt_number": 18
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Page Number: 498 Example 9.20"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "#Given\n",
      "Cj=0.5e-12  #F\n",
      "Lp=0.5e-9  #H\n",
      "Irf=0.65  #A\n",
      "Rl=2  #ohms\n",
      "Vbd=80  #V\n",
      "Idc=0.08  #A\n",
      "\n",
      "#Resonant frequency\n",
      "f=1/(2*pi*sqrt(Cj*Lp)) \n",
      "print 'Resonant frequency:  %0.3f'%f,'Hz'\n",
      "\n",
      "#Efficiency\n",
      "Pout=(Irf*Irf*Rl)/2 \n",
      "Pin=Vbd*Idc \n",
      "n=(Pout*100)/Pin \n",
      "print 'Efficiency:  %0.3f'%n, '%'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Resonant frequency:  10065842420.897 Hz\n",
        "Efficiency:  6.602 %\n"
       ]
      }
     ],
     "prompt_number": 38
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Page Number: 501 Example 9.21"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "#Given\n",
      "J=25e7  #A/m \n",
      "Na=2.5e21  #m3\n",
      "e=1.6e-19 \n",
      "\n",
      "#Avlance zone velocity\n",
      "vz=J/(Na*e) \n",
      "print 'Avlanche zone velocity:' ,vz,'m/s'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Avlanche zone velocity: 625000.0 m/s\n"
       ]
      }
     ],
     "prompt_number": 20
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Page Number: 503 Example 9.22"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "#Given\n",
      "e=1.6e-19 \n",
      "N=4e21  #m\n",
      "L=10e-6  #m\n",
      "e0=8.854e-12 \n",
      "er=11 \n",
      "\n",
      "#Breakdown voltage\n",
      "Vbd=(e*N*L*L)/(e0*er) \n",
      "print 'Breakdown voltage:' ,round(Vbd),'V'\n",
      "\n",
      "#Breakdown electric field\n",
      "E=Vbd/L \n",
      "print 'Breakdown electric field: %0.3f'%E, 'V/m'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Breakdown voltage: 657.0 V\n",
        "Breakdown electric field: 65712466.887 V/m\n"
       ]
      }
     ],
     "prompt_number": 39
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Page Number: 515 Example 9.23"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "#Given\n",
      "lam=8000e-10  #m\n",
      "a=0.5e-2  #m\n",
      "D=4e8  #m\n",
      "\n",
      "#Angular Spread\n",
      "t=(1.22*lam)/a \n",
      "print 'Angular spread:',t, 'rad'\n",
      "\n",
      "#Aerial spread\n",
      "A=pi*((D*t)**2) \n",
      "print 'Aerial spread:',A, 'm sqr'\n",
      "\n",
      "\n",
      "#Answer for A is given as 193 m sqr but it is 1.915e10 m sqr"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Angular spread: 0.0001952 rad\n",
        "Aerial spread: 19152676887.0 m sqr\n"
       ]
      }
     ],
     "prompt_number": 41
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Page Number: 515 Example 9.24"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "#Given\n",
      "E=10  #W\n",
      "T=1e-9  #s\n",
      "c=3e8  #m/s\n",
      "lam=650e-9  #m\n",
      "\n",
      "#Pulse Power\n",
      "P=E/T \n",
      "print 'Pulse Power:' ,P,'W'\n",
      "\n",
      "#Q value\n",
      "Q=(c*T)/lam \n",
      "print 'Q value: %0.3f'%Q "
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Pulse Power: 10000000000.0 W\n",
        "Q value: 461538.462\n"
       ]
      }
     ],
     "prompt_number": 42
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Page Number: 515 Example 9.25"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      " \n",
      "#Given\n",
      "h=6.626e-34  \n",
      "c=3e8  #m/s\n",
      "e=1.6e-19 \n",
      "Eg=1.85  #eV\n",
      "\n",
      "#Wavelenght emitted\n",
      "lam=(h*c)/(Eg*e) \n",
      "lamarm=lam*1e10 \n",
      "print 'Wavelenght emitted:' ,round(lamarm),'A'"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Wavelenght emitted: 6716.0 A\n"
       ]
      }
     ],
     "prompt_number": 43
    }
   ],
   "metadata": {}
  }
 ]
}