summaryrefslogtreecommitdiff
path: root/Electronic_Devices_by_S._Sharma/Chapter04.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Electronic_Devices_by_S._Sharma/Chapter04.ipynb')
-rw-r--r--Electronic_Devices_by_S._Sharma/Chapter04.ipynb1073
1 files changed, 1073 insertions, 0 deletions
diff --git a/Electronic_Devices_by_S._Sharma/Chapter04.ipynb b/Electronic_Devices_by_S._Sharma/Chapter04.ipynb
new file mode 100644
index 00000000..7f08a122
--- /dev/null
+++ b/Electronic_Devices_by_S._Sharma/Chapter04.ipynb
@@ -0,0 +1,1073 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:f0797b60144492bc045e4824d74c6dbb79a67e54db7f5e1398d6180ade0e45ec"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 04 - JUNCTIONS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E02 - Pg 165"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Exa 4.2 - 165\n",
+ "import math\n",
+ "# Given data\n",
+ "C1= 5.*10.**-12.;# in F\n",
+ "C2= 5.*10.**-12.;# in F\n",
+ "L= 10.*10.**-3.;# in H\n",
+ "C_Tmin= C1*C2/(C1+C2);# in F\n",
+ "f_omax= 1./(2.*math.pi*math.sqrt(L*C_Tmin));# in Hz\n",
+ "C1= 50.*10.**-12.;# in F\n",
+ "C2= 50.*10.**-12.;# in F\n",
+ "C_Tmax= C1*C2/(C1+C2);# in F\n",
+ "f_omin= 1./(2.*math.pi*math.sqrt(L*C_Tmax));# in Hz\n",
+ "f_omax= f_omax*10.**-6.;# in MHz\n",
+ "f_omin= f_omin*10.**-3.;# in kHz\n",
+ "print '%s %.f' %(\"The maximum value of resonant frequency in MHz is : \",f_omax)\n",
+ "print '%s %.f' %(\"The minimum value of resonant frequency in kHz is : \",f_omin)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The maximum value of resonant frequency in MHz is : 1\n",
+ "The minimum value of resonant frequency in kHz is : 318\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E03 - Pg 188"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Exa 4.3 - 188\n",
+ "import math\n",
+ "# Given data\n",
+ "t = 4.4 * 10.**22.;# total number of Ge atoms/cm**3\n",
+ "n = 1 * 10.**8.;# number of impurity atoms\n",
+ "N_A = t/n;# in atoms/cm**3\n",
+ "N_A = N_A * 10.**6.;# in atoms/m**3\n",
+ "N_D = N_A * 10.**3.;# in atoms/m**3\n",
+ "n_i = 2.5 * 10.**13.;# in atoms/cm**3\n",
+ "n_i = n_i * 10.**6.;# in atoms/m**3\n",
+ "V_T = 26.;#in mV\n",
+ "V_T= V_T*10.**-3.;# in V\n",
+ "# The contact potential for Ge semiconductor,\n",
+ "V_J = V_T * math.log((N_A * N_D)/(n_i)**2.);# in V\n",
+ "print '%s %.3f' %(\"The contact potential for Ge semiconductor in V is\",V_J);\n",
+ "# Part (b)\n",
+ "t = 5.* 10.**22.;# total number of Si atoms/cm**3\n",
+ "N_A = t/n;# in atoms/cm**3\n",
+ "N_A = N_A * 10.**6.;# in atoms/m**3\n",
+ "N_D = N_A * 10.**3.;# in atoms/m**3\n",
+ "n_i = 1.5 * 10.**10.;# in atoms/cm**3\n",
+ "n_i = n_i * 10.**6.;# in atoms/m**3\n",
+ "V_T = 26;#in mV\n",
+ "V_T= V_T*10.**-3.;# in V\n",
+ "# The contact potential for Si P-N junction,\n",
+ "V_J = V_T * math.log((N_A * N_D)/(n_i)**2.);# in V\n",
+ "print '%s %.3f' %(\"The contact potential for Si P-N junction in V is\",V_J);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The contact potential for Ge semiconductor in V is 0.329\n",
+ "The contact potential for Si P-N junction in V is 0.721\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E04 - Pg 188"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Exa 4.4 - 188\n",
+ "import math \n",
+ "# Given data\n",
+ "V_T = 26.;# in mV\n",
+ "V_T=V_T*10.**-3.;# in V\n",
+ "n_i = 2.5 * 10.**13.;\n",
+ "Sigma_p = 1.;\n",
+ "Sigma_n = 1.;\n",
+ "Mu_n = 3800.;\n",
+ "q = 1.6 * 10.**-19.;# in C\n",
+ "Mu_p = 1800.;\n",
+ "N_A = Sigma_p/(2.* q * Mu_p);# in /cm**3\n",
+ "N_D = Sigma_n /(q * Mu_n);# in /cm**3\n",
+ "# The height of the energy barrier for Ge,\n",
+ "V_J = V_T * math.log((N_A * N_D)/(n_i)**2);# in V\n",
+ "print '%s %.2f' %(\"For Ge the height of the energy barrier in V is\",V_J);\n",
+ "# For Si p-n juction\n",
+ "n_i = 1.5 * 10.**10.;\n",
+ "Mu_n = 1300.;\n",
+ "Mu_p = 500.;\n",
+ "N_A = Sigma_p/(2.* q * Mu_p);# in /cm**3\n",
+ "N_D = Sigma_n /(q * Mu_n);# in /cm**3\n",
+ "# The height of the energy barrier for Si p-n junction,\n",
+ "V_J = V_T * math.log((N_A * N_D)/(n_i)**2.);# in V\n",
+ "print '%s %.3f' %(\"For Si p-n junction the height of the energy barrier in V is\",V_J);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For Ge the height of the energy barrier in V is 0.22\n",
+ "For Si p-n junction the height of the energy barrier in V is 0.666\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E05 - Pg 189"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Exa 4.5 - 189\n",
+ "import math\n",
+ "# Given data\n",
+ "Eta = 1.;\n",
+ "V_T = 26.;# in mV\n",
+ "V_T= V_T*10.**-3.;# in V\n",
+ "#From equation of the diode current, I = I_o * (%e**(V/(Eta*V_T)) - 1) and I = -(0.9) * I_o\n",
+ "V= math.log(1-0.9)*V_T;#voltage in V\n",
+ "print '%s %.3f' %(\"The voltage in volts is : \",V)\n",
+ "# Part (ii)\n",
+ "V1=0.05;# in V\n",
+ "V2= -0.05;# in V\n",
+ "# The ratio of the current for a forward bias to reverse bias \n",
+ "ratio= (math.e**(V1/(Eta*V_T))-1.)/(math.e**(V2/(Eta*V_T))-1.)\n",
+ "print '%s %.2f' %(\"The ratio of the current for a forward bias to reverse bias is : \",ratio)\n",
+ "# Part (iii)\n",
+ "Io= 10.;# in uA\n",
+ "Io=Io*10.**-3.;# in mA\n",
+ "#For \n",
+ "V=0.1;# in V\n",
+ "# Diode current\n",
+ "I = Io * (math.e**(V/(Eta*V_T)) - 1.);# in mA\n",
+ "print '%s %.3f' %(\"For V=0.1 V , the value of I in mA is : \",I)\n",
+ "#For \n",
+ "V=0.2;# in V\n",
+ "# Diode current\n",
+ "I = Io * (math.e**(V/(Eta*V_T)) - 1);# in mA\n",
+ "print '%s %.1f' %(\"For V=0.2 V , the value of I in mA is : \",I)\n",
+ "#For \n",
+ "V=0.3;# in V\n",
+ "# Diode current\n",
+ "I = Io * (math.e**(V/(Eta*V_T)) - 1.);# in mA\n",
+ "print '%s %.2f' %(\"For V=0.3 V , the value of I in A is : \",I*10**-3)\n",
+ "print '%s' %(\"From three value of I, for small rise in forward voltage, the diode current increase rapidly\")\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The voltage in volts is : -0.060\n",
+ "The ratio of the current for a forward bias to reverse bias is : -6.84\n",
+ "For V=0.1 V , the value of I in mA is : 0.458\n",
+ "For V=0.2 V , the value of I in mA is : 21.9\n",
+ "For V=0.3 V , the value of I in A is : 1.03\n",
+ "From three value of I, for small rise in forward voltage, the diode current increase rapidly\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E06 - Pg 189"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Exa 4.6 - 189\n",
+ "import math\n",
+ "# Given data\n",
+ "# Part (i)\n",
+ "T1= 25.;# in degreeC\n",
+ "T2= 80.;# in degreeC\n",
+ "# Formula Io2= Io1*2**((T2-T1)/10)\n",
+ "AntiFactor= 2.**((T2-T1)/10.);\n",
+ "print '%s %.f' %(\"Anticipated factor for Ge is : \",round(AntiFactor))\n",
+ "# Part (ii)\n",
+ "T1= 25.;# in degreeC\n",
+ "T2= 150.;# in degreeC\n",
+ "#AntiFactor= 2.**((T2-T1)/10.);\n",
+ "AntiFactor=2.**12.5\n",
+ "print '%s %.f' %(\"Anticipated factor for Si is : \",round(AntiFactor))\n",
+ "#answer in textboo is wrong due to rounding error"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Anticipated factor for Ge is : 45\n",
+ "Anticipated factor for Si is : 5793\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E07 - Pg 190"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Exa 4.7 - 190\n",
+ "import math\n",
+ "# Given data\n",
+ "I=5.;# in uA\n",
+ "V=10.;# in V\n",
+ "T1= 0.11;# in degreeC**-1\n",
+ "T2= 0.07;# in degreeC**-1\n",
+ "# Io+I_R=I (i)\n",
+ "# dI_by_dT= dIo_by_dT (ii)\n",
+ "# 1/Io*dIo_by_dT = T1 and 1/I*dI_by_dT = T2, So\n",
+ "Io= T2*I/T1;# in uA\n",
+ "I_R= I-Io;# in uA\n",
+ "R= V/I_R;# in Mohm\n",
+ "print '%s %.1f' %(\"The leakage resistance in Mohm is : \",R)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The leakage resistance in Mohm is : 5.5\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E08 - Pg 190"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Exa 4.8 - 190\n",
+ "import math\n",
+ "# Given data\n",
+ "Eta = 1.;\n",
+ "T = 125.;# in degreeC\n",
+ "T = T + 273.;# in K\n",
+ "V_T = 8.62 * 10.**-5. * 398.;# in V\n",
+ "I_o = 30.;# in uA\n",
+ "I_o= I_o*10.**-6.;# in A\n",
+ "v = 0.2;# in V\n",
+ "# The dynamic resistance in the forward direction \n",
+ "r_f = (Eta * V_T)/(I_o * math.e**(v/(Eta* V_T)));# in ohm\n",
+ "print '%s %.2f' %(\"The dynamic resistance in the forward direction in ohm is \",r_f);\n",
+ "# The dynamic resistance in the reverse direction \n",
+ "r_r = (Eta * V_T)/(I_o * math.e**(-v/(Eta* V_T)));# in ohm\n",
+ "r_r= r_r*10.**-3.;# in k ohm\n",
+ "print '%s %.2f' %(\"The dynamic resistance in the reverse direction in kohm is\",r_r);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The dynamic resistance in the forward direction in ohm is 3.36\n",
+ "The dynamic resistance in the reverse direction in kohm is 389.08\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E09 - Pg 191"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Exa 4.9 - 191\n",
+ "import math\n",
+ "# Given data\n",
+ "epsilon = 16./(36. * math.pi * 10.**11.);# in F/cm\n",
+ "A = 1. * 10.**-2.;\n",
+ "W = 2. * 10.**-4.;\n",
+ "# The barrier capacitance \n",
+ "C_T = (epsilon * A)/W;# in F\n",
+ "C_T= C_T*10.**12.;# in pF\n",
+ "print '%s %.2f' %(\"The barrier capacitance in pF is\",C_T);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The barrier capacitance in pF is 70.74\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E10 - Pg 191"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Exa 4.10 - 191\n",
+ "import math\n",
+ "#Given data\n",
+ "A = 1.;# in mm**2\n",
+ "A = A * 10.**-6.;# in m**2\n",
+ "N_A = 3. * 10.**20.;# in atoms/m**3\n",
+ "q = 1.6 *10.**-19.;# in C\n",
+ "V_o = 0.2;# in V\n",
+ "epsilon_r=16.;\n",
+ "epsilon_o= 8.854*10.**-12.;# in F/m\n",
+ "epsilon=epsilon_r*epsilon_o;\n",
+ "# Part (a)\n",
+ "V=-10.;# in V\n",
+ "# V_o - V = 1/2*((q * N_A )/epsilon) * W**2\n",
+ "W = math.sqrt(((V_o - V) * 2. * epsilon)/(q * N_A));# m\n",
+ "W= W*10.**6.;# in um\n",
+ "print '%s %.2f' %(\"The width of the depletion layer for an applied reverse voltage of 10V in um is \",W);\n",
+ "W= W*10.**-6.;# in m\n",
+ "C_T1 = (epsilon * A)/W;# in F\n",
+ "C_T1= C_T1*10.**12.;# in pF\n",
+ "# Part (b)\n",
+ "V=-0.1;# in V\n",
+ "W = math.sqrt(((V_o - V) * 2. * epsilon)/(q * N_A));# m\n",
+ "W= W*10.**6.;# in um\n",
+ "print '%s %.2f' %(\"The width of the depletion layer for an applied reverse voltage of 0.1V in um is \",W);\n",
+ "W= W*10.**-6.;# in m\n",
+ "C_T2 = (epsilon * A)/W;# in F\n",
+ "C_T2= C_T2*10.**12.;# in pF\n",
+ "# Part (c)\n",
+ "V=0.1;# in V\n",
+ "W = math.sqrt(((V_o - V) * 2. * epsilon)/(q * N_A));# m\n",
+ "W= W*10.**6.;# in um\n",
+ "print '%s %.3f' %(\"The width of the depletion layer for an applied for a forward bias of 0.1V in um is \",W);\n",
+ "# Part (d)\n",
+ "print '%s %.2f' %(\"The space charge capacitance for an applied reverse voltage of 10V in pF is\",C_T1);\n",
+ "print '%s %.2f' %(\"The space charge capacitance for an applied reverse voltage of 0.1V in pF is\",C_T2);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The width of the depletion layer for an applied reverse voltage of 10V in um is 7.76\n",
+ "The width of the depletion layer for an applied reverse voltage of 0.1V in um is 1.33\n",
+ "The width of the depletion layer for an applied for a forward bias of 0.1V in um is 0.768\n",
+ "The space charge capacitance for an applied reverse voltage of 10V in pF is 18.26\n",
+ "The space charge capacitance for an applied reverse voltage of 0.1V in pF is 106.46\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E11 - Pg 192"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Exa 4.11 - 192\n",
+ "import math\n",
+ "# Given data\n",
+ "I_o = 1.8 * 10.**-9.;# A\n",
+ "v = 0.6;# in V\n",
+ "Eta = 2.;\n",
+ "V_T = 26.;# in mV\n",
+ "V_T=V_T*10.**-3.;# in V\n",
+ "# The current in the junction\n",
+ "I = I_o *(math.e**(v/(Eta * V_T)));# in A\n",
+ "I= I*10.**3.;# in mA\n",
+ "print '%s %.3f' %(\"The current in the junction in mA is\",I);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The current in the junction in mA is 0.185\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E12 - Pg 192"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Exa 4.12 - 192\n",
+ "# Given data\n",
+ "import math\n",
+ "I_o = 2.4 * 10.**-14.;\n",
+ "I = 1.5;# in mA\n",
+ "I=I*10.**-3.;# in A\n",
+ "Eta = 1.;\n",
+ "V_T = 26.;# in mV\n",
+ "V_T= V_T*10.**-3.;# in V\n",
+ "# The forward biasing voltage across the junction\n",
+ "v =math.log((I + I_o)/I_o) * V_T;# in V\n",
+ "print '%s %.4f' %(\"The forward biasing voltage across the junction in V is\",v);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The forward biasing voltage across the junction in V is 0.6463\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E13 - Pg 192"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Exa 4.13 - 192\n",
+ "# Given data\n",
+ "I_o = 10.;# in nA\n",
+ "# I = I_o * ((e**(v/(Eta * V_T))) - 1) as diode is reverse biased by large voltage\n",
+ "# e**(v/(Eta * V_T)<< 1, so neglecting it\n",
+ "I = I_o * (-1.);# in nA\n",
+ "print '%s %.f' %(\"The Diode current in nA is \",I);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Diode current in nA is -10\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E14 - Pg 192"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Exa 4.17 - 193\n",
+ "import math\n",
+ "# Given data\n",
+ "t = 4.4 * 10.**22.;# in total number of atoms/cm**3\n",
+ "n = 1. * 10.**8.;# number of impurity\n",
+ "N_A = t/n;# in atoms/cm**3\n",
+ "N_A = N_A * 10.**6.;# in atoms/m**3\n",
+ "N_D = N_A * 10.**3.;# in atoms/m**3\n",
+ "V_T = 26.;# in mV\n",
+ "V_T = V_T * 10.**-3.;# in V\n",
+ "n_i = 2.5 * 10.**19.;# in /cm**3\n",
+ "# The junction potential\n",
+ "V_J = V_T * math.log((N_A * N_D)/(n_i)**2.);# in V\n",
+ "print '%s %.3f' %(\"The junction potential in V is\",V_J)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The junction potential in V is 0.329\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E15 - Pg "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Exa 4.15 - 192\n",
+ "%matplotlib inline\n",
+ "import math\n",
+ "import numpy as np\n",
+ "import matplotlib.pyplot as plt\n",
+ "# Given data\n",
+ "## in V\n",
+ "# V_S = i*R_L + V_D\n",
+ "V_S = 10## in V (i * R_L = 0)\n",
+ "print '%s %.f' %(\"when diode is OFF, the voltage in volts is : \",V_S)#\n",
+ "R_L = 250.## in ohm\n",
+ "I = V_S/R_L## in A\n",
+ "print '%s %.f' %(\"when diode is ON, the current in mA is\",I*10**3)#\n",
+ "V_D2=np.linspace(10,0,num=100)## in V\n",
+ "j=0;\n",
+ "I2 = np.zeros(100)\n",
+ "for x in V_D2:\n",
+ "\tI2[j] = (V_S- x)/R_L*1000.;\n",
+ "\tj+=1\n",
+ "plt.plot(V_D2,I2)\n",
+ "plt.xlabel(\"V_D in volts\")#\n",
+ "plt.ylabel(\"Current in mA\")\n",
+ "plt.title(\"DC load line\")#\n",
+ "plt.show()\n",
+ "print '%s' %(\"DC load line shown in figure\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "when diode is OFF, the voltage in volts is : 10\n",
+ "when diode is ON, the current in mA is 40\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEaCAYAAAD3+OukAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHK1JREFUeJzt3X/0HHV97/HnK4lIEJUEKkQNJmIBUQREuKigq6GYAKag\nvSDt7U2oVyGnV/BHlB/3tPnGtocELgkc09heBQ2iKBVFoqjQklVQCwIBAhGokFSiJBbCz0L98c37\n/jGzybL5/thfszO783qcsyezszM77+xJ9rOv+Xw+M4oIzMysnCbkXYCZmeXHjYCZWYm5ETAzKzE3\nAmZmJeZGwMysxNwImJmVmBsBKy1J8yXdnNF7b5P02lFeq0r6YLr8Z5K+n0UNZs1wI2B9QdJGSc9J\nelrSE5J+JOkMSWrY7khJ16fbPC7pVknzcyp7NJE+iIgvR8R7cq7HSsyNgPWLAE6MiJcB+wJLgHOA\ny2obSHor8C/AGmC/iNgTWADM7n25Zv3BjYD1nYh4JiJWA6cC8yQdlL50EfDFiLgoIram294ZER9o\n5n0lvU3STyU9Kem2tFGpvXa6pPVpEnlI0ocb9v2kpF9J2iTpL5r9uzSekkp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",
+ "text": [
+ "DC load line shown in figure\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E16 - Pg"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Exa 4.16 - 193\n",
+ "# Given data\n",
+ "import math\n",
+ "V = 0.25;# in V\n",
+ "I_o = 1.2;# in uA\n",
+ "I_o = I_o * 10.**-6.;# in A\n",
+ "V_T = 26;# in mV\n",
+ "V_T = V_T * 10.**-3.;# in V\n",
+ "Eta = 1.;\n",
+ "# The ac resistance of the diode \n",
+ "r = (Eta * V_T)/(I_o * (math.e**(V/(Eta * V_T))));# in ohm\n",
+ "print '%s %.3f' %(\"The ac resistance of the diode in ohm is\",r);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The ac resistance of the diode in ohm is 1.445\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E17 - Pg 193"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Exa 4.17 - 193\n",
+ "import math\n",
+ "# Given data\n",
+ "t = 4.4 * 10.**22.;# in total number of atoms/cm**3\n",
+ "n = 1. * 10.**8.;# number of impurity\n",
+ "N_A = t/n;# in atoms/cm**3\n",
+ "N_A = N_A * 10.**6.;# in atoms/m**3\n",
+ "N_D = N_A * 10.**3.;# in atoms/m**3\n",
+ "V_T = 26.;# in mV\n",
+ "V_T = V_T * 10.**-3.;# in V\n",
+ "n_i = 2.5 * 10.**19.;# in /cm**3\n",
+ "# The junction potential\n",
+ "V_J = V_T * math.log((N_A * N_D)/(n_i)**2.);# in V\n",
+ "print '%s %.3f' %(\"The junction potential in V is\",V_J)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The junction potential in V is 0.329\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E18 - Pg 194"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Exa 4.18 - 194\n",
+ "import math\n",
+ "# Given data\n",
+ "Eta = 1.;\n",
+ "I_o = 30.;# in MuA\n",
+ "I_o = I_o * 10.**-6.;# in A\n",
+ "v = 0.2;# in V\n",
+ "K = 1.381 * 10.**-23.;# in J/degree K \n",
+ "T = 125.;# in degreeC\n",
+ "T = T + 273.;# in K\n",
+ "q = 1.6 * 10.**-19.;# in C\n",
+ "V_T = (K*T)/q;# in V\n",
+ "# The forward dynamic resistance,\n",
+ "r_f = (Eta * V_T)/(I_o * (math.e**(v/(Eta * V_T))));# in ohm\n",
+ "print '%s %.3f' %(\"The forward dynamic resistance in ohm is\",r_f);\n",
+ "# The Reverse dynamic resistance\n",
+ "r_f1 = (Eta * V_T)/(I_o * (math.e**(-(v)/(Eta * V_T))));# in ohm\n",
+ "r_f1= r_f1*10.**-3.;# in k ohm\n",
+ "print '%s %.2f' %(\"The Reverse dynamic resistance in kohm is\",r_f1);\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The forward dynamic resistance in ohm is 3.391\n",
+ "The Reverse dynamic resistance in kohm is 386.64\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E19 - Pg 194"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Exa 4.19 - 194\n",
+ "import math\n",
+ "# Given data\n",
+ "q = 1.6 * 10.**-19.;# in C\n",
+ "N_A = 3 * 10.**20.;# in /m**3\n",
+ "A = 1.;# in um**2\n",
+ "A = A * 10.**-6.;# in m**2\n",
+ "V = -10.;# in V\n",
+ "V_J = 0.25;# in V\n",
+ "V_B = V_J - V;# in V\n",
+ "epsilon_o = 8.854;# in pF/m\n",
+ "epsilon_o = epsilon_o * 10.**-12.;# in F/m\n",
+ "epsilon_r = 16.;\n",
+ "epsilon = epsilon_o * epsilon_r;\n",
+ "# The width of depletion layer,\n",
+ "W = math.sqrt((V_B * 2. * epsilon)/(q * N_A));# in m \n",
+ "W=W*10.**6.;# in um\n",
+ "print '%s %.2f' %(\"The width of depletion layer in um is\",W);\n",
+ "W=W*10.**-6.;# in m\n",
+ "# The space charge capacitance,\n",
+ "C_T = (epsilon * A)/W;# in pF\n",
+ "C_T=C_T*10.**12.;# in pF\n",
+ "print '%s %.4f' %(\"The space charge capacitance in pF is\",C_T);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The width of depletion layer in um is 7.78\n",
+ "The space charge capacitance in pF is 18.2127\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E20 - Pg 194"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Exa 4.20 - 194\n",
+ "import math\n",
+ "# Given data\n",
+ "W = 2. * 10.**-4.;# in cm\n",
+ "W = W * 10.**-2.;# in m\n",
+ "A = 1.;# in mm**2\n",
+ "A = A * 10.**-6.;# in m**2\n",
+ "epsilon_r = 16.;\n",
+ "epsilon_o = 8.854 * 10.**-12.;# in F/m\n",
+ "epsilon = epsilon_r * epsilon_o;\n",
+ "C_T = (epsilon * A)/W;# in F\n",
+ "C_T= C_T*10.**12.;# in pF\n",
+ "print '%s %.3f' %(\"The barrier capacitance in pF is\",C_T);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The barrier capacitance in pF is 70.832\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E21 - Pg 195"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Exa 4.21 - 195\n",
+ "import math\n",
+ "# Given data\n",
+ "C_T = 100.;# in pF\n",
+ "C_T=C_T*10.**-12.;# in F\n",
+ "epsilon_r = 12.;\n",
+ "epsilon_o = 8.854 * 10.**-12.;# in F/m\n",
+ "epsilon = epsilon_r * epsilon_o;\n",
+ "Rho_p = 5.;# in ohm-cm\n",
+ "Rho_p = Rho_p * 10.**-2.;# in ohm-m\n",
+ "V_j = 0.5;# in V\n",
+ "V = -4.5;# in V\n",
+ "Mu_p = 500.;# in cm**2\n",
+ "Mu_p = Mu_p * 10.**-4.;# in m**2\n",
+ "Sigma_p = 1./Rho_p;# in per ohm-m\n",
+ "qN_A = Sigma_p/ Mu_p;\n",
+ "V_B = V_j - V;\n",
+ "W = math.sqrt((V_B * 2. * epsilon)/qN_A);# in m\n",
+ "#C_T = (epsilon * A)/W;\n",
+ "A = (C_T * W)/ epsilon;# in m\n",
+ "D = math.sqrt(A * (4./math.pi));# in m\n",
+ "D = D * 10.**3.;# in mm\n",
+ "print '%s %.2f' %(\"The diameter in mm is\",D);\n",
+ " \n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The diameter in mm is 1.40\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E22 - Pg 195"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Exa 4.22 - 195\n",
+ "import math\n",
+ "# Given data\n",
+ "q = 1.6 * 10.**-19.;# in C\n",
+ "Mu_p = 500.;# in cm**2/V-sec\n",
+ "Rho_p = 3.5;# in ohm-cm\n",
+ "Mu_n = 1500.;# in cm**2/V-sec\n",
+ "Rho_n = 10.;# in ohm-cm\n",
+ "N_A = 1./(Rho_p * Mu_p * q);# in /cm**3\n",
+ "N_D = 1./(Rho_n * Mu_n * q);# in /cm**3\n",
+ "V_J = 0.56;# in V\n",
+ "n_i = 1.5 * 10.**10.;# in /cm**3\n",
+ "V_T = V_J/math.log((N_A * N_D)/(n_i)**2.);# in V\n",
+ "# V_T = T/11600\n",
+ "T = V_T * 11600.;# in K\n",
+ "T = T - 273;# in degreeC\n",
+ "print '%s %.3f' %(\"The Temperature of junction in degree C is\",T);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Temperature of junction in degree C is 14.276\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E23 - Pg 196"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Exa 4.23 - 196\n",
+ "import math\n",
+ "# Given data\n",
+ "V_T = 26.;# in mV\n",
+ "V_T = V_T * 10.**-3.;# in V\n",
+ "Eta = 1.;\n",
+ "# I = -90% for Io, so\n",
+ "IbyIo= 0.1;\n",
+ "# I = I_o * ((e**(v/(Eta * V_T)))-1)\n",
+ "V = math.log(IbyIo) * V_T;# in V\n",
+ "print '%s %.5f' %(\"The reverse bias voltage in volts is\",V);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The reverse bias voltage in volts is -0.05987\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E24 - Pg 196"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Exa 4.24 - 196\n",
+ "import math\n",
+ "# Given data\n",
+ "R = 5.;# in ohm\n",
+ "I = 50.;# in mA\n",
+ "I=I*10.**-3.;# in A\n",
+ "V = R * I;# in V\n",
+ "Eta = 1.;\n",
+ "V_T = 26.;# in mV\n",
+ "V_T=V_T*10.**-3.;# in V\n",
+ "# The reverse saturation current \n",
+ "I_o = I/((math.e**(V/(Eta * V_T))) - 1.);# in A\n",
+ "I_o= I_o*10.**6.;# in uA\n",
+ "print '%s %.2f' %(\"Reverse saturation current in uA is\",I_o);\n",
+ "I_o= I_o*10.**-6.;# in A\n",
+ "v1 = 0.2;# in V\n",
+ "# The dynamic resistance of the diode,\n",
+ "r = (Eta * V_T)/(I_o * (math.e**(v1/(Eta * V_T))));# in ohm\n",
+ "print '%s %.3f' %(\"Dynamic resistance of the diode in ohm is\",r);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Reverse saturation current in uA is 3.33\n",
+ "Dynamic resistance of the diode in ohm is 3.558\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file