summaryrefslogtreecommitdiff
path: root/Electronic_devices_and_circuits
diff options
context:
space:
mode:
Diffstat (limited to 'Electronic_devices_and_circuits')
-rwxr-xr-xElectronic_devices_and_circuits/Chapter2.ipynb567
-rwxr-xr-xElectronic_devices_and_circuits/Chapter6.ipynb545
-rwxr-xr-xElectronic_devices_and_circuits/README.txt10
-rwxr-xr-xElectronic_devices_and_circuits/chapter1.ipynb1579
-rwxr-xr-xElectronic_devices_and_circuits/chapter10.ipynb458
-rwxr-xr-xElectronic_devices_and_circuits/chapter11.ipynb170
-rwxr-xr-xElectronic_devices_and_circuits/chapter3.ipynb1540
-rwxr-xr-xElectronic_devices_and_circuits/chapter4.ipynb1211
-rwxr-xr-xElectronic_devices_and_circuits/chapter5.ipynb653
-rwxr-xr-xElectronic_devices_and_circuits/chapter7.ipynb645
-rwxr-xr-xElectronic_devices_and_circuits/chapter8.ipynb435
-rwxr-xr-xElectronic_devices_and_circuits/chapter9.ipynb181
-rwxr-xr-xElectronic_devices_and_circuits/screenshots/Power-_dissipated.pngbin0 -> 62475 bytes
-rwxr-xr-xElectronic_devices_and_circuits/screenshots/critical-frequency.pngbin0 -> 203777 bytes
-rwxr-xr-xElectronic_devices_and_circuits/screenshots/output-voltage.pngbin0 -> 50549 bytes
15 files changed, 7994 insertions, 0 deletions
diff --git a/Electronic_devices_and_circuits/Chapter2.ipynb b/Electronic_devices_and_circuits/Chapter2.ipynb
new file mode 100755
index 00000000..4eb7e136
--- /dev/null
+++ b/Electronic_devices_and_circuits/Chapter2.ipynb
@@ -0,0 +1,567 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:7b8ef11e11019a3b1cc284475151e0d8bb5d6632f9c468e0f90289ce47134c38"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ " Chapter 2: TRANSISTORS AND OTHER DEVICES"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.1,Page number 89"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Rb=200 #base resistance(ohm)\n",
+ "Vbe=0.7 #base emitter voltage drop(V) in active region \n",
+ "Vbb=5 #base voltage of bipolar transistor(V) \n",
+ "beeta=100 #current gain\n",
+ "Rc=3 #collector resistance(k ohms)\n",
+ "Vcc=10 #voltage given to the collector(V)\n",
+ "\n",
+ "#Calculations\n",
+ "Ib=(Vbb-Vbe)/Rb #base current(mA) \n",
+ "Ic=beeta*Ib #collector current(mA) \n",
+ "Vcb=-Vbe-(Rc*Ic)+Vcc #collector base voltage drop(V)\n",
+ "\n",
+ "#Results\n",
+ "print\"base current\",Ib,\"mA\" \n",
+ "print\"collector current\",Ic,\"mA\"\n",
+ "print\"reverse bias collector junction is\",Vcb,\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "base current 0.0215 mA\n",
+ "collector current 2.15 mA\n",
+ "reverse bias collector junction is 2.85 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2,Page number 90"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vbb=5 #base voltage of bipolar transistor(V)\n",
+ "Vbe=0.7 #base emitter voltage drop(V) in active region \n",
+ "Rb=150 #base resistance(ohm)\n",
+ "beeta=125 #curret gain \n",
+ "Rc=3 #collector resistance(k ohms) \n",
+ "Vcc=10 #supply voltage(V)\n",
+ "Vce=0.2 #collector to emitter voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Ib=(Vbb-Vbe)/Rb #base current(mA)\n",
+ "Ic=beeta*Ib #collector current(mA)\n",
+ "Vcb=-Vbe-(Rc*Ic)+Vcc #collector base voltage drop(V)\n",
+ "\n",
+ "#Part b -for npn transistor\n",
+ "Vbe=0.8 #base emitter voltage drop(V) in saturation\n",
+ "Ic=(Vcc-Vce)/Rc #collector current(mA)\n",
+ "Ib=(Vbb-Vbe)/Rb #base current(mA)\n",
+ "Ibmin=Ic/beeta #minimum base current(mA) to go into saturation(mA)\n",
+ "\n",
+ "#Results\n",
+ "print\"In active region, base current is\",round(Ib/1E-3),\"*10**-3 mA and collector current is\",round(Ic,2),\"mA\" \n",
+ "print\"base current and collector current in npn are\",round((Ib/1E-3),2),\"*10**-3 mA\",\"and\",round(Ic,2),\"mA resp.\"\n",
+ "print\"base current minimum is\",round(Ibmin,3),\"mA\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "In active region, base current is 28.0 *10**-3 mA and collector current is 3.27 mA\n",
+ "base current and collector current in npn are 28.0 *10**-3 mA and 3.27 mA resp.\n",
+ "base current minimum is 0.026 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.3,Page number 91"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vbb=5 #base voltage of bipolar transistor(V)\n",
+ "Vbe=0.7 #base emitter voltage drop(V) in active region \n",
+ "Rb=50 #base resistance(ohm)\n",
+ "beeta=50 #current gain\n",
+ "Re=1.8 #emitter resistance(k ohms) \n",
+ "Vcc=10 #supply voltage(V)\n",
+ "Vce=0.2 #collector to emitter voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "Ib=(Vbb-Vbe)/(Rb+Re*(beeta+1)) #base current(mA)\n",
+ "Ic=beeta*Ib #collector current(mA)\n",
+ "Ie=Ib+Ic #emitter current(mA)\n",
+ "\n",
+ "#Results\n",
+ "print\"values are Ib:\",round(Ib,2),\"mA,Ic:\",round(Ic,2),\"mA and Ie:\",round(Ie,2),\"mA\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "values are Ib: 0.03 mA,Ic: 1.52 mA and Ie: 1.55 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.4,Page number 91"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vbe=0.7 #base to emitter voltage(V)\n",
+ "Rb=250 #base resistance(k ohms)\n",
+ "Vcc=10 #supply voltage(V)\n",
+ "Rl=0.5 #load resistance(k ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "Ic=Vcc/Rl #collector current(mA)\n",
+ "IbQ=(Vcc-Vbe)/Rb #Ib at operating point(uA)\n",
+ "IcQ=8 #Ic at operating point(mA)\n",
+ "VceQ=6 #Vce at operating point(V)\n",
+ "\n",
+ "#Results\n",
+ "print\"values are IbQ:\",IbQ,\"uA,IcQ:\",IcQ,\"mA and Vcc:\",Vcc,\"V\"\n",
+ "print\"collector current Ic is\",Ic,\"mA and output voltage,vL=6-2 sinwt V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "values are IbQ: 0.0372 uA,IcQ: 8 mA and Vcc: 10 V\n",
+ "collector current Ic is 20.0 mA and output voltage,vL=6-2 sinwt V\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.5,Page number 104"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vgs=12 #gate to source voltage(V)\n",
+ "Vt=4 #threshold voltage(V)\n",
+ "Id=12.8 #drain current(mA)\n",
+ "K=0.0002 #device parameter \n",
+ "Vdd=24 #drain voltage(V)\n",
+ "Vds=Vgs=8 #drain to source voltage(V) \n",
+ "\n",
+ "#Calculations\n",
+ "Id=K*((Vds-Vt)**2) #drain current at Vds=8V\n",
+ "Rd=(Vdd-Vds)/Id #drain resistance(k ohms)\n",
+ "\n",
+ "#Result\n",
+ "print\"diode resistance is\",Rd,\"ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "diode resistance is 5000.0 ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.7,Page number 106"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vds=7.5 #drain to source voltage(V)\n",
+ "Id=5 #drain current(mA) \n",
+ "\n",
+ "#Calculations\n",
+ "Vgs=-1.5 #gate to source voltage(V)\n",
+ "Vgg=-Vgs #gate voltage=gate to source voltage(V) \n",
+ "\n",
+ "#Result\n",
+ "print\"gate voltage is\",Vgg,\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "gate voltage is 1.5 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.8,Page number 107"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vds=7.5 #drain to source voltage(V)\n",
+ "Idss=8. #drain current for Vgs(V)\n",
+ "Vgs=2. #gate to source voltage(V)\n",
+ "Vp=4. #peak voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "Id=Idss*((Vp-Vgs)/Vp)**2 #drain current(mA)\n",
+ "\n",
+ "#Result\n",
+ "print\"diode current is\",Id,\"mA\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "diode current is 2.0 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.10,Page number 115"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "beeta=160 #current gain\n",
+ "Vee=10 #emitter voltage(V)\n",
+ "Rb=400 #base resistance(k ohms)\n",
+ "Veb=0.8 #emitter to base voltage(V)\n",
+ "Re=2.5 #emitter resistance(k ohms)\n",
+ "Rc=1.5 #collector resistance(k ohms) \n",
+ "\n",
+ "#Calculations\n",
+ "#Part a \n",
+ "Ib=(Vee-Veb)/((Re*(1+beeta))+Rb) #base current(uA)\n",
+ "Ic=beeta*Ib #collector current(mA)\n",
+ "Ie=(beeta+1)*Ib #emitter current(mA) \n",
+ "Vce=Vee-(Re*Ie)-(Rc*Ic) #emitter to collector voltage(V) \n",
+ "Vce=-Vce #collector to emitter voltage(V)\n",
+ "\n",
+ "#Part b\n",
+ "beeta=80 #current gain \n",
+ "Ib1=(Vee-Veb)/((Re*(1+beeta))+Rb) #base current(uA)\n",
+ "Ic1=beeta*Ib1 #collector current(mA)\n",
+ "Ie1=(beeta+1)*Ib1 #emitter current(mA) \n",
+ "Vce1=-(Vee-(Ie1*Re)-(Rc*Ic1)) #collector to emitter voltage(V) \n",
+ " \n",
+ "#Result\n",
+ "print\"collector current and Vce for beeta=160 are\",round(Ic,2),\"mA\",\"and\",round(Vce,2),\"V\" \n",
+ "print\"Ic and Vce for beeta=80 are\",round(Ic,2),\"mA\",\"and\",round(Vce1,2),\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "collector current and Vce for beeta=160 are 1.83 mA and -2.63 V\n",
+ "Ic and Vce for beeta=80 are 1.83 mA and -5.08 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.13,Page number 120"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from sympy import*\n",
+ "import math \n",
+ "\n",
+ "#Variable declaration\n",
+ "K=2 #device parameter\n",
+ "Rd=Rs=2.5*10**3 #drain resistance(k ohms)\n",
+ "R1=100*10**3 #resistance(ohms)\n",
+ "R2=200*10**3 #resistance(ohms)\n",
+ "Vdd=12 #drain voltage(V)\n",
+ "Vt=4 #threshold voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "Vgg=(R2*Vdd)/(R1+R2)\n",
+ "Id=symbols('Id') #gate voltage(V)\n",
+ "expr=solve(Id**2-3.28*Id+2.56,Id)\n",
+ "print expr\n",
+ "Id=1.28\n",
+ "Vds=Vdd-5*Id\n",
+ "\n",
+ "#Result\n",
+ "print\"Id is\",Id,\"mA and Vds is\",Vds,\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "[1.28000000000000, 2.00000000000000]\n",
+ "Id is 1.28 mA and Vds is 5.6 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.14,Page number 121"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "k=2. #device parameter\n",
+ "Vt=-1. #threshold voltage(V)\n",
+ "Vdd=-12. #drain voltage(V)\n",
+ "R1=300. #resistance(kohms)\n",
+ "R2=100. #resistance(kohms)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Vgs=-2 #gate to source voltage(V)\n",
+ "Vgg=(R2*Vdd)/(R1+R2) #gate voltage(V)\n",
+ "Id=k*((Vgs-Vt)**2) #drain current(mA)\n",
+ "Rs=(Vgs-Vgg)/Id #source resistance(k ohms) as Id=Is,Kvl in GS loop\n",
+ "Is=Id\n",
+ "\n",
+ "#Part b\n",
+ "Vds=-4 #drain to source voltage(V)\n",
+ "Rd=(-Vdd+Vds-(Is*Rs))/Id #applying kvl in DS loop\n",
+ "\n",
+ "#Part c \n",
+ "Vt=-1.5 #threshold voltage(V) \n",
+ "Vgg=-1.5 #gate voltage using Id formula \n",
+ "R2new=(Vgg*R1)/(Vdd-Vgg) #new resistance(k ohms)\n",
+ "\n",
+ "#Results\n",
+ "print\"a)source resistance is\",Rs,\"kohm\" \n",
+ "print\"b)drain resistance is\",Rd,\"kohm\"\n",
+ "print\"c)R2new is\",round(R2new,2),\"kohm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a)source resistance is 0.5 kohm\n",
+ "b)drain resistance is 3.5 kohm\n",
+ "c)R2new is 42.86 kohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.15,Page number 122"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vp=-4 #peak voltage(V)\n",
+ "Idss=10 #drain current for Vgs(V)\n",
+ "Vdd=18 #drain voltage(V) \n",
+ "Rs=2 #source resistance(ohms) \n",
+ "Rd=2 #drain resistance(ohms)\n",
+ "R1=450*10**3 #resistance(ohms)\n",
+ "R2=90*10**3 #resistance(ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "Vgg=(R2*Vdd)/(R1+R2)\n",
+ "from sympy import*\n",
+ "Id=symbols('Id')\n",
+ "expr=solve(20*Id**2-148*Id+245,Id)\n",
+ "print expr\n",
+ "Id1=2.5\n",
+ "Vds=Vdd-((Rs+Rd)*Id1)\n",
+ "\n",
+ "#Result\n",
+ "print\"Id is\",Id1,\"mA and Vds is\",Vds,\"V\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "[5/2, 49/10]\n",
+ "Id is 2.5 mA and Vds is 8.0 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.16,Page number 123"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vp=4 #peak voltage(V)\n",
+ "Idss=12. #drain current for Vgs(V) \n",
+ "Vdd=12 #drain voltage(V)\n",
+ "Id=4. #drain current(mA)\n",
+ "Vds=6 #drain to source voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "Rs=(Vp/4)*(1-(math.sqrt(Id/Idss))) #by Id=Idss(1-(Vgs/Vp))^2 and putting Vgs=4Rs in it and solving\n",
+ "Rd=((Vdd+Vds)/Id)-Rs #solving equation -Vdd-Vds+(Id*(Rd+Rs))=0 \n",
+ " \n",
+ "#Result\n",
+ "print\"source resistance is\",round(Rs,2),\"kohm\" \n",
+ "print\"drain resistance\",round(Rd,2),\"kohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "source resistance is 0.42 kohm\n",
+ "drain resistance 4.08 kohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_devices_and_circuits/Chapter6.ipynb b/Electronic_devices_and_circuits/Chapter6.ipynb
new file mode 100755
index 00000000..721c027d
--- /dev/null
+++ b/Electronic_devices_and_circuits/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/README.txt b/Electronic_devices_and_circuits/README.txt
new file mode 100755
index 00000000..a1209df3
--- /dev/null
+++ b/Electronic_devices_and_circuits/README.txt
@@ -0,0 +1,10 @@
+Contributed By: nikita jagdale
+Course: be
+College/Institute/Organization: Bapurao deshmukh college of engg.,nagpur university
+Department/Designation: Electronics
+Book Title: Electronic devices and circuits
+Author: I.J Nagrath
+Publisher: Prentice-Hall of India Pvt.Ltd
+Year of publication: 2012
+Isbn: 978-81-203-3195-2
+Edition: 1st \ No newline at end of file
diff --git a/Electronic_devices_and_circuits/chapter1.ipynb b/Electronic_devices_and_circuits/chapter1.ipynb
new file mode 100755
index 00000000..f90f9ea5
--- /dev/null
+++ b/Electronic_devices_and_circuits/chapter1.ipynb
@@ -0,0 +1,1579 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:24516babfb49304af52e8c58a067e6fa8878e66215919fc53473493b16a99fdf"
+ },
+ "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 0<Vs<0.7\n",
+ "I2=0 #current through D2 and D3\n",
+ "I1=I2=(Vcc-Vt-Vs)/R #for Vs>0.7 as D2 and D3 conducts\n",
+ "\n",
+ "#Results\n",
+ "print\"I1 for 0<Vs<0.7 is\",I1,\"mA\"\n",
+ "print\"I2 for 0<Vs<0.7 is\",I2,\"mA\"\n",
+ "print\"I1 and I2 for Vs>0.7 is\",I1,\"mA\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "I1 for 0<Vs<0.7 is 3.6 mA\n",
+ "I2 for 0<Vs<0.7 is 0 mA\n",
+ "I1 and I2 for Vs>0.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 <V2/V1|w=628 =180\n",
+ "v2(t)=72.02+0.0538 cos628t\n",
+ "'''\n",
+ "#Part b\n",
+ "vrms=0.0538\n",
+ "vdc=math.sqrt(2)*72.02\n",
+ "r=vrms/vdc\n",
+ "\n",
+ "#Results\n",
+ "print\"ripple factor is\",round((r/1E-4),2),\"*10**-4\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ripple factor is 5.28 *10**-4\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.24,Page number 61"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vz=2 #zener voltage(V)\n",
+ "r1=10 #resistance after reducing circuit by thevinin(ohms)\n",
+ "r2=20 #resistance after reducing circuit by thevinin(ohms)\n",
+ "V1=7.5 #voltage after circuit reduction(V)\n",
+ "V2=15 #voltage after circuit reduction(V)\n",
+ "Rz=100/3 #zener resistance(ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "Vab=V2-(((V2-V1)/(r1+r2))*r2) #thevinin voltage at ab(V)\n",
+ "Rth=(Vab*r2)/(Vab+r2) #thevinin resistance at ab(ohms)\n",
+ "Vd=Vab-Vz #diode voltage(V)\n",
+ "Id=Vd/(Rth+Rz) #diode current(A)\n",
+ "\n",
+ "#Results\n",
+ "print\"diode current is\",round(Id,2),\"A\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "diode current is 0.2 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.25,Page number 61"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vd=0.7 #diode voltage(V)\n",
+ "Ro=18 #output resistance(k ohms)\n",
+ "R1=2 #diode1 resistance(k ohms)\n",
+ "R2=2 #diode2 resistance(k ohms) \n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "V1=10 #voltage to D1(V)\n",
+ "V2=0 #voltage to D2(V)\n",
+ "Io=(V1-Vd)/(R1+Ro) #output current(mA) \n",
+ "Vo=Io*Ro #output voltage(V)\n",
+ "\n",
+ "#Part b\n",
+ "V1=5 #voltage to D1(V)\n",
+ "V2=0 #voltage to D2(V)\n",
+ "Io=(V1-Vd)/(R1+Ro) #output current(mA) \n",
+ "Vo1=Io*Ro #output voltage(V)\n",
+ "\n",
+ "#Part c\n",
+ "V1=10 #voltage to D1(V)\n",
+ "V2=5 #voltage to D2(V)\n",
+ "Vo=8.37 #as D1 only conducts,so,Vo is same as in part a\n",
+ "Vd1=V2-Vo #assume D1 conducts\n",
+ "Vo2=8.37 #D2 does not conduct as as Vd1 is negative\n",
+ "\n",
+ "#Part d\n",
+ "V1=V2=5 #voltage to D1 and D2(V) \n",
+ "Id1=(V1-Vd-Vo)/2 #diode1 current(mA) \n",
+ "Io=Vo/Ro #output current(mA) \n",
+ "Vo3=(Ro*(V1-Vd))/(Ro+1) #output voltage(V)\n",
+ "\n",
+ "print\"a)output voltage is\",Vo,\"V\"\n",
+ "print\"b)output voltage is\",Vo1,\"V\"\n",
+ "print\"c)output voltage is\",Vo2,\"V\"\n",
+ "print\"d)output voltage is\",round(Vo3,2),\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a)output voltage is 8.37 V\n",
+ "b)output voltage is 3.87 V\n",
+ "c)output voltage is 8.37 V\n",
+ "d)output voltage is 4.07 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 71
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.26,Page number 62"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vs=10. #supply voltage(V) \n",
+ "Rs=1 #supply resistane(ohm)\n",
+ "Vl=10. #load voltage(V)\n",
+ "Vi=50. #nput voltage(V)\n",
+ "Iz=32 #zener diode current(mA)\n",
+ "Is=40 #supply current(mA) \n",
+ "\n",
+ "#Calculations\n",
+ "#Part a (Rl is min when Iz=0) \n",
+ "Is=(Vi-Vs)/Rs #source current(mA) \n",
+ "Rlmin=Vl/(Vi-Vs) #load resistance minimum(ohm) \n",
+ "\n",
+ "#Part b(Rl is maximum when Iz=32 mA) \n",
+ "Il=(Is-Iz)*10**-3 #load current(A) \n",
+ "Rlmax=Vl/Il #maximum load resistance(k ohms)\n",
+ "P=Vl*Iz #max diode wattage consumed(mW)\n",
+ "\n",
+ "#Results\n",
+ "print\"Range of Rl is\",round((Rlmin/1E-3),3),\"ohm\",\"to\", round((Rlmax/1E+3),2),\"k ohm\" \n",
+ "print \"Il = \",(Il/1E-3),\"*10**-3 A\"\n",
+ "print\"max power consumed is\",P,\"mW\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Range of Rl is 250.0 ohm to 1.25 k ohm\n",
+ "Il = 8.0 *10**-3 A\n",
+ "max power consumed is 320.0 mW\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.27,Page number 63"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vz=20 #zener voltage(V)\n",
+ "Izmax=50 #maximum zener current(mA)\n",
+ "Rz=0 #zener resistance(ohms)\n",
+ "Rl=2. #load resistance(ohm)\n",
+ "Vl=20. #as Vz=Vl(V)\n",
+ "Rs=0.25 #source resistance(k ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Il=Vl/Rl #load current(mA) \n",
+ "Vsmin=(Rs+Rl)*Il #as Iz is floating so Iz=0\n",
+ "\n",
+ "#Part b\n",
+ "Is=Izmax+Il #source current(mA) \n",
+ "Vsmax=Vz+(Is*Rs) #maximum source voltage(V)\n",
+ "\n",
+ "#Results\n",
+ "print\"Vsmin\",round(Vsmin,1),\"V\"\n",
+ "print\"Range of input voltage is\",round(Vsmin,1),\"to\", Vsmax,\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Il is 10.0 mA\n",
+ "Vsmin 22.5 V\n",
+ "Range of input voltage is 22.5 to 35.0 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.28,Page number 63"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Ilmax=100 #load maximum current(mA)\n",
+ "Ilmin=0 #load minimum current(mA)\n",
+ "Rz=0.05 #zener diode resistance(ohms)\n",
+ "Rs=10. #source resistance(k ohms)\n",
+ "Vl=16.015 #load voltage(V)\n",
+ "Vl1=16. #nominal load voltage(V) \n",
+ "Vs=20 #source voltage(V)\n",
+ "Vz=16 #zener diode voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "#Case 1 (i)\n",
+ "Iz=(Vl-Vl1)/Rz #zener current(mA)\n",
+ "Is=Iz+Ilmax #supply current(A)\n",
+ "\n",
+ "#Case 1 (ii)\n",
+ "Is1=(Vs-Vz)/(Rs+Rz) #supply current(mA)\n",
+ "Vl2=Vl1+(Is1*Rz) #voltage(V) \n",
+ "Vr=((Vl2-Vl)/Vl1)*100 #voltage regulation\n",
+ "\n",
+ "#Case 2 (i)\n",
+ "Vs=18 #supply voltage(V)\n",
+ "Ilmax=0.1 #load current max(A)\n",
+ "Vl=16.005 #load voltage(V)\n",
+ "Iz=(Vl-Vl1)/Rz #zener current(mA)\n",
+ "Is2=Ilmax+Iz #supply current(A)\n",
+ "\n",
+ "#Case 2 (ii)\n",
+ "Ilmin=0\n",
+ "Iz1=(Vs-Vl1)/(Rs+Rz) #minimum diode current(mA) \n",
+ "Vl=Vl1+(Iz*Rz) #load voltage at Ilmin(V) \n",
+ "\n",
+ "#Part a\n",
+ "#Variable declaration\n",
+ "Is=0.4 #supply current(A)\n",
+ "Vs=20 #supply voltage(V) \n",
+ "Vl=16.015 #load voltage(V)\n",
+ "Iz=0.3 #zener current(mA)\n",
+ "\n",
+ "#Calculations\n",
+ "P=Is**2*Rs #power dissipated by Rs(W)\n",
+ "\n",
+ "#Part b\n",
+ "Pd=Vl*Iz #power dissipated(W)\n",
+ "Po=(Vs**2)/Rs #output power(W)\n",
+ "\n",
+ "print\"maximum power dissipated by Rs is\",P,\"W\"\n",
+ "print\"maximum power dissipated by diode is\",round(Pd,3),\"W\"\n",
+ "print\"minimum diode current is\",round(Iz1,3),\"A\"\n",
+ "print\"voltage regulation is\",round(Vr,2),\"%\"\n",
+ "print\"output shorted will be\",Po,\"W\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum power dissipated by Rs is 1.6 W\n",
+ "maximum power dissipated by diode is 4.804 W\n",
+ "minimum diode current is 0.199 A\n",
+ "voltage regulation is 0.03 %\n",
+ "output shorted will be 40.0 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.29,Page number 65"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vrms=20 #secondary voltage(V)\n",
+ "Rs=10 #Winding resistance(ohm)\n",
+ "Rf=5 #diode has forward resistance(ohms)\n",
+ "Idc=2*10**-3 #load current(mA) \n",
+ "\n",
+ "#Calculations\n",
+ "#Part a \n",
+ "Vdc=(Vrms*(math.sqrt(2)))/(math.pi) #no load Vdc\n",
+ "\n",
+ "#Part b \n",
+ "Vldc=Vdc-(Idc*(Rs+Rf)) #dc output voltage when load is 20mA\n",
+ "\n",
+ "#Part c\n",
+ "Rl=Vldc/Idc #load resistance(ohms)\n",
+ "r=((Rs+Rf)/Rl)*100 #percentage regulation(%)\n",
+ "\n",
+ "#Part d\n",
+ "Im=Idc*(math.pi) #peak current(mA)\n",
+ "Ilrms=Im/2 #rms load current(mA) \n",
+ "Vlrms=Ilrms*Rl #rms load voltage(V) \n",
+ "Vlrmsac=math.sqrt((Vlrms**2)-(Vldc**2)) #Ripple voltage rms(V)\n",
+ "f=50*2 #rippLe frequency(Hz)\n",
+ "\n",
+ "#Part e\n",
+ "eta=(((2*(math.pi))**2)/(1+((Rs+Rf)/Rl)))*100 #efficiency\n",
+ "\n",
+ "#Part f\n",
+ "PIV=Vm=Vrms*(math.sqrt(2)) #peak inverse voltage(V) \n",
+ "\n",
+ "#Results\n",
+ "print\"no load dc voltage is\",round(Vdc),\"V\" \n",
+ "print\"dc output voltage when the load is drawing 20 mA is\",round(Vldc,2),\"V\"\n",
+ "print\"percentage regulation at this load is\",round((r/1E-1),2),\"%\"\n",
+ "print\"ripple voltage rms is\",round(Vlrmsac,2),\"V and ripple frequency is\",f,\"Hz\"\n",
+ "print\"power conversion efficiency is\",round((eta/1E+2),1),\"%\"\n",
+ "print\"PIV is\",round(PIV),\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "no load dc voltage is 9.0 V\n",
+ "dc output voltage when the load is drawing 20 mA is 8.97 V\n",
+ "percentage regulation at this load is 3.34 %\n",
+ "ripple voltage rms is 10.87 V and ripple frequency is 100 Hz\n",
+ "power conversion efficiency is 39.3 %\n",
+ "PIV is 28.0 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.30,Page number 66"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vl=24 #battery voltage(V)\n",
+ "Vm=60*(math.sqrt(2)) #peak voltage(V)\n",
+ "Ip=2.5 #peak current(A)\n",
+ "c=20 #charge(Ah)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "theta=math.asin(Vl/Vm) #angle at which conduction begins\n",
+ "Rs=(Vm-Vl)/Ip #source resistance(ohms) \n",
+ "\n",
+ "#Part b\n",
+ "Idc=(Vm/(math.pi)*Rs)*(math.cos(theta))-(((math.pi)-(2*theta))/2*math.pi)*(Vl/Rs) #load current(A)\n",
+ "T=c/Idc #time to deliver 20Ah(h)\n",
+ "\n",
+ "#Results\n",
+ "print\"resistance connected in series is\",round(Rs,1),\"ohm\"\n",
+ "print\"time required to deliver a charge of 20 Ah is\",round((T/1E-3),1),\"h\" \n",
+ "print\"Idc\",round((Idc/1E+3),2),\"A\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "resistance connected in series is 24.3 ohm\n",
+ "time required to deliver a charge of 20 Ah is 31.9 h\n",
+ "Idc 0.63 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.32,Page number 67"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "R=25. #external resistance(ohms)\n",
+ "Vm=200. #peak value of voltage(V) as vs=200 sinwt\n",
+ "Rf=50. #forward resistance(ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a \n",
+ "Id=Vm/(2*Rf+R) #diode current(peak)\n",
+ "\n",
+ "#Part b \n",
+ "Idc=(2*Id)/math.pi #dc current(A)\n",
+ "\n",
+ "#Part c\n",
+ "PIV=Vm/2 #peak value of voltage across D1\n",
+ "PIVac=100/math.pi #average value of voltage across D1\n",
+ "\n",
+ "#Part d\n",
+ "Im=Id #peak value of current(A)\n",
+ "Irms=Im/(math.sqrt(2)) #rms value of current(A)\n",
+ "\n",
+ "#Results\n",
+ "print\"peak value of current is\",Id,\"A\"\n",
+ "print\"dc currect is\",round(Idc,2),\"A\"\n",
+ "print\"across D1 are peak voltage is\",PIV,\"V and average voltage is\",round(PIVac,1),\"V\"\n",
+ "print\"Irms is\",round(Irms,2),\"A\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "peak value of current is 1.6 A\n",
+ "dc currect is 1.02 A\n",
+ "across D1 are peak voltage is 100.0 V and average voltage is 31.8 V\n",
+ "Irms is 1.13 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.33,Page number 67"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "f=50. #frequency(Hz)\n",
+ "dv=7. #difference between maximum and minimum(25-18)voltages across the load(V)\n",
+ "Ic=100. #load current(mA)\n",
+ "\n",
+ "#Calculations\n",
+ "dt=1/(2*f) #time of discharge(seconds)\n",
+ "C=Ic/(dv/dt) #capacitance(uF) \n",
+ "\n",
+ "#Results\n",
+ "print\"value of capacitor is\",round((C/1E-3),2),\"uF\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of capacitor is 142.86 uF\n"
+ ]
+ }
+ ],
+ "prompt_number": 56
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.34,Page number 68"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vr=10. #peak to peak ripple voltage(V)\n",
+ "Vm=50. #peak output voltage(V) \n",
+ "C=300. #Capacitance(uF)\n",
+ "Rl=470. #load resistance(ohms)\n",
+ "f=50. #frequency(Hz)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a \n",
+ "Vdc=Vm-(Vr/2) #dc voltage(V) \n",
+ "C=Vdc/(f*Vr*Rl) #capacitance(mF)\n",
+ "\n",
+ "#Part b\n",
+ "C1=300*10**-6 #capacitance is increased(uF)\n",
+ "Vr=2*Vm/((2*f*C1*Rl)+1)\n",
+ "Vdc=Vm-Vr/2 #load voltage ripple(V)\n",
+ "Idc=Vdc/Rl #average load current(mA)\n",
+ "\n",
+ "#Results\n",
+ "print\"value of capacitor is\",round((C/1E-6),1),\"mF\" \n",
+ "print\"load voltage ripple is\",round(Vdc,2),\"V and average load current is\",round((Idc/1E-4),1),\"mA\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of capacitor is 191.5 mF\n",
+ "load voltage ripple is 46.69 V and average load current is 993.4 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.35,Page number 69"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "vo=7.5 #instantaneous voltage(V)\n",
+ "R1=15 #resistance(k ohms)\n",
+ "Von=0.5 #voltage of diode when on(V)\n",
+ "\n",
+ "#Calculations\n",
+ "Rth=(R1*vo)/(R1+vo) #equivalent resistance(V)\n",
+ "T=2*(math.pi)/10**4 #time period(ms)\n",
+ "t1=(math.asin(Von/2.5))/10**4 #timimgs when D1 conducts(ms)\n",
+ "t2=(T/2)-t1\n",
+ "\n",
+ "#Results\n",
+ "print\"time period is\",round((T/1E-3),3),\"ms\"\n",
+ "print\"t1 is\",t1,\"ms\"\n",
+ "print \"t2 is\",round((t2/1E-3),3),\"ms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "time period is 0.628 ms\n",
+ "t1 is 2.0135792079e-05 ms\n",
+ "t2 is 0.294 ms\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.36,Page number 70"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declarations\n",
+ "v=12 #output voltage(V)\n",
+ "vm=20. #peak voltage(V)\n",
+ "v1=8 #output voltage(V) for negative half cycle\n",
+ "vm1=20. #peak voltage(V) for negative half cycle \n",
+ "\n",
+ "#Calculations\n",
+ "t1=(math.asin(v/vm))/10**4 #for positive half cycle when D1 conducts\n",
+ "t2=(0.1*math.pi)-t1/1e-3 \n",
+ "t3=(math.asin(v1/vm1))/10**4 #for negative half cycle when D2 conducts\n",
+ "t4=(0.1*(math.pi))+t3/1e-3 \n",
+ "t5=(0.2*(math.pi))-t3/1e-3\n",
+ "\n",
+ "#Results\n",
+ "print\"t1 is\",round(t1/1e-3,3),\"ms\"\n",
+ "print\"t2 is\",round(t2,2),\"ms\"\n",
+ "print\"t3 is\",round(t3/1e-3,3),\"ms\"\n",
+ "print\"t4 is\",round(t4,3),\"ms\"\n",
+ "print\"t5 is\",round(t5,3),\"ms\"\n",
+ "print\"vo is\",\"-5.33+6.66*sin(10**4*.15)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "t1 is 0.064 ms\n",
+ "t2 is 0.25 ms\n",
+ "t3 is 0.041 ms\n",
+ "t4 is 0.355 ms\n",
+ "t5 is 0.587 ms\n",
+ "vo is -5.33+6.66*sin(10**4*.15)\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_devices_and_circuits/chapter10.ipynb b/Electronic_devices_and_circuits/chapter10.ipynb
new file mode 100755
index 00000000..3c27caf6
--- /dev/null
+++ b/Electronic_devices_and_circuits/chapter10.ipynb
@@ -0,0 +1,458 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:9c34cda4904ac6fe0f4810cba9f641b26f332071fb989df77b245e43b46b8b6c"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 10 : Circuit Theory"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.1,Page number 477"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "i1=4. #current through r1(A) \n",
+ "v3=3 #voltage(V)\n",
+ "v4=8 #voltage(V)\n",
+ "r3=3 #resistance(ohms)\n",
+ "r2=2 #resistance(ohms)\n",
+ "r4=4 #resistance(ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "i3=v3/r3 #current through r3(A)\n",
+ "i4=v4/r4 #current through r4(A)\n",
+ "i2=-(i3+i4-i1)/2 #current through r2(A)\n",
+ "v2=i2*r2 #voltage through r2(V)\n",
+ "\n",
+ "#Result\n",
+ "print\"v2 is\",v2,\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "v2 is 1.0 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.2,Page number 478"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "v1=6 #current through r1(A) \n",
+ "i2=2 #voltage through r3(V)\n",
+ "i3=4 #voltage through r4(V)\n",
+ "r3=2 #resistance(ohms)\n",
+ "v3=3 #voltage through r3(ohms)\n",
+ "r2=2 #resistance(ohms)\n",
+ "r4=3 #resistance(ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "v2=i2*r2 #voltage through r2(ohms)\n",
+ "v3=i3*r3 #voltage through r3(ohms)\n",
+ "v4=4*i2+v3-v2-v1 #voltage through r4(ohms)\n",
+ "i4=v4/r4 #current through r4(A)\n",
+ "\n",
+ "#Result\n",
+ "print\"i4 is\",i4,\"A\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "i4 is 2 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.3,Page number 481"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import numpy as np\n",
+ "\n",
+ "#Calculations\n",
+ "a=np.array([[7,-3,-4],[-3,6,-2],[-4,-2,11]]) #solving three linear mesh equations\n",
+ "b=np.array([-11,3,25])\n",
+ "x=np.linalg.solve(a,b)\n",
+ "x\n",
+ "v=x[2]-x[1] #voltage across 2mho conductance(V)\n",
+ "\n",
+ "#Results\n",
+ "print\"v is\",v,\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "v is 1.0"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " V\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.4,Page number 483"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import numpy as np\n",
+ "\n",
+ "#Variable declaration\n",
+ "R=20 #resistance across which voltage is to be calculated(ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "a=np.array([[35,-20],[-20,50]]) #solving two linear mesh equations\n",
+ "b=np.array([50,-100])\n",
+ "x=np.linalg.solve(a,b)\n",
+ "x\n",
+ "i=x[0]-x[1] #current through 20 ohms resistor(ohms)\n",
+ "V=20*i #voltage across 20 ohms(V)\n",
+ "\n",
+ "#Results\n",
+ "print\"i is\",round(i,2)\n",
+ "print\"voltage across 20 ohms is\",round(V,1),\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "i is 2.22\n",
+ "voltage across 20 ohms is 44.4 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.5,Page number 484"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vs=16. #source voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part b\n",
+ "I=0 #current through 10 V\n",
+ "Is=-4*(I-(Vs/32)) #current of current source(A)\n",
+ "\n",
+ "#Part c\n",
+ "Is1=16 #current of current source(A)\n",
+ "I=0 #current through 10 V\n",
+ "Vs1=(I+(Is1/4))*32 #source voltage(V)\n",
+ "\n",
+ "#Results\n",
+ "print\"Is is\",Is,\"A\"\n",
+ "print\"Vs1 is\",Vs1,\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Is is 2.0 A\n",
+ "Vs1 is 128 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.6,Page number 485"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "V=9 #voltmeter of voltage(V)\n",
+ "i=9 #ammeter current of 9V\n",
+ "r1=1 #resistance(ohms)\n",
+ "r2=3 #resistance(ohms)\n",
+ "r=5 #resistance parallel to ammeter(ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "Isc=((i*r)-V)/(r1+r) #short circuiting a and b and converting current source to a voltage source(A)\n",
+ "Ro=((r+r1)*r2)/((r+r1)+r2) #output resistance(ohms)\n",
+ "\n",
+ "#Results\n",
+ "print\"Isc is\",Isc,\"A\"\n",
+ "print\"Ro is\",Ro,\"ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Isc is 6 A\n",
+ "Ro is 2 ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.7,Page number 495"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import cmath\n",
+ "import math\n",
+ "from sympy import *\n",
+ "import sympy\n",
+ "\n",
+ "#Variable declaration\n",
+ "t = symbols('t') #symbol defined\n",
+ "et1 = complex(50,86.6) #defining complex number\n",
+ "\n",
+ "#calculations\n",
+ "et = (et1.real*sympy.sqrt(2)*sympy.cos(314*t))+et1.imag*sympy.sqrt(2)*sympy.cos(314*t+90) #expression\n",
+ "\n",
+ "#Result\n",
+ "print et"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "50.0*sqrt(2)*cos(314*t) + 86.6*sqrt(2)*cos(314*t + 90)\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.9,Page number 506"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import cmath\n",
+ "import math\n",
+ "from sympy import *\n",
+ "import sympy\n",
+ "\n",
+ "#Variable declarations\n",
+ "V1, V2=symbols('V1 V2')\n",
+ "\n",
+ "#Calculations\n",
+ "V = 0.3*V1 #voltage(V)\n",
+ "I1 = 0.007*V1 #current \n",
+ "y11 = I1/V1 #y parameter\n",
+ "\n",
+ "I2 = -V/40 #current \n",
+ "y21 = I2/V1 #y parameter\n",
+ "\n",
+ "I2 = V2/(((40+100)*200.)/((40+100)+200.)) #y parameter\n",
+ "y22 = I2/V2 #incorrect answer in textbook #y parameter\n",
+ "\n",
+ "I1 = (-I2*200)/300 #current \n",
+ "y12 = I1/V2 #incorrect answer in textbook #y parameter\n",
+ "\n",
+ "#Results\n",
+ "print \"y11+y12 is\",round(y11+y12,5),\"mho\"\n",
+ "print \"y22+y12 is\",round(y22+y12,5),\"mho\"\n",
+ "print \"y21-y12 is\",round(y21-y12,5),\"mho\"\n",
+ "print \"\\n(The difference in answers is due to the y12 and y21 values calculated wrongly in the textbook)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "y11+y12 is -0.0011 mho\n",
+ "y22+y12 is 0.00405 mho\n",
+ "y21-y12 is 0.0006 mho\n",
+ "\n",
+ "(The difference in answers is due to the y12 and y21 values calculated wrongly in the textbook)\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.10,Page number 508"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "\n",
+ "#port 2 open circuited,port 1 excited\n",
+ "z11=1075+1075j #as z11=V1/I1=(1.52<45)/(10**-3<0)=1075+1075j\n",
+ "z21=2022-1075j #as z21=V2/I1=(2.29<-28)/(10**-3<0)=2022+1075j\n",
+ "\n",
+ "#port 1 open circuited and port 2 excited\n",
+ "z12=-1075j #as z12=V1/I2=(1.075<-90)/(10**3<0)=-1075j\n",
+ "z22=751-1073j #as z22=V2/I2=(1.31<-55)/(10**-3<0)=751-j1073\n",
+ "\n",
+ "#Calculations\n",
+ "z=z11-z12 #parameters with reference to circuit\n",
+ "z1=z22-z12\n",
+ "z2=z21-z12\n",
+ "\n",
+ "#Results\n",
+ "print\"z11-z12(z) is\",z\n",
+ "print\"z22-z12(z1) is\",z1\n",
+ "print\"z21-z12(z2) is\",z2"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "z11-z12(z) is (1075+2150j)\n",
+ "z22-z12(z1) is (751+2j)\n",
+ "z21-z12(z2) is (2022+0j)\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 10.11,Page number 510"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "V2=6/7. #voltage source(V)\n",
+ "\n",
+ "#Calculations \n",
+ "Rth=V2 #thevinin resistance(ohms)\n",
+ "Zl=Rth #load resistance(ohms)\n",
+ "\n",
+ "#Result\n",
+ "print\"load resistance is\",round(Zl,3),\"ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "load resistance is 0.857 ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_devices_and_circuits/chapter11.ipynb b/Electronic_devices_and_circuits/chapter11.ipynb
new file mode 100755
index 00000000..4150f842
--- /dev/null
+++ b/Electronic_devices_and_circuits/chapter11.ipynb
@@ -0,0 +1,170 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:9ece3b9f8730ff4f15d623a124d9415b373cdc935ed6cb089360bef5516a2604"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ " Chapter 11: Cathode Ray Oscilloscope"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.2,Page number 532"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "E=120 #electric field(V/m) \n",
+ "B=5*10**-5 #magnetic field(T) \n",
+ "q=1.6*10**-19 #charge on electron(C)\n",
+ "u=10**6 #velocity of electron(m/s)\n",
+ "m=9.1*10**-31 #mass of electron(Kg) \n",
+ "a=9.81 #acceleration of gravitation(m/s^2)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "fe=q*E #force on electron due to electric field(N)\n",
+ "\n",
+ "#Part\n",
+ "fm=B*q*u #force on electron due to magnetic field(N)\n",
+ "\n",
+ "#Part c\n",
+ "fg=m*a #force on electron due to gravitational field(N)\n",
+ "\n",
+ "#Results\n",
+ "print\"force on electron due to electric field is\",fe,\"N\"\n",
+ "print\"force on electron due to magnetic field is\",fm,\"N\"\n",
+ "print\"force on electron due to gravitational field is\",fg,\"N\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "force on electron due to electric field is 1.92e-17 N\n",
+ "force on electron due to magnetic field is 8e-18 N\n",
+ "force on electron due to gravitational field is 8.9271e-30 N\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.3,Page number 532"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "T1=1200. #temperature(k)\n",
+ "T2=1000. #temperature(k)\n",
+ "Ww=1.2*10**5 #work function(eV)\n",
+ "k=8.62\n",
+ "Ie1=200 #emission current density\n",
+ "T3=1500. #temperature(k)\n",
+ "\n",
+ "#Calculations\n",
+ "Ie2=Ie1*(T2/T1)**2*math.exp(-(Ww/k)*((1/T2)-(1/T1))) #current density(mA/cm^2) at 1000k\n",
+ "Ie3=Ie1*(T3/T1)**2*math.exp(-(Ww/k)*((1/T3)-(1/T1))) #current density(mA/cm^2) at 1000k\n",
+ "\n",
+ "#Results\n",
+ "print\"current density at 1000 k is\",round(Ie2,2),\"mA/cm^2\"\n",
+ "print\"current density at 1500 k is\",round(Ie3,2),\"mA/cm^2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "current density at 1000 k is 13.65 mA/cm^2\n",
+ "current density at 1500 k is 3180.49 mA/cm^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 11.4,Page number 533"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Ls=40 #distance from screen(m)\n",
+ "d=1.5 #distance between plates(cm)\n",
+ "Va=1200 #accelerating potential(V) \n",
+ "L=3 #length of CRT(m)\n",
+ "e=1.6*10**-19 #charge on electron(C)\n",
+ "m=9.1*10**-31 #mass of electron(Kg) \n",
+ "Y=4*10**-2 #vertical deflection(V)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "U=math.sqrt((2*e*Va)/m) #velocity of electron upon striking screen(m/s)\n",
+ "\n",
+ "#Part\n",
+ "Vd=(2*d*Va*Y)/(L*Ls) #deflecting voltage(V)\n",
+ "\n",
+ "#Part c\n",
+ "Vdmax=(m*d**2*U**2)/(e*L**2) #maximum allowable deflection(V)\n",
+ "\n",
+ "#Results\n",
+ "print\"velocity of electron upon stricking the screen is\",round((U/1E+7),3),\"*10^7 m/s\"\n",
+ "print\"deflecting voltage is\",round(Vd/1E-2),\"V\"\n",
+ "print\"maximum allowable deflection is\",Vdmax,\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "velocity of electron upon stricking the screen is 2.054 *10^7 m/s\n",
+ "deflecting voltage is 120.0 V\n",
+ "maximum allowable deflection is 600.0 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_devices_and_circuits/chapter3.ipynb b/Electronic_devices_and_circuits/chapter3.ipynb
new file mode 100755
index 00000000..b37b068d
--- /dev/null
+++ b/Electronic_devices_and_circuits/chapter3.ipynb
@@ -0,0 +1,1540 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:cb1edbf7476adce6aba9bf1488bee35026e4b80ac8b3b01d96344eaf38909822"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "\n",
+ "Chapter 3: SMALL SIGNAL MODELS,AMPLIFICATION AND BIASING"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.1,Page number 136"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "beeta=100 #current gain\n",
+ "Ic=2.5 #collector current(mA)\n",
+ "Io=-0.5 #output current(mA) \n",
+ "Rl=2.5 #load resistance(kohm)\n",
+ "\n",
+ "#Calculations\n",
+ "rpi=beeta*(25/Ic) #dynamic resistance(ohms)\n",
+ "Ib=Io/(-beeta) #as Io=-beeta*Ib\n",
+ "Vs=rpi*Ib #signal voltage(V)\n",
+ "Vo=Rl*Io #output voltage(V)\n",
+ "Av=Vo/Vs #voltage gain\n",
+ "Ai=Io/Ib #current gain\n",
+ "\n",
+ "#Results\n",
+ "print\"signal voltage is\",Vs,\"mV\"\n",
+ "print\"current gain is\",Ai\n",
+ "print\"voltage gain is\",round(Av/1E-3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "signal voltage is 5.0 mV\n",
+ "current gain is -100.0\n",
+ "voltage gain is -250.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.2,Page number 139"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Id=1.6 #drain current(mA)\n",
+ "Vgs=-3 #gate to source voltage(V)\n",
+ "Id1=.4 #drain current(mA)\n",
+ "Vgs1=-4 #gate to source voltage(V) \n",
+ "Vp=-5 #peak voltage(V) by solving equations 1.6=Idss(1+3/Vp)^2 and .4=Idss(1+4/Vp)^2\n",
+ "Idss=10 #small signal drain current(mA) by solving equations 1.6=Idss(1+3/Vp)^2 and .4=Idss(1+4/Vp)^2\n",
+ " \n",
+ "#Calculations\n",
+ "gmo=-(2*Idss)/Vp #transconductance(mS)\n",
+ "gm=gmo*(math.sqrt(Id/Idss)) #transconductance(uS)\n",
+ "gm1=gmo*(math.sqrt(Id1/Idss)) #transconductance(uS) \n",
+ "\n",
+ "#Results\n",
+ "print\"Idss and Vp are\",Idss,\"mA and\",Vp,\"V\"\n",
+ "print\"gmo is\",gmo,\"mS\"\n",
+ "print\"gm at Id is\",round(gm/1E-3),\"and gm at Id1 is\",round(gm1/1E-3),\"uS\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Idss and Vp are 10 mA and -5 V\n",
+ "gmo is 4 mS\n",
+ "gm at Id is 1600.0 and gm at Id1 is 800.0 uS\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3,Page number 140"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "gm=1600 #gm(us)\n",
+ "rd=50 #resistance(kohms)\n",
+ "Rl=5 #load resistance(kohms)\n",
+ "\n",
+ "#Calculations\n",
+ "Av=-gm*Rl #Vgs=Vs from circuit model\n",
+ " #Vo=-(gm*Vgs)*Rl\n",
+ " #as Av=Vo/Vs=-gm*Rl \n",
+ "\n",
+ "#Result\n",
+ "print\"voltage gain of the circuit is\",round(Av/1E+3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "voltage gain of the circuit is -8.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.4,Page number 145"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "beta=100. #current gain\n",
+ "rpi=2*10**3 #dynamic resistance(ohms)\n",
+ "rx=500 #resistance(ohms)\n",
+ "ro=250*10**3 #output resistance(ohms)\n",
+ "R1=50*10**3 #resistance(k ohms) \n",
+ "R2=10*10**3 #resistance(k ohms)\n",
+ "Rc=5*10**3 #collector current(k ohms) \n",
+ "Rl=5*10**3. #load current(k ohms)\n",
+ "Rs=1*10**3 #source resistance(k ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "Rb=(R1*R2)/(R1+R2) #equivalent resistance of R1 and R2(kohms)\n",
+ "r=rpi+rx #series resistance of rpi and rx(k ohms) \n",
+ "gm=beta/rpi #transconductance(mS)\n",
+ "Vo=-gm*((Rc*Rl)/(Rc+Rl))*.526 #output voltage(V) as \n",
+ "Av=Vo #voltage gain\n",
+ "Ai=Av*((Rs+((Rb*r)/(Rb+r)))/Rl) #current gain \n",
+ "\n",
+ "#Results\n",
+ "print\"source to load voltage gain is\",Av\n",
+ "print\"source to load current gain is\",Ai,\"(Solution given in the textbook is incorrect)\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "source to load voltage gain is -65.75\n",
+ "source to load current gain is -38.43745 (Solution given in the textbook is incorrect)\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.5,Page number 148"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "beta=100. #current gain\n",
+ "rd=50*10**3 #internal dynamic resistance(ohms\n",
+ "gm=5*10**-3 #transconductance(mS)\n",
+ "R1=50*10**3 #resistance(ohms) \n",
+ "R2=10*10**3 #resistance(ohms)\n",
+ "Rs=10*10**3 #source current(ohms) \n",
+ "Rg=1*10**6. #gate resistance(ohms)\n",
+ "Rd=10*10**3 #drain resistance(ohms)\n",
+ "\n",
+ "#Calculations \n",
+ "Vgs=(Rg/(Rs+Rg)) #gate to source voltage (V) as Vgs=Vs((Rg/(Rs+Rg)) \n",
+ "Av=-Vgs*gm*((rd*Rd)/(rd+Rd)) #voltage gain,Av=Vo/Vs and Vo=-gmVgs(rd||Rd)\n",
+ "Ai=Av*((Rs+Rg)/Rd) #current gain\n",
+ "\n",
+ "#Results\n",
+ "print\"source to load voltage gain is\",round(Av)\n",
+ "print\"source to load current gain is\",round(Ai)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "source to load voltage gain is -41.0\n",
+ "source to load current gain is -4167.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.6,Page number 149"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Rs=500 #collector current(k ohms) \n",
+ "Io=-1*10**-3 #output current(mA) \n",
+ "Rc=5*10**3. #collector resistance(ohms)\n",
+ "hie=2*10**3\n",
+ "hoe=10*10**-6. \n",
+ "hfe=100.\n",
+ "hre=5*10**-4\n",
+ "Rb=50*10**3. #base resistance(ohms)\n",
+ "\n",
+ "#Calculations \n",
+ "Io1=-1/(1+Rc*hoe)*hfe #as Io=-1/(1+Rc*hoe)*hfe*Ib \n",
+ "Ib=-1/Io1 #base current(uA)\n",
+ "Vo=Io*Rc #output voltage(V)\n",
+ "Vi=hie*Ib+Vo*hre #input voltage(V)\n",
+ "Is=Ib+Vi/Rb #source current(ohms)\n",
+ "Ai=Io/Is #current gain\n",
+ "Vs=(Is*Rs)+Vi #source voltage(V)\n",
+ "Av=Vo/Vs #voltage gain\n",
+ "\n",
+ "#Results\n",
+ "print\"source to load voltage gain is\",round(Av/1E-3)\n",
+ "print\"source to load current gain is\",round(Ai/1E-3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "source to load voltage gain is -189.0\n",
+ "source to load current gain is -92.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.7,Page number 153"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "beeta=100. #current gain \n",
+ "Ic=4. #collector current(mA)\n",
+ "Vbe=0.7 #base to emitter voltage(V) \n",
+ "Re=2. #emitter resistance(ohms)\n",
+ "Vcc=32. #supply voltage(V)\n",
+ "abeeta=40. #actual current gain\n",
+ "\n",
+ "#Calculations\n",
+ "Ib=Ic/beeta #base current(mA)\n",
+ "Rb=(Vcc-Vbe-((Ib+Ic)*Re))/Ib #as Vcc=(Ib*Rb)+Vbe+(Ib+Ic)*Re \n",
+ "Ib=(Vcc-Vbe-8)/(Rb+Re) #as Vcc=Rb*Ib+Vbe+(Ib+Ic)*Re\n",
+ "Ic1=abeeta*Ib #collector current(mA)\n",
+ "deltaIc=Ic-Ic1 #change in collector current(mA)\n",
+ "\n",
+ "#Result\n",
+ "print\"change in Ic when beeta=40 is\",deltaIc,\"mA\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "change in Ic when beeta=40 is 2.4 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.8,Page number 155"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Rb1=36 #base resistance 1(kohms)\n",
+ "Rb2=12 #base resistance 2(kohms)\n",
+ "Rc=4 #emitter resistancce(kohms) \n",
+ "Re=1.8 #emitter resistance(kohms) \n",
+ "Vcc=12 #supply voltage(V)\n",
+ "Vbe=0.7 #base to emitter voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "Rb=(Rb1*Rb2)/(Rb1+Rb2) #base resistance(ohms)\n",
+ "Vbb=Vcc*(Rb2/(Rb1+Rb2)) #voltage supply to base(V)\n",
+ " #(10.8*Ib)+(1.8*Ic)=2.3 equation 1...solving -Vbb+RbIb+Vbe+(Ib+IC)Re\n",
+ " #(1.8*Ib)+(5.8*Ic)+Vce=12 equation 2 solving -Vcc+RcIc+Vce+(Ob+Ic)Re\n",
+ "#Part a\n",
+ "beeta=50 #current gain \n",
+ "Ib=2.3/100.8 #(10.8*Ib)+(90*Ib)=2.3 ,using -Vbb+Rb*Ib+Vbe+(Ib+Ic)*Re \n",
+ " #as Ic=50Ib and putting this in equation 1 \n",
+ "Icq=Ib*beeta\n",
+ "Vceq=Vcc-(1.8*Ib)-(5.8*Icq) #from equation 2\n",
+ "\n",
+ "#Part b\n",
+ "beeta=150 #current gain \n",
+ "Ib=2.3/280.8 # (10.8*Ib)+(270*Ib)=2.3,using -Vcc+Rc*Ic+Vce+(Ib+Ic)*Re \n",
+ " #as Ic=150Ib and putting this in equation 1 \n",
+ "Icq1=Ib*beeta \n",
+ "Vceq1=Vcc-(1.8*Ib)-(5.8*Icq1) #from equation 2\n",
+ "\n",
+ "#Results\n",
+ "print\"when beeta increases by 300%,Icq increases by\",round((((Icq1-Icq)/Icq1)*100),1),\"%\"\n",
+ "print\"when beeta increases by 300%, Vceq increases by\",round(((Vceq-Vceq1)/Vceq)*100),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "when beeta increases by 300%,Icq increases by 7.1 %\n",
+ "when beeta increases by 300%, Vceq increases by 9.0 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.9,Page number 156"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Ic=4 #collector current(mA)\n",
+ "Vce=8 #collector emitter voltage(V) \n",
+ "beeta=100 #current gain \n",
+ "Rb2=24 #base resistance(kohms)\n",
+ "Vbe=0.7 #base to emitter voltage(V)\n",
+ "Rc=4 #collector current(kohm)\n",
+ "Re=2 #emitter resistance(kohms) \n",
+ "Ib=0.04 #base current(mA) \n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Vcc=(Ic*Rc)+Vce+Ic*Re #from formula Vcc=IcRc+Vce+(Ic+Ib)Re..eq 1\n",
+ "\n",
+ "#Part b\n",
+ "Rb1=Rb2*(Vcc-(Vbe+Ic*Re))/((Vbe+Ic*Re)+Ib) #from eq 1 and also from Vbb= Vcc(Rb2/(Rb1+Rb2))\n",
+ "Rb=(Rb1*Rb2)/(Rb1+Rb2) #base resistance(ohms)\n",
+ "Vbb=(Vcc*Rb2)/(Rb1+Rb2) #supply to base(V)\n",
+ "\n",
+ "#Part c\n",
+ "abeeta=40 #actual current gain\n",
+ "Ib1=((Vbe+Re*Ic)-Vbe)/((1+abeeta)*2+Rb) #from equation Vbb=IbRb+Vbe+(Ic+Ib)Re\n",
+ "Ic1=abeeta*Ib1 #collector gain\n",
+ "\n",
+ "#Results\n",
+ "print\"a)Vcc is\",Vcc,\"V\"\n",
+ "print\"b)values are Rb1:\",round(Rb1,2),\"KOhms,Rb:\",round(Rb,2),\"kohm and Vbb:\",round(Vbb,2),\"V\" \n",
+ "print\"c)actual value of Ic1\",round(Ic1,2),\"mA\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a)Vcc is 32 V\n",
+ "b)values are Rb1: 63.98 KOhms,Rb: 17.45 kohm and Vbb: 8.73 V\n",
+ "c)actual value of Ic1 3.22 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.10,Page number 158"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vcc=10 #supply voltage(V)\n",
+ "Rc=4.7 #collector current(kohms)\n",
+ "Rb=250 #base resistance(kohms)\n",
+ "Re=1.2 #emitter resistance(kohms)\n",
+ "beeta=100 #current gain\n",
+ "Vbe=0.7 #base to emitter voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Ib=(Vcc-Vbe)/(Rb+(beeta*(Rc+Re))) #base current(uA)\n",
+ "Ic=beeta*Ib #collector current(mA)\n",
+ "Vce=Vcc-Ic*(Rc+Re) #collector to emitter voltage(V)\n",
+ "#Part b\n",
+ "beeta1=150 #current gain\n",
+ "Ib1=(Vcc-Vbe)/(Rb+(beeta1*(Rc+Re))) #base current(mA)\n",
+ "Ic1=beeta1*Ib1 #collector current(mA)\n",
+ "Vce1=Vcc-Ic1*(Rc+Re) #collector to emitter voltage(V)\n",
+ "deltaIc=((Ic1-Ic)/Ic)*100 #small change in Ic(mA)\n",
+ "deltaVce=((Vce-Vce1)/Vce)*100 #small change in Vce(V)\n",
+ "\n",
+ "#Results\n",
+ "print\"values of Ic is\",round(Ic,2),\"mA and Vce:\",round(Vce,2),\"V\"\n",
+ "print\"values of Ic1 is\",round(Ic1,2),\"mA and Vce1 is\",round(Vce1,2),\"V\"\n",
+ "print\"% change in Ic is\",round(deltaIc,2),\"% and in Vce is\",round(deltaVce,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "values of Ic is 1.11 mA and Vce: 3.47 V\n",
+ "values of Ic1 is 1.23 mA and Vce1 is 2.75 V\n",
+ "% change in Ic is 11.01 % and in Vce is 20.74 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.11,Page number 160"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Id=3 #drain current(mA)\n",
+ "Vds=12 #drain source voltage(V)\n",
+ "Vgs=-3 #gate source voltage(V)\n",
+ "Vdd=36 #drain voltage(V)\n",
+ "Vgg=12 #gate voltage(V)\n",
+ "Rg=12 #gate resistance(Mohms)\n",
+ "\n",
+ "#Calculations\n",
+ "R1=(Rg*Vdd)/Vgg #resistance(Mohms)\n",
+ "R2=(Rg*R1)/(R1-Rg) #resistance(kohms)\n",
+ "Rs=(Vgg-Vgs)/Id #resistance(kohms)\n",
+ "Rd=(Vdd-Vds-Id*Rs)/Id #as Vdd-IdRd-Vds-IdRs\n",
+ "Vgs=-3.6 #consider Vgs increases by 20%\n",
+ "Idnew=(Vgg-Vgs)/Rs #new drain current(mA)\n",
+ "\n",
+ "#Results\n",
+ "print\"value of R1:\",R1,\"MOhm,R2:\",R2,\"Mohms,Rs:\",Rs,\"KOhm and Rd:\",Rd,\"kohms\"\n",
+ "print\"new Id is\",Idnew,\"mA\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of R1: 36 MOhm,R2: 18 Mohms,Rs: 5 KOhm and Rd: 3 kohms\n",
+ "new Id is 3.12 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.12,Page number 161"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from sympy import*\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "k=0.0002 #device parameter\n",
+ "Vt=4 #thevinin voltage(V) \n",
+ "Vdd=24 #drain voltage(V)\n",
+ "Id0=3 #drain current(mA) \n",
+ "\n",
+ "#Calculations\n",
+ "Vgs=(math.sqrt(Id0/k))+4 #as Id=k(Vgs-Vt)^2\n",
+ "Rd=-(Vgs-Vdd)/Id0 #as Vds=Vdd-IdRd and Vgs=Vds=7.87 \n",
+ "k=0.0003 #device parameter \n",
+ "\n",
+ "Id=symbols('Id')\n",
+ "expr=solve(Id**2-7.5*Id+13.7,Id)\n",
+ "print\"equation has 2 solutions\",expr # putting value of k=0.0003 in eq of Id,\n",
+ "Id1=3.15 # we get Vgs=Vds=24-5.4Id and putting Vgs again in Id we get,\n",
+ " # Id^2-7.5Id+13.7=0\n",
+ " \n",
+ "Idchange=((Id1-Id0)/Id0)*100 #changed Id(mA)\n",
+ "\n",
+ "#Result\n",
+ "print\"change in Id is\",Idchange,\"% increase\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "equation has 2 solutions [3.14792027106039, 4.35207972893962]\n",
+ "change in Id is 5.0 % increase\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.13,Page number 162"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "Vt=2 #threshold voltage(V)\n",
+ "Id=8 #drain current(mA)\n",
+ "Vgs=6. #gate to source voltage(V)\n",
+ "k=0.5 #device parameter\n",
+ "Vdd=24 #drain voltage(V)\n",
+ "Vds=10 #drain to source voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Vgs1=4 #gate to source voltage(V) \n",
+ "Id1=k*(Vgs1-Vt)**2 #drain current(mA)\n",
+ "\n",
+ "#Part b\n",
+ "Vgg=3*Vgs1 #gate voltage(V)\n",
+ "R2=(Vdd/Vgg)-1 #resistance(Mohms)\n",
+ "Rs=(Vgg-Vgs1)/2 #source resistance(k ohms)\n",
+ "Rd=(Vdd-Vds-Id1*Rs)/2\n",
+ "\n",
+ "#part c\n",
+ "K=1.5*k #increased by 50%\n",
+ "Vgs2=3.67 #solving 12=Vgs+4Id and Id=0.75(Vgs-2)^2 \n",
+ "Id2=2.08 #drain current when k is increased(mA)\n",
+ "Vds1=Vdd-Id2*(Rd+Rs) #drain to source voltage(V)\n",
+ "\n",
+ "#Results\n",
+ "print\"drain current defined by Vgs=4 and Vds=10 is\",Id1,\"mA\"\n",
+ "print\"value of Rs,Rd,R2 are\",Rs,\"k ohms,\", Rd,\"k ohms,\",R2,\"Mohms resp.\"\n",
+ "print\"actual value of Id and Vds are\",Id2,\"mA,\",Vds1,\"mA and\",Vds,\" V resp.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "drain current defined by Vgs=4 and Vds=10 is 2.0 mA\n",
+ "value of Rs,Rd,R2 are 4 k ohms, 3.0 k ohms, 1 Mohms resp.\n",
+ "actual value of Id and Vds are 2.08 mA, 9.44 mA and 10 V resp.\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.14,Page number 166"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Ic=10 #collector current(mA)\n",
+ "beeta=100 #current gain\n",
+ "Vbe=0.7 #base to emitter voltage(V)\n",
+ "Vcc=10 #supply voltage(V) \n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "R=(beeta*(Vcc-Vbe))/((beeta+2)*Ic) #resistance(k ohms) \n",
+ "beeta1=200 #current gain\n",
+ "Ic1=(beeta1/(beeta1+2))*((Vcc-Vbe)/R) #collector current(mA)\n",
+ "Icchange=((Ic-Ic1)/Ic) #change in collector current(mA) \n",
+ "\n",
+ "#Part b\n",
+ "Ic2=0.1 #collector current(mA)\n",
+ "R1=(beeta*(Vcc-Vbe))/((beeta+2)*Ic) #resistance(k ohms)\n",
+ "Ic3=(beeta1/(beeta1+2))*((Vcc-Vbe)/R1) #collector current(mA)\n",
+ "Icchange1=((Ic2-Ic3)/Ic2) #change in collector current(mA)\n",
+ "\n",
+ "#Results\n",
+ "print\"% change in Ic is\",round(Icchange,1),\"% increase\"\n",
+ "print\"% change in Ic is\",round(Icchange1,1),\"% increase\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "% change in Ic is 1.0 % increase\n",
+ "% change in Ic is 1.0 % increase\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.15,Page number 167"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Vcc=6 #supply voltage(V)\n",
+ "R=1.2 #resistance(k ohms)\n",
+ "Vbe=0.7 #base to emitter voltage(V) \n",
+ "beeta=100. #current gain\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Ir=(Vcc-Vbe)/R #current(mA)\n",
+ "I=(beeta/(beeta+3))*Ir #current(mA)as transistors are identiical,I=Ie\n",
+ "\n",
+ "#Result\n",
+ "print\"load current I is\",round(I,2),\"mA\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "load current I is 4.29 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.16,Page number 171"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math \n",
+ "\n",
+ "#Variable declaration\n",
+ "Idss=10 #drain current for zero bias(mA)\n",
+ "Vp=-4 #peak voltage(V)\n",
+ "Idq=Id=2.5 #quienscent drain current(mA)\n",
+ "Vdd=24 #voltage drain drain(V)\n",
+ "Vgg=4 #gate voltage(V)\n",
+ "R1=22 #resistance(Mohms)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Vgs=Vp*(1-(math.sqrt(Id/Idss))) #solving Id=Idss(1-Vgs/Vp)^2\n",
+ "Rs=(Vgg-Vgs)/Id #as Vgg-Vgs-IdRs=0 ,Id=Is \n",
+ "Rd=2.5*Rs #given\n",
+ "R2=(Vgg*R1)/(R1-Vgg) #from Vgg=(R1*R2)/(R1+R2)\n",
+ "\n",
+ "#Part b\n",
+ "gmo=-(2*Idss)/Vp #transconductance(mS)\n",
+ "gm=gmo*(math.sqrt(Id/Idss)) #transconductance(mS)\n",
+ "\n",
+ "#Part c\n",
+ "Av=-gm*Rd #voltage gain\n",
+ "\n",
+ "#Results\n",
+ "print\"values of Rs:\",Rs,\"Kohms,Rd:\",Rd,\"k ohms and R2 is\",round(R2,1),\"M ohms\"\n",
+ "print\"value of gm is\",gm,\"mS and gmo is\",gmo,\"mS\"\n",
+ "print\"voltage amplification is\",Av"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "values of Rs: 2.4 Kohms,Rd: 6.0 k ohms and R2 is 4.0 M ohms\n",
+ "value of gm is 2.5 mS and gmo is 5 mS\n",
+ "voltage amplification is -15.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.17,Page number 174"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "beeta=98. #current gain\n",
+ "rpi=1.275 #dynamic resistance(k ohms)\n",
+ "Rb=220. #base resistance(k ohms)\n",
+ "Re=3.3 #emitter resistance(k ohms)\n",
+ "Vcc=12. #supply voltage(V)\n",
+ "Vbe=0.7 #base to emitter voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "x=rpi/(1+beeta)\n",
+ "Av=Re/(Re+x) #voltage gain\n",
+ "\n",
+ "#Part b\n",
+ "Zb=rpi+(1+beeta)*Re #impedance(k ohms)\n",
+ "Zi=(Zb*Rb)/(Zb+Rb) #input impedance(k ohms)\n",
+ "Zo=(Re*x)/(Re+x) #output impedance(k ohms)\n",
+ "\n",
+ "#Part c\n",
+ "Ib=(Vcc-Vbe)/(Rb+(Re*(1+beeta))) #as Ie=(1+beeta)*Ib\n",
+ "Ic=beeta*Ib #collector current(mA)\n",
+ "rpi=beeta*(25/Ic) #dynamic resistance(k ohms)\n",
+ "\n",
+ "#Results\n",
+ "print\"voltage gain is\",round(Av,3)\n",
+ "print\"input impedance is\",round(Zi,1),\"KOhm and output impedance is\",round((Zo/1E-3),1),\"ohms\"\n",
+ "print\"value of Ic is\",round(Ic,3),\"mA\"\n",
+ "print\"value of rpi is\",round((rpi/1E+3),3),\"k ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "voltage gain is 0.996\n",
+ "input impedance is 131.7 KOhm and output impedance is 12.8 ohms\n",
+ "value of Ic is 2.026 mA\n",
+ "value of rpi is 1.21 k ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.18,Page number 176"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from sympy import*\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Idss=16 #drain current bias to zero(mA) \n",
+ "Vp=-4 #pinch off voltage(V) \n",
+ "Rg=1 #gate resistance(ohms)\n",
+ "Rs=2.2 #sourse resistance(ohm)\n",
+ "Vdd=9 #drain drain voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "#Id=Idss*(1-(Vgs/Vp))**2\n",
+ "# putting value of Vgs=2.2*Id inequation of Id,we get\n",
+ "#Id**2-3.84Id+3.31 \n",
+ "\n",
+ "Id=symbols('Id')\n",
+ "expr=solve(Id**2-3.84*Id+3.31,Id)\n",
+ "print expr\n",
+ "Id1=1.3 \n",
+ "Vgs=-Id1*Rs #gate to source voltage(V)\n",
+ "gm0=-(2*Idss)/Vp #transconductance(mS)\n",
+ "gm=gm0*(1-(Vgs/Vp)) #transconductance(mS) \n",
+ "rm=1/gm #transresistance(k ohms) \n",
+ "Av=(Rs*gm)/(1+(Rs*gm)) #voltage gain\n",
+ "\n",
+ "#Part b\n",
+ "Zi=Rg #input impedance(Mohms)\n",
+ "Zo=(Rs*rm)/(Rs+rm) #output impedance(ohms)\n",
+ "\n",
+ "#Results\n",
+ "print\"voltage gain is\",round(Av,3)\n",
+ "print\"input and output impedences are\",Zi,\"Mohms and\",round((Zo/1E-3),1),\"ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " [1.30648553399288, 2.53351446600712]\n",
+ "voltage gain is 0.834\n",
+ "input and output impedences are 1 Mohms and 365.7 ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.19,Page number 182"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Re=0.56 #emitter resistance(k ohms)\n",
+ "beta=1600 #current gain\n",
+ "R1=110 #resistance(k ohms)\n",
+ "R2=330 #resistance(k ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Av1=Re*(beta+1) #voltage gain\n",
+ "\n",
+ "#part b\n",
+ "Rb=(R1*R2)/(R1+R2) #base resistance(k ohms)\n",
+ "Vs=(1.56/(Re*(beta+1)))+1 #source voltage(V) \n",
+ "Avs=1/Vs\n",
+ "\n",
+ "#part c\n",
+ "R=1+(1+beta)*Re #resistance presented to Ib\n",
+ "I=Rb/(Rb+R) #I=Ib/Ii \n",
+ "Ai=(1+beta)*I #current gain\n",
+ "\n",
+ "#part d\n",
+ "Rl=10*10**3 #load resistance(ohm)\n",
+ "Re1=(Re*Rl)/(Re+Rl) #emitter resistance(k ohms)\n",
+ "R1=1+(1+beta)*Re1 #resistance presented to Ib(k ohms)\n",
+ "I1=Rb/(Rb+R1) #I1=Ib/Ii\n",
+ "Ai1=(beta+1)*I1 #current gain\n",
+ "Av2=Re1*(1+beta) #voltage gain\n",
+ "\n",
+ "#Results\n",
+ "print\"a)voltage gain is\",Av1\n",
+ "print\"b)Avs is\",round(Avs,2)\n",
+ "print\"c)Ai is\",round(Ai,2)\n",
+ "print\"when output Vo1 feeds a load of 10 k ohms Ai is\",round(Ai1),\"and Av2 is\",round(Av2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "a)voltage gain is 896.56\n",
+ "b)Avs is 1.0\n",
+ "c)Ai is 134.02\n",
+ "when output Vo1 feeds a load of 10 k ohms Ai is 134.0 and Av2 is 897.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.20,Page number 184"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "beeta1=120. #current gain\n",
+ "beeta2=160. #current gain\n",
+ "Vcc=18 #supply voltage(V)\n",
+ "Rc=0.1 #collector resistance(ohms)\n",
+ "Rb=2*10**3. #base resistance(ohms)\n",
+ "Vbe=0.7 #base to emitter voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "Ib1=(Vcc-Vbe)/(Rb+(beeta1*beeta2*Rc))#base current(uA)\n",
+ "Ib2=beeta1*Ib1 #base current(mA)\n",
+ "Ie1=(beeta1+1)*Ib1 #emitter current(mA)\n",
+ "Ic=Ie1+(beeta2*Ib2) #collector current(mA)\n",
+ "Vo=Vcc-(Ic*Rc) #output voltage(V)\n",
+ "Vi=Vo-Vbe #input voltage(V)\n",
+ "\n",
+ "#Results\n",
+ "print\"dc biased current is\",round(Ic,1),\"mA\"\n",
+ "print\"output voltage\",round(Vo,2),\"V\"\n",
+ "print\"input voltage\",round(Vi,2),\"V\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "dc biased current is 85.3 mA\n",
+ "output voltage 9.47 V\n",
+ "input voltage 8.77 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.21,Page number 191"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "deltaId=2. #change in Id(mA)\n",
+ "deltaVgs=1. #change in Vgs(V)\n",
+ "deltaVds=5. #change in Vds(V)\n",
+ "Idss=10. #drain current biased to zero(mA)\n",
+ "Id=5. #drain current(mA)\n",
+ "Vp=-6. #pinch off voltage(V)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "gm=(deltaId)/(deltaVgs) #transconductance(mS)\n",
+ "rds=(deltaVds)/(deltaId) #resistance(k ohms)\n",
+ "gm0=-(2*Idss)/Vp #transconductance(mS)\n",
+ "gm=gm0*(math.sqrt(Id/Idss)) #transconductance(mS)\n",
+ "\n",
+ "#Part b\n",
+ "R1=4.5 #resistance(k ohms)\n",
+ "R2=2 #resistance(k ohms)\n",
+ "Av=gm*((R1*R2)/(R1+R2)) #voltage gain\n",
+ "\n",
+ "#Results\n",
+ "print\"drain current biased to zero is\",Idss,\"mA and pinch off voltage is\",Vp,\"V\"\n",
+ "print\"value of gm and rds are\",round(gm,2),\"mS and\",rds,\"k ohms\"\n",
+ "print\"small signal amplifier gain is\",round(Av,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "drain current biased to zero is 10.0 mA and pinch off voltage is -6.0 V\n",
+ "value of gm and rds are 2.36 mS and 2.5 k ohms\n",
+ "small signal amplifier gain is 3.26\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.22,Page number 193"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Idson=0.2\n",
+ "Vgs=5 #gate to source voltage(V)\n",
+ "Vdd=12 #drain voltage(V)\n",
+ "Vt=2 #thevinine voltage(V)\n",
+ "R1=100. #resistance(k ohms) \n",
+ "R2=100. #resistance(k ohms) \n",
+ "Rd=30 #drain resistance(K ohms)\n",
+ "Rs=6 #source resistance(k ohms)\n",
+ "deltaVdd=0.3 #change in Vdd(V)\n",
+ "rds=50 #internal drain to source resistance()\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "k=Idson/((Vgs-Vt)**2) #device parameter\n",
+ "Vgg=Vdd*(R1/(R1+R2)) #gate voltage(V)\n",
+ "Vgs=4.89 #gate to source voltage(V)\n",
+ "Id=k*(Vgs-Vt)**2 #drain current(mA)\n",
+ "Vds=Vdd-((Rd+Rs)*Id) #drain to source voltage(V)\n",
+ "gm=2*(math.sqrt(k*Id)) #transconductance(mS)\n",
+ "deltaVgg=deltaVdd*(R2/(R1+R2)) #change in Vgg(V)\n",
+ "\n",
+ "vgs=0.105 #as vgs=0.15-6id where id=u*vgs/(rds+Rs+Rd)=0.74vgs after solving\n",
+ "id= 0.074*vgs*10**3\n",
+ "\n",
+ "#Results\n",
+ "print\"id is\",id,\"uA\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "id is 7.77 uA\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.23,Page number 194"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "deltaId=1 #change in Id(mA)\n",
+ "deltaVgs=0.75 #change in Vgs(V) \n",
+ "rd=100 #internal drain resistance(k ohms)\n",
+ "Rd=100 #drain resistance(k ohms)\n",
+ "Vgs=2 #as Vgs= 2sinwt \n",
+ "\n",
+ "#Calculations\n",
+ "gm=(deltaId)/(deltaVgs) #transconductance(m) \n",
+ "Vo=-gm*Vgs*((rd*Rd)/(rd+Rd)) # as Vi=2sin(w*t)\n",
+ "\n",
+ "#Results\n",
+ "print\"value of Vo is\",round(Vo),\"*sinwt mV\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of Vo is -133.0 *sinwt mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.24,Page number 195"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Finding resistance\n",
+ "\n",
+ "#Variable declaration\n",
+ "Rd=4 #drain resistance(ohms)\n",
+ "Rs=2.5 #ource resistance(ohms) \n",
+ "R1=200*10**3 #resistance(ohms)\n",
+ "R2=100*10**3 #resistance(ohms)\n",
+ "gm=2.5 #transconductance(mS)\n",
+ "rd=60 #internal drain resistance(ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part b\n",
+ "Ro=Rs/(1+(((1+gm*rd)*Rs)/(rd+Rd))) #output resistance(ohms)\n",
+ "\n",
+ "#Part c\n",
+ "Rd1=0 #drain resistance\n",
+ "Ro1=Rs/(1+(((1+gm*rd)*Rs)/rd)) #output resistance(ohms)\n",
+ "\n",
+ "#Results\n",
+ "print\"value of Ro is\",round(Ro/1E-3),\"ohms\"\n",
+ "print\"value of Ro1 is\",round(Ro1/1E-3),\"ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of Ro is 362.0 ohms\n",
+ "value of Ro1 is 343.0 ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 60
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.25,Page number 196"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "beeta=100 #current gain factor\n",
+ "Vbe=0.7 #base to emitter voltage(V)\n",
+ "Rb=250 #base resistance(k ohms)\n",
+ "Vee=10 #emitter voltage(V)\n",
+ "Re=1 #emitter resistance(k ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "Ib=(Vee-Vbe)/(Rb+1+beeta) # solving Rb*Ib+Vbe+(Ic+Ib)=Vee and putting Ic+Ib=(1+beeta)Ib\n",
+ "Ic=beeta*Ib #collector current(mA)\n",
+ "rpi=beeta*(25/Ic) #dynamic resistance(ohms) \n",
+ "Vi=(rpi*Ib)+(1+beeta)*Re*Ib #input voltage(V)\n",
+ "Ri=Vi/Ib #input resistance(k ohms)\n",
+ "\n",
+ "#Results\n",
+ "print\"value of Ri is\",round((Ri/1E+1),1),\"K ohms\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of Ri is 104.5 K ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.26,Page number 197"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "beeta=125 #current gain\n",
+ "gm=35 #transconductance(mS)\n",
+ "Re=4 #emitter resistance(k ohms)\n",
+ "Rb=1.5 #base resistance(k ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "#Part a\n",
+ "rpi=beeta/gm #dynamic resistance(k ohms)\n",
+ "Ri=rpi+((1+beeta)*Re) #input resistance(k ohms) \n",
+ "Ro=((Rb+rpi)*Re)/((Rb+rpi)+((1+beeta)*Re)) #output resistance(ohms) as Ro=Vo/Isc\n",
+ "\n",
+ "#Part b \n",
+ "f=((1+beeta)*Re)/(Rb+rpi+((1+beeta)*Re)) #transfer function\n",
+ "\n",
+ "#Results\n",
+ "print\"value of Ri is\",Ri,\"K ohms and Ro is\",round(Ro,4),\"k\"\n",
+ "print\"transfer function is\",round(f,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of Ri is 507 K ohms and Ro is 0.0354 k\n",
+ "transfer function is 0.99\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.28,Page number 199"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration \n",
+ "Vcc=16 #supply voltage(V)\n",
+ "Vc=12 #collector voltage(V)\n",
+ "Ic=8 #collector current(mA)\n",
+ "Ic1=12 \n",
+ "deltaIc=2000 #collector current(uA)\n",
+ "deltaVce=4 #collector emitter voltage(Vce) \n",
+ "deltaIb=20 #base current(mA) \n",
+ "Rl=2. #load reistance(k ohms) \n",
+ "\n",
+ "#Calculations\n",
+ "hfe=(deltaIc)/(deltaIb)\n",
+ "hoe=(deltaIc)/(deltaVce)\n",
+ "Rdc=Vcc/Ic #dc resistance(k ohms)\n",
+ "Rac=Vc/Ic1 #ac resistance(k ohms)\n",
+ "Re=Rdc-Rac #emitter resistance(k ohms)\n",
+ "Rac1=(Rac*Rl)/(Rac+Rl) #for load of 2kohms, Rc=Rac\n",
+ "Icq=Vcc/(Rac1+Rdc) #Ic at operatingpoint(mA) \n",
+ "Vceq=Vcc-(Icq*Rdc) #Vc at operating point(V)\n",
+ "\n",
+ "#Results\n",
+ "print\"value of hfe and hoe are\",hfe,\"uS and\",hoe,\"uS\"\n",
+ "print\"value Rc and Re are\",Rac,\"k ohms and\",Re,\"k ohms resp.\"\n",
+ "print\"value of Icq and Vce\",Icq,\"mA and\",Vceq,\"V resp.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " value of hfe and hoe are 100 uS and 500 uS\n",
+ "value Rc and Re are 1 k ohms and 1 k ohms resp.\n",
+ "value of Icq and Vce 6.0 mA and 4.0 V resp.\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.29,Page number 200"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "hfe=120 #current gain\n",
+ "r1=1.5 #resistance(k ohms)\n",
+ "Vi=1 #input voltage(V) \n",
+ "hoe=50*10**-3 #output conductance with input open circuited\n",
+ "Rs=2 #source resistance(k ohms)\n",
+ "Vbe=0.7 #base to emitter voltage(V)\n",
+ "Vcc=10 #supply voltage(V)\n",
+ "r3=0.33 #resistance(k ohms)\n",
+ "r4=5.8 #rsistance(k ohms) \n",
+ "r5=27 #rsistance(k ohms) \n",
+ "hoe=50*10**-3 #output conductance with input open circuited\n",
+ " \n",
+ "#Calculations\n",
+ "#Part a\n",
+ "Vbb=Vcc*(r4/(r4+r5)) #voltage to bae(V)\n",
+ "Rb=(r5*r4)/(r5+r4) # as Vbb-Vbe=RbIb+(hfe+1)Ib*R,here hfe=beeta\n",
+ "ib=(Vbb-Vbe)/(Rb+(hfe+1)*r3) #instantaneous base current(mA)\n",
+ "hie=(0.02/ib)*10**3 \n",
+ "Ib=Vi/hie #base current(mA)\n",
+ "h=hfe*Ib\n",
+ "Avo=-h*r1 #voltage gain\n",
+ "\n",
+ "#Part b\n",
+ "r=1/hoe #resistance(k ohms)\n",
+ "R1=(r*r1)/(r+r1) #resitance(k ohms)\n",
+ "R=(R1*Rs)/(R1+Rs) #resistance(k ohms)\n",
+ "Ib1=1/(Rs+R) #base current(mA)\n",
+ "h1=hfe*Ib1\n",
+ "Avl=-h1*R #voltage gain\n",
+ "\n",
+ "#Results\n",
+ "print\"hie and Avo are\",round(hie),\"and\",round((Avo/1E-3),1)\n",
+ "print\"Avl is\",round(Avl,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "hie and Avo are 837.0 and -215.1\n",
+ "Avl is -34.95\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.30,Page number 201"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "Rl=20 #load resistance(ohms)\n",
+ "Vcc=30 #supply voltage(V)\n",
+ "beeta=150 #current gain \n",
+ "Re=2200 #emitter resistance(ohms) \n",
+ "Rb=350 #base resistance(k ohms) \n",
+ "Vbe=0.7 #base to emitter voltage(V)\n",
+ "Is=10**-3 #source current(A) \n",
+ "r1=2000 #resistance(ohms)\n",
+ "\n",
+ "#Calculations\n",
+ "Ib=(Vcc-Vbe)/(Rb+(1+beeta)*Re)#base current(uA)\n",
+ "Ic=beeta*Ib #collector current(mA)\n",
+ "rpi=beeta*(25/Ic) #dynamic resistance(ohms) \n",
+ "R=(Re*Rl)/(Re+Rl) #resistance(ohms) \n",
+ "Ib1=17.95 #round the base emitter(as Rb>>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
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_devices_and_circuits/chapter4.ipynb b/Electronic_devices_and_circuits/chapter4.ipynb
new file mode 100755
index 00000000..deab8d1e
--- /dev/null
+++ b/Electronic_devices_and_circuits/chapter4.ipynb
@@ -0,0 +1,1211 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:b257ecc13b812bf0b848ecef8624701db73088f3de1f9b82ca153fc8113f8c8b"
+ },
+ "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
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_devices_and_circuits/chapter5.ipynb b/Electronic_devices_and_circuits/chapter5.ipynb
new file mode 100755
index 00000000..437b0a36
--- /dev/null
+++ b/Electronic_devices_and_circuits/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/chapter7.ipynb b/Electronic_devices_and_circuits/chapter7.ipynb
new file mode 100755
index 00000000..f37b3943
--- /dev/null
+++ b/Electronic_devices_and_circuits/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/chapter8.ipynb b/Electronic_devices_and_circuits/chapter8.ipynb
new file mode 100755
index 00000000..326b2cab
--- /dev/null
+++ b/Electronic_devices_and_circuits/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/chapter9.ipynb b/Electronic_devices_and_circuits/chapter9.ipynb
new file mode 100755
index 00000000..d1e5d34b
--- /dev/null
+++ b/Electronic_devices_and_circuits/chapter9.ipynb
@@ -0,0 +1,181 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:2422fd711b2fd56d40e4219a033361f9b209ac35916fbe15f9fd192288113f4c"
+ },
+ "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
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Electronic_devices_and_circuits/screenshots/Power-_dissipated.png b/Electronic_devices_and_circuits/screenshots/Power-_dissipated.png
new file mode 100755
index 00000000..3de60308
--- /dev/null
+++ b/Electronic_devices_and_circuits/screenshots/Power-_dissipated.png
Binary files differ
diff --git a/Electronic_devices_and_circuits/screenshots/critical-frequency.png b/Electronic_devices_and_circuits/screenshots/critical-frequency.png
new file mode 100755
index 00000000..b27be009
--- /dev/null
+++ b/Electronic_devices_and_circuits/screenshots/critical-frequency.png
Binary files differ
diff --git a/Electronic_devices_and_circuits/screenshots/output-voltage.png b/Electronic_devices_and_circuits/screenshots/output-voltage.png
new file mode 100755
index 00000000..81a95776
--- /dev/null
+++ b/Electronic_devices_and_circuits/screenshots/output-voltage.png
Binary files differ