{ "metadata": { "name": "" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter-3 : Negative Feedback In Op-Amps" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example : 3.1 - Page No 104" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Given data\n", "Af= 10 # voltage gain\n", "R1= 3 # in \u03a9\n", "Rf= (Af-1)*R1 # From Af= 1+Rf/R1\n", "print \"The value of R1 = %d \u03a9\" %R1\n", "print \"The value of Rf = %d \u03a9\" %Rf" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of R1 = 3 \u03a9\n", "The value of Rf = 27 \u03a9\n" ] } ], "prompt_number": 2 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example : 3.2 - Page No 104" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Given data\n", "R1= 2 # in k\u03a9\n", "Rf_min= 0 \n", "Rf_max= 100 # in k\u03a9\n", "# Formula Used : Af= 1+Rf/R1\n", "Af_max= 1+Rf_max/R1 # maximum closed loop voltage gain\n", "Af_min= 1+Rf_min/R1 # minimum closed loop voltage gain\n", "print \"The maximum closed loop voltage gain = %d\" %Af_max\n", "print \"The minimum closed loop voltage gain = %d\" %Af_min" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The maximum closed loop voltage gain = 51\n", "The minimum closed loop voltage gain = 1\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example : 3.3 - Page No 105" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "# Given data\n", "R1= 100 # in \u03a9\n", "Rf= 100*10**3 # in \u03a9\n", "A= 2*10**5 #unit less\n", "Rin= 2*10**6 # in \u03a9\n", "Rout= 75 # in \u03a9\n", "f0= 5 # in Hz\n", "B= R1/(R1+Rf) # feedback fraction\n", "AB= A*B # feedback factor\n", "Af= 1+Rf/R1 # voltage gain\n", "Rin_f= Rin*(1+AB) # input resistance in \u03a9\n", "Rout_f= Rout/(1+AB) # output resistance in \u03a9\n", "f_f= f0*(1+AB) # bandwidth in Hz\n", "Rin_f= Rin_f*10**-6 # in M\u03a9\n", "print \"The voltage gain is = %d\" %Af\n", "print \"The input resistance = %0.1f M\u03a9\" %Rin_f\n", "print \"The output resistance = %0.4f \u03a9\" %Rout_f\n", "print \"The bandwidth = %0.f Hz\" %f_f" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The voltage gain is = 1001\n", "The input resistance = 401.6 M\u03a9\n", "The output resistance = 0.3735 \u03a9\n", "The bandwidth = 1004 Hz\n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example : 3.4 - Page No 105" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#given data\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", "A=200000 \n", "OutputVoltageSwing= 13 # in volt\n", "SupplyVoltage=15 # in volt\n", "Ri= 2 # in M ohm\n", "Ri=Ri*10**6 # in ohm\n", "Ro= 75 # in ohm\n", "fo= 5 # in Hz\n", "B= R1/(R1+R_f) \n", "AB = A*B \n", "R_outf= Ro/(1+A*B) # in ohm\n", "R_outf= R_outf*10**3 # in m ohm\n", "print \"Output Resistance = %0.3f m ohm\" %R_outf\n", "V_ooT= OutputVoltageSwing/(1+A*B) # in volt\n", "V_ooT= V_ooT*10**3 # in mV\n", "print \"Output offset voltage = \u00b1 %0.3f mV\" %V_ooT\n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Output Resistance = 4.125 m ohm\n", "Output offset voltage = \u00b1 0.715 mV\n" ] } ], "prompt_number": 9 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example : 3.5 - Page No 105" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Given data\n", "Rin= 2*10**6 # in \u03a9\n", "Rout= 75 # in \u03a9\n", "f0= 5 # in Hz\n", "A= 2*10**5 #unit less\n", "B=1 # for voltage follower\n", "Rf= 0 \n", "Af= 1 # voltage gain (since Rf=0)\n", "Rin_f= A*Rin # input resistance in \u03a9\n", "Rin_f= Rin_f*10**-9 # in G\u03a9\n", "Rout_f= Rout/A #output resistance in \u03a9\n", "f_f= f0*A # bandwidth in Hz\n", "f_f= f_f*10**-6 # in MHz\n", "print \"The voltage gain = %d\" %Af \n", "print \"The input resistance = %0.f G\u03a9\" %Rin_f\n", "print \"The output resistance = %0.6f \u03a9\" %Rout_f\n", "print \"The bandwidth = %0.f MHz\" %f_f" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The voltage gain = 1\n", "The input resistance = 400 G\u03a9\n", "The output resistance = 0.000375 \u03a9\n", "The bandwidth = 1 MHz\n" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example 3.6 - Page No 109" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Given data\n", "Rin= 2*10**6 # in \u03a9\n", "Rout= 75 # in \u03a9\n", "f0= 5 # in Hz\n", "R1= 330 #in \u03a9\n", "Rf= 3.3*10**3 # in \u03a9\n", "A= 2*10**5 #unit less\n", "B= R1/(R1+Rf) # feedback fraction\n", "AB= A*B # feedback factor\n", "Af= -Rf/R1 # colsed-loop voltage gain\n", "Rin_f= R1 # input resistance with feedback in \u03a9\n", "Rout_f=Rout/(1+AB) # output resistance with feedback in \u03a9\n", "f_f= f0*(1+AB) # closed-loop bandwidth in Hz\n", "f_f= f_f*10**-3 # in kHz\n", "print \"The closed-loop voltage gain = %0.f\" %Af \n", "print \"The input resistance = %0.f \u03a9\" %Rin_f\n", "print \"The output resistance = %0.5f \u03a9\" %Rout_f\n", "print \"The bandwidth = %0.2f kHz\" %f_f" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The closed-loop voltage gain = -10\n", "The input resistance = 330 \u03a9\n", "The output resistance = 0.00412 \u03a9\n", "The bandwidth = 90.91 kHz\n" ] } ], "prompt_number": 12 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example : 3.7 - Page No 109" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Given data\n", "Rin= 2*10**6 # in \u03a9\n", "Rout= 75 # in \u03a9\n", "f0= 5 # in Hz\n", "A= 2*10**5 #unit less\n", "B= 1/2 # feedback fraction (since R1=Rf)\n", "Af= -1 # voltage gain\n", "R1= 330 #in \u03a9 (assume)\n", "Rin_f= R1 # input resistance with feedback in \u03a9\n", "Rout_f= Rout/(A/2) # output resistance in \u03a9\n", "f_f= A/2*f0 # in Hz\n", "f_f= f_f*10**-6 # in MHz\n", "print \"The closed-loop voltage gain = %0.f\" %Af\n", "print \"The input resistance = %0.f \u03a9\" %Rin_f\n", "print \"The output resistance = %0.5f \u03a9\" %Rout_f\n", "print \"The bandwidth = %0.1f MHz\" %f_f" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The closed-loop voltage gain = -1\n", "The input resistance = 330 \u03a9\n", "The output resistance = 0.00075 \u03a9\n", "The bandwidth = 0.5 MHz\n" ] } ], "prompt_number": 14 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example : 3.8 - Page No 109" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Given data\n", "Rin= 2*10**6 # in \u03a9\n", "Rout= 75 # in \u03a9\n", "f0= 5 # in Hz\n", "A= 200000 #unit less\n", "VCC= 15 # in V\n", "VEE= -15 # in V\n", "Vout_swing= 13 # in V\n", "# Part (i) : Non-inverting Amplifier\n", "R1= 1*10**3 # in \u03a9\n", "Rf= 10*10**3 #in \u03a9\n", "B= R1/(R1+Rf) # feedback fraction\n", "AB= A*B # feedback factor\n", "Af= 1+Rf/R1 # voltage gain\n", "Rin_f= Rin*(1+AB) # input resistance in \u03a9\n", "Rin_f=Rin_f*10**-9 # in G\u03a9\n", "Rout_f= Rout/(1+AB) # output resistance in \u03a9\n", "f_f= f0*(1+AB) # bandwidth in Hz\n", "f_f=f_f*10**-3 # in kHz\n", "VooT= Vout_swing/(1+AB) #in V\n", "VooT= VooT*10**3 # in mV\n", "print \"Part (i) : Non-inverting Amplifier :- \" \n", "print \"The closed-loop voltage gain = %0.f \" %Af\n", "print \"The input resistance = %0.4f G\u03a9\" %Rin_f\n", "print \"The output resistance = %0.5f \u03a9\" %Rout_f\n", "print \"The bandwidth = %0.2f kHz\" %f_f\n", "print \"The output offset voltage with feedback = \u00b1 %0.3f mV\" %VooT\n", "\n", "# Part (ii) : Inverting Amplifier\n", "R1= 470 # in \u03a9\n", "Rf= 4.7*10**3 #in \u03a9\n", "B= R1/(R1+Rf) # feedback fraction\n", "AB= A*B # feedback factor\n", "Af= -Rf/R1 # voltage gain\n", "Rin_f= R1 # input resistance in \u03a9\n", "Rout_f= Rout/(1+AB) # output resistance in \u03a9\n", "f_f= f0*(1+AB) # bandwidth in Hz\n", "f_f=f_f*10**-3 # in kHz\n", "VooT= Vout_swing/(1+AB) #in V\n", "VooT= VooT*10**3 # in mV\n", "print \"\\nPart (ii) : Inverting Amplifier :- \" \n", "print \"The closed-loop voltage gain = %0.f \" %Af\n", "print \"The input resistance = %0.f \u03a9\" %Rin_f\n", "print \"The output resistance = %0.5f \u03a9\" %Rout_f\n", "print \"The bandwidth = %0.2f kHz\" %f_f\n", "print \"The output offset voltage with feedback = \u00b1 %0.3f mV\" %VooT" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Part (i) : Non-inverting Amplifier :- \n", "The closed-loop voltage gain = 11 \n", "The input resistance = 36.3656 G\u03a9\n", "The output resistance = 0.00412 \u03a9\n", "The bandwidth = 90.91 kHz\n", "The output offset voltage with feedback = \u00b1 0.715 mV\n", "\n", "Part (ii) : Inverting Amplifier :- \n", "The closed-loop voltage gain = -10 \n", "The input resistance = 470 \u03a9\n", "The output resistance = 0.00412 \u03a9\n", "The bandwidth = 90.91 kHz\n", "The output offset voltage with feedback = \u00b1 0.715 mV\n" ] } ], "prompt_number": 15 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example : 3.9 - Page No 110" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Given data\n", "Rf= 500*10**3 # in \u03a9\n", "R1= 5*10**3 #in \u03a9\n", "Vin= 0.1 # input voltage in V\n", "Af= -Rf/R1 # voltage gain\n", "Rin= R1 # input resistance in \u03a9\n", "Rin= Rin*10**-3 # in k\u03a9\n", "Rout= 0 # in \u03a9\n", "Vout= Af*Vin # output voltage in V\n", "I_in= Vin/R1 # input current in A\n", "I_in= I_in*10**3 # in mA\n", "print \"The amplifier circuit voltage gain = %0.f\" %Af\n", "print \"The amplifier circuit input resistance = %0.f k\u03a9\" %Rin\n", "print \"The amplifier circuit output resistance %0.f \u03a9\" %Rout\n", "print \"The output voltage = %0.f V\" %Vout\n", "print \"The input current = %0.2f mA\" %I_in" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The amplifier circuit voltage gain = -100\n", "The amplifier circuit input resistance = 5 k\u03a9\n", "The amplifier circuit output resistance 0 \u03a9\n", "The output voltage = -10 V\n", "The input current = 0.02 mA\n" ] } ], "prompt_number": 16 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example : 3.10 - Page No 110" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Given data\n", "Rf= 1*10**6 # in \u03a9\n", "Rin= 1*10**6 # in \u03a9\n", "Vout_by_Vin= -Rf/Rin # (since Vout= -Rf/Rin*Vin)\n", "Av= Vout_by_Vin # voltage gain\n", "print \"The voltage gain = %0.f\" %Av\n", "# I_in= Iout (As it is a unity gain inverter)\n", "Ain= 1 #input impedance (since I_in= Iout)\n", "print \"The input impedance = %0.f\" %Ain\n", "Ap= abs(Av*Ain) # power gain\n", "print \"The power gain = %0.f\" %Ap" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The voltage gain = -1\n", "The input impedance = 1\n", "The power gain = 1\n" ] } ], "prompt_number": 17 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example : 3.11 - Page No 111" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Given data\n", "Av= -30 # voltage gain\n", "Rf= 1*10**6 # in \u03a9\n", "#Since, Av= Vo/Vi=-Rf/R1, so\n", "R1= -Rf/Av # in \u03a9\n", "R1= R1*10**-3 # in k\u03a9\n", "Rf= Rf*10**-6 # in M\u03a9\n", "print \"The value of Rf = %0.f M\u03a9\" %Rf\n", "print \"The value of R1 = %0.f k\u03a9\" %R1" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of Rf = 1 M\u03a9\n", "The value of R1 = 33 k\u03a9\n" ] } ], "prompt_number": 19 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example : 3.12 - Page No 111" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Given data\n", "Av= -8 # voltage gain\n", "Vi= 1 # input voltage in V\n", "I1= 15 #maximum current in \u00b5A\n", "I1= I1*10**-6 # in A\n", "R1= Vi/I1 # in \u03a9\n", "R1= R1*10**-3 # in k\u03a9\n", "print \"The value of R1 = %0.2f k\u03a9 (Standard value 68 k\u03a9)\" %R1\n", "R1= 68 # in k\u03a9\n", "Rf= -Av*R1 # in k\u03a9\n", "print \"The value of Rf = %0.f k\u03a9\" %Rf" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of R1 = 66.67 k\u03a9 (Standard value 68 k\u03a9)\n", "The value of Rf = 544 k\u03a9\n" ] } ], "prompt_number": 20 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example : 3.15 - Page No 114" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "# Given data\n", "Rf= 20*10**3 # in \u03a9\n", "R1= 10*10**3 # in \u03a9\n", "\n", "#Part (i) When switch S is off,\n", "Aoff_non_inv= 1+Rf/R1 # non-inverting amplifier circuit gain\n", "Aoff_inv= -Rf/R1 # inverting amplifier gain\n", "Aoff= Aoff_non_inv+Aoff_inv # amplifier circuit gain\n", "print \"Part (i) : When switch S is off, the gain of the amplifier circuit = %0.f\" %Aoff\n", "\n", "# Part (ii) When switch S is on,\n", "Aon= -Rf/R1 # amplifier circuit gain\n", "print \"Part (ii) : When switch S is on, the gain of the amplifer circuit = %0.f\" %Aon" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Part (i) : When switch S is off, the gain of the amplifier circuit = 1\n", "Part (ii) : When switch S is on, the gain of the amplifer circuit = -2\n" ] } ], "prompt_number": 21 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example : 3.18 - Page No 116" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Given data\n", "R1= 1*10**3 # in \u03a9\n", "R2= 1*10**3 # in \u03a9\n", "Rf= 10*10**3 # in \u03a9\n", "R3= 10*10**3 # in \u03a9\n", "Vd= 5 # in mV\n", "Vcm= 2 # in mV\n", "CMRR_dB= 90 # in dB\n", "CMRR= 10**(CMRR_dB/20) \n", "Ad= Rf/R1 # differential voltage gain\n", "# Part (i)\n", "Vout= Ad*Vd # output voltage in mV\n", "print \"Part (i) : The output voltage = %0.f mV\" %Vout\n", "# Part (ii)\n", "Acm= Ad/CMRR # common mode gain\n", "AcmVcm= Acm*Vcm # magnitude of the induced 60Hz noise at the output in mV\n", "AcmVcm= AcmVcm*10**3 # in \u00b5V\n", "print \"The magnitude of the induced 60Hz noise at the output = %0.3f \u00b5V\" %AcmVcm" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Part (i) : The output voltage = 50 mV\n", "The magnitude of the induced 60Hz noise at the output = 0.632 \u00b5V\n" ] } ], "prompt_number": 22 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example : 3.19 - Page No 117" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Given data\n", "R1= 540 # in \u03a9\n", "R3= 540 # in \u03a9\n", "R2= 5.4*10**3 # in \u03a9\n", "Rf= 5.4*10**3 # in \u03a9\n", "Vin1= -2.5 # in V\n", "Vin2= -3.5 #in V\n", "Rin= 2*10**6 #input impedance in \u03a9\n", "A= 2*10**5 # open loop voltage gain\n", "Ad= (1+Rf/R1) # voltage gain\n", "print \"The voltage gain = %0.f\" %Ad\n", "Vout=Ad*(Vin1-Vin2) # output voltage in V\n", "print \"The output voltage = %0.f V\" %Vout\n", "Rin_f1= Rin*(1+A*R1/(R1+Rf)) # in \u03a9\n", "Rin_f2= Rin*(1+A*R2/(R1+Rf)) # in \u03a9\n", "print \"The value of Rin_f1 = %0.3e \u03a9\" %Rin_f1\n", "print \"The value of Rin_f2 = %0.3e \u03a9\" %Rin_f2" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The voltage gain = 11\n", "The output voltage = 11 V\n", "The value of Rin_f1 = 3.637e+10 \u03a9\n", "The value of Rin_f2 = 3.636e+11 \u03a9\n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example : 3.20 - Page No 120" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Given data\n", "Vin= 100*10**-3 # in V\n", "Vout= 4.25 # in V\n", "R1= 100 # in \u03a9\n", "# Formula Used : Vout= (1+2*Rf/Rf)*Vin\n", "Rf= (Vout/Vin-1)*R1/2 # in \u03a9\n", "Rf= Rf*10**-3 # in k\u03a9\n", "print \"The value of R1 = %0.f \u03a9\" %R1\n", "print \"The value of Rf = %0.1f k\u03a9 (Standard value 2.2 k\u03a9)\" %Rf" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of R1 = 100 \u03a9\n", "The value of Rf = 2.1 k\u03a9 (Standard value 2.2 k\u03a9)\n" ] } ], "prompt_number": 24 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Example : 3.21- Page No 121" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Given data\n", "R1= 3.3 # in k\u03a9\n", "R2= 3.3 # in k\u03a9\n", "R3= 1.2 # in k\u03a9\n", "R4= 1.2 # in k\u03a9\n", "Rf= 3.9 # in k\u03a9\n", "R5= 3.9 # in k\u03a9\n", "Rp= 2.5 # in k\u03a9\n", "A= 2*10**5 # unit less\n", "f0= 5 # in Hz\n", "Rin= 2*10**6 # in \u03a9\n", "Rout= 75 # in \u03a9\n", "Ad= -(1+2*R1/Rp)*Rf/R3 # voltage gain\n", "print \"The voltage gain = %0.2f\" %Ad\n", "Rinf= Rin*(1+A*(R1+Rp)/(2*R1+Rp)) #input resistance in \u03a9\n", "Rinf= Rinf*10**-9 # in G\u03a9\n", "print \"The input resistance = %0.3f G\u03a9\" %Rinf\n", "Routf= Rout/abs(1+A/Ad) # output resistance in \u03a9\n", "print \"The output resistance = %0.6f \u03a9\" %Routf\n", "f_f= A*f0/abs(Ad) # bandwidth in Hz\n", "f_f= f_f*10**-3 # in kHz\n", "print \"The bandwidth = %0.2f kHz\" %f_f" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The voltage gain = -11.83\n", "The input resistance = 254.947 G\u03a9\n", "The output resistance = 0.004437 \u03a9\n", "The bandwidth = 84.53 kHz\n" ] } ], "prompt_number": 25 } ], "metadata": {} } ] }