{ "metadata": { "name": "Preeti", "signature": "sha256:b8dcb8af15a997e111f6feb032fec7a056888e6b8b149ec767b2b1cbf63692d5" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Chapter 1 : Operational Amplifiers" ] }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 1.1 : page 11" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Given data\n", "G= -100.0 # Gain\n", "R1= 2.2 # in kohm\n", "R1=R1*10**3 # in ohm\n", "# Formula G=-Rf/R1\n", "Rf= -G*R1 # ohm\n", "Rf*= 10**-3 # kohm\n", "print \"The value of Rf is %d kohm\" %Rf" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The value of Rf is 220 kohm\n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 1.2 : page 11" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Given data\n", "Rf= 200 # in kohm\n", "R1= 2 # in kohm\n", "vin=2.5 # in mV\n", "vin=vin*10**-3 # in volt\n", "G= -Rf/R1 \n", "vo= G*vin # in V\n", "print \"The output voltage is %0.2f volt\" %vo" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "The output voltage is -0.25 volt\n" ] } ], "prompt_number": 8 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 1.3 : page 12" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Given data\n", "G=-10.0 \n", "Ri= 100.0 # in kohm\n", "R1= Ri # in kohm\n", "R1=R1*10**3 # in ohm\n", "R1*= 10**-3 # kohm\n", "# Formula G=-R2/R1\n", "R2= R1*abs(G) # ohm\n", "R2*= 10**-3 # Mohm\n", "print \"Value of R1 is %0.2f kohm\" %R1\n", "print \"and value of R2 is %0.2f Mohm\" %R2" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Value of R1 is 100.00 kohm\n", "and value of R2 is 1.00 Mohm\n" ] } ], "prompt_number": 16 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 1.4 : page 37" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Given data\n", "R1= 100.0 # in kohm\n", "R2= 500 # in kohm\n", "V1= 2.0 # in volt\n", "Vo= (1+R2/R1)*V1 # in volt\n", "print \"Output voltage for noninverting amplifier is %0.2f volt\" %Vo" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Output voltage for noninverting amplifier is 12.00 volt\n" ] } ], "prompt_number": 19 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 1.5 : page 38" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Given data\n", "Rf= 1 # in Mohm\n", "Rf=Rf*10**6 #in ohm\n", "\n", "# Part(a)\n", "V1=1.0 #in volt\n", "V2=2.0 #in volt\n", "V3=3.0 #in volt\n", "R1= 500.0 # in kohm\n", "R1=R1*10**3 #in ohm\n", "R2= 1 # in Mohm\n", "R2=R2*10**6 #in ohm\n", "R3= 1.0 # in Mohm\n", "R3=R3*10**6 #in ohm\n", "Vo= -Rf*(V1/R1+V2/R2+V3/R3) # in volt\n", "print \"(a) Output voltage is %0.2f volt\" %Vo\n", "\n", "# Part(b)\n", "V1=-2.0 #in volt\n", "V2=3.0 #in volt\n", "V3=1.0 #in volt\n", "R1= 200.0 # in kohm\n", "R1=R1*10**3 #in ohm\n", "R2= 500.0 # in kohm\n", "R2=R2*10**3 #in ohm\n", "R3= 1.0 # in Mohm\n", "R3=R3*10**6 #in ohm\n", "Vo= -Rf*(V1/R1+V2/R2+V3/R3) # in volt\n", "print \"(b) Output voltage is %0.2f volt\" %Vo" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "(a) Output voltage is -7.00 volt\n", "(b) Output voltage is 3.00 volt\n" ] } ], "prompt_number": 22 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 1.6 : page 38" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Given data\n", "print \"Minimum closed loop voltage gain for R2=0 and R1= 2 kohm is \"\n", "R2=0 \n", "R1=2.0 # in kohm\n", "R1=R1*10**3 # in ohm\n", "Av_min= (1+R2/R1)\n", "print Av_min\n", "\n", "print \"Maximum closed loop voltage gain for maximum value of R2=100 kohm and R1= 2 kohm is\"\n", "R2=100 # in kohm\n", "R1=2 # in kohm\n", "Av_max= (1+R2/R1)\n", "print Av_max " ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Minimum closed loop voltage gain for R2=0 and R1= 2 kohm is \n", "1.0\n", "Maximum closed loop voltage gain for maximum value of R2=100 kohm and R1= 2 kohm is\n", "51\n" ] } ], "prompt_number": 26 }, { "cell_type": "heading", "level": 2, "metadata": {}, "source": [ "Exa 1.7 : page 39" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Given data\n", "V1= 745 # in \u00b5V\n", "V2= 740 # in \u00b5V\n", "V1=V1*10**-6 # in volt\n", "V2=V2*10**-6 # in volt\n", "CMRR=80 # in dB\n", "Av=5*10**5 \n", "# (i)\n", "# CMRR in dB= 20*log(Ad/Ac)\n", "Ad=Av \n", "Ac= Ad/10**(CMRR/20) \n", "# (ii)\n", "Vo= Ad*(V1-V2)+Ac*(V1+V2)/2 \n", "print \"Output voltage is %0.2f volt\" %Vo" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "Output voltage is 2.54 volt\n" ] } ], "prompt_number": 27 } ], "metadata": {} } ] }