summaryrefslogtreecommitdiff
path: root/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter3.ipynb
diff options
context:
space:
mode:
authorThomas Stephen Lee2015-08-28 16:53:23 +0530
committerThomas Stephen Lee2015-08-28 16:53:23 +0530
commitdb0855dbeb41ecb8a51dde8587d43e5d7e83620f (patch)
treeb95975d958cba9af36cb1680e3f77205354f6512 /Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter3.ipynb
parent5a86a20b9de487553d4ef88719fb0fd76a5dd6a7 (diff)
downloadPython-Textbook-Companions-db0855dbeb41ecb8a51dde8587d43e5d7e83620f.tar.gz
Python-Textbook-Companions-db0855dbeb41ecb8a51dde8587d43e5d7e83620f.tar.bz2
Python-Textbook-Companions-db0855dbeb41ecb8a51dde8587d43e5d7e83620f.zip
add books
Diffstat (limited to 'Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter3.ipynb')
-rw-r--r--Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter3.ipynb1812
1 files changed, 1812 insertions, 0 deletions
diff --git a/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter3.ipynb b/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter3.ipynb
new file mode 100644
index 00000000..3baf21d6
--- /dev/null
+++ b/Electronic_Circuits_by_Dr._Sanjay_Sharma/Chapter3.ipynb
@@ -0,0 +1,1812 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter3 - Bipolar Junction Transistors(BJTs)"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.1 - page 182"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "# Given data \n",
+ "V_E= -0.7 # in V\n",
+ "Bita=50 \n",
+ "RC= 5 # in k\u03a9\n",
+ "RE= 10 # in k\u03a9\n",
+ "RE= RE*10**3 # in \u03a9\n",
+ "RC= RC*10**3 # in \u03a9\n",
+ "V_CC= 10 # in V\n",
+ "V_BE= -10 # in volt\n",
+ "I_E= (V_E-V_BE)/RE # in A\n",
+ "print \"Emitter current = %0.2f mA\" %(I_E*10**3)\n",
+ "# I_E= I_B+I_C and I_C= Bita*I_B, so\n",
+ "I_B= I_E/(1+Bita) # in A\n",
+ "print \"Base current = %0.1f \u00b5A\" %(I_B*10**6)\n",
+ "I_C= I_E-I_B #in A\n",
+ "print \"Collector current = %0.2f mA\" %(I_C*10**3)\n",
+ "V_C= V_CC-I_C*RC # in V\n",
+ "print \"The value of V_C = %0.2f Volt\" %(V_C)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Emitter current = 0.93 mA\n",
+ "Base current = 18.2 \u00b5A\n",
+ "Collector current = 0.91 mA\n",
+ "The value of V_C = 5.44 Volt\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.2 - page 183"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "# Given data \n",
+ "V_E= 1.7 # in V\n",
+ "V_B= 1 # in V\n",
+ "RC= 5 # in k\u03a9\n",
+ "RE= 5 # in k\u03a9\n",
+ "RE= RE*10**3 # in \u03a9\n",
+ "RC= RC*10**3 # in \u03a9\n",
+ "RB= 100 #in k\u03a9\\\n",
+ "RB= RB*10**3 # in \u03a9\n",
+ "V_CC= 10 # in V\n",
+ "V_BE= -10 # in volt\n",
+ "I_E= (V_CC-V_E)/RE # in A\n",
+ "I_B= V_B/RB # in V\n",
+ "# Formula I_B= (1-alpha)*I_E\n",
+ "alpha= 1-I_B/I_E \n",
+ "print \"Value of alpha = %0.3f \" %(alpha)\n",
+ "beta= alpha/(1-alpha) \n",
+ "print \"Value of beta = %.01f \" %beta\n",
+ "V_C= (I_E-I_B)*RC-V_CC # in volt\n",
+ "print \"Collector voltage = %0.2f Volt\" %V_C\n",
+ "# Answer in the textbook is not accurate."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of alpha = 0.994 \n",
+ "Value of beta = 165.0 \n",
+ "Collector voltage = -1.75 Volt\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.3 - page 187"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division# Given data \n",
+ "from numpy import log\n",
+ "# Given data\n",
+ "V_CC= 10 # in V\n",
+ "V_CE= 3.2 # in V\n",
+ "RC= 6.8 # in k\u03a9\n",
+ "RC= RC*10**3 # in \u03a9\n",
+ "I_S= 1*10**-15 # in A\n",
+ "V_T= 25*10**-3 # in V\n",
+ "I_C1= (V_CC-V_CE)/RC # in A\n",
+ "print \"Part(a) : \"\n",
+ "# Formula I_C= I_S*%e**(V_BE1/V_T)\n",
+ "V_BE1= V_T*log(I_C1/I_S) # in volt\n",
+ "print \"Collector current = %0.1f mA\" %(I_C1*10**3)\n",
+ "print \"Value of V_BE = %0.1f Volt\" %(V_BE1)\n",
+ "\n",
+ "print \"Part(b) : \"\n",
+ "v_in= 5*10**-3 # in V\n",
+ "Av= -(V_CC-V_CE)/V_T # in V/V\n",
+ "print \"Voltage gain = %0.1f V/V\" %(Av)\n",
+ "v_o= abs(Av )*v_in # in V\n",
+ "print \"Change in output voltage = %0.2f Volt\" %v_o\n",
+ "\n",
+ "print \"Part(c) : \"\n",
+ "#for V_CE= 0.3 V\n",
+ "V_CE= 0.3 # in V\n",
+ "I_C2= (V_CC-V_CE)/RC # in A\n",
+ "# I_C1= I_S*%e**(V_BE1/V_T) (i)\n",
+ "# I_C2= I_S*%e**(V_BE2/V_T) (ii)\n",
+ "# divide the equation (ii) by (i)\n",
+ "delta_V_BE= V_T*log(I_C2/I_C1) # in volt ( where delta_V_BE = V_BE2-V_BE1 )\n",
+ "print \"The positive increament in V_BE = %0.1f mV\" %(delta_V_BE*10**3)\n",
+ "\n",
+ "print \"Part(d) : \"\n",
+ "v_o= 0.99*V_CC # in V\n",
+ "I_C3= (V_CC-v_o)/RC # in A\n",
+ "delta_V_BE= V_T*log(I_C3/I_C1) # in V\n",
+ "print \"The negative increament in V_BE = %0.1f mV\" %(delta_V_BE*10**3 )"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Part(a) : \n",
+ "Collector current = 1.0 mA\n",
+ "Value of V_BE = 0.7 Volt\n",
+ "Part(b) : \n",
+ "Voltage gain = -272.0 V/V\n",
+ "Change in output voltage = 1.36 Volt\n",
+ "Part(c) : \n",
+ "The positive increament in V_BE = 8.9 mV\n",
+ "Part(d) : \n",
+ "The negative increament in V_BE = -105.5 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.4 - page 197"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "# Given data \n",
+ "V_CC= 10 # in V\n",
+ "V_CE= 5 # in V\n",
+ "V_BE= 0.7 # in V\n",
+ "I_C= 5*10**-3 # in mA\n",
+ "bita= 100 \n",
+ "R_C= (V_CC-V_CE)/I_C # in \u03a9\n",
+ "I_B= I_C/bita # in A\n",
+ "R_B= (V_CC-V_BE)/I_B # in \u03a9\n",
+ "print \"The value of R_C = %0.1f k\u03a9\" %(R_C*10**-3)\n",
+ "print \"The value of I_B = %0.1f \u00b5A\" %(I_B*10**6)\n",
+ "print \"The value of R_B = %.01f k\u03a9\" %(R_B*10**-3)\n",
+ "\n",
+ "# Note: The value of base current in the book is wrong"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of R_C = 1.0 k\u03a9\n",
+ "The value of I_B = 50.0 \u00b5A\n",
+ "The value of R_B = 186.0 k\u03a9\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.5 - page 197"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "%matplotlib inline\n",
+ "from matplotlib.pyplot import plot, text, xlabel, ylabel, show, axes, title, gca\n",
+ "from __future__ import division\n",
+ "from numpy import arange, nditer\n",
+ "# Given data \n",
+ "V_CC= 6 # in V\n",
+ "bita= 100 \n",
+ "R_C= 2 # in k\u03a9\n",
+ "R_C= R_C*10**3 # in \u03a9\n",
+ "R_B= 530 # in k\u03a9\n",
+ "R_B= R_B*10**3 # in \u03a9\n",
+ "# when I_C=0\n",
+ "I_C=0 \n",
+ "V_CE= V_CC-I_C*R_C # in volt\n",
+ "V_CE= arange(0,7,0.1) # in Volt\n",
+ "# defining function to get the collector current\n",
+ "def current(V):\n",
+ " it = nditer([V, None])\n",
+ " for v_ce,i in it:\n",
+ " i[...] = (V_CC-v_ce)/R_C*1000 \n",
+ " return it.operands[1]\n",
+ "I_C=current(V_CE) # in mA\n",
+ "x=arange(-1,4,0.1)\n",
+ "y=arange(-0.5,1.02,0.1)\n",
+ "plot(V_CE,I_C,'r') \n",
+ "plot(4*(y/y),y,'--b')\n",
+ "plot(x,1*(x/x),'--b')\n",
+ "text(4,1.02,'Operating Point')\n",
+ "title(\"DC load line\")\n",
+ "xlabel(\"V_CE in volts\")\n",
+ "ylabel(\"I_C in mA\")\n",
+ "# Setting axes\n",
+ "axes = gca()\n",
+ "axes.set_xlim([0,6])\n",
+ "axes.set_ylim([0,3])\n",
+ "show()\n",
+ "# When V_CE= 0\n",
+ "I_C= V_CC/R_C #in A\n",
+ "# Operating point for silicon transistor \n",
+ "V_BE= 0.7 # in V\n",
+ "I_B= (V_CC-V_BE)/R_B #in A\n",
+ "I_CQ= bita*I_B # in A\n",
+ "V_CEQ= V_CC-I_CQ*R_C # in volt\n",
+ "print \"Operating point = (\",V_CEQ,\"V ,\",I_CQ*10**3,\"mA)\"\n",
+ "print \"DC load line shown in figure\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAEaCAYAAAAcz1CnAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlUlPX+B/D3IJYiyGZiAoqBKJswooIlOkihoqipqeRV\ncAv1utDtdlPrl1qGGbmmx8Cboi3i0u1oiFSm44ZcE0bFpYsoIIth7gsYAvP7g2YCBsYB5mG29+sc\nzgHmO898Jjvz4f18n+/3EcnlcjmIiMhkmem6ACIi0i02AiIiE8dGQERk4tgIiIhMHBsBEZGJYyMg\nIjJxbAREf0pMTERQUJAgxzYzM8PVq1frfUwikeCLL74AAHz99dcYMmSIIDUQNYSNgAySi4sLLCws\n0L59e9ja2uKll15CfHw86i6LOXXqFMLCwmBrawt7e3sEBAQgMTFRN0U3QCQSQSQSAQAmTZqEH374\nQccVkalhIyCDJBKJkJycjPv37+PatWtYuHAhVq5cienTpyvHnDx5EiEhIQgODsaVK1dw69YtbNq0\nCampqTqsnEj/sBGQwbOyskJ4eDh27tyJbdu24eLFiwCAt99+G1FRUXj77bdhZ2cHAOjduzeSkpI0\nOm5aWhr69u0LGxsb9OvXDydPnlQ+tnXrVnh6eqJ9+/ZwdXVFQkJCrefGxcWhc+fOcHJywpYtWzR+\nL3VPT5mZmSE+Ph7u7u6wtbXF3Llza43fsmULPD09YWdnh6FDh+LatWsavx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H\njx5V+1qurq64evUq5s+fjx9++AHt27dXO55IE2wEZBRGjhyp/Iu5tLRU7XbQXl5eyMjI0NprP/vs\ns8rvW7VqpTxFVVN4eDhSU1Nx584dZGZmYvDgwSpjNDktZWNjg3PnzkEikeDzzz/HjBkzmlc8EdgI\nyEhYWloiODgYU6dOxeuvv6527Ouvv460tDTlqSQAOHr0KC5cuCBofX379sX8+fMRHh4OkUgEa2tr\n2Nra4vjx4wCAL7/8EhKJROW5VlZWyiuUbt26hYqKCowZMwYffvih2puNEGmKVw2R0YiIiMCYMWOw\na9cutePatGmD5ORkxMTEICYmBq1bt4avry/Wrl2LmzdvKucIFP7v//4PY8aMqXWMmnMEdffqb2jv\n/gkTJmD8+PG1bme5bds2zJo1C6WlpQ3uGf/GG29g6NChcHR0xJo1azB16lRUVVUBgNrbDxJpivcj\nICIycTw1RERk4nhqiIxWVlaWyg3X27Rpg5MnT+qoIiL9xFNDREQmjqeGiIhMHBsBEZGJYyMgIjJx\nbARERCaOjYCIyMT9P7uiwsTxuJHPAAAAAElFTkSuQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x7ff7b76ad790>"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Operating point = ( 4.0 V , 1.0 mA)\n",
+ "DC load line shown in figure\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.6 - page 203"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "# Given data \n",
+ "V_CC= 12 # in V\n",
+ "V_BE= 0.7 # in V\n",
+ "bita= 100 \n",
+ "R_C= 10 # in k\u03a9\n",
+ "R_C= R_C*10**3 # in \u03a9\n",
+ "R_B= 100 # in k\u03a9\n",
+ "R_B= R_B*10**3 # in \u03a9\n",
+ "I_BQ= (V_CC-V_BE)/((1+bita)*R_C+R_B) # in A\n",
+ "I_CQ= bita*I_BQ # in A\n",
+ "V_CEQ= V_CC-(I_CQ+I_BQ)*R_C # in volt\n",
+ "# For dc load line\n",
+ "# When\n",
+ "I_C=0 \n",
+ "V_CE= V_CC-(I_C+I_BQ)*R_C # in volt\n",
+ "# When\n",
+ "V_CE= 0 \n",
+ "I_C= (V_CC-I_BQ*R_C)/R_C #in A\n",
+ "print \"Q- point values for circuit is\",round(V_CEQ,2),\"V and\",round(I_CQ*10**3),\"mA\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Q- point values for circuit is 1.72 V and 1.0 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.7 - page 204"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "# Given data \n",
+ "V_CC= 15 # in V\n",
+ "V_BE= 0.7 # in V\n",
+ "V_CE= 5 # in V\n",
+ "I_C= 5 # in mA\n",
+ "I_C=I_C*10**-3 # in A\n",
+ "bita= 100 \n",
+ "I_B= I_C/bita # in A\n",
+ "print \"Base current = %0.f \u00b5A\" %(I_B*10**6)\n",
+ "#Apply KVL to collector circuit , V_CC= (I_C+I_B)*R_C+V_CE\n",
+ "R_C= (V_CC-V_CE)/(I_C+I_B) # in \u03a9\n",
+ "print \"The value of R_C = %0.2f k\u03a9\" %(R_C*10**-3)\n",
+ "#Apply KVL to base or input circuit, V_CC= (I_C+I_B)*R_C+V_CE + I_B*R_B\n",
+ "R_B= (V_CC-V_BE-(I_C+I_B)*R_C)/I_B # in ohm\n",
+ "print \"The value of R_B = %0.f k\u03a9 \" %(R_B*10**-3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Base current = 50 \u00b5A\n",
+ "The value of R_C = 1.98 k\u03a9\n",
+ "The value of R_B = 86 k\u03a9 \n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.8 - page 205"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "# Given data \n",
+ "V_BE= 0.7 # in V\n",
+ "V_CE= 3 # in V\n",
+ "I_C= 1 # in mA\n",
+ "I_C=I_C*10**-3 # in A\n",
+ "bita= 100 \n",
+ "I_B= I_C/bita # in A\n",
+ "# V_CE= V_BE+V_CB and V_CB= I_B*R_B\n",
+ "R_B= (V_CE-V_BE)/I_B # in \u03a9\n",
+ "print \"The value of R_B = %0.f k\u03a9\" %(R_B*10**-3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of R_B = 230 k\u03a9\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.9 - page 208"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "%matplotlib inline\n",
+ "from numpy import nditer, arange\n",
+ "from matplotlib.pyplot import plot, text, xlabel, ylabel, show, axes, title, gca\n",
+ "# Given data \n",
+ "R1= 10;# in k\u03a9\n",
+ "R1=R1*10**3;# in \u03a9\n",
+ "R2= 5;# in k\u03a9\n",
+ "R2=R2*10**3;# in \u03a9\n",
+ "RC= 1;# in k\u03a9\n",
+ "RC=RC*10**3;# in \u03a9\n",
+ "RE= 2;# in k\u03a9\n",
+ "RE=RE*10**3;# in \u03a9\n",
+ "V_CC= 15;# in V\n",
+ "V_BE= 0.7;# in V\n",
+ "# When\n",
+ "I_C=0;\n",
+ "V_CE= V_CC-I_C*(RC+RE);# in V\n",
+ "# When V_CE= 0\n",
+ "I_C= V_CC/(RC+RE);# in A\n",
+ "V_B= V_CC*R2/(R1+R2);# in V\n",
+ "I_E= (V_B-V_BE)/RE;# in A\n",
+ "I_C= I_E;# in A (approx)\n",
+ "I_CQ= I_C;# in A\n",
+ "V_CE= V_CC-I_C*(RC+RE);# in V\n",
+ "V_CEQ= V_CE;# in V\n",
+ "#############\n",
+ "V_CE= arange(0,16,0.1);# in Volt\n",
+ "def current(v):\n",
+ " it = nditer([v, None])\n",
+ " for x,y in it:\n",
+ " y[...]= (V_CC-x)/(RC+RE)*1000\n",
+ " return it.operands[1]\n",
+ "I_C = current(V_CE)\n",
+ "\n",
+ "#I_C= (V_CC-V_CE)/(RC+RE)*1000;# in mA\n",
+ "plot(V_CE,I_C);\n",
+ "title(\"DC load line\")\n",
+ "xlabel(\"V_CE in volts\")\n",
+ "ylabel(\"I_C in mA\")\n",
+ "text(8.55,2.15,'Q(8.55V,2.15mA)')\n",
+ "x1=arange(0,8.55,0.01)\n",
+ "y1=arange(0,2.15,0.01)\n",
+ "a=arange(0,8.55,0.01)\n",
+ "yd=2.15*(a/a)\n",
+ "plot(a,yd,'--r')\n",
+ "b=arange(-1,2.15,0.005)\n",
+ "xd=8.55*(b/b)\n",
+ "plot(xd,b,'--r')\n",
+ "show()\n",
+ "print \"DC load line shown in figure\"\n",
+ "print 'Operating point is ',V_CEQ,\" V and \",I_CQ*10**3,\" mA\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAEaCAYAAADzDTuZAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XtYVHX+B/D3IJqaisAiKshCKMpNQMTbD3Xwkopi3kIh\nb2jblqtmlpnb7oNmeQldrz1aW0ruk3jZXbUA0VUbNZFFBS/RxURQEBQFA5FcBL6/P05MIgMOyMw5\nM/N+P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kGAPCPf/wDarW61nvbtm2rXblUWFiIiooKTJgwAcuXL1dk\n0x8ybVxNRCYvIiICEyZMwJ49e+p9XcuWLREfH48FCxZgwYIFaN68Ofz8/LB+/XrcuXNHO2dQ7a9/\n/au2W1S1R+cMHm8fWVc7ycmTJyM8PFw7dwBITWZeffVVlJWVwd3dHdu3b6/1vldeeQUjR46Ek5MT\n1q1bh6ioKFRVVQGAItuBkmljPwMiImKZiIiIWCYiM3Tp0iVMnz69xrGWLVvi9OnTMkVEpHwsExER\nEctERETEZEBERGAyICIiMBkQERGYDIiICMD/A7QrYeqaDKtbAAAAAElFTkSuQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x7ff7b7899250>"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "DC load line shown in figure\n",
+ "Operating point is 8.55 V and 2.15 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.10 page 220"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "# Given data \n",
+ "V_CC= 10 # in V\n",
+ "V_BB= 3 # in V\n",
+ "V_BE= 0.7 # in V\n",
+ "V_T= 25*10**-3 # in V\n",
+ "bita=100 \n",
+ "RC= 3 # in k\u03a9\n",
+ "RC=RC*10**3 # in \u03a9\n",
+ "RB= 100 # in k\u03a9\n",
+ "RB=RB*10**3 # in \u03a9\n",
+ "I_B= (V_BB-V_BE)/RB # in V\n",
+ "I_C= bita*I_B # in A\n",
+ "V_C= V_CC-I_C*RC # in V\n",
+ "gm= I_C/V_T # in A/V\n",
+ "r_pi= bita/gm # in \u03a9\n",
+ "# v_be= r_pi/(RB+r_pi)*v_i\n",
+ "v_be_by_v_i= r_pi/(RB+r_pi) \n",
+ "# v_o= -gm*v_be*RC\n",
+ "v_o_by_v_i= -gm*v_be_by_v_i*RC # in V/V\n",
+ "Av= v_o_by_v_i # in V/V\n",
+ "print \"Voltage gain = %0.2f V/V \" % (round(Av))\n",
+ "# Answer in the book is not accurate."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Voltage gain = -3.00 V/V \n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.11 - page 253"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "# Given data \n",
+ "V_B= 4 # in V\n",
+ "V_BE= 0.7 # in V\n",
+ "V_CC= 10 # in V\n",
+ "V_E= V_B-V_BE # in V\n",
+ "R_E= 3.3 # in k\u03a9\n",
+ "R_E=R_E*10**3 # in \u03a9\n",
+ "RC= 4.7 # in k\u03a9\n",
+ "RC=RC*10**3 # in \u03a9\n",
+ "I_E= V_E/R_E # in A\n",
+ "bita=100 \n",
+ "alpha= bita/(1+bita) \n",
+ "I_C= alpha*I_E #in A\n",
+ "print \"The value of I_C = %0.2f mA\" %(I_C*10**3)\n",
+ "V_C= V_CC-I_C*RC # in V\n",
+ "print \"The value of V_C = %0.1f Volts\" %(V_C)\n",
+ "I_B= I_E/(1+bita) # in A\n",
+ "print \"The value of I_B = %0.2f mA\" %(I_B*10**3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of I_C = 0.99 mA\n",
+ "The value of V_C = 5.3 Volts\n",
+ "The value of I_B = 0.01 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.12 - page 254"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "# Given data \n",
+ "V_B= 5 # in V\n",
+ "V_BE= 0.7 # in V\n",
+ "V_CC= 10 # in V\n",
+ "bita=100 \n",
+ "R_B= 100 # in k\u03a9\n",
+ "R_C= 2 # in k\u03a9\n",
+ "R_B=R_B*10**3 # in \u03a9\n",
+ "R_C=R_C*10**3 # in \u03a9\n",
+ "I_B= (V_B-V_BE)/R_B # in A\n",
+ "I_C= bita*I_B #in A\n",
+ "V_C= V_CC-I_C*R_C # in V\n",
+ "I_E= I_C # in A (approx)\n",
+ "print \"The value of I_B = %0.3f mA\" %(I_B*10**3)\n",
+ "print \"The value of I_C = %0.1f mA \" %(I_C*10**3)\n",
+ "print \"The value of V_C = %0.1f Volts\" %(V_C)\n",
+ "print \"The value of I_E = %0.1f mA\" %(I_E*10**3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of I_B = 0.043 mA\n",
+ "The value of I_C = 4.3 mA \n",
+ "The value of V_C = 1.4 Volts\n",
+ "The value of I_E = 4.3 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.13 - page 255"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "from sympy import symbols, solve\n",
+ "V_B = symbols('V_B')\n",
+ "# Given data \n",
+ "V_EB= 0.7 # in V\n",
+ "V_E = 0.7 # in V\n",
+ "bita=100 \n",
+ "V_EC= 0.2 # in V\n",
+ "V_E= V_EB+V_B # in V\n",
+ "V_CC= 5 # in V\n",
+ "R_E= 1 # in k\u03a9\n",
+ "R_E=R_E*10**3 # in \u03a9\n",
+ "R_C= 10 # in k\u03a9\n",
+ "R_C=R_C*10**3 # in \u03a9\n",
+ "R_B= 10 # in k\u03a9\n",
+ "R_B= R_B*10**3 # in \u03a9\n",
+ "V_E= V_B+V_EB # (i)\n",
+ "V_C= V_E-V_EC # (ii)\n",
+ "I_E= (V_CC-V_E)/(R_E)*1000 # mA (iii)\n",
+ "I_B= V_B/R_B # (iv)\n",
+ "I_C= (V_C+V_CC)/R_C # (v)\n",
+ "# By using relationship, I_E= I_B+I_C\n",
+ "expr = I_E*1000-(I_B*1000+I_C*1000)\n",
+ "V_B = solve(expr,V_B)\n",
+ "V_B= (9*V_CC-11*V_EB+V_EC)/12 # in V\n",
+ "V_E= V_B+V_EB # in V\n",
+ "V_C= V_B+V_EB-V_EC # in V\n",
+ "I_E= (V_CC-V_E)/R_E# in amp\n",
+ "I_C= (V_B+V_EB-V_EC+V_CC)/R_B # in amp\n",
+ "I_B= V_B/R_B # in amp\n",
+ "print \"The value of V_B = %0.2f Volts\" %V_B\n",
+ "print \"The value of V_E = %0.2f Volts\" %V_E\n",
+ "print \"The value of V_C = %0.2f Volts\" %V_C\n",
+ "print \"The value of I_E = %0.2f mA\" %(I_E*10**3)\n",
+ "print \"The value of I_C = %0.2f mA\" %(I_C*10**3)\n",
+ "print \"The value of I_B = %0.2f mA\" %(I_B*10**3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of V_B = 3.12 Volts\n",
+ "The value of V_E = 3.83 Volts\n",
+ "The value of V_C = 3.62 Volts\n",
+ "The value of I_E = 1.17 mA\n",
+ "The value of I_C = 0.86 mA\n",
+ "The value of I_B = 0.31 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.14 - page 257"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data \n",
+ "bita=100 \n",
+ "hFE= 100 \n",
+ "VCEsat= 0.2 # in V\n",
+ "VBEsat= 0.8 # in V\n",
+ "VBEactive= 0.7 # in V\n",
+ "VBB= 5 # in V\n",
+ "VCC= 10 # in V\n",
+ "R_C= 3 # in k\u03a9\n",
+ "R_C=R_C*10**3 # in \u03a9\n",
+ "R_B= 50 # in k\u03a9\n",
+ "R_B=R_B*10**3 # in \u03a9\n",
+ "# Formula VCC= ICsat*R_C+VCEsat\n",
+ "ICsat= (VCC-VCEsat)/R_C #A\n",
+ "print \"The value of IC(sat) = %0.2f mA\" %(ICsat*10**3)\n",
+ "IBmin= ICsat/bita # in A\n",
+ "# Apply KVL to input circuit, VBB= IB*R_B+VBEsat\n",
+ "IB= (VBB-VBEsat)/R_B # in A\n",
+ "print \"Actual base current = %0.f \u00b5A\" %(IB*10**6)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of IC(sat) = 3.27 mA\n",
+ "Actual base current = 84 \u00b5A\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.16 - page 259"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data \n",
+ "# beta= alpha/(1-alpha)\n",
+ "# At alpha= 0.5\n",
+ "alpha= 0.5 \n",
+ "beta= alpha/(1-alpha) \n",
+ "print \"At alpha=0.5, the value of beta = %0.f \" %beta\n",
+ "# At alpha= 0.9\n",
+ "alpha= 0.9 \n",
+ "beta = alpha/(1-alpha) \n",
+ "print \"At alpha=0.9, the value of beta is %0.f \" %beta\n",
+ "# At alpha= 0.5\n",
+ "alpha= 0.999 \n",
+ "beta= alpha/(1-alpha) \n",
+ "print \"At alpha=0.999, the value of beta is %0.f \" %beta"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "At alpha=0.5, the value of beta = 1 \n",
+ "At alpha=0.9, the value of beta is 9 \n",
+ "At alpha=0.999, the value of beta is 999 \n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.17 - page 259"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "# Given data \n",
+ "# alpha= beta/(1-beta)\n",
+ "# At beta= 1\n",
+ "beta=1 \n",
+ "alpha= beta/(1+beta) \n",
+ "print \"At beta=1, the value of alpha is %0.2f \" %alpha\n",
+ "# At beta= 2\n",
+ "beta=2 \n",
+ "alpha= beta/(1+beta) \n",
+ "print \"At beta=2, the value of alpha is %0.2f \" %alpha\n",
+ "# At beta= 100\n",
+ "beta=100 \n",
+ "alpha= beta/(1+beta) \n",
+ "print \"At beta=100, the value of alpha is %0.2f \" %alpha\n",
+ "# At beta= 200\n",
+ "beta=200 \n",
+ "alpha= beta/(1+beta) \n",
+ "print \"At beta=200, the value of alpha is %0.3f \"%alpha"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "At beta=1, the value of alpha is 0.50 \n",
+ "At beta=2, the value of alpha is 0.67 \n",
+ "At beta=100, the value of alpha is 0.99 \n",
+ "At beta=200, the value of alpha is 0.995 \n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.18 - page 260"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from numpy import exp, log\n",
+ "# Given data \n",
+ "VBE= 0.76 # in V\n",
+ "VT= 0.025 # in V\n",
+ "I_C= 10*10**-3 # in A\n",
+ "# Formula I_C= I_S*exp(VBE/VT)\n",
+ "I_S= I_C/(exp(VBE/VT)) # in A\n",
+ "print \"The value of I_S = %0.3e A\" %I_S\n",
+ "# Part(a) for VBE = 0.7 V\n",
+ "VBE= 0.7 # in V\n",
+ "I_C= I_S*exp(VBE/VT)\n",
+ "print \"For VBE = 0.7 V , The value of I_C = %0.3f mA\" %(I_C*10**3)\n",
+ "\n",
+ "# Part (b) for I_C= 10 \u00b5A\n",
+ "I_C= 10*10**-6 # in A\n",
+ "# Formula I_C= I_S*exp(VBE/VT)\n",
+ "VBE= VT*log(I_C/I_S) \n",
+ "print \"For I_C = 10 \u00b5A, The value of VBE = %0.3f V\" %VBE"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of I_S = 6.273e-16 A\n",
+ "For VBE = 0.7 V , The value of I_C = 0.907 mA\n",
+ "For I_C = 10 \u00b5A, The value of VBE = 0.587 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.19 - page 260"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "# Given data \n",
+ "VBE= 0.7 # in V\n",
+ "VT= 0.025 # in V\n",
+ "I_B= 100 # in \u00b5A\n",
+ "I_B=I_B*10**-6 # in A\n",
+ "I_C= 10*10**-3 # in A\n",
+ "# Formula I_C= I_S*exp(VBE/VT)\n",
+ "I_S= I_C/(exp(VBE/VT)) # in A\n",
+ "alpha= I_C/(I_C+I_B) \n",
+ "beta= I_C/I_B \n",
+ "IS_by_alpha= I_S/alpha # in A\n",
+ "IS_by_beta= I_S/beta # in A\n",
+ "print \"The value of alpha is %0.2f \" %alpha\n",
+ "print \"The value of beta is %0.2f \" %beta \n",
+ "print \"The value of Is/alpha = %0.2e A\" %IS_by_alpha\n",
+ "print \"The value of Is/beta = %0.2e A\" %IS_by_beta"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of alpha is 0.99 \n",
+ "The value of beta is 100.00 \n",
+ "The value of Is/alpha = 6.98e-15 A\n",
+ "The value of Is/beta = 6.91e-17 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.20 - page 261"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data \n",
+ "VBE= 0.7 # in V\n",
+ "VCC= 10.7 # in V\n",
+ "R_C= 10 #in k\u03a9\n",
+ "R_C=R_C*10**3 # in \u03a9\n",
+ "R_B= 10 #in k\u03a9\n",
+ "R_B=R_B*10**3 # in \u03a9\n",
+ "I1= (VCC-VBE)/R_C # in A\n",
+ "print \"The value of I1 = %0.f mA\" %(I1*10**3)\n",
+ "# Part (b)\n",
+ "VC= -4 #in V\n",
+ "VB= -10 # in V\n",
+ "R_C= 5.6 #in k\u03a9\n",
+ "R_C=R_C*10**3 # in \u03a9\n",
+ "R_B= 2.4 #in k\u03a9\n",
+ "R_B=R_B*10**3 # in \u03a9\n",
+ "VCC=12 # V\n",
+ "I_C= (VC-VB)/R_B # in A\n",
+ "V2= VCC- (R_C*I_C) \n",
+ "print \"The value of V2 = %0.f Volt\" %V2\n",
+ "# Part (c)\n",
+ "VCC= 0 \n",
+ "VCE= -10 # in V\n",
+ "R_C= 10 #in k\u03a9\n",
+ "R_C=R_C*10**3 # in \u03a9\n",
+ "I_C= (VCC-VCE)/R_C # in A\n",
+ "V4= 1 # in V\n",
+ "I3= I_C # in A (approx)\n",
+ "print \"The value of V4 = %0.f Volt\" %V4\n",
+ "print \"The value of I3 = %0.f mA\" %(I3*10**3)\n",
+ "# Part (d)\n",
+ "VBE= -10 # in V\n",
+ "VCC= 10 # in V\n",
+ "R_B= 5 #in k\u03a9\n",
+ "R_B=R_B*10**3 # in \u03a9\n",
+ "R_C= 15 #in k\u03a9\n",
+ "R_C=R_C*10**3 # in \u03a9\n",
+ "# I5= I_C and \n",
+ "# I5= (V6-0.7-VBE)/R_B and I_C= (VCC-V6)/R_C\n",
+ "V6= (VCC*R_B+R_C*(0.7+VBE))/(R_C+R_B) \n",
+ "print \"The value of V6 = %0.3f Volt\" %(V6)\n",
+ "I5= (V6-0.7-VBE)/R_B # in A\n",
+ "print \"The value of I5 = %0.3f mA\" %(I5*10**3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of I1 = 1 mA\n",
+ "The value of V2 = -2 Volt\n",
+ "The value of V4 = 1 Volt\n",
+ "The value of I3 = 1 mA\n",
+ "The value of V6 = -4.475 Volt\n",
+ "The value of I5 = 0.965 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.21 -page 264"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data \n",
+ "# Part (a)\n",
+ "V_C= 2 # in V\n",
+ "R_C= 1 # in k\u03a9\n",
+ "R_C=R_C*10**3 # in \u03a9\n",
+ "V_B= 4.3 # in V\n",
+ "R_B= 200 # in k\u03a9\n",
+ "R_B=R_B*10**3 # in \u03a9\n",
+ "I_C= V_C/R_C # in A\n",
+ "I_B= V_B/R_B # in A\n",
+ "beta= I_C/I_B \n",
+ "print \"Part (a)\"\n",
+ "print \"Collector current = %0.f mA\" %(I_C*10**3)\n",
+ "print \"Base current = %0.1f \u00b5A\" %(I_B*10**6)\n",
+ "print \"The value of beta is %0.f \"%beta\n",
+ "\n",
+ "# Part (b)\n",
+ "V_C= 2.3 # in V\n",
+ "R_C= 230 # in k\u03a9\n",
+ "R_C=R_C*10**3 # in \u03a9\n",
+ "V_B= 4.3 # in V\n",
+ "R_B= 20 # in k\u03a9\n",
+ "R_B=R_B*10**3 # in \u03a9\n",
+ "I= V_C/R_C # current through 230\u03a9 resistro i.e. I_C + I_B in A\n",
+ "I_B= (V_B-V_C)/R_B # in A\n",
+ "I_C= I-I_B # in A\n",
+ "bita= abs(I_C/I_B) \n",
+ "print \"Part (b)\"\n",
+ "print \"Collector current = %0.2f mA\" %(I_C*10**3)\n",
+ "print \"Base current = %0.2f mA\" %(I_B*10**3)\n",
+ "print \"The value of beta is %0.2f \"%beta\n",
+ "\n",
+ "# Part (c)\n",
+ "V_E= 10 # in V\n",
+ "R_E= 1 # in k\u03a9\n",
+ "R_E=R_E*10**3 # in \u03a9\n",
+ "V_1= 7 # in V\n",
+ "R_C= 1 # in k\u03a9\n",
+ "R_C=R_C*10**3 # in \u03a9\n",
+ "V_B= 6.3 # in V\n",
+ "R_B= 100 # in k\u03a9\n",
+ "R_B=R_B*10**3 # in \u03a9\n",
+ "I_E= (V_E-V_1)/R_C #in A\n",
+ "I_C=I_E # in A (approx)\n",
+ "V_C= I_C*R_C # in V\n",
+ "I_B= (V_B-V_C)/R_B # in A\n",
+ "beta= I_E/I_B-1 \n",
+ "print \"Part (c)\"\n",
+ "print \"Emitter current = %0.2f mA\" %(I_E*10**3)\n",
+ "print \"Base current = %0.2f \u00b5A\" %(I_B*10**6)\n",
+ "print \"Collector voltage = %0.2f Volts\" %(V_C)\n",
+ "print \"The value of beta is %0.2f \"%(beta)\n",
+ "\n",
+ "# Note : In the book the value of base current in the first part is wrong due to calculation error.\n",
+ "#In the part (b) the values of collector current and beta are wrong due to calculation error in the first line of part (b)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Part (a)\n",
+ "Collector current = 2 mA\n",
+ "Base current = 21.5 \u00b5A\n",
+ "The value of beta is 93 \n",
+ "Part (b)\n",
+ "Collector current = -0.09 mA\n",
+ "Base current = 0.10 mA\n",
+ "The value of beta is 93.02 \n",
+ "Part (c)\n",
+ "Emitter current = 3.00 mA\n",
+ "Base current = 33.00 \u00b5A\n",
+ "Collector voltage = 3.00 Volts\n",
+ "The value of beta is 89.91 \n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.22 - page 266"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data \n",
+ "# Part (a)\n",
+ "beta= 30 \n",
+ "R_C= 2.2 # in k\u03a9\n",
+ "R_C=R_C*10**3 # in \u03a9\n",
+ "R_B= 2.2 # in k\u03a9\n",
+ "R_B=R_B*10**3 # in \u03a9\n",
+ "VCC= 3 # in V\n",
+ "VCE= -3 # in V\n",
+ "VBE= 0.7 # in V\n",
+ "V_B= 0 # in V\n",
+ "V_E= V_B-VBE # in V\n",
+ "I_E= (V_E-VCE)/R_B # in A\n",
+ "I_C= I_E # in A\n",
+ "V_C= VCC-I_E*R_C # in V\n",
+ "I_B= I_C/beta # in A\n",
+ "print \"Part (a)\"\n",
+ "print \"The value of V_B = %0.2f V \" %V_B\n",
+ "print \"The value of V_E = %0.2f V\" %V_E\n",
+ "print \"The value of I_E = %0.2f mA\" %(I_E*10**3)\n",
+ "print \"The value of V_C = %0.3f V\" %(V_C)\n",
+ "print \"The value of I_B = %0.2f mA\" %(I_B*10**3)\n",
+ "# Part (b)\n",
+ "R_C= 560 # in \u03a9\n",
+ "R_B= 1.1 # in k\u03a9\n",
+ "R_B=R_B*10**3 # in \u03a9\n",
+ "VCC= 9 # in V\n",
+ "VCE= 3 # in V\n",
+ "V_B= 3 # in V\n",
+ "V_E= V_B+VBE # in V\n",
+ "I_E= (VCC-V_E)/R_B # in A\n",
+ "alpha= beta/(1+beta) \n",
+ "I_C= I_E*alpha # in A\n",
+ "V_C= I_C*R_C # in V\n",
+ "I_B= I_C/beta # in A\n",
+ "print \"Part (b)\"\n",
+ "print \"The value of V_B = %0.2f V \" %V_B\n",
+ "print \"The value of V_E = %0.2f V\" %V_E\n",
+ "print \"The value of I_E = %0.2f mA\" %(I_C*10**3)\n",
+ "print \"The value of V_C = %0.2f V\" %(V_C)\n",
+ "print \"The value of I_B = %0.3f mA\" %(I_B*10**3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Part (a)\n",
+ "The value of V_B = 0.00 V \n",
+ "The value of V_E = -0.70 V\n",
+ "The value of I_E = 1.05 mA\n",
+ "The value of V_C = 0.700 V\n",
+ "The value of I_B = 0.03 mA\n",
+ "Part (b)\n",
+ "The value of V_B = 3.00 V \n",
+ "The value of V_E = 3.70 V\n",
+ "The value of I_E = 4.66 mA\n",
+ "The value of V_C = 2.61 V\n",
+ "The value of I_B = 0.155 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.23 - page 268"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from numpy import inf\n",
+ "# Given data \n",
+ "VBE= 0.7 # in V\n",
+ "VCC= 9 # in V\n",
+ "VCE= -9 # in V\n",
+ "V_B= -1.5 # in V\n",
+ "R_C= 10 # in k\u03a9\n",
+ "R_C=R_C*10**3 # in \u03a9\n",
+ "R_B= 10 # in k\u03a9\n",
+ "R_B=R_B*10**3 # in \u03a9\n",
+ "I_B= abs(V_B)/R_B # in A\n",
+ "V_E= V_B-VBE # in V\n",
+ "print \"The value of V_E = %0.2f Volt\" %V_E\n",
+ "I_E= (V_E-VCE)/R_B # in A\n",
+ "beta= I_E/I_B-1 \n",
+ "alpha= beta/(1+beta) \n",
+ "print \"The value of alpha = %0.2f Volt\" %alpha\n",
+ "print \"The value of beta = %0.2f Volt\" %beta\n",
+ "V_C= VCC-I_E*alpha*R_C # in V\n",
+ "print \"The value of V_C = %0.2f Volt\" %V_C\n",
+ "beta = inf\n",
+ "alpha= beta/(1+beta)\n",
+ "I_B= 0 \n",
+ "V_B=0 \n",
+ "V_C= VCC-I_E*R_C # in volt\n",
+ "print \"The value of V_B = %0.2f V \" %V_B\n",
+ "print \"The value of V_E = %0.2f V\" %V_E\n",
+ "print \"The value of V_C = %0.2f V\" %(V_C)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of V_E = -2.20 Volt\n",
+ "The value of alpha = 0.78 Volt\n",
+ "The value of beta = 3.53 Volt\n",
+ "The value of V_C = 3.70 Volt\n",
+ "The value of V_B = 0.00 V \n",
+ "The value of V_E = -2.20 V\n",
+ "The value of V_C = 2.20 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.24 - page 269"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data \n",
+ "VBE_1= 0.7 # in V\n",
+ "VBE_2= 0.5 # in V\n",
+ "V_T= 0.025 # in V\n",
+ "I_C1= 10 # in mV\n",
+ "I_C1= I_C1*10**-3 # in A\n",
+ "# I_C1= I_S*%e**(VBE_1/V_T) (i)\n",
+ "# I_C2= I_S*%e**(VBE_2/V_T) (ii)\n",
+ "# Devide equation (ii) by (i)\n",
+ "I_C2= I_C1*exp((VBE_2-VBE_1)/V_T) # in A\n",
+ "print \"The value of I_C2 = %0.2f \u00b5A\" %(I_C2*10**6)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of I_C2 = 3.35 \u00b5A\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.25 - page 270"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data \n",
+ "R1= 10 # in k\u03a9\n",
+ "R1=R1*10**3 # in \u03a9\n",
+ "R2= 10 # in k\u03a9\n",
+ "R2=R2*10**3 # in \u03a9\n",
+ "I_C=.5 # mA\n",
+ "V_T= 0.025 #in V\n",
+ "I_C= I_C*10**-3 # in A\n",
+ "V= 10 # in V\n",
+ "Vth= V*R1/(R1+R2) # in V\n",
+ "Rth= R1*R2/(R1+R2) #in \u03a9\n",
+ "vo= I_C*Rth # in V\n",
+ "vi=V_T # in V\n",
+ "vo_by_vi= vo/vi #in V/V\n",
+ "print \"The value of vo/vi = %0.f V/V \" %vo_by_vi"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of vo/vi = 100 V/V \n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.27 - page 272"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data \n",
+ "V_B= 2 # in V\n",
+ "V_CC=5 # in V\n",
+ "V_BE= 0.7 # in V\n",
+ "R_E= 1*10**3 # in \u03a9\n",
+ "R_C= 1*10**3 # in \u03a9\n",
+ "V_E= V_B-V_BE # in V\n",
+ "I_E= V_E/R_E # in A\n",
+ "I_C= I_E # in A\n",
+ "V_C= V_CC-I_C*R_C #in V\n",
+ "print \"At V_B= +2 V\"\n",
+ "print \"The value of V_E = %0.2f Volts\" %V_E\n",
+ "print \"The value of V_C = %0.2f Volts\" %V_C\n",
+ "\n",
+ "# Part (b)\n",
+ "V_B= 0 #in V\n",
+ "V_E= 0 # in V\n",
+ "I_E= 0 # in A\n",
+ "V_C= 5 # in V\n",
+ "print \"At V_B= 0 V\"\n",
+ "print \"The value of V_E = %0.2f Volts\" %V_E\n",
+ "print \"The value of V_C = %0.2f Volts\" %V_C"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "At V_B= +2 V\n",
+ "The value of V_E = 1.30 Volts\n",
+ "The value of V_C = 3.70 Volts\n",
+ "At V_B= 0 V\n",
+ "The value of V_E = 0.00 Volts\n",
+ "The value of V_C = 5.00 Volts\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.28 - page 273"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data \n",
+ "V_B= 0 # in V\n",
+ "R_E=1*10**3 #in \u03a9\n",
+ "R_C=1*10**3 #in \u03a9\n",
+ "V_CC=5 # in V\n",
+ "V_BE= 0.7 # in V\n",
+ "V_E= V_B-V_BE # in V\n",
+ "I_E= (1+V_E)/R_E # in A\n",
+ "I_C= I_E # (approx) in A\n",
+ "V_C= V_CC-I_C*R_C #in V\n",
+ "print \"Part (a)\"\n",
+ "print \"The value of V_E = %0.2f Volts\" %V_E\n",
+ "print \"The value of V_C = %0.2f Volts\" %V_C\n",
+ "# For saturation \n",
+ "V_CE=0.2 # V\n",
+ "V_CB= -0.5 # in V\n",
+ "# I_C= 5-V_C/R_C and V_C= V_E-VCE, So\n",
+ "# I_C= (5.2-V_E)/R_C\n",
+ "# I_E= (V_E+1)/R_E and at the edge of saturation I_C=I_E,\n",
+ "V_E= 4.2/2 #/ in V\n",
+ "V_B= V_E+0.7 # in V\n",
+ "V_C= V_E+0.2 # in V\n",
+ "print \"Part (b) \"\n",
+ "print \"The value of V_E = %0.2f Volts\" %V_E\n",
+ "print \"The value of V_B = %0.2f Volts\" %V_B\n",
+ "print \"The value of V_C = %0.2f Volts\" %V_C\n",
+ "\n",
+ "# Note: In the book , there is a miss print in the last line of this question \n",
+ "#because V_E+0.2= 2.1+0.2 = 2.3 (not 2.8) , so answer in the book is wrong "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Part (a)\n",
+ "The value of V_E = -0.70 Volts\n",
+ "The value of V_C = 4.70 Volts\n",
+ "Part (b) \n",
+ "The value of V_E = 2.10 Volts\n",
+ "The value of V_B = 2.80 Volts\n",
+ "The value of V_C = 2.30 Volts\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.29 - page 275"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data \n",
+ "V_CC=5 # in V\n",
+ "V_E= 1 # in V\n",
+ "V_BE= 0.7 # in V\n",
+ "R_E=5*10**3 #in \u03a9\n",
+ "R_C=5*10**3 #in \u03a9\n",
+ "R_B= 20*10**3 # in \u03a9\n",
+ "I_E= (V_CC-V_E)/R_E # in A\n",
+ "# For pnp transistor V_BE= V_E-V_B\n",
+ "V_B= V_E-V_BE # in V\n",
+ "I_B= V_B/R_B # in A\n",
+ "I_C= I_E-I_B # in A\n",
+ "V_C= I_C*R_C-V_CC # in V\n",
+ "beta= I_C/I_B \n",
+ "alpha= I_C/I_E \n",
+ "print \"The value of V_B = %0.1f Volts\" %V_B\n",
+ "print \"The value of I_B = %0.3f mA\" %(I_B*10**3)\n",
+ "print \"The value of I_E = %0.1f mA\" %(I_E*10**3)\n",
+ "print \"The value of I_C = %0.3f mA\" %(I_C*10**3)\n",
+ "print \"The value of V_C = %0.3f Volts\" %V_C \n",
+ "print \"The value of beta is %0.1f \"%beta \n",
+ "print \"The value of alpha is %0.2f \"%alpha"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of V_B = 0.3 Volts\n",
+ "The value of I_B = 0.015 mA\n",
+ "The value of I_E = 0.8 mA\n",
+ "The value of I_C = 0.785 mA\n",
+ "The value of V_C = -1.075 Volts\n",
+ "The value of beta is 52.3 \n",
+ "The value of alpha is 0.98 \n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.30 - page 276"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "V_CC=5 # in V\n",
+ "V_T= 0.025 # in V\n",
+ "R_C=7.5*10**3 #in \u03a9\n",
+ "I_C= 0.5 # in mA\n",
+ "I_C= I_C*10**-3 # in A\n",
+ "I_E=I_C # (approx) in A\n",
+ "V_C= V_CC-I_C*R_C # in V\n",
+ "print \"dc voltage at the collector = %0.2f Volt\" %V_C\n",
+ "gm= I_C/V_T # in A/V\n",
+ "print \"The value of gm = %0.f mA/V\" %(gm*10**3)\n",
+ "# v_be= -v_i\n",
+ "# v_c= -gm*v_be*R_C\n",
+ "vcbyvi= gm*R_C # in V/V\n",
+ "print \"The value of vc/vi = %0.f V/V\" %(vcbyvi)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "dc voltage at the collector = 1.25 Volt\n",
+ "The value of gm = 20 mA/V\n",
+ "The value of vc/vi = 150 V/V\n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.31 - page 277"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "V_T= 0.025 # in V\n",
+ "I_E= 0.5 # in mA\n",
+ "I_E= I_E*10**-3 # in mA\n",
+ "Rsig= 50 # in \u03a9\n",
+ "R_C= 5*10**3 # in \u03a9\n",
+ "re= V_T/I_E # in ohm\n",
+ "Rin= Rsig+re # in ohm\n",
+ "print \"Input resistance = %0.f \u03a9\" %Rin\n",
+ "# Part(b)\n",
+ "# vo= -0.99*ie*R_C and ie= -v_sig/Rin\n",
+ "vo_by_v_sig= 0.99*R_C/Rin # in V/V\n",
+ "print \"The value of vo/vsig = %0.1f V/V\" %(vo_by_v_sig)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Input resistance = 100 \u03a9\n",
+ "The value of vo/vsig = 49.5 V/V\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.32 - page 278"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "beta= 200 \n",
+ "alpha= beta/(1+beta) \n",
+ "R_C= 100 # in \u03a9\n",
+ "R_B= 10 # in k\u03a9\n",
+ "Rsig= 1 # in k\u03a9\n",
+ "Rsig= Rsig*10**3 # in \u03a9\n",
+ "R_B= R_B*10**3 # in \u03a9\n",
+ "V_T= 25*10**-3 \n",
+ "V=1.5 # in V\n",
+ "I_E= 10 # in mA\n",
+ "I_E= I_E*10**-3 # in A\n",
+ "I_C= alpha*I_E # in A\n",
+ "V_C= I_C*R_C # in V\n",
+ "I_B= I_C/beta # in A\n",
+ "V_B= V-(R_B*I_B)\n",
+ "gm= I_C/V_T # in A/V\n",
+ "rpi= beta/gm # in \u03a9\n",
+ "Rib= rpi # in \u03a9\n",
+ "print \"The value of Rib = %0.2f \u03a9 \" %Rib\n",
+ "Rin= R_B*rpi/(R_B+rpi) # in \u03a9\n",
+ "print \"The value of Rin = %0.2f \u03a9\" %Rin\n",
+ "# vbe= v_sig*Rin/(Rsig+Rin) \n",
+ "vbe_by_vsig= Rin/(Rsig+Rin) \n",
+ "# vo= -gm*vbe*R_C and = -gm*v_sig*Rin/(Rsig+Rin)\n",
+ "vo_by_vsig= -gm*R_C*vbe_by_vsig # in V/V\n",
+ "print \"Overall voltage gain = %0.2f V/V\" %vo_by_vsig\n",
+ "# if \n",
+ "vo= 0.4 #(\u00b1) in V\n",
+ "vs= vo/abs(vo_by_vsig) # in V\n",
+ "vbe= vbe_by_vsig*vs # in V\n",
+ "print \"The value of v_sig = %0.2f mV\" %(vs*10**3)\n",
+ "print \"The value of v_be = %0.2f mV\" %(vbe*10**3)\n",
+ "\n",
+ "# Note: There is some difference between in this coding and book solution. But Coding is correct."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of Rib = 502.50 \u03a9 \n",
+ "The value of Rin = 478.46 \u03a9\n",
+ "Overall voltage gain = -12.88 V/V\n",
+ "The value of v_sig = 31.06 mV\n",
+ "The value of v_be = 10.05 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.33 - page 280"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# Given data\n",
+ "V_T= 0.025 # in V\n",
+ "# Part(a)\n",
+ "print \"Part (a) : \"\n",
+ "V_BE= 690 # in mV\n",
+ "V_BE=V_BE*10**-3 # in V\n",
+ "I_C= 1 # in mA\n",
+ "I_B= 50 # in \u00b5A\n",
+ "I_C=I_C*10**-3 # in A\n",
+ "I_B=I_B*10**-6 # in A\n",
+ "beta= I_C/I_B \n",
+ "alpha= beta/(1+beta) \n",
+ "I_E= I_C/alpha # in A\n",
+ "# I_C= I_S*exp(V_BE/V_T)\n",
+ "I_S= I_C/(exp(V_BE/V_T)) \n",
+ "print \"The value of beta is %0.1f \" %beta\n",
+ "print \"The value of alpha is %0.4f \"%alpha\n",
+ "print \"The value of I_E = %0.2f mA\" %(I_E*10**3)\n",
+ "print \"The value of I_S = %0.2e A\" %I_S\n",
+ "\n",
+ "# Part(b)\n",
+ "print \"Part (b) : \"\n",
+ "V_BE= 690 # in mV\n",
+ "V_BE=V_BE*10**-3 # in V\n",
+ "I_C= 1 # in mA\n",
+ "I_C=I_C*10**-3 # in A\n",
+ "I_E= 1.070 # in mA\n",
+ "I_E=I_E*10**-3 # in A\n",
+ "beta= I_C/I_B \n",
+ "alpha= I_C/I_E \n",
+ "beta= alpha/(1-alpha) \n",
+ "I_B= I_C/beta # in A\n",
+ "# I_C= I_S*exp(V_BE/V_T)\n",
+ "I_S= I_C/(exp(V_BE/V_T)) \n",
+ "print \"The value of beta is %0.3f \" %beta\n",
+ "print \"The value of alpha is %0.4f \"%alpha\n",
+ "print \"The value of I_B = %0.2f \u00b5A\" %(I_B*10**6)\n",
+ "print \"The value of I_S = %0.2e A\" %I_S\n",
+ "\n",
+ "# Part(c)\n",
+ "print \"Part (C) : \"\n",
+ "V_BE= 580 # in mV\n",
+ "V_BE=V_BE*10**-3 # in V\n",
+ "I_E= 0.137 # in mA\n",
+ "I_B= 7 # in \u00b5A\n",
+ "I_E=I_E*10**-3 # in A\n",
+ "I_B=I_B*10**-6 # in A\n",
+ "# I_C= alpha*I_E = bita*I_B\n",
+ "beta= I_E/I_B-1 \n",
+ "alpha= beta/(1+beta) \n",
+ "I_C= beta*I_B # in A\n",
+ "# I_C= I_S*exp(V_BE/V_T)\n",
+ "I_S= I_C/(exp(V_BE/V_T)) \n",
+ "print \"The value of beta is %0.3f \" %beta\n",
+ "print \"The value of alpha is %0.4f \"%alpha\n",
+ "print \"The value of I_C = %0.3f mA\" %(I_C*10**3)\n",
+ "print \"The value of I_S = %0.3e A\" %I_S\n",
+ "\n",
+ "# Part(d)\n",
+ "print \"Part (d) : \"\n",
+ "V_BE= 780 # in mV\n",
+ "V_BE=V_BE*10**-3 # in V\n",
+ "I_C= 10.10 # in mA\n",
+ "I_B= 120 # in \u00b5A\n",
+ "I_C=I_C*10**-3 # in A\n",
+ "I_B=I_B*10**-6 # in A\n",
+ "beta= I_C/I_B \n",
+ "alpha= beta/(1+beta) \n",
+ "I_E= I_C/alpha # in A\n",
+ "# I_C= I_S*%e**(V_BE/V_T)\n",
+ "I_S= I_C/(exp(V_BE/V_T)) \n",
+ "print \"The value of beta is %0.3f \" %beta\n",
+ "print \"The value of alpha is %0.4f \"%alpha\n",
+ "print \"The value of I_E = %0.2f mA\" %(I_E*10**3)\n",
+ "print \"The value of I_S = %0.4e A\" %I_S\n",
+ "\n",
+ "# Part(e)\n",
+ "print \"Part (e) : \"\n",
+ "V_BE= 820 # in mV\n",
+ "V_BE=V_BE*10**-3 # in V\n",
+ "I_E= 75 # in mA\n",
+ "I_B= 1050 # in \u00b5A\n",
+ "I_E=I_E*10**-3 # in A\n",
+ "I_B=I_B*10**-6 # in A\n",
+ "# I_C= alpha*I_E = bita*I_B\n",
+ "beta= I_E/I_B-1 \n",
+ "alpha= beta/(1+beta) \n",
+ "I_C= beta*I_B # in A\n",
+ "# I_C= I_S*exp(V_BE/V_T)\n",
+ "I_S= I_C/(exp(V_BE/V_T)) \n",
+ "print \"The value of beta is %0.3f \" %beta\n",
+ "print \"The value of alpha is %0.3f \"%alpha\n",
+ "print \"The value of I_C = %0.2f mA\" %(I_C*10**3)\n",
+ "print \"The value of I_S = %0.3e A\" %I_S"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Part (a) : \n",
+ "The value of beta is 20.0 \n",
+ "The value of alpha is 0.9524 \n",
+ "The value of I_E = 1.05 mA\n",
+ "The value of I_S = 1.03e-15 A\n",
+ "Part (b) : \n",
+ "The value of beta is 14.286 \n",
+ "The value of alpha is 0.9346 \n",
+ "The value of I_B = 70.00 \u00b5A\n",
+ "The value of I_S = 1.03e-15 A\n",
+ "Part (C) : \n",
+ "The value of beta is 18.571 \n",
+ "The value of alpha is 0.9489 \n",
+ "The value of I_C = 0.130 mA\n",
+ "The value of I_S = 1.092e-14 A\n",
+ "Part (d) : \n",
+ "The value of beta is 84.167 \n",
+ "The value of alpha is 0.9883 \n",
+ "The value of I_E = 10.22 mA\n",
+ "The value of I_S = 2.8466e-16 A\n",
+ "Part (e) : \n",
+ "The value of beta is 70.429 \n",
+ "The value of alpha is 0.986 \n",
+ "The value of I_C = 73.95 mA\n",
+ "The value of I_S = 4.208e-16 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file