diff options
author | kinitrupti | 2017-05-12 18:40:35 +0530 |
---|---|---|
committer | kinitrupti | 2017-05-12 18:40:35 +0530 |
commit | d36fc3b8f88cc3108ffff6151e376b619b9abb01 (patch) | |
tree | 9806b0d68a708d2cfc4efc8ae3751423c56b7721 /sample_notebooks/PraveenKumar/PraveenKumar_version_backup | |
parent | 1b1bb67e9ea912be5c8591523c8b328766e3680f (diff) | |
download | Python-Textbook-Companions-d36fc3b8f88cc3108ffff6151e376b619b9abb01.tar.gz Python-Textbook-Companions-d36fc3b8f88cc3108ffff6151e376b619b9abb01.tar.bz2 Python-Textbook-Companions-d36fc3b8f88cc3108ffff6151e376b619b9abb01.zip |
Revised list of TBCs
Diffstat (limited to 'sample_notebooks/PraveenKumar/PraveenKumar_version_backup')
-rwxr-xr-x | sample_notebooks/PraveenKumar/PraveenKumar_version_backup/chapter1.ipynb | 1600 | ||||
-rwxr-xr-x | sample_notebooks/PraveenKumar/PraveenKumar_version_backup/chapter2.ipynb | 429 |
2 files changed, 2029 insertions, 0 deletions
diff --git a/sample_notebooks/PraveenKumar/PraveenKumar_version_backup/chapter1.ipynb b/sample_notebooks/PraveenKumar/PraveenKumar_version_backup/chapter1.ipynb new file mode 100755 index 00000000..0d151d06 --- /dev/null +++ b/sample_notebooks/PraveenKumar/PraveenKumar_version_backup/chapter1.ipynb @@ -0,0 +1,1600 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 1 - Semiconductor Material & Junction Diode" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.1 Page No 51" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The electron drift velocity = 40.00 m/s\n", + "The time required for an electron to move across the thickness = 12.50 micro seconds\n" + ] + } + ], + "source": [ + "# Given data\n", + "miu = 0.2# m**2/V-s\n", + "V = 100# mV\n", + "V = V * 10**-3# V\n", + "d = 0.5# mm\n", + "d = d * 10**-3# m\n", + "# mobility, miu = Vd/E and\n", + "E = V/d\n", + "# Drift velocity,\n", + "Vd = miu*E# m/s\n", + "print \"The electron drift velocity = %.2f m/s\"%Vd\n", + "# Time required,\n", + "T = d/Vd# sec\n", + "T=T*10**6# µs\n", + "print \"The time required for an electron to move across the thickness = %.2f micro seconds\"%T" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.2 Page No 52" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The intrinsic conductivity = 2.24 (ohm-m)**-1\n" + ] + } + ], + "source": [ + "# Given data\n", + "q = 1.6*10**-19# C\n", + "n_i = 2.5*10**19# /m**3\n", + "miu_n = 0.38# m**2/V-s\n", + "miu_p = 0.18# m**2/V-s\n", + "# The intrinsic conductivity for germanium,\n", + "sigma_i = q*n_i*(miu_n+miu_p)# (ohm-m)**-1\n", + "print \"The intrinsic conductivity = %.2f (ohm-m)**-1\"%sigma_i" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.3 Page No 52" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The intrinsic carrier concentration = 2.16e+19 per m**3\n" + ] + } + ], + "source": [ + "# Given data\n", + "rho = 0.50# ohm-m\n", + "q = 1.6*10**-19# C\n", + "miu_n = 0.39# m**2/V-s\n", + "miu_p = 0.19# m**2/V-s\n", + "sigma = 1/rho# (ohm-m)**-1\n", + "#conductivity of a semiconductor, sigma = q*n_i*(miu_p+miu_n) or\n", + "n_i = sigma/(q*(miu_n+miu_p))# /m**3\n", + "print \"The intrinsic carrier concentration = %.2e per m**3\"%n_i" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.4 Page No 52" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The conductivity of Si sample = 14.40 (ohm-m)**-1\n" + ] + } + ], + "source": [ + "# Given data\n", + "N_D = 10**21# /m**3\n", + "N_A = 5*10**20# /m**3\n", + "NdasD = N_D-N_A# /m**3\n", + "n = NdasD# /m**3\n", + "miu_n = 0.18# m**2/V-s\n", + "q = 1.6*10**-19# C\n", + "# The conductivity of silicon,\n", + "sigma = q*n*miu_n# (ohm-m)**-1\n", + "print \"The conductivity of Si sample = %.2f (ohm-m)**-1\"%sigma" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.5 Page No 53" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The conductivity of copper = 4.79e+05 mho/cm\n" + ] + } + ], + "source": [ + "# Given data\n", + "At = 63.54## atomic weight of copper\n", + "d = 8.9## density = %.2f gm/cm**3\n", + "n = 6.023*10**23/At*d# electron/cm**3\n", + "q = 1.63*10**-19# C\n", + "miu = 34.8# m**2/V-s\n", + "# The conductivity of copper,\n", + "sigma = n*q*miu# mho/cm\n", + "print \"The conductivity of copper = %.2e mho/cm\"%sigma" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.6 Page No 53" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Concentration of holes in a p-type Ge = 3.47e+17 /cm**3\n", + "The concentration of electrons in a p-type Ge = 1.80e+09 /cm**3\n", + "The concentration of electrons in n-type Si = 4.81e+14 /cm**3\n", + "The concentration of holes in n-type Si = 4.68e+05 /cm**3\n" + ] + } + ], + "source": [ + "# Given data\n", + "sigma = 100# (ohm-m)**-1\n", + "n_i = 2.5*10**13# /cm**3\n", + "miu_n = 3800# cm**2/V-s\n", + "miu_p = 1800# cm**2/V-s\n", + "q = 1.6*10**-19# C\n", + "# Conductivity of a p-type germanium, sigma = q*p*miu_p or\n", + "p = sigma/(q*miu_p)# /cm**3\n", + "print \"Concentration of holes in a p-type Ge = %.2e /cm**3\"%p\n", + "# The concentration of electrons = %.2f a p-type Ge\n", + "n = (n_i**2)/p# /cm**3\n", + "print \"The concentration of electrons in a p-type Ge = %.2e /cm**3\"%n\n", + "#Given for Si\n", + "sigma= 0.1# (ohm m)**-1\n", + "miu_n= 1300# cm**2/V-sec\n", + "n_i= 1.5*10**10# /cm**3\n", + "#sigma = q*n*miu_n\n", + "n = sigma/(q*miu_n)# /cm**3\n", + "print \"The concentration of electrons in n-type Si = %.2e /cm**3\"%n\n", + "# The concentration of holes = %.2f n-type Si\n", + "p = (n_i**2)/n# /cm**3\n", + "print \"The concentration of holes in n-type Si = %.2e /cm**3\"%p" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.7 Page No 54" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The resistivity of a dopped Ge = 3.72 ohm-cm\n" + ] + } + ], + "source": [ + "# Given data\n", + "miu_n = 3800## cm**2/V-s\n", + "miu_p = 1800## cm**2/V-s\n", + "n_i = 2.5*10**13# /cm**3\n", + "Nge = 4.41*10**22# /cm**3\n", + "q = 1.602*10**-19# C\n", + "impurity = 10**8\n", + "# The number of donor atoms,\n", + "N_D = Nge/impurity##in /cm**3\n", + "# The number of holes\n", + "p = (n_i**2)/N_D# /cm**3\n", + "# Conductivity of an N-type Ge,\n", + "sigma = q*N_D*miu_n# (ohm-cm)**-1\n", + "# The resistivity of the Ge\n", + "rho = 1/sigma# ohm-cm\n", + "print \"The resistivity of a dopped Ge = %.2f ohm-cm\"% rho" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.8 Page No 54" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The resistivity of intrinsic silicon = 2.25e+05 ohm-cm\n", + "The resistivity of doped silicon = 4.67 ohm-cm\n" + ] + } + ], + "source": [ + "# Given data\n", + "Nsi = 4.96*10**22# /cm**3\n", + "n_i = 1.52*10**10# /cm**2\n", + "q = 1.6*10**-19# C\n", + "miu_n = 0.135# m**2/V-s\n", + "miu_n = miu_n * 10**4# cm**2/V-s\n", + "miu_p = 0.048# m**2/V-s\n", + "miu_p = miu_p * 10**4# cm**2/V-s\n", + "# The conductivity of an intrinsic silicon,\n", + "sigma = q*n_i*(miu_n+miu_p)# (ohm-cm)**-1\n", + "# The resistivity of intrinsic silicon \n", + "rho = 1/sigma# ohm-cm\n", + "print \"The resistivity of intrinsic silicon = %.2e ohm-cm\"%rho\n", + "\n", + "impurity = 50*10**6\n", + "# The number of donor atoms,\n", + "N_D = Nsi/impurity# /cm**3\n", + "# Total free electrons,\n", + "n = N_D# /cm**3\n", + "# Total holes = %.2f a doped Si,\n", + "p = (n_i**2)/n# /cm**3\n", + "# Conductivity of a doped Si,\n", + "sigma = q*n*miu_n# (ohm-m)**-1\n", + "# The resistivity of doped silicon\n", + "rho = 1/sigma# ohm-cm\n", + "print \"The resistivity of doped silicon = %.2f ohm-cm\"%rho" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.9 Page No 55" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of temperature = 0.14 K\n" + ] + } + ], + "source": [ + "# Given data\n", + "N_D= 5.0*10**28/(2.0*10**8)\n", + "# The Fermi level, E_F= E_C if,\n", + "N_C= N_D\n", + "# Formula N_C= 4.82*10**21*T**(3/2)\n", + "T= (N_C/(4.82*10**21.0))**(2.0/3)# K\n", + "print \"The value of temperature = %.2f K\"%T" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.10 Page No 55" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The miniority carrier concentration = 0.10 m**2/V-s\n", + "The resistivity = 0.60 ohm-m\n", + "The position of Fermi level = 0.23 eV\n", + "Minority carrier concentration = 9.00e+12 atoms/cm**3\n" + ] + } + ], + "source": [ + "import math\n", + "# Given data\n", + "n_i = 1.5*10**16##m**3\n", + "impurity = 10**20\n", + "minority = (n_i**2)/impurity# atoms/m**3\n", + "q = 1.6*10**-19# C\n", + "rho = 2*10**3# ohm-m\n", + "# The miniority carrier concentration \n", + "miu_n = 1/(q*rho*n_i*2)##in m**2/V-s\n", + "print \"The miniority carrier concentration = %.2f m**2/V-s\"%miu_n\n", + "n = impurity\n", + "# The conductivity,\n", + "sigma = q*impurity*miu_n# (ohm-m)**-1\n", + "# The resistivity \n", + "rho = 1/sigma# ohm-m\n", + "print \"The resistivity = %.2f ohm-m\"%rho\n", + "kT = 0.026# eV\n", + "n_o = n\n", + "# The position of Fermi level \n", + "E_FdividedEi = kT*math.log(n_o/n_i)# eV\n", + "print \"The position of Fermi level = %.2f eV\"%E_FdividedEi\n", + "# Minority carrier concentration \n", + "M = ((n_i*2)**2)/n_o# atoms/cm**3\n", + "print \"Minority carrier concentration = %.2e atoms/cm**3\"%M" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.11 Page No 56" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The resistivity = 9.62 ohm-cm\n" + ] + } + ], + "source": [ + "# Given data\n", + "d = 5.0*10**22# atoms/cm**3\n", + "impurity = 10**8# atoms\n", + "N_D = d/impurity\n", + "n_i = 1.45*10**10\n", + "n = N_D\n", + "#Low of mass action, n*p = (n_i**2)\n", + "p = (n_i**2)/n# /cm**3\n", + "q = 1.6*10**-19# C\n", + "miu_n = 1300# cm/V-s\n", + "n_i = n\n", + "#The Conductivity\n", + "sigma = q*miu_n*n_i# (ohm-cm)**-1\n", + "# The resistivity\n", + "rho = 1/sigma# ohm-cm\n", + "print \"The resistivity = %.2f ohm-cm\"%rho" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.12 Page No 57" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The resistivity = 9.62 ohm-cm\n" + ] + } + ], + "source": [ + "# Given data\n", + "d = 5.0*10**22# atoms/cm**3\n", + "impurity = 10**8# atoms\n", + "N_D = d/impurity\n", + "n_i = 1.45*10**10\n", + "n = N_D\n", + "#Low of mass action, n*p = (n_i**2)\n", + "p = (n_i**2)/n# /cm**3\n", + "q = 1.6*10**-19# C\n", + "miu_n = 1300# cm/V-s\n", + "n_i = n\n", + "#The Conductivity\n", + "sigma = q*miu_n*n_i# (ohm-cm)**-1\n", + "# The resistivity\n", + "rho = 1/sigma# ohm-cm\n", + "print \"The resistivity = %.2f ohm-cm\"%rho" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.14 Page No 58" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The minority carrier concentration = 2.25e+03 holes/cm**3\n", + "The location of Fermi level = 0.409 eV\n" + ] + } + ], + "source": [ + "import math\n", + "# Given data\n", + "n_i = 1.5*10**10# electrons/cm**3\n", + "N_D = 10**17# electrons/cm**3\n", + "n = N_D# electrons/cm**3\n", + "# The minority carrier concentration\n", + "p = (n_i**2)/n# holes/cm**3\n", + "print \"The minority carrier concentration = %.2e holes/cm**3\"%p\n", + "kT = 0.026\n", + "# The location of Fermi level \n", + "E_FminusEi = kT*math.log(N_D/n_i)# eV\n", + "print \"The location of Fermi level = %.3f eV\"%E_FminusEi" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.15 Page No 59" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The doping level = 1.92e+15 /cm**3\n", + "The drift velocity = 650.00 cm/sec\n" + ] + } + ], + "source": [ + "# Given data\n", + "V = 1# V\n", + "I = 8# mA\n", + "I = I * 10**-3# A\n", + "R = V/I# ohm\n", + "l = 2# mm\n", + "l = l * 10**-1# cm\n", + "b = 2# mm\n", + "b = b * 10**-1# cm\n", + "A = l*b# cm**2\n", + "L = 2# cm\n", + "# R = (rho*L)/A\n", + "sigma = L/(R*A)# (ohm-cm)**-1\n", + "# n = N_D\n", + "miu_n = 1300# cm**2/V-s\n", + "q = 1.6 * 10**-19# C\n", + "# sigma = n*q*miu_n\n", + "N_D = sigma/( miu_n*q )# /cm**3\n", + "print \"The doping level = %.2e /cm**3\"%N_D\n", + "d = 2.0\n", + "E = V/d\n", + "# The drift velocity \n", + "Vd = miu_n * E# cm/s\n", + "print \"The drift velocity = %.2f cm/sec\"%Vd" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.17 Page No 60" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The conductivity = 4.68e+05 mho/m\n", + "The mobility = 3.48e-05 m**2/V-s\n", + "The drift velocity = 1.79e-04 m/s\n" + ] + } + ], + "source": [ + "import math\n", + "# Given data\n", + "l = 1000# ft\n", + "l = l * 12*2.54# cm\n", + "R = 6.51# ohm\n", + "rho = R/l# ohm/cm\n", + "# The conductivity \n", + "sigma = 1/rho# mho/cm\n", + "sigma = sigma * 10**2# mho/m\n", + "D= 1.03*10**-3# m\n", + "A= math.pi*D**2/4# m**2\n", + "print \"The conductivity = %.2e mho/m\"%sigma\n", + "q = 1.6*10**-19# C\n", + "n = 8.4*10**28# electrons/m**3\n", + "# sigma = n*q*miu\n", + "miu = sigma/(n*q)# m**2/V-s\n", + "print \"The mobility = %.2e m**2/V-s\"%miu\n", + "T = 2\n", + "# The drift velocity \n", + "V = T/(n*q*A)# m/s\n", + "print \"The drift velocity = %.2e m/s\"%V" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.18 Page No 61" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The concentration of holes = 1.50e+16 /cm**3\n", + "The concentartion of electrons = 6.67e+07 /cm**3\n" + ] + } + ], + "source": [ + "# Given data\n", + "N_D = 2*10**16# /cm**3\n", + "N_A = 5*10**15# /cm**3\n", + "# The concentration of holes \n", + "Pp = N_D-N_A# /cm**3\n", + "print \"The concentration of holes = %.2e /cm**3\"%Pp\n", + "n_i = 10**12\n", + "# The concentartion of electrons \n", + "n_p = (n_i**2)/Pp# /cm**3\n", + "print \"The concentartion of electrons = %.2e /cm**3\"%n_p" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.19 Page No 62" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The hall angle = 1.95 degree\n" + ] + } + ], + "source": [ + "import math\n", + "# Given data\n", + "rho = 0.005# ohm-m\n", + "Bz = 0.48# Wb/m**2\n", + "R_H = 3.55*10**-4# m**3/C\n", + "ExByJx= rho\n", + "# R_H = Ey/(Bz*Jx)\n", + "EyByJx= R_H*Bz\n", + "# The hall angle \n", + "theta_H = math.degrees(math.atan(EyByJx/ExByJx))# °\n", + "print \"The hall angle = %.2f degree\"%theta_H" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.20 Page No 63" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The voltage between contacts = 0.0026 V\n" + ] + } + ], + "source": [ + "# Given data\n", + "R_H = 3.55 * 10**-4# m**3/C\n", + "Ix = 15# mA\n", + "Ix = Ix * 10**-3# A\n", + "A = 15*1# mm\n", + "A = A * 10**-6# m**2\n", + "Bz = 0.48# Wb/m**2\n", + "Jx = Ix/A# A/m**2\n", + "# R_H = Ey/(Bz*Jx)\n", + "Ey = R_H*Bz*Jx# V/m\n", + "# voltage between contacts \n", + "Voltage = Ey*Ix# V\n", + "print \"The voltage between contacts = %.4f V\"%Voltage" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.21 Page No 63" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The concentration of donor atoms = 4.630e+13 cm**-3\n" + ] + } + ], + "source": [ + "# Given data\n", + "A = 0.001# cm**2\n", + "l = 20# µm\n", + "l = l * 10**-4# cm\n", + "V = 20# V\n", + "I = 100# mA\n", + "I = I * 10**-3# A\n", + "R = V/I# ohm\n", + "# R = l/(sigma*A)\n", + "sigma = l/(R*A)# (ohm-cm)**-1\n", + "miu_n = 1350# cm**2/V-s\n", + "q = 1.6*10**-19# C\n", + "# sigma = n*q*miu_n or\n", + "# The concentration of donor atoms \n", + "n = sigma/(q*miu_n)# cm**-3\n", + "print \"The concentration of donor atoms = %.3e cm**-3\"%n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.22 Page No 64" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The doping needed = 8.681e+15 cm**-3\n" + ] + } + ], + "source": [ + "# Given data\n", + "R = 2# k ohm\n", + "R = R * 10**3# ohm\n", + "L = 200# µm\n", + "L = L * 10**-4# cm\n", + "A = 10**-6# cm**2\n", + "miu_n = 8000# cm**2/V-s\n", + "q = 1.6*10**-19# C\n", + "n = '0.9*N_D'\n", + "# R = (rho*l)/A= (1/(n*q*miu_n))*(l/A)\n", + "# rho = L/(R*q*miu_n*A)\n", + "n = L/(R*q*miu_n*A)# /cm**-3\n", + "# The doping needed \n", + "Nd= n/0.9\n", + "print \"The doping needed = %.3e cm**-3\"%Nd" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.23 Page No 65" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The position of the Fermi level = 0.29 eV\n" + ] + } + ], + "source": [ + "import math\n", + "# Given data\n", + "KT = 26*10**-3\n", + "Nd = 10**15\n", + "n_i = 1.5*10**10\n", + "# The position of the Fermi level \n", + "E_FminusE_Fi = KT*math.log(abs( Nd/n_i ))# eV\n", + "print \"The position of the Fermi level = %.2f eV\"%E_FminusE_Fi" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.24 Page No 65" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The concentration of donors atoms = 1.2176e+16 cm**-3\n" + ] + } + ], + "source": [ + "import math\n", + "# Given data\n", + "Na = 5 * 10**15# cm**-3\n", + "Nc = 2.8 * 10**19# cm**-3\n", + "E_CminusE_F = 0.215# eV\n", + "KT = 26* 10**-3# eV\n", + "# The concentration of donors atoms \n", + "Nd = Na + Nc * (math.exp( -E_CminusE_F/KT ))# cm**-3\n", + "print \"The concentration of donors atoms = %.4e cm**-3\"%Nd" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.25 Page No 65" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The percentage doping efficiency = 78.12 %\n" + ] + } + ], + "source": [ + "# Given data\n", + "Nd = 10**18\n", + "R = 10# ohm\n", + "A =10**-6# cm**2\n", + "L = 10# mm\n", + "L = L * 10**-4# cm\n", + "miu_n = 800# cm**2/V-s\n", + "q = 1.6*10**-19# C\n", + "#Formula used, n = L/(q*miu_n*A*R)\n", + "n = L/(q*miu_n*A*R)# cm**-3\n", + "# The percentage doping efficiency \n", + "doping = (n/Nd)*100## % doping efficiency in %\n", + "print \"The percentage doping efficiency = %.2f %%\"%doping" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.26 Page No 66" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The current through the diode under forward bias = 10.72 µA\n" + ] + } + ], + "source": [ + "import math\n", + "# Given data\n", + "Io = 2*10**-7# A\n", + "V = 0.1# V\n", + "# Current through the diode under forward bias,\n", + "I = Io*( (math.exp(40*V))-1 )# A\n", + "I = I * 10**6# µA\n", + "print \"The current through the diode under forward bias = %.2f µA\"%I\n", + "\n", + "# Note: Calculated value of I in the book is wrong." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.28 Page No 67" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The dynamic resistance in forward direction = 3.36 ohm\n", + "The dynamic resistance in reverse direction = 0.39 Mohm\n" + ] + } + ], + "source": [ + "import math\n", + "# Given data\n", + "T = 125.0# degree C\n", + "T = T + 273.0# K\n", + "V_T = T/11600.0\n", + "Io = 30# µA\n", + "Io = Io * 10**-6# A\n", + "V = 0.2# V\n", + "# The dynamic resistance = %.2f forward direction,\n", + "r_f = V_T/( Io * (math.exp(V/V_T)) )# ohm\n", + "print \"The dynamic resistance in forward direction = %.2f ohm\"%r_f\n", + "r_f = V_T/( Io * (math.exp(-V/V_T)) )# ohm\n", + "# The dynamic resistance = %.2f reverse direction \n", + "r_f = r_f * 10**-6# Mohm\n", + "print \"The dynamic resistance in reverse direction = %.2f Mohm\"%r_f" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.29 Page No 68" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The voltage = -59.87 mV\n", + "The ratio of diode current with a forward bias to current with a reverse bias = -6.842\n", + "The value of I1 = 458.13 µA\n", + "The value of I2 = 21.90 mA\n", + "The value of I3 = 1.03 A\n" + ] + } + ], + "source": [ + "import math\n", + "# Given data\n", + "Eta = 1\n", + "V_T = 0.026\n", + "# I = Io*( (exp(V/(Eta*V_T))) - 1 ) and I = -Io\n", + "# I = -0.9*Io\n", + "# -0.9*Io = Io*( (exp(V/(Eta*V_T))) - 1 )\n", + "V = Eta*V_T*math.log(0.1)# V\n", + "V = V * 10**3# mV\n", + "print \"The voltage = %.2f mV\"%V\n", + "V = 0.05# V\n", + "# The ratio of diode current with a forward bias to current with a reverse bias \n", + "If_by_Ir= ( (math.exp(V/V_T))-1 )/( (math.exp(-V/V_T))-1 )\n", + "print \"The ratio of diode current with a forward bias to current with a reverse bias = %.3f\"%If_by_Ir\n", + "Io = 10# µA\n", + "V = 0.1# V\n", + "# The value of I1 \n", + "I1 = Io*( (math.exp(V/V_T))-1 )# µA\n", + "print \"The value of I1 = %.2f µA\"%I1\n", + "V = 0.2# V\n", + "# The value of I2\n", + "I2 = Io*( (math.exp(V/V_T))-1 )# µA \n", + "I2 = I2 * 10**-3# mA\n", + "print \"The value of I2 = %.2f mA\"%I2\n", + "V = 0.3# V\n", + "# The value of I3\n", + "I3 = Io*( (math.exp(V/V_T))-1 )# µA\n", + "I3 = I3 * 10**-6# A\n", + "print \"The value of I3 = %.2f A\"%I3" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.30 Page No 69" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The factor by which current will get multiplied = 638.025\n" + ] + } + ], + "source": [ + "import math\n", + "# Given data\n", + "# Io150 = Io25 * 2**((150-25)/10)\n", + "#Io150 = 5800*Io25\n", + "T = 150# degree C\n", + "T = T + 273# K\n", + "V_T = 8.62*10**-5 * T# V\n", + "V = 0.4# V\n", + "Eta = 2\n", + "Vt = 0.026# V \n", + "# The factor by which current will get multiplied \n", + "I150byI25= 5800*math.exp(V/(Eta*V_T))/math.exp(V/(Eta*Vt))\n", + "print \"The factor by which current will get multiplied = %.3f\"%I150byI25" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.31 Page No 69" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The operating point of the diode is : (0.50V,4.50mA)\n" + ] + } + ], + "source": [ + "# Given data\n", + "R = 1# ohm\n", + "V = 5# V\n", + "V1 = 0.5# V\n", + "R1 = 1# k ohm\n", + "R1 = R1 * 10**3# ohm\n", + "# V-(I_D*R1)-(I_D*R) - V1 = 0\n", + "I_D = (V-V1)/(R1+R)# A\n", + "I_D = I_D * 10**3# mA\n", + "V_D = (I_D*10**-3*R) + V1# V\n", + "print \"The operating point of the diode is : (%.2fV,%.2fmA)\"%(V_D,I_D)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.32 Page No 70" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The voltage drop across the forward biased diode, = 0.0180 V\n" + ] + } + ], + "source": [ + "import math\n", + "# Given data\n", + "Eta = 1\n", + "kT = 26# meV\n", + "# (%e**((e*V1)/kT)) = 2 or\n", + "#The voltage drop across the forward biased diode\n", + "V1 = math.log(2)*kT# mV\n", + "V1= V1*10**-3# V\n", + "print \"The voltage drop across the forward biased diode, = %.4f V\"%V1" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.33 Page No 71" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The space charge capacitance = 70.74 pF\n" + ] + } + ], + "source": [ + "import math\n", + "# Given data\n", + "epsilon_Ge = 16/(36*math.pi*10**11)# F/cm\n", + "d = 2*10**-4# cm\n", + "A = 1# mm**2\n", + "A = A * 10**-2# cm**2\n", + "epsilon_o = epsilon_Ge# F/cm\n", + "# The space charge capacitance \n", + "C_T = (epsilon_o*A)/d# F\n", + "C_T = C_T * 10**12# pF\n", + "print \"The space charge capacitance = %.2f pF\"%C_T" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.34 Page No 71" + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of C_T = 61.68 pf/cm**2\n" + ] + } + ], + "source": [ + "import math \n", + "# Given data\n", + "D = 0.102# cm \n", + "A = (math.pi*(D**2))/4# cm**2\n", + "sigma_p = 0.286# (ohm-cm)**-1\n", + "q = 1.6*10**-19# C\n", + "miu_p = 500\n", + "# Formula used, sigma_p = q*miu_p*N_A\n", + "N_A = sigma_p/(q*miu_p)# atoms/cm**3\n", + "V1 = 5# V\n", + "V2 = 0.35# V\n", + "Vb = V1+V2# V\n", + "# The transition capacitance,\n", + "C_T = 2.92*10**-4*((N_A/Vb)**(1./2))*A# pF/cm**2\n", + "print \"The value of C_T = %.2f pf/cm**2\"%C_T" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.35 Page No 71" + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of C_T for reverse bias = 15.00 pF\n" + ] + } + ], + "source": [ + "# Given data\n", + "C_T1 = 15# pF\n", + "Vb1 = 8# V\n", + "Vb2 = 12# V\n", + "# C_T1/C_T2 = (Vb2/Vb1)**(1/2)\n", + "C_T2 = C_T1 * ((Vb1/Vb2)**(1/2))# pF\n", + "print \"The value of C_T for reverse bias = %.2f pF\"%C_T2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.36 Page No 72" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The voltage = -59.87 mV\n" + ] + } + ], + "source": [ + "import math\n", + "# Given data\n", + "V_T = 0.026# V\n", + "Eta = 1\n", + "I = '-0.9*Io'\n", + "# T = Io*((%e**(V/(Eta*V_T)))-1 )\n", + "# I = Io*((%e**(V/(Eta*V_T)))-1 )\n", + "V = math.log(0.1)*V_T# V \n", + "V = V * 10**3# mV\n", + "print \"The voltage = %.2f mV\"%V" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.37 Page No 72" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Part (a) : The value of I_D for first circuit = 0.97 mA\n", + "Part (b) : The value of I_D for second circuit = 0.10 mA\n" + ] + } + ], + "source": [ + "# Given data\n", + "Vin = 20# V\n", + "Vgamma = 0.7# V\n", + "R = 20# k ohm\n", + "R = R * 10**3# ohm\n", + "# Vin-(I_D*Vin) - Vgamma = 0 or\n", + "# The value of I_D,\n", + "I_D = (Vin-Vgamma)/R# A\n", + "I_D = I_D * 10**3# mA\n", + "print \"Part (a) : The value of I_D for first circuit = %.2f mA\"%I_D\n", + "\n", + "# Part (b)\n", + "Vin= 10.# V\n", + "Vgamma = 0.7# V\n", + "R = 100# k ohm\n", + "# Drain current,\n", + "I_D= Vin/R# mV\n", + "print \"Part (b) : The value of I_D for second circuit = %.2f mA\"%I_D" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.38 Page No 73" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of I_D = 3.10 mA\n", + "The value of Vo = 6.90 V\n" + ] + } + ], + "source": [ + "# Given data\n", + "R1 = 1# k ohm\n", + "R1 = R1 * 10**3# ohm\n", + "R2 = 2# k ohm\n", + "R2 = R2 * 10**3# ohm\n", + "V = 10# V\n", + "V1 = 0.7# V \n", + "# V * (I_D*R1) - (R2*I_D) - V1 = 0\n", + "I_D = (V-V1)/(R1+R2)# A\n", + "I_D = I_D * 10**3# mA\n", + "print \"The value of I_D = %.2f mA\"%I_D\n", + "# The output voltage,\n", + "Vo = (I_D*10**-3 * R2) +V1# V\n", + "print \"The value of Vo = %.2f V\"%Vo" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.39 Page No 73" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Part (a): The current through resistance = 1.00 A\n", + "Part (b) : Current through 10 ohm resistance will be Zero\n", + "Part (c): Current will be zero\n", + "Part (d): The diode will be ON and current = 1.00 A\n" + ] + } + ], + "source": [ + "# Given data\n", + "V = 10.# V\n", + "R = 10# ohm\n", + "# Current through resistance,\n", + "I = V/R# A\n", + "print \"Part (a): The current through resistance = %.2f A\"%I\n", + "print \"Part (b) : Current through 10 ohm resistance will be Zero\"\n", + "print \"Part (c): Current will be zero\"\n", + "print \"Part (d): The diode will be ON and current = %.2f A\"%I" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.40 Page No 74" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The operating point is : (0.50V,4.50mA)\n" + ] + } + ], + "source": [ + "# Given data\n", + "Vth= 0.5# V\n", + "R_F= 1*10**3# ohm\n", + "V= 5# V\n", + "# Applying KVL for loop, V-Vd-R_F*Ii= 0 (i)\n", + "# When Ii=0\n", + "Vd= V# V\n", + "# When Vd= 0\n", + "Ii= V/R_F# A\n", + "# From eq(i)\n", + "Ii= (V-Vth)/R_F# A\n", + "Vd= V-R_F*Ii# V\n", + "print \"The operating point is : (%.2fV,%.2fmA)\"%(Vd,Ii*1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.43 Page No 76" + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The voltage at V1 = 6.00 volts\n", + "The voltage at V2 = 5.40 volts\n" + ] + } + ], + "source": [ + "# Given data\n", + "V_CC = 6# V\n", + "Vr = 0.6# V\n", + "V1= V_CC##in V\n", + "V2 = V1-Vr# V\n", + "print \"The voltage at V1 = %.2f volts\"%V1\n", + "print \"The voltage at V2 = %.2f volts\"%V2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.44 Page No 76" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of I1 = 1.80 mA\n", + "The value of I2 = 1.80 mA\n" + ] + } + ], + "source": [ + "# Given data\n", + "V_T = 0.7# V\n", + "V = 5# V\n", + "R = 2# k ohm\n", + "R = R * 10**3# ohm\n", + "Vs = 0.7\n", + "Vx = Vs+V_T# V\n", + "# The value of I1 \n", + "I1 = (V-Vx)/R# A\n", + "I1 = I1 * 10**3# mA\n", + "print \"The value of I1 = %.2f mA\"%I1\n", + "# The value of I2 \n", + "I2 = I1# mA\n", + "print \"The value of I2 = %.2f mA\"%I2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Exa 1.45 Page No 77" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "The value of Vo = 1.00 V\n" + ] + } + ], + "source": [ + "# Given data\n", + "Rf = 300.# ohm\n", + "V = 0.5# V\n", + "R = 600.# ohm\n", + "Vi = 2.# V\n", + "# The output voltage \n", + "Vo = (Vi-V)*( R/(R+Rf) )# V\n", + "print \"The value of Vo = %.2f V\"%Vo" + ] + } + ], + "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 +} diff --git a/sample_notebooks/PraveenKumar/PraveenKumar_version_backup/chapter2.ipynb b/sample_notebooks/PraveenKumar/PraveenKumar_version_backup/chapter2.ipynb new file mode 100755 index 00000000..3d7aab33 --- /dev/null +++ b/sample_notebooks/PraveenKumar/PraveenKumar_version_backup/chapter2.ipynb @@ -0,0 +1,429 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "chapter-2, Economics of generation" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex1, Page 73" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "#To Determine the Demand and Supply Parameters for 15 bulbs\n", + "\n", + "W=60 #Wattage of the bulb\n", + "N=15 #No. of bulbs\n", + "CL=W*N #Connected Load \n", + "Wih=2*(10**3) #Wattage of immersion heater\n", + "Wh=2*(10**3) #Wattage of heater\n", + "\n", + "#Usage of Bulbs at different time periods\n", + "N1=5 \n", + "N2=10 \n", + "N3=6\n", + "\n", + "#Time periods for bulbs\n", + "T1=2 #6pm - 8pm\n", + "T2=2 #8pm - 10pm\n", + "T3=2 #10pm - 12pm\n", + "#Time Periods for heaters\n", + "T4=4 #1pm - 5pm\n", + "T5=3 #8pm - 11pm\n", + "\n", + "#CASE 1\n", + "MD1=W*N2 #Maximum Demand\n", + "DF=MD1*100/CL #Demand Factor\n", + "EC1=(N1*W*T1)+(N2*W*T2)+(N3*W*T3) #Energy Consumed\n", + "DLF1=EC1*100/(24*MD1) #Daily Load Factor\n", + "\n", + "#CASE 2\n", + "MD2=(W*N2)+Wh #From 8pm - 10pm\n", + "EC2=(T4*Wih)+(T5*Wh)+EC1 #Energy Consumed\n", + "DLF2=EC2*100/(24*MD2) #Daily Load Factor\n", + "\n", + "print '''i)a) Connected Load is %0.2f W\\nb) The Maximum Demand is %0.2f W\n", + "c) The Demand Factor is %0.2f percent\\nd) The Daily Load Factor is %0.2f percent''' %(CL,MD1,DF,DLF1)\n", + "print 'ii) The Improved Daily Load Factor is %0.2f percent' %DLF2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i)a) Connected Load is 900.00 W\n", + "b) The Maximum Demand is 600.00 W\n", + "c) The Demand Factor is 66.67 percent\n", + "d) The Daily Load Factor is 17.50 percent\n", + "ii) The Improved Daily Load Factor is 26.47 percent\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex2, Page 74" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#To determine the Demand and supply parameter of four consumers\n", + "\n", + "\n", + "#Maximum Demands of various users\n", + "MD1=2*(10**3) #9pm\n", + "MD2=2*(10**3) #12 noon\n", + "MD3=8*(10**3) #5pm\n", + "MD4=4*(10**3) #8pm\n", + "MDT=MD1+MD2+MD3+MD4 #Sum of all Maximum Demands\n", + "\n", + "#Demands of various users\n", + "D1=1.6*(10**3) #8pm\n", + "D2=1*(10**3) #8pm\n", + "D3=5*(10**3) #8pm\n", + "\n", + "#The Number after the Alphabets represents the Consumer\n", + "\n", + "#Maximum Demand of the System arises at 8.00 PM\n", + "MDS = D1+D2+D3+MD4 \n", + "\n", + "TDF=MDT/MDS #Diversity Factor\n", + "#Given Values\n", + "#Average Loads\n", + "AL2=500 \n", + "AL4=1000 \n", + "#Load Factors\n", + "LF1=15/100 \n", + "LF3=25/100 \n", + "#Calculated Values\n", + "#Average Loads\n", + "AL1=LF1*MD1 \n", + "AL3=LF3*MD3 \n", + "#Load Factors\n", + "LF2=AL2*100/MD2 \n", + "LF4=AL4*100/MD4 \n", + "\n", + "ALS=AL1+AL2+AL3+AL4 #Combined Average Loads\n", + "LFS=ALS*100/MDS #Combined Load Factor\n", + "\n", + "#Load Percent\n", + "LF1*=100 # %\n", + "LF3*=100 # %\n", + "\n", + "print 'i) The Diversity Factor is %0.2f' %TDF\n", + "print 'ii) The Average load and Load factor of:'\n", + "print ' Consumer 1 : %0.2f W and %0.2f percent' %(AL1,LF1)\n", + "print ' Consumer 2 : %0.2f W and %0.2f percent' %(AL2,LF2)\n", + "print ' Consumer 3 : %0.2f W and %0.2f percent' %(AL3,LF3)\n", + "print ' Consumer 4 : %0.2f W and %0.2f percent' %(AL4,LF4)\n", + "print 'iii) The Combined Load Factor and the Combined Average Load is %0.2f percent and %0.2f W respectively\\n' %(LFS,ALS)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) The Diversity Factor is 1.38\n", + "ii) The Average load and Load factor of:\n", + " Consumer 1 : 300.00 W and 15.00 percent\n", + " Consumer 2 : 500.00 W and 25.00 percent\n", + " Consumer 3 : 2000.00 W and 25.00 percent\n", + " Consumer 4 : 1000.00 W and 25.00 percent\n", + "iii) The Combined Load Factor and the Combined Average Load is 32.76 percent and 3800.00 W respectively\n", + "\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex3, Page 75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "\n", + "#To Determine the Yearly Cost of the substation\n", + "\n", + "Teff=95/100 #Transmission Efficiency\n", + "Deff=85/100 #Distribution Efficiency\n", + "DFT=1.2 #Diversity Factor For Transmission\n", + "DFD=1.3 #Diversity Factor For Distribution\n", + "MDGS=100*(10**6) #Maximum Demand of Generating Station\n", + "ALF=40/100 #Annual Load Factor\n", + "ACCT=2.5*(10**6) #Annual Capital Charge for Transmission\n", + "ACCD=2*(10**6) #Annual Capital Charge for Distribution\n", + "GCC=100 #Generating Cost per kW demand\n", + "GCCU=5/100 # Per Unit Cost\n", + "#Fixed Charges from Supply to Substation Annually\n", + "GFC=GCC*MDGS/1000 #Generating\n", + "TFC=ACCT #Transmission\n", + "TotFCS=GFC+TFC #Total\n", + "#Fixed Charges for supply upto Consumer Annually\n", + "DFC=ACCD #Distribution\n", + "TotFCC=TotFCS+DFC #Total\n", + "\n", + "AMDS= DFT*MDGS/1000 #Aggregate of Maximum Demand at Supply\n", + "AMDC= DFD*AMDS #Aggregate of Maximum Demand for Consumers\n", + "\n", + "FCS=TotFCS/AMDS #Fixed Charges Per KW at substation\n", + "CES=GCCU/Teff #Cost of energy at the substation\n", + "\n", + "FCC=TotFCC/AMDC #Fixed Charges per KW at the consumer premises\n", + "CEC=CES/Deff #Cost of Energy at the consumer premises\n", + "\n", + "CEC*=100 # converting from rupee to paise\n", + "\n", + "print 'The Yealy Cost per KW demand and the cost per KWhr at:'\n", + "print 'a) The substation is %0.2f rupees per KW and %0.2f paise per kWhr'%(FCS,CES)\n", + "print 'b) The consumer premises is %g rupees per KW and %g paise per kWhr' %(FCC,CEC)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Yealy Cost per KW demand and the cost per KWhr at:\n", + "a) The substation is 104.17 rupees per KW and 0.05 paise per kWhr\n", + "b) The consumer premises is 92.9487 rupees per KW and 6.19195 paise per kWhr\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex4, Page 78" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#To determine the Load factor and suitable units for 24 hr operation of the plant\n", + "\n", + "\n", + "#Demands at Various Time Periods starting from 12PM to 12PM\n", + "D1=500*(10**3) \n", + "D2=800*(10**3) \n", + "D3=2000*(10**3) \n", + "D4=1000*(10**3) \n", + "D5=2500*(10**3) \n", + "D6=2000*(10**3) \n", + "D7=1500*(10**3) \n", + "D8=1000*(10**3) \n", + "\n", + "MD=D5 #Maximum Demand\n", + "#Time Periods of demands from 12PM\n", + "T1=5 \n", + "T2=5 \n", + "T3=2 \n", + "T4=2 \n", + "T5=3 \n", + "T6=3 \n", + "T7=2 \n", + "T8=2 \n", + "\n", + "#Total Energy Demand in 24hrs\n", + "TED=(T1*D1)+(T2*D2)+(T3*D3)+(D4*T4)+(T5*D5)+(D6*T6)+(D7*T7)+(T8*D8) \n", + "\n", + "LF=TED*100/(24*MD) \n", + "\n", + "C1000=3*1000*(10**3) #1000 unit \n", + "C500=1*500*(10**3) #500 Unit\n", + "\n", + "TCP=C1000+C500 #Total capacity of the plant\n", + "PCF=TED*100/(24*TCP) #Plant Capacity Factor\n", + "\n", + "#Operating Schedule, Units operated can be seen in the textbook\n", + "G1=500*(10**3) \n", + "G2=1000*(10**3) \n", + "G3=2000*(10**3) \n", + "G4=1000*(10**3) \n", + "G5=2500*(10**3) \n", + "G6=2000*(10**3) \n", + "G7=1500*(10**3) \n", + "G8=1000*(10**3) \n", + "\n", + "TEG=(T1*G1)+(T2*G2)+(T3*G3)+(G4*T4)+(T5*G5)+(G6*T6)+(G7*T7)+(T8*G8) #Total Energy Generated\n", + "PUF=TED*100/(TEG) #Plant Use Factor\n", + "\n", + "print 'a) The Reserve Capacity is a 1000kW Unit and Load Factor is %0.2f percent' %LF\n", + "print 'b) The Plant Capacity Factor is %0.2f percent' %PCF\n", + "print 'c) The Plant Use Factor is %0.2f percent' %PUF" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a) The Reserve Capacity is a 1000kW Unit and Load Factor is 51.67 percent\n", + "b) The Plant Capacity Factor is 36.90 percent\n", + "c) The Plant Use Factor is 96.88 percent\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex5, Page 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#To determine the Plant use factore of each unit\n", + "\n", + "\n", + "MDS=25*(10**6) #Maximum Demand on the System\n", + "U1=15*(10**6) #Load Supplied By Unit 1\n", + "U2=12.5*(10**6) #Load Supplied By Unit 2\n", + "#Running Time Factor of the Unit\n", + "T1=1 \n", + "T2=40/100 \n", + "\n", + "#Energy generated by each unit\n", + "E1=1*(10**8) \n", + "E2=1*(10**7) \n", + "Et=E1+E2 #Total Energy\n", + "\n", + "#Maximum Demands on Each Units\n", + "MD1=U1 \n", + "MD2=MDS-U1 \n", + "\n", + "#Annual Load Factor for the Units\n", + "ALF1=E1*1000*100/(MD1*8760) \n", + "ALF2=E2*1000*100/(MD2*8760) \n", + "\n", + "LF2=E2*1000*100/(MD2*0.4*8760) #Load Factor for the it is loaded\n", + "\n", + "\n", + "PUF1=ALF1 #Plant Use Factor\n", + "PCF1=ALF1 # Plant Capacity Factor\n", + "\n", + "PCF2=E2*1000*100/(U2*8760) #Plant Capacity Factor for Unit 2\n", + "PUF2=E2*1000*100/(U2*0.4*8760) #Plant Use Factor for Unit 2\n", + "\n", + "LFP=Et*100*1000/(MDS*8760) #Annual Load Factor of the Complete Plant\n", + "\n", + "print 'The Load Factor, Plant Capacity Factor, Plant Use Factor of:'\n", + "print 'Unit 1 : %0.2f percent, %0.2f percent, %0.2f percent' %(ALF1,PCF1,PUF1)\n", + "print 'Unit 2 : %0.2f percent, %0.2f percent, %0.2f percent' %(ALF2,PCF2,PUF2)\n", + "print 'The Annual Load Factor of the Entire Plant is %0.2f percent' %LFP" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Load Factor, Plant Capacity Factor, Plant Use Factor of:\n", + "Unit 1 : 76.10 percent, 76.10 percent, 76.10 percent\n", + "Unit 2 : 11.42 percent, 9.13 percent, 22.83 percent\n", + "The Annual Load Factor of the Entire Plant is 50.23 percent\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex6, Page 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#To determine the most economic power factor\n", + "\n", + "from numpy import sqrt\n", + "\n", + "P=200*(10**3) #Maximum Demand\n", + "pf=0.707 #Power Factor Lagging\n", + "\n", + "a=100 #Tariff per kVA per year\n", + "\n", + "b=200 #Power factor improvement cost Per kVA.\n", + "r=20 #Interest Depriciation, maintenance and cost of losses amount to 20% of capital cost per year\n", + "\n", + "# Economic PF = sqrt(1-((b1/a)**2))\n", + "\n", + "b1=r*b/100 # b' term accrding to the equation above\n", + "\n", + "pfeco=sqrt(1-((b1/a)**2)) #Economic Power Factor\n", + "\n", + "print 'The Economic Power Factor is %0.2f ' %pfeco\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The Economic Power Factor is 0.92 \n" + ] + } + ], + "prompt_number": 22 + } + ], + "metadata": {} + } + ] +} |