{
 "metadata": {
  "name": "",
  "signature": "sha256:5718a3c42754aa5183942c38e5cab304783445145fa6697742fcee51eaa7862a"
 },
 "nbformat": 3,
 "nbformat_minor": 0,
 "worksheets": [
  {
   "cells": [
    {
     "cell_type": "heading",
     "level": 1,
     "metadata": {},
     "source": [
      "Chapter 6 :Integrated Optics and Photonic Circuits"
     ]
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.1 , Page no:121"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#initialisation of variables\n",
      "lamda=1.55;  #wavelength in um\n",
      "n1=1.51;  #Film refractive index\n",
      "n2=1.5;  #substrate refractive index\n",
      "\n",
      "#CALCULATIONS\n",
      "t=(lamda)/(2*3.14*math.sqrt(n1*n1-n2*n2));  #Thickness of film in um\n",
      "\n",
      "#RESULTS\n",
      "print\"Film thickness=\",round(t,5),\"um\";"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Film thickness= 1.42262 um\n"
       ]
      }
     ],
     "prompt_number": 1
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.2 , Page no:121"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#initialisation of variables\n",
      "b=0.5;  #normalized propoagation constant\n",
      "lamda=1.3;  #wavelength in um\n",
      "n1=2.21;  #Film refractive index\n",
      "n2=2.2;  #substrate refractive index\n",
      "\n",
      "#CALCULATIONS\n",
      "V=(2*math.atan(b/(1-b))/(math.sqrt(1-b)));  #normalized frequency\n",
      "t=(lamda)/(2*3.14*math.sqrt(n1*n1-n2*n2));  #Thickness of film in um\n",
      "\n",
      "#RESULTS\n",
      "print\"Normalized frequency=\",round(V,5);\n",
      "print\"Film thickness=\",round(t,5),\"um\";"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Normalized frequency= 2.22144\n",
        "Film thickness= 0.98574 um\n"
       ]
      }
     ],
     "prompt_number": 2
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.3 , Page no:121"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#initialisation of variables\n",
      "lamda=1.3;  #wavelength in um\n",
      "nf=1.51;  #Film refractive index\n",
      "t=1.5;  #Film thickness in um\n",
      "ns=1.5;  #Waveguide refractive index\n",
      "na=1;  #refractive index of air\n",
      "\n",
      "#CALCULATIONS\n",
      "V=(2*3.14*t/lamda)*math.sqrt(nf**2-ns**2);  #V-number\n",
      "a=(ns**2-na**2)/(nf**2-ns**2);  #asymmetry parameter of the waveguide\n",
      "Vc=math.atan(a**0.5);  #cutoff V-number\n",
      "\n",
      "#RESULTS\n",
      "print\"V-number=\",round(V,5);\n",
      "print\"symmetry parameter of the waveguide=\",round(a,5);\n",
      "print\"Cutoff V-number=\",round(Vc,5);"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "V-number= 1.25716\n",
        "symmetry parameter of the waveguide= 41.52824\n",
        "Cutoff V-number= 1.41685\n"
       ]
      }
     ],
     "prompt_number": 3
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.4 , Page no:121"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#initialisation of variables\n",
      "delta_phi=3.14; \n",
      "d=4*10**-6;  #seperation between electrodes\n",
      "n=2.2;  #approximate inder in absence of voltage\n",
      "r13=30*10**-12;  #poper electro optic coefficient\n",
      "row=0.4;  #overlap factor\n",
      "lambda1=1300*1e-9;  #wavelength in m\n",
      "L=8*10**-3;  #length of electrode in m\n",
      "\n",
      "#CALCULATIONS\n",
      "delta_n=delta_phi*lambda1/(2*3.14*L);  #change in refractive index\n",
      "V_pi=2*d*delta_n/(n**3*row*r13);  #Voltahe required for using the device as BPSK modulator\n",
      "\n",
      "#RESULTS\n",
      "print\"Voltage required for using the device as BPSK modulator=\",round(V_pi,5),\"V\";\n",
      "print\"Voltage length product for unit length is=\",round(V_pi,5),\"VM\";"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Voltage required for using the device as BPSK modulator= 5.08703 V\n",
        "Voltage length product for unit length is= 5.08703 VM\n"
       ]
      }
     ],
     "prompt_number": 4
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.5 , Page no:122"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#initialisation of variables\n",
      "d=10*10**-6;  #seperation between electrodes\n",
      "ne=2.2;  #approximate inder in absence of voltage\n",
      "r33=32*10**-12;  #poper electro optic coefficient\n",
      "lambda1=1*1e-6;  #wavelength in m\n",
      "L=5*10**-3;  #length of electrode in m\n",
      "\n",
      "#CALCULATIONS\n",
      "V=d*lambda1/(2*3.14*ne**3*r33*L);  #Voltahe required for using the device as BPSK modulator\n",
      "\n",
      "#RESULTS\n",
      "print\"Voltage required for using the device as BPSK modulator=\",round(V,5);\n",
      "print\"The answer is different because of rounding off error\";"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "Voltage required for using the device as BPSK modulator= 0.93466\n",
        "The answer is different because of rounding off error\n"
       ]
      }
     ],
     "prompt_number": 5
    },
    {
     "cell_type": "heading",
     "level": 2,
     "metadata": {},
     "source": [
      "Example 6.6 , Page no:122"
     ]
    },
    {
     "cell_type": "code",
     "collapsed": false,
     "input": [
      "import math\n",
      "from __future__ import division\n",
      "\n",
      "#initialisation of variables\n",
      "delta_L=1/100;  #error in effective interaction length\n",
      "\n",
      "#CALCULATIONS\n",
      "P=(3.14/2*delta_L)**2;  #cross talk power output in W\n",
      "PdB=10*math.log10(P);  #power in dB\n",
      "\n",
      "#RESULTS\n",
      "print\"cross talk power output=\",round(P*10**4,5),\"x10^-4W\";  #multiplication by 10^4 to convert unit from W to 10^-4 W\n",
      "print\"cross talk power output=\",round(PdB,5),\"dB\";"
     ],
     "language": "python",
     "metadata": {},
     "outputs": [
      {
       "output_type": "stream",
       "stream": "stdout",
       "text": [
        "cross talk power output= 2.4649 x10^-4W\n",
        "cross talk power output= -36.08201 dB\n"
       ]
      }
     ],
     "prompt_number": 6
    }
   ],
   "metadata": {}
  }
 ]
}