{ "metadata": { "name": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 3:Transistor Amplifiers" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "example 3.1, page No.117" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Gain Impedence and ac load\n", "import math\n", "#Variable declaration\n", "ib=10.0 #in uA\n", "ic=1.0 #in mA\n", "ic=ic*10**3 #in uA\n", "vi=0.02 #in Volt\n", "RC=5.0 #in kohm\n", "RL=10.0 #in kohm\n", "\n", "#Calculations\n", "\n", "#Part (i)\n", "Ai=-ic/ib #unitless\n", "Beta=Ai #unitless\n", "\n", "#Part (ii)\n", "Rie=vi/(ib*10**-6) #in Ohm\n", "\n", "#Part (iii)\n", "Rac=RC*RL/(RC+RL) #in kohm\n", "\n", "#Part (iv)\n", "Av=-Rac*10**3*Beta/Rie #unitless\n", "\n", "#Part (v)\n", "PowerGain=Av*Ai #unitless\n", "\n", "#Result\n", "print(\"(i)\\tCurrent gain : %.2f\"%Ai)\n", "print(\"(ii)\\tInput impedence in kohm :%.0f\"%(Rie*10**-3))\n", "print(\"(iii)\\tAC load in kohm : %.1f\"%Rac)\n", "print(\"(iv)\\tVoltage gain :%.3f\"%Av)\n", "print(\"(v)\\tPower Gain is : %.3f\"%PowerGain)\n", "#Note : Ans of Av and Power gain is wrong in the book." ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(i)\tCurrent gain : -100.00\n", "(ii)\tInput impedence in kohm :2\n", "(iii)\tAC load in kohm : 3.3\n", "(iv)\tVoltage gain :166.667\n", "(v)\tPower Gain is : -16666.667\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "example 3.2, page No.125" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Gain input and output impedence\n", "import math\n", "\n", "#Varible declaration\n", "RL=10.0 #in kohm\n", "RS=1.0 #in kohm\n", "hie=1.1 #in kOhm\n", "hre=2.5*10**-4 #unitless\n", "hfe=50.0 #unitless\n", "hoe=25.0 #in u mho\n", "\n", "#Calculations\n", "Aie=-hfe/(1+hoe*10**-6*RL*10**3)#unitless\n", "Zie=hie+hre*Aie*RL #in kOhm\n", "Zie=math.ceil(Zie)\n", "Ave=Aie*RL/Zie #unitless\n", "Avs_e=Ave*Zie/(Zie+RS)\n", "deltah=hoe*10**-6*hie*10**3-hfe*hre\n", "Zoe=(hie*10**3+RS*10**3)/(hoe*10**-6*RS*10**3+deltah)\n", "Ais_e=Aie*RS/(Zie+RS)\n", "Ape=Ave*Aie\n", "Aps_e=Avs_e*Ais_e\n", "\n", "#Result\n", "print(\"Current gain :%.0f \"%Aie)\n", "print(\"\\nCurrent gain with source resistance : %.0f\"%Ais_e)\n", "print(\"\\nVoltage gain : %.0f\"%Ave)\n", "print(\"\\nVoltage gain with source resistance : %.0f\"%Avs_e)\n", "print(\"\\nPower gain :%.0f \"%Ape)\n", "print(\"\\nPower gain with source resistance :%.0f \"%Aps_e)\n", "print(\"\\nInput impedence in kohm :%.1f\"%Zie)\n", "print(\"\\nOutput impedence in kohm :%.1f\"%(Zoe/10**3))" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Current gain :-40 \n", "\n", "Current gain with source resistance : -20\n", "\n", "Voltage gain : -400\n", "\n", "Voltage gain with source resistance : -200\n", "\n", "Power gain :16000 \n", "\n", "Power gain with source resistance :4000 \n", "\n", "Input impedence in kohm :1.0\n", "\n", "Output impedence in kohm :52.5\n" ] } ], "prompt_number": 16 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "example 3.3, Page No. 126" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Input Output impedence and output voltage\n", "import math\n", "#Variable declaration\n", "InputVoltage=1.0 #in mV\n", "RL=5.6 #in kohm\n", "RS=600.0 #in ohm\n", "hre=6.5*10**-4 #unitless\n", "hie=1.7 #in kOhm\n", "hfe=125.0 #unitless\n", "hoe=80.0 #in uA/V\n", "\n", "#Calculations\n", "deltah=hoe*10**-6*hie*10**3-hfe*hre\n", "Zie=(hie*10**3+RL*10**3*deltah)/(1+hoe*10**-6*RL*10**3)\n", "Zoe=(hie*10**3+RS)/(hoe*10**-6*RS+deltah)\n", "Ave=-(hfe*RL*10**3)/(hie*10**3+RL*10**3*deltah)\n", "Avs_e=Ave*Zie/(Zie+RS)\n", "OutputVoltage=Avs_e*InputVoltage\n", "\n", "#Result\n", "print(\"Input impedence in kohm :%.3f\"%(Zie/1000))\n", "print(\"Output impedence in kohm :%.3f\"%(Zoe/10**3))\n", "print(\"Voltage gain : %.3f\"%Ave)\n", "print(\"Voltage gain with source resistance : %.3f\"%Avs_e)\n", "print(\"Output Voltage in mV :%.3f \"%OutputVoltage)\n", "#Note : Answers are wrong in the book." ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Input impedence in kohm :1.386\n", "Output impedence in kohm :22.384\n", "Voltage gain : -348.849\n", "Voltage gain with source resistance : -243.444\n", "Output Voltage in mV :-243.444 \n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "example 3.4, Page no.129" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Net voltage gain in dB\n", "import math\n", "#variable declaration\n", "A1=100.0 #unitless\n", "A2=200.0 #unitless\n", "A3=400.0 #unitless\n", "\n", "#calculations\n", "A1=20*math.log10(A1) #in dB\n", "A2=20*math.log10(A2) #in dB\n", "A3=20*math.log10(A3) #in dB\n", "NetVoltageGain=A1+A2+A3 #in dB\n", "\n", "#Result\n", "print(\"Net Voltage Gain in decibels :%.3f\"%NetVoltageGain)\n", "#Note : Answer in the book is wrong." ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Net Voltage Gain in decibels :138.062\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "example 3.5, Page No.129" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Bandwidth and cut off frequencies \n", "import math\n", "#Variable declaration\n", "MaxGain=1000.0 #unitless(at 2kHz)\n", "f1=50.0 #in Hz\n", "f2=10.0 #in KHz\n", "\n", "#Result\n", "print(\"Bandwidth is from %.0f Hz to %.0f kHz\"%(f1,f2))\n", "print(\"Lower cutoff frequency %.0f Hz\"%f1)\n", "print(\"Upper cutoff frequency %.0f kHz\"%f2)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Bandwidth is from 50 Hz to 10 kHz\n", "Lower cutoff frequency 50 Hz\n", "Upper cutoff frequency 10 kHz\n" ] } ], "prompt_number": 22 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "example 3.6, Page No.137" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Overall voltage gain\n", "import math\n", "#Variable declaration\n", "RC=10.0 #in kohm\n", "hfe=330.0 #unitless\n", "hie=4.5 #in kOhm\n", "\n", "#Calculation\n", "#RS<