{
 "metadata": {
  "name": "",
  "signature": "sha256:698e21b6a02ede875d0d24c6eb736fae58475ecb5925eda9aae7ad7f79631651"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 5 :Optical Detectors and Receivers"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.1 , Page no:54"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#initialisation of variables\n",
      "optical_power=10*10**-6;  #optical power in W\n",
      "R=0.5;  #Responsivity in A/W\n",
      "Is=optical_power*R;  #shot noise current in A\n",
      "Id=2*10**-9;  #dark current in A\n",
      "Rl=1e6;  #Load resistance in ohm\n",
      "B=1e6;  #bandwidth in Hz\n",
      "T=300;  #Temperature in K\n",
      "\n",
      "#CALCULATIONS\n",
      "K=1.38*10**-20;  #Boltzman constant in m2 g s-2 K-1\n",
      "q=1.609*10**-19;  #charge of a electron in Coulombs\n",
      "Ith=4*K*T*B/Rl;  #Mean Square Thermal noise current in A\n",
      "SNR=(Is**2)/(2*q*(Is+Id)+Ith);  #Signal to noise ratio\n",
      "\n",
      "#RESULTS\n",
      "print\"Thermal noise current=\",Ith*10**18,\"*10^-18A\";\n",
      "print\"Shot noise current=\",Is*10**6,\"*10^-6A\";\n",
      "print\"Signal to noise ratio=\",round(10*math.log10(SNR),5),\"dB\";  #The answers vary due to round off error"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Thermal noise current= 16.56 *10^-18A\n",
        "Shot noise current= 5.0 *10^-6A\n",
        "Signal to noise ratio= 61.7888 dB\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.2 , Page no:54"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#initialisation of variables\n",
      "eta=0.6;  #quantum efficiency\n",
      "Po=10*10**-6;  #optical power in W\n",
      "q=1.6*10**-19;  #charge of an elctron in columb\n",
      "lambda1=0.85*10**-6;  #wavelength in m\n",
      "h=6.6*10**-34;  #planck's constant\n",
      "c=3*10**8;  #velocity of light in m/s\n",
      "Rl=50;  #load Resistance in ohm\n",
      "\n",
      "#CALCULATIONS\n",
      "R=(q*eta*lambda1)/(h*c);  #responsivity in A/W\n",
      "I=R*Po;  #current in A\n",
      "V=Rl*I;  #Voltage in V\n",
      "\n",
      "#RESULTS\n",
      "print\"Responsivity=\",round(R,5);\n",
      "print\"Current=\",round(I*10**6,5),\"uA\";  #multiplication by 1e6 to convert unit from A to uA\n",
      "print\"Voltage=\",round(V*10**3,5),\"mV\";  #multiplication by 1e6 to convert unit from V to mV"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Responsivity= 0.41212\n",
        "Current= 4.12121 uA\n",
        "Voltage= 0.20606 mV\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.3 , Page no:54"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#initialisation of variables\n",
      "tau_tr=2*1e-9;  #transit time in sec\n",
      "Rl=50;  #load resistance in ohm\n",
      "Cd=3*1e-12;  #Junction capacitance in farad\n",
      "\n",
      "#CALCULATIONS\n",
      "tau=2*Rl*Cd;  #Circuit time constant in sec\n",
      "f3dB=(0.35/tau_tr);  #3dB bandwidth in Hz\n",
      "\n",
      "#RESULTS\n",
      "print\"Circuit time constant =\",round(tau*1e9,5),\"ns\";  #multiplication by 1e9 to convert unit from s to ns\n",
      "print\"3dB bandwidth=\",round(f3dB*1e-6,5),\"MHz\";  #multiplication by 1e-6 to convert unit from Hz to MHz"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Circuit time constant = 0.3 ns\n",
        "3dB bandwidth= 175.0 MHz\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.4 , Page no:54"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#initialisation of variables\n",
      "I=100*1e-9;  #current in A\n",
      "P=5*1e-9;  #Incident power in W\n",
      "h=6.6*10**-34;  #planck's constant\n",
      "c=3*10**8;  #velocity of light in m/s\n",
      "q=1.6*10**-19;  #charge of an elctron in columb\n",
      "eta=0.7;  #quantum efficiency\n",
      "\n",
      "#CALCULATIONS\n",
      "lambda1=1.5*10**-6;  #wavelength in m\n",
      "R=I/P;  #APD responsivity in A/W\n",
      "M= (R*h*c)/(q*eta*lambda1);  #Multiplication factor\n",
      "\n",
      "#RESULTS\n",
      "print\"Responsivity=\",round(R,5);\n",
      "print\"Multiplication factor=\",round(M,5);"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Responsivity= 20.0\n",
        "Multiplication factor= 23.57143\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 5.5 , Page no:55"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#initialisation of variables\n",
      "h=6.6*10**-34;  #planck's constant\n",
      "c=3*10**8;  #velocity of light in m/s\n",
      "q=1.6*10**-19;  #charge of an elctron in columb\n",
      "lambda1=0.85*10**-6;  #//wavelength in m\n",
      "I=0.1;  #incident light intensity in mW/mm2\n",
      "Iph1=10*1e-6;  #photocurrent in pin in A\n",
      "Iph2=500*1e-6;  #photocurrent in APD in A\n",
      "A=0.2;  #detector area in mm2\n",
      "\n",
      "#CALCULATIONS\n",
      "P=I*A;  #Power seen by detector in mW\n",
      "photons_generated=P*1e-3/(h*c/lambda1);  #photons Generated\n",
      "Rate=Iph1/q;  #rate of carrier generation for pin\n",
      "eta=Rate/photons_generated;  #Quantum efficiency for pin\n",
      "M=Iph2/Iph1;  #Multiplication factor\n",
      "\n",
      "#RESULTS\n",
      "print\"Quantum efficiency is=\",round(eta,5);  #The answers vary due to round off error\n",
      "print\"Avalanche multiple factor=\",round(M,5);"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Quantum efficiency is= 0.72794\n",
        "Avalanche multiple factor= 50.0\n"
       ]
      }
     ],
     "prompt_number": 5
    }
   ],
   "metadata": {}
  }
 ]
}