From 37d315828bbfc0f5cabee669d2b9dd8cd17b5154 Mon Sep 17 00:00:00 2001 From: hardythe1 Date: Wed, 17 Jun 2015 11:14:34 +0530 Subject: add books --- .../chapter1.ipynb | 1596 ++++++++++++++++++++ 1 file changed, 1596 insertions(+) create mode 100755 Electronic_Devices_and_Circuits_By_I.JNagrath/chapter1.ipynb (limited to 'Electronic_Devices_and_Circuits_By_I.JNagrath/chapter1.ipynb') diff --git a/Electronic_Devices_and_Circuits_By_I.JNagrath/chapter1.ipynb b/Electronic_Devices_and_Circuits_By_I.JNagrath/chapter1.ipynb new file mode 100755 index 00000000..41def6eb --- /dev/null +++ b/Electronic_Devices_and_Circuits_By_I.JNagrath/chapter1.ipynb @@ -0,0 +1,1596 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:a9ed36d73f9d154839d703d9a4c0fe9425b38f6baf4e4351a575d82599eff181" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 1: SEMICONDUCTORS,DIODE AND DIODE CIRCUITS" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.1, Page number 5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "A=6.022*10**23 #avagadro's number(/m^3)\n", + "d=2.7*10**6 #density of aluminium conductor(g/m^3)\n", + "a=26.98 # atomic weight aluminium conductor(g/g-atom)\n", + "D=10**4. #current density(A/m^2)\n", + "e=1.6*10**-19 #electronic charge(C)\n", + "\n", + "#Calculations\n", + "#Part a\n", + "n=A*d/a #number of atoms(n/m^3)\n", + "\n", + "#Part b\n", + "u=D/(n*e) #drift velocity (m/s)\n", + "\n", + "#Results\n", + "print \"number of atoms per cubic meter is \",round(n/1e+28,3),\"*10^28 /m^3\"\n", + "print \"drift velocity is\",round(u/1e-6,2),\"*10^-6 m/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "number of atoms per cubic meter is 6.026 *10^28 /m^3\n", + "drift velocity is 1.04 *10^-6 m/s\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.2, Page number 6" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "n=10**23 #number of electrons(n/m^3)\n", + "e=1.6*10**-19 #electronic charge(C) \n", + "u=0.4 #mobility(m^2/Vs) \n", + "a=10**-7 #cross sectional area(m^2) \n", + "l=15*10**-2 #conductor length(m)\n", + "\n", + "#Calculations\n", + "#Part a\n", + "G=n*e*u #conductivity(S/m)\n", + "\n", + "#Part b\n", + "R=l/(a*G) #resistance(ohm)\n", + "\n", + "#Results\n", + "print\"conductivity of the conductor is\",round((G/1E+3),1),\"*10**3 S/m\"\n", + "print\"resistance of the conductor is\",round(R,1),\"ohm\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "conductivity of the conductor is 6.4 *10**3 S/m\n", + "resistance of the conductor is 234.4 ohm\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.3, Page number 9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "A=6.022*10**23 #avagadro's number\n", + "d=5.32*10**6 #density of Ge at 300k(g/m^3)\n", + "a=72.60 #atomic weight of Ge(g/g-atom)\n", + "e=1.6*10**-19 #electronic charge(C)\n", + "ni=2.4*10**19 #intrinsic concentration(electron-hole pairs/m^3)\n", + "un=0.39 #electron mobility(m^2/V.s)\n", + "up=0.19 #hole mobility(m^2/V.s)\n", + "\n", + "#Calculations\n", + "#Part a\n", + "nA=A*d/a #number of atoms(nA/m^3)using avagadro's law\n", + "x=nA/ni #Germanium atoms/electron hole pair\n", + "\n", + "#Part b\n", + "g=(un+up)*e*ni #intrinsic conductivity(S/m)\n", + "r=1/g #intrinsic resistivity(ohm.m)\n", + "\n", + "#Results\n", + "print\"the relative concentration of Ge and electron hole pairs is\",round((x/1E9),2),\"*10^9 atoms/electron-hole pair\"\n", + "print\"the intrinsic resistivity of Ge is\",round(r,3),\"ohm.m\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the relative concentration of Ge and electron hole pairs is 1.84 *10^9 atoms/electron-hole pair\n", + "the intrinsic resistivity of Ge is 0.449 ohm.m\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.4,Page number 13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "ni=1.5*10**16 #intrinsic concentration(electron-hole pairs/m^3)\n", + "n=4.99*10**28 #number of Si atoms(atoms/m^3)\n", + "un=0.13 #electron mobility(m^2/V.s)\n", + "up=0.05 #hole mobility(m^2/V.s)\n", + "e=1.6*10**-19 #electronic charge(c)\n", + "\n", + "#Calculation\n", + "#Part a\n", + "g=e*ni*(un+up) #intrinsic conductivity(S/m)\n", + "r=1/g #interinsic resistivity(ohm.m)\n", + "Nd=n/10**8 #doped silicon(atoms/m^3)=nn,majority carriers\n", + "pn=ni**2/Nd #minority carrier density(holes/m^3)\n", + "\n", + "#Part b\n", + "k=e*un*Nd #conductivity(S/m)\n", + " #using Nd in place of nn as Nd=nn\n", + "rho=1/k #resistivity(ohm.m)\n", + "\n", + "#Results\n", + "print\"the minority carrier density of Si is\",round(pn/1e+11,2),\"*10^11 holes/m^3\"\n", + "print\"the resistivity of Si is\",round((rho/1E-2),2),\"*10**-2 ohm.m\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the minority carrier density of Si is 4.51 *10^11 holes/m^3\n", + "the resistivity of Si is 9.63 *10**-2 ohm.m\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.5,Page number 17" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "Vo=0.7 #contact potential(V)\n", + "Vf=0.4 #forward biasing voltage(V) \n", + "\n", + "#Calculation\n", + "x=math.exp(-20*(Vo-Vf))/math.exp(-20*Vo) #increase in probability of majority carriers\n", + "\n", + "#Result\n", + "print\"increase in probability of majority carriers is\",round(x),\"times\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "increase in probability of majority carriers is 2981.0 times\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.6,Page number 18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "I=10 #Ge diode carries current(mA)\n", + "V=0.2 #forward bias voltage(V)\n", + "\n", + "#Calculation\n", + "#Part a\n", + "Is=I/(math.expm1(40*V)-1) #reverse current(mA)\n", + "\n", + "#part b\n", + "I1=1*10**-3 #current(mA) \n", + "V1=(math.log((I1/Is)+1))/40 #voltage(V)\n", + "I2=100*10**-3 #current(mA) \n", + "V2=(math.log((I2/Is)+1))/40 #voltage(V) \n", + "\n", + "#Part c\n", + "Is1=4*Is #reverse saturation current doubles for every 10 degree celcius temp rise,so for 20 degree rise it will be 4 timese/ \n", + "x=37.44 #let x=e/kT\n", + "I3=Is1*(math.expm1(x*V)) #current when temp doubles(mA)\n", + "\n", + "#Results\n", + "print\"the reverse current is\",round(Is/1e-3,3),\"mA\" #incorrect units given in the textbook\n", + "print\"bias voltages are\",round(V1,3),\"V and\", round(V2,3),\"V resp\"\n", + "print\"Is at 20 degree is\",round(Is1/1e-3,2),\"uA and diode current at 0.2 V is\",round(I3,2),\"mA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the reverse current is 3.357 mA\n", + "bias voltages are 0.007 V and 0.086 V resp\n", + "Is at 20 degree is 13.43 uA and diode current at 0.2 V is 23.97 mA\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.7,Page number 21" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "V=3. #Voltage(V)\n", + "Req=300. #total resistance as per circuit(ohm)\n", + "Rfa=20 #forward resistance(ohm) \n", + "Vt=0.7 #Thevinine's voltage(V)\n", + "Rfb=0 #forward resistance(ohm)\n", + "\n", + "#Calculations\n", + "#Part a\n", + "I=V/Req #current(A)\n", + "\n", + "#Part b\n", + "Id=(V-Vt)/Req #diode current(mA)\n", + "\n", + "#Part c\n", + "Rf=20 #forward resistance(ohms) \n", + "Id1=(V-Vt)/(Req+Rfa) #diode current(mA)\n", + "\n", + "#Results\n", + "print\"current in this case is\",round(I,2),\"A\"\n", + "print\"diode current is\",round((Id/1E-3),2),\"mA\"\n", + "print\"diode current is\",round((Id1/1E-3),2),\"mA\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "current in this case is 0.01 A\n", + "diode current is 7.67 mA\n", + "diode current is 7.19 mA\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.9,Page number 22" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Vx=1.4 #voltage at point X(V) \n", + "Vt=0.7 #diode voltage(V)\n", + "Vcc=5 #cathode voltage(V) \n", + "R=1 #circuit resistance(ohm) \n", + "Vs=Vx-Vt #supply voltage(V)\n", + "\n", + "#Calculations\n", + "I1=(Vcc-Vt-Vs)/R #current throgh D1(mA) for 00.7 as D2 and D3 conducts\n", + "\n", + "#Results\n", + "print\"I1 for 00.7 is\",I1,\"mA\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "I1 for 00.7 is 3.6 mA\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.11,Page number 23" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Vz=100 #zener voltage(V)\n", + "Rz=25 #diode resistance(ohm)\n", + "Il=0.05 #load current(A)\n", + "Iz=0.01 #zener diode current(A)\n", + "Rs=250 #supply resistance(ohm)\n", + "\n", + "#Calculations\n", + "Vl=Vz+(Iz*Rz) #load voltage(V)\n", + "Vs=Vl+(Il+Iz)*Rs #supply voltage(V)\n", + "VL=Vl*1.01 #increase in Vl(V)\n", + "IZ=(VL-Vz)/Rz #increase in zener current\n", + "VS=Vl+(Il+IZ)*Rs #increase in supply voltage(V)\n", + "Vss=(VS-Vs)/Vs #%increase in supply voltage(V)\n", + "P=Il*VL #power consumed(W) \n", + "\n", + "#Results\n", + "print\"load voltage is\",Vl,\"V\"\n", + "print\"supply voltage is\",Vs,\"V\"\n", + "print\"increase in supply voltage is\",VS,\"V\"\n", + "print\"power consumed is\",round(P,2),\"W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + " load voltage is 100.25 V\n", + "supply voltage is 115.25 V\n", + "increase in supply voltage is 125.275 V\n", + "power consumed is 5.06 W\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.12,Page number 25" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Vbb=5 #bias voltage(V)\n", + "Rl=1 #resistance(ohm)\n", + "Id=4.4 #from the figure(mA)\n", + "\n", + "#Part a\n", + "i=Vbb/Rl #load line intercepts the Id axis at i(mA)\n", + "Vl=Id*Rl #load voltage(V)\n", + "\n", + "#Part b\n", + "Vd=Vbb-Vl #diode voltage(V)\n", + "P=Vd*Id #power absorbed in diode(mW)\n", + "\n", + "#Part c \n", + "Ida=1.42 #diode current(mA)for 2V\n", + "Idb=7.35 #diode current(mA)for 8V\n", + "\n", + "#Part d\n", + "Idc=8.7 #diode current(mA)for Rl=0.5k ohm \n", + "Idd=2.2 #diode current(mA)for Rl=2k ohm\n", + "\n", + "#Results\n", + "print\"diode current is\",Id,\"mA and voltage across the load is\",Vl,\"V\"\n", + "print\"power absorbed in diode is\",P,\"mW\"\n", + "print\"diode current for Vbb=2V is\",Ida,\"mA\",\"and for Vbb=8V is\",Idb,\"mA\"\n", + "print\"diode current for Rl=0.5kohm is\",Idc,\"mA\",\"and for Rl=2kohm is\",Idd,\"mA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "diode current is 4.4 mA and voltage across the load is 4.4 V\n", + "power absorbed in diode is 2.64 mW\n", + "diode current for Vbb=2V is 1.42 mA and for Vbb=8V is 7.35 mA\n", + "diode current for Rl=0.5kohm is 8.7 mA and for Rl=2kohm is 2.2 mA\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.13,Page number 38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "T=300 #temperature(k)\n", + "Ig=100*10**-3 #current(mA)\n", + "Is=1*10**-9 #current(nA)\n", + "x=0.0259 #x=kT/e\n", + "\n", + "#Calculations\n", + "Voc=x*math.log(Ig/Is+1) #as Voc=kT/e*ln((Ig/Is)+1) where ln((Ig/Is)+1)=18.42 after solving \n", + "Isc=Ig\n", + "\n", + "#Result\n", + "print\"for a solar cell Voc is\",round(Voc,3),\"V and Isc is\",round(Isc/1E-3),\"mA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "for a solar cell Voc is 0.477 V and Isc is 100.0 mA\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.14,Page number 38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "Idc=0.1 #dc current(A)\n", + "Rf=0.5 #forward resistance(ohms)\n", + "Rl=20 #load resistance(ohm)\n", + "Rs=1 #secondary resistance of transformer(ohm)\n", + "\n", + "#Calculations\n", + "#Part a\n", + "Vdc=Idc*Rl #dc voltage(V)\n", + "Vm=(math.pi/2)*(Vdc+Idc*(Rs+Rf)) #mean voltage(V)\n", + "Vrms=Vm/math.sqrt(2) #rms value of voltage(V) \n", + "\n", + "#Part b\n", + "Pdc=Idc**2*Rl #dc power supplied to the load\n", + "\n", + "#Part c\n", + "PIV=2*Vm #PIV rating for each diode(V)\n", + "\n", + "#Part d\n", + "Im=(math.pi/2)*Idc #peak value of current(mA)\n", + "Irms=Im/math.sqrt(2) #rms calue of current(A)\n", + "Pac=Irms**2*(Rs+Rf+Rl) #ac power input(W)\n", + "\n", + "#Part e\n", + "eta=(Pdc/Pac)*100 #conversion efficiency\n", + "\n", + "#Part f\n", + "Vr=((Rs+Rf)/Rl)*100 #voltage regulation(V)\n", + "\n", + "#results\n", + "print\"rms value of voltage is\",round(Vrms,2),\"V\"\n", + "print\"dc power supplied to load is\",Pdc,\"W\"\n", + "print\"PIV rating for each diode\",round(PIV,2),\"V\"\n", + "print\"ac input power is\",round(Pac,3),\"W\"\n", + "print\"conversion efficiency\",round(eta,1),\"%\"\n", + "print\"voltage regulation\",Vr,\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "rms value of voltage is 2.39 V\n", + "dc power supplied to load is 0.2 W\n", + "PIV rating for each diode 6.75 V\n", + "ac input power is 0.265 W\n", + "conversion efficiency 75.4 %\n", + "voltage regulation 7.5 %\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.15,Page number 46" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "from scipy import integrate\n", + "\n", + "#Variable declaration\n", + "Vt=1 \n", + "Vl=12\n", + "Vm=63.63 #peak voltage(V) as Vm=sqr root of 2*45\n", + "Idc=8. #charging current(A)\n", + "\n", + "#Calculations\n", + "#Part a\n", + "theta1=math.degrees(math.asin((Vt+Vl)/Vm))\n", + "theta2=180-theta1\n", + "Rl=((2*Vm*math.cos(theta1))-(2*(math.pi-2*theta1)*(Vt+Vl)))/(Idc*math.pi)\n", + "\n", + "#Part b\n", + "wt = lambda wt: (((((math.sqrt(2)*45*math.sin(wt))-(Vt+Vl))/Rl)*wt)**2)\n", + "integ,err = integrate.quad(wt, theta1 , theta2)\n", + "print integ\n", + "Irms = (integ/math.pi)**0.5\n", + "Pl=Irms**2*Rl #power loss in resistance(W)\n", + "\n", + "#Part c\n", + "P=Vl*Idc #power supplied to battery(W)\n", + "\n", + "#results\n", + "print\"Resistance to be added is\",round(Rl,2),\"Ohms\"\n", + "print\"\",Pl\n", + "print\"power supplied to battery is\",P,\"W\"\n", + "print\"\",Irms " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "5703935.44277\n", + "Resistance to be added is 24.75 Ohms\n", + " 44936628.7032\n", + "power supplied to battery is 96.0 W\n", + " 1347.44908683\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.16,Page number 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "Rf=5 #forward resistance(ohms)\n", + "Vo=20 #output voltage(V)\n", + "Rs=10 #secondary resistance of transformer(ohm)\n", + "\n", + "#Calculations\n", + "#Part a\n", + "Idc=0.1 #dc current(A) \n", + "Vm=Vo*(math.sqrt(2)) #mean voltage(V)\n", + "Vdc=(2*Vm/(math.pi))-Idc*(Rs+2*Rf) #dc voltage(V)\n", + "\n", + "#Part b\n", + "Idc1=0.2 #full load dc current(A)\n", + "Vdc2=((2*(math.sqrt(2))*Vo)/(math.pi))-Idc1*(Rs+2*Rf) #full load dc voltage(V)\n", + "Rl=Vdc2/Idc1 #load resistance(ohm)\n", + "x=((2*Rf+Rs)/Rl)*100 #% regulation \n", + "\n", + "#Part c\n", + "Idc=0.2 #dc current(A)\n", + "Im=(math.pi)*Idc/2 #peak current(mA)\n", + "Ilrms=Im/math.sqrt(2) #rms current(mA)\n", + "Vlrms=Ilrms*Rl #load rms voltage(V) \n", + "\n", + "#Part d\n", + "Vldc=14 #load dc voltage(V)\n", + "Vlacrms=math.sqrt(Vlrms**2-Vldc**2) #rms value of ac component(V)\n", + "\n", + "#Results\n", + "print\"dc voltage\",round(Vdc),\"V\"\n", + "print\"regulation is\",round(x,2),\"%\"\n", + "print\"rms value of output voltage at dc load current is\",round(Vlrms,2),\"V\"\n", + "print\"rms value of ac component of voltage\",round(Vlacrms,2),\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "dc voltage 16.0 V\n", + "regulation is 28.56 %\n", + "rms value of output voltage at dc load current is 15.56 V\n", + "rms value of ac component of voltage 6.78 V\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.17,Page number 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Vh=60. #higher output voltage(V)\n", + "Vl=45. #lower output voltage(V) \n", + "fz=50. #frequency(Hz)\n", + "Vr=15. #peak to peak ripple voltage(V)\n", + "Rl=600. #resistance(ohms)\n", + " \n", + "#Calculations\n", + "Vldc=(Vh+Vl)/2 #avg load dc voltage(V) as voltage drops from 60 to 45\n", + "Idc=Vldc/Rl #dc current(A)\n", + "T=1/fz #discharging time(ms)\n", + "C=(Idc*T)/Vr #linear discharge rate(uF)\n", + "C1=C*2 #new capacitance(uF)\n", + "'''\n", + " CVr(p-p) 234Vr(p-p)*10^3\n", + "Idc = -------------- = --------------- ----(1)\n", + " T 20\n", + " \n", + " 60+[60-Vr(p-p) 120-Vr(p-p)\n", + "Idc = --------------- = ------------*1000 ----(2)\n", + " 2Rl 2*600\n", + " \n", + "Equating equations 1 & 2, we get, \n", + "'''\n", + "\n", + "Vr1 = (20*120*1000)/(1200*254)\n", + "Idc1=(Vh-(Vr1/2))/Rl #dc load current(mA)\n", + "\n", + "#Results\n", + "print\"value of capacitance is\",round(C/1E-6),\"uF\" \n", + "print\"Vr1 is\",Vr1,\"V\" \n", + "print\"dc load current Idc is\",round(Idc1/1E-3),\"mA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "value of capacitance is 117.0 uF\n", + "Vr1 is 7 V\n", + "dc load current Idc is 95.0 mA\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.18,Page number 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "Vdc=30 #dc voltage(V)\n", + "V1=220 #source voltage(V)\n", + "f=50 #frequency(Hz)\n", + "Rl=1000 #load resistance(k ohms)\n", + "\n", + "#Calculations\n", + "C=100/f*Rl #as Vdc/Vr=100\n", + "Vm=Vdc+(Vr/2) #peak voltage(V)\n", + "V2=Vm/(math.sqrt(2)) #secondary voltage(V)\n", + "r=V1/V2 #transformer turn ratio\n", + "\n", + "#Results\n", + "print\"capacitor filtor is\",C,\"uF\"\n", + "print\"transformer turn ratio is\",round(r,2),\"\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "capacitor filtor is 2000 uF\n", + "transformer turn ratio is 10.37 \n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.19,Page number 52" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "Idc=60*10**-3 #dc current(A)\n", + "Vm=60 #peak volage(V)\n", + "f=50 #frequency(Hz)\n", + "C=120*10**-6 #capacitance(F)\n", + "\n", + "#Calculations\n", + "#Part a\n", + "Vrms=Idc/(4*(math.sqrt(3))*f*C*Vm) #rms voltage(V)\n", + "Vr=2*(math.sqrt(3))*Vrms #ripple factor(V)\n", + "\n", + "#Part b\n", + "Vdc=Vm-(Vr/2) #by simplifying\n", + "\n", + "#Part c\n", + "r=(Vrms/Vdc)*100 #ripple factor\n", + "\n", + "#Results\n", + "print\"ripple factor is\",round(Vr,3),\"Vdc\"\n", + "print\"dc voltage is\",round(Vdc),\"V\"\n", + "print\"ripple factor\",round(r,4),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "ripple factor is 0.083 Vdc\n", + "dc voltage is 60.0 V\n", + "ripple factor 0.0401 %\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 1.20,Page number 54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Calculations\n", + "#Part a\n", + "''' 200*1.141 4\n", + "v1(t)=-------------(1- - cos628t) \n", + " 3.14 3\n", + " 200*1.141 800*1.141 \n", + "v2(t)=----------- - ------------ cos(628t+<(V2/V1))\n", + " 3.14 3*3.14\n", + "\n", + "V2/V1|w=0 =0.8;V2/V1|w=628 =6.43*10^-4