{ "metadata": { "name": "", "signature": "sha256:c46b787f46e559a89b9f3dea169c413775f674cf749212a8be6652dfc9f37b52" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter5 - Linear applications of op-amps" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex 5.1 - page : 121" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "V1=2 #V\n", "V2=3 #V\n", "V3=4 #V\n", "V4=5 #V\n", "R1=10 #kohm\n", "R2=15 #kohm\n", "R3=22 #kohm\n", "R4=50 #kohm\n", "Rf=10 #kohm\n", "Vout=-Rf/R1*V1-Rf/R2*V2-Rf/R3*V3-Rf/R4*V4 #V\n", "print \"Output voltage of the circuit is %0.2f V \" %Vout " ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Output voltage of the circuit is -6.82 V \n" ] } ], "prompt_number": 1 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex 5.2 - page : 129" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "Rf=240 #kohm\n", "#Vout=-4*Vx+3*Vy \n", "#case 1st\n", "Vy=0 #V(But Vx is not=0)\n", "#Vox=-Rf/R1*Vx=-4*Vx\n", "R1=Rf/4 #kohm\n", "#case 2nd\n", "Vx=0 #V(But Vy is not=0)\n", "#Voy=(1+Rf/R1)*R2*Vy/(R1+R2)=3*Vy\n", "R2=3/(1+Rf/R1)*R1/((1-3/(1+Rf/R1)))\n", "print \"Resistance R1 is %0.f kohm \" %R1 \n", "print \"Resistance R2 is %0.f kohm \" %R2" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Resistance R1 is 60 kohm \n", "Resistance R2 is 90 kohm \n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex 5.3 - page : 130" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "V1=-2 #V\n", "V2=3 #V\n", "R1=50 #kohm\n", "R2=100 #kohm\n", "Rf=250 #kohm\n", "#I1+I2=If with IB=0 & Vx=0\n", "Vout=-(V1/R1+V2/R2)*Rf #V\n", "print \"Output Voltage is %0.1f V \" %Vout" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Output Voltage is 2.5 V \n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex 5.4 - page : 130" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "V1=-2 #V\n", "V2=3 #V\n", "R1=12 #kohm\n", "R2=12 #kohm\n", "R3=10 #kohm\n", "Rf=12 #kohm\n", "Ri=12 #kohm\n", "Rt=2 #kohm\n", "Vyx=200*10**-6 #V\n", "Vout=Rf/Ri*(1+2*R3/Rt)*Vyx #V\n", "Vout*=1000 #mV\n", "print \"Output Voltage is %0.1f mV \" %Vout " ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Output Voltage is 2.2 mV \n" ] } ], "prompt_number": 7 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex 5.5 - page : 131" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "Ad=range(5,201) #Gain\n", "R1max=50 #kohm(Potentiometer)\n", "R4=10 #kohm\n", "R3=10 #kohm\n", "#Case 1st : Ad=Admin &R1=R1max\n", "R1=R1max #kohm\n", "R2=(min(Ad)-1)/2*R1max #kohm\n", "#Case 2nd : Ad=Admax &R1=R1min\n", "R1min=2*R2/(max(Ad)-1) #kohm\n", "print \"Resistance R2 is %0.f kohm \" %R2 \n", "print \"Minimum value of resistance R1 is %0.f kohm \" %R1min \n" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Resistance R2 is 100 kohm \n", "Minimum value of resistance R1 is 1 kohm \n" ] } ], "prompt_number": 9 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex 5.6 - page : 132" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "R3=1 #kohm\n", "Rt=5 #kohm\n", "Ri=1.8 #kohm\n", "R1=1.8 #kohm\n", "Rf=18 #kohm\n", "R2=18 #kohm\n", "Vs=15 #V\n", "AoL=2*10**5 #Gain(for 741C)\n", "Rio=2#Mohm\n", "Ro=75#Mohm\n", "fo=5 #Hz\n", "fBW=1 #MHz\n", "Ad=Rf/Ri*(1+2*R3/Rt) #differential gain\n", "print \"Differential gain is %0.2f \" %Ad \n", "Beta=(R3+Rt)/(2*R3+Rt) #unitless\n", "Rix=Rio*10**6*(1+AoL*Beta) #ohm\n", "print \"Input impedence, Rix is %0.2e ohm \" %Rix \n", "Rof=Ro/(1+AoL/Ad) #ohm\n", "print \"Output impedence is %0.1e Rof ohm \" %Rof \n", "#Answer in the book is wrong for Rix." ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Differential gain is 14.00 \n", "Input impedence, Rix is 3.43e+11 ohm \n", "Output impedence is 5.2e-03 Rof ohm \n" ] } ], "prompt_number": 14 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex 5.8 - page : 134" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "Ri=10 #kohm\n", "Rf=15 #kohm\n", "Vs=9 #V\n", "#Part (a)\n", "Ra=120 #ohm\n", "Rb=120 #ohm\n", "Rc=120 #ohm\n", "Rd=120 #ohm \n", "Vx=0 #V\n", "Vy=0 #V (as Bridge is balanced)\n", "Vout=(Vy-Vx)*Rf/Ri #V\n", "print \"(a) Output Voltage is %0.2f V \" %Vout \n", "#Part (b)\n", "Ra=120 #ohm\n", "Rb=120 #ohm\n", "Rc=120 #ohm\n", "Rd=150 #ohm\n", "Vx=Rb*Vs/(Ra+Rb) #V\n", "Vy=Rc*Vs/(Rc+Rd)#V\n", "Vyx=Vy-Vx #V\n", "Vout=(Vy-Vx)*Rf/Ri #V\n", "print \"(b) Output Voltage is %0.2f V \" %Vout " ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(a) Output Voltage is 0.00 V \n", "(b) Output Voltage is -0.75 V \n" ] } ], "prompt_number": 15 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex 5.9 - page : 135" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "Vin=2 #V\n", "Rf=2*2/(2+2)+2 #kohm\n", "R1=1 #kohm\n", "Vout=-Rf/R1*Vin #V\n", "print \"Output Voltage is %0.f V \" %Vout " ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Output Voltage is -6 V \n" ] } ], "prompt_number": 17 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex 5.11 - page : 144" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "import math\n", "G=20 #dB(Gain)\n", "f3dB=2 #kHz\n", "Cf=0.05 #micro F\n", "Rf=1/(f3dB*1000*2*math.pi*Cf/1000000)/1000 #kohm\n", "G=10**(G/20) #Gain(unitless)\n", "Ri=Rf*1000/G #ohm\n", "print \"Resistance Rf is %0.1f kohm \" %Rf \n", "print \"Resistance Ri is %0.f ohm \" %Ri \n", "# Answer in wrong in thetextbook." ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Resistance Rf is 1.6 kohm \n", "Resistance Ri is 159 ohm \n" ] } ], "prompt_number": 21 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex 5.13 - page : 146" ] }, { "cell_type": "code", "collapsed": false, "input": [ "%matplotlib inline\n", "import matplotlib.pylab as plt\n", "import numpy as np\n", "from __future__ import division\n", "t2=50 #ms(After open the switch)\n", "R=40 #kohm\n", "C=0.2 #micro F\n", "V2=3 #V\n", "Vin=5 #V\n", "#For Ideal op-amp V1=V2\n", "t1=0 #s\n", "Vout1=V2 #V\n", "V1=V2 #V\n", "t2=t2*10**-3 #s\n", "f=lambda T:(Vin-V1)\n", "def integrate(a,b,f):\n", " # def function before using this\n", " # f=lambda t:200**2*t**2\n", " #a=lower limit;b=upper limit;f is a function\n", " import numpy\n", " N=1000 # points for iteration\n", " t=numpy.linspace(a,b,N)\n", " ft=f(t)\n", " ans=numpy.sum(ft)*(b-a)/N\n", " ans/=3\n", " ans**=1.0/2\n", " return ans\n", "Vout2=-1/(R*10**3*C*10**-6)*integrate(0,t2,f)+Vout1 #V\n", "#Here we have t=0 switch closed Vout=3V \n", "t=np.array([t1*1000,t2*1000]) #ms\n", "Vout=np.array([Vout1,Vout2]) #V\n", "plt.plot(t, Vout) \n", "plt.title('Vout Vs time after switch is opened') \n", "plt.xlabel('t(ms)') \n", "plt.ylabel('Vout(V)') \n", "plt.show()\n", "#Plot in the textbook is not accurate." ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "display_data", "png": "iVBORw0KGgoAAAANSUhEUgAAAYQAAAEZCAYAAACXRVJOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XecVOX1x/HPWRZFwI6CIIgCKiAIiiBIWewNLImxhKiJ\nMURFEEtU0jZqRJP8FBH1R4w/sUQ0orGg2AIDFpp0WEwsUbGhqEixgZzfH89FxnF22V327p3Z+b5f\nr3kxM7edvbvMmec8z72PuTsiIiJFSQcgIiK5QQlBREQAJQQREYkoIYiICKCEICIiESUEEREBlBAk\nAWb2pJn9JAfi2MfM5pvZKjMbknQ82ZjZbWb2m2puu8HM9qrkulea2e3VOU6uM7Ozzez5pOPIB0oI\nOcrMnjKzP2R5/wQze9/Mqv27M7NxZnZ1BctfMbOfZnl/mJnNruKxSs3snvT33P1Yd7+nvG1q0a+A\nf7n7du4+xszeNLNDkw4qnbuf5+7XAJhZiZkti+k4I9393Dj2LflDCSF3jQMGZ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Q6o1ZjYe\n6Ac0IdT+fgc8CvyDcGHfm8CP3H1lUjHWlnIucLwSmEWBnQ8z60ToHCyKHve4+5/NbCcK7FykM7N+\nwCXuPrAQz4WZ7UloFUDoCvi7u4+s6rnI6YQgIiK1J5dLRiIiUouUEEREBFBCEBGRiBKCiIgASggi\nIhJRQhAREUAJQeRbZra9mZ2X9npXM3uiBvY70Mx+u6X7EYmbEoLIJjsC56e9HgKMq4H9Pg78ILr9\nhkjOUkIQ2eQ6oE00wcifgB8S7hWEmZ1tZo9Ek4z818yGmNmlZjbXzKab2Y7RekOjiXwWRFeb4+Hq\nz+mE2wmI5CwlBJFNLgded/euwA3AN2lzDwB0JMz/fRDwR2CVux9A+LA/M20fXdx9f2Bw2razgL4x\nxy+yRZQQRDZJn1xkD+D9tNdOmHtgrbuvAFYSSkEQbiLWOnq+ELjPzH4MfJO2/Xtp64jkJCUEkfJl\nzj71VdrzDWmvN7BpbpHjgFuAA4DZZrbx/1gRmuNDcpwSgsgmq4Fto+dvAc3SlmUmBzKXRbfpbuXu\nKcLctdsDjaN1dov2KZKzcnnGNJFa5e4fm9mLZrYImAQUm1kjd19L+Haf/g0/87kTbtN+TzSTmQE3\nufuqaJ3ubCoxieQk3f5apBxmVgosdfcHtnA/RcBcoJu7r6+J2ETioJKRSPluYdNsU1vieGCCkoHk\nOrUQREQEUAtBREQiSggiIgIoIYiISEQJQUREACUEERGJKCGIiAgA/w+X0dHTq7icngAAAABJRU5E\nrkJggg==\n", "text": [ "" ] } ], "prompt_number": 19 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex 5.14 : page - 147" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "R1=1 #kohm\n", "R2=1 #kohm\n", "R3=1 #kohm\n", "Rf=R2+R3 #kohm\n", "Vin=1 #V\n", "#Capacitor remains open circuited for steady state in both cases.\n", "Vout=-Rf/R1*Vin #V\n", "print \"Output Voltage is %0.2f V \" %Vout " ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Output Voltage is -2.00 V \n" ] } ], "prompt_number": 4 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex 5.16 - page : 148" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "#From the given equationVout=-integrate('5*Vx+2*Vy+4*Vz','t',0,t) :\n", "R1Cf=1.0/5 #ratio\n", "R2Cf=1.0/2 #ratio\n", "R3Cf=1.0/4 #ratio\n", "print \"Various design parameters are : \"\n", "Cf=10 #micro F##Chosen for the design\n", "print \"Capacitance is %0.2f micro F \" %Cf \n", "R1=R1Cf/(Cf*10**-6)/1000 #kohm\n", "R2=R2Cf/(Cf*10**-6)/1000 #kohm\n", "R3=R3Cf/(Cf*10**-6)/1000 #kohm\n", "print \"Resistance R1 is %0.2f kohm \" %R1 \n", "print \"Resistance R2 is %0.2f kohm \" %R2\n", "print \"Resistance R3 is %0.2f kohm \" %R3" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Various design parameters are : \n", "Capacitance is 10.00 micro F \n", "Resistance R1 is 20.00 kohm \n", "Resistance R2 is 50.00 kohm \n", "Resistance R3 is 25.00 kohm \n" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex 5.17 - page : 153" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "f=10 #kHz\n", "Rf=3.2 #kohm\n", "Ci=0.001 #micro F\n", "dt=5 #micro seconds\n", "dVin=5-(-5) #V(When voltage changes from -5V to +5V)\n", "Vout=-Rf*1000*Ci*10**-6*dVin/(dt*10**-6) #V\n", "print \"When voltage changes from -5V to +5V, The output Voltage is %0.2f V \" %Vout \n", "dVin=-5-(+5) #V(When voltage changes from +5V to -5V)\n", "Vout=-Rf*1000*Ci*10**-6*dVin/(dt*10**-6) #V\n", "print \"When voltage changes from +5V to -5V, The output Voltage is %0.2f V \" %Vout " ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "When voltage changes from -5V to +5V, The output Voltage is -6.40 V \n", "When voltage changes from +5V to -5V, The output Voltage is 6.40 V \n" ] } ], "prompt_number": 7 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex 5.18 page : 154" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "import math\n", "fmin=200 #Hz\n", "fmax=1 #kHz\n", "fa=fmax #kHz\n", "print \"Various design parameters are : \"\n", "Ci=0.05 #micro F##Chosen for the design\n", "print \"Capacitance Ci is %0.2f micro F \" %Ci \n", "fb=10*fa #kHz\n", "Rf=1/(2*math.pi*fa*10**3*Ci*10**-6)/1000 #kohm\n", "print \"Resistance Rf is %0.1f kohm \" %Rf \n", "Ri=1/(2*math.pi*fb*10**3*Ci*10**-6) #ohm\n", "print \"Resistance Ri is %0.f ohm \" %Ri \n", "Cf=Ri*Ci/(Rf*10**3) #micro F\n", "print \"Capacitance Cf is %0.3f micro F \" %Cf\n", "# Answer in the textbook is not accurate." ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Various design parameters are : \n", "Capacitance Ci is 0.05 micro F \n", "Resistance Rf is 3.2 kohm \n", "Resistance Ri is 318 ohm \n", "Capacitance Cf is 0.005 micro F \n" ] } ], "prompt_number": 12 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex 5.19 - page : 156" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "import math\n", "fmax=100 #Hz\n", "fa=fmax #Hz\n", "print \"Various design parameters are : \"\n", "Ci=0.1 #micro F##Chosen for the design\n", "print \"Capacitance Ci is %0.2f micro F \" %Ci \n", "Rf=1/(2*math.pi*fa*Ci*10**-6)/1000 #kohm\n", "print \"Resistance Rf is %0.1f kohm \" %Rf \n", "print \"Use f=15 kohm\"\n", "fb=15*fa #kHz\n", "Ri=1/(2*math.pi*fb*Ci*10**-6)/1000 #kohm\n", "print \"Resistance Ri is %0.2f ohm \" %Ri \n", "print \"Use Ri=1 kohm\"\n", "Cf=Ri*Ci/Rf #micro F\n", "print \"Capacitance Cf is %0.3f micro F \" %Cf\n", "#Answer in the book is not accurate for Cf." ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Various design parameters are : \n", "Capacitance Ci is 0.10 micro F \n", "Resistance Rf is 15.9 kohm \n", "Use f=15 kohm\n", "Resistance Ri is 1.06 ohm \n", "Use Ri=1 kohm\n", "Capacitance Cf is 0.007 micro F \n" ] } ], "prompt_number": 15 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Ex 5.20 -page : 157" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from __future__ import division\n", "f=50 #Hz\n", "T=1/f #s(Period)\n", "Ci=0.05 #micro F\n", "RiCi=0.01*T #Given\n", "Ri=RiCi/(Ci*10**-6)/1000 #kohm\n", "print \"Resistance Ri is %0.2f kohm \" %Ri \n", "#Vout=-.002*dVin/dt given\n", "#On comparing with Vout=-Rf*Ci*dVin/dt\n", "RfCi=0.002 #on comparing\n", "Rf=RfCi/(Ci*10**-6)/1000 #kohm\n", "print \"Resistance Rf is %0.2f kohm \" %Rf\n", "Cf=Ri*Ci/Rf #micro F\n", "print \"Capacitance Cf is %0.3f micro F \" %Cf " ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Resistance Ri is 4.00 kohm \n", "Resistance Rf is 40.00 kohm \n", "Capacitance Cf is 0.005 micro F \n" ] } ], "prompt_number": 17 } ], "metadata": {} } ] }