diff options
author | hardythe1 | 2015-07-03 12:23:43 +0530 |
---|---|---|
committer | hardythe1 | 2015-07-03 12:23:43 +0530 |
commit | 5a86a20b9de487553d4ef88719fb0fd76a5dd6a7 (patch) | |
tree | db67ac5738a18b921d9a8cf6e86f402703f30bdf /Analog_Integrated_Circuits_by_R.S._Tomar | |
parent | 37d315828bbfc0f5cabee669d2b9dd8cd17b5154 (diff) | |
download | Python-Textbook-Companions-5a86a20b9de487553d4ef88719fb0fd76a5dd6a7.tar.gz Python-Textbook-Companions-5a86a20b9de487553d4ef88719fb0fd76a5dd6a7.tar.bz2 Python-Textbook-Companions-5a86a20b9de487553d4ef88719fb0fd76a5dd6a7.zip |
add/remove books
Diffstat (limited to 'Analog_Integrated_Circuits_by_R.S._Tomar')
-rwxr-xr-x | Analog_Integrated_Circuits_by_R.S._Tomar/Chapter1.ipynb | 417 | ||||
-rwxr-xr-x | Analog_Integrated_Circuits_by_R.S._Tomar/Chapter10.ipynb | 220 | ||||
-rwxr-xr-x | Analog_Integrated_Circuits_by_R.S._Tomar/Chapter11.ipynb | 243 | ||||
-rwxr-xr-x | Analog_Integrated_Circuits_by_R.S._Tomar/Chapter12.ipynb | 55 | ||||
-rwxr-xr-x | Analog_Integrated_Circuits_by_R.S._Tomar/Chapter13.ipynb | 417 | ||||
-rwxr-xr-x | Analog_Integrated_Circuits_by_R.S._Tomar/Chapter2.ipynb | 531 | ||||
-rwxr-xr-x | Analog_Integrated_Circuits_by_R.S._Tomar/Chapter3_.ipynb | 251 | ||||
-rwxr-xr-x | Analog_Integrated_Circuits_by_R.S._Tomar/Chapter4.ipynb | 540 | ||||
-rwxr-xr-x | Analog_Integrated_Circuits_by_R.S._Tomar/Chapter5.ipynb | 701 | ||||
-rwxr-xr-x | Analog_Integrated_Circuits_by_R.S._Tomar/Chapter6.ipynb | 767 | ||||
-rwxr-xr-x | Analog_Integrated_Circuits_by_R.S._Tomar/Chapter7.ipynb | 323 | ||||
-rwxr-xr-x | Analog_Integrated_Circuits_by_R.S._Tomar/Chapter8.ipynb | 152 | ||||
-rwxr-xr-x | Analog_Integrated_Circuits_by_R.S._Tomar/Chapter9.ipynb | 958 |
13 files changed, 5575 insertions, 0 deletions
diff --git a/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter1.ipynb b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter1.ipynb new file mode 100755 index 00000000..24ac5ea2 --- /dev/null +++ b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter1.ipynb @@ -0,0 +1,417 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:1cb6068538d8c97f156cb67d11e52aad1d6c0b391f69a34791cef94fb6857610" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter1 - Constant current sources" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 1.1 - page 4" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Iout=8 #micro A\n", + "VBE=0.7 #V\n", + "Beta=80 #unitless\n", + "VCC=20 #V\n", + "IREF=Iout*(1+2/Beta) #micro A\n", + "R=(VCC-VBE)/IREF #Mohm\n", + "print \"Reference current is %0.2f uA\" %IREF\n", + "print \"Resistance required is %0.2f Mohm\" %R" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reference current is 8.20 uA\n", + "Resistance required is 2.35 Mohm\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 1.2 - page 5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Iout=1 #mA\n", + "VBE=0.7 #V\n", + "Beta=100 #unitless\n", + "VCC=30 #V\n", + "IREF=Iout*(1+2/Beta) #mA\n", + "R=(VCC-VBE)/IREF #kohm\n", + "print \"Reference current is %0.2f mA\" %IREF \n", + "print \"Resistance required is %0.1f kohm\" %R" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reference current is 1.02 mA\n", + "Resistance required is 28.7 kohm\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 1.3 - page 5" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Iout=0.5 #mA\n", + "Beta=50 #unitless\n", + "VEB=0.7 #V\n", + "VCC=5 #V\n", + "IREF=Iout*(1+2/Beta) #mA\n", + "R=(VCC-VEB)/IREF #kohm\n", + "print \"Reference current is %0.2f mA\" %IREF \n", + "print \"Resistance required is %0.2f kohm\" %R" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reference current is 0.52 mA\n", + "Resistance required is 8.27 kohm\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 1.4 - page 8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Iout=8 #micro A\n", + "Beta=100 #unitless\n", + "VBE=0.7 #V\n", + "VCC=20 #V\n", + "IREF=Iout/(1+2/Beta/(1+Beta)) #micro A\n", + "R=(VCC-2*VBE)/IREF #Mohm\n", + "print \"Reference current is %0.2f micro A\" %IREF \n", + "print \"Resistance required is %0.2f Mohm\" %R" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reference current is 8.00 micro A\n", + "Resistance required is 2.33 Mohm\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 1.5 - page 8" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Iout=60 #micro A\n", + "VBE=0.7 #V\n", + "Beta=150 #unitless\n", + "VCC=30 #V\n", + "IREF=Iout*(1+2/Beta/(1+Beta)) #micro A\n", + "R=(VCC-2*VBE)/IREF #Mohm\n", + "R*=10**3 #kohm\n", + "print \"Reference current is %0.3f mA\" %IREF \n", + "print \"Resistance required is %0.1f kohm\" %R" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reference current is 60.005 mA\n", + "Resistance required is 476.6 kohm\n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 1.6 - page 9" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "VBE=0.7 #V\n", + "Beta=120 #unitless\n", + "VCC=10 #V\n", + "R=5.6 #kohm\n", + "#KCL at node x : IREF=IC1+I1 #as Beta>>1\n", + "#KCL at node y : I1=IC2+IB3 #as Beta>>1\n", + "IREF=(VCC-VBE)/R #mA\n", + "#as IREF=2*IC+IB3=IC*(2+1/Beta)=2*IC #as Beta>>1\n", + "IC=IREF/2 #mA\n", + "Iout=IC #mA\n", + "print \"Output current is %0.2f mA\" %Iout" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output current is 0.83 mA\n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 1.7 - page 13" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "Iout=6 #micro A\n", + "IREF=1.2 #mA\n", + "VBE2=0.7 #V\n", + "VT=26 #mV\n", + "Beta=120 #unitless\n", + "VCC=20 #V\n", + "R=(VCC-VBE2)/IREF #kohm\n", + "print \"Value of resistance R is %0.f kohm \" %R\n", + "IC1=Iout #micro A\n", + "IC2=(IREF-IC1*10**-3/Beta)/(1+1/Beta) #mA\n", + "RS=1/(IC1*10**-6)*VT*10**-3*math.log(IC2*1000/IC1) #ohm\n", + "RS/=10**3 #kohm\n", + "print \"Value of resistance RS is %0.1f kohm\" %RS" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of resistance R is 16 kohm \n", + "Value of resistance RS is 22.9 kohm\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 1.8 - page 14" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "IREF=1 #mA\n", + "Io2=20 #micro A\n", + "Io3=40 #micro A\n", + "VBE1=0.7 #V\n", + "VT=26 #mV\n", + "VCC=10 #V\n", + "VEE=-10 #V\n", + "R=(VCC-VBE1-VEE)/IREF #kohm\n", + "print \"Value of resistance R is %0.2f kohm \" %R \n", + "RE2=VT/Io2*math.log(IREF*1000/Io2) #kohm\n", + "print \"Value of resistance RE2 is %0.2f kohm\" %RE2 \n", + "RE3=VT/Io3*math.log(IREF*1000/Io3) #kohm\n", + "print \"Value of resistance RE3 is %0.2f kohm \" %RE3 \n", + "VBE2=VBE1-RE2*Io2/1000 #V\n", + "print \"Value of Base emitter voltage of transistor Q2 is %0.4f V\" %VBE2 \n", + "VBE3=VBE1-RE3*Io3/1000 #V\n", + "print \"Value of Base emitter voltage of transistor Q3 is %0.4f V\" %VBE3" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of resistance R is 19.30 kohm \n", + "Value of resistance RE2 is 5.09 kohm\n", + "Value of resistance RE3 is 2.09 kohm \n", + "Value of Base emitter voltage of transistor Q2 is 0.5983 V\n", + "Value of Base emitter voltage of transistor Q3 is 0.6163 V\n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 1.9 - page 18" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Beta=100 #unitless\n", + "VBE=0.715 #V\n", + "R=5.6 #kohm\n", + "RC=1 #kohm\n", + "VCC=10 #V\n", + "VCB1=0 #V(Q1 will act as diode)\n", + "IREF=(VCC-VBE)/R #mA\n", + "#KCL at node x : IREF=IC1+2*IB \n", + "#KCL at node y : I1=IC2+IB3 #as Beta>>1\n", + "IREF=(VCC-VBE)/R #mA\n", + "#as IREF=2*IC1/Beta+IC1\n", + "IC1=IREF/(1+2/Beta) #mA\n", + "IC2=IC1 #mA\n", + "IC3=IC1 #mA\n", + "print \"Collector current in each transistor, IC1=IC2=IC3 is %0.2f mA\" %IC1\n", + "IRC=IC1+IC2+IC3 #mA\n", + "print \"Current through RC is %0.2f mA\" %IRC\n", + "#Answer wrong in the textbook." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Collector current in each transistor, IC1=IC2=IC3 is 1.63 mA\n", + "Current through RC is 4.88 mA\n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 1.10 - page 19" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Vout=5 #V\n", + "Beta=180 #unitless\n", + "R=22 #kohm\n", + "VCC=10 #V\n", + "VBE=0.7 #V\n", + "IREF=(VCC-VBE)/R #mA\n", + "IC=(IREF-VBE/R)/(1+2/Beta) #mA\n", + "RC=(VCC-Vout)/IC #kohm\n", + "print \"IC1 & IC2 are %0.2f mA\" %IC\n", + "print \"RC is %0.2f kohm\" %RC\n", + "#Answer in the book is wrong." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "IC1 & IC2 are 0.39 mA\n", + "RC is 12.93 kohm\n" + ] + } + ], + "prompt_number": 25 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter10.ipynb b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter10.ipynb new file mode 100755 index 00000000..9fe9f6c7 --- /dev/null +++ b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter10.ipynb @@ -0,0 +1,220 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f64bf7a670dc36e359e5aa56e0bfa29f09c70f7a0babc95be4c64434f164d9d6" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter10 - Comparators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 10.1 - page : 334" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, sin\n", + "t=range(0,5) #sec(Assumed)\n", + "Vin=5*sin(2*pi*t[0]) #V\n", + "VCC=15 #V\n", + "R2=1 #kohm\n", + "R1=6.8 #kohm\n", + "VEE=-15 #V\n", + "Vsat=13 #V\n", + "Vref=R2*VCC/(R1+R2) #V\n", + "print \"Reference Voltage = %0.2f V \" %Vref\n", + "print \"If Vin>Vref , Vout = %0.2f V \" %Vsat \n", + "print \"If Vin<Vref , Vout = %0.2f V \" %-Vsat" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Reference Voltage = 1.92 V \n", + "If Vin>Vref , Vout = 13.00 V \n", + "If Vin<Vref , Vout = -13.00 V \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 10.2 - page 340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Vsat=7 #V\n", + "R1=68 #kohm\n", + "R2=82 #kohm\n", + "VUTP=R2*Vsat/(R1+R2) #V\n", + "VLTP=R2*-Vsat/(R1+R2) #V\n", + "print \"Upper trip point = %0.2f V \" %VUTP \n", + "print \"Lower trip point = %0.2f V \" %VLTP" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Upper trip point = 3.83 V \n", + "Lower trip point = -3.83 V \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 10.3 - page : 340" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from numpy import arcsin, pi\n", + "#Vin=5*sin(omega*t)\n", + "Vm=5 #V\n", + "Vsat=7 #V\n", + "R1=68 #kohm\n", + "R2=82 #kohm\n", + "VUTP=R2*Vsat/(R1+R2) #V\n", + "fi=arcsin(VUTP/Vm)*180/pi #degree\n", + "print \"Phase shift = %0.2f degree \" %fi \n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Phase shift = 49.94 degree \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 10.4 - page : 344" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "VZ1=4.7 #V\n", + "VZ2=4.7 #V\n", + "R1=68 #kohm\n", + "R2=15 #kohm\n", + "Vout=VZ1+0.7 #V(As one zener diode is always forward biased)\n", + "VR1=Vout #V\n", + "IR1=VR1/R1*1000 #micro A\n", + "IR2=IR1 #micro A\n", + "VR2=IR2*10**-3*R2 #V\n", + "Vout=VR1+VR2 #V\n", + "VUTP=(R2/(R1+R2))*Vout #V\n", + "VLTP=(R2/(R1+R2))*(-Vout) #V\n", + "print \"VUTP = %0.2f V \" %VUTP \n", + "print \"VLTP = %0.2f V \" %VLTP" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "VUTP = 1.19 V \n", + "VLTP = -1.19 V \n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 10.5 - page : 346" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Vsat=12.5 #V\n", + "Vref=-12.5 #V\n", + "R1=80 #kohm\n", + "R2=20 #kohm\n", + "Beta=R2/(R1+R2) #unitless\n", + "UTP=Beta*Vsat+(1-Beta)*Vref #V\n", + "LTP=-Beta*Vsat+(1-Beta)*Vref #V\n", + "VH=UTP-LTP #V\n", + "R3=R1*R2/(R1+R2) #kohm\n", + "print \"UTP = %0.2f V \" %UTP \n", + "print \"LTP = %0.2f V \" %LTP \n", + "print \"Hysteresis Voltage, VH = %0.2f V \" %VH \n", + "print \"Use R3 = %0.2f kohm \" %R3 " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "UTP = -7.50 V \n", + "LTP = -12.50 V \n", + "Hysteresis Voltage, VH = 5.00 V \n", + "Use R3 = 16.00 kohm \n" + ] + } + ], + "prompt_number": 16 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter11.ipynb b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter11.ipynb new file mode 100755 index 00000000..85a26955 --- /dev/null +++ b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter11.ipynb @@ -0,0 +1,243 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:4938ab1cbcdde4c79a4edd16b6b058287ba152a41695f11025117cf99374b771" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter11 - Non linear applications of op-amp" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 11.1 - page : 354" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import log\n", + "Vin=12.5 #V\n", + "Ri=10 #kohm\n", + "IS=10**-13 #A\n", + "T=27 #degree C\n", + "VT=26 #mV\n", + "Vref=Ri*IS*1000 #V\n", + "Vout=-VT*10**-3*log(Vin/Vref) #V\n", + "print \"Output Voltage, Vout = %0.1f V \" %Vout" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output Voltage, Vout = -0.6 V \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 11.3 - page : 362" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "R1=10 #kohm\n", + "k=1.38*10**-23 #J/K\n", + "T=298 #K\n", + "q=1.6*10**-19 #C\n", + "Kdash=k*T/q #Kdash=k*T/q assumed for temporary calculation\n", + "print \"Output Voltage, Vout(V) is \",round(-Kdash,4),\"*log(Vin/%0.f*10**3)\" %R1\n", + "#Not possible to tale log of symbols." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output Voltage, Vout(V) is -0.0257 *log(Vin/10*10**3)\n" + ] + } + ], + "prompt_number": 33 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 11.4 - page : 362" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "R1=10 #kohm\n", + "R2=10 #kohm\n", + "k=1.38*10**-23 #J/K\n", + "T=298 #K\n", + "q=1.6*10**-19 #C\n", + "Kdash=k*T/q #Kdash=k*T/q assumed for temporary calculation\n", + "print \"Output Voltahe, Vout(V) is -R1*(log(\",round(-1/Kdash,1),\"*Vin)**-1\"\n", + "#Not possible to tale log of symbols." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output Voltahe, Vout(V) is -R1*(log( -38.9 *Vin)**-1\n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 11.7 - page : 366" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import log10\n", + "k=1 #for the givn connection\n", + "#(a)\n", + "Vin=5 #V\n", + "Vout=-k*log10(Vin/0.1) #V\n", + "print \"(a) For 5V input, Output Voltage = %0.2f V \" %Vout\n", + "#(b)\n", + "Vin=2 #V\n", + "Vout=-k*log10(Vin/0.1) #V\n", + "print \"(b) For 2V input, Output Voltage = %0.1f V \" %Vout \n", + "#(c)\n", + "Vin=0.1 #V\n", + "Vout=-k*log10(Vin/0.1) #V\n", + "print \"(c) For 0.1V input, Output Voltage = %0.f V \" %Vout \n", + "#(d)\n", + "Vin=50 #mV\n", + "Vout=-k*log10(Vin/1000/0.1) #V\n", + "print \"(d) For 50mV input, Output Voltage = %0.1f V \" %Vout \n", + "#(e)\n", + "Vin=5 #mV\n", + "Vout=-k*log10(Vin/1000/0.1) #V\n", + "print \"(e) For 5mV input, Output Voltage = %0.1f V \" %Vout " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) For 5V input, Output Voltage = -1.70 V \n", + "(b) For 2V input, Output Voltage = -1.3 V \n", + "(c) For 0.1V input, Output Voltage = -0 V \n", + "(d) For 50mV input, Output Voltage = 0.3 V \n", + "(e) For 5mV input, Output Voltage = 1.3 V \n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 11.8 - page : 367" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import log10\n", + "k=1 #for the givn connection\n", + "#For 755N module\n", + "Rin=10 #kohm\n", + "Iref=10 #micro A\n", + "Vref=Rin*Iref/1000 #V\n", + "#(a)\n", + "Vin=5 #V\n", + "Vout1=-k*log10(Vin/0.1) #V\n", + "Vout=Vref*10**(-Vout1/k) #V\n", + "print \"(a) For 5V input to log amp, Antilog amp Output = %0.f V \" %Vout \n", + "#(b)\n", + "Vin=2 #V\n", + "Vout1=-k*log10(Vin/0.1) #V\n", + "Vout=Vref*10**(-Vout1/k) #V\n", + "print \"(b) For 2V input to log amp, Antilog amp Output = %0.f V \" %Vout \n", + "#(c)\n", + "Vin=0.1 #V\n", + "Vout1=-k*log10(Vin/0.1) #V\n", + "Vout=Vref*10**(-Vout1/k) #V\n", + "print \"(c) For 0.1V input to log amp, Antilog amp Output = %0.1f V \" %Vout \n", + "#(d)\n", + "Vin=50 #mV\n", + "Vout1=-k*log10(Vin/1000/0.1) #V\n", + "Vout=Vref*10**(-Vout1/k) #V\n", + "print \"(d) For 50mV input to log amp, Antilog amp Output = %0.f mV \" %(Vout*1000)\n", + "#(e)\n", + "Vin=5 #mV\n", + "Vout1=-k*log10(Vin/1000/0.1) #V\n", + "Vout=Vref*10**(-Vout1/k) #V\n", + "print \"(e) For 5mV input to log amp, Antilog amp Output = %0.f mV \" %(Vout*1000)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "(a) For 5V input to log amp, Antilog amp Output = 5 V \n", + "(b) For 2V input to log amp, Antilog amp Output = 2 V \n", + "(c) For 0.1V input to log amp, Antilog amp Output = 0.1 V \n", + "(d) For 50mV input to log amp, Antilog amp Output = 50 mV \n", + "(e) For 5mV input to log amp, Antilog amp Output = 5 mV \n" + ] + } + ], + "prompt_number": 49 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter12.ipynb b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter12.ipynb new file mode 100755 index 00000000..f7130d0d --- /dev/null +++ b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter12.ipynb @@ -0,0 +1,55 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:d42d30351aabb6bc90d7502a456567ddf1351b8975d43ecacef103597b7b4953" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter12 - Operational transconductance amplifier" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 12.1 - page : 404" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi\n", + "gm=55 #micro U\n", + "C=8.75 #pF\n", + "f3dB=gm/(2*pi*C) #MHz\n", + "print \"f-3dB frequency is %0.2f MHz \" %f3dB" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "f-3dB frequency is 1.00 MHz \n" + ] + } + ], + "prompt_number": 1 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter13.ipynb b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter13.ipynb new file mode 100755 index 00000000..69086860 --- /dev/null +++ b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter13.ipynb @@ -0,0 +1,417 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f4a83e38558e2bc6592fc86c02570a86bc0530de75031ae379e4ed7bef896b2d" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter13 - Voltage Regulators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 13.1 - page : 414" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "deltaVin=4 #V\n", + "deltaVout=0.4 #V\n", + "Vout=20 #V\n", + "LR=(deltaVout/Vout)*100/deltaVin #%/V(Line Regulation)\n", + "print \"Line Regulation = %0.1f %%/V \" %LR" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Line Regulation = 0.5 %/V \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 13.2 - page : 414" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "VNL=18.0 #V\n", + "VFL=17.8 #V\n", + "IL=50.0 #mA\n", + "LR=(VNL-VFL)*100/VFL #%(Line Regulation)\n", + "LdR=LR/IL #%/mA(Load Regulation)\n", + "print \"Load Regulation = %0.3f %%/mA \" %LdR " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Load Regulation = 0.022 %/mA \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 13.3 - page : 419" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "VBE=0.65 #V\n", + "RCL=1.2 #ohm\n", + "ILmax=VBE/RCL #A\n", + "#For Vout=0, IL=ILmax\n", + "IL=ILmax #A\n", + "print \"Load current = %0.2f A \" %IL " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Load current = 0.54 A \n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 13.4 - page : 420" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "R=20 #kohm\n", + "R1=20 #kohm\n", + "R2=10 #kohm\n", + "VZ=4.7 #V\n", + "Vref=VZ #V\n", + "Vout=Vref*(1+R1/R2) #V\n", + "print \"Output Voltage = %0.1f V \" %Vout" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output Voltage = 14.1 V \n" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 13.5 - page : 427" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Vout=15 #V\n", + "Vin=20 #V\n", + "INL=2 #mA(INL=Iadj+Iref)\n", + "Iadj=60 #mA(Assumed)\n", + "Iref=INL-Iadj/1000 #mA\n", + "Vref=1.25 #V\n", + "R1=Vref/Iref*1000 #ohm\n", + "VR2=Vout-Vref #V\n", + "R2=VR2/INL*1000 #ohm\n", + "print \"Design values are : \"\n", + "print \"Resistance, R1 = %0.f ohm \" %R1 \n", + "print \"Resistance, R2 = %0.3f kohm \" %(R2/1000 )" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Design values are : \n", + "Resistance, R1 = 644 ohm \n", + "Resistance, R2 = 6.875 kohm \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 13.6 - page : 429" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "RL1=100 #ohm\n", + "RL2=1 #ohm\n", + "RCS=7 #ohm\n", + "VEB=0.7 #V\n", + "Beta=25 #unitless\n", + "#For 100 ohm Load\n", + "Vout=5 #V(as 7805 used)\n", + "IL=Vout/RL1 #A\n", + "VRCS=IL*RCS #V(Voltage across RCS)\n", + "#VRCS<VEB, hence Q1 is off\n", + "Iout=IL; Iin=IL #A\n", + "Iext=Iout-Iin #A\n", + "print \"For 100 ohm load, Output current Iext = %0.2f A \" %Iext\n", + "#For 1 ohm Load\n", + "Vout=5 #V(as 7805 used)\n", + "IL=Vout/RL2 #A\n", + "ILmax=IL #A\n", + "VRCS=IL*RCS #V(Voltage across RCS)\n", + "#VRCS>VEB, hence Q1 is on\n", + "Iout=(ILmax+Beta*VEB/RCS)/(Beta+1) #A\n", + "Iext=ILmax-Iout #A\n", + "print \"For 10 ohm load, Output current Iext = %0.3f A \" %Iext " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For 100 ohm load, Output current Iext = 0.00 A \n", + "For 10 ohm load, Output current Iext = 4.712 A \n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 13.7 - page : 431" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "RL=range(1,11) #ohm\n", + "R1=5 #ohm\n", + "Vref=5 #V\n", + "IL=1 #A\n", + "IQ=0 #A\n", + "Iref=IL #A\n", + "R1=Vref/Iref #ohm\n", + "print \"Value of resistor R1 = %0.f ohm \" %R1" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of resistor R1 = 5 ohm \n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 13.8 - page : 432" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Vout=range(15,21) #V\n", + "Vin=24 #V\n", + "VR1=12 #V\n", + "Vref=12 #V\n", + "I4=0 #A(Assumed)\n", + "Iout=1 #A(Assumed)\n", + "R1=VR1/Iout #ohm\n", + "#Vout=VR1*(1+R2/R1)\n", + "R2min=R1*(min(Vout)/VR1-1) #Putting min Vout\n", + "R2max=R1*(max(Vout)/VR1-1) #Putting min Vout\n", + "print \"Resistance R1 = %0.f ohm \" %R1 \n", + "print \"Minimum & maximum value of R2 are %0.f ohm & %0.f ohm \" %(R2min,R2max) \n", + "#A pot of 10 ohm should be used.\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance R1 = 12 ohm \n", + "Minimum & maximum value of R2 are 3 ohm & 8 ohm \n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 13.9 - page : 438" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Vout=6 #V\n", + "IL=100 #mA\n", + "Vref=7.15 #V(For LM 723)\n", + "Iref=1 #mA(Assumed)\n", + "R1=(Vref-Vout)/Iref #kohm\n", + "R2=Vout/Iref #kohm\n", + "print \"Design values are : \"\n", + "print \"R1 should be used 1.2kohm. Calculated R1 %0.2f kohm \" %R1 \n", + "print \"R2 should be used 6.2kohm. Calculated R2 = %0.2f kohm \" %R2 \n", + "R1=1.2; R2=6.2 #kohm\n", + "R3=R1*R2/(R1+R2) #kohm\n", + "print \"Resistance R3 = %0.f kohm \" %R3 \n", + "RCL=0.65/(IL/1000) #kohm\n", + "print \"Resistance RCL = %0.1f kohm \" %RCL " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Design values are : \n", + "R1 should be used 1.2kohm. Calculated R1 1.15 kohm \n", + "R2 should be used 6.2kohm. Calculated R2 = 6.00 kohm \n", + "Resistance R3 = 1 kohm \n", + "Resistance RCL = 6.5 kohm \n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 13.10 - page : 442" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Vout=15 #V\n", + "IL=50 #mA\n", + "Vin=20 #V\n", + "PDmax=1 #W(For LM 723)\n", + "Iref=3 #mA(From datasheet)\n", + "PD=Vout*(IL+Iref) #mW\n", + "print \"Required PD = %0.3f W \" %(PD/1000) \n", + "print \"PDmax supplied by LM723 = %0.2f mW \" %PDmax \n", + "print \"PD<PDmax, so we can use it.\"\n", + "Vref=7.15 #V(For LM 723)\n", + "R3=1.5 #kohm(choosen)\n", + "R1BYR2=(Vout-Vref)/Vref \n", + "R1=R3*(R1BYR2+1) #ohm\n", + "print \"Resistance R1 = %0.2f kohm\" %R1 \n", + "R2=R1/R1BYR2 #ohm\n", + "print \"Resistance R2 = %0.2f kohm \" %R2 \n", + "print \"Resistance R3 = %0.2f kohm \" %R3 \n", + "RCL=0.65/(IL/1000) #ohm\n", + "print \"Resistance RCL = %0.2f ohm \" %RCL " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Required PD = 0.795 W \n", + "PDmax supplied by LM723 = 1.00 mW \n", + "PD<PDmax, so we can use it.\n", + "Resistance R1 = 3.15 kohm\n", + "Resistance R2 = 2.87 kohm \n", + "Resistance R3 = 1.50 kohm \n", + "Resistance RCL = 13.00 ohm \n" + ] + } + ], + "prompt_number": 32 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter2.ipynb b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter2.ipynb new file mode 100755 index 00000000..415497af --- /dev/null +++ b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter2.ipynb @@ -0,0 +1,531 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:08f6666963b63d68f1720253f0e8a698e5752723f4515bbc0a7b3ce6b79e7e0a" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter2 - Differential amplifiers" + ] + }, + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Ex 2.1 - page 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "v1=7 #mV\n", + "v2=9 #mV\n", + "Ad=80 #dB\n", + "CMRR=90 #dB\n", + "vid=v2-v1 #mV\n", + "vcm=(v1+v2)/2 #mV\n", + "Ad=10**(Ad/20) #unitless\n", + "CMRR=10**(CMRR/20) #unitless\n", + "vout=Ad*(vid+vcm/CMRR)/1000 #V\n", + "print \"Output Voltage is %0.2f V\" %vout" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output Voltage is 20.00 V\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.2 - page 31" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "v1=50.0 #micro V\n", + "v2=55.0 #micro V\n", + "Ad=2*10**5 #unitless\n", + "CMRR=80 #dB\n", + "vid=v2-v1 #micro V\n", + "vcm=(v1+v2)/2 #mV\n", + "CMRR=10**(CMRR/20) #unitless\n", + "vout=Ad*(vid+vcm/CMRR)/10**6 #V\n", + "print \"Output Voltage is %0.3f V\" %vout \n", + "Verror=vout-Ad*vid/10**6 #V\n", + "print \"Error Voltage is %0.3f V\" %Verror\n", + "error_p=(Verror/vout)*100 #% error\n", + "print \"Percentage error is %0.3f %%\" %error_p \n", + "#Percentage error answer is not correct in the book." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output Voltage is 1.001 V\n", + "Error Voltage is 0.001 V\n", + "Percentage error is 0.105 %\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.3 - page 38" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "IT=1.0 #mA\n", + "VCC=15 #V\n", + "RE=50 #kohm\n", + "RC=15 #kohm\n", + "Beta=120 #unitless\n", + "alfa=Beta/(Beta+1) #unitless\n", + "Vid=6 #mV\n", + "VT=26 #mV\n", + "#Part (a)\n", + "iC1=alfa*IT/(1+math.exp(-Vid/VT)) #mA\n", + "iC2=IT-iC1 #mA\n", + "print \"dc Collector current through transistors is %0.3f mA\" %iC2 \n", + "#Part (b)\n", + "iC=IT/2 #mA(let iC1=iC2=iC)\n", + "re=VT/iC #ohm(let re1=re2=re)\n", + "Ad=-RC*1000/re #unitless\n", + "Acm=-RC*1000/(re+2*RE*1000) #unitless\n", + "Acm=abs(Acm) ##unitless\n", + "CMRR=abs(Ad/Acm) ##unitless\n", + "print \"Ad is %0.2f\" %Ad \n", + "print \"Acm is %0.2f \" %Acm \n", + "CMRR=20*math.log10(CMRR) #dB\n", + "print \"CMRR is %0.1f dB\" %CMRR" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "dc Collector current through transistors is 0.447 mA\n", + "Ad is -288.46\n", + "Acm is 0.15 \n", + "CMRR is 65.7 dB\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.4 - page 44" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "RC=2 #kohm\n", + "RE=4.3 #kohm\n", + "VEE=5 #V\n", + "VBE=0.7 #V\n", + "IT=(VEE-VBE)/RE #mA\n", + "VT=26 #mV\n", + "re=2*VT/IT #ohm\n", + "Ad=-RC*1000/2/re #unitless\n", + "print \"Ad = \",round(Ad,2) \n", + "Acm=-RC*1000/(re+2*RE*1000) #unitless\n", + "print \"Acm = \",round(Acm,2)\n", + "CMRR=abs(Ad/Acm) ##unitless\n", + "print \"CMRR = \",round(CMRR,1)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Ad = -19.23\n", + "Acm = -0.23\n", + "CMRR = 83.2\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.5 - page 45" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Beta=100 #unitless\n", + "VBE=0.715 \n", + "VD1=0.715 #V\n", + "VZ=6.2 #V\n", + "VT=26 #mV\n", + "IZt=41 #mA\n", + "VCC=10 #V\n", + "VEE=10 #V\n", + "RE=2.7 #kohm\n", + "RC=4.7 #kohm\n", + "VB=-VEE+VZ+VD1 #V\n", + "VE=VB-VBE #V\n", + "IE3=(VE-(-VEE))/(RE) #mA\n", + "IT=IE3 #mA\n", + "ICQ=IT/2 #mA(let ICQ1=ICQ2=ICQ)\n", + "VCEQ=VCC+VBE-ICQ*RC #V\n", + "#Q=[ICQ,VCEQ] #[mA V](Q point)\n", + "print \"Q point (ICQ(mA), VCEQ(V)), ICQ is \",round(ICQ,2),\"mA & VCEQ is \",round(VCEQ,2),\"V\"\n", + "re=2*VT/IT #ohm\n", + "Ad=-RC*1000/re #unitless\n", + "Rid=2*Beta*re/1000 #kohm\n", + "print \"Ad = \",round(Ad)\n", + "print \"Rid is %0.2f kohm\" %Rid" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Q point (ICQ(mA), VCEQ(V)), ICQ is 1.15 mA & VCEQ is 5.32 V\n", + "Ad = -208.0\n", + "Rid is 4.53 kohm\n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.6 - page 47" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Beta=100 #unitless\n", + "VBE=0.7 #V\n", + "VCC=10 #V\n", + "VEE=10 #V\n", + "VT=26 #mV\n", + "RC=2.7 #kohm\n", + "R=2.2 #kohm\n", + "IExt=(VEE-VBE)/R #mA\n", + "IC3=IExt \n", + "IT=IExt #mA\n", + "ICQ=IT/2 #mA\n", + "re=2*VT/IT #ohm(let re1=re2=re)\n", + "Ad=-RC*1000/re #unitless\n", + "Rid=2*Beta*re/1000 #kohm(let Rid1=Rid2=Rid)\n", + "print \"Differntial mode gain, Ad = \", round(Ad,1) \n", + "print \"Differntial input resistance, Rid is %0.2f kohm\" %Rid" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Differntial mode gain, Ad = -219.5\n", + "Differntial input resistance, Rid is 2.46 kohm\n" + ] + } + ], + "prompt_number": 15 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.7 - page 49" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Beta=100 #unitless\n", + "VBE=0.7 #V\n", + "VD1=0.7 #V\n", + "VD2=0.7#V\n", + "VCC=15 #V\n", + "VEE=15 #V\n", + "VT=26 #mV\n", + "RE=560 #ohm\n", + "RC=6.8 #kohm\n", + "R=220 #ohm\n", + "VB=-VEE+VD1+VD2 #V\n", + "VE=VB-VBE #V\n", + "IE3=(VE-(-VEE))/RE*1000 #mA\n", + "IT=IE3 #mA\n", + "ICQ=IT/2 #mA\n", + "VCEQ=VCC+VBE-ICQ*RC #V\n", + "#Q=[ICQ VCEQ] #[mA V](Q point)\n", + "print \"Q point (ICQ(mA), VCEQ(V)), ICQ is \",round(ICQ,3),\"mA & VCEQ is \",round(VCEQ,2),\"V\"\n", + "re=2*VT/IT #ohm\n", + "Ad=-RC*1000/re #unitless\n", + "print \"Differntial mode gain, Ad = \",round(Ad,2) \n", + "#Answer in the book is wrong for Q point." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Q point (ICQ(mA), VCEQ(V)), ICQ is 0.625 mA & VCEQ is 11.45 V\n", + "Differntial mode gain, Ad = -163.46\n" + ] + } + ], + "prompt_number": 17 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.8 - page 50" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "ICQ=200.0 #micro A\n", + "Beta=1000.0 #unitless\n", + "Ad=180.0 #unitless\n", + "CMRR=80.0 #dB\n", + "VT=26.0 #mV\n", + "re=VT/(ICQ/1000) #ohm(Let re=re1=re2)\n", + "RC=Ad*re/1000 #kohm\n", + "CMRR=10**(CMRR/20) #untless\n", + "RE=(CMRR-1)*re/2/1000 #kohm\n", + "print \"Value of RC is %0.2f kohm & RE is %0.f kohm\" %(RC,RE) \n", + "Rid=2*Beta*re/1000 #kohm(Let Rid=Rid1=Rid2)\n", + "print \"Differntial input resistance, Rid is %0.f kohm \" %Rid \n", + "Ric=(Beta+1)*(re+2*RE*1000)/10**6 #Mohm\n", + "print \"Common mode input resistance, Ric is %0.f Mohm \" %Ric\n", + "#Answer for last part is wrong in the textbook." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of RC is 23.40 kohm & RE is 650 kohm\n", + "Differntial input resistance, Rid is 260 kohm \n", + "Common mode input resistance, Ric is 1301 Mohm \n" + ] + } + ], + "prompt_number": 22 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.9 - page 51" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Beta=110 #unitless\n", + "VBE=0.7 #V\n", + "VT=26 #mV\n", + "VCC=10 #V\n", + "VEE=10 #V\n", + "RC=1.8 #kohm\n", + "R=3.9 #kohm\n", + "IExt=(VCC-VBE-(-VEE))/R #mA\n", + "IT=IExt #mA\n", + "ICQ=IT/2 #mA\n", + "V1=0 \n", + "V2=0 #V\n", + "VE=-2*VBE #V\n", + "VC=VCC-ICQ*RC #V\n", + "VCEQ=VC-VE #V\n", + "# Q=[ICQ VCEQ] #[mA V](Q point)\n", + "print \"Q point (ICQ(mA), VCEQ(V)), ICQ is \",round(ICQ,2),\"mA & VCEQ is \",round(VCEQ,2),\"V\"\n", + "re=2*VT/IT #ohm(let re1=re2=re)\n", + "reD=2*re #ohm\n", + "Ad=-RC*1000/reD #unitless\n", + "print \"Differntial mode gain, Ad = \",round(Ad,1) \n", + "BetaD=Beta**2 #unitless\n", + "Rid=2*BetaD*reD/1000 #kohm(let Rid1=Rid2=Rid)\n", + "print \"Differntial input resistance, Rid is %0.1f kohm\" %Rid\n", + "#Answer for Ad is wrong(+ve) in the book while it is negative." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Q point (ICQ(mA), VCEQ(V)), ICQ is 2.47 mA & VCEQ is 6.95 V\n", + "Differntial mode gain, Ad = -85.7\n", + "Differntial input resistance, Rid is 508.6 kohm\n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.10 - page 54" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Beta=100 #unitless\n", + "VBE=0.7 #V\n", + "R=18.6 #kohm\n", + "VT=26 #mV\n", + "VCC=5 #V\n", + "VEE=5 #V\n", + "IExt=(VCC-VBE-(-VEE))/R #mA\n", + "IT=IExt #mA\n", + "re=2*VT/IT #ohm(let re1=re2=re)\n", + "Rid=2*Beta*re/1000 #kohm(let Rid1=Rid2=Rid)\n", + "print \"Differntial input resistances, Rid1=Rid2 is %0.1f kohm\" %Rid" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Differntial input resistances, Rid1=Rid2 is 20.8 kohm\n" + ] + } + ], + "prompt_number": 27 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 2.11 - page 55" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Beta=100 #unitless\n", + "VBE=0.7 #V\n", + "RC=2.7 #kohm\n", + "R=2.2 #kohm\n", + "VT=26 #mV\n", + "VCC=10 #V\n", + "VEE=10 #V\n", + "IExt=(VEE-VBE)/R #mA\n", + "IT=IExt #mA\n", + "IE=IT/2 #mA(Let IE1=IE2=IE)\n", + "re=2*VT/IT \n", + "re1=re #ohm \n", + "re2=re #ohm \n", + "re3=re #ohm\n", + "re4=re #ohm\n", + "reD=re1+re2 #ohm\n", + "BetaD=Beta**2 #unitless\n", + "Ad=-RC*1000/reD #unitless\n", + "print \"Differential voltage gain, Ad = \",round(Ad,2)\n", + "Rid=2*BetaD*reD/1000 #kohm(let Rid1=Rid2=Rid)\n", + "print \"Differntial input resistances, Rid1=Rid2 is %0.2f kohm \" %Rid \n", + "#Answer in the book is not accurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Differential voltage gain, Ad = -109.75\n", + "Differntial input resistances, Rid1=Rid2 is 492.04 kohm \n" + ] + } + ], + "prompt_number": 28 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter3_.ipynb b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter3_.ipynb new file mode 100755 index 00000000..c139e7d8 --- /dev/null +++ b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter3_.ipynb @@ -0,0 +1,251 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:3abfc8b685644532e1ae7daae315a3441663a126a87262c40494af559e8472c7" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter3 - Operational amplifiers and their parameters" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 3.1 - page : 76" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "fBW=4 #MHz\n", + "fo=10 #Hz\n", + "AOL=fBW*10**6/fo #unitless\n", + "print \"Open loop gain is %0.e\" %AOL" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Open loop gain is 4e+05\n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 3.2 - page : 78" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "V1=-10 #V\n", + "V2=10 #V\n", + "SR=0.5 #V/micro second\n", + "delta_Vo=V2-V1 #V\n", + "delta_t=delta_Vo/SR #micro second\n", + "print \"Time taken by op-amp is %0.f micro sec\" %delta_t" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Time taken by op-amp is 40 micro sec\n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 3.3 - page : 78" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "SR=0.6 #V/micro second\n", + "f=100 #kHz\n", + "Vm=(SR/10**-6)/(2*math.pi*f*1000) #V\n", + "print \"Maximum voltage, Vm is %0.3f V\" %Vm" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum voltage, Vm is 0.955 V\n" + ] + } + ], + "prompt_number": 5 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 3.4 - page : 79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "SR=0.5 #V/micro second\n", + "Vm=10 #V\n", + "f=100 #kHz\n", + "fm=(SR/10**-6)/(2*math.pi*Vm) #Hz\n", + "fm/=1000 #kHz\n", + "print \"Maximum frequency, fm is %0.2f kHz \" %fm" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum frequency, fm is 7.96 kHz \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 3.5 - page : 79" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "delta_t=0.3/2 #micro second\n", + "V1=-3 #V\n", + "V2=3 #V\n", + "delta_Vo=V2-V1 #V\n", + "SR=delta_Vo/delta_t #V/micro second\n", + "print \"Slew rate is %0.f V/micro second \" %SR\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Slew rate is 40 V/micro second \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 3.6 - page: 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "SR=2 #V/micro second\n", + "delta_Vin=0.8 #V\n", + "delta_t=10 #micro second\n", + "Acl_max=SR/(delta_Vin/delta_t) #unitless\n", + "print \"Maximum close loop voltage gain is\",Acl_max" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Maximum close loop voltage gain is 25.0\n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 3.7 - page : 80" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "import math\n", + "SR=6 #V/micro second\n", + "#Part (i)\n", + "Vm=1 #V\n", + "fm=(SR/10**-6)/(2*math.pi*Vm) #Hz\n", + "fm/=1000 #kHz\n", + "print \"part (i) Maximum frequency, fm is %0.f kHz \" %fm\n", + "#Part (ii)\n", + "Vm=10 #V\n", + "fm=(SR/10**-6)/(2*math.pi*Vm) #Hz\n", + "fm/=1000 #kHz\n", + "print \"part (ii) Maximum frequency, fm is %0.1f kHz \" %fm" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "part (i) Maximum frequency, fm is 955 kHz \n", + "part (ii) Maximum frequency, fm is 95.5 kHz \n" + ] + } + ], + "prompt_number": 12 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter4.ipynb b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter4.ipynb new file mode 100755 index 00000000..c8040bf9 --- /dev/null +++ b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter4.ipynb @@ -0,0 +1,540 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:044922821cb1a1b0c88578b071d30db5925d3f145784f5c6308641fcf8036e67" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter4 - Op-amps with negative feedback" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 4.1 - page 91" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "AOL=2*10**5 #unitless\n", + "fo=5 #Hz\n", + "ACL=100 #unitless\n", + "SF=AOL/ACL #unitless\n", + "fodash=SF*fo #Hz\n", + "fodash/=1000 #kHz\n", + "print \"Bandwidth with feedback is %0.2f kHz\" %fodash\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bandwidth with feedback is 10.00 kHz\n" + ] + } + ], + "prompt_number": 1 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 4.2 - page : 99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "AOL=2*10**5 #unitless\n", + "Ri=1.5 #kohm\n", + "Rf=12 #kohm\n", + "Rio=1 #Mohm\n", + "Ro=100 #ohm\n", + "fo=5 #Hz\n", + "Beta=Ri/(Ri+Rf) #unitless\n", + "SF=(1+AOL)*Beta #unitless\n", + "ACL=AOL/SF #unitless\n", + "print \"Value of ACL is %0.2f\" % ACL\n", + "#In case of ideal opamp\n", + "ACL=1+Rf/Ri #unitless\n", + "print \"In case of ideal opamp, Value of ACL is %0.2f \" %ACL \n", + "Rif=Rio*SF #kohm\n", + "print \"Value of Rif is %0.2f Mohm\" %Rif\n", + "print \"This is a large value can be assumed as infity resistance.\"\n", + "Rof=Ro/SF #ohm\n", + "Rof*=1000 #mohm\n", + "print \"Value of Rof is %0.2f mohm\" %Rof\n", + "fodash=SF*fo #Hz\n", + "fodash/=1000 #kHz\n", + "print \"Bandwidth with feedback, fo_dash is %0.f kHz\" %fodash\n", + "#Answer for Rif in the book has mistake of unit." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of ACL is 9.00\n", + "In case of ideal opamp, Value of ACL is 9.00 \n", + "Value of Rif is 22222.33 Mohm\n", + "This is a large value can be assumed as infity resistance.\n", + "Value of Rof is 4.50 mohm\n", + "Bandwidth with feedback, fo_dash is 111 kHz\n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 4.3 - page : 99" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "import math\n", + "AOL=float(\"inf\") #unitless\n", + "Rio=float(\"inf\") #ohm\n", + "Ri=1.0 #kohm\n", + "Rf=15.0 #kohm\n", + "SF=float(\"inf\") #unitless #as SF=1+AOL*Beta\n", + "Beta=Ri/(Ri+Rf) #unitless\n", + "ACL=1/Beta #unitless\n", + "print \"Input impedence(ohm) for ideal opamp is %0.2f \" %Rio \n", + "print \"Gain of the circuit, ACL is %0.f \" %ACL " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input impedence(ohm) for ideal opamp is inf \n", + "Gain of the circuit, ACL is 16 \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 4.4 - page : 100" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "AOL=400 #unitless\n", + "Rio=500 #kohm\n", + "Ro=75 #ohm\n", + "ACL=100 #unitlessc\n", + "SF=AOL/ACL #unitless\n", + "Rif=Rio*SF #kohm\n", + "Rif/=1000 #Mohm\n", + "print \"Input impedence, Rif is %0.2f Mohm \" %Rif \n", + "Rof=Ro/SF #ohm\n", + "print \"Output impedence, Rof is %0.2f ohm \" %Rof\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input impedence, Rif is 2.00 Mohm \n", + "Output impedence, Rof is 18.75 ohm \n" + ] + } + ], + "prompt_number": 16 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 4.5 - page : 100" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "ACL=200.0 #unitless\n", + "AOL=2*10.0**5 #unitless\n", + "Rio=2.0 #Mohm\n", + "Ro=75 #ohm\n", + "Ri=1 #kohm(Assumed)\n", + "SF=AOL/ACL #unitless\n", + "Beta=(SF-1)/AOL #unitless\n", + "Rf=Ri*(1-Beta)/Beta #kohm\n", + "print \"Input impedence, Rif is %0.f kohm\" %Ri \n", + "print \"Feedback impedence, Rf is %0.f kohm \" %Rf \n", + "\n" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input impedence, Rif is 1 kohm\n", + "Feedback impedence, Rf is 199 kohm \n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 4.6 - page : 101" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "AOL=50 #unitless\n", + "Beta=0.8 #unitless\n", + "deltaAOL=-20 #%(Change in open loop gain)\n", + "deltaBeta=15 #%(Change in feedback factor)\n", + "AOLnew=AOL+AOL*deltaAOL/100 #unitless(AOL after change)\n", + "Betanew=Beta+Beta*deltaBeta/100 #unitless(Beta after change)\n", + "ACL=AOLnew/(1+AOLnew*Betanew) #unitless\n", + "print \"Close loop gain, ACL is %0.2f \" %ACL " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Close loop gain, ACL is 1.06 \n" + ] + } + ], + "prompt_number": 20 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 4.7 - page : 102" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "AOL=500 #unitless\n", + "Rio=300 #kohm\n", + "Ro=100 #ohm\n", + "ACL=AOL/(1+AOL) #unitless\n", + "Rif=Rio*(1+AOL)/1000 #Mohm\n", + "Rof=Ro/(1+AOL) #ohm\n", + "print \"Close loop gain, ACL is %0.2f \" %ACL \n", + "print \"Value of Rif is %0.f Mohm \" %Rif\n", + "print \"Value of Rof is %0.1f ohm \" %Rof " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Close loop gain, ACL is 1.00 \n", + "Value of Rif is 150 Mohm \n", + "Value of Rof is 0.2 ohm \n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 4.8 - page : 111" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Iin=1 #mA\n", + "Rf=1 #kohm\n", + "IB=0 #for ideal opamp\n", + "If=Iin-IB #mA\n", + "Vout=-If*Rf #V\n", + "print \"Output Voltage is %0.2f V \" %Vout " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Output Voltage is -1.00 V \n" + ] + } + ], + "prompt_number": 24 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 4.9 - page : 111" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "I2=1 #mA\n", + "Rf=4.7 #kohm\n", + "#Case 1st\n", + "I1=500 #micro A\n", + "Vout1=-I1*10**-6*Rf*10**3 #V\n", + "print \"For 500 uA current, Output Voltage is %0.2f V \" %Vout1 \n", + "#Case 2nd\n", + "I2=1 #mA\n", + "Vout2=-I2*10**-3*Rf*10**3 #V\n", + "print \"For 1 mA current, Output Voltage is %0.2f V \" %Vout2 \n", + "deltaVout=Vout2-Vout1 #V\n", + "print \"Variation in Output Voltage is %0.2f V \" %deltaVout " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For 500 uA current, Output Voltage is -2.35 V \n", + "For 1 mA current, Output Voltage is -4.70 V \n", + "Variation in Output Voltage is -2.35 V \n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 4.10 - page : 112" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "AOL=2*10**5 #unitless\n", + "Rio=2 #Mohm\n", + "Ro=75 #ohm\n", + "Ri=1 #kohm\n", + "Rf=10 #kohm\n", + "ACL=-AOL*Rf/(Rf+Ri+AOL*Ri) #unitless(Exact)\n", + "print \"Exact close loop voltage gain is %0.2f \" %ACL \n", + "ACL=-Rf/Ri #unitless(Approximate)\n", + "print \"Approximate close loop voltage gain is %0.2f \" %ACL\n", + "Beta=Ri/(Ri+Rf) #unitless\n", + "SF=1+AOL*Beta #unitless\n", + "Rif=Rio*10**6/SF #ohm\n", + "print \"Input impedence after feedback is %0.f ohm\" %Rif\n", + "# Answer for last part wrong in the textbook." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Exact close loop voltage gain is -10.00 \n", + "Approximate close loop voltage gain is -10.00 \n", + "Input impedence after feedback is 110 ohm\n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 4.11 - page : 113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Ri=2 #kohm\n", + "Rf=200 #kohm\n", + "#For 741C\n", + "fo=5 #Hz\n", + "AOL=2*10**5 #unitless\n", + "UGB=1 #MHz\n", + "ACL=-AOL*Rf/(Rf+Ri+AOL*Ri) #unitless(Exact)\n", + "print \"Close loop voltage gain is %0.2f \" %ACL \n", + "fodash=fo*AOL/-ACL #Hz\n", + "fodash/=1000 #kHz\n", + "print \"Bandwidth, fo_dash is %0.f kHz \" %fodash " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Close loop voltage gain is -99.95 \n", + "Bandwidth, fo_dash is 10 kHz \n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 4.12 - page : 113" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import sqrt\n", + "Beta=0.06 #feedback factor\n", + "fo=100 #Hz\n", + "AOL=40000 #unitless(at dc)\n", + "SFdc=1+AOL*Beta #sacrifice factor at dc\n", + "f=1 #kHz\n", + "f=f*10**3 #Hz\n", + "SF1=1+AOL*Beta/sqrt(1+f**2/fo**2) #sacrifice factor at 1 kHz\n", + "#(a)\n", + "ACL=AOL/SFdc #(unitless)exact close loop gain at dc\n", + "print \"Exact close loop gain at dc is %0.2f \" %ACL \n", + "#(b)\n", + "ACL=1/Beta #(unitless)approximate close loop gain at dc\n", + "print \"Approximate close loop gain at dc is %0.2f \" %ACL \n", + "#(c)\n", + "AOL=3980 #unitless(at dc)\n", + "ACL=AOL/SF1 #(unitless)exact close loop gain at 1kHz\n", + "print \"Exact close loop gain at 1kHz is %0.2f \" %ACL\n", + "# Answer not accurate in the textbook." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Exact close loop gain at dc is 16.66 \n", + "Approximate close loop gain at dc is 16.67 \n", + "Exact close loop gain at 1kHz is 16.60 \n" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 4.13 - page : 115" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Beta=0.04 #feedback factor\n", + "AOL=5000 #unitless(at dc)\n", + "Rio=40 #kohm\n", + "Ro=1 #kohm\n", + "SF=1+AOL*Beta #sacrifice factor at dc\n", + "Rif=Rio/SF*1000 #ohm\n", + "print \"Input impedence is %0.f ohm \" %Rif \n", + "Rof=Ro*1000/SF #ohm\n", + "print \"Output impedence is %0.2f ohm \" %Rof " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Input impedence is 199 ohm \n", + "Output impedence is 4.98 ohm \n" + ] + } + ], + "prompt_number": 41 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter5.ipynb b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter5.ipynb new file mode 100755 index 00000000..a645b224 --- /dev/null +++ b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter5.ipynb @@ -0,0 +1,701 @@ +{ + "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+k4I9393Dj2LflDCSF3jQMGZXn/J8C97r4h5mOf\nWc6xx8V43Nq2B1CW9toBq86OLFIjUYkkxd31yMEHsA2wEuiT9t6OwBdAJ2BrYBTwbvS4EdgqWu9s\n4PmM/W0A2gC/AL4GvgJWA49mOfbuwDqgVdp7HaJtdko7xuvAKuAN4Iws+zk62ubr6FjzovdTwDlp\n+3kRuAH4FHgN6AX8FHgbWA6cmbbPrYG/AG8BHwC3AQ3KOYdtgMnACuAj4F5g+2jZZGB9dD5XA/cB\n3wCfR68vjdY7GHgpim0+0C9t/yngmij+z4G9ssRwOfBOdJ5eAfoDDaLjbjyXv47Od+Po9dXAjdHz\ncdHrhtE230TxrQKaAfWAEdF5WwW8DLRI+50PBv4TxT+mgr+3UuCe6HmD6FytiLabBexaznbto/Pw\nKbAYGJC2bBzwv8AzUWwpv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OmHtgrbuvAFYSSkEQbiLWOnq+ELjPzH4MfJO2/Xtp64jkJCUEkfJl\nzj71VdrzDWmvN7BpbpHjgFuAA4DZZrbx/1gRmuNDcpwSgsgmq4Fto+dvAc3SlmUmBzKXRbfpbuXu\nKcLctdsDjaN1dov2KZKzcnnGNJFa5e4fm9mLZrYImAQUm1kjd19L+Haf/g0/87kTbtN+TzSTmQE3\nufuqaJ3ubCoxieQk3f5apBxmVgosdfcHtnA/RcBcoJu7r6+J2ETioJKRSPluYdNsU1vieGCCkoHk\nOrUQREQEUAtBREQiSggiIgIoIYiISEQJQUREACUEERGJKCGIiAgA/w+X0dHTq7icngAAAABJRU5E\nrkJggg==\n", + "text": [ + "<matplotlib.figure.Figure at 0x7fc6c229f310>" + ] + } + ], + "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": {} + } + ] +}
\ No newline at end of file diff --git a/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter6.ipynb b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter6.ipynb new file mode 100755 index 00000000..b4790d59 --- /dev/null +++ b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter6.ipynb @@ -0,0 +1,767 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:7063e92d4f64e517cc0dbce51d65911cbb3639cdb52d68efbfa4c03a57d713df" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter6 - Oscillators and waveform generators" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 6.1 - page 170" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, sqrt, ceil\n", + "f0=600 #Hz#Oscillating Frequency\n", + "print \"Various design parameters are :-\"\n", + "C=0.05 #micro F#Chosen for the design\n", + "print \"Capacitance = %0.2f micro F\" %C\n", + "R=1/(2*pi*f0*sqrt(6)*C*10**-6) #ohm\n", + "R=R/1000 #kohm\n", + "print \"Resistance R = %0.1f kohm\" %R\n", + "#To avoid loading effect\n", + "Ri=10*R #kohm#Ri>=10*R\n", + "Ri=ceil(Ri) #kohm\n", + "print \"Resistance Ri = %0.1f kohm\" % Ri\n", + "Rf=29*Ri #kohm#Rf>=29*Ri\n", + "print \"Resistance Rf = %0.1f kohm\" %Rf\n", + "Rf=640 #kohm\n", + "#Balancing the circuit\n", + "Rom=Rf*Ri/(Rf+Ri) #kohm\n", + "Rom=ceil(Rom) #kohm\n", + "print \"Resistance Rom = %0.1f kohm\" %Rom" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are :-\n", + "Capacitance = 0.05 micro F\n", + "Resistance R = 2.2 kohm\n", + "Resistance Ri = 22.0 kohm\n", + "Resistance Rf = 638.0 kohm\n", + "Resistance Rom = 22.0 kohm\n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 6.3 - page 181" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi\n", + "f0=12 #kHz#Oscillating Frequency\n", + "print \"Various design parameters are :-\"\n", + "C=0.01 #micro F#Chosen for the design between 0.01 & 1 micro F\n", + "print \"Capacitance = %0.2f micro F \" % C\n", + "R=1/(2*pi*f0*1000*C*10**-6) #ohm\n", + "R=R/1000 #kohm\n", + "print \"Resistance R = %0.1f kohm\" %R\n", + "Ri=3*R/2 #kohm#Ri>=3*R/2\n", + "print \"Resistance Ri = %0.2f kohm\" %Ri\n", + "Ri=2.2 #kohm\n", + "Rf=2*Ri #kohm\n", + "print \"Resistance Rf = %.1f kohm\" %Rf" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are :-\n", + "Capacitance = 0.01 micro F \n", + "Resistance R = 1.3 kohm\n", + "Resistance Ri = 1.99 kohm\n", + "Resistance Rf = 4.4 kohm\n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 6.5 - page 184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi\n", + "f0=2 #kHz#Oscillating Frequency\n", + "print \"Various design parameters are :-\"\n", + "C=0.05 #micro F#Chosen for the design\n", + "print \"Capacitance = %0.2f micro F \" %C\n", + "R=1/(2*pi*f0*1000*C*10**-6) #ohm\n", + "R=R/1000 #kohm\n", + "print \"Resistance R = %0.1f kohm \" %R \n", + "Ri=3*R/2 #kohm#Ri>=3*R/2\n", + "print \"Resistance Ri = %0.1f kohm \" %Ri \n", + "Rf=2*Ri #kohm\n", + "print \"Resistance Rf = %0.1f kohm \" %Rf " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are :-\n", + "Capacitance = 0.05 micro F \n", + "Resistance R = 1.6 kohm \n", + "Resistance Ri = 2.4 kohm \n", + "Resistance Rf = 4.8 kohm \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 6.6 - page : 184" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi\n", + "#Data given\n", + "R1=1 #kohm\n", + "R2=1 #kohm\n", + "R=1 #kohm\n", + "C=4.7 #micro F\n", + "f0=1/(2*pi*R*10**3*C*10**-6) #Hz#Oscillating Frequency\n", + "print \"Oscillation frequency = %0.2f Hz \" %f0 " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Oscillation frequency = 33.86 Hz \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 6.7 - page : 188" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "f0=200 #Hz#Oscillating Frequency\n", + "print \"Various design parameters are :-\" \n", + "C=0.05 #micro F#Chosen for the design\n", + "print \"Capacitance = %0.2f micro F \" %C \n", + "R=0.159/(f0*C*10**-6) #ohm\n", + "R=R/1000 #kohm\n", + "print \"Resistance R = %0.1f kohm \" %R \n", + "R=510 #kohm\n", + "C1=C;C2=C;C3=C #micro F\n", + "print \"Capacitance C1 = C2 = C3 = %0.2f micro F \" %(C3) \n", + "R2=R;R3=R #kohm\n", + "print \"Resistance R2 = %0.1f kohm, R3 = %0.1f kohm \" %(R3,R2)\n", + "#Answer for R is calculated wrong in the textbook." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are :-\n", + "Capacitance = 0.05 micro F \n", + "Resistance R = 15.9 kohm \n", + "Capacitance C1 = C2 = C3 = 0.05 micro F \n", + "Resistance R2 = 510.0 kohm, R3 = 510.0 kohm \n" + ] + } + ], + "prompt_number": 19 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 6.8 - page : 189" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "Rf=570 #kohm\n", + "Ri=15 #kohm\n", + "A=Rf/Ri #Gain of the circuit\n", + "Amin=29 #Minimum Gain requirement of RC phase shift oscillator\n", + "deltaA=(A-Amin)/Amin*100 #%(Exceeding Gain)\n", + "print \"Gain is exceeded by %0.f %% \" %deltaA " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Gain is exceeded by 31 % \n" + ] + } + ], + "prompt_number": 21 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 6.9 - page : 192" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, sqrt\n", + "print \"Part (a)\"\n", + "L1=25 #micro H\n", + "L2=10 #micro H\n", + "Rf=22 #kohm\n", + "C=0.01 #micro F\n", + "LT=L1+L2 #micro H\n", + "fr=1/(2*pi*sqrt(C*10**-6*LT*10**-6)) #Hz\n", + "fr=fr/1000 #kHz\n", + "f0=fr #/kHz\n", + "print \"Oscillation frequency = %0.1f kHz \" %f0 \n", + "Ri=Rf/(L1/L2) #kohm\n", + "print \"Resistance Ri = %0.1f kohm \" %Ri \n", + "print \"Part (b)\"\n", + "C1=220 #pF\n", + "C2=680 #pF\n", + "Rf=22 #kohm\n", + "L=1 #mH\n", + "CT=C1*C2/(C1+C2) #pF\n", + "fr=1/(2*pi*sqrt(L*10**-3*CT*10**-12)) #Hz\n", + "fr=fr/1000 #kHz\n", + "f0=fr #/kHz\n", + "f0=round(f0) #kHz\n", + "print \"Oscillation frequency = %0.1f kHz \" %f0\n", + "Ri=Rf/(C1/C2) #kohm\n", + "print \"Resistance Ri = %0.1f kohm \" %Ri" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (a)\n", + "Oscillation frequency = 269.0 kHz \n", + "Resistance Ri = 8.8 kohm \n", + "Part (b)\n", + "Oscillation frequency = 390.0 kHz \n", + "Resistance Ri = 68.0 kohm \n" + ] + } + ], + "prompt_number": 23 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 6.10 - page : 198" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "f0=1 #/kHz\n", + "Vsat=14 #V\n", + "print \"Various design parameters are :-\"\n", + "C1=0.05 #micro F#Chosen for the design\n", + "print \"Capacitance = %0.2f micro F \" %C1\n", + "Rf=1/(2*f0*10**3*C1*10**-6)/1000 #kohm\n", + "print \"Resistance Rf = %0.1f kohm \" %Rf \n", + "#R2=0.86*R1 and Rf=R1||R2\n", + "R2byR1=0.86 #from R2=0.86*R1 \n", + "R2=Rf*(1+R2byR1) #kohm\n", + "R1=R2/R2byR1 #kohm\n", + "print \"Resistance R1 = %0.1f kohm \" %R1 \n", + "print \"Resistance R2 = %0.1f kohm \" %R2 " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are :-\n", + "Capacitance = 0.05 micro F \n", + "Resistance Rf = 10.0 kohm \n", + "Resistance R1 = 21.6 kohm \n", + "Resistance R2 = 18.6 kohm \n" + ] + } + ], + "prompt_number": 26 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 6.11 - page 199" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division \n", + "from math import log\n", + "T=10 #ms#(Time period)\n", + "f0=1/(T*10**-3) #Hz\n", + "C=0.05 #micro F#Chosen for the design\n", + "#Formula : f0=1/{2*Rf*C*log(1+2*R2/R1)}\n", + "Rf=1/(f0*2*C*10**-6*log(1+2))/1000 #kohm#By putting R1=R2 for this case\n", + "Rf=round(Rf) #kohm\n", + "print \"Resistance Rf = %0.1f kohm \" %Rf \n", + "print \"Capacitance for the design is %0.2f micro F \" %C " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Resistance Rf = 91.0 kohm \n", + "Capacitance for the design is 0.05 micro F \n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 6.12 - page : 200" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division \n", + "from math import log\n", + "R1=4.7 #kohm\n", + "R2=3.3 #kohm\n", + "Rf=2 #kohm\n", + "C=0.1 #micro F\n", + "f0=1/2/(Rf*1000)/(C*10**-6)/log(1+2*R2/R1)/1000 #kHz\n", + "print \"Frequency of output signal is %0.2f kHz \" %f0 " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency of output signal is 2.85 kHz \n" + ] + } + ], + "prompt_number": 30 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 6.13 - page : 204" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division \n", + "f0=1.5 #kHz\n", + "Vout=6 #V##peak to peak\n", + "Vsat=13.5 #V\n", + "print \"Various design parameters are : \"\n", + "R2=10 #kohm#/choosen for the design\n", + "R1=R2*2*Vsat/Vout #kohm\n", + "print \"R1 = %0.2f kohm \" %R1 \n", + "print \"R2 = %0.2f kohm \" %R2 \n", + "#Let Cf=0.05 micro F for the design\n", + "Cf=0.05 #micro F\n", + "print \"Cf = %0.2f micro F \" %Cf \n", + "Ri=R1*1000/(f0*1000)/4/(Cf*10**-6*R2*1000)/1000 #kohm\n", + "print \"Ri = %0.2f kohm \" %Ri " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are : \n", + "R1 = 45.00 kohm \n", + "R2 = 10.00 kohm \n", + "Cf = 0.05 micro F \n", + "Ri = 15.00 kohm \n" + ] + } + ], + "prompt_number": 32 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "#Ex 6.14\n", + "from __future__ import division \n", + "#Data given\n", + "R1=6.8 #kohm\n", + "Ri=100 #kohm\n", + "R2=1.5 #kohm\n", + "Cf=0.01 #micro F\n", + "Vsat=14 #V\n", + "Vo_pp=2*R2/R1*Vsat #V##Peak to peak output of triangular wave\n", + "print \"Peak to peak output of triangular wave is %0.1f V \" %Vo_pp\n", + "f0=R1*1000/(4*Ri*10**3*Cf*10**-6*R2*10**3)/1000 #kHz#Oscillating Frequency\n", + "print \"Oscillation frequency is %0.2f Hz\" %f0" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Peak to peak output of triangular wave is 6.2 V \n", + "Oscillation frequency is 1.13 Hz\n" + ] + } + ], + "prompt_number": 34 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 6.15 - page : 205" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division \n", + "#Data given\n", + "f0=1 #kHz\n", + "Vo_pp=7 #V\n", + "Vsat=14 #V\n", + "print \"Various design parameters are :-\"\n", + "#Let R2=10 #kohm for the design\n", + "R2=10 #kohm\n", + "R1=2*R2*Vsat/Vo_pp #kohm\n", + "print \"R1 = %0.2f kohm \" %R1 \n", + "print \"R2 = %0.2f kohm \" %R2 \n", + "#Choose Cf=0.1 micro F for the design\n", + "Cf=0.1 #micro F\n", + "print \"Cf = %0.2f micro F \" %Cf \n", + "Ri=R1*10**3/(4*f0*10**3*Cf*10**-6*R2*10**3)/1000 #kohm\n", + "print \"Ri = %0.2f kohm \" %Ri " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are :-\n", + "R1 = 40.00 kohm \n", + "R2 = 10.00 kohm \n", + "Cf = 0.10 micro F \n", + "Ri = 10.00 kohm \n" + ] + } + ], + "prompt_number": 35 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 6.16 - page : 208" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division \n", + "from math import log\n", + "#Data given\n", + "tau=1 #ms(time period)\n", + "R1byR2_min=1.8 # min R1/R2\n", + "R1byR2_max=9 # max R1/R2\n", + "Beta_min=1/(1+R1byR2_min) #minimum value of Beta\n", + "Beta_max=1/(1+R1byR2_max) #maximum value of Beta\n", + "Tmax=2*tau*log((1+Beta_min)/(1-Beta_min)) #ms##For minimum value of Beta\n", + "fmin=1/(Tmax*10**-3) #Hz\n", + "Tmin=2*tau*log((1+Beta_max)/(1-Beta_max)) #ms##For maximum value of Beta\n", + "fmax=1/(Tmin*10**-3)/1000 #kHz\n", + "print \"Frequency range is %d Hz to %0.1f kHz.\" %(fmin, fmax)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Frequency range is 669 Hz to 2.5 kHz.\n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 6.17 : page 211" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division \n", + "from math import sqrt, pi\n", + "#Data given\n", + "Ls=3 #H\n", + "Cs=0.05 #pF\n", + "Rs=2 #kohm\n", + "Cm=10 #pF\n", + "fS=1/2/pi/sqrt(Ls*Cs*10**-12)/1000 #kHz\n", + "print \"Series resonant frequency is %0.f kHz \" %fS \n", + "CT=Cm*Cs/(Cm+Cs) #pF##Equivalent capacitance\n", + "fP=1/2/pi/sqrt(Ls*CT*10**-12)/1000 #kHz\n", + "print \"Parallel resonant frequency is %0.f kHz \" %fP " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Series resonant frequency is 411 kHz \n", + "Parallel resonant frequency is 412 kHz \n" + ] + } + ], + "prompt_number": 42 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 6.18 - page : 220" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division \n", + "#Data given\n", + "f0=5 #kHz\n", + "D=60 #%##duty cycle\n", + "VCC=12 #V\n", + "#As D=t1/(t1+t2)\n", + "t2BYt1=1/(D/100)-1 #ratio of t1 & t2\n", + "#RB/(2*RA-RB)=t2/t1\n", + "RAbyRB=(1/t2BYt1+1)/2 #Ratio of RA & RB\n", + "print \"Various design parameters are :\"\n", + "#Let CT=0.05 micro F for this design choosing between 0.01 & 1 microo F\n", + "CT=0.05 #micro F\n", + "print \"CT = %0.2f micro F \" %CT \n", + "RA=1/(f0*10**3)/(5/3)**2/(CT*10**-6)/1000 #kohm\n", + "print \"RA = %0.2f kohm \" %RA\n", + "RB=RA/RAbyRB #kohm\n", + "print \"RB = %0.2f kohm \" %RB" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are :\n", + "CT = 0.05 micro F \n", + "RA = 1.44 kohm \n", + "RB = 1.15 kohm \n" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 6.19 - page : 225" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division \n", + "#Data given\n", + "Rf=15 #kohm\n", + "RT1=4.7 #kohm\n", + "R1=56 #kohm\n", + "R2=6.8 #kohm\n", + "R3=10 #kohm\n", + "R4=1 #kohm\n", + "R5=1 #kohm\n", + "CB=1 #micro F\n", + "CT=0.05 #mic\n", + "VCC=15 #V\n", + "V1=-15 #V##Voltage given through the resistance(R1) 56 kohm\n", + "print \"Part (i)\"\n", + "Vin=2 #V\n", + "Vo=Rf/R1*(-V1)-Rf/R2*Vin #V\n", + "print \"Voltage Vo = %0.3f V \" %Vo \n", + "N_VCC=0 #V##-VCC##voltage given to the 12th pin of IC\n", + "V7=N_VCC+3 #V\n", + "print \"Voltage V7 = %0.2f V \" %V7\n", + "I=(V7-Vo)/RT1 #mA\n", + "print \"Current I = %0.2f mA \" %I \n", + "Rmult=R4*R5/(R4+R5)+R3 #kohm##on pin 3\n", + "print \"Total resistance on pin 3, Rmult = %0.2f kohm \" %Rmult\n", + "f0=0.32*I*10**-3/(CT*10**-6)/1000 #kHz\n", + "print \"Oscillation frequency is %0.1f kHz \" %f0\n", + "print \"Part (ii)\"\n", + "Vin=5 #V\n", + "Vo=Rf/R1*(-V1)-Rf/R2*Vin #V\n", + "print \"Voltage Vo = %0.f V \" %Vo \n", + "N_VCC=0 #V##-VCC##voltage given to the 12th pin of IC\n", + "V7=N_VCC+3 #V\n", + "print \"Voltage V7 = %0.f V \" %V7 \n", + "I=(V7-Vo)/RT1 #mA\n", + "print \"Current I = %0.2f mA \" %I \n", + "Rmult=R4*R5/(R4+R5)+R3 #kohm##on pin 3\n", + "print \"Total resistance on pin 3, Rmult = %0.2f kohm \" %Rmult \n", + "f0=0.32*I*10**-3/(CT*10**-6)/1000 #kHz\n", + "print \"Oscillation frequency is %0.2f kHz\" %f0" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part (i)\n", + "Voltage Vo = -0.394 V \n", + "Voltage V7 = 3.00 V \n", + "Current I = 0.72 mA \n", + "Total resistance on pin 3, Rmult = 10.50 kohm \n", + "Oscillation frequency is 4.6 kHz \n", + "Part (ii)\n", + "Voltage Vo = -7 V \n", + "Voltage V7 = 3 V \n", + "Current I = 2.13 mA \n", + "Total resistance on pin 3, Rmult = 10.50 kohm \n", + "Oscillation frequency is 13.63 kHz\n" + ] + } + ], + "prompt_number": 49 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter7.ipynb b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter7.ipynb new file mode 100755 index 00000000..2e5c30d1 --- /dev/null +++ b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter7.ipynb @@ -0,0 +1,323 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:da9731a08909e4ad4cafbaaa3667ca4e507b854221c0c6168fb27a7fc7f1c9cc" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter7 - The 555 timer" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 7.1 - page : 233" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "th=4 #ms\n", + "VCC=10 #V\n", + "C=0.05 #micro F(choosen between 0.01<=C<=1)\n", + "R=th*10**-3/(1.1*C*10**-6)/1000 #kohm\n", + "C1=0.01 #micro F(assumed)\n", + "C2=0.01 #micro F(choosen between 0.01<=C<=1)\n", + "R2=th*10**-3/(10*C2*10**-6)/1000 #kohm\n", + "C3=10 #micro F\n", + "print \"Design values are : \"\n", + "print \"Capacitance C = %0.2f micro F \" %C \n", + "print \"Resistance R = %0.1f kohm \" %R \n", + "print \"Capacitance C1 = %0.2f micro F \" %C1 \n", + "print \"Capacitance C2 = %0.2f micro F \" %C2 \n", + "print \"Resistance R2 = %0.2f kohm \" %R2 \n", + "print \"Capacitance C3 = %0.2f micro F \" %C3 \n", + "#Answer of R2 is wrong in the book." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Design values are : \n", + "Capacitance C = 0.05 micro F \n", + "Resistance R = 72.7 kohm \n", + "Capacitance C1 = 0.01 micro F \n", + "Capacitance C2 = 0.01 micro F \n", + "Resistance R2 = 40.00 kohm \n", + "Capacitance C3 = 10.00 micro F \n" + ] + } + ], + "prompt_number": 2 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 7.2 - page : 236" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "ft=2 #kHz\n", + "C=0.01 #micro F\n", + "T=1/ft #ms\n", + "n=3 #for divide-by-3 circuit\n", + "th=(0.2+(n-1))*T #ms\n", + "R=th/(1.1*C) #kohm\n", + "print \"Value of Resistance R = %0.2f kohm \" %R" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Value of Resistance R = 100.00 kohm \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 7.3 - page 239" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "fo=2 #kHz\n", + "D=70 #%(duty cycle)\n", + "T=1/fo #ms\n", + "VCC=12 #V\n", + "tC=D*T/100 #ms\n", + "tD=T-tC #ms\n", + "C=0.05 #micro F(choosen between 0.01<=C<=1)\n", + "RB=tD*10**-3/(0.69*C*10**-6)/1000 #kohm\n", + "RA=tC*10**-3/(0.69*C*10**-6)/1000-RB #kohm\n", + "print \"Design values are : \"\n", + "print \"Capacitance C = %0.2f micro F \" %C \n", + "print \"Resistance RA = %0.1f kohm \" %RA \n", + "print \"Resistance RB = %0.1f kohm \" %RB\n", + "#Answer is not accurate in the textbook." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Design values are : \n", + "Capacitance C = 0.05 micro F \n", + "Resistance RA = 5.8 kohm \n", + "Resistance RB = 4.3 kohm \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 7.4 : page 243" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "fo=2 #kHz\n", + "D=50 #%(duty cycle)\n", + "T=1/fo #ms\n", + "VCC=10 #V\n", + "tC=D*T/100 #ms\n", + "tD=T-tC #ms\n", + "C=0.1 #micro F(choosen between 0.01<=C<=1)\n", + "RB=tD*10**-3/(0.69*C*10**-6)/1000 #kohm\n", + "RA=T*10**-3*1.45/(C*10**-6)/1000-RB #kohm\n", + "print \"Design values are : \"\n", + "print \"Capacitance C= %0.2f micro F \" %C \n", + "print \"Resistance RA = %0.1f kohm \" % RA \n", + "print \"Resistance RB = %0.1f kohm \" %RB \n", + "# RA & RB should be equal for 50% duty cycle." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Design values are : \n", + "Capacitance C= 0.10 micro F \n", + "Resistance RA = 3.6 kohm \n", + "Resistance RB = 3.6 kohm \n" + ] + } + ], + "prompt_number": 8 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 7.5 - page : 244" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "fo=2 #kHz\n", + "D=40 #%(duty cycle)\n", + "T=1/fo #ms\n", + "VCC=10 #V\n", + "tC=D*T/100 #ms\n", + "tD=T-tC #ms\n", + "C=0.22 #micro F(choosen between 0.01<=C<=1)\n", + "RB=tD*10**-3/(0.69*C*10**-6)/1000 #kohm\n", + "RA=T*10**-3*1.45/(C*10**-6)/1000-RB #kohm\n", + "print \"Design values are : \" \n", + "print \"Capacitance C = %0.2f micro F \" %C \n", + "print \"Resistance RA = %0.1f kohm \" %RA \n", + "print \"Resistance RB = %0.f kohm \" %round(RB) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Design values are : \n", + "Capacitance C = 0.22 micro F \n", + "Resistance RA = 1.3 kohm \n", + "Resistance RB = 2 kohm \n" + ] + } + ], + "prompt_number": 11 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 7.6 - page : 245" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "fo=700 #Hz\n", + "D=50 #%(duty cycle)\n", + "T=1/fo*1000 #ms\n", + "VCC=10 #V\n", + "tC=D*T/100 #ms\n", + "tD=T-tC #ms\n", + "C=0.05 #micro F(choosen between 0.01<=C<=1)\n", + "RB=tD*10**-3/(0.69*C*10**-6)/1000 #kohm\n", + "RA=T*10**-3*1.45/(C*10**-6)/1000-RB #kohm\n", + "print \"Design values are : \"\n", + "print \"Capacitance C = %0.2f micro F \" %C \n", + "print \"Resistance RA = %0.2f kohm \" %round(RA) \n", + "print \"Resistance RB = %0.2f kohm \" %round(RB) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Design values are : \n", + "Capacitance C = 0.05 micro F \n", + "Resistance RA = 21.00 kohm \n", + "Resistance RB = 21.00 kohm \n" + ] + } + ], + "prompt_number": 12 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 7.7 - page : 246" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "fo=800 #Hz\n", + "D=60 #%(duty cycle)\n", + "T=1/fo*1000 #ms\n", + "VCC=10 #V\n", + "tC=D*T/100 #ms\n", + "tD=T-tC #ms\n", + "C=0.047 #micro F(choosen between 0.01<=C<=1)\n", + "RB=tD*10**-3/(0.69*C*10**-6)/1000 #kohm\n", + "RA=tC*10**-3*1.45/(C*10**-6)/1000-RB #kohm\n", + "print \"Design values are : \"\n", + "print \"Capacitance C = %0.3f micro F \" %C \n", + "print \"Resistance RA = %0.2f kohm \" %round(RA) \n", + "print \"Resistance RB = %0.2f kohm \" %round(RB)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Design values are : \n", + "Capacitance C = 0.047 micro F \n", + "Resistance RA = 8.00 kohm \n", + "Resistance RB = 15.00 kohm \n" + ] + } + ], + "prompt_number": 14 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter8.ipynb b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter8.ipynb new file mode 100755 index 00000000..daf49de6 --- /dev/null +++ b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter8.ipynb @@ -0,0 +1,152 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:f8edf8ce3087d3427d18e8cd2380d8c52cf11f5604fcdfa69ecbcc1dd7de5bc3" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter8 - Frequency synthesizers and PLL" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 8.1 - page : 255" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import sqrt, pi\n", + "VCC=6 #V\n", + "VEE=6 #V\n", + "RT=4 #kohm\n", + "CT=330 #pF\n", + "C=240 #pF\n", + "fo=0.3/(RT*1000*CT*10**-12)/1000 #kHz\n", + "print \"Free running frequency is %0.f kHz \" %fo\n", + "Vplus=(VCC-(-VEE))/2 #V\n", + "deltafL=8*fo/Vplus #kHz\n", + "print \"Lock Range(+ve & -ve) is %0.f kHz \" %deltafL \n", + "#For LM 565\n", + "R=3.6 #kohm\n", + "deltafC=sqrt(deltafL*1000/(2*pi*R*1000*C*10**-12))/1000 #kHz\n", + "print \"Capture Range(+ve & -ve) is %0.f kHz \" %deltafC\n", + "deltafP=2*deltafC/2 #kHz\n", + "print \"Pull-in Range is %0.f kHz \" %deltafP " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Free running frequency is 227 kHz \n", + "Lock Range(+ve & -ve) is 303 kHz \n", + "Capture Range(+ve & -ve) is 236 kHz \n", + "Pull-in Range is 236 kHz \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 8.2 - page : 256" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import sqrt, pi, floor\n", + "fo=450 #kHz\n", + "deltafL=240 #kHz(+ve & -ve)\n", + "deltafC=40 #kHz(+ve & -ve)\n", + "Vplus=8*fo/deltafL #V\n", + "#Vplus=(VCC-(-VEE))/2 but |VCC|=|-VEE|\n", + "VCC=Vplus #V\n", + "VEE=Vplus #V\n", + "print \"For the design |VCC|=|-VEE| is %d Volt\" %VCC\n", + "RT=4.7 #kohm(Assumed for design)\n", + "R=3.6 #kohm\n", + "CT=0.3/(RT*1000*fo*1000)*10**12 #pF\n", + "C=1/((deltafC*10**3)**2*(2*pi*R*10**3)/(deltafL*1000))*10**9 #nF\n", + "print \"Value of RT = %0.2f kohm \" %RT\n", + "print \"Value of CT = %0.f pF \" %CT\n", + "print \"Value of C = %0.f nF \" % floor(C)" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "For the design |VCC|=|-VEE| is 15 Volt\n", + "Value of RT = 4.70 kohm \n", + "Value of CT = 142 pF \n", + "Value of C = 6 nF \n" + ] + } + ], + "prompt_number": 10 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 8.3 - page : 264" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import log\n", + "fmax=160 #kHz\n", + "fr=4 #Hz(Resolution)\n", + "M=2.4 #unitless\n", + "fclk=M*fmax #kHz\n", + "print \"Clock frequency is %0.2f kHz \" %fclk\n", + "N=log(fclk*1000/fr)/log(2) #no. of bits\n", + "print \"No. of bits = %0.f \" % round(N) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Clock frequency is 384.00 kHz \n", + "No. of bits = 17 \n" + ] + } + ], + "prompt_number": 12 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file diff --git a/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter9.ipynb b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter9.ipynb new file mode 100755 index 00000000..c99919b0 --- /dev/null +++ b/Analog_Integrated_Circuits_by_R.S._Tomar/Chapter9.ipynb @@ -0,0 +1,958 @@ +{ + "metadata": { + "name": "", + "signature": "sha256:37cf075e7171812be5843be8bfa73abd6fa4ec1e75c4ee917f74396ed076786b" + }, + "nbformat": 3, + "nbformat_minor": 0, + "worksheets": [ + { + "cells": [ + { + "cell_type": "heading", + "level": 1, + "metadata": {}, + "source": [ + "Chapter9 - Active filters" + ] + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 9.2 - page : 273" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi\n", + "fH=1 #kHz\n", + "Ap=2 #Pass band gain\n", + "print \"Various design parameters are :-\"\n", + "C=0.05 #micro F#Chosen for the design\n", + "print \"Capacitance is %0.2f micro F \" %C\n", + "R=1/(2*pi*fH*1000*C*10**-6)/1000 #kohm\n", + "print \"Resistance R = %0.1f kohm \" %R \n", + "#Ap=1+Rf/Ri\n", + "RfBYRi=Ap-1 #Rf=Ri here\n", + "#R=Rf||Ri\n", + "Ri=2*R #kohm\n", + "Rf=Ri #kohm\n", + "print \"Resistance Ri = %0.1f kohm \" %Ri\n", + "print \"Resistance Rf = %0.1f kohm \" %Rf" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are :-\n", + "Capacitance is 0.05 micro F \n", + "Resistance R = 3.2 kohm \n", + "Resistance Ri = 6.4 kohm \n", + "Resistance Rf = 6.4 kohm \n" + ] + } + ], + "prompt_number": 3 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 9.3 - page : 273" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "f0=800 #Hz\n", + "#For Butterworth filter : f0=fH=f_3dB\n", + "fH=f0 #Hz\n", + "f_3dB=f0 #Hz\n", + "BW=fH #Hz\n", + "print \"Bandwidth = %0.2f Hz \" %BW " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Bandwidth = 800.00 Hz \n" + ] + } + ], + "prompt_number": 4 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 9.4 - page 274" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi\n", + "fH=2 #kHz(Cutoff frequency)\n", + "Ap=1 #Pass band gain\n", + "print \"Various design parameters are :-\"\n", + "C=0.05 #micro F#Chosen for the design between 0.01 & 1 micro F\n", + "print \"Capacitance = %0.2f micro F \" %C\n", + "R=1/(2*pi*fH*1000*C*10**-6)/1000 #kohm\n", + "print \"Resistance R = %0.1f kohm \" %R\n", + "Rdash=R #/kohm(To eliminate the effect of offset)\n", + "print \"Resistance R* = %0.1f kohm \" %Rdash " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are :-\n", + "Capacitance = 0.05 micro F \n", + "Resistance R = 1.6 kohm \n", + "Resistance R* = 1.6 kohm \n" + ] + } + ], + "prompt_number": 6 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 9.5 - page : 275" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi\n", + "f0=1 #kHz(Cutoff frequency)\n", + "f0dash=1.5 #kHz(Cutoff frequency)\n", + "print \"Various design parameters are :-\"\n", + "#For Butterworth filter\n", + "fH=f0 #kHz\n", + "fHdash=f0dash #kHz\n", + "K=f0/f0dash #ratio\n", + "R=3.2 #kohm\n", + "Rdash=K*R #kohm\n", + "print \"Resistance Rdash = %0.1f kohm \" %Rdash \n", + "C=0.05 #micro F#Chosen for the design\n", + "print \"Capacitance = %0.2f micro F \" %C\n", + "fHdash=1/(2*pi*Rdash*1000*C*10**-6)/1000 #kHz\n", + "print \"Cutoff frequency is %0.1f kHz \" %fHdash " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are :-\n", + "Resistance Rdash = 2.1 kohm \n", + "Capacitance = 0.05 micro F \n", + "Cutoff frequency is 1.5 kHz \n" + ] + } + ], + "prompt_number": 9 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 9.6 - page : 278" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi\n", + "fL=400 #Hz\n", + "Ap=2 #Pass band gain\n", + "print \"Various design parameters are :-\"\n", + "C=0.05 #micro F#Chosen for the design between 0.01 & 1 micro F\n", + "print \"Capacitance is %0.2f micro F \" %C\n", + "R=1/(2*pi*fL*C*10**-6)/1000 #kohm\n", + "print \"Resistance R = %0.2f kohm \" %R\n", + "#Ap=1+Rf/Ri\n", + "RfBYRi=Ap-1 #Rf=Ri here\n", + "#R=Rf||Ri\n", + "Ri=2*R #kohm\n", + "Rf=Ri #kohm\n", + "print \"Resistance Ri = %0.1f kohm \" %Ri\n", + "print \"Resistance Rf = %0.1f kohm \" %Rf\n", + "# Answer in the textbook are inaccurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are :-\n", + "Capacitance is 0.05 micro F \n", + "Resistance R = 7.96 kohm \n", + "Resistance Ri = 15.9 kohm \n", + "Resistance Rf = 15.9 kohm \n" + ] + } + ], + "prompt_number": 13 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 9.7 - page : 279" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi\n", + "fL=400 #Hz\n", + "fLdash=800 #Hz\n", + "K=fL/fLdash #ratio\n", + "print \"Various parameters for retuning are :-\"\n", + "R=8.2 #kohm\n", + "Rdash=K*R #kohm\n", + "print \"Resistance Rdash = %0.2f kohm \" %Rdash\n", + "Rf=2*Rdash #kohm\n", + "Ri=2*Rdash #kohm\n", + "print \"Resistance Ri = %0.1f kohm \" %Ri\n", + "print \"Resistance Rf = %0.1f kohm \" %Rf " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various parameters for retuning are :-\n", + "Resistance Rdash = 4.10 kohm \n", + "Resistance Ri = 8.2 kohm \n", + "Resistance Rf = 8.2 kohm \n" + ] + } + ], + "prompt_number": 14 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 9.8 - page : 285" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, sqrt\n", + "f0=3 #kHz(Critical frequency)\n", + "Ap=4 #Pass band gain\n", + "#For Butterworth filter using sallen key\n", + "alfa=1.414; klp=1 #constant\n", + "fH=f0 #kHz\n", + "f_3dB=f0 #kHz\n", + "print \"Various design parameters are :-\"\n", + "C1=0.01 #micro F#Chosen for the design\n", + "print \"Capacitance C1 = %0.2f micro F \" %C1 \n", + "C2=alfa**2*C1/4 #micro F\n", + "print \"Capacitance C2 = %0.3f micro F \" %C2 \n", + "C2=0.004 # micro F\n", + "R=1/(2*pi*fH*10**3*sqrt(C1*10**-6*C2*10**-6))/1000 #kohm\n", + "print \"Resistance R = %0.1f kohm \" %R\n", + "R=8.2 #kohm\n", + "#For offset minimization\n", + "Rdash=2*R #kohm\n", + "print \"Resistance R* = %0.2f kohm \" %Rdash \n", + "RfBYRi=Ap-1 #Rf=Ri here\n", + "#Ri=10 kohm chosen for design\n", + "Ri=10 #kohm\n", + "Rf=RfBYRi*Ri #kohm\n", + "print \"Resistance Ri = %0.1f kohm \" %Ri\n", + "print \"Resistance Rf = %0.1f kohm \" %Rf " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are :-\n", + "Capacitance C1 = 0.01 micro F \n", + "Capacitance C2 = 0.005 micro F \n", + "Resistance R = 8.4 kohm \n", + "Resistance R* = 16.40 kohm \n", + "Resistance Ri = 10.0 kohm \n", + "Resistance Rf = 30.0 kohm \n" + ] + } + ], + "prompt_number": 18 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 9.9 - page : 288" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, sqrt\n", + "f0=2 #kHz(Critical frequency)\n", + "Ap=5 #dc gain\n", + "#For Butterworth filter using sallen key\n", + "alfa=1.414; klp=1 #constant\n", + "fH=f0 #kHz\n", + "f_3dB=f0 #kHz\n", + "Ap1=3-alfa #gain\n", + "RfBYRi=Ap1-1 #ratio\n", + "print \"Various design parameters are :-\" \n", + "C=0.05 #micro F#Chosen for the design\n", + "print \"Capacitance C = %0.2f micro F \" %C \n", + "R=klp/(2*pi*fH*10**3*C*10**-6)/1000 #kohm\n", + "print \"Resistance R = %0.1f kohm \" %R \n", + "#For offset minimization\n", + "#2*R=Rf||Ri=Rf/(RfBYRi+1)\n", + "Rf=2*R*(RfBYRi+1) #kohm\n", + "print \"Resistance Rf = %0.1f kohm \" %Rf \n", + "Ri=Rf/RfBYRi #kohm\n", + "print \"Resistance Ri = %0.1f kohm \" %Ri \n", + "#Ap=4 #dc gain in this case\n", + "Ap=4 #dc gain\n", + "Ap2=Ap/Ap1 #remainimg gain after 2nd order butterworth filter\n", + "RfdashBYRidash=Ap2-1 #ratio\n", + "#Ridash=10 #kohm chosen for design\n", + "Ridash=10 #kohm\n", + "print \"Resistance Ridash = %0.2f kohm \" %Ridash \n", + "Rfdash=RfdashBYRidash*Ridash #kohm\n", + "print \"Resistance Rfdash = %0.f kohm \" %Rfdash" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are :-\n", + "Capacitance C = 0.05 micro F \n", + "Resistance R = 1.6 kohm \n", + "Resistance Rf = 5.0 kohm \n", + "Resistance Ri = 8.6 kohm \n", + "Resistance Ridash = 10.00 kohm \n", + "Resistance Rfdash = 15 kohm \n" + ] + } + ], + "prompt_number": 25 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 9.10 - page : 289" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, sqrt\n", + "f0=2 #kHz(Critical frequency)\n", + "fH=f0 #kHz\n", + "f_3dB=f0 #kHz\n", + "#For Butterworth filter using sallen key\n", + "alfa=1.414; klp=1 #constant\n", + "Ap=3-alfa # band pass gain\n", + "RfBYRi=Ap-1 #ratio\n", + "print \"Various design parameters are :-\"\n", + "C=0.05 #micro F#Chosen for the design\n", + "print \"Capacitance C = %0.2f micro F \" %C\n", + "R=1/(2*pi*fH*10**3*C*10**-6)/1000 #kohm\n", + "print \"Resistance R = %0.1f kohm \" %R \n", + "#For offset minimization\n", + "#2*R=Rf||Ri=Rf/(RfBYRi+1)\n", + "Rf=2*R*(RfBYRi+1) #kohm\n", + "print \"Resistance Rf = %0.1f kohm \" %Rf \n", + "Ri=Rf/RfBYRi #kohm\n", + "print \"Resistance Ri = %0.1f kohm \" %Ri \n", + "#Answer in the book is not accurate. Some calculation mistake is there while working for offset minimization." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are :-\n", + "Capacitance C = 0.05 micro F \n", + "Resistance R = 1.6 kohm \n", + "Resistance Rf = 5.0 kohm \n", + "Resistance Ri = 8.6 kohm \n" + ] + } + ], + "prompt_number": 28 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 9.11 - page : 290" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, sqrt\n", + "f0=2 #kHz(Critical frequency)\n", + "fH=f0 #kHz\n", + "f_3dB=f0 #kHz\n", + "#For Bessel filter of 2nd order\n", + "alfa=1.73; klp=0.785 #constant\n", + "Ap=3-alfa # band pass gain\n", + "RfBYRi=Ap-1 #ratio\n", + "print \"Various design parameters are :-\" \n", + "C=0.05 #micro F#Chosen for the design\n", + "print \"Capacitance C = %0.2f micro F \" %C \n", + "R=klp/(2*pi*fH*10**3*C*10**-6)/1000 #kohm\n", + "print \"Resistance R = %0.2f kohm \" %R\n", + "#For offset minimization\n", + "#2*R=Rf||Ri=Rf/(RfBYRi+1)\n", + "Rf=2*R*(RfBYRi+1) #kohm\n", + "print \"Resistance Rf = %0.2f kohm \" %Rf \n", + "Ri=Rf/RfBYRi #kohm\n", + "print \"Resistance Ri = %0.2f kohm \" %Ri\n", + "# Answer in the textbook are inaccurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are :-\n", + "Capacitance C = 0.05 micro F \n", + "Resistance R = 1.25 kohm \n", + "Resistance Rf = 3.17 kohm \n", + "Resistance Ri = 11.75 kohm \n" + ] + } + ], + "prompt_number": 31 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 9.12 - page : 291" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, sqrt\n", + "f0=.12 #kHz(Cutoff frequency)\n", + "fH=f0 #kHz\n", + "#For Butterworth filter of 2nd order\n", + "alfa=1.414; klp=1 #constant\n", + "Ap=3-alfa # band pass gain\n", + "RfBYRi=Ap-1 #ratio\n", + "print \"Various design parameters are :-\"\n", + "C=0.33 #micro F#Chosen for the design choosing between 0.01 & 1 micro F\n", + "print \"Capacitance C = %0.2f micro F \" %C \n", + "R=klp/(2*pi*fH*10**3*C*10**-6)/1000 #kohm\n", + "print \"Resistance R = %0.f kohm \" %R \n", + "#For offset minimization\n", + "#2*R=Rf||Ri=Rf/(RfBYRi+1)\n", + "Rf=2*R*(RfBYRi+1) #kohm\n", + "print \"Resistance Rf = %0.2f kohm \" %Rf\n", + "Ri=Rf/RfBYRi #kohm\n", + "print \"Resistance Ri = %0.f kohm \" %Ri \n", + "# Answer in the textbook are inaccurate." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are :-\n", + "Capacitance C = 0.33 micro F \n", + "Resistance R = 4 kohm \n", + "Resistance Rf = 12.75 kohm \n", + "Resistance Ri = 22 kohm \n" + ] + } + ], + "prompt_number": 36 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 9.13 - page : 295" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, sqrt, floor\n", + "fL=20 #Hz(Cutoff frequency)\n", + "#For Butterworth filter of 2nd order\n", + "alfa=1.414; klp=1 #constant\n", + "Ap=3-alfa # band pass gain\n", + "RfBYRi=Ap-1 #ratio\n", + "print \"Various design parameters are :-\"\n", + "C=0.22 #micro F#Chosen for the design choosing between 0.01 & 1 micro F\n", + "print \"Capacitance C = %0.2f micro F \" %C\n", + "R=klp/(2*pi*fL*C*10**-6)/1000 #kohm\n", + "print \"Resistance R = %0.2f kohm \" %R \n", + "#For offset minimization\n", + "#R=Rf||Ri=Rf/(RfBYRi+1)\n", + "Rf=R*(RfBYRi+1) #kohm\n", + "print \"Resistance Rf = %0.f kohm \" %Rf \n", + "Ri=Rf/RfBYRi #kohm\n", + "Ri=floor(Ri) #kohm\n", + "print \"Resistance Ri = %0.f kohm \" %Ri " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are :-\n", + "Capacitance C = 0.22 micro F \n", + "Resistance R = 36.17 kohm \n", + "Resistance Rf = 57 kohm \n", + "Resistance Ri = 97 kohm \n" + ] + } + ], + "prompt_number": 40 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 9.14 - page : 297" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, sqrt\n", + "fH=2 #kHz(Cutoff frequency)\n", + "Ap=4 #Pass band gain\n", + "print \"Butterworth filter = cascading of 1st and 2nd order high pass filter.\"\n", + "#Butterworth polynomial is (s+1)*(s**2+s+1)\n", + "alfa=1 #for sallen key\n", + "Ap2=3-alfa #gain for 2nd order filter\n", + "Ap1=Ap/Ap2 #gain for 1st order filter\n", + "#Design parameters for 1st order filter : \n", + "print \"Various design parameters for 1st order filter are :-\"\n", + "C=0.01 #micro F#Chosen for the design\n", + "print \"Capacitance C = %0.2f micro F \" %C \n", + "R=1/(2*pi*fH*10**3*C*10**-6)/1000 #kohm\n", + "print \"Resistance R = %0.2f kohm \" %R\n", + "R=8.2 #kohm\n", + "#Ap1=Rf/Ri+1 with Ap1=2 we have Rf=Ri\n", + "Rf=2*R #kohm\n", + "Ri=2*R #kohm\n", + "print \"Resistance Rf = %0.2f kohm & Ri = %0.2f kohm \" %(Rf,Ri) \n", + "#Design parameters for 2nd order filter : \n", + "kLp=1/alfa #unitless\n", + "#Ap2=Rfdash/Ridash+1 with Ap2=2 we have Rfdash=Ridash\n", + "print \"Various design parameters for 2nd order filter are :-\" \n", + "C=0.033 #micro F#Chosen for the design\n", + "print \"Capacitance C = %0.3f micro F \" %C \n", + "R=kLp/(2*pi*fH*10**3*C*10**-6)/1000 #kohm\n", + "print \"Resistance R = %0.2f kohm \" %R\n", + "Rf=2*R #kohm\n", + "Ri=2*R #kohm\n", + "print \"Resistance Rfdash =%0.1f kohm & Ridash = %0.1f kohm \" %(Rf,Ri) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Butterworth filter = cascading of 1st and 2nd order high pass filter.\n", + "Various design parameters for 1st order filter are :-\n", + "Capacitance C = 0.01 micro F \n", + "Resistance R = 7.96 kohm \n", + "Resistance Rf = 16.40 kohm & Ri = 16.40 kohm \n", + "Various design parameters for 2nd order filter are :-\n", + "Capacitance C = 0.033 micro F \n", + "Resistance R = 2.41 kohm \n", + "Resistance Rfdash =4.8 kohm & Ridash = 4.8 kohm \n" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 9.15 - page : 301" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, sqrt\n", + "fL=200 #Hz\n", + "fH=1 #kHz\n", + "Ap=4 #Pass band gain\n", + "fc=sqrt(fH*1000*fL) #Hz(Cutoff frequency)\n", + "BW=fH*1000-fL #Hz\n", + "Q=fc/BW #Quality Factor\n", + "print \"Quality factor is %0.2f \" %Q\n", + "print \"As Q<12, it is a wide band filter.\"\n", + "Ap1=2 #Pass band gain for high pass section\n", + "print \"Various design parameters for high pass section are :-\"\n", + "C=0.033 #micro F#Chosen for the design\n", + "print \"Capacitance C = %0.3f micro F \" %C\n", + "R=1/(2*pi*fL*C*10**-6)/1000 #kohm\n", + "print \"Resistance R = %0.1f kohm \" %R \n", + "#Ap1=Rf/Ri+1 with Ap1=2 we have Rf=Ri\n", + "Rf=2*R #kohm\n", + "Ri=2*R #kohm\n", + "print \"Resistance Rf = %0.f kohm & Ri = %0.f kohm \" %(Rf,Ri) \n", + "Ap2=2 #Pass band gain for low pass section\n", + "print \"Various design parameters for low pass section are :-\"\n", + "C=0.033 #micro F#Chosen for the design\n", + "print \"Capacitance C = %0.3f micro F \" %C \n", + "K=fL/(fH*1000) #unitless\n", + "Rdash=K*R #kohm\n", + "print \"Resistance Rdash = %0.1f kohm \" %Rdash \n", + "#Ap1=Rf/Ri+1 with Ap1=2 we have Rf=Ri\n", + "Rf=2*Rdash #kohm\n", + "Ri=2*Rdash #kohm\n", + "print \"Resistance Rf = %0.f kohm & Ri = %0.f kohm \" %(Rf,Ri) " + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Quality factor is 0.56 \n", + "As Q<12, it is a wide band filter.\n", + "Various design parameters for high pass section are :-\n", + "Capacitance C = 0.033 micro F \n", + "Resistance R = 24.1 kohm \n", + "Resistance Rf = 48 kohm & Ri = 48 kohm \n", + "Various design parameters for low pass section are :-\n", + "Capacitance C = 0.033 micro F \n", + "Resistance Rdash = 4.8 kohm \n", + "Resistance Rf = 10 kohm & Ri = 10 kohm \n" + ] + } + ], + "prompt_number": 48 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 9.16 - page : 306" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, sqrt\n", + "print \"Part(a)\"\n", + "fc=1.2 #kHz\n", + "Q=4 #Quality Factor\n", + "Ap=10 #Pass band gain\n", + "print \"Here 2*Q**2=32>AP=10, hence it can be designed using single op-amp.\"\n", + "print \"Various design parameters are :-\"\n", + "C=0.05 #micro F#Chosen for the design\n", + "print \"Capacitance C = %0.2f micro F \" %C \n", + "#fc/Q=1/(pi*R2*C)\n", + "R2=Q/(fc*1000)/pi/(C*10**-6)/1000 #kohm\n", + "print \"Resistance R2 = %0.1f kohm \" %R2 \n", + "R1=R2/(2*Ap) #kohm\n", + "print \"Resistance R1 = %0.2f kohm \" %R1 \n", + "R3=R1*1000/(4*pi**2*R1*1000*R2*1000*(C*10**-6)**2*(fc*1000)**2-1) #ohm\n", + "print \"Resistance R3 = %0.2f ohm \" %R3 \n", + "print \"Part(b)\"\n", + "R3=460 #ohm\n", + "fc_new=1.5 #kHz\n", + "fc_old=1.2 #kHz\n", + "R3new=R3*(fc_old/fc_new)**2 #ohm\n", + "print \"Resistance R3 should be changed from %0.2f ohm to %0.2f ohm\" %(R3, R3new) \n", + "#Answer for R3 is wrong in the book" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Part(a)\n", + "Here 2*Q**2=32>AP=10, hence it can be designed using single op-amp.\n", + "Various design parameters are :-\n", + "Capacitance C = 0.05 micro F \n", + "Resistance R2 = 21.2 kohm \n", + "Resistance R1 = 1.06 kohm \n", + "Resistance R3 = 482.29 ohm \n", + "Part(b)\n", + "Resistance R3 should be changed from 460.00 ohm to 294.40 ohm\n" + ] + } + ], + "prompt_number": 52 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 9.17 - page : 308" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, sqrt\n", + "fL=3 #kHz\n", + "fH=3.6 #kHz\n", + "Ap=-6 #Pass band gain\n", + "fc=sqrt(fH*fL)*1000 #Hz\n", + "BW=(fH-fL)*1000 #Hz\n", + "Q=fc/BW #Quality factor\n", + "print \"Quality factor is %0.2f\" %Q\n", + "print \"Here 1<=Q<=12 criteria fulfills, hence it can be designed using single op-amp.\"\n", + "print \"Various design parameters are :-\"\n", + "C=0.01 #micro F#Chosen for the design\n", + "print \"Capacitance C = %0.2f micro F \" %C \n", + "#fc/Q=1/(pi*R2*C)\n", + "R2=1/pi/(BW)/(C*10**-6)/1000 #kohm\n", + "print \"Resistance R2 = %0.f kohm \" %R2 \n", + "R1=-R2/(2*Ap) #kohm\n", + "print \"Resistance R1 = %0.2f kohm \" %R1 \n", + "R3=R1*1000/(4*pi**2*R1*1000*R2*1000*(C*10**-6)**2*(fc)**2-1) #ohm\n", + "print \"Resistance R3 = %0.f ohm \" %R3\n", + "print \"Design Verification : \"\n", + "print \"(i) Is 2*Q**2>|Ap| ?\\n\", 2*Q**2>abs(Ap) \n", + "print \"For op-amp 741, GBW=1 MHz\"\n", + "GBW=1 #MHz\n", + "print \"Is GBW*10**6>20*Q**2*fc ?\\n\",GBW*10**6>20*Q**2*fc\n", + "print \"2nd criteria failed. The op-amp should have higher GBW product. Use LF411\"" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Quality factor is 5.48\n", + "Here 1<=Q<=12 criteria fulfills, hence it can be designed using single op-amp.\n", + "Various design parameters are :-\n", + "Capacitance C = 0.01 micro F \n", + "Resistance R2 = 53 kohm \n", + "Resistance R1 = 4.42 kohm \n", + "Resistance R3 = 491 ohm \n", + "Design Verification : \n", + "(i) Is 2*Q**2>|Ap| ?\n", + "True\n", + "For op-amp 741, GBW=1 MHz\n", + "Is GBW*10**6>20*Q**2*fc ?\n", + "False\n", + "2nd criteria failed. The op-amp should have higher GBW product. Use LF411\n" + ] + } + ], + "prompt_number": 56 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 9.18 - page : 310" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, sqrt\n", + "Ap=-10 #Pass band gain\n", + "Q=22 #Quality factor\n", + "fc=50 #Hz\n", + "R=60 #dB/decade(Roll off rate)\n", + "print \"\"\"Roll off rate of single op-amp=20 dB/decade.\n", + "No. of stages will be 3.\n", + "Desired design can be obtained by cascading three stages.\"\"\"\n", + "n=3 #no. of op-amps(as single op-amp has 20 dB/decade)\n", + "fc1=fc #Hz\n", + "fc2=fc #Hz\n", + "fc3=fc #Hz\n", + "Q1=Q*sqrt(2**(1/n)-1) #Quality factor of each stage\n", + "Q2=Q1 #Quality factor\n", + "Q3=Q1 #Quality factor\n", + "Ap1=-(-Ap)**(1/n) #Band pass gain of each stage\n", + "Ap2=Ap1 #Band pass gain\n", + "Ap3=Ap1 #Band pass gain\n", + "#Design of a single op-amp\n", + "C=0.1 #micro F#Chosen for the design\n", + "print \"Various design parameters for a single stages are :\"\n", + "print \"Capacitance C = %0.2f micro F \" %C \n", + "R2=Q1/pi/(fc)/(C*10**-6)/1000 #kohm\n", + "print \"Resistance R2 = %0.f kohm \" %R2 \n", + "R1=-R2/(2*Ap1) #kohm\n", + "print \"Resistance R1 = %.f kohm \" %R1 \n", + "R3=R1/(4*pi**2*R1*1000*R2*1000*(C*10**-6)**2*(fc)**2-1) #kohm\n", + "print \"Resistance R3 = %0.1f ohm \" %R3 \n", + "#Answer for R2 is wrong in the book." + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Roll off rate of single op-amp=20 dB/decade.\n", + "No. of stages will be 3.\n", + "Desired design can be obtained by cascading three stages.\n", + "Various design parameters for a single stages are :\n", + "Capacitance C = 0.10 micro F \n", + "Resistance R2 = 714 kohm \n", + "Resistance R1 = 166 kohm \n", + "Resistance R3 = 1.4 ohm \n" + ] + } + ], + "prompt_number": 60 + }, + { + "cell_type": "heading", + "level": 2, + "metadata": {}, + "source": [ + "Ex 9.20 - page : 326" + ] + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "from __future__ import division\n", + "from math import pi, sqrt\n", + "fNO=50 #Hz\n", + "Q=20 #Quality Factor\n", + "print \"Various design parameters are :-\"\n", + "C=1 #micro F#Chosen for the design\n", + "print \"Capacitance C = %0.2f micro F \" %C \n", + "R=1/(2*pi*fNO)/(C*10**-6)/1000 #kohm\n", + "print \"Resistance R = %0.2f kohm \" %R \n", + "#Q=(RA+RB)/4/RA\n", + "RA=1 #kohm(chosen for the design)\n", + "RB=Q*4*RA-RA #kohm\n", + "print \"Resistance RA = %0.f kohm \" %RA \n", + "print \"Resistance RB = %0.f kohm \" %RB" + ], + "language": "python", + "metadata": {}, + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "Various design parameters are :-\n", + "Capacitance C = 1.00 micro F \n", + "Resistance R = 3.18 kohm \n", + "Resistance RA = 1 kohm \n", + "Resistance RB = 79 kohm \n" + ] + } + ], + "prompt_number": 62 + } + ], + "metadata": {} + } + ] +}
\ No newline at end of file |