{ "metadata": { "name": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter : 3 - Op-amp with Negative Feedback" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3.1 : Page No - 115" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given data\n", "A = 2*10**5 \n", "R_F = 4.7*10**3 # in ohm\n", "R1 = 470 # in ohm\n", "K = R_F/(R1+R_F) \n", "B = R1/(R1+R_F) \n", "A_F = -(A*R_F)/(R1+R_F+(R1*A)) \n", "print \"The closed loop voltage gain = %0.f\" %A_F \n", "R_in = 2 # in M ohm\n", "R_in = R_in * 10**6 # in ohm\n", "R_inf = R1 + ( (R_F*R_in)/(R_F+R_in + (A*R_in)) ) # in ohm\n", "print \"Input resistance = %0.3f \u03a9\" %R_inf \n", "R_o = 75 # in ohm\n", "R_of = R_o/(1+(A*B)) # in ohm\n", "R_of = R_of * 10**3 # in m\u03a9\n", "print \"Output Resistance = %0.2f m\u03a9\" %R_of \n", "f_o = 5 # Hz\n", "f_f = f_o*(1+(A*B)) # in Hz\n", "f_f = f_f *10**-3 # in kHz\n", "print \"Band width with feedback = %0.3f kHz\" %f_f \n", "\n", "# Note: In the book, the unit of output resistant is wrong it will be m\u03a9 (not M\u03a9)" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The closed loop voltage gain = -10\n", "Input resistance = 470.023 \u03a9\n", "Output Resistance = 4.12 m\u03a9\n", "Band width with feedback = 90.914 kHz\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3.2 : Page No - 116" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "#Given data\n", "A_F = -30 \n", "R_F = 1 # in M ohm\n", "R1 = -(R_F/A_F) # in Mohm\n", "R_i = R1 # in Mohm\n", "print \"Input resistance = %0.2f k\u03a9\" %(R_i*10**3) " ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Input resistance = 33.33 k\u03a9\n" ] } ], "prompt_number": 4 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3.4 : Page No - 120" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given data\n", "A_F = 61 \n", "R1 = 1 # in k ohm\n", "R1 = R1 * 10**3 # in ohm\n", "R_F = (A_F-1)*R1 # in ohm\n", "R_F = R_F * 10**-3 # k ohm\n", "print \"The value of feedback resistance = %0.f k\u03a9\" %R_F " ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of feedback resistance = 60 k\u03a9\n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3.5 : Page No - 120" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given data\n", "A = 2*10**5 \n", "R1 = 1 # in k ohm\n", "R1 = R1 *10**3 # in ohm\n", "R_F = 10 # in k ohm\n", "R_F = R_F * 10**3 # in ohm\n", "B = R1/(R1+R_F) \n", "R_i = 2 # in M ohm\n", "R_i = R_i * 10**6 # in ohm\n", "R_o = 75 # in ohm\n", "A_F = A/(1+(A*B)) \n", "print \"The closed loop gain = %0.3f\" %A_F \n", "R_if = R_i * (1+(A*B)) # in ohm\n", "print \"Input resistance = %0.2f G\u03a9\" %(R_if*10**-9) \n", "R_of = R_o/(1+(A*B)) # in ohm\n", "R_of = R_of * 10**3 # in m\u03a9\n", "print \"The output resistance = %0.2f m\u03a9\" %R_of \n", "f_o = 5 # in Hz\n", "f_f = f_o*(1+(A*B)) # in Hz\n", "f_f = f_f * 10**-3 # in kHz ... correction....\n", "print \"Bandwidth with feedback = %0.2f kHz\" %f_f " ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The closed loop gain = 10.999\n", "Input resistance = 36.37 G\u03a9\n", "The output resistance = 4.12 m\u03a9\n", "Bandwidth with feedback = 90.91 kHz\n" ] } ], "prompt_number": 7 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3.6 : Page No - 121" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given data\n", "A =2*10**5 \n", "R_i = 2 # in M ohm\n", "R1 = 1 # in ohm \n", "R_o= 75 # in ohm\n", "R_F = 1 # in ohm\n", "B = R1/(R1+R_F) \n", "A_F = -1 \n", "print \"The voltage gain = %0.f\" %A_F \n", "R_if = 330 # in ohm\n", "print \"Input resistance = %0.f \u03a9\" %R_if \n", "R_of = R_o/(A/2) # in ohm\n", "print \"Output resistance = %0.5f \u03a9\" %R_of \n", "f_o = 5 # in Hz\n", "f_F = (A/2)*f_o # in Hz\n", "f_F = f_F * 10**-6 # in MHz\n", "print \"The bandwidth = %0.1f MHz\" %f_F " ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The voltage gain = -1\n", "Input resistance = 330 \u03a9\n", "Output resistance = 0.00075 \u03a9\n", "The bandwidth = 0.5 MHz\n" ] } ], "prompt_number": 9 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3.7 : Page No - 122" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given data\n", "A = 2*10**5 \n", "R_i = 2 #in M ohm\n", "R_i = 2*10**6 # in ohm\n", "R_o = 75 #in ohm\n", "f_o = 5 # in Hz\n", "V_CC = 15 # in V\n", "V_EE = -15 # in V\n", "R1 = 1 # in k ohm\n", "R1 = R1 * 10**3 # in ohm\n", "R_F = 10 # in k ohm\n", "R_F = R_F * 10**3 # in ohm\n", "OVS= 13 # output voltage swing in V in \u00b1\n", "B = R1/(R1+R_F) \n", "A_B = A*B \n", "A_B1 = 1+(A*B) \n", "A_F = (1+(R_F/R1)) \n", "print \"Part (i) For non-inverting amplifier :-\"\n", "print \"The value of A_F = %0.f\" %A_F \n", "R_iF = R_i * (A_B1) # in ohm\n", "print \"The value of R_iF = %0.4f G\u03a9\" %(R_iF*10**-9) \n", "R_OF = R_o/(A_B1) # in ohm\n", "print \"The value of R_OF = %0.5f ohm\" %R_OF \n", "f_F = f_o*A_B1 # in Hz\n", "f_F =f_F * 10**-3 # in kHz\n", "print \"The value of f_F = %0.2f kHz\" %f_F \n", "V_ooT= OVS/(1+A*B) # in V\n", "print \"The value of VooT = \u00b1\",round(V_ooT,6),\"volts = \u00b1\",round(V_ooT*10**3,3),\" mV\"\n", "\n", "print \"\\nPart (ii) For inverting amplifier\"\n", "R_F = 4.7 # in k ohm\n", "R_F = R_F* 10**3 # in ohm\n", "R_1 = 470 # in ohm\n", "A_F = -(R_F)/R_1 \n", "print \"The value of A_F = %0.f\" %A_F \n", "R_iF = R_1# in ohm\n", "print \"The value of R_iF = %0.f \u03a9\" %R_iF \n", "R_OF = R_o/(A_B1) # in ohm\n", "print \"The value of R_OF = %0.5f \u03a9\" %R_OF \n", "f_F = f_o*A_B1 # in Hz\n", "f_F =f_F * 10**-3 # in kHz\n", "print \"The value of f_F = %0.2f kHz\" %f_F \n", "V_ooT = OVS/A_B1 # in mV\n", "print \"The value of VooT = \u00b1\",round(V_ooT*10**3,3),\" mV\"" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Part (i) For non-inverting amplifier :-\n", "The value of A_F = 11\n", "The value of R_iF = 36.3656 G\u03a9\n", "The value of R_OF = 0.00412 ohm\n", "The value of f_F = 90.91 kHz\n", "The value of VooT = \u00b1 0.000715 volts = \u00b1 0.715 mV\n", "\n", "Part (ii) For inverting amplifier\n", "The value of A_F = -10\n", "The value of R_iF = 470 \u03a9\n", "The value of R_OF = 0.00412 \u03a9\n", "The value of f_F = 90.91 kHz\n", "The value of VooT = \u00b1 0.715 mV\n" ] } ], "prompt_number": 16 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3.8 : Page No - 123" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given data\n", "R1 = 5 # in k ohm\n", "R_F = 500 # in k ohm\n", "V_in = 0.1 # in V\n", "A_F = -(R_F/R1) \n", "print \"Voltage gain = %0.f\" %A_F \n", "R_i = R1 # in k ohm\n", "print \"The Input resistance = %0.f k\u03a9\" %R_i \n", "R_o = 0 # in ohm\n", "print \"Output resistance = %0.f \u03a9\" %R_o \n", "V_out = A_F*V_in # in V\n", "print \"Output voltage = %0.f V\" %V_out \n", "I_in = V_in/(R1*10**3) # in A\n", "I_in = I_in * 10**3 # in mA\n", "print \"Input current = %0.2f mA\" %I_in " ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Voltage gain = -100\n", "The Input resistance = 5 k\u03a9\n", "Output resistance = 0 \u03a9\n", "Output voltage = -10 V\n", "Input current = 0.02 mA\n" ] } ], "prompt_number": 18 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3.9 : Page No - 123" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given data\n", "R_F = 1 # in M ohm\n", "R_in = 1 # in M ohm\n", "V_in = 1 # in V (assumed)\n", "V_out = -(R_F/R_in)*V_in \n", "A_v = V_out/V_in \n", "print \"The value of A_v = %0.f\" %A_v \n", "I_in = 1 # in A\n", "I_out = I_in # in A\n", "A_in = I_out/I_in \n", "print \"The value of A_in = %0.f\" %A_in \n", "A_P = abs(A_v*A_in) \n", "print \"The value of A_P = %0.f\" %A_P" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of A_v = -1\n", "The value of A_in = 1\n", "The value of A_P = 1\n" ] } ], "prompt_number": 19 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3.10 : Page No - 123" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given data\n", "R_F = 1 # in M ohm\n", "R_F = R_F * 10**6 # in ohm\n", "Av= -30 \n", "R1 = R_F/abs(Av) # in ohm\n", "R1 = R1 * 10**-3 # in k ohm\n", "print \"The value of R_F = %0.f M\u03a9 \" %(R_F*10**-6)\n", "print \"The value of R1 = %0.f k\u03a9\" %R1 " ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of R_F = 1 M\u03a9 \n", "The value of R1 = 33 k\u03a9\n" ] } ], "prompt_number": 20 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3.11 : Page No - 124" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#Given data\n", "A_v = -8 \n", "V_in= -1 # in V\n", "I1 = 15 # in \u00b5A\n", "I1 = I1 * 10**-6 # in A\n", "R1 = -(V_in)/I1 # in ohm\n", "R1 = R1 * 10**-3 # in k ohm\n", "print \"Minimum value of R1 = %0.2f k\u03a9 (standard value 68 k\u03a9)\" %R1 \n", "R1= 68 # kohm (Use standard value)\n", "R_F = -(A_v)*R1 # in k ohm\n", "print \"The minimum value of R_F = %0.f k\u03a9\" %R_F \n", "\n", "# Note: There is calculation error in the book to find the value of R_F so the answer in the book is wrong." ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Minimum value of R1 = 66.67 k\u03a9 (standard value 68 k\u03a9)\n", "The minimum value of R_F = 544 k\u03a9\n" ] } ], "prompt_number": 26 } ], "metadata": {} } ] }