summaryrefslogtreecommitdiff
path: root/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma
diff options
context:
space:
mode:
authorhardythe12015-07-03 12:23:43 +0530
committerhardythe12015-07-03 12:23:43 +0530
commit5a86a20b9de487553d4ef88719fb0fd76a5dd6a7 (patch)
treedb67ac5738a18b921d9a8cf6e86f402703f30bdf /Solid_State_Devices_and_Circuits_by_Sanjay_Sharma
parent37d315828bbfc0f5cabee669d2b9dd8cd17b5154 (diff)
downloadPython-Textbook-Companions-5a86a20b9de487553d4ef88719fb0fd76a5dd6a7.tar.gz
Python-Textbook-Companions-5a86a20b9de487553d4ef88719fb0fd76a5dd6a7.tar.bz2
Python-Textbook-Companions-5a86a20b9de487553d4ef88719fb0fd76a5dd6a7.zip
add/remove books
Diffstat (limited to 'Solid_State_Devices_and_Circuits_by_Sanjay_Sharma')
-rwxr-xr-xSolid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_1.ipynb448
-rwxr-xr-xSolid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_1_1.ipynb448
-rwxr-xr-xSolid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_2.ipynb3916
-rwxr-xr-xSolid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_2_1.ipynb3916
-rwxr-xr-xSolid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_3.ipynb801
-rwxr-xr-xSolid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_3_1.ipynb801
-rwxr-xr-xSolid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_4.ipynb675
-rwxr-xr-xSolid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_4_1.ipynb675
-rwxr-xr-xSolid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_5.ipynb1598
-rwxr-xr-xSolid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_5_1.ipynb1598
-rwxr-xr-xSolid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_6.ipynb1464
-rwxr-xr-xSolid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_6_1.ipynb1464
-rwxr-xr-xSolid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_7.ipynb1465
-rwxr-xr-xSolid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_7_1.ipynb1465
14 files changed, 20734 insertions, 0 deletions
diff --git a/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_1.ipynb b/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_1.ipynb
new file mode 100755
index 00000000..996cf740
--- /dev/null
+++ b/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_1.ipynb
@@ -0,0 +1,448 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1: Special Diodes"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.1, Page No. 6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# resistance\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Iz=10*10**-3 # reverse current in ampere\n",
+ "Vz=0.05 # zener voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Rz=Vz/Iz # resistance in ohm\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"resistance (ohm) = %.f \"%Rz);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "resistance (ohm) = 5 \n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.2, Page No. 6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# terminal voltage \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "v=4.7 # in volts\n",
+ "r=15 # in ohm\n",
+ "i=20*10**-3 # in ampere\n",
+ "\n",
+ "#Calculations\n",
+ "Vz=(v+(i*r)) # terminal voltage in volts\n",
+ "\n",
+ "#Result\n",
+ "print(\"terminal voltage = %.f V\"%Vz)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "terminal voltage = 5 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.3, Page No.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# tuning range of the circuit\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "C1=5.0*10**-12 # minimum capacitance in farad\n",
+ "C2=50.0*10**-12 # maximum capacitance in farad\n",
+ "L=10.0*10**-3 # in henry\n",
+ "\n",
+ "#Calculations\n",
+ "CTmin= (C1/2) # minimum total capacitance of varactor diode\n",
+ "p= (math.sqrt(L*CTmin)) # calculating square root\n",
+ "q= (2*math.pi*p)\n",
+ "fomax= (1/q) # maximum resonant frequency\n",
+ "CTmax= ((C2*C2)/(C2+C2)) # maximum total capacitance of varactor diode\n",
+ "r= (math.sqrt(L*CTmax)) # calculating square root\n",
+ "s= (2*math.pi*r)\n",
+ "fomin= (1/s) # minimum resonant frequency\n",
+ "\n",
+ "#Result\n",
+ "print(\"maximum resonant frequency = %.f MHz\"%(fomax/10**6))\n",
+ "print(\"minimum resonant frequency = %.f kHz\"%(fomin/1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum resonant frequency = 1 MHz\n",
+ "minimum resonant frequency = 318 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.4, Page No.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# standard resistor\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "vf=1.8 # in volts\n",
+ "If=16*10**-3 # in ampere\n",
+ "vo=8 # in volts\n",
+ "\n",
+ "#Calculations\n",
+ "rs=(vo-vf)/If # resistor in ohm\n",
+ "\n",
+ "#Result\n",
+ "print(\"standard resistor (ohm) = %.1f\"%rs)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "standard resistor (ohm) = 387.5\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.5, Page No. 24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# min and max value of led current\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "v1=1.5 # in volts\n",
+ "v2=2.3 # in volts\n",
+ "vs=10.0 # in volts\n",
+ "r1=470.0 # in ohm\n",
+ "\n",
+ "#Calculations\n",
+ "I1=(vs-v1)/r1 # in ampere\n",
+ "I2=(vs-v2)/r1 # in ampere\n",
+ "\n",
+ "#Result\n",
+ "print(\"maximum current = %.1f mA\"%(I1*10**3))\n",
+ "print(\"minimum current = %.1f mA\"%(I2*10**3))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum current = 18.1 mA\n",
+ "minimum current = 16.4 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.6, Page No. 24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# which supply voltage will keep brighness of diode constant\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "v1=1.8 # in volts\n",
+ "v2=3.0 # in volts\n",
+ "vs=24.0 # in volts\n",
+ "rs=820.0 # in ohms\n",
+ "vs1=5.0 # in volts\n",
+ "rs1=120.0 # in ohms\n",
+ "r1=470.0 # in ohmI1=(vs-v1)/r1; // in ampere\n",
+ "\n",
+ "#Calcualtions\n",
+ "# case1\n",
+ "Imin=((vs-v2)/rs)\n",
+ "Imax=((vs-v1)/rs)\n",
+ "# case2\n",
+ "Imin1=((vs1-v2)/rs1)\n",
+ "Imax1=((vs1-v1)/rs1)\n",
+ "\n",
+ "#Result\n",
+ "print(\"maximum current in ampere in case1 = %.1f mA\"%(Imax*10**3))\n",
+ "print(\"minimum current in ampere in case1 = %.1f mA\"%(Imin*10**3))\n",
+ "print(\"maximum current in ampere in case2 = %.1f mA\"%(Imax1*10**3))\n",
+ "print(\"minimum current in ampere in case2 = %.1f mA\"%(Imin1*10**3))\n",
+ "print(\"\\nBrightness in the first case will remain constant\")\n",
+ "print(\"where as in second case it will be changing,\")\n",
+ "print(\"Therefore, in order to get an approximately constant\")\n",
+ "print(\"brighntness we use as large a supply voltage as possible.\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum current in ampere in case1 = 27.1 mA\n",
+ "minimum current in ampere in case1 = 25.6 mA\n",
+ "maximum current in ampere in case2 = 26.7 mA\n",
+ "minimum current in ampere in case2 = 16.7 mA\n",
+ "\n",
+ "Brightness in the first case will remain constant\n",
+ "where as in second case it will be changing,\n",
+ "Therefore, in order to get an approximately constant\n",
+ "brighntness we use as large a supply voltage as possible.\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.7.a, Page No. 33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# photocurrent\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "r=0.85 # reponsivity of a photodiode in apmere per watt\n",
+ "p1=1.0 # incident light power in milli watt\n",
+ "\n",
+ "#Calculations\n",
+ "Ip=r*p1\n",
+ "\n",
+ "#Result\n",
+ "print(\"photocurrent = %.2f mA\"%Ip)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "photocurrent = 0.85 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.7.b, Page No. 33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# photocurrent\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "r=0.85 # reponsivity of a photodiode in apmere per watt\n",
+ "p1=2.0 # incident light power in milli watt\n",
+ "\n",
+ "#Result\n",
+ "print(\"Given input power saturation is 1.5mw so Ip is not proportional to Pop\")\n",
+ "print(\"hence we cannot find the value of photocurrent\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Given input power saturation is 1.5mw so Ip is not proportional to Pop\n",
+ "hence we cannot find the value of photocurrent\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.8, Page No. 34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# quantum efficiency\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "EHP=5.4*10**6\n",
+ "photons=6*10**6 \n",
+ "\n",
+ "#Calcualtions\n",
+ "n=EHP/photons\n",
+ "\n",
+ "#Result\n",
+ "print(\"Quantum efficiency = %.1f\"%n)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Quantum efficiency = 0.9\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.9, Page No. 34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Responsivity\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "h=6.62*10**-34 # planc's constant\n",
+ "c=3*10**8 # speed of light in vaccum\n",
+ "e=0.70 # efficiency \n",
+ "Eg=0.75*1.6*10**-19 # Energy gap in volts\n",
+ "\n",
+ "#Calculations\n",
+ "w=((h*c)/Eg) # wavelength in meters (This answer is wrong in the book)\n",
+ "w = 1664*10**-9 # value used in book \n",
+ "R=((e/1248.0)*w) # in ampere per watt\n",
+ "\n",
+ "#Result\n",
+ "print(\"Responsivity = %.3f * 10^-10 AW^-1\"%(R*10**10))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Responsivity = 9.333 * 10^-10 AW^-1\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_1_1.ipynb b/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_1_1.ipynb
new file mode 100755
index 00000000..996cf740
--- /dev/null
+++ b/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_1_1.ipynb
@@ -0,0 +1,448 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 1: Special Diodes"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.1, Page No. 6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# resistance\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Iz=10*10**-3 # reverse current in ampere\n",
+ "Vz=0.05 # zener voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Rz=Vz/Iz # resistance in ohm\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"resistance (ohm) = %.f \"%Rz);"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "resistance (ohm) = 5 \n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.2, Page No. 6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# terminal voltage \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "v=4.7 # in volts\n",
+ "r=15 # in ohm\n",
+ "i=20*10**-3 # in ampere\n",
+ "\n",
+ "#Calculations\n",
+ "Vz=(v+(i*r)) # terminal voltage in volts\n",
+ "\n",
+ "#Result\n",
+ "print(\"terminal voltage = %.f V\"%Vz)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "terminal voltage = 5 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.3, Page No.14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# tuning range of the circuit\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "C1=5.0*10**-12 # minimum capacitance in farad\n",
+ "C2=50.0*10**-12 # maximum capacitance in farad\n",
+ "L=10.0*10**-3 # in henry\n",
+ "\n",
+ "#Calculations\n",
+ "CTmin= (C1/2) # minimum total capacitance of varactor diode\n",
+ "p= (math.sqrt(L*CTmin)) # calculating square root\n",
+ "q= (2*math.pi*p)\n",
+ "fomax= (1/q) # maximum resonant frequency\n",
+ "CTmax= ((C2*C2)/(C2+C2)) # maximum total capacitance of varactor diode\n",
+ "r= (math.sqrt(L*CTmax)) # calculating square root\n",
+ "s= (2*math.pi*r)\n",
+ "fomin= (1/s) # minimum resonant frequency\n",
+ "\n",
+ "#Result\n",
+ "print(\"maximum resonant frequency = %.f MHz\"%(fomax/10**6))\n",
+ "print(\"minimum resonant frequency = %.f kHz\"%(fomin/1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum resonant frequency = 1 MHz\n",
+ "minimum resonant frequency = 318 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.4, Page No.24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# standard resistor\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "vf=1.8 # in volts\n",
+ "If=16*10**-3 # in ampere\n",
+ "vo=8 # in volts\n",
+ "\n",
+ "#Calculations\n",
+ "rs=(vo-vf)/If # resistor in ohm\n",
+ "\n",
+ "#Result\n",
+ "print(\"standard resistor (ohm) = %.1f\"%rs)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "standard resistor (ohm) = 387.5\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.5, Page No. 24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# min and max value of led current\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "v1=1.5 # in volts\n",
+ "v2=2.3 # in volts\n",
+ "vs=10.0 # in volts\n",
+ "r1=470.0 # in ohm\n",
+ "\n",
+ "#Calculations\n",
+ "I1=(vs-v1)/r1 # in ampere\n",
+ "I2=(vs-v2)/r1 # in ampere\n",
+ "\n",
+ "#Result\n",
+ "print(\"maximum current = %.1f mA\"%(I1*10**3))\n",
+ "print(\"minimum current = %.1f mA\"%(I2*10**3))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum current = 18.1 mA\n",
+ "minimum current = 16.4 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.6, Page No. 24"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# which supply voltage will keep brighness of diode constant\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "v1=1.8 # in volts\n",
+ "v2=3.0 # in volts\n",
+ "vs=24.0 # in volts\n",
+ "rs=820.0 # in ohms\n",
+ "vs1=5.0 # in volts\n",
+ "rs1=120.0 # in ohms\n",
+ "r1=470.0 # in ohmI1=(vs-v1)/r1; // in ampere\n",
+ "\n",
+ "#Calcualtions\n",
+ "# case1\n",
+ "Imin=((vs-v2)/rs)\n",
+ "Imax=((vs-v1)/rs)\n",
+ "# case2\n",
+ "Imin1=((vs1-v2)/rs1)\n",
+ "Imax1=((vs1-v1)/rs1)\n",
+ "\n",
+ "#Result\n",
+ "print(\"maximum current in ampere in case1 = %.1f mA\"%(Imax*10**3))\n",
+ "print(\"minimum current in ampere in case1 = %.1f mA\"%(Imin*10**3))\n",
+ "print(\"maximum current in ampere in case2 = %.1f mA\"%(Imax1*10**3))\n",
+ "print(\"minimum current in ampere in case2 = %.1f mA\"%(Imin1*10**3))\n",
+ "print(\"\\nBrightness in the first case will remain constant\")\n",
+ "print(\"where as in second case it will be changing,\")\n",
+ "print(\"Therefore, in order to get an approximately constant\")\n",
+ "print(\"brighntness we use as large a supply voltage as possible.\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum current in ampere in case1 = 27.1 mA\n",
+ "minimum current in ampere in case1 = 25.6 mA\n",
+ "maximum current in ampere in case2 = 26.7 mA\n",
+ "minimum current in ampere in case2 = 16.7 mA\n",
+ "\n",
+ "Brightness in the first case will remain constant\n",
+ "where as in second case it will be changing,\n",
+ "Therefore, in order to get an approximately constant\n",
+ "brighntness we use as large a supply voltage as possible.\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.7.a, Page No. 33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# photocurrent\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "r=0.85 # reponsivity of a photodiode in apmere per watt\n",
+ "p1=1.0 # incident light power in milli watt\n",
+ "\n",
+ "#Calculations\n",
+ "Ip=r*p1\n",
+ "\n",
+ "#Result\n",
+ "print(\"photocurrent = %.2f mA\"%Ip)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "photocurrent = 0.85 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.7.b, Page No. 33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# photocurrent\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "r=0.85 # reponsivity of a photodiode in apmere per watt\n",
+ "p1=2.0 # incident light power in milli watt\n",
+ "\n",
+ "#Result\n",
+ "print(\"Given input power saturation is 1.5mw so Ip is not proportional to Pop\")\n",
+ "print(\"hence we cannot find the value of photocurrent\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Given input power saturation is 1.5mw so Ip is not proportional to Pop\n",
+ "hence we cannot find the value of photocurrent\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.8, Page No. 34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# quantum efficiency\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "EHP=5.4*10**6\n",
+ "photons=6*10**6 \n",
+ "\n",
+ "#Calcualtions\n",
+ "n=EHP/photons\n",
+ "\n",
+ "#Result\n",
+ "print(\"Quantum efficiency = %.1f\"%n)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Quantum efficiency = 0.9\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 1.9, Page No. 34"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Responsivity\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "h=6.62*10**-34 # planc's constant\n",
+ "c=3*10**8 # speed of light in vaccum\n",
+ "e=0.70 # efficiency \n",
+ "Eg=0.75*1.6*10**-19 # Energy gap in volts\n",
+ "\n",
+ "#Calculations\n",
+ "w=((h*c)/Eg) # wavelength in meters (This answer is wrong in the book)\n",
+ "w = 1664*10**-9 # value used in book \n",
+ "R=((e/1248.0)*w) # in ampere per watt\n",
+ "\n",
+ "#Result\n",
+ "print(\"Responsivity = %.3f * 10^-10 AW^-1\"%(R*10**10))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Responsivity = 9.333 * 10^-10 AW^-1\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_2.ipynb b/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_2.ipynb
new file mode 100755
index 00000000..6d8a994c
--- /dev/null
+++ b/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_2.ipynb
@@ -0,0 +1,3916 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 2 : Bipolar Junction Transistors"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.1, Page No. 50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# comman base dc current gain\n",
+ "\n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Ic=2.10*10**-3 # collector current in ampere\n",
+ "Ie=2.18*10**-3 # emitter current in ampere\n",
+ "\n",
+ "#Calculations\n",
+ "alfa=Ic/Ie\n",
+ "\n",
+ "#Result\n",
+ "print(\"comman base dc current gain = %f\"%alfa)\n",
+ "#Different values used for calculations in the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "comman base dc current gain = 0.963303\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2, Page No. 50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Base Current\n",
+ "\n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "alfa= 0.987 # Common base D.C. Current Gain\n",
+ "Ie= 10.0 # in Milli Ampere\n",
+ "\n",
+ "#Calcualtions\n",
+ "Ic= alfa*Ie # Collector Current\n",
+ "Ib=Ie-Ic # Base Current in Mili Ampere\n",
+ "\n",
+ "#Result\n",
+ "print(\"collector current (in mA) = %.2f\"%Ic)\n",
+ "print(\"base current (in mA) = %.2f\"%Ib)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "collector current (in mA) = 9.87\n",
+ "base current (in mA) = 0.13\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.3, Page No. 51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate base current and collector current\n",
+ " \n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "alfa= 0.967 # Common base D.C. Current Gain\n",
+ "Ie= 10.0 # in Milli Ampere\n",
+ "\n",
+ "#Calculations\n",
+ "Ic= alfa*Ie # Collector Current\n",
+ "Ib=Ie-Ic # Base Current in Mili Ampere\n",
+ "\n",
+ "#Result\n",
+ "print(\"collector current (in mA) = %.2f\"%Ic)\n",
+ "print(\"base current (in mA) = %.2f\"%Ib)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "collector current (in mA) = 9.67\n",
+ "base current (in mA) = 0.33\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.4, Page No. 52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate base current and collector current\n",
+ " \n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Beta=100.0 # Common Emitter D.C. Current gain\n",
+ "Ie=10.0 # Emitter current in mili ampere\n",
+ "\n",
+ "#Calculations\n",
+ "alfa= (Beta/(Beta+1)) # Common Base D.C. Current gain\n",
+ "Ic= alfa*Ie # Collector current in milli ampere\n",
+ "Ib=Ie-Ic # Base Current in milli ampere\n",
+ "\n",
+ "#Result\n",
+ "print(\"collector current (in mA) = %.2f\"%Ic)\n",
+ "print(\"base current (in mA) = %.2f\"%Ib)\n",
+ "# Answer in the book is wrong"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "collector current (in mA) = 9.90\n",
+ "base current (in mA) = 0.10\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.5.a, Page No. 53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate Common Emitter D.C. Current gain\n",
+ " \n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "alfa=0.950 # Common base D.C. Current gain\n",
+ "\n",
+ "#Calculations\n",
+ "beta= (alfa/(1-alfa))\n",
+ "\n",
+ "#Result\n",
+ "print(\"Common Emitter D.C. Current gain = %.f\"%beta)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Common Emitter D.C. Current gain = 19\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.5.b, Page No. 53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate Common Base D.C. Current gain\n",
+ " \n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Beta=100.0 #Common emitter D.C. Current gain\n",
+ "\n",
+ "#Calculations\n",
+ "alfa= (Beta/(1+Beta))\n",
+ "\n",
+ "#Result\n",
+ "print(\"Common Base D.C. Current gain = %.2f\"%alfa)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Common Base D.C. Current gain = 0.99\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.6, Page No. 53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate base current and collector current\n",
+ "\n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Beta=100 # Common Emitter D.C. Current gain\n",
+ "Ie=10.0 # Emitter current in mili ampere\n",
+ "\n",
+ "#Calculation\n",
+ "Ib=(Ie/(1+Beta)) # Emitter current in mili amperen mA\n",
+ "Ic= Ie-Ib # Collector current in mili amperen mA\n",
+ "\n",
+ "#Result\n",
+ "print(\"Base current (in mA) = %.3f\"%Ib)\n",
+ "print(\"Collector current (in mA) = %.3f\"%Ic)\n",
+ "#Answer in the book is incorrect"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Base current (in mA) = 0.099\n",
+ "Collector current (in mA) = 9.901\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.7, Page No. 64"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate the collector to emitter voltage(Vce) and Collector current (Ic)\n",
+ "\n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Vcc= 12.0 # as Ic=0 so Vce=Vcc (In volts)\n",
+ "Rc= 3.0 # Collector Resistance in killo oms\n",
+ "\n",
+ "#Calcuations\n",
+ "Ic=Vcc/Rc # Collector Current in Amperes\n",
+ "Vce=Vcc\n",
+ "\n",
+ "#Result\n",
+ "print(\"Colletor to emitter voltage (in volts) = %.f\"%Vce)\n",
+ "print(\" Collector current (in mA) = %.f\"%Ic)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Colletor to emitter voltage (in volts) = 12\n",
+ " Collector current (in mA) = 4\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.8.a, Page No. 73"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate oerating point\n",
+ " \n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Vcc= 6.0 # Colector voltage in volts\n",
+ "Rb= 530.0 # in kilo ohms\n",
+ "Beta=100.0 # Common emitter D.C. Current gain\n",
+ "Rc=2.0 # Collector resistance in killo ohms\n",
+ "Vbe= 0.7 # Base to emitter voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Ib= ((Vcc-Vbe)/Rb) # in micro amperes\n",
+ "Ic=Beta*Ib # in milli ampere\n",
+ "Vce= Vcc-(Ic*Rc) # Colector to emitter voltage in volts\n",
+ "\n",
+ "#Result\n",
+ "print(\"Operating point is (Vce,Ic):\")\n",
+ "print(\"Vce = %.f V\\t Ic = %.f micro-A\"%(Vce,Ic))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Operating point is (Vce,Ic):\n",
+ "Vce = 4 V\t Ic = 1 micro-A\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.8.b, Page No. 73"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate stability factor\n",
+ " \n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Beta=100.0 # Common emitter D.C. Current gain\n",
+ "\n",
+ "#Calculations\n",
+ "S=1+Beta \n",
+ "\n",
+ "#Result\n",
+ "print(\"The Stability factor = %.f\"%S)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Stability factor = 101\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.9.a, Page No. 74"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate base current\n",
+ " \n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Vcc=20.0 # Colector voltage in volts\n",
+ "Rb= 200.0 # in kilo ohms\n",
+ "Beta=75.0 # Common emitter D.C. Current gain\n",
+ "Rc=0.8 # Collector resistance in killo ohms\n",
+ "Vbe= 0.0 # Base to emitter voltage in volts\n",
+ "\n",
+ "#Calcualtions\n",
+ "Ib=Vcc/Rb\n",
+ "\n",
+ "#Result\n",
+ "print(\"Base current in micro-A = %.1f\"%(Ib*10**3))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Base current in micro-A = 100.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.9.b, Page No. 74 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate collector current\n",
+ " \n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Vcc=20.0 # Colector voltage in volts\n",
+ "Rb= 200.0 # in kilo ohms\n",
+ "Beta=75.0 # Common emitter D.C. Current gain\n",
+ "Rc=0.8 # Collector resistance in killo ohms\n",
+ "Vbe= 0.0 # Base to emitter voltage in volts\n",
+ "Ib=0.1 # Base current in mA\n",
+ "\n",
+ "#Cacualtions\n",
+ "Ic=Beta*Ib # Collector current in mA\n",
+ "\n",
+ "#Result\n",
+ "print(\"Collector current in mA = %.1f\"%Ic)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Collector current in mA = 7.5\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.9.c, Page No. 74"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate collector TO emitter voltage\n",
+ " \n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Vcc=20.0 # Colector voltage in volts\n",
+ "Rb= 200.0 # in kilo ohms\n",
+ "Beta=75.0 # Common emitter D.C. Current gain\n",
+ "Rc=0.8 # Collector resistance in killo ohms\n",
+ "Vbe= 0.0 # Base to emitter voltage in volts\n",
+ "Ib=0.1 # Base current in mA\n",
+ "Ic=7.5 # Base current in mA\n",
+ "\n",
+ "#Calculations\n",
+ "Vce=Vcc- (Ic*Rc)\n",
+ "\n",
+ "#Result\n",
+ "print(\"Collector to emitter voltage in volts = %.f\"%Vce)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Collector to emitter voltage in volts = 14\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.9.d, Page No. 74"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate collector TO emitter voltage\n",
+ " \n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Vcc=20.0 # Colector voltage in volts\n",
+ "Rb= 200.0 # in kilo ohms\n",
+ "Beta=75.0 # common emitter D.C. Current gain\n",
+ "Rc=0.8 # Collector resistance in killo ohms\n",
+ "Vbe= 0.0 # Base to emitter voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "S=1+Beta \n",
+ "\n",
+ "#Resut\n",
+ "print(\"The Stability factor = %.f\"%S)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Stability factor = 76\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.10, Page No. 74"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate base resistance , Voltage between collector & ground and Stability factor\n",
+ " \n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Vcc=12.0 # Colector voltage in volts\n",
+ "Ib= 0.3 # in mili ampere\n",
+ "Beta=100.0 # Common emitter D.C. Current gain\n",
+ "Rc=0.3 # Collector resistance in killo ohms\n",
+ "\n",
+ "#Calaculations\n",
+ "Rb=Vcc/Ib\n",
+ "Ic= Beta*Ib\n",
+ "Vce=Vcc -(Ic*Rc)\n",
+ "S=1+Beta \n",
+ "\n",
+ "#Result\n",
+ "print(\"Base resistance in killo ohms = %.f\"%Rb)\n",
+ "print(\"Collector to ground voltgae in volts = %.f\"%Vce)\n",
+ "print(\"The Stability factor = %.f\"%S)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Base resistance in killo ohms = 40\n",
+ "Collector to ground voltgae in volts = 3\n",
+ "The Stability factor = 101\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.11, Page No. 76"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate base current , Collector current and Collector to emitter voltage\n",
+ " \n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Vcc=20.0 # Colector voltage in volts\n",
+ "Rb= 400.0 # in KILLO OHMS\n",
+ "Beta=100.0 # Common emitter D.C. Current gain\n",
+ "Rc=2.0 # Collector resistance in killo ohms\n",
+ "Re=1.0 # Emitter resistance in killo ohms\n",
+ "\n",
+ "#Calcualtions\n",
+ "Ib= Vcc / (Rb + (Beta*Re))\n",
+ "Ic= Beta*Ib\n",
+ "Vce=Vcc -(Ic*(Rc+Re))\n",
+ "\n",
+ "#Result\n",
+ "print(\"Base current in mA = %.2f\"%Ib)\n",
+ "print(\"Collector current in mA = %.f\"%Ic)\n",
+ "print(\"Collector to ground voltgae in volts = %.f\"%Vce)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Base current in mA = 0.04\n",
+ "Collector current in mA = 4\n",
+ "Collector to ground voltgae in volts = 8\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.12, Page No. 77"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate Collector current and Collector to emitter voltage\n",
+ " \n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Vcc=25.0 # Colector voltage in volts\n",
+ "Vbe=0.7 # Base to emitter voltage in volts\n",
+ "Rb= 180.0 # in KILLO OHMS\n",
+ "Beta=80.0 # Common emitter D.C. Current gain\n",
+ "Rc=0.82 # Collector resistance in killo ohms\n",
+ "Re=0.2 # Emitter resistance in killo ohms\n",
+ "\n",
+ "#Calculations\n",
+ "Ic= (Vcc-Vbe)/(Re + (Rb/Beta))\n",
+ "Ic = math.floor(Ic*10)/10\n",
+ "Vce=Vcc -(Ic*(Rc+Re))\n",
+ "\n",
+ "#Result\n",
+ "print(\"Collector current in mA = %.1f\"%Ic)\n",
+ "print(\"Collector to ground voltgae in volts = %f\"%Vce)\n",
+ "#Answer for Vce is incorrect in the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Collector current in mA = 9.9\n",
+ "Collector to ground voltgae in volts = 14.902000\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.13, Page No. 80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate Collector current , Collector to emitter voltage and stability factor\n",
+ " \n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Vcc=20.0 # Colector voltage in volts\n",
+ "Vbe=0.7 # Base to emitter voltage in volts\n",
+ "Rb= 200.0 # in KILLO OHMS\n",
+ "Beta=100.0 # Common emitter D.C. Current gain\n",
+ "Rc=20.0 # Collector resistance in killo ohms\n",
+ "\n",
+ "#Calculations\n",
+ "Ic= (Vcc-Vbe)/(Rc + (Rb/Beta));\n",
+ "Vce=Vcc -(Ic*Rc);\n",
+ "S=(1+Beta)/(1+Beta*(Rc/(Rc+Rb)));\n",
+ "\n",
+ "#Result\n",
+ "print(\"Collector current in mA = %.3f\"%Ic)\n",
+ "print(\"Collector to ground voltgae in volts = %.2f\"%(math.ceil(Vce*100)/100))\n",
+ "print(\"The Stability factor = %.3f\"%S)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Collector current in mA = 0.877\n",
+ "Collector to ground voltgae in volts = 2.46\n",
+ "The Stability factor = 10.009\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.14, Page No. 80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate base current , Collector current , Collector to emitter voltage and stability factor\n",
+ "\n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Vcc=10.0 # Colector voltage in volts\n",
+ "Vbe=0.0 # Base to emitter voltage in volts\n",
+ "Rb= 100.0 # in KILLO OHMS\n",
+ "Beta=100.0 # Common emitter D.C. Current gain\n",
+ "Rc=10.0 # Collector resistance in killo ohms\n",
+ "\n",
+ "#Calcualtions\n",
+ "Ib= (Vcc-Vbe)/(Rb+ Beta*Rc)\n",
+ "Ic= Beta * Ib\n",
+ "Vce=Vcc -(Ic*Rc)\n",
+ "S=(1.0+Beta)/(1.0+Beta*(Rc/(Rc+Rb)))\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"base current = %.f micro-A\"%(Ib*1000))\n",
+ "print(\"Collector current = %.1f mA\"%Ic)\n",
+ "print(\"Collector to ground voltgae = %.1f V\"%(math.ceil(Vce)))\n",
+ "print(\"The Stability factor = %.3f\"%S)\n",
+ "#Answer for stability is wrong in the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "base current = 9 micro-A\n",
+ "Collector current = 0.9 mA\n",
+ "Collector to ground voltgae = 1.0 V\n",
+ "The Stability factor = 10.009\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.15, Page No. 84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate emitter current , Collector current and Collector to emitter voltage \n",
+ " \n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Vcc=10.0 # Colector voltage in volts\n",
+ "Vbe=0.7 # Base to emitter voltage in volts\n",
+ "Vee=10.0 # emitter voltage in volts\n",
+ "Rb= 50.0 # in KILLO OHMS\n",
+ "Beta=100.0 # Common emitter D.C. Current gain\n",
+ "Rc=1.0 # Collector resistance in killo ohms\n",
+ "Re=5.0 # Emitter resistance in killo ohms\n",
+ "\n",
+ "#Calculations\n",
+ "Ie= (Vee-Vbe)/Re\n",
+ "Ic= Ie\n",
+ "Vce1=Vcc -(Ic*Rc)\n",
+ "Ve=-Vbe\n",
+ "Vce=Vce1-Ve\n",
+ "\n",
+ "#Result\n",
+ "print(\"Emitter Current in mA = %.2f\"%Ie)\n",
+ "print(\"Collector current in mA = %.2f\"%Ic)\n",
+ "print(\"Collector to ground voltgae in volts = %.2f\"%Vce)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Emitter Current in mA = 1.86\n",
+ "Collector current in mA = 1.86\n",
+ "Collector to ground voltgae in volts = 8.84\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.16, Page No. 86"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate the change in q point\n",
+ " \n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Vcc=20.0 # Colector voltage in volts\n",
+ "Vbe1=0.7 # Base to emitter voltage in volts\n",
+ "Vee=20.0 # emitter voltage in volts\n",
+ "Rb= 10.0 # in KILLO OHMS\n",
+ "Beta1=50.0 # Common emitter D.C. Current gain\n",
+ "Rc=5.0 # Collector resistance in killo ohms\n",
+ "Re=10.0 # Emitter resistance in killo ohms\n",
+ "Vbe2=0.6 # Base to emitter voltage in volts\n",
+ "Beta2=100.0 # Common emitter D.C. Current gain\n",
+ "\n",
+ "#Calculation\n",
+ "Ie1= (Vee-Vbe1)/(Re+(Rb/Beta1))\n",
+ "Ic1=Ie1\n",
+ "Vce1a=Vcc -(Ic1*Rc)\n",
+ "Ve=-Vbe1\n",
+ "Vce1=Vce1a-Ve\n",
+ "Vce1 = math.ceil(Vce1*100)/100\n",
+ "Ie2= (Vee-Vbe2)*10**3/(Re*10**3+(Rb*10**3/Beta2))\n",
+ "Ie2 = math.ceil(Ie2*1000)/1000\n",
+ "Ic2=Ie2\n",
+ "Vce2a=Vcc -(Ic2*Rc)\n",
+ "Ve=-Vbe2\n",
+ "Vce2=Vce2a-Ve\n",
+ "detaIc= ((Ie2-Ie1)/Ie1)*100\n",
+ "detaVce=((Vce1-Vce2)/Vce1)*100\n",
+ "\n",
+ "#Result\n",
+ "print(\"Emitter Current in first case,Ie = %.3f mA\"%Ie1)\n",
+ "print(\"Collector-to-emitter voltgae in first case,Vce = %.2f V\"%Vce1)\n",
+ "print(\"Emitter Current in second case, Ie = %.3f mA\"%Ie2)\n",
+ "print(\"Collector-to-emitter voltgae in 2nd case, Vce = %.3f V\"%Vce2)\n",
+ "print(\"Change in collector current = %.2f%%\"%(math.ceil(detaIc*100)/100))\n",
+ "print(\"Change in collector to emitter voltage = %.2f%%\"%detaVce)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Emitter Current in first case,Ie = 1.892 mA\n",
+ "Collector-to-emitter voltgae in first case,Vce = 11.24 V\n",
+ "Emitter Current in second case, Ie = 1.921 mA\n",
+ "Collector-to-emitter voltgae in 2nd case, Vce = 10.995 V\n",
+ "Change in collector current = 1.53%\n",
+ "Change in collector to emitter voltage = 2.18%\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.17, Page No. 90"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate dynamic input resistance\n",
+ " \n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "deltaVbe=200.0 # in milli volts\n",
+ "deltaIe=5.0 # in milli ampere\n",
+ "\n",
+ "#Calculations\n",
+ "Ri=deltaVbe/deltaIe\n",
+ "\n",
+ "#Result\n",
+ "print(\"Dyanamic input resistance is (in ohms) = %.f\"%Ri)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Dyanamic input resistance is (in ohms) = 40\n"
+ ]
+ }
+ ],
+ "prompt_number": 47
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.18, Page No. 90"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Transistor parameters\n",
+ "\n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Vcc=15.0 # Colector voltage in volts\n",
+ "Rb= 180.0 # in kilo ohms\n",
+ "Beta=100.0 # Common emitter D.C. Current gain\n",
+ "Rc=1.5 # Collector resistance in killo ohms\n",
+ "Vbe= 0.7 # Base to emitter voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Ib= ((Vcc-Vbe)/Rb) # in milli amperes\n",
+ "Ic=Beta*Ib # in milli ampere\n",
+ "Vce= Vcc-(Ic*Rc) # Colector to emitter voltage in volts\n",
+ "Vc=Vce\n",
+ "Vb=Vbe\n",
+ "Vcb=Vc-Vb\n",
+ "\n",
+ "#Result\n",
+ "print(\"base current = %.2f micro-A \"%(Ib*10**3))\n",
+ "print(\"Collector current = %.2f mA\"%Ic)\n",
+ "print(\"Collector to emitter voltage = %.1f V\"%Vce)\n",
+ "print(\"Collector voltage = %.1f V\"%Vc)\n",
+ "print(\"Base voltage = %.1f V\"%Vb)\n",
+ "print(\"Collector to base voltage = %.1f V\"%Vcb)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "base current = 79.44 micro-A \n",
+ "Collector current = 7.94 mA\n",
+ "Collector to emitter voltage = 3.1 V\n",
+ "Collector voltage = 3.1 V\n",
+ "Base voltage = 0.7 V\n",
+ "Collector to base voltage = 2.4 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.19, Page No. 91"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Operating point , stability factor\n",
+ "\n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Vcc=10.0 # Colector voltage in volts\n",
+ "Rb= 930.0 # in kilo ohms\n",
+ "Beta=100.0 # Common emitter D.C. Current gain\n",
+ "Rc=4.0 # Collector resistance in killo ohms\n",
+ "Vbe= 0.7 # Base to emitter voltage in volts\n",
+ "Ib= ((Vcc-Vbe)/Rb)# in milli amperes\n",
+ "Ic=Beta*Ib # in milli ampere\n",
+ "Vce= Vcc-(Ic*Rc) # Colector to emitter voltage in volts\n",
+ "S=(1+Beta)\n",
+ "\n",
+ "#Result\n",
+ "print(\"Collector to emitter voltage In Volts = %.f\"%Vce)\n",
+ "print(\"Collector current in milli Ampere = %.f\"%Ic)\n",
+ "print(\"The Stability factor = %.f\"%S)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Collector to emitter voltage In Volts = 6\n",
+ "Collector current in milli Ampere = 1\n",
+ "The Stability factor = 101\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.20, Page No. 92"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Base Resistance , stability factor\n",
+ "\n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Vcc=20.0 # Colector voltage in volts\n",
+ "Beta=100.0 # Common emitter D.C. Current gain\n",
+ "Rc=1.0 # Collector resistance in killo ohms\n",
+ "Vce=4.0 # Collector to emitter voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Ic= ((Vcc-Vce)/Rc) # in milli amperes\n",
+ "Ib=Ic/Beta # in milli ampere\n",
+ "Rb=Vce/Ib # in Killo ohms\n",
+ "x = math.floor((1+Beta*(Rc/(Rc+Rb)))*100)/100\n",
+ "S=math.floor((1+Beta)*100/x)/100\n",
+ "\n",
+ "#Result\n",
+ "print(\"Base resistance = %.f k-ohm\"%Rb)\n",
+ "print(\"The Stability factor = %.2f\"%S)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Base resistance = 25 k-ohm\n",
+ "The Stability factor = 20.86\n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.21, Page No. 92"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Quiescent , stability factor\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=10.0 # Colector voltage in volts\n",
+ "Beta=50.0 # Common emitter D.C. Current gain\n",
+ "Rc=2.0 # Collector resistance in killo ohms\n",
+ "Rb= 100.0 # in kilo ohms\n",
+ "Vbe=0.0 # Base to emitter voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Ic= (Vcc-Vbe)/(Rc+(Rb/Beta)) # in milli amperes\n",
+ "Ib=Ic/Beta # in milli ampere\n",
+ "Vce= Vcc-(Ic*Rc) # Colector to emitter voltage in volts\n",
+ "S=(1+Beta)/(1+((Beta*Rc)/(Rc+Rb)))\n",
+ "\n",
+ "#Result\n",
+ "print(\"Operating point is (Vce,Ic): \")\n",
+ "print(\"Colector to emitter voltage = %.f V\"%Vce)\n",
+ "print(\"Collector current = %.1f mA\"%Ic)\n",
+ "print(\"The Stability factor = %.2f\"%S)\n",
+ "#Answer for stability factor is wrong in the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Operating point is (Vce,Ic): \n",
+ "Colector to emitter voltage = 5 V\n",
+ "Collector current = 2.5 mA\n",
+ "The Stability factor = 25.75\n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.22, Page No. 93"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Collector to emitter bias voltage\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=20.0 # Colector voltage in volts\n",
+ "Beta=100 # Common emitter D.C. Current gain\n",
+ "Rc=2.0 # Collector resistance in killo ohms\n",
+ "Rb= 100.0 # in kilo ohms\n",
+ "Vbe=0.7 # Base to emitter voltage in volts\n",
+ "Ic=10.0 # in milli amperes\n",
+ "\n",
+ "#Calculations\n",
+ "Ib=Ic/Beta # in milli ampere\n",
+ "Vce= Vbe+(Ib*Rb) # Colector to emitter voltage in volts\n",
+ "\n",
+ "#Result\n",
+ "print(\"Colector to emitter bias voltage = %.1f V\"%Vce)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Colector to emitter bias voltage = 10.7 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.23, Page No. 93"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Base Currecnt ,Collector current\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Icbo=0.0 # collecttor to base leakage current\n",
+ "Vcc=9.0 # Colector voltage in volts\n",
+ "Beta=100.0 # Common emitter D.C. Current gain\n",
+ "Vce=5.0 # Collector to emitter voltage in volts\n",
+ "Ic=0.2 # in milli amperes\n",
+ "Rc=(Vcc-Vce)/Ic # Collector Reesistance in ohms\n",
+ "Ib=Ic/Beta # in milli ampere\n",
+ "Rb=Vce/Ib # Base resistance in ohms\n",
+ "\n",
+ "#Result\n",
+ "print(\"Collector Resistance = %.f ohm\"%Rc)\n",
+ "print(\"Base Resistance = %.1f k-ohm\"%(Rb/1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Collector Resistance = 20 ohm\n",
+ "Base Resistance = 2.5 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 46
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.24, Page No. 94 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Base Resistance , stability factor\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=24.0 # Colector voltage in volts\n",
+ "Beta=45.0 # Common emitter D.C. Current gain\n",
+ "Rl=10.0 # Collector resistance in killo ohms\n",
+ "Re=0.27 # Emitter resistance in killo ohms\n",
+ "Vce=5 # Collector to emitter voltage in volts\n",
+ "Vbe=0.6 # Base to emitter voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Ib=(Vcc-Vce)/((1+Beta)*(Rl+Re)) # in milli ampere\n",
+ "Ic=Ib/Beta # in micro ampere\n",
+ "R=(Vce-Vbe)/Ib # Resistance in killo ohms\n",
+ "x = math.floor((1+Beta*(Re/(Re+R)))*100)/100\n",
+ "S=(1+Beta)/x\n",
+ "\n",
+ "#Result\n",
+ "print(\"Base resistance = %.f k-ohm\"%(math.ceil(R)))\n",
+ "print(\"The Stability factor = %.2f\"%S)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Base resistance = 110 k-ohm\n",
+ "The Stability factor = 41.44\n"
+ ]
+ }
+ ],
+ "prompt_number": 53
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.25, Page No.95 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Quiescent , stability factor\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=16.0 # Colector voltage in volts\n",
+ "alfa=0.985\n",
+ "Rc=3.0 # Collector resistance in killo ohms\n",
+ "Re= 2.0 # in kilo ohms\n",
+ "R1= 56.0 # in kilo ohms\n",
+ "R2= 20.0 # in kilo ohms\n",
+ "Vbe=0.3 # Base to emitter voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Beta= round(alfa/(1-alfa))\n",
+ "Vb=Vcc * (R2/(R1+R2)) # vOLTAGE AT BASE\n",
+ "Vb = math.floor(Vb*100)/100\n",
+ "Ic= (Vb-Vbe)/Re # in milli amperes\n",
+ "Ib=Ic/Beta # in milli ampere\n",
+ "Vce= Vcc-(Ic*(Rc+Re)) # Colector to emitter voltage in volts\n",
+ "Rth=math.floor((R1*R2)*100/(R1+R2))/100\n",
+ "\n",
+ "S=((1+Beta)*(1+(Rth/Re)))/(1+Beta+(Rth/Re))\n",
+ "\n",
+ "#Result\n",
+ "print(\"Operating point is (Vce,Ic): \")\n",
+ "print(\"Colector to emitter voltage = %.3f V\"%Vce)\n",
+ "print(\"Collector current = %.3f mA\"%Ic)\n",
+ "print(\"The Stability factor = %.2f\"%S)\n",
+ "#Answer for Ic is wrong and hence the Vce. Also answer for stability factor is wrong."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Operating point is (Vce,Ic): \n",
+ "Colector to emitter voltage = 6.225 V\n",
+ "Collector current = 1.955 mA\n",
+ "The Stability factor = 7.54\n"
+ ]
+ }
+ ],
+ "prompt_number": 68
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.26, Page No. 96\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Find R1,R2 & Re\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=10.0 # Colector voltage in volts\n",
+ "Beta=50.0 # Common emitter D.C. Current gain\n",
+ "Rc=2.0 # Collector resistance in killo ohms\n",
+ "Vce=4.0 # Collector to emitter voltage in volts\n",
+ "Vbe=0.3 # Base to emitter voltage in volts\n",
+ "Ic=2.0 # Collector current in milli Ampere\n",
+ "\n",
+ "#Calculations\n",
+ "Ib=Ic/Beta # Base current in milli ampere\n",
+ "I1=10*Ib\n",
+ "Ie=Ic # Emitter current in mili ampere\n",
+ "Re=(Vcc-Ic*Rc-Vce)/Ic# Emiier Resistance\n",
+ "V2=Vbe+Ic*Re # Voltage across R2\n",
+ "R2=V2/I1\n",
+ "R1=25-R2\n",
+ "\n",
+ "#Result\n",
+ "print(\"Resistance, R1 = %.2f k-ohm\"%R1)\n",
+ "print(\"Resistance, R2 = %.2f k-ohm\"%R2)\n",
+ "print(\"Emitter Resistance, Re = %.1f k-ohm\"%Re)\n",
+ "#Answer for R2 is wrong in the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resistance, R1 = 19.25 k-ohm\n",
+ "Resistance, R2 = 5.75 k-ohm\n",
+ "Emitter Resistance, Re = 1.0 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 70
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.27, Page No. 96"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Find R\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=24.0 # Colector voltage in volts\n",
+ "Beta=45.0\n",
+ "Rc=10.0 # Collector resistance in killo ohms\n",
+ "Re= 0.27 # in kilo ohms\n",
+ "Vce=5.0 # Collector to emitter voltage in volts\n",
+ "Vbe=0.6 # Base to emitter voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Ib=(Vcc-Vce)/((1+Beta)*(Rc+Re))\n",
+ "Ic=Ib/Beta\n",
+ "R=(Vce-Vbe)/Ib\n",
+ "\n",
+ "#Result\n",
+ "print(\"Base resistance = %.f k-ohm\"%(math.ceil(R)))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Base resistance = 110 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 72
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.28, Page No.97"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Ic,Vce\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=22.0 # Colector voltage in volts\n",
+ "Beta=40.0\n",
+ "Rc=10.0 # Collector resistance in killo ohms\n",
+ "Re= 1.5 # in kilo ohms\n",
+ "R1= 40.0 # in kilo ohms\n",
+ "R2= 4.0 # in kilo ohms\n",
+ "Vbe=0.5 # Base to emitter voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Vb=Vcc * (R2/(R1+R2)) # VOLTAGE AT BASE\n",
+ "Ic= (Vb-Vbe)/Re # in milli amperes\n",
+ "Ib=Ic/Beta # in milli ampere\n",
+ "Vce= Vcc-(Ic*(Rc+Re)) # Colector to emitter voltage in volts\n",
+ "\n",
+ "#Result\n",
+ "print(\"Colector to emitter voltage = %.1f V\"%Vce)\n",
+ "print(\"Collector current = %.f mA\"%Ic)\n",
+ "#Answer for Vce is wrong in the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Colector to emitter voltage = 10.5 V\n",
+ "Collector current = 1 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 73
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.29, Page No. 98"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Voltage across Re\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=20.0 # Colector voltage in volts\n",
+ "Beta=50.0\n",
+ "R1= 60.0 # in kilo ohms\n",
+ "R2= 30.0 # in kilo ohms\n",
+ "Vbe=0.6 # Base to emitter voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Vb=Vcc * (R2/(R1+R2))\n",
+ "Ve=Vb-Vbe\n",
+ "\n",
+ "#Result\n",
+ "print(\"voltage across Re = %.2f V\"%Ve)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "voltage across Re = 6.07 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 74
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.30, Page No. 99"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Voltage across Re\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=10.0 # in volts\n",
+ "Rb=200.0 # Base resistance in killo ohms\n",
+ "Vbe=0.8 # Base to emitter voltage in volts\n",
+ "Beta=100.0\n",
+ "Vce=0.2 # Collector to emitter voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Ib=5/Rb # Base current in milli ampere\n",
+ "Ic=Beta*Ib # Collector current in milli ampere\n",
+ "Rc= (Vcc-Vce)/Ic # Resistance\n",
+ "\n",
+ "#Result\n",
+ "print(\"Collector resistance = %.2f k-ohm\"%Rc) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Collector resistance = 3.92 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.31, Page No. 99"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Cut off,Vc & Re\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=10.0 # in volts\n",
+ "Rc=3.0 # Collector resistance in killo ohms\n",
+ "Rl=0.5 # in kilo ohms\n",
+ "Rb=7.0 # in kilo ohms\n",
+ "Beta=100.0 # Common emitter D.C. Current gain\n",
+ "Vbe=0.8 # Base to emitter voltage in volts\n",
+ "Ic=2.78 # in mA Applying KVL\n",
+ "Ib=0.1 # in mA Applying KVL\n",
+ "\n",
+ "#Calcualtions\n",
+ "Ibmin=Ic/Beta\n",
+ "Vc=Vbe # in saturation region\n",
+ "Vce=Vc-Rl*(Ic+Ib)\n",
+ "Re=((Vcc-Vce)/Ic)-Rc\n",
+ "\n",
+ "#Result\n",
+ "print(\"Base current = %.1f mA\"%Ib)\n",
+ "print(\"Minimum Base current = %.4f mA\"%Ibmin)\n",
+ "print(\"\\nAs Base current is more than minimum base current so it is in saturation region\")\n",
+ "print(\"\\nEmitter resistance = %.f ohm\"%(Re*1000))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Base current = 0.1 mA\n",
+ "Minimum Base current = 0.0278 mA\n",
+ "\n",
+ "As Base current is more than minimum base current so it is in saturation region\n",
+ "\n",
+ "Emitter resistance = 827 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 77
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.32, Page No. 100"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Beta ,Vcc & Rb\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rc=2.7 # Collector resistance in killo ohms\n",
+ "Re=0.68 # Collector resistance in killo ohms\n",
+ "Ib=0.02 # Base Current in mA\n",
+ "Vce=7.3 # Collector to emitter voltage in volts\n",
+ "Vbe=0.0 # Base to emitter voltage in volts\n",
+ "Ve=2.1 # Emitter Voltage\n",
+ "\n",
+ "#Calculations\n",
+ "Ie= Ve/Re # Emiiter Current in mA\n",
+ "Ic=Ie\n",
+ "Beta=Ic/Ib # Common emitter D.C. Current gain\n",
+ "Vcc= Vce+Ic*(Rc+Re) # Supply Voltage\n",
+ "Vcc = math.floor(Vcc*10)/10\n",
+ "Rb=(Vcc-Ve)/Ib # Base resistance in Killo ohms\n",
+ "\n",
+ "#Result\n",
+ "print(\"Common emitter D.C. Current gain (unitless) = %.f\"%Beta)\n",
+ "print(\"Supply Voltage = %.1f V\"%Vcc)\n",
+ "print(\"base resistance = %.f k-ohm\"%Rb)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Common emitter D.C. Current gain (unitless) = 154\n",
+ "Supply Voltage = 17.7 V\n",
+ "base resistance = 780 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 84
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.33, Page No. 101"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Ic & Vce\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=18 # Colector voltage in volts\n",
+ "Rc=2.2 # Collector resistance in killo ohms\n",
+ "Rb=510.0 # Base resistance in killo ohms\n",
+ "Re=1.8 # Emitter resistance in killo ohms\n",
+ "Beta=90.0 # Common emitter D.C. Current gain\n",
+ "\n",
+ "#Calculations\n",
+ "Ib=Vcc/(Rb+Beta*(Rc+Re)) # Base Current in mA\n",
+ "Ib = math.floor(Ib*100)/100\n",
+ "Ic=Beta*Ib # Collector current in mA\n",
+ "Beta=Ic/Ib # Common emitter D.C. Current gain\n",
+ "Vce= Ib*Rb # Collector to emitter voltage in volts\n",
+ "\n",
+ "#Result\n",
+ "print(\"Colector to emitter voltage, Vce = %.1f V\"%Vce)\n",
+ "print(\"Collector current, Ic = %.1f mA\"%(math.floor(Ic*10)/10)) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Colector to emitter voltage, Vce = 10.2 V\n",
+ "Collector current, Ic = 1.8 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 91
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.34, Page No.101 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Base current\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Ie=10.0 # Emitter current in mA\n",
+ "Ic=9.95 # Collector current in mA\n",
+ "\n",
+ "#Calcualtions\n",
+ "Ib=Ie-Ic # Base Current in mA\n",
+ "\n",
+ "#Result\n",
+ "print(\"Base Current = %.2f mA\"%Ib)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Base Current = 0.05 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.35, Page No. 101"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Ic,Vc,Ve & Vce\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=30.0 # Colector voltage in volts\n",
+ "Beta=100.0\n",
+ "Rc=6.2 # Collector resistance in killo ohms\n",
+ "Re=1.5 # Emitter resistance in killo ohms\n",
+ "Rb=690.0 # Base resistance in killo ohms\n",
+ "Vbe=0.7 # Base to emitter voltage in volts\n",
+ "Ib= (Vcc-Vbe)/(Rb+(1+Beta)*Rc+(1+Beta)*Re)\n",
+ "Ic=math.ceil(Ib*Beta) # in milli ampere\n",
+ "Ie=Ib*(1+Beta) # in milli ampere\n",
+ "Vce=Vcc-Ve-(Ic+Ib)*Rc\n",
+ "Vce = math.ceil(Vce*100)/100\n",
+ "Vc=Vce+Ve\n",
+ "print(\"Collector current, Ic = %.f mA\"%Ic)\n",
+ "print(\"emitter voltage, Ve = %.2f V\"%Ve)\n",
+ "print(\"Colector to emitter voltage, Vce = %.2f V\"%Vce)\n",
+ "print(\"collector voltage = %.2f V\"%Vc)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Collector current, Ic = 2 mA\n",
+ "emitter voltage, Ve = 3.03 V\n",
+ "Colector to emitter voltage, Vce = 14.45 V\n",
+ "collector voltage = 17.48 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 105
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.36, Page No. 103"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# R1,Rc & S\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=16.0 # Colector voltage in volts\n",
+ "alfa=0.985\n",
+ "Ieq=2.0 # Emiier current in mA\n",
+ "R2=30.0 # resistance in killo ohms\n",
+ "Re=1.0 # Emitter resistance in killo ohms\n",
+ "Vbe=0.2 # Base to emitter voltage in volts\n",
+ "Vceq=6.0 # Collector to emitter voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Beta= alfa/(1-alfa)\n",
+ "Icq=alfa*Ieq\n",
+ "Rc=(Vcc-Vceq-Ieq*Re)/Icq\n",
+ "Ir1=((Ieq*Re+Vbe)/R2)+Icq/Beta\n",
+ "R1=(Vcc-Vbe-(Ieq*Re))/Ir1\n",
+ "Rb= (R1*R2)/(R1+R2)\n",
+ "S=(1+Beta)/(1+Beta*(Re/(Re+Rb)))\n",
+ "\n",
+ "#Result\n",
+ "print(\"Collector resistence, Rc = %.2f k-ohm\"%Rc)\n",
+ "print(\"Resistance, R1 = %.2f k-ohm\"%(math.floor(R1*100)/100))\n",
+ "print(\"The Stability factor = %.2f\"%(math.floor(S*100)/100))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Collector resistence, Rc = 4.06 k-ohm\n",
+ "Resistance, R1 = 133.54 k-ohm\n",
+ "The Stability factor = 18.64\n"
+ ]
+ }
+ ],
+ "prompt_number": 110
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.37.a, Page No. 104"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# baising component\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=12.0 # Colector voltage in volts\n",
+ "Beta=180.0\n",
+ "Ieq=2.0 # Emiier current in mA\n",
+ "Rc=1.0 # Collector resistance in killo ohms\n",
+ "Vbe=0.6 # Base to emitter voltage in volts\n",
+ "Vceq=6.0 # Collector to emitter voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Ic= (Vcc-Vceq)/Rc\n",
+ "Ib=Ic/Beta\n",
+ "Rb=(Vcc-Vbe)/Ib\n",
+ "\n",
+ "#Result\n",
+ "print(\"Collector current in fixed bias case = %.f mA\"%Ic)\n",
+ "print(\"Base current in fixed bias case = %.2f mA\"%(Ib*10**3))\n",
+ "print(\"Base resistance in fixed bias case = %.f k-ohm\"%Rb)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Collector current in fixed bias case = 6 mA\n",
+ "Base current in fixed bias case = 33.33 mA\n",
+ "Base resistance in fixed bias case = 342 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 115
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.37.b, Page No. 104"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# baising component\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vb=1.6 # Base voltage\n",
+ "Ve=1.0 # emitter voltage\n",
+ "Vcc=12.0 # Collector voltage in volts\n",
+ "Beta=180.0\n",
+ "Ieq=2.0 # Emiier current in mA\n",
+ "Rc=1.0 # Collector resistance in killo ohms\n",
+ "Vbe=0.6 # Base to emitter voltage in volts\n",
+ "Vceq=6.0 # Collector to emitter voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Ic= (Vcc-Vceq-Ve)/Rc\n",
+ "Ib=math.ceil(Ic*10**5/Beta)*1000/10**5\n",
+ "Ie=Ic+Ib*10**-3 # emitter current in milli ampere\n",
+ "Re= (Ve/(Ie*10**-3)) # emitter resistance in killo ohms\n",
+ "Ir2= 10*Ib\n",
+ "R2= (Ve+Vbe)/(Ir2*10**-6)\n",
+ "Ir1=Ir2+Ib\n",
+ "R1=((Vcc-Vb)/(Ir1*10**-3))\n",
+ "\n",
+ "#Result\n",
+ "print(\"Emitter Current, Ie = %.3f mA\"%(math.floor(Ie*1000)/1000))\n",
+ "print(\"Resistance, Re = %.1f ohm\"%(Re))\n",
+ "print(\"Resistance, R1 = %.2f k-ohm\"%(R1))\n",
+ "print(\"Resistance, R2 = %.1f ohm\"%(R2))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Emitter Current, Ie = 5.027 mA\n",
+ "Resistance, Re = 198.9 ohm\n",
+ "Resistance, R1 = 34.03 k-ohm\n",
+ "Resistance, R2 = 5759.5 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.38.a, Page No. 105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Stability factor\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Beta=180.0 # Common emitter D.C. Current gain\n",
+ "Re=1.0 # Collector resistance in killo ohms\n",
+ "R1=5.76 # resistance in killo ohms\n",
+ "R2=34.67 # resistance in killo ohms\n",
+ "\n",
+ "#Calculations\n",
+ "S=1+Beta\n",
+ "\n",
+ "#Result\n",
+ "print(\"Stability factor in fixed bias case is %.f\"%S)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Stability factor in fixed bias case is 181\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.38.b, Page No. 105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Stability factor\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Beta=180.0 # Common emitter D.C. Current gain\n",
+ "Re=0.199 # Collector resistance in killo ohms\n",
+ "R1=5.76 # resistance in killo ohms\n",
+ "R2=34.67 # resistance in killo ohms\n",
+ "\n",
+ "#Calculations\n",
+ "Rb=math.floor((R1*R2)*100/(R1+R2))/100\n",
+ "S=(1+Beta)/(1+(Beta*(Re/(Re+Rb))))\n",
+ "\n",
+ "#Result\n",
+ "print(\"Stability factor in self bias case is %.2f\"%S)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Stability factor in self bias case is 22.67\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.39.a, Page No. 106"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Stability factor\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "R1=500.0 # Resistance in killo ohms\n",
+ "Rc=500.0 # Collector resistance in killo ohms\n",
+ "R2=5000.0 # Resistance in killo ohms\n",
+ "Vcc=20.0 # Colector voltage in volts\n",
+ "Beta=75.0\n",
+ "Rc=6.2 # Collector resistance in killo ohms\n",
+ "Re=90.0 # Emitter resistance in ohms\n",
+ "Rb=690.0 # Base resistance in killo ohms\n",
+ "Vbe=0.7 # Base to emitter voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Rb=((R1*R2)/(R1+R2))\n",
+ "Vb=Vcc * (R1/(R1+R2))# VOLTAGE AT BASE\n",
+ "Icbo=0.02 # Collector to base leakage current in mA\n",
+ "Sre= (Beta/(Rb+Re*Beta)**2)*(Icbo*10**-6*Rb-Beta*(Vb+Rb*Icbo*10**-6-Vbe))\n",
+ "\n",
+ "#Result\n",
+ "print(\"Stability factor = %.3f * 10^-4 A/ohms\"%(Sre*10**4))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Stability factor = -1.212 * 10^-4 A/ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.39.b, Page No. 106"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Change in Icq\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "R1=500.0 # Resistance in killo ohms\n",
+ "Rc=500. # Collector resistance in killo ohms\n",
+ "R2=5000.0 # Resistance in killo ohms\n",
+ "Vcc=20.0 # Colector voltage in volts\n",
+ "Beta=75.0\n",
+ "Rc=6.2 # Collector resistance in killo ohms\n",
+ "Re=90.0 # Emitter resistance in ohms\n",
+ "Vbe=0.7 # Base to emitter voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Rb=((R1*R2)/(R1+R2))\n",
+ "Vb=Vcc * (R1/(R1+R2)) # VOLTAGE AT BASE\n",
+ "Icbo=0.02 # Collector to base leakage current in mA\n",
+ "Sre= (Beta/(Rb+Re*Beta)**2)*(Icbo*10**-6*Rb-Beta*(Vb+Rb*Icbo*10**-6-Vbe))\n",
+ "DeltaRe= 110-90 # Change in ohms\n",
+ "DeltaIcq= Sre*DeltaRe # Change in Icq\n",
+ "\n",
+ "#Result\n",
+ "print(\"Change in Icq = %.3f mA\"%(DeltaIcq*1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in Icq = -2.424 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.40, Page No. 107"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# R1 & R2\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=5.0 # Colector voltage in volts\n",
+ "Beta=100.0\n",
+ "Vce=2.5 # Collector to emitter voltage in volts\n",
+ "Vbe=0.6 # Base to emitter voltage in volts\n",
+ "R4=0.3 # Resistance in killo ohms\n",
+ "R2=10.0 # Resistance in killo ohms\n",
+ "Ic=1.0 # Collector current in mA\n",
+ "\n",
+ "#Calculations\n",
+ "Vr4=(1+(1/Beta))*Ic*R4\n",
+ "Vcn= Vce-Vr4\n",
+ "R3=(Vcc-Vcn)/Ic\n",
+ "Rb=8.03\n",
+ "R1=(Rb*R2)/(R2-Rb)\n",
+ "\n",
+ "#Result\n",
+ "print(\"Resistance, R1 = %.f k-ohm\"%(math.floor(R1)))\n",
+ "print(\"Base Resistance = %.2f k-ohm\"%Rb)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resistance, R1 = 40 k-ohm\n",
+ "Base Resistance = 8.03 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 45
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.41, Page No. 108"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Re , S\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=12.0 # Colector voltage in volts\n",
+ "Beta=50.0\n",
+ "Vce=2.5 # Collector to emitter voltage in volts\n",
+ "Vbe=0.7 # Base to emitter voltage in volts\n",
+ "Re= 2.57 # Emitter resistance in killo ohms\n",
+ "Rc=4.2 # Collector resistance in killo ohms\n",
+ "\n",
+ "#Calculation\n",
+ "Ic=14/(Rc+(1+(1/Beta)*Re))\n",
+ "Ib= (6-Vbe-Ic*Re)/Re\n",
+ "DeltaIb= -1 # Change in base Current\n",
+ "S= (1+Beta)/(1+Beta)\n",
+ "\n",
+ "#Result\n",
+ "print(\"Resistance, Re = %.2f k-ohm\"%Re)\n",
+ "print(\"Stability Factor = %.f\"%S)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resistance, Re = 2.57 k-ohm\n",
+ "Stability Factor = 1\n"
+ ]
+ }
+ ],
+ "prompt_number": 47
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.42, Page No. 109"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Icq\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "T2=20.0 # Temperature in degree celsius\n",
+ "T1=0.0 # Temperature in degree celsius\n",
+ "Vcc=15.0 # Colector voltage in volts\n",
+ "Beta=75.0\n",
+ "Vce=2.5 # Collector to emitter voltage in volts\n",
+ "Vbe1=0.7 # Base to emitter voltage in volts\n",
+ "Rb= 50.0 # Emitter resistance in killo ohms\n",
+ "Rc=3.0 # Collector resistance in killo ohms\n",
+ "Re=1.0 # Collector resistance in killo ohms\n",
+ "\n",
+ "#Calculation\n",
+ "Ib= ((6-Vbe1)/(Rb+(1+Beta)*Re))*10**3 # Base Current in Micro Amperes\n",
+ "Ic= Beta*Ib*10**-3 # Colectore Current in Milli Ampere\n",
+ "Icbo1=0.5 # Collector to base leakage current in Micrometer\n",
+ "Icbo2=Icbo1*2**((T2-T1)/10) # Collector to base leakage current in Micrometer when temperature 20 degree celsius\n",
+ "Vbe2=Vbe1-2*T2*10**-3 # base to emitter voltage when temperature is 20 degree celsius\n",
+ "Ib1=((6-Vbe2)/(Rb+(1+Beta)*Re))*10**3 # Base Current in Micro Amperes at 20 degree celsius\n",
+ "Ib1 = math.ceil(Ib1*10)/10\n",
+ "Ic1=(Beta*(Ib*10**-3)) # Colectore Current in Milli Ampere\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"Base Current = %.f micro-A\"%Ib)\n",
+ "print(\"Collector current = %.2f mA\"%Ic)\n",
+ "print(\"Collector to base leakage current when T=20 degree celsius = %.f micro-A\"%Icbo2)\n",
+ "print(\"Base to emitter voltage when T=20 degree celsius = %.2f V\"%Vbe2)\n",
+ "print(\"Base Current when T=20 degree celsius = %.1f micro-A\"%Ib1)\n",
+ "print(\"Collector current when T=20 degree celsius = %.2f mA\"%Ic1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Base Current = 42 micro-A\n",
+ "Collector current = 3.15 mA\n",
+ "Collector to base leakage current when T=20 degree celsius = 2 micro-A\n",
+ "Base to emitter voltage when T=20 degree celsius = 0.66 V\n",
+ "Base Current when T=20 degree celsius = 42.4 micro-A\n",
+ "Collector current when T=20 degree celsius = 3.15 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 64
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.43, Page No. 110"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# (a)quiescent current (b) drift in quiescent current\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Beta1=50.0 # gain at 25 degree celsius temperture\n",
+ "Beta2=200.0 # gain at 75 degree celsius temperture\n",
+ "Rb=1.0 # base resistance in killo ohms\n",
+ "Re=0.1 # emitter resistance in ohms\n",
+ "Ico1=0.01 # leakage current at 25 degree celsius temperture in micro ampere\n",
+ "Ico2=0.045 # leakage current at 75 degree celsius temperture in micro ampere\n",
+ "Vbe1=0.7 # base to emitter voltage 25 degree celsius temperture in micro ampere\n",
+ "Vbe2=0.575 # base to emitter voltage 75 degree celsius temperture in micro ampere\n",
+ "\n",
+ "#Calculations\n",
+ "dBeta=Beta2-Beta1 # Change in gain\n",
+ "dIco=Ico2-Ico1 # change in leakage current\n",
+ "dVbe=Vbe2-Vbe1 # change in base to emitter voltage\n",
+ "Ib= (1-Vbe1)/(Rb+(1+Beta1)*Re) # Base current in micro ampere\n",
+ "Ic=Beta1*Ib # Collector current in milli ampere\n",
+ "S=((1+Beta1)*(1+(Rb/Re)))/(1+Beta1+(Rb/Re))\n",
+ "S1=-(Beta1/Re*10**-3)/(1+Beta1+(Rb/Re)) # stability factor\n",
+ "S2=(S*Ic*10**-3)/(Beta1*(1+Beta1)) # stability factor\n",
+ "dIc= ((S*dIco*10**-6)+(S1*dVbe)+(S2*dBeta))*10**3\n",
+ "Icn= Ic+dIc # new collector current in milli ampere\n",
+ "\n",
+ "#Result\n",
+ "print(\"Quiescent current is %.2f mA\"%Ic)\n",
+ "print(\"Quiescent current drift at temperature 75 degree celsius is %.3f mA\"%dIc)\n",
+ "print(\"New quiescent current is %.1f mA\"%Icn)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Quiescent current is 2.46 mA\n",
+ "Quiescent current drift at temperature 75 degree celsius is 2.355 mA\n",
+ "New quiescent current is 4.8 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 67
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.44.a, Page No.111 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# R1,R2 ,Re\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vbe=0.2\n",
+ "Vcc=16.0 # collector voltage in volts\n",
+ "Rc=1.5 # clollector resistance in killo ohms\n",
+ "S=12.0 # stability factor\n",
+ "Vce=8.0 # Collector to emitter voltage\n",
+ "Ic=4.0 # in milli amperes\n",
+ "Beta=50.0 # gain\n",
+ "S1=3.0 # REDUCED STABILITY FACTOR\n",
+ "\n",
+ "#Calcualtions\n",
+ "Ib=(Ic*10**-3)/Beta # Base current in micro ampere\n",
+ "Re=(Vcc-Vce-(Rc*10**3*Ic*10**-3))/(Ic*10**-3+Ib) # emitter resistance in ohms\n",
+ "Rb=round(((11*(1+Beta))/(Beta-11))*Re*10**-3) # base resistance in killo ohms\n",
+ "Vb= (Ib*Rb*1000)+Vbe+((Ic*10**-3)+(Ib*10**-6))*Re# voltage is R2\n",
+ "R1=Vcc*Rb/2.76 #Vb = 2.76 # resistance in killo ohms\n",
+ "R1= math.ceil(R1*10)/10\n",
+ "R2=R1*Rb/(R1-Rb) # RESISTANCE IN KILLO OHMS\n",
+ "\n",
+ "#Result\n",
+ "print(\"Emitter Resistance,Re = %.2f k-ohm\"%(Re*10**-3))\n",
+ "print(\"Resistance, R1 = %.1f k-ohm\"%R1)\n",
+ "print(\"Resistance, R2 = %.2f k-ohm\"%(math.floor(R2*100)/100))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Emitter Resistance,Re = 0.49 k-ohm\n",
+ "Resistance, R1 = 40.6 k-ohm\n",
+ "Resistance, R2 = 8.45 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 95
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.44.b, Page No. 111"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# R1,R2 ,Re\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vbe=0.2\n",
+ "Vcc=16.0 # collector voltage in volts\n",
+ "Rc=1.5 # clollector resistance in killo ohms\n",
+ "S=12.0 # stability factor\n",
+ "Vce=8.0 # Collector to emitter voltage\n",
+ "Ic=4.0 # in milli amperes\n",
+ "Beta=50.0 # gain\n",
+ "Ib=(Ic*10**-3)/Beta # Base current in micro ampere\n",
+ "S1=3.0 # REDUCED STABILITY FACTOR\n",
+ "\n",
+ "#Calcualtions\n",
+ "Re=(Vcc-Vce-(Rc*10**3*Ic*10**-3))/(Ic*10**-3+Ib) # emitter resistance in ohms\n",
+ "Rb=math.floor(((2*(1+Beta))/(Beta-2))*Re*10**-3) # base resistance in killo ohms\n",
+ "Vr2= Vbe+(Ic+Ib*10**3)*Re*10**-3 # voltage is R2\n",
+ "R1=math.floor((Rb)/x) # resistance in killo ohms\n",
+ "R2=(Rb*R1)/(R1-Rb) # RESISTANCE IN KILLO OHMS\n",
+ "Rb1=((3*(1+Beta))/(Beta-3))*Re*10**-3 # EFFECT OF REDUCING STABILITY FACTOR ON BASE RESISTANCE\n",
+ "\n",
+ "#Result\n",
+ "print(\"Emitter Resistance = %.2f k-ohm\"%(Re*10**-3))\n",
+ "print(\"Resistance, R1 = %.f k-ohm\"%R1)\n",
+ "print(\"Resistance, R2 = %.2f k-ohm\"%(math.floor(R2*100)/100))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Emitter Resistance = 0.49 k-ohm\n",
+ "Resistance, R1 = 7 k-ohm\n",
+ "Resistance, R2 = 1.16 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 109
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.45, Page No. 113"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# R1,R2 ,Re\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vbe=0.2\n",
+ "Vcc=20.0 # collector voltage in volts\n",
+ "Rc=2.0 # clollector resistance in killo ohms\n",
+ "S=10.0 # stability factor\n",
+ "Vce=10.0 # Collector to emitter voltage\n",
+ "Ic=4.0 # in milli amperes\n",
+ "Beta=50.0 # gain\n",
+ "S1=3.0 # REDUCED STABILITY FACTOR\n",
+ "\n",
+ "#Calcualtions\n",
+ "Ib=(Ic*10**-3)/Beta # Base current in micro ampere\n",
+ "Re=(Vcc-Vce-(Rc*10**3*Ic*10**-3))/(Ic*10**-3+Ib) # emitter resistance in ohms\n",
+ "Re = math.ceil(Re*10)/10\n",
+ "Rb=math.ceil(((9*(1+Beta))*1000/(Beta-9))*Re*10**-3)/1000# base resistance in killo ohms\n",
+ "Vr2= Vbe+(Ic+Ib*10**3)*Re*10**-3 # voltage is R2\n",
+ "x=(Vr2/Vcc) # Voltage\n",
+ "R1=(Rb)/x # resistance in killo ohms\n",
+ "R2=(x*R1)/(1-x) # RESISTANCE IN KILLO OHMS\n",
+ "Rb1=((3*(1+Beta))/(Beta-3))*Re*10**-3 # EFFECT OF REDUCING STABILITY FACTOR ON BASE RESISTANCE\n",
+ "\n",
+ "#Result\n",
+ "print(\"Emitter resistance = %.1f ohm\"%Re)\n",
+ "print(\"Resistance R1 = %.2f k-ohm\"%R1)\n",
+ "print(\"Resistance R2 = %.2f k-ohm\"%R2)\n",
+ "print(\"Base resistance effect of reducing stability factor reduces input impedence = %f k-ohm\"%Rb1)\n",
+ "#Answer for R1 and base resistor do not match with the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Emitter resistance = 490.2 ohm\n",
+ "Resistance R1 = 49.89 k-ohm\n",
+ "Resistance R2 = 6.17 k-ohm\n",
+ "Base resistance effect of reducing stability factor reduces input impedence = 1.595757 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.46, Page No.115 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# R1,R2 ,Re\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "S=2.0 # stability factor\n",
+ "Vbe=0.8\n",
+ "Vcc=20.0 # collector voltage in volts\n",
+ "Rc=5.0 # collector resistance in killo ohms\n",
+ "Vce=11.5 # Collector to emitter voltage\n",
+ "Ic=1.5 # in milli amperes\n",
+ "Beta=50.0 # gain\n",
+ "\n",
+ "#Calculations\n",
+ "Ib=(Ic*10**-3)/Beta # Base current in micro ampere\n",
+ "Re=(Vcc-Vce-(Rc*10**3*Ic*10**-3))/(Ic*10**-3+Ib)# emitter resistance in ohms\n",
+ "Rb=(((1+Beta))/(Beta-1))*Re # base resistance in killo ohms\n",
+ "Vr2= Vbe+(Ic+Ib*10**3)*Re*10**-3 # voltage is R2\n",
+ "x=(Vr2/Vcc) # Voltage\n",
+ "R1=math.floor(((Rb)/x)*10**-3*100)/100 # resistance in killo ohms\n",
+ "R2=((x*R1)/(1-x))*10**3 # RESISTANCE IN KILLO OHMS\n",
+ "\n",
+ "#Result\n",
+ "print(\"Emitter resistance = %.1f ohm\"%(Re))\n",
+ "print(\"Resistance R1 = %.2f k-ohm\"%R1)\n",
+ "print(\"Resistance R2 = %.1f k-ohm\"%R2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Emitter resistance = 653.6 ohm\n",
+ "Resistance R1 = 7.55 k-ohm\n",
+ "Resistance R2 = 746.7 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.47, Page No. 124"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Ai,Ri,Av\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rs=800.0 # Internal resistance in ohms\n",
+ "Rl=1000.0 # Load resistance in ohms\n",
+ "# H-paramters are\n",
+ "Hie=1.0 # in killo ohms\n",
+ "Hre=2*10**-4\n",
+ "Hfe=50\n",
+ "Hoe=25*10**-6 # in ampere per volt\n",
+ "\n",
+ "#Calcualtions\n",
+ "Ai= -Hfe/(1+Hoe*Rl) # Current gain\n",
+ "Ri= Hie*10**3-((Hfe*Hre)/(Hoe+(1/Rl))) # Input resistance in ohms\n",
+ "Ri = math.floor(Ri*100)/100\n",
+ "Av= Ai*(Rl/Ri) # Voltage Gain\n",
+ "\n",
+ "#Result\n",
+ "print(\"Current gain = %.2f\"%Ai)\n",
+ "print(\"Input resistance = %.2f ohm\"%Ri)\n",
+ "print(\"Voltage gain = %.2f\"%Av)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Current gain = -48.78\n",
+ "Input resistance = 990.24 ohm\n",
+ "Voltage gain = -49.26\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.48, Page No. 126"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Ai,Ri,Av,Ro\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rl=1.2*10**3 # Load resistance in ohms\n",
+ "# H-paramters are\n",
+ "Hib=28.0 # in ohms\n",
+ "Hrb=5*10**-4\n",
+ "Hfb=-0.98\n",
+ "Hob=0.34*10**-6 # in ampere per volt\n",
+ "\n",
+ "#Calculations\n",
+ "Ai= -Hfb/(1+Hob*Rl) # Current gain\n",
+ "Ai = math.ceil(Ai*100)/100\n",
+ "Ri= Hib+(Hrb*Ai*Rl) # Input resistance in ohms\n",
+ "Av= round(Ai*(Rl/Ri)) # Voltage Gain\n",
+ "dh=(Hib*Hob)-(Hrb*Hfb)\n",
+ "Ro=(Hib/dh)*10**-3 # Output resistance in killo ohms\n",
+ "\n",
+ "#Result\n",
+ "print(\"Current gain = %.2f\"%Ai )\n",
+ "print(\"Input resistance = %.1f ohm\"%Ri)\n",
+ "print(\"Voltage gain = %.f\"%Av)\n",
+ "print(\"Ouput resistance = %.f k-ohm\"%Ro)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Current gain = 0.98\n",
+ "Input resistance = 28.6 ohm\n",
+ "Voltage gain = 41\n",
+ "Ouput resistance = 56 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.49, Page No. 129"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Ai,Ri,Av,Avs,Ais\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rl=1000.0 # Load resistance in ohms\n",
+ "Rs=1200.0 # Internal Resistance\n",
+ "# H-paramters are\n",
+ "Hib=22.0 # in ohms\n",
+ "Hrb=3*10**-4\n",
+ "Hfb=-0.98\n",
+ "Hob=0.5*10**-6 # in ampere per volt\n",
+ "\n",
+ "#calculations\n",
+ "Ai= -Hfb/(1+Hob*Rl) # Current gain\n",
+ "Ai = math.ceil(Ai*100)/100\n",
+ "Ri= Hib+(Hrb*Ai*Rl) # Input resistance in ohms\n",
+ "Ri = math.ceil(Ri*10)/10\n",
+ "Av=(Ai*(Rl/Ri)) # Voltage Gain\n",
+ "dh=(Hib*Hob)-(Hrb*Hfb)\n",
+ "Avs=(Av*Ri)/(Ri+Rs) # Overall Voltage gain\n",
+ "Ais=(Ai*Rs)/(Ri+Rs) # Overall Current gain\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"Current gain = %.2f\"%Ai)\n",
+ "print(\"Input resistance = %.1f ohm\"%Ri)\n",
+ "print(\"Voltage gain = %.3f\"%Av)\n",
+ "print(\"Overall Voltage gain = %.3f\"%Avs)\n",
+ "print(\"Overall Current gain = %.3f\"%Ais)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Current gain = 0.98\n",
+ "Input resistance = 22.3 ohm\n",
+ "Voltage gain = 43.946\n",
+ "Overall Voltage gain = 0.802\n",
+ "Overall Current gain = 0.962\n"
+ ]
+ }
+ ],
+ "prompt_number": 45
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.50, Page No.130 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Ai,Ri,Av,Ro\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rl=5000.0 # Load resistance in ohms\n",
+ "Rs=1000.0 # Source internal resistance\n",
+ "R1=10.0 # Resistance in killo ohms\n",
+ "R2=10.0 # Resistance in killo ohms\n",
+ "Re=5*10**3 # Emitter resistance in ohms\n",
+ "# H-paramters are\n",
+ "Hic=2000.0 # in killo ohms\n",
+ "Hrc=1.0\n",
+ "Hfc=-51.0\n",
+ "Hoc=25*10**-6 # in ampere per volt\n",
+ "\n",
+ "#Calculations\n",
+ "Ai= -Hfc/(1+Hoc*Rl) # Current gain\n",
+ "Ai = math.floor(Ai*10)/10\n",
+ "Ri= (Hic+(Hrc*Ai*Rl)) # Input resistance in ohms\n",
+ "Ri = Ri/1000 # in Killo ohm\n",
+ "Z1= (R1*R2)/(R1+R2)\n",
+ "Zi=(Ri*Z1)/(Ri+Z1) # input resistance of amplifier stage in killo ohms\n",
+ "Av=round((Ai*(Rl/Ri))*10**-3)# Voltage Gain\n",
+ "Ro=-(Rs+Hic)/Hfc # Output resistance in ohms\n",
+ "Ro = math.floor(Ro*10)/10\n",
+ "Zo= (Ro*Re)/(Ro+Re) # output resistance of amplifier stage in ohms\n",
+ "\n",
+ "#Result\n",
+ "print(\"Current gain = %.1f\"%Ai)\n",
+ "print(\"Input resistance = %.f k-ohm\"%(Ri))\n",
+ "print(\"Voltage gain = %.f\"%Av)\n",
+ "print(\"input resistance of amplifier stage = %.1f k-ohm\"%Zi)\n",
+ "print(\"Output resistance = %.1f ohm\"%Ro)\n",
+ "print(\"output resistance of amplifier stage= %.1f ohm\"%Zo)\n",
+ "#Answer for Zo is wrong in the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Current gain = 45.3\n",
+ "Input resistance = 228 k-ohm\n",
+ "Voltage gain = 1\n",
+ "input resistance of amplifier stage = 4.9 k-ohm\n",
+ "Output resistance = 58.8 ohm\n",
+ "output resistance of amplifier stage= 58.1 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 61
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.51, Page No. 131"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Ai,Ri,Av,Z0\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "R1=20.0 # Resistance in killo ohms\n",
+ "R2=10.0 # Resistance in killo ohms\n",
+ "Rc=5.0 # collector resistance in killo ohms\n",
+ "R=10.0 # resistance in killo ohms\n",
+ "Rs=800.0 # Internal resistance in ohms\n",
+ "# H-paramters are\n",
+ "Hie=1.5 # in killo ohms\n",
+ "Hre=5*10**-3\n",
+ "Hfe=50.0\n",
+ "Hoe=2*10**-6 # in micro ampere per volt\n",
+ "Ai= -Hfe # Current gain\n",
+ "Ri= Hie # Input resistance in ohms\n",
+ "\n",
+ "#Calculations\n",
+ "Rl=(Rc*R)/(Rc+R) # Load resistance in killo ohms\n",
+ "Rl= math.floor(Rl*10)/10\n",
+ "Z1= (R1*R2)/(R1+R2)\n",
+ "Zi=(Ri*Z1)/(Ri+Z1) # input resistance of amplifier stage in killo ohms\n",
+ "Av= (Ai*(Rl/Ri))# Voltage Gain\n",
+ "Ro=(1/Hoe) # output resistane in killo ohms\n",
+ "Zo=(Ro*Rl)/(Ro+Rl) # output resistance of amplifier stage in ohms\n",
+ "\n",
+ "#Result\n",
+ "print(\"Current gain = %.f\"%Ai)\n",
+ "print(\"input resistance of amplifier = %.2f k-ohm\"%Zi)\n",
+ "print(\"Voltage gain = %.f\"%Av)\n",
+ "print(\"output resistance of amplifier = %.1f ohm\"%Zo)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Current gain = -50\n",
+ "input resistance of amplifier = 1.22 k-ohm\n",
+ "Voltage gain = -110\n",
+ "output resistance of amplifier = 3.3 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 78
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.52, Page No. 131"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Ai,Ri,Av\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rs=0.5 # Internal resistance in killo ohms\n",
+ "Rl=5000.0 # Load resistance in ohms\n",
+ "# H-paramters are\n",
+ "Hie=1000.0 # in ohms\n",
+ "Hfe=50.0\n",
+ "Hoe=25*10**-6 # in ampere per volt\n",
+ "\n",
+ "#Calculations\n",
+ "Ai= (1+Hfe)/(1+Hoe*Rl)# Current gain\n",
+ "Ai = math.floor(Ai*100)/100\n",
+ "Ri= Hie+(Ai*Rl) # Input resistance in ohms\n",
+ "Ri = math.floor(Ri/100)*100\n",
+ "Av= (Ai*Rl)/Ri # Voltage Gain\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"Current gain = %.2f\"%Ai)\n",
+ "print(\"Input resistance = %.1f k-ohm\"%(Ri/1000))\n",
+ "print(\"Voltage gain = %.4f\"%Av)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Current gain = 45.33\n",
+ "Input resistance = 227.6 k-ohm\n",
+ "Voltage gain = 0.9958\n"
+ ]
+ }
+ ],
+ "prompt_number": 97
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.53, Page No. 131"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Ai,Ri,Av\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rs=1.0 # Internal resistance in ohms\n",
+ "Rl=1600.0 # Load resistance in ohms\n",
+ "# H-paramters are\n",
+ "Hie=1100.0 # in ohms\n",
+ "Hfe=2.5*10**-4\n",
+ "Hoe=25*10**-6 # in ampere per volt\n",
+ "\n",
+ "#Calcualtions\n",
+ "Ai= -Hfe/(1+Hoe*Rl) # Current gain\n",
+ "Ri= round(Hie+(Ai*Rl)) # Input resistance in ohms\n",
+ "Av= Ai*(Rl/Ri) # Voltage Gain\n",
+ "Av = math.ceil(Av*10**6)/100\n",
+ "Ai = math.ceil(Ai*10**5)/10\n",
+ "Pg=Ai*Av\n",
+ "\n",
+ "#Result\n",
+ "print(\"Current gain = %.1f * 10^-4\"%(Ai))\n",
+ "print(\"Input resistance = %.f k-ohm\"%Ri)\n",
+ "print(\"Voltage gain = %.2f * 10^-4\"%Av)\n",
+ "print(\"Power gain = %.2f *10^-8\"%(math.floor(Pg*100)/100))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Current gain = -2.4 * 10^-4\n",
+ "Input resistance = 1100 k-ohm\n",
+ "Voltage gain = -3.49 * 10^-4\n",
+ "Power gain = 8.37 *10^-8\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.54.a, Page No. 132"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Icq,Vcq\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vbe=0.0\n",
+ "Vcc=18.0 # collector voltage in volts\n",
+ "R1=510.0 # resistance in killo ohms\n",
+ "R2=510.0 # resistance in killo ohms\n",
+ "Rc=9.1 # clollector resistance in killo ohms\n",
+ "Re=7.5 # emitter resistance in killo ohms\n",
+ "Rs=1.0 # Internal resistance in ohms\n",
+ "Rl=1600.0 # Load resistance in ohms\n",
+ "# H-paramters are\n",
+ "Hie=1100.0 # in ohms\n",
+ "Hfe=2.5*10**-4\n",
+ "Hoe=25*10**-6 # in ampere per volt\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "Vb=Vcc * (R2/(R1+R2)) # vOLTAGE AT BASE\n",
+ "Ic= (Vb-Vbe)/Re # in milli amperes\n",
+ "Vce= Vcc-(Ic*(Rc+Re)) # Colector to emitter voltage in volts\n",
+ "Ai= -Hfe/(1+Hoe*Rl) # Current gain\n",
+ "Ri= round(Hie+(Ai*Rl)) # Input resistance in ohms\n",
+ "Av= Ai*(Rl/Ri) # Voltage Gain\n",
+ "\n",
+ "#Result\n",
+ "print(\"Colector to emitter voltage = %.1f V\"%Vce)\n",
+ "print(\"Collector current = %.1f mA\"%Ic) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Colector to emitter voltage = -1.9 V\n",
+ "Collector current = 1.2 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.54.b, Page No. 132"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Av,Ri\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vbe=0.0\n",
+ "Vcc=18.0 # collector voltage in volts\n",
+ "R1=510.0 # resistance in killo ohms\n",
+ "R2=510.0 # resistance in killo ohms\n",
+ "Rc=9.1 # clollector resistance in killo ohms\n",
+ "Re=7.5 # emitter resistance in killo ohms\n",
+ "Rs=1.0 # Internal resistance in ohms\n",
+ "Rl=1600.0 # Load resistance in ohms\n",
+ "# H-paramters are\n",
+ "Hie=1.0 # in killo ohms\n",
+ "Hfe=50.0\n",
+ "Hoe=0.0 # in ampere per volt\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "Vb=Vcc * (R2/(R1+R2)) # VOLTAGE AT BASE\n",
+ "Ic= (Vb-Vbe)/Re # in milli amperes\n",
+ "Vce= Vcc-(Ic*(Rc+Re)) # Colector to emitter voltage in volts\n",
+ "Ai=-Hfe # current gain\n",
+ "Ri=Hie # Input resistance in ohms\n",
+ "Z1= (R1*R2)/(R1+R2)\n",
+ "Zi=(Ri*Z1)/(Ri+Z1) # input resistance of amplifier stage in killo ohms\n",
+ "Av= Ai*(Rc/Ri) # Voltage Gain\n",
+ "\n",
+ "#Result\n",
+ "print(\"input resistance of amplifier stage = %.2f k-ohm\"%(math.floor(Zi*100)/100))\n",
+ "print(\"Voltage gain is %.f\"%Av)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "input resistance of amplifier stage = 0.99 k-ohm\n",
+ "Voltage gain is -455\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.55, Page No. 140"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# resitive paramters\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Ic= 5.0 # in milli amperes\n",
+ "Vt=26.0 # voltage \n",
+ "# H-paramters are\n",
+ "hie=1.0 # in killo ohms\n",
+ "hfe=100.0\n",
+ "hoe=4*10**-5 # in ampere per volt\n",
+ "hre=10**-4\n",
+ "\n",
+ "#Calculations\n",
+ "gm=math.floor(Ic*1000/Vt)/1000# transconductance\n",
+ "rbe= hfe/gm # in ohms\n",
+ "rbb=hie*10**3-rbe # in ohms\n",
+ "rbc=(rbe/(hre)*10**-6) # in mega ohms\n",
+ "gce1=hoe-(1+hfe)*(1/(rbc*10**6))\n",
+ "rce=(1/gce1)*10**-3 #in killo ohms\n",
+ "\n",
+ "#Result\n",
+ "print(\"transconductance = %.3f mho\"%gm)\n",
+ "print(\"Rbe = %.f ohm\"%rbe)\n",
+ "print(\"Rbb = %.f ohm\"%rbb)\n",
+ "print(\"Rbc = %.2f Mega ohm\"%rbc)\n",
+ "print(\"gce1= %.2f * 10^-5 mho\"%(gce1*10**5))\n",
+ "print(\"Rce = %.1f killo ohm\"%rce)\n",
+ "#Answer for Rbe is wrong in the book and hence for Rbb and Rbc"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "transconductance = 0.192 mho\n",
+ "Rbe = 521 ohm\n",
+ "Rbb = 479 ohm\n",
+ "Rbc = 5.21 Mega ohm\n",
+ "gce1= 2.06 * 10^-5 mho\n",
+ "Rce = 48.5 killo ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.56, Page No. 140"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# ressitive paramters\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Ic= 1.0 # in milli amperes\n",
+ "Vt=26.0 # volatge \n",
+ "ft=80.0 # frequency in mega hertz\n",
+ "Cbc=12 # in pico farad\n",
+ "# H-paramters are\n",
+ "hie=6.0 # in killo ohms\n",
+ "hfe=224.0\n",
+ "\n",
+ "#Calculations\n",
+ "gm=Ic/Vt # transconductance\n",
+ "rbe= hfe/gm # in ohms\n",
+ "rbb=hie*10**3-rbe\n",
+ "Cbe= (((gm)/(2*math.pi*ft*10**6))-Cbc*10**-12)*10**12\n",
+ "\n",
+ "#Result\n",
+ "print(\"transconductance = %.2f m-mho\"%(gm*1000))\n",
+ "print(\"Rbe = %.3f k-ohm\"%(rbe/1000))\n",
+ "print(\"Rbb = %.f ohm\"%rbb)\n",
+ "print(\"Cbe = %.1f pF\"%Cbe)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "transconductance = 38.46 m-mho\n",
+ "Rbe = 5.824 k-ohm\n",
+ "Rbb = 176 ohm\n",
+ "Cbe = 64.5 pF\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.57, Page No. 145"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# alpha ,beta and cut off frequencies\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Cbc=12.0 # in pico farad\n",
+ "# H-paramters are\n",
+ "hie=6.0 # in killo ohms\n",
+ "hfe=224.0\n",
+ "gm=38.0 # transconductance\n",
+ "rbe=5.9 # in killo ohms\n",
+ "rbb=100.0 # in ohms\n",
+ "Cbe= 63.0 # in pico farad\n",
+ "\n",
+ "#Calculations\n",
+ "falpha= ((hfe)/(2*math.pi*rbe*10**3*Cbe*10**-12))*10**-6\n",
+ "fbeta= ((1)/(2*math.pi*rbe*10**3*(Cbe+Cbc)*10**-12))*10**-6\n",
+ "ft= ((gm*10**-3/(2*math.pi*(Cbe+Cbc)*10**-12)))*10**-6\n",
+ "\n",
+ "#Result\n",
+ "print(\"F_alfa = %.1f MHz\"%falpha)\n",
+ "print(\"F_beta = %.3f MHz\"%(math.floor(fbeta*1000)/1000))\n",
+ "print(\"F_t = %.2f MHz\"%(math.floor(ft*100)/100))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "F_alfa = 95.9 MHz\n",
+ "F_beta = 0.359 MHz\n",
+ "F_t = 80.63 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.58, Page No. 147"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# ressitive paramters\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Ic= 2.6 # in milli amperes\n",
+ "Vt=26.0 # volatge \n",
+ "ft=500.0 # frequency in mega hertz\n",
+ "Cbc=3.0 # in pico farad\n",
+ "rbb=100.0 # in ohms\n",
+ "rbe=1.0 # IN KILLO OHMS\n",
+ "\n",
+ "#calculations\n",
+ "gm=Ic/Vt # transconductance\n",
+ "Beta= gm*rbe*10**3\n",
+ "Cbe= (((gm)/(2*math.pi*ft*10**6))-Cbc*10**-12)*10**12\n",
+ "\n",
+ "#Result\n",
+ "print(\"transconductance = %.1f mho\"%gm)\n",
+ "print(\"Cbe = %.2f pF\"%Cbe)\n",
+ "#Answer for Cbe is slightly different than book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "transconductance = 0.1 mho\n",
+ "Cbe = 28.83 pF\n"
+ ]
+ }
+ ],
+ "prompt_number": 46
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ " Example 2.59, Page No. 148"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# h-parameters and hybrid parameters\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "# H-paramters are\n",
+ "hie=1100.0 # in killo ohms\n",
+ "hre=2.5*10**-4\n",
+ "hfe=50.0\n",
+ "hoe=2.5*10**-5 # in ampere per volt\n",
+ "rbb=100.0\n",
+ "\n",
+ "#Calculations\n",
+ "hic=hie\n",
+ "hrc=1-hre\n",
+ "hfc=-(1+hfe)\n",
+ "hoc=hoe\n",
+ "hib=(hie/(1+hfe))\n",
+ "hrb= ((hie*hoe)/(1+hfe))-hre\n",
+ "hob=(hoe/(1+hfe))\n",
+ "rbe=(hie-rbb)*10**-3 # in killo ohms\n",
+ "rbc= ((hie-rbb)/hre)*10**-6\n",
+ "gm= ((hfe/(hie-rbb)))\n",
+ "x=hoe-((hfe*hre)/(hie-rbb))\n",
+ "rce=1/(1.25*10**-2)\n",
+ "\n",
+ "#Result\n",
+ "print(\"\\nH-parameters for common collector configuration are:\")\n",
+ "print(\"hic = %.f ohm\\nhrc = %.f\\nhfc = %.f\\nhoc = %.1f*10^-5 mho\"%(hie,hrc,hfc,hoc*10**5))\n",
+ "print(\"\\nH-parameters for common collector configuration are:\")\n",
+ "print(\"hib = %.2f ohm\\nhrb = %.1f*10^4\\nhob = %.1f*10^-6 mho\"%(hib,hrb*10**4,hob*10**6))\n",
+ "print(\"\\nhybrid pie paramtere are:\")\n",
+ "print(\"rbe(in killo ohms) = %.f\\nrbc(mega ohms)\\t = %.f\\ntransconductance(mho)= %.f\\nrce(in killo ohms) = %.f\"%(rbe,rbc,gm,rce))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "H-parameters for common collector configuration are:\n",
+ "hic = 1100 ohm\n",
+ "hrc = 1\n",
+ "hfc = -51\n",
+ "hoc = 2.5*10^-5 mho\n",
+ "\n",
+ "H-parameters for common collector configuration are:\n",
+ "hib = 21.57 ohm\n",
+ "hrb = 2.9*10^4\n",
+ "hob = 0.5*10^-6 mho\n",
+ "\n",
+ "hybrid pie paramtere are:\n",
+ "rbe(in killo ohms) = 1\n",
+ "rbc(mega ohms)\t = 4\n",
+ "transconductance(mho)= 0\n",
+ "rce(in killo ohms) = 80\n"
+ ]
+ }
+ ],
+ "prompt_number": 72
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.60, Page No. 149"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# hybrid parameters\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Ic= 10.0 # in milli amperes\n",
+ "Vt=26.0 # volatge \n",
+ "ft=500.0 # frequency in mega hertz\n",
+ "Cbc=3.0 # in pico farad\n",
+ "gm=Ic/Vt # transconductance\n",
+ "# H-paramters are\n",
+ "hie=500.0 # in killo ohms\n",
+ "hfe=100.0\n",
+ "hre=0.1\n",
+ "hoe=4*10**-5 # in ampere per volt\n",
+ "\n",
+ "#Calculations\n",
+ "rbe=hfe/gm # in ohms\n",
+ "rbc= ((rbe)/hre)*10**-3\n",
+ "x=hoe-((hfe*10**-4)/(rbe))\n",
+ "rce=(1/(x*10**-2))*10**-5\n",
+ "Cbe=(((gm)/(2*math.pi*ft*10**6))*10**13-Cbc)\n",
+ "\n",
+ "#Result\n",
+ "print(\"transconductance = %.3f mho\"%gm)\n",
+ "print(\"(rbe) = %.f ohm\"%rbe)\n",
+ "print(\"(rbc) = %.1f Mega-ohm\"%rbc)\n",
+ "print(\"(rce) = %.f k-ohm\"%rce)\n",
+ "print(\"(Cbe) = %.f pF\"%Cbe)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "transconductance = 0.385 mho\n",
+ "(rbe) = 260 ohm\n",
+ "(rbc) = 2.6 Mega-ohm\n",
+ "(rce) = 650 k-ohm\n",
+ "(Cbe) = 1221 pF\n"
+ ]
+ }
+ ],
+ "prompt_number": 78
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.61, Page No. 149"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# hybrid parameters\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Ai=10.0 # current gain\n",
+ "Vce=10.0\n",
+ "Ic= 10.0 # in milli amperes\n",
+ "Vt=26.0 # volatge \n",
+ "f=10.0 # frequency in mega hertz\n",
+ "Cbc=3.0 # in pico farad\n",
+ "gm=Ic/Vt # transconductance\n",
+ "# H-paramters are\n",
+ "hie=500.0 # in ohms\n",
+ "hfe=100.0\n",
+ "\n",
+ "#Calculations\n",
+ "rbe= hfe/gm\n",
+ "rbb= hie-rbe\n",
+ "Ft= Ai*f\n",
+ "fb= Ft/hfe\n",
+ "Ce=((gm/(2*math.pi*Ft*10**6))-Cbc*10**-12)*10**12\n",
+ "\n",
+ "#Result\n",
+ "print(\"(gm) = %.1f mS\"%(gm*10**3))\n",
+ "print(\"(rbe) = %.f ohm\"%rbe)\n",
+ "print(\"(rbb) = %.f ohm\"%rbb)\n",
+ "print(\"(ft) = %.f MHz\"%Ft)\n",
+ "print(\"(fb) = %.f MHz\"%fb)\n",
+ "print(\"(Ce) = %.f p-F\"%Ce)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(gm) = 384.6 mS\n",
+ "(rbe) = 260 ohm\n",
+ "(rbb) = 240 ohm\n",
+ "(ft) = 100 MHz\n",
+ "(fb) = 1 MHz\n",
+ "(Ce) = 609 p-F\n"
+ ]
+ }
+ ],
+ "prompt_number": 81
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.62, Page No. 150"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# mid band voltage gain and cut off frequency\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rs=1.0 \n",
+ "ft=500.0 # frequency in mega hertz\n",
+ "Cbc=5.0 # in pico farad\n",
+ "# H-paramters are\n",
+ "hie=500.0\n",
+ "hfe=100.0\n",
+ "rbe= 900.0\n",
+ "rbb= 100.0\n",
+ "Rl=500.0 # load resistance in ohms\n",
+ "\n",
+ "#Calculations\n",
+ "gm=hfe/rbe # in mho\n",
+ "Av=((-gm*Rl)) # voltage gain\n",
+ "Avs= ((Av*rbe)/(Rs*10**3+rbb+rbe))\n",
+ "fb= ft/hfe\n",
+ "\n",
+ "#Result\n",
+ "print(\"mid band voltage gain is %.f\"%Avs)\n",
+ "print(\"Fb = %.f MHz\"%fb)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "mid band voltage gain is -25\n",
+ "Fb = 5 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 58
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.63, Page No. 150"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# mid band voltage gain and cut off frequency\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rs=1.0\n",
+ "ft=500.0 # frequency in mega hertz\n",
+ "Cbc=5.0 # in pico farad\n",
+ "# H-paramters are\n",
+ "gm=100.0 # in mho\n",
+ "hfe=100.0\n",
+ "rbb= 100.0\n",
+ "Rl=500.0 # load resistance in ohms\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "rbe=hfe/(gm*10**-3)\n",
+ "Av=((-gm*10**-3*Rl))\n",
+ "Avs= ((Av*rbe)/(Rs*10**3+rbb+rbe))\n",
+ "fb= ft/hfe\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"mid band voltage gain is %.2f\"%Avs)\n",
+ "print(\"Fb = %.f MHz\"%fb)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "mid band voltage gain is -23.81\n",
+ "Fb = 5 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 83
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.64, Page No. 156"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# resonant frequency and voltage drop\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "L=100.0 # in micro henry\n",
+ "C=253.3 # in micro farad\n",
+ "R=15.7 # in ohms\n",
+ "V=0.157\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "fr=((1/(2*math.pi*math.sqrt(L*10**-6*C*10**-12))))*10**-6 # resonant frequency in mega hertz\n",
+ "Ir=V/R\n",
+ "Vr=V\n",
+ "Vl=Ir*(2*math.pi*fr*10**6*L*10**-6)\n",
+ "Xc= (1/(2*math.pi*fr*10**6*C*10**-12))\n",
+ "Vc= Ir*Xc\n",
+ "Q=((2*math.pi*fr*10**6*L*10**-6)/R)\n",
+ "\n",
+ "#Result\n",
+ "print(\"resonant frequency = %.f MHz\"%fr)\n",
+ "print(\"Voltage drop across resitor = %.3f V\"%Vr)\n",
+ "print(\"Voltage drop across inductor = %.3f V\"%Vl)\n",
+ "print(\"Voltage drop across capacitor = %.3f V\"%Vc)\n",
+ "print(\"Quality factor of coil = %.f\"%Q)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "resonant frequency = 1 MHz\n",
+ "Voltage drop across resitor = 0.157 V\n",
+ "Voltage drop across inductor = 6.283 V\n",
+ "Voltage drop across capacitor = 6.283 V\n",
+ "Quality factor of coil = 40\n"
+ ]
+ }
+ ],
+ "prompt_number": 89
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.65, Page No. 160"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# resonant frequency ,impedence,Q-factor,Bnadwidth,line current and resonant frequency\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V=10.0\n",
+ "L=1.2 # in micro henry\n",
+ "C=200.0 # in micro farad\n",
+ "R=8.0 # in ohms\n",
+ "\n",
+ "#Calculations\n",
+ "fr=(1/(2*math.pi))*(math.sqrt((1/(L*10**-3*C*10**-12))-(R**2/(L*10**-3)**2))*10**-3) # resonant frequency in killo hertz\n",
+ "Zr=(L*10**-3)/(C*10**-9*R) # IN KILLO OHMS\n",
+ "Q=((2*math.pi*fr*10**6*L*10**-6)/R)\n",
+ "BW=fr/Q\n",
+ "Ir=(V/Zr)*10**3\n",
+ "fr1=((1/(2*math.pi*math.sqrt(L*10**-3*C*10**-12))))*10**-3 #resonant frequency in mega hertz\n",
+ "\n",
+ "#Result\n",
+ "print(\"resonant frequency = %.3f kHz\"%fr)\n",
+ "print(\"Impedence is %.f k-ohm\"%Zr)\n",
+ "print(\"bandwidth is %.2f kHz\"%BW)\n",
+ "print(\"line current is %.2f micro-A\"%Ir)\n",
+ "print(\"Quality factor of coil is %.1f\"%Q)\n",
+ "print(\"resonant frequency neglecting resistance = %.3f kHz\"%(math.floor(fr1*1000)/1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "resonant frequency = 324.872 kHz\n",
+ "Impedence is 750 k-ohm\n",
+ "bandwidth is 1.06 kHz\n",
+ "line current is 13.33 micro-A\n",
+ "Quality factor of coil is 306.2\n",
+ "resonant frequency neglecting resistance = 324.873 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 99
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.66, Page No. 161"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# resonant frequency ,impedence,Q-factor,Bnadwidth\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V=10.0\n",
+ "L=150.0 # in micro henry\n",
+ "C=100.0 # in micro farad\n",
+ "R=5 # in ohms\n",
+ "\n",
+ "#Calculations\n",
+ "fr=((1/(2*math.pi*math.sqrt(L*10**-6*C*10**-12))))*10**-3 # resonant frequency in killo hertz\n",
+ "Zr=(L*10**-3)/(C*10**-9*R) # IN KILLO OHMS\n",
+ "Q=((2*math.pi*fr*10**6*L*10**-6)/R)*10**-3\n",
+ "BW=(fr/Q)\n",
+ "\n",
+ "#Result\n",
+ "print(\"resonant frequency = %.1f kHz\"%fr)\n",
+ "print(\"Impedance is %.f k-ohm\"%(Zr*10**-3))\n",
+ "print(\"Quality factor of coil is %.f\"%Q)\n",
+ "print(\"bandwidth = %.1f kHz\"%BW)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "resonant frequency = 1299.5 kHz\n",
+ "Impedance is 300 k-ohm\n",
+ "Quality factor of coil is 245\n",
+ "bandwidth = 5.3 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 104
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.67, Page No. 162"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Q FACTOR\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "fr=1600.0 # resonant frequency in killo hertz\n",
+ "BW=10.0 # In kill hertz\n",
+ "\n",
+ "#Calculations\n",
+ "Qr=fr/BW\n",
+ "\n",
+ "#Result\n",
+ "print(\"value of quality factor is %.f\"%Qr)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of quality factor is 160\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.68, Page No. 163"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Q FACTOR\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "fr=2*10**6 # resonant frequency in hertz\n",
+ "BW=50*10**3 # hertz\n",
+ "\n",
+ "#Calcualtions\n",
+ "Qr=fr/BW\n",
+ "\n",
+ "#Result\n",
+ "print(\"value of quality factor is %.f\"%Qr)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of quality factor is 40\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.69, Page No. 163"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# parallel impedence\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "fr=455.0*10**3 # resonant frequency in hertz\n",
+ "BW=10.0*10**3 # hertz\n",
+ "Xl=1255.0 # inductive reactance in ohm\n",
+ "\n",
+ "#Calculations\n",
+ "Qr=fr/BW\n",
+ "R=Xl/Qr\n",
+ "L=Xl/(2*math.pi*fr)\n",
+ "C=1/(2*math.pi*fr*Xl)\n",
+ "Zp=(L/(C*R))*10**-3\n",
+ "\n",
+ "#Result\n",
+ "print(\"value of quality factor is %.1f\"%Qr)\n",
+ "print(\"resisitance = %.1f ohm\"%R)\n",
+ "print(\"inductance = %.3f * 10^-3 H\"%(L*1000))\n",
+ "print(\"capacitor = %.1f * 10^-12 F\"%(C*10**12))\n",
+ "print(\"parallel impedence = %.f k-ohm\"%Zp)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of quality factor is 45.5\n",
+ "resisitance = 27.6 ohm\n",
+ "inductance = 0.439 * 10^-3 H\n",
+ "capacitor = 278.7 * 10^-12 F\n",
+ "parallel impedence = 57 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 115
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_2_1.ipynb b/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_2_1.ipynb
new file mode 100755
index 00000000..6d8a994c
--- /dev/null
+++ b/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_2_1.ipynb
@@ -0,0 +1,3916 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 2 : Bipolar Junction Transistors"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.1, Page No. 50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# comman base dc current gain\n",
+ "\n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Ic=2.10*10**-3 # collector current in ampere\n",
+ "Ie=2.18*10**-3 # emitter current in ampere\n",
+ "\n",
+ "#Calculations\n",
+ "alfa=Ic/Ie\n",
+ "\n",
+ "#Result\n",
+ "print(\"comman base dc current gain = %f\"%alfa)\n",
+ "#Different values used for calculations in the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "comman base dc current gain = 0.963303\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.2, Page No. 50"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Base Current\n",
+ "\n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "alfa= 0.987 # Common base D.C. Current Gain\n",
+ "Ie= 10.0 # in Milli Ampere\n",
+ "\n",
+ "#Calcualtions\n",
+ "Ic= alfa*Ie # Collector Current\n",
+ "Ib=Ie-Ic # Base Current in Mili Ampere\n",
+ "\n",
+ "#Result\n",
+ "print(\"collector current (in mA) = %.2f\"%Ic)\n",
+ "print(\"base current (in mA) = %.2f\"%Ib)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "collector current (in mA) = 9.87\n",
+ "base current (in mA) = 0.13\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.3, Page No. 51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate base current and collector current\n",
+ " \n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "alfa= 0.967 # Common base D.C. Current Gain\n",
+ "Ie= 10.0 # in Milli Ampere\n",
+ "\n",
+ "#Calculations\n",
+ "Ic= alfa*Ie # Collector Current\n",
+ "Ib=Ie-Ic # Base Current in Mili Ampere\n",
+ "\n",
+ "#Result\n",
+ "print(\"collector current (in mA) = %.2f\"%Ic)\n",
+ "print(\"base current (in mA) = %.2f\"%Ib)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "collector current (in mA) = 9.67\n",
+ "base current (in mA) = 0.33\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.4, Page No. 52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate base current and collector current\n",
+ " \n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Beta=100.0 # Common Emitter D.C. Current gain\n",
+ "Ie=10.0 # Emitter current in mili ampere\n",
+ "\n",
+ "#Calculations\n",
+ "alfa= (Beta/(Beta+1)) # Common Base D.C. Current gain\n",
+ "Ic= alfa*Ie # Collector current in milli ampere\n",
+ "Ib=Ie-Ic # Base Current in milli ampere\n",
+ "\n",
+ "#Result\n",
+ "print(\"collector current (in mA) = %.2f\"%Ic)\n",
+ "print(\"base current (in mA) = %.2f\"%Ib)\n",
+ "# Answer in the book is wrong"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "collector current (in mA) = 9.90\n",
+ "base current (in mA) = 0.10\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.5.a, Page No. 53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate Common Emitter D.C. Current gain\n",
+ " \n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "alfa=0.950 # Common base D.C. Current gain\n",
+ "\n",
+ "#Calculations\n",
+ "beta= (alfa/(1-alfa))\n",
+ "\n",
+ "#Result\n",
+ "print(\"Common Emitter D.C. Current gain = %.f\"%beta)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Common Emitter D.C. Current gain = 19\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.5.b, Page No. 53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate Common Base D.C. Current gain\n",
+ " \n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Beta=100.0 #Common emitter D.C. Current gain\n",
+ "\n",
+ "#Calculations\n",
+ "alfa= (Beta/(1+Beta))\n",
+ "\n",
+ "#Result\n",
+ "print(\"Common Base D.C. Current gain = %.2f\"%alfa)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Common Base D.C. Current gain = 0.99\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.6, Page No. 53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate base current and collector current\n",
+ "\n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Beta=100 # Common Emitter D.C. Current gain\n",
+ "Ie=10.0 # Emitter current in mili ampere\n",
+ "\n",
+ "#Calculation\n",
+ "Ib=(Ie/(1+Beta)) # Emitter current in mili amperen mA\n",
+ "Ic= Ie-Ib # Collector current in mili amperen mA\n",
+ "\n",
+ "#Result\n",
+ "print(\"Base current (in mA) = %.3f\"%Ib)\n",
+ "print(\"Collector current (in mA) = %.3f\"%Ic)\n",
+ "#Answer in the book is incorrect"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Base current (in mA) = 0.099\n",
+ "Collector current (in mA) = 9.901\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.7, Page No. 64"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate the collector to emitter voltage(Vce) and Collector current (Ic)\n",
+ "\n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Vcc= 12.0 # as Ic=0 so Vce=Vcc (In volts)\n",
+ "Rc= 3.0 # Collector Resistance in killo oms\n",
+ "\n",
+ "#Calcuations\n",
+ "Ic=Vcc/Rc # Collector Current in Amperes\n",
+ "Vce=Vcc\n",
+ "\n",
+ "#Result\n",
+ "print(\"Colletor to emitter voltage (in volts) = %.f\"%Vce)\n",
+ "print(\" Collector current (in mA) = %.f\"%Ic)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Colletor to emitter voltage (in volts) = 12\n",
+ " Collector current (in mA) = 4\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.8.a, Page No. 73"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate oerating point\n",
+ " \n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Vcc= 6.0 # Colector voltage in volts\n",
+ "Rb= 530.0 # in kilo ohms\n",
+ "Beta=100.0 # Common emitter D.C. Current gain\n",
+ "Rc=2.0 # Collector resistance in killo ohms\n",
+ "Vbe= 0.7 # Base to emitter voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Ib= ((Vcc-Vbe)/Rb) # in micro amperes\n",
+ "Ic=Beta*Ib # in milli ampere\n",
+ "Vce= Vcc-(Ic*Rc) # Colector to emitter voltage in volts\n",
+ "\n",
+ "#Result\n",
+ "print(\"Operating point is (Vce,Ic):\")\n",
+ "print(\"Vce = %.f V\\t Ic = %.f micro-A\"%(Vce,Ic))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Operating point is (Vce,Ic):\n",
+ "Vce = 4 V\t Ic = 1 micro-A\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.8.b, Page No. 73"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate stability factor\n",
+ " \n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Beta=100.0 # Common emitter D.C. Current gain\n",
+ "\n",
+ "#Calculations\n",
+ "S=1+Beta \n",
+ "\n",
+ "#Result\n",
+ "print(\"The Stability factor = %.f\"%S)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Stability factor = 101\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.9.a, Page No. 74"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate base current\n",
+ " \n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Vcc=20.0 # Colector voltage in volts\n",
+ "Rb= 200.0 # in kilo ohms\n",
+ "Beta=75.0 # Common emitter D.C. Current gain\n",
+ "Rc=0.8 # Collector resistance in killo ohms\n",
+ "Vbe= 0.0 # Base to emitter voltage in volts\n",
+ "\n",
+ "#Calcualtions\n",
+ "Ib=Vcc/Rb\n",
+ "\n",
+ "#Result\n",
+ "print(\"Base current in micro-A = %.1f\"%(Ib*10**3))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Base current in micro-A = 100.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.9.b, Page No. 74 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate collector current\n",
+ " \n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Vcc=20.0 # Colector voltage in volts\n",
+ "Rb= 200.0 # in kilo ohms\n",
+ "Beta=75.0 # Common emitter D.C. Current gain\n",
+ "Rc=0.8 # Collector resistance in killo ohms\n",
+ "Vbe= 0.0 # Base to emitter voltage in volts\n",
+ "Ib=0.1 # Base current in mA\n",
+ "\n",
+ "#Cacualtions\n",
+ "Ic=Beta*Ib # Collector current in mA\n",
+ "\n",
+ "#Result\n",
+ "print(\"Collector current in mA = %.1f\"%Ic)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Collector current in mA = 7.5\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.9.c, Page No. 74"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate collector TO emitter voltage\n",
+ " \n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Vcc=20.0 # Colector voltage in volts\n",
+ "Rb= 200.0 # in kilo ohms\n",
+ "Beta=75.0 # Common emitter D.C. Current gain\n",
+ "Rc=0.8 # Collector resistance in killo ohms\n",
+ "Vbe= 0.0 # Base to emitter voltage in volts\n",
+ "Ib=0.1 # Base current in mA\n",
+ "Ic=7.5 # Base current in mA\n",
+ "\n",
+ "#Calculations\n",
+ "Vce=Vcc- (Ic*Rc)\n",
+ "\n",
+ "#Result\n",
+ "print(\"Collector to emitter voltage in volts = %.f\"%Vce)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Collector to emitter voltage in volts = 14\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.9.d, Page No. 74"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate collector TO emitter voltage\n",
+ " \n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Vcc=20.0 # Colector voltage in volts\n",
+ "Rb= 200.0 # in kilo ohms\n",
+ "Beta=75.0 # common emitter D.C. Current gain\n",
+ "Rc=0.8 # Collector resistance in killo ohms\n",
+ "Vbe= 0.0 # Base to emitter voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "S=1+Beta \n",
+ "\n",
+ "#Resut\n",
+ "print(\"The Stability factor = %.f\"%S)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Stability factor = 76\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.10, Page No. 74"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate base resistance , Voltage between collector & ground and Stability factor\n",
+ " \n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Vcc=12.0 # Colector voltage in volts\n",
+ "Ib= 0.3 # in mili ampere\n",
+ "Beta=100.0 # Common emitter D.C. Current gain\n",
+ "Rc=0.3 # Collector resistance in killo ohms\n",
+ "\n",
+ "#Calaculations\n",
+ "Rb=Vcc/Ib\n",
+ "Ic= Beta*Ib\n",
+ "Vce=Vcc -(Ic*Rc)\n",
+ "S=1+Beta \n",
+ "\n",
+ "#Result\n",
+ "print(\"Base resistance in killo ohms = %.f\"%Rb)\n",
+ "print(\"Collector to ground voltgae in volts = %.f\"%Vce)\n",
+ "print(\"The Stability factor = %.f\"%S)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Base resistance in killo ohms = 40\n",
+ "Collector to ground voltgae in volts = 3\n",
+ "The Stability factor = 101\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.11, Page No. 76"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate base current , Collector current and Collector to emitter voltage\n",
+ " \n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Vcc=20.0 # Colector voltage in volts\n",
+ "Rb= 400.0 # in KILLO OHMS\n",
+ "Beta=100.0 # Common emitter D.C. Current gain\n",
+ "Rc=2.0 # Collector resistance in killo ohms\n",
+ "Re=1.0 # Emitter resistance in killo ohms\n",
+ "\n",
+ "#Calcualtions\n",
+ "Ib= Vcc / (Rb + (Beta*Re))\n",
+ "Ic= Beta*Ib\n",
+ "Vce=Vcc -(Ic*(Rc+Re))\n",
+ "\n",
+ "#Result\n",
+ "print(\"Base current in mA = %.2f\"%Ib)\n",
+ "print(\"Collector current in mA = %.f\"%Ic)\n",
+ "print(\"Collector to ground voltgae in volts = %.f\"%Vce)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Base current in mA = 0.04\n",
+ "Collector current in mA = 4\n",
+ "Collector to ground voltgae in volts = 8\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.12, Page No. 77"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate Collector current and Collector to emitter voltage\n",
+ " \n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Vcc=25.0 # Colector voltage in volts\n",
+ "Vbe=0.7 # Base to emitter voltage in volts\n",
+ "Rb= 180.0 # in KILLO OHMS\n",
+ "Beta=80.0 # Common emitter D.C. Current gain\n",
+ "Rc=0.82 # Collector resistance in killo ohms\n",
+ "Re=0.2 # Emitter resistance in killo ohms\n",
+ "\n",
+ "#Calculations\n",
+ "Ic= (Vcc-Vbe)/(Re + (Rb/Beta))\n",
+ "Ic = math.floor(Ic*10)/10\n",
+ "Vce=Vcc -(Ic*(Rc+Re))\n",
+ "\n",
+ "#Result\n",
+ "print(\"Collector current in mA = %.1f\"%Ic)\n",
+ "print(\"Collector to ground voltgae in volts = %f\"%Vce)\n",
+ "#Answer for Vce is incorrect in the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Collector current in mA = 9.9\n",
+ "Collector to ground voltgae in volts = 14.902000\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.13, Page No. 80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate Collector current , Collector to emitter voltage and stability factor\n",
+ " \n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Vcc=20.0 # Colector voltage in volts\n",
+ "Vbe=0.7 # Base to emitter voltage in volts\n",
+ "Rb= 200.0 # in KILLO OHMS\n",
+ "Beta=100.0 # Common emitter D.C. Current gain\n",
+ "Rc=20.0 # Collector resistance in killo ohms\n",
+ "\n",
+ "#Calculations\n",
+ "Ic= (Vcc-Vbe)/(Rc + (Rb/Beta));\n",
+ "Vce=Vcc -(Ic*Rc);\n",
+ "S=(1+Beta)/(1+Beta*(Rc/(Rc+Rb)));\n",
+ "\n",
+ "#Result\n",
+ "print(\"Collector current in mA = %.3f\"%Ic)\n",
+ "print(\"Collector to ground voltgae in volts = %.2f\"%(math.ceil(Vce*100)/100))\n",
+ "print(\"The Stability factor = %.3f\"%S)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Collector current in mA = 0.877\n",
+ "Collector to ground voltgae in volts = 2.46\n",
+ "The Stability factor = 10.009\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.14, Page No. 80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate base current , Collector current , Collector to emitter voltage and stability factor\n",
+ "\n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Vcc=10.0 # Colector voltage in volts\n",
+ "Vbe=0.0 # Base to emitter voltage in volts\n",
+ "Rb= 100.0 # in KILLO OHMS\n",
+ "Beta=100.0 # Common emitter D.C. Current gain\n",
+ "Rc=10.0 # Collector resistance in killo ohms\n",
+ "\n",
+ "#Calcualtions\n",
+ "Ib= (Vcc-Vbe)/(Rb+ Beta*Rc)\n",
+ "Ic= Beta * Ib\n",
+ "Vce=Vcc -(Ic*Rc)\n",
+ "S=(1.0+Beta)/(1.0+Beta*(Rc/(Rc+Rb)))\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"base current = %.f micro-A\"%(Ib*1000))\n",
+ "print(\"Collector current = %.1f mA\"%Ic)\n",
+ "print(\"Collector to ground voltgae = %.1f V\"%(math.ceil(Vce)))\n",
+ "print(\"The Stability factor = %.3f\"%S)\n",
+ "#Answer for stability is wrong in the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "base current = 9 micro-A\n",
+ "Collector current = 0.9 mA\n",
+ "Collector to ground voltgae = 1.0 V\n",
+ "The Stability factor = 10.009\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.15, Page No. 84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate emitter current , Collector current and Collector to emitter voltage \n",
+ " \n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Vcc=10.0 # Colector voltage in volts\n",
+ "Vbe=0.7 # Base to emitter voltage in volts\n",
+ "Vee=10.0 # emitter voltage in volts\n",
+ "Rb= 50.0 # in KILLO OHMS\n",
+ "Beta=100.0 # Common emitter D.C. Current gain\n",
+ "Rc=1.0 # Collector resistance in killo ohms\n",
+ "Re=5.0 # Emitter resistance in killo ohms\n",
+ "\n",
+ "#Calculations\n",
+ "Ie= (Vee-Vbe)/Re\n",
+ "Ic= Ie\n",
+ "Vce1=Vcc -(Ic*Rc)\n",
+ "Ve=-Vbe\n",
+ "Vce=Vce1-Ve\n",
+ "\n",
+ "#Result\n",
+ "print(\"Emitter Current in mA = %.2f\"%Ie)\n",
+ "print(\"Collector current in mA = %.2f\"%Ic)\n",
+ "print(\"Collector to ground voltgae in volts = %.2f\"%Vce)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Emitter Current in mA = 1.86\n",
+ "Collector current in mA = 1.86\n",
+ "Collector to ground voltgae in volts = 8.84\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.16, Page No. 86"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate the change in q point\n",
+ " \n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Vcc=20.0 # Colector voltage in volts\n",
+ "Vbe1=0.7 # Base to emitter voltage in volts\n",
+ "Vee=20.0 # emitter voltage in volts\n",
+ "Rb= 10.0 # in KILLO OHMS\n",
+ "Beta1=50.0 # Common emitter D.C. Current gain\n",
+ "Rc=5.0 # Collector resistance in killo ohms\n",
+ "Re=10.0 # Emitter resistance in killo ohms\n",
+ "Vbe2=0.6 # Base to emitter voltage in volts\n",
+ "Beta2=100.0 # Common emitter D.C. Current gain\n",
+ "\n",
+ "#Calculation\n",
+ "Ie1= (Vee-Vbe1)/(Re+(Rb/Beta1))\n",
+ "Ic1=Ie1\n",
+ "Vce1a=Vcc -(Ic1*Rc)\n",
+ "Ve=-Vbe1\n",
+ "Vce1=Vce1a-Ve\n",
+ "Vce1 = math.ceil(Vce1*100)/100\n",
+ "Ie2= (Vee-Vbe2)*10**3/(Re*10**3+(Rb*10**3/Beta2))\n",
+ "Ie2 = math.ceil(Ie2*1000)/1000\n",
+ "Ic2=Ie2\n",
+ "Vce2a=Vcc -(Ic2*Rc)\n",
+ "Ve=-Vbe2\n",
+ "Vce2=Vce2a-Ve\n",
+ "detaIc= ((Ie2-Ie1)/Ie1)*100\n",
+ "detaVce=((Vce1-Vce2)/Vce1)*100\n",
+ "\n",
+ "#Result\n",
+ "print(\"Emitter Current in first case,Ie = %.3f mA\"%Ie1)\n",
+ "print(\"Collector-to-emitter voltgae in first case,Vce = %.2f V\"%Vce1)\n",
+ "print(\"Emitter Current in second case, Ie = %.3f mA\"%Ie2)\n",
+ "print(\"Collector-to-emitter voltgae in 2nd case, Vce = %.3f V\"%Vce2)\n",
+ "print(\"Change in collector current = %.2f%%\"%(math.ceil(detaIc*100)/100))\n",
+ "print(\"Change in collector to emitter voltage = %.2f%%\"%detaVce)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Emitter Current in first case,Ie = 1.892 mA\n",
+ "Collector-to-emitter voltgae in first case,Vce = 11.24 V\n",
+ "Emitter Current in second case, Ie = 1.921 mA\n",
+ "Collector-to-emitter voltgae in 2nd case, Vce = 10.995 V\n",
+ "Change in collector current = 1.53%\n",
+ "Change in collector to emitter voltage = 2.18%\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.17, Page No. 90"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Calculate dynamic input resistance\n",
+ " \n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "deltaVbe=200.0 # in milli volts\n",
+ "deltaIe=5.0 # in milli ampere\n",
+ "\n",
+ "#Calculations\n",
+ "Ri=deltaVbe/deltaIe\n",
+ "\n",
+ "#Result\n",
+ "print(\"Dyanamic input resistance is (in ohms) = %.f\"%Ri)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Dyanamic input resistance is (in ohms) = 40\n"
+ ]
+ }
+ ],
+ "prompt_number": 47
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.18, Page No. 90"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Transistor parameters\n",
+ "\n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Vcc=15.0 # Colector voltage in volts\n",
+ "Rb= 180.0 # in kilo ohms\n",
+ "Beta=100.0 # Common emitter D.C. Current gain\n",
+ "Rc=1.5 # Collector resistance in killo ohms\n",
+ "Vbe= 0.7 # Base to emitter voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Ib= ((Vcc-Vbe)/Rb) # in milli amperes\n",
+ "Ic=Beta*Ib # in milli ampere\n",
+ "Vce= Vcc-(Ic*Rc) # Colector to emitter voltage in volts\n",
+ "Vc=Vce\n",
+ "Vb=Vbe\n",
+ "Vcb=Vc-Vb\n",
+ "\n",
+ "#Result\n",
+ "print(\"base current = %.2f micro-A \"%(Ib*10**3))\n",
+ "print(\"Collector current = %.2f mA\"%Ic)\n",
+ "print(\"Collector to emitter voltage = %.1f V\"%Vce)\n",
+ "print(\"Collector voltage = %.1f V\"%Vc)\n",
+ "print(\"Base voltage = %.1f V\"%Vb)\n",
+ "print(\"Collector to base voltage = %.1f V\"%Vcb)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "base current = 79.44 micro-A \n",
+ "Collector current = 7.94 mA\n",
+ "Collector to emitter voltage = 3.1 V\n",
+ "Collector voltage = 3.1 V\n",
+ "Base voltage = 0.7 V\n",
+ "Collector to base voltage = 2.4 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.19, Page No. 91"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Operating point , stability factor\n",
+ "\n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Vcc=10.0 # Colector voltage in volts\n",
+ "Rb= 930.0 # in kilo ohms\n",
+ "Beta=100.0 # Common emitter D.C. Current gain\n",
+ "Rc=4.0 # Collector resistance in killo ohms\n",
+ "Vbe= 0.7 # Base to emitter voltage in volts\n",
+ "Ib= ((Vcc-Vbe)/Rb)# in milli amperes\n",
+ "Ic=Beta*Ib # in milli ampere\n",
+ "Vce= Vcc-(Ic*Rc) # Colector to emitter voltage in volts\n",
+ "S=(1+Beta)\n",
+ "\n",
+ "#Result\n",
+ "print(\"Collector to emitter voltage In Volts = %.f\"%Vce)\n",
+ "print(\"Collector current in milli Ampere = %.f\"%Ic)\n",
+ "print(\"The Stability factor = %.f\"%S)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Collector to emitter voltage In Volts = 6\n",
+ "Collector current in milli Ampere = 1\n",
+ "The Stability factor = 101\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.20, Page No. 92"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Base Resistance , stability factor\n",
+ "\n",
+ "import math\n",
+ "#Variable Declaration\n",
+ "Vcc=20.0 # Colector voltage in volts\n",
+ "Beta=100.0 # Common emitter D.C. Current gain\n",
+ "Rc=1.0 # Collector resistance in killo ohms\n",
+ "Vce=4.0 # Collector to emitter voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Ic= ((Vcc-Vce)/Rc) # in milli amperes\n",
+ "Ib=Ic/Beta # in milli ampere\n",
+ "Rb=Vce/Ib # in Killo ohms\n",
+ "x = math.floor((1+Beta*(Rc/(Rc+Rb)))*100)/100\n",
+ "S=math.floor((1+Beta)*100/x)/100\n",
+ "\n",
+ "#Result\n",
+ "print(\"Base resistance = %.f k-ohm\"%Rb)\n",
+ "print(\"The Stability factor = %.2f\"%S)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Base resistance = 25 k-ohm\n",
+ "The Stability factor = 20.86\n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.21, Page No. 92"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Quiescent , stability factor\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=10.0 # Colector voltage in volts\n",
+ "Beta=50.0 # Common emitter D.C. Current gain\n",
+ "Rc=2.0 # Collector resistance in killo ohms\n",
+ "Rb= 100.0 # in kilo ohms\n",
+ "Vbe=0.0 # Base to emitter voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Ic= (Vcc-Vbe)/(Rc+(Rb/Beta)) # in milli amperes\n",
+ "Ib=Ic/Beta # in milli ampere\n",
+ "Vce= Vcc-(Ic*Rc) # Colector to emitter voltage in volts\n",
+ "S=(1+Beta)/(1+((Beta*Rc)/(Rc+Rb)))\n",
+ "\n",
+ "#Result\n",
+ "print(\"Operating point is (Vce,Ic): \")\n",
+ "print(\"Colector to emitter voltage = %.f V\"%Vce)\n",
+ "print(\"Collector current = %.1f mA\"%Ic)\n",
+ "print(\"The Stability factor = %.2f\"%S)\n",
+ "#Answer for stability factor is wrong in the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Operating point is (Vce,Ic): \n",
+ "Colector to emitter voltage = 5 V\n",
+ "Collector current = 2.5 mA\n",
+ "The Stability factor = 25.75\n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.22, Page No. 93"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Collector to emitter bias voltage\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=20.0 # Colector voltage in volts\n",
+ "Beta=100 # Common emitter D.C. Current gain\n",
+ "Rc=2.0 # Collector resistance in killo ohms\n",
+ "Rb= 100.0 # in kilo ohms\n",
+ "Vbe=0.7 # Base to emitter voltage in volts\n",
+ "Ic=10.0 # in milli amperes\n",
+ "\n",
+ "#Calculations\n",
+ "Ib=Ic/Beta # in milli ampere\n",
+ "Vce= Vbe+(Ib*Rb) # Colector to emitter voltage in volts\n",
+ "\n",
+ "#Result\n",
+ "print(\"Colector to emitter bias voltage = %.1f V\"%Vce)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Colector to emitter bias voltage = 10.7 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.23, Page No. 93"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Base Currecnt ,Collector current\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Icbo=0.0 # collecttor to base leakage current\n",
+ "Vcc=9.0 # Colector voltage in volts\n",
+ "Beta=100.0 # Common emitter D.C. Current gain\n",
+ "Vce=5.0 # Collector to emitter voltage in volts\n",
+ "Ic=0.2 # in milli amperes\n",
+ "Rc=(Vcc-Vce)/Ic # Collector Reesistance in ohms\n",
+ "Ib=Ic/Beta # in milli ampere\n",
+ "Rb=Vce/Ib # Base resistance in ohms\n",
+ "\n",
+ "#Result\n",
+ "print(\"Collector Resistance = %.f ohm\"%Rc)\n",
+ "print(\"Base Resistance = %.1f k-ohm\"%(Rb/1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Collector Resistance = 20 ohm\n",
+ "Base Resistance = 2.5 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 46
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.24, Page No. 94 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Base Resistance , stability factor\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=24.0 # Colector voltage in volts\n",
+ "Beta=45.0 # Common emitter D.C. Current gain\n",
+ "Rl=10.0 # Collector resistance in killo ohms\n",
+ "Re=0.27 # Emitter resistance in killo ohms\n",
+ "Vce=5 # Collector to emitter voltage in volts\n",
+ "Vbe=0.6 # Base to emitter voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Ib=(Vcc-Vce)/((1+Beta)*(Rl+Re)) # in milli ampere\n",
+ "Ic=Ib/Beta # in micro ampere\n",
+ "R=(Vce-Vbe)/Ib # Resistance in killo ohms\n",
+ "x = math.floor((1+Beta*(Re/(Re+R)))*100)/100\n",
+ "S=(1+Beta)/x\n",
+ "\n",
+ "#Result\n",
+ "print(\"Base resistance = %.f k-ohm\"%(math.ceil(R)))\n",
+ "print(\"The Stability factor = %.2f\"%S)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Base resistance = 110 k-ohm\n",
+ "The Stability factor = 41.44\n"
+ ]
+ }
+ ],
+ "prompt_number": 53
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.25, Page No.95 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Quiescent , stability factor\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=16.0 # Colector voltage in volts\n",
+ "alfa=0.985\n",
+ "Rc=3.0 # Collector resistance in killo ohms\n",
+ "Re= 2.0 # in kilo ohms\n",
+ "R1= 56.0 # in kilo ohms\n",
+ "R2= 20.0 # in kilo ohms\n",
+ "Vbe=0.3 # Base to emitter voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Beta= round(alfa/(1-alfa))\n",
+ "Vb=Vcc * (R2/(R1+R2)) # vOLTAGE AT BASE\n",
+ "Vb = math.floor(Vb*100)/100\n",
+ "Ic= (Vb-Vbe)/Re # in milli amperes\n",
+ "Ib=Ic/Beta # in milli ampere\n",
+ "Vce= Vcc-(Ic*(Rc+Re)) # Colector to emitter voltage in volts\n",
+ "Rth=math.floor((R1*R2)*100/(R1+R2))/100\n",
+ "\n",
+ "S=((1+Beta)*(1+(Rth/Re)))/(1+Beta+(Rth/Re))\n",
+ "\n",
+ "#Result\n",
+ "print(\"Operating point is (Vce,Ic): \")\n",
+ "print(\"Colector to emitter voltage = %.3f V\"%Vce)\n",
+ "print(\"Collector current = %.3f mA\"%Ic)\n",
+ "print(\"The Stability factor = %.2f\"%S)\n",
+ "#Answer for Ic is wrong and hence the Vce. Also answer for stability factor is wrong."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Operating point is (Vce,Ic): \n",
+ "Colector to emitter voltage = 6.225 V\n",
+ "Collector current = 1.955 mA\n",
+ "The Stability factor = 7.54\n"
+ ]
+ }
+ ],
+ "prompt_number": 68
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.26, Page No. 96\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Find R1,R2 & Re\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=10.0 # Colector voltage in volts\n",
+ "Beta=50.0 # Common emitter D.C. Current gain\n",
+ "Rc=2.0 # Collector resistance in killo ohms\n",
+ "Vce=4.0 # Collector to emitter voltage in volts\n",
+ "Vbe=0.3 # Base to emitter voltage in volts\n",
+ "Ic=2.0 # Collector current in milli Ampere\n",
+ "\n",
+ "#Calculations\n",
+ "Ib=Ic/Beta # Base current in milli ampere\n",
+ "I1=10*Ib\n",
+ "Ie=Ic # Emitter current in mili ampere\n",
+ "Re=(Vcc-Ic*Rc-Vce)/Ic# Emiier Resistance\n",
+ "V2=Vbe+Ic*Re # Voltage across R2\n",
+ "R2=V2/I1\n",
+ "R1=25-R2\n",
+ "\n",
+ "#Result\n",
+ "print(\"Resistance, R1 = %.2f k-ohm\"%R1)\n",
+ "print(\"Resistance, R2 = %.2f k-ohm\"%R2)\n",
+ "print(\"Emitter Resistance, Re = %.1f k-ohm\"%Re)\n",
+ "#Answer for R2 is wrong in the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resistance, R1 = 19.25 k-ohm\n",
+ "Resistance, R2 = 5.75 k-ohm\n",
+ "Emitter Resistance, Re = 1.0 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 70
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.27, Page No. 96"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Find R\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=24.0 # Colector voltage in volts\n",
+ "Beta=45.0\n",
+ "Rc=10.0 # Collector resistance in killo ohms\n",
+ "Re= 0.27 # in kilo ohms\n",
+ "Vce=5.0 # Collector to emitter voltage in volts\n",
+ "Vbe=0.6 # Base to emitter voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Ib=(Vcc-Vce)/((1+Beta)*(Rc+Re))\n",
+ "Ic=Ib/Beta\n",
+ "R=(Vce-Vbe)/Ib\n",
+ "\n",
+ "#Result\n",
+ "print(\"Base resistance = %.f k-ohm\"%(math.ceil(R)))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Base resistance = 110 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 72
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.28, Page No.97"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Ic,Vce\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=22.0 # Colector voltage in volts\n",
+ "Beta=40.0\n",
+ "Rc=10.0 # Collector resistance in killo ohms\n",
+ "Re= 1.5 # in kilo ohms\n",
+ "R1= 40.0 # in kilo ohms\n",
+ "R2= 4.0 # in kilo ohms\n",
+ "Vbe=0.5 # Base to emitter voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Vb=Vcc * (R2/(R1+R2)) # VOLTAGE AT BASE\n",
+ "Ic= (Vb-Vbe)/Re # in milli amperes\n",
+ "Ib=Ic/Beta # in milli ampere\n",
+ "Vce= Vcc-(Ic*(Rc+Re)) # Colector to emitter voltage in volts\n",
+ "\n",
+ "#Result\n",
+ "print(\"Colector to emitter voltage = %.1f V\"%Vce)\n",
+ "print(\"Collector current = %.f mA\"%Ic)\n",
+ "#Answer for Vce is wrong in the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Colector to emitter voltage = 10.5 V\n",
+ "Collector current = 1 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 73
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.29, Page No. 98"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Voltage across Re\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=20.0 # Colector voltage in volts\n",
+ "Beta=50.0\n",
+ "R1= 60.0 # in kilo ohms\n",
+ "R2= 30.0 # in kilo ohms\n",
+ "Vbe=0.6 # Base to emitter voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Vb=Vcc * (R2/(R1+R2))\n",
+ "Ve=Vb-Vbe\n",
+ "\n",
+ "#Result\n",
+ "print(\"voltage across Re = %.2f V\"%Ve)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "voltage across Re = 6.07 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 74
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.30, Page No. 99"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Voltage across Re\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=10.0 # in volts\n",
+ "Rb=200.0 # Base resistance in killo ohms\n",
+ "Vbe=0.8 # Base to emitter voltage in volts\n",
+ "Beta=100.0\n",
+ "Vce=0.2 # Collector to emitter voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Ib=5/Rb # Base current in milli ampere\n",
+ "Ic=Beta*Ib # Collector current in milli ampere\n",
+ "Rc= (Vcc-Vce)/Ic # Resistance\n",
+ "\n",
+ "#Result\n",
+ "print(\"Collector resistance = %.2f k-ohm\"%Rc) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Collector resistance = 3.92 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.31, Page No. 99"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Cut off,Vc & Re\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=10.0 # in volts\n",
+ "Rc=3.0 # Collector resistance in killo ohms\n",
+ "Rl=0.5 # in kilo ohms\n",
+ "Rb=7.0 # in kilo ohms\n",
+ "Beta=100.0 # Common emitter D.C. Current gain\n",
+ "Vbe=0.8 # Base to emitter voltage in volts\n",
+ "Ic=2.78 # in mA Applying KVL\n",
+ "Ib=0.1 # in mA Applying KVL\n",
+ "\n",
+ "#Calcualtions\n",
+ "Ibmin=Ic/Beta\n",
+ "Vc=Vbe # in saturation region\n",
+ "Vce=Vc-Rl*(Ic+Ib)\n",
+ "Re=((Vcc-Vce)/Ic)-Rc\n",
+ "\n",
+ "#Result\n",
+ "print(\"Base current = %.1f mA\"%Ib)\n",
+ "print(\"Minimum Base current = %.4f mA\"%Ibmin)\n",
+ "print(\"\\nAs Base current is more than minimum base current so it is in saturation region\")\n",
+ "print(\"\\nEmitter resistance = %.f ohm\"%(Re*1000))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Base current = 0.1 mA\n",
+ "Minimum Base current = 0.0278 mA\n",
+ "\n",
+ "As Base current is more than minimum base current so it is in saturation region\n",
+ "\n",
+ "Emitter resistance = 827 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 77
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.32, Page No. 100"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Beta ,Vcc & Rb\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rc=2.7 # Collector resistance in killo ohms\n",
+ "Re=0.68 # Collector resistance in killo ohms\n",
+ "Ib=0.02 # Base Current in mA\n",
+ "Vce=7.3 # Collector to emitter voltage in volts\n",
+ "Vbe=0.0 # Base to emitter voltage in volts\n",
+ "Ve=2.1 # Emitter Voltage\n",
+ "\n",
+ "#Calculations\n",
+ "Ie= Ve/Re # Emiiter Current in mA\n",
+ "Ic=Ie\n",
+ "Beta=Ic/Ib # Common emitter D.C. Current gain\n",
+ "Vcc= Vce+Ic*(Rc+Re) # Supply Voltage\n",
+ "Vcc = math.floor(Vcc*10)/10\n",
+ "Rb=(Vcc-Ve)/Ib # Base resistance in Killo ohms\n",
+ "\n",
+ "#Result\n",
+ "print(\"Common emitter D.C. Current gain (unitless) = %.f\"%Beta)\n",
+ "print(\"Supply Voltage = %.1f V\"%Vcc)\n",
+ "print(\"base resistance = %.f k-ohm\"%Rb)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Common emitter D.C. Current gain (unitless) = 154\n",
+ "Supply Voltage = 17.7 V\n",
+ "base resistance = 780 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 84
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.33, Page No. 101"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Ic & Vce\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=18 # Colector voltage in volts\n",
+ "Rc=2.2 # Collector resistance in killo ohms\n",
+ "Rb=510.0 # Base resistance in killo ohms\n",
+ "Re=1.8 # Emitter resistance in killo ohms\n",
+ "Beta=90.0 # Common emitter D.C. Current gain\n",
+ "\n",
+ "#Calculations\n",
+ "Ib=Vcc/(Rb+Beta*(Rc+Re)) # Base Current in mA\n",
+ "Ib = math.floor(Ib*100)/100\n",
+ "Ic=Beta*Ib # Collector current in mA\n",
+ "Beta=Ic/Ib # Common emitter D.C. Current gain\n",
+ "Vce= Ib*Rb # Collector to emitter voltage in volts\n",
+ "\n",
+ "#Result\n",
+ "print(\"Colector to emitter voltage, Vce = %.1f V\"%Vce)\n",
+ "print(\"Collector current, Ic = %.1f mA\"%(math.floor(Ic*10)/10)) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Colector to emitter voltage, Vce = 10.2 V\n",
+ "Collector current, Ic = 1.8 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 91
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.34, Page No.101 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Base current\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Ie=10.0 # Emitter current in mA\n",
+ "Ic=9.95 # Collector current in mA\n",
+ "\n",
+ "#Calcualtions\n",
+ "Ib=Ie-Ic # Base Current in mA\n",
+ "\n",
+ "#Result\n",
+ "print(\"Base Current = %.2f mA\"%Ib)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Base Current = 0.05 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.35, Page No. 101"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Ic,Vc,Ve & Vce\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=30.0 # Colector voltage in volts\n",
+ "Beta=100.0\n",
+ "Rc=6.2 # Collector resistance in killo ohms\n",
+ "Re=1.5 # Emitter resistance in killo ohms\n",
+ "Rb=690.0 # Base resistance in killo ohms\n",
+ "Vbe=0.7 # Base to emitter voltage in volts\n",
+ "Ib= (Vcc-Vbe)/(Rb+(1+Beta)*Rc+(1+Beta)*Re)\n",
+ "Ic=math.ceil(Ib*Beta) # in milli ampere\n",
+ "Ie=Ib*(1+Beta) # in milli ampere\n",
+ "Vce=Vcc-Ve-(Ic+Ib)*Rc\n",
+ "Vce = math.ceil(Vce*100)/100\n",
+ "Vc=Vce+Ve\n",
+ "print(\"Collector current, Ic = %.f mA\"%Ic)\n",
+ "print(\"emitter voltage, Ve = %.2f V\"%Ve)\n",
+ "print(\"Colector to emitter voltage, Vce = %.2f V\"%Vce)\n",
+ "print(\"collector voltage = %.2f V\"%Vc)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Collector current, Ic = 2 mA\n",
+ "emitter voltage, Ve = 3.03 V\n",
+ "Colector to emitter voltage, Vce = 14.45 V\n",
+ "collector voltage = 17.48 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 105
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.36, Page No. 103"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# R1,Rc & S\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=16.0 # Colector voltage in volts\n",
+ "alfa=0.985\n",
+ "Ieq=2.0 # Emiier current in mA\n",
+ "R2=30.0 # resistance in killo ohms\n",
+ "Re=1.0 # Emitter resistance in killo ohms\n",
+ "Vbe=0.2 # Base to emitter voltage in volts\n",
+ "Vceq=6.0 # Collector to emitter voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Beta= alfa/(1-alfa)\n",
+ "Icq=alfa*Ieq\n",
+ "Rc=(Vcc-Vceq-Ieq*Re)/Icq\n",
+ "Ir1=((Ieq*Re+Vbe)/R2)+Icq/Beta\n",
+ "R1=(Vcc-Vbe-(Ieq*Re))/Ir1\n",
+ "Rb= (R1*R2)/(R1+R2)\n",
+ "S=(1+Beta)/(1+Beta*(Re/(Re+Rb)))\n",
+ "\n",
+ "#Result\n",
+ "print(\"Collector resistence, Rc = %.2f k-ohm\"%Rc)\n",
+ "print(\"Resistance, R1 = %.2f k-ohm\"%(math.floor(R1*100)/100))\n",
+ "print(\"The Stability factor = %.2f\"%(math.floor(S*100)/100))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Collector resistence, Rc = 4.06 k-ohm\n",
+ "Resistance, R1 = 133.54 k-ohm\n",
+ "The Stability factor = 18.64\n"
+ ]
+ }
+ ],
+ "prompt_number": 110
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.37.a, Page No. 104"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# baising component\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=12.0 # Colector voltage in volts\n",
+ "Beta=180.0\n",
+ "Ieq=2.0 # Emiier current in mA\n",
+ "Rc=1.0 # Collector resistance in killo ohms\n",
+ "Vbe=0.6 # Base to emitter voltage in volts\n",
+ "Vceq=6.0 # Collector to emitter voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Ic= (Vcc-Vceq)/Rc\n",
+ "Ib=Ic/Beta\n",
+ "Rb=(Vcc-Vbe)/Ib\n",
+ "\n",
+ "#Result\n",
+ "print(\"Collector current in fixed bias case = %.f mA\"%Ic)\n",
+ "print(\"Base current in fixed bias case = %.2f mA\"%(Ib*10**3))\n",
+ "print(\"Base resistance in fixed bias case = %.f k-ohm\"%Rb)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Collector current in fixed bias case = 6 mA\n",
+ "Base current in fixed bias case = 33.33 mA\n",
+ "Base resistance in fixed bias case = 342 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 115
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.37.b, Page No. 104"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# baising component\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vb=1.6 # Base voltage\n",
+ "Ve=1.0 # emitter voltage\n",
+ "Vcc=12.0 # Collector voltage in volts\n",
+ "Beta=180.0\n",
+ "Ieq=2.0 # Emiier current in mA\n",
+ "Rc=1.0 # Collector resistance in killo ohms\n",
+ "Vbe=0.6 # Base to emitter voltage in volts\n",
+ "Vceq=6.0 # Collector to emitter voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Ic= (Vcc-Vceq-Ve)/Rc\n",
+ "Ib=math.ceil(Ic*10**5/Beta)*1000/10**5\n",
+ "Ie=Ic+Ib*10**-3 # emitter current in milli ampere\n",
+ "Re= (Ve/(Ie*10**-3)) # emitter resistance in killo ohms\n",
+ "Ir2= 10*Ib\n",
+ "R2= (Ve+Vbe)/(Ir2*10**-6)\n",
+ "Ir1=Ir2+Ib\n",
+ "R1=((Vcc-Vb)/(Ir1*10**-3))\n",
+ "\n",
+ "#Result\n",
+ "print(\"Emitter Current, Ie = %.3f mA\"%(math.floor(Ie*1000)/1000))\n",
+ "print(\"Resistance, Re = %.1f ohm\"%(Re))\n",
+ "print(\"Resistance, R1 = %.2f k-ohm\"%(R1))\n",
+ "print(\"Resistance, R2 = %.1f ohm\"%(R2))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Emitter Current, Ie = 5.027 mA\n",
+ "Resistance, Re = 198.9 ohm\n",
+ "Resistance, R1 = 34.03 k-ohm\n",
+ "Resistance, R2 = 5759.5 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.38.a, Page No. 105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Stability factor\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Beta=180.0 # Common emitter D.C. Current gain\n",
+ "Re=1.0 # Collector resistance in killo ohms\n",
+ "R1=5.76 # resistance in killo ohms\n",
+ "R2=34.67 # resistance in killo ohms\n",
+ "\n",
+ "#Calculations\n",
+ "S=1+Beta\n",
+ "\n",
+ "#Result\n",
+ "print(\"Stability factor in fixed bias case is %.f\"%S)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Stability factor in fixed bias case is 181\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.38.b, Page No. 105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Stability factor\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Beta=180.0 # Common emitter D.C. Current gain\n",
+ "Re=0.199 # Collector resistance in killo ohms\n",
+ "R1=5.76 # resistance in killo ohms\n",
+ "R2=34.67 # resistance in killo ohms\n",
+ "\n",
+ "#Calculations\n",
+ "Rb=math.floor((R1*R2)*100/(R1+R2))/100\n",
+ "S=(1+Beta)/(1+(Beta*(Re/(Re+Rb))))\n",
+ "\n",
+ "#Result\n",
+ "print(\"Stability factor in self bias case is %.2f\"%S)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Stability factor in self bias case is 22.67\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.39.a, Page No. 106"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Stability factor\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "R1=500.0 # Resistance in killo ohms\n",
+ "Rc=500.0 # Collector resistance in killo ohms\n",
+ "R2=5000.0 # Resistance in killo ohms\n",
+ "Vcc=20.0 # Colector voltage in volts\n",
+ "Beta=75.0\n",
+ "Rc=6.2 # Collector resistance in killo ohms\n",
+ "Re=90.0 # Emitter resistance in ohms\n",
+ "Rb=690.0 # Base resistance in killo ohms\n",
+ "Vbe=0.7 # Base to emitter voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Rb=((R1*R2)/(R1+R2))\n",
+ "Vb=Vcc * (R1/(R1+R2))# VOLTAGE AT BASE\n",
+ "Icbo=0.02 # Collector to base leakage current in mA\n",
+ "Sre= (Beta/(Rb+Re*Beta)**2)*(Icbo*10**-6*Rb-Beta*(Vb+Rb*Icbo*10**-6-Vbe))\n",
+ "\n",
+ "#Result\n",
+ "print(\"Stability factor = %.3f * 10^-4 A/ohms\"%(Sre*10**4))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Stability factor = -1.212 * 10^-4 A/ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.39.b, Page No. 106"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Change in Icq\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "R1=500.0 # Resistance in killo ohms\n",
+ "Rc=500. # Collector resistance in killo ohms\n",
+ "R2=5000.0 # Resistance in killo ohms\n",
+ "Vcc=20.0 # Colector voltage in volts\n",
+ "Beta=75.0\n",
+ "Rc=6.2 # Collector resistance in killo ohms\n",
+ "Re=90.0 # Emitter resistance in ohms\n",
+ "Vbe=0.7 # Base to emitter voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Rb=((R1*R2)/(R1+R2))\n",
+ "Vb=Vcc * (R1/(R1+R2)) # VOLTAGE AT BASE\n",
+ "Icbo=0.02 # Collector to base leakage current in mA\n",
+ "Sre= (Beta/(Rb+Re*Beta)**2)*(Icbo*10**-6*Rb-Beta*(Vb+Rb*Icbo*10**-6-Vbe))\n",
+ "DeltaRe= 110-90 # Change in ohms\n",
+ "DeltaIcq= Sre*DeltaRe # Change in Icq\n",
+ "\n",
+ "#Result\n",
+ "print(\"Change in Icq = %.3f mA\"%(DeltaIcq*1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in Icq = -2.424 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.40, Page No. 107"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# R1 & R2\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=5.0 # Colector voltage in volts\n",
+ "Beta=100.0\n",
+ "Vce=2.5 # Collector to emitter voltage in volts\n",
+ "Vbe=0.6 # Base to emitter voltage in volts\n",
+ "R4=0.3 # Resistance in killo ohms\n",
+ "R2=10.0 # Resistance in killo ohms\n",
+ "Ic=1.0 # Collector current in mA\n",
+ "\n",
+ "#Calculations\n",
+ "Vr4=(1+(1/Beta))*Ic*R4\n",
+ "Vcn= Vce-Vr4\n",
+ "R3=(Vcc-Vcn)/Ic\n",
+ "Rb=8.03\n",
+ "R1=(Rb*R2)/(R2-Rb)\n",
+ "\n",
+ "#Result\n",
+ "print(\"Resistance, R1 = %.f k-ohm\"%(math.floor(R1)))\n",
+ "print(\"Base Resistance = %.2f k-ohm\"%Rb)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resistance, R1 = 40 k-ohm\n",
+ "Base Resistance = 8.03 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 45
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.41, Page No. 108"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Re , S\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=12.0 # Colector voltage in volts\n",
+ "Beta=50.0\n",
+ "Vce=2.5 # Collector to emitter voltage in volts\n",
+ "Vbe=0.7 # Base to emitter voltage in volts\n",
+ "Re= 2.57 # Emitter resistance in killo ohms\n",
+ "Rc=4.2 # Collector resistance in killo ohms\n",
+ "\n",
+ "#Calculation\n",
+ "Ic=14/(Rc+(1+(1/Beta)*Re))\n",
+ "Ib= (6-Vbe-Ic*Re)/Re\n",
+ "DeltaIb= -1 # Change in base Current\n",
+ "S= (1+Beta)/(1+Beta)\n",
+ "\n",
+ "#Result\n",
+ "print(\"Resistance, Re = %.2f k-ohm\"%Re)\n",
+ "print(\"Stability Factor = %.f\"%S)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resistance, Re = 2.57 k-ohm\n",
+ "Stability Factor = 1\n"
+ ]
+ }
+ ],
+ "prompt_number": 47
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.42, Page No. 109"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Icq\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "T2=20.0 # Temperature in degree celsius\n",
+ "T1=0.0 # Temperature in degree celsius\n",
+ "Vcc=15.0 # Colector voltage in volts\n",
+ "Beta=75.0\n",
+ "Vce=2.5 # Collector to emitter voltage in volts\n",
+ "Vbe1=0.7 # Base to emitter voltage in volts\n",
+ "Rb= 50.0 # Emitter resistance in killo ohms\n",
+ "Rc=3.0 # Collector resistance in killo ohms\n",
+ "Re=1.0 # Collector resistance in killo ohms\n",
+ "\n",
+ "#Calculation\n",
+ "Ib= ((6-Vbe1)/(Rb+(1+Beta)*Re))*10**3 # Base Current in Micro Amperes\n",
+ "Ic= Beta*Ib*10**-3 # Colectore Current in Milli Ampere\n",
+ "Icbo1=0.5 # Collector to base leakage current in Micrometer\n",
+ "Icbo2=Icbo1*2**((T2-T1)/10) # Collector to base leakage current in Micrometer when temperature 20 degree celsius\n",
+ "Vbe2=Vbe1-2*T2*10**-3 # base to emitter voltage when temperature is 20 degree celsius\n",
+ "Ib1=((6-Vbe2)/(Rb+(1+Beta)*Re))*10**3 # Base Current in Micro Amperes at 20 degree celsius\n",
+ "Ib1 = math.ceil(Ib1*10)/10\n",
+ "Ic1=(Beta*(Ib*10**-3)) # Colectore Current in Milli Ampere\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"Base Current = %.f micro-A\"%Ib)\n",
+ "print(\"Collector current = %.2f mA\"%Ic)\n",
+ "print(\"Collector to base leakage current when T=20 degree celsius = %.f micro-A\"%Icbo2)\n",
+ "print(\"Base to emitter voltage when T=20 degree celsius = %.2f V\"%Vbe2)\n",
+ "print(\"Base Current when T=20 degree celsius = %.1f micro-A\"%Ib1)\n",
+ "print(\"Collector current when T=20 degree celsius = %.2f mA\"%Ic1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Base Current = 42 micro-A\n",
+ "Collector current = 3.15 mA\n",
+ "Collector to base leakage current when T=20 degree celsius = 2 micro-A\n",
+ "Base to emitter voltage when T=20 degree celsius = 0.66 V\n",
+ "Base Current when T=20 degree celsius = 42.4 micro-A\n",
+ "Collector current when T=20 degree celsius = 3.15 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 64
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.43, Page No. 110"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# (a)quiescent current (b) drift in quiescent current\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Beta1=50.0 # gain at 25 degree celsius temperture\n",
+ "Beta2=200.0 # gain at 75 degree celsius temperture\n",
+ "Rb=1.0 # base resistance in killo ohms\n",
+ "Re=0.1 # emitter resistance in ohms\n",
+ "Ico1=0.01 # leakage current at 25 degree celsius temperture in micro ampere\n",
+ "Ico2=0.045 # leakage current at 75 degree celsius temperture in micro ampere\n",
+ "Vbe1=0.7 # base to emitter voltage 25 degree celsius temperture in micro ampere\n",
+ "Vbe2=0.575 # base to emitter voltage 75 degree celsius temperture in micro ampere\n",
+ "\n",
+ "#Calculations\n",
+ "dBeta=Beta2-Beta1 # Change in gain\n",
+ "dIco=Ico2-Ico1 # change in leakage current\n",
+ "dVbe=Vbe2-Vbe1 # change in base to emitter voltage\n",
+ "Ib= (1-Vbe1)/(Rb+(1+Beta1)*Re) # Base current in micro ampere\n",
+ "Ic=Beta1*Ib # Collector current in milli ampere\n",
+ "S=((1+Beta1)*(1+(Rb/Re)))/(1+Beta1+(Rb/Re))\n",
+ "S1=-(Beta1/Re*10**-3)/(1+Beta1+(Rb/Re)) # stability factor\n",
+ "S2=(S*Ic*10**-3)/(Beta1*(1+Beta1)) # stability factor\n",
+ "dIc= ((S*dIco*10**-6)+(S1*dVbe)+(S2*dBeta))*10**3\n",
+ "Icn= Ic+dIc # new collector current in milli ampere\n",
+ "\n",
+ "#Result\n",
+ "print(\"Quiescent current is %.2f mA\"%Ic)\n",
+ "print(\"Quiescent current drift at temperature 75 degree celsius is %.3f mA\"%dIc)\n",
+ "print(\"New quiescent current is %.1f mA\"%Icn)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Quiescent current is 2.46 mA\n",
+ "Quiescent current drift at temperature 75 degree celsius is 2.355 mA\n",
+ "New quiescent current is 4.8 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 67
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.44.a, Page No.111 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# R1,R2 ,Re\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vbe=0.2\n",
+ "Vcc=16.0 # collector voltage in volts\n",
+ "Rc=1.5 # clollector resistance in killo ohms\n",
+ "S=12.0 # stability factor\n",
+ "Vce=8.0 # Collector to emitter voltage\n",
+ "Ic=4.0 # in milli amperes\n",
+ "Beta=50.0 # gain\n",
+ "S1=3.0 # REDUCED STABILITY FACTOR\n",
+ "\n",
+ "#Calcualtions\n",
+ "Ib=(Ic*10**-3)/Beta # Base current in micro ampere\n",
+ "Re=(Vcc-Vce-(Rc*10**3*Ic*10**-3))/(Ic*10**-3+Ib) # emitter resistance in ohms\n",
+ "Rb=round(((11*(1+Beta))/(Beta-11))*Re*10**-3) # base resistance in killo ohms\n",
+ "Vb= (Ib*Rb*1000)+Vbe+((Ic*10**-3)+(Ib*10**-6))*Re# voltage is R2\n",
+ "R1=Vcc*Rb/2.76 #Vb = 2.76 # resistance in killo ohms\n",
+ "R1= math.ceil(R1*10)/10\n",
+ "R2=R1*Rb/(R1-Rb) # RESISTANCE IN KILLO OHMS\n",
+ "\n",
+ "#Result\n",
+ "print(\"Emitter Resistance,Re = %.2f k-ohm\"%(Re*10**-3))\n",
+ "print(\"Resistance, R1 = %.1f k-ohm\"%R1)\n",
+ "print(\"Resistance, R2 = %.2f k-ohm\"%(math.floor(R2*100)/100))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Emitter Resistance,Re = 0.49 k-ohm\n",
+ "Resistance, R1 = 40.6 k-ohm\n",
+ "Resistance, R2 = 8.45 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 95
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.44.b, Page No. 111"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# R1,R2 ,Re\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vbe=0.2\n",
+ "Vcc=16.0 # collector voltage in volts\n",
+ "Rc=1.5 # clollector resistance in killo ohms\n",
+ "S=12.0 # stability factor\n",
+ "Vce=8.0 # Collector to emitter voltage\n",
+ "Ic=4.0 # in milli amperes\n",
+ "Beta=50.0 # gain\n",
+ "Ib=(Ic*10**-3)/Beta # Base current in micro ampere\n",
+ "S1=3.0 # REDUCED STABILITY FACTOR\n",
+ "\n",
+ "#Calcualtions\n",
+ "Re=(Vcc-Vce-(Rc*10**3*Ic*10**-3))/(Ic*10**-3+Ib) # emitter resistance in ohms\n",
+ "Rb=math.floor(((2*(1+Beta))/(Beta-2))*Re*10**-3) # base resistance in killo ohms\n",
+ "Vr2= Vbe+(Ic+Ib*10**3)*Re*10**-3 # voltage is R2\n",
+ "R1=math.floor((Rb)/x) # resistance in killo ohms\n",
+ "R2=(Rb*R1)/(R1-Rb) # RESISTANCE IN KILLO OHMS\n",
+ "Rb1=((3*(1+Beta))/(Beta-3))*Re*10**-3 # EFFECT OF REDUCING STABILITY FACTOR ON BASE RESISTANCE\n",
+ "\n",
+ "#Result\n",
+ "print(\"Emitter Resistance = %.2f k-ohm\"%(Re*10**-3))\n",
+ "print(\"Resistance, R1 = %.f k-ohm\"%R1)\n",
+ "print(\"Resistance, R2 = %.2f k-ohm\"%(math.floor(R2*100)/100))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Emitter Resistance = 0.49 k-ohm\n",
+ "Resistance, R1 = 7 k-ohm\n",
+ "Resistance, R2 = 1.16 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 109
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.45, Page No. 113"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# R1,R2 ,Re\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vbe=0.2\n",
+ "Vcc=20.0 # collector voltage in volts\n",
+ "Rc=2.0 # clollector resistance in killo ohms\n",
+ "S=10.0 # stability factor\n",
+ "Vce=10.0 # Collector to emitter voltage\n",
+ "Ic=4.0 # in milli amperes\n",
+ "Beta=50.0 # gain\n",
+ "S1=3.0 # REDUCED STABILITY FACTOR\n",
+ "\n",
+ "#Calcualtions\n",
+ "Ib=(Ic*10**-3)/Beta # Base current in micro ampere\n",
+ "Re=(Vcc-Vce-(Rc*10**3*Ic*10**-3))/(Ic*10**-3+Ib) # emitter resistance in ohms\n",
+ "Re = math.ceil(Re*10)/10\n",
+ "Rb=math.ceil(((9*(1+Beta))*1000/(Beta-9))*Re*10**-3)/1000# base resistance in killo ohms\n",
+ "Vr2= Vbe+(Ic+Ib*10**3)*Re*10**-3 # voltage is R2\n",
+ "x=(Vr2/Vcc) # Voltage\n",
+ "R1=(Rb)/x # resistance in killo ohms\n",
+ "R2=(x*R1)/(1-x) # RESISTANCE IN KILLO OHMS\n",
+ "Rb1=((3*(1+Beta))/(Beta-3))*Re*10**-3 # EFFECT OF REDUCING STABILITY FACTOR ON BASE RESISTANCE\n",
+ "\n",
+ "#Result\n",
+ "print(\"Emitter resistance = %.1f ohm\"%Re)\n",
+ "print(\"Resistance R1 = %.2f k-ohm\"%R1)\n",
+ "print(\"Resistance R2 = %.2f k-ohm\"%R2)\n",
+ "print(\"Base resistance effect of reducing stability factor reduces input impedence = %f k-ohm\"%Rb1)\n",
+ "#Answer for R1 and base resistor do not match with the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Emitter resistance = 490.2 ohm\n",
+ "Resistance R1 = 49.89 k-ohm\n",
+ "Resistance R2 = 6.17 k-ohm\n",
+ "Base resistance effect of reducing stability factor reduces input impedence = 1.595757 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.46, Page No.115 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# R1,R2 ,Re\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "S=2.0 # stability factor\n",
+ "Vbe=0.8\n",
+ "Vcc=20.0 # collector voltage in volts\n",
+ "Rc=5.0 # collector resistance in killo ohms\n",
+ "Vce=11.5 # Collector to emitter voltage\n",
+ "Ic=1.5 # in milli amperes\n",
+ "Beta=50.0 # gain\n",
+ "\n",
+ "#Calculations\n",
+ "Ib=(Ic*10**-3)/Beta # Base current in micro ampere\n",
+ "Re=(Vcc-Vce-(Rc*10**3*Ic*10**-3))/(Ic*10**-3+Ib)# emitter resistance in ohms\n",
+ "Rb=(((1+Beta))/(Beta-1))*Re # base resistance in killo ohms\n",
+ "Vr2= Vbe+(Ic+Ib*10**3)*Re*10**-3 # voltage is R2\n",
+ "x=(Vr2/Vcc) # Voltage\n",
+ "R1=math.floor(((Rb)/x)*10**-3*100)/100 # resistance in killo ohms\n",
+ "R2=((x*R1)/(1-x))*10**3 # RESISTANCE IN KILLO OHMS\n",
+ "\n",
+ "#Result\n",
+ "print(\"Emitter resistance = %.1f ohm\"%(Re))\n",
+ "print(\"Resistance R1 = %.2f k-ohm\"%R1)\n",
+ "print(\"Resistance R2 = %.1f k-ohm\"%R2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Emitter resistance = 653.6 ohm\n",
+ "Resistance R1 = 7.55 k-ohm\n",
+ "Resistance R2 = 746.7 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.47, Page No. 124"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Ai,Ri,Av\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rs=800.0 # Internal resistance in ohms\n",
+ "Rl=1000.0 # Load resistance in ohms\n",
+ "# H-paramters are\n",
+ "Hie=1.0 # in killo ohms\n",
+ "Hre=2*10**-4\n",
+ "Hfe=50\n",
+ "Hoe=25*10**-6 # in ampere per volt\n",
+ "\n",
+ "#Calcualtions\n",
+ "Ai= -Hfe/(1+Hoe*Rl) # Current gain\n",
+ "Ri= Hie*10**3-((Hfe*Hre)/(Hoe+(1/Rl))) # Input resistance in ohms\n",
+ "Ri = math.floor(Ri*100)/100\n",
+ "Av= Ai*(Rl/Ri) # Voltage Gain\n",
+ "\n",
+ "#Result\n",
+ "print(\"Current gain = %.2f\"%Ai)\n",
+ "print(\"Input resistance = %.2f ohm\"%Ri)\n",
+ "print(\"Voltage gain = %.2f\"%Av)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Current gain = -48.78\n",
+ "Input resistance = 990.24 ohm\n",
+ "Voltage gain = -49.26\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.48, Page No. 126"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Ai,Ri,Av,Ro\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rl=1.2*10**3 # Load resistance in ohms\n",
+ "# H-paramters are\n",
+ "Hib=28.0 # in ohms\n",
+ "Hrb=5*10**-4\n",
+ "Hfb=-0.98\n",
+ "Hob=0.34*10**-6 # in ampere per volt\n",
+ "\n",
+ "#Calculations\n",
+ "Ai= -Hfb/(1+Hob*Rl) # Current gain\n",
+ "Ai = math.ceil(Ai*100)/100\n",
+ "Ri= Hib+(Hrb*Ai*Rl) # Input resistance in ohms\n",
+ "Av= round(Ai*(Rl/Ri)) # Voltage Gain\n",
+ "dh=(Hib*Hob)-(Hrb*Hfb)\n",
+ "Ro=(Hib/dh)*10**-3 # Output resistance in killo ohms\n",
+ "\n",
+ "#Result\n",
+ "print(\"Current gain = %.2f\"%Ai )\n",
+ "print(\"Input resistance = %.1f ohm\"%Ri)\n",
+ "print(\"Voltage gain = %.f\"%Av)\n",
+ "print(\"Ouput resistance = %.f k-ohm\"%Ro)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Current gain = 0.98\n",
+ "Input resistance = 28.6 ohm\n",
+ "Voltage gain = 41\n",
+ "Ouput resistance = 56 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.49, Page No. 129"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Ai,Ri,Av,Avs,Ais\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rl=1000.0 # Load resistance in ohms\n",
+ "Rs=1200.0 # Internal Resistance\n",
+ "# H-paramters are\n",
+ "Hib=22.0 # in ohms\n",
+ "Hrb=3*10**-4\n",
+ "Hfb=-0.98\n",
+ "Hob=0.5*10**-6 # in ampere per volt\n",
+ "\n",
+ "#calculations\n",
+ "Ai= -Hfb/(1+Hob*Rl) # Current gain\n",
+ "Ai = math.ceil(Ai*100)/100\n",
+ "Ri= Hib+(Hrb*Ai*Rl) # Input resistance in ohms\n",
+ "Ri = math.ceil(Ri*10)/10\n",
+ "Av=(Ai*(Rl/Ri)) # Voltage Gain\n",
+ "dh=(Hib*Hob)-(Hrb*Hfb)\n",
+ "Avs=(Av*Ri)/(Ri+Rs) # Overall Voltage gain\n",
+ "Ais=(Ai*Rs)/(Ri+Rs) # Overall Current gain\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"Current gain = %.2f\"%Ai)\n",
+ "print(\"Input resistance = %.1f ohm\"%Ri)\n",
+ "print(\"Voltage gain = %.3f\"%Av)\n",
+ "print(\"Overall Voltage gain = %.3f\"%Avs)\n",
+ "print(\"Overall Current gain = %.3f\"%Ais)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Current gain = 0.98\n",
+ "Input resistance = 22.3 ohm\n",
+ "Voltage gain = 43.946\n",
+ "Overall Voltage gain = 0.802\n",
+ "Overall Current gain = 0.962\n"
+ ]
+ }
+ ],
+ "prompt_number": 45
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.50, Page No.130 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Ai,Ri,Av,Ro\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rl=5000.0 # Load resistance in ohms\n",
+ "Rs=1000.0 # Source internal resistance\n",
+ "R1=10.0 # Resistance in killo ohms\n",
+ "R2=10.0 # Resistance in killo ohms\n",
+ "Re=5*10**3 # Emitter resistance in ohms\n",
+ "# H-paramters are\n",
+ "Hic=2000.0 # in killo ohms\n",
+ "Hrc=1.0\n",
+ "Hfc=-51.0\n",
+ "Hoc=25*10**-6 # in ampere per volt\n",
+ "\n",
+ "#Calculations\n",
+ "Ai= -Hfc/(1+Hoc*Rl) # Current gain\n",
+ "Ai = math.floor(Ai*10)/10\n",
+ "Ri= (Hic+(Hrc*Ai*Rl)) # Input resistance in ohms\n",
+ "Ri = Ri/1000 # in Killo ohm\n",
+ "Z1= (R1*R2)/(R1+R2)\n",
+ "Zi=(Ri*Z1)/(Ri+Z1) # input resistance of amplifier stage in killo ohms\n",
+ "Av=round((Ai*(Rl/Ri))*10**-3)# Voltage Gain\n",
+ "Ro=-(Rs+Hic)/Hfc # Output resistance in ohms\n",
+ "Ro = math.floor(Ro*10)/10\n",
+ "Zo= (Ro*Re)/(Ro+Re) # output resistance of amplifier stage in ohms\n",
+ "\n",
+ "#Result\n",
+ "print(\"Current gain = %.1f\"%Ai)\n",
+ "print(\"Input resistance = %.f k-ohm\"%(Ri))\n",
+ "print(\"Voltage gain = %.f\"%Av)\n",
+ "print(\"input resistance of amplifier stage = %.1f k-ohm\"%Zi)\n",
+ "print(\"Output resistance = %.1f ohm\"%Ro)\n",
+ "print(\"output resistance of amplifier stage= %.1f ohm\"%Zo)\n",
+ "#Answer for Zo is wrong in the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Current gain = 45.3\n",
+ "Input resistance = 228 k-ohm\n",
+ "Voltage gain = 1\n",
+ "input resistance of amplifier stage = 4.9 k-ohm\n",
+ "Output resistance = 58.8 ohm\n",
+ "output resistance of amplifier stage= 58.1 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 61
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.51, Page No. 131"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Ai,Ri,Av,Z0\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "R1=20.0 # Resistance in killo ohms\n",
+ "R2=10.0 # Resistance in killo ohms\n",
+ "Rc=5.0 # collector resistance in killo ohms\n",
+ "R=10.0 # resistance in killo ohms\n",
+ "Rs=800.0 # Internal resistance in ohms\n",
+ "# H-paramters are\n",
+ "Hie=1.5 # in killo ohms\n",
+ "Hre=5*10**-3\n",
+ "Hfe=50.0\n",
+ "Hoe=2*10**-6 # in micro ampere per volt\n",
+ "Ai= -Hfe # Current gain\n",
+ "Ri= Hie # Input resistance in ohms\n",
+ "\n",
+ "#Calculations\n",
+ "Rl=(Rc*R)/(Rc+R) # Load resistance in killo ohms\n",
+ "Rl= math.floor(Rl*10)/10\n",
+ "Z1= (R1*R2)/(R1+R2)\n",
+ "Zi=(Ri*Z1)/(Ri+Z1) # input resistance of amplifier stage in killo ohms\n",
+ "Av= (Ai*(Rl/Ri))# Voltage Gain\n",
+ "Ro=(1/Hoe) # output resistane in killo ohms\n",
+ "Zo=(Ro*Rl)/(Ro+Rl) # output resistance of amplifier stage in ohms\n",
+ "\n",
+ "#Result\n",
+ "print(\"Current gain = %.f\"%Ai)\n",
+ "print(\"input resistance of amplifier = %.2f k-ohm\"%Zi)\n",
+ "print(\"Voltage gain = %.f\"%Av)\n",
+ "print(\"output resistance of amplifier = %.1f ohm\"%Zo)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Current gain = -50\n",
+ "input resistance of amplifier = 1.22 k-ohm\n",
+ "Voltage gain = -110\n",
+ "output resistance of amplifier = 3.3 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 78
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.52, Page No. 131"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Ai,Ri,Av\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rs=0.5 # Internal resistance in killo ohms\n",
+ "Rl=5000.0 # Load resistance in ohms\n",
+ "# H-paramters are\n",
+ "Hie=1000.0 # in ohms\n",
+ "Hfe=50.0\n",
+ "Hoe=25*10**-6 # in ampere per volt\n",
+ "\n",
+ "#Calculations\n",
+ "Ai= (1+Hfe)/(1+Hoe*Rl)# Current gain\n",
+ "Ai = math.floor(Ai*100)/100\n",
+ "Ri= Hie+(Ai*Rl) # Input resistance in ohms\n",
+ "Ri = math.floor(Ri/100)*100\n",
+ "Av= (Ai*Rl)/Ri # Voltage Gain\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"Current gain = %.2f\"%Ai)\n",
+ "print(\"Input resistance = %.1f k-ohm\"%(Ri/1000))\n",
+ "print(\"Voltage gain = %.4f\"%Av)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Current gain = 45.33\n",
+ "Input resistance = 227.6 k-ohm\n",
+ "Voltage gain = 0.9958\n"
+ ]
+ }
+ ],
+ "prompt_number": 97
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.53, Page No. 131"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Ai,Ri,Av\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rs=1.0 # Internal resistance in ohms\n",
+ "Rl=1600.0 # Load resistance in ohms\n",
+ "# H-paramters are\n",
+ "Hie=1100.0 # in ohms\n",
+ "Hfe=2.5*10**-4\n",
+ "Hoe=25*10**-6 # in ampere per volt\n",
+ "\n",
+ "#Calcualtions\n",
+ "Ai= -Hfe/(1+Hoe*Rl) # Current gain\n",
+ "Ri= round(Hie+(Ai*Rl)) # Input resistance in ohms\n",
+ "Av= Ai*(Rl/Ri) # Voltage Gain\n",
+ "Av = math.ceil(Av*10**6)/100\n",
+ "Ai = math.ceil(Ai*10**5)/10\n",
+ "Pg=Ai*Av\n",
+ "\n",
+ "#Result\n",
+ "print(\"Current gain = %.1f * 10^-4\"%(Ai))\n",
+ "print(\"Input resistance = %.f k-ohm\"%Ri)\n",
+ "print(\"Voltage gain = %.2f * 10^-4\"%Av)\n",
+ "print(\"Power gain = %.2f *10^-8\"%(math.floor(Pg*100)/100))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Current gain = -2.4 * 10^-4\n",
+ "Input resistance = 1100 k-ohm\n",
+ "Voltage gain = -3.49 * 10^-4\n",
+ "Power gain = 8.37 *10^-8\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.54.a, Page No. 132"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Icq,Vcq\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vbe=0.0\n",
+ "Vcc=18.0 # collector voltage in volts\n",
+ "R1=510.0 # resistance in killo ohms\n",
+ "R2=510.0 # resistance in killo ohms\n",
+ "Rc=9.1 # clollector resistance in killo ohms\n",
+ "Re=7.5 # emitter resistance in killo ohms\n",
+ "Rs=1.0 # Internal resistance in ohms\n",
+ "Rl=1600.0 # Load resistance in ohms\n",
+ "# H-paramters are\n",
+ "Hie=1100.0 # in ohms\n",
+ "Hfe=2.5*10**-4\n",
+ "Hoe=25*10**-6 # in ampere per volt\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "Vb=Vcc * (R2/(R1+R2)) # vOLTAGE AT BASE\n",
+ "Ic= (Vb-Vbe)/Re # in milli amperes\n",
+ "Vce= Vcc-(Ic*(Rc+Re)) # Colector to emitter voltage in volts\n",
+ "Ai= -Hfe/(1+Hoe*Rl) # Current gain\n",
+ "Ri= round(Hie+(Ai*Rl)) # Input resistance in ohms\n",
+ "Av= Ai*(Rl/Ri) # Voltage Gain\n",
+ "\n",
+ "#Result\n",
+ "print(\"Colector to emitter voltage = %.1f V\"%Vce)\n",
+ "print(\"Collector current = %.1f mA\"%Ic) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Colector to emitter voltage = -1.9 V\n",
+ "Collector current = 1.2 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.54.b, Page No. 132"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Av,Ri\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vbe=0.0\n",
+ "Vcc=18.0 # collector voltage in volts\n",
+ "R1=510.0 # resistance in killo ohms\n",
+ "R2=510.0 # resistance in killo ohms\n",
+ "Rc=9.1 # clollector resistance in killo ohms\n",
+ "Re=7.5 # emitter resistance in killo ohms\n",
+ "Rs=1.0 # Internal resistance in ohms\n",
+ "Rl=1600.0 # Load resistance in ohms\n",
+ "# H-paramters are\n",
+ "Hie=1.0 # in killo ohms\n",
+ "Hfe=50.0\n",
+ "Hoe=0.0 # in ampere per volt\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "Vb=Vcc * (R2/(R1+R2)) # VOLTAGE AT BASE\n",
+ "Ic= (Vb-Vbe)/Re # in milli amperes\n",
+ "Vce= Vcc-(Ic*(Rc+Re)) # Colector to emitter voltage in volts\n",
+ "Ai=-Hfe # current gain\n",
+ "Ri=Hie # Input resistance in ohms\n",
+ "Z1= (R1*R2)/(R1+R2)\n",
+ "Zi=(Ri*Z1)/(Ri+Z1) # input resistance of amplifier stage in killo ohms\n",
+ "Av= Ai*(Rc/Ri) # Voltage Gain\n",
+ "\n",
+ "#Result\n",
+ "print(\"input resistance of amplifier stage = %.2f k-ohm\"%(math.floor(Zi*100)/100))\n",
+ "print(\"Voltage gain is %.f\"%Av)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "input resistance of amplifier stage = 0.99 k-ohm\n",
+ "Voltage gain is -455\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.55, Page No. 140"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# resitive paramters\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Ic= 5.0 # in milli amperes\n",
+ "Vt=26.0 # voltage \n",
+ "# H-paramters are\n",
+ "hie=1.0 # in killo ohms\n",
+ "hfe=100.0\n",
+ "hoe=4*10**-5 # in ampere per volt\n",
+ "hre=10**-4\n",
+ "\n",
+ "#Calculations\n",
+ "gm=math.floor(Ic*1000/Vt)/1000# transconductance\n",
+ "rbe= hfe/gm # in ohms\n",
+ "rbb=hie*10**3-rbe # in ohms\n",
+ "rbc=(rbe/(hre)*10**-6) # in mega ohms\n",
+ "gce1=hoe-(1+hfe)*(1/(rbc*10**6))\n",
+ "rce=(1/gce1)*10**-3 #in killo ohms\n",
+ "\n",
+ "#Result\n",
+ "print(\"transconductance = %.3f mho\"%gm)\n",
+ "print(\"Rbe = %.f ohm\"%rbe)\n",
+ "print(\"Rbb = %.f ohm\"%rbb)\n",
+ "print(\"Rbc = %.2f Mega ohm\"%rbc)\n",
+ "print(\"gce1= %.2f * 10^-5 mho\"%(gce1*10**5))\n",
+ "print(\"Rce = %.1f killo ohm\"%rce)\n",
+ "#Answer for Rbe is wrong in the book and hence for Rbb and Rbc"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "transconductance = 0.192 mho\n",
+ "Rbe = 521 ohm\n",
+ "Rbb = 479 ohm\n",
+ "Rbc = 5.21 Mega ohm\n",
+ "gce1= 2.06 * 10^-5 mho\n",
+ "Rce = 48.5 killo ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.56, Page No. 140"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# ressitive paramters\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Ic= 1.0 # in milli amperes\n",
+ "Vt=26.0 # volatge \n",
+ "ft=80.0 # frequency in mega hertz\n",
+ "Cbc=12 # in pico farad\n",
+ "# H-paramters are\n",
+ "hie=6.0 # in killo ohms\n",
+ "hfe=224.0\n",
+ "\n",
+ "#Calculations\n",
+ "gm=Ic/Vt # transconductance\n",
+ "rbe= hfe/gm # in ohms\n",
+ "rbb=hie*10**3-rbe\n",
+ "Cbe= (((gm)/(2*math.pi*ft*10**6))-Cbc*10**-12)*10**12\n",
+ "\n",
+ "#Result\n",
+ "print(\"transconductance = %.2f m-mho\"%(gm*1000))\n",
+ "print(\"Rbe = %.3f k-ohm\"%(rbe/1000))\n",
+ "print(\"Rbb = %.f ohm\"%rbb)\n",
+ "print(\"Cbe = %.1f pF\"%Cbe)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "transconductance = 38.46 m-mho\n",
+ "Rbe = 5.824 k-ohm\n",
+ "Rbb = 176 ohm\n",
+ "Cbe = 64.5 pF\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.57, Page No. 145"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# alpha ,beta and cut off frequencies\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Cbc=12.0 # in pico farad\n",
+ "# H-paramters are\n",
+ "hie=6.0 # in killo ohms\n",
+ "hfe=224.0\n",
+ "gm=38.0 # transconductance\n",
+ "rbe=5.9 # in killo ohms\n",
+ "rbb=100.0 # in ohms\n",
+ "Cbe= 63.0 # in pico farad\n",
+ "\n",
+ "#Calculations\n",
+ "falpha= ((hfe)/(2*math.pi*rbe*10**3*Cbe*10**-12))*10**-6\n",
+ "fbeta= ((1)/(2*math.pi*rbe*10**3*(Cbe+Cbc)*10**-12))*10**-6\n",
+ "ft= ((gm*10**-3/(2*math.pi*(Cbe+Cbc)*10**-12)))*10**-6\n",
+ "\n",
+ "#Result\n",
+ "print(\"F_alfa = %.1f MHz\"%falpha)\n",
+ "print(\"F_beta = %.3f MHz\"%(math.floor(fbeta*1000)/1000))\n",
+ "print(\"F_t = %.2f MHz\"%(math.floor(ft*100)/100))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "F_alfa = 95.9 MHz\n",
+ "F_beta = 0.359 MHz\n",
+ "F_t = 80.63 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.58, Page No. 147"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# ressitive paramters\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Ic= 2.6 # in milli amperes\n",
+ "Vt=26.0 # volatge \n",
+ "ft=500.0 # frequency in mega hertz\n",
+ "Cbc=3.0 # in pico farad\n",
+ "rbb=100.0 # in ohms\n",
+ "rbe=1.0 # IN KILLO OHMS\n",
+ "\n",
+ "#calculations\n",
+ "gm=Ic/Vt # transconductance\n",
+ "Beta= gm*rbe*10**3\n",
+ "Cbe= (((gm)/(2*math.pi*ft*10**6))-Cbc*10**-12)*10**12\n",
+ "\n",
+ "#Result\n",
+ "print(\"transconductance = %.1f mho\"%gm)\n",
+ "print(\"Cbe = %.2f pF\"%Cbe)\n",
+ "#Answer for Cbe is slightly different than book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "transconductance = 0.1 mho\n",
+ "Cbe = 28.83 pF\n"
+ ]
+ }
+ ],
+ "prompt_number": 46
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ " Example 2.59, Page No. 148"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# h-parameters and hybrid parameters\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "# H-paramters are\n",
+ "hie=1100.0 # in killo ohms\n",
+ "hre=2.5*10**-4\n",
+ "hfe=50.0\n",
+ "hoe=2.5*10**-5 # in ampere per volt\n",
+ "rbb=100.0\n",
+ "\n",
+ "#Calculations\n",
+ "hic=hie\n",
+ "hrc=1-hre\n",
+ "hfc=-(1+hfe)\n",
+ "hoc=hoe\n",
+ "hib=(hie/(1+hfe))\n",
+ "hrb= ((hie*hoe)/(1+hfe))-hre\n",
+ "hob=(hoe/(1+hfe))\n",
+ "rbe=(hie-rbb)*10**-3 # in killo ohms\n",
+ "rbc= ((hie-rbb)/hre)*10**-6\n",
+ "gm= ((hfe/(hie-rbb)))\n",
+ "x=hoe-((hfe*hre)/(hie-rbb))\n",
+ "rce=1/(1.25*10**-2)\n",
+ "\n",
+ "#Result\n",
+ "print(\"\\nH-parameters for common collector configuration are:\")\n",
+ "print(\"hic = %.f ohm\\nhrc = %.f\\nhfc = %.f\\nhoc = %.1f*10^-5 mho\"%(hie,hrc,hfc,hoc*10**5))\n",
+ "print(\"\\nH-parameters for common collector configuration are:\")\n",
+ "print(\"hib = %.2f ohm\\nhrb = %.1f*10^4\\nhob = %.1f*10^-6 mho\"%(hib,hrb*10**4,hob*10**6))\n",
+ "print(\"\\nhybrid pie paramtere are:\")\n",
+ "print(\"rbe(in killo ohms) = %.f\\nrbc(mega ohms)\\t = %.f\\ntransconductance(mho)= %.f\\nrce(in killo ohms) = %.f\"%(rbe,rbc,gm,rce))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "H-parameters for common collector configuration are:\n",
+ "hic = 1100 ohm\n",
+ "hrc = 1\n",
+ "hfc = -51\n",
+ "hoc = 2.5*10^-5 mho\n",
+ "\n",
+ "H-parameters for common collector configuration are:\n",
+ "hib = 21.57 ohm\n",
+ "hrb = 2.9*10^4\n",
+ "hob = 0.5*10^-6 mho\n",
+ "\n",
+ "hybrid pie paramtere are:\n",
+ "rbe(in killo ohms) = 1\n",
+ "rbc(mega ohms)\t = 4\n",
+ "transconductance(mho)= 0\n",
+ "rce(in killo ohms) = 80\n"
+ ]
+ }
+ ],
+ "prompt_number": 72
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.60, Page No. 149"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# hybrid parameters\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Ic= 10.0 # in milli amperes\n",
+ "Vt=26.0 # volatge \n",
+ "ft=500.0 # frequency in mega hertz\n",
+ "Cbc=3.0 # in pico farad\n",
+ "gm=Ic/Vt # transconductance\n",
+ "# H-paramters are\n",
+ "hie=500.0 # in killo ohms\n",
+ "hfe=100.0\n",
+ "hre=0.1\n",
+ "hoe=4*10**-5 # in ampere per volt\n",
+ "\n",
+ "#Calculations\n",
+ "rbe=hfe/gm # in ohms\n",
+ "rbc= ((rbe)/hre)*10**-3\n",
+ "x=hoe-((hfe*10**-4)/(rbe))\n",
+ "rce=(1/(x*10**-2))*10**-5\n",
+ "Cbe=(((gm)/(2*math.pi*ft*10**6))*10**13-Cbc)\n",
+ "\n",
+ "#Result\n",
+ "print(\"transconductance = %.3f mho\"%gm)\n",
+ "print(\"(rbe) = %.f ohm\"%rbe)\n",
+ "print(\"(rbc) = %.1f Mega-ohm\"%rbc)\n",
+ "print(\"(rce) = %.f k-ohm\"%rce)\n",
+ "print(\"(Cbe) = %.f pF\"%Cbe)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "transconductance = 0.385 mho\n",
+ "(rbe) = 260 ohm\n",
+ "(rbc) = 2.6 Mega-ohm\n",
+ "(rce) = 650 k-ohm\n",
+ "(Cbe) = 1221 pF\n"
+ ]
+ }
+ ],
+ "prompt_number": 78
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.61, Page No. 149"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# hybrid parameters\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Ai=10.0 # current gain\n",
+ "Vce=10.0\n",
+ "Ic= 10.0 # in milli amperes\n",
+ "Vt=26.0 # volatge \n",
+ "f=10.0 # frequency in mega hertz\n",
+ "Cbc=3.0 # in pico farad\n",
+ "gm=Ic/Vt # transconductance\n",
+ "# H-paramters are\n",
+ "hie=500.0 # in ohms\n",
+ "hfe=100.0\n",
+ "\n",
+ "#Calculations\n",
+ "rbe= hfe/gm\n",
+ "rbb= hie-rbe\n",
+ "Ft= Ai*f\n",
+ "fb= Ft/hfe\n",
+ "Ce=((gm/(2*math.pi*Ft*10**6))-Cbc*10**-12)*10**12\n",
+ "\n",
+ "#Result\n",
+ "print(\"(gm) = %.1f mS\"%(gm*10**3))\n",
+ "print(\"(rbe) = %.f ohm\"%rbe)\n",
+ "print(\"(rbb) = %.f ohm\"%rbb)\n",
+ "print(\"(ft) = %.f MHz\"%Ft)\n",
+ "print(\"(fb) = %.f MHz\"%fb)\n",
+ "print(\"(Ce) = %.f p-F\"%Ce)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(gm) = 384.6 mS\n",
+ "(rbe) = 260 ohm\n",
+ "(rbb) = 240 ohm\n",
+ "(ft) = 100 MHz\n",
+ "(fb) = 1 MHz\n",
+ "(Ce) = 609 p-F\n"
+ ]
+ }
+ ],
+ "prompt_number": 81
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.62, Page No. 150"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# mid band voltage gain and cut off frequency\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rs=1.0 \n",
+ "ft=500.0 # frequency in mega hertz\n",
+ "Cbc=5.0 # in pico farad\n",
+ "# H-paramters are\n",
+ "hie=500.0\n",
+ "hfe=100.0\n",
+ "rbe= 900.0\n",
+ "rbb= 100.0\n",
+ "Rl=500.0 # load resistance in ohms\n",
+ "\n",
+ "#Calculations\n",
+ "gm=hfe/rbe # in mho\n",
+ "Av=((-gm*Rl)) # voltage gain\n",
+ "Avs= ((Av*rbe)/(Rs*10**3+rbb+rbe))\n",
+ "fb= ft/hfe\n",
+ "\n",
+ "#Result\n",
+ "print(\"mid band voltage gain is %.f\"%Avs)\n",
+ "print(\"Fb = %.f MHz\"%fb)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "mid band voltage gain is -25\n",
+ "Fb = 5 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 58
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.63, Page No. 150"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# mid band voltage gain and cut off frequency\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rs=1.0\n",
+ "ft=500.0 # frequency in mega hertz\n",
+ "Cbc=5.0 # in pico farad\n",
+ "# H-paramters are\n",
+ "gm=100.0 # in mho\n",
+ "hfe=100.0\n",
+ "rbb= 100.0\n",
+ "Rl=500.0 # load resistance in ohms\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "rbe=hfe/(gm*10**-3)\n",
+ "Av=((-gm*10**-3*Rl))\n",
+ "Avs= ((Av*rbe)/(Rs*10**3+rbb+rbe))\n",
+ "fb= ft/hfe\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"mid band voltage gain is %.2f\"%Avs)\n",
+ "print(\"Fb = %.f MHz\"%fb)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "mid band voltage gain is -23.81\n",
+ "Fb = 5 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 83
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.64, Page No. 156"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# resonant frequency and voltage drop\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "L=100.0 # in micro henry\n",
+ "C=253.3 # in micro farad\n",
+ "R=15.7 # in ohms\n",
+ "V=0.157\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "fr=((1/(2*math.pi*math.sqrt(L*10**-6*C*10**-12))))*10**-6 # resonant frequency in mega hertz\n",
+ "Ir=V/R\n",
+ "Vr=V\n",
+ "Vl=Ir*(2*math.pi*fr*10**6*L*10**-6)\n",
+ "Xc= (1/(2*math.pi*fr*10**6*C*10**-12))\n",
+ "Vc= Ir*Xc\n",
+ "Q=((2*math.pi*fr*10**6*L*10**-6)/R)\n",
+ "\n",
+ "#Result\n",
+ "print(\"resonant frequency = %.f MHz\"%fr)\n",
+ "print(\"Voltage drop across resitor = %.3f V\"%Vr)\n",
+ "print(\"Voltage drop across inductor = %.3f V\"%Vl)\n",
+ "print(\"Voltage drop across capacitor = %.3f V\"%Vc)\n",
+ "print(\"Quality factor of coil = %.f\"%Q)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "resonant frequency = 1 MHz\n",
+ "Voltage drop across resitor = 0.157 V\n",
+ "Voltage drop across inductor = 6.283 V\n",
+ "Voltage drop across capacitor = 6.283 V\n",
+ "Quality factor of coil = 40\n"
+ ]
+ }
+ ],
+ "prompt_number": 89
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.65, Page No. 160"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# resonant frequency ,impedence,Q-factor,Bnadwidth,line current and resonant frequency\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V=10.0\n",
+ "L=1.2 # in micro henry\n",
+ "C=200.0 # in micro farad\n",
+ "R=8.0 # in ohms\n",
+ "\n",
+ "#Calculations\n",
+ "fr=(1/(2*math.pi))*(math.sqrt((1/(L*10**-3*C*10**-12))-(R**2/(L*10**-3)**2))*10**-3) # resonant frequency in killo hertz\n",
+ "Zr=(L*10**-3)/(C*10**-9*R) # IN KILLO OHMS\n",
+ "Q=((2*math.pi*fr*10**6*L*10**-6)/R)\n",
+ "BW=fr/Q\n",
+ "Ir=(V/Zr)*10**3\n",
+ "fr1=((1/(2*math.pi*math.sqrt(L*10**-3*C*10**-12))))*10**-3 #resonant frequency in mega hertz\n",
+ "\n",
+ "#Result\n",
+ "print(\"resonant frequency = %.3f kHz\"%fr)\n",
+ "print(\"Impedence is %.f k-ohm\"%Zr)\n",
+ "print(\"bandwidth is %.2f kHz\"%BW)\n",
+ "print(\"line current is %.2f micro-A\"%Ir)\n",
+ "print(\"Quality factor of coil is %.1f\"%Q)\n",
+ "print(\"resonant frequency neglecting resistance = %.3f kHz\"%(math.floor(fr1*1000)/1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "resonant frequency = 324.872 kHz\n",
+ "Impedence is 750 k-ohm\n",
+ "bandwidth is 1.06 kHz\n",
+ "line current is 13.33 micro-A\n",
+ "Quality factor of coil is 306.2\n",
+ "resonant frequency neglecting resistance = 324.873 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 99
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.66, Page No. 161"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# resonant frequency ,impedence,Q-factor,Bnadwidth\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V=10.0\n",
+ "L=150.0 # in micro henry\n",
+ "C=100.0 # in micro farad\n",
+ "R=5 # in ohms\n",
+ "\n",
+ "#Calculations\n",
+ "fr=((1/(2*math.pi*math.sqrt(L*10**-6*C*10**-12))))*10**-3 # resonant frequency in killo hertz\n",
+ "Zr=(L*10**-3)/(C*10**-9*R) # IN KILLO OHMS\n",
+ "Q=((2*math.pi*fr*10**6*L*10**-6)/R)*10**-3\n",
+ "BW=(fr/Q)\n",
+ "\n",
+ "#Result\n",
+ "print(\"resonant frequency = %.1f kHz\"%fr)\n",
+ "print(\"Impedance is %.f k-ohm\"%(Zr*10**-3))\n",
+ "print(\"Quality factor of coil is %.f\"%Q)\n",
+ "print(\"bandwidth = %.1f kHz\"%BW)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "resonant frequency = 1299.5 kHz\n",
+ "Impedance is 300 k-ohm\n",
+ "Quality factor of coil is 245\n",
+ "bandwidth = 5.3 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 104
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.67, Page No. 162"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Q FACTOR\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "fr=1600.0 # resonant frequency in killo hertz\n",
+ "BW=10.0 # In kill hertz\n",
+ "\n",
+ "#Calculations\n",
+ "Qr=fr/BW\n",
+ "\n",
+ "#Result\n",
+ "print(\"value of quality factor is %.f\"%Qr)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of quality factor is 160\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.68, Page No. 163"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Q FACTOR\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "fr=2*10**6 # resonant frequency in hertz\n",
+ "BW=50*10**3 # hertz\n",
+ "\n",
+ "#Calcualtions\n",
+ "Qr=fr/BW\n",
+ "\n",
+ "#Result\n",
+ "print(\"value of quality factor is %.f\"%Qr)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of quality factor is 40\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 2.69, Page No. 163"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# parallel impedence\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "fr=455.0*10**3 # resonant frequency in hertz\n",
+ "BW=10.0*10**3 # hertz\n",
+ "Xl=1255.0 # inductive reactance in ohm\n",
+ "\n",
+ "#Calculations\n",
+ "Qr=fr/BW\n",
+ "R=Xl/Qr\n",
+ "L=Xl/(2*math.pi*fr)\n",
+ "C=1/(2*math.pi*fr*Xl)\n",
+ "Zp=(L/(C*R))*10**-3\n",
+ "\n",
+ "#Result\n",
+ "print(\"value of quality factor is %.1f\"%Qr)\n",
+ "print(\"resisitance = %.1f ohm\"%R)\n",
+ "print(\"inductance = %.3f * 10^-3 H\"%(L*1000))\n",
+ "print(\"capacitor = %.1f * 10^-12 F\"%(C*10**12))\n",
+ "print(\"parallel impedence = %.f k-ohm\"%Zp)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of quality factor is 45.5\n",
+ "resisitance = 27.6 ohm\n",
+ "inductance = 0.439 * 10^-3 H\n",
+ "capacitor = 278.7 * 10^-12 F\n",
+ "parallel impedence = 57 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 115
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_3.ipynb b/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_3.ipynb
new file mode 100755
index 00000000..8b1b7b23
--- /dev/null
+++ b/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_3.ipynb
@@ -0,0 +1,801 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 3 : Transistor Amplifiers"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.1, Page No.187"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# calculate the input impedence, output impedence, voltage gain and current gain \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Hie=500.0 # the h-parameters of the transistor in ohm\n",
+ "Hfe=60.0 # the h-parameters of the transistor in ohm\n",
+ "Ic=3*10**-3 # collector current in ampere\n",
+ "Rb=220*10**3 # resistance in ohm\n",
+ "Rc=5.1*10**3 # resistance in ohm\n",
+ "Vcc=12.0 # voltage in volts\n",
+ "Vbe=0.6 # voltage in volts\n",
+ "Beta=60.0 # for transistor\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "zi=Hie\n",
+ "zo=Rc\n",
+ "Av=-Hfe*Rc/Hie\n",
+ "Ai=-Hfe\n",
+ "Ib=(Vcc-Vbe)/Rb\n",
+ "Ie=Beta*Ib\n",
+ "re=26*10**-3/Ie\n",
+ "Zin=Beta*math.ceil(re*100)/100\n",
+ "Zout=Rc\n",
+ "Av1=-Rc/re\n",
+ "Ai1=-Beta\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"part 1 - from h-parameter model:\")\n",
+ "print(\"input impedence (ohm) = %.f\"%zi)\n",
+ "print(\"ouput impedence (k-ohm) = %.1f \"%(zo/1000))\n",
+ "print(\"current gain (unitless) = %.f\"%Ai)\n",
+ "print(\"voltage gain (unitless) = %.f\"%Av)\n",
+ "print(\"\\npart 2 - from re model:\")\n",
+ "print(\"base curret (micro-A) = %.1f\"%(Ib*10**6))\n",
+ "print(\"emitter curret (mA) = %.3f\"%(Ie*1000))\n",
+ "print(\"resistance = %.2f\"%(math.ceil(re*100)/100))\n",
+ "print(\"input impedence (ohm) = %.1f\"%Zin)\n",
+ "print(\"ouput impedence (k-ohm) = %.1f\"%(Zout/1000))\n",
+ "print(\"current gain (unitless) = %.f\"%Ai1)\n",
+ "print(\"voltage gain (unitless) = %.f\"%(math.ceil(Av1)))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "part 1 - from h-parameter model:\n",
+ "input impedence (ohm) = 500\n",
+ "ouput impedence (k-ohm) = 5.1 \n",
+ "current gain (unitless) = -60\n",
+ "voltage gain (unitless) = -612\n",
+ "\n",
+ "part 2 - from re model:\n",
+ "base curret (micro-A) = 51.8\n",
+ "emitter curret (mA) = 3.109\n",
+ "resistance = 8.37\n",
+ "input impedence (ohm) = 502.2\n",
+ "ouput impedence (k-ohm) = 5.1\n",
+ "current gain (unitless) = -60\n",
+ "voltage gain (unitless) = -609\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.2, Page No. 192"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# calculate the input impedence, output impedence, voltage gain and current gain \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Hie=3.2 # the h-parameters of the transistor in kilo-ohm\n",
+ "Hfe=100.0 # the h-parameters of the transistor \n",
+ "R1=40.0 # resistance in kilo-ohm\n",
+ "R2=4.7 # resistance in kilo-ohm;\n",
+ "Rc=4.0 # resistance in kilo-ohm;\n",
+ "Re=1.2 # resistance in kilo-ohm;\n",
+ "Vcc=16.0 # voltage in volts\n",
+ "Vbe=0.6 # voltage in volts\n",
+ "Beta=100.0 # for transistor\n",
+ "\n",
+ "#Calcualtions\n",
+ "Rb=(R1*R2)/(R1+R2)\n",
+ "zi=(Rb*Hie)/(Rb+Hie)\n",
+ "zo=Rc\n",
+ "Av=-(Hfe*Rc)/Hie\n",
+ "Ai=-(Rb*Hfe)/(Rb+Hie)\n",
+ "Vb=(R2*Vcc)/(R1+R2)\n",
+ "Ib=(Vb-Vbe)/(Rb+(1+Beta)*Re)\n",
+ "Ic=math.floor(Beta*Ib*100)/100\n",
+ "Ie=Ic\n",
+ "re=26.0/Ie\n",
+ "Zin=(Rb*(Beta*re*10**-3))/(Rb+(Beta*re*10**-3))\n",
+ "Zout=Rc\n",
+ "Av1=-(Rc*10**3)/re\n",
+ "Ai1=-(Beta*(Rb*10**3))/((Rb*10**3)+(Beta*re))\n",
+ "\n",
+ "#Result\n",
+ "print(\"part 1 -from h-parameter model:\")\n",
+ "print(\"base resistance (kilo-ohm) = %.1f\"%Rb)\n",
+ "print(\"input impedence (kilo-ohm) = %.2f\"%zi)\n",
+ "print(\"ouput impedence (kilo-ohm) = %.f\"%zo)\n",
+ "print(\"current gain (unitless) = %.2f\"%Ai)\n",
+ "print(\"voltage gain (unitless) = %.f\"%Av)\n",
+ "print(\"\\npart 2 -from re model:\")\n",
+ "print(\"base voltage (V) = %.3f\"%Vb)\n",
+ "print(\"base curret (micro-A) = %.2f\"%(Ib*1000))\n",
+ "print(\"collector curret (mA) = %.2f\"%Ic)\n",
+ "print(\"emitter curret (mA) = %.2f\"%Ie)\n",
+ "print(\"resistance = %.2f\"%re)\n",
+ "print(\"input impedence (kilo-ohm) = %.2f\"%Zin)\n",
+ "print(\"ouput impedence (kilo-ohm) = %.f\"%Zout)\n",
+ "print(\"current gain (unitless) = %.2f\"%Ai1)\n",
+ "print(\"voltage gain (unitless) = %.1f\"%Av1)\n",
+ "\n",
+ "#Current gain values are slightly different"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "part 1 -from h-parameter model:\n",
+ "base resistance (kilo-ohm) = 4.2\n",
+ "input impedence (kilo-ohm) = 1.82\n",
+ "ouput impedence (kilo-ohm) = 4\n",
+ "current gain (unitless) = -56.79\n",
+ "voltage gain (unitless) = -125\n",
+ "\n",
+ "part 2 -from re model:\n",
+ "base voltage (V) = 1.682\n",
+ "base curret (micro-A) = 8.63\n",
+ "collector curret (mA) = 0.86\n",
+ "emitter curret (mA) = 0.86\n",
+ "resistance = 30.23\n",
+ "input impedence (kilo-ohm) = 1.76\n",
+ "ouput impedence (kilo-ohm) = 4\n",
+ "current gain (unitless) = -58.18\n",
+ "voltage gain (unitless) = -132.3\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3, Page No. 194"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# calculate the input impedence, output impedence, voltage gain and current gain \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Re=4.0 # resistance in kilo-ohm\n",
+ "Rc=3.0 # resistance in kilo-ohm\n",
+ "Vcc=10.0 # collector voltage in volts\n",
+ "Vee=8.0 # emitter voltage in volts\n",
+ "Vbe=0.6 # base voltage in volts\n",
+ "\n",
+ "#Calculation\n",
+ "Ie=(Vee-Vbe)/(Re*10**3)\n",
+ "re=math.floor(26*10**-3*100/Ie)/100\n",
+ "zi=((Re*10**3)*re)/((Re*10**3)+re);\n",
+ "zo=Rc;\n",
+ "Av=Rc/(re*10**-3);\n",
+ "Ai=Ie/Ie\n",
+ "\n",
+ "#Result\n",
+ "print(\"emitter current (mA) = %.2f\"%(Ie*1000))\n",
+ "print(\"input impedence (ohm) = %.f\"%zi)\n",
+ "print(\"ouput impedence (kilo-ohm) = %.f\"%zo)\n",
+ "print(\"current gain (unitless) = %.f\"%Ai)\n",
+ "print(\"voltage gain (unitless) = %.2f\"%Av)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "emitter current (mA) = 1.85\n",
+ "input impedence (ohm) = 14\n",
+ "ouput impedence (kilo-ohm) = 3\n",
+ "current gain (unitless) = 1\n",
+ "voltage gain (unitless) = 213.52\n"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3, Page No. 223"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Collector efficiency\n",
+ "\n",
+ "import math\n",
+ "#Vaariable declaration\n",
+ "P = 8.0 # zero-signal power dissipation\n",
+ "Pac = 2 # AC power output\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "eff = (Pac/P)*100\n",
+ "\n",
+ "#Result\n",
+ "print(\"Collector Efficiency = %.f %%\"%eff)\n",
+ "#example 3.3 is twice in the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Collector Efficiency = 25 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 52
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.4, Page No. 227"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# determine collector efficiency\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vmax=25.0 # collector emitter voltag in volts\n",
+ "Vmin=2.5 # collector emitter voltag in volts\n",
+ "\n",
+ "#Calculations\n",
+ "eta= 50*((Vmax-Vmin)/(Vmax+Vmin))\n",
+ "\n",
+ "#Result\n",
+ "print(\"collector efficiency (%%) = %.1f\"%eta)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "collector efficiency (%) = 40.9\n"
+ ]
+ }
+ ],
+ "prompt_number": 53
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.5, Page No. 228"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# determine maximum output power\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rl=80.0 # load resistance in ohm\n",
+ "alfa=5.0 # turn ratio\n",
+ "Ic=120.0 # collector current in milli-ampere\n",
+ "\n",
+ "#Calculations\n",
+ "Rl1=alfa**2*Rl\n",
+ "Imax=2*Ic\n",
+ "Imin=0\n",
+ "Irms=(1/math.sqrt(2))*((Imax-Imin)/2.0)\n",
+ "Pout=((Ic*10**-3)**2*Rl1)/2;\n",
+ "\n",
+ "#Result\n",
+ "print(\"load as seen by transformer primary (ohm) = %.f\"%Rl1)\n",
+ "print(\"maximum current (mA) = %.f\"%Imax)\n",
+ "print(\"minimum current (mA) = %.f\"%Imin)\n",
+ "print(\"rms value of current (mA) = %.2f\"%Irms)\n",
+ "print(\"maximum power output (W) = %.1f\"%Pout) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "load as seen by transformer primary (ohm) = 2000\n",
+ "maximum current (mA) = 240\n",
+ "minimum current (mA) = 0\n",
+ "rms value of current (mA) = 84.85\n",
+ "maximum power output (W) = 14.4\n"
+ ]
+ }
+ ],
+ "prompt_number": 54
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.6, Page No. 228"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# (i) maximum output power (ii) maximum collector efficiency (iii) power rating of the transistor\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=10.0 # collector supply voltage in volts\n",
+ "Icq=200.0 # zero-signal collector current in milli-ampere\n",
+ "Rl=2.0 # load resistance in ohm\n",
+ "alfa=5.0 # turn ratio\n",
+ "\n",
+ "#Calculations\n",
+ "Pout=(Vcc*(Icq*10**-3))/2\n",
+ "Pin=(Vcc*(Icq*10**-3))\n",
+ "eta=(Pout/Pin)*100\n",
+ "P=(Vcc*(Icq*10**-3)) \n",
+ "Rl1=(alfa**2)*Rl\n",
+ "\n",
+ "#REsult\n",
+ "print(\"output power for dc (w) = %.f\"%Pout)\n",
+ "print(\"input power for ac (w) = %.f\"%Pin)\n",
+ "print(\"collector efficiency (%%) = %.f\"%eta)\n",
+ "print(\"power rating of the transistor (w) = %.f\"%P)\n",
+ "print(\"load by the tranformer primary (ohm) = %.f\"%Rl1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output power for dc (w) = 1\n",
+ "input power for ac (w) = 2\n",
+ "collector efficiency (%) = 50\n",
+ "power rating of the transistor (w) = 2\n",
+ "load by the tranformer primary (ohm) = 50\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.7, Page No. 228"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Various parameter calculations\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "alpha=3.0\n",
+ "Podc=0.434 # output ac power in watts\n",
+ "Icq=140.0 # current in milli ampere\n",
+ "Rl=8.0 # load resistance in killo ohms\n",
+ "Vcq=10.0 \n",
+ "Vcemax=18.3 # maximum collector to emitter voltage in volts\n",
+ "Vcemin=2.5 # minimum collector to emitter voltage in volta\n",
+ "Icmax=245.0 # maximum collector current in mili ampere\n",
+ "Icmin=25.0 # minimum collector current in mili ampere\n",
+ "\n",
+ "#Calculations\n",
+ "Vcc=Vcq\n",
+ "Vlrms=(Vcemax-Vcemin)/(2*math.sqrt(2))\n",
+ "VLrms=(1/alpha)*Vlrms #rms value of load voltage\n",
+ "ILrms=(VLrms/Rl)*10**3 #rms value of load current\n",
+ "Pindc=Vcc*Icq*10**-3 #ac power developed across the load in watts\n",
+ "Pd=Pindc-Podc #power dissipated in watts\n",
+ "n=(Podc/Pindc)*100 #efficieny\n",
+ "\n",
+ "#Result\n",
+ "print(\"maximum collector to emitter voltage in volts = %.1f\"%Vcemax)\n",
+ "print(\"minimum collector to emitter voltage in volts = %.1f\"%Vcemin)\n",
+ "print(\"maximum collector current in mA = %.f\"%Icmax)\n",
+ "print(\"minimum collector current in mA = %.f\"%Icmin)\n",
+ "print(\"rms value of load voltage = %.2f\"%VLrms)\n",
+ "print(\"rms value of load current in mA = %.1f\"%ILrms)\n",
+ "print(\"ac power developed across the load in watts = %.1f\"%Pindc)\n",
+ "print(\"power dissipated in watts = %.3f\"%Pd)\n",
+ "print(\"efficiency = %.f%%\"%n)\n",
+ "#Value for rms voltage and current is slightly different than book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum collector to emitter voltage in volts = 18.3\n",
+ "minimum collector to emitter voltage in volts = 2.5\n",
+ "maximum collector current in mA = 245\n",
+ "minimum collector current in mA = 25\n",
+ "rms value of load voltage = 1.86\n",
+ "rms value of load current in mA = 232.8\n",
+ "ac power developed across the load in watts = 1.4\n",
+ "power dissipated in watts = 0.966\n",
+ "efficiency = 31%\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.8, Page No. 232"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# overall efficiency\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=20.0 # in volts\n",
+ "Vce=2.5 # in volts\n",
+ "\n",
+ "#Calculatins\n",
+ "eta=78.5*(1-(Vce/Vcc))\n",
+ "print(\" overall efficiency = %.2f %%\"%eta)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " overall efficiency = 68.69 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.9.a, Page No. 234"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# the percent second harmonic distortion\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V1ce=22.0 # maximum voltage in volts\n",
+ "V2ce=1.2 # minimum voltage in volts\n",
+ "Vceq=10.0 # in volts\n",
+ "\n",
+ "#Calculations\n",
+ "D2=(((1.0/2)*(V1ce+V2ce)-Vceq)/(V1ce-V2ce))*100;\n",
+ "\n",
+ "#Result\n",
+ "print(\"the percent harmonic distortion = %.1f %%\"%D2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the percent harmonic distortion (%) = 7.7\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.9.b, Page No.234"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# the percent second harmonic distortion\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V1ce=18.0 # maximum voltage in volts\n",
+ "V2ce=2.0 # minimum voltage in volts\n",
+ "Vceq=10.0 # in volts\n",
+ "\n",
+ "#Calculations\n",
+ "D2=(((1.0/2)*(V1ce+V2ce)-Vceq)/(V1ce-V2ce))*100\n",
+ "\n",
+ "#Result\n",
+ "print(\"the percent harmonic distortion = %.f %% i.e. no distortion\"%D2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the percent harmonic distortion = 0 % i.e. no distortion\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.10, Page No. 235"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Percentage Increase in powe\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "#Vs=1.95*sin(400*t);in volt\n",
+ "#io=12*sin400*t+1.2*sin800*t+0.9*sin*1200*t+0.4*sin1600*t\n",
+ "#from current we have\n",
+ "V1=12.0 #in volt\n",
+ "V2=1.2 #in volt\n",
+ "V3=0.9 #in volt\n",
+ "V4=0.4 #in volt\n",
+ "#Harmonic distortion of each component is expressed as :\n",
+ "D2=V2/V1 #unitless\n",
+ "D3=V3/V1 #unitless\n",
+ "D4=V4/V1 #unitless\n",
+ "#Total distortion \n",
+ "D=math.sqrt(D2**2+D3**2+D4**2)\n",
+ "PowerIncrease=D**2*100\n",
+ "\n",
+ "print(\"Total disortion = %.4f or %.2f%%\"%(D,D*100))\n",
+ "print(\"\\nTotal Power, P=(1+D2^2)*P1\")\n",
+ "print(\"\\nPercentage Increase in power because of distortion=(P-P1)*100/P1\")\n",
+ "print(\"\\nPercentage Increase in power = %.3f\"%PowerIncrease)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total disortion = 0.1294 or 12.94%\n",
+ "\n",
+ "Total Power, P=(1+D2^2)*P1\n",
+ "\n",
+ "Percentage Increase in power because of distortion=(P-P1)*100/P1\n",
+ "\n",
+ "Percentage Increase in power = 1.674\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.11.i, Page No. 242"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# minimum power drain on the power supply \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Pl=10.0 # power delivered to load in watt\n",
+ "eta1=80.0/100 # output transformer efficiency\n",
+ "eta=78.5/100 # efficiency of a class B push pull amplfier under optimum condition\n",
+ "Pout=Pl/eta1\n",
+ "Pin=Pout/eta\n",
+ "print(\"ac power output of amplifier (W) = %.1f\"%Pout)\n",
+ "print(\"minimum power drain on the power supply (W) = %.1f\"%Pin)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ac power output of amplifier (W) = 12.5\n",
+ "minimum power drain on the power supply (W) = 15.9\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.11.ii, Page No.242"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# minimum average power dissipation\n",
+ " \n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Pl=10 # power delivered to load in watt\n",
+ "eta1=80.0/100 # output transformer efficiency\n",
+ "eta=78.5/100 # efficiency of a class B push pull amplfier under optimum condition\n",
+ "\n",
+ "#Calcualtions\n",
+ "Pout=Pl/eta1\n",
+ "Pin=Pout/eta\n",
+ "Pd=Pin-Pout\n",
+ "Pd1=Pd/2.0\n",
+ "\n",
+ "#Calculations\n",
+ "print(\"ac power output of amplifier (W) = %.1f\"%Pout)\n",
+ "print(\"minimum power drain on the power supply for dc (W) = %.1f\"%Pin)\n",
+ "print(\"minimum average power dissipation (W) = %.1f\"%Pd)\n",
+ "print(\"minimum average power dissipation rating required for each transistor (W) = %.1f\"%Pd1)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ac power output of amplifier (W) = 12.5\n",
+ "minimum power drain on the power supply for dc (W) = 15.9\n",
+ "minimum average power dissipation (W) = 3.4\n",
+ "minimum average power dissipation rating required for each transistor (W) = 1.7\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.12, Page No.243"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# the percent second harmonic distortion\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=50.0 # voltage in volts\n",
+ "Vmin=5.0 # minimum voltage in volts\n",
+ "Pd=40.0 # total power dissipation in watt\n",
+ "\n",
+ "#Calculations\n",
+ "Icmax=Pd/(((2*Vcc)/math.pi)-((Vcc-Vmin)/2));\n",
+ "Pin=(2/math.pi)*(Vcc*Icmax);\n",
+ "Pout=((Icmax/2)*(Vcc-Vmin));\n",
+ "eta=(Pout/Pin)*100;\n",
+ "\n",
+ "#Result\n",
+ "print(\"maximum collector current (A) = %.3f\"%Icmax)\n",
+ "print(\"total power input (W) = %.2f\"%Pin)\n",
+ "print(\"ac power output (W) = %.2f\"%Pout)\n",
+ "print(\"conversion efficiency (%%) = %.2f\"%eta)\n",
+ "#Answer for AC power output and efficiency is wrong in the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum collector current (A) = 4.287\n",
+ "total power input (W) = 136.45\n",
+ "ac power output (W) = 96.45\n",
+ "conversion efficiency (%) = 70.69\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_3_1.ipynb b/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_3_1.ipynb
new file mode 100755
index 00000000..8b1b7b23
--- /dev/null
+++ b/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_3_1.ipynb
@@ -0,0 +1,801 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 3 : Transistor Amplifiers"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.1, Page No.187"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# calculate the input impedence, output impedence, voltage gain and current gain \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Hie=500.0 # the h-parameters of the transistor in ohm\n",
+ "Hfe=60.0 # the h-parameters of the transistor in ohm\n",
+ "Ic=3*10**-3 # collector current in ampere\n",
+ "Rb=220*10**3 # resistance in ohm\n",
+ "Rc=5.1*10**3 # resistance in ohm\n",
+ "Vcc=12.0 # voltage in volts\n",
+ "Vbe=0.6 # voltage in volts\n",
+ "Beta=60.0 # for transistor\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "zi=Hie\n",
+ "zo=Rc\n",
+ "Av=-Hfe*Rc/Hie\n",
+ "Ai=-Hfe\n",
+ "Ib=(Vcc-Vbe)/Rb\n",
+ "Ie=Beta*Ib\n",
+ "re=26*10**-3/Ie\n",
+ "Zin=Beta*math.ceil(re*100)/100\n",
+ "Zout=Rc\n",
+ "Av1=-Rc/re\n",
+ "Ai1=-Beta\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"part 1 - from h-parameter model:\")\n",
+ "print(\"input impedence (ohm) = %.f\"%zi)\n",
+ "print(\"ouput impedence (k-ohm) = %.1f \"%(zo/1000))\n",
+ "print(\"current gain (unitless) = %.f\"%Ai)\n",
+ "print(\"voltage gain (unitless) = %.f\"%Av)\n",
+ "print(\"\\npart 2 - from re model:\")\n",
+ "print(\"base curret (micro-A) = %.1f\"%(Ib*10**6))\n",
+ "print(\"emitter curret (mA) = %.3f\"%(Ie*1000))\n",
+ "print(\"resistance = %.2f\"%(math.ceil(re*100)/100))\n",
+ "print(\"input impedence (ohm) = %.1f\"%Zin)\n",
+ "print(\"ouput impedence (k-ohm) = %.1f\"%(Zout/1000))\n",
+ "print(\"current gain (unitless) = %.f\"%Ai1)\n",
+ "print(\"voltage gain (unitless) = %.f\"%(math.ceil(Av1)))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "part 1 - from h-parameter model:\n",
+ "input impedence (ohm) = 500\n",
+ "ouput impedence (k-ohm) = 5.1 \n",
+ "current gain (unitless) = -60\n",
+ "voltage gain (unitless) = -612\n",
+ "\n",
+ "part 2 - from re model:\n",
+ "base curret (micro-A) = 51.8\n",
+ "emitter curret (mA) = 3.109\n",
+ "resistance = 8.37\n",
+ "input impedence (ohm) = 502.2\n",
+ "ouput impedence (k-ohm) = 5.1\n",
+ "current gain (unitless) = -60\n",
+ "voltage gain (unitless) = -609\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.2, Page No. 192"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# calculate the input impedence, output impedence, voltage gain and current gain \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Hie=3.2 # the h-parameters of the transistor in kilo-ohm\n",
+ "Hfe=100.0 # the h-parameters of the transistor \n",
+ "R1=40.0 # resistance in kilo-ohm\n",
+ "R2=4.7 # resistance in kilo-ohm;\n",
+ "Rc=4.0 # resistance in kilo-ohm;\n",
+ "Re=1.2 # resistance in kilo-ohm;\n",
+ "Vcc=16.0 # voltage in volts\n",
+ "Vbe=0.6 # voltage in volts\n",
+ "Beta=100.0 # for transistor\n",
+ "\n",
+ "#Calcualtions\n",
+ "Rb=(R1*R2)/(R1+R2)\n",
+ "zi=(Rb*Hie)/(Rb+Hie)\n",
+ "zo=Rc\n",
+ "Av=-(Hfe*Rc)/Hie\n",
+ "Ai=-(Rb*Hfe)/(Rb+Hie)\n",
+ "Vb=(R2*Vcc)/(R1+R2)\n",
+ "Ib=(Vb-Vbe)/(Rb+(1+Beta)*Re)\n",
+ "Ic=math.floor(Beta*Ib*100)/100\n",
+ "Ie=Ic\n",
+ "re=26.0/Ie\n",
+ "Zin=(Rb*(Beta*re*10**-3))/(Rb+(Beta*re*10**-3))\n",
+ "Zout=Rc\n",
+ "Av1=-(Rc*10**3)/re\n",
+ "Ai1=-(Beta*(Rb*10**3))/((Rb*10**3)+(Beta*re))\n",
+ "\n",
+ "#Result\n",
+ "print(\"part 1 -from h-parameter model:\")\n",
+ "print(\"base resistance (kilo-ohm) = %.1f\"%Rb)\n",
+ "print(\"input impedence (kilo-ohm) = %.2f\"%zi)\n",
+ "print(\"ouput impedence (kilo-ohm) = %.f\"%zo)\n",
+ "print(\"current gain (unitless) = %.2f\"%Ai)\n",
+ "print(\"voltage gain (unitless) = %.f\"%Av)\n",
+ "print(\"\\npart 2 -from re model:\")\n",
+ "print(\"base voltage (V) = %.3f\"%Vb)\n",
+ "print(\"base curret (micro-A) = %.2f\"%(Ib*1000))\n",
+ "print(\"collector curret (mA) = %.2f\"%Ic)\n",
+ "print(\"emitter curret (mA) = %.2f\"%Ie)\n",
+ "print(\"resistance = %.2f\"%re)\n",
+ "print(\"input impedence (kilo-ohm) = %.2f\"%Zin)\n",
+ "print(\"ouput impedence (kilo-ohm) = %.f\"%Zout)\n",
+ "print(\"current gain (unitless) = %.2f\"%Ai1)\n",
+ "print(\"voltage gain (unitless) = %.1f\"%Av1)\n",
+ "\n",
+ "#Current gain values are slightly different"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "part 1 -from h-parameter model:\n",
+ "base resistance (kilo-ohm) = 4.2\n",
+ "input impedence (kilo-ohm) = 1.82\n",
+ "ouput impedence (kilo-ohm) = 4\n",
+ "current gain (unitless) = -56.79\n",
+ "voltage gain (unitless) = -125\n",
+ "\n",
+ "part 2 -from re model:\n",
+ "base voltage (V) = 1.682\n",
+ "base curret (micro-A) = 8.63\n",
+ "collector curret (mA) = 0.86\n",
+ "emitter curret (mA) = 0.86\n",
+ "resistance = 30.23\n",
+ "input impedence (kilo-ohm) = 1.76\n",
+ "ouput impedence (kilo-ohm) = 4\n",
+ "current gain (unitless) = -58.18\n",
+ "voltage gain (unitless) = -132.3\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3, Page No. 194"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# calculate the input impedence, output impedence, voltage gain and current gain \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Re=4.0 # resistance in kilo-ohm\n",
+ "Rc=3.0 # resistance in kilo-ohm\n",
+ "Vcc=10.0 # collector voltage in volts\n",
+ "Vee=8.0 # emitter voltage in volts\n",
+ "Vbe=0.6 # base voltage in volts\n",
+ "\n",
+ "#Calculation\n",
+ "Ie=(Vee-Vbe)/(Re*10**3)\n",
+ "re=math.floor(26*10**-3*100/Ie)/100\n",
+ "zi=((Re*10**3)*re)/((Re*10**3)+re);\n",
+ "zo=Rc;\n",
+ "Av=Rc/(re*10**-3);\n",
+ "Ai=Ie/Ie\n",
+ "\n",
+ "#Result\n",
+ "print(\"emitter current (mA) = %.2f\"%(Ie*1000))\n",
+ "print(\"input impedence (ohm) = %.f\"%zi)\n",
+ "print(\"ouput impedence (kilo-ohm) = %.f\"%zo)\n",
+ "print(\"current gain (unitless) = %.f\"%Ai)\n",
+ "print(\"voltage gain (unitless) = %.2f\"%Av)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "emitter current (mA) = 1.85\n",
+ "input impedence (ohm) = 14\n",
+ "ouput impedence (kilo-ohm) = 3\n",
+ "current gain (unitless) = 1\n",
+ "voltage gain (unitless) = 213.52\n"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3, Page No. 223"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Collector efficiency\n",
+ "\n",
+ "import math\n",
+ "#Vaariable declaration\n",
+ "P = 8.0 # zero-signal power dissipation\n",
+ "Pac = 2 # AC power output\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "eff = (Pac/P)*100\n",
+ "\n",
+ "#Result\n",
+ "print(\"Collector Efficiency = %.f %%\"%eff)\n",
+ "#example 3.3 is twice in the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Collector Efficiency = 25 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 52
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.4, Page No. 227"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# determine collector efficiency\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vmax=25.0 # collector emitter voltag in volts\n",
+ "Vmin=2.5 # collector emitter voltag in volts\n",
+ "\n",
+ "#Calculations\n",
+ "eta= 50*((Vmax-Vmin)/(Vmax+Vmin))\n",
+ "\n",
+ "#Result\n",
+ "print(\"collector efficiency (%%) = %.1f\"%eta)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "collector efficiency (%) = 40.9\n"
+ ]
+ }
+ ],
+ "prompt_number": 53
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.5, Page No. 228"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# determine maximum output power\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rl=80.0 # load resistance in ohm\n",
+ "alfa=5.0 # turn ratio\n",
+ "Ic=120.0 # collector current in milli-ampere\n",
+ "\n",
+ "#Calculations\n",
+ "Rl1=alfa**2*Rl\n",
+ "Imax=2*Ic\n",
+ "Imin=0\n",
+ "Irms=(1/math.sqrt(2))*((Imax-Imin)/2.0)\n",
+ "Pout=((Ic*10**-3)**2*Rl1)/2;\n",
+ "\n",
+ "#Result\n",
+ "print(\"load as seen by transformer primary (ohm) = %.f\"%Rl1)\n",
+ "print(\"maximum current (mA) = %.f\"%Imax)\n",
+ "print(\"minimum current (mA) = %.f\"%Imin)\n",
+ "print(\"rms value of current (mA) = %.2f\"%Irms)\n",
+ "print(\"maximum power output (W) = %.1f\"%Pout) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "load as seen by transformer primary (ohm) = 2000\n",
+ "maximum current (mA) = 240\n",
+ "minimum current (mA) = 0\n",
+ "rms value of current (mA) = 84.85\n",
+ "maximum power output (W) = 14.4\n"
+ ]
+ }
+ ],
+ "prompt_number": 54
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.6, Page No. 228"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# (i) maximum output power (ii) maximum collector efficiency (iii) power rating of the transistor\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=10.0 # collector supply voltage in volts\n",
+ "Icq=200.0 # zero-signal collector current in milli-ampere\n",
+ "Rl=2.0 # load resistance in ohm\n",
+ "alfa=5.0 # turn ratio\n",
+ "\n",
+ "#Calculations\n",
+ "Pout=(Vcc*(Icq*10**-3))/2\n",
+ "Pin=(Vcc*(Icq*10**-3))\n",
+ "eta=(Pout/Pin)*100\n",
+ "P=(Vcc*(Icq*10**-3)) \n",
+ "Rl1=(alfa**2)*Rl\n",
+ "\n",
+ "#REsult\n",
+ "print(\"output power for dc (w) = %.f\"%Pout)\n",
+ "print(\"input power for ac (w) = %.f\"%Pin)\n",
+ "print(\"collector efficiency (%%) = %.f\"%eta)\n",
+ "print(\"power rating of the transistor (w) = %.f\"%P)\n",
+ "print(\"load by the tranformer primary (ohm) = %.f\"%Rl1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output power for dc (w) = 1\n",
+ "input power for ac (w) = 2\n",
+ "collector efficiency (%) = 50\n",
+ "power rating of the transistor (w) = 2\n",
+ "load by the tranformer primary (ohm) = 50\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.7, Page No. 228"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Various parameter calculations\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "alpha=3.0\n",
+ "Podc=0.434 # output ac power in watts\n",
+ "Icq=140.0 # current in milli ampere\n",
+ "Rl=8.0 # load resistance in killo ohms\n",
+ "Vcq=10.0 \n",
+ "Vcemax=18.3 # maximum collector to emitter voltage in volts\n",
+ "Vcemin=2.5 # minimum collector to emitter voltage in volta\n",
+ "Icmax=245.0 # maximum collector current in mili ampere\n",
+ "Icmin=25.0 # minimum collector current in mili ampere\n",
+ "\n",
+ "#Calculations\n",
+ "Vcc=Vcq\n",
+ "Vlrms=(Vcemax-Vcemin)/(2*math.sqrt(2))\n",
+ "VLrms=(1/alpha)*Vlrms #rms value of load voltage\n",
+ "ILrms=(VLrms/Rl)*10**3 #rms value of load current\n",
+ "Pindc=Vcc*Icq*10**-3 #ac power developed across the load in watts\n",
+ "Pd=Pindc-Podc #power dissipated in watts\n",
+ "n=(Podc/Pindc)*100 #efficieny\n",
+ "\n",
+ "#Result\n",
+ "print(\"maximum collector to emitter voltage in volts = %.1f\"%Vcemax)\n",
+ "print(\"minimum collector to emitter voltage in volts = %.1f\"%Vcemin)\n",
+ "print(\"maximum collector current in mA = %.f\"%Icmax)\n",
+ "print(\"minimum collector current in mA = %.f\"%Icmin)\n",
+ "print(\"rms value of load voltage = %.2f\"%VLrms)\n",
+ "print(\"rms value of load current in mA = %.1f\"%ILrms)\n",
+ "print(\"ac power developed across the load in watts = %.1f\"%Pindc)\n",
+ "print(\"power dissipated in watts = %.3f\"%Pd)\n",
+ "print(\"efficiency = %.f%%\"%n)\n",
+ "#Value for rms voltage and current is slightly different than book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum collector to emitter voltage in volts = 18.3\n",
+ "minimum collector to emitter voltage in volts = 2.5\n",
+ "maximum collector current in mA = 245\n",
+ "minimum collector current in mA = 25\n",
+ "rms value of load voltage = 1.86\n",
+ "rms value of load current in mA = 232.8\n",
+ "ac power developed across the load in watts = 1.4\n",
+ "power dissipated in watts = 0.966\n",
+ "efficiency = 31%\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.8, Page No. 232"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# overall efficiency\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=20.0 # in volts\n",
+ "Vce=2.5 # in volts\n",
+ "\n",
+ "#Calculatins\n",
+ "eta=78.5*(1-(Vce/Vcc))\n",
+ "print(\" overall efficiency = %.2f %%\"%eta)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " overall efficiency = 68.69 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.9.a, Page No. 234"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# the percent second harmonic distortion\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V1ce=22.0 # maximum voltage in volts\n",
+ "V2ce=1.2 # minimum voltage in volts\n",
+ "Vceq=10.0 # in volts\n",
+ "\n",
+ "#Calculations\n",
+ "D2=(((1.0/2)*(V1ce+V2ce)-Vceq)/(V1ce-V2ce))*100;\n",
+ "\n",
+ "#Result\n",
+ "print(\"the percent harmonic distortion = %.1f %%\"%D2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the percent harmonic distortion (%) = 7.7\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.9.b, Page No.234"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# the percent second harmonic distortion\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "V1ce=18.0 # maximum voltage in volts\n",
+ "V2ce=2.0 # minimum voltage in volts\n",
+ "Vceq=10.0 # in volts\n",
+ "\n",
+ "#Calculations\n",
+ "D2=(((1.0/2)*(V1ce+V2ce)-Vceq)/(V1ce-V2ce))*100\n",
+ "\n",
+ "#Result\n",
+ "print(\"the percent harmonic distortion = %.f %% i.e. no distortion\"%D2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the percent harmonic distortion = 0 % i.e. no distortion\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.10, Page No. 235"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Percentage Increase in powe\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "#Vs=1.95*sin(400*t);in volt\n",
+ "#io=12*sin400*t+1.2*sin800*t+0.9*sin*1200*t+0.4*sin1600*t\n",
+ "#from current we have\n",
+ "V1=12.0 #in volt\n",
+ "V2=1.2 #in volt\n",
+ "V3=0.9 #in volt\n",
+ "V4=0.4 #in volt\n",
+ "#Harmonic distortion of each component is expressed as :\n",
+ "D2=V2/V1 #unitless\n",
+ "D3=V3/V1 #unitless\n",
+ "D4=V4/V1 #unitless\n",
+ "#Total distortion \n",
+ "D=math.sqrt(D2**2+D3**2+D4**2)\n",
+ "PowerIncrease=D**2*100\n",
+ "\n",
+ "print(\"Total disortion = %.4f or %.2f%%\"%(D,D*100))\n",
+ "print(\"\\nTotal Power, P=(1+D2^2)*P1\")\n",
+ "print(\"\\nPercentage Increase in power because of distortion=(P-P1)*100/P1\")\n",
+ "print(\"\\nPercentage Increase in power = %.3f\"%PowerIncrease)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total disortion = 0.1294 or 12.94%\n",
+ "\n",
+ "Total Power, P=(1+D2^2)*P1\n",
+ "\n",
+ "Percentage Increase in power because of distortion=(P-P1)*100/P1\n",
+ "\n",
+ "Percentage Increase in power = 1.674\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.11.i, Page No. 242"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# minimum power drain on the power supply \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Pl=10.0 # power delivered to load in watt\n",
+ "eta1=80.0/100 # output transformer efficiency\n",
+ "eta=78.5/100 # efficiency of a class B push pull amplfier under optimum condition\n",
+ "Pout=Pl/eta1\n",
+ "Pin=Pout/eta\n",
+ "print(\"ac power output of amplifier (W) = %.1f\"%Pout)\n",
+ "print(\"minimum power drain on the power supply (W) = %.1f\"%Pin)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ac power output of amplifier (W) = 12.5\n",
+ "minimum power drain on the power supply (W) = 15.9\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.11.ii, Page No.242"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# minimum average power dissipation\n",
+ " \n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Pl=10 # power delivered to load in watt\n",
+ "eta1=80.0/100 # output transformer efficiency\n",
+ "eta=78.5/100 # efficiency of a class B push pull amplfier under optimum condition\n",
+ "\n",
+ "#Calcualtions\n",
+ "Pout=Pl/eta1\n",
+ "Pin=Pout/eta\n",
+ "Pd=Pin-Pout\n",
+ "Pd1=Pd/2.0\n",
+ "\n",
+ "#Calculations\n",
+ "print(\"ac power output of amplifier (W) = %.1f\"%Pout)\n",
+ "print(\"minimum power drain on the power supply for dc (W) = %.1f\"%Pin)\n",
+ "print(\"minimum average power dissipation (W) = %.1f\"%Pd)\n",
+ "print(\"minimum average power dissipation rating required for each transistor (W) = %.1f\"%Pd1)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "ac power output of amplifier (W) = 12.5\n",
+ "minimum power drain on the power supply for dc (W) = 15.9\n",
+ "minimum average power dissipation (W) = 3.4\n",
+ "minimum average power dissipation rating required for each transistor (W) = 1.7\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.12, Page No.243"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# the percent second harmonic distortion\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=50.0 # voltage in volts\n",
+ "Vmin=5.0 # minimum voltage in volts\n",
+ "Pd=40.0 # total power dissipation in watt\n",
+ "\n",
+ "#Calculations\n",
+ "Icmax=Pd/(((2*Vcc)/math.pi)-((Vcc-Vmin)/2));\n",
+ "Pin=(2/math.pi)*(Vcc*Icmax);\n",
+ "Pout=((Icmax/2)*(Vcc-Vmin));\n",
+ "eta=(Pout/Pin)*100;\n",
+ "\n",
+ "#Result\n",
+ "print(\"maximum collector current (A) = %.3f\"%Icmax)\n",
+ "print(\"total power input (W) = %.2f\"%Pin)\n",
+ "print(\"ac power output (W) = %.2f\"%Pout)\n",
+ "print(\"conversion efficiency (%%) = %.2f\"%eta)\n",
+ "#Answer for AC power output and efficiency is wrong in the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum collector current (A) = 4.287\n",
+ "total power input (W) = 136.45\n",
+ "ac power output (W) = 96.45\n",
+ "conversion efficiency (%) = 70.69\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_4.ipynb b/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_4.ipynb
new file mode 100755
index 00000000..5d2c1109
--- /dev/null
+++ b/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_4.ipynb
@@ -0,0 +1,675 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 4 : Field Effect Transistors and MOSFETs"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.1, Page No. 257"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# find the drain current\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "Idss=15.0 # maximum drain current in mili-ampere\n",
+ "VgsOFF=-5.0 # pinch off voltage in volts\n",
+ "Vgs1=0.0 # gate source voltage in volts\n",
+ "Vgs2=-1.0 # gate source voltage in volts\n",
+ "Vgs3=-4.0 # gate source voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Id1=Idss*(1-(Vgs1/VgsOFF))**2\n",
+ "Id2=Idss*(1-(Vgs2/VgsOFF))**2\n",
+ "Id3=Idss*(1-(Vgs3/VgsOFF))**2\n",
+ "\n",
+ "#Result\n",
+ "print(\"drain current (mA) = %.f\"%Id1)\n",
+ "print(\"drain current (mA) = %.1f\"%Id2)\n",
+ "print(\"drain current (mA) = %.1f\"%Id3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "drain current (mA) = 15\n",
+ "drain current (mA) = 9.6\n",
+ "drain current (mA) = 0.6\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.2, Page No. 257"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# find the drain current\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "Idss=12.0 # maximum drain current in mili-ampere\n",
+ "VgsOFF=-20.0 # pinch off voltage in volts\n",
+ "Vgs1=0.0 # gate source voltage in volts\n",
+ "Vgs2=-5.0 # gate source voltage in volts\n",
+ "Vgs3=-10.0 # gate source voltage in volts\n",
+ "Vgs4=-15.0 # gate source voltage in volts\n",
+ "Vgs5=-20.0 # gate source voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Id1=Idss*(1-(Vgs1/VgsOFF))**2;\n",
+ "Id2=Idss*(1-(Vgs2/VgsOFF))**2;\n",
+ "Id3=Idss*(1-(Vgs3/VgsOFF))**2;\n",
+ "Id4=Idss*(1-(Vgs4/VgsOFF))**2;\n",
+ "Id5=Idss*(1-(Vgs5/VgsOFF))**2;\n",
+ "\n",
+ "#Result\n",
+ "print(\"Vgs(V)\\tId(mA)\")\n",
+ "print(\" %.f\\t%.f\"%(Vgs1,Id1))\n",
+ "print(\" %.f \\t%.f\"%(Vgs2,Id2))\n",
+ "print(\" %.f \\t%.f\"%(Vgs3,Id3))\n",
+ "print(\" %.f \\t%.f\"%(Vgs4,Id4))\n",
+ "print(\" %.f \\t%.f\"%(Vgs5,Id5))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Vgs(V)\tId(mA)\n",
+ " 0\t12\n",
+ " -5 \t7\n",
+ " -10 \t3\n",
+ " -15 \t1\n",
+ " -20 \t0\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.3.a, Page No.258"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Plot the min transconductance curve\n",
+ "\n",
+ "import math\n",
+ "import matplotlib.pyplot as plt\n",
+ "% matplotlib inline\n",
+ "from array import array\n",
+ "#variable declaration\n",
+ "#VGS_off=-2 to -6 volt\n",
+ "#IDSS=8 to 20 mA\n",
+ "#Formula : ID=IDSS*[1-VGS/VGS_off]^2\n",
+ "#Let take some values for plotting\n",
+ "IDSS=8.0 # in mA\n",
+ "VGS= array(\"f\", [0, -0.5, -1.0, -1.5, -2.0]) #in Volt\n",
+ "VGS_off=-2 # in Volt\n",
+ "ID=array(\"f\")\n",
+ "print(\" Minimum Transcunductance Values:\\n Vgs \\t Id\")\n",
+ "for i in range(0,5):\n",
+ " ID.append(IDSS*(1-VGS[i]/VGS_off)**2)\n",
+ " print(\"%.1f \\t%.1f\"%(VGS[i],ID[i]))\n",
+ " \n",
+ "plt.plot(VGS,ID)\n",
+ "plt.title(\" Minimum Transconductance Curve\")\n",
+ "plt.xlabel(\"Gate to source voltage (Vgs)\")\n",
+ "plt.ylabel(\"Drain current in milli ampere(Id)\")\n",
+ "plt.show()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Minimum Transcunductance Values:\n",
+ " Vgs \t Id\n",
+ "0.0 \t8.0\n",
+ "-0.5 \t4.5\n",
+ "-1.0 \t2.0\n",
+ "-1.5 \t0.5\n",
+ "-2.0 \t0.0\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAEZCAYAAACU3p4jAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlcVPX+P/DXsIgiAoqIIiCGooBsguKGDihm3lxzxa2u\n2le69as0U8sSu13Lm1b69Vpm5ZZpLl01t8wFzX3PhdJEcAFRVEB2mJnP7w++nBxgmBmYGQbm9Xw8\n5vHgzJxzPp9zPL7nM5/P+3yOTAghQERE9Z5VbVeAiIhMgwGfiMhCMOATEVkIBnwiIgvBgE9EZCEY\n8ImILAQDfh0zcOBArFu3zuDrkuG9+OKLeO+992q7GkQSBnwzYWVlBTc3NyiVSum9kpIStGjRAlZW\nf/0z7d69GxMmTNBpn/qsayoLFixAkyZN0KRJEzRq1Ag2NjbScmBgYG1Xz6BkMhlkMlmN9pGSkgIr\nKyuoVCoD1cpwrl+/jpEjR8LV1RXOzs4IDg7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MmzcPr7/+Orp06QIbGxvpi6v8U5eWLFmCQ4cO\nISgoCOHh4fj999/h5+eHDz/8EP3790dwcDD69+9faZeJlZUVnn/+eezduxfPP/88gNIHeXz88ceI\niopCSEgIwsPDpa6YsnLLH/+4ceNw9uxZBAUFYd26dfDz8wNQOg/64MGDERQUhIEDByIwMBBOTk4A\nSn8VfPPNNwgJCUGnTp3UBnrL9OzZE+fPn1d7r2PHjnBwcEB0dDQaNWokvf/NN99g6tSpCA0NRX5+\nvlTOpk2b0KlTJ4SGhuLq1auYOHEiAODChQvo3r17ZZcR1QGcHpnIDOXl5aFx48bIz89Hnz59sHLl\nSoSEhOi8fXR0NNavX6/Wl19VOQDw8ccf4/79+/jss880rv/OO++gS5cuGDZsmM51IfPBFj6RGXr5\n5ZcRGhqKsLAwjBgxQq9gDwBvvfWWWjedJrt27UJoaCgCAwNx7NgxzJ07V+O6RUVFOHr0aKVPr6K6\ngS18IiILwRY+EZGFYMAnIrIQDPhERBaCAZ+IyEIw4BMRWQgGfCIiC/H/AfIpRAgoY9WAAAAAAElF\nTkSuQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x53373c8>"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.3.b, Page No.258"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Plot the max transconductance curve\n",
+ "\n",
+ "import math\n",
+ "import matplotlib.pyplot as plt\n",
+ "% matplotlib inline\n",
+ "from array import array\n",
+ "#variable declaration\n",
+ "#VGS_off=-2 to -6 volt\n",
+ "#IDSS=8 to 20 mA\n",
+ "#Formula : ID=IDSS*[1-VGS/VGS_off]^2\n",
+ "#Let take some values for plotting\n",
+ "IDSS=20.0 # in mA\n",
+ "VGS= array(\"f\", [0, -2.0, -4.0, -6.0]) #in Volt\n",
+ "VGS_off=-6 # in Volt\n",
+ "ID=array(\"f\")\n",
+ "print(\" Maximum Transcunductance Values:\\n Vgs \\t Id\")\n",
+ "for i in range(0,4):\n",
+ " ID.append(IDSS*(1-VGS[i]/VGS_off)**2)\n",
+ " print(\"%.1f \\t%.1f\"%(VGS[i],ID[i]))\n",
+ " \n",
+ "plt.plot(VGS,ID)\n",
+ "plt.title(\" Maximum Transconductance Curve\")\n",
+ "plt.xlabel(\"Gate to source voltage (Vgs)\")\n",
+ "plt.ylabel(\"Drain current in milli ampere(Id)\")\n",
+ "plt.show()\n",
+ "#Drain current value correspond to Vgs = -4 is wrong in the book."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Maximum Transcunductance Values:\n",
+ " Vgs \t Id\n",
+ "0.0 \t20.0\n",
+ "-2.0 \t8.9\n",
+ "-4.0 \t2.2\n",
+ "-6.0 \t0.0\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAEZCAYAAAB7HPUdAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlYVHX7P/D3AIoLqLGKC+IuKpvgromay2O5lSvumqWl\nlpaJT5a0+ahFpfWtfPqaW6apfXOHy0LRR3JN/blgruAWiCgqiwjD3L8/uDiPI8sMcGaBeb+uiyvP\nLOfcZ6B77vnM5/4cjYgIiIjIJthZOgAiIjIfJn0iIhvCpE9EZEOY9ImIbAiTPhGRDWHSJyKyIUz6\nNur69etwdnYGZ+xajp2dHa5evWrpMMjGMOlbKTs7O3h6eiIvL0+5LTc3Fx4eHrCzK/+vzdvbG+np\n6dBoNOXel5ratGkDZ2dnODs7w8HBAdWrV1e2Fy9ebOnwrE5ERATGjRtn6TCK9NNPPyEkJATOzs6o\nV68eBgwYgLi4OEuHZfOY9K2Yi4sLoqKilO2oqCi4uLhYXaJW07lz55Ceno709HR0794d//M//6Ns\nh4eHK4/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kpKSRETktddek549e8rff/8teXl5cujQIXn8+LFcuHBBatasKb//\n/rtotVpZunSpNGvWTHJzc0VExMfHRzp27ChJSUly79498fX1le+++05ERKKiosTT01POnTsnmZmZ\nMnr0aL2k/+S5FpxXQdJ/+PCh1K1bVz7//HN5/PixpKeny5EjR0REJCIiQsaNG6f3upX0N7Fv3z5x\ncHCQhQsXilarld27d0uNGjXk/v37JZ77zZs3xdXVVaKiokRE5LfffhNXV1e5c+dOod9bVFSUODg4\nlJh0J06cKO+9956yXVTSDwoKkps3b0p2drZcu3ZNatSoIenp6SIiotVqxcvLS3kdhgwZItOmTZOs\nrCxJSUmRDh066L3Z0X8x6VspjUYjly9flpdffllWrFgh3377rbzyyity+fJlvaT/tCFDhsiyZcuU\n7cTERHFxcRFfX19ZvHixcvvTiTs0NFQWLVqk3P/WW2/JgAEDlO0dO3YoCdWYpN+8eXPlvtOnT4tG\no5GUlBTlNldXV/l//+//lfgaFJX0ExISin18WlqaaDQaefjwoYjkJ5apU6cq9+/evVtatWolIiIx\nMTHSokULOXz4sN555OXlSfXq1eX06dOF9v/hhx/KyJEjlW2dTif169eX/fv3i0h+0l+/fr1y/zvv\nvCPTpk0TEZFJkybJ/PnzlfsuXrxodNL/6aefpF27dkWe88KFC2Xs2LHFviYi+n8T+/btk+rVq+ud\ns4eHhxw5cqTEc1+8eHGhN5d+/foV+Yntxx9/lLp165YY08SJE0us9H18fPQ+gYiIdOvWTdauXSsi\nInv27JGmTZuKiEhycrI4Ojoqn0hE8l+znj17lhiDreKYvhXTaDQYP3481qxZg3Xr1mH8+PGFZttE\nRUWhU6dOcHV1xTPPPIPdu3fj7t27yv2NGjVCaGgorl27htdff73E43l6eir/rlatGjw8PPS2MzIy\njI79yX1Vr14dAODu7q53W2n2V6Bhw4bKv3U6HcLDw9GsWTPUrl0bjRs3BgCkpqYWG0fBMXv16oUZ\nM2bg9ddfh6enJ1599VWkp6cjNTUV2dnZaNq0aaFjJyUlwdvbW9nWaDRo2LAhbt26p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atQtBQUHw8/ND\nXFwcFixYUOxjHz9+jIMHD2LIkCGlioUsg5U+EZENYaVPRGRDmPSJiGwIkz4RkQ1h0icisiFM+kRE\nNoRJn4jIhvx/v2eKsTRDxOMAAAAASUVORK5CYII=\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x8c9c5f8>"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.4, Page No. 261"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# drain current and transconductance\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "Idss=20.0 # maximum drain current in mili-ampere\n",
+ "Vp=-8.0 # pintc off voltage in volts\n",
+ "gmo=5000.0 # in micro seconds\n",
+ "Vgs=-4.0 # gate to source voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Id=Idss*(1-(Vgs/Vp))**2\n",
+ "gm=gmo*(1-(Vgs/Vp));\n",
+ "\n",
+ "#Result\n",
+ "print(\"drain current (mA) = %.f\"%Id)\n",
+ "print(\"transconductance (micro-second) = %.f\"%gm)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "drain current (mA) = 5\n",
+ "transconductance (micro-second) = 2500\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.5, Page No.279"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# drain resisitance\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "Id=0.4 #drain current in mili-ampere\n",
+ "Vd=1.0 #drain voltage in volts\n",
+ "Vs=-5.0 #dc voltage in volts\n",
+ "Vss=-3.0 #dc voltage in volts\n",
+ "Vdd=5.0 #dc voltage in volts\n",
+ "MuCox=20.0 #in micro-ampere/volts\n",
+ "W=400.0 #in micro-metre\n",
+ "l=10.0 # in micro-metre\n",
+ "\n",
+ "#Calculations\n",
+ "Id=((1.0/2)*(MuCox)*(W/l))\n",
+ "Rs=(Vss-Vs)/(Id*10**-3)\n",
+ "Rd=(Vdd-Vd)/(Id*10**-3)\n",
+ "\n",
+ "#Result\n",
+ "print(\"The values of the resistances are as follows : \")\n",
+ "print(\"Resistance Rs is %.f K-ohm\"%Rs)\n",
+ "print(\"Resistance Rd is %.f K-ohm\"%Rd);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The values of the resistances are as follows : \n",
+ "Resistance Rs is 5 K-ohm\n",
+ "Resistance Rd is 10 K-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.6, Page No. 279"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# drain resisitance\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "Vdd=10.0 # in volt\n",
+ "ID=0.4 # in mA\n",
+ "mu_nCox=20.0 # in uA/V^2\n",
+ "W=100.0 # in um\n",
+ "L=10.0 # in um\n",
+ "Vt=2.0 # in Volt\n",
+ "\n",
+ "#Calculations\n",
+ "#Formula : ID=mu_n*Cox*W*(VGS-Vt)^2/(2*L)\n",
+ "VGS=math.sqrt(2*L*ID/(mu_nCox*10**-3*W))+(Vt)\n",
+ "Vd=VGS\n",
+ "R=(Vdd-Vd)/ID\n",
+ "\n",
+ "#Result\n",
+ "print(\"Drain resistance is %.f k-ohm\"%R)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Drain resistance is 15 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.7, Page No. 280"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# drain to source resisitance\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "Vdd=5.0 #in volt\n",
+ "knwl=1.0 #in mA/V^2\n",
+ "Vd=0.1 #drain voltage\n",
+ "Vt=1.0 #in Volt\n",
+ "\n",
+ "#Calculations\n",
+ "Id=Vt*((Vdd-Vt)*Vd- (1.0/2)*0.01) #drain current in milli ampere\n",
+ "Rd=(Vdd-Vd)/Id #resistance in killo ohms\n",
+ "Rds= Vd/Id #resistance in killo ohms\n",
+ "\n",
+ "#Result\n",
+ "print(\"Effective drain to source resistance is %.f ohm\"%(Rds*1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Effective drain to source resistance is 253 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.8, Page No. 280"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Analyse the circuit\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "Vdd=10.0 #in volt\n",
+ "ID=0.4 #in mA\n",
+ "knwl=1.0 #in mA/V^2\n",
+ "Vg=5.0 #gate voltage in volys\n",
+ "Vt=1.0 #in Volt\n",
+ "Rd=6.0 #drain resistance in killo ohms\n",
+ "Id=0.5 #in mA after solving the qudratic equation\n",
+ "\n",
+ "#Calaculations\n",
+ "Vs= Id*Rd #source voltage in volts\n",
+ "Vd= Vdd-Rd*Id #drain voltage in volts\n",
+ "Vgs= Vg-Rd*Id #gate to source voltage in volts\n",
+ "\n",
+ "#Result\n",
+ "print(\"source voltage = %.f V\"%Vs)\n",
+ "print(\"drain voltage = %.f V\"%Vd)\n",
+ "print(\"gate to source voltage = %.f V\"%Vgs)\n",
+ "print(\"drain current = %.1f mA\"%Id)\n",
+ "print(\"\\nAs Vd>Vg-Vt, the transistor is operating at saturation as initially assumed.\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "source voltage = 3 V\n",
+ "drain voltage = 7 V\n",
+ "gate to source voltage = 2 V\n",
+ "drain current = 0.5 mA\n",
+ "\n",
+ "As Vd>Vg-Vt, the transistor is operating at saturation as initially assumed.\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.9, Page No.281"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# drain resisitance\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "Vdd=5.0 #in volt\n",
+ "Id=0.5 #in mA\n",
+ "knwl=1.0 #in mA/V^2\n",
+ "Vt=-1.0 #in Volt\n",
+ "\n",
+ "#Calcualtions\n",
+ "#Formula : ID=mu_n*Cox*W*(VGS-Vt)^2/(2*L)\n",
+ "VGS=math.sqrt((2*Id/knwl))+(Vt)\n",
+ "Vd=3\n",
+ "Rd1=Vd/Id #drain resistance in killo ohms\n",
+ "Vdm= Vd-Vt #saturation mode operation\n",
+ "Rd2=Vdm/Id #drain resistance in killo ohms\n",
+ "\n",
+ "#Result\n",
+ "print(\"Drain resistance is %.f k-ohm\"%Rd1)\n",
+ "print(\"Largest value of drain resistance maintaining saturation-region is %.f k-ohm\"%Rd2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Drain resistance is 6 k-ohm\n",
+ "Largest value of drain resistance maintaining saturation-region is 8 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.10, Page No.282"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# channel width to channel length ratio and drain resisitance\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "Id=100.0 # drain current in micro-ampere\n",
+ "kn=20.0 # in micro-ampere per volt^2\n",
+ "Vt=-1.0 # in volts\n",
+ "Vgs=0.0 # gate source voltage in volts\n",
+ "Vdd=5.0 # dc voltage in volts\n",
+ "Vd=1.0 # drain voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "wl=(2*Id/(kn*(Vgs-Vt)**2))\n",
+ "Rd=(Vdd-Vd)/(Id*10**-3)\n",
+ "\n",
+ "#Result\n",
+ "print(\"channel width to channel ratio (W/L) = %.f\"%wl)\n",
+ "print(\"drain resistance (in k-ohm) = %.f\"%Rd)\n",
+ "print(\"\\nRd can vary in the range 0 to 40 k-ohm\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "channel width to channel ratio (W/L) = 10\n",
+ "drain resistance (in k-ohm) = 40\n",
+ "\n",
+ "Rd can vary in the range 0 to 40 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.11, Page No. 282"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# drain to source resisitance\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "Vdd=10.0 # in volt\n",
+ "knwl=1.0 # in mA/V^2\n",
+ "Vd=0.1 # drain voltage\n",
+ "Vt=-1.0 # in Volt\n",
+ "\n",
+ "#Calculations\n",
+ "Id=1*((-Vt)*Vd- (1.0/2)*0.01)# drain current in milli ampere\n",
+ "Rd=(Vdd-Vd)/Id # resistance in killo ohms\n",
+ "Rds= Vd/Id # resistance in killo ohms\n",
+ "print(\"Drain to source resistance is %.f k-ohm\"%Rds)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Drain to source resistance is 1 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.12, Page No.287"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# input resistance\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "Vdd=15.0 # in volt\n",
+ "knwl=0.25 # in mA/V^2\n",
+ "Va=50.0 # voltage\n",
+ "Vt=1.5 # in Volt\n",
+ "Id=1.06 # drain current in milli ampre\n",
+ "Vd= 4.4 # drain oltage in volt\n",
+ "Rd=10.0 # drain resistance in killo ohms\n",
+ "Rg=10.0 # gate resistance in killo ohms\n",
+ "Rl=10.0 # load resistance in killo ohms\n",
+ "Ii=4.3 # input current in milli ampere\n",
+ "\n",
+ "#Calculations\n",
+ "Vgs=Vd\n",
+ "gm=knwl*(Vgs-Vt) # transconductance in mA/V\n",
+ "ro=Va/Id # output resistance in killo ohms\n",
+ "x=(Rd*Rl)/(Rd+Rl)\n",
+ "Av= -gm*((x*ro)/(x+ro))\n",
+ "Ri= Rg/Ii # input resistance in mega ohms\n",
+ "\n",
+ "print(\"Input resistance (Rin) = %.2f Mega-ohm\"%Ri)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Input resistance (Rin) = 2.33 Mega-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_4_1.ipynb b/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_4_1.ipynb
new file mode 100755
index 00000000..2d4eb6b7
--- /dev/null
+++ b/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_4_1.ipynb
@@ -0,0 +1,675 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 4 : Field Effect Transistors and MOSFETs"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.1, Page No. 257"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# find the drain current\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "Idss=15.0 # maximum drain current in mili-ampere\n",
+ "VgsOFF=-5.0 # pinch off voltage in volts\n",
+ "Vgs1=0.0 # gate source voltage in volts\n",
+ "Vgs2=-1.0 # gate source voltage in volts\n",
+ "Vgs3=-4.0 # gate source voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Id1=Idss*(1-(Vgs1/VgsOFF))**2\n",
+ "Id2=Idss*(1-(Vgs2/VgsOFF))**2\n",
+ "Id3=Idss*(1-(Vgs3/VgsOFF))**2\n",
+ "\n",
+ "#Result\n",
+ "print(\"drain current (mA) = %.f\"%Id1)\n",
+ "print(\"drain current (mA) = %.1f\"%Id2)\n",
+ "print(\"drain current (mA) = %.1f\"%Id3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "drain current (mA) = 15\n",
+ "drain current (mA) = 9.6\n",
+ "drain current (mA) = 0.6\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.2, Page No. 257"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# find the drain current\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "Idss=12.0 # maximum drain current in mili-ampere\n",
+ "VgsOFF=-20.0 # pinch off voltage in volts\n",
+ "Vgs1=0.0 # gate source voltage in volts\n",
+ "Vgs2=-5.0 # gate source voltage in volts\n",
+ "Vgs3=-10.0 # gate source voltage in volts\n",
+ "Vgs4=-15.0 # gate source voltage in volts\n",
+ "Vgs5=-20.0 # gate source voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Id1=Idss*(1-(Vgs1/VgsOFF))**2;\n",
+ "Id2=Idss*(1-(Vgs2/VgsOFF))**2;\n",
+ "Id3=Idss*(1-(Vgs3/VgsOFF))**2;\n",
+ "Id4=Idss*(1-(Vgs4/VgsOFF))**2;\n",
+ "Id5=Idss*(1-(Vgs5/VgsOFF))**2;\n",
+ "\n",
+ "#Result\n",
+ "print(\"Vgs(V)\\tId(mA)\")\n",
+ "print(\" %.f\\t%.f\"%(Vgs1,Id1))\n",
+ "print(\" %.f \\t%.f\"%(Vgs2,Id2))\n",
+ "print(\" %.f \\t%.f\"%(Vgs3,Id3))\n",
+ "print(\" %.f \\t%.f\"%(Vgs4,Id4))\n",
+ "print(\" %.f \\t%.f\"%(Vgs5,Id5))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Vgs(V)\tId(mA)\n",
+ " 0\t12\n",
+ " -5 \t7\n",
+ " -10 \t3\n",
+ " -15 \t1\n",
+ " -20 \t0\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.3.a, Page No.258"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Plot the min transconductance curve\n",
+ "\n",
+ "import math\n",
+ "import matplotlib.pyplot as plt\n",
+ "%matplotlib inline\n",
+ "from array import array\n",
+ "#variable declaration\n",
+ "#VGS_off=-2 to -6 volt\n",
+ "#IDSS=8 to 20 mA\n",
+ "#Formula : ID=IDSS*[1-VGS/VGS_off]^2\n",
+ "#Let take some values for plotting\n",
+ "IDSS=8.0 # in mA\n",
+ "VGS= array(\"f\", [0, -0.5, -1.0, -1.5, -2.0]) #in Volt\n",
+ "VGS_off=-2 # in Volt\n",
+ "ID=array(\"f\")\n",
+ "print(\" Minimum Transcunductance Values:\\n Vgs \\t Id\")\n",
+ "for i in range(0,5):\n",
+ " ID.append(IDSS*(1-VGS[i]/VGS_off)**2)\n",
+ " print(\"%.1f \\t%.1f\"%(VGS[i],ID[i]))\n",
+ " \n",
+ "plt.plot(VGS,ID)\n",
+ "plt.title(\" Minimum Transconductance Curve\")\n",
+ "plt.xlabel(\"Gate to source voltage (Vgs)\")\n",
+ "plt.ylabel(\"Drain current in milli ampere(Id)\")\n",
+ "plt.show()"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Minimum Transcunductance Values:\n",
+ " Vgs \t Id\n",
+ "0.0 \t8.0\n",
+ "-0.5 \t4.5\n",
+ "-1.0 \t2.0\n",
+ "-1.5 \t0.5\n",
+ "-2.0 \t0.0\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAEZCAYAAACU3p4jAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlcVPX+P/DXsIgiAoqIIiCGooBsguKGDihm3lxzxa2u\n2le69as0U8sSu13Lm1b69Vpm5ZZpLl01t8wFzX3PhdJEcAFRVEB2mJnP7w++nBxgmBmYGQbm9Xw8\n5vHgzJxzPp9zPL7nM5/P+3yOTAghQERE9Z5VbVeAiIhMgwGfiMhCMOATEVkIBnwiIgvBgE9EZCEY\n8ImILAQDfh0zcOBArFu3zuDrkuG9+OKLeO+992q7GkQSBnwzYWVlBT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BkyRJMmTIF/v7+\n6Ny5MwIDAxEXF1chG8bFxQU9e/ZEYGAgZs2ahWHDhiEoKAjBwcHo27cvPvnkkwoPyrh8+bI0ePjB\nBx9g7ty5sLOzw6pVqzBy5EgEBQXBxsYG06ZNAwDMmzcPr7/+Orp06QIbGxvpi6v8U5eWLFmCQ4cO\nISgoCOHh4fj999/h5+eHDz/8EP3790dwcDD69+9faZeJlZUVnn/+eezduxfPP/88gNIHeXz88ceI\niopCSEgIwsPDpa6YsnLLH/+4ceNw9uxZBAUFYd26dfDz8wNQOg/64MGDERQUhIEDByIwMBBOTk4A\nSn8VfPPNNwgJCUGnTp3UBnrL9OzZE+fPn1d7r2PHjnBwcEB0dDQaNWokvf/NN99g6tSpCA0NRX5+\nvlTOpk2b0KlTJ4SGhuLq1auYOHEiAODChQvo3r17ZZcR1QGcHpnIDOXl5aFx48bIz89Hnz59sHLl\nSoSEhOi8fXR0NNavX6/Wl19VOQDw8ccf4/79+/jss880rv/OO++gS5cuGDZsmM51IfPBFj6RGXr5\n5ZcRGhqKsLAwjBgxQq9gDwBvvfWWWjedJrt27UJoaCgCAwNx7NgxzJ07V+O6RUVFOHr0aKVPr6K6\ngS18IiILwRY+EZGFYMAnIrIQDPhERBaCAZ+IyEIw4BMRWQgGfCIiC/H/AfIpRAgoY9WAAAAAAElF\nTkSuQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x53373c8>"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.3.b, Page No.258"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Plot the max transconductance curve\n",
+ "\n",
+ "import math\n",
+ "import matplotlib.pyplot as plt\n",
+ "%matplotlib inline\n",
+ "from array import array\n",
+ "#variable declaration\n",
+ "#VGS_off=-2 to -6 volt\n",
+ "#IDSS=8 to 20 mA\n",
+ "#Formula : ID=IDSS*[1-VGS/VGS_off]^2\n",
+ "#Let take some values for plotting\n",
+ "IDSS=20.0 # in mA\n",
+ "VGS= array(\"f\", [0, -2.0, -4.0, -6.0]) #in Volt\n",
+ "VGS_off=-6 # in Volt\n",
+ "ID=array(\"f\")\n",
+ "print(\" Maximum Transcunductance Values:\\n Vgs \\t Id\")\n",
+ "for i in range(0,4):\n",
+ " ID.append(IDSS*(1-VGS[i]/VGS_off)**2)\n",
+ " print(\"%.1f \\t%.1f\"%(VGS[i],ID[i]))\n",
+ " \n",
+ "plt.plot(VGS,ID)\n",
+ "plt.title(\" Maximum Transconductance Curve\")\n",
+ "plt.xlabel(\"Gate to source voltage (Vgs)\")\n",
+ "plt.ylabel(\"Drain current in milli ampere(Id)\")\n",
+ "plt.show()\n",
+ "#Drain current value correspond to Vgs = -4 is wrong in the book."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Maximum Transcunductance Values:\n",
+ " Vgs \t Id\n",
+ "0.0 \t20.0\n",
+ "-2.0 \t8.9\n",
+ "-4.0 \t2.2\n",
+ "-6.0 \t0.0\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAEZCAYAAAB7HPUdAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlYVHX7P/D3AIoLqLGKC+IuKpvgromay2O5lSvumqWl\nlpaJT5a0+ahFpfWtfPqaW6apfXOHy0LRR3JN/blgruAWiCgqiwjD3L8/uDiPI8sMcGaBeb+uiyvP\nLOfcZ6B77vnM5/4cjYgIiIjIJthZOgAiIjIfJn0iIhvCpE9EZEOY9ImIbAiTPhGRDWHSJyKyIUz6\nNur69etwdnYGZ+xajp2dHa5evWrpMMjGMOlbKTs7O3h6eiIvL0+5LTc3Fx4eHrCzK/+vzdvbG+np\n6dBoNOXel5ratGkDZ2dn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lmwYIHUr19fZsyYITk5ObJnzx5xdnaWzMzM\nEl+DJ/dZcMwJEyZIVlaWkkxXrVolGRkZkpOTI2+++aaS+ETyE4urq6scO3ZMtFqtjBkzRkaNGiUi\nItHR0RIcHCwPHjwQEZG//vpLkpKSRETktddek549e8rff/8teXl5cujQIXn8+LFcuHBBatasKb//\n/rtotVpZunSpNGvWTHJzc0VExMfHRzp27ChJSUly79498fX1le+++05ERKKiosTT01POnTsnmZmZ\nMnr0aL2k/+S5FpxXQdJ/+PCh1K1bVz7//HN5/PixpKeny5EjR0REJCIiQsaNG6f3upX0N7Fv3z5x\ncHCQhQsXilarld27d0uNGjXk/v37JZ77zZs3xdXVVaKiokRE5LfffhNXV1e5c+dOod9bVFSUODg4\nlJh0J06cKO+9956yXVTSDwoKkps3b0p2drZcu3ZNatSoIenp6SIiotVqxcvLS3kdhgwZItOmTZOs\nrCxJSUmRDh066L3Z0X8x6VspjUYjly9flpdffllWrFgh3377rbzyyity+fJlvaT/tCFDhsiyZcuU\n7cTERHFxcRFfX19ZvHixcvvTiTs0NFQWLVqk3P/WW2/JgAEDlO0dO3YoCdWYpN+8eXPlvtOnT4tG\no5GUlBTlNldXV/l//+//lfgaFJX0ExISin18WlqaaDQaefjwoYjkJ5apU6cq9+/evVtatWolIiIx\nMTHSokULOXz4sN555OXlSfXq1eX06dOF9v/hhx/KyJEjlW2dTif169eX/fv3i0h+0l+/fr1y/zvv\nvCPTpk0TEZFJkybJ/PnzlfsuXrxodNL/6aefpF27dkWe88KFC2Xs2LHFviYi+n8T+/btk+rVq+ud\ns4eHhxw5cqTEc1+8eHGhN5d+/foV+Yntxx9/lLp165YY08SJE0us9H18fPQ+gYiIdOvWTdauXSsi\nInv27JGmTZuKiEhycrI4Ojoqn0hE8l+znj17lhiDreKYvhXTaDQYP3481qxZg3Xr1mH8+PGFZttE\nRUWhU6dOcHV1xTPPPIPdu3fj7t27yv2NGjVCaGgorl27htdff73E43l6eir/rlatGjw8PPS2MzIy\njI79yX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S6t\nTFSBZGZmombNmsjKykKPHj3w/fffIzAw0Ojn9+rVC+vXr9cb2y/pOACwePFi3L59G1988UWxj//n\nP/+J9u3bY+jQoUbHQpbBSp+oAnnllVcQFBSE4OBgDBs2rFQJHwDefvttvSG74uzatQtBQUHw8/ND\nXFwcFixYUOxjHz9+jIMHD2LIkCGlioUsg5U+EZENYaVPRGRDmPSJiGwIkz4RkQ1h0icisiFM+kRE\nNoRJn4jIhvx/v2eKsTRDxOMAAAAASUVORK5CYII=\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x8c9c5f8>"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.4, Page No. 261"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# drain current and transconductance\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "Idss=20.0 # maximum drain current in mili-ampere\n",
+ "Vp=-8.0 # pintc off voltage in volts\n",
+ "gmo=5000.0 # in micro seconds\n",
+ "Vgs=-4.0 # gate to source voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "Id=Idss*(1-(Vgs/Vp))**2\n",
+ "gm=gmo*(1-(Vgs/Vp));\n",
+ "\n",
+ "#Result\n",
+ "print(\"drain current (mA) = %.f\"%Id)\n",
+ "print(\"transconductance (micro-second) = %.f\"%gm)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "drain current (mA) = 5\n",
+ "transconductance (micro-second) = 2500\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.5, Page No.279"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# drain resisitance\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "Id=0.4 #drain current in mili-ampere\n",
+ "Vd=1.0 #drain voltage in volts\n",
+ "Vs=-5.0 #dc voltage in volts\n",
+ "Vss=-3.0 #dc voltage in volts\n",
+ "Vdd=5.0 #dc voltage in volts\n",
+ "MuCox=20.0 #in micro-ampere/volts\n",
+ "W=400.0 #in micro-metre\n",
+ "l=10.0 # in micro-metre\n",
+ "\n",
+ "#Calculations\n",
+ "Id=((1.0/2)*(MuCox)*(W/l))\n",
+ "Rs=(Vss-Vs)/(Id*10**-3)\n",
+ "Rd=(Vdd-Vd)/(Id*10**-3)\n",
+ "\n",
+ "#Result\n",
+ "print(\"The values of the resistances are as follows : \")\n",
+ "print(\"Resistance Rs is %.f K-ohm\"%Rs)\n",
+ "print(\"Resistance Rd is %.f K-ohm\"%Rd);\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The values of the resistances are as follows : \n",
+ "Resistance Rs is 5 K-ohm\n",
+ "Resistance Rd is 10 K-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.6, Page No. 279"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# drain resisitance\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "Vdd=10.0 # in volt\n",
+ "ID=0.4 # in mA\n",
+ "mu_nCox=20.0 # in uA/V^2\n",
+ "W=100.0 # in um\n",
+ "L=10.0 # in um\n",
+ "Vt=2.0 # in Volt\n",
+ "\n",
+ "#Calculations\n",
+ "#Formula : ID=mu_n*Cox*W*(VGS-Vt)^2/(2*L)\n",
+ "VGS=math.sqrt(2*L*ID/(mu_nCox*10**-3*W))+(Vt)\n",
+ "Vd=VGS\n",
+ "R=(Vdd-Vd)/ID\n",
+ "\n",
+ "#Result\n",
+ "print(\"Drain resistance is %.f k-ohm\"%R)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Drain resistance is 15 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.7, Page No. 280"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# drain to source resisitance\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "Vdd=5.0 #in volt\n",
+ "knwl=1.0 #in mA/V^2\n",
+ "Vd=0.1 #drain voltage\n",
+ "Vt=1.0 #in Volt\n",
+ "\n",
+ "#Calculations\n",
+ "Id=Vt*((Vdd-Vt)*Vd- (1.0/2)*0.01) #drain current in milli ampere\n",
+ "Rd=(Vdd-Vd)/Id #resistance in killo ohms\n",
+ "Rds= Vd/Id #resistance in killo ohms\n",
+ "\n",
+ "#Result\n",
+ "print(\"Effective drain to source resistance is %.f ohm\"%(Rds*1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Effective drain to source resistance is 253 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.8, Page No. 280"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Analyse the circuit\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "Vdd=10.0 #in volt\n",
+ "ID=0.4 #in mA\n",
+ "knwl=1.0 #in mA/V^2\n",
+ "Vg=5.0 #gate voltage in volys\n",
+ "Vt=1.0 #in Volt\n",
+ "Rd=6.0 #drain resistance in killo ohms\n",
+ "Id=0.5 #in mA after solving the qudratic equation\n",
+ "\n",
+ "#Calaculations\n",
+ "Vs= Id*Rd #source voltage in volts\n",
+ "Vd= Vdd-Rd*Id #drain voltage in volts\n",
+ "Vgs= Vg-Rd*Id #gate to source voltage in volts\n",
+ "\n",
+ "#Result\n",
+ "print(\"source voltage = %.f V\"%Vs)\n",
+ "print(\"drain voltage = %.f V\"%Vd)\n",
+ "print(\"gate to source voltage = %.f V\"%Vgs)\n",
+ "print(\"drain current = %.1f mA\"%Id)\n",
+ "print(\"\\nAs Vd>Vg-Vt, the transistor is operating at saturation as initially assumed.\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "source voltage = 3 V\n",
+ "drain voltage = 7 V\n",
+ "gate to source voltage = 2 V\n",
+ "drain current = 0.5 mA\n",
+ "\n",
+ "As Vd>Vg-Vt, the transistor is operating at saturation as initially assumed.\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.9, Page No.281"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# drain resisitance\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "Vdd=5.0 #in volt\n",
+ "Id=0.5 #in mA\n",
+ "knwl=1.0 #in mA/V^2\n",
+ "Vt=-1.0 #in Volt\n",
+ "\n",
+ "#Calcualtions\n",
+ "#Formula : ID=mu_n*Cox*W*(VGS-Vt)^2/(2*L)\n",
+ "VGS=math.sqrt((2*Id/knwl))+(Vt)\n",
+ "Vd=3\n",
+ "Rd1=Vd/Id #drain resistance in killo ohms\n",
+ "Vdm= Vd-Vt #saturation mode operation\n",
+ "Rd2=Vdm/Id #drain resistance in killo ohms\n",
+ "\n",
+ "#Result\n",
+ "print(\"Drain resistance is %.f k-ohm\"%Rd1)\n",
+ "print(\"Largest value of drain resistance maintaining saturation-region is %.f k-ohm\"%Rd2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Drain resistance is 6 k-ohm\n",
+ "Largest value of drain resistance maintaining saturation-region is 8 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.10, Page No.282"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# channel width to channel length ratio and drain resisitance\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "Id=100.0 # drain current in micro-ampere\n",
+ "kn=20.0 # in micro-ampere per volt^2\n",
+ "Vt=-1.0 # in volts\n",
+ "Vgs=0.0 # gate source voltage in volts\n",
+ "Vdd=5.0 # dc voltage in volts\n",
+ "Vd=1.0 # drain voltage in volts\n",
+ "\n",
+ "#Calculations\n",
+ "wl=(2*Id/(kn*(Vgs-Vt)**2))\n",
+ "Rd=(Vdd-Vd)/(Id*10**-3)\n",
+ "\n",
+ "#Result\n",
+ "print(\"channel width to channel ratio (W/L) = %.f\"%wl)\n",
+ "print(\"drain resistance (in k-ohm) = %.f\"%Rd)\n",
+ "print(\"\\nRd can vary in the range 0 to 40 k-ohm\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "channel width to channel ratio (W/L) = 10\n",
+ "drain resistance (in k-ohm) = 40\n",
+ "\n",
+ "Rd can vary in the range 0 to 40 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.11, Page No. 282"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# drain to source resisitance\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "Vdd=10.0 # in volt\n",
+ "knwl=1.0 # in mA/V^2\n",
+ "Vd=0.1 # drain voltage\n",
+ "Vt=-1.0 # in Volt\n",
+ "\n",
+ "#Calculations\n",
+ "Id=1*((-Vt)*Vd- (1.0/2)*0.01)# drain current in milli ampere\n",
+ "Rd=(Vdd-Vd)/Id # resistance in killo ohms\n",
+ "Rds= Vd/Id # resistance in killo ohms\n",
+ "print(\"Drain to source resistance is %.f k-ohm\"%Rds)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Drain to source resistance is 1 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 4.12, Page No.287"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# input resistance\n",
+ "\n",
+ "import math\n",
+ "#variable declaration\n",
+ "Vdd=15.0 # in volt\n",
+ "knwl=0.25 # in mA/V^2\n",
+ "Va=50.0 # voltage\n",
+ "Vt=1.5 # in Volt\n",
+ "Id=1.06 # drain current in milli ampre\n",
+ "Vd= 4.4 # drain oltage in volt\n",
+ "Rd=10.0 # drain resistance in killo ohms\n",
+ "Rg=10.0 # gate resistance in killo ohms\n",
+ "Rl=10.0 # load resistance in killo ohms\n",
+ "Ii=4.3 # input current in milli ampere\n",
+ "\n",
+ "#Calculations\n",
+ "Vgs=Vd\n",
+ "gm=knwl*(Vgs-Vt) # transconductance in mA/V\n",
+ "ro=Va/Id # output resistance in killo ohms\n",
+ "x=(Rd*Rl)/(Rd+Rl)\n",
+ "Av= -gm*((x*ro)/(x+ro))\n",
+ "Ri= Rg/Ii # input resistance in mega ohms\n",
+ "\n",
+ "print(\"Input resistance (Rin) = %.2f Mega-ohm\"%Ri)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Input resistance (Rin) = 2.33 Mega-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_5.ipynb b/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_5.ipynb
new file mode 100755
index 00000000..e37d35ce
--- /dev/null
+++ b/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_5.ipynb
@@ -0,0 +1,1598 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 5 : Frequency Response"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.1, Page No. 311"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#COUPLING CAPACITOR\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rs=10.0 # series resistance in killo ohms\n",
+ "Xc1= Rs/10.0 # reactance at 20Hz\n",
+ "\n",
+ "#Calcualtions\n",
+ "C1=(1.0/(2*math.pi*20*Xc1*10**3))*10**6 # CAPACITANCE IN MICRO FARAD\n",
+ "\n",
+ "#Result\n",
+ "print(\"Capacitance = %.3f micro Farad.\\nAs this is not a standard value will select 10 micro farad\"%(math.floor(C1*1000)/1000))\n",
+ "#Answer is slightly different than in book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Capacitance = 7.957 micro Farad.\n",
+ "As this is not a standard value will select 10 micro farad\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.2, Page No. 311"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# amplifier gain\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "f=20.0 # frequency in hertz\n",
+ "Avm=100.0 # mid voltage gain\n",
+ "fl=40.0 # lower cut off frequency in hertz\n",
+ "fh=16.0 # lower cut off frequency in hertz\n",
+ "\n",
+ "#Calcualtions\n",
+ "Avl= (Avm/(math.sqrt(1+(fl/f)**2))) # gain at lower cut off frequency\n",
+ "Avh= (Avm/(math.sqrt(1+(f/fh)**2))) # gain at upper cut off frequency\n",
+ "\n",
+ "#Result\n",
+ "print(\"gain at lower cut off frequency = %.2f\"%Avl)\n",
+ "print(\"gain at upper cut off frequency = %.2f\"%Avh)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "gain at lower cut off frequency = 44.72\n",
+ "gain at upper cut off frequency = 62.47\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.3, Page No. 312"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# amplifier gain\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "f=40.0 # frequency in hertz\n",
+ "Avm=40.0 # mid voltage gain\n",
+ "fl=40.0 # lower cut off frequency in hertz\n",
+ "\n",
+ "#Calculations\n",
+ "Avl= (Avm/(math.sqrt(1+(fl/f)**2))) # gain at lower cut off frequency\n",
+ "\n",
+ "#Result\n",
+ "print(\"gain at lower cut off frequency = %.2f\"%Avl)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "gain at lower cut off frequency = 28.28\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.4, Page No. 312"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# amplifier gain\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "f=50.0 # frequency in hertz\n",
+ "Avm=150/0.707 # mid voltage gain\n",
+ "fh=20.0 # lower cut off frequency in hertz\n",
+ "\n",
+ "#Calculations\n",
+ "Avh= (Avm/(math.sqrt(1+(f/fh)**2))) # gain at upper cut off frequency\n",
+ "\n",
+ "#Result\n",
+ "print(\"gain at upper cut off frequency = %.2f\"%(math.floor(Avh*100)/100))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "gain at upper cut off frequency = 78.79\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.5, Page No. 312"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# maximum voltage gain\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Avl=100.0 # voltage gain\n",
+ "\n",
+ "#Calculations\n",
+ "Avm=Avl/0.707 # MID VOLTAGE GAIN\n",
+ "\n",
+ "#Result\n",
+ "print(\"maximum voltage gain is %.2f\"%Avm)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum voltage gain is 141.44\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.6, Page No.319"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# series capacitance and transfer function\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "f=100.0 # frequency in hertz\n",
+ "fc=25.0 # corner frequency\n",
+ "rs=2.0 # series resistance in killo ohms\n",
+ "rp=4.0 # PARALLEL resistance in killo ohms\n",
+ "\n",
+ "#Calculations\n",
+ "Cs= (1/(2*math.pi*fc*(rs+rp)*10**3))*10**6 # series capacitance in micro farad\n",
+ "ts= Cs*10**-6*(rs+rp)*10**3 # time constant\n",
+ "Tf= ((rp/(rs+rp))*((2*math.pi*f*ts)/(math.sqrt(1+(2*math.pi*f*ts)**2)))) # transfer function\n",
+ "\n",
+ "#Result\n",
+ "print(\"series capacitance in micro farad = %.2f\"%Cs)\n",
+ "print(\"transfer function is %.3f\"%(math.floor(Tf*1000)/1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "series capacitance in micro farad = 1.06\n",
+ "transfer function is 0.646\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.7, Page No. 321"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# corner frequency and maximum magnitude asymptote\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Cp=2.0 # PARALLEL RESISTANCE IN PICO FARAD\n",
+ "rs=2.0 # series resistance in killo ohms\n",
+ "rp=10.0 # PARALLEL resistance in killo ohms\n",
+ "\n",
+ "#Calculation\n",
+ "tp= ((rs*rp)/(rs+rp)*10**3*Cp*10**-12) # time constant\n",
+ "f= (1/(2*math.pi*tp))*10**-6 # corner frequency in mega hertz\n",
+ "Am= rp/(rp+rs) # maximum amplitude\n",
+ "Amd= 20*(math.log10(Am)) # maximum magnitude aymptote is dB\n",
+ "\n",
+ "#Result\n",
+ "print(\"corner frequency = %.2f MHz\"%(math.floor(f*100)/100))\n",
+ "print(\"maximum magnitude asymptote is %.2f dB\"%Amd)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "corner frequency = 47.74 MHz\n",
+ "maximum magnitude asymptote is -1.58 dB\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.9, Page No. 330"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# 3-db frequency and bandwidth\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Cp=1.0 # PARALLEL capacitance IN PICO FARAD\n",
+ "Cs=2.0 # series capacitance IN micro FARAD\n",
+ "rs=1.0 # series resistance in killo ohms\n",
+ "rp=10.0 # PARALLEL resistance in killo ohms\n",
+ "\n",
+ "#Calculations\n",
+ "ts= ((rs+rp)*10**3*Cp*10**-12) # time constant\n",
+ "tp= ((rs*rp)/(rs+rp)*10**3*Cp*10**-12) # time constant\n",
+ "fl= (1/(2*math.pi*ts))*10**-6 # lower frequency in mega hertz\n",
+ "fl= math.floor(fl*100)/100\n",
+ "fh= round((1/(2*math.pi*tp))*10**-6) # upper frequency in mega hertz\n",
+ "BW=fh-fl # bandwidth in mega hertz\n",
+ "ts= (rs+rp)*10**3*Cp*10**-12 # open circuit time constant\n",
+ "tp= ((rs*rp)/(rs+rp))*10**3*Cp*10**-12 #short time constant\n",
+ "Ts= (rp)/(rs+rp) # midband transfer function\n",
+ "Tsdb= 20*(math.log10(Ts)) # midband transfer function in db\n",
+ "\n",
+ "#Result\n",
+ "print(\"(i) open circuit time constant is %.f * 10^-9\"%(ts*10**9))\n",
+ "print(\"(ii) short circuit time constant is %.f * 10^-12\"%(tp*10**12))\n",
+ "print(\"(iii)lower 3 dB frequency = %.2f MHz\"%fl)\n",
+ "print(\"(iv) upper 3 dB frequency = %f MHz\"%fh)\n",
+ "print(\"(v) Bandwidth = %.2f MHz\"%BW)\n",
+ "print(\"(vi) midband transfer function in db is %.3f\"%Tsdb)\n",
+ "#Short circuit time constant is different in book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) open circuit time constant is 11 * 10^-9\n",
+ "(ii) short circuit time constant is 909 * 10^-12\n",
+ "(iii)lower 3 dB frequency = 14.46 MHz\n",
+ "(iv) upper 3 dB frequency = 175.000000 MHz\n",
+ "(v) Bandwidth = 160.54 MHz\n",
+ "(vi) midband transfer function in db is -0.828\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.10, Page No. 331"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# 3-db frequency and bandwidth\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Cp=1.0 # PARALLEL capacitance IN PICO FARAD\n",
+ "Cs=2.0 # series capacitance IN micro FARAD\n",
+ "rs=1.0 # series resistance in killo ohms\n",
+ "rp=2.0 # PARALLEL resistance in killo ohms\n",
+ "ts= ((rs+rp)*10**3*Cs*10**-6) # time constant\n",
+ "tp= ((rs*rp)/(rs+rp)*Cp*10**-12) # time constant\n",
+ "tp1 = tp\n",
+ "fl= (1/(2*math.pi*ts)) # lower frequency in hertz\n",
+ "tp= math.floor(tp*10**14)/10**14\n",
+ "fh= (1/(2*math.pi*tp)) # upper frequency in hertz\n",
+ "BW=fh-fl # bandwidth in hertz\n",
+ "#ts= ((rs*rp)/(rs+rp))*10**-3*Cs*10**-12 # time constant\n",
+ "\n",
+ "#Result\n",
+ "print(\"Time constant(ts) in second is %.f * 10^-3\"%(ts*1000))\n",
+ "print(\"\\nTime constant(tp) in second is %.3f * 10^-12\"%(tp1*10**12))\n",
+ "print(\"\\nlower 3 dB frequency = %.f Hz\"%fl)\n",
+ "print(\"\\nupper 3 dB frequency = %.2f *10^9 Hz\"%(fh*10**-9))\n",
+ "print(\"\\nbandwidth = %.2f*10^9 Hz\"%(BW*10**-9))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Time constant(ts) in second is 6 * 10^-3\n",
+ "\n",
+ "Time constant(tp) in second is 0.667 * 10^-12\n",
+ "\n",
+ "lower 3 dB frequency = 27 Hz\n",
+ "\n",
+ "upper 3 dB frequency = 241.14 *10^9 Hz\n",
+ "\n",
+ "bandwidth = 241.14*10^9 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 49
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.11, Page No. 336"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# low frequecy response\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Beta=100.0\n",
+ "Rs=1.0 # series resistance in killo ohms\n",
+ "R1=40.0 # resistance in killo ohms\n",
+ "R2=10.0 # resistance in killo ohms\n",
+ "hie=1.1 # in killo ohms\n",
+ "C1=10.0 # capacitance in micro farad\n",
+ "Ce=20.0 # emitter capacitance in micro farad\n",
+ "hic=1100.0 # in ohms\n",
+ "Rl_1=2.0 # resistance in killo ohms\n",
+ "Rl_2=1.8 # load resistance in killo ohms\n",
+ "Rc=4.0 # collector resistance in killo ohms\n",
+ "C2=1.0 # capacitance in micro farad\n",
+ "\n",
+ "\n",
+ "#Calcualtions\n",
+ "x=(R1*R2)/(R1+R2)\n",
+ "Y=(x*hie)/(x+hie)\n",
+ "Rin= math.floor((Y+Rs)*100)/100 \n",
+ "fc=(1/(2*math.pi*Rin*10**3*C1*10**-6)) \n",
+ "Rth=(x*Rs)/(x+Rs)*10**3 \n",
+ "Rx= (Rth+hic)/(Beta) \n",
+ "R= (Rx*Rl_1*10**3)/(Rx+Rl_1*10**3) \n",
+ "R = math.floor(R*100)/100\n",
+ "fc1=(1/(2*math.floor(math.pi*100)*R*Ce*10**-6/100)) \n",
+ "fc2=(1/(2*math.pi*(Rl_2+Rc)*10**3*C2*10**-6)) \n",
+ "\n",
+ "#Result\n",
+ "print(\"CUT OFF FREQUENCY OF INPUT RC NETWORK = %.2f Hz\"%fc)\n",
+ "print(\"CUT OFF FREQUENCY OF BYPASS RC NETWORK = %.2f Hz\"%fc1)\n",
+ "print(\"CUT OFF FREQUENCY OF OUTPUT RC NETWORK = %.2f Hz\"%(math.ceil(fc2*100)/100))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "CUT OFF FREQUENCY OF INPUT RC NETWORK = 8.12 Hz\n",
+ "CUT OFF FREQUENCY OF BYPASS RC NETWORK = 404.36 Hz\n",
+ "CUT OFF FREQUENCY OF OUTPUT RC NETWORK = 27.45 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 60
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.12, Page No.346"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# corner frequency and maximum GAIN\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=10.0 # Colector voltage in volts\n",
+ "Beta= 100.0 \n",
+ "Rc=1.0 # Collector resistance in killo ohms\n",
+ "Rs=600.0 # SERIES RESISTANCE IN OHMS\n",
+ "Re=0.2 # in kilo ohms\n",
+ "R1= 50.0 # in kilo ohms\n",
+ "R2= 10.0 # in kilo ohms\n",
+ "Vbe=0.7 # Base to emitter voltage in volts\n",
+ "C1=1.0 # capacitance in micro farad\n",
+ "\n",
+ "\n",
+ "Vth=Vcc * (R2/(R1+R2)) # VOLTAGE AT BASE\n",
+ "Rth= (R1*R2)/(R1+R2)\n",
+ "Ib=((Vcc-Vbe)/((Rth+(1+Beta)*Re)*10**3))*10**5 # in micro ampere\n",
+ "Icq= Beta*Ib*10**-3 # in milli ampere\n",
+ "Vt=26.0 # volate at room termprature in milli volts\n",
+ "gm= (Icq/Vt)*10**3 # transconductance in milli ampere per volts\n",
+ "rpi= (Beta*Vt*10**-3)/(Icq*10**-3) # resistance\n",
+ "Rb=math.floor(Rth*100)/100 # base resistance in killo ohms\n",
+ "\n",
+ "x=(rpi+(1+Beta)*Re*10**3) \n",
+ "y=(Rs+Rb*10**3) \n",
+ "ts=((x*y)/(x+y))*C1*10**-3 # in milli second\n",
+ "fl= (1/(2*math.pi*ts*10**-3)) # corner frequency in hertz\n",
+ "Ri=(x*Rb*10**-3)/(Rb+x*10**-3) \n",
+ "Av= ((gm*10**-3*rpi*Rc*10**3)*Rb*10**3)/((Ri+Rs*10**-3)*10**3*(x*10**-3+Rb)*10**3) \n",
+ "\n",
+ "#Result\n",
+ "print(rpi)\n",
+ "print(\"corner frequency = %.2f Hz\"%fl)\n",
+ "print(\"maximum gain = %.2f\"%Av)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "797.70609319\n",
+ "corner frequency = 25.40 Hz\n",
+ "maximum gain = 4.33\n"
+ ]
+ }
+ ],
+ "prompt_number": 68
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.13, Page No. 348"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print(\"Theoretical example\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Theoretical example\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.14, Page No. 349"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print(\"Theoretical example\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Theoretical example\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.15, Page No. 349"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print(\"Theoretical example\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Theoretical example\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.16, Page No. 350"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# TIME CONSTANTS , MIDBAND VOLTAGE GAIN AND COERNER FREQUENCIES\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rl=4.0 # load resistance in killo ohms\n",
+ "Rs=250.0 # SERIES RESISTANCE IN OHMS\n",
+ "rpi= 2.0 # resistance IN KILLO OHMS\n",
+ "Re=0.2 # in kilo ohms\n",
+ "C1=2 # capacitance in micro farad\n",
+ "Cl=50.0 # capacitance in pico farad\n",
+ "gm= 6.5 # transconductance in milli ampere per volts\n",
+ "\n",
+ "\n",
+ "#Calcualtions\n",
+ "ts=(Rs*10**-3+rpi)*10**3*C1*10**-3 # open circuit time constant in milli second\n",
+ "tp=Rl*Cl*10**-3 # short circuit time constant in micro second\n",
+ "Av= (((gm*10**-3*rpi*10**3*Rl*10**3))/(Rs*10**-3+rpi)*10**3)*10**-5\n",
+ "fl=(1/(2*math.pi*ts*10**-3)) # lower cut off frequency in hertz\n",
+ "fh=(1/(2*math.pi*tp*10**-6))*10**-6#upper cut off frequency in mega hertz\n",
+ "\n",
+ "#Result\n",
+ "print(\"open circuit time constant = %.1f ms\"%ts)\n",
+ "print(\"short circuit time constant= %.1f micro-sec\"%tp)\n",
+ "print(\"maximum gain = %.2f\"%Av)\n",
+ "print(\"lower cut off frequency = %.2f Hz\"%(math.floor(fl*100)/100))\n",
+ "print(\"upper cut off frequency = %.4f Hz\"%(math.floor(fh*10000)/10000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "open circuit time constant = 4.5 ms\n",
+ "short circuit time constant= 0.2 micro-sec\n",
+ "maximum gain = 231.11\n",
+ "lower cut off frequency = 35.36 Hz\n",
+ "upper cut off frequency = 0.7957 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.17, Page No. 552"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# frequency response\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rg=10.0 # resistance in mega ohms\n",
+ "Vgs=10.0 # gate to soure voltage\n",
+ "Igss=10.0 # current in nano ampere\n",
+ "C1=0.001 # capacitance in micro farad\n",
+ "Rd=1.8 # drain resistance in killo ohms\n",
+ "Rl=18.0 # load resistance in killo ohms\n",
+ "C2=1.0 # Capacitance in micro farad\n",
+ "\n",
+ "#Calculations\n",
+ "x= (Vgs/Igss)*1000.0 # resistance in mega ohms\n",
+ "Rin= ((Rg*x)/(Rg+x)) # input resistance in mega ohms\n",
+ "fc= (1/(2*math.pi*Rin*10**6*C1*10**-6)) # input critical frequency of the RC network\n",
+ "fc1=(1/(2*math.pi*(Rd+Rl)*10**3*C2*10**-6))# output critical frequency of the RC network\n",
+ "\n",
+ "#Result\n",
+ "print(\"input critical frequency of the RC network = %.2f Hz\"%(math.ceil(fc*100)/100))\n",
+ "print(\"input critical frequency of the RC network = %.2f Hz\"%fc1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "input critical frequency of the RC network = 16.08 Hz\n",
+ "input critical frequency of the RC network = 8.04 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.18, Page No. 556"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# frequency\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "rpi=2.0 # resistance in killo ohms\n",
+ "Cpi=1.8 # capacitance in pico farad\n",
+ "Cmu=0.12 # capacitance in pico farad\n",
+ "\n",
+ "#Calculations\n",
+ "fb=(1/(2*math.pi*rpi*10**3*(Cpi+Cmu)*10**-6))# frequency in mega hertz\n",
+ "\n",
+ "#Result\n",
+ "print(\"frequency = %.3f MHz\"%(math.floor(fb*1000)/1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "frequency = 41.446 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.19, Page No.558"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# bandwidth and capacitance\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vt=26.0 # voltage in milli volts\n",
+ "ft=500.0 # frequecy in mega hertz\n",
+ "Ic=1.0 # collector current in mili ampere\n",
+ "Bo=90.0\n",
+ "Cmu=0.2 # capacitance in pico farad\n",
+ "\n",
+ "#Calculations\n",
+ "fb=ft/Bo # frequency in mega hertz\n",
+ "x= ((Ic*10**-3)/(2*math.pi*Vt*10**-3*ft*10**6))*10**12\n",
+ "Cpi= x-Cmu\n",
+ "\n",
+ "#Result\n",
+ "print(\"Bandwidth = %.2f MHz\"%(math.floor(fb*100)/100))\n",
+ "print(\"Capacitance of the transistor = %.3f pF\"%(math.floor(Cpi*1000)/1000))\n",
+ "#Answer for bandwidth is wrong in the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Bandwidth = 5.55 MHz\n",
+ "Capacitance of the transistor = 12.042 pF\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.20, Page No.360"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# corner frequency \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rs=1.0 # series resistance in killo ohms\n",
+ "Rl=3.7 # load resistance in killo ohms\n",
+ "Rc=3.7 # Collector resistance in killo ohms\n",
+ "R1= 200.0 # in kilo ohms\n",
+ "R2= 200.0 # in kilo ohms\n",
+ "Vbe=0.7 # Base to emitter voltage in volts\n",
+ "rpi=2.5 # resistance in killo ohms\n",
+ "Cpi=0.18 # capacitance in pico farad\n",
+ "gm=40.0 # transconductance in milli ampere per volts\n",
+ "C1=4.0 # capacitance in pico farad\n",
+ "\n",
+ "\n",
+ "#Calcualtions\n",
+ "Rb= (R1*R2)/(R1+R2) \n",
+ "y=(Rc*Rl)/(Rc+Rl) \n",
+ "Cmu= Cpi*(1+gm*y) \n",
+ "Cm2=Cmu \n",
+ "z=(Rs*rpi)/(Rs+rpi) \n",
+ "R=(Rb*z)/(Rb+z) \n",
+ "C=Cmu+4 \n",
+ "f3db= (1/(2*math.pi*R*10**3*C))*10**6 # 3-dB frequency in mega hertz\n",
+ "f3db1= (1/(2*math.pi*R*10**3*C1))*10**6 # 3-dB frequency in mega hertz\n",
+ "\n",
+ "#Result\n",
+ "print(\"3-dB frequency due to miller effect = %.3f MHz\"%f3db)\n",
+ "print(\"3-dB frequency = %.1f MHz\"%f3db1)\n",
+ "print(\"\\nDue to miller effect the capacitance gets multiplied by 75,\")\n",
+ "print(\"hence due to miller effect the bandwidth is reduced.\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "3-dB frequency due to miller effect = 12.823 MHz\n",
+ "3-dB frequency = 56.1 MHz\n",
+ "\n",
+ "Due to miller effect the capacitance gets multiplied by 75,\n",
+ "hence due to miller effect the bandwidth is reduced.\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.21, Page No. 367"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# mid band gain and upper 3 db frequency\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Cpi=40.0 # in pico farad\n",
+ "Vt=26.0 # voltage in milli volts\n",
+ "Beta=150.0\n",
+ "Icc=1.0 # current in milli ampere\n",
+ "Icq=1.0 # current in milli ampere\n",
+ "Rc=4.7 # collector resistance in killo ohms\n",
+ "Rl=10.0 # load resistance in killo ohms\n",
+ "Cmu=3.0 # capacitance in pico farad\n",
+ "R1= 50.0 # in kilo ohms\n",
+ "R2= 5.0 # in kilo ohms\n",
+ "rs=1.0 # in killo ohms\n",
+ "\n",
+ "#Calculations\n",
+ "rpi= ((Beta*Vt)/Icc)*10**-3\n",
+ "gm=(Icq/Vt)*10**3 # transconductance in mili ampere per volt\n",
+ "gm = math.floor(gm*100)/100\n",
+ "Rld= (Rc*Rl)/(Rc+Rl) \n",
+ "Rld = math.floor(Rld*1000)/1000\n",
+ "Cm=round(Cmu*(1+gm*Rld)) #miller capacitance in pico farad\n",
+ "Rb= (R1*R2)/(R1+R2)\n",
+ "Rb = math.floor(Rb*1000)/1000\n",
+ "x=(Rb*rs)/(Rb+rs) \n",
+ "y=(rpi*x)/(rpi+x)\n",
+ "y = math.ceil(y*10**4)/10**4\n",
+ "fh=(1/(2*math.pi*y*10**3*(Cm+Cpi)*10**-12)) # 3-db upper cut off frequency in mega hertz\n",
+ "z=(Rb*rpi)/(Rb+rpi) \n",
+ "Avm=(gm*Rld*z)/(z+rs)\n",
+ "\n",
+ "#Result\n",
+ "print(\"3-db upper cut off frequency = %.3f MHz\"%(fh*10**-6))\n",
+ "print(\"Midband Gain = %.2f\"%Avm)\n",
+ "#Value of Fh is wrong in the book\n",
+ "#wrong value of gm is used for Avm calculation"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "3-db upper cut off frequency = 0.570 MHz\n",
+ "Midband Gain = 83.28\n"
+ ]
+ }
+ ],
+ "prompt_number": 64
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.22, Page No.370"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# mid band gain and upper 3 db frequency\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Cpi=40.0 # in pico farad\n",
+ "Vt=26.0 # voltage in milli volts\n",
+ "Beta=150.0\n",
+ "Icq=1.0 # current in milli ampere\n",
+ "rs=1.0 # in killo ohms\n",
+ "re=0.5 # in killo ohms\n",
+ "Rc=4.7 # collector resistance in killo ohms\n",
+ "Rl=10.0 # load resistance in killo ohms\n",
+ "Cmu=3.0 # capacitance in pico farad\n",
+ "R1= 50.0 # in kilo ohms\n",
+ "R2= 5.0 # in kilo ohms\n",
+ "\n",
+ "#Calcualtions\n",
+ "rpi= ((Beta*Vt)/Icq)*10**-3 \n",
+ "gm=(Icq/Vt)*10**3 # transconductance in mili ampere per volt\n",
+ "gm = math.floor(gm*100)/100\n",
+ "g=(rs*re)/(rs+re) \n",
+ "m=rpi/(1+Beta) \n",
+ "m = math.floor(m*10000)/10000\n",
+ "tpi= ((m*g)/(m+g))*10**3*Cpi*10**-12 \n",
+ "tpi = math.floor(tpi*10**14)/10**14\n",
+ "fh1=(1/(2*math.pi*tpi))/10**6 # first 3-db upper cut off frequency in mega hertz\n",
+ "fh1 = (math.floor(fh1*1000)/1000)\n",
+ "Rld= (Rc*Rl)/(Rc+Rl) \n",
+ "Rb= (R1*R2)/(R1+R2)\n",
+ "fh2=(1/(2*math.pi*Cmu*10**-8*Rld*10**3))*10**-2 # second 3-db upper cut off frequency in mega hertz\n",
+ "x=(m*re)/(m+re)\n",
+ "Avm=(gm*Rld*x)/(x+rs) \n",
+ "\n",
+ "#Result\n",
+ "print(\"3-db upper cut off frequency = %.3f MHz\"%fh1)\n",
+ "print(\"second 3-db upper cut off frequency= %.4f MHz\"%fh2)\n",
+ "print(\"Midband Gain = %.4f\"%Avm)\n",
+ "# Value for fh2 and Avm slightly differs from the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "3-db upper cut off frequency = 166.156 MHz\n",
+ "second 3-db upper cut off frequency= 16.5927 MHz\n",
+ "Midband Gain = 2.9446\n"
+ ]
+ }
+ ],
+ "prompt_number": 89
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.23, Page No.375"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# mid band gain and upper 3 db frequency\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Cmu=3.0 # capacitance in pico farad\n",
+ "Cpi=40.0 # in pico farad\n",
+ "Vt=26.0 # voltage in milli volts\n",
+ "Beta=150.0 \n",
+ "Icq=1.0 # current in milli ampere\n",
+ "rs=1.0 # in killo ohms\n",
+ "re=4.7 # in killo ohms\n",
+ "R1= 40.0 # in kilo ohms\n",
+ "R2= 20.0 # in kilo ohms\n",
+ "R3= 27.0 # in kilo ohms\n",
+ "Rc=4.7 # collector resistance in killo ohms\n",
+ "Rl=10.0 # load resistance in killo ohms\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "rpi= ((Beta*Vt)/Icq)*10**-3\n",
+ "gm=(Icq/Vt)*10**3 # transconductance in mili ampere per volt\n",
+ "gm = math.floor(gm*100)/100\n",
+ "Rb=(R2*R3)/(R2+R3)\n",
+ "g=(rs*rpi)/(rs+rpi) \n",
+ "tp1=(((Rb*g)*(Cpi+2*Cmu))/(Rb+g))*10**-9 \n",
+ "m=rpi/(1+Beta) \n",
+ "tp2= m*(Cmu+Cpi)*10**-9 \n",
+ "Rld= (Rc*Rl)/(Rc+Rl) \n",
+ "tp3=Cmu*10**-12*Rld*10**3 \n",
+ "fh1=(1/(2*math.pi*tp1*10**6)) # first 3-db upper cut off frequency in mega hertz\n",
+ "fh2=(1/(2*math.pi*tp2*10**6)) # second 3-db upper cut off frequency in mega hertz\n",
+ "fh3=(1/(2*math.pi*tp3*10**6)) # third 3-db upper cut off frequency in mega hertz\n",
+ "Avm= -gm*Rld*(rpi/(rpi+1)) \n",
+ "\n",
+ "#Result\n",
+ "print(\"3-db upper cut off frequency = %.3f MHz\"%fh1)\n",
+ "print(\"second 3-db upper cut off frequency = %.2f MHz\"%fh2)\n",
+ "print(\"third 3-db upper cut off frequency = %.3f MHz\"%fh3)\n",
+ "print(\"Midband Gain = %.2f\"%Avm)\n",
+ "# Value for fh2 and fh3 slightly differs from the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "3-db upper cut off frequency = 4.648 MHz\n",
+ "second 3-db upper cut off frequency = 143.31 MHz\n",
+ "third 3-db upper cut off frequency = 16.593 MHz\n",
+ "Midband Gain = -97.87\n"
+ ]
+ }
+ ],
+ "prompt_number": 95
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.24, Page No.383"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# corner frequency and bandwidth\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "tr=16.0 # rise time in micro second\n",
+ "V=100.0 # voltage in milli volts\n",
+ "Vd=90.0 # voltage in milli volts\n",
+ "f=5.0 # frequecny in killo hertz\n",
+ "\n",
+ "#Calculations\n",
+ "fh= (0.35/(tr*10**-6))*10**-3 # upper cut off frequency in killo hertz\n",
+ "P= ((V-Vd)/V)*100 \n",
+ "fl=(P*10**3*f)/(100*math.pi) # lower cut off frequency in hertz\n",
+ "BW=(fh*10**3-fl)*10**-3 # bandwith in killo hertz\n",
+ "\n",
+ "#Result\n",
+ "print(\"upper cut off frequency = %.3f kHz\"%fh)\n",
+ "print(\"lower cut off frequency = %.2f Hz\"%fl)\n",
+ "print(\"Bandwidth = %.3f kHz\"%(math.floor(BW*1000)/1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "upper cut off frequency = 21.875 kHz\n",
+ "lower cut off frequency = 159.15 Hz\n",
+ "Bandwidth = 21.715 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 100
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.25, Page No.384"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# PERCENTAGE TILT\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rc=4.0 # RESISTANCE IN KILLO OHMS\n",
+ "Rl=2.0 # RESISTANCE IN KILLO OHMS\n",
+ "C=10.0 # capacitance in micro farad\n",
+ "f=200.0 # frequency in hertz\n",
+ "\n",
+ "#Calculations\n",
+ "R1=Rc+Rl \n",
+ "fl=(1/(2*math.pi*R1*10**3*C*10**-6))# LOWER CUT -OFF FREQUENCY\n",
+ "P = (math.pi*fl*100)/f # % tilt\n",
+ "\n",
+ "#Result\n",
+ "print(\"percentage tilt = %.1f%%\"%(math.floor(P*10)/10))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "percentage tilt = 4.1%\n"
+ ]
+ }
+ ],
+ "prompt_number": 102
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.26, Page No. 385"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# PERCENTAGE TILT\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rc=2.0 # RESISTANCE IN KILLO OHMS\n",
+ "Rl=10.0 # RESISTANCE IN KILLO OHMS\n",
+ "C=10.0 # capacitance in micro farad\n",
+ "f=100.0 # frequency in hertz\n",
+ "p1=0.02\n",
+ "\n",
+ "#Calculations\n",
+ "R1=Rc+Rl\n",
+ "fl=(1/(2*math.pi*R1*10**3*C*10**-6))#LOWER CUT -OFF FREQUENCY\n",
+ "fl= math.floor(fl*100)/100\n",
+ "P= (math.floor(math.pi*100)*fl)/(f*100) \n",
+ "f=(math.floor(math.pi*100)*fl)/(p1*100) \n",
+ "\n",
+ "#Result\n",
+ "print(\"percentage tilt = %.3f%%\"%(P*100))\n",
+ "print(\"Lowest value of f for P= 2%%, will be= %.2f Hz\"%f)\n",
+ "print(\"\\nConclusion:\\nAs the input frequency increases the %% tilt decreases.\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "percentage tilt = 4.145%\n",
+ "Lowest value of f for P= 2%, will be= 207.24 Hz\n",
+ "\n",
+ "Conclusion:\n",
+ "As the input frequency increases the %% tilt decreases.\n"
+ ]
+ }
+ ],
+ "prompt_number": 120
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.27, Page No. 389"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# fh,fl and bandwidth\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "fln=25.0 # in hertz\n",
+ "fhn=16.0 # in kelo hertz\n",
+ "n=3.0\n",
+ "\n",
+ "#Calcualtions\n",
+ "x=math.sqrt(2**(1/n)-1) \n",
+ "fl=x*fln # lower cut off frequency in hertz\n",
+ "fh=fhn/x # upper cut off frequency in hertz\n",
+ "BW=(fh*10**3)-fl # bandwidth\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"lower cut off frequency = %.2f Hz\"%(math.floor(fl*100)/100))\n",
+ "print(\"upper cut off frequency = %.2f kHz\"%fh)\n",
+ "print(\"Bandwidth = %.2f kHz\"%(BW/1000))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "lower cut off frequency = 12.74 Hz\n",
+ "upper cut off frequency = 31.38 kHz\n",
+ "Bandwidth = 31.37 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 123
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.28, Page No. 390"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# bandwidth\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "fl=40.0 # in hertz\n",
+ "fh=20.0 # in kelo hertz\n",
+ "n=4.0\n",
+ "\n",
+ "#Calculations\n",
+ "x=math.sqrt(2**(1/n)-1) \n",
+ "fhn=x*fh # lower cut off frequency in hertz\n",
+ "fln=fl/x # upper cut off frequency in hertz\n",
+ "BW=fhn-fln*10**-3 # bandwidth\n",
+ "\n",
+ "#Result\n",
+ "print(\"lower cut off frequency = %.2f Hz\"%(math.floor(fln*100)/100))\n",
+ "print(\"upper cut off frequency = %.1f kHz\"%fhn)\n",
+ "print(\"Bandwidth = %.1f kHz\"%BW) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "lower cut off frequency = 91.95 Hz\n",
+ "upper cut off frequency = 8.7 kHz\n",
+ "Bandwidth = 8.6 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 128
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.29, Page No. 390"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# cut off frequencies\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "fln = 20 # in Hz\n",
+ "fhn=100.0 # in kelo hertz\n",
+ "n=3.0\n",
+ "\n",
+ "#Calculations\n",
+ "x=math.sqrt(2**(1/n)-1) \n",
+ "fl=fln*x # lower cut off frequency in hertz\n",
+ "fh=fhn/x # upper cut off frequency in hertz\n",
+ "\n",
+ "#Result\n",
+ "print(\"lower cut off frequency = %.2f Hz\"%(math.floor(fl*100)/100))\n",
+ "print(\"upper cut off frequency = %.2f KHz\"%(math.floor(fh*100)/100))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "lower cut off frequency = 10.19 Hz\n",
+ "upper cut off frequency = 196.14 KHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 145
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.30, Page No. 391"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Avm,Fh,Cc\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "mu=70.0 \n",
+ "rd=44.0 # resistance in killo ohms\n",
+ "Rd2=50.0 # resistance in killo ohms\n",
+ "Rg=1.0 # gate resisatnce in mega ohms\n",
+ "Csh=200 # capacitance in pico farad\n",
+ "fl=50.0\n",
+ "\n",
+ "#Calculations\n",
+ "gm= mu/(rd) # transconductane in milli ampere per volt\n",
+ "gm = math.ceil(gm*10)/10\n",
+ "x=(rd*Rd2)/(rd+Rd2) \n",
+ "x = math.floor(x*10)/10\n",
+ "Av2m= gm*x # mid frequency gain of second stage\n",
+ "y= (x*Rg*10**3)/(x+Rg*10**3)\n",
+ "Av1m= -gm*y # mid frequency gain of first stage\n",
+ "Av= Av1m*Av2m # total gain\n",
+ "Req=y\n",
+ "fh=(1/(2*math.pi*Req*10**3*Csh*10**-9)) # upper cut off frequency in killo hertz\n",
+ "Ro1=x\n",
+ "Cc=(1/(2*math.pi*fl*(Ro1*10**3+Rg*10**6)))*10**9 # coupling capacitance in nano farad\n",
+ "\n",
+ "#Result\n",
+ "print(x)\n",
+ "print(\"mid frequency gain of second stage = %.2f\"%Av2m)\n",
+ "print(\"upper cut off frequency = %.2f kHz\"%(math.ceil(fh*100)/100))\n",
+ "print(\"coupling capacitance = %.2f nF\"%Cc)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "23.4\n",
+ "mid frequency gain of second stage = 37.44\n",
+ "upper cut off frequency = 34.81 kHz\n",
+ "coupling capacitance = 3.11 nF\n"
+ ]
+ }
+ ],
+ "prompt_number": 152
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.31, Page No. 392"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# gain\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "gm= 10.0 # transconductane in milli ampere per volt\n",
+ "Csh=20.0 # capacitance in pico farad\n",
+ "BW=10.0 # bandwidth in mega hertz\n",
+ "fhn=10.0 # in mega hertz\n",
+ "n=2.0\n",
+ "\n",
+ "#Calculations\n",
+ "x=math.sqrt(2**(1/n)-1)\n",
+ "fh=fhn/x # lower cut off frequency in mega hertz\n",
+ "R=(1/(2*math.pi*Csh*10**-12*fh*10**6)) # resiatnce in ohms\n",
+ "Av1=-gm*R*10**-3 # mid frequency gain of first stage\n",
+ "Av2=Av1 # mid frequency gain of second stage\n",
+ "Av= Av1*Av2 # total gain\n",
+ "Avdb=20*(math.log10(Av)) # total gain dB\n",
+ "\n",
+ "#Result\n",
+ "print(\"Total gain = %.2f dB\"%(math.floor(Avdb*100)/100))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total gain = 28.37 dB\n"
+ ]
+ }
+ ],
+ "prompt_number": 155
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.32, Page No. 393"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Avm,Fh,Fl\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "n=2.0\n",
+ "C=50.0 # in micro farad\n",
+ "Cc=0.1 # in micro farad\n",
+ "rd=50.0 # resistance\n",
+ "Rs=1.0 # series resistance in killo ohmstance in killo ohms\n",
+ "gm= 2.0 # transconductane in milli ampere per volt\n",
+ "Rd=10.0 # resistance in killo ohms\n",
+ "Csh=10.0 # capacitance in pico farad\n",
+ "\n",
+ "#Calculations\n",
+ "x=(rd*Rd)/(rd+Rd) \n",
+ " \n",
+ "Rg=1.0 # gate resisatnce in mega ohms\n",
+ "y= (x*Rg*10**3)/(x+Rg*10**3) \n",
+ "Avm= -gm*y # mid frequency gain of first stage\n",
+ "Av2m= -gm*y # mid frequency gain of second stage\n",
+ "Avm = math.ceil(Avm*100)/100\n",
+ "Av= Avm*Av2m # total gain\n",
+ "Avdb=20*(math.log10(Av))\n",
+ "Req=y\n",
+ "fh=(1/(2*math.pi*Req*10**3*Csh*10**-6))# upper cut off frequency in mega hertz\n",
+ "Ro1=y\n",
+ "fl=(1/(2*math.pi*Cc*10**-6*Ro1*10**3)) # lower cut off frequency in hertz\n",
+ "x=math.sqrt(2**(1/n)-1)\n",
+ "fhn=x*fh # lower cut off frequency in hertz\n",
+ "fln=fl/x # upper cut off frequency in hertz\n",
+ "\n",
+ "#Result\n",
+ "print(\"Total voltage gain = %.2f dB\"%(math.floor(Avdb*100)/100))\n",
+ "print(\"lower cut off frequency = %.2f Hz\"%fl)\n",
+ "print(\"upper cut off frequency = %.4f MHz\"%fh)\n",
+ "print(\"3dB lower cut off frequency = %.2f Hz\"%fln)\n",
+ "print(\"3dB upper cut off frequency = %.2f MHz\"%fhn)\n",
+ "# Values are slightly different than that of book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total voltage gain = 48.72 dB\n",
+ "lower cut off frequency = 192.58 Hz\n",
+ "upper cut off frequency = 1.9258 MHz\n",
+ "3dB lower cut off frequency = 299.22 Hz\n",
+ "3dB upper cut off frequency = 1.24 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 171
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.33, Page No.393"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Avm,Fh,Fl\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "n=3.0\n",
+ "Cc=0.005 # in micro farad\n",
+ "C=100.0 # in pico farad\n",
+ "rd=7.7\n",
+ "Rs=1.0 # series resistance in killo ohmstance in killo ohms\n",
+ "gm= 25.0 # transconductane in milli ampere per volt\n",
+ "Rd=10.0 # resistance in killo ohms\n",
+ "Rg=1.0 # gate resisatnce in mega ohms\n",
+ "Csh=100.0 # capacitance in pico farad\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "x=(rd*Rd)/(rd+Rd) \n",
+ "Av2m= -gm*x # mid frequency gain of second stage\n",
+ "y= (x*Rg*10**3)/(x+Rg*10**3) \n",
+ "Avm= -gm*y # mid frequency gain of first stage\n",
+ "Av= Avm*Avm*Avm # total gain\n",
+ "Avdb=20*(math.log10(-Av)) \n",
+ "Req=y \n",
+ "fh=(1/(2*math.pi*Req*10**3*Csh*10**-9)) # upper cut off frequency in killo hertz\n",
+ "Ro1=y\n",
+ "fl=(1/(2*math.pi*Cc*10**-6*(Ro1*10**3+Rg*10**6))) # lower cut off frequency in hertz\n",
+ "x=math.sqrt(2**(1/n)-1)\n",
+ "fhn=x*fh # lower cut off frequency in hertz\n",
+ "fln=fl/x # upper cut off frequency in hertz\n",
+ "\n",
+ "#Result\n",
+ "print(\"Total voltage gain = %.f dB\"%math.ceil(Avdb))\n",
+ "print(\"lower cut off frequency = %.3f Hz\"%(math.floor(fl*1000)/1000))\n",
+ "print(\"upper cut off frequency = %.2f kHz\"%fh)\n",
+ "print(\"3dB lower cut off frequency = %.3f Hz\"%(math.floor(fln*1000)/1000))\n",
+ "print(\"3dB upper cut off frequency = %.1f kHz\"%fhn)\n",
+ "# Some values are slightly different than that of book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total voltage gain = 123 dB\n",
+ "lower cut off frequency = 31.693 Hz\n",
+ "upper cut off frequency = 367.44 kHz\n",
+ "3dB lower cut off frequency = 62.165 Hz\n",
+ "3dB upper cut off frequency = 187.3 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 180
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_5_1.ipynb b/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_5_1.ipynb
new file mode 100755
index 00000000..e37d35ce
--- /dev/null
+++ b/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_5_1.ipynb
@@ -0,0 +1,1598 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 5 : Frequency Response"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.1, Page No. 311"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#COUPLING CAPACITOR\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rs=10.0 # series resistance in killo ohms\n",
+ "Xc1= Rs/10.0 # reactance at 20Hz\n",
+ "\n",
+ "#Calcualtions\n",
+ "C1=(1.0/(2*math.pi*20*Xc1*10**3))*10**6 # CAPACITANCE IN MICRO FARAD\n",
+ "\n",
+ "#Result\n",
+ "print(\"Capacitance = %.3f micro Farad.\\nAs this is not a standard value will select 10 micro farad\"%(math.floor(C1*1000)/1000))\n",
+ "#Answer is slightly different than in book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Capacitance = 7.957 micro Farad.\n",
+ "As this is not a standard value will select 10 micro farad\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.2, Page No. 311"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# amplifier gain\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "f=20.0 # frequency in hertz\n",
+ "Avm=100.0 # mid voltage gain\n",
+ "fl=40.0 # lower cut off frequency in hertz\n",
+ "fh=16.0 # lower cut off frequency in hertz\n",
+ "\n",
+ "#Calcualtions\n",
+ "Avl= (Avm/(math.sqrt(1+(fl/f)**2))) # gain at lower cut off frequency\n",
+ "Avh= (Avm/(math.sqrt(1+(f/fh)**2))) # gain at upper cut off frequency\n",
+ "\n",
+ "#Result\n",
+ "print(\"gain at lower cut off frequency = %.2f\"%Avl)\n",
+ "print(\"gain at upper cut off frequency = %.2f\"%Avh)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "gain at lower cut off frequency = 44.72\n",
+ "gain at upper cut off frequency = 62.47\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.3, Page No. 312"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# amplifier gain\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "f=40.0 # frequency in hertz\n",
+ "Avm=40.0 # mid voltage gain\n",
+ "fl=40.0 # lower cut off frequency in hertz\n",
+ "\n",
+ "#Calculations\n",
+ "Avl= (Avm/(math.sqrt(1+(fl/f)**2))) # gain at lower cut off frequency\n",
+ "\n",
+ "#Result\n",
+ "print(\"gain at lower cut off frequency = %.2f\"%Avl)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "gain at lower cut off frequency = 28.28\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.4, Page No. 312"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# amplifier gain\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "f=50.0 # frequency in hertz\n",
+ "Avm=150/0.707 # mid voltage gain\n",
+ "fh=20.0 # lower cut off frequency in hertz\n",
+ "\n",
+ "#Calculations\n",
+ "Avh= (Avm/(math.sqrt(1+(f/fh)**2))) # gain at upper cut off frequency\n",
+ "\n",
+ "#Result\n",
+ "print(\"gain at upper cut off frequency = %.2f\"%(math.floor(Avh*100)/100))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "gain at upper cut off frequency = 78.79\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.5, Page No. 312"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# maximum voltage gain\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Avl=100.0 # voltage gain\n",
+ "\n",
+ "#Calculations\n",
+ "Avm=Avl/0.707 # MID VOLTAGE GAIN\n",
+ "\n",
+ "#Result\n",
+ "print(\"maximum voltage gain is %.2f\"%Avm)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "maximum voltage gain is 141.44\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.6, Page No.319"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# series capacitance and transfer function\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "f=100.0 # frequency in hertz\n",
+ "fc=25.0 # corner frequency\n",
+ "rs=2.0 # series resistance in killo ohms\n",
+ "rp=4.0 # PARALLEL resistance in killo ohms\n",
+ "\n",
+ "#Calculations\n",
+ "Cs= (1/(2*math.pi*fc*(rs+rp)*10**3))*10**6 # series capacitance in micro farad\n",
+ "ts= Cs*10**-6*(rs+rp)*10**3 # time constant\n",
+ "Tf= ((rp/(rs+rp))*((2*math.pi*f*ts)/(math.sqrt(1+(2*math.pi*f*ts)**2)))) # transfer function\n",
+ "\n",
+ "#Result\n",
+ "print(\"series capacitance in micro farad = %.2f\"%Cs)\n",
+ "print(\"transfer function is %.3f\"%(math.floor(Tf*1000)/1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "series capacitance in micro farad = 1.06\n",
+ "transfer function is 0.646\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.7, Page No. 321"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# corner frequency and maximum magnitude asymptote\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Cp=2.0 # PARALLEL RESISTANCE IN PICO FARAD\n",
+ "rs=2.0 # series resistance in killo ohms\n",
+ "rp=10.0 # PARALLEL resistance in killo ohms\n",
+ "\n",
+ "#Calculation\n",
+ "tp= ((rs*rp)/(rs+rp)*10**3*Cp*10**-12) # time constant\n",
+ "f= (1/(2*math.pi*tp))*10**-6 # corner frequency in mega hertz\n",
+ "Am= rp/(rp+rs) # maximum amplitude\n",
+ "Amd= 20*(math.log10(Am)) # maximum magnitude aymptote is dB\n",
+ "\n",
+ "#Result\n",
+ "print(\"corner frequency = %.2f MHz\"%(math.floor(f*100)/100))\n",
+ "print(\"maximum magnitude asymptote is %.2f dB\"%Amd)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "corner frequency = 47.74 MHz\n",
+ "maximum magnitude asymptote is -1.58 dB\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.9, Page No. 330"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# 3-db frequency and bandwidth\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Cp=1.0 # PARALLEL capacitance IN PICO FARAD\n",
+ "Cs=2.0 # series capacitance IN micro FARAD\n",
+ "rs=1.0 # series resistance in killo ohms\n",
+ "rp=10.0 # PARALLEL resistance in killo ohms\n",
+ "\n",
+ "#Calculations\n",
+ "ts= ((rs+rp)*10**3*Cp*10**-12) # time constant\n",
+ "tp= ((rs*rp)/(rs+rp)*10**3*Cp*10**-12) # time constant\n",
+ "fl= (1/(2*math.pi*ts))*10**-6 # lower frequency in mega hertz\n",
+ "fl= math.floor(fl*100)/100\n",
+ "fh= round((1/(2*math.pi*tp))*10**-6) # upper frequency in mega hertz\n",
+ "BW=fh-fl # bandwidth in mega hertz\n",
+ "ts= (rs+rp)*10**3*Cp*10**-12 # open circuit time constant\n",
+ "tp= ((rs*rp)/(rs+rp))*10**3*Cp*10**-12 #short time constant\n",
+ "Ts= (rp)/(rs+rp) # midband transfer function\n",
+ "Tsdb= 20*(math.log10(Ts)) # midband transfer function in db\n",
+ "\n",
+ "#Result\n",
+ "print(\"(i) open circuit time constant is %.f * 10^-9\"%(ts*10**9))\n",
+ "print(\"(ii) short circuit time constant is %.f * 10^-12\"%(tp*10**12))\n",
+ "print(\"(iii)lower 3 dB frequency = %.2f MHz\"%fl)\n",
+ "print(\"(iv) upper 3 dB frequency = %f MHz\"%fh)\n",
+ "print(\"(v) Bandwidth = %.2f MHz\"%BW)\n",
+ "print(\"(vi) midband transfer function in db is %.3f\"%Tsdb)\n",
+ "#Short circuit time constant is different in book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) open circuit time constant is 11 * 10^-9\n",
+ "(ii) short circuit time constant is 909 * 10^-12\n",
+ "(iii)lower 3 dB frequency = 14.46 MHz\n",
+ "(iv) upper 3 dB frequency = 175.000000 MHz\n",
+ "(v) Bandwidth = 160.54 MHz\n",
+ "(vi) midband transfer function in db is -0.828\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.10, Page No. 331"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# 3-db frequency and bandwidth\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Cp=1.0 # PARALLEL capacitance IN PICO FARAD\n",
+ "Cs=2.0 # series capacitance IN micro FARAD\n",
+ "rs=1.0 # series resistance in killo ohms\n",
+ "rp=2.0 # PARALLEL resistance in killo ohms\n",
+ "ts= ((rs+rp)*10**3*Cs*10**-6) # time constant\n",
+ "tp= ((rs*rp)/(rs+rp)*Cp*10**-12) # time constant\n",
+ "tp1 = tp\n",
+ "fl= (1/(2*math.pi*ts)) # lower frequency in hertz\n",
+ "tp= math.floor(tp*10**14)/10**14\n",
+ "fh= (1/(2*math.pi*tp)) # upper frequency in hertz\n",
+ "BW=fh-fl # bandwidth in hertz\n",
+ "#ts= ((rs*rp)/(rs+rp))*10**-3*Cs*10**-12 # time constant\n",
+ "\n",
+ "#Result\n",
+ "print(\"Time constant(ts) in second is %.f * 10^-3\"%(ts*1000))\n",
+ "print(\"\\nTime constant(tp) in second is %.3f * 10^-12\"%(tp1*10**12))\n",
+ "print(\"\\nlower 3 dB frequency = %.f Hz\"%fl)\n",
+ "print(\"\\nupper 3 dB frequency = %.2f *10^9 Hz\"%(fh*10**-9))\n",
+ "print(\"\\nbandwidth = %.2f*10^9 Hz\"%(BW*10**-9))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Time constant(ts) in second is 6 * 10^-3\n",
+ "\n",
+ "Time constant(tp) in second is 0.667 * 10^-12\n",
+ "\n",
+ "lower 3 dB frequency = 27 Hz\n",
+ "\n",
+ "upper 3 dB frequency = 241.14 *10^9 Hz\n",
+ "\n",
+ "bandwidth = 241.14*10^9 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 49
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.11, Page No. 336"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# low frequecy response\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Beta=100.0\n",
+ "Rs=1.0 # series resistance in killo ohms\n",
+ "R1=40.0 # resistance in killo ohms\n",
+ "R2=10.0 # resistance in killo ohms\n",
+ "hie=1.1 # in killo ohms\n",
+ "C1=10.0 # capacitance in micro farad\n",
+ "Ce=20.0 # emitter capacitance in micro farad\n",
+ "hic=1100.0 # in ohms\n",
+ "Rl_1=2.0 # resistance in killo ohms\n",
+ "Rl_2=1.8 # load resistance in killo ohms\n",
+ "Rc=4.0 # collector resistance in killo ohms\n",
+ "C2=1.0 # capacitance in micro farad\n",
+ "\n",
+ "\n",
+ "#Calcualtions\n",
+ "x=(R1*R2)/(R1+R2)\n",
+ "Y=(x*hie)/(x+hie)\n",
+ "Rin= math.floor((Y+Rs)*100)/100 \n",
+ "fc=(1/(2*math.pi*Rin*10**3*C1*10**-6)) \n",
+ "Rth=(x*Rs)/(x+Rs)*10**3 \n",
+ "Rx= (Rth+hic)/(Beta) \n",
+ "R= (Rx*Rl_1*10**3)/(Rx+Rl_1*10**3) \n",
+ "R = math.floor(R*100)/100\n",
+ "fc1=(1/(2*math.floor(math.pi*100)*R*Ce*10**-6/100)) \n",
+ "fc2=(1/(2*math.pi*(Rl_2+Rc)*10**3*C2*10**-6)) \n",
+ "\n",
+ "#Result\n",
+ "print(\"CUT OFF FREQUENCY OF INPUT RC NETWORK = %.2f Hz\"%fc)\n",
+ "print(\"CUT OFF FREQUENCY OF BYPASS RC NETWORK = %.2f Hz\"%fc1)\n",
+ "print(\"CUT OFF FREQUENCY OF OUTPUT RC NETWORK = %.2f Hz\"%(math.ceil(fc2*100)/100))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "CUT OFF FREQUENCY OF INPUT RC NETWORK = 8.12 Hz\n",
+ "CUT OFF FREQUENCY OF BYPASS RC NETWORK = 404.36 Hz\n",
+ "CUT OFF FREQUENCY OF OUTPUT RC NETWORK = 27.45 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 60
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.12, Page No.346"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# corner frequency and maximum GAIN\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=10.0 # Colector voltage in volts\n",
+ "Beta= 100.0 \n",
+ "Rc=1.0 # Collector resistance in killo ohms\n",
+ "Rs=600.0 # SERIES RESISTANCE IN OHMS\n",
+ "Re=0.2 # in kilo ohms\n",
+ "R1= 50.0 # in kilo ohms\n",
+ "R2= 10.0 # in kilo ohms\n",
+ "Vbe=0.7 # Base to emitter voltage in volts\n",
+ "C1=1.0 # capacitance in micro farad\n",
+ "\n",
+ "\n",
+ "Vth=Vcc * (R2/(R1+R2)) # VOLTAGE AT BASE\n",
+ "Rth= (R1*R2)/(R1+R2)\n",
+ "Ib=((Vcc-Vbe)/((Rth+(1+Beta)*Re)*10**3))*10**5 # in micro ampere\n",
+ "Icq= Beta*Ib*10**-3 # in milli ampere\n",
+ "Vt=26.0 # volate at room termprature in milli volts\n",
+ "gm= (Icq/Vt)*10**3 # transconductance in milli ampere per volts\n",
+ "rpi= (Beta*Vt*10**-3)/(Icq*10**-3) # resistance\n",
+ "Rb=math.floor(Rth*100)/100 # base resistance in killo ohms\n",
+ "\n",
+ "x=(rpi+(1+Beta)*Re*10**3) \n",
+ "y=(Rs+Rb*10**3) \n",
+ "ts=((x*y)/(x+y))*C1*10**-3 # in milli second\n",
+ "fl= (1/(2*math.pi*ts*10**-3)) # corner frequency in hertz\n",
+ "Ri=(x*Rb*10**-3)/(Rb+x*10**-3) \n",
+ "Av= ((gm*10**-3*rpi*Rc*10**3)*Rb*10**3)/((Ri+Rs*10**-3)*10**3*(x*10**-3+Rb)*10**3) \n",
+ "\n",
+ "#Result\n",
+ "print(rpi)\n",
+ "print(\"corner frequency = %.2f Hz\"%fl)\n",
+ "print(\"maximum gain = %.2f\"%Av)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "797.70609319\n",
+ "corner frequency = 25.40 Hz\n",
+ "maximum gain = 4.33\n"
+ ]
+ }
+ ],
+ "prompt_number": 68
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.13, Page No. 348"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print(\"Theoretical example\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Theoretical example\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.14, Page No. 349"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print(\"Theoretical example\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Theoretical example\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.15, Page No. 349"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print(\"Theoretical example\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Theoretical example\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.16, Page No. 350"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# TIME CONSTANTS , MIDBAND VOLTAGE GAIN AND COERNER FREQUENCIES\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rl=4.0 # load resistance in killo ohms\n",
+ "Rs=250.0 # SERIES RESISTANCE IN OHMS\n",
+ "rpi= 2.0 # resistance IN KILLO OHMS\n",
+ "Re=0.2 # in kilo ohms\n",
+ "C1=2 # capacitance in micro farad\n",
+ "Cl=50.0 # capacitance in pico farad\n",
+ "gm= 6.5 # transconductance in milli ampere per volts\n",
+ "\n",
+ "\n",
+ "#Calcualtions\n",
+ "ts=(Rs*10**-3+rpi)*10**3*C1*10**-3 # open circuit time constant in milli second\n",
+ "tp=Rl*Cl*10**-3 # short circuit time constant in micro second\n",
+ "Av= (((gm*10**-3*rpi*10**3*Rl*10**3))/(Rs*10**-3+rpi)*10**3)*10**-5\n",
+ "fl=(1/(2*math.pi*ts*10**-3)) # lower cut off frequency in hertz\n",
+ "fh=(1/(2*math.pi*tp*10**-6))*10**-6#upper cut off frequency in mega hertz\n",
+ "\n",
+ "#Result\n",
+ "print(\"open circuit time constant = %.1f ms\"%ts)\n",
+ "print(\"short circuit time constant= %.1f micro-sec\"%tp)\n",
+ "print(\"maximum gain = %.2f\"%Av)\n",
+ "print(\"lower cut off frequency = %.2f Hz\"%(math.floor(fl*100)/100))\n",
+ "print(\"upper cut off frequency = %.4f Hz\"%(math.floor(fh*10000)/10000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "open circuit time constant = 4.5 ms\n",
+ "short circuit time constant= 0.2 micro-sec\n",
+ "maximum gain = 231.11\n",
+ "lower cut off frequency = 35.36 Hz\n",
+ "upper cut off frequency = 0.7957 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.17, Page No. 552"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# frequency response\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rg=10.0 # resistance in mega ohms\n",
+ "Vgs=10.0 # gate to soure voltage\n",
+ "Igss=10.0 # current in nano ampere\n",
+ "C1=0.001 # capacitance in micro farad\n",
+ "Rd=1.8 # drain resistance in killo ohms\n",
+ "Rl=18.0 # load resistance in killo ohms\n",
+ "C2=1.0 # Capacitance in micro farad\n",
+ "\n",
+ "#Calculations\n",
+ "x= (Vgs/Igss)*1000.0 # resistance in mega ohms\n",
+ "Rin= ((Rg*x)/(Rg+x)) # input resistance in mega ohms\n",
+ "fc= (1/(2*math.pi*Rin*10**6*C1*10**-6)) # input critical frequency of the RC network\n",
+ "fc1=(1/(2*math.pi*(Rd+Rl)*10**3*C2*10**-6))# output critical frequency of the RC network\n",
+ "\n",
+ "#Result\n",
+ "print(\"input critical frequency of the RC network = %.2f Hz\"%(math.ceil(fc*100)/100))\n",
+ "print(\"input critical frequency of the RC network = %.2f Hz\"%fc1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "input critical frequency of the RC network = 16.08 Hz\n",
+ "input critical frequency of the RC network = 8.04 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.18, Page No. 556"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# frequency\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "rpi=2.0 # resistance in killo ohms\n",
+ "Cpi=1.8 # capacitance in pico farad\n",
+ "Cmu=0.12 # capacitance in pico farad\n",
+ "\n",
+ "#Calculations\n",
+ "fb=(1/(2*math.pi*rpi*10**3*(Cpi+Cmu)*10**-6))# frequency in mega hertz\n",
+ "\n",
+ "#Result\n",
+ "print(\"frequency = %.3f MHz\"%(math.floor(fb*1000)/1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "frequency = 41.446 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.19, Page No.558"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# bandwidth and capacitance\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vt=26.0 # voltage in milli volts\n",
+ "ft=500.0 # frequecy in mega hertz\n",
+ "Ic=1.0 # collector current in mili ampere\n",
+ "Bo=90.0\n",
+ "Cmu=0.2 # capacitance in pico farad\n",
+ "\n",
+ "#Calculations\n",
+ "fb=ft/Bo # frequency in mega hertz\n",
+ "x= ((Ic*10**-3)/(2*math.pi*Vt*10**-3*ft*10**6))*10**12\n",
+ "Cpi= x-Cmu\n",
+ "\n",
+ "#Result\n",
+ "print(\"Bandwidth = %.2f MHz\"%(math.floor(fb*100)/100))\n",
+ "print(\"Capacitance of the transistor = %.3f pF\"%(math.floor(Cpi*1000)/1000))\n",
+ "#Answer for bandwidth is wrong in the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Bandwidth = 5.55 MHz\n",
+ "Capacitance of the transistor = 12.042 pF\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.20, Page No.360"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# corner frequency \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rs=1.0 # series resistance in killo ohms\n",
+ "Rl=3.7 # load resistance in killo ohms\n",
+ "Rc=3.7 # Collector resistance in killo ohms\n",
+ "R1= 200.0 # in kilo ohms\n",
+ "R2= 200.0 # in kilo ohms\n",
+ "Vbe=0.7 # Base to emitter voltage in volts\n",
+ "rpi=2.5 # resistance in killo ohms\n",
+ "Cpi=0.18 # capacitance in pico farad\n",
+ "gm=40.0 # transconductance in milli ampere per volts\n",
+ "C1=4.0 # capacitance in pico farad\n",
+ "\n",
+ "\n",
+ "#Calcualtions\n",
+ "Rb= (R1*R2)/(R1+R2) \n",
+ "y=(Rc*Rl)/(Rc+Rl) \n",
+ "Cmu= Cpi*(1+gm*y) \n",
+ "Cm2=Cmu \n",
+ "z=(Rs*rpi)/(Rs+rpi) \n",
+ "R=(Rb*z)/(Rb+z) \n",
+ "C=Cmu+4 \n",
+ "f3db= (1/(2*math.pi*R*10**3*C))*10**6 # 3-dB frequency in mega hertz\n",
+ "f3db1= (1/(2*math.pi*R*10**3*C1))*10**6 # 3-dB frequency in mega hertz\n",
+ "\n",
+ "#Result\n",
+ "print(\"3-dB frequency due to miller effect = %.3f MHz\"%f3db)\n",
+ "print(\"3-dB frequency = %.1f MHz\"%f3db1)\n",
+ "print(\"\\nDue to miller effect the capacitance gets multiplied by 75,\")\n",
+ "print(\"hence due to miller effect the bandwidth is reduced.\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "3-dB frequency due to miller effect = 12.823 MHz\n",
+ "3-dB frequency = 56.1 MHz\n",
+ "\n",
+ "Due to miller effect the capacitance gets multiplied by 75,\n",
+ "hence due to miller effect the bandwidth is reduced.\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.21, Page No. 367"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# mid band gain and upper 3 db frequency\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Cpi=40.0 # in pico farad\n",
+ "Vt=26.0 # voltage in milli volts\n",
+ "Beta=150.0\n",
+ "Icc=1.0 # current in milli ampere\n",
+ "Icq=1.0 # current in milli ampere\n",
+ "Rc=4.7 # collector resistance in killo ohms\n",
+ "Rl=10.0 # load resistance in killo ohms\n",
+ "Cmu=3.0 # capacitance in pico farad\n",
+ "R1= 50.0 # in kilo ohms\n",
+ "R2= 5.0 # in kilo ohms\n",
+ "rs=1.0 # in killo ohms\n",
+ "\n",
+ "#Calculations\n",
+ "rpi= ((Beta*Vt)/Icc)*10**-3\n",
+ "gm=(Icq/Vt)*10**3 # transconductance in mili ampere per volt\n",
+ "gm = math.floor(gm*100)/100\n",
+ "Rld= (Rc*Rl)/(Rc+Rl) \n",
+ "Rld = math.floor(Rld*1000)/1000\n",
+ "Cm=round(Cmu*(1+gm*Rld)) #miller capacitance in pico farad\n",
+ "Rb= (R1*R2)/(R1+R2)\n",
+ "Rb = math.floor(Rb*1000)/1000\n",
+ "x=(Rb*rs)/(Rb+rs) \n",
+ "y=(rpi*x)/(rpi+x)\n",
+ "y = math.ceil(y*10**4)/10**4\n",
+ "fh=(1/(2*math.pi*y*10**3*(Cm+Cpi)*10**-12)) # 3-db upper cut off frequency in mega hertz\n",
+ "z=(Rb*rpi)/(Rb+rpi) \n",
+ "Avm=(gm*Rld*z)/(z+rs)\n",
+ "\n",
+ "#Result\n",
+ "print(\"3-db upper cut off frequency = %.3f MHz\"%(fh*10**-6))\n",
+ "print(\"Midband Gain = %.2f\"%Avm)\n",
+ "#Value of Fh is wrong in the book\n",
+ "#wrong value of gm is used for Avm calculation"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "3-db upper cut off frequency = 0.570 MHz\n",
+ "Midband Gain = 83.28\n"
+ ]
+ }
+ ],
+ "prompt_number": 64
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.22, Page No.370"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# mid band gain and upper 3 db frequency\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Cpi=40.0 # in pico farad\n",
+ "Vt=26.0 # voltage in milli volts\n",
+ "Beta=150.0\n",
+ "Icq=1.0 # current in milli ampere\n",
+ "rs=1.0 # in killo ohms\n",
+ "re=0.5 # in killo ohms\n",
+ "Rc=4.7 # collector resistance in killo ohms\n",
+ "Rl=10.0 # load resistance in killo ohms\n",
+ "Cmu=3.0 # capacitance in pico farad\n",
+ "R1= 50.0 # in kilo ohms\n",
+ "R2= 5.0 # in kilo ohms\n",
+ "\n",
+ "#Calcualtions\n",
+ "rpi= ((Beta*Vt)/Icq)*10**-3 \n",
+ "gm=(Icq/Vt)*10**3 # transconductance in mili ampere per volt\n",
+ "gm = math.floor(gm*100)/100\n",
+ "g=(rs*re)/(rs+re) \n",
+ "m=rpi/(1+Beta) \n",
+ "m = math.floor(m*10000)/10000\n",
+ "tpi= ((m*g)/(m+g))*10**3*Cpi*10**-12 \n",
+ "tpi = math.floor(tpi*10**14)/10**14\n",
+ "fh1=(1/(2*math.pi*tpi))/10**6 # first 3-db upper cut off frequency in mega hertz\n",
+ "fh1 = (math.floor(fh1*1000)/1000)\n",
+ "Rld= (Rc*Rl)/(Rc+Rl) \n",
+ "Rb= (R1*R2)/(R1+R2)\n",
+ "fh2=(1/(2*math.pi*Cmu*10**-8*Rld*10**3))*10**-2 # second 3-db upper cut off frequency in mega hertz\n",
+ "x=(m*re)/(m+re)\n",
+ "Avm=(gm*Rld*x)/(x+rs) \n",
+ "\n",
+ "#Result\n",
+ "print(\"3-db upper cut off frequency = %.3f MHz\"%fh1)\n",
+ "print(\"second 3-db upper cut off frequency= %.4f MHz\"%fh2)\n",
+ "print(\"Midband Gain = %.4f\"%Avm)\n",
+ "# Value for fh2 and Avm slightly differs from the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "3-db upper cut off frequency = 166.156 MHz\n",
+ "second 3-db upper cut off frequency= 16.5927 MHz\n",
+ "Midband Gain = 2.9446\n"
+ ]
+ }
+ ],
+ "prompt_number": 89
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.23, Page No.375"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# mid band gain and upper 3 db frequency\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Cmu=3.0 # capacitance in pico farad\n",
+ "Cpi=40.0 # in pico farad\n",
+ "Vt=26.0 # voltage in milli volts\n",
+ "Beta=150.0 \n",
+ "Icq=1.0 # current in milli ampere\n",
+ "rs=1.0 # in killo ohms\n",
+ "re=4.7 # in killo ohms\n",
+ "R1= 40.0 # in kilo ohms\n",
+ "R2= 20.0 # in kilo ohms\n",
+ "R3= 27.0 # in kilo ohms\n",
+ "Rc=4.7 # collector resistance in killo ohms\n",
+ "Rl=10.0 # load resistance in killo ohms\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "rpi= ((Beta*Vt)/Icq)*10**-3\n",
+ "gm=(Icq/Vt)*10**3 # transconductance in mili ampere per volt\n",
+ "gm = math.floor(gm*100)/100\n",
+ "Rb=(R2*R3)/(R2+R3)\n",
+ "g=(rs*rpi)/(rs+rpi) \n",
+ "tp1=(((Rb*g)*(Cpi+2*Cmu))/(Rb+g))*10**-9 \n",
+ "m=rpi/(1+Beta) \n",
+ "tp2= m*(Cmu+Cpi)*10**-9 \n",
+ "Rld= (Rc*Rl)/(Rc+Rl) \n",
+ "tp3=Cmu*10**-12*Rld*10**3 \n",
+ "fh1=(1/(2*math.pi*tp1*10**6)) # first 3-db upper cut off frequency in mega hertz\n",
+ "fh2=(1/(2*math.pi*tp2*10**6)) # second 3-db upper cut off frequency in mega hertz\n",
+ "fh3=(1/(2*math.pi*tp3*10**6)) # third 3-db upper cut off frequency in mega hertz\n",
+ "Avm= -gm*Rld*(rpi/(rpi+1)) \n",
+ "\n",
+ "#Result\n",
+ "print(\"3-db upper cut off frequency = %.3f MHz\"%fh1)\n",
+ "print(\"second 3-db upper cut off frequency = %.2f MHz\"%fh2)\n",
+ "print(\"third 3-db upper cut off frequency = %.3f MHz\"%fh3)\n",
+ "print(\"Midband Gain = %.2f\"%Avm)\n",
+ "# Value for fh2 and fh3 slightly differs from the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "3-db upper cut off frequency = 4.648 MHz\n",
+ "second 3-db upper cut off frequency = 143.31 MHz\n",
+ "third 3-db upper cut off frequency = 16.593 MHz\n",
+ "Midband Gain = -97.87\n"
+ ]
+ }
+ ],
+ "prompt_number": 95
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.24, Page No.383"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# corner frequency and bandwidth\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "tr=16.0 # rise time in micro second\n",
+ "V=100.0 # voltage in milli volts\n",
+ "Vd=90.0 # voltage in milli volts\n",
+ "f=5.0 # frequecny in killo hertz\n",
+ "\n",
+ "#Calculations\n",
+ "fh= (0.35/(tr*10**-6))*10**-3 # upper cut off frequency in killo hertz\n",
+ "P= ((V-Vd)/V)*100 \n",
+ "fl=(P*10**3*f)/(100*math.pi) # lower cut off frequency in hertz\n",
+ "BW=(fh*10**3-fl)*10**-3 # bandwith in killo hertz\n",
+ "\n",
+ "#Result\n",
+ "print(\"upper cut off frequency = %.3f kHz\"%fh)\n",
+ "print(\"lower cut off frequency = %.2f Hz\"%fl)\n",
+ "print(\"Bandwidth = %.3f kHz\"%(math.floor(BW*1000)/1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "upper cut off frequency = 21.875 kHz\n",
+ "lower cut off frequency = 159.15 Hz\n",
+ "Bandwidth = 21.715 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 100
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.25, Page No.384"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# PERCENTAGE TILT\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rc=4.0 # RESISTANCE IN KILLO OHMS\n",
+ "Rl=2.0 # RESISTANCE IN KILLO OHMS\n",
+ "C=10.0 # capacitance in micro farad\n",
+ "f=200.0 # frequency in hertz\n",
+ "\n",
+ "#Calculations\n",
+ "R1=Rc+Rl \n",
+ "fl=(1/(2*math.pi*R1*10**3*C*10**-6))# LOWER CUT -OFF FREQUENCY\n",
+ "P = (math.pi*fl*100)/f # % tilt\n",
+ "\n",
+ "#Result\n",
+ "print(\"percentage tilt = %.1f%%\"%(math.floor(P*10)/10))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "percentage tilt = 4.1%\n"
+ ]
+ }
+ ],
+ "prompt_number": 102
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.26, Page No. 385"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# PERCENTAGE TILT\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rc=2.0 # RESISTANCE IN KILLO OHMS\n",
+ "Rl=10.0 # RESISTANCE IN KILLO OHMS\n",
+ "C=10.0 # capacitance in micro farad\n",
+ "f=100.0 # frequency in hertz\n",
+ "p1=0.02\n",
+ "\n",
+ "#Calculations\n",
+ "R1=Rc+Rl\n",
+ "fl=(1/(2*math.pi*R1*10**3*C*10**-6))#LOWER CUT -OFF FREQUENCY\n",
+ "fl= math.floor(fl*100)/100\n",
+ "P= (math.floor(math.pi*100)*fl)/(f*100) \n",
+ "f=(math.floor(math.pi*100)*fl)/(p1*100) \n",
+ "\n",
+ "#Result\n",
+ "print(\"percentage tilt = %.3f%%\"%(P*100))\n",
+ "print(\"Lowest value of f for P= 2%%, will be= %.2f Hz\"%f)\n",
+ "print(\"\\nConclusion:\\nAs the input frequency increases the %% tilt decreases.\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "percentage tilt = 4.145%\n",
+ "Lowest value of f for P= 2%, will be= 207.24 Hz\n",
+ "\n",
+ "Conclusion:\n",
+ "As the input frequency increases the %% tilt decreases.\n"
+ ]
+ }
+ ],
+ "prompt_number": 120
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.27, Page No. 389"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# fh,fl and bandwidth\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "fln=25.0 # in hertz\n",
+ "fhn=16.0 # in kelo hertz\n",
+ "n=3.0\n",
+ "\n",
+ "#Calcualtions\n",
+ "x=math.sqrt(2**(1/n)-1) \n",
+ "fl=x*fln # lower cut off frequency in hertz\n",
+ "fh=fhn/x # upper cut off frequency in hertz\n",
+ "BW=(fh*10**3)-fl # bandwidth\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"lower cut off frequency = %.2f Hz\"%(math.floor(fl*100)/100))\n",
+ "print(\"upper cut off frequency = %.2f kHz\"%fh)\n",
+ "print(\"Bandwidth = %.2f kHz\"%(BW/1000))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "lower cut off frequency = 12.74 Hz\n",
+ "upper cut off frequency = 31.38 kHz\n",
+ "Bandwidth = 31.37 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 123
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.28, Page No. 390"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# bandwidth\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "fl=40.0 # in hertz\n",
+ "fh=20.0 # in kelo hertz\n",
+ "n=4.0\n",
+ "\n",
+ "#Calculations\n",
+ "x=math.sqrt(2**(1/n)-1) \n",
+ "fhn=x*fh # lower cut off frequency in hertz\n",
+ "fln=fl/x # upper cut off frequency in hertz\n",
+ "BW=fhn-fln*10**-3 # bandwidth\n",
+ "\n",
+ "#Result\n",
+ "print(\"lower cut off frequency = %.2f Hz\"%(math.floor(fln*100)/100))\n",
+ "print(\"upper cut off frequency = %.1f kHz\"%fhn)\n",
+ "print(\"Bandwidth = %.1f kHz\"%BW) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "lower cut off frequency = 91.95 Hz\n",
+ "upper cut off frequency = 8.7 kHz\n",
+ "Bandwidth = 8.6 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 128
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.29, Page No. 390"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# cut off frequencies\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "fln = 20 # in Hz\n",
+ "fhn=100.0 # in kelo hertz\n",
+ "n=3.0\n",
+ "\n",
+ "#Calculations\n",
+ "x=math.sqrt(2**(1/n)-1) \n",
+ "fl=fln*x # lower cut off frequency in hertz\n",
+ "fh=fhn/x # upper cut off frequency in hertz\n",
+ "\n",
+ "#Result\n",
+ "print(\"lower cut off frequency = %.2f Hz\"%(math.floor(fl*100)/100))\n",
+ "print(\"upper cut off frequency = %.2f KHz\"%(math.floor(fh*100)/100))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "lower cut off frequency = 10.19 Hz\n",
+ "upper cut off frequency = 196.14 KHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 145
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.30, Page No. 391"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Avm,Fh,Cc\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "mu=70.0 \n",
+ "rd=44.0 # resistance in killo ohms\n",
+ "Rd2=50.0 # resistance in killo ohms\n",
+ "Rg=1.0 # gate resisatnce in mega ohms\n",
+ "Csh=200 # capacitance in pico farad\n",
+ "fl=50.0\n",
+ "\n",
+ "#Calculations\n",
+ "gm= mu/(rd) # transconductane in milli ampere per volt\n",
+ "gm = math.ceil(gm*10)/10\n",
+ "x=(rd*Rd2)/(rd+Rd2) \n",
+ "x = math.floor(x*10)/10\n",
+ "Av2m= gm*x # mid frequency gain of second stage\n",
+ "y= (x*Rg*10**3)/(x+Rg*10**3)\n",
+ "Av1m= -gm*y # mid frequency gain of first stage\n",
+ "Av= Av1m*Av2m # total gain\n",
+ "Req=y\n",
+ "fh=(1/(2*math.pi*Req*10**3*Csh*10**-9)) # upper cut off frequency in killo hertz\n",
+ "Ro1=x\n",
+ "Cc=(1/(2*math.pi*fl*(Ro1*10**3+Rg*10**6)))*10**9 # coupling capacitance in nano farad\n",
+ "\n",
+ "#Result\n",
+ "print(x)\n",
+ "print(\"mid frequency gain of second stage = %.2f\"%Av2m)\n",
+ "print(\"upper cut off frequency = %.2f kHz\"%(math.ceil(fh*100)/100))\n",
+ "print(\"coupling capacitance = %.2f nF\"%Cc)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "23.4\n",
+ "mid frequency gain of second stage = 37.44\n",
+ "upper cut off frequency = 34.81 kHz\n",
+ "coupling capacitance = 3.11 nF\n"
+ ]
+ }
+ ],
+ "prompt_number": 152
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.31, Page No. 392"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# gain\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "gm= 10.0 # transconductane in milli ampere per volt\n",
+ "Csh=20.0 # capacitance in pico farad\n",
+ "BW=10.0 # bandwidth in mega hertz\n",
+ "fhn=10.0 # in mega hertz\n",
+ "n=2.0\n",
+ "\n",
+ "#Calculations\n",
+ "x=math.sqrt(2**(1/n)-1)\n",
+ "fh=fhn/x # lower cut off frequency in mega hertz\n",
+ "R=(1/(2*math.pi*Csh*10**-12*fh*10**6)) # resiatnce in ohms\n",
+ "Av1=-gm*R*10**-3 # mid frequency gain of first stage\n",
+ "Av2=Av1 # mid frequency gain of second stage\n",
+ "Av= Av1*Av2 # total gain\n",
+ "Avdb=20*(math.log10(Av)) # total gain dB\n",
+ "\n",
+ "#Result\n",
+ "print(\"Total gain = %.2f dB\"%(math.floor(Avdb*100)/100))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total gain = 28.37 dB\n"
+ ]
+ }
+ ],
+ "prompt_number": 155
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.32, Page No. 393"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Avm,Fh,Fl\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "n=2.0\n",
+ "C=50.0 # in micro farad\n",
+ "Cc=0.1 # in micro farad\n",
+ "rd=50.0 # resistance\n",
+ "Rs=1.0 # series resistance in killo ohmstance in killo ohms\n",
+ "gm= 2.0 # transconductane in milli ampere per volt\n",
+ "Rd=10.0 # resistance in killo ohms\n",
+ "Csh=10.0 # capacitance in pico farad\n",
+ "\n",
+ "#Calculations\n",
+ "x=(rd*Rd)/(rd+Rd) \n",
+ " \n",
+ "Rg=1.0 # gate resisatnce in mega ohms\n",
+ "y= (x*Rg*10**3)/(x+Rg*10**3) \n",
+ "Avm= -gm*y # mid frequency gain of first stage\n",
+ "Av2m= -gm*y # mid frequency gain of second stage\n",
+ "Avm = math.ceil(Avm*100)/100\n",
+ "Av= Avm*Av2m # total gain\n",
+ "Avdb=20*(math.log10(Av))\n",
+ "Req=y\n",
+ "fh=(1/(2*math.pi*Req*10**3*Csh*10**-6))# upper cut off frequency in mega hertz\n",
+ "Ro1=y\n",
+ "fl=(1/(2*math.pi*Cc*10**-6*Ro1*10**3)) # lower cut off frequency in hertz\n",
+ "x=math.sqrt(2**(1/n)-1)\n",
+ "fhn=x*fh # lower cut off frequency in hertz\n",
+ "fln=fl/x # upper cut off frequency in hertz\n",
+ "\n",
+ "#Result\n",
+ "print(\"Total voltage gain = %.2f dB\"%(math.floor(Avdb*100)/100))\n",
+ "print(\"lower cut off frequency = %.2f Hz\"%fl)\n",
+ "print(\"upper cut off frequency = %.4f MHz\"%fh)\n",
+ "print(\"3dB lower cut off frequency = %.2f Hz\"%fln)\n",
+ "print(\"3dB upper cut off frequency = %.2f MHz\"%fhn)\n",
+ "# Values are slightly different than that of book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total voltage gain = 48.72 dB\n",
+ "lower cut off frequency = 192.58 Hz\n",
+ "upper cut off frequency = 1.9258 MHz\n",
+ "3dB lower cut off frequency = 299.22 Hz\n",
+ "3dB upper cut off frequency = 1.24 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 171
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 5.33, Page No.393"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Avm,Fh,Fl\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "n=3.0\n",
+ "Cc=0.005 # in micro farad\n",
+ "C=100.0 # in pico farad\n",
+ "rd=7.7\n",
+ "Rs=1.0 # series resistance in killo ohmstance in killo ohms\n",
+ "gm= 25.0 # transconductane in milli ampere per volt\n",
+ "Rd=10.0 # resistance in killo ohms\n",
+ "Rg=1.0 # gate resisatnce in mega ohms\n",
+ "Csh=100.0 # capacitance in pico farad\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "x=(rd*Rd)/(rd+Rd) \n",
+ "Av2m= -gm*x # mid frequency gain of second stage\n",
+ "y= (x*Rg*10**3)/(x+Rg*10**3) \n",
+ "Avm= -gm*y # mid frequency gain of first stage\n",
+ "Av= Avm*Avm*Avm # total gain\n",
+ "Avdb=20*(math.log10(-Av)) \n",
+ "Req=y \n",
+ "fh=(1/(2*math.pi*Req*10**3*Csh*10**-9)) # upper cut off frequency in killo hertz\n",
+ "Ro1=y\n",
+ "fl=(1/(2*math.pi*Cc*10**-6*(Ro1*10**3+Rg*10**6))) # lower cut off frequency in hertz\n",
+ "x=math.sqrt(2**(1/n)-1)\n",
+ "fhn=x*fh # lower cut off frequency in hertz\n",
+ "fln=fl/x # upper cut off frequency in hertz\n",
+ "\n",
+ "#Result\n",
+ "print(\"Total voltage gain = %.f dB\"%math.ceil(Avdb))\n",
+ "print(\"lower cut off frequency = %.3f Hz\"%(math.floor(fl*1000)/1000))\n",
+ "print(\"upper cut off frequency = %.2f kHz\"%fh)\n",
+ "print(\"3dB lower cut off frequency = %.3f Hz\"%(math.floor(fln*1000)/1000))\n",
+ "print(\"3dB upper cut off frequency = %.1f kHz\"%fhn)\n",
+ "# Some values are slightly different than that of book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total voltage gain = 123 dB\n",
+ "lower cut off frequency = 31.693 Hz\n",
+ "upper cut off frequency = 367.44 kHz\n",
+ "3dB lower cut off frequency = 62.165 Hz\n",
+ "3dB upper cut off frequency = 187.3 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 180
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_6.ipynb b/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_6.ipynb
new file mode 100755
index 00000000..719faded
--- /dev/null
+++ b/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_6.ipynb
@@ -0,0 +1,1464 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 6 : Feedback"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.1, Page No. 409 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Gain\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "a=60.0 # OPEN LOOP VOLTAGE GAIN IN dB\n",
+ "A= 10**(a/20) # open voltage gain\n",
+ "Beta= (1.0/20) # feedback ratio\n",
+ "\n",
+ "#Calculations\n",
+ "Af= (A/(1+(Beta*A))) # GAIN WITH FEEDBACL\n",
+ "AfdB= 20*(math.log10(Af)) # gain with feedback in dB\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"Gain with feedback is %.2f dB\"%AfdB)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Gain with feedback is 25.85 dB\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.2, Page No.409 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# feedback factor\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "a=60.0 # OPEN LOOP VOLTAGE GAIN IN dB\n",
+ "A= 10**(a/20) # open voltage gain\n",
+ "AfdB=40.0 # gain with feedback in dB\n",
+ "\n",
+ "#Calculations\n",
+ "Af= 10**(AfdB/20) # GAIN WITH FEEDBACK\n",
+ "BetaA= (A/Af)-1 # feedback factor\n",
+ "\n",
+ "#Result\n",
+ "print(\"feedback factor is %.f\"%BetaA)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "feedback factor is 9\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.3, Page No.409 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# feedback output\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "A= 600.0 # open voltage gain\n",
+ "Af=50.0\n",
+ "\n",
+ "#Calculations\n",
+ "Beta=( (A/Af)-1)/A # feedback ratio\n",
+ "fop= (Beta*100) # percentage of output voltage which is fedback to the input is \n",
+ "\n",
+ "#Result\n",
+ "print(\"Percentage of output voltage which is fedback to the input is %.3f%%\"%fop)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Percentage of output voltage which is fedback to the input is 1.833%\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.4, Page No. 410 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# feedback ratio\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vo= 5.0 # output voltage\n",
+ "Vin=0.1 # input voltage without feedback\n",
+ "Vin1=0.2 # input voltage with feedback\n",
+ "\n",
+ "#Calculations\n",
+ "A= Vo/Vin # Gain without feedback\n",
+ "Af= Vo/Vin1 # Gain with feedback\n",
+ "Beta=( (A/Af)-1)/A # feedback ratio \n",
+ "\n",
+ "#Result\n",
+ "print(\"feedback ratio = %.2f\"%Beta)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "feedback ratio = 0.02\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.5, Page No.410 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Change in gain\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "A= 1000.0 # open loop voltage gain\n",
+ "Beta= 0.002 # feedback ratio\n",
+ "\n",
+ "#Calculations\n",
+ "Af= (A/(1+(Beta*A))) # GAIN WITH FEEDBACL\n",
+ "A1= (1-0.15)*A # new open loop voltage gain\n",
+ "Af1= (A1/(1+(Beta*A1))) # GAIN WITH FEEDBACL\n",
+ "dA=((Af-Af1)/Af)*100 # Change in overall gain in percentage \n",
+ "\n",
+ "#Result\n",
+ "print(\"Change in overall gain is %.1f%%\"%dA)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in overall gain is 5.6%\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6, Page No. 414 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# open loop voltage gain\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Af= 100.0 # GAIN WITH FEEDBACK\n",
+ "dAf=1.0/100 # OPEN LOOP VOLTAGE GAIN \n",
+ "dA= 10.0/100 # open voltage gain\n",
+ "\n",
+ "#Calculations\n",
+ "BetaA=(dA/dAf)-1 # feedback factor\n",
+ "A=Af*(1+BetaA) # open loop voltage gain\n",
+ "\n",
+ "#Result\n",
+ "print(\"open loop voltage gain is %.f\"%A)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "open loop voltage gain is 1000\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.7, Page No.415 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# open loop voltage gain & negaive feedback\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Af= 100.0 # GAIN WITH FEEDBACK\n",
+ "dAf=0.1/100 # OPEN LOOP VOLTAGE GAIN \n",
+ "dA= 10.0/100 # open voltage gain\n",
+ "\n",
+ "#Calculations\n",
+ "BetaA=(dA/dAf)-1 # feedback factor\n",
+ "A=Af*(1+BetaA) # open loop voltage gain\n",
+ "NF= Af/A # amount of negative feedback\n",
+ "\n",
+ "#Result\n",
+ "print(\"open loop voltage gain is %.f\"%A)\n",
+ "print(\"amount of negative feedback is %.2f\"%NF)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "open loop voltage gain is 10000\n",
+ "amount of negative feedback is 0.01\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.8, Page No. 416"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# GAIN,INPUT VOLTAGE AND OUTPUT VOLTAGE\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vs=10.0 # output voltage in milli volts\n",
+ "Vi= 0.01 # input voltage in volts\n",
+ "A=200.0 # amplifier gain without feedback\n",
+ "D=0.1 # distortion without feedback\n",
+ "Df=0.01 # distortion with feedback\n",
+ "\n",
+ "#Calculations\n",
+ "Beta=( (D/Df)-1)/A # feedback ratio\n",
+ "fop= (Beta*100) # percentage of output voltage which is fedback to the input is \n",
+ "Af= (A/(1+(Beta*A))) # GAIN WITH FEEDBACL\n",
+ "Vo= Af*Vs*10**-3 # new output volate in volts\n",
+ "Vin= (Vi +(-Beta*Vo))*10**3\n",
+ "\n",
+ "#Resut\n",
+ "print(\"gain with feedback = %.f\"%Af)\n",
+ "print(\"new output volate = %.1f V\"%Vo)\n",
+ "print(\"new input voltage = %.f mV\"%Vin)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "gain with feedback = 20\n",
+ "new output volate = 0.2 V\n",
+ "new input voltage = 1 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.9, Page No.417 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# INPUT VOLTAGE ,distortion AND close loop gain\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vs=10.0 # output voltage in milli volts\n",
+ "A=1000.0 # amplifier gain without feedback\n",
+ "D=0.1 # distortion without feedback\n",
+ "BetaAd=40.0 # FEEDBACK FACTOR IN dB\n",
+ "\n",
+ "#Calculations\n",
+ "BetaA=10**(BetaAd/20) # feedback ratio\n",
+ "Df= ((D/(1+BetaA)))*100 # distortion in percentage with feedbck\n",
+ "Af= (A/(1+(BetaA))) # GAIN WITH FEEDBACL\n",
+ "Vo= Vs*(1+BetaA)*10**-3 # new output volate in volts\n",
+ "\n",
+ "#Result\n",
+ "print(\"input signal voltage = %.2f V\"%Vo)\n",
+ "print(\"Percentage second harmonic distortion will be %.1f%%\"%Df)\n",
+ "print(\"Closed loop voltage gain will be %.1f\"%Af)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "input signal voltage = 1.01 V\n",
+ "Percentage second harmonic distortion will be 0.1%\n",
+ "Closed loop voltage gain will be 9.9\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.10, Page No. 419"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# input & output impedance\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "A= 10000.0 # open voltage gain\n",
+ "Beta=0.02 # feedback ratio\n",
+ "Zi=1.0 # input impedance without feedback in kiilo ohms\n",
+ "Zo=10.0 # output impedance without feedback in kiilo ohms\n",
+ "\n",
+ "\n",
+ "#calculaltions\n",
+ "Zif= (1+A*Beta)*Zi # input impedance with feedback in kiilo ohms\n",
+ "Zof=(Zo/(1+Beta*A))*10**3 # output impedance with feedback in ohms\n",
+ "\n",
+ "#Result\n",
+ "print(\"input impedance with feedback = %.f k-ohm\"%Zif)\n",
+ "print(\"output impedance with feedback = %.2f ohm\"%Zof)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "input impedance with feedback = 201 k-ohm\n",
+ "output impedance with feedback = 49.75 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.11, Page No. 419"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# feedback factor and Change in gain\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Zi=1.0 # input impedance without feedback in kiilo ohms\n",
+ "Zo=10.0 # output impedance without feedback in kiilo ohms\n",
+ "Zof=1.0 # output impedance with feedback in killo ohms\n",
+ "A= 1000.0 # open loop voltage gain\n",
+ "Af=100.0 # FEEDBACK\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "Beta=( (Zo/Zof)-1)/A # feedback ratio\n",
+ "BetaA= Beta*A # feedback factor\n",
+ "A1= (1-0.1)*A # new open loop voltage gain\n",
+ "Af1= (A1/(1+(Beta*A1))) # GAIN WITH FEEDBACL\n",
+ "dA=((Af-Af1)/Af)*100 # Change in overall gain in percentage \n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"feedback factor is %.f\"%BetaA)\n",
+ "print(\"Change in overall gain in percentage is %.1f%%\"%dA)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "feedback factor is 9\n",
+ "Change in overall gain in percentage is 1.1%\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.12, Page No.421 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Avf,Fhf,Flf\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Fh=20.0 # upper cutoff frequency in killo hertz without feedback\n",
+ "Fl=30.0 # upper cutoff frequency in hertz without feedback\n",
+ "Av= 50000.0 # open loop voltage gain\n",
+ "Beta=5*10**-5 # feedback ratio\n",
+ "\n",
+ "#calaculations\n",
+ "Avf= (Av/(1+(Beta*Av))) # GAIN WITH FEEDBACL\n",
+ "Fhf=Fh*(1+Av*Beta) # uppor cutoff frequency with feedback in killo hertz\n",
+ "Flf=Fl/(1+Av*Beta) # lower cutoff frequency with feedback in hertz\n",
+ "\n",
+ "#Result\n",
+ "print(\"Voltsge gain with feedback is %.1f\"%Avf)\n",
+ "print(\"uppor cutoff frequency with feedback = %.f kHz\"%Fhf)\n",
+ "print(\"lower cutoff frequency with feedback = %.2f Hz\"%Flf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Voltsge gain with feedback is 14285.7\n",
+ "uppor cutoff frequency with feedback = 70 kHz\n",
+ "lower cutoff frequency with feedback = 8.57 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.13, Page No. 422"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# feedback factor and bandwidth\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "B=4.0 # bandwidth in mega hertz without feedback\n",
+ "Av= 1500.0 # open loop voltage gain\n",
+ "Avf= 150.0 # GAIN WITH FEEDBACk\n",
+ "\n",
+ "#Calculations\n",
+ "AvB= ((Av/Avf)-1) # feedback factor\n",
+ "BWf=(1+AvB)*B # bandwidth in mega hertz with feedback\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"feedback factor is %.f\"%AvB)\n",
+ "print(\"bandwidth with feedback is %.f MHz\"%BWf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "feedback factor is 9\n",
+ "bandwidth with feedback is 40 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.14, Page No. 424"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# voltage gain ,input & output resistance\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "A= 500.0 # open voltage gain\n",
+ "Beta=0.01 # feedback ratio\n",
+ "Ri=3.0 # input resistance without feedback in kiilo ohms\n",
+ "Ro=20.0 # output resistance without feedback in kiilo ohms\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "Af=(A/(1+A*Beta)) # Voltage gain is\n",
+ "Rif= (1+A*Beta)*Ri # input RESISTANCE with feedback in kiilo ohms\n",
+ "Rof=(Ro/(1+Beta*A))# output resistance with feedback in killo ohms\n",
+ "\n",
+ "#Result\n",
+ "print(\"Voltage gain is %.2f\"%Af)\n",
+ "print(\"input resistance with feedback = %.f k-ohm\"%Rif)\n",
+ "print(\"output resistance with feedback = %.2f k-ohm\"%Rof)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Voltage gain is 83.33\n",
+ "input resistance with feedback = 18 k-ohm\n",
+ "output resistance with feedback = 3.33 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.15, Page No. 428"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# INPUT IMPEDANCE\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Beta=100.0 # gain\n",
+ "Rl=18.6 # load resistance in killo ohms\n",
+ "Re=9.3 # emitter resistance in killo ohms\n",
+ "Vbe=0.7 \n",
+ "Vcc=10.0 # collector voltage in volts\n",
+ "R1=10.0 # resistance in killo ohms\n",
+ "R2=10.0 # resistance in killo ohms\n",
+ "\n",
+ "#Calculations\n",
+ "V2= Vcc*(R2/(R1+R2)) # voltage at resistor R2 \n",
+ "Ve=V2-Vbe # volate at emitter\n",
+ "Ie=Ve/Re # Emitter current in milli ampere\n",
+ "re=(25/Ie) # AC emitter resistance\n",
+ "Re=(Rl*Re)/(Rl+Re) # effective emitter resistance in killo ohms\n",
+ "Zib=Beta*(Re*10**3+re)*10**-3\n",
+ "x=(R1*R2)/(R1+R2) # resistance in killo ohms\n",
+ "Zi=(Zib*x)/(Zib+x) # input impedance of the emitter follower in killo ohms\n",
+ "\n",
+ "#Result\n",
+ "print(\"input impedance of the emitter follower = %.2f k-ohm\"%Zi)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "input impedance of the emitter follower = 4.96 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.16, Page No. 429"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# gain\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "gm=4000.0 # gain in micro second\n",
+ "Ro=10.0 # output resistance in killo ohms\n",
+ "Rd=10.0 # resistance in killo ohms\n",
+ "R1=80.0 # resistance in killo ohms\n",
+ "R2=20.0 # resistance in killo ohms\n",
+ "\n",
+ "#Calculations\n",
+ "Rl=(Ro*Rd)/(Ro+Rd) # load resistance in killo ohms\n",
+ "A= -(gm*10**-6*Rl*10**3) # gain without feedback\n",
+ "Beta= -(R2/(R1+R2)) # feedback factor\n",
+ "Af=(A/(1+A*Beta)) # gain with feedback\n",
+ "\n",
+ "#Result\n",
+ "print(\"gain without feedback is %.f\"%A)\n",
+ "print(\"gain with feedback is %.f\"%Af)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "gain without feedback is -20\n",
+ "gain with feedback is -4\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.17, Page No. 430"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# gain\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "R1=1.8 # resistance in killo ohms\n",
+ "R2=0.2 # resistance in killo ohms\n",
+ "A=100000.0 # gain without feedback\n",
+ "\n",
+ "#Calculations\n",
+ "Beta= (R2/(R1+R2)) # feedback factor\n",
+ "Af1=(A/(1+A*Beta)) # gain with feedback\n",
+ "Af=(1/Beta) # AS A*Beta>>1\n",
+ "\n",
+ "#Result\n",
+ "print(\"gain with feedback AS A*Beta>>1 is %.f\"%Af)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "gain with feedback AS A*Beta>>1 is 10\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.18, Page No. 431"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Av,Rif,Avf,Rof\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rs=600.0 # Internal resistance in ohms\n",
+ "Rl=2.0 # Load resistance in killo ohms'\n",
+ "Rb=40.0 # base resistance in killo ohms\n",
+ "# H-paramters are\n",
+ "hie=5.0 # in killo ohms\n",
+ "hre=80.0\n",
+ "hfe=80.0\n",
+ "\n",
+ "#Calculations\n",
+ "RL1=(Rb*Rl)/(Rb+Rl) \n",
+ "Av=(-(hfe*(RL1*10**3/hie*10**3)))*10**-6\n",
+ "Av = math.floor(Av*100)/100\n",
+ "x=(Rb*10**3/(1-Av)) \n",
+ "Rif= (hie*10**3*x)/(hie*10**3+x)\n",
+ "Avf=(Av*Rif)/(Rif+Rs)\n",
+ "Rof=((Rb*10**3*(Rs+hie*10**3))/(Rs*hfe))*10**-3\n",
+ "Rof1=(Rof*Rl)/(Rof+Rl)\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"Voltage gain is %.2f\"%Av)\n",
+ "print(\"input resistance with feedback = %.3f ohm\"%(math.ceil(Rif*1000)/1000))\n",
+ "print(\"Overall Voltage gain is %.2f\"%Avf)\n",
+ "print(\"output resistance with feedback = %.1f k-ohm\"%Rof1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Voltage gain is -30.48\n",
+ "input resistance with feedback = 1013.172 ohm\n",
+ "Overall Voltage gain is -19.14\n",
+ "output resistance with feedback = 1.4 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.19, Page No. 435"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# A,Beta,Rif,Af amd loop gain\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "R1=1.0 # resistance in killo ohms\n",
+ "R2=20.0 # resistance in killo ohms\n",
+ "Re=100.0 # emitter resistance in ohms\n",
+ "# H-paramters are\n",
+ "hie=2.0 # in killo ohms\n",
+ "hfe=80.0\n",
+ "Rl=1.0 # load resistance in killo ohms\n",
+ "\n",
+ "#Calculations\n",
+ "Ri=hie # input resistance in killo ohms\n",
+ "A= -(hfe*Rl*10**3)/(hie*10**3) \n",
+ "Beta=Re/(Rl*(10**3)) # GAIN\n",
+ "Rif= (hie*10**3+(1+hfe)*Re)*10**-3 # input resistance with feedback in killo ohms\n",
+ "Av=(-(hfe*(Rl*10**3/Rif*10**3)))*10**-6\n",
+ "BetaA= Beta*A # loop gain\n",
+ "BetaAd= 20*(math.log10(-BetaA)) # loop gain in dB\n",
+ "\n",
+ "#Result\n",
+ "print(\"Voltage gain without feedback is %.f\"%A)\n",
+ "print(\"Feedback ratio is given by %.1f\"%Beta)\n",
+ "print(\"input resistance with feedback = %.1f k-ohm\"%Rif)\n",
+ "print(\"Voltage gain with feedback is %.2f\"%Av)\n",
+ "print(\"loop gain is %.2f dB\"%BetaAd)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Voltage gain without feedback is -40\n",
+ "Feedback ratio is given by 0.1\n",
+ "input resistance with feedback = 10.1 k-ohm\n",
+ "Voltage gain with feedback is -7.92\n",
+ "loop gain is 12.04 dB\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.20, Page No. 436 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# voltage gain\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "re=7.5 # A.C. Resistance\n",
+ "R1=470.0 # resistance in ohms\n",
+ "Rc=2.2 # resistance in killo ohms\n",
+ "Re=510.0 # emitter resistance in ohms\n",
+ "# H-paramters are\n",
+ "hie=900.0 # in ohms\n",
+ "hfe=120.0\n",
+ "\n",
+ "#Calculations\n",
+ "A=-(hfe)/(hie+Re) # gain without feedback\n",
+ "Beta=-Re # gain\n",
+ "GF= (1+A*Beta) # gain factor\n",
+ "Af=A/(GF) # GAIN WITH FEEDBACK\n",
+ "Avf= Af*Rc*10**3 # voltage gain with feedback\n",
+ "Av= -(Rc*10**3/re) # voltage gain without feedback\n",
+ "\n",
+ "#Result\n",
+ "print(\"voltage gain with feedback is %.1f\"%Avf)\n",
+ "print(\"voltage gain without feedback is %.1f\"%Av)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "voltage gain with feedback is -4.2\n",
+ "voltage gain without feedback is -293.3\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.21, Page No. 436"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# change in overall gain\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Beta=0.01 # feedback\n",
+ "Ad= 60.0 # gain in dB\n",
+ "dA= 11.0 # open voltage gain\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "A= 10**(Ad/20) # gain\n",
+ "dAf= (1/(1+Beta*A))*dA # GAIN WITH FEEDBACK\n",
+ "\n",
+ "#Result\n",
+ "print(\"change in overall gain is = %.f %%\"%dAf)\n",
+ "print(\"\\nThe result clearly shows that the %% change reduction in overall gain\")\n",
+ "print(\"with negative feedback is reduced from 11%% to 1%%.\")\n",
+ "print(\"That is why we say that amplifier with negative feedback have stable gain.\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "change in overall gain is = 1 %\n",
+ "\n",
+ "The result clearly shows that the %% change reduction in overall gain\n",
+ "with negative feedback is reduced from 11%% to 1%%.\n",
+ "That is why we say that amplifier with negative feedback have stable gain.\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.22, Page No. 437 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# input impedence with feedback\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "A= 1000.0 # open voltage gain\n",
+ "Beta=0.005 # feedback ratio\n",
+ "Zi=2.0 # input impedance without feedback in kiilo ohms\n",
+ "\n",
+ "#Calculations\n",
+ "Zif= (1+A*Beta)*Zi # input impedance with feedback in kiilo ohms\n",
+ "\n",
+ "#Result\n",
+ "print(\"input impedance with feedback = %.f k-ohm\"%Zif)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "input impedance with feedback = 12 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 46
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.23, Page No.437 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# feedback factor and change in overall gain\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Zo=12.6 # output impedance in killo ohms\n",
+ "Zofb=600.0 # output impedance in ohms with feedback\n",
+ "Ad= 60.0 # gain in dB\n",
+ "dA= 10.0 # open voltage gain\n",
+ "\n",
+ "#Calcualtions\n",
+ "A= 10**(Ad/20) # gain\n",
+ "Beta= ((Zo*10**3/Zofb)-1)/A\n",
+ "dAf= (1/(1+Beta*A))*dA # GAIN WITH FEEDBACK\n",
+ "\n",
+ "#Result\n",
+ "print(\"feedbck factor is %.2f\"%Beta)\n",
+ "print(\"change in overall gain = %.3f %%\"%dAf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "feedbck factor is 0.02\n",
+ "change in overall gain = 0.476 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.24, Page No. 437 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# feedback fration ,overall voltage gain and output voltage\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "A=5000.0 # gain wtihout feedback\n",
+ "R1=1.0 # resistance in killo ohms\n",
+ "R2=9.0 # resistance in killo ohms\n",
+ "Vs=2.0 # input voltage without feedback in milli volts\n",
+ "\n",
+ "#Calcualtions\n",
+ "Beta= R1/(R1+R2) # feedback fraction\n",
+ "Afb=round(A/(1+Beta*A))\n",
+ "Vo= round(Afb*Vs) # output voltage with feedback in milli volts\n",
+ "\n",
+ "#Result\n",
+ "print(\"feedback fraction = %.1f\"%Beta)\n",
+ "print(\"overall voltage gain = %.f\"%Afb)\n",
+ "print(\"output voltage with feedback = %.f mV\"%Vo)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "feedback fraction = 0.1\n",
+ "overall voltage gain = 10\n",
+ "output voltage with feedback = 20 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 51
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.25, Page No. 438"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# feedback fraction ,overall voltage gain,input impedance ,output impedance and output volatge\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Zi=5.0 # input impedance in killo ohms\n",
+ "Zo=100.0 # input impedance in ohms\n",
+ "A=10000.0 # gain wtihout feedback\n",
+ "R1=2.0 # resistance in killo ohms\n",
+ "R2=18.0 # resistance in killo ohms\n",
+ "Vs=10.0 # input voltage without feedback in milli volts\n",
+ "\n",
+ "#Calculations\n",
+ "Beta= R1/(R1+R2) # feedback fraction\n",
+ "Afb=round(A/(1+Beta*A)) # overall gain\n",
+ "Zif= round((1+A*Beta)*Zi*10**-3) # input impedance with feedback in mega ohms\n",
+ "Zof= Zo/(1+Beta*A) # OUTPUT impedance with feedback in ohms\n",
+ "Vo= round(Vs/Afb) # output voltage with feedback in milli volts\n",
+ "\n",
+ "#Result\n",
+ "print(\"feedback fraction = %.1f\"%Beta)\n",
+ "print(\"overall voltage gain = %.f\"%Afb)\n",
+ "print(\"input impedance with feedback = %.f M-ohm\"%Zif)\n",
+ "print(\"output impedance with feedback= %.1f ohm\"%Zof)\n",
+ "print(\"output voltage with feedback = %.f mV\"%Vo)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "feedback fraction = 0.1\n",
+ "overall voltage gain = 10\n",
+ "input impedance with feedback = 5 M-ohm\n",
+ "output impedance with feedback= 0.1 ohm\n",
+ "output voltage with feedback = 1 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.26, Page No. 438"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Gain\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "a=60.0 # OPEN LOOP VOLTAGE GAIN IN dB\n",
+ "A= 10**(a/20) # open voltage gain\n",
+ "Beta=0.009 # feedback ratio\n",
+ "\n",
+ "#Calculations\n",
+ "Af= (A/(1+(Beta*A))) # GAIN WITH FEEDBACL\n",
+ "AfdB= 20*(math.log10(Af))# gain with feedback in dB\n",
+ "\n",
+ "#Result\n",
+ "print(\"gain with feedback = %.2f\"%AfdB)\n",
+ "#Answer for the gain with feedback is wrong in the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "gain with feedback = 40.00\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.27, Page No. 439"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# reduction in distortion\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "a=54.8 # OPEN LOOP VOLTAGE GAIN IN dB\n",
+ "A= 10**(a/20) # open voltage gain\n",
+ "Beta=0.02 # feedback ratio\n",
+ "\n",
+ "#Calculations\n",
+ "Af= (A/(1+(Beta*A))) # GAIN WITH FEEDBACL\n",
+ "dA= (1/(1+Beta*A))*100# percentage change in distortion \n",
+ "\n",
+ "#Result\n",
+ "print(\"percentage reduction in distortion is %.2f%%\"%(math.floor(dA*100)/100))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "percentage reduction in distortion is 8.33%\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.28, Page No. 439 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# gain with feedback ,input impedance and output impedance \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Zi=1.0 # input impedance in killo ohms\n",
+ "Zo=40.0 # input impedance in killo ohms\n",
+ "A=10000.0 # gain wtihout feedback\n",
+ "Beta=0.05 # gain\n",
+ "\n",
+ "#Calculations\n",
+ "Afb=(A/(1+Beta*A))\n",
+ "Zif= ((1+A*Beta)*Zi)\n",
+ "Zof= (Zo*10**3/(1+Beta*A))\n",
+ "\n",
+ "#Result\n",
+ "print(\"overall voltage gain = %.f\"%Afb)\n",
+ "print(\"input impedance with feedback = %.f M-ohm\"%Zif)\n",
+ "print(\"output impedance with feedback = %.f ohms\"%Zof)\n",
+ "#Answer in the book for input impedance is wrong"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "overall voltage gain = 20\n",
+ "input impedance with feedback = 501 M-ohm\n",
+ "output impedance with feedback = 80 ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 49
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.29, Page No. 439"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# bandwidth\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "F2=16.0 # upper cutoff frequency in killo hertz without feedback\n",
+ "F1=40.0 # upper cutoff frequency in hertz without feedback\n",
+ "A= 800.0 # open loop voltage gain\n",
+ "Beta=0.02 # feedback ratio\n",
+ "\n",
+ "#CAlaculations\n",
+ "Afb= (A/(1+(Beta*A))) # GAIN WITH FEEDBACk\n",
+ "F2f=F2*(1+A*Beta) # uppor cutoff frequency with feedback in killo hertz\n",
+ "F1f=F1/(1+A*Beta)*10**-3 # lower cutoff frequency with feedback in killo hertz\n",
+ "Bw=F2-F1*10**-3 # bandwidth without feedback in killo hertz\n",
+ "Bwf=round(F2f-F1f) # bandwidth with feedback in killo hertz\n",
+ "\n",
+ "#Result\n",
+ "print(\"bandwidth without feedback = %.2f kHz\"%Bw)\n",
+ "print(\"bandwidth with feedback = %.f\"%Bwf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "bandwidth without feedback = 15.96 kHz\n",
+ "bandwidth with feedback = 272\n"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.30, Page No. 440"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# bandwidth\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "BW=10.0 # bandwidth without feedback in killo hertz\n",
+ "A= 100.0 # open loop voltage gain\n",
+ "Beta=0.1 # feedback ratio\n",
+ "\n",
+ "#Calculations\n",
+ "Afb= (A/(1+(Beta*A))) # GAIN WITH FEEDBACk\n",
+ "Bwf=round(BW*(1+Beta*A))# bandwidth with feedback in killo hertz\n",
+ "\n",
+ "#Result\n",
+ "print(\"feedback gain = %.2f\"%Afb)\n",
+ "print(\"bandwidth with feedback = %.f kHz\"%Bwf)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "feedback gain = 9.09\n",
+ "bandwidth with feedback = 110 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 51
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.31, Page No. 440 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# gain and harmonic distortion\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "A2= 200.0 # open loop voltage gain\n",
+ "Beta=0.1 # feedback ratio\n",
+ "D2=0.02 # first stage distortion\n",
+ "\n",
+ "#Calculations\n",
+ "D2d= (D2/(1+Beta*A2))*100\n",
+ "A2d=A2/(1+Beta*A2)\n",
+ "A1=round(A2/A2d)\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print(\"second stage harmonic distortion , A2' %.2f%%\"%(D2d*100))\n",
+ "print(\"gain of first stage, A1 = %.f\"%A1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "second stage harmonic distortion , A2' 9.52%\n",
+ "gain of first stage, A1 = 21\n"
+ ]
+ }
+ ],
+ "prompt_number": 55
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.32, Page No.453 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# pole frequency \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "R2=2*10**5 # effective resistance in ohms\n",
+ "Av2=1000.0 # gain of second stage\n",
+ "Cf=20.0 # feedback capacitor in pico farad\n",
+ "\n",
+ "#Calculations\n",
+ "Cm=(1+Av2)*Cf \n",
+ "fp1= 1/(2*math.pi*R2*Cm*10**-12)\n",
+ "\n",
+ "#Result\n",
+ "print(\"pole frequency = %.2f Hz\"%fp1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "pole frequency = 39.75 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 57
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_6_1.ipynb b/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_6_1.ipynb
new file mode 100755
index 00000000..719faded
--- /dev/null
+++ b/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_6_1.ipynb
@@ -0,0 +1,1464 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 6 : Feedback"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.1, Page No. 409 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Gain\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "a=60.0 # OPEN LOOP VOLTAGE GAIN IN dB\n",
+ "A= 10**(a/20) # open voltage gain\n",
+ "Beta= (1.0/20) # feedback ratio\n",
+ "\n",
+ "#Calculations\n",
+ "Af= (A/(1+(Beta*A))) # GAIN WITH FEEDBACL\n",
+ "AfdB= 20*(math.log10(Af)) # gain with feedback in dB\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"Gain with feedback is %.2f dB\"%AfdB)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Gain with feedback is 25.85 dB\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.2, Page No.409 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# feedback factor\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "a=60.0 # OPEN LOOP VOLTAGE GAIN IN dB\n",
+ "A= 10**(a/20) # open voltage gain\n",
+ "AfdB=40.0 # gain with feedback in dB\n",
+ "\n",
+ "#Calculations\n",
+ "Af= 10**(AfdB/20) # GAIN WITH FEEDBACK\n",
+ "BetaA= (A/Af)-1 # feedback factor\n",
+ "\n",
+ "#Result\n",
+ "print(\"feedback factor is %.f\"%BetaA)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "feedback factor is 9\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.3, Page No.409 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# feedback output\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "A= 600.0 # open voltage gain\n",
+ "Af=50.0\n",
+ "\n",
+ "#Calculations\n",
+ "Beta=( (A/Af)-1)/A # feedback ratio\n",
+ "fop= (Beta*100) # percentage of output voltage which is fedback to the input is \n",
+ "\n",
+ "#Result\n",
+ "print(\"Percentage of output voltage which is fedback to the input is %.3f%%\"%fop)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Percentage of output voltage which is fedback to the input is 1.833%\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.4, Page No. 410 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# feedback ratio\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vo= 5.0 # output voltage\n",
+ "Vin=0.1 # input voltage without feedback\n",
+ "Vin1=0.2 # input voltage with feedback\n",
+ "\n",
+ "#Calculations\n",
+ "A= Vo/Vin # Gain without feedback\n",
+ "Af= Vo/Vin1 # Gain with feedback\n",
+ "Beta=( (A/Af)-1)/A # feedback ratio \n",
+ "\n",
+ "#Result\n",
+ "print(\"feedback ratio = %.2f\"%Beta)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "feedback ratio = 0.02\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.5, Page No.410 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Change in gain\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "A= 1000.0 # open loop voltage gain\n",
+ "Beta= 0.002 # feedback ratio\n",
+ "\n",
+ "#Calculations\n",
+ "Af= (A/(1+(Beta*A))) # GAIN WITH FEEDBACL\n",
+ "A1= (1-0.15)*A # new open loop voltage gain\n",
+ "Af1= (A1/(1+(Beta*A1))) # GAIN WITH FEEDBACL\n",
+ "dA=((Af-Af1)/Af)*100 # Change in overall gain in percentage \n",
+ "\n",
+ "#Result\n",
+ "print(\"Change in overall gain is %.1f%%\"%dA)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in overall gain is 5.6%\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6, Page No. 414 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# open loop voltage gain\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Af= 100.0 # GAIN WITH FEEDBACK\n",
+ "dAf=1.0/100 # OPEN LOOP VOLTAGE GAIN \n",
+ "dA= 10.0/100 # open voltage gain\n",
+ "\n",
+ "#Calculations\n",
+ "BetaA=(dA/dAf)-1 # feedback factor\n",
+ "A=Af*(1+BetaA) # open loop voltage gain\n",
+ "\n",
+ "#Result\n",
+ "print(\"open loop voltage gain is %.f\"%A)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "open loop voltage gain is 1000\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.7, Page No.415 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# open loop voltage gain & negaive feedback\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Af= 100.0 # GAIN WITH FEEDBACK\n",
+ "dAf=0.1/100 # OPEN LOOP VOLTAGE GAIN \n",
+ "dA= 10.0/100 # open voltage gain\n",
+ "\n",
+ "#Calculations\n",
+ "BetaA=(dA/dAf)-1 # feedback factor\n",
+ "A=Af*(1+BetaA) # open loop voltage gain\n",
+ "NF= Af/A # amount of negative feedback\n",
+ "\n",
+ "#Result\n",
+ "print(\"open loop voltage gain is %.f\"%A)\n",
+ "print(\"amount of negative feedback is %.2f\"%NF)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "open loop voltage gain is 10000\n",
+ "amount of negative feedback is 0.01\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.8, Page No. 416"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# GAIN,INPUT VOLTAGE AND OUTPUT VOLTAGE\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vs=10.0 # output voltage in milli volts\n",
+ "Vi= 0.01 # input voltage in volts\n",
+ "A=200.0 # amplifier gain without feedback\n",
+ "D=0.1 # distortion without feedback\n",
+ "Df=0.01 # distortion with feedback\n",
+ "\n",
+ "#Calculations\n",
+ "Beta=( (D/Df)-1)/A # feedback ratio\n",
+ "fop= (Beta*100) # percentage of output voltage which is fedback to the input is \n",
+ "Af= (A/(1+(Beta*A))) # GAIN WITH FEEDBACL\n",
+ "Vo= Af*Vs*10**-3 # new output volate in volts\n",
+ "Vin= (Vi +(-Beta*Vo))*10**3\n",
+ "\n",
+ "#Resut\n",
+ "print(\"gain with feedback = %.f\"%Af)\n",
+ "print(\"new output volate = %.1f V\"%Vo)\n",
+ "print(\"new input voltage = %.f mV\"%Vin)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "gain with feedback = 20\n",
+ "new output volate = 0.2 V\n",
+ "new input voltage = 1 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.9, Page No.417 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# INPUT VOLTAGE ,distortion AND close loop gain\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vs=10.0 # output voltage in milli volts\n",
+ "A=1000.0 # amplifier gain without feedback\n",
+ "D=0.1 # distortion without feedback\n",
+ "BetaAd=40.0 # FEEDBACK FACTOR IN dB\n",
+ "\n",
+ "#Calculations\n",
+ "BetaA=10**(BetaAd/20) # feedback ratio\n",
+ "Df= ((D/(1+BetaA)))*100 # distortion in percentage with feedbck\n",
+ "Af= (A/(1+(BetaA))) # GAIN WITH FEEDBACL\n",
+ "Vo= Vs*(1+BetaA)*10**-3 # new output volate in volts\n",
+ "\n",
+ "#Result\n",
+ "print(\"input signal voltage = %.2f V\"%Vo)\n",
+ "print(\"Percentage second harmonic distortion will be %.1f%%\"%Df)\n",
+ "print(\"Closed loop voltage gain will be %.1f\"%Af)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "input signal voltage = 1.01 V\n",
+ "Percentage second harmonic distortion will be 0.1%\n",
+ "Closed loop voltage gain will be 9.9\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.10, Page No. 419"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# input & output impedance\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "A= 10000.0 # open voltage gain\n",
+ "Beta=0.02 # feedback ratio\n",
+ "Zi=1.0 # input impedance without feedback in kiilo ohms\n",
+ "Zo=10.0 # output impedance without feedback in kiilo ohms\n",
+ "\n",
+ "\n",
+ "#calculaltions\n",
+ "Zif= (1+A*Beta)*Zi # input impedance with feedback in kiilo ohms\n",
+ "Zof=(Zo/(1+Beta*A))*10**3 # output impedance with feedback in ohms\n",
+ "\n",
+ "#Result\n",
+ "print(\"input impedance with feedback = %.f k-ohm\"%Zif)\n",
+ "print(\"output impedance with feedback = %.2f ohm\"%Zof)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "input impedance with feedback = 201 k-ohm\n",
+ "output impedance with feedback = 49.75 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.11, Page No. 419"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# feedback factor and Change in gain\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Zi=1.0 # input impedance without feedback in kiilo ohms\n",
+ "Zo=10.0 # output impedance without feedback in kiilo ohms\n",
+ "Zof=1.0 # output impedance with feedback in killo ohms\n",
+ "A= 1000.0 # open loop voltage gain\n",
+ "Af=100.0 # FEEDBACK\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "Beta=( (Zo/Zof)-1)/A # feedback ratio\n",
+ "BetaA= Beta*A # feedback factor\n",
+ "A1= (1-0.1)*A # new open loop voltage gain\n",
+ "Af1= (A1/(1+(Beta*A1))) # GAIN WITH FEEDBACL\n",
+ "dA=((Af-Af1)/Af)*100 # Change in overall gain in percentage \n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"feedback factor is %.f\"%BetaA)\n",
+ "print(\"Change in overall gain in percentage is %.1f%%\"%dA)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "feedback factor is 9\n",
+ "Change in overall gain in percentage is 1.1%\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.12, Page No.421 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Avf,Fhf,Flf\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Fh=20.0 # upper cutoff frequency in killo hertz without feedback\n",
+ "Fl=30.0 # upper cutoff frequency in hertz without feedback\n",
+ "Av= 50000.0 # open loop voltage gain\n",
+ "Beta=5*10**-5 # feedback ratio\n",
+ "\n",
+ "#calaculations\n",
+ "Avf= (Av/(1+(Beta*Av))) # GAIN WITH FEEDBACL\n",
+ "Fhf=Fh*(1+Av*Beta) # uppor cutoff frequency with feedback in killo hertz\n",
+ "Flf=Fl/(1+Av*Beta) # lower cutoff frequency with feedback in hertz\n",
+ "\n",
+ "#Result\n",
+ "print(\"Voltsge gain with feedback is %.1f\"%Avf)\n",
+ "print(\"uppor cutoff frequency with feedback = %.f kHz\"%Fhf)\n",
+ "print(\"lower cutoff frequency with feedback = %.2f Hz\"%Flf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Voltsge gain with feedback is 14285.7\n",
+ "uppor cutoff frequency with feedback = 70 kHz\n",
+ "lower cutoff frequency with feedback = 8.57 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.13, Page No. 422"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# feedback factor and bandwidth\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "B=4.0 # bandwidth in mega hertz without feedback\n",
+ "Av= 1500.0 # open loop voltage gain\n",
+ "Avf= 150.0 # GAIN WITH FEEDBACk\n",
+ "\n",
+ "#Calculations\n",
+ "AvB= ((Av/Avf)-1) # feedback factor\n",
+ "BWf=(1+AvB)*B # bandwidth in mega hertz with feedback\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"feedback factor is %.f\"%AvB)\n",
+ "print(\"bandwidth with feedback is %.f MHz\"%BWf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "feedback factor is 9\n",
+ "bandwidth with feedback is 40 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.14, Page No. 424"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# voltage gain ,input & output resistance\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "A= 500.0 # open voltage gain\n",
+ "Beta=0.01 # feedback ratio\n",
+ "Ri=3.0 # input resistance without feedback in kiilo ohms\n",
+ "Ro=20.0 # output resistance without feedback in kiilo ohms\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "Af=(A/(1+A*Beta)) # Voltage gain is\n",
+ "Rif= (1+A*Beta)*Ri # input RESISTANCE with feedback in kiilo ohms\n",
+ "Rof=(Ro/(1+Beta*A))# output resistance with feedback in killo ohms\n",
+ "\n",
+ "#Result\n",
+ "print(\"Voltage gain is %.2f\"%Af)\n",
+ "print(\"input resistance with feedback = %.f k-ohm\"%Rif)\n",
+ "print(\"output resistance with feedback = %.2f k-ohm\"%Rof)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Voltage gain is 83.33\n",
+ "input resistance with feedback = 18 k-ohm\n",
+ "output resistance with feedback = 3.33 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.15, Page No. 428"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# INPUT IMPEDANCE\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Beta=100.0 # gain\n",
+ "Rl=18.6 # load resistance in killo ohms\n",
+ "Re=9.3 # emitter resistance in killo ohms\n",
+ "Vbe=0.7 \n",
+ "Vcc=10.0 # collector voltage in volts\n",
+ "R1=10.0 # resistance in killo ohms\n",
+ "R2=10.0 # resistance in killo ohms\n",
+ "\n",
+ "#Calculations\n",
+ "V2= Vcc*(R2/(R1+R2)) # voltage at resistor R2 \n",
+ "Ve=V2-Vbe # volate at emitter\n",
+ "Ie=Ve/Re # Emitter current in milli ampere\n",
+ "re=(25/Ie) # AC emitter resistance\n",
+ "Re=(Rl*Re)/(Rl+Re) # effective emitter resistance in killo ohms\n",
+ "Zib=Beta*(Re*10**3+re)*10**-3\n",
+ "x=(R1*R2)/(R1+R2) # resistance in killo ohms\n",
+ "Zi=(Zib*x)/(Zib+x) # input impedance of the emitter follower in killo ohms\n",
+ "\n",
+ "#Result\n",
+ "print(\"input impedance of the emitter follower = %.2f k-ohm\"%Zi)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "input impedance of the emitter follower = 4.96 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.16, Page No. 429"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# gain\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "gm=4000.0 # gain in micro second\n",
+ "Ro=10.0 # output resistance in killo ohms\n",
+ "Rd=10.0 # resistance in killo ohms\n",
+ "R1=80.0 # resistance in killo ohms\n",
+ "R2=20.0 # resistance in killo ohms\n",
+ "\n",
+ "#Calculations\n",
+ "Rl=(Ro*Rd)/(Ro+Rd) # load resistance in killo ohms\n",
+ "A= -(gm*10**-6*Rl*10**3) # gain without feedback\n",
+ "Beta= -(R2/(R1+R2)) # feedback factor\n",
+ "Af=(A/(1+A*Beta)) # gain with feedback\n",
+ "\n",
+ "#Result\n",
+ "print(\"gain without feedback is %.f\"%A)\n",
+ "print(\"gain with feedback is %.f\"%Af)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "gain without feedback is -20\n",
+ "gain with feedback is -4\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.17, Page No. 430"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# gain\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "R1=1.8 # resistance in killo ohms\n",
+ "R2=0.2 # resistance in killo ohms\n",
+ "A=100000.0 # gain without feedback\n",
+ "\n",
+ "#Calculations\n",
+ "Beta= (R2/(R1+R2)) # feedback factor\n",
+ "Af1=(A/(1+A*Beta)) # gain with feedback\n",
+ "Af=(1/Beta) # AS A*Beta>>1\n",
+ "\n",
+ "#Result\n",
+ "print(\"gain with feedback AS A*Beta>>1 is %.f\"%Af)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "gain with feedback AS A*Beta>>1 is 10\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.18, Page No. 431"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Av,Rif,Avf,Rof\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Rs=600.0 # Internal resistance in ohms\n",
+ "Rl=2.0 # Load resistance in killo ohms'\n",
+ "Rb=40.0 # base resistance in killo ohms\n",
+ "# H-paramters are\n",
+ "hie=5.0 # in killo ohms\n",
+ "hre=80.0\n",
+ "hfe=80.0\n",
+ "\n",
+ "#Calculations\n",
+ "RL1=(Rb*Rl)/(Rb+Rl) \n",
+ "Av=(-(hfe*(RL1*10**3/hie*10**3)))*10**-6\n",
+ "Av = math.floor(Av*100)/100\n",
+ "x=(Rb*10**3/(1-Av)) \n",
+ "Rif= (hie*10**3*x)/(hie*10**3+x)\n",
+ "Avf=(Av*Rif)/(Rif+Rs)\n",
+ "Rof=((Rb*10**3*(Rs+hie*10**3))/(Rs*hfe))*10**-3\n",
+ "Rof1=(Rof*Rl)/(Rof+Rl)\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"Voltage gain is %.2f\"%Av)\n",
+ "print(\"input resistance with feedback = %.3f ohm\"%(math.ceil(Rif*1000)/1000))\n",
+ "print(\"Overall Voltage gain is %.2f\"%Avf)\n",
+ "print(\"output resistance with feedback = %.1f k-ohm\"%Rof1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Voltage gain is -30.48\n",
+ "input resistance with feedback = 1013.172 ohm\n",
+ "Overall Voltage gain is -19.14\n",
+ "output resistance with feedback = 1.4 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.19, Page No. 435"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# A,Beta,Rif,Af amd loop gain\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "R1=1.0 # resistance in killo ohms\n",
+ "R2=20.0 # resistance in killo ohms\n",
+ "Re=100.0 # emitter resistance in ohms\n",
+ "# H-paramters are\n",
+ "hie=2.0 # in killo ohms\n",
+ "hfe=80.0\n",
+ "Rl=1.0 # load resistance in killo ohms\n",
+ "\n",
+ "#Calculations\n",
+ "Ri=hie # input resistance in killo ohms\n",
+ "A= -(hfe*Rl*10**3)/(hie*10**3) \n",
+ "Beta=Re/(Rl*(10**3)) # GAIN\n",
+ "Rif= (hie*10**3+(1+hfe)*Re)*10**-3 # input resistance with feedback in killo ohms\n",
+ "Av=(-(hfe*(Rl*10**3/Rif*10**3)))*10**-6\n",
+ "BetaA= Beta*A # loop gain\n",
+ "BetaAd= 20*(math.log10(-BetaA)) # loop gain in dB\n",
+ "\n",
+ "#Result\n",
+ "print(\"Voltage gain without feedback is %.f\"%A)\n",
+ "print(\"Feedback ratio is given by %.1f\"%Beta)\n",
+ "print(\"input resistance with feedback = %.1f k-ohm\"%Rif)\n",
+ "print(\"Voltage gain with feedback is %.2f\"%Av)\n",
+ "print(\"loop gain is %.2f dB\"%BetaAd)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Voltage gain without feedback is -40\n",
+ "Feedback ratio is given by 0.1\n",
+ "input resistance with feedback = 10.1 k-ohm\n",
+ "Voltage gain with feedback is -7.92\n",
+ "loop gain is 12.04 dB\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.20, Page No. 436 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# voltage gain\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "re=7.5 # A.C. Resistance\n",
+ "R1=470.0 # resistance in ohms\n",
+ "Rc=2.2 # resistance in killo ohms\n",
+ "Re=510.0 # emitter resistance in ohms\n",
+ "# H-paramters are\n",
+ "hie=900.0 # in ohms\n",
+ "hfe=120.0\n",
+ "\n",
+ "#Calculations\n",
+ "A=-(hfe)/(hie+Re) # gain without feedback\n",
+ "Beta=-Re # gain\n",
+ "GF= (1+A*Beta) # gain factor\n",
+ "Af=A/(GF) # GAIN WITH FEEDBACK\n",
+ "Avf= Af*Rc*10**3 # voltage gain with feedback\n",
+ "Av= -(Rc*10**3/re) # voltage gain without feedback\n",
+ "\n",
+ "#Result\n",
+ "print(\"voltage gain with feedback is %.1f\"%Avf)\n",
+ "print(\"voltage gain without feedback is %.1f\"%Av)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "voltage gain with feedback is -4.2\n",
+ "voltage gain without feedback is -293.3\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.21, Page No. 436"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# change in overall gain\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Beta=0.01 # feedback\n",
+ "Ad= 60.0 # gain in dB\n",
+ "dA= 11.0 # open voltage gain\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "A= 10**(Ad/20) # gain\n",
+ "dAf= (1/(1+Beta*A))*dA # GAIN WITH FEEDBACK\n",
+ "\n",
+ "#Result\n",
+ "print(\"change in overall gain is = %.f %%\"%dAf)\n",
+ "print(\"\\nThe result clearly shows that the %% change reduction in overall gain\")\n",
+ "print(\"with negative feedback is reduced from 11%% to 1%%.\")\n",
+ "print(\"That is why we say that amplifier with negative feedback have stable gain.\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "change in overall gain is = 1 %\n",
+ "\n",
+ "The result clearly shows that the %% change reduction in overall gain\n",
+ "with negative feedback is reduced from 11%% to 1%%.\n",
+ "That is why we say that amplifier with negative feedback have stable gain.\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.22, Page No. 437 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# input impedence with feedback\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "A= 1000.0 # open voltage gain\n",
+ "Beta=0.005 # feedback ratio\n",
+ "Zi=2.0 # input impedance without feedback in kiilo ohms\n",
+ "\n",
+ "#Calculations\n",
+ "Zif= (1+A*Beta)*Zi # input impedance with feedback in kiilo ohms\n",
+ "\n",
+ "#Result\n",
+ "print(\"input impedance with feedback = %.f k-ohm\"%Zif)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "input impedance with feedback = 12 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 46
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.23, Page No.437 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# feedback factor and change in overall gain\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Zo=12.6 # output impedance in killo ohms\n",
+ "Zofb=600.0 # output impedance in ohms with feedback\n",
+ "Ad= 60.0 # gain in dB\n",
+ "dA= 10.0 # open voltage gain\n",
+ "\n",
+ "#Calcualtions\n",
+ "A= 10**(Ad/20) # gain\n",
+ "Beta= ((Zo*10**3/Zofb)-1)/A\n",
+ "dAf= (1/(1+Beta*A))*dA # GAIN WITH FEEDBACK\n",
+ "\n",
+ "#Result\n",
+ "print(\"feedbck factor is %.2f\"%Beta)\n",
+ "print(\"change in overall gain = %.3f %%\"%dAf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "feedbck factor is 0.02\n",
+ "change in overall gain = 0.476 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.24, Page No. 437 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# feedback fration ,overall voltage gain and output voltage\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "A=5000.0 # gain wtihout feedback\n",
+ "R1=1.0 # resistance in killo ohms\n",
+ "R2=9.0 # resistance in killo ohms\n",
+ "Vs=2.0 # input voltage without feedback in milli volts\n",
+ "\n",
+ "#Calcualtions\n",
+ "Beta= R1/(R1+R2) # feedback fraction\n",
+ "Afb=round(A/(1+Beta*A))\n",
+ "Vo= round(Afb*Vs) # output voltage with feedback in milli volts\n",
+ "\n",
+ "#Result\n",
+ "print(\"feedback fraction = %.1f\"%Beta)\n",
+ "print(\"overall voltage gain = %.f\"%Afb)\n",
+ "print(\"output voltage with feedback = %.f mV\"%Vo)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "feedback fraction = 0.1\n",
+ "overall voltage gain = 10\n",
+ "output voltage with feedback = 20 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 51
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.25, Page No. 438"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# feedback fraction ,overall voltage gain,input impedance ,output impedance and output volatge\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Zi=5.0 # input impedance in killo ohms\n",
+ "Zo=100.0 # input impedance in ohms\n",
+ "A=10000.0 # gain wtihout feedback\n",
+ "R1=2.0 # resistance in killo ohms\n",
+ "R2=18.0 # resistance in killo ohms\n",
+ "Vs=10.0 # input voltage without feedback in milli volts\n",
+ "\n",
+ "#Calculations\n",
+ "Beta= R1/(R1+R2) # feedback fraction\n",
+ "Afb=round(A/(1+Beta*A)) # overall gain\n",
+ "Zif= round((1+A*Beta)*Zi*10**-3) # input impedance with feedback in mega ohms\n",
+ "Zof= Zo/(1+Beta*A) # OUTPUT impedance with feedback in ohms\n",
+ "Vo= round(Vs/Afb) # output voltage with feedback in milli volts\n",
+ "\n",
+ "#Result\n",
+ "print(\"feedback fraction = %.1f\"%Beta)\n",
+ "print(\"overall voltage gain = %.f\"%Afb)\n",
+ "print(\"input impedance with feedback = %.f M-ohm\"%Zif)\n",
+ "print(\"output impedance with feedback= %.1f ohm\"%Zof)\n",
+ "print(\"output voltage with feedback = %.f mV\"%Vo)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "feedback fraction = 0.1\n",
+ "overall voltage gain = 10\n",
+ "input impedance with feedback = 5 M-ohm\n",
+ "output impedance with feedback= 0.1 ohm\n",
+ "output voltage with feedback = 1 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.26, Page No. 438"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Gain\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "a=60.0 # OPEN LOOP VOLTAGE GAIN IN dB\n",
+ "A= 10**(a/20) # open voltage gain\n",
+ "Beta=0.009 # feedback ratio\n",
+ "\n",
+ "#Calculations\n",
+ "Af= (A/(1+(Beta*A))) # GAIN WITH FEEDBACL\n",
+ "AfdB= 20*(math.log10(Af))# gain with feedback in dB\n",
+ "\n",
+ "#Result\n",
+ "print(\"gain with feedback = %.2f\"%AfdB)\n",
+ "#Answer for the gain with feedback is wrong in the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "gain with feedback = 40.00\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.27, Page No. 439"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# reduction in distortion\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "a=54.8 # OPEN LOOP VOLTAGE GAIN IN dB\n",
+ "A= 10**(a/20) # open voltage gain\n",
+ "Beta=0.02 # feedback ratio\n",
+ "\n",
+ "#Calculations\n",
+ "Af= (A/(1+(Beta*A))) # GAIN WITH FEEDBACL\n",
+ "dA= (1/(1+Beta*A))*100# percentage change in distortion \n",
+ "\n",
+ "#Result\n",
+ "print(\"percentage reduction in distortion is %.2f%%\"%(math.floor(dA*100)/100))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "percentage reduction in distortion is 8.33%\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.28, Page No. 439 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# gain with feedback ,input impedance and output impedance \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Zi=1.0 # input impedance in killo ohms\n",
+ "Zo=40.0 # input impedance in killo ohms\n",
+ "A=10000.0 # gain wtihout feedback\n",
+ "Beta=0.05 # gain\n",
+ "\n",
+ "#Calculations\n",
+ "Afb=(A/(1+Beta*A))\n",
+ "Zif= ((1+A*Beta)*Zi)\n",
+ "Zof= (Zo*10**3/(1+Beta*A))\n",
+ "\n",
+ "#Result\n",
+ "print(\"overall voltage gain = %.f\"%Afb)\n",
+ "print(\"input impedance with feedback = %.f M-ohm\"%Zif)\n",
+ "print(\"output impedance with feedback = %.f ohms\"%Zof)\n",
+ "#Answer in the book for input impedance is wrong"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "overall voltage gain = 20\n",
+ "input impedance with feedback = 501 M-ohm\n",
+ "output impedance with feedback = 80 ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 49
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.29, Page No. 439"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# bandwidth\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "F2=16.0 # upper cutoff frequency in killo hertz without feedback\n",
+ "F1=40.0 # upper cutoff frequency in hertz without feedback\n",
+ "A= 800.0 # open loop voltage gain\n",
+ "Beta=0.02 # feedback ratio\n",
+ "\n",
+ "#CAlaculations\n",
+ "Afb= (A/(1+(Beta*A))) # GAIN WITH FEEDBACk\n",
+ "F2f=F2*(1+A*Beta) # uppor cutoff frequency with feedback in killo hertz\n",
+ "F1f=F1/(1+A*Beta)*10**-3 # lower cutoff frequency with feedback in killo hertz\n",
+ "Bw=F2-F1*10**-3 # bandwidth without feedback in killo hertz\n",
+ "Bwf=round(F2f-F1f) # bandwidth with feedback in killo hertz\n",
+ "\n",
+ "#Result\n",
+ "print(\"bandwidth without feedback = %.2f kHz\"%Bw)\n",
+ "print(\"bandwidth with feedback = %.f\"%Bwf)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "bandwidth without feedback = 15.96 kHz\n",
+ "bandwidth with feedback = 272\n"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.30, Page No. 440"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# bandwidth\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "BW=10.0 # bandwidth without feedback in killo hertz\n",
+ "A= 100.0 # open loop voltage gain\n",
+ "Beta=0.1 # feedback ratio\n",
+ "\n",
+ "#Calculations\n",
+ "Afb= (A/(1+(Beta*A))) # GAIN WITH FEEDBACk\n",
+ "Bwf=round(BW*(1+Beta*A))# bandwidth with feedback in killo hertz\n",
+ "\n",
+ "#Result\n",
+ "print(\"feedback gain = %.2f\"%Afb)\n",
+ "print(\"bandwidth with feedback = %.f kHz\"%Bwf)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "feedback gain = 9.09\n",
+ "bandwidth with feedback = 110 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 51
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.31, Page No. 440 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# gain and harmonic distortion\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "A2= 200.0 # open loop voltage gain\n",
+ "Beta=0.1 # feedback ratio\n",
+ "D2=0.02 # first stage distortion\n",
+ "\n",
+ "#Calculations\n",
+ "D2d= (D2/(1+Beta*A2))*100\n",
+ "A2d=A2/(1+Beta*A2)\n",
+ "A1=round(A2/A2d)\n",
+ "\n",
+ "#Result\n",
+ "\n",
+ "print(\"second stage harmonic distortion , A2' %.2f%%\"%(D2d*100))\n",
+ "print(\"gain of first stage, A1 = %.f\"%A1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "second stage harmonic distortion , A2' 9.52%\n",
+ "gain of first stage, A1 = 21\n"
+ ]
+ }
+ ],
+ "prompt_number": 55
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.32, Page No.453 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# pole frequency \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "R2=2*10**5 # effective resistance in ohms\n",
+ "Av2=1000.0 # gain of second stage\n",
+ "Cf=20.0 # feedback capacitor in pico farad\n",
+ "\n",
+ "#Calculations\n",
+ "Cm=(1+Av2)*Cf \n",
+ "fp1= 1/(2*math.pi*R2*Cm*10**-12)\n",
+ "\n",
+ "#Result\n",
+ "print(\"pole frequency = %.2f Hz\"%fp1)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "pole frequency = 39.75 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 57
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_7.ipynb b/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_7.ipynb
new file mode 100755
index 00000000..4c2dad4e
--- /dev/null
+++ b/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_7.ipynb
@@ -0,0 +1,1465 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 7: Oscillators"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.1, Page No. 470"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# oscillation frequency \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "c=450.0 # capacitance of tunned circuit in pico farad\n",
+ "L=29.3 # INDUCTANCE of tunned circuit in micro henry\n",
+ "\n",
+ "#Calculations\n",
+ "fo=(1/(2*math.pi*math.sqrt(L*10**-6*c*10**-12)))*10**-6\n",
+ "\n",
+ "#Result\n",
+ "print(\"tunned frequency = %.2f MHz\"%fo)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "tunned frequency = 1.39 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.2, Page No. 470 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# tunned capacitance range of tunned circuit\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "L=100.0 # INDUCTANCE of tunned circuit in micro henry\n",
+ "fo1=500.0 # tunned frequency in killo hertz\n",
+ "fo2=1500.0 # tunned frequency in killo hertz\n",
+ "\n",
+ "#Calculations\n",
+ "C1= (1/(4*math.pi**2*(fo1*10**3)**2*L*10**-6)) # tunned capacitance\n",
+ "C2= (1/(4*math.pi**2*(fo2*10**3)**2*L*10**-6)) # tunned capacitance\n",
+ "\n",
+ "#Result\n",
+ "print(\"tunned capacitance range of tunned circuit in pF is %.1f - %.f\"%(C2*10**12,C1*10**12))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "tunned capacitance range of tunned circuit in pF is 112.6 - 1013\n"
+ ]
+ }
+ ],
+ "prompt_number": 47
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.3, Page No. 470"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# TRANSFORMER WINDING RATIO\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=12.0 # collector vltage\n",
+ "Po=88.0 # power output in milli watt\n",
+ "Ploss=8.0 # power losses in milli watt\n",
+ "gm=10.0 # transconductance in milli ampere per volt\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "Pi= Po+Ploss # input power in milli watt\n",
+ "Ic= Pi/Vcc # collector current in milli ampere\n",
+ "Vb= Ic/(gm) # base VOLTAGE \n",
+ "TR=Vcc/Vb # transfomer turn ratio\n",
+ "\n",
+ "#Result\n",
+ "print(\"transformer winding turn-ratio is %.f\"%TR)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "transformer winding turn-ratio is 15\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.4, Page No. 478"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# oscillation frequency \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "C1=0.005 # capacitance of tunned circuit in micro farad\n",
+ "C2=0.01 # capacitance of tunned circuit in micro farad\n",
+ "L=100.0 # INDUCTANCE of tunned circuit in micro henry\n",
+ "\n",
+ "#Calculations\n",
+ "C=(C1*C2)/(C1+C2) # total capacitance in micro farad\n",
+ "C = math.floor(C*10**4)/10**4\n",
+ "fo=(1/(2*math.pi*math.sqrt(L*10**-6*C*10**-6))) # tunned frequency in killo hertz\n",
+ "\n",
+ "#Result\n",
+ "print C\n",
+ "print(\"tunned frequency = %.2f kHz\"%(fo*10**-3))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "0.0033\n",
+ "tunned frequency = 277.05 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.5, Page No. 478"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# oscillation frequency \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "C1=500.0 # capacitance of tunned circuit in PICO farad\n",
+ "C2=500.0 # capacitance of tunned circuit in pico farad\n",
+ "L=1.0 #INDUCTANCE of tunned circuit in milli henry\n",
+ "\n",
+ "#Calculations\n",
+ "C=(C1*C2)/(C1+C2) # total capacitance in micro farad\n",
+ "fo=(1/(2*math.pi*math.sqrt(L*10**-3*C*10**-12)))*10**-3 #tunned frequency in killo hertz\n",
+ "\n",
+ "#Result\n",
+ "print(\"tunned frequency = %.1f kHz\"%fo)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "tunned frequency = 318.3 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.6, Page No. 478"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# tunned capacitance and inductance of tunned circuit\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "fo=500.0 # tunned frequency in killo hertz\n",
+ "L3=1.0 # assume inductance \n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "LC= (1/(4*math.pi**2*(fo*10**-3)**2)) \n",
+ "C=LC/(L3*10**-3) # capacitance in pico farad\n",
+ "C1= 2*C \n",
+ "C2=C1\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"inductance = %.f mH\"%L3)\n",
+ "print(\"tunned capacitance C1 of tunned circuit = %.1f pF\"%C1)\n",
+ "print(\"tunned capacitance C2 of tunned circuit = %.1f pF\"%C2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "inductance = 1 mH\n",
+ "tunned capacitance C1 of tunned circuit = 202.6 pF\n",
+ "tunned capacitance C2 of tunned circuit = 202.6 pF\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.8, Page No.484"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# tunned capacitance of tunned circuit\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "fo1=50.0 # tunned frequency in killo hertz\n",
+ "L1=100.0 # inductance in micro henry\n",
+ "L2=100.0 # inductance in micro henry\n",
+ "\n",
+ "#Calculations\n",
+ "C= (1/(4*math.pi**2*(fo1*10**-6)**2*(L1+L2)*10**-6))*10**-12\n",
+ "\n",
+ "#Result\n",
+ "print(\"tunned capacitance tunned circuit = %.5f micro-F\"%C)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "tunned capacitance tunned circuit = 0.05066 micro-F\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.9, Page No. 485 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# oscillation frequency \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "C=0.2 # capacitance of tunned circuit in MICRO farad\n",
+ "L1=0.5 # INDUCTANCE of tunned circuit in milli henry\n",
+ "L2=1.0 # INDUCTANCE of tunned circuit in milli henry\n",
+ "\n",
+ "#Calculaions\n",
+ "fo=(1/(2*math.pi*math.sqrt((L1+L2)*10**-3*C*10**-6)))\n",
+ "\n",
+ "#Result\n",
+ "print(\"tunned frequency = %.1f kHz\"%fo)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "tunned frequency = 9188.8 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.10, Page No. 485"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# oscillation frequency \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "C=100.0 # capacitance of tunned circuit in pico farad\n",
+ "L1=1.0 # INDUCTANCE of tunned circuit in milli henry\n",
+ "L2=0.1 # INDUCTANCE of tunned circuit in milli henry\n",
+ "M = 0.05 # Mutual INDUCTANCE of tunned circuit in milli henry \n",
+ "\n",
+ "#Calculations\n",
+ "fo=(1/(2*math.pi*math.sqrt((L1+L2+2*M)*10**-3*C*10**-12))) # tunned frequency in killo hertz\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"tunned frequency = %.f kHz\"%(fo/1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "tunned frequency = 459 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.11, Page No.485"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# feedback ratio\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Af=40.0 # gain wtih feedback\n",
+ "Vi=2.4 # input voltage\n",
+ "Vif=0.1 # input voltage with feedback\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "A= Af*(Vi/Vif) # gain without feedback\n",
+ "Beta= (1-(A/Af))/A # feedback ratio\n",
+ "\n",
+ "#Result\n",
+ "print(\"feedback ratio = %.3f\"%Beta)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "feedback ratio = -0.024\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.12, Page No.488"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# resonant frequency\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Cs=0.08 # capacitance of tunned circuit in pico farad\n",
+ "Ls=0.8 # series INDUCTANCE of tunned circuit in henry\n",
+ "Cp=1.0 # parallel capacitance in pico farad\n",
+ "Rs=5.0 # SERIES RESISTANCE IN KILLO OHMS\n",
+ "\n",
+ "#Calculations\n",
+ "fs=round((1/(2*math.pi*math.sqrt(Ls*Cs*10**-12)))*10**-3) # series tunned frequency in killo hertz\n",
+ "fp=round(((1/(2*math.pi))*math.sqrt((1+Cs/Cp)/(Ls*Cs*10**-12)))*10**-3) # parralel tunned frequency in killo hertz\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"series tunned frequency = %.f kHz\"%fs)\n",
+ "print(\"parallel tunned frequency = %.f kHz\"%fp)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "series tunned frequency = 629 kHz\n",
+ "parallel tunned frequency = 654 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.13, Page No. 488"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# quality factor\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "f=450.0 # resonant frequency in killo hertz\n",
+ "L=4.2 # inductnace in henry\n",
+ "R=600.0 # resistance in ohms\n",
+ "\n",
+ "#Calculations\n",
+ "Q= (2*math.pi*f*10**3*L)/R\n",
+ "\n",
+ "#Result\n",
+ "print(\"quality factor is %.f\"%Q)\n",
+ "#Answer in the book is slightly different"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "quality factor is 19792\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.14, Page No.489"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# resonant frequency\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Cs=0.01 # capacitance of tunned circuit in pico farad\n",
+ "Ls=0.8 # series INDUCTANCE of tunned circuit in henry\n",
+ "Cp=20.0 # parallel capacitance in pico farad\n",
+ "Rs=5.0 # SERIES RESISTANCE IN KILLO OHMS\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "fs=((1/(2*math.pi*math.sqrt(Ls*Cs*10**-12)))*10**-3) # series tunned frequency in killo hertz\n",
+ "fp=(((1/(2*math.pi))*math.sqrt((1+Cs/Cp)/(Ls*Cs*10**-12)))*10**-3)# parralel tunned frequency in killo hertz\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"Series tunned frequency = %.2f kHz\"%(math.floor(fs*100)/100))\n",
+ "print(\"Parallel tunned frequency = %.2f KHz\"%fp)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Series tunned frequency = 1779.40 kHz\n",
+ "Parallel tunned frequency = 1779.85 KHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.15, Page No.489"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# resonant frequency,percentage change and quality factor\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Cs=0.065 # capacitance of tunned circuit in pico farad\n",
+ "Ls=0.33 # series INDUCTANCE of tunned circuit in henry\n",
+ "Cp=1.0 # parallel capacitance in pico farad\n",
+ "Rs=5.5 # SERIES RESISTANCE IN KILLO OHMS\n",
+ "\n",
+ "#Calculation\n",
+ "fs=round((1/(2*math.pi*math.sqrt(Ls*Cs*10**-12)))*10**-3) # series tunned frequency in killo hertz\n",
+ "fp=math.ceil(((1/(2*math.pi))*math.sqrt((1+Cs/Cp)/(Ls*Cs*10**-12)))*10**-3) # parralel tunned frequency in killo hertz\n",
+ "Pc= ((fp-fs)/fs)*100 # percentage by which series resonant frequency exceeds the parallel resonant frequency\n",
+ "Qs= ((2*math.floor(math.pi*100)*fs*10**3*Ls/100)/(Rs*10**3)) # quality factor with series resonant frequency\n",
+ "Qp= ((2*math.floor(math.pi*100)*fp*10**3*Ls/100)/(Rs*10**3)) # quality factor with parallled resonant frequency\n",
+ "\n",
+ "#Result\n",
+ "print(\"series tunned frequency = %.f kHz\"%fs)\n",
+ "print(\"parallel tunned frequency = %.f kHz\"%fp)\n",
+ "print(\"percentage by which series resonant frequency exceeds the parallel resonant frequency = %.1f%%\"%Pc)\n",
+ "print(\"quality factor with series resonant frequency is %.2f\"%Qs)\n",
+ "print(\"quality factor with paralled resonant frequency is %.2f\"%(math.floor(Qp*100)/100))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "series tunned frequency = 1087 kHz\n",
+ "parallel tunned frequency = 1122 kHz\n",
+ "percentage by which series resonant frequency exceeds the parallel resonant frequency = 3.2%\n",
+ "quality factor with series resonant frequency is 409.58\n",
+ "quality factor with paralled resonant frequency is 422.76\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.16, Page No.490"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# oscillation frequency \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "C1=120.0 # capacitance of tunned circuit in PICO farad\n",
+ "C2=1500.0 # capacitance of tunned circuit in pico farad\n",
+ "C3=15.0 # capacitance of tunned circuit in pico farad\n",
+ "L=10.0 # INDUCTANCE of tunned circuit in micro henry\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "Cx=(C1*C2)/(C1+C2) # capacitance in pico farad\n",
+ "Ct=(Cx*C3)/(Cx+C3) # total capacitance in pico farad\n",
+ "fo=(1/(2*math.pi*math.sqrt(L*10**-6*Ct*10**-12)))*10**-6 # tunned frequency in mega hertz\n",
+ "foa= (1/(2*math.pi*math.sqrt(L*10**-6*C3*10**-12)))*10**-6 # actual resonant frequency in mega hertz\n",
+ "\n",
+ "#Result\n",
+ "print(\"tunned frequency = %.2f MHz\"%fo)\n",
+ "print(\"actual resonant frequency = %.2f MHz\"%foa)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "tunned frequency = 13.84 MHz\n",
+ "actual resonant frequency = 12.99 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.17, Page No. 490"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# resonant frequency \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "R=500.0 # resistance in ohms\n",
+ "C1=0.01 # capacitance of tunned circuit in pico farad\n",
+ "C2=10.0 # capacitance of tunned circuit in pico farad\n",
+ "L=0.06 # INDUCTANCE of tunned circuit in henry\n",
+ "\n",
+ "#Calculations\n",
+ "C=(C1*C2)/(C1+C2) # total capacitance in micro farad\n",
+ "fs=((1/(2*math.pi*math.sqrt(L*C1*10**-12)))*10**-6) # series tunned frequency in mega hertz\n",
+ "C=(C1*C2)/(C1+C2) # total capacitance in pico farad\n",
+ "fp=(1/(2*math.pi*math.sqrt(L*C*10**-12))*10**-6) #parralel tunned frequency in mega hertz\n",
+ "\n",
+ "#Result\n",
+ "print(\"series tunned frequency = %.3f MHz\"%fs)\n",
+ "print(\"parallel tunned frequency = %.4f MHz\"%fp)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "series tunned frequency = 6.497 MHz\n",
+ "parallel tunned frequency = 6.5007 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.18, Page No. 491"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# oscillation frequency \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "C=100.0 # capacitance of tunned circuit in pico farad\n",
+ "L1=50.0 # INDUCTANCE of tunned circuit in micro henry\n",
+ "L2=50.0 # INDUCTANCE of tunned circuit in micro henry\n",
+ "\n",
+ "#Calculations\n",
+ "fo=(1/(2*math.pi*math.sqrt((L1+L2)*10**-6*C*10**-12)))*10**-6 # tunned frequency in mega hertz\n",
+ "\n",
+ "#Result\n",
+ "print(\"Tunned frequency = %.2f MHz\"%fo)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Tunned frequency = 1.59 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.19, Page No.491"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# oscillation frequency \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "C1=120.0 # capacitance of tunned circuit in PICO farad\n",
+ "C2=1500.0 # capacitance of tunned circuit in pico farad\n",
+ "L=10.0 # INDUCTANCE of tunned circuit in micro henry\n",
+ "\n",
+ "#Calculation\n",
+ "C=(C1*C2)/(C1+C2) # total capacitance in pico farad\n",
+ "fo=(1/(2*math.pi*math.sqrt(L*10**-6*C*10**-12)))*10**-6 # tunned frequency in mega hertz\n",
+ "\n",
+ "#Result\n",
+ "print(\"tunned frequency = %.2f MHz\"%fo)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "tunned frequency = 4.77 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.20, Page No.491"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# oscillation frequency \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "C1=120.0 # capacitance of tunned circuit in PICO farad\n",
+ "C2=1500.0 # capacitance of tunned circuit in pico farad\n",
+ "C3=15.0 # capacitance of tunned circuit in pico farad\n",
+ "L=10.0 # INDUCTANCE of tunned circuit in micro henry\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "Cx=(C1*C2)/(C1+C2) # capacitance in pico farad\n",
+ "Ct=(Cx*C3)/(Cx+C3) # total capacitance in pico farad\n",
+ "fo=(1/(2*math.pi*math.sqrt(L*10**-6*Ct*10**-12)))*10**-6 # tunned frequency in mega hertz\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"tunned frequency = %.2f MHz\"%fo)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "tunned frequency = 13.84 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.21, Page No.497"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# oscillation frequency \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "C=100.0 # capacitance in pico farad\n",
+ "R=800.0 # resistance in killo ohms\n",
+ "\n",
+ "#Calculations\n",
+ "fo=round(1/(2*math.pi*R*10**3*C*10**-12*math.sqrt(6))) # RESONANT FREQUENCY IN HERTZ\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"Resonant frequency = %.f Hz\"%fo)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resonant frequency = 812 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.22, Page No.498"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# oscillation frequency \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "w=2*10**3 # in radiand per second\n",
+ "\n",
+ "#Calculations\n",
+ "f= round(w/(2*math.pi)) # resonant frequency\n",
+ "X=(((16*10**9*4*w**2*10**3))/((4*w**2*10**3)**2))\n",
+ "\n",
+ "#Result\n",
+ "print(\"resonant frequency = %.f Hz\"%f)\n",
+ "print(\"oscillations are sustained = %.f\"%X)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "resonant frequency = 318 Hz\n",
+ "oscillations are sustained = 1\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.23, Page No. 502"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Design R-C phase shift oscillator\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "fo=1.0 # resonant frequency in killo hertz\n",
+ "Av= 29.0 # voltage gain\n",
+ "Vcc=10.0 # collector voltage\n",
+ "Ib=0.5 # maximum base current in micro ampere\n",
+ "Rf2=180.0 # standard resistance in killo ohms\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "I1=100*Ib # assume current in micro ampere\n",
+ "Vosat= 0.9*Vcc # saturation voltage assume\n",
+ "V1=Vosat/Av # voltage for sustained oscillations\n",
+ "R1=(V1/(I1*10**-6))*10**-3 # RESISTANCE IN KILLO PHMS\n",
+ "Rf1=Av*R1 # resistance in killo ohms\n",
+ "R3=Rf2 \n",
+ "R=R1 \n",
+ "C=(1/(2*math.pi*R*10**3*fo*10**3*math.sqrt(6)))*10**6 \n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"Resistance R1 for the R-C Phase shift oscillator = %.1f k-ohm\"%R)\n",
+ "print(\"Resistance Rf for the R-C Phase shift oscillator = %.f k-ohm\"%R3)\n",
+ "print(\"Capacitance for the R-C Phase shift oscillator = %.2f micro-F\"%C)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resistance R1 for the R-C Phase shift oscillator = 6.2 k-ohm\n",
+ "Resistance Rf for the R-C Phase shift oscillator = 180 k-ohm\n",
+ "Capacitance for the R-C Phase shift oscillator = 0.01 micro-F\n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.24, Page No. 502"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# drain resistance and Design R-C phase shift oscillator\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Mu=55.0\n",
+ "rd=5.5 # resistane in killo ohms\n",
+ "fo=5.0 # resonant frequency in killo hertz\n",
+ "A= 29.0 # voltage gain\n",
+ "R=30.0 # assume Resistance in killo ohms\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "Rd= (29*rd)/(Mu-A) # resistance in killo ohms\n",
+ "RC=((1/(2*math.pi*fo*10**3*math.sqrt(6)))*10**6) \n",
+ "C=(RC*10**-6/(30*10**3)*10**12)\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"drain resistance = %.2f k-ohm\"%Rd)\n",
+ "print(\"R-C time constant = %.f pico-sec\"%(math.ceil(RC)))\n",
+ "print(\"Capacitance for the R-C Phase shift oscillator = %.f pF\"%C)\n",
+ "#Answer for capacitance is wrong in the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "drain resistance = 6.13 k-ohm\n",
+ "R-C time constant = 13 pico-sec\n",
+ "Capacitance for the R-C Phase shift oscillator = 433 pF\n"
+ ]
+ }
+ ],
+ "prompt_number": 48
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.25, Page No.503"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Vf/Vo,frequency of oscillations and minimum gain\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Beta=1.0/29\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "VfVo= (Beta+1)\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"Voltage gain = %f\"%VfVo)\n",
+ "print(\"\\nf=1/(2*%pi*R*C*sqrt(6)) frequency of oscillations\")\n",
+ "print(\"\\nAs gain is more than one oscillations will be sustained\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Voltage gain = 1.034483\n",
+ "\n",
+ "f=1/(2*%pi*R*C*sqrt(6)) frequency of oscillations\n",
+ "\n",
+ "As gain is more than one oscillations will be sustained\n"
+ ]
+ }
+ ],
+ "prompt_number": 49
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.26, Page No. 510"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# design wein bridge oscillator\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=15.0 # collector voltage\n",
+ "f=10.0 # frequency of oscillation in killo hertz\n",
+ "I=1.0 # current in millo ampere\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "Vo=Vcc-1 # maximum output voltage\n",
+ "x=Vo/I # resistance in killo ohms\n",
+ "R4=x/3 # resistance in killo ohms\n",
+ "R3= 2*R4 # resistance in killo ohms\n",
+ "R4_s = 4.7 # Standard value\n",
+ "R3_s = 10 # Standard value \n",
+ "A= (1+(R3_s/R4_s)) # amplifier gain\n",
+ "R=R4_s # resistance in killo ohms\n",
+ "C=(1/(2*math.pi*f*10**3*R*10**3))*10**9\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"Amlifier gain = %.2f\"%(math.floor(A*100)/100))\n",
+ "print(\"resistance R4 = %.1f k-ohm (use 4.7 k-ohm standard value)\"%R)\n",
+ "print(\"resistance R3 = %.1f k-ohm (use 10 k-ohm standard value)\"%(math.ceil(R3*10)/10))\n",
+ "print(\"Capacitance = %.2f nF\"%(math.floor(C*100)/100))\n",
+ "#print(\"this is name as example 7.27 in the book\" )"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Amlifier gain = 3.12\n",
+ "resistance R4 = 4.7 k-ohm (use 4.7 k-ohm standard value)\n",
+ "resistance R3 = 9.4 k-ohm (use 10 k-ohm standard value)\n",
+ "Capacitance = 3.38 nF\n"
+ ]
+ }
+ ],
+ "prompt_number": 70
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.27 Page No.511"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# sustained oscillations and output frequency\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "R4=5.1 # resistance in killo ohms\n",
+ "R3=12.0 # resistance in killo ohms\n",
+ "C=1.0 # capacitance in nano farad\n",
+ "\n",
+ "#Calculations\n",
+ "A= (1+(R3/R4)) # amplifier gain\n",
+ "R=R4 # resistance in killo ohms\n",
+ "fo= (1/(2*math.pi*C*10**-9*R*10**3))*10**-3\n",
+ "\n",
+ "#Result\n",
+ "print(\"Amlifier gain is %.2f. It is greater than 1 so circuit will oscillate.\"%A)\n",
+ "print(\"Oscillation frequency = %.1f kHz\"%fo)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Amlifier gain is 3.35. It is greater than 1 so circuit will oscillate.\n",
+ "Oscillation frequency = 31.2 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 75
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.29, Page No.514"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# design wein bridge oscillator\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=10.0 # collector voltage\n",
+ "f=10.0 # frequency of oscillation in killo hertz\n",
+ "I=500.0 # current in micro ampere\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "Vo=Vcc-1 # maximum output voltage\n",
+ "x=(Vo/I)*10**3 # resistance in killo ohms\n",
+ "R4=x/3 # resistance in killo ohms\n",
+ "Rf= 2*R4 # resistance in killo ohms\n",
+ "R4_s = 5.6 # standard value\n",
+ "R=R4_s # resistance in killo ohms\n",
+ "C=(1/(2*math.pi*f*10**3*R*10**3))*10**12\n",
+ "\n",
+ "#Resulr\n",
+ "print(\"Resistance R = R1 = %.f k-ohm(uswe 5.6k as standard value)\"%R)\n",
+ "print(\"resistance Rf = %.f k-ohm\"%Rf)\n",
+ "print(\"Capacitance = %.f nF(use 2700 nF as standard value)\"%C)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resistance R = R1 = 6 k-ohm(uswe 5.6k as standard value)\n",
+ "resistance Rf = 12 k-ohm\n",
+ "Capacitance = 2842 nF(use 2700 nF as standard value)\n"
+ ]
+ }
+ ],
+ "prompt_number": 85
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.30, Page No.514"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print(\"Theoretical example\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Theoretical example\n"
+ ]
+ }
+ ],
+ "prompt_number": 87
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.31, Page No.515"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print(\"Theoretical example\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.32, Page No. 517"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Design R-C phase shift oscillator\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vce=5.0 # in volts\n",
+ "RE=1.0 # emitter reistsance in killo ohms\n",
+ "Vbe=0.7 # in volts\n",
+ "Ie=1.0 # emitter current in mA\n",
+ "Re=1.0 # EMITTER RESISTANCE IN KILLO OHMS\n",
+ "f=100.0 # oscillaor frequency in killo hertz\n",
+ "hfe=100.0\n",
+ "hie=1.0 # in killo ohms\n",
+ "Vc=5.0 # in volts\n",
+ "Ic=1.0 # current in mili ampere\n",
+ "Vcc=20.0 # in volts\n",
+ "R=10.0 # resistane in killo ohms\n",
+ "\n",
+ "#Calculations\n",
+ "Rc=(Vcc-Vce-Ie*Re)/(Ic) # collector resistance in killo ohms is\n",
+ "k= Rc/R\n",
+ "C= ((1/(2*math.pi*R*10**3*f*10**3*math.sqrt(6+(4*1.4)))))*10**12\n",
+ "R3= R-hie # resistance in kiilo ohms\n",
+ "Vb= (Vbe+Ie*Re) # voltage at base\n",
+ "R2=R \n",
+ "I2=Vb/R2 # in mA\n",
+ "V2=(Vcc-R2*I2) # voltage drop across R2\n",
+ "IR1= (I2+(1.0/100)) # CURRENT ACROOS R1\n",
+ "R1= V2/(IR1) \n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"Emitter resistance = %.f k-ohm\"%Re)\n",
+ "print(\"collector resistance = %.f k-ohm\"%Rc)\n",
+ "print(\"resistance R = %.f k-ohm\"%R)\n",
+ "print(\"Capacitance = %.1f pF\"%C)\n",
+ "print(\"resistance(R3) = %.f k-ohm\"%R3)\n",
+ "print(\"resistance(R2) = %.f k-ohm\"%R2)\n",
+ "print(\"resistance(R1) = %.f k-ohm\"%R1)\n",
+ "#Answer for Resistance (R1) is wrong in the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Emitter resistance = 1 k-ohm\n",
+ "collector resistance = 14 k-ohm\n",
+ "resistance R = 10 k-ohm\n",
+ "Capacitance = 46.7 pF\n",
+ "resistance(R3) = 9 k-ohm\n",
+ "resistance(R2) = 10 k-ohm\n",
+ "resistance(R1) = 102 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 91
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.33, Page No.518"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Design R-C phase shift oscillator\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "rd=40.0 # resistane in killo ohms\n",
+ "fo=1.0 # resonant frequency in killo hertz\n",
+ "gm= 5000.0 # in killo mh\n",
+ "R=10.0 # assume Resistance in killo ohms\n",
+ "Av=29.0 # VOLTAGE GAIN\n",
+ "Vdd=12.0 # drain voltage\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "C=((1/(2*math.pi*fo*10**3*R*10**3*math.sqrt(6)))*10**9)# C in nano farad\n",
+ "Rl= (Av/gm*10**-6)*10**9 # load resistance in killo ohms\n",
+ "Rl = math.ceil(Rl)\n",
+ "Rd= ((Rl*rd)/(rd-Rl)) # drain resistance in killo ohms\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"Drain Resistance = %.2f k-ohm\"%Rd)\n",
+ "print(\"Capacitance for the R-C Phase shift oscillator = %.1f nF\"%C) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Drain Resistance = 7.06 k-ohm\n",
+ "Capacitance for the R-C Phase shift oscillator = 6.5 nF\n"
+ ]
+ }
+ ],
+ "prompt_number": 96
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.34, Page No.518"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# design wein bridge oscillator\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "R=100.0 # ASSUME RESSITANCE IN KILO OHMS\n",
+ "fo1=10.0 # tunned frequency in killo hertz\n",
+ "fo2=100.0 # tunned frequency in hertz\n",
+ "\n",
+ "#Calculations\n",
+ "C1= (1/(2*math.pi*R*10**3*fo1*10**3))*10**9 # tunned capacitance\n",
+ "C2= (1/(2*math.pi*R*10**3*fo2))*10**9 # tunned capacitance\n",
+ "\n",
+ "#Result\n",
+ "print(\"Tunned capacitance C1 range of tunned circuit = %.3f nF\"%C1)\n",
+ "print(\"Tunned capacitance C2 range of tunned circuit = %.1f nF\"%C2)\n",
+ "#Answer slightly different than book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Tunned capacitance C1 range of tunned circuit = 0.159 nF\n",
+ "Tunned capacitance C2 range of tunned circuit = 15.9 nF\n"
+ ]
+ }
+ ],
+ "prompt_number": 105
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.35, Page No. 519 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# resonant frequency and quality factor\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Cs=0.06 # capacitance of tunned circuit in pico farad\n",
+ "Ls=0.5 # series INDUCTANCE of tunned circuit in henry\n",
+ "Cp=1.0 # parallel capacitance in pico farad\n",
+ "Rs=5.0 # SERIES RESISTANCE IN KILLO OHMS\n",
+ "\n",
+ "#Calculations\n",
+ "fs=((1/(2*math.pi*math.sqrt(Ls*Cs*10**-12)))*10**-3) # series tunned frequency in killo hertz\n",
+ "fp=(((1/(2*math.pi))*math.sqrt((1+Cs/Cp)/(Ls*Cs*10**-12)))*10**-3) # parralel tunned frequency in killo hertz\n",
+ "Pc= ((fp-fs)/fs)*100 # percentage by which series resonant frequency exceeds the parallel resonant frequency\n",
+ "Qs= round((2*math.pi*fs*10**3*Ls)/(Rs*10**3)) # quality factor with series resonant frequency\n",
+ "Qp= round((2*math.pi*fp*10**3*Ls)/(Rs*10**3)) # quality factor with parallled resonant frequency\n",
+ "\n",
+ "#Result\n",
+ "print(\"Series tunned frequency = %.1f kHz\"%fs)\n",
+ "print(\"Quality factor with series resonant frequency is %.f\"%Qs)\n",
+ "print(\"\\nParallel tunned frequency = %.f kHz\"%fp)\n",
+ "print(\"Quality factor with paralled resonant frequency is %.f\"%Qp)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Series tunned frequency = 918.9 kHz\n",
+ "Quality factor with series resonant frequency is 577\n",
+ "\n",
+ "Parallel tunned frequency = 946 kHz\n",
+ "Quality factor with paralled resonant frequency is 594\n"
+ ]
+ }
+ ],
+ "prompt_number": 111
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_7_1.ipynb b/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_7_1.ipynb
new file mode 100755
index 00000000..4c2dad4e
--- /dev/null
+++ b/Solid_State_Devices_and_Circuits_by_Sanjay_Sharma/SSDC_Chapter_7_1.ipynb
@@ -0,0 +1,1465 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 7: Oscillators"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.1, Page No. 470"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# oscillation frequency \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "c=450.0 # capacitance of tunned circuit in pico farad\n",
+ "L=29.3 # INDUCTANCE of tunned circuit in micro henry\n",
+ "\n",
+ "#Calculations\n",
+ "fo=(1/(2*math.pi*math.sqrt(L*10**-6*c*10**-12)))*10**-6\n",
+ "\n",
+ "#Result\n",
+ "print(\"tunned frequency = %.2f MHz\"%fo)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "tunned frequency = 1.39 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.2, Page No. 470 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# tunned capacitance range of tunned circuit\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "L=100.0 # INDUCTANCE of tunned circuit in micro henry\n",
+ "fo1=500.0 # tunned frequency in killo hertz\n",
+ "fo2=1500.0 # tunned frequency in killo hertz\n",
+ "\n",
+ "#Calculations\n",
+ "C1= (1/(4*math.pi**2*(fo1*10**3)**2*L*10**-6)) # tunned capacitance\n",
+ "C2= (1/(4*math.pi**2*(fo2*10**3)**2*L*10**-6)) # tunned capacitance\n",
+ "\n",
+ "#Result\n",
+ "print(\"tunned capacitance range of tunned circuit in pF is %.1f - %.f\"%(C2*10**12,C1*10**12))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "tunned capacitance range of tunned circuit in pF is 112.6 - 1013\n"
+ ]
+ }
+ ],
+ "prompt_number": 47
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.3, Page No. 470"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# TRANSFORMER WINDING RATIO\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=12.0 # collector vltage\n",
+ "Po=88.0 # power output in milli watt\n",
+ "Ploss=8.0 # power losses in milli watt\n",
+ "gm=10.0 # transconductance in milli ampere per volt\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "Pi= Po+Ploss # input power in milli watt\n",
+ "Ic= Pi/Vcc # collector current in milli ampere\n",
+ "Vb= Ic/(gm) # base VOLTAGE \n",
+ "TR=Vcc/Vb # transfomer turn ratio\n",
+ "\n",
+ "#Result\n",
+ "print(\"transformer winding turn-ratio is %.f\"%TR)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "transformer winding turn-ratio is 15\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.4, Page No. 478"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# oscillation frequency \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "C1=0.005 # capacitance of tunned circuit in micro farad\n",
+ "C2=0.01 # capacitance of tunned circuit in micro farad\n",
+ "L=100.0 # INDUCTANCE of tunned circuit in micro henry\n",
+ "\n",
+ "#Calculations\n",
+ "C=(C1*C2)/(C1+C2) # total capacitance in micro farad\n",
+ "C = math.floor(C*10**4)/10**4\n",
+ "fo=(1/(2*math.pi*math.sqrt(L*10**-6*C*10**-6))) # tunned frequency in killo hertz\n",
+ "\n",
+ "#Result\n",
+ "print C\n",
+ "print(\"tunned frequency = %.2f kHz\"%(fo*10**-3))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "0.0033\n",
+ "tunned frequency = 277.05 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.5, Page No. 478"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# oscillation frequency \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "C1=500.0 # capacitance of tunned circuit in PICO farad\n",
+ "C2=500.0 # capacitance of tunned circuit in pico farad\n",
+ "L=1.0 #INDUCTANCE of tunned circuit in milli henry\n",
+ "\n",
+ "#Calculations\n",
+ "C=(C1*C2)/(C1+C2) # total capacitance in micro farad\n",
+ "fo=(1/(2*math.pi*math.sqrt(L*10**-3*C*10**-12)))*10**-3 #tunned frequency in killo hertz\n",
+ "\n",
+ "#Result\n",
+ "print(\"tunned frequency = %.1f kHz\"%fo)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "tunned frequency = 318.3 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.6, Page No. 478"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# tunned capacitance and inductance of tunned circuit\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "fo=500.0 # tunned frequency in killo hertz\n",
+ "L3=1.0 # assume inductance \n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "LC= (1/(4*math.pi**2*(fo*10**-3)**2)) \n",
+ "C=LC/(L3*10**-3) # capacitance in pico farad\n",
+ "C1= 2*C \n",
+ "C2=C1\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"inductance = %.f mH\"%L3)\n",
+ "print(\"tunned capacitance C1 of tunned circuit = %.1f pF\"%C1)\n",
+ "print(\"tunned capacitance C2 of tunned circuit = %.1f pF\"%C2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "inductance = 1 mH\n",
+ "tunned capacitance C1 of tunned circuit = 202.6 pF\n",
+ "tunned capacitance C2 of tunned circuit = 202.6 pF\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.8, Page No.484"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# tunned capacitance of tunned circuit\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "fo1=50.0 # tunned frequency in killo hertz\n",
+ "L1=100.0 # inductance in micro henry\n",
+ "L2=100.0 # inductance in micro henry\n",
+ "\n",
+ "#Calculations\n",
+ "C= (1/(4*math.pi**2*(fo1*10**-6)**2*(L1+L2)*10**-6))*10**-12\n",
+ "\n",
+ "#Result\n",
+ "print(\"tunned capacitance tunned circuit = %.5f micro-F\"%C)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "tunned capacitance tunned circuit = 0.05066 micro-F\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.9, Page No. 485 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# oscillation frequency \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "C=0.2 # capacitance of tunned circuit in MICRO farad\n",
+ "L1=0.5 # INDUCTANCE of tunned circuit in milli henry\n",
+ "L2=1.0 # INDUCTANCE of tunned circuit in milli henry\n",
+ "\n",
+ "#Calculaions\n",
+ "fo=(1/(2*math.pi*math.sqrt((L1+L2)*10**-3*C*10**-6)))\n",
+ "\n",
+ "#Result\n",
+ "print(\"tunned frequency = %.1f kHz\"%fo)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "tunned frequency = 9188.8 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.10, Page No. 485"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# oscillation frequency \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "C=100.0 # capacitance of tunned circuit in pico farad\n",
+ "L1=1.0 # INDUCTANCE of tunned circuit in milli henry\n",
+ "L2=0.1 # INDUCTANCE of tunned circuit in milli henry\n",
+ "M = 0.05 # Mutual INDUCTANCE of tunned circuit in milli henry \n",
+ "\n",
+ "#Calculations\n",
+ "fo=(1/(2*math.pi*math.sqrt((L1+L2+2*M)*10**-3*C*10**-12))) # tunned frequency in killo hertz\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"tunned frequency = %.f kHz\"%(fo/1000))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "tunned frequency = 459 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.11, Page No.485"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# feedback ratio\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Af=40.0 # gain wtih feedback\n",
+ "Vi=2.4 # input voltage\n",
+ "Vif=0.1 # input voltage with feedback\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "A= Af*(Vi/Vif) # gain without feedback\n",
+ "Beta= (1-(A/Af))/A # feedback ratio\n",
+ "\n",
+ "#Result\n",
+ "print(\"feedback ratio = %.3f\"%Beta)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "feedback ratio = -0.024\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.12, Page No.488"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# resonant frequency\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Cs=0.08 # capacitance of tunned circuit in pico farad\n",
+ "Ls=0.8 # series INDUCTANCE of tunned circuit in henry\n",
+ "Cp=1.0 # parallel capacitance in pico farad\n",
+ "Rs=5.0 # SERIES RESISTANCE IN KILLO OHMS\n",
+ "\n",
+ "#Calculations\n",
+ "fs=round((1/(2*math.pi*math.sqrt(Ls*Cs*10**-12)))*10**-3) # series tunned frequency in killo hertz\n",
+ "fp=round(((1/(2*math.pi))*math.sqrt((1+Cs/Cp)/(Ls*Cs*10**-12)))*10**-3) # parralel tunned frequency in killo hertz\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"series tunned frequency = %.f kHz\"%fs)\n",
+ "print(\"parallel tunned frequency = %.f kHz\"%fp)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "series tunned frequency = 629 kHz\n",
+ "parallel tunned frequency = 654 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.13, Page No. 488"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# quality factor\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "f=450.0 # resonant frequency in killo hertz\n",
+ "L=4.2 # inductnace in henry\n",
+ "R=600.0 # resistance in ohms\n",
+ "\n",
+ "#Calculations\n",
+ "Q= (2*math.pi*f*10**3*L)/R\n",
+ "\n",
+ "#Result\n",
+ "print(\"quality factor is %.f\"%Q)\n",
+ "#Answer in the book is slightly different"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "quality factor is 19792\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.14, Page No.489"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# resonant frequency\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Cs=0.01 # capacitance of tunned circuit in pico farad\n",
+ "Ls=0.8 # series INDUCTANCE of tunned circuit in henry\n",
+ "Cp=20.0 # parallel capacitance in pico farad\n",
+ "Rs=5.0 # SERIES RESISTANCE IN KILLO OHMS\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "fs=((1/(2*math.pi*math.sqrt(Ls*Cs*10**-12)))*10**-3) # series tunned frequency in killo hertz\n",
+ "fp=(((1/(2*math.pi))*math.sqrt((1+Cs/Cp)/(Ls*Cs*10**-12)))*10**-3)# parralel tunned frequency in killo hertz\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"Series tunned frequency = %.2f kHz\"%(math.floor(fs*100)/100))\n",
+ "print(\"Parallel tunned frequency = %.2f KHz\"%fp)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Series tunned frequency = 1779.40 kHz\n",
+ "Parallel tunned frequency = 1779.85 KHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.15, Page No.489"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# resonant frequency,percentage change and quality factor\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Cs=0.065 # capacitance of tunned circuit in pico farad\n",
+ "Ls=0.33 # series INDUCTANCE of tunned circuit in henry\n",
+ "Cp=1.0 # parallel capacitance in pico farad\n",
+ "Rs=5.5 # SERIES RESISTANCE IN KILLO OHMS\n",
+ "\n",
+ "#Calculation\n",
+ "fs=round((1/(2*math.pi*math.sqrt(Ls*Cs*10**-12)))*10**-3) # series tunned frequency in killo hertz\n",
+ "fp=math.ceil(((1/(2*math.pi))*math.sqrt((1+Cs/Cp)/(Ls*Cs*10**-12)))*10**-3) # parralel tunned frequency in killo hertz\n",
+ "Pc= ((fp-fs)/fs)*100 # percentage by which series resonant frequency exceeds the parallel resonant frequency\n",
+ "Qs= ((2*math.floor(math.pi*100)*fs*10**3*Ls/100)/(Rs*10**3)) # quality factor with series resonant frequency\n",
+ "Qp= ((2*math.floor(math.pi*100)*fp*10**3*Ls/100)/(Rs*10**3)) # quality factor with parallled resonant frequency\n",
+ "\n",
+ "#Result\n",
+ "print(\"series tunned frequency = %.f kHz\"%fs)\n",
+ "print(\"parallel tunned frequency = %.f kHz\"%fp)\n",
+ "print(\"percentage by which series resonant frequency exceeds the parallel resonant frequency = %.1f%%\"%Pc)\n",
+ "print(\"quality factor with series resonant frequency is %.2f\"%Qs)\n",
+ "print(\"quality factor with paralled resonant frequency is %.2f\"%(math.floor(Qp*100)/100))"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "series tunned frequency = 1087 kHz\n",
+ "parallel tunned frequency = 1122 kHz\n",
+ "percentage by which series resonant frequency exceeds the parallel resonant frequency = 3.2%\n",
+ "quality factor with series resonant frequency is 409.58\n",
+ "quality factor with paralled resonant frequency is 422.76\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.16, Page No.490"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# oscillation frequency \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "C1=120.0 # capacitance of tunned circuit in PICO farad\n",
+ "C2=1500.0 # capacitance of tunned circuit in pico farad\n",
+ "C3=15.0 # capacitance of tunned circuit in pico farad\n",
+ "L=10.0 # INDUCTANCE of tunned circuit in micro henry\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "Cx=(C1*C2)/(C1+C2) # capacitance in pico farad\n",
+ "Ct=(Cx*C3)/(Cx+C3) # total capacitance in pico farad\n",
+ "fo=(1/(2*math.pi*math.sqrt(L*10**-6*Ct*10**-12)))*10**-6 # tunned frequency in mega hertz\n",
+ "foa= (1/(2*math.pi*math.sqrt(L*10**-6*C3*10**-12)))*10**-6 # actual resonant frequency in mega hertz\n",
+ "\n",
+ "#Result\n",
+ "print(\"tunned frequency = %.2f MHz\"%fo)\n",
+ "print(\"actual resonant frequency = %.2f MHz\"%foa)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "tunned frequency = 13.84 MHz\n",
+ "actual resonant frequency = 12.99 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.17, Page No. 490"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# resonant frequency \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "R=500.0 # resistance in ohms\n",
+ "C1=0.01 # capacitance of tunned circuit in pico farad\n",
+ "C2=10.0 # capacitance of tunned circuit in pico farad\n",
+ "L=0.06 # INDUCTANCE of tunned circuit in henry\n",
+ "\n",
+ "#Calculations\n",
+ "C=(C1*C2)/(C1+C2) # total capacitance in micro farad\n",
+ "fs=((1/(2*math.pi*math.sqrt(L*C1*10**-12)))*10**-6) # series tunned frequency in mega hertz\n",
+ "C=(C1*C2)/(C1+C2) # total capacitance in pico farad\n",
+ "fp=(1/(2*math.pi*math.sqrt(L*C*10**-12))*10**-6) #parralel tunned frequency in mega hertz\n",
+ "\n",
+ "#Result\n",
+ "print(\"series tunned frequency = %.3f MHz\"%fs)\n",
+ "print(\"parallel tunned frequency = %.4f MHz\"%fp)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "series tunned frequency = 6.497 MHz\n",
+ "parallel tunned frequency = 6.5007 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.18, Page No. 491"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# oscillation frequency \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "C=100.0 # capacitance of tunned circuit in pico farad\n",
+ "L1=50.0 # INDUCTANCE of tunned circuit in micro henry\n",
+ "L2=50.0 # INDUCTANCE of tunned circuit in micro henry\n",
+ "\n",
+ "#Calculations\n",
+ "fo=(1/(2*math.pi*math.sqrt((L1+L2)*10**-6*C*10**-12)))*10**-6 # tunned frequency in mega hertz\n",
+ "\n",
+ "#Result\n",
+ "print(\"Tunned frequency = %.2f MHz\"%fo)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Tunned frequency = 1.59 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.19, Page No.491"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# oscillation frequency \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "C1=120.0 # capacitance of tunned circuit in PICO farad\n",
+ "C2=1500.0 # capacitance of tunned circuit in pico farad\n",
+ "L=10.0 # INDUCTANCE of tunned circuit in micro henry\n",
+ "\n",
+ "#Calculation\n",
+ "C=(C1*C2)/(C1+C2) # total capacitance in pico farad\n",
+ "fo=(1/(2*math.pi*math.sqrt(L*10**-6*C*10**-12)))*10**-6 # tunned frequency in mega hertz\n",
+ "\n",
+ "#Result\n",
+ "print(\"tunned frequency = %.2f MHz\"%fo)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "tunned frequency = 4.77 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.20, Page No.491"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# oscillation frequency \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "C1=120.0 # capacitance of tunned circuit in PICO farad\n",
+ "C2=1500.0 # capacitance of tunned circuit in pico farad\n",
+ "C3=15.0 # capacitance of tunned circuit in pico farad\n",
+ "L=10.0 # INDUCTANCE of tunned circuit in micro henry\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "Cx=(C1*C2)/(C1+C2) # capacitance in pico farad\n",
+ "Ct=(Cx*C3)/(Cx+C3) # total capacitance in pico farad\n",
+ "fo=(1/(2*math.pi*math.sqrt(L*10**-6*Ct*10**-12)))*10**-6 # tunned frequency in mega hertz\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"tunned frequency = %.2f MHz\"%fo)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "tunned frequency = 13.84 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.21, Page No.497"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# oscillation frequency \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "C=100.0 # capacitance in pico farad\n",
+ "R=800.0 # resistance in killo ohms\n",
+ "\n",
+ "#Calculations\n",
+ "fo=round(1/(2*math.pi*R*10**3*C*10**-12*math.sqrt(6))) # RESONANT FREQUENCY IN HERTZ\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"Resonant frequency = %.f Hz\"%fo)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resonant frequency = 812 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.22, Page No.498"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# oscillation frequency \n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "w=2*10**3 # in radiand per second\n",
+ "\n",
+ "#Calculations\n",
+ "f= round(w/(2*math.pi)) # resonant frequency\n",
+ "X=(((16*10**9*4*w**2*10**3))/((4*w**2*10**3)**2))\n",
+ "\n",
+ "#Result\n",
+ "print(\"resonant frequency = %.f Hz\"%f)\n",
+ "print(\"oscillations are sustained = %.f\"%X)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "resonant frequency = 318 Hz\n",
+ "oscillations are sustained = 1\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.23, Page No. 502"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Design R-C phase shift oscillator\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "fo=1.0 # resonant frequency in killo hertz\n",
+ "Av= 29.0 # voltage gain\n",
+ "Vcc=10.0 # collector voltage\n",
+ "Ib=0.5 # maximum base current in micro ampere\n",
+ "Rf2=180.0 # standard resistance in killo ohms\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "I1=100*Ib # assume current in micro ampere\n",
+ "Vosat= 0.9*Vcc # saturation voltage assume\n",
+ "V1=Vosat/Av # voltage for sustained oscillations\n",
+ "R1=(V1/(I1*10**-6))*10**-3 # RESISTANCE IN KILLO PHMS\n",
+ "Rf1=Av*R1 # resistance in killo ohms\n",
+ "R3=Rf2 \n",
+ "R=R1 \n",
+ "C=(1/(2*math.pi*R*10**3*fo*10**3*math.sqrt(6)))*10**6 \n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"Resistance R1 for the R-C Phase shift oscillator = %.1f k-ohm\"%R)\n",
+ "print(\"Resistance Rf for the R-C Phase shift oscillator = %.f k-ohm\"%R3)\n",
+ "print(\"Capacitance for the R-C Phase shift oscillator = %.2f micro-F\"%C)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resistance R1 for the R-C Phase shift oscillator = 6.2 k-ohm\n",
+ "Resistance Rf for the R-C Phase shift oscillator = 180 k-ohm\n",
+ "Capacitance for the R-C Phase shift oscillator = 0.01 micro-F\n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.24, Page No. 502"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# drain resistance and Design R-C phase shift oscillator\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Mu=55.0\n",
+ "rd=5.5 # resistane in killo ohms\n",
+ "fo=5.0 # resonant frequency in killo hertz\n",
+ "A= 29.0 # voltage gain\n",
+ "R=30.0 # assume Resistance in killo ohms\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "Rd= (29*rd)/(Mu-A) # resistance in killo ohms\n",
+ "RC=((1/(2*math.pi*fo*10**3*math.sqrt(6)))*10**6) \n",
+ "C=(RC*10**-6/(30*10**3)*10**12)\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"drain resistance = %.2f k-ohm\"%Rd)\n",
+ "print(\"R-C time constant = %.f pico-sec\"%(math.ceil(RC)))\n",
+ "print(\"Capacitance for the R-C Phase shift oscillator = %.f pF\"%C)\n",
+ "#Answer for capacitance is wrong in the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "drain resistance = 6.13 k-ohm\n",
+ "R-C time constant = 13 pico-sec\n",
+ "Capacitance for the R-C Phase shift oscillator = 433 pF\n"
+ ]
+ }
+ ],
+ "prompt_number": 48
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.25, Page No.503"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Vf/Vo,frequency of oscillations and minimum gain\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Beta=1.0/29\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "VfVo= (Beta+1)\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"Voltage gain = %f\"%VfVo)\n",
+ "print(\"\\nf=1/(2*%pi*R*C*sqrt(6)) frequency of oscillations\")\n",
+ "print(\"\\nAs gain is more than one oscillations will be sustained\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Voltage gain = 1.034483\n",
+ "\n",
+ "f=1/(2*%pi*R*C*sqrt(6)) frequency of oscillations\n",
+ "\n",
+ "As gain is more than one oscillations will be sustained\n"
+ ]
+ }
+ ],
+ "prompt_number": 49
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.26, Page No. 510"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# design wein bridge oscillator\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=15.0 # collector voltage\n",
+ "f=10.0 # frequency of oscillation in killo hertz\n",
+ "I=1.0 # current in millo ampere\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "Vo=Vcc-1 # maximum output voltage\n",
+ "x=Vo/I # resistance in killo ohms\n",
+ "R4=x/3 # resistance in killo ohms\n",
+ "R3= 2*R4 # resistance in killo ohms\n",
+ "R4_s = 4.7 # Standard value\n",
+ "R3_s = 10 # Standard value \n",
+ "A= (1+(R3_s/R4_s)) # amplifier gain\n",
+ "R=R4_s # resistance in killo ohms\n",
+ "C=(1/(2*math.pi*f*10**3*R*10**3))*10**9\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"Amlifier gain = %.2f\"%(math.floor(A*100)/100))\n",
+ "print(\"resistance R4 = %.1f k-ohm (use 4.7 k-ohm standard value)\"%R)\n",
+ "print(\"resistance R3 = %.1f k-ohm (use 10 k-ohm standard value)\"%(math.ceil(R3*10)/10))\n",
+ "print(\"Capacitance = %.2f nF\"%(math.floor(C*100)/100))\n",
+ "#print(\"this is name as example 7.27 in the book\" )"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Amlifier gain = 3.12\n",
+ "resistance R4 = 4.7 k-ohm (use 4.7 k-ohm standard value)\n",
+ "resistance R3 = 9.4 k-ohm (use 10 k-ohm standard value)\n",
+ "Capacitance = 3.38 nF\n"
+ ]
+ }
+ ],
+ "prompt_number": 70
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.27 Page No.511"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# sustained oscillations and output frequency\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "R4=5.1 # resistance in killo ohms\n",
+ "R3=12.0 # resistance in killo ohms\n",
+ "C=1.0 # capacitance in nano farad\n",
+ "\n",
+ "#Calculations\n",
+ "A= (1+(R3/R4)) # amplifier gain\n",
+ "R=R4 # resistance in killo ohms\n",
+ "fo= (1/(2*math.pi*C*10**-9*R*10**3))*10**-3\n",
+ "\n",
+ "#Result\n",
+ "print(\"Amlifier gain is %.2f. It is greater than 1 so circuit will oscillate.\"%A)\n",
+ "print(\"Oscillation frequency = %.1f kHz\"%fo)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Amlifier gain is 3.35. It is greater than 1 so circuit will oscillate.\n",
+ "Oscillation frequency = 31.2 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 75
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.29, Page No.514"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# design wein bridge oscillator\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vcc=10.0 # collector voltage\n",
+ "f=10.0 # frequency of oscillation in killo hertz\n",
+ "I=500.0 # current in micro ampere\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "Vo=Vcc-1 # maximum output voltage\n",
+ "x=(Vo/I)*10**3 # resistance in killo ohms\n",
+ "R4=x/3 # resistance in killo ohms\n",
+ "Rf= 2*R4 # resistance in killo ohms\n",
+ "R4_s = 5.6 # standard value\n",
+ "R=R4_s # resistance in killo ohms\n",
+ "C=(1/(2*math.pi*f*10**3*R*10**3))*10**12\n",
+ "\n",
+ "#Resulr\n",
+ "print(\"Resistance R = R1 = %.f k-ohm(uswe 5.6k as standard value)\"%R)\n",
+ "print(\"resistance Rf = %.f k-ohm\"%Rf)\n",
+ "print(\"Capacitance = %.f nF(use 2700 nF as standard value)\"%C)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resistance R = R1 = 6 k-ohm(uswe 5.6k as standard value)\n",
+ "resistance Rf = 12 k-ohm\n",
+ "Capacitance = 2842 nF(use 2700 nF as standard value)\n"
+ ]
+ }
+ ],
+ "prompt_number": 85
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.30, Page No.514"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print(\"Theoretical example\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Theoretical example\n"
+ ]
+ }
+ ],
+ "prompt_number": 87
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.31, Page No.515"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "print(\"Theoretical example\")"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.32, Page No. 517"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Design R-C phase shift oscillator\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Vce=5.0 # in volts\n",
+ "RE=1.0 # emitter reistsance in killo ohms\n",
+ "Vbe=0.7 # in volts\n",
+ "Ie=1.0 # emitter current in mA\n",
+ "Re=1.0 # EMITTER RESISTANCE IN KILLO OHMS\n",
+ "f=100.0 # oscillaor frequency in killo hertz\n",
+ "hfe=100.0\n",
+ "hie=1.0 # in killo ohms\n",
+ "Vc=5.0 # in volts\n",
+ "Ic=1.0 # current in mili ampere\n",
+ "Vcc=20.0 # in volts\n",
+ "R=10.0 # resistane in killo ohms\n",
+ "\n",
+ "#Calculations\n",
+ "Rc=(Vcc-Vce-Ie*Re)/(Ic) # collector resistance in killo ohms is\n",
+ "k= Rc/R\n",
+ "C= ((1/(2*math.pi*R*10**3*f*10**3*math.sqrt(6+(4*1.4)))))*10**12\n",
+ "R3= R-hie # resistance in kiilo ohms\n",
+ "Vb= (Vbe+Ie*Re) # voltage at base\n",
+ "R2=R \n",
+ "I2=Vb/R2 # in mA\n",
+ "V2=(Vcc-R2*I2) # voltage drop across R2\n",
+ "IR1= (I2+(1.0/100)) # CURRENT ACROOS R1\n",
+ "R1= V2/(IR1) \n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"Emitter resistance = %.f k-ohm\"%Re)\n",
+ "print(\"collector resistance = %.f k-ohm\"%Rc)\n",
+ "print(\"resistance R = %.f k-ohm\"%R)\n",
+ "print(\"Capacitance = %.1f pF\"%C)\n",
+ "print(\"resistance(R3) = %.f k-ohm\"%R3)\n",
+ "print(\"resistance(R2) = %.f k-ohm\"%R2)\n",
+ "print(\"resistance(R1) = %.f k-ohm\"%R1)\n",
+ "#Answer for Resistance (R1) is wrong in the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Emitter resistance = 1 k-ohm\n",
+ "collector resistance = 14 k-ohm\n",
+ "resistance R = 10 k-ohm\n",
+ "Capacitance = 46.7 pF\n",
+ "resistance(R3) = 9 k-ohm\n",
+ "resistance(R2) = 10 k-ohm\n",
+ "resistance(R1) = 102 k-ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 91
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.33, Page No.518"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Design R-C phase shift oscillator\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "rd=40.0 # resistane in killo ohms\n",
+ "fo=1.0 # resonant frequency in killo hertz\n",
+ "gm= 5000.0 # in killo mh\n",
+ "R=10.0 # assume Resistance in killo ohms\n",
+ "Av=29.0 # VOLTAGE GAIN\n",
+ "Vdd=12.0 # drain voltage\n",
+ "\n",
+ "\n",
+ "#Calculations\n",
+ "C=((1/(2*math.pi*fo*10**3*R*10**3*math.sqrt(6)))*10**9)# C in nano farad\n",
+ "Rl= (Av/gm*10**-6)*10**9 # load resistance in killo ohms\n",
+ "Rl = math.ceil(Rl)\n",
+ "Rd= ((Rl*rd)/(rd-Rl)) # drain resistance in killo ohms\n",
+ "\n",
+ "\n",
+ "#Result\n",
+ "print(\"Drain Resistance = %.2f k-ohm\"%Rd)\n",
+ "print(\"Capacitance for the R-C Phase shift oscillator = %.1f nF\"%C) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Drain Resistance = 7.06 k-ohm\n",
+ "Capacitance for the R-C Phase shift oscillator = 6.5 nF\n"
+ ]
+ }
+ ],
+ "prompt_number": 96
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.34, Page No.518"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# design wein bridge oscillator\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "R=100.0 # ASSUME RESSITANCE IN KILO OHMS\n",
+ "fo1=10.0 # tunned frequency in killo hertz\n",
+ "fo2=100.0 # tunned frequency in hertz\n",
+ "\n",
+ "#Calculations\n",
+ "C1= (1/(2*math.pi*R*10**3*fo1*10**3))*10**9 # tunned capacitance\n",
+ "C2= (1/(2*math.pi*R*10**3*fo2))*10**9 # tunned capacitance\n",
+ "\n",
+ "#Result\n",
+ "print(\"Tunned capacitance C1 range of tunned circuit = %.3f nF\"%C1)\n",
+ "print(\"Tunned capacitance C2 range of tunned circuit = %.1f nF\"%C2)\n",
+ "#Answer slightly different than book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Tunned capacitance C1 range of tunned circuit = 0.159 nF\n",
+ "Tunned capacitance C2 range of tunned circuit = 15.9 nF\n"
+ ]
+ }
+ ],
+ "prompt_number": 105
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 7.35, Page No. 519 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# resonant frequency and quality factor\n",
+ "\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "Cs=0.06 # capacitance of tunned circuit in pico farad\n",
+ "Ls=0.5 # series INDUCTANCE of tunned circuit in henry\n",
+ "Cp=1.0 # parallel capacitance in pico farad\n",
+ "Rs=5.0 # SERIES RESISTANCE IN KILLO OHMS\n",
+ "\n",
+ "#Calculations\n",
+ "fs=((1/(2*math.pi*math.sqrt(Ls*Cs*10**-12)))*10**-3) # series tunned frequency in killo hertz\n",
+ "fp=(((1/(2*math.pi))*math.sqrt((1+Cs/Cp)/(Ls*Cs*10**-12)))*10**-3) # parralel tunned frequency in killo hertz\n",
+ "Pc= ((fp-fs)/fs)*100 # percentage by which series resonant frequency exceeds the parallel resonant frequency\n",
+ "Qs= round((2*math.pi*fs*10**3*Ls)/(Rs*10**3)) # quality factor with series resonant frequency\n",
+ "Qp= round((2*math.pi*fp*10**3*Ls)/(Rs*10**3)) # quality factor with parallled resonant frequency\n",
+ "\n",
+ "#Result\n",
+ "print(\"Series tunned frequency = %.1f kHz\"%fs)\n",
+ "print(\"Quality factor with series resonant frequency is %.f\"%Qs)\n",
+ "print(\"\\nParallel tunned frequency = %.f kHz\"%fp)\n",
+ "print(\"Quality factor with paralled resonant frequency is %.f\"%Qp)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Series tunned frequency = 918.9 kHz\n",
+ "Quality factor with series resonant frequency is 577\n",
+ "\n",
+ "Parallel tunned frequency = 946 kHz\n",
+ "Quality factor with paralled resonant frequency is 594\n"
+ ]
+ }
+ ],
+ "prompt_number": 111
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file