diff options
author | Thomas Stephen Lee | 2015-08-28 16:53:23 +0530 |
---|---|---|
committer | Thomas Stephen Lee | 2015-08-28 16:53:23 +0530 |
commit | db0855dbeb41ecb8a51dde8587d43e5d7e83620f (patch) | |
tree | b95975d958cba9af36cb1680e3f77205354f6512 /sample_notebooks/AmitSexana | |
parent | 5a86a20b9de487553d4ef88719fb0fd76a5dd6a7 (diff) | |
download | Python-Textbook-Companions-db0855dbeb41ecb8a51dde8587d43e5d7e83620f.tar.gz Python-Textbook-Companions-db0855dbeb41ecb8a51dde8587d43e5d7e83620f.tar.bz2 Python-Textbook-Companions-db0855dbeb41ecb8a51dde8587d43e5d7e83620f.zip |
add books
Diffstat (limited to 'sample_notebooks/AmitSexana')
-rw-r--r-- | sample_notebooks/AmitSexana/Ch_03.ipynb | 684 |
1 files changed, 684 insertions, 0 deletions
diff --git a/sample_notebooks/AmitSexana/Ch_03.ipynb b/sample_notebooks/AmitSexana/Ch_03.ipynb new file mode 100644 index 00000000..be13231c --- /dev/null +++ b/sample_notebooks/AmitSexana/Ch_03.ipynb @@ -0,0 +1,684 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:38fdf1a79a5afe4aa8258051a4233e0da43992d64154d50af084fa49764f5132" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter - 3 : Junction Diode and Junction Capacitance" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.1 : Page No - 90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#Given data\n", + "Co= 20 # in pF\n", + "Vr= 5 # in V\n", + "V_T= 26 # in mV\n", + "V_T= V_T*10**-3 # in V\n", + "C_T= Co/(1+(Vr/V_T)) # in pF\n", + "print \" The transition capacitance of diode = %0.2f pF\" %C_T" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The transition capacitance of diode = 0.10 pF\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.2 : Page No - 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "toh= 10**-6 # in sec\n", + "I=10 # in mA\n", + "I=I*10**-3 # in A\n", + "n=1 \n", + "V_T= 26 # in mV\n", + "V_T= V_T*10**-3 # in V\n", + "C_D= toh*I/(n*V_T) # in F\n", + "print \" The diffusion capacitance in p-n junction diode = %0.f nF\" %(C_D*10**9)\n", + "\n", + "# Note: There are two mistake in the book. First one is this that they put the wrong value of I to evaluating\n", + "# the value of C_D because the value of I is given 10mA (i.e. 10*10**-3= 10**-2 amp) but they put 10**-3 at place \n", + "# of 10**-2 and second one is calculation error. So the answer in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The diffusion capacitance in p-n junction diode = 385 nF\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.3 : Page No - 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import exp\n", + "#Given data\n", + "T=300 # in K\n", + "V_T= T/11600 # in V\n", + "v= 0.3 # forward bias voltage in volt\n", + "I= 10 # leakage current in micro amp\n", + "I=I*10**-6 # in amp\n", + "id= I*(exp(v/V_T)) # in amp\n", + "print \" The diode current = %0.2f amp\" %id" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The diode current = 1.09 amp\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.4 : Page No - 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log\n", + "#Given data\n", + "Vd_1= 0.3 # in V\n", + "V_T= 25 # in mV\n", + "V_T= V_T*10**-3 # in V\n", + "# when Id_1= 1 mA\n", + "Id_1= 1 # in mA\n", + "Id_1=Id_1*10**-3 # in A\n", + "# Formula Id_1= Io*[%e**(Vd/(n*V_T))-1]= Io*[e**(Vd/(n*V_T))]\n", + "# Id_1= Io*[e**(Vd_1/(n*V_T))] (i)\n", + "\n", + "# when Id_2= 200 mA\n", + "Id_2= 200 # in mA\n", + "Id_2=Id_2*10**-3 # in A\n", + "Vd_2= 0.45 # in V\n", + "# Id_2= Io*[e**(Vd_2/(n*V_T))] (ii)\n", + "# Dividing (ii) by (i), we have\n", + "n= (Vd_2-Vd_1)/(log(Id_2/Id_1)*V_T) \n", + "print \" The value of the constant for the diode = %0.2f \" %n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of the constant for the diode = 1.13 \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.5 : Page No - 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "T=300 # in K\n", + "V_T= T/11600 # in V\n", + "n=1 # assuming value\n", + "Jd=10**5 # in A/m**2\n", + "Jo=250 # in mA/m**2\n", + "Jo= Jo*10**-3 # in A/m**2\n", + "#Formula Id= Io*(%e**(Vd/V_T)-1) and after dividing both the sides by area of the junction, we have\n", + "# Jd= Jo*(%e**(Vd/V_T)) # approx by neglecting 1 \n", + "Vd= V_T*log(Jd/Jo) # in volt\n", + "print \" Voltage to be applied across a p-n junction = %0.2f volt\" %Vd" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Voltage to be applied across a p-n junction = 0.33 volt\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.6 : Page No - 92" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import log\n", + "#Given data\n", + "J=10**4 # in A/m**2\n", + "Jo=200 # in mA/m**2\n", + "Jo= Jo*10**-3 # in A/m**2\n", + "T=300 # in K\n", + "V_T= T/11600 # in V\n", + "e=1.6*10**-19 # electrone charge\n", + "k= 1.38*10**-23 \n", + "n=1 # assuming value\n", + "#Formula I= Io*(%e**(e*V/(n*k*T))-1) and after dividing both the sides by area of the junction, we have\n", + "# J= Jo*(%e**(e*V/(n*k*T))) # approx by neglecting 1 \n", + "V= n*k*log(J/Jo)/e \n", + "print \" Voltage to be applied across the junction = %0.2e volts\" %V" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Voltage to be applied across the junction = 9.33e-04 volts\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.7 : Page No - 93" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "n=2 \n", + "V_T=26 # in mV\n", + "Io= 30 # in mA\n", + "# (i) when\n", + "I_D= 0.1 # in mA\n", + "V_D= n*V_T*log(I_D/Io) # in mV\n", + "print \" (i) When I_D is 0.1 mA, The junction forward-bias voltage = %0.f mV\" %V_D\n", + "# (ii) when\n", + "I_D= 10 # in mA\n", + "V_D= n*V_T*log(I_D/Io) # in mV\n", + "print \" (ii) When I_D is 10 mA, The junction forward-bias voltage = %0.f mV\" %V_D\n", + "\n", + "# Note: There is calculation error in the book so answer in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " (i) When I_D is 0.1 mA, The junction forward-bias voltage = -297 mV\n", + " (ii) When I_D is 10 mA, The junction forward-bias voltage = -57 mV\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.8 : Page No - 93" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I_by_Io= -0.9 \n", + "V_T=26 # in mV\n", + "V_T=V_T*10**-3 #in V\n", + "n=1 \n", + "# From Diode equation I= Io*[e**(e*V/(n*V_T))-1]\n", + "V= n*V_T*log(1+I_by_Io) # in volt\n", + "print \"The value of voltage = %0.1f mV \" %(V*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of voltage = -59.9 mV \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.9 : Page No - 94" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "nita= 2 \n", + "T1= 25 # in \u00b0C\n", + "T2= 150 # in \u00b0C\n", + "k= 8.62*10**-5 \n", + "V_T150= k*(T2+273) # in V\n", + "V_T25= k*(T1+273) # in V\n", + "V= 0.4 # in V\n", + "# Io150= Io25*2**(T2-T1) \n", + "Io150byIo25= 2**((T2-T1)/10) \n", + "I150byI25= Io150byIo25 *(exp(V/(nita*V_T150))-1)/(exp(V/(nita*V_T25))-1) \n", + "print \" The value of factor = %0.f\" %I150byI25" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The value of factor = 578\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.10 : Page No - 94" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I_F= 100 # in mA\n", + "I_F=I_F*10**-3 # in A\n", + "V_F= 0.75 # in V\n", + "R_F= V_F/I_F # in ohm\n", + "print \" Forward resistance = %0.1f ohm \" %R_F\n", + "# At\n", + "V_R= 50 # in V\n", + "I_R= 100 # in nA\n", + "I_R= I_R*10**-9 # in A\n", + "R_R= V_R/I_R # in ohm\n", + "print \" Reverse resistance = %0.f Mohm \" %(R_R*10**-6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Forward resistance = 7.5 ohm \n", + " Reverse resistance = 500 Mohm \n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.11 : Page No - 95" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I_F= 70 # in mA\n", + "V_F= 26 # in mV\n", + "delta_I_F= 60 # in mA\n", + "delta_I_F=delta_I_F*10**-3 # in A\n", + "delta_V_F= 0.025 # in V\n", + "r_d= delta_V_F/delta_I_F # in ohm\n", + "print \" Dynamic resistance = %0.2f ohm\" %r_d\n", + "# and the stimated value of the dynamic resistance is\n", + "r_d= V_F/I_F # in ohm\n", + "print \" The estimated value of the Dynamic resistance = %0.2f ohm\" %r_d" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Dynamic resistance = 0.42 ohm\n", + " The estimated value of the Dynamic resistance = 0.37 ohm\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.12 : Page No - 95" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "Io= 1 # in micro amp\n", + "Io=Io*10**-6 # in amp\n", + "V_F= 0.52 # in V\n", + "V_R= -0.52 # in V\n", + "nita= 1 \n", + "T=300 # in K\n", + "V_T= T/11600 # in volt\n", + "V_T=round(V_T*10**3) # in mV\n", + "\n", + "# (i)\n", + "r_F= nita*V_T*10**-3/(Io*exp(V_F/(nita*V_T*10**-3))) \n", + "print \"(i) : Dynamic resistance in the forward biased condition = %0.2e ohm\" %r_F\n", + "\n", + "# (ii)\n", + "r_r= nita*V_T*10**-3/(Io*exp(V_R/(nita*V_T*10**-3))) \n", + "print \"(ii) : Dynamic resistance in the reverse biased condition = %0.2e ohm\" %r_r" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) : Dynamic resistance in the forward biased condition = 5.36e-05 ohm\n", + "(ii) : Dynamic resistance in the reverse biased condition = 1.26e+13 ohm\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.13 : Page No - 96" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "V_F= 0.2 # in V\n", + "T=300 # in K\n", + "V_T= T/11600 # in volt\n", + "Io= 1 # in micro amp\n", + "Io=Io*10**-6 # in amp\n", + "Id= Io*(exp(V_F/V_T)-1)\n", + "I_F=Id \n", + "r_dc= V_F/I_F # in ohm\n", + "print \" Dynamic resistance = %0.1f ohm\" %r_dc\n", + "r_ac= .026/I_F # in ohm\n", + "print \" Static resistance = %0.1f ohm\" %r_ac" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Dynamic resistance = 87.6 ohm\n", + " Static resistance = 11.4 ohm\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.14 : Page No - 96" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "# Part (i)\n", + "I_D=2 # in mA\n", + "I_D=I_D*10**-3 # in amp\n", + "V_D= 0.5 # in volt\n", + "R_DC= V_D/I_D # in ohm\n", + "print \"(i) : DC resistance levels for the diode = %0.f ohm\" %R_DC\n", + "\n", + "# Part (ii)\n", + "I_D=20 # in mA\n", + "I_D=I_D*10**-3 # in amp\n", + "V_D= 0.8 # in volt\n", + "R_DC= V_D/I_D # in ohm\n", + "print \"(ii) : DC resistance levels for the diode = %0.f ohm\" %R_DC\n", + "\n", + "# Part (iii)\n", + "I_D=-1 # in micro amp\n", + "I_D=I_D*10**-6 # in amp\n", + "V_D= -10 # in volt\n", + "R_DC= V_D/I_D # in ohm\n", + "print \"(iii) : DC resistance levels for the diode = %0.f Mohm\" %(R_DC*10**-6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(i) : DC resistance levels for the diode = 250 ohm\n", + "(ii) : DC resistance levels for the diode = 40 ohm\n", + "(iii) : DC resistance levels for the diode = 10 Mohm\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.15 : Page No - 97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "T1= 25 # in \u00b0C\n", + "T2= 100 # in \u00b0C\n", + "deltaT= T2-T1 # in \u00b0C\n", + "deltaV_F= -1.8*10**-3 # in mV/\u00b0C\n", + "I_F= 26 # in mA\n", + "V_F1= 0.7 # in V (at T1)\n", + "V_F2= V_F1+(deltaT*deltaV_F) # in V (at T2)\n", + "# At 25\u00b0C\n", + "T= 25+273 # in K\n", + "rd= 26/I_F*T/298 # in \u03a9\n", + "print \" Junction dynamic resistance at 25\u00b0C = %0.f \u03a9 \" %rd\n", + "# At 100\u00b0C\n", + "T= 100+273 # in K\n", + "rd= 26/I_F*T/298 # in \u03a9\n", + "print \" Junction dynamic resistance at 100\u00b0C = %0.2f \u03a9 \" %rd" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " Junction dynamic resistance at 25\u00b0C = 1 \u03a9 \n", + " Junction dynamic resistance at 100\u00b0C = 1.25 \u03a9 \n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.16 : Page No - 97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I= 2 # in mA\n", + "I=I*10**-3 # in A\n", + "V_T= 25 # in mV\n", + "V_T= V_T*10**-3 # in V\n", + "nita= 1 \n", + "r_F= nita*V_T/I # in \u03a9\n", + "print \" The dynamic resistance of a diode = %0.1f \u03a9\" %r_F " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The dynamic resistance of a diode = 12.5 \u03a9\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example - 3.17 : Page No - 98" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given data\n", + "I= 30 # in \u00b5A\n", + "I=I*10**-6 # in A\n", + "T=125+273 # in K\n", + "r_F= T/(11600*I*exp(-0.32/T)*11600) # in \u03a9\n", + "print \" The dynamic resistance = %0.3f m\u03a9\" %(r_F*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " The dynamic resistance = 98.672 m\u03a9\n" + ] + } + ], + "prompt_number": 32 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file |