summaryrefslogtreecommitdiff
path: root/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap8.ipynb
diff options
context:
space:
mode:
authorTrupti Kini2016-05-08 23:30:29 +0600
committerTrupti Kini2016-05-08 23:30:29 +0600
commit7262656f9b42f6e2cf6313c7bb6d96ff0db4a2f8 (patch)
tree9f6786d3263760b1c0c5af6dd9a6dbdcc6e99aba /Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap8.ipynb
parent004c6da6287fbcb9e7935acbd40b37b88c5bd6f8 (diff)
downloadPython-Textbook-Companions-7262656f9b42f6e2cf6313c7bb6d96ff0db4a2f8.tar.gz
Python-Textbook-Companions-7262656f9b42f6e2cf6313c7bb6d96ff0db4a2f8.tar.bz2
Python-Textbook-Companions-7262656f9b42f6e2cf6313c7bb6d96ff0db4a2f8.zip
Added(A)/Deleted(D) following books
A Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap10.ipynb A Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap2.ipynb A Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap3.ipynb A Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap4.ipynb A Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap5.ipynb A Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap6.ipynb A Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap7.ipynb A Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap8.ipynb A Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap9.ipynb A Optical_Fiber_Communication_System_by_Dr._M.K._Raina/screenshots/Sc1.png A Optical_Fiber_Communication_System_by_Dr._M.K._Raina/screenshots/sc2.png A Optical_Fiber_Communication_System_by_Dr._M.K._Raina/screenshots/sc3.png
Diffstat (limited to 'Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap8.ipynb')
-rw-r--r--Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap8.ipynb1069
1 files changed, 1069 insertions, 0 deletions
diff --git a/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap8.ipynb b/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap8.ipynb
new file mode 100644
index 00000000..8175459c
--- /dev/null
+++ b/Optical_Fiber_Communication_System_by_Dr._M.K._Raina/chap8.ipynb
@@ -0,0 +1,1069 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Ch-8 : Optical Sources"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:8.1 Pg: 335"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The total carrier recombination lifetime =24 ns\n",
+ "\n",
+ " The internal power =30.66 mW\n",
+ "\n",
+ " the answer is wrong in textbook\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "from __future__ import division\n",
+ "tr=40## rediative life time in ns\n",
+ "tnr=60## nonrediative life time in ns\n",
+ "i=35*10**-3## drive current in amp\n",
+ "y=0.85*10**-6## wavelength in m\n",
+ "h=6.626*10**-34## plank constant\n",
+ "c=3*10**8## the speed of light in m/s\n",
+ "e=1.602*10**-19## charge\n",
+ "t=tr*tnr/(tr+tnr)## total carrier recombination lifetime ns\n",
+ "ni=t/tr## internal quantam efficiency\n",
+ "pi=(ni*h*c*i)/(e*y)## internal power in watt\n",
+ "p_int=pi*10**3## internal power in mW\n",
+ "print \"The total carrier recombination lifetime =%d ns\"%( t)#\n",
+ "print \"\\n The internal power =%0.2f mW\"%( p_int)#\n",
+ "print \"\\n the answer is wrong in textbook\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:8.2 Pg: 335"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The total carrier recombination lifetime =18.75 ns\n",
+ "\n",
+ " The peak emission wavelength =1.09 um\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "from __future__ import division\n",
+ "tr=30## rediative life time in ns\n",
+ "tnr=50## nonrediative life time in ns\n",
+ "i=40*10**-3## drive current in amp\n",
+ "pi=28.4*10**-3## internal power in watt\n",
+ "h=6.626*10**-34## plank constant\n",
+ "c=3*10**8## the speed of light in m/s\n",
+ "e=1.602*10**-19## charge\n",
+ "t=tr*tnr/(tr+tnr)## total carrier recombination lifetime ns\n",
+ "ni=t/tr## internal quantam efficiency\n",
+ "y=(ni*h*c*i)/(e*pi)## peak emission wavelength in m\n",
+ "print \"The total carrier recombination lifetime =%0.2f ns\"%( t)#\n",
+ "print \"\\n The peak emission wavelength =%0.2f um\"%( y*10**6)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:8.3 Pg: 336"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The external power efficiency =0.39 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "from __future__ import division\n",
+ "nx=3.6## refractive index\n",
+ "Fn=0.68## transmission factor\n",
+ "pe_pi=(Fn)/(4*nx**2)#\n",
+ "pi_p=0.3#\n",
+ "nep=pe_pi*pi_p## external power efficiency\n",
+ "print \"The external power efficiency =%0.2f %%\"%( nep*100)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:8.4 Pg: 337"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The coupling efficiency =2.25 %\n",
+ "\n",
+ " The loss =16.48 db\n",
+ "\n",
+ " The loss in decibels relative to Pint=45.24 db\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,log\n",
+ "from __future__ import division\n",
+ "n=3.6## core refractive index\n",
+ "NA=0.15## numerical aperture\n",
+ "nc=NA**2## coupling efficiency\n",
+ "l_s=-10*log(nc)/log(10)## loss in db\n",
+ "pe_pi=0.023*0.0013## from ex 8.3\n",
+ "pc=-10*log(pe_pi)/log(10)## loss in decibels relative to Pint\n",
+ "print \"The coupling efficiency =%0.2f %%\"%( nc*100)#\n",
+ "print \"\\n The loss =%0.2f db\"%( l_s)#\n",
+ "print \"\\n The loss in decibels relative to Pint=%0.2f db\"%( pc)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:8.5 Pg: 337"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The optical power coupled into the fiber =7.19 uW\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "r=45*10**-6## radius in m\n",
+ "NA=0.3## numerical aperture\n",
+ "rd=40## radiance\n",
+ "A=3.14*(r*100)**2## area in cm**2\n",
+ "pe=3.14*(1-r)*A*rd*NA**2## optical power coupled into the fiber\n",
+ "Pe=pe*10**4## optical power coupled into the fiber uW\n",
+ "print \"The optical power coupled into the fiber =%0.2f uW\"%( Pe)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:8.6 Pg: 337"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The percentage of overall efficiency =0.37 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "pc=150*10**-6## coupling power W\n",
+ "p=20*10**-3*2## optical power W\n",
+ "npc=pc/p## overall efficiency\n",
+ "Npc=npc*100## percentage of overall efficiency\n",
+ "print \"The percentage of overall efficiency =%0.2f %%\"%( Npc)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:8.7 Pg: 338"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The number of longitudinal modes =300000.00\n",
+ "\n",
+ " The frequency separation of the modes =2.00 GHz\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "n=1.5## refractive index\n",
+ "L=0.05## crystal length in m\n",
+ "y=0.5*10**-6## wavelength in m\n",
+ "c=3*10**8## speed of light in m/s\n",
+ "q=2*n*L/y## the number of longitudinal modes\n",
+ "df=c/(2*n*L)## frequency separation of the modes in Hz\n",
+ "Df=df/10**9## frequency separation of the modes in GHz\n",
+ "print \"The number of longitudinal modes =%0.2f\"%( q)#\n",
+ "print \"\\n The frequency separation of the modes =%0.2f GHz\"%( Df)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:8.8 Pg: 338"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The wavelength of optical emission =0.87 um\n",
+ "\n",
+ " The frequency separation of the modes =59 GHz\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "Eg=1.43## bandgap energy in eV\n",
+ "dy=0.15*10**-9#\n",
+ "c=3*10**8## speed of light in m/s\n",
+ "y=1.24/Eg## in um\n",
+ "y1=y*10**-6## wavelength of optical emission in m\n",
+ "df=(c*dy)/(y1**2)## the line width in Hz\n",
+ "Df=df/10**9## the line width in GHz\n",
+ "print \"The wavelength of optical emission =%0.2f um\"%( y)#\n",
+ "print \"\\n The frequency separation of the modes =%d GHz\"%( Df)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:8.9 Pg: 338"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The crystal length =151.52 um\n",
+ "\n",
+ " The the number of longitudinal modes =1283\n",
+ "\n",
+ " answer is wrong in textbook\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "n=3.6## refractive index\n",
+ "c=3*10**8## speed of light in m/s\n",
+ "y=0.85*10**-6## wavelength in m\n",
+ "df=275*10**9## frequency separation of the modes in Hz\n",
+ "L=c/(2*n*df)## crystal length in m\n",
+ "L1=L*10**6## crystal length in um\n",
+ "q=2*n*L/y## the number of longitudinal modes\n",
+ "print \"The crystal length =%0.2f um\"%( L1)#\n",
+ "print \"\\n The the number of longitudinal modes =%d\"%( q)#\n",
+ "print \"\\n answer is wrong in textbook\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:8.10 Pg: 339"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The external power efficiency =13.00 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "nt=0.20## total efficiency\n",
+ "Eg=1.43## bandgap energy in eV\n",
+ "V=2.2## applied voltage in volts\n",
+ "nep=(nt*Eg)/V## external power efficiency\n",
+ "Nep=nep*100## percentage of external power efficiency\n",
+ "print \"The external power efficiency =%0.2f %%\"%( Nep)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:8.11 Pg: 339"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The divergence angle =48.91 degree \n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "from __future__ import division\n",
+ "h=0.35*10**-3## irradiance W/cm**2\n",
+ "po=0.45*10**-3## power output in watt\n",
+ "d=1.5## separation distance in cm\n",
+ "x=sqrt((4*po)/(3.14*d**2*h))## divergence angle in radians\n",
+ "X=(x*180)/3.14## divergence angle in degree\n",
+ "print \"The divergence angle =%0.2f degree \"%( X)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:8.12 Pg: 339"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The irradiance =14.44 mwatt/cm**2 \n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi\n",
+ "from __future__ import division\n",
+ "ni=0.09## normal efficiency\n",
+ "d=2*2.54## separation distance in cm\n",
+ "x=0.2## divergence angle in radians\n",
+ "vf=2.0## forward voltage in volts\n",
+ "i_f=65*10**-3## forward current in amp\n",
+ "pi=vf*i_f## input power in Watt\n",
+ "po=ni*pi## output power in Watt\n",
+ "H=4*po/(3.14*d**2*x**2)## irradiance in watt/cm**2\n",
+ "H1=H*1000## irradiance in mwatt/cm**2\n",
+ "print \"The irradiance =%0.2f mwatt/cm**2 \"%( H1)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:8.13 Pg: 340"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The internal quantam efficiency =93.46 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "tr=3.5## relative life time in ms\n",
+ "tnr=50## nonrelative life time in ms\n",
+ "ni=tnr/(tr+tnr)## internal quantam efficiency\n",
+ "print \"The internal quantam efficiency =%0.2f %%\"%( ni*100)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:8.14 Pg: 340"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The optical power coupled into optical fiber =0.80 mW \n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,sin\n",
+ "from __future__ import division\n",
+ "ni=0.15## internal quantam efficiency\n",
+ "vf=2.0## forward voltage in volts\n",
+ "i_f=15*10**-3## forward current in amp\n",
+ "x=25## acceptance angle in degree\n",
+ "pi=vf*i_f## input power in Watt\n",
+ "po=ni*pi## output power in Watt\n",
+ "NA=(sin(x*3.14/180))#\n",
+ "nc=NA**2## numerical aperture\n",
+ "pf=nc*po## optical power coupled into optical fiber in w\n",
+ "print \"The optical power coupled into optical fiber =%0.2f mW \"%( pf*1000)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:8.15 Pg: 340"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The rediative life time =182 ns\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "tnr=10## nonrediative life time in ns\n",
+ "n_inj=0.80## injection efficiency\n",
+ "n_ex=0.60## extraction efficiency\n",
+ "nt=0.025## total efficiency\n",
+ "nr=nt/(n_inj*n_ex)## non rediative life time in ns\n",
+ "tr=((1/nr)-1)*tnr## rediative life time in ns\n",
+ "print \"The rediative life time =%d ns\"%( tr)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:8.16 Pg: 341"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The bandwidth =11.67 MHz\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "tr=30*10**-9## rise time in s\n",
+ "Bw=0.35/tr## bandwidth in Hz\n",
+ "print \"The bandwidth =%0.2f MHz\"%( Bw/10**6)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:8.17 Pg: 341"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The divergence angle =0.02 radians\n",
+ "\n",
+ " The divergence angle =0.92 degree\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "y=630*10**-9## operating wavelength in m\n",
+ "w=25*10**-6## spot size in m\n",
+ "x=2*y/(3.14*w)## divergence angle in radians\n",
+ "x1=x*180/3.14## divergence angle in degree\n",
+ "print \"The divergence angle =%0.2f radians\"%( x)#\n",
+ "print \"\\n The divergence angle =%0.2f degree\"%( x1)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:8.18 Pg: 341"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The energy =2.25 electron volts\n",
+ "\n",
+ " The energy =0.12 electron volts\n",
+ "\n",
+ " The energy =0.52 electron volts\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "y1=550*10**-3## peak of eyes response in um\n",
+ "y2=10.6## standard wavelength in um\n",
+ "y3=2.39## predominant IR line of He-Ne laser in um\n",
+ "E1=1.24/y1## energy in electron volts\n",
+ "E2=1.24/y2## energy in electron volts\n",
+ "E3=1.24/y3## energy in electron volts\n",
+ "print \"The energy =%0.2f electron volts\"%( E1)#\n",
+ "print \"\\n The energy =%0.2f electron volts\"%( E2)#\n",
+ "print \"\\n The energy =%0.2f electron volts\"%( E3)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:8.19 Pg: 342"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The cut off wavelength =885 nm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "Eg=1.4## energy in electron volts\n",
+ "y=1.24/Eg## cut off wavelength in um\n",
+ "y1=y*1000## cut off wavelength in nm\n",
+ "print \"The cut off wavelength =%d nm\"%( y1)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:8.20 Pg: 342"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The divergence angle =0.15 radians\n",
+ "\n",
+ " The divergence angle =8.76 degree\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "y=1200*10**-9## operating wavelength in m\n",
+ "w=5*10**-6## spot size in m\n",
+ "x=2*y/(3.14*w)## divergence angle in radians\n",
+ "x1=x*180/3.14## divergence angle in degree\n",
+ "print \"The divergence angle =%0.2f radians\"%( x)#\n",
+ "print \"\\n The divergence angle =%0.2f degree\"%( x1)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:8.21 Pg: 342"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The acceptance angle =14.03 degree\n",
+ "\n",
+ " The coupling efficiency =5.88 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pi,asin\n",
+ "from __future__ import division\n",
+ "n1=1.48## core refractive index\n",
+ "n2=1.46## cladding refractive index \n",
+ "NA=sqrt(n1**2-n2**2)## numerical aperture\n",
+ "xa=(asin(NA))*(180/pi)## acceptance angle in degree\n",
+ "nc=NA**2## coupling efficiency\n",
+ "print \"The acceptance angle =%0.2f degree\"%( xa)#\n",
+ "print \"\\n The coupling efficiency =%0.2f %%\"%( nc*100)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:8.22 Pg: 343"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The frequency separation =0.27 GHz\n",
+ "\n",
+ " The energy separation =1.13 meV\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "c=3*10**8## speed of light in m/s\n",
+ "n=3.66## for GaAs\n",
+ "L=150*10**-6## cavity length in m\n",
+ "dv=c/(2*n*L)##frequency separation in Hz\n",
+ "dv1=dv/10**12## frequency separation in GHz\n",
+ "h=6.64*10**-34## plank constant\n",
+ "q=1.6*10**-19## charge of an electron\n",
+ "dE=(h*dv)/q## energy separation eV\n",
+ "print \"The frequency separation =%0.2f GHz\"%( dv1)#\n",
+ "print \"\\n The energy separation =%0.2f meV\"%( dE*1000)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:8.23 Pg: 343"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The conversion efficiency =1 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "po=2*10**-3## optical power in watts\n",
+ "I=100*10**-3## current in amp\n",
+ "V=2## applied voltage in volt\n",
+ "pe=I*V## electrical power in watts\n",
+ "n=(po/pe)*100## conversion efficiency\n",
+ "print \"The conversion efficiency =%d %%\"%( n)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:8.24 Pg: 343"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The wavelength =0.87 um\n",
+ "\n",
+ " The width =39 GHz\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "c=3*10**8## speed of light in m/s\n",
+ "h=6.64*10**-34## plank constant\n",
+ "Eg=1.43## gap energy in eV\n",
+ "y=(1.24*10**-6)/Eg## wavelength in m\n",
+ "dy=0.1*10**-9## in m\n",
+ "df=(dy*c)/y**2## width in Hz\n",
+ "print \"The wavelength =%0.2f um\"%( y*10**6)#\n",
+ "print \"\\n The width =%d GHz\"%( df/10**9)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:8.25 Pg: 344"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The total carrier recombination lifetime =19.57 ns\n",
+ "\n",
+ " The internal quantam efficiency =0.78 \n",
+ "\n",
+ " The internal power =2.60 mW\n",
+ "\n",
+ " The power emitted =1.86 mW\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "tr=25## rediative life time in ns\n",
+ "tnr=90## nonrediative life time in ns\n",
+ "i=3.5*10**-3## drive current in amp\n",
+ "y=1.31*10**-6## wavelength in m\n",
+ "h=6.625*10**-34## plank constant\n",
+ "c=3*10**8## the speed of light in m/s\n",
+ "e=1.6*10**-19## charge\n",
+ "t=tr*tnr/(tr+tnr)## total carrier recombination lifetime ns\n",
+ "ni=t/tr## internal quantam efficiency\n",
+ "pi=(ni*h*c*i)/(e*y)## internal power in watt\n",
+ "p_int=pi*10**3## internal power in mW\n",
+ "P=p_int/(ni*(ni+1))## power emitted in mW\n",
+ "print \"The total carrier recombination lifetime =%0.2f ns\"%( t)#\n",
+ "print \"\\n The internal quantam efficiency =%0.2f \"%( ni)#\n",
+ "print \"\\n The internal power =%0.2f mW\"%( p_int)#\n",
+ "print \"\\n The power emitted =%0.2f mW\"%( P)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:8.26 Pg: 344"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The external efficiency =10.30 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "nt=0.18## total efficiency\n",
+ "Eg=1.43## band gape energy eV\n",
+ "V=2.5## appied voltage in volt\n",
+ "n_ex=(nt*(Eg/V))*100## external efficiency\n",
+ "print \"The external efficiency =%0.2f %%\"%( n_ex)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:8.27 Pg: 345"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The cavity length =149 um\n",
+ "\n",
+ " The number of longitudinal modes =1233\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import floor\n",
+ "from __future__ import division\n",
+ "c=3*10**8## speed of light in m/s\n",
+ "n=3.6## for GaAs\n",
+ "df=278*10**9## separation in Hz\n",
+ "y=0.87*10**-6## wavelength in m\n",
+ "L=c/(2*n*df)## cavity length in m\n",
+ "l=L*10**6## cavity length in um\n",
+ "L1=floor(l)*10**-6## cavity length in m\n",
+ "q=(2*n*L1)/y## number of longitudinal modes\n",
+ "print \"The cavity length =%d um\"%( l)#\n",
+ "print \"\\n The number of longitudinal modes =%d\"%( q)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:8.28 Pg: 345"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The coupling efficiency =0.06\n",
+ "\n",
+ " The loss =12.33 decibels\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log,sin\n",
+ "from __future__ import division\n",
+ "ac=14## acceptance angle in degree\n",
+ "nc=(sin(ac*3.14/180))**2## coupling efficiency\n",
+ "l_s=-10*log(nc)/log(10)## loss in decibels\n",
+ "print \"The coupling efficiency =%0.2f\"%( nc)#\n",
+ "print \"\\n The loss =%0.2f decibels\"%( l_s)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Ex:8.29 Pg: 346"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The frequency separation =81 GHz\n",
+ "\n",
+ " The wavelength separation =0.20 nm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from __future__ import division\n",
+ "c=3*10**8## speed of light in m/s\n",
+ "n=3.7## for GaAs\n",
+ "L=500*10**-6## cavity length in m\n",
+ "y=850*10**-9##\n",
+ "df=c/(2*n*L)##frequency separation in Hz\n",
+ "df1=df/10**9## frequency separation in GHz\n",
+ "dy=(y*y)/(2*L*n)## wavelength in m\n",
+ "dy1=dy*10**9## wavelength in nm\n",
+ "print \"The frequency separation =%d GHz\"%( df1)#\n",
+ "print \"\\n The wavelength separation =%0.2f nm\"%( dy1)"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.9"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}