From afcd9e5397e3e1bde0392811d0482d76aac391dc Mon Sep 17 00:00:00 2001 From: hardythe1 Date: Wed, 17 Jun 2015 11:14:34 +0530 Subject: add books --- .../chapter1.ipynb | 1596 ++++++++++++++++++++ .../chapter10.ipynb | 455 ++++++ .../chapter11.ipynb | 170 +++ .../chapter2.ipynb | 567 +++++++ .../chapter3.ipynb | 1548 +++++++++++++++++++ .../chapter4.ipynb | 1219 +++++++++++++++ .../chapter5.ipynb | 653 ++++++++ .../chapter6.ipynb | 545 +++++++ .../chapter7.ipynb | 645 ++++++++ .../chapter8.ipynb | 435 ++++++ .../chapter9.ipynb | 189 +++ .../screenshots/screen1.png | Bin 0 -> 71886 bytes .../screenshots/screen2.png | Bin 0 -> 90552 bytes .../screenshots/screen3.png | Bin 0 -> 74523 bytes 14 files changed, 8022 insertions(+) create mode 100755 Electronic_Devices_and_Circuits_By_I.JNagrath/chapter1.ipynb create mode 100755 Electronic_Devices_and_Circuits_By_I.JNagrath/chapter10.ipynb create mode 100755 Electronic_Devices_and_Circuits_By_I.JNagrath/chapter11.ipynb create mode 100755 Electronic_Devices_and_Circuits_By_I.JNagrath/chapter2.ipynb create mode 100755 Electronic_Devices_and_Circuits_By_I.JNagrath/chapter3.ipynb create mode 100755 Electronic_Devices_and_Circuits_By_I.JNagrath/chapter4.ipynb create mode 100755 Electronic_Devices_and_Circuits_By_I.JNagrath/chapter5.ipynb create mode 100755 Electronic_Devices_and_Circuits_By_I.JNagrath/chapter6.ipynb create mode 100755 Electronic_Devices_and_Circuits_By_I.JNagrath/chapter7.ipynb create mode 100755 Electronic_Devices_and_Circuits_By_I.JNagrath/chapter8.ipynb create mode 100755 Electronic_Devices_and_Circuits_By_I.JNagrath/chapter9.ipynb create mode 100755 Electronic_Devices_and_Circuits_By_I.JNagrath/screenshots/screen1.png create mode 100755 Electronic_Devices_and_Circuits_By_I.JNagrath/screenshots/screen2.png create mode 100755 Electronic_Devices_and_Circuits_By_I.JNagrath/screenshots/screen3.png (limited to 'Electronic_Devices_and_Circuits_By_I.JNagrath') 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 >2 kohms,it it ignored)\n", + "Vl=(beeta+1)*Ib1*R #load voltage(V)\n", + "Avl=Vl #Voltage gain\n", + "Il=Vl/Rl #load current(A)\n", + "Ail=Il/Is #current gain\n", + "\n", + "#Results\n", + "print\"overall voltage gain is\",round((Avl/1E+3),2)\n", + "print\"overall current gain is\",round(Ail/1E+3)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "overall voltage gain is 51.5\n", + "overall current gain is 2575.0\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 3.31,Page number 202" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Vcc=15 #supply voltage(V)\n", + "beeta=30 #current gain \n", + "R=.47 #emitter resistance(ohms) \n", + "Vbe=0.7 #base to emitter voltage(V)\n", + "Vo=5 #output voltage(V)\n", + "\n", + "#Calculations\n", + "Vbb=Vcc/2 #base voltage(V)\n", + "'''\n", + "Vbb=(R1/2)*Ib+Vbe*2+(30Ib+Ic2)*R\n", + "Ic2=beeta*30Ib,so\n", + "Ic2=30*30Ib=900Ib\n", + "Vbb=(R1/2)*Ib+Vbe*2+(30+900)*R*Ib....(i)\n", + "(R1/2)*Ib+437*Ib=6.1.......(ii)\n", + "0.47*930Ib=5 #output voltage is given like this\n", + "\n", + "'''\n", + "Ib=Vo/(R*930) #from equation(i)\n", + "\n", + "'''\n", + "substituting value of Ibin eq(ii) we get\n", + "\n", + "'''\n", + "R1=((6.1-4.98)/0.0114)*2 #resistance(k ohms) \n", + "#Results\n", + "print\"value of R1 is\",round(R1),\"K ohms\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "value of R1 is 196.0 K ohms\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Electronic_Devices_and_Circuits_By_I.JNagrath/chapter4.ipynb b/Electronic_Devices_and_Circuits_By_I.JNagrath/chapter4.ipynb new file mode 100755 index 00000000..76bf3d3e --- /dev/null +++ b/Electronic_Devices_and_Circuits_By_I.JNagrath/chapter4.ipynb @@ -0,0 +1,1219 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:98255b9e78b8f50e90c1882e76d0bc683ec6745297ae8a737ed2e62008872388" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + " Chapter 4: SMALL SIGNAL AMPLIFIERS-FREQUENCY RESPONSE" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.1,Page number 217" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "Vs=1. #source voltage(V)\n", + "C=100*10**-6 #value of capacitance(uF) \n", + "r1=1 #resistance 1(k ohms)\n", + "r2=4 #resistance 2(k ohms)\n", + "R=5 #total resistance,R=r1+r2\n", + "\n", + "#Calculations\n", + "Imax=Vs/(r1+r2)*10**3 #maximum current(uA)\n", + "fc=1/(2*(math.pi)*C*R) #critical frequency(Hz) \n", + " #As w*C*R=1 and w=2*pi*f\n", + "f=10*fc #lowest frequency(Hz)\n", + "\n", + "#Results\n", + "print\"maximum current\",Imax,\"uA\"\n", + "print\"critical frequency\",round((fc/1E+3),3),\"Hz\"\n", + "print\"lowest frequency\",round((f/1E+3),2),\"Hz\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum current 200.0 uA\n", + "critical frequency 0.318 Hz\n", + "lowest frequency 3.18 Hz\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.2,Page number 218" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "C=100*10**-6 #capacitance(uF)\n", + "Rg=1. #galvanometer resistance(k oms)\n", + "Rl=4. #load resistance(k ohms)\n", + "\n", + "#Calculations\n", + "Rth=(Rg*Rl)/(Rg+Rl) #thevinine's equivalent resistance\n", + "fc=1/(2*(math.pi)*C*Rth) #critical frequency(Hz)\n", + "f=fc*C #lowest frequency(Hz)\n", + "\n", + "#Results\n", + "print\"lowest frequency at which the point A gets grounded is\",round((f/1E-2),1),\"Hz\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "lowest frequency at which the point A gets grounded is 19.9 Hz\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.3,Page number 220" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "rpi=600 #dynamic junction resistance(ohms)\n", + "beta=100 #common emitter current gain\n", + "Vs=5. #source voltage(V)\n", + "Rs=400 #source resistance(ohms)\n", + "R=10 #resistance(k ohms)\n", + "\n", + "#Calculations\n", + "Ib=Vs/(Rs+rpi) #base current(uA) \n", + "Vo=R*beeta*Ib #output voltage(V)\n", + "Rin=rpi #input resistance(ohms)\n", + "Rout=R #output ewsistance(k ohms)\n", + "\n", + "#Results\n", + "print\"output voltage is\",Vo,\"V\"\n", + "print\"input resistance\",Rin,\"ohms\"\n", + "print\"output resistance\",Rout,\"k ohms\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "output voltage is 5.0 V\n", + "input resistance 600 ohms\n", + "output resistance 10 k ohms\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.4,Page number 220" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "gm=1. #transconductance(mS)\n", + "rd=40 #dynamic drain resistance(k ohms) \n", + "Rd1=40 #JFET 1 drain resistance(k ohms) \n", + "Rd2=10 #JFET 2 drain resistance(k ohms) \n", + "\n", + "#Calculations\n", + "Avo=(-gm*((rd*Rd1)/(rd+Rd1)))*(-gm*((rd*Rd2)/(rd+Rd2))) #voltage gain\n", + "\n", + "#Results\n", + "print\"Avo is\",Avo" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Avo is 160.0\n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.5,Page number 222" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "beta=125 #common emitter current gain\n", + "rpi=2.5 #dynamic junction resistance(k ohms)\n", + "rd=40 #dynamic drain resistance(k ohms) \n", + "gm=2 #transconductance(mS) \n", + "Vs=1 #assume,source voltage(V)\n", + "Rs=10 #source resistance(k ohms)\n", + "Rc=1 #collector resistance(k ohms)\n", + "rb=2 #resistance(k ohms)\n", + "Vgs=1 #gate to source voltage(V)\n", + "\n", + "#Calculations\n", + "#Part a\n", + "R=(rd*Rs)/(rd+Rs) #equivalent resistance(k ohms)\n", + "Ib=gm*Vgs*(R/(rpi+R)) #base current(mA)\n", + "Vo=beeta*Ib*Rc #output voltage(V) \n", + "Avo=Vo #voltage gain\n", + "\n", + "#Part b\n", + "Ib1=Vs/(rb+rpi) #base current(mA) after interchanging stages of JFET and BJT \n", + "Vgs1=beeta*Ib1*Rc #gate to source voltage(V) after interchanging stages of JFET and BJT\n", + "Vo1=gm*Vgs1*R #output voltage(V) after interchanging stages of JFET and BJT\n", + "Avo1=Vo1 #voltage gain after interchanging stages of JFET and BJT\n", + "\n", + "#Results\n", + "print\"Avo is\",round(Avo,1)\n", + "print\"Avo1 when BJT and FET stages are reversed is\",round(Avo1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Avo is 190.5\n", + "Avo1 when BJT and FET stages are reversed is 444.0\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.6,Page number 226" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "Cc1=1*10**-6 #coupling capacitor 1(uF)\n", + "Cc2=1*10**-6 #coupling capacitor 2 (uF) \n", + "Rs=10**3 #source resistance(k ohms)\n", + "rpi=2*10**3 #dynamic junction resistance(k ohms)\n", + "Rc=4500 #collector resistance(ohms)\n", + "Rl=9*10**3 #load resistance(k ohms)\n", + "w=100 #corner frequency(rad/s)\n", + "\n", + "#Calculations\n", + "w11=1/(Cc1*(Rs+rpi)) #corner frequency input circuit (rad/s)\n", + "w12=1/(Cc2*(Rc+Rl)) #corner frequency output circuit(rad/s)\n", + "f=w11/(2*(math.pi)) #lower cutoff frequency(Hz)\n", + "Zin=complex((Rs+rpi),-(1/(w*Cc1))) #input impedance(k ohms) \n", + "Zout=complex(Rc,-(1/(w*Cc2))) #output impedance(k ohms) \n", + "\n", + "#Results\n", + "print\"lower cut-off freq is\",round(f),\"Hz\"\n", + "print\"Zin\",Zin,\"ohms\"\n", + "print\"Zout\",Zout,\"ohms\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "lower cut-off freq is 53.0 Hz\n", + "Zin (3000-10000j) ohms\n", + "Zout (4500-10000j) ohms\n" + ] + } + ], + "prompt_number": 37 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.7,Page number 229" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "Re=Rc=1.5*10**3 #collector resistance(ohms)\n", + "Rs=600 #source resistance(ohms)\n", + "Rl=2*10**3 #load resistance(ohms) \n", + "beeta=100 #common emitter current gain \n", + "rpi=1*10**3 #dynamic junction resistance(ohms)\n", + "f=50 #frequency(Hz)\n", + "\n", + "#Calculations\n", + "w=2*f*(math.pi) #corner frequency(rad/s)\n", + "CE=1/(w*(Rs+rpi)) #capacitance(uF)\n", + "Ce=CE*(beeta+1) #capacitance(uF)\n", + "w11=w/10 #corner frequency input circuit (rad/s)\n", + "w12=w11/20 #corner frequency output circuit(rad/s)\n", + "Cc1=1/(w11*(Rs+rpi)) #coupling capacitor 1(uF) \n", + "Cc2=1/(w12*(Rc+Rl)) #coupling capacitor 2 (uF) \n", + "\n", + "#Results\n", + "print\"Ce is\",round(Ce/1E-6),\"uF\"\n", + "print\"Cc1 is\",round(Cc1/1e-6,1),\"uF\"\n", + "print\"Cc2 is\",round((Cc2/1E-5),2),\"uF\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ce is 201.0 uF\n", + "Cc1 is 19.9 uF\n", + "Cc2 is 18.19 uF\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.8,Page number 235" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "gm=2.5*10**-3 #transconductance(mS) \n", + "Rd=6*10**3 #drain resistance(ohms)\n", + "rd=200*10**3 #dynamic drain resistance(ohms) \n", + "Cc1=Cc2=0.12*10**-6 #coupling capacitors(uF)\n", + "Rs=1*10**3 #source resistance(ohms)\n", + "Rg=0.1*10**6 #R1||R2 \n", + "Cgs=12*10**-9 #gate to source capacitor(pF) \n", + "Cgd=2*10**-9 #gate to drain capacitor(pF) \n", + "Co1=10 # as Co1=Cl+Cw=10\n", + "\n", + "#Calculations\n", + "#Part a\n", + "Ro=(rd*Rd)/(rd+Rd) #equivalent resistance of rd and Rd(ohms)\n", + "Vo=-gm*((rd*Rd)/(rd+Rd)) #as Vgs=Vs\n", + "Avo=Vo #Avo=Vo/Vs=(-gm*Vs*((rd*Rd)/(rd+Rd)))/Vs=Vo \n", + " \n", + "#Part b\n", + "f11=1/(2*(math.pi)*Cc1*(Rs+Rg))\n", + "\n", + "#Part c\n", + "Ceq=Cgs+(Cgd*(1+gm*Ro)) #on application of miller theorem\n", + "Co=Co1+Cgd*(1+(1/(gm*Ro))) #output capacitance(pF)\n", + "f21=1/(2*(math.pi)*Ceq*((Rs*Rg)/(Rs+Rg))) #input circuit cutoff frequency(MHz)\n", + "f22=1/(2*(math.pi)*Co*Ro)*10**3 #output circuit cutoff frequency(MHz)\n", + "fH=f22 #cutoff frequency of high frequency band(MHz)\n", + "\n", + "#Results\n", + "print\"a)mid freq gain is\",round(Avo,1)\n", + "print\"b)input circuit cut-off is\",round(f11,1),\"Hz\"\n", + "print\"c)high freq input cutoff is\",round((f21/1E+3),2),\"and output cutoff is\",round((f22/1E-3),2),\"MHz\"\n", + "print\"high freq cut-off is\",round((fH/1E-3),2),\"MHz\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)mid freq gain is -14.6\n", + "b)input circuit cut-off is 13.1 Hz\n", + "c)high freq input cutoff is 3.73 and output cutoff is 2.73 MHz\n", + "high freq cut-off is 2.73 MHz\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.9,Page number 238" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "beta=50. #common emitter current gain \n", + "R1=11.5 #resistance(k ohms)\n", + "R2=41.4 #resistance(k ohms) \n", + "Vcc=10. #supply voltage to collector(V)\n", + "Rc=5. #collector resistance(k ohms)\n", + "Re=1. #emitter resistance(k ohms)\n", + "Rs=1. #source resistance(k ohms)\n", + "Vbe=0.7 #base emitter voltage(V)\n", + "Rl=10. #load resistance(k ohms)\n", + "Cc1=Cc2=20*10**-6. #coupling capacitors(uF)\n", + "Ce=150*10**-6. #emitter capacitor(uF) \n", + "Cpi=100 \n", + "Cu=5.\n", + "\n", + "#Calculations\n", + "#Part a\n", + "Rb=(R1*R2)/(R1+R2) #R1||R2(k ohms)\n", + "Vbb=Vcc*(R1/(R1+R2)) #suply voltage to base(V)\n", + "Ib=(Vbb-Vbe)/(Rb+(Rs*(1+beta))) #base current(mA)\n", + "Ic=beta*Ib #collector current(mA) \n", + "Vce=Vcc-(Ic*Rc)-(Ic+Ib)*Re #collector to emitter voltage(V) \n", + "rpi=(25*beta)*10**-3/Ic #dynamic junction resistance(K ohms) \n", + " \n", + "#Part b\n", + "rpi=1 #dynamic junction resistance(K ohms) \n", + "R=(rpi*Rb)/(rpi+Rb) #equivalent resistance(rpi||Rb) \n", + "Vbe=(R*Rs)/(R+Rs) #base to emitter voltage(V)\n", + "Ib1=Vbe/rpi #base current(mA)\n", + "Ro=(Rc*Rl)/(Rc+Rl) #Rc||Rl(k ohms) \n", + "Vo=-(beta*Ib1*Ro) #output voltage(V)\n", + "Avo=Vo #voltage gain\n", + "\n", + "#Part c\n", + "r1=(Rs*Rb)/(Rs+Rb) #Rs||Rb(k ohms) \n", + "w11=1/(Cc1*(Rs+R)) #low freq cutoff(rad/s)\n", + "w12=1/(Cc2*(Rc+Rl)) #high freq cutoff(rad/s) \n", + "w1p=1/((Ce/(beta+1))*(r1+rpi)) #low cutoff freq(rad/s)\n", + "\n", + "#Part d\n", + "Co1=5 #as Co1=Cw+Cl\n", + "gm=beta/rpi #transconductance(mS) \n", + "Ceq=Cpi+(Cu*(1+(gm*Ro))) #equivalent capacitance(pF)\n", + "Rs1=(Rb*Rs)/(Rb+Rs) #Rb||Rs(k ohms)\n", + "r2=(Rs1*rpi)/(Rs1+rpi) #Rs1||rpi(k ohms)\n", + "w21=10**12/(Ceq*r2*10**3) #low freq cutoff(MHz) \n", + "\n", + "#Results\n", + "print\"a)dc bias values are Vbb:\",round(Vbb,2),\"V, Ib:\",round(Ib,4),\"mA, Ic:\",round(Ic,2),\"mA, Vce:\",round(Vce,3),\"V, rpi:\",rpi,\"k ohms\"\n", + "print\"mid freq gain is\",round(Avo,2)\n", + "print\"low freq cut-off is\",round(w1p/1E+3),\"rad/s\"\n", + "print\"high cut-off freq is\",round((w21/1E+6),2),\"*10**6 rad/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)dc bias values are Vbb: 2.17 V, Ib: 0.0246 mA, Ic: 1.23 mA, Vce: 2.606 V, rpi: 1 k ohms\n", + "mid freq gain is -78.95\n", + "low freq cut-off is 179.0 rad/s\n", + "high cut-off freq is 2.25 *10**6 rad/s\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.10,Page number 243" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "Qcoil=75. #coil inductance\n", + "f=200. #frequency(Hz) \n", + "BW=4. #bandwidth(kHz)\n", + "C=470*10**-9. #capacitance(pF) \n", + "\n", + "#Calculations\n", + "#Part a\n", + "Qcircuit=f/BW #circuit inductance\n", + "L=1/(((2*(math.pi)*f)**2)*C) #inductance(mH) \n", + "\n", + "#Part b\n", + "R=Qcircuit*2*(math.pi)*f*L #resistance(k ohms)\n", + "\n", + "#Part c\n", + "r=(2*(math.pi)*f*L)/Qcoil #internal resistance(ohms)\n", + "req=(Qcoil**2)*r #equivalent resistance(k ohms)\n", + "ro=(R*req)/(req-R) #output resistance(k ohms)\n", + "\n", + "#Part d\n", + "BW=5 #bandwidth(kHz)\n", + "Qcircuit=f/BW #circuit inductance \n", + "Req=Qcircuit*2*(math.pi)*f*L #equivalent resistance(k ohms) \n", + "Rl=(Req*R)/(R-Req) #load resistance(k ohms)\n", + "\n", + "#Results\n", + "print\"a)coil inductance is\",round(L,2),\"mH\"\n", + "print\"b)circuit output impedance atresonant freq is\",round((R/1E+3),2),\"K ohms\"\n", + "print\"c)internal resistance ro is\",round((ro/1E+3),2),\"k ohms\"\n", + "print\"d)value of load resistance is\",round((Rl/1E+3),2),\"k ohms\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)coil inductance is 1.35 mH\n", + "b)circuit output impedance atresonant freq is 84.66 K ohms\n", + "c)internal resistance ro is 253.97 k ohms\n", + "d)value of load resistance is 338.63 k ohms\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.11,Page number 246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "fo=50 #output frequency(KHz)\n", + "L=10**-3 #inductance(H) \n", + "ro=100 #output resistance(k ohms)\n", + "Q=80 #coil inductance\n", + "Ri=10 #input resistance(k ohms)\n", + "beta=125 #common emitter current gain \n", + "\n", + "#Calculations\n", + "#Part a\n", + "C =1/(((2*(math.pi)*fo)**2)*L) #tunning capacitance(nF)\n", + "r=(2*(math.pi)*fo*L)/Q #internal resistance(k ohms)\n", + "req=(Q**2)*r #equivalent resistance(k ohms) \n", + "R=(ro*req)/(ro+req) #ro||req(k ohms)\n", + "Avo=-(beta*R)/Ri #voltage gain\n", + "\n", + "#Part b\n", + "Qcircuit=R/(2*(math.pi)*fo*L) #circuit inductance\n", + "BW=fo/Qcircuit #bandwidth\n", + "\n", + "#Results\n", + "print\"a)value of capacitance is\",round(C/1E-3),\"nF\"\n", + "print\" gain is\",round(Avo,1)\n", + "print\"b)bandwidth is\",round(BW/1E-3),\"Hz\",\"(value used for beta in texbook is wrong in the solution)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)value of capacitance is 10.0 nF\n", + " gain is -251.1\n", + "b)bandwidth is 782.0 Hz (value used for beta in texbook is wrong in the solution)\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.12,Page number 248" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "\n", + "f=1*10**6 #radio frequency(Hz)\n", + "beta=50 #common emitter current gain \n", + "fT=5*10**6 #short circuit current gain bandwidth product(Hz)\n", + "\n", + "#Calculations\n", + "betaf=fT/f #measurement of short circuit current gain\n", + "fbeta=fT/beta #frequency at beta(Hz)\n", + "\n", + "#Results\n", + "print\"frequency is\",fbeta,\"Hz\"\n", + "if fbeta<1*10**6:\n", + " print\"transistor is not suitable for 1Mhz amplifier as fbeta is less than 1Mhz\"\n", + "else:\n", + " print\"transistor is suitable for 1Mhz amplifier\"\n", + " " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "frequency is 100000 Hz\n", + "transistor is not suitable for 1Mhz amplifier as fbeta is less than 1Mhz\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.13,Page number 249" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "rpi=2 #dynamic junction resistance(K ohms) \n", + "beta=50. #common emitter current gain \n", + "f=1 #frequency(MHz)\n", + "beta1=2.5 #common emitter current gain \n", + "f1=20*10**6 #frequency(Hz)\n", + "\n", + "#Calculations\n", + "fT=beta1*f1 #short circuit current gain bandwidth product(Hz)\n", + "fbeta=fT/beta #frequency at beta(Hz)\n", + "Cpi=1/(2*(math.pi)*fbeta*rpi) #dynamic capacitance(pF)\n", + "\n", + "#Results\n", + "print\"fT is\",round(fT/1e+6),\"MHz\"\n", + "print\"fB is\",round(fbeta/1e+6),\"MHz\"\n", + "print\"Cpi is\",round(Cpi/1e-9),\"pF\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fT is 50.0 MHz\n", + "fB is 1.0 MHz\n", + "Cpi is 80.0 pF\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.14,Page number 256" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "R1=60 #resistance(k ohms)\n", + "R2=140 #resistance(k ohms)\n", + "Rs=4 #source resistance(k ohms)\n", + "Re=3 #emitter resistance(k ohms)\n", + "Rc=4 #collector resistance(k ohms)\n", + "Vcc=10 #supply voltage to collector(V)\n", + "Vbe=0.7 #base to emitter voltage(V)\n", + "beta=100 #common emitter current gain \n", + "Avo=-30 #voltage gain \n", + "\n", + "#Calculations\n", + "#Part a\n", + "Rb=(R1*R2)/(R1+R2) #R1||R2(k ohms)\n", + "Vth=(Vcc*R1)/(R1+R2) #thevinine's voltage(V)\n", + "Ib=(Vth-Vbe)/(Rb+(beta+1)*Re) #base current(uA)\n", + "Ic=Ib*beta #collector current(mA) \n", + "Vce=Vcc-(Rc*Ic)-((beta+1)*Ib*Re) #collector to emitter voltage(V)\n", + "\n", + "#Part b\n", + "rpi=((25*beta)/Ic)*10**-3 #dynamic junction resistance(k ohms)\n", + "r=(Rb*rpi)/(Rb+rpi) #resistance across Vs\n", + "Ib1=r/((Rs+r)*rpi) #base current(mA)\n", + "Rl=(-Rc*Avo)/(Avo+(beta*Ib1*Rc)) #load resistance(k ohms)\n", + "\n", + "#Results\n", + "print\"value of Ic and Vce are\",round(Ic,3),\"mA and\",round(Vce,2),\"V\"\n", + "print\"Rl is\",round(Rl,2),\"k ohms\" " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "value of Ic and Vce are 0.667 mA and 5.31 V\n", + "Rl is 6.21 k ohms\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.15,Page number 257" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "R1=25. #resistances(k ohms)\n", + "R2=100. #resistances(k ohms)\n", + "Re=2. #emitter resistance(k ohms) \n", + "Vcc=10. #supply voltage to collector\n", + "Vbe=0.7 #base to emitter voltage(V)\n", + "beta=100. #common emitter current gain\n", + "Avo=160 #voltage gain\n", + "Rs=1 #source resistance(k ohms)\n", + "Vs=1 #source voltage(V) \n", + "Rl=12.5 #load resistance(k ohms)\n", + "Rc1=20. #collector resistance(k ohms)\n", + "\n", + "#Calculations\n", + "#Part a\n", + "Rb=(R1*R2)/(R1+R2) #R1||R2\n", + "Vth=(Vcc*R1)/(R1+R2) #thevinines voltage(V)\n", + "Ib=(Vth-Vbe)/(Rb+(beta+1)*Re) #base current(uA)\n", + "Ic=Ib*beta #collector current(mA)\n", + "rpi=(25*beta)*10**-3/Ic #dynamic junction resistance(k ohms)\n", + "\n", + "#Part b\n", + "Ib1=1/rpi #small signal analysis \n", + "Rc=-Avo/(-beta*Ib1) #collector resistance() \n", + "\n", + "#Part c\n", + "r=(Rc1*rpi)/(Rc1+rpi) #Rc1||rpi1(k ohms) \n", + "Ib2=(Vs*r)/((1+r)*rpi) #base curret(mA)\n", + "Rc2=6.84 #collector resistance(k ohms) \n", + "Avo=-(beta*Ib2)*((Rl*Rc2)/(Rl+Rc2)) #voltage gain\n", + "\n", + "#Results\n", + "print\"value of Ic\",round(Ic,3),\"mA and rpi is\",round(rpi,2),\"k ohms\" \n", + "print\"Rc is\",round(Rc,2),\"k ohms\"\n", + "print\"Avo is\",round(Avo,1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "value of Ic 0.586 mA and rpi is 4.27 k ohms\n", + "Rc is 6.83 k ohms\n", + "Avo is -80.6\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.16,Page number 258" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "R1=12. #resistance(k ohms)\n", + "R2=100. #resistance(k ohms)\n", + "Rc=2 #collector resistance(k ohms)\n", + "Ic=1.2 #collector current(mA)\n", + "beta=60 #common emitter current gain\n", + "Ib1=1 #(say)\n", + "Rs=1 #source resistance(k ohms)\n", + "Vs=1 #source vcoltage(say)\n", + "\n", + "#Calculations\n", + "#Part a\n", + "rpi=((25*beta)/Ic)*10**-3 #dynamic junction resistance(k ohms)\n", + "Rb=(R1*R2)/(R1+R2) #R1||R2(k ohms)\n", + "r=(Rb*rpi)/(Rb+rpi) #Rb||rpi(k ohms)\n", + "Ro1=(Rc*rpi)/(Rc+rpi) #Rc||rpi(k ohms)\n", + "Vo1=Vbe2=-(beta*Ib1*Ro1) #base to emitter voltage(V)\n", + "Ib2=Vo1/rpi #base current(mA)\n", + "Ai=Ib2/Ib1 #current gain \n", + "\n", + "#Part b\n", + "Ib11=(Rs*r)/((Rs+r)*rpi) #base currents(mA)\n", + "Ib21=Ib11*Ai #base current(mA)\n", + "Avo1=Vo1=Ib21*rpi #voltage gain\n", + "\n", + "#Results\n", + "print\"current gain is\",round(Ai,2)\n", + "print\"overall voltage gain is\",round(Avo1,2),\"(solution in the textbook is incorrect)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "current gain is -36.92\n", + "overall voltage gain is -19.5 (solution in the textbook is incorrect)\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.17,Page number 259" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "beeta=50. #common emitter current gain\n", + "R1=25. #resistance(k ohms)\n", + "R2=75. #resistance(k ohms)\n", + "Ic=1.25 #collector current(mA)\n", + "Vcc=10 #supply voltage to collector(V)\n", + "s=10*10**-3 #signal strength(V)\n", + "Rs=0.5 #output impedance(k ohms)\n", + "Vo=1 #output voltage(V)\n", + "Vs=1. #source voltage(V) \n", + "Vl=12 #load at output terminal(Vl)\n", + "Vbe=0.7 #base to emitter voltage(V)\n", + "Rl=12\n", + "\n", + "#Calculations\n", + "rpi=((25*beeta)/Ic) #dynamic junction resistance(k ohms)\n", + "Rb=(R1*R2)/(R1+R2) #R1||R2(k ohms)\n", + "r=(Rb*rpi*10**-3)/(Rb+rpi*10**-3) #Rb||rpi(k ohms)\n", + "Avo=((Vo*rpi)/Vcc) #voltage gain\n", + "Ib=(r*Vs)/(Rs+r)*Vs #base current(mA)\n", + "Rc=(Rl*Avo)/(beeta*Ib*Rl-Avo) #collector resistance(k ohms)\n", + "Vth=(Vcc*R1)/(R1+R2) #thevinine's voltage(V)\n", + "Ib1=Ic/beeta #base current(mA)\n", + "Re=(Vth-Vbe-(Rb*Ib1))/((beeta+1)*Ib1) #emitter resistance(k ohms) \n", + "\n", + "#Results\n", + "print\"value of Rc is\",round(Rc,2),\"and Re is\",round(Re,2),\"k ohms (Vth value is wrong substituted in the book)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "value of Rc is 4.1 and Re is 1.04 k ohms (Vth value is wrong substituted in the book)\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.18,Page number 260" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "Cpi=20*10**-9 #opening capacitor(F)\n", + "Cu=5*10**-9 \n", + "C=50*10**-9 #here C=Cl+Cw\n", + "rpi=3.75*10**3 #dynamic drain resistance(ohms)\n", + "r1=4*10**3 #resistance(ohms)\n", + "r2=42*10**3 #resistance(ohms)\n", + "r3=303*10**3 #resistance(ohms)\n", + "f=20 #frequency(Hz)\n", + "beeta=100 #common emitter current gain\n", + "Rl=10*10**3 #load resistance(ohms)\n", + "\n", + "#Calculations\n", + "#Part a\n", + "Req=(((r1*r2)/(r1+r2)+rpi)*r3)/(((r1*r2)/(r1+r2)+rpi)+r3) #equivalent resistance(ohms)\n", + "Ce=(beeta+1)/(2*(math.pi)*f*Req) #emitter capacitance(uF)\n", + "\n", + "#Part b\n", + "gm=beeta/rpi #transconductance\n", + "Ro=(Rl*r1)/(r1+Rl) #output resistance(k ohms)\n", + "Ceq=Cpi+(Cu*(1+gm*Ro)) #equivalent capacitance(pF)\n", + "Co=C+(Cu*(1+(1/(gm*Ro)))) #output capacitance(pF)\n", + "r=(rpi*r1)/(rpi+r1) #rpi||r1\n", + "w21=1/(Ceq*r) #lower cutoff frequency(MHz)\n", + "w22=1/(Co*Ro) #higher cutoff frequenct(MHz)\n", + "\n", + "#Part c\n", + "Ceqnew=Cpi+(Cu*(1+(0.75*(gm*Ro)))) #as gain is reduced to 75% of original value\n", + "wHnew=(10**12)/(Ceqnew*r) #corner value of high frequency(Mrad/s) \n", + "fHnew=wHnew/(2*(math.pi)) #new value of higher frequency cutoff(KHz)\n", + "\n", + "#Results\n", + "print\"a)value of bypass capacitor Ce is\",round(Ce/1E-6),\"uF\"\n", + "if w21>w22:\n", + " print\"higher frequency is w21\"\n", + "else:\n", + " print\"higher frequency is w22\"\n", + "\n", + "print\"b)high frequency cut-off is\",round((w22/1E+3),2),\"Mrad/s\"\n", + "print\"c)high frequency cut-off is\",fHnew,\"Hz\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)value of bypass capacitor Ce is 111.0 uF\n", + "higher frequency is w22\n", + "b)high frequency cut-off is 6.36 Mrad/s\n", + "c)high frequency cut-off is 2.64660617737e+14 Hz\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.19,Page number 262" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "Vcc=3. #supply voltage to collector(V)\n", + "Vee=-3. #supply voltage to emitter(V)\n", + "r1=40. #resistance(ohms) \n", + "r2=25. #resistance(ohms)\n", + "r3=1.56 #resistance(ohms)\n", + "Vs=3. #source voltage(V)\n", + "beeta=200 #common emitter current gain\n", + "r4=0.6 #resistance(ohms)\n", + "r5=0.15 #resistance(ohms)\n", + "Vbe=0.7 #base to emitter voltage\n", + "r=0.5 #resistance(k ohms)\n", + "fL=20 #frequency(Hz)\n", + "Req1=24.24 #solving r||(Rth+rpi+R)||Re\n", + "f=2 #non dominant cutoff freq is fL/10 i.e 20/10\n", + "\n", + "#Calculations\n", + "#Part a\n", + "Vth=Vs-(((Vcc-Vee)/(r1+r2))*r1) #thevinine's voltage(V)\n", + "Rth=(r1*r2)/(r1+r2) #thevinine's voltage(V)\n", + "Ib=(Vth-Vbe+Vcc)/(Rth+((r4+r5)*(beeta+1))) #base current(mA)\n", + "Ic=Ib*beeta #Collector current(mA) \n", + "Vo=Vcc-(r3*Ic) #output voltage(V)\n", + "\n", + "#Part b\n", + "rpi=(25*beeta)/Ic #dynamic drain resistance(ohms)\n", + "R=r4*(beeta+1) #resistance(k ohms)\n", + "ro=(rpi*R)/(rpi+R) #rpi||R(k ohms)\n", + "Req=r+((Rth*ro)/(Rth+ro)) #equivalent resistance(k ohms) \n", + "Cc1=1/(Req*2*(math.pi)*fL) #coupling capacitor(uF)\n", + "\n", + "#Part c\n", + "Ce=1/(2*(math.pi)*fL*Req1) #emitter capacitance(uF)\n", + "CE=beeta*Ce #emitter capacitance(uF) after current gain\n", + "\n", + "#Part d\n", + "Ce1=1/(2*(math.pi)*f*Req1) #emitter capacitance(uF)\n", + "CE1=beeta*Ce1 #emitter capacitance(uF) after current gain\n", + "Csum=Cc1+CE1 #total capacitance(uF)\n", + "\n", + "#Results\n", + "print\"a)Ic and Vo are\",round(Ic,2),\"mA and\",round(Vo),\"V\"\n", + "print\"b)Cc1 is\",round((Cc1/1E-3),3),\"uF\"\n", + "print\"c)Ce is\",round((CE/1E-3),1),\"uF\"\n", + "print\"d)Csum is\",round((Csum/1E-2),3),\"uF\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)Ic and Vo are 1.94 mA and -0.0 V\n", + "b)Cc1 is 0.565 uF\n", + "c)Ce is 65.7 uF\n", + "d)Csum is 65.715 uF\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.21,Page number 265" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "gm=2 #transconductance\n", + "rd=200*10**3 #dynamic drain resistance(ohms)\n", + "Cgs=10 #gate to source capacitance(pF)\n", + "Cgd=0 #gate to drain capacitance(pF)\n", + "Rs=1*10**3 #source resistance(ohms)\n", + "Rg=1*10**6 #Rg=R1||R2\n", + "Rd=5*10**3 #drain resistance(ohms) \n", + "Rs1=2 #resistance(k ohms) \n", + "Cc1=Cc2=0.1*10**-6 #coupling capacitors(F)\n", + "Co=10*10**-12 #output capacitance(F)\n", + "Vgs=1 #gate to source voltage(V)\n", + "\n", + "#Calculations\n", + "#Part a\n", + "R=(Rd*rd)/(Rd+rd) #Rd||rd(k ohms)\n", + "Avo=Vo=-Vgs*gm*R #voltage gain\n", + "\n", + "#Part b\n", + "w11=1/(Cc1*(Rs*Rg)) #corner freq(rad/s)\n", + "wL=w11 #input circuit corner freq(rad/s)\n", + "\n", + "#Part c\n", + "w22=10**12/((Cgs*R)*10**3) #output circuit corner frequency(rad/s)\n", + "wH=w22/(2*math.pi) \n", + "\n", + "#Part d\n", + "G=-Avo*wH #gain bandwidth product\n", + "\n", + "#Part e\n", + "Rd=4*10**3 #drain resistance reduced(ohms) \n", + "Rnew=(Rd*rd)/(Rd+rd) #new resistance(ohms)\n", + "Avo1=-Vgs*gm*Rnew #new voltage gain\n", + "BWnew=(10**8/Rnew)/(2*math.pi) #new bandwidth(Mrad/s)\n", + "Gnew=-Avo1*BWnew #gain bandwidth product new\n", + "\n", + "#Results\n", + "print\"a)Avo is\",round((Avo/1E+3),2)\n", + "print\"b)wL is\",round((wL/1E-3),2),\"rad/s\"\n", + "print\"c)wH is\",round((wH/1E+3),1),\"MHz\"\n", + "print\"d)G is\",round((G/1E+6),2),\"MHz\"\n", + "print\"e)Gnew is\",round((Gnew/1E+6),1),\"MHz\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)Avo is -9.76\n", + "b)wL is 10.0 rad/s\n", + "c)wH is 3.3 MHz\n", + "d)G is 31.83 MHz\n", + "e)Gnew is 31.8 MHz\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 4.23,Page number 268" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "gm=1 #transconductance\n", + "rd=40 #dynamic drain resistance(k ohms) \n", + "Cgs=5 #gate to source capacitance(pF)\n", + "Cgd=1 #gate to drain capacitance(pF)\n", + "Cds=1 #drain to source capacitance(pF)\n", + "Avo1=20. #voltage gain of JFET 1\n", + "Avo2=8. #voltage gain of JFET 2 \n", + "R1=5 #resistance(k ohms)\n", + "R2=20 #resistance(k ohms)\n", + "R3=8 #resistance(k ohms)\n", + "\n", + "#Calculations\n", + "#Part a\n", + "Avo=Avo1*Avo2 #voltage gain\n", + "Ceq1=Cgs+Cgd*(1+Avo1) #input crcuit for first JFET\n", + "Co1=Cds+(Cgd*(1+(1/Avo1))) #output crcuit for first JFET\n", + "Ceq2=Cgs+Cgd*(1+Avo2) #input crcuit for second JFET\n", + "Co2=Cds+(Cgd*(1+(1/Avo2))) #output crcuit for second JFET\n", + "\n", + "#Part b\n", + "w21=1/(R1*Ceq1) #input circuit frequency\n", + "w2=10**12/(R2*10**3*(Co1+Ceq2)) #common circuit frequency\n", + "w22=1/(R3*Co2) #output circuit frequency\n", + "\n", + "\n", + "#Results\n", + "print\"a)Avo is\",Avo\n", + "print\"b)w21,w2,w22 are\",round((w21/1E-3),2),\"Mrad/sec,\",round((w2/1E+6),2),\"Mrad/sec and\",round((w22/1E-3),2),\"Mrad/sec\"\n", + "print\"nondominant corner freq is\",round((w2/1E+6),2),\"Mrad/sec\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)Avo is 160.0\n", + "b)w21,w2,w22 are 7.69 Mrad/sec, 3.12 Mrad/sec and 58.82 Mrad/sec\n", + "nondominant corner freq is 3.12 Mrad/sec\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Electronic_Devices_and_Circuits_By_I.JNagrath/chapter5.ipynb b/Electronic_Devices_and_Circuits_By_I.JNagrath/chapter5.ipynb new file mode 100755 index 00000000..437b0a36 --- /dev/null +++ b/Electronic_Devices_and_Circuits_By_I.JNagrath/chapter5.ipynb @@ -0,0 +1,653 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:9eef90d3b867f35b7e7b7ae71f5d96e96e47a495dc677c7492d34992d7905497" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 5:Large Signals Amplifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.1,Page number 280" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "Rb=1*10**3 #base resistance(ohms)\n", + "Vcc=20 #supply voltage(V)\n", + "Rc=20 #collector resistance(ohms) \n", + "beeta=25 #current gain \n", + "Vbe=0.7 #base to emitter voltage(V) \n", + "ib=10*10**-3 #base current(ohms)\n", + "\n", + "#Calculations\n", + "Ibq=(Vcc-Vbe)/Rb #current(A)\n", + "Icq=beeta*Ibq #current(A)\n", + "Vceq=Vcc-(Icq*Rc) #collector voltage(V)\n", + "ic=beeta*ib #collector current(A)\n", + "Po=((ic/(math.sqrt(2)))**2)*Rc #output voltage(V)\n", + "Pi=Vcc*Icq #input power(W)\n", + "eta=(Po/Pi)*100 #efficiency \n", + "Pd=Pi-((Icq**2)*Rc)-Po #power dissipated(W) \n", + "\n", + "#Results\n", + "print\"input power is Pi\",Pi,\"W\"\n", + "print\"output power is Po\",Po,\"W\"\n", + "print\"power dissipated is\",round(Pd,1),\"W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "input power is Pi 9.65 W\n", + "output power is Po 0.625 W\n", + "power dissipated is 4.4 W\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.2,Page number 283" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration \n", + "Rl=500 #load resistance(ohms)\n", + "Vceq=50 #queinscent collector voltage(V)\n", + "beetamin=30 #current gain minimum(at Q)\n", + "Icq=0.4 #queinscent collector current(A)\n", + "Ibq=8 #queinscent base current(mA)\n", + "\n", + "#Calculations\n", + "Rac=Vceq/Icq #ac resistance(ohms)\n", + "beeta=(Icq*10**-3)/Ibq #current gain\n", + "Re=5/Icq #emitter resistance(ohms)\n", + "Rc=(512.5*Rac)/(512.5-Rac) #as Re+Rl=500+12.5=512.5\n", + "Vcc=5+Vceq+(Icq*Rc) #supply voltage(V) \n", + "Rb=(beetamin*Re)/10 #base resistance(ohms)\n", + "R1=39.5 #solving 125=Rc||(Rl+Re) and Vbb=Vcc*(R1/(R1+R2))\n", + "R2=750\n", + "Pi=120*Icq #Vcc chosen as 120\n", + "r=(Rc*Rl)/(Rc+Rl)\n", + "Poac=(100/(2*math.sqrt(2)))**2/r #output power(W)\n", + "etamax=Poac/Pi #efficiency\n", + "Poac1=(100/(2*math.sqrt(2)))**2/Rl #ac power absorbed by load(W)\n", + "eta=Poac1/Pi \n", + "Pc=(Icq**2)*Rc #power lost in Rc(W)\n", + "Pe=(Icq**2)*Re #power lost in Re(W)\n", + "Pd=Pi-Pc-Pe-Poac #power consumed(W)\n", + "\n", + "#Results\n", + "print\"input power is Pi\",Pi,\"W\"\n", + "print\"output power is Po\",round(Poac,2),\"W\"\n", + "print\"dissipated power is\",round(Pd,2),\"W\"\n", + "print\"values of R1,R2,Re and Rc are\",R1,\"ohms,\",R2,\"ohms,\",Re,\"ohms and\",round(Rc),\"ohms resp. (Calculated value of Rc is wrong in the book)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "input power is Pi 48.0 W\n", + "output power is Po 10.06 W\n", + "dissipated power is 9.49 W\n", + "values of R1,R2,Re and Rc are 39.5 ohms, 750 ohms, 12.5 ohms and 165.0 ohms resp. (Calculated value of Rc is wrong in the book)\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.3,Page number 285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "Pmax=10 #power maximum(W)\n", + "Ic=1 #collector current(A)\n", + "Vcemax=100 #max collector to emitter current(V)\n", + "Vcemin=2 #min collector to emitter current(V)\n", + "\n", + "#Calculations\n", + "#Part a\n", + "Vceq=46 #Vce at Q point \n", + "Icq=0.21 #Ic at Q point \n", + "Vcc=92 #supply voltage(V)\n", + "ic=0.42 #collector current(A) \n", + "\n", + "#Part b\n", + "Rl=Vceq/Icq #load resistance(ohms)\n", + "\n", + "#Part c\n", + "Pi=Vcc*Icq #input power(W)\n", + "Po=((ic/(2*math.sqrt(2)))**2)*Rl #output power(W)\n", + "eta=(Po/Pi)*100 #efficiency\n", + "\n", + "#Results\n", + "print\"Rl for maximum power input is\",round(Rl),\"ohms\"\n", + "print\"input power is is\",Pi,\"W\"\n", + "print\"Po is\",Po\n", + "print\"eta is\",eta,\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rl for maximum power input is 219.0 ohms\n", + "input power is is 19.32 W\n", + "Po is 4.83\n", + "eta is 25.0 %\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.4,Page number 286" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "Vcc=15 #supply voltage(V)\n", + "beeta=40. #current gain\n", + "Icq=5. #Ic at Q(mA)\n", + "Vceq=7.5 #Vce at Q(V) \n", + "icswing=10 #swing in ic(mA) \n", + "\n", + "#Calculations\n", + "#Part a\n", + "Rl=Vceq/Icq*10**-3 #load resistance(ohms) \n", + "\n", + "#Part b\n", + "Ibq=Icq/beeta #base current at Q(uA)\n", + "\n", + "#Part c\n", + "ibswing=icswing/beeta #swing in ib(mA)\n", + "Pac=Rl*(icswing/(2*math.sqrt(2)))**2 #ac power(W)\n", + "Pdc=Vcc*(Icq*10**-3) #dc power(W)\n", + "eta=(Pac/Pdc)*100 #efficiency\n", + "\n", + "#Results\n", + "print\"a)value of Rl is\",round(Rl/1E-6),\"ohms\"\n", + "print\"b)Ibq is\",round(Ibq/1E-3),\"uA\"\n", + "print\"c)ac power output is\",round((Pac/1E-3),2),\"mW\"\n", + "print\"efficiency is\",eta,\"%\"\n", + "print\"corresponding swing in ib is\",ibswing,\"mA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)value of Rl is 1500.0 ohms\n", + "b)Ibq is 125.0 uA\n", + "c)ac power output is 18.75 mW\n", + "efficiency is 25.0 %\n", + "corresponding swing in ib is 0.25 mA\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.5,Page number 288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "Vcc=Vce=10 #supply voltage(V) \n", + "Icq=140*10**-3 #Ic at Q point(A)\n", + "Rl=8 #load resistance(ohms)\n", + "vce=16 #instantaneous collector to emitter voltage(V)\n", + "ic=235*10**-3 #instantaneous collector current(A)\n", + "\n", + "#Calculations\n", + "RL=Vcc/Icq\n", + "r=math.sqrt(RL/Rl) #load resistance for max ac swing(ohms)\n", + "Po=(vce*ic)/(2*math.sqrt(2)*2*math.sqrt(2)) #output power(W)\n", + "Pi=Vcc*Icq #input power(W) \n", + "eta=Po/Pi #efficiency\n", + "Pd=Pi-Po #dissipated power(W) \n", + "\n", + "#Results\n", + "print\"a)transformation ratio is\",round(r)\n", + "print\"c)power output is\",Po,\"W\"\n", + "print\"efficiency is\",round(eta*100,2),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)transformation ratio is 3.0\n", + "c)power output is 0.47 W\n", + "efficiency is 33.57 %\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.6,Page number 290" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "Rl=4.5 #load resistance(ohms)\n", + "Vceq=50 #Vc at point Q(V)\n", + "Icq=400*10**-3 #Ic at Q(A)\n", + "Re=12.5 #emitter resistance(ohms)\n", + "Vcemax=90 #from figure \n", + "Vcemin=10 #from figure\n", + "Icmax=730 #max Ic(mA)\n", + "Icmin=30 #min Ic(mA) \n", + "\n", + "#Calculations\n", + "#Part a\n", + "Rac=Vceq/Icq #ac resistance(ohms)\n", + "n=math.sqrt(Rac/Rl) #as n=N1/N2 and Rac=(N1/N2)^2*Rl\n", + "\n", + "#Part b\n", + "Vcc=Vceq+(Icq*Re) #supply voltage(V) \n", + "\n", + "#Part c\n", + "vce=Vcemax-Vcemin #instantaneous collector to emitter voltage(V)\n", + "ic=Icmax-Icmin #instantaneous collector current(mA)\n", + "Po=(vce*ic)/((2*math.sqrt(2))*(2*math.sqrt(2))) #output voltage(V)\n", + "Pi=Vcc*Icq #input voltage(V) \n", + "eta=(Po/Pi)*100 #efficiency\n", + "Pd=Pi-(Icq**2*Re)-Po*10**-3 #dissipated power(W)\n", + "\n", + "#Results\n", + "print\"a)transformation ratio is\",round(n,2)\n", + "print\"b)Vcc is\",Vcc,\"V\"\n", + "print\"c)power efficiency for the load is\",round((eta/1E+3),1),\"%\"\n", + "print\"power dissipated is\",Pd,\"W\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)transformation ratio is 5.27\n", + "b)Vcc is 55.0 V\n", + "c)power efficiency for the load is 31.8 %\n", + "power dissipated is 13.0 W\n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.7,Page number 295" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Finding input power,output power,Pd,efficiency,\n", + "\n", + "import math\n", + "\n", + "#Variable declaration\n", + "Vcc=30 #supply voltage(V)\n", + "Rl=16 #load resistance(ohms) \n", + "n=2 #transformation ratio\n", + "Im=1 #peak value of current(A)\n", + "etamax=78.54 #max efficiency(%)\n", + "\n", + "#Calculations\n", + "#Part a\n", + "Rl1=Rl*(n/2)**2 #load resistance(ohms)\n", + "Pi=(2*Vcc*Im)/math.pi #input power(W)\n", + "Pimax=(2*Vcc**2)/((math.pi)*Rl1) #input power max(W)\n", + "\n", + "#Part b\n", + "Po=((Im**2)*Rl1)/2 #output power(W)\n", + "Pomax=(Vcc**2)/(2*Rl1) #output power max(W)\n", + "\n", + "#Part c\n", + "eta=Po/Pi #efficiency\n", + " \n", + "\n", + "#Part d\n", + "P=((2*Vcc*Im)/math.pi)-((Im**2*Rl1)/2) #Power dissipated by transistors(W)\n", + "Pd=P/2 #power dissipated by each transistors\n", + "Pmax=(2*Vcc**2)/((math.pi)**2*Rl1) #max power dissipated by transistors\n", + "Pdmax=Pmax/2 #max power dissipated by each transistor\n", + "\n", + "#Results\n", + "print\"a)input power is\",round(Pi,1),\"W and max input power is\",round(Pimax,2),\"W\"\n", + "print\"b)output power \",Po,\"W and max output power is\",round(Pomax,2),\"W\"\n", + "print\"c)power efficiency for the load is\",round((eta/1E-2),2),\"% and its max value is\",etamax,\"%\"\n", + "print\"power dissipated by each transiator is\",round(Pd,1),\"W and max value is\",round(Pdmax,1),\"W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)input power is 19.1 W and max input power is 35.81 W\n", + "b)output power 8 W and max output power is 28.0 W\n", + "c)power efficiency for the load is 41.89 % and its max value is 78.54 %\n", + "power dissipated by each transiator is 5.5 W and max value is 5.7 W\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.8,Page number 296" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "#Variable declaration\n", + "Pd=10\n", + "\n", + "#Calculations\n", + "#Part a\n", + "Poacmax=10. #as Pd=Po(ac)max by class A\n", + "\n", + "#Part b\n", + "Pd=2*Poacmax #power dissipated(W)\n", + "Poacmax1=146/2 #max output power by class B\n", + "f=Poacmax1/Poacmax #factor by which power of class B is greater than class A\n", + " \n", + "#Results\n", + "print\"maximum signal output powerclass A produce is\",Poacmax,\"W\"\n", + "print\"maximum signal output powerclass produce is\",Poacmax1,\"W\"\n", + "print\"factor by which power in class b is larger than power in class A transformer is\",f" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "maximum signal output powerclass A produce is 10.0 W\n", + "maximum signal output powerclass produce is 73 W\n", + "factor by which power in class b is larger than power in class A transformer is 7.3\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.9,Page number 300" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "Vcc=30. #supply voltage(V)\n", + "Im=1 #peak value of current(A)\n", + "Rl=10. #load resistance(ohms)\n", + "\n", + "#Calculations\n", + "#Part a\n", + "Pi=(Vcc*Im)/math.pi #input power(W)\n", + "Pimax=(Vcc**2)/(math.pi*2*Rl) #max input power(W)\n", + "\n", + "#Part b\n", + "Po=((Im**2)*Rl)/2 #output power(W)\n", + "Pomax=(Vcc**2)/(8*Rl) #output power max(W)\n", + "\n", + "#Part c\n", + "eta=Po/Pi #efficiency\n", + "etamax=Pomax/Pimax #efficiency max \n", + "\n", + "#Part d\n", + "Pd=Pi-Po #Power dissipated by transistors(W) \n", + "Pmax=(Vcc**2)/(2*(math.pi)**2*Rl) #max power dissipated by transistors\n", + " \n", + "#Results\n", + "print\"a)input power is \",round(Pi,2),\"W and max input power is\",round(Pimax,2),\"W\"\n", + "print\"b)output power is \",Po,\"W and max output power is\",round(Pomax,2),\"W\"\n", + "print\"c)power efficiency for the load is\",round((eta/1E-2),2),\"% and its max value is\",round((etamax/1E-2),2),\"%\"\n", + "print\"power dissipated and its max value are\",round(Pd,2),\"W and\",round(Pmax,2),\"W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)input power is 9.55 W and max input power is 14.32 W\n", + "b)output power is 5.0 W and max output power is 11.25 W\n", + "c)power efficiency for the load is 52.36 % and its max value is 78.54 %\n", + "power dissipated and its max value are 4.55 W and 4.56 W\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.10,Page number 303" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "P1=2 #transistor power(W)\n", + "Rl=5*10**3. #load resistance()\n", + "Ic=35 #collector current(mA) \n", + "\n", + "#Calculations\n", + "Bo=40-Ic \n", + "B1=math.sqrt((2*P1)/Rl)\n", + "B2=Bo\n", + "D2=(B2/B1)*100 #second harmonic distortion(%)\n", + "\n", + "#Results\n", + "print\"second harmonic distortion is\",round((D2/1E+3),2),\"%\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "second harmonic distortion is 17.68 %\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.12,Page number 314" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "Vcc=15. #supply voltage(V)\n", + "Rl=10. #load resistance(ohms)\n", + "\n", + "#Calculations\n", + "#Part a\n", + "Immax=Vcc/Rl #max peak current(A)\n", + "Irmsmax=Immax/(math.sqrt(2)) #max rms current(A)\n", + "Pomax=Irmsmax**2*Rl #max output power(W)\n", + "Pi=(2*Vcc*Immax)/math.pi #max input power(W)\n", + "eta=Pomax/Pi #efficiency\n", + "\n", + "#Part b \n", + "Im=(2*Vcc)/(math.pi*Rl) #peak current(A)\n", + "Pdmax=((2*Vcc*Im)/(math.pi))-((Im**2*Rl)/2) #max power dissipated(W)\n", + "eta1=((Im**2)*Rl*math.pi)/(2*2*Vcc*Im) #efficiency\n", + "\n", + "#Results\n", + "print\"a)max signal output power,collector dissipation are\",Pomax,\"W,\",round(Pi,2),\"W and efficiency is\",round((eta/1E-2),2),\"%\"\n", + "print\"b)max dissipation of each transistor and corresponding efficiency is\",round(Pdmax,2),\"W and\",eta1,\"resp.\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)max signal output power,collector dissipation are 11.25 W, 14.32 W and efficiency is 78.54 %\n", + "b)max dissipation of each transistor and corresponding efficiency is 4.56 W and 0.5 resp.\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 5.13,Page number 315" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Calculations\n", + "eta=0.5 #As Po(ac)=Vcc^2/2*pi^2*Rl and Pi(dc)=Vcc^2/pi^2*Rl\n", + " #put these in eta=Po(ac)/Pi(dc) which is 1/2=0.5 \n", + " \n", + "#Results\n", + "print\"push pull amplifier efficiency is\",round(eta/1E-2),\"%\"\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "push pull amplifier efficiency is 50.0 %\n" + ] + } + ], + "prompt_number": 27 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Electronic_Devices_and_Circuits_By_I.JNagrath/chapter6.ipynb b/Electronic_Devices_and_Circuits_By_I.JNagrath/chapter6.ipynb new file mode 100755 index 00000000..721c027d --- /dev/null +++ b/Electronic_Devices_and_Circuits_By_I.JNagrath/chapter6.ipynb @@ -0,0 +1,545 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:b6947316bc65682adaa8d93a4eda990ab9271382dd0514c03ae855d300a77db0" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 6: Feedback Amplifiers And Oscillators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.1,Page number 331" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Vo=12. #output voltage(V)\n", + "f=1.5*10**3 #frequency(Hz)\n", + "h=0.25 #second harmonic content(%) \n", + "ho=2.5 #reduced harmonic content of output(%)\n", + "A=100 #power amplifier gain\n", + "\n", + "#Calculations\n", + "Vd=Vo*h #second harmonic content in output(V)\n", + "Vd1=Vo*ho #reduced value of second harmonic content(V)\n", + "beta=((Vd1/Vd)-1)/A #feedback gain from formula Vd1=Vd/(1+beta*A) \n", + "Vs=Vo*(1+beta*A)/A #signal voltage(V) from formula (A/(1+Beta*A))*Vs \n", + "V=Vo/A #signal input needed without feedback \n", + "s=Vs/V #additional signal amplification needed before feedback amplifier\n", + "\n", + "#Results\n", + "print\"feedback gain is\",beta\n", + "print\"signal input to the overall system is\",s" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "feedback gain is 0.09\n", + "signal input to the overall system is 10.0\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.2,Page number 332" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "w2=10**4. #corner frequency(rad/s) \n", + "w2new=10**5. #new corner frequency(rad/s) \n", + "Ao=1000. #high frquency response \n", + "\n", + "#Calculations\n", + "beta=((w2new/w2)-1)/Ao #feedback factor\n", + "Anew=Ao/(1+beta*Ao) #overall gain of amplifier from formula w2new=w2(1+beta*Ao)\n", + "p=w2*Ao #gain bandwidth product without feedback from formula Anew=Ao/1+beta*Ao\n", + "pnew=Anew*w2new #gain bandwidth product with feedback\n", + "\n", + "#Results\n", + "print\"beta is\",beta\n", + "print\"overall gain is\",Anew\n", + "print\"gain-bandwidth products with and without feedback are\",p,\"and\",pnew,\"resp.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "beta is 0.009\n", + "overall gain is 100.0\n", + "gain-bandwidth products with and without feedback are 10000000.0 and 10000000.0 resp.\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.3,Page number 333" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "A=100. #high frquency response \n", + "Af=100 #gain \n", + "A1=A**2 #forward gain\n", + "A1new=50 #gain reduces to 50% \n", + "\n", + "#Calculations\n", + "beta=((A1/Af)-1)/A1 #feedback factor\n", + "Afnew=A1new**2/(1+beta*A1new**2) #new value of A\n", + "g=Af-Afnew #reduction in overall gain\n", + "\n", + "#Results\n", + "print\"% change in gain of feedback unit is\",round(g,2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "% change in gain of feedback unit is 2.91\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.4,Page number 337" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "beta=0.008 #positive gain \n", + "\n", + "#Calculations\n", + "Ao=-(8/beta)**(1/3) #A=Ao/2,so beta(A^3)=-1\n", + "\n", + "#Results\n", + "print\"% change in gain of feedback unit is\",round(Ao/1E-1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "% change in gain of feedback unit is -10.0\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.5Page number 337" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import cmath\n", + "from math import pi,degrees\n", + "\n", + "#Variable declarations\n", + "A = complex(0,60) #amplifier\n", + "B = complex(0,30) #amplifier\n", + "AB = A*B\n", + "C = (1+A)/AB #condition for oscillation\n", + "phi = cmath.phase(C) #phase\n", + "\n", + "#Result\n", + "print \"C =\",round(abs(C),4),\"with phase =\",round(degrees(phi),2)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "C = 0.0333 with phase = -90.95\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.7,Page number 347" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Rbb=8*10**3 #base resistance(k ohms)\n", + "eta=0.7 #efficiency\n", + "R1=0.2 #R1(k ohms)\n", + "Rt=40*10**3 #Rt(ohms)\n", + "Ct=0.12*10**-6 #capacitance(F)\n", + "Vv=2 #capacitor is charged to voltage(V)\n", + "Iv=10*10**-3 #current to capacitor(A)\n", + "Ip=10*10**-3 #peak current(A)\n", + "Vd=0.7 #diode voltage(V)\n", + "V=12. #voltage(V)\n", + "\n", + "#Calculations\n", + "#Part a\n", + "Rb1=eta*Rbb #base resistance(ohms) \n", + "Rb2=Rbb-Rb1 #base resistance(ohms)\n", + "\n", + "#Part b\n", + "Vp=Vd+((Rb1+R1)*V/(Rbb+R1)) #peak voltage(V)\n", + "\n", + "#Part c\n", + "Rtmin=(V-Vv)/Iv #Rt minimum(k ohms) \n", + "Rtmax=(V-Vp)/Ip #Rt minimum(k ohms) \n", + "\n", + "#Part d\n", + "Rb11=.12 #resistance during discharge(ohms)\n", + "t1=Rt*Ct*1.27 #charging time(mS)\n", + "t2=(Rb11+R1)*Ct*1.52 #discharging time(uS)\n", + "T=t1+t2 #cycle time\n", + "foscE=1/T #oscillations frequency(Hz)\n", + "foscA=1/(Rt*Ct*1.2) #oscillations frequency(Hz)\n", + "\n", + "#Part e\n", + "vR1=(R1*V)/(R1+Rbb) #vR1 at discharging period\n", + "vR1d=(R1*(Vp-Vd))/(R1+Rb11) #vR1 at discharging period\n", + "\n", + "#Results\n", + "print\"Rb1 and Rb2 are\",round((Rb1/1E+3),1),\"k ohms and\",round((Rb2/1E+3),1),\"k ohms resp.\"\n", + "print\"Vp is\",round(Vp,1),\"V\"\n", + "print\"Rtmin is\",round(Rtmin/1E+3),\",k ohms and Rtmax is\",round(Rtmax/1E+1),\"k ohms,hence Rt is in the range\"\n", + "print\"foscE is\",round(foscE),\"Hz and foscA is\",round(foscA),\"Hz\"\n", + "print\"vR1 is\",round((vR1/1E-3),3),\"and vRd1 is\",round(vR1d,2),\"V (range of Rt is wrong in the book)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Rb1 and Rb2 are 5.6 k ohms and 2.4 k ohms resp.\n", + "Vp is 9.1 V\n", + "Rtmin is 1.0 ,k ohms and Rtmax is 29.0 k ohms,hence Rt is in the range\n", + "foscE is 164.0 Hz and foscA is 174.0 Hz\n", + "vR1 is 0.3 and vRd1 is 5.25 V (range of Rt is wrong in the book)\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.8,Page number 350" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "A=1500 #voltage gain\n", + "beta=1/25. #current gain \n", + "\n", + "#Calculations\n", + "#Part a\n", + "Af=A/(1+A*beta) #voltage gain with feedback\n", + "\n", + "#Part b\n", + "g=0.1 #amplifier gain changes by 10%=0.1\n", + "gf=g/(1+A*beta) #% by which its gain in feedback mode changes dAf/Af\n", + "\n", + "#Results\n", + "print\"Amplifier gain with feedback is\",round(Af,1)\n", + "print\"% by which gain in feedback changes is\",round((gf/1E-2),3),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Amplifier gain with feedback is 24.6\n", + "% by which gain in feedback changes is 0.164 %\n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.9,Page number 351" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "A=500 #voltage gain\n", + "beta=1/20. #current gain\n", + "Ro=50*10**3 #output resistance(ohms) \n", + "Ri=1.5*10**3 #input resistance(ohms)\n", + "\n", + "#Calculations\n", + "#Part a\n", + "Af=A/(1+A*beta) #voltage gain with feedback \n", + "\n", + "#Part b\n", + "Rif=Ri*(1+(A*beta)) #input resistance(k ohms)\n", + "Rof=Ro/(1+A*beta) #output resistance(k ohms)\n", + "\n", + "#Results\n", + "print\"Amplifier gain is\",round(Af,2)\n", + "print\"input resistance is\",round(Rif/1E+3),\"K ohms and output resistance is\",round((Rof/1E+2),2),\"Kohms\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Amplifier gain is 19.23\n", + "input resistance is 39.0 K ohms and output resistance is 19.23 Kohms\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.10,Page number 351" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Ro=50*10**3 #output resistance(ohms)\n", + "Rd=10*10**3 #drain resistance(ohms)\n", + "R1=800*10**3 #resistance(ohms)\n", + "R2=200*10**3 #resistance(ohms)\n", + "gm=5500*10**-6 #transconduuctance(us)\n", + "\n", + "#Calculations\n", + "r=(Rd*Ro)/(Rd+Ro) #Rd||Ro\n", + "R=R1+R2 #combined resistance of R1 and R2\n", + "Rl=(R*r)/(R+r) #load resistance(ohms)\n", + "A=-gm*Rl #voltage gain without feedback\n", + "beta=R2/(R1+R2) #current gain \n", + "Af=A/(1+A*beta) #voltage gain with feedback\n", + "\n", + "#Results\n", + "print\"Amplifier gain with feedback is\",round((Af/1E+1),1),\"and without feedback is\",A" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Amplifier gain with feedback is -4.5 and without feedback is -45.452\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.11,Page number 352" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Re=1.25*10**3 #emitter resistance(ohms)\n", + "Rc=4.8*10**3 #collector resistance(ohms)\n", + "Rb=800*10**3 #base resistance(ohms) \n", + "rpi=900 #dynamic resistance(ohms)\n", + "Vcc=16 #supply voltage(V)\n", + "beta=100. #current gain \n", + "\n", + "#Calculations\n", + "A=-(beta/rpi) #amplifier voltage gain \n", + "B=-Re \n", + "V=(A*Rc)/(1+B*A) #V=Vo/Vs\n", + " \n", + "#Results\n", + "print\"Amplifier voltage gain is\",round(V,1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Amplifier voltage gain is -3.8\n" + ] + } + ], + "prompt_number": 58 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.12,Page number 352" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + " import math\n", + "\n", + "#Variable declaration\n", + "C1=800*10**-9 #capacitance(F)\n", + "C2=2400*10**-9 #capacitance(F)\n", + "L=50*10**-6 #inductance(H)\n", + "\n", + "#Calculations\n", + "Ceq=(C1*C2)/(C1+C2) #equivalent capacitance(F)\n", + "fo=1/(2*math.pi*math.sqrt(L*Ceq)) #output frequency(Hz)\n", + "\n", + "#Results\n", + "print\"the oscillation frequency is\",round((fo/1E+3),2),\"KHz\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the oscillation frequency is 29.06 KHz\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 6.13,Page number 353" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "C=200*10**-9 #capacitance(F)\n", + "Lrcf=0.5*10**-3 #shunt across L2\n", + "L1=800*10**-6 #inductance(H)\n", + "L2=800*10**-6 #inductance(H)\n", + "M=200*10**-6 \n", + "\n", + "#Calculations\n", + "L21=(L2*Lrcf)/(L2+Lrcf) #effective value of L2(uH)\n", + "Leq=L1+L21+2*M #equivalent inductance(H)\n", + "fo=1/(2*math.pi*math.sqrt(Leq*C)) #output frequency(Hz)\n", + "\n", + "#Results\n", + "print\"the oscillation frequency is\",round((fo/1E+3),2),\"KHz\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "the oscillation frequency is 9.17 KHz\n" + ] + } + ], + "prompt_number": 13 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Electronic_Devices_and_Circuits_By_I.JNagrath/chapter7.ipynb b/Electronic_Devices_and_Circuits_By_I.JNagrath/chapter7.ipynb new file mode 100755 index 00000000..f37b3943 --- /dev/null +++ b/Electronic_Devices_and_Circuits_By_I.JNagrath/chapter7.ipynb @@ -0,0 +1,645 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:4a9283ba6472e11de214bfc0c69a7f007685d94fb7b513179011a2e471e81b7b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 7:Operational Amplifiers" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.1,Page number 361" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "V1=120 #negative terminal Vn(uV)\n", + "V2=80 #positive terminal Vp(uV)\n", + "Ad=10**3 #difference mode gain\n", + "\n", + "\n", + "#Calculations\n", + "Vd=V1-V2 #difference mode signal(uV) \n", + "Vc=(V1+V2)/2 #common mode signal(uV)\n", + "\n", + "#Part a\n", + "CMRR=100. #common mode rejection ratio\n", + "Vo=Ad*Vd*(1+(Vc/(CMRR*Vd))) #output voltage(mV)\n", + " \n", + "#Part b\n", + "CMRR=10**5. #common mode rejection ratio\n", + "Vo1=Ad*Vd*(1+(1/CMRR)*(Vc/Vd)) #output voltage(mV) \n", + "\n", + "#Results\n", + "print\"output voltage is\",round(Vo/1E+3),\"mV\"\n", + "print\"output voltage is\",round(Vo1/1E+3),\"mV\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "output voltage is 41.0 mV\n", + "output voltage is 40.0 mV\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.2,Page number 365" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "deltavi=0.5 #change in vi(V)\n", + "deltat=10 #change in time(us)\n", + "s=1 #slew rate(V/us)\n", + "\n", + "#Calculations\n", + "Kvf=(s*deltat)/deltavi #closed loop gain of amplifier\n", + "\n", + "#Results\n", + "print\"closed loop gain of amplifier is\",Kvf" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "closed loop gain of amplifier is 20.0\n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.3,Page number 365" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "f=50*10**3. #OPAMP freequency(Hz)\n", + "Vm=0.02 #maximum value of signal voltage(V)\n", + "S=.5*10**6 #slew rate(V/s)\n", + "\n", + "#Calculations\n", + "Kvf=S/(2*(math.pi)*f*Vm) #closed loop gain of amplifier\n", + "\n", + "#Results\n", + "print\"closed loop gain of amplifier is\",round(Kvf)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "closed loop gain of amplifier is 80.0\n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.4,Page number 369" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Ic=100 #current at quinscent point(uA)\n", + "beta=2000. #current gain\n", + "Ad=250 #difference mode gain\n", + "CMRR=5000 #as 74 dB=5000,common mode rejection ratio(dB)\n", + "\n", + "#Calculations\n", + "rpi=(25*beta)/Ic #dynamic internal resistance(k ohms) \n", + "gm=beta/rpi #transconductance(mS)\n", + "Re=CMRR/gm #emitter resistance(k ohms)\n", + "Rc=(Ad*2)/gm #collector resistance(k ohms) from formula Ad=gmRc/2\n", + "Rin=2*rpi #input resistance(k ohms)\n", + "\n", + "#Results\n", + "print\"Re is\",Re,\"k ohms\"\n", + "print\"Rc is\",Rc,\"k ohms\"\n", + "print\"input resistance is\",Rin,\"k ohms\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Re is 1250.0 k ohms\n", + "Rc is 125.0 k ohms\n", + "input resistance is 1000.0 k ohms\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.6,Page number 371" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Icq=.428 #current at quinscent point(uA)\n", + "beta=200. #current gain\n", + " #as 74 dB=5000,common mode rejection ratio(dB)\n", + "Rc=10. #collector resistance(k ohms) \n", + "Re=16. #emitter resistance(k ohms) \n", + "Vcc=15. #supply voltage(V)\n", + "\n", + "#Calculations\n", + "#Part b\n", + "Ibq=Icq/beta #Ib at Q(uA)\n", + "rpi=(25*beta)/Icq #dynamic resistance(k ohms)\n", + "gm=beta/rpi #transconductance\n", + "\n", + "#Part b\n", + "vo1=Vcc-(Icq*Rc) #terminal 1 voltage(V) \n", + "vo2=vo1 #terminal 2 voltage(V) \n", + "\n", + "#Part c \n", + "Ad=(gm*Rc)/2 #differential mode gain\n", + "Ac=Rc/(2*Re) #common mode gain\n", + "CMRR=Ad/Ac #common mode rejection ratio\n", + "\n", + "#Part d\n", + "Rid=2*rpi #differential input resistance(k ohms)\n", + "rpi=11.7 #dynamic resistance(k ohms)\n", + "Ric=rpi+(2*(beta+1)*Re) #common mode input resistance(k ohms)\n", + "\n", + "#Results\n", + "print\"Icq is\",Icq,\"mA,and Ibq is \",round((Ibq/1E-3),2),\"uA\"\n", + "print\"vo1 and vo2 have same value as\",vo1,\"V\"\n", + "print\"\",\n", + "print\"Ad:\",round(Ad/1E-3),\",Ac:\",round(Ac,3),\"and CMRR is\",round(CMRR/1E-3)\n", + "print\"Rid is\",round((Rid/1E+3),1),\"K ohms and Ric is\",round((Ric/1E+3),2),\" Mohms\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Icq is 0.428 mA,and Ibq is 2.14 uA\n", + "vo1 and vo2 have same value as 10.72 V\n", + " Ad: 86.0 ,Ac: 0.313 and CMRR is 274.0\n", + "Rid is 23.4 K ohms and Ric is 6.44 Mohms\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.7,Page number 373" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "R1=10. #series resistance(K ohms)\n", + "Rf=10**3. #feedback resistance(k ohms) \n", + "vo=-5. #output voltage(V)\n", + "Ri=1000 #input resistance(k ohms)\n", + "Av=2.5*10**5 #gain\n", + "\n", + "#Calculations\n", + "v1=-vo*(R1/Rf) #input signal voltage(V)\n", + "vi=-vo/Av #inverting voltage(V) \n", + "i1=((v1*10**-3)-vi)/R1 #current through R1(uA)\n", + "ii=vi/Ri #inverting current(uA)\n", + "iF=-ii #forward current(uA)\n", + "\n", + "#Results\n", + "print\"value of vi is\",vi,\"mV\"\n", + "print\"value of ii:\",ii,\"uA i1:,\",i1,\"uA and iF is\",iF,\"uA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "value of vi is 2e-05 mV\n", + "value of ii: 2e-08 uA i1:, 3e-06 uA and iF is -2e-08 uA\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.8,Page number 374" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Vs=4 #source voltage(V)\n", + "R1=10. #resistance(k ohms)\n", + "Vb=Va=2 #voltage at point A and point B\n", + "Rf=30 #forward resistance(k ohms)\n", + "\n", + "#Calculations\n", + "I=(Vs-Vb)/R1 #current(mA)\n", + "Vo=(-I*Rf)+Vb #output voltage(V) \n", + "\n", + "#Result\n", + "print\"output voltage\",Vo,\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "output voltage -4.0 V\n" + ] + } + ], + "prompt_number": 45 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.9,Page number 375" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Rf=2 #as vs=2sinwt and vo=(1+Rf/Rs)*vb and vB=vA=vs\n", + "Rs=1\n", + "\n", + "\n", + "#Calculations\n", + "vo=(1+(Rf/Rs))*2 #output voltage(V)\n", + "\n", + "#Result\n", + "print\"output voltage\",vo,\"sinwt\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "output voltage 6 sinwt\n" + ] + } + ], + "prompt_number": 50 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.10,Page number 377" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Ro=100. #output resistance(ohms)\n", + "vo=10. #output voltage(V)\n", + "A=10**5. #gain \n", + "Ri=100*10**3 #input resistance(ohms) \n", + "Rs=1*10**3. #resistance(ohms)\n", + "Rl=10*10**3 #load resistance(ohms)\n", + "\n", + "#Calculations\n", + "#Part i\n", + "iL=vo/Rl #load current(mA)\n", + "Avi=vo+(iL*Ro) #voltage gain without feedback\n", + "vi=Avi/A #voltage(V)\n", + "ii=vi/Ri #current(A) \n", + "vs=vo+ii*(Rs+Ri) #source voltage(V)\n", + "\n", + "#Part ii\n", + "Avf=vo/vs #voltage gain with feedback \n", + "\n", + "\n", + "#Part iii\n", + "Rif=vs/ii #input resistance(ohms) \n", + "Rof=Ro/A #output resistance(ohms)\n", + "\n", + "#Results\n", + "print\"vs is\",round(vs,4),\"V\"\n", + "print\"vo/vs that is Avf is\",Avf\n", + "print\"input and output resistances are\",Rif,Rof,\"ohms\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "vs is 10.0001 V\n", + "vo/vs that is Avf is 0.999989799104\n", + "input and output resistances are 9901091099.01 0.001 ohms\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.11,Page number 382" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Vb=Va=3 #voltage at A and B \n", + "R1=40*10**3. #input resistance(ohms)\n", + "t=50*10**-3 #time after switch is open(mS)\n", + "V1=5 #input voltage(V)\n", + "\n", + "#Calculations\n", + "#Part a\n", + "vo=-3 #as Va=Vb=3\n", + "\n", + "#Part b\n", + "i1=(V1-Vb)/R1 #input current(A)\n", + "vo1=(-250*t)-Va #vo at 50 mS\n", + "\n", + "#Result\n", + "print\"output voltage\",vo1,\"V\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "output voltage -15.5 V\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.14,Page number 388" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "BW=30*10**3 #specified bandwidth(k Hz)\n", + "fc=18*10**3 #centered frequency(Hz)\n", + "R1=20 #resistance(k ohms) \n", + "R2=180 #resistance(k ohms) \n", + "C=1.2*10**-9 #capacitance(F)\n", + "G=40 #pass band gain(dB)\n", + "g=20 #pass region gain(dB)\n", + "\n", + "#Calculationsv\n", + "fc1=fc-(BW/2) #high pass section frequency(Hz)\n", + "fc2=fc+(BW/2) #low pass section frequency(Hz)\n", + "Rfc1=1/(2*math.pi*fc1*C) #high pass section resistance(k ohms)\n", + "Rfc2=1/(2*math.pi*fc2*C) #low pass section resistance(k ohms)\n", + "Gfc1=G-g #gain at frequency 0.3KHz(dB)\n", + "Gfc2=G-2*6 #gain at frequency 132KHz(dB)\n", + "\n", + "#Results\n", + "print\"R1 and R2 are\",R1,\"K ohms and\",R2,\"K ohms\"\n", + "print\"Rfc1 is\",round(Rfc1/1E+3),\"k ohms and Rfc2 is\",round(Rfc2/1E+3),\"k ohms\"\n", + "print\"filter gain at frequencies 0.3 KHz is\",Gfc1,\"dB and 132 k Hz are\",Gfc2,\"dB\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R1 and R2 are 20 K ohms and 180 K ohms\n", + "Rfc1 is 44.0 k ohms and Rfc2 is 4.0 k ohms\n", + "filter gain at frequencies 0.3 KHz is 20 dB and 132 k Hz are 28 dB\n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.21,Page number 402" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "R=250 #resistance(k ohms)\n", + "\n", + "#Calculations\n", + "#part a\n", + "R1=-R/(-5) #as vo=-5va+3vb(given),so when vb=0,vo/voa=-250/R1=-5\n", + "\n", + "#part b\n", + "R2=R1/(2-1) #as va=0\n", + " #vx=(R1/R1+R)*vob=(1/6)*vb\n", + " #vy=(R2/R1+R2)*vb\n", + " #vx=vy\n", + " #(1/6)*vob=(R2/R1+R2)*vb\n", + " #vob=3vb\n", + " #(1/6)*3=R2/(50+R2)\n", + " \n", + "#Result\n", + "print\"R1 and R2 are\",R1,\"K ohms and\",R2,\"K ohms\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "R1 and R2 are 50 K ohms and 50 K ohms\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.22,Page number 403" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "R1=10*10**3 #resistance(k ohms)\n", + "C1=10**-6 #capacitance(uF) \n", + "C=0.1*10**-6 #capacitance(uF) \n", + "R=100*10**3 #resistance(k ohms) \n", + "\n", + "#Calculations\n", + "#part b \n", + "wc1=1/C1*R1 #angular frequency(rad/s)\n", + "wc2=1/C*R #angular frequency(rad/s)\n", + "wc=wc1=wc2 #angular frequency(rad/s)\n", + "\n", + "#Results\n", + "print\"wc1 is\",wc1/1E+10,\"rad/s\"\n", + "print\"wc2 is\",wc2/1e+10,\"rad/s\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "wc1 is 100.0 rad/s\n", + "wc2 is 100.0 rad/s\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 7.23,Page number 404" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "vo1=5 #say (V)\n", + "K=25 #proportionality constant \n", + "Q=250 #volume of fluid passed across metering point(cm^3) \n", + "R1=2.5 #output resistance(k ohms)\n", + "\n", + "#Calculations\n", + "C1=(K*Q)/(R1*vo1) #capacitor(nF)\n", + "\n", + "#Results\n", + "print\"C1 is\",round(C1/1E+1),\"uF\"\n", + "print\"vo1 is -5V when Q=250 cm^3\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "C1 is 50.0 uF\n", + "vo1 is -5V when Q=250 cm^3\n" + ] + } + ], + "prompt_number": 6 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Electronic_Devices_and_Circuits_By_I.JNagrath/chapter8.ipynb b/Electronic_Devices_and_Circuits_By_I.JNagrath/chapter8.ipynb new file mode 100755 index 00000000..326b2cab --- /dev/null +++ b/Electronic_Devices_and_Circuits_By_I.JNagrath/chapter8.ipynb @@ -0,0 +1,435 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:7039c5014fcc7b7ac57b07f9ca218d5a9c1cf6429694e23e4e8bce3552a45c07" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 8:Multivibrators And Switching Regulators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.1,Page number 426" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "C=0.1 #capacitance(uF)\n", + "R1=10 #resistance(k ohms)\n", + "R2=2.3 #resistance(k ohms)\n", + "Vcc=12. #supply voltage(V) \n", + "Rl=10**3. #resistance(k ohms)\n", + "\n", + "#Calculations\n", + "#Part a\n", + "f=1/(0.693*C*(R2+R1/2)) #frequency(Hz)\n", + "\n", + "#Part b\n", + "D=(1+(R2/R1))/(1+2*(R2/R1))*100 #duty cycle\n", + " \n", + "#Part c\n", + "#(i)\n", + "T1=0.693*C*(R1+R2) #time period through R1(ms)\n", + "T2=0.693*R2*C #time period through R2(ms)\n", + "Pavg=(Vcc/Rl)**2*(T1/(T1+T2)) #average power dissipated during current sourcing(mW)\n", + "\n", + "#Part d\n", + "Pavg1=(T2/(T1+T2))*(Vcc/Rl)**2 #average power dissipated during current sinking(mW)\n", + "\n", + "#Results\n", + "print\"print\",round(f,2),\"kHz\"\n", + "print\"duty cycle is\",round(D,2),\"%\"\n", + "print\"average power dissipated in current sourcing is\",round((Pavg/1E-3),3),\"mW\"\n", + "print\"average power dissipated in current sinking is\",round(Pavg1/1e-3,3),\"mW\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "print 1.98 kHz\n", + "duty cycle is 84.25 %\n", + "average power dissipated in current sourcing is 0.121 mW\n", + "average power dissipated in current sinking is 0.023 mW\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.2,Page number 426" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math \n", + "\n", + "#Variable declaration\n", + "t=1 #time constant\n", + "e=1.8 #e=R1/R2 min=1.8\n", + "e1=9. #e1=R1/R2 max=9\n", + "\n", + "#Calculations\n", + "Betamin=1/(1+e) #current gain minimum\n", + "Betamax=1/(1+e1) #current gain maximum\n", + "Tmax=2*t*math.log((1+Betamin)/(1-Betamin)) \n", + "Tmin=2*t*math.log((1+Betamax)/(1-Betamax)) \n", + "fmin=1/Tmax #minimum freq(Hz)\n", + "fmax=1/Tmin #maximum freq(k Hz)\n", + "\n", + "#Results\n", + "print\"fmin is\",round(fmin/1E-3),\"Hz and fmax is\",round(fmax,1),\"KHz\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "fmin is 669.0 Hz and fmax is 2.5 KHz\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.3,Page number 427" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "\n", + "#Variable declaration\n", + "C=0.01 #capacitance(uF)\n", + "R2=15 #resistance(k ohms)\n", + "Va2=4 #voltage(V)\n", + "Vcc=15. #supply voltage(V)\n", + "R1=33 #resistance(k ohms)\n", + "\n", + "#Calculations\n", + "Va1=0.67*Vcc #voltage(V)\n", + "Vamax=Va1+Va2 #Va maximum(V)\n", + "Vamin=Va1-Va2 #Va minimum(V)\n", + "T1max=C*(R1+R2)*(math.log((1-(Vamax/(2*Vcc)))/(1-(Vamax/Vcc)))) #time period(ms)\n", + "T1min=C*(R1+R2)*(math.log((1-(Vamin/(2*Vcc)))/(1-(Vamin/Vcc)))) #time period(ms)\n", + "T2=0.693*R2*C\n", + "fmax=1/(T1min+T2) #maximum frequency(K Hz)\n", + "fmin=1/(T1max+T2) #miniimum frequency(K Hz)\n", + "\n", + "#Results\n", + "print\"minimum freq is\",round(fmin,2),\"(solution given in the textbook is incorrect)\"\n", + "print\"maximum freq is\",round(fmax,2),\"(solution given in the textbook is incorrect)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "minimum freq is 0.89 (solution given in the textbook is incorrect)\n", + "maximum freq is 4.1 (solution given in the textbook is incorrect)\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.4,Page number 433" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Vi=25 #input voltage(V) \n", + "Vsmax=30 #supply voltage max(V)\n", + "Vomin=Vl=12 #output minimum voltage or load voltage(V)\n", + "R1=20 #load voltage(V)\n", + "Io=15. #output current(mA) \n", + "Iq=3. #quinscent current of regulator(mA)\n", + "Vo=20. #output voltage(V)\n", + "\n", + "#Calculations\n", + "#Part a\n", + "#(i)\n", + "Vimax=Vsmax #maximum permissible voltage(V)\n", + "Ro=0 #for Vomin=beta=0\n", + "#(ii)\n", + "Vomax=Vi-2\n", + "betaVomax=Vomax-Vomin #output voltage(V)\n", + "R2max=(R1*betaVomax)/(Vomax-betaVomax) #R2max(k ohms)\n", + "#(iii)\n", + "R3=betaVomax/Io #R3(k ohms)\n", + "\n", + "#Part b\n", + "Vt=(Iq*betaVomax)/Io #common terminal fall(V)\n", + "Vomin1=Vl+Vt #voltage output minimum(V)\n", + "\n", + "#Part c\n", + "betaVo=Vo-Vl #output voltage(V)\n", + "beta=betaVo/Vo #current gain\n", + "R2=(R1*betaVo)/(Vo-betaVo) #R2(ohms)\n", + "\n", + "#Results\n", + "print\"a)i)max permissible supply voltage is\",Vimax,\"V\"\n", + "print\"ii)output voltage range for Vi=25V is\",Vomin,\"V to\",Vomax,\"V and R2max is\",R2max,\"k ohms\"\n", + "print\"iii)R3 is\",round(R3,2),\"kohms\"\n", + "print\"b)Vomin is\",Vomin1,\"V\"\n", + "print\"c)R2 is\",round(R2,2),\"ohms and R3 is\",round(R3,3),\"ohms\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "a)i)max permissible supply voltage is 30 V\n", + "ii)output voltage range for Vi=25V is 12 V to 23 V and R2max is 18 k ohms\n", + "iii)R3 is 0.73 kohms\n", + "b)Vomin is 14.2 V\n", + "c)R2 is 13.33 ohms and R3 is 0.733 ohms\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.5,Page number 434" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "A=.0025 #voltage gain\n", + "Vi=8 #input voltage(V)\n", + "R2=1.5 #resistance 2(k ohms)\n", + "R1=1 #resistance 1(k ohms)\n", + "Vl=5 #load voltage(V)\n", + "\n", + "#Calculations\n", + "beta=R2/(R1+R2) #current gain\n", + "Vo=Vl/(1-beta) #output voltage(V)\n", + "Vo1=(A*Vi)/(1+(A*beta)-beta) #output voltage ripple if Vi=8Vp-p\n", + "\n", + "#Results\n", + "print\"Vo is\",Vo,\"V\"\n", + "print\"expression of output voltage ripple\",round(Vo1,2),\"Vp-p\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Vo is 12.5 V\n", + "expression of output voltage ripple 0.05 Vp-p\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.6,Page number 435" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Ro=7.5 #output resistance(ohms)\n", + "hfe=50 \n", + "Ve=20 #voltage given to emitter(V) \n", + "Vbe=0.8 #base to emitter voltage(V)\n", + "Vc=15 #collector voltage(V)\n", + "P=12 #maximum power dissipation(W)\n", + "Ib1=5 #for minimum load current Il=0,Ib=5\n", + "\n", + "#Calculations\n", + "Io=(Vc/Ro)*10**3 #output current(A)\n", + "Il=76 #load current(mA)\n", + "Is=Il+5 #supply current(mA)\n", + "Ic=Io-Is #collector current(A)\n", + "Ib=Ic/hfe #base current(mA)\n", + "Ie=Ic-Ib #emitter current(mA)\n", + "Pt=(Ve*Ie)-(Vc*Ic) #power dissipated in transistor(W) \n", + "Pl=(Ve-Vbe)*Is-Vc*Il #power dissipated in LR\n", + "Vimax=(P+Vc*(Ic*10**-3))/(Ie*10**-3) #input voltage maximum\n", + "Iomin=hfe*Ib1 #output current minimum(mA)\n", + "\n", + "#Results\n", + "print\"power dissipated in the transistor is\",round((Pt/1E+3),2),\"W and in LR is\",round((Pl/1E+3),3),\"W\"\n", + "print\"maximum permissible input voltage is\",round(Vimax,2),\"V\"\n", + "print\"minimum load current for load voltage to remain stabalized is\",Iomin,\"mA\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "power dissipated in the transistor is 8.83 W and in LR is 0.415 W\n", + "maximum permissible input voltage is 21.69 V\n", + "minimum load current for load voltage to remain stabalized is 250 mA\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.7,Page number 440" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "VL=12 #load voltage(V)\n", + "I=2. #current at 12 V\n", + "V=240 #dc source(V)\n", + "d=17/50. #duty cycle\n", + "d1=0.6 #duty cycle\n", + "eta1=0.8 #efficiency\n", + "\n", + "#Calculations\n", + "P=VL*I #average load power(W)\n", + "Isav=(1*d)/2 #average supply current(A)\n", + "Pav=V*Isav #average supply power(W)\n", + "eta=(P/Pav)*100 #regulator efficiency\n", + "Isav1=(1*d1)/2 #average supply current(A)\n", + "Il=(eta1*V*Isav1)/Vdc #load current(A)\n", + "Po=Il*Vdc #power output(W)\n", + "\n", + "#Results\n", + "print\"regulator efficiency is\",round(eta,1),\"%\"\n", + "print\"average supply current is\",Il,\"A\"\n", + "print\"power output is\",Po,\"W\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "regulator efficiency is 58.8 %\n", + "average supply current is 4.8 A\n", + "power output is 57.6 W\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 8.8,Page number 441" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "Vs=200 #dc source voltage(V)\n", + "Il=5 #current to load voltage(A)\n", + "Vl=15 #load voltage(V)\n", + "eta=.85 #efficiency\n", + "f=20 #oscillator frequency(Hz)\n", + "iSmax=2.6 #peak value of supply current(A)\n", + "P=100 #full load power supply(W)\n", + "pdf=0.4 #pulse duty factor\n", + "\n", + "#Calculations\n", + "Isav=(Vl*Il)/(Vs*eta) #average peak supply current(A)\n", + "iS=(2*Isav)/pdf #supply current(A)\n", + "T=1000/f #oscillation time period(uS)\n", + "tp=pdf*T #transistor time(us)\n", + "d=iS/tp #change in iS with respect to time(A/us)\n", + "tp1=iSmax/d #transistor time(us)\n", + "pdf1=tp1/T #pulse duty factor\n", + "Isav1=(iSmax*pdf1)/2 #average peak supply current(A)\n", + "eta1=(P*100)/(Vs*Isav1) #efficiency\n", + "\n", + "#Results\n", + "print\"peak value of supply current is\",round(Isav,3),\"A\"\n", + "print\"pdf is\",round(pdf,3)\n", + "print\"overall efficienc is\",round(eta1,1),\"%\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "peak value of supply current is 0.441 A\n", + "pdf is 0.4\n", + "overall efficienc is 81.6 %\n" + ] + } + ], + "prompt_number": 3 + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Electronic_Devices_and_Circuits_By_I.JNagrath/chapter9.ipynb b/Electronic_Devices_and_Circuits_By_I.JNagrath/chapter9.ipynb new file mode 100755 index 00000000..496c5c11 --- /dev/null +++ b/Electronic_Devices_and_Circuits_By_I.JNagrath/chapter9.ipynb @@ -0,0 +1,189 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:6d01f2ecc4d9a69a4f181f319c5918acedc473286b2890ff9741394369b9b17a" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter 9:Integrated Circuit Fabrication" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.2,Page number 470" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "t=1 #thickness(mil) \n", + "e=1.6*10**-19 #charge on electron(C)\n", + "Pp=10**17 #concentration of phosphorous(atoms/cm^3)\n", + "Bn=5*10**16 #boron concentration(atoms/cm^3)\n", + "un=.135 #mobility(m^2/Vs)\n", + "\n", + "#Calculations\n", + "n=(Pp-Bn)*10**6 #net concentration(atoms/cm^3)\n", + "g=e*un*n #conductivity()\n", + "rho=10**6/(g*25) #resistivity(ohm mil)\n", + "Rs=rho/t #sheet resistance(ohm mil^2)\n", + "\n", + "#Results\n", + "print\"Sheet resistance is\",round(Rs),\"ohm(mil**2)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Sheet resistance is 37.0 ohm(mil**2)\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.3,Page number 471" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "R=20*10**3 #resistance of resistor(ohms)\n", + "w=25 #width(um)\n", + "Rs=200 #sheet resistance(ohm/square)\n", + "R1=5*10**3 #resistance(ohms)\n", + "\n", + "#Calculations\n", + "#Part a\n", + "l=(R*w)/Rs #length required to fabricate 20 kohms(um)\n", + "\n", + "#Part b\n", + "L=25 #length of resistor of 5 k ohms(um)\n", + "w1=(Rs*L)/R1 #width required to fabricate 5 kohms(um)\n", + "#Results\n", + "print\"length required to fabricate 20 kohms resistor is\",l,\"um\"\n", + "print\"width required to fabricate 5 kohms resistor is\",w1,\"um\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "length required to fabricate 20 kohms resistor is 2500 um\n", + "width required to fabricate 5 kohms resistor is 1 um\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.4,Page number 471" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "C=0.4*10**-12 #capacitance(pF/um^2)\n", + "A=10**-12 #area of film(m^2)\n", + "d=400*10**-10 #thickness of SiO2(amstrong)\n", + "Eo=8.849*10**-12 #absolute electrical permitivity of free space\n", + "\n", + "#Calculations\n", + "Er=(C*d)/(Eo*A) #relative dielectric constant\n", + "\n", + "#Results\n", + "print\"relative dielectric constant of SiO2 is\",round(Er),\"(Solution given in the textbook is incorrect)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "relative dielectric constant of SiO2 is 1808.0 (Solution given in the textbook is incorrect)\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Example 9.5,Page number 471" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Variable declaration\n", + "C=250*10**-12 #capacitance(pF)\n", + "d=500*10**-10 #thickness of SiO2 layer(amstrong)\n", + "Eo=8.849*10**-12 #absolute electrical permitivity of free space\n", + "Er=3.5 #relative dielectric constant\n", + "\n", + "#Calculations\n", + "A=(C*d)/(Eo*Er) #chip area(um^2)\n", + "\n", + "#Results\n", + "print\"chip area needed for a 250 pF MOS capacitor\",round(A/1e-7,2),\"(um)^2(Solution given in the textbook is incorrect)\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "chip area needed for a 250 pF MOS capacitor 4.04 (um)^2(Solution given in the textbook is incorrect)\n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [], + "language": "python", + "metadata": {}, + "outputs": [] + } + ], + "metadata": {} + } + ] +} \ No newline at end of file diff --git a/Electronic_Devices_and_Circuits_By_I.JNagrath/screenshots/screen1.png b/Electronic_Devices_and_Circuits_By_I.JNagrath/screenshots/screen1.png new file mode 100755 index 00000000..d310f422 Binary files /dev/null and b/Electronic_Devices_and_Circuits_By_I.JNagrath/screenshots/screen1.png differ diff --git a/Electronic_Devices_and_Circuits_By_I.JNagrath/screenshots/screen2.png b/Electronic_Devices_and_Circuits_By_I.JNagrath/screenshots/screen2.png new file mode 100755 index 00000000..a92b49eb Binary files /dev/null and b/Electronic_Devices_and_Circuits_By_I.JNagrath/screenshots/screen2.png differ diff --git a/Electronic_Devices_and_Circuits_By_I.JNagrath/screenshots/screen3.png b/Electronic_Devices_and_Circuits_By_I.JNagrath/screenshots/screen3.png new file mode 100755 index 00000000..fc6fdd99 Binary files /dev/null and b/Electronic_Devices_and_Circuits_By_I.JNagrath/screenshots/screen3.png differ -- cgit