{
"metadata": {
"name": "",
"signature": "sha256:8d83d12da307337593a7cd775da037b9954c818c998b8e588f2f7e2538d508ce"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"Chapter 24 , Singly-Stage BJT Amplifiers"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 24.1 , Page Number 590"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"#Variables\n",
"\n",
"VCC = 10.0 #Source voltage (in volts)\n",
"RC = 10.0 #Collector resistance (in kilo-ohm)\n",
"RB = 1.0 * 10**3 #Base resistance (in kilo-ohm)\n",
"beta = 100.0 #Common emitter current gain \n",
"VBE = 0.7 #Emitter-to-Base Voltage (in volts)\n",
"\n",
"#Calculation\n",
"\n",
"IB = (VCC - VBE) / RB #Base current (in milli-Ampere)\n",
"IC = beta * IB #Collector current (in milli-Ampere)\n",
"IE = IC #Emitter current (in milli-Ampere)\n",
"r1e = 25.0 / IE * 10**-3 #a.c resistance of emitter diode (in kilo-ohm)\n",
"R1 = beta * r1e #Input resistance looking directly into the base (in kilo-ohm)\n",
"Ris = RB * R1/(RB + R1) #Stage input resistance (in kilo-ohm)\n",
"Ro = RC #Output resistance (in kilo-ohm)\n",
"Av = RC / r1e #Voltage gain\n",
" \n",
"#Result\n",
"\n",
"print \"Input resistance looking into the base is \",round(R1,2),\" kilo-ohm.\\nInput resistance of the stage is \",round(Ris,3),\" kilo-ohm.\\nOutput resistance is \",Ro,\" kilo-ohm.\\nVoltage gain is \",Av,\".\"\n",
"\n",
"#Correction to be done in the book for the formula of Ris in the question."
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Input resistance looking into the base is 2.69 kilo-ohm.\n",
"Input resistance of the stage is 2.681 kilo-ohm.\n",
"Output resistance is 10.0 kilo-ohm.\n",
"Voltage gain is 372.0 .\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 24.2 , Page Number 591"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"#Variables\n",
"\n",
"Ri = 2.5 #Input resistance (in kilo-ohm)\n",
"Av = 200.0 #Voltage gain\n",
"Vs = 5.0 * 10**-3 #Input signal voltage (in volts)\n",
"beta = 50.0 #Common emitter current gain\n",
"\n",
"#Calculation\n",
"\n",
"IB = Vs / Ri #Base current (in milli-Ampere) \n",
"IC = beta * IB #Collector current (in milli-Ampere)\n",
"Ai = beta #Current gain\n",
"Ap = Ai * Av #Power gain\n",
"Gp = 10 * math.log10(Ap) #dB power gain (in decibel)\n",
"\n",
"#Result\n",
"\n",
"print \"The base current is \",IB,\" mA.\\nThe collector current is \",IC,\" mA.\\nThe power gain is \",Ap,\".\\nThe dB power gain is \",Gp,\" dB.\"\n",
"\n",
"#Wrong unit of IB. IB is in micro Ampere but in book it is given in milli-Ampere in solution.\n",
"#Also wrong unit in IC."
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The base current is 0.002 mA.\n",
"The collector current is 0.1 mA.\n",
"The power gain is 10000.0 .\n",
"The dB power gain is 40.0 dB.\n"
]
}
],
"prompt_number": 2
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 24.3 , Page Number 593"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"#Variables\n",
"\n",
"VCC = 20.0 #Source voltage (in volts)\n",
"RC = 5.0 #Collector resistance (in kilo-ohm)\n",
"RE = 1.0 #Emitter resistance (in kilo-ohm)\n",
"RB = 100.0 #Base resistance (in kilo-ohm)\n",
"beta = 150.0 #Common emitter current gain\n",
"\n",
"#Calculation\n",
"\n",
"IC = VCC / (RE + RB/beta) #Collector current (in milli-Ampere)\n",
"IE = IC #Emitter current (in milli-Ampere)\n",
"r1e = 25.0 / IE * 10**-3 #a.c. resistance of emitter diode (in kilo-ohm)\n",
"Ri = beta * (r1e + RE) #Input resistance looking directly into the base (in kilo-ohm)\n",
"Ris = RB * Ri / (RB + Ri) #Input resistance of the stage (in kilo-ohm)\n",
"Av = RC / RE #Voltage gain \n",
"Gp = 10 * math.log10(Av) #dB power gain (in decibel)\n",
"\n",
"#Result\n",
"\n",
"print \"Input resistance looking into the base is \",round(Ri),\" kilo-ohm.\\nInput resistance of the stage is \",round(Ris),\" kilo-ohm.\\nVoltage gain is \",Av,\".\\ndB voltage gain is \",round(Gp),\" dB.\""
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Input resistance looking into the base is 150.0 kilo-ohm.\n",
"Input resistance of the stage is 60.0 kilo-ohm.\n",
"Voltage gain is 5.0 .\n",
"dB voltage gain is 7.0 dB.\n"
]
}
],
"prompt_number": 3
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 24.4 , Page Number 595"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"#Variables\n",
"\n",
"VCC = 12.0 #Source voltage (in volts)\n",
"RC = 10.0 * 10**3 #Collector resistance (in ohm)\n",
"RE = 1.0 * 10**3 #Emitter resistance (in ohm)\n",
"RB = 500.0 * 10**3 #Base resistance (in ohm)\n",
"beta = 50.0 #Common emitter current gain\n",
"\n",
"#Calculation\n",
"\n",
"IC = VCC / (RE + RB/beta) #Collector current (in Ampere)\n",
"IE = IC #Emitter current (in Ampere)\n",
"r1e = 25.0 / IE * 10**-3 #a.c. resistance of emitter diode (in ohm)\n",
"Ri = beta * (r1e) #Input resistance looking directly into the base (in ohm)\n",
"Ris = RB * Ri / (RB + Ri) #Input resistance of the stage (in ohm)\n",
"Av = RC / r1e #Voltage gain \n",
"AV1 = RC / RE #New voltage gain \n",
"\n",
"#Result\n",
"\n",
"print \"Input resistance looking into the base is \",round(Ri),\" ohm.\\nInput resistance of the stage is \",round(Ris,1),\" kilo-ohm.\\nVoltage gain is \",round(Av,2),\".\\nNew Voltage gain is \",AV1,\".\"\n",
"\n",
"#Slight variations in answers due to high precision."
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Input resistance looking into the base is 1146.0 ohm.\n",
"Input resistance of the stage is 1143.2 kilo-ohm.\n",
"Voltage gain is 436.36 .\n",
"New Voltage gain is 10.0 .\n"
]
}
],
"prompt_number": 4
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 24.5 , Page Number 597"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"#Variables\n",
"\n",
"VCC = 30.0 #Source voltage (in volts)\n",
"RC = 10.0 #Collector resistance (in kilo-ohm)\n",
"RE = 8.2 #Emitter resistance (in kilo-ohm)\n",
"RL = 3.3 #Load resistance (in kilo-ohm)\n",
"beta = 200.0 #Common emitter current gain\n",
"VBE = 0.7 #Emitter-to-Base Voltage (in volts)\n",
"R1 = 47.0 #Resistance (in kilo-ohm) \n",
"R2 = 15.0 #Resistance (in kilo-ohm)\n",
"Vs = 5.0 #a.c voltage (in milli-volts)\n",
"\n",
"#Calculation\n",
"\n",
"Vth = VCC * R2 / (R1 + R2) #Thevenin's voltage (in volts)\n",
"Rth = R1 * R2 / (R1 + R2) #Thevenin's equivalent voltage (in volts)\n",
"IE = (Vth - VBE)/(RE + Rth/beta) #Emitter current (in milli-Ampere)\n",
"r1e = 25.0 / IE #a.c. resistance of emitter diode (in ohm) \n",
"rL = RC * RL/(RC + RL) #a.c load seen by the amplifier (in kilo-ohm) \n",
"Av = rL * 10**3 / r1e #Voltage gain\n",
"vo = Av * Vs #Output voltage (in volts)\n",
"Ri = beta * r1e * 10**-3 #Input resistance looking directly into the base (in ohm) \n",
"Ris = Rth * Ri / (Rth + Ri) #input resistance of the stage (in ohm)\n",
"\n",
"#Result\n",
"\n",
"print \"a.c output voltage is \",round(vo,2),\" mV.\\nInput impedance for the circuit is \",round(Ris),\" kilo-ohm.\"\n",
"\n",
"#Slight variation in value of vo due to higher precision. "
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"a.c output voltage is 394.14 mV.\n",
"Input impedance for the circuit is 4.0 kilo-ohm.\n"
]
}
],
"prompt_number": 5
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 24.6 , Page Number 599"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"#Variables\n",
"\n",
"VCC = 10.0 #Source voltage (in volts)\n",
"RC = 5.0 #Collector resistance (in kilo-ohm)\n",
"RE = 1.0 #Emitter resistance (in kilo-ohm)\n",
"beta = 50.0 #Common emitter current gain\n",
"VBE = 0.7 #Emitter-to-Base Voltage (in volts)\n",
"R1 = 50.0 #Resistance (in kilo-ohm) \n",
"R2 = 10.0 #Resistance (in kilo-ohm)\n",
"Vs = 10.0 #a.c voltage (in milli-volts)\n",
"RS = 600.0 * 10**-3 #Source resistance (in kilo-ohm) \n",
"\n",
"#Calculation\n",
"\n",
"Vth = VCC * R2 / (R1 + R2) #Thevenin's voltage (in volts)\n",
"Rth = R1 * R2 / (R1 + R2) #Thevenin's equivalent voltage (in volts)\n",
"IE = (Vth - VBE)/(RE + Rth/beta) #Emitter current (in milli-Ampere)\n",
"r1e = 25.0 / IE * 10**-3 #a.c. resistance of emitter diode (in kilo-hm) \n",
"Ris = Rth * beta*r1e/(Rth + beta*r1e) #input resistance of the stage (in ohm)\n",
"rL = RC * R1/(RC + R1) #a.c load seen by the amplifier (in kilo-ohm) \n",
"Av = rL / r1e #Voltage gain\n",
"vin = Vs * Ris / (Ris + RS) #input voltage (in milli-volts) \n",
"vo = Av * vin #Output voltage (in milli-volts)\n",
"Avs = Av * vin / Vs #Overall voltage gain \n",
"\n",
"#Result\n",
"\n",
"print \"The output voltage is \",round(vo * 10**-3,3),\" V.\\nThe overall voltage gain is \",round(Avs,2),\".\"\n",
"\n",
"#Slight variation due to higher precision."
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The output voltage is 1.025 V.\n",
"The overall voltage gain is 102.5 .\n"
]
}
],
"prompt_number": 6
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 24.7 , Page Number 601"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"#Variables\n",
"\n",
"VCC = 12.0 #Source voltage (in volts)\n",
"RC = 4.0 #Collector resistance (in kilo-ohm)\n",
"RE = 3.3 #Emitter resistance (in kilo-ohm)\n",
"beta = 120.0 #Common emitter current gain\n",
"VBE = 0.7 #Emitter-to-Base Voltage (in volts)\n",
"R1 = 60.0 #Resistance (in kilo-ohm) \n",
"R2 = 30.0 #Resistance (in kilo-ohm)\n",
"\n",
"#Calculation\n",
"\n",
"Vth = VCC * R2 / (R1 + R2) #Thevenin's voltage (in volts)\n",
"Rth = R1 * R2 / (R1 + R2) #Thevenin's equivalent voltage (in volts)\n",
"IE = (Vth - VBE)/(RE + Rth/beta) #Emitter current (in milli-Ampere)\n",
"r1e = 25.0 / IE * 10**-3 #a.c. resistance of emitter diode (in kilo-hm)\n",
"rL = RC #Load resistance (in kilo-ohm)\n",
"Av = RC / r1e #Voltage gain\n",
"\n",
"#Result\n",
"\n",
"print \"The voltage gain is \",round(Av,1),\".\"\n",
"\n",
"#Slight variation due to higher precision."
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The voltage gain is 152.3 .\n"
]
}
],
"prompt_number": 7
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 24.8 , Page Number 601"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"#Variables\n",
"\n",
"VCC = -18.0 #Source voltage (in volts)\n",
"RC = 4.3 #Collector resistance (in kilo-ohm)\n",
"RE = 1.0 #Emitter resistance (in kilo-ohm)\n",
"beta = 200.0 #Common emitter current gain\n",
"VBE = -0.7 #Emitter-to-Base Voltage (in volts)\n",
"R1 = 39.0 #Resistance (in kilo-ohm) \n",
"R2 = 8.2 #Resistance (in kilo-ohm)\n",
"RL = 3.0 #Load resistance (in kilo-ohm)\n",
"\n",
"#Calculation\n",
"\n",
"Vth = VCC * R2 / (R1 + R2) #Thevenin's voltage (in volts)\n",
"Rth = R1 * R2 / (R1 + R2) #Thevenin's equivalent voltage (in volts)\n",
"IC = (Vth - VBE)/(RE + Rth/beta) #Collector current (in milli-Ampere)\n",
"IE = -IC #Emitter current (in milli-Amper) \n",
"r1e = 30.0/IE * 10**-3 #a.ac resistance (in kilo-ohm)\n",
"Ris = Rth * beta*r1e/(Rth + beta*r1e) #input resistance of the stage (in ohm)\n",
"rL = RC * RL / (RC + RL) #a.c. load resistance (in kilo-ohm) \n",
"Av = rL / r1e #Voltage gain \n",
"\n",
"#Result\n",
"\n",
"print \"Voltage gain is \",round(Av,1),\".\"\n",
"\n",
"#printing mistake in book about formula for rL it is in fact rL = RC * RL /(RC + RL).\n",
"#Slight variation due to higher precision."
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Voltage gain is 138.3 .\n"
]
}
],
"prompt_number": 8
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 24.9 , Page Number 603"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"#Variables\n",
"\n",
"VCC = 20.0 #Source voltage (in volts)\n",
"RC = 5.7 #Collector resistance (in kilo-ohm)\n",
"RE = 1.0 #Emitter resistance (in kilo-ohm)\n",
"beta = 100.0 #Common emitter current gain\n",
"VBE = 0.7 #Emitter-to-Base Voltage (in volts)\n",
"R1 = 100.0 #Resistance (in kilo-ohm) \n",
"R2 = 10.0 #Resistance (in kilo-ohm)\n",
"Vs = 10.0 * 10**-3 #a.c voltage (in volts)\n",
"RS = 100.0 * 10**-3 #Source resistance (in kilo-ohm) \n",
"\n",
"#Calculation\n",
"\n",
"Vth = VCC * R2 /(R1 + R2) #Thevenin's voltage (in volts)\n",
"Rth = R1 * R2 / (R1 + R2) #Thevenin's equivalent resistance (in kilo-ohm)\n",
"IE = (Vth - VBE)/(RE + Rth/beta) #Emitter current (in milli-Ampere)\n",
"r1e = 25.0 / IE * 10**-3 #a.c. resistance of emitter diode (in kilo-hm)\n",
"Ris = Rth * beta*r1e/(Rth + beta*r1e) #input resistance of the stage (in ohm)\n",
"rL = RC #Load resistance (in kilo-ohm)\n",
"Av = rL / r1e #Voltage gain \n",
"vin = Vs * Ris / (Ris + RS) #input voltage (in milli-volts) \n",
"vo = Av * vin #Output voltage (in milli-volts)\n",
"Avs = Av * vin / Vs #Overall voltage gain \n",
"\n",
"#Result\n",
"\n",
"print \"Av is \",Av,\".\\nRi is \",round(Ris * 10**3,2),\" ohm.\\nVo is \",round(vo,2),\" V.\\nAvs is \",round(Avs,2),\".\"\n",
"\n",
"#Slight variation due to higher precision."
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Av is 233.7 .\n",
"Ri is 1923.08 ohm.\n",
"Vo is 2.22 V.\n",
"Avs is 222.15 .\n"
]
}
],
"prompt_number": 15
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 24.10 , Page Number 604"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"#Variables\n",
"\n",
"VCC = -18.0 #Source voltage (in volts)\n",
"RC = 4.3 #Collector resistance (in kilo-ohm)\n",
"RE = 1.0 #Emitter resistance (in kilo-ohm)\n",
"beta = 200.0 #Common emitter current gain\n",
"VBE = -0.7 #Emitter-to-Base Voltage (in volts)\n",
"R1 = 39.0 #Resistance (in kilo-ohm) \n",
"R2 = 8.2 #Resistance (in kilo-ohm)\n",
"RV = 75.0 * 10**-3 #Resistance (in kilo-ohm)\n",
"re = 30.0 * 10**-3 #Emitter resistance (in kilo-ohm)\n",
"RL = 3.3 #Load resistance (in kilo-ohm)\n",
"\n",
"#Calculation\n",
"\n",
"Vth = VCC * R2 /(R1 + R2) #Thevenin's voltage (in volts)\n",
"Rth = R1 * R2 / (R1 + R2) #Thevenin's equivalent resistance (in kilo-ohm)\n",
"IE = (Vth - VBE)/(RE + Rth/beta) #Emitter current (in milli-Ampere)\n",
"IC = round(IE,2) #Collector current (in milli-Ampere) \n",
"VCE = VCC - IC * (RC + RE) #Collector-to-Emitter voltage (in volts)\n",
"r1e = 30.0/abs(IE) * 10**-3 #a.c. resistance (in kilo-ohm)\n",
"Ris = Rth * beta*r1e/(Rth + beta*r1e) #input resistance of the stage (in ohm)\n",
"rL = RC * RL / (RC + RL) #Load resistance (in kilo-ohm)\n",
"Av = rL / (r1e + RV) #Voltage gain \n",
"\n",
"#Result\n",
"\n",
"print \"Voltage gain Av is \",round(Av,1),\".\\nInput impedance is ,\",round(Ris,3),\" kilo-ohm.\\nVCE is \",VCE,\" V.\" \n",
"\n",
"#Slight variation due to higher precision."
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Voltage gain Av is 21.3 .\n",
"Input impedance is , 1.856 kilo-ohm.\n",
"VCE is -5.545 V.\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 24.11 , Page Number 606"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"#Variables\n",
"\n",
"VCC = 10.0 #Source voltage (in volts)\n",
"RC = 5.0 #Collector resistance (in kilo-ohm)\n",
"rE = 500 * 10**-3 #Emitter resistance (in kilo-ohm)\n",
"beta = 50.0 #Common emitter current gain\n",
"VBE = 0.7 #Emitter-to-Base Voltage (in volts)\n",
"R1 = 50.0 #Resistance (in kilo-ohm) \n",
"R2 = 10.0 #Resistance (in kilo-ohm)\n",
"Vs = 100.0 * 10**-3 #a.c voltage (in volts)\n",
"RS = 600.0 * 10**-3 #Source resistance (in kilo-ohm)\n",
"RL = 50.0 #Load resistance (in kilo-ohm)\n",
"RE1 = 500.0 * 10**-3 #Resistance (in kilo-ohm) \n",
"\n",
"#Calculation\n",
"\n",
"Vth = VCC * R2 /(R1 + R2) #Thevenin's voltage (in volts)\n",
"Rth = R1 * R2 / (R1 + R2) #Thevenin's equivalent resistance (in kilo-ohm)\n",
"RE = RE1 + rE #Emitter total resistance (in kilo-ohm)\n",
"IE = (Vth - VBE)/(RE + Rth/beta) #Emitter current (in milli-Ampere)\n",
"r1e = 25.0 / IE * 10**-3 #a.c. resistance (in kilo-ohm) \n",
"Ri = beta * (rE + r1e) #Input resistance directly into the base (in kilo-ohm)\n",
"Ris = Rth * Ri/(Rth + Ri) #Input resistance of the stage (in kilo-ohm)\n",
"rL = RC * RL / (RC + RL) #a.c. load resistance (in kilo-ohm)\n",
"Av = rL/(rE + r1e) #Voltage gain\n",
"Avs = Av * Ris / (RS + Ris) #Overall voltage gain\n",
"Vo = Avs * Vs #Output voltage (in volts)\n",
"\n",
"#Result\n",
"\n",
"print \"Input resistance looking directly into the base is \",round(Ri,1),\" kilo-ohm.\\nInput resistance of the stage is \",round(Ris,2),\" kilo-ohm.\\nVoltage gain is \",round(Av,3),\" .\\nOverall voltage gain is \",round(Avs,2),\" .\\nOutput voltage is \",round(Vo,2),\"V.\"\n",
"\n",
"#Slight variations due to higher precision.\n",
"#Vo in the book is not properly calculated. Calculation error in Vo. Vo value should be 0.78 V."
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Input resistance looking directly into the base is 26.5 kilo-ohm.\n",
"Input resistance of the stage is 6.34 kilo-ohm.\n",
"Voltage gain is 8.574 .\n",
"Overall voltage gain is 7.83 .\n",
"Output voltage is 0.78 V.\n"
]
}
],
"prompt_number": 10
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 24.12 , Page Number 611"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"#Variables\n",
"\n",
"VCC = 10.0 #Source voltage (in volts)\n",
"RC = 10.0 #Collector resistance (in kilo-ohm)\n",
"alpha = 0.98 #Common base current gain\n",
"VBE = 0.7 #Emitter-to-Base Voltage (in volts)\n",
"Vs = 10.0 * 10**-3 #a.c voltage (in volts)\n",
"RL = 5.1 #Load resistance (in kilo-ohm)\n",
"RE = 20.0 #Resistance (in kilo-ohm) \n",
"VEE = 10.0 #Voltage (in volts)\n",
"\n",
"#Calculation\n",
"\n",
"IE = (VEE - VBE) / RE #Emitter current (in milli-Ampere)\n",
"r1e = 25.0 / IE * 10**-3 #a.c. emitter resistance (in kilo-ohm)\n",
"Ri = r1e #input resistance looking directly in the emitter (in kilo-ohm)\n",
"Ris = RE * r1e / (RE + r1e) #Input resistance of the stage (in kilo-ohm) \n",
"Ai = alpha #Current gain\n",
"rL = RC * RL / (RC + RL) #a.c. load resistance (in kilo-ohm)\n",
"Av = rL / r1e #Voltage gain\n",
"Ap = Av * Ai #Power gain\n",
"Gp = 10 * math.log10(Ap) #Power gain (in decibels)\n",
"vin = Vs #input voltage (in volts)\n",
"Vo = Av * vin #Output voltage (in volts) \n",
"\n",
"#Result\n",
"\n",
"print \"The input resistance looking directly into the emitter is \",round(Ri * 10**3,1),\" ohm.\\nThe input resistance of the stage is \",round(Ris * 10**3,2),\" ohm.\\nThe current gain is \",Ai,\" .\\nThe voltage gain is \",round(Av,1),\" .\\nThe power gain is \",round(Ap,2),\" .\\nThe power gain in decibels is \",round(Gp,1),\" dB.\\nThe output voltage is \",round(Vo * 10**3),\" mV.\" "
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"The input resistance looking directly into the emitter is 53.8 ohm.\n",
"The input resistance of the stage is 53.62 ohm.\n",
"The current gain is 0.98 .\n",
"The voltage gain is 62.8 .\n",
"The power gain is 61.56 .\n",
"The power gain in decibels is 17.9 dB.\n",
"The output voltage is 628.0 mV.\n"
]
}
],
"prompt_number": 1
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 24.13 , Page Number 613"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"#Variables\n",
"\n",
"Rs = 50.0 #source resistance (in ohm)\n",
"IE = 0.465 #Emitter current (in milli-Ampere)\n",
"r1e = 53.8 #a.c. resistance (in ohm)\n",
"Ri = 53.8 #Input resistance (in ohm)\n",
"Ris = 52.4 #Input resistance of stage (in ohm)\n",
"RL = 3.38 * 10**3 #Load resistance (in ohm) \n",
"Vs = 10.0 * 10**-3 #Input a.c. voltage (in volts)\n",
"\n",
"#Calculation\n",
"\n",
"Avs = RL / (Rs + r1e) #Overall voltage gain\n",
"Av = RL / r1e #Voltage gain\n",
"vo = Avs * Vs #Output a.c. voltage (in volts)\n",
"vin = vo / Av #input voltage (in volts)\n",
"\n",
"#Result\n",
"\n",
"print \"Voltage gain from source to output is \",round(Avs,1),\" .\\nVoltage gain from emitter to output is \",round(Av,1),\" .\\nValue of Vin is \",round(vin * 10**3,1),\" V.\" "
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Voltage gain from source to output is 32.6 .\n",
"Voltage gain from emitter to output is 62.8 .\n",
"Value of Vin is 5.2 V.\n"
]
}
],
"prompt_number": 12
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 24.14 , Page Number 617"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"#Variables\n",
"\n",
"VEE = 10.0 #Voltage (in volts)\n",
"RE = 10.0 * 10**3 #Emitter resistance (in ohm) \n",
"RB = 100.0 * 10**3 #Base resistance (in ohm)\n",
"beta = 50.0 #Common emitter current gain\n",
"VBE = 0.7 #Emitter-to-Base Voltage (in volts)\n",
"\n",
"#Calculation\n",
"\n",
"IE = (VEE - VBE)/(RE + RB/beta) #Emitter current (in Ampere)\n",
"r1e = 25.0 / IE * 10**-3 #a.c. resistance (in ohm)\n",
"Ri = beta * (RE + r1e) #Input resistance directly looking into the base (in ohm)\n",
"Ris = RB * Ri / (RB + Ri) #Input resistance of the stage (in ohm)\n",
"Ro = r1e #Output resistance (in ohm) \n",
"Av = RE / (r1e + RE) #Voltage gain \n",
"\n",
"#Result\n",
"\n",
"print \"Input resistance looking directly into the base is \",round(Ri * 10**-3,1),\" ohm.\\nInput resistance of the stage is \",round(Ris * 10**-3 ,1),\" ohm.\\nOutput resistance is \",round(Ro,1),\" ohm.\\nVoltage gain is \",round(Av,3),\" .\" "
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Input resistance looking directly into the base is 501.6 ohm.\n",
"Input resistance of the stage is 83.4 ohm.\n",
"Output resistance is 32.3 ohm.\n",
"Voltage gain is 0.997 .\n"
]
}
],
"prompt_number": 13
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Example 24.15 , Page Number 618"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import math\n",
"\n",
"#Variables\n",
"\n",
"beta = 80.0 #Common emitter current gain\n",
"VBE = 0.7 #Emitter-to-Base Voltage (in volts)\n",
"VCC = 15.0 #Voltage (in volts)\n",
"R1 = 20.0 * 10**3 #Resistance (in ohm)\n",
"R2 = 20.0 * 10**3 #Resistance (in ohm)\n",
"Vs = 5.0 * 10**-3 #a.c voltage (in volts)\n",
"RE = 8.2 * 10**3 #Emitter resistance (in ohm)\n",
"RL = 1.5 * 10**3 #Load resistance (in ohm)\n",
"RS = 2.0 * 10**3 #Source resistance (in ohm)\n",
"\n",
"#Calculation\n",
"\n",
"Vth = VCC * R2 / (R1 + R2) #Thevenin's voltage (in volts)\n",
"Rth = R1 * R2 / (R1 + R2) #Thevenin's equivalent resistance (in ohm)\n",
"IE = (Vth - VBE)/(RE + Rth / beta) #Emitter resistance (in ohm)\n",
"r1e = 25.0 / IE * 10**-3 #a.c resistance of emitter diode (in ohm)\n",
"rL = RE * RL /(RE + RL) #a.c. load resistance (in ohm)\n",
"Ri = beta * (rL + r1e) #Input resistance looking directly into the base (in ohm)\n",
"Ris = Rth * Ri / (Rth + Ri) #Input resistance of the stage (in ohm)\n",
"Ro = r1e + (RS*Rth)/(Rth + RS)/beta #Output resistance of the stage (in ohm)\n",
"Vin = Vs * (Ris / (RS + Ris)) #Input voltage (in volts)\n",
"Vo = Vin #Output voltage (in volts)\n",
"\n",
"#Result\n",
"\n",
"print \"Value of input resistance looking directly into the base is \",round(Ri * 10**-3),\" kilo-ohm.\\nValue of input resistance of the stage is \",round(Ris * 10**-3,1),\" kilo-ohm.\\nOutput resistance is \",round(Ro,1),\" ohm.\\nA.C. output voltage is \",round(Vo * 10**3,1),\" mV.\" "
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stdout",
"text": [
"Value of input resistance looking directly into the base is 104.0 kilo-ohm.\n",
"Value of input resistance of the stage is 9.1 kilo-ohm.\n",
"Output resistance is 51.4 ohm.\n",
"A.C. output voltage is 4.1 mV.\n"
]
}
],
"prompt_number": 14
}
],
"metadata": {}
}
]
}