{ "metadata": { "name": "", "signature": "sha256:f2f02a9bc5831c7f367935142b66b71aa0da896891093c898bfa38d6e16cd05d" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter05: Bipolar Junction\n", "Transistors (BJTs)" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex5.1:pg-395" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Example 5.1 : Design of given circuit with current 2mA\n", "# BJT will be operating in active mode\n", "B=100.0; # B is beta value\n", "a=B/(B+1); # a is alpha value\n", "v_BE=0.7; # v_BE (V) at i_C=1mA\n", "i_C1=1*10.0**-3; # (A)\n", "I_C2=2*10.0**-3; # (A)\n", "V_T=25*10.0**-3; # (V)\n", "V_C=5; # (V)\n", "V_CC=15.0; # (V)\n", "V_B=0; # (V)\n", "V_RC=V_CC-V_C;# V_RC is the voltage drop across resistor R_C\n", "R_C=V_RC/I_C;\n", "print R_C/1000,\"=Collector Resistance R_C (Kohm)\"\n", "V_BE=v_BE+V_T*math.log(I_C2/i_C1);\n", "print round(V_BE,3),\"=Base emitter voltage V_BE (V) at i_C=2mA\"\n", "V_E=V_B-V_BE;\n", "print round(V_E,3),\"=Emitter voltage V_E (V)\"\n", "I_E=I_C2/a;\n", "print I_E*1000,\"=Emitter current I_E (mA)\"\n", "R_E=(V_E-(-V_CC))/I_E;\n", "print round(R_E/1000,2),\"= Emitter resistance R_C (Kohm)\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "5.0 =Collector Resistance R_C (Kohm)\n", "0.717 =Base emitter voltage V_BE (V) at i_C=2mA\n", "-0.717 =Emitter voltage V_E (V)\n", "2.02 =Emitter current I_E (mA)\n", "7.07 = Emitter resistance R_C (Kohm)\n" ] } ], "prompt_number": 10 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex5.2:pg-413" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Example 5.2 : Consider a common Emitter circuit\n", "I_S=10.0**-15; # (A)\n", "R_C=6.8*10**3; # (ohm)\n", "V_CC=10.0; # (V)\n", "V_CE=3.2; # (V)\n", "V_T=25.0*10**-3; # (V)\n", "\n", "# 5.2a\n", "I_C=(V_CC-V_CE)/R_C;\n", "print I_C*1000,\"= Collector current (A)\"\n", "V_BE=V_T*math.log(I_C/I_S);\n", "print round(V_BE*1000,1),\"= V_BE (mV)\"\n", "\n", "# 5.2b\n", "V_in=5*10**-3; # sinuosoidal input 0f peak amplitide 5mv\n", "A_v=-(V_CC-V_CE)/V_T;\n", "print A_v,\"= Voltage gain\"\n", "V_o=-A_v*V_in; # negative sign to make positive value of voltage gain\n", "print V_o,\"= Amplitude of output voltage (V)\"\n", "\n", "# 5.2c\n", "v_CE=0.3# (V)\n", "i_C=(V_CC-v_CE)/R_C;\n", "print round(i_C*1000,2),\"= i_C (mA)\"\n", "v_be=V_T*math.log(i_C/I_C); # v_BE is positive increment in v_BE\n", "print round(v_be*1000),\"= required increment (mV)\"\n", "\n", "# 5.2d\n", "v_O=0.99*V_CC;\n", "R_C=6.8*10**3; # (ohm)\n", "i_C=(V_CC-v_O)/R_C;\n", "I_C=1*10**-3; # (A)\n", "print round(i_C*1000,4),\"= i_C (mA)\"\n", "v_be=V_T*math.log(i_C/I_C);\n", "print round(v_be*1000,1),\"= negative increment in v_BE (mV)\"\n", "\n", "# the answer for the C part is incorrect in the textbook" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "1.0 = Collector current (A)\n", "690.8 = V_BE (mV)\n", "-272.0 = Voltage gain\n", "1.36 = Amplitude of output voltage (V)\n", "1.43 = i_C (mA)\n", "9.0 = required increment (mV)\n", "0.0147 = i_C (mA)\n", "-105.5 = negative increment in v_BE (mV)\n" ] } ], "prompt_number": 20 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex5.3:pg-420" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Example 5.3 :Determine R_B \n", "# transistor is specified to have B value in the range of 50 to 150\n", "V_C=0.2; # V_C=V_CEsat\n", "V_CC=10; # (V)\n", "R_C=10**3; # (ohm)\n", "V_BB=5; # (V)\n", "V_BE=0.7; # (V)\n", "bmin=50; # range of bete is 50 to 150\n", "I_Csat=(V_CC-V_C)/R_C;\n", "I_BEOS=I_Csat/bmin; # I_B(EOS)=I_BEOS\n", "I_B=10*I_BEOS; # base current for an overdrive factor 10\n", "R_B=(V_BB-V_BE)/I_B;\n", "print round(R_B/1000,1),\"= Value of R_B (Kohm)\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "2.2 = Value of R_B (Kohm)\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex5.4:pg-422" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Example 5.4 : Analyse the circuit to find node voltages and branch currents\n", "V_BB= 4; # (V)\n", "V_CC=10; # (V)\n", "V_BE=0.7; # (V)\n", "b=100; # beta = 100\n", "R_E=3.3*10**3; # (ohm)\n", "R_C=4.7*10**3; # (ohm)\n", "V_E=V_BB-V_BE;\n", "print V_E,\"= Emitter voltage (V)\"\n", "I_E=(V_E-0)/R_E;\n", "print I_E*1000,\"= Emitter current (mA)\"\n", "a=b/(b+1.0) # alpha value\n", "I_C=I_E*a;\n", "print round(I_C*1000,2),\"= Collector current (mA)\"\n", "V_C=V_CC-I_C*R_C; # Applying ohm's law \n", "print round(V_C,1),\"= Collector voltage (V)\"\n", "I_B=I_E/(b+1);\n", "print round(I_B*1000,2),\"= Base current (mA)\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "3.3 = Emitter voltage (V)\n", "1.0 = Emitter current (mA)\n", "0.99 = Collector current (mA)\n", "5.3 = Collector voltage (V)\n", "0.01 = Base current (mA)\n" ] } ], "prompt_number": 11 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex5.5:pg-423" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Example 5.5 : Analyse the circuit to find node voltages and branch currents\n", "print \"Assuming active mode operation\"\n", "V_CC=10.0; # (V)\n", "R_C=4.7*10**3; # (V)\n", "R_E=3.3*10**3; # (ohm)\n", "V_BE=0.7; # (V)\n", "V_BB=6.0; # (V)\n", "V_CEsat=0.2; # (V)\n", "V_E=V_BB-V_BE; \n", "print V_E,\"= Emitter voltage (V)\"\n", "I_E=V_E/R_E;\n", "print round(I_E*1000,1),\"= Emitter current (mA)\"\n", "V_C=V_CC-I_E*R_C; # I_E=I_C\n", "print round(V_C,2),\"= Collector voltage (V)\"\n", "print \"Since V_C < V_B our assumption is wrong\\n Hence its saturation mode operation\"\n", "V_E=V_BB-V_BE;\n", "print V_E,\"= Emitter voltage (V)\"\n", "I_E=V_E/R_E;\n", "print round(I_E*1000,1),\"= Emitter current (mA)\"\n", "V_C=V_E+V_CEsat;\n", "print V_C,\"= Collector voltage (V)\"\n", "I_C=(V_CC-V_C)/R_C;\n", "print round(I_C*1000,2),\"= Collector current (mA)\"\n", "I_B=I_E-I_C;\n", "print round(I_B*1000,2),\"=Base current (mA)\"\n", "Bforced=I_C/I_B; # transistor is made to operate at a forced beta value\n", "print round(Bforced,1),\"= forced beta\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Assuming active mode operation\n", "5.3 = Emitter voltage (V)\n", "1.6 = Emitter current (mA)\n", "2.45 = Collector voltage (V)\n", "Since V_C < V_B our assumption is wrong\n", " Hence its saturation mode operation\n", "5.3 = Emitter voltage (V)\n", "1.6 = Emitter current (mA)\n", "5.5 = Collector voltage (V)\n", "0.96 = Collector current (mA)\n", "0.65 =Base current (mA)\n", "1.5 = forced beta\n" ] } ], "prompt_number": 25 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex5.6:pg-426" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Example 5.7: Analyse the circuit to find node voltages and branch currents\n", "V_CC=-10; # (V)\n", "R_E=2000; # (ohm)\n", "R_C=1000; # (ohm)\n", "V_EE=10; # (V)\n", "V_E=0.7; # (V) emitter base junction will be forward biased with V_E=V_EB=0.7V\n", "print V_E,\"= Emitter base junction is forward biased with V_E (V)\"\n", "I_E=(V_EE-V_E)/R_E;\n", "print round(I_E*1000,2),\"= Emitter current (mA)\"\n", "B=100; # Assuming beta 100\n", "a=B/(B+1.0);\n", "I_C=a*I_E; # Assuming the transistor to operate in active mode\n", "print round(I_C*1000,1),\"= Collector current (mA)\"\n", "V_C=V_CC+I_C*R_C;\n", "print round(V_C,1),\"= Collector voltage (V)\"\n", "I_B=I_E/(B+1);\n", "print round(I_B*1000,2),\"= Base current (mA)\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "0.7 = Emitter base junction is forward biased with V_E (V)\n", "4.65 = Emitter current (mA)\n", "4.6 = Collector current (mA)\n", "-5.4 = Collector voltage (V)\n", "0.05 = Base current (mA)\n" ] } ], "prompt_number": 32 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex5.8:pg-428" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Example 5.8 : Analyse the circuit to find node voltages and branch currents\n", "V_CC= 10; # (V)\n", "R_C=2000.0; # (ohm)\n", "V_BB=5.0; # (V)\n", "R_B=100.0*10**3; # (ohm)\n", "B=100.0; # beta value\n", "I_B=(V_BB-V_BE)/R_B;\n", "print round(I_B*1000,3),\"= Base current (mA)\"\n", "I_C=B*I_B;\n", "print round(I_C*1000,1),\"= Collector current (mA)\"\n", "V_C=V_CC-I_C*R_C;\n", "print V_C,\"= Collector voltage (V)\"\n", "V_B=0.7 ; # V_B=V_BE\n", "print V_B,\"= Base voltage (V)\"\n", "I_E=(B+1.0)*I_B;\n", "print round(I_E*1000,1),\"= Emitter current (mA)\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "0.043 = Base current (mA)\n", "4.3 = Collector current (mA)\n", "1.4 = Collector voltage (V)\n", "0.7 = Base voltage (V)\n", "4.3 = Emitter current (mA)\n" ] } ], "prompt_number": 39 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex5.9:pg-429" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Example 5.9 :Analyse the circuit to find node voltages and branch currents\n", "# assuming that the transistor is saturated \n", "V_CC=-5; # (V)\n", "V_EE=5; # (V)\n", "R_B=10000; # (ohm)\n", "R_C=10000; # (ohm)\n", "R_E=1000; # (ohm)\n", "V_EB=0.7; # (V)\n", "V_ECsat=0.2; # (V)\n", "# using the relation I_E=I_C+I_B\n", "V_B=3.75/1.2; #(V)\n", "print round(V_B,2),\"= Base voltage (V)\"\n", "V_E=V_B+V_EB;\n", "print round(V_E,2),\"= Emitter voltage (V)\"\n", "V_C=V_E-V_ECsat;\n", "print round(V_C,2),\"= Collector voltage (V)\"\n", "I_E=(V_EE-V_E)/R_E;\n", "print round(I_E*1000,2),\"= Emitter current (mA)\"\n", "I_B=V_B/R_B;\n", "print round(I_B*1000,2),\"= Base current (mA)\"\n", "I_C=(V_C-V_CC)/R_C;\n", "print round(I_C*1000,2),\"= Collector current (mA)\"\n", "Bforced=I_C/I_B; # Value of forced beta\n", "print round(Bforced,1), \"= Forced Beta value\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "3.13 = Base voltage (V)\n", "3.83 = Emitter voltage (V)\n", "3.63 = Collector voltage (V)\n", "1.17 = Emitter current (mA)\n", "0.31 = Base current (mA)\n", "0.86 = Collector current (mA)\n", "2.8 = Forced Beta value\n" ] } ], "prompt_number": 43 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex5.10:pg-430" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Exampe 5.10 : Analyse the circuit to find node voltages and branch currents\n", "V_CC=15; # (V)\n", "R_C=5000; # (ohm)\n", "R_B1=100*10**3; # (ohm)\n", "R_B2=50*10**3; # (ohm)\n", "R_E=3000; # (ohm)\n", "V_BE=0.7; # (V)\n", "B=100; # beta value\n", "V_BB=V_CC*R_B2/(R_B1+R_B2);\n", "print V_BB,\"=V_BB (V)\"\n", "R_BB=R_B1*R_B2/(R_B1+R_B2);\n", "print round(R_BB/1000.0,1),\"=R_BB (Kohm)\"\n", "I_B=I_E/(B+1.0);\n", "print round(I_B*1000,4),\"=Base current (mA)\"\n", "I_E=(V_BB-V_BE)/(R_E +(R_BB/(B+1)))\n", "print round(I_E*1000,2),\"=Emiter current (mA)\"\n", "I_B=I_E/(B+1.0)\n", "print round(I_B*1000,4),\"=Base current (mA)\"\n", "V_B=V_BE+I_E*R_E;\n", "print round(V_B,2),\"=Base voltage (V)\"\n", "a=B/(B+1.0); # alpha value\n", "I_C=a*I_E\n", "print round(I_C*1000,2),\"=Collector current (mA)\"\n", "V_C=V_CC-I_C*R_C;\n", "print V_C,\"=Collector voltage (V))\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "5 =V_BB (V)\n", "33.3 =R_BB (Kohm)\n", "0.0128 =Base current (mA)\n", "1.29 =Emiter current (mA)\n", "0.0128 =Base current (mA)\n", "4.57 =Base voltage (V)\n", "1.28 =Collector current (mA)\n", "8.60746885499 =Collector voltage (V))\n" ] } ], "prompt_number": 62 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex5.11:pg-432" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Example 5.11 :Analyse the circuit to find node voltages and branch currents\n", "V_CC=15.0; # (V)\n", "R_C1=5000.0; # (ohm)\n", "R_B1=100.0*10**3; # (ohm)\n", "R_B2=50.0*10**3; # (ohm)\n", "R_E=3000.0; # (ohm)\n", "V_BE=0.7; # (V)\n", "R_E2=2000.0; # (ohm)\n", "R_C2=2700.0; # (ohm)\n", "V_EB=0.7; # (V)\n", "B=100.0; # beta value\n", "V_BB=V_CC*R_B2/(R_B1+R_B2);\n", "R_BB=R_B1*R_B2/(R_B1+R_B2);\n", "I_E1=(V_BB-V_BE)/(R_E +(R_BB/(B+1.0)))\n", "print round(I_E1*1000,2),\"= I_E1 (mA)\"\n", "I_B1=I_E1/(B+1.0)\n", "print round(I_B1*1000,2),\"I_B1 (mA)\"\n", "V_B1=V_BE+I_E*R_E;\n", "print round(V_B1,2),\"=V_B1 (V)\"\n", "a=B/(B+1.0); # alpha value\n", "# beta and alpha values are same for the two transistors\n", "I_C1=a*I_E\n", "print round(I_C1*1000,2),\"= IC1 (mA)\"\n", "V_C1=V_CC-I_C1*R_C1;\n", "print round(V_C1,1),\"V_C1 (V))\"\n", "V_E2=V_C1+V_EB;\n", "print round(V_E2,1),\"V_E2(V)\"\n", "I_E2=(V_CC-V_E2)/R_E2;\n", "print round(I_E2*1000,2),\"I_E2 (mA)\"\n", "I_C2=a*I_E2;\n", "print round(I_C2*1000,2),\"I_C2 (mA)\"\n", "V_C2=I_C2*R_C2;\n", "print round(V_C2,2),\"V_C2 (V)\"\n", "I_B2=I_E2/(B+1.0);\n", "print round(I_B2*1000,3),\"I_B2 (mA)\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "1.29 = I_E1 (mA)\n", "0.01 I_B1 (mA)\n", "4.57 =V_B1 (V)\n", "1.28 = IC1 (mA)\n", "8.6 V_C1 (V))\n", "9.3 V_E2(V)\n", "2.85 I_E2 (mA)\n", "2.82 I_C2 (mA)\n", "7.61 V_C2 (V)\n", "0.028 I_B2 (mA)\n" ] } ], "prompt_number": 77 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex5.13:pg-438" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Example 5.13 : Design of bias network of the amplifier\n", "I_E=1*10**-3; # (A)\n", "V_CC=12; # (V)\n", "B=100; # beta value\n", "V_B=4; # (V)\n", "V_BE=0.7; # (V)\n", "R1=80; # (ohm)\n", "R2=40; # (ohm)\n", "V_C=8; # (V)\n", "V_E=V_B-V_BE;\n", "print V_E,\"= Emitter voltage (V)\"\n", "R_E=V_E/I_E;\n", "print R_E/1000,\"= Emitter resistance (Kohm)\"\n", "I_E=(V_B-V_BE)/(R_E+(R1*R2/(R1+R2))/(B+1));\n", "print I_E*1000,\"= more accurate value for I_E (mA) for R1=80 ohm and R2=40 ohm\"\n", "R1=8; # (ohm)\n", "R2=4; # (ohm)\n", "I_E=(V_B-V_BE)/(R_E+(R1*R2/(R1+R2))/(B+1));\n", "print I_E*1000,\"= more accurate value for I_E (mA) for R1=8 ohm and R2=4 ohm\"\n", "R_C=(V_CC-V_C)/I_E; # I_E=I_C\n", "print round(R_C/1000.0),\"= Collector resistor (Kohm)\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "3.3 = Emitter voltage (V)\n", "3.3 = Emitter resistance (Kohm)\n", "1.0 = more accurate value for I_E (mA) for R1=80 ohm and R2=40 ohm\n", "1.0 = more accurate value for I_E (mA) for R1=8 ohm and R2=4 ohm\n", "4.0 = Collector resistor (Kohm)\n" ] } ], "prompt_number": 81 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex5.14:pg-450" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Example 5.14 : Analysis of transistor amplifier\n", "V_CC=10; # (V)\n", "R_C=3000; # (ohm)\n", "R_BB=100*10**3; # (ohm)\n", "V_BB=3; # (V)\n", "V_BE=0.7; # (V)\n", "V_T=25*10**-3; # (V)\n", "I_B=(V_BB-V_BE)/R_BB;\n", "print round(I_B*1000,2),\"= Base current (mA)\"\n", "I_C=B*I_B;\n", "print round(I_C*1000,2),\"= Collector current (mA)\"\n", "V_C=V_CC-I_C*R_C;\n", "print V_C,\"= Collecor voltage (V)\"\n", "I_E=B*I_C/(B+1);\n", "r_e=V_T/I_E;\n", "print round(r_e,2),\"= r_e (ohm)\"\n", "g_m=I_C/V_T;\n", "print g_m*1000,\"= g_m (mA/V)\"\n", "r_pi=B/g_m;\n", "print round(r_pi/1000,2),\"= r_pi (Kohm)\"\n", "# v_i is input voltage let us assume it to be 1 V\n", "v_i=1;\n", "v_be=v_i*r_pi/(r_pi+R_BB)\n", "print round(v_be,3),\"= v_be\"\n", "v_o=-g_m*R_C*v_be;\n", "print round(v_o),\"= Output voltage (V)\"\n", "A_v=v_o/v_i;\n", "print round(A_v),\"= Voltage gain\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "0.02 = Base current (mA)\n", "2.3 = Collector current (mA)\n", "3.1 = Collecor voltage (V)\n", "10.98 = r_e (ohm)\n", "92.0 = g_m (mA/V)\n", "1.09 = r_pi (Kohm)\n", "0.011 = v_be\n", "-3.0 = Output voltage (V)\n", "-3.0 = Voltage gain\n" ] } ], "prompt_number": 92 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex5.17:pg-464" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Example 5.17 : Amplifier parameters\n", "# Transistor amplifier is having a open circuit voltage of v_sig of 10mV\n", "v_sig=10*10.0**-3; # (V)\n", "R_L=10*10.0**3; # (ohm)\n", "R_sig=100*10.0**3; # (ohm)\n", "print \"Calculation with R_L infinite\"\n", "v_i=9.0; # (V)\n", "v_o=90.0; # (V)\n", "A_vo=v_o/v_i;\n", "print A_vo,\"= A_vo (V/V)\"\n", "G_vo=v_o/A_vo;\n", "print G_vo,\"= G_vo (V/V)\"\n", "R_i=G_vo*R_sig/(A_vo-G_vo)\n", "print (R_i/1000),\"= R_i (Kohm)\"\n", "print \"Calculations with R_L = 10k ohm\"\n", "v_o=70*10**-3; # (V)\n", "v_i=8*10**-3; # (V)\n", "A_v=v_o/v_i;\n", "print A_v,\"= Voltage gain A_v (V/V)\"\n", "G_v=v_o*10**3/10.0;\n", "print G_v,\"= G_v (V/V)\"\n", "R_o=(A_vo-A_v)*R_L/A_v;\n", "print round(R_o/1000,2),\"= R_o (Kohm)\"\n", "R_out=(G_vo-G_v)*R_L/G_v;\n", "print round(R_out/1000,2),\"= R_out (Kohm)\"\n", "R_in=v_i*R_sig/(v_sig-v_i);\n", "print R_in/1000,\"= R_in (Kohm)\"\n", "G_m=A_vo/R_o;\n", "print round(G_m*1000),\"= G_m (mA/V)\"\n", "A_i=A_v*R_in/R_L;\n", "print A_i,\"= A_i (A/A)\"\n", "R_ino=R_sig/((1+R_sig/R_i)*(R_out/R_o)-1); # R_ino is R_in at R_L=0\n", "print round(R_ino/1000,1),\"= R_in at R_L =0\"\n", "A_is=A_vo*R_ino/R_o;\n", "print int(A_is),\"= A_is (A/A)\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Calculation with R_L infinite\n", "10.0 = A_vo (V/V)\n", "9.0 = G_vo (V/V)\n", "900.0 = R_i (Kohm)\n", "Calculations with R_L = 10k ohm\n", "8.75 = Voltage gain A_v (V/V)\n", "7.0 = G_v (V/V)\n", "1.43 = R_o (Kohm)\n", "2.86 = R_out (Kohm)\n", "400.0 = R_in (Kohm)\n", "7.0 = G_m (mA/V)\n", "350.0 = A_i (A/A)\n", "81.8 = R_in at R_L =0\n", "572 = A_is (A/A)\n" ] } ], "prompt_number": 103 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex5.18:pg-497" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Example 5.18 : Midband gain and 3dB frequency\n", "# Transistor is biased at I_C=1mA\n", "V_CC=10.0; # (V)\n", "V_EE=10.0; # (V)\n", "I=0.001; # (A)\n", "R_B=100000.0; # (ohm)\n", "R_C=8000.0; # (ohm)\n", "R_sig=5000.0; #(ohm)\n", "R_L=5000.0; # (ohm)\n", "B=100.0; # beta value\n", "V_A=100.0; # (V)\n", "C_u=1*10.0**-12; # (F)\n", "f_T=800.0*10**6; # (Hz)\n", "I_C=0.001; # (A)\n", "r_x=50.0; # (ohm)\n", "# Values of hybrid pi model parameters\n", "g_m=I_C/V_T;\n", "r_pi=B/g_m;\n", "r_o=V_A/I_C;\n", "w_T=2*math.pi*f_T;\n", "CpiplusCu=g_m/w_T; # C_u+C_pi\n", "C_pi=CpiplusCu-C_u;\n", "R_l=r_o*R_C*R_L/(r_o*R_C+R_C*R_L+R_L*r_o) # R_l=R_L'\n", "A_M=R_B*r_pi*g_m*R_l/((R_B+R_sig)*(r_pi+r_x+(R_B*R_sig/(R_B+R_sig))));\n", "print round(A_M),\"= Midband gain (V/V)\"\n", "R_seff=(r_pi*(r_x+R_B*R_sig/(R_B+R_sig)))/(r_pi+r_x+R_B*R_sig/(R_B+R_sig)); # Effective source resistance R_seff=R'_sig\n", "C_in=C_pi+C_u*(1+R_l*g_m);\n", "f_H=1/(2*math.pi*C_in*R_seff);\n", "print int(f_H/1000),\"= 3dB frequency (KHz)\"\n", "\n", "# the answer is the book is slightly different due to approximation" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "39.0 = Midband gain (V/V)\n", "759 = 3dB frequency (KHz)\n" ] } ], "prompt_number": 109 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex5.19:pg-502" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Example 5.19 : To select values of capacitance required\n", "R_B=100000.0; # (ohm)\n", "r_pi=2500.0; # (ohm)\n", "R_C=8000.0; # (ohm)\n", "R_L=5000.0; # (ohm)\n", "R_sig=5000.0; # (ohm)\n", "B=100.0; # beta value\n", "g_m=0.04; # (A/V)\n", "r_pi=2500.0; #(ohm)\n", "f_L=100.0; # (Hz)\n", "r_e=25.0; # (ohm)\n", "R_C1=R_B*r_pi/(R_B+r_pi)+R_sig; # Resistance seen by C_C1 \n", "R_E=r_e+R_B*R_sig/((R_B+R_sig)*(B+1)); # Resistance seen by C_E\n", "R_C2=R_C+R_L;# Resistance seen by C_C2\n", "w_L=2*math.pi*f_L;\n", "C_E=1/(R_E*0.8*w_L); #C_E is to contribute only 80% of the value of w_L\n", "print round(C_E*1e6,1),\"= C_E (microF)\" \n", "C_C1=1/(R_C1*0.1*w_L); #C_C1 is to contribute only 10% of the value of f_L\n", "print round(C_C1*1e6,1),\"= C_C1 (microF)\"\n", "C_C2=1/(R_C2*0.1*w_L); #C_C2 should contribute only 10% of the value of f_L\n", "print round(C_C2*1e6,1),\"= C_C2 (microF)\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "27.6 = C_E (microF)\n", "2.1 = C_C1 (microF)\n", "1.2 = C_C2 (microF)\n" ] } ], "prompt_number": 116 } ], "metadata": {} } ] }