From a8d0f00742f3076f18d646f2b2d2936864ef2774 Mon Sep 17 00:00:00 2001 From: Trupti Kini Date: Tue, 16 Feb 2016 23:30:24 +0600 Subject: Added(A)/Deleted(D) following books A Advance_Semiconductor_Devices_by_K._C._Nandi/chapter1.ipynb A Advance_Semiconductor_Devices_by_K._C._Nandi/chapter2.ipynb A Advance_Semiconductor_Devices_by_K._C._Nandi/chapter5.ipynb A Advance_Semiconductor_Devices_by_K._C._Nandi/screenshots/KC_econ1_chapter1.png A Advance_Semiconductor_Devices_by_K._C._Nandi/screenshots/KC_econ_ch1.png A Advance_Semiconductor_Devices_by_K._C._Nandi/screenshots/KC_percentChangeinDiodeCurrent_chapter2.png A sample_notebooks/SUMITPRADHAN/chapter6.ipynb --- .../chapter1.ipynb | 2121 ++++++++++++++++++++ .../chapter2.ipynb | 1262 ++++++++++++ .../chapter5.ipynb | 64 + .../screenshots/KC_econ1_chapter1.png | Bin 0 -> 18937 bytes .../screenshots/KC_econ_ch1.png | Bin 0 -> 21564 bytes .../KC_percentChangeinDiodeCurrent_chapter2.png | Bin 0 -> 34465 bytes sample_notebooks/SUMITPRADHAN/chapter6.ipynb | 1632 +++++++++++++++ 7 files changed, 5079 insertions(+) create mode 100644 Advance_Semiconductor_Devices_by_K._C._Nandi/chapter1.ipynb create mode 100644 Advance_Semiconductor_Devices_by_K._C._Nandi/chapter2.ipynb create mode 100644 Advance_Semiconductor_Devices_by_K._C._Nandi/chapter5.ipynb create mode 100644 Advance_Semiconductor_Devices_by_K._C._Nandi/screenshots/KC_econ1_chapter1.png create mode 100644 Advance_Semiconductor_Devices_by_K._C._Nandi/screenshots/KC_econ_ch1.png create mode 100644 Advance_Semiconductor_Devices_by_K._C._Nandi/screenshots/KC_percentChangeinDiodeCurrent_chapter2.png create mode 100644 sample_notebooks/SUMITPRADHAN/chapter6.ipynb diff --git a/Advance_Semiconductor_Devices_by_K._C._Nandi/chapter1.ipynb b/Advance_Semiconductor_Devices_by_K._C._Nandi/chapter1.ipynb new file mode 100644 index 00000000..7de612d4 --- /dev/null +++ b/Advance_Semiconductor_Devices_by_K._C._Nandi/chapter1.ipynb @@ -0,0 +1,2121 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter-1 Review of fundamentals of semiconductor" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.5.1 Pg 1-7" + ] + }, + { + "cell_type": "code", + "execution_count": 92, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Forbidden gap for Si : \n", + "at 35 degree C = 1.099 eV\n", + "at 60 degree C = 1.090 eV\n", + "\n", + "Forbidden gap for Ge : \n", + "at 35 degree C = 0.7163 eV\n", + "at 60 degree C = 0.7107 eV\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "#Given : \n", + "t1=35##degreeC\n", + "t2=60##degreeC\n", + "T1=t1+273##K\n", + "T2=t2+273##K\n", + "print \"Forbidden gap for Si : \"\n", + "EG1_Si=1.21-3.6*10**-4*T1##eV\n", + "print \"at 35 degree C = %0.3f eV\"%EG1_Si\n", + "EG2_Si=1.21-3.6*10**-4*T2##eV\n", + "print \"at 60 degree C = %0.3f eV\"%EG2_Si\n", + "print \"\\nForbidden gap for Ge : \"\n", + "EG1_Ge=0.785-2.23*10**-4*T1##eV\n", + "print \"at 35 degree C = %0.4f eV\"%EG1_Ge\n", + "EG2_Ge=0.785-2.23*10**-4*T2##eV\n", + "print \"at 60 degree C = %0.4f eV\"%EG2_Ge" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.9.1 Pg 1-22" + ] + }, + { + "cell_type": "code", + "execution_count": 93, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i) Concentration of electron = 2.88e+21 m**3 \n", + "(ii) Drift velocity = 2.167 m/s \n" + ] + } + ], + "source": [ + "#Given : \n", + "l=6*10**-2##m\n", + "V=1##Volt\n", + "A=10*10**-6##m**2\n", + "I=10*10**-3##A\n", + "q=1.602*10**-19##Coulomb\n", + "mu_n=1300*10**-4##m**2/V-s\n", + "E=V/l##V/m\n", + "v=mu_n*E##m/s\n", + "J=I/A##A/m**2\n", + "n=J/(q*mu_n*E)##per m**3\n", + "print \"(i) Concentration of electron = %0.2e m**3 \"%n\n", + "print \"(ii) Drift velocity = %0.3f m/s \"%v" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.9.2 Pg 1-23" + ] + }, + { + "cell_type": "code", + "execution_count": 94, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Electron mobility = 0.365 m**2/V-s\n" + ] + } + ], + "source": [ + "#Given : \n", + "l=6*10**-2##m\n", + "V=12##Volt\n", + "v=73##m/s\n", + "E=V/l##V/m\n", + "mu=v/E##m**2/V-s\n", + "print \"Electron mobility = %0.3f m**2/V-s\"%mu" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.10.1 Pg 1-25" + ] + }, + { + "cell_type": "code", + "execution_count": 95, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Concentration of electron = 9.615e+20 per m**3 \n", + "Electron velocity = 3.250 m/s \n" + ] + } + ], + "source": [ + "#Given : \n", + "l=4*10**-2##m\n", + "A=10*10**-6##m**2\n", + "V=1##Volt\n", + "I=5*10**-3##A\n", + "q=1.6*10**-19##Coulomb\n", + "mu=1300##cm**2/V-s\n", + "J=I/A##A/m**2\n", + "E=V/l##V/m\n", + "n=J/(q*mu*10**-4*E)#\n", + "v=mu*10**-4*E##m/s\n", + "print \"Concentration of electron = %0.3e per m**3 \"%n\n", + "print \"Electron velocity = %0.3f m/s \"%v" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.11.1 Pg 1-28" + ] + }, + { + "cell_type": "code", + "execution_count": 96, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Conductivity = 5.520e-04 (ohm-m)**-1 \n", + "Resistivity = 1811.6 ohm-m\n" + ] + } + ], + "source": [ + "#Given : \n", + "ni=1.5*10**10/10**-6##per m**3\n", + "mu_n=1800*10**-4##m**2/V-s\n", + "mu_p=500*10**-4##m**2/V-s\n", + "q=1.6*10**-19##Coulomb\n", + "sigma_i=ni*(mu_n+mu_p)*q##(ohm-m)**-1\n", + "print \"Conductivity = %0.3e (ohm-m)**-1 \"%sigma_i\n", + "rho_i=1/sigma_i##ohm-m\n", + "print \"Resistivity = %0.1f ohm-m\"%rho_i" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.11.2 Pg 1-28" + ] + }, + { + "cell_type": "code", + "execution_count": 97, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Intrinsic carrier concentration = 1.5e+10 per cm**3\n" + ] + } + ], + "source": [ + "from math import sqrt, exp\n", + "#Given : \n", + "T=300##K\n", + "Ao=2.735*10**31##constant for Si\n", + "k=86*10**-6##boltzman constant\n", + "EGO=1.1##volt(Bandgap energy)\n", + "ni=sqrt(Ao*T**3*exp(-EGO/k/T))##per cm**3\n", + "print \"Intrinsic carrier concentration = %0.1e per cm**3\"%ni" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.11.3 Pg 1-29" + ] + }, + { + "cell_type": "code", + "execution_count": 98, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(i) Current = 3.00 A\n", + "(ii) Conductivity = 2.78e+07 (ohm-m)**-1\n", + "(iii) velocity of free electrons = 2.08e-02 m/s\n", + "(iv) Mobility = 0.193 m**2/V-s \n" + ] + } + ], + "source": [ + "#Given : \n", + "A=1*10**-6##m**2\n", + "R=3.6*10**-4/10**-2##ohm/m\n", + "n=9*10**26##electrons/m**3\n", + "J=3*10**6##A/m**2\n", + "q=1.6*10**-19##Coulomb\n", + "I=J*A##A\n", + "print \"(i) Current = %0.2f A\"%I\n", + "rho=R*A##ohm-m\n", + "sigma=1/rho##(ohm-m)**-1\n", + "print \"(ii) Conductivity = %0.2e (ohm-m)**-1\"%sigma\n", + "v=J/n/q##m/s\n", + "print \"(iii) velocity of free electrons = %0.2e m/s\"%v\n", + "mu=sigma/n/q##m**2/V-s\n", + "print \"(iv) Mobility = %0.3f m**2/V-s \"%mu" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.11.4 Pg 1-31" + ] + }, + { + "cell_type": "code", + "execution_count": 99, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Intrinsic concentration at 30 degree C = 1.16e+16 per m**3) \n", + "Intrinsic concentration at 100 degree C = 1.221e+18 (per m**3)\n" + ] + } + ], + "source": [ + "#Given : \n", + "rho=3*10**5*10**-2##ohm-m\n", + "T1=30+273##K\n", + "mu_n=0.13##m**2/V-s\n", + "mu_p=0.05##m**2/V-s\n", + "q=1.6*10**-19##Coulomb\n", + "T2=100+273##K\n", + "sigma_i=1/rho##(ohm-m)**-1\n", + "ni1=sigma_i/q/(mu_n+mu_p)##electrons/m**3\n", + "print \"Intrinsic concentration at 30 degree C = %0.2e per m**3) \"%ni1\n", + "k=8.62*10**-5##eV/K(Boltzman constant)\n", + "EGO=1.21##V(Energy band gap)\n", + "Ao=ni1**2/(T1**3*exp(-EGO/k/T1))##constant\n", + "ni2=sqrt(Ao*T2**3*exp(-EGO/k/T2))##per cm**3\n", + "print \"Intrinsic concentration at 100 degree C = %0.3e (per m**3)\"%ni2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.11.5 Pg 1-32" + ] + }, + { + "cell_type": "code", + "execution_count": 100, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Majority Carrier density = 3.720e+20 per m**3\n" + ] + } + ], + "source": [ + "#Given : \n", + "l=0.1*10**-2##m\n", + "R=1.5*10**3##ohm\n", + "mu_n=0.14##m**2/V-s\n", + "mu_p=0.05##m**2/V-s\n", + "A=8*10**-8##m**2\n", + "ni=1.5*10**10*10**6## per m**3\n", + "q=1.6*10**-19##Coulomb\n", + "rho_n=R*A/l##ohm-m\n", + "sigma_n=1/rho_n##(ohm-m)**-1\n", + "ND=sigma_n/mu_n/q##\n", + "print \"Majority Carrier density = %0.3e per m**3\"%ND" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.11.6 Pg 1-32" + ] + }, + { + "cell_type": "code", + "execution_count": 101, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Length of the bar = 0.855 mm\n" + ] + } + ], + "source": [ + "#Given : \n", + "A=2.5*10**-4##m**2\n", + "n=1.5*10**16##per m**3\n", + "q=1.6*10**-19##Coulomb\n", + "mu_n=0.14##m**2/V-s\n", + "mu_p=0.05##m**2/V-s\n", + "I=1.2*10**-3##A\n", + "V=9##Volts\n", + "ni=n## per m**3\n", + "sigma_i=ni*q*(mu_n+mu_p)##(ohm-m)**-1\n", + "rho_i=1/sigma_i##ohm-m\n", + "R=V/I##ohm\n", + "l=R*A/rho_i##m\n", + "print \"Length of the bar = %0.3f mm\"%(l*1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.11.7 Pg 1-34" + ] + }, + { + "cell_type": "code", + "execution_count": 102, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Resistivity = 2.3148e+05 ohm-cm\n", + "Ratio of donor impurity atom to Si atom : 1e-08\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "#Given : \n", + "n=5*10**22##per cm**3\n", + "mu_n=1300##cm**2/V-s\n", + "mu_p=500##cm**2/V-s\n", + "ni=1.5*10**10##per cm**3\n", + "T=300##K\n", + "rho_n=9.5##ohm-cm\n", + "q=1.6*10**-19##Coulomb\n", + "sigma_i=ni*q*(mu_n+mu_p)##(ohm-cm)**-1\n", + "rho_i=1/sigma_i##ohm-cm\n", + "print \"Resistivity = %0.4e ohm-cm\"%rho_i\n", + "sigma_n=1/rho_n##(ohm-cm)**-1\n", + "ND=sigma_n/mu_n/q##per m**3\n", + "Ratio=ND/n#\n", + "print \"Ratio of donor impurity atom to Si atom : %0.e\"%(Ratio)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.11.8 Pg 1-35" + ] + }, + { + "cell_type": "code", + "execution_count": 103, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Resistivity of intrinsic Si = 2246.91 ohm-m \n", + "Resistivity of doped Si = 9.259e-02 ohm-m\n" + ] + } + ], + "source": [ + "#Given : \n", + "n=5*10**22##per cm**3\n", + "ni=1.52*10**10*10**6##per m**3\n", + "q=1.6*10**-19##Coulomb\n", + "mu_n=0.135##m**2/V-s\n", + "mu_p=0.048##m**2/V-s\n", + "impurity=1/10**8##atoms\n", + "sigma_i=ni*q*(mu_n+mu_p)##(ohm-cm)**-1\n", + "rho_i=1/sigma_i##ohm-cm\n", + "print \"Resistivity of intrinsic Si = %0.2f ohm-m \"%rho_i\n", + "ND=n*impurity*10**6##per m**3\n", + "sigma_n=ND*mu_n*q##(ohm-m)**-1\n", + "rho_n=1/sigma_n##ohm-m\n", + "print \"Resistivity of doped Si = %0.3e ohm-m\"%rho_n\n", + "#Answer in the book is not accurate." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.11.9 Pg 1-36" + ] + }, + { + "cell_type": "code", + "execution_count": 104, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ratio of doner atom to Si atom per unit volume : 1e-08\n" + ] + } + ], + "source": [ + "#Given : \n", + "rho=9.6*10**-2##ohm-m\n", + "mu_n=1300*10**-4##m**2/V-s\n", + "sigma_n=1/rho##(ohm-cm)**-1\n", + "TotalAtoms=5*10**28##per m**3\n", + "q=1.6*10**-19##Coulomb\n", + "ND=sigma_n/mu_n/q##per m**3\n", + "ratio=ND/TotalAtoms#\n", + "print \"Ratio of doner atom to Si atom per unit volume : %0.e\"%ratio" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.11.10 Pg 1-37" + ] + }, + { + "cell_type": "code", + "execution_count": 105, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Resistivity of Ge = 45.0 ohm-cm\n" + ] + } + ], + "source": [ + "#Given : \n", + "ni=2.5*10**13##per cm**3\n", + "mu_p=1800##cm**2/V-s\n", + "mu_n=3800##cm**2/V-s\n", + "q=1.6*10**-19##Coulomb\n", + "sigma_i=ni*q*(mu_n+mu_p)##(ohm-cm)**-1\n", + "rho_i=1/sigma_i##ohm-cm\n", + "print \"Resistivity of Ge =\",round(rho_i),\"ohm-cm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.11.11 Pg 1-37" + ] + }, + { + "cell_type": "code", + "execution_count": 106, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Electron concentration = 1.440e+10 per m**3 \n", + "Conductivity of Si = 80 (ohm-m)**-1\n" + ] + } + ], + "source": [ + "#Given : \n", + "ni=1.2*10**16##per m**3\n", + "p=10**22##per m**3\n", + "mu_p=500*10**-4##cm**2/V-s\n", + "mu_n=1350*10**-4##cm**2/V-s\n", + "q=1.6*10**-19##Coulomb\n", + "n=ni**2/p##per m**3\n", + "print \"Electron concentration = %0.3e per m**3 \"%n\n", + "sigma=q*(n*mu_n+p*mu_p)##(ohm-m)**-1\n", + "print \"Conductivity of Si = %0.f (ohm-m)**-1\"%sigma" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.12.1 Pg 1-39" + ] + }, + { + "cell_type": "code", + "execution_count": 107, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Electron concentration = 1e+17 per cm**3 \n", + "Holes = 2.25e+03 per cm**3 : \n" + ] + } + ], + "source": [ + "#Given : \n", + "T=27+273##K\n", + "ND=10**17##per cm**3\n", + "ni=1.5*10**10##per cm**3\n", + "n=ND##per m**3#ND>>n\n", + "print \"Electron concentration = %0.e per cm**3 \"%n\n", + "p=ni**2/n##per m**3\n", + "print \"Holes = %0.2e per cm**3 : \"%p" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.12.2 Pg 1-39" + ] + }, + { + "cell_type": "code", + "execution_count": 108, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total free electrons = 2.20e+17 per m**3\n" + ] + } + ], + "source": [ + "#Given : \n", + "Vol=4*50*1.5##mm**3\n", + "ni=2.4*10**19##per m**3\n", + "p=7.85*10**14##per m**3\n", + "n=ni**2/p##per m**3\n", + "Vol=Vol*10**-9##m**3\n", + "TotalElectron=n*Vol##no. of electrons\n", + "print \"Total free electrons = %0.2e per m**3\"%TotalElectron" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.13.1 Pg 1-41" + ] + }, + { + "cell_type": "code", + "execution_count": 109, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total current density = 524.21 A/m**2 \n" + ] + } + ], + "source": [ + "#Given : \n", + "ND=10**14##per cm**3\n", + "NA=7*10**13##per cm**3\n", + "rho_i=60##ohm-cm\n", + "E=2##V/cm\n", + "q=1.6*10**-19##Coulomb\n", + "mu_p=1800##cm**2/V-s\n", + "mu_n=3800##cm**2/V-s\n", + "sigma_i=1/rho_i##(ohm-cm)**-1\n", + "ni=sigma_i/q/(mu_n+mu_p)##per cm**3\n", + "from sympy import symbols, solve\n", + "p = symbols('p')\n", + "n=p+(ND-NA)##per cm**3\n", + "#n*p=ni**2 \n", + "expr = n*p-ni**2 \n", + "#m=[1 (ND-NA) -ni**2]##polynomial\n", + "p=solve(expr,p)[1]##per m**3 #taking only +ve value\n", + "n=ni**2/p##per m**3\n", + "J=(n*mu_n+p*mu_p)*q*E/10**-4##A/m**2\n", + "print \"Total current density = %0.2f A/m**2 \"%J\n", + "#Answer in the textbook is not accurate." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.13.2 Pg 1-43" + ] + }, + { + "cell_type": "code", + "execution_count": 110, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Value of electrical field, E = 0.8150 V/cm \n" + ] + } + ], + "source": [ + "#Given : \n", + "ND=10**14##per cm**3\n", + "NA=7*10**3##per cm**3\n", + "rho_i=60##ohm-cm\n", + "J=52##mA/cm**2\n", + "q=1.6*10**-19##Coulomb\n", + "mu_p=1800##cm**2/V-s\n", + "mu_n=3800##cm**2/V-s\n", + "sigma_i=1/rho_i##(ohm-cm)**-1\n", + "ni=sigma_i/q/(mu_n+mu_p)##per cm**3\n", + "from sympy import symbols, solve\n", + "p = symbols('p')\n", + "n=p+(ND-NA)##per cm**3\n", + "#n*p=ni**2 \n", + "expr = n*p-ni**2 \n", + "#m=[1 (ND-NA) -ni**2]##polynomial\n", + "p=solve(expr,p)[1]##per m**3 #taking only +ve value\n", + "n=ni**2/p##per m**3\n", + "E=J*10**-3/q/(n*mu_n+p*mu_p)##V/m\n", + "print \"Value of electrical field, E = %0.4f V/cm \"%E" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.13.3 Pg 1-45" + ] + }, + { + "cell_type": "code", + "execution_count": 111, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total current density = 382.75 A/m**2\n" + ] + } + ], + "source": [ + "#Given : \n", + "ND=10**14##per cm**3\n", + "NA=7*10**13##per cm**3\n", + "rho_i=60##ohm-cm\n", + "E=2##V/cm\n", + "q=1.6*10**-19##Coulomb\n", + "mu_p=500##cm**2/V-s\n", + "mu_n=1300##cm**2/V-s\n", + "sigma_i=1/rho_i##(ohm-cm)**-1\n", + "ni=sigma_i/q/(mu_n+mu_p)##per cm**3\n", + "from sympy import symbols, solve\n", + "p = symbols('p')\n", + "n=p+(ND-NA)##per cm**3\n", + "#n*p=ni**2 \n", + "expr = n*p-ni**2 \n", + "#m=[1 (ND-NA) -ni**2]##polynomial\n", + "p=solve(expr,p)[1]##per m**3 #taking only +ve value\n", + "n=ni**2/p##per m**3\n", + "J=(n*mu_n+p*mu_p)*q*E/10**-4##A/m**2\n", + "print \"Total current density = %0.2f A/m**2\"%J" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.13.4 Pg 1-46" + ] + }, + { + "cell_type": "code", + "execution_count": 112, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Electron mobility = 0.365 m**2/V-s \n" + ] + } + ], + "source": [ + "#Given : \n", + "l=6*10**-2##m\n", + "V=12##volts\n", + "v=73##m/s\n", + "E=V/l##V/m\n", + "mu=v/E##m**2/V-s\n", + "print \"Electron mobility = %0.3f m**2/V-s \"%mu" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.15.1 Pg 1-54" + ] + }, + { + "cell_type": "code", + "execution_count": 113, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Magnitude of hall voltage = 65 mV \n" + ] + } + ], + "source": [ + "#Given : \n", + "ND=10**13##per cm**3\n", + "Bz=0.2##Wb/m**2\n", + "d=5##mm\n", + "E=5##V/cm\n", + "q=1.6*10**-19##Coulomb\n", + "mu_n=1300##cm**2/V-s\n", + "rho=ND*q##Coulomb/cm**3\n", + "J=rho*mu_n*E##A/cm**2\n", + "VH=Bz*10**-4*J*d*10**-1/rho##V\n", + "print \"Magnitude of hall voltage = %0.f mV \"%(VH*10**3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.15.2 Pg 1-55" + ] + }, + { + "cell_type": "code", + "execution_count": 114, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mobility = 0.050909 m**2/V-s\n" + ] + } + ], + "source": [ + "#Given : \n", + "rho=220*10**3*10**-2##ohm/m\n", + "d=2.2*10**-3##m\n", + "w=2*10**-3##m\n", + "B=0.1##Wb/m**2\n", + "I=5*10**-6##A\n", + "VH=28*10**-3##V\n", + "sigma=1/rho##(ohm-m)**-1\n", + "RH=VH*w/(B*I)##ohm\n", + "mu=sigma*RH##m**2/V-s\n", + "print \"Mobility = %0.6f m**2/V-s\"%mu" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.16.1 Pg 1-59" + ] + }, + { + "cell_type": "code", + "execution_count": 115, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Concentration of electron = 9.615e+20 per m**3\n", + "Electron velocity = 3.25 m/s\n" + ] + } + ], + "source": [ + "#Given : \n", + "l=4*10**-2##m\n", + "A=10*10**-6##m**2\n", + "V=1##Volt\n", + "I=5*10**-3##A\n", + "q=1.6*10**-19##Coulomb\n", + "mu=1300##cm**2/V-s\n", + "J=I/A##A/m**2\n", + "E=V/l##V/m\n", + "n=J/(q*mu*10**-4*E)\n", + "v=mu*10**-4*E##m/s\n", + "print \"Concentration of electron = %0.3e per m**3\"%n\n", + "print \"Electron velocity = %0.2f m/s\"%v" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.16.2 Pg 1-59" + ] + }, + { + "cell_type": "code", + "execution_count": 116, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Resistivity of doped Ge = 3.738 ohm-cm\n" + ] + } + ], + "source": [ + "#Given : \n", + "mu_n=3800##cm**2/V-s\n", + "mu_p=1300##cm**2/V-s\n", + "ni=2.5*10**13##per cm**3\n", + "q=1.6*10**-19##Coulomb\n", + "ND=4.4*10**22/10**8##per cm**3\n", + "sigma_n=ND*q*mu_n##(ohm-m)**-1\n", + "rho_n=1/sigma_n##ohm-cm\n", + "print \"Resistivity of doped Ge = %0.3f ohm-cm\"%rho_n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.16.3 Pg 1-60" + ] + }, + { + "cell_type": "code", + "execution_count": 117, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Minor carrier density = 4.5e+11 per m**3\n" + ] + } + ], + "source": [ + "#Given : \n", + "ni=1.5*10**16##per m**3\n", + "n=5*10**20##per m**3\n", + "p=ni**2/n##per m**3\n", + "print \"Minor carrier density = %0.1e per m**3\"%p" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.16.4 Pg 1-60" + ] + }, + { + "cell_type": "code", + "execution_count": 118, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Electron concentration, n = 8.00e+15 per cm**3\n", + "Hole concentration, p = 2.8125e+04 per cm**3 \n", + "Total electron concentration, nT = 8e+15 per cm**3\n", + "Total hole concentration, pT = 1.00e+14 per cm**3\n", + "Current, I = 36.45 mA\n" + ] + } + ], + "source": [ + "#Given : \n", + "ni=1.5*10**10##per cm**3\n", + "mu_n=1400##cm**2/V-s\n", + "mu_p=500##cm**2/V-s\n", + "l=1##cm\n", + "a=1##mm**2\n", + "q=1.6*10**-19##Coulomb\n", + "del_n=10**14##per cm**3\n", + "del_p=10**14##per cm**3\n", + "Nd=8*10**15##per cm**3\n", + "n=Nd##per cm**3(Nd>>ni)\n", + "print \"Electron concentration, n = %0.2e per cm**3\"%n\n", + "p=ni**2/n##per m**3\n", + "print \"Hole concentration, p = %0.4e per cm**3 \"%p\n", + "nT=Nd+del_n##per cm**3\n", + "print \"Total electron concentration, nT = %0.e per cm**3\"%nT\n", + "pT=p+del_p##per cm**3\n", + "print \"Total hole concentration, pT = %0.2e per cm**3\"%pT\n", + "sigma=(nT*mu_n+pT*mu_p)*q##(ohm-cm)**-1\n", + "rho=1/sigma##ohm-cm\n", + "R=rho*l/(a*10**-2)##ohm\n", + "V=2##volt\n", + "I=V/R##A\n", + "print \"Current, I = %0.2f mA\"%(I*1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.16.5 Pg 1-61" + ] + }, + { + "cell_type": "code", + "execution_count": 119, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Current, I = 0.944 mA\n" + ] + } + ], + "source": [ + "#Given : \n", + "A=2.3*10**-4##m**2\n", + "n=1.5*10**16##per m**3\n", + "l=1##mm\n", + "mu_n=1400##cm**2/V-s\n", + "mu_p=500##cm**2/V-s\n", + "p=n##per m**3\n", + "ni=n##per m**3\n", + "q=1.6*10**-19##Coulomb\n", + "sigma_i=ni*(mu_n*10**-4+mu_p*10**-4)*q##(ohm-m)**-1\n", + "rho_i=1/sigma_i##ohm-m\n", + "R=rho_i*l*10**-3/A##ohm\n", + "V=9##volt\n", + "I=V/R##A\n", + "print \"Current, I = %0.3f mA\"%(I*1000)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.16.6 Pg 1-62" + ] + }, + { + "cell_type": "code", + "execution_count": 120, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Concentration gradient, dn/dx = 1.624e+19\n" + ] + } + ], + "source": [ + "#Given : \n", + "ND=10**14##per m**3\n", + "Jn=10##mA/cm**2\n", + "E=3##V/cm\n", + "T=27+273##K\n", + "q=1.6*10**-19##Coulomb\n", + "mu_n=1500##cm**2/V-s\n", + "Dn=mu_n/39##Diffusion constant\n", + "n=ND##per m**3\n", + "dnBYdx=((Jn*10**-3/10**-4)-n*q*mu_n*E)/q/Dn##concentration gradient\n", + "print \"Concentration gradient, dn/dx = %0.3e\"%dnBYdx" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.16.7 Pg 1-63" + ] + }, + { + "cell_type": "code", + "execution_count": 121, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Total current density = 672.0 A/m**2\n" + ] + } + ], + "source": [ + "#Given : \n", + "ND=10**13##per m**3\n", + "NA=10**14##per m**3\n", + "rho_i=44##ohm-cm\n", + "E=3##V/cm\n", + "q=1.6*10**-19##Coulomb\n", + "mu_n=0.38##m**2/V-s\n", + "mu_p=0.18##m**2/V-s\n", + "ni=2.5*10**19##per m**3\n", + "from sympy import symbols, solve\n", + "p = symbols('p')\n", + "n=p+(ND-NA)##per cm**3\n", + "#n*p=ni**2 \n", + "expr = n*p-ni**2 \n", + "#m=[1 (ND-NA) -ni**2]##polynomial\n", + "p=solve(expr,p)[1]##per m**3 #taking only +ve value\n", + "n=ni**2/p##per m**3\n", + "J=(n*mu_n+p*mu_p)*q*(E/10**-2)##A/m**2\n", + "print \"Total current density = %0.1f A/m**2\"%J\n", + "#Ans in the textbook is not accurate." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.16.8 Pg 1-64" + ] + }, + { + "cell_type": "code", + "execution_count": 122, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Conductivity of intrinsic Ge = 2.24 (ohm-m)**-1\n", + "Conductivity after adding donor impurity = 267.52 (ohm-m)**-1\n", + "Conductivity after adding acceptor impurity = 126.72 (ohm-m)**-1 \n" + ] + } + ], + "source": [ + "#Given : \n", + "T=300##K\n", + "ni=2.5*10**13##per cm**3\n", + "mu_n=3800##cm**2/V-s\n", + "mu_p=1800##cm**2/V-s\n", + "q=1.6*10**-19##Coulomb\n", + "sigma_i=ni*(mu_n+mu_p)*q/10**-2##(ohm-m)**-1\n", + "print \"Conductivity of intrinsic Ge = %0.2f (ohm-m)**-1\"%sigma_i\n", + "ND=4.4*10**22/10**7##per cm**3\n", + "n=ND##per cm**3\n", + "sigma_n=n*mu_n*q/10**-2##(ohm-m)**-1\n", + "print \"Conductivity after adding donor impurity = %0.2f (ohm-m)**-1\"%sigma_n\n", + "NA=4.4*10**22/10**7##per cm**3\n", + "p=NA##per cm**3\n", + "sigma_p=p*mu_p*q/10**-2##(ohm-m)**-1\n", + "print \"Conductivity after adding acceptor impurity = %0.2f (ohm-m)**-1 \"%sigma_p" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.40.1 Pg 1-102" + ] + }, + { + "cell_type": "code", + "execution_count": 123, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Equilibrium hole concentration = 2.25e+03 per cm**3\n" + ] + } + ], + "source": [ + "#Given : \n", + "ND=10**17##per cm**3\n", + "ni=1.5*10**10##per cm**3\n", + "no=ND##per cm**3#/Nd>>ni\n", + "po=ni**2/no##per cm**3\n", + "print \"Equilibrium hole concentration = %0.2e per cm**3\"%po" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.40.3 Pg 1-103" + ] + }, + { + "cell_type": "code", + "execution_count": 124, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Fermi level, Ef = Ei + 0.407 eV\n" + ] + } + ], + "source": [ + "from math import log\n", + "#Given : \n", + "ni=1.5*10**10##per cm**3\n", + "ND=10**17##per cm**3\n", + "no=ND##per cm**3#/Nd>>ni\n", + "po=ni**2/no##per cm**3\n", + "KT=0.0259##constant\n", + "delEf=KT*log(no/ni)##eV\n", + "print \"Fermi level, Ef = Ei +\",round(delEf,3),\"eV\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.40.4 Pg 1-104" + ] + }, + { + "cell_type": "code", + "execution_count": 125, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Diffusion coffiecients of electron = 4.40e-03 m**2/s\n", + "Diffusion coffiecients of holes = 6.47e-04 m**2/s\n" + ] + } + ], + "source": [ + "#Given : \n", + "K=1.38*10**-23##J/K\n", + "T=27+273##K\n", + "e=1.6*10**-19##constant\n", + "mu_n=0.17##m**2/V-s\n", + "mu_p=0.025##m**2/V-s\n", + "Dn=K*T/e*mu_n##m**2/s\n", + "print \"Diffusion coffiecients of electron = %0.2e m**2/s\"%Dn\n", + "Dp=K*T/e*mu_p##m**2/s\n", + "print \"Diffusion coffiecients of holes = %0.2e m**2/s\"%Dp" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.40.5 Pg 1-105" + ] + }, + { + "cell_type": "code", + "execution_count": 126, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Diffusion current density = 3.152e+03 A/m**2\n" + ] + } + ], + "source": [ + "#Given : \n", + "K=1.38*10**-23##J/K\n", + "T=27+273##K\n", + "e=1.6*10**-19##constant\n", + "del_no=10**20##per.m**3\n", + "tau_n=10**-7##s\n", + "mu_n=0.15##m**2/V-s\n", + "Dn=K*T/e*mu_n##m**2/s\n", + "Ln=sqrt(Dn*tau_n)##m\n", + "Jn=e*Dn*del_no/Ln##A/m**2\n", + "print \"Diffusion current density = %0.3e A/m**2\"%Jn" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.40.6 Pg 1-105" + ] + }, + { + "cell_type": "code", + "execution_count": 127, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Concentration of holes = 4.680e+11 per m**3\n" + ] + } + ], + "source": [ + "#Given : \n", + "sigma_n=0.1##(ohm-cm)**-1\n", + "mu_n=1300##m**2/V-s\n", + "ni=1.5*10**10##per cm**3\n", + "q=1.6*10**-19##Coulomb\n", + "n_n=sigma_n/q/mu_n##per cm**3\n", + "p_n=ni**2/n_n##per cm**3\n", + "p_n=p_n*10**6##per m**3\n", + "print \"Concentration of holes = %0.3e per m**3\"%p_n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.40.7 Pg 1-106" + ] + }, + { + "cell_type": "code", + "execution_count": 128, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Electron transit time = 6.41e-09 s\n", + "Photoconductor gain : 216.0\n" + ] + } + ], + "source": [ + "#Given : \n", + "L=100*10**-6##m\n", + "A=10**-7*10**-6##m**2\n", + "mu_e=0.13##m**2/V-s\n", + "mu_h=0.05##m**2/V-s\n", + "tau_h=10**-6##sec\n", + "V=12##volt\n", + "E=V/L##v/m\n", + "tn=L**2/(mu_e*V)##sec\n", + "print \"Electron transit time = %0.2e s\"%tn\n", + "Gain=tau_h/tn*(1+mu_h/mu_e)##\n", + "print \"Photoconductor gain :\",Gain" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.40.8 Pg 1-106" + ] + }, + { + "cell_type": "code", + "execution_count": 129, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Resistivity of intrinsic Ge at 300K = 45.00 ohm-cm\n", + "Resistivity of doped Ge = 3.74 ohm-cm \n" + ] + } + ], + "source": [ + "#Given : \n", + "T=300##K\n", + "rho_i=45##ohm-cm\n", + "#part (i)\n", + "mu_n=3800##cm**2/V-s\n", + "mu_p=1800##cm**2/V-s\n", + "ni=2.5*10**13##per cm**3\n", + "q=1.6*10**-19##Coulomb\n", + "sigma=ni*q*(mu_n+mu_p)##(ohm-cm)**-1\n", + "rho=1/sigma##ohm-cm\n", + "print \"Resistivity of intrinsic Ge at 300K = %0.2f ohm-cm\"%round(rho)\n", + "#part (ii)\n", + "ND=4.4*10**22/10**8##per cm**3\n", + "sigma=ND*q*mu_n##(ohm-cm)**-1\n", + "rho=1/sigma##ohm-cm\n", + "print \"Resistivity of doped Ge = %0.2f ohm-cm \"%rho" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.40.9 Pg 1-107" + ] + }, + { + "cell_type": "code", + "execution_count": 130, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Electron concentration = 1e+22 per m**3\n", + "Electron concentration = 1e+10 per m**3\n" + ] + } + ], + "source": [ + "#Given : \n", + "ni=10**16##per m**3\n", + "ND=10**22##per m**3\n", + "n=ND##per m**3#ND>>ni\n", + "print \"Electron concentration = %0.e per m**3\"%n\n", + "p=ni**2/n##per m**3\n", + "print \"Electron concentration = %0.e per m**3\"%p" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.40.10 Pg 1-107" + ] + }, + { + "cell_type": "code", + "execution_count": 131, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ratio of donor atom to Si atom : 1e-08\n" + ] + } + ], + "source": [ + "#Given : \n", + "rho=9.6*10**-2##ohm-m\n", + "mu_n=1300##cm**2/V-s\n", + "q=1.6*10**-19##Coulomb\n", + "sigma_n=1/rho##(ohm-m)**-1\n", + "ND=sigma_n/q/(mu_n*10**-4)##per m**3\n", + "ni=5*10**22*10**6##per m**3\n", + "print \"Ratio of donor atom to Si atom : %0.e\"%(ND/ni)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.40.11 Pg 1-108" + ] + }, + { + "cell_type": "code", + "execution_count": 132, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Equillibrium electron density = 2.25e+15 per cm**3\n", + "Equillibrium hole density = 1e+05 per cm**3 \n" + ] + } + ], + "source": [ + "#Given : \n", + "ni=1.5*10**10##per cm**3\n", + "n_n=2.25*10**15##per cm**3\n", + "print \"Equillibrium electron density = %0.2e per cm**3\"%n_n\n", + "p_n=ni**2/n_n##per cm**3\n", + "print \"Equillibrium hole density = %0.e per cm**3 \"%p_n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.40.12 Pg 1-108" + ] + }, + { + "cell_type": "code", + "execution_count": 133, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Material is p-type & Carrier concentration = 1e+16 holes per cm**3\n" + ] + } + ], + "source": [ + "#Given : \n", + "NA=2*10**16##per cm**3\n", + "ND=10**16##per cm**3\n", + "p=NA-ND##per cm**3\n", + "print \"Material is p-type & Carrier concentration = %0.e holes per cm**3\"%p" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.40.13 Pg 1-108" + ] + }, + { + "cell_type": "code", + "execution_count": 134, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Rate of generation of minority carrier = 1e+20 electron hole pair/sec/cm**3\n" + ] + } + ], + "source": [ + "#Given : \n", + "del_n=10**15##per cm**3\n", + "tau_p=10*10**-6##sec\n", + "rate=del_n/tau_p##rate of generation minority carrier\n", + "print \"Rate of generation of minority carrier = %0.e electron hole pair/sec/cm**3\"%rate" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.40.14 Pg 1-109" + ] + }, + { + "cell_type": "code", + "execution_count": 135, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Mobility = 5000 cm**2/V-s\n" + ] + } + ], + "source": [ + "#Given : \n", + "E=10##V/cm\n", + "v=1/(20*10**-6)##m/s\n", + "mu=v/E##cm**2/V-s\n", + "print \"Mobility = %02.f cm**2/V-s\"%mu" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.40.15 Pg 1-109" + ] + }, + { + "cell_type": "code", + "execution_count": 136, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Hole diffucion current, Jp = -707.17 A/cm**2)\n", + "Electron diffucion current, Jp = 2552.08 A/cm**2\n" + ] + } + ], + "source": [ + "#Given : \n", + "ND=4.5*10**15 #per cm**3\n", + "A=1*10**-2 #cm**2\n", + "l=10 #cm\n", + "tau_p=1*10**-6 #sec\n", + "tau_n=1*10**-6 #sec\n", + "Dp=12 #cm**2/sec\n", + "Dn=30 #cm**2/sec\n", + "q=1.6*10**-19 #coulamb\n", + "del_p=10**21 #electron hole pair/cm**3/sec\n", + "x=34.6*10**-4 #cm\n", + "Kdash=26 #mV(Kdash is taken as K*T/q)\n", + "ni=1.5*10**10 #per cm**3\n", + "no=ND #per cm**3#ND<" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Current density = 1120.00 A/cm**2\n" + ] + } + ], + "source": [ + "#Given : \n", + "q=1.6*10**-19##Coulomb\n", + "Dn=35##cm**2/s\n", + "x=[0, 2]##micro meter\n", + "n=[10**17 ,6*10**16]##per cm**3\n", + "%matplotlib inline\n", + "from matplotlib.pyplot import plot, title, show, xlabel, ylabel\n", + "plot(x,n)#\n", + "title('n Vs x')#\n", + "xlabel('x(micro meter)')#\n", + "ylabel('n(electrons per cm**3)')#\n", + "show()\n", + "dnBYdx=(n[1]-n[0])/(x[0]-x[1])/10**-4##gradient\n", + "Jn=q*Dn*dnBYdx##A/cm**2\n", + "print \"Current density = %0.2f A/cm**2\"%Jn" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.40.18 Pg 1-112" + ] + }, + { + "cell_type": "code", + "execution_count": 139, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Resistance of the bar = 1 Mohm\n" + ] + } + ], + "source": [ + "#Given : \n", + "q=1.6*10**-19##Coulomb\n", + "l=0.1##cm\n", + "A=100*10**-8##cm**2\n", + "n_n=5*10**20*10**-6##per cm**3\n", + "mu_n=0.13*10**4##cm**2/V-s\n", + "sigma_n=q*n_n*mu_n##(ohm-cm)**-1\n", + "rho=1/sigma_n##ohm-cm\n", + "R=rho*l/A##ohm\n", + "print \"Resistance of the bar = %0.f Mohm\"%round(R/10**6)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.40.19 Pg 1-113" + ] + }, + { + "cell_type": "code", + "execution_count": 140, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Answer is (B). Depletion width on p-side = 0.33 micro meter\n" + ] + } + ], + "source": [ + "#Given : \n", + "NA=9*10**16##per cm**3\n", + "ND=1*10**16##per cm**3\n", + "w_total=3##micro meter\n", + "w_p=w_total*ND/NA##micro meter\n", + "print \"Answer is (B). Depletion width on p-side = %0.2f micro meter\"%w_p" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.40.20 Pg 1-113" + ] + }, + { + "cell_type": "code", + "execution_count": 141, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Majority carrier density = 4.50e+11 per m**3\n" + ] + } + ], + "source": [ + "#Given : \n", + "ni=1.5*10**16##per m**3\n", + "n_n=5*10**20##per m**3\n", + "p_n=ni**2/n_n##per m**3\n", + "print \"Majority carrier density = %0.2e per m**3\"%p_n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.40.21 Pg 1-113" + ] + }, + { + "cell_type": "code", + "execution_count": 142, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEZCAYAAACTsIJzAAAABHNCSVQIC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1ZlXe+7PA8bZXSXoh\n8BnbB5ff36W2LwGQ9P3mdsDEx19PBw70hr/urgQOAtIxxJykY4hB8yGKhcMeprgRC8Azgd80tDFw\neXnTmjWS7qf4SxxgJdB4609RLEv9G9vXAEysNyXJwHdt31+2fTHFX/HYvlzSUyRt0bQ+1YzvLWkB\n8CLgq+XaTgCbNdVE2UEdOEU7A19t6BQA7qK4g13EnKRjiEGzDcVHO/Mo/iKfSAnNq8w+0vB8XcP2\nOjb+uZ/u89Q1TdtVVrOd6b03Ae6zPdU9yyfq2YRiBeGp2j3UtL0Js7h/RcRUclVSDJqzgfcDXwZO\nLff9Ctiuoc10v7xb3ejpVuBpkvYFkLRlOaDb3PaHwFFlmzHgDy1Ws53xvW0/APxS0mvLY6m8nwTA\nAxQr5mL7T9O0a+VpFOciYk7SMcTAkPRG4BHby4CPA/tJGrP9W4ob0mxeNjWT/3Jufj7pr+ryKp4j\ngdMlXUuxhPHjW7RdCrxA0nXAPwJvalFm1fc+CjiufL8bKO5nDsVYx4mSrpG08zTtmo8NxaD8FS1q\nipiVXJUUQ0HSUuBm21/pdS29IGkTils47tuNy2pjuCUxxLD437T+C35UvBK4KJ1CdEISQ0RETJLE\nEBERk6RjiIiISdIxRETEJOkYIiJiknQMERExSTqGiIiY5P8DtduvqIC+TFYAAAAASUVORK5CYII=\n", + "text/plain": [ + "" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Current density = 8.00 A/cm**2\n" + ] + } + ], + "source": [ + "#Given : \n", + "q=1.6*10**-19##Coulomb\n", + "Dn=25##cm**2/s\n", + "x=[0 ,0.5]##micro meter(base width)\n", + "n=[10**14 ,0]##per cm**3\n", + "from matplotlib.pyplot import plot, title, show, xlabel, ylabel\n", + "plot(x,n)#\n", + "title('n Vs x')#\n", + "xlabel('x(micro meter)')#\n", + "ylabel('n(electrons per cm**3)')#\n", + "show()\n", + "dnBYdx=(n[1]-n[0])/(x[0]-x[1])/10**-4##gradient\n", + "Jn=q*Dn*dnBYdx##A/cm**2\n", + "print \"Current density = %0.2f A/cm**2\"%Jn" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.40.22 Pg 1-114" + ] + }, + { + "cell_type": "code", + "execution_count": 143, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Band gap = 1.431 eV\n" + ] + } + ], + "source": [ + "#Given : \n", + "h=6.64*10**-34##planks constant\n", + "c=3*10**8##m/s(speed of light)\n", + "lamda=0.87*10**-6##m\n", + "Eg=h*c/lamda/(1.6*10**-19)##eV\n", + "print \"Band gap = %0.3f eV\"%Eg" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.40.23 Pg 1-114" + ] + }, + { + "cell_type": "code", + "execution_count": 144, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "(a) Absorbed power = 9.00 mW\n", + "(b) Rate of excess thermal energy = 2.564e-03 J/s\n", + "(c) No. of photons per sec : 2.81e+16\n" + ] + } + ], + "source": [ + "#Given : \n", + "t=0.46*10**-4##cm\n", + "E=2##eV\n", + "alfa=5*10**4##cm**-1\n", + "Io=10##mW\n", + "q=1.6*10**-19##Coulomb\n", + "It=Io*exp(-alfa*t)##mW\n", + "Pabs=Io-It##mW\n", + "print \"(a) Absorbed power = %0.2f mW\"%round(Pabs)\n", + "Eg=1.43##eV(Band gap)\n", + "heat_fraction=(E-Eg)/E#\n", + "E_heat=heat_fraction*Pabs*10**-3##J/s(energy converted to heat)\n", + "print \"(b) Rate of excess thermal energy = %0.3e J/s\"%E_heat\n", + "photons=Pabs*10**-3/q/E##no. of photons per sec\n", + "print \"(c) No. of photons per sec : %0.2e\"%photons" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.40.24 Pg 1-115" + ] + }, + { + "cell_type": "code", + "execution_count": 145, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Steady state separation between Fp & Ec = 0.70 eV\n", + "Hole current = 1900.55 A\n", + "Excess stored hole charge = 1.44e-07 Coulomb\n" + ] + } + ], + "source": [ + "#Given : \n", + "Kdash=0.0259##constant(taken as K*T/q)\n", + "A=0.5##cm**2\n", + "Na=10**17##per cm**3\n", + "ni=1.5*10**10##per cm**3\n", + "delta_p=5*10**16##per cm**3\n", + "x=1000##Angstrum\n", + "mu_p=500##cm**2/V-s\n", + "tau_p=10**-10##sec\n", + "q=1.6*10**-19##Coulomb\n", + "\n", + "Dp=Kdash*mu_p##cm/s\n", + "Lp=sqrt(Dp*tau_p)##cm\n", + "p0=Na##per cm**3\n", + "p=p0+delta_p*exp(x*10**-8/Lp)##per cm**3\n", + "delE1=log(p/ni)*Kdash##eV(taken as Ei-Fp)\n", + "Eg=1.12##eV(Band gap)\n", + "delE2=Eg-delE1##eV(taken as Ec-Fp)\n", + "print \"Steady state separation between Fp & Ec = %0.2f eV\"%delE2\n", + "Ip=q*A*Dp/Lp*delta_p*exp(x*10**-8/Lp)##A\n", + "print \"Hole current = %0.2f A\"%Ip\n", + "Qp=q*A*delta_p*Lp##C\n", + "print \"Excess stored hole charge = %0.2e Coulomb\"%Qp\n", + "#Answer in the book is wrong beacause of calculation mistake in the value of p & Ip." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Ex 1.40.25 Pg 1-116" + ] + }, + { + "cell_type": "code", + "execution_count": 146, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Steady state separation between Fp & Ec = 0.70 eV\n", + "Hole current = 1900.55 A \n", + "Excess stored hole charge = 1.44e-07 Coulomb\n" + ] + } + ], + "source": [ + "#Given : \n", + "Kdash=0.0259##constant(taken as K*T/q)\n", + "A=0.5##cm**2\n", + "Na=10**17##per cm**3\n", + "ni=1.5*10**10##per cm**3\n", + "delta_p=5*10**16##per cm**3\n", + "x=1000##Angstrum\n", + "mu_p=500##cm**2/V-s\n", + "tau_p=10**-10##sec\n", + "q=1.6*10**-19##Coulomb\n", + "\n", + "Dp=Kdash*mu_p##cm/s\n", + "Lp=sqrt(Dp*tau_p)##cm\n", + "p0=Na##per cm**3\n", + "p=p0+delta_p*exp(x*10**-8/Lp)##per cm**3\n", + "delE1=log(p/ni)*Kdash##eV(taken as Ei-Fp)\n", + "Eg=1.12##eV(Band gap)\n", + "delE2=Eg-delE1##eV(taken as Ec-Fp)\n", + "print \"Steady state separation between Fp & Ec = %0.2f eV\"%delE2\n", + "Ip=q*A*Dp/Lp*delta_p*exp(x*10**-8/Lp)##A\n", + "print \"Hole current = %0.2f A \"%Ip\n", + "Qp=q*A*delta_p*Lp##C\n", + "print \"Excess stored hole charge = %0.2e Coulomb\"%Qp\n", + "#Answer in the book is wrong beacause of calculation mistake in the value of p & Ip." + ] + } + ], + "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/Advance_Semiconductor_Devices_by_K._C._Nandi/chapter2.ipynb b/Advance_Semiconductor_Devices_by_K._C._Nandi/chapter2.ipynb new file mode 100644 index 00000000..fff383e3 --- /dev/null +++ b/Advance_Semiconductor_Devices_by_K._C._Nandi/chapter2.ipynb @@ -0,0 +1,1262 @@ +{ + "metadata": { + "name": "", + "signature": "" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter-2 Junctions and interfaces" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.6.1 Pg 2-21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import log\n", + "#Given : \n", + "Ge=4.4*10**22##atoms/cm**3\n", + "NA=Ge/10**8##per cm**3\n", + "NA=NA*10**6##per m**3\n", + "ND=NA*10**3##per m**3\n", + "ni=2.5*10**13##per cm**3\n", + "ni=ni*10**6##per m**3\n", + "VT=26##mV\n", + "Vj=VT*log(NA*ND/ni**2)##mV\n", + "print \"Junction potential = %0.1f mV\"%Vj" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Junction potential = 328.7 mV\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.6.2 Pg 2-22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given : \n", + "ni=2.5*10**15##per cm**3\n", + "Ge=4.4*10**22##atoms/cm**3\n", + "NA=Ge/10**8##per cm**3\n", + "NA=NA*10**6##per m**3\n", + "ND=NA*10**3##per m**3\n", + "ni=ni*10**6##per m**3\n", + "T=27+273##K\n", + "VT=T/11600##V\n", + "Vo=VT*log(NA*ND/ni**2)##V\n", + "print \"Contact potential = %0.4f V\"%Vo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Contact potential = 0.0888 V\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.6.3 Pg 2-23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given : \n", + "mu_n=1500*10**-4##m**2/V-s\n", + "mu_p=475*10**-4##m**2/V-s\n", + "ni=1.45*10**10*10**6##per m**3\n", + "q=1.6*10**-19##Coulomb\n", + "rho_p=10##ohm-cm\n", + "rho_p=rho_p*10**-2##ohm-m\n", + "rho_n=3.5##ohm-cm\n", + "rho_n=rho_n*10**-2##ohm-m\n", + "sigma_p=1/rho_p##(ohm-m)**-1\n", + "NA=sigma_p/q/mu_p##m**3\n", + "sigma_n=1/rho_n##(ohm-m)**-1\n", + "ND=sigma_p/q/mu_n##m**3\n", + "VT=26*10**-3##V\n", + "Vj=VT*log(NA*ND/ni**2)##V\n", + "print \"Height of potential barrier = %0.3f V\"%Vj\n", + "#Answer in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Height of potential barrier = 0.564 V\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.6.4 Pg 2-24" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given : \n", + "rho_p=2##ohm-cm\n", + "rho_p=rho_p*10**-2##ohm-m\n", + "rho_n=1##ohm-cm\n", + "rho_n=rho_n*10**-2##ohm-m\n", + "mu_n=1500*10**-4##m**2/V-s\n", + "mu_p=2100*10**-4##m**2/V-s\n", + "ni=2.5*10**13##per m**3\n", + "q=1.6*10**-19##Coulomb\n", + "sigma_p=1/rho_p##(ohm-m)**-1\n", + "NA=sigma_p/q/mu_p##m**3\n", + "sigma_n=1/rho_n##(ohm-m)**-1\n", + "ND=sigma_p/q/mu_n##m**3\n", + "T=27+273##K\n", + "VT=T/11600##V\n", + "Vj=VT*log(NA*ND/ni**2)##V\n", + "print \"Height of potential barrier = %0.4f V\"%Vj\n", + "#Anser in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Height of potential barrier = 0.9347 V\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.7.1 Pg 2-27" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given : \n", + "Vgamma=0.6##Volt\n", + "rf=12##ohm\n", + "V=5##Volts\n", + "R=1##kohm\n", + "IF=(V-Vgamma)/(R*1000+rf)##A\n", + "print \"Diode current = %0.1f mA\"%(IF*1000)\n", + "VF=Vgamma+IF*rf##volts\n", + "print \"Diode voltage = %0.2f Volts\"%VF" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diode current = 4.3 mA\n", + "Diode voltage = 0.65 Volts\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.7.2 Pg 2-35" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given : \n", + "Vgamma=0.6##Volt\n", + "Rf=10##ohm\n", + "Eta=2#\n", + "Vm=0.2##Volts\n", + "Vdc=10##Volts\n", + "RL=1##kohm\n", + "IDQ=(Vdc-Vgamma)/(RL*1000+Rf)##A\n", + "VT=25*10**-3##Volts\n", + "rd=Eta*VT/IDQ##ohm\n", + "print \"Alternating component of voltage across RL, Vo(ac) = \",round((RL*1000/(RL*1000+rd)*Vm),4),\"*sin(omega*t)\"\n", + "Vo_DC=IDQ*RL*1000##Volts\n", + "print \"Total load voltage = \",round(Vo_DC,1),\"+\",round((RL*1000/(RL*1000+rd)*Vm),4),\"*sin(omega*t)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Alternating component of voltage across RL, Vo(ac) = 0.1989 *sin(omega*t)\n", + "Total load voltage = 9.3 + 0.1989 *sin(omega*t)\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.7.3 Pg 2-37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import exp\n", + "#Given : \n", + "Eta=2##for Si diode\n", + "T=300##K\n", + "VT=T/11600##V\n", + "IbyIo=90/100#\n", + "#I=Io*(exp(V/Eta/VT)-1)\n", + "V=log(IbyIo+1)*Eta*VT##V\n", + "print \"Saturation value of voltage = %0.2f mV\"%(V*1000)\n", + "VF=0.5##Volts\n", + "VR=-0.5##Volts\n", + "IFbyIR=(exp(VF/Eta/VT)-1)/(exp(VR/Eta/VT)-1)##ratio\n", + "print \"Ratio of forward to reverse current = %0.2f\"%IFbyIR\n", + "#Answer in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Saturation value of voltage = 33.20 mV\n", + "Ratio of forward to reverse current = -15782.65\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.7.4 Pg 2-37" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given : \n", + "Eta=2##for Si diode\n", + "T=300##K\n", + "VT=T/11600##V\n", + "IbyIo=90/100#\n", + "#I=Io*(exp(V/Eta/VT)-1)\n", + "V=log(IbyIo+1)*Eta*VT##V\n", + "print \"Saturation value of voltage = %0.2f mV\"%(V*1000)\n", + "VF=0.2##Volts\n", + "VR=-0.2##Volts\n", + "IFbyIR=(exp(VF/Eta/VT)-1)/(exp(VR/Eta/VT)-1)##ratio\n", + "print \"Ratio of forward to reverse current : %0.2f \"%IFbyIR\n", + "#Answer in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Saturation value of voltage = 33.20 mV\n", + "Ratio of forward to reverse current : -47.78 \n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.9.1 Pg 2-61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given : \n", + "IF=10##mA\n", + "VF=0.75##volts\n", + "T=27+273##K\n", + "Eta=2##for Si diode\n", + "VT=T/11600##V\n", + "Io=IF/(exp(VF/Eta/VT)-1)##mA\n", + "print \"Reverse saturation current = %0.3f nA\"%(Io*10**6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reverse saturation current = 5.043 nA\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.9.2 Pg -61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given : \n", + "IF=10##mA\n", + "VF=0.3##Volts\n", + "T=27+273##K\n", + "Eta=1##for Ge diode\n", + "VT=T/11600##V\n", + "Io=IF/(exp(VF/Eta/VT)-1)##mA\n", + "print \"Reverse saturation current = %0.2f nA\"%(Io*10**6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reverse saturation current = 91.66 nA\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.9.3 Pg 2-61" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given : \n", + "Io=1*10**-9##A\n", + "T=27+273##K\n", + "VT=T/11600##V\n", + "VF=0.3##Volts\n", + "Eta=1##for Ge diode\n", + "IF=Io*(exp(VF/Eta/VT)-1)##mA\n", + "print \"Forwad current = %0.4f mA\"%(IF*10**3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Forwad current = 0.1091 mA\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.9.4 Pg 2-62" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given : \n", + "T=27+273##K\n", + "V1=0.4##V\n", + "V2=0.42##V\n", + "I1=10##mA\n", + "I2=20##mA\n", + "VT=T/11600##V\n", + "Eta=1/log(I1/I2)*(V1-V2)/VT\n", + "print \"Value of Eta : %0.2f\"%Eta\n", + "Io=I1/(exp(V1/Eta/VT)-1)*10**-3##A\n", + "print \"Current, Io = %0.2f nA\"%(Io*10**9)\n", + "#Ans in the book is not accurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Eta : 1.12\n", + "Current, Io = 9.54 nA\n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.9.5 Pg 2-63" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given : \n", + "Io1=10**-12##A\n", + "Io2=10**-10##A\n", + "I=2##mA\n", + "Eta=1##constant\n", + "T=27+273##K\n", + "VT=26/1000##V\n", + "#I=I1+I2\n", + "V=(log(I*10**-3/(Io1+Io2))+1)*Eta*VT##V\n", + "print \"Voltage across the diodes = %0.4f V\"%V\n", + "#Ans in the book is not accurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage across the diodes = 0.4628 V\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.9.6 Pg 2-64" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given : \n", + "Io1=10*10**-9##A\n", + "Io2=10*10**-9##A\n", + "Eta=1.1##constant\n", + "T=25+273##K\n", + "V=0.2##V(assumed)\n", + "VT=T/11600##V\n", + "I1=Io1*(exp(V/Eta/VT)-1)##A\n", + "I2=Io2*(exp(V/Eta/VT)-1)##A\n", + "I=I1+I2##A\n", + "print \"Source current = %0.2f micro Ampere\"%(I*10**6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Source current = 23.68 micro Ampere\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.9.7 Pg 2-65" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given : \n", + "Io=10**-13##A\n", + "T=27+273##K\n", + "Eta=1##constant\n", + "V=0.6##V\n", + "VT=26/1000##V\n", + "I3=Io*(exp(V/Eta/VT)-1)##A\n", + "R=1*1000##ohm\n", + "Ir=V/R##A\n", + "Itotal=I3+Ir##A\n", + "VD1=log(Itotal/Io)*Eta*VT##V\n", + "VD2=VD1##V\n", + "Vin=VD1+VD2+V##V\n", + "print \"Voltage Vin = %0.3f V\"%Vin" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage Vin = 1.823 V\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.9.8 Pg 2-66" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given : \n", + "Vs=10##V\n", + "print \"Case(i) : Vb=9.8V\"\n", + "Vb=9.8##V\n", + "#D1 forward & D2 reverse biased: Breakdown D2\n", + "VD2=Vb##V\n", + "VD1=Vs-Vb##V\n", + "print \"VD1 = %0.3f V\"%VD1\n", + "print \"VD2 = %0.3f V\"%VD2\n", + "print \"Case(ii) : Vb=10.2V\"\n", + "Vb=10.2##V\n", + "#D1 forward & D2 reverse biased: none will be breakdown\n", + "VD2=Vb##V\n", + "#I=I0 so exp(V1/Eta/VT)-1=1\n", + "Eta=1##constant\n", + "VT=26/1000##V\n", + "VD1=log(1+1)*Eta*VT##V\n", + "VD2=Vs-VD1##V\n", + "print \"VD1 = %0.3f V\"%VD1\n", + "print \"VD2 = %0.3f V\"%VD2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Case(i) : Vb=9.8V\n", + "VD1 = 0.200 V\n", + "VD2 = 9.800 V\n", + "Case(ii) : Vb=10.2V\n", + "VD1 = 0.018 V\n", + "VD2 = 9.982 V\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.9.9 Pg 2-67" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given : \n", + "Vs=5##Volt\n", + "Eta=1##constant\n", + "VT=26/1000##V\n", + "#I=I0 so exp(V1/Eta/VT)-1=1\n", + "V1=log(1+1)*Eta*VT##Volt\n", + "V2=Vs-V1##Volt\n", + "print \"Voltage across diode D1 = %0.3f V\"%V1\n", + "print \"Voltage across diode D2 = %0.3f V\"%V2" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Voltage across diode D1 = 0.018 V\n", + "Voltage across diode D2 = 4.982 V\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.10.2 Pg 2-70" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given : \n", + "rho_n=10##ohm-cm\n", + "rho_p=3.5##ohm-cm\n", + "ni=1.5*10**10##per cm**3\n", + "Vj=0.56##volt\n", + "q=1.6*10**-19##Coulomb\n", + "mu_n=1500##cm**2/V-s\n", + "mu_p=500##cm**2/V-s\n", + "sigma_p=1/rho_p##(ohm-cm)**-1\n", + "NA=sigma_p/q/mu_p##per cm**3\n", + "sigma_n=1/rho_n##(ohm-cm)**-1\n", + "ND=sigma_n/q/mu_n##per cm**3\n", + "VT=Vj/log(NA*ND/ni**2)##V\n", + "T=11600*VT##K\n", + "print \"Temperature of junction = %0.2f degree K\"%T\n", + "t=T-273##degree C\n", + "print \"Temperature of junction = %0.2f degree C\"%t" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Temperature of junction = 287.28 degree K\n", + "Temperature of junction = 14.28 degree C\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.11.1 Pg 2-75" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given : \n", + "Io=10##nA\n", + "T1=27+273##K\n", + "T2=87+273##K\n", + "VT=T1/11600##V\n", + "Eta=2##for Si\n", + "m=1.5##for Si\n", + "VGO=-1.21##volt\n", + "K=Io*10**-9/T1**m/exp(VGO/Eta/VT)##constant\n", + "VT=T2/11600##V\n", + "Io2=K*T2**m*exp(VGO/Eta/VT)##A\n", + "print \"Reverse saturation current at 87 degree C = %0.2f nA\"%(Io2*10**9)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reverse saturation current at 87 degree C = 648.69 nA\n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.11.2 Pg 2-76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given : \n", + "V=0.45##volt\n", + "Eta=2##for Si\n", + "T1=27+273##K\n", + "T2=125+273##K\n", + "VT1=T1/11600##V\n", + "VT2=T2/11600##V\n", + "I1BYIo1=exp(V/Eta/VT1)#\n", + "I2BYIo2=exp(V/Eta/VT2)#\n", + "m=1.5##for Si\n", + "VGO=1.21##volt\n", + "Io1BYIo2=(T1/T2)**m*exp(-VGO/Eta/VT1+VGO/Eta/VT2)##constant\n", + "I2BYI1=I2BYIo2/I1BYIo1/Io1BYIo2#\n", + "print \"Factor by which current increases : %0.2f \"%I2BYI1\n", + "#Answer is wrong in the textbook." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Factor by which current increases : 56.94 \n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.11.3 Pg 2-78" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given : \n", + "Io1=2##nA\n", + "T1=10+273##K\n", + "V=0.4##volt\n", + "VT1=T1/11600##V\n", + "m=1.5##for Si\n", + "Eta=2##for Si\n", + "VGO=-1.21##volt\n", + "K=Io1*10**-9/T1**m/exp(VGO/Eta/VT1)##constant\n", + "I1=Io1*10**-9*(exp(V/Eta/VT1)-1)##nA\n", + "T2=70+273##K\n", + "VT2=T2/11600##V\n", + "Io2=K*T2**m*(exp(VGO/Eta/VT2))##A\n", + "I2=Io2*(exp(V/Eta/VT2)-1)##nA\n", + "change=(I2-I1)/I1*100##%\n", + "print \"%% change = %0.2f diode current\"%change\n", + "#Answer is wrong in the textbook." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "% change = 2332.39 diode current\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.11.4 Pg 2-79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given : \n", + "T=300##K\n", + "m_Si=1.5##for Si\n", + "m_Ge=1.5##for Ge\n", + "EGO_Si=1.21##Volt\n", + "EGO_Ge=0.785##Volt\n", + "Eta_Si=2#\n", + "Eta_Ge=1#\n", + "VT=26/1000##V\n", + "print \"Part(i)\"\n", + "d_logIoBYdt_Ge=m_Ge/T+EGO_Ge/(Eta_Ge*T*VT)##per degree C\n", + "print \"d(log(Io))/dt for Ge = %0.2f per degree C\"%d_logIoBYdt_Ge\n", + "d_logIoBYdt_Si=m_Si/T+EGO_Si/(Eta_Si*T*VT)##per degree C\n", + "print \"d(log(Io))/dt for Si = %0.2f per degree C \"%d_logIoBYdt_Si\n", + "print \"Part(ii)\"\n", + "V=0.2##Volt\n", + "dVBYdt_Ge=V/T-Eta_Ge*VT*d_logIoBYdt_Ge#\n", + "print \"dV/dt for Si = %0.2f mV per degree C \"%(dVBYdt_Ge*1000)\n", + "V=0.6##Volt\n", + "dVBYdt_Si=V/T-Eta_Si*VT*d_logIoBYdt_Si\n", + "print \"dV/dt for Si = %0.2f mV per degree C \"%(dVBYdt_Si*1000)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part(i)\n", + "d(log(Io))/dt for Ge = 0.11 per degree C\n", + "d(log(Io))/dt for Si = 0.08 per degree C \n", + "Part(ii)\n", + "dV/dt for Si = -2.08 mV per degree C \n", + "dV/dt for Si = -2.29 mV per degree C \n" + ] + } + ], + "prompt_number": 38 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.12.1 Pg 2-85" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt\n", + "#Given : \n", + "NA=4*10**20##per m**3\n", + "Vj=0.2##Volt\n", + "V1=-1##Volts\n", + "V2=-5##Volts\n", + "epsilon_r=16##for Ge\n", + "epsilon_o=8.85*10**-12##permitivity\n", + "q=1.6*10**-19##Coulomb\n", + "W1=sqrt(2*epsilon_r*epsilon_o*(Vj-V1)/q/NA)##m\n", + "print \"Width of depletion region = %0.2f micro meter \"%(W1*10**6)\n", + "W2=sqrt(2*epsilon_r*epsilon_o*(Vj-V2)/q/NA)##m\n", + "print \"New value of Width of depletion region = %0.2f micro meter \"%(W2*10**6)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Width of depletion region = 2.30 micro meter \n", + "New value of Width of depletion region = 4.80 micro meter \n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.12.2 Pg 2-86" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given : \n", + "NA=4*10**20##per m**3\n", + "Vj=0.2##Volt\n", + "V1=-1##Volts\n", + "V2=-5##Volts\n", + "A=0.8*10**-6##m**2\n", + "epsilon_r=16##for Ge\n", + "epsilon_o=8.85*10**-12##permitivity\n", + "q=1.6*10**-19##Coulomb\n", + "W1=sqrt(2*epsilon_r*epsilon_o*(Vj-V1)/q/NA)##m\n", + "CT1=epsilon_r*epsilon_o*A/W1##\n", + "print \"Transition capacitance = %0.2f pF \"%(CT1*10**12)\n", + "W2=sqrt(2*epsilon_r*epsilon_o*(Vj-V2)/q/NA)##m\n", + "CT2=epsilon_r*epsilon_o*A/W2##\n", + "print \"New value of Transition capacitance = %0.2f pF \"%( CT2*10**12)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Transition capacitance = 49.16 pF \n", + "New value of Transition capacitance = 23.62 pF \n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.12.3 Pg 2-87" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given : \n", + "NA=3*10**20##per m**3\n", + "Vj=0.2##Volt\n", + "V=-10##Volts\n", + "A=1*10**-6##m**2\n", + "epsilon_r=16##for Ge\n", + "epsilon_o=8.854*10**-12##permitivity\n", + "q=1.6*10**-19##Coulomb\n", + "W=sqrt(2*epsilon_r*epsilon_o*(Vj-V)/q/NA)##m\n", + "print \"Width of depletion region = %0.2f micro meter\"%(W*10**6)\n", + "CT=epsilon_r*epsilon_o*A/W##\n", + "print \"Transition capacitance = %0.2f pF\"%(CT*10**12)\n", + "#Answer is wrong in the textbook." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Width of depletion region = 7.76 micro meter\n", + "Transition capacitance = 18.26 pF\n" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.12.4 Pg 2-88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given : \n", + "W=2*10**-4*10**-2##m\n", + "A=1*10**-6##m**2\n", + "epsilon_r=16##for Ge\n", + "epsilon_o=8.854*10**-12##permitivity\n", + "q=1.6*10**-19##Coulomb\n", + "CT=epsilon_r*epsilon_o*A/W##\n", + "print \"Barrier capacitance = %0.2f pF \"%(CT*10**12)\n", + "#Answer is wrong in the textbook." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Barrier capacitance = 70.83 pF \n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.12.5 Pg 2-88" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#Given : \n", + "Vj=0.5##Volt\n", + "V=-4.5##Volt\n", + "rho_p=5*10**-2##ohm-m\n", + "epsilon_r=12##for Si\n", + "epsilon_o=8.854*10**-12##permitivity\n", + "q=1.6*10**-19##Coulomb\n", + "CT=100*10**-12##F\n", + "mu_p=500*10**-4##m**2/V-s\n", + "sigma_p=1/rho_p##(ohm-m)**-1\n", + "NA=sigma_p/q/mu_p##per m**3\n", + "W=sqrt(2*epsilon_r*epsilon_o*(Vj-V)/q/NA)##m\n", + "A=CT*W/(epsilon_r*epsilon_o)##\n", + "r=sqrt(A/pi)##m\n", + "D=2*r##m\n", + "print \"Diameter = %0.2f micro meter\"%(D*10**6)\n", + "#Answer is wrong = %0.2f the textbook. Sqrt is not taken while calculatng W value and also other mistakes." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Diameter = 1397.53 micro meter\n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.12.6 Pg 2-90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given : \n", + "Eta=2##for Si\n", + "T=300##K\n", + "VT=26/1000##V\n", + "IbyIo=0.9#\n", + "#part (i)\n", + "V=log(IbyIo+1)*Eta*VT##Volt\n", + "print \"Value of reverse voltage = %0.2f mV\"%(V*1000)\n", + "#part (ii)\n", + "VF=0.2##Volt\n", + "VR=-0.2##Volt\n", + "IFbyIR=(exp(VF/Eta/VT)-1)/(exp(VR/Eta/VT)-1)#\n", + "print \"Ratio of forward bias current to reverse saturation current = %0.2f \"%IFbyIR\n", + "#Answer is wrong in the textbook." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of reverse voltage = 33.38 mV\n", + "Ratio of forward bias current to reverse saturation current = -46.81 \n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.12.7 Pg 2-91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Given : \n", + "Vs=100##V\n", + "Rf1=20##ohm\n", + "Vgamma1=0.2##Volts\n", + "Rf2=15##ohm\n", + "Vgamma2=0.6##Volts\n", + "Vb_Ge=0.2##Volts\n", + "Vb_Si=0.6##Volts\n", + "R1=10*10**3##ohm\n", + "R2=1*10**3##ohm\n", + "#Case(i)\n", + "Imax=Vs/R1##A\n", + "#D1 ON & D2 off\n", + "V=Vb_Ge+Rf1*Imax##Volt\n", + "#D2 off as V=V0):\n", + " print 'Our assumption was wrong and, the diode is forward biased';\n", + "else:\n", + " print 'The diode is reverse biased';\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Our assumption was wrong and, the diode is forward biased\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.11, Page number 86" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "V=2; #Supply voltage in V\n", + "V0=0.7; #Potential barrier voltage of the diode in V \n", + "R1=4000.0; #Resistance of first resistor in \u03a9\n", + "R2=1000.0; ##Resistance of second resistor in \u03a9\n", + "\n", + "#Calculation\n", + "#Assuming the diode to be in ON state\n", + "I1=((V-V0)/R1)*1000; #Current through resistor R1, in mA\n", + "I2=(V0/R2)*1000; #Current through resistor R2, in mA\n", + "ID=I1-I2; #Diode current, in mA\n", + "\n", + "if(ID<0):\n", + " #Since the diode current is negative, the diode must be OFF \n", + " ID=0; #True value of diode current, mA\n", + " \n", + "#As the diode is in OFF state it can be replaced by an open ciruit equivalent \n", + "VD=V*R2/(R1 +R2); #Voltage across the diode, in V\n", + "\n", + "#Result\n", + "print 'ID =%d mA'%ID;\n", + "print 'VD =%.1f V'%VD;" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ID =0 mA\n", + "VD =0.4 V\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.12, Page number 89-90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "AC_Input_Power=100.0; #Input AC Power in watts\n", + "AC_Output_Power=40.0; #Output AC Power in watts\n", + "Accepted_Power=50.0; #Power accepted by the half-wave rectifier in watt\n", + "\n", + "#Calculation\n", + "R_eff=(AC_Output_Power/AC_Input_Power)*100; #Rectification efficiency of the half-wave rectifier\n", + "Unused_power=AC_Input_Power-Accepted_Power; #Power not used by the half_wave rectifier due to open circuited condition of the diode in watt\n", + "Power_dissipated=Accepted_Power-AC_Output_Power; #Power dissipated by the diode watt\n", + "\n", + "#Result\n", + "print 'The rectification efficiency of the half-wave rectifier= %d%% '%R_eff;\n", + "\n", + "print 'Rest 60%% of the power is the unused power and power dissipated by the diode = %d watts and %d watts' %(Unused_power ,Power_dissipated);\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The rectification efficiency of the half-wave rectifier= 40% \n", + "Rest 60% of the power is the unused power and power dissipated by the diode = 50 watts and 10 watts\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.13, Page number 90" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "from math import sqrt\n", + "#Variable declaration\n", + "Vrms=230.0; #AC supply RMS voltage in V\n", + "Turns_Ratio=10/1; #turn ratio of the transformer \n", + "\n", + "#Calculation\n", + "Vpm=sqrt(2)*Vrms; #Maximum primary voltage in V\n", + "Vsm=Vpm/Turns_Ratio; #Maximum secondary voltage in V\n", + "#Case 1\n", + "Vdc=Vsm/(round(pi,2)); #Output D.C voltage, which is the average voltage in V\n", + "Vdc=round(Vdc,2);\n", + "#Case 2\n", + "PIV=Vsm; #Peak Inverse Voltage in V\n", + "\n", + "#Result\n", + "print 'The output d.c voltage= %.2f V'%Vdc;\n", + "print 'The peak inverse voltage= %.2f V'%PIV;" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The output d.c voltage= 10.36 V\n", + "The peak inverse voltage= 32.53 V\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.14, Page number 90-91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#Variable declaration\n", + "rf=20.0; #Internal resistance of the crystal diode in ohms\n", + "Vm=50.0; #Maximum applied voltage in V\n", + "RL=800.0; #Load Resistance in ohms\n", + "\n", + "#Calculation\n", + "# 1\n", + "Im=Vm/(rf+RL); #Maximum current in A\n", + "Im=Im*1000; #Maximum current in \n", + "Im=round(Im,0);\n", + "Idc=Im/pi; #Average voltage in mA\n", + "Idc=round(Idc,1);\n", + "Irms=Im/2; #RMS value of the current in mA\n", + "Irms=round(Irms,1)\n", + "\n", + "# 2\n", + "AC_Input_Power=pow(Irms/1000,2)*(rf+RL); #Input a.c power in watt\n", + "\n", + "DC_Output_Power=pow(Idc/1000,2)*RL; #Output d.c power in watt\n", + "\n", + "# 3\n", + "DC_Output_Voltage=(Idc/1000)*RL; #Output d.c voltage in V\n", + "\n", + "# 4\n", + "Rectifier_efficiency=(DC_Output_Power/AC_Input_Power)*100; # Efficiency of rectification of the half-wave rectifier\n", + "\n", + "#Result\n", + "print ' i:';\n", + "print ' Im = %d mA'%Im;\n", + "print ' Idc = %.1f mA'%Idc;\n", + "print ' Irms = %.1f mA'%Irms;\n", + "print ' ii: ';\n", + "print ' a.c input power= %.3f watt'%AC_Input_Power;\n", + "print ' d.c output power= %.3f watt'%DC_Output_Power;\n", + "print ' iii: ';\n", + "print ' d.c output voltage = %.2f volts'%DC_Output_Voltage;\n", + "print ' iv: '\n", + "print ' Efficiency of rectification = %.1f%%'%Rectifier_efficiency;\n", + "\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " i:\n", + " Im = 61 mA\n", + " Idc = 19.4 mA\n", + " Irms = 30.5 mA\n", + " ii: \n", + " a.c input power= 0.763 watt\n", + " d.c output power= 0.301 watt\n", + " iii: \n", + " d.c output voltage = 15.52 volts\n", + " iv: \n", + " Efficiency of rectification = 39.5%\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.15, Page number 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "#Variable declaration\n", + "Vdc=50.0; #Output d.c voltage in V\n", + "rf=25; #Diode resistance in ohm\n", + "RL=800; #Load resistance in ohm\n", + "\n", + "\n", + "#Calculation\n", + "Vm=(pi*(rf+RL)*Vdc)/RL; #[ Vdc=Vm*RL/(pi*(rf+RL)) ]Maximum value of a.c voltage required to get a volatge of Vdc from the half-wave rectifier, in V\n", + "Vm=round(Vm,0); \n", + "#Result\n", + "print 'The a.c voltage required should have maximum value of = %d V' %Vm;" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The a.c voltage required should have maximum value of = 162 V\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.16, Page number 95" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt \n", + "from math import pi\n", + "#Variable declaration\n", + "rf=20; #Internal resistance of the diodes in ohm\n", + "Vrms=50; #RMS value of transformer's secondary voltage from centre tap to each end of secondary\n", + "RL=980; #Load resistance in ohm\n", + "\n", + "#Calculation\n", + "Vm=Vrms*sqrt(2); #Maximum a.c voltage in V\n", + "Im=Vm/(rf+RL); #Maximum load current in A\n", + "Im=Im*1000; #Maximum load current in mA\n", + " \n", + "# 1:\n", + "Idc=2*Im/pi; #Mean load current\n", + "\n", + "# 2:\n", + "Irms=Im/sqrt(2); #RMS value of load current in A\n", + "\n", + "#Result\n", + "print 'i:';\n", + "print' The mean load current= %d mA'%Idc;\n", + "print 'ii:';\n", + "print ' The r.m.s value of the load current = %d mA'%Irms; " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i:\n", + " The mean load current= 45 mA\n", + "ii:\n", + " The r.m.s value of the load current = 50 mA\n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.17, Page number 95-96" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt \n", + "#Variable declaration\n", + "RL=100; #Load resistance in ohm \n", + "rf=0; #Internal resistance of the diodes in ohm\n", + "Turns_ratio=5/1; #Primary to secondary turns ratio of transformer \n", + "P_Vrms=230; #R.M.S value of voltage in primary winding in V\n", + "S_Vrms=P_Vrms/Turns_ratio; #R.M.S value of voltage in secondary winding in V\n", + "S_Vm=S_Vrms*sqrt(2); #Maximum voltage across secondary winding in V\n", + "Vm=S_Vm/2; #Maximum voltage across half seconfdary winding in V\n", + "\n", + "\n", + "#Calculation\n", + "# 1:\n", + "Idc=2*Vm/(pi*RL); #Average current in A\n", + "Vdc=Idc*RL; #d.c output voltage in V\n", + "\n", + "# 2:\n", + "PIV=S_Vm; #Peak Invers Voltage(= Maximum secondary voltage) in V\n", + "\n", + "# 3:\n", + "Pac=pow(Vm/(RL*sqrt(2)),2)*(rf+RL); #a.c input power in watt\n", + "Pdc=(pow(Idc,2)*RL); #d.c output power in watt\n", + "R_eff=(Pdc/Pac)*100; #Rectification efficiency\n", + "R_eff=round(R_eff,1);\n", + "\n", + "#Result\n", + "print 'i:';\n", + "print ' The d.c output voltage= %.1f V'%Vdc;\n", + "print 'ii:';\n", + "print ' The peak inverse voltage= %d V'%PIV;\n", + "print 'iii:';\n", + "print ' Rectification efficiency= %.1f%%'%R_eff;" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i:\n", + " The d.c output voltage= 20.7 V\n", + "ii:\n", + " The peak inverse voltage= 65 V\n", + "iii:\n", + " Rectification efficiency= 81.1%\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "NOTE: The value of rectification efficiency is calculated as 81.2% in the textbook using the formula 0.812/(1 + (rf/RL)), but by calculating using the correct values in the formula we get 81.1%." + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.18, Page number 96-97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt \n", + "#Variable declaration\n", + "fin=50; #frequency of input ac source in Hz\n", + "RL=200; #Load resistance in ohm\n", + "Turns_ratio=4/1; #Transformers turns ratio, primary to secondary.\n", + "P_Vrms=230.0; #R.M.S value of voltage in primary winding in V\n", + "S_Vrms=P_Vrms/Turns_ratio #R.M.S value of voltage in secondary winding in V\n", + "Vm=S_Vrms*sqrt(2); #Maximum voltage across secondary winding in V\n", + "\n", + "#Calculation\n", + "# 1:\n", + "Idc=2*Vm/(pi*RL); # Average current in A\n", + "Vdc=Idc*RL; #Output d.c voltage in V\n", + "Vdc=round(Vdc,0);\n", + "# 2:\n", + "PIV= Vm; #Peak Inverse Voltage(= Maximum volutage across secondary winding) in V\n", + "\n", + "# 3:\n", + "fout=2*fin; #Output frequency in Hz\n", + "\n", + "#Result\n", + "print 'i:';\n", + "print ' The d.c output voltage = %d V' %Vdc;\n", + "print 'ii:';\n", + "print ' The peak inverse voltage = %.1f V'%PIV;\n", + "print 'iii:';\n", + "print ' The output frequency = %d Hz'%fout;\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i:\n", + " The d.c output voltage = 52 V\n", + "ii:\n", + " The peak inverse voltage = 81.3 V\n", + "iii:\n", + " The output frequency = 100 Hz\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.19, Page number 97" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "from math import sqrt\n", + "\n", + "#Variable declaration\n", + "RL=100.0; #Load Resistance in ohm\n", + "Turns_ratio=5/1; #Primary to secondary turns ratio of the transformer\n", + "Vin=230.0; #R.M.S value of input voltage in V\n", + "fin=50; #Input frequency in Hz\n", + "\n", + "#Calculation\n", + "Vs_rms=Vin/Turns_ratio; #R.M.S value of the voltage in secondary winding, in v\n", + "Vs_max=Vs_rms*sqrt(2); #Maximum voltage across secondary, in V\n", + "\n", + "# (i)\n", + "#Case i: Centre-tap circuit\n", + "Vm=Vs_max/2; #Maximum voltage across half secondary winding, in V \n", + "Vdc=2*Vm*RL/(pi*RL); #DC output voltage, in V \n", + "print 'The d.c output voltage for the centre-tap circuit = %.1f V'%Vdc;\n", + "\n", + "#Case ii:\n", + "Vm=Vs_max; #Maximum voltage across secondary, in V\n", + "Vdc=2*Vm*RL/(pi*RL); #DC output voltage, in V \n", + "print 'The d.c output voltage for the bridge circuit = %.1f V'%Vdc; \n", + "\n", + "# ii:\n", + "#Case i: Centre-tap circuit\n", + "Turns_ratio=5/1;\n", + "Vs_rms=Vin/Turns_ratio;\n", + "Vs_max=Vs_rms*sqrt(2);\n", + "Vm=Vs_max/2;\n", + "PIV=2*Vm;\n", + "print 'PIV in case of centre-tap circuit = %d V'%PIV;\n", + "\n", + "#Case ii: Bridge circuit\n", + "Turns_ratio=10/1;\n", + "Vs_rms=Vin/Turns_ratio;\n", + "Vs_max=Vs_rms*sqrt(2);\n", + "PIV=Vm;\n", + "print 'PIV in case of bridge circuit = %.1f V'%PIV;\n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The d.c output voltage for the centre-tap circuit = 20.7 V\n", + "The d.c output voltage for the bridge circuit = 41.4 V\n", + "PIV in case of centre-tap circuit = 65 V\n", + "PIV in case of bridge circuit = 32.5 V\n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.20, Page number 98" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import pi\n", + "from math import sqrt\n", + "#Variable declaration\n", + "rf=1; #forward resistance of diodes of the rectifier in ohm\n", + "RL=480; #Load resistance in ohm\n", + "Vrms=240.0; #a.c supply voltage in V\n", + "Vm=Vrms*sqrt(2); #Maximum a.c voltage in V \n", + "\n", + "#Calculation\n", + "# 1:\n", + "Rt=2*rf+RL; #Total circuit resistance at any instance in ohm\n", + "Im=Vm/Rt; #Maximum load current in A\n", + "Idc=2*Im/pi; #Mean load current in A\n", + "\n", + "# 2:\n", + "Irms=Im/2; #R.M.S value of current in A\n", + "P=pow(Irms,2)*rf; #Power dissipated in each diode in watt\n", + "\n", + "\n", + "#Result\n", + "print 'i:';\n", + "print ' Mean load current = %.2f A'%Idc;\n", + "print 'ii:';\n", + "print ' Power dissipated in each diode= %.3f W'%P;" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i:\n", + " Mean load current = 0.45 A\n", + "ii:\n", + " Power dissipated in each diode= 0.124 W\n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "NOTE: The value of power dissipated is approximately 0.124 W , but in the textbook it is approximated as 0.123W." + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.21, Page number 98-99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from math import sqrt,pi\n", + "#Variable declaration\n", + "RL=12000; #Load resistance in ohm\n", + "V0=0.7; #Potential barrier voltage of diodes in V\n", + "Vrms=12; #R.M.S value of input a.c voltage in V\n", + "Vs_pk=Vrms*sqrt(2); #Peak secondary voltage in V\n", + "\n", + "#Calculation\n", + "# 1:\n", + "Vout_pk=Vs_pk-(2*V0); #Peak output voltage in V\n", + "Vav=2*Vout_pk/pi; #Average output voltage in V\n", + "Vav=round(Vav,2);\n", + "\n", + "# 2:\n", + "Iav=Vav/RL; #Average output current in A\n", + "Iav=Iav*pow(10,6); #Average output current in \u03bcA\n", + "\n", + "\n", + "#Result\n", + "print 'i:';\n", + "print ' Average output voltage=%.2f V'%Vav;\n", + "print 'ii:';\n", + "print ' Average output current=%.1f \u03bcA'%Iav;\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i:\n", + " Average output voltage=9.91 V\n", + "ii:\n", + " Average output current=825.8 \u03bcA\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.22, Page number 102" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Vdc_A=10; #Supply voltage of A in V\n", + "Vdc_B=25; #Supply voltage of B in V\n", + "Vac_rms_a=0.5; #Ripples in power supply A in V\n", + "Vac_rms_b=0.001; #Ripples in power supply B in V\n", + "\n", + "#Calculation\n", + "#For power supply A\n", + "ripple_factor_A=Vac_rms_a/Vdc_A; #Ripple factor of power supply A\n", + "\n", + "#For power supply B\n", + "ripple_factor_B=Vac_rms_b/Vdc_B; #Ripple factor of power supply B\n", + "\n", + "#Result\n", + "if(ripple_factor_AVz):\n", + " #Zener diode is in ON state\n", + " # i:\n", + " Output_voltage=Vz; #Voltage across load resistance, in V\n", + " #ii:\n", + " Voltage_R=Ei-Vz; #Voltage across the series resistance R, in V\n", + " #iii:\n", + " IL=Vz/RL; #Load current through RL in A\n", + " IL=IL*1000; #Load current through RL in mA\n", + " I=Voltage_R/R; #Current through the series resistance in A\n", + " I=I*1000; #Current through the series resistance in mA\n", + " Iz=I-IL; #Applying Kirchhoff's first law, Zener current in mA\n", + " \n", + " #Result\n", + " print 'i) The output voltage across the load resistance RL = %d V'%Output_voltage;\n", + " print 'ii) The voltage drop across the series resistance R = %d V'%Voltage_R;\n", + " print 'iii) The current through the zener diode = %d mA'%Iz;\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) The output voltage across the load resistance RL = 50 V\n", + "ii) The voltage drop across the series resistance R = 70 V\n", + "iii) The current through the zener diode = 9 mA\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.26, Page number 114-115" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Max_V=120.0; #Maximum input voltage in V\n", + "Min_V=80.0; #Minimum input voltage in V\n", + "R=5000.0; #Series resistance in ohm\n", + "RL=10000.0; #Load resistance in ohm\n", + "Vz=50.0; #Zener voltage in V\n", + "\n", + "\n", + "#Calculation\n", + "#Case i: Maximum zener current\n", + "#Zener current will be maximum when the input voltage is maximum\n", + "V_R_max=Max_V-Vz; #Voltage across series resistance R, in V\n", + "I_max=V_R_max/R; #Current through series resistance R, in A\n", + "I_max=I_max*1000; #Current through series resistance R, in mA\n", + "IL_max=Vz/RL; #Load current in A\n", + "IL_max=IL_max*1000; #Load current in mA\n", + "Iz_max=I_max-IL_max; #Applying Kirchhoff's first law, Zener current in mA;\n", + "\n", + "#Case ii: Minimum zener current\n", + "#The zener will conduct minimum current when the input voltage is minimum\n", + "V_R_min=Min_V-Vz; #Voltage across series resistance R, in V\n", + "I_min=V_R_min/R; #Current through series resistance R, in A\n", + "I_min=I_min*1000; #Current through series resistance R, in mA\n", + "IL_min=Vz/RL; #Load current in A\n", + "IL_min=IL_min*1000; #Load current in mA\n", + "Iz_min=I_min-IL_min; #Applying Kirchhoff's first law, Zener current in mA\n", + "\n", + "#Result\n", + "print 'Case i: ';\n", + "print 'Maximum zener current = %d mA'%Iz_max;\n", + "print 'Case ii: ';\n", + "print 'Minimum zener current = %d mA'%Iz_min;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Case i: \n", + "Maximum zener current = 9 mA\n", + "Case ii: \n", + "Minimum zener current = 1 mA\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.27, Page number 115" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Ei=12; #Input voltage in V\n", + "Vz=7.2; #Zener voltage in V\n", + "E0=Vz; #Voltage to be maintained across the load in V\n", + "IL_max=0.1; #Maximum load current in A\n", + "IL_min=0.012; #Minimum load current in A\n", + "Iz_min=0.01; #Minimum zener current in A\n", + "\n", + "#Calculation\n", + "#When the load current is maximum at minimum value of RL, the zener current is minimum and, as the load current decreases due to increase in value of RL\n", + "R=(Ei-E0)/(Iz_min+IL_max); #The value of series resistance R to maintain a voltage=E0 across load, in ohm\n", + "\n", + "#Result\n", + "print 'The minimum value of series resistance R to maintain a constant value of 7.2 V is = %.1f \u03a9'%R;" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The minimum value of series resistance R to maintain a constant value of 7.2 V is = 43.6 \u03a9\n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "NOTE: The actual value of R is 43.636363 (recurring) but, in the textbook the value of R is wrongly approximated 43.5 \u03a9" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.28, Page number 115" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Ei_min=22; #Minimum input voltage in V\n", + "Ei_max=28; #Maximum input voltage in V\n", + "Vz=18; #Zener voltage in V\n", + "E0=Vz; #Constant voltage maintained across the load resistance in V\n", + "Iz_min=0.2; #Minimum zener current in A\n", + "Iz_max=2; #Maximum zener current in A\n", + "RL=18; #Load resistance in \u03a9\n", + "\n", + "#Calculation\n", + "IL=Vz/RL; #Constant value of load current in A\n", + "#When the input voltage is minimum, the zener current will be minimum\n", + "R=(Ei_min-E0)/(Iz_min+IL) #The value of series resistance so that the voltage E0 across RL remains constant\n", + "\n", + "print 'The value of series resistance R, to maintain constant voltage E0 across RL = %.2f \u03a9.'%R;" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of series resistance R, to maintain constant voltage E0 across RL = 3.33 \u03a9.\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.29, Page number 116 " + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Vz=10 #Zener voltage in V\n", + "Ei_min=13; #Minimum input voltage in V\n", + "Ei_max=16; #Maximum input voltage in V\n", + "Iz_min=0.015; #Minimum zener current in A\n", + "IL_min=0.01; #Minimum load current in A \n", + "IL_max=0.085; #Maximum load curremt in A\n", + "E0=Vz; #Constant voltage to be maintained in V \n", + "\n", + "#Calculation\n", + "#The zener current will be minimum when the input voltage will be minimum and at that time the load current will be maximum\n", + "R=(Ei_min-E0)/(Iz_min+IL_max); #The value of series resistance R to maintain a constant voltage across load\n", + "\n", + "\n", + "#Result\n", + "print 'The value of series resistance to maintain a constant voltage across the load resistance is = %d \u03a9'%R;" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The value of series resistance to maintain a constant voltage across the load resistance is = 30 \u03a9\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.30, Page number 116" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Iz=0.2; #Current rating of each zener in A\n", + "Vz=15; #Voltage rating of each zener in V\n", + "Ei=45; #Input voltage in V\n", + "\n", + "#Calculation\n", + "# i: Regulated output voltage across the two zener diodes \n", + "E0=2*Vz; # V\n", + "\n", + "# ii: Value of series resistance \n", + "R=(Ei-E0)/Iz; # \u03a9\n", + "\n", + "#Result\n", + "print 'i) The regulated output voltage = %d V'%E0;\n", + "print 'ii) The value of the series resistance = %d \u03a9'%R;" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "i) The regulated output voltage = 30 V\n", + "ii) The value of the series resistance = 75 \u03a9\n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.31, Page number 116-117" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Vz=10; #Voltage rating of each zener in V\n", + "Iz=1; #Current rating of each zener in A\n", + "Ei=45; #Input unregulated voltage in V\n", + "\n", + "#Calculation\n", + "#Regulated output voltage across the three zener diodes\n", + "E0=3*Vz; # V\n", + "\n", + "#Value of series resistance to obtain a 30V regulated output voltage\n", + "R=(Ei-E0)/Iz; # \u03a9\n", + "\n", + "#Result\n", + "print 'Value of series resistance to obtain a 30V regulated output voltage = %d \u03a9'%R;" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of series resistance to obtain a 30V regulated output voltage = 15 \u03a9\n" + ] + } + ], + "prompt_number": 29 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.32, Page number 117" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#variable declaration\n", + "RL=2000.0; #Load resistance in \u03a9\n", + "R=200.0; #Series resistance in \u03a9\n", + "Iz=0.025; #Zener current rating in A\n", + "E0=30.0; #Output regulated voltage in V \n", + "\n", + "#Calculation\n", + "#Minimum input voltage will be required when Iz=0 A, and at this condition\n", + "IL=E0/RL; #Load current during Iz=0, in A\n", + "I=IL; #According to Kirchhoff's law, total current, in A\n", + "Ei_min=E0+(I*R); #Minimum input voltage in V\n", + "\n", + "#The maximum input voltage required will be when Iz=0.025 A, and at that condition \n", + "I=IL+Iz; #According to Kirchhoff's law, total current, in A\n", + "Ei_max=E0+(I*R); #maximum input voltage in V\n", + "\n", + "\n", + "#Result\n", + "print 'The required range of input voltage is from %d V to %d V'%(Ei_min,Ei_max); \n", + "\n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The required range of input voltage is from 33 V to 38 V\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.33, Page number 117-118" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Ei=16; #Unregulated input voltage in V\n", + "E0=12; #Output regulated voltage in V\n", + "IL_min=0; #Minimum load current in A\n", + "IL_max=0.2; #Maximum load current in A\n", + "Iz_min=0; #Minimum zener current in A\n", + "Iz_max=0.2; #Maximum zener current in A\n", + "\n", + "#Calculation\n", + "#As the regulated voltage required across the load is 12V\n", + "Vz=E0; #Voltage rating of zener diode in V\n", + "V_R=Ei-E0; #Constant Voltage that should remain across series resistance \n", + "#The minimum zener current will occur when the curent in the load in maximum\n", + "R=V_R/(Iz_min+IL_max); #Series resistance in \u03a9\n", + "\n", + "Max_power_rating=Vz*Iz_max; #Maximum power rating of zener diode in W\n", + "\n", + "#Result\n", + "print 'The regulator is designed using a Seris resistance of %d \u03a9 and a zener diode of zener voltage %d V'%(R,Vz);\n", + "print 'The maximum power rating of the zener diode is = %.1f W '%Max_power_rating;" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "The regulator is designed using a Seris resistance of 20 \u03a9 and a zener diode of zener voltage 12 V\n", + "The maximum power rating of the zener diode is = 2.4 W \n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.34, Page number 118" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "V=12; #Source voltage in V\n", + "R=1000; #Series resistance in \u03a9\n", + "RL=5000; #Load resistance in \u03a9\n", + "Vz=6; #Voltage rating of zener in V\n", + "\n", + "#Calculation\n", + "#Case i: zener is working properly\n", + "#The output voltage across the load will be equal to the zener voltage.\n", + "V0=Vz; # V\n", + "\n", + "#Result\n", + "print 'Case i: Output voltage when zener is working properly is %d V'%V0;\n", + "\n", + "#Case ii: zener is shorted\n", + "#As the zener is shorted, the potential difference across the load will be zero\n", + "V0=0; #V\n", + "\n", + "#Result\n", + "print 'Case ii: Output voltage when zener is short circuited is %d V'%V0;\n", + " \n", + "#Case iii: zener is open circuited\n", + "#If the zener is open circuited, the total voltage will drop across R and RL according to the voltage divider rule\n", + "V0=V*RL/(R+RL); #V\n", + "\n", + "#Result\n", + "print 'Case iii: Output voltage when zener is open circuited is %d V'%V0;\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Case i: Output voltage when zener is working properly is 6 V\n", + "Case ii: Output voltage when zener is short circuited is 0 V\n", + "Case iii: Output voltage when zener is open circuited is 10 V\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file -- cgit