summaryrefslogtreecommitdiff
path: root/Analog_Integrated_Circuits_by__Pramod_Sharma
diff options
context:
space:
mode:
Diffstat (limited to 'Analog_Integrated_Circuits_by__Pramod_Sharma')
-rwxr-xr-xAnalog_Integrated_Circuits_by__Pramod_Sharma/Chapter01.ipynb1396
-rwxr-xr-xAnalog_Integrated_Circuits_by__Pramod_Sharma/Chapter02.ipynb265
-rwxr-xr-xAnalog_Integrated_Circuits_by__Pramod_Sharma/Chapter03.ipynb390
-rwxr-xr-xAnalog_Integrated_Circuits_by__Pramod_Sharma/Chapter04.ipynb579
-rwxr-xr-xAnalog_Integrated_Circuits_by__Pramod_Sharma/Chapter05.ipynb863
-rwxr-xr-xAnalog_Integrated_Circuits_by__Pramod_Sharma/Chapter06.ipynb778
-rwxr-xr-xAnalog_Integrated_Circuits_by__Pramod_Sharma/Chapter07.ipynb139
-rwxr-xr-xAnalog_Integrated_Circuits_by__Pramod_Sharma/Chapter09.ipynb404
-rwxr-xr-xAnalog_Integrated_Circuits_by__Pramod_Sharma/README.txt10
-rwxr-xr-xAnalog_Integrated_Circuits_by__Pramod_Sharma/screenshots/ConstantAB_ch4.pngbin0 -> 33132 bytes
-rwxr-xr-xAnalog_Integrated_Circuits_by__Pramod_Sharma/screenshots/Res_and_Vol_Ch9.pngbin0 -> 49659 bytes
-rwxr-xr-xAnalog_Integrated_Circuits_by__Pramod_Sharma/screenshots/unknownRes_Ch4.pngbin0 -> 36030 bytes
12 files changed, 4824 insertions, 0 deletions
diff --git a/Analog_Integrated_Circuits_by__Pramod_Sharma/Chapter01.ipynb b/Analog_Integrated_Circuits_by__Pramod_Sharma/Chapter01.ipynb
new file mode 100755
index 00000000..ca51509b
--- /dev/null
+++ b/Analog_Integrated_Circuits_by__Pramod_Sharma/Chapter01.ipynb
@@ -0,0 +1,1396 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:09753e7a346739f82308cf509d88fc83ed902094a78212d77e77c7b8bb5b6fee"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter01 : Differential Amplifiers"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 1.1 : page 9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "#given data\n",
+ "Icq=100 #in uA\n",
+ "BETAac=100 #unitless\n",
+ "BETAdc=100 #unitless\n",
+ "Ad=100 #unitless\n",
+ "CMRRdB=60 #in dB\n",
+ "#part (a)\n",
+ "IE=2*Icq #in UA\n",
+ "VT=25 #in mV\n",
+ "re=2*VT/IE #in ohm\n",
+ "RC=Ad*re #in Kohm\n",
+ "CMRR=10**(CMRRdB/20) #using formula CMRRdB=20log10(CMRR)\n",
+ "#calculate RE using formula CMRR=1+2*RE/re\n",
+ "RE=((CMRR-1)*re)/2 #in Kohm\n",
+ "print \"Value of RC is\",RC,\"kohm and value of RE is\",round(RE,1),\"kohm\" \n",
+ "#part (b)\n",
+ "Ri1=2*BETAac*re #in kohm\n",
+ "Ri2=2*BETAac*re #in kohm\n",
+ "print \"Value of Ri1 = Ri2 =\",Ri1,\"kohm\"\n",
+ "#part (c)\n",
+ "Ric=BETAac*(re+2*RE) #in kohm\n",
+ "print \"Value of Ric is\",Ric/1000,\"Mohm.\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of RC is 25.0 kohm and value of RE is 124.9 kohm\n",
+ "Value of Ri1 = Ri2 = 50.0 kohm\n",
+ "Value of Ric is 25.0 Mohm.\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 1.2 : page 13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import numpy as np\n",
+ "#given data\n",
+ "V1=50 #in uV\n",
+ "V2=-50 #in uV\n",
+ "Ad=2000 #unitless\n",
+ "Ac=0.5 #unitless\n",
+ "Vid=V1-V2 #in uV\n",
+ "Vc=(V1+V2)/2 #in uV\n",
+ "#output voltage\n",
+ "Vo=Ad*Vid+Ac*Vc #in uV\n",
+ "Vo=Vo*10**(-6) #in Volts\n",
+ "CMRRdB=20*np.log10(Ad/Ac) \n",
+ "print \"Output voltage = %0.2f V\" %(Vo)\n",
+ "print \"CMRR = %0.1f dB\" %CMRRdB"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output voltage = 0.20 V\n",
+ "CMRR = 72.0 dB\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 1.3 : page 13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import numpy as np\n",
+ "#given data\n",
+ "V1=5 #in mV\n",
+ "V2=6 #in mV\n",
+ "Ad=70 #in dB\n",
+ "CMRR=90 #in dB\n",
+ "Vid=V2-V1 #in mV\n",
+ "Vc=(V1+V2)/2 #in mV\n",
+ "Ad=10**(Ad/20) #unitless\n",
+ "Ad=np.floor(Ad) \n",
+ "CMRR=10**(CMRR/20) #unitless\n",
+ "#output voltage\n",
+ "Vo=Ad*(Vid+Vc/CMRR) #in mV\n",
+ "Vo=round(Vo) \n",
+ "Vo=Vo*10**(-3) #in Volts\n",
+ "Vid=Vid*10**(-3) #in Volts\n",
+ "ErrorVotage=Vo-Ad*Vid \n",
+ "PercentageError=(ErrorVotage*100)/Vo \n",
+ "print \"Output voltage = %0.3f Volts\"%Vo\n",
+ "print \"ErrorVotage = %0.3f Volts\" %ErrorVotage \n",
+ "print \"PercentageError = %0.3f %%\"%PercentageError"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output voltage = 3.163 Volts\n",
+ "ErrorVotage = 0.001 Volts\n",
+ "PercentageError = 0.032 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 1.4 : page 14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "V1=5 #in uV\n",
+ "V2=4 #in uV\n",
+ "Ad=80 #in dB\n",
+ "CMRR=100 #in dB\n",
+ "Ad=10**(Ad/20) #unitless\n",
+ "CMRR=10**(CMRR/20) #unitless\n",
+ "#differential mode output voltage \n",
+ "Vid=V1-V2 #in uV\n",
+ "Vod=Ad*Vid #in uV\n",
+ "Vod=Vod*10**(-3) #in mV\n",
+ "#common mode output voltage \n",
+ "Vc=(V1+V2)/2 #in uV\n",
+ "Ac=Ad/CMRR #unitless\n",
+ "Voc=Ac*Vc #in uV\n",
+ "print \"Differential mode output voltage = %0.2f mV\" %Vod\n",
+ "print \"common mode output voltage = %0.2f uV\" %Voc"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Differential mode output voltage = 10.00 mV\n",
+ "common mode output voltage = 0.45 uV\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 1.5 : page 17"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "Rc=2 #in kohm\n",
+ "VE=-5 #in volts\n",
+ "VT=25 #in mVolts\n",
+ "RE=4.3*1000 #in ohm\n",
+ "IE=(-0.7-VE)/RE #in mA\n",
+ "re=(2*VT*10**(-3))/IE #in ohm\n",
+ "Rc=Rc*1000 #in ohms\n",
+ "Ad=(Rc)/(2*re)\n",
+ "Ac=-(Rc/(2*RE+re))\n",
+ "CMRR=-Ad/Ac \n",
+ "#CMRR is always positive\n",
+ "print \"Differential mode gain = %0.2f \"%Ad\n",
+ "print \"Common mode gain = %0.2f\"%Ac\n",
+ "print \"CMRR = %0.2f\"%CMRR"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Differential mode gain = 20.00 \n",
+ "Common mode gain = -0.23\n",
+ "CMRR = 86.50\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 1.6 : page 27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "Ad=50 #unitless\n",
+ "I=5 #in mA\n",
+ "VEE=15 #in Volts\n",
+ "VD=0.7 #in Volts\n",
+ "VT=25 #in mVolt\n",
+ "#desired value of emitter current is 5 mA\n",
+ "IE3=5 #in mA\n",
+ "RE=VD/(IE3*10**(-3)) #in ohm\n",
+ "VB3=VEE-2*VD #in volts\n",
+ "I2=IE3 #in mA\n",
+ "R2=VB3/I2 #in kohm\n",
+ "IE1=IE3/2 #in mA\n",
+ "IE2=IE1 #in mA\n",
+ "re=(2*VT)/IE3 #in ohm\n",
+ "RC=Ad*re #in ohm\n",
+ "print \"Design values are :\"\n",
+ "print \"Value of Rc = %0.f ohm\" %RC\n",
+ "print \"Value of RE = %0.f ohm\" %RE\n",
+ "print \"Value of R2 = %0.2f kohm\" %R2"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Design values are :\n",
+ "Value of Rc = 500 ohm\n",
+ "Value of RE = 140 ohm\n",
+ "Value of R2 = 2.72 kohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 1.7 : page 29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "Ri=600 #in kohm\n",
+ "Vopp=5 #in volts\n",
+ "VEE=15 #in volts\n",
+ "VT=25 #in mVolts\n",
+ "VD=0.7 #in Volts\n",
+ "BETAac=100 #unitless\n",
+ "BETAdc=100 #unitless\n",
+ "VBE=0.7 #in volts\n",
+ "BETAact=BETAac*BETAdc #unitless\n",
+ "#formula : Ri=2*BETAact*(2*re1)\n",
+ "re1=Ri/(4*BETAact) #in ohm\n",
+ "#formula : re1=VT/IE1\n",
+ "IE1=(VT*10**(-3))/re1 #in mA\n",
+ "IE3=2*IE1 #in mA\n",
+ "RE=VD/(IE3*10**(-3)) #in ohm\n",
+ "R2=(VEE-2*VD)/IE3 #in kohm\n",
+ "IC=IE1 #in mA\n",
+ "RC=1.25/(IC*10**(-3)) #in ohm\n",
+ "print \"Thus the Design components values are :\"\n",
+ "print \"Value of Rc = %0.f ohm\" %RC\n",
+ "print \"Value of RE = %0.f ohm\" %RE\n",
+ "print \"Value of R2 = %0.2f kohm\" %R2\n",
+ "#Answer in the book is not as much accurate as calculated by Python."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thus the Design components values are :\n",
+ "Value of Rc = 750 ohm\n",
+ "Value of RE = 210 ohm\n",
+ "Value of R2 = 4.08 kohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 1.8 : page 30"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "BETAac=100 #unitless\n",
+ "BETAdc=100 #unitless\n",
+ "VBE3=0.715 #in volts\n",
+ "VD1=0.715 #in Volts\n",
+ "VZ=6.2 #in Volts\n",
+ "VT=25 #in mVolts\n",
+ "IZt=41 #in mA \n",
+ "VCC=10 #in Volts\n",
+ "VEE=-10 #in Volts\n",
+ "RC1=2.7 #in kohm\n",
+ "RC=4.7 #in kohm\n",
+ "#Part (a)\n",
+ "VB3=VEE+VZ+VD1 #in volts\n",
+ "VE3=VB3-VBE3\n",
+ "IE3=(VE3-VEE)/RC1 #in mA\n",
+ "#ICQ1=IE1=ICQ2=IE2\" \n",
+ "IE2=IE3/2 #in mA\n",
+ "ICQ1=IE2 #in mA\n",
+ "ICQ2=IE2 #in mA\n",
+ "IE1=IE2 #in mA\n",
+ "VCEQ=VCC+VBE3-RC*ICQ1# formula for VCEQ \n",
+ "print \"Operating point for Q1 and Q2 are : \"\n",
+ "print \"VCEQ = %0.2f Volts\" %VCEQ\n",
+ "print \"ICQ = %0.2f mA \" %ICQ1\n",
+ "print \"and the operating point for Q3 :\"\n",
+ "VCE3=-VBE3-VE3 #in Volts\n",
+ "print \"VCE3 = %0.3f Volts\" %VCE3\n",
+ "IC3=IE3 #in mA\n",
+ "print \"IE3 = %0.2f mA \"%IE3\n",
+ "#Part (b)\n",
+ "re=(2*VT)/IC3 #in ohm\n",
+ "Ad=(RC*1000)/re #unitless\n",
+ "print \"Differential voltage gain = %0.2f \"%Ad\n",
+ "#Part (c)\n",
+ "Ri=2*BETAac*re #in ohm\n",
+ "print \"Input resistance = %0.2f kohm\"%(Ri/1000)\n",
+ "#Answer in the book is not as much accurate as calculated by Python."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Operating point for Q1 and Q2 are : \n",
+ "VCEQ = 5.32 Volts\n",
+ "ICQ = 1.15 mA \n",
+ "and the operating point for Q3 :\n",
+ "VCE3 = 3.085 Volts\n",
+ "IE3 = 2.30 mA \n",
+ "Differential voltage gain = 215.85 \n",
+ "Input resistance = 4.35 kohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 1.9 : page 35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "Io=180 #in uA\n",
+ "Vcc=20 #in Volts\n",
+ "VBE=0.7 #in Volts\n",
+ "BETA=120 #unitless\n",
+ "IR=Io*(1+2/BETA) #in uA\n",
+ "R=(Vcc-VBE)/(IR*10**-3) #in kohm\n",
+ "print \"Value of IR = %0.2f uA\" %IR\n",
+ "print \"Value of R = %0.1f kohm\"%R"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of IR = 183.00 uA\n",
+ "Value of R = 105.5 kohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 1.10 : page 35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "VBE=0.7 #in Volts\n",
+ "BETA=120 #unitless\n",
+ "IR=(VCC-VBE)/(3.6) #in mA\n",
+ "IC=IR/2 #in mA\n",
+ "Iload=IC #in mA\n",
+ "print \"Load current in the circuit = %0.2f mA\"%Iload\n",
+ "# Note : Derivation skip"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Load current in the circuit = 1.29 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 1.11 : page 37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "Iload=0.5 #in mA\n",
+ "BETA=150 #unitless\n",
+ "VEB=0.7 #in Volts\n",
+ "VCC=10 #in Volts\n",
+ "IR=Iload*(1+2/BETA) #in mA\n",
+ "R=(VCC-VEB)/IR #in kohm\n",
+ "print \"Value of IR = %0.2f mA\"%IR\n",
+ "print \"Value of R = %0.2f kohm\"%R"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of IR = 0.51 mA\n",
+ "Value of R = 18.36 kohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 1.12 : page 37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "BETAac=110 #unitless\n",
+ "BETAdc=110 #unitless\n",
+ "VBE=0.7 #in volts\n",
+ "VEE=15 #in volts\n",
+ "VT=25 #in mvolts\n",
+ "R=2.7 #in kohm\n",
+ "Rc=3.3 #in kohm\n",
+ "IR=(VEE-VBE)/R #in mA\n",
+ "IC3=IR #in mA\n",
+ "IC1=IC3/2 #in mA\n",
+ "IC2=IC3/2 #in mA\n",
+ "re1=VT/IC1 #in ohm\n",
+ "re2=re1 #in ohm\n",
+ "# part (i)\n",
+ "Ad=(Rc*1000)/re1 #unitless\n",
+ "# part (ii)\n",
+ "Ri1=2*BETAac*re1*10**(-3) #in kohm\n",
+ "Ri2=2*BETAac*re2*10**(-3) #in kohm\n",
+ "print \"Differential mode voltage gain = %0.2f\"%Ad\n",
+ "print \"Input resistances are :\"\n",
+ "print \"Ri1 = Ri2 = %0.2f kohm\"%Ri1"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Differential mode voltage gain = 349.56\n",
+ "Input resistances are :\n",
+ "Ri1 = Ri2 = 2.08 kohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 33
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 1.13 : page 39"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "Ad=200 #unitless\n",
+ "Ri=3#in kohm\n",
+ "BETAac=110 #unitless\n",
+ "BETAdc=110 #unitless\n",
+ "VBE=0.7 #in volts\n",
+ "VEE=15 #in volts\n",
+ "VT=25 #in mvolts\n",
+ "re=Ri/(2*BETAac) #in ohm\n",
+ "RC=Ad*re #in kohm\n",
+ "IC1=VT/re #in mA\n",
+ "IR=2*IC1 #in mA\n",
+ "IC3=IR #in mA\n",
+ "R=(VEE-VBE)/(IR*10**(-3)) #in kohm\n",
+ "print \"Value of resistance Rc = %0.2f kohm\"%RC\n",
+ "print \"Value of resistance R = %0.2f kohm\"%R"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of resistance Rc = 2.73 kohm\n",
+ "Value of resistance R = 3.90 kohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 1.14 : page 39"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "Ad=400 #unitless\n",
+ "Ri=3#in kohm\n",
+ "BETAac=110 #unitless\n",
+ "BETAdc=110 #unitless\n",
+ "VBE=0.7 #in volts\n",
+ "VEE=15 #in volts\n",
+ "VT=25 #in mvolts\n",
+ "#circuit bias current IR\n",
+ "IR=3 #in mA\n",
+ "R=(VEE-VBE)/(IR) #in kohm\n",
+ "re=(2*VT)/IR #in ohm\n",
+ "RC=Ad*re*10**-3 #in kohm\n",
+ "Ri=2*BETAac*re*10**-3 #in kohm\n",
+ "print \"Value of resistance R = %0.2f kohm\"%R\n",
+ "print \"Value of resistance RC = %0.2f kohm\"%RC\n",
+ "print \"Value of resistance Ri = %0.2f kohm\"%Ri"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of resistance R = 4.77 kohm\n",
+ "Value of resistance RC = 6.67 kohm\n",
+ "Value of resistance Ri = 3.67 kohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 35
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 1.15 : page 39"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "BETAac=100 #unitless\n",
+ "BETAdc=100 #unitless\n",
+ "VBEon=0.7 #in volts\n",
+ "VCC=5 #in volts\n",
+ "VEE=-5 #in volts\n",
+ "VT=25 #in mVolts\n",
+ "R=18.6 #in kohm\n",
+ "IR=(VCC-VBEon -VEE)/R #in mA\n",
+ "IC1=IR/2 #in mA\n",
+ "IC2=IC1 #in mA\n",
+ "re1=(2*VT)/IR #in ohm\n",
+ "re2=re1 #in ohm\n",
+ "Ri1=2*BETAac*re1*10**-3 #in kohm\n",
+ "Ri2=Ri1 #in kohm\n",
+ "print \"Differential input resistances are :\"\n",
+ "print \"Ri1 = Ri2 = %0.2f kohm\" %Ri1"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Differential input resistances are :\n",
+ "Ri1 = Ri2 = 20.00 kohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 1.16 : page 40"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "BETAac=100 #unitless\n",
+ "BETAdc=100 #unitless\n",
+ "VBEon=0.7 #in volts\n",
+ "VCC=5 #in volts\n",
+ "VEE=-5 #in volts\n",
+ "VT=25 #in mVolts\n",
+ "R=18.6 #in kohm\n",
+ "Ad=200 #unitless\n",
+ "IR=(VCC-VBEon -VEE)/R #in mA\n",
+ "IC1=IR/2 #in mA\n",
+ "IC2=IC1 #in mA\n",
+ "re1=(2*VT)/IR #in ohm\n",
+ "re2=re1 #in ohm\n",
+ "RC=Ad*re1*10**-3 #in kohm\n",
+ "print \"Rc = %0.2f kohm\"%RC"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rc = 20.00 kohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 1.17 : page 41"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "BETAac=100 #unitless\n",
+ "BETAdc=100 #unitless\n",
+ "VBE=0.7 #in volts\n",
+ "VCC=10 #in volts\n",
+ "VEE=-10 #in volts\n",
+ "VT=25 #in mVolts\n",
+ "R=3.6 #in kohm\n",
+ "RC=2.2 #in kohm\n",
+ "# part (i) #\n",
+ "IR=(VCC-VBE-VEE)/R #in mA\n",
+ "ICQ=IR/2 #in mA\n",
+ "VE=-2*VBE #in Volts\n",
+ "VC=VCC-ICQ*RC #in Volts\n",
+ "VCEQ=VC-VE #in Volts\n",
+ "print \"Operating point VCEQ = %0.2f Volt\"%VCEQ\n",
+ "# part (ii) #\n",
+ "re=VT/ICQ #in ohm\n",
+ "re1=re #in ohm\n",
+ "re2=re #in ohm\n",
+ "reT=re1+re2 #in ohm\n",
+ "Ad=(RC*1000)/reT # unitless\n",
+ "print \"Differential voltage gain = %0.2f\" %Ad\n",
+ "# part (iii) #\n",
+ "BETAT=BETAac*BETAdc #unitless\n",
+ "Rid=2*BETAT*reT*10**-3 #in kohm\n",
+ "print \"Differential input resistance = %0.f kohm\"%Rid"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Operating point VCEQ = 5.50 Volt\n",
+ "Differential voltage gain = 117.94\n",
+ "Differential input resistance = 373 kohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 1.18 : page 43"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "Iload=20 #in uA\n",
+ "VBE=0.7 #in volts\n",
+ "VCC=10 #in Volts\n",
+ "IR=Iload #in mA\n",
+ "R=(VCC-2*VBE)/(IR*10**-3) #in kohm\n",
+ "print \"R= %0.f kohm\"%R"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "R= 430 kohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 1.19 : page 47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import numpy as np\n",
+ "#given data\n",
+ "Io=10 #in uA\n",
+ "IR=1 #in mA\n",
+ "VBE2=0.7 #in volts\n",
+ "VT=25 #in mVolts\n",
+ "VCC=20 #in volts\n",
+ "R=(VCC-VBE2)/IR #in kohm\n",
+ "RE=((VT*10**-3)/(Io*10**-6))*np.log((IR*10**-3)/(Io*10**-6)) #in ohm\n",
+ "RE=RE/1000 #in kohm\n",
+ "print \"R = %0.2f kohm\"%R\n",
+ "print \"RE = %0.2f kohm\"%RE\n",
+ "#note : answer in the book of RE is wrong."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "R = 19.30 kohm\n",
+ "RE = 11.51 kohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 45
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 1.20 : 48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import numpy as np\n",
+ "#given data\n",
+ "IR=2 #in mA\n",
+ "I2=10 #in uA\n",
+ "I3=20 #in uA\n",
+ "VBE1=0.7 #in volts\n",
+ "VT=25 #in mVolts\n",
+ "VCC=10 #in volts\n",
+ "VEE=-10 #in volts\n",
+ "R=(VCC-VBE1-VEE)/IR #in kohm\n",
+ "RE2=(VT/(I2*10**-3))*np.log(IR/(I2*10**-3)) #in kohm\n",
+ "RE3=(VT/(I3*10**-3))*np.log(IR/(I3*10**-3)) #in kohm\n",
+ "VBE2=VBE1-RE2*I2*10**-6 #in volts\n",
+ "VBE3=VBE1-RE3*I3*10**-6 #in volts\n",
+ "RE2=RE2/1000 #in kohm\n",
+ "RE3=RE3/1000 #in kohm\n",
+ "print \"Value of R = %0.2f kohm\"%R\n",
+ "print \"Value of RE2 = %0.2f kohm\"%RE2\n",
+ "print \"Value of RE3 = %0.2f kohm\"%RE3\n",
+ "print \"Value of VBE2 = %0.3f Volt\"%VBE2\n",
+ "print \"Value of VBE3 = %0.3f Volt\"%VBE3"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of R = 9.65 kohm\n",
+ "Value of RE2 = 13.25 kohm\n",
+ "Value of RE3 = 5.76 kohm\n",
+ "Value of VBE2 = 0.568 Volt\n",
+ "Value of VBE3 = 0.585 Volt\n"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 1.21 : page 49"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "BETAac=100 #unitless\n",
+ "BETAdc=100 #unitless\n",
+ "VBE=0.715 #in volts\n",
+ "VEE=10 #in volts\n",
+ "VT=25 #in mvolts\n",
+ "R=5.6 #in kohm\n",
+ "N=3 # as three transistors here\n",
+ "IR=(VEE-VBE)/(R) #in mA\n",
+ "IC1=IR/(1+(1+N)/BETAac) #in mA\n",
+ "IC2=IR/(1+(1+N)/BETAac) #in mA\n",
+ "IC3=IR/(1+(1+N)/BETAac) #in mA\n",
+ "IRC=3*IC1 #in mA\n",
+ "print \"Current through resistor Rc, I_RC = %0.2f mA\" %IRC\n",
+ "print \"Collector Current for each transistor : \"\n",
+ "print \"IC1 = IC2 = IC3 = %0.2f mA\" %IC1"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Current through resistor Rc, I_RC = 4.78 mA\n",
+ "Collector Current for each transistor : \n",
+ "IC1 = IC2 = IC3 = 1.59 mA\n"
+ ]
+ }
+ ],
+ "prompt_number": 53
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 1.22 : page 51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "I4=600 #in uA\n",
+ "I2=10 #in uA\n",
+ "I3=20 #in uA\n",
+ "VCC=10 #in volts\n",
+ "VEE=-10 #in volts\n",
+ "VBE=0.7 #in volts\n",
+ "VEB=0.7 #in volts\n",
+ "IR=I4/3 #in uA\n",
+ "I2=2*IR #in uA\n",
+ "I1=IR #in uA\n",
+ "I3=IR #in uA\n",
+ "R=(VCC-VEB-VBE-VEE)/(IR*10**(-3)) #in kohm\n",
+ "print \"IR = %0.f uA \" %IR\n",
+ "print \"I1 = %0.f uA\"%I1\n",
+ "print \"I2 = %0.f uA \" %I2\n",
+ "print \"I3 = %0.f uA\" %I3\n",
+ "print \"R = %0.f kohm\"%R"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "IR = 200 uA \n",
+ "I1 = 200 uA\n",
+ "I2 = 400 uA \n",
+ "I3 = 200 uA\n",
+ "R = 93 kohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 56
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 1.23 : page 52"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "Vo=5 #in volts\n",
+ "BETAac=150 #unitless\n",
+ "BETAdc=150 #unitless\n",
+ "VT=25 #in mvolts\n",
+ "VCC=10 #in volts\n",
+ "VD=0.7 #in volts\n",
+ "R1=2.7 #in kohm\n",
+ "R2=1.5 #in kohm\n",
+ "# part (i) #\n",
+ "IR=(VCC-VD)/R1 #in mA\n",
+ "IC=(IR-VD/R2)/(1+2/BETAac) #in mA\n",
+ "IC1=IC #in mA\n",
+ "IC2=IC #in mA\n",
+ "RC=(VCC-Vo)/IC #in kohm\n",
+ "print \"IC1 = %0.2f mA\" %IC1\n",
+ "print \"IC2 = %0.2f mA\" %IC2\n",
+ "print \"RC = %0.2f kohm\" %RC"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "IC1 = 2.94 mA\n",
+ "IC2 = 2.94 mA\n",
+ "RC = 1.70 kohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 57
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 1.24 : page 53"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "BETAac=100 #unitless\n",
+ "BETAdc=100 #unitless\n",
+ "VT=25 #in mvolts\n",
+ "VEE=15 #in volts\n",
+ "VCC=15 #in volts\n",
+ "VBE=0.7 #in volts\n",
+ "VEB=-0.7 #in volts\n",
+ "R2=2.2 #in kohm\n",
+ "RC1=2.5 #in kohm\n",
+ "RC6=1.2 #in kohm\n",
+ "RE8=1.2 #in kohm\n",
+ "I2=(VEE-VBE)/R2 #in mA\n",
+ "IC3=I2 #in mA\n",
+ "IC7=I2 #in mA\n",
+ "IC9=I2 #in mA\n",
+ "IC1=I2/2 #in mA\n",
+ "IC2=IC1 #in mA\n",
+ "IC5=IC1 #in mA\n",
+ "IC6=IC1 #in mA\n",
+ "IC8=I2 #in mA\n",
+ "IC9=I2 #in mA\n",
+ "# calculation of collector to emitter voltages \n",
+ "VC1=VCC-IC1*RC1 #in Volts\n",
+ "VC2=VC1 #in Volts\n",
+ "VCE1=VC1-VEB #in Volts\n",
+ "VCE2=VCE1 #in Volts\n",
+ "VE5=VC1-VBE #in Volts\n",
+ "VE6=VE5 #in Volts\n",
+ "VC6=VCC-RC6*IC6\n",
+ "VCE5=VCC-VE5 \n",
+ "VCE6=VCC-VE6 \n",
+ "VE8=VC6-VBE \n",
+ "VCE8=VCC-VE8 \n",
+ "# calculation of ac emitter resistances \n",
+ "re1=VT/IC1 #in ohm\n",
+ "re2=re1 #in ohm\n",
+ "re5=re1 #in ohm\n",
+ "re6=re1 #in ohm\n",
+ "re8=VT/IC8 #in ohm\n",
+ "#input resistance of second stage is\n",
+ "Ri2=2*BETAac*re6*10**(-3) #in kohm\n",
+ "# voltage gain of first stage\n",
+ "Ad1=(((RC1*Ri2)/(RC1+Ri2)))/(re1*10**(-3)) \n",
+ "#input resistance of third stage is\n",
+ "Ri3=BETAac*(re8+RE8) #in kohm\n",
+ "# voltage gain of second stage\n",
+ "Ad2=(((RC6*Ri3)/(RC6+Ri3)))/(2*re6*10**(-3)) \n",
+ "Ad3=1 \n",
+ "#Overall gain of the circuit\n",
+ "Ad=Ad1*Ad2*Ad3 \n",
+ "#voltage drop across collector resistor\n",
+ "VRC6=IC1*RC6 #in volts\n",
+ "#Maximum peak to peak output voltage swing\n",
+ "Vopp=3.9 # in volt\n",
+ "## part (i)\n",
+ "print \"The operating point for each transistor :\" \n",
+ "print \"For transistor 1:\" \n",
+ "print \"IC1 = %0.2f mA\"%IC1, \n",
+ "print \"& VCE1 = %0.3f Volt\" %VCE1\n",
+ "print \"For transistor 2:\" \n",
+ "print \"IC2 = %0.2f mA\"%IC2, \n",
+ "print \"& VCE2 = %0.3f Volt\" %VCE2\n",
+ "print \"For transistor 5:\"\n",
+ "print \"IC5 = %0.2f mA\"%IC5, \n",
+ "print \"& VCE5 = %0.3f Volt\" %VCE5\n",
+ "print \"For transistor 6:\" \n",
+ "print \"IC6 = %0.2f mA\"%IC6, \n",
+ "print \"& VCE6 = %0.3f Volt\" %VCE6\n",
+ "print \"For transistor 8:\" \n",
+ "print \"IC8 = %0.2f mA\"%IC8, \n",
+ "print \"& VCE8 = %0.2f Volt\" %VCE8\n",
+ "## part (ii)\n",
+ "print \"Overall voltage gain of the circuit = %0.2f \"%Ad \n",
+ "## part (iii)\n",
+ "print \"Maximum peak to peak output voltage swing = %0.2f \"%Vopp\n",
+ "#note :answer in the book is not as much accurate as calculated by Python"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The operating point for each transistor :\n",
+ "For transistor 1:\n",
+ "IC1 = 3.25 mA & VCE1 = 7.575 Volt\n",
+ "For transistor 2:\n",
+ "IC2 = 3.25 mA & VCE2 = 7.575 Volt\n",
+ "For transistor 5:\n",
+ "IC5 = 3.25 mA & VCE5 = 8.825 Volt\n",
+ "For transistor 6:\n",
+ "IC6 = 3.25 mA & VCE6 = 8.825 Volt\n",
+ "For transistor 8:\n",
+ "IC8 = 6.50 mA & VCE8 = 4.60 Volt\n",
+ "Overall voltage gain of the circuit = 9634.23 \n",
+ "Maximum peak to peak output voltage swing = 3.90 \n"
+ ]
+ }
+ ],
+ "prompt_number": 63
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 1.25 : page 55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "BETAmin=80 #unitless\n",
+ "BETAmax=120 #unitless\n",
+ "IE=400 #in uA\n",
+ "VT=25 #in mvolts\n",
+ "VEE=15 #in volts\n",
+ "VCC=15 #in volts\n",
+ "VBE=0.7 #in volts\n",
+ "VEB=-0.7 #in vol\n",
+ "IE1=IE/2 #in uA\n",
+ "IE2=IE1 #in uA\n",
+ "IBmax=IE1/(1+BETAmin) #in uA\n",
+ "IBmin=IE1/(1+BETAmax) #in uA\n",
+ "Iiomax=IBmax-IBmin #in uA\n",
+ "print \"Largest possible input bias current = %0.3f uA\"%IBmax\n",
+ "print \"smallest possible input bias current = %0.3f uA \" %IBmin\n",
+ "print \"Largest possible input offset current = %0.3f uA\"%Iiomax"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Largest possible input bias current = 2.469 uA\n",
+ "smallest possible input bias current = 1.653 uA \n",
+ "Largest possible input offset current = 0.816 uA\n"
+ ]
+ }
+ ],
+ "prompt_number": 67
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 1.26 : page 58"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "BETAac=100 #unitless\n",
+ "BETAdc=100 #unitless\n",
+ "VT=25 #in mvolts\n",
+ "VEE=10 #in volts\n",
+ "VCC=10 #in volts\n",
+ "VBE=0.7 #in volts\n",
+ "VEB=-0.7 #in volts\n",
+ "RC2=2.7 #in kohm\n",
+ "RC1=2.7 #in kohm\n",
+ "RC3=1.5 #in kohm\n",
+ "RC4=1.5 #in kohm\n",
+ "RE1=5 #in kohm\n",
+ "RE2=10 #in kohm\n",
+ "RE3=10 #in kohm\n",
+ "IE1=(VEE-VBE)/(2*RE1) #in mA\n",
+ "IC1=IE1 \n",
+ "#as Q1 and Q2 are identical\n",
+ "IC2=IC1 \n",
+ "VC1=VCC-RC1*IC1 \n",
+ "VE1=-0.7 #in Volts\n",
+ "VE2=0.7 #in Volts\n",
+ "VCE1=VC1-VE1 \n",
+ "VCE2=VCE1 \n",
+ "IE3=(VCC-RC2*IC2-VBE+VEE)/(2*RE3) #in mA \n",
+ "IE4=IE3 #in mA\n",
+ "VC3=VCC-RC3*IE3 #in Volts\n",
+ "VC4=VC3 #in Volts\n",
+ "VE3=VC1-VBE #in Volts\n",
+ "VCE3=VC3-VE3 #in Volts\n",
+ "VCE4=VCE3 #in Volts\n",
+ "print \"Operating point for Q1 & Q2 becomes : \"\n",
+ "print \"ICQ = %0.2f mA & VCEQ = %0.2f Volts \"%(IC1,VCE1 )\n",
+ "print \"And operating point for Q3 & Q4 becomes : \"\n",
+ "print \"ICQ = %0.2f mA & VCEQ = %0.2f Volts\"%(IE3,VCE3)\n",
+ "\n",
+ "re1=VT/IC1 #in ohm\n",
+ "re2=re1 #in ohm\n",
+ "re3=VT/IE3 #in ohm\n",
+ "re4=re3 #in ohm\n",
+ "Ri2=2*BETAac*re3 #in ohm\n",
+ "Ri2=Ri2*10**-3 #in kohm\n",
+ "Ad1=((RC1*Ri2)/(RC1+Ri2))/(re1*10**-3) \n",
+ "Ad2=RC4/(2*re4*10**-3) \n",
+ "Ad=Ad1*Ad2 \n",
+ "print \"Overall voltage gain = %0.2f\" %Ad\n",
+ "Ri1=2*BETAac*re1 #in ohm\n",
+ "Ri1=Ri1/1000 #in kohm\n",
+ "print \"Input resistance of the cascaded differential amplifier = %0.2f kohm\" %Ri1\n",
+ "Ro2=RC4 #in kohm\n",
+ "print \"Output resistance of the cascaded differential amplifier = %0.2f kohm \" % Ro2"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Operating point for Q1 & Q2 becomes : \n",
+ "ICQ = 0.93 mA & VCEQ = 8.19 Volts \n",
+ "And operating point for Q3 & Q4 becomes : \n",
+ "ICQ = 0.84 mA & VCEQ = 1.95 Volts\n",
+ "Overall voltage gain = 1740.47\n",
+ "Input resistance of the cascaded differential amplifier = 5.38 kohm\n",
+ "Output resistance of the cascaded differential amplifier = 1.50 kohm \n"
+ ]
+ }
+ ],
+ "prompt_number": 69
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 1.27 : page 62"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "BETAac=100 #unitless\n",
+ "BETAdc=100 #unitless\n",
+ "VT=25 #in mvolts\n",
+ "VEE=10 #in volts\n",
+ "VCC=10 #in volts\n",
+ "VBE=0.7 #in volts\n",
+ "VD=0.7 #in volts\n",
+ "IE6=2 #in mA\n",
+ "IE1=3.25 #in mA \n",
+ "Ri2=1.538 #in kohm\n",
+ "RC1=2.5 #in kohm\n",
+ "re8=3.85 #in kohm\n",
+ "RE8=1.2 #in kohm\n",
+ "RC6=1.2 #in kohm\n",
+ "RE=VD/(IE6*10**-3) #in ohm\n",
+ "R=(VEE-2*VD)/IE6 #in kohm\n",
+ "VB5=8.74 #in Volts\n",
+ "VE5=VB5-VBE \n",
+ "R1=VE5/IE6 #in kohm\n",
+ "re1=VT/IE1 #in ohm\n",
+ "re2=re1; re5=re1; re6=re1 #in ohm\n",
+ "re8=VT/6.5 #in ohm\n",
+ "Ri2=2*BETAac*re6*10**-3 #in kohm\n",
+ "Ad1=(1000*(RC1*Ri2)/((RC1+Ri2)))/re1 \n",
+ "Ri3=BETAac*(re8*10**-3+RE8) #in kohm\n",
+ "Ad2=(1000*(RC6*Ri3)/(RC6+Ri3))/(2*re6) \n",
+ "Ad=Ad1*Ad2 \n",
+ "VRC6=RC6*IE1 #in Volts\n",
+ "Vopp=VRC6 #in Volts\n",
+ "print \"Value of RE = %0.2f ohm\"%RE\n",
+ "print \"Value of R = %0.2f kohm\"%R\n",
+ "print \"Value of VE5 = %0.2f Volt\"%VE5\n",
+ "print \"Value of R1 = %0.2f kohm\"% R1\n",
+ "print \"AC emitter resistances re1 = re2 = re5 = re6 = %0.2f ohm\" %re1\n",
+ "print \"Abd re8 = %0.2f ohm\"%re8\n",
+ "print \"Input resistance of 2nd stage Ri2 = %0.3f kohm \"%Ri2\n",
+ "print \"Voltage gain of 1st stage = %0.2f\"%Ad1 \n",
+ "print \"Voltage gain of 2nd stage = %0.2f\"%Ad2 \n",
+ "Ad3=1 \n",
+ "print \"Voltage gain of 3rd stage = %0.2f\" %Ad3 \n",
+ "print \"Overall Voltage gain of the circuit = %0.2f\" %Ad \n",
+ "print \"Voltage drop across collector resistor = %0.2f Volt\"%VRC6\n",
+ "print \"Maximum peak to peak output voltage swing = %0.2f Volt\"%Vopp"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of RE = 350.00 ohm\n",
+ "Value of R = 4.30 kohm\n",
+ "Value of VE5 = 8.04 Volt\n",
+ "Value of R1 = 4.02 kohm\n",
+ "AC emitter resistances re1 = re2 = re5 = re6 = 7.69 ohm\n",
+ "Abd re8 = 3.85 ohm\n",
+ "Input resistance of 2nd stage Ri2 = 1.538 kohm \n",
+ "Voltage gain of 1st stage = 123.81\n",
+ "Voltage gain of 2nd stage = 77.23\n",
+ "Voltage gain of 3rd stage = 1.00\n",
+ "Overall Voltage gain of the circuit = 9561.83\n",
+ "Voltage drop across collector resistor = 3.90 Volt\n",
+ "Maximum peak to peak output voltage swing = 3.90 Volt\n"
+ ]
+ }
+ ],
+ "prompt_number": 72
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Analog_Integrated_Circuits_by__Pramod_Sharma/Chapter02.ipynb b/Analog_Integrated_Circuits_by__Pramod_Sharma/Chapter02.ipynb
new file mode 100755
index 00000000..d4d9f66e
--- /dev/null
+++ b/Analog_Integrated_Circuits_by__Pramod_Sharma/Chapter02.ipynb
@@ -0,0 +1,265 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:dbdab30ceee2e893077ec98e42cc102488d52b9f8506602ce6aaa24ef3e22c61"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter02 : Op-amp Fundamentals"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 2.2 : page 79"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division \n",
+ "#given data\n",
+ "Iio=20 #in nA\n",
+ "IB=100 #in nA\n",
+ "# Eqn(1) : Iio=IB1-IB2=20\n",
+ "#Eqn(2) : 2*IB=IB1+IB2=200\n",
+ "IB1=(200+20)/2 #in nA\n",
+ "print \"IB1 = %0.f nA\"%IB1\n",
+ "IB2=IB1-Iio #in nA\n",
+ "print \"IB2 = %0.f nA\"%IB2"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "IB1 = 110 nA\n",
+ "IB2 = 90 nA\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 2.3 : page 82"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "G=120 #unitless\n",
+ "To=20 #in degree centigrade\n",
+ "T=50 #in degree centigrade\n",
+ "Dvoff=0.13 #in mV/degree centigrade\n",
+ "#input change\n",
+ "dVin=Dvoff*(T-To) #in mVolt\n",
+ "#output change\n",
+ "Vo=G*dVin #in mVolt\n",
+ "print \"Output voltage = %0.f mV\" %Vo"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output voltage = 468 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 2.4 : page 83"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "dt=5 #in uSec\n",
+ "Vp=5 #in Volt\n",
+ "dV=(0.9-0.1)*Vp\n",
+ "SR=dV/dt #in V/uSec\n",
+ "print \"Calculated SR = %0.2f V/uSec\"%SR"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Calculated SR = 0.80 V/uSec\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 2.5 : page 83"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "Vo=10 #in Volt\n",
+ "SR=1 #in V/uSec\n",
+ "dV=(0.9-0.1)*Vo\n",
+ "dt=dV/SR #in uSec\n",
+ "print \"Rise time = %0.f uSec\"%dt"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rise time = 8 uSec\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 2.6 : page 84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "V1=-5 #in Volt\n",
+ "V2=5 #in Volt\n",
+ "SR=0.5 #in V/uSec\n",
+ "dV=V2-V1 # in Volt\n",
+ "dt=dV/SR #in uSec\n",
+ "print \"Rise time = %0.f uSec\"%dt"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Rise time = 20 uSec\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 2.7 : page 84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import numpy as np\n",
+ "#given data\n",
+ "fm=50 #in kHz\n",
+ "SR=0.5 #in V/uSec\n",
+ "#formula : SR=2*pie*fm*Vm\n",
+ "Vm=(SR*10**6)/(2*np.pi*fm*10**3) #in Volts\n",
+ "print \"Maximum voltage = %0.2f Volt \"%Vm"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Maximum voltage = 1.59 Volt \n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 2.8 : page 84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import numpy as np\n",
+ "#given data\n",
+ "SR=6 #in V/uSec\n",
+ "#formula : SR=2*pie*fm*Vm\n",
+ "# part (i) Vm=1 volt\n",
+ "Vm=1 #in Volts\n",
+ "fm=((SR*10**6)/(2*np.pi*Vm))/1000 #in kHz\n",
+ "print \"when Vm=1 volt the limiting frequency = %0.f kHz\"%fm\n",
+ "# part (ii) Vm=10 volt\n",
+ "Vm=10 #in Volts\n",
+ "fm=((SR*10**6)/(2*np.pi*Vm))/1000 #in kHz\n",
+ "print \"when Vm=10 Volt the limiting frequency = %0.1f kHz\"%fm"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "when Vm=1 volt the limiting frequency = 955 kHz\n",
+ "when Vm=10 Volt the limiting frequency = 95.5 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Analog_Integrated_Circuits_by__Pramod_Sharma/Chapter03.ipynb b/Analog_Integrated_Circuits_by__Pramod_Sharma/Chapter03.ipynb
new file mode 100755
index 00000000..95ae9c40
--- /dev/null
+++ b/Analog_Integrated_Circuits_by__Pramod_Sharma/Chapter03.ipynb
@@ -0,0 +1,390 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:acad7f2b47ab46b39d2415015834778ee2ba72685572a085340155f27d29b782"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter03 : Op-amp with negative feedback"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.1 : page 97"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# given data\n",
+ "R1=1.5 #in kohm\n",
+ "RF=15 #in kohm\n",
+ "A=2*10**5 #unitless\n",
+ "Ri=1 #in Mohm\n",
+ "Ro=75 #in ohm\n",
+ "fo=5 #in Hz\n",
+ "AF=1+RF/R1 #unitless\n",
+ "B=1/AF #unitless\n",
+ "RiF=(1+A*B)*Ri*10**6 #in ohm\n",
+ "RoF=Ro/(1+A*B) #in ohm\n",
+ "fF=fo*(1+A*B) #in ohm\n",
+ "print \"Close loop voltage gain AF = %0.2f \" %AF\n",
+ "print \"Value of RiF = %0.2e ohm\"%RiF\n",
+ "print \"Value of RoF = %0.2e ohm\"%RoF\n",
+ "print \"Value of fF = %0.f kHz\"%(fF/1000)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Close loop voltage gain AF = 11.00 \n",
+ "Value of RiF = 1.82e+10 ohm\n",
+ "Value of RoF = 4.12e-03 ohm\n",
+ "Value of fF = 91 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.2 : page 98"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "# given data\n",
+ "AF=100 #unitless\n",
+ "A=2*10**5 #unitless\n",
+ "Ri=1 #in Mohm\n",
+ "Ro=75 #in ohm\n",
+ "#let R1 =1 ohm\n",
+ "R1=1 #in ohm\n",
+ "#formula : AF=1+RF/R1\n",
+ "RF=(AF-1)*R1 #in kohm\n",
+ "B=1/AF #unitless\n",
+ "RiF=(1+A*B)*Ri*10**6 #in ohm\n",
+ "RoF=Ro/(1+A*B) #in ohm\n",
+ "print \"Value of RF = %0.2f kohm\"%RF\n",
+ "print \"Value of RiF = %0.2e ohm\"%RiF\n",
+ "print \"Value of RoF = %0.2e ohm\"%RoF"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of RiF = 99.00 kohm\n",
+ "Value of RiF = 2.00e+09 ohm\n",
+ "Value of RoF = 3.75e-02 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.3 : page 99"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# given data\n",
+ "AF=1 #unitless\n",
+ "B=1 #unitless\n",
+ "A=2*10**5 #unitless\n",
+ "fo=5 #in Hz\n",
+ "Ri=1 #in Mohm\n",
+ "Ro=75 #in ohm\n",
+ "#let 1+AB=A as A>>>1\n",
+ "RiF=A*Ri*10**6 #in ohm\n",
+ "RoF=Ro/A #in ohm\n",
+ "fF=fo*A #in ohm\n",
+ "print \"Value of RiF = %0.2e ohm\"%RiF\n",
+ "print \"Value of RoF = %0.2e ohm\"%RoF\n",
+ "print \"Value of fF = %0.2f MHz\"%(fF/10**6)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of RiF = 2.00e+11 ohm\n",
+ "Value of RoF = 3.75e-04 ohm\n",
+ "Value of fF = 1.00 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.4 : page 103"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " # given data\n",
+ "R1=50 #in Kohm\n",
+ "AF=-6 #unitless\n",
+ "# here AF=-RF/R1\n",
+ "RF=-AF*R1 #in kohm\n",
+ "print \"Value of RF = %0.f kohm\" %RF"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of RF = 300 kohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.5 : page 104"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "# given data\n",
+ "A=2*10**5 #unitless\n",
+ "Ri=1 #in Mohm\n",
+ "Ro=75 #in ohm\n",
+ "fo=5 #in Hz\n",
+ "R1=50 #in kohm\n",
+ "RF=300 #in kohm\n",
+ "K=RF/(R1+RF) #unitless\n",
+ "B=R1/(R1+RF) #unitless\n",
+ "AF=-(A*K/(1+A*B)) #unitless\n",
+ "RiF=R1 #in kohm ideal\n",
+ "RoF=Ro/(1+A*B) #in ohm\n",
+ "fF=-(A*K*fo/AF) #in Hz\n",
+ "print \"Close loop voltage gain AF = %0.2f\"%AF\n",
+ "print \"Value of RiF = %0.2f kohm\"%RiF\n",
+ "print \"Value of RoF = %0.2e ohm\"%RoF\n",
+ "print \"Value of fF = %0.f kHz\"%(fF/1000)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Close loop voltage gain AF = -6.00\n",
+ "Value of RiF = 50.00 kohm\n",
+ "Value of RoF = 2.62e-03 ohm\n",
+ "Value of fF = 143 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.6 : page 107"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# given data\n",
+ "# let R1=R2=R3=R=10kohm\n",
+ "R=10 #in kohm\n",
+ "R1=R #in kohm\n",
+ "R2=R #in kohm\n",
+ "R3=R #in kohm\n",
+ "RF=3*R #in Kohm\n",
+ "print \"Value of RF = %0.0f kohm\"%RF"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of RF = 30 kohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.7 : page 108"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " # given data\n",
+ "RF=1 #in Mohm\n",
+ "AV=-30 #unitless\n",
+ "#AV=-RF/R1=Vo/V1\n",
+ "R1=-RF*10**6/AV #in ohm\n",
+ "#for an inverting amplifier RiF=R1\n",
+ "RiF=R1 #in ohm\n",
+ "print \"Value of R1 = %0.2f kohm\"%(R1/1000)\n",
+ "print \"Value of RiF = %0.2f kohm\"%(RiF/1000)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of R1 = 33.33 kohm\n",
+ "Value of RiF = 33.33 kohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.8 : page 108"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " # given data\n",
+ "AV=-8 #unitless\n",
+ "Vin=-1 #in Volts\n",
+ "Imax=15 #in uA\n",
+ "Vo=AV*Vin #in Volts\n",
+ "#Formula : Vo=Imax*R2min\n",
+ "R2min=Vo/(Imax*10**-6) #in kohm\n",
+ "R1min=-Vin/(Imax*10**-6) #in kohm\n",
+ "print \"Required value of R2 = %0.2f kohm\"%(R2min/1000)\n",
+ "print \"Required value of R1 = %0.2f kohm\"%(R1min/1000)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Required value of R2 = 533.33 kohm\n",
+ "Required value of R1 = 66.67 kohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 3.9 : page 110"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " # given data\n",
+ "Vo=1.5 #in Volts\n",
+ "Vin=10 #in mVolts\n",
+ "RiF=500 #in kohm\n",
+ "R1=500 #in kohm\n",
+ "AF=Vo/(Vin*10**-3) #unitless\n",
+ "RF=AF*R1 #in Kohm\n",
+ "print \"The value of RF = %0.2f Mohm\"%(RF/1000)\n",
+ "#AF=-R2/R1*(1+R3/R2+R3/R4)\n",
+ "#Microphone resistance is Rm=1.2 Kohm\n",
+ "R1eff=100 #in Kohm\n",
+ "Rm=1.2 #in Kohm\n",
+ "R1=R1eff-Rm\n",
+ "R3=5*R1 \n",
+ "R2=R3 #in Kohm\n",
+ "R4=R3/28 #in Kohm\n",
+ "print \"Value of R1 = %0.2f kohm\" %R1\n",
+ "print \"Value of R2 = %0.2f kohm\" %R2\n",
+ "print \"Value of R3 = %0.2f kohm\" %R3\n",
+ "print \"Value of R4 = %0.2f kohm\" %R4"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of RF = 75.00 Mohm\n",
+ "Value of R1 = 98.80 kohm\n",
+ "Value of R2 = 494.00 kohm\n",
+ "Value of R3 = 494.00 kohm\n",
+ "Value of R4 = 17.64 kohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Analog_Integrated_Circuits_by__Pramod_Sharma/Chapter04.ipynb b/Analog_Integrated_Circuits_by__Pramod_Sharma/Chapter04.ipynb
new file mode 100755
index 00000000..ea42a24d
--- /dev/null
+++ b/Analog_Integrated_Circuits_by__Pramod_Sharma/Chapter04.ipynb
@@ -0,0 +1,579 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:2a4ca46418f96503536124ea941a5521b6b652077fc912eba380767a1297ae00"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter04 : Basic Application of an Op-amp"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 4.2 : page 119"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "# given data\n",
+ "# KCL at node (b) (6-V)/30+(8-V)/40+(0-V)/30=0 \n",
+ "V=48/11 #in volts\n",
+ "print \"Voltage V = %0.2f Volt\"%V\n",
+ "# KCL at node (a) (3-V)/10+(4-V)/20=(V-Vo)/40\n",
+ "Vo=-(20-7*V) #in Volts\n",
+ "print \"Output Voltage of the circuit Vo = %0.2f Volt\"%Vo"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Voltage V = 4.36 Volt\n",
+ "Output Voltage of the circuit Vo = 10.55 Volt\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 4.3 : page 120"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "from sympy import symbols, N\n",
+ "V1, V2 = symbols('V1 V2')\n",
+ "R1 = 11 # Kohm\n",
+ "R2 = 10 # Kohm\n",
+ "Ra = 99 # kohm\n",
+ "Ro = 100 # kohm\n",
+ "Va = Ra/(Ra+R1)*V1\n",
+ "Vo1 = (1+Ro/R2)*Va\n",
+ "A = Vo1/V1\n",
+ "Vo2 = -Ro/R2*V2\n",
+ "B = Vo2/V2\n",
+ "print \"Value of A : \",N(A,2)\n",
+ "print \"Value of B : \",N(B,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of A : 9.9\n",
+ "Value of B : -10.\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 4.4 : page 120"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "from sympy import symbols, N, solve\n",
+ "Va, R1, R3, Vb = symbols('Va R1 R3 Vb')\n",
+ "Ro = 100 # kohm\n",
+ "Voa = -2*Va\n",
+ "# Vo = Voa+Vob\n",
+ "eqn = Voa+Ro/R1*Va\n",
+ "R1 = solve(eqn, R1)[0] # kohm\n",
+ "print \"value of R1 = %0.2f kohm\"%R1\n",
+ "R2=R1 # kohm\n",
+ "V1 = R3*Vb/(R2+R3)\n",
+ "Vob = (1+Ro/R1)*V1\n",
+ "R3 = solve(Vob-Vb,R3)[0]\n",
+ "print \"value of R2 = %0.2f kohm\"%R2\n",
+ "\n",
+ "print \"value of R3 = %0.2f kohm\"%R3"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "value of R1 = 50.00 kohm\n",
+ "value of R2 = 50.00 kohm"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "value of R3 = 25.00 kohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 4.5 : page 121"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from sympy import symbols, solve, N\n",
+ "Vo = symbols('Vo')\n",
+ "R1 = 10 # kohm\n",
+ "R2 = 20 # kohm\n",
+ "Ro = 100 # kohm\n",
+ "V1 = -2 # V\n",
+ "V2 = +3 # V\n",
+ "I1 = V1/R1 # A\n",
+ "I2 = V2/R2 # A\n",
+ "If = (0-Vo)/Ro\n",
+ "eqn = I1+I2-If\n",
+ "Vo = solve(eqn, Vo)[0]\n",
+ "print \"Output voltage, Vo =\",N(Vo,2),\"Volt\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output voltage, Vo = 5.0 Volt\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 4.7 : page 123"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import numpy as np\n",
+ "from sympy import symbols\n",
+ "Vo, Vx, Vy = symbols('Vo Vx Vy')\n",
+ "R1 = 2 # kohm\n",
+ "R2 = 2 # kohm\n",
+ "R3 = 2 # kohm\n",
+ "R4 = 8 # kohm\n",
+ "R5 = 1 # kohm\n",
+ "R6 = 7 # kohm\n",
+ "V1 = 1 # V\n",
+ "# Node X\n",
+ "Vz=1 # V\n",
+ "# KCL at node Y\n",
+ "eqn1 = 3*Vy-2*Vx-1\n",
+ "# KCL at node X\n",
+ "eqn2 = Vy-2*Vx+1\n",
+ "A=np.array([[-2,3],[-2,1]])\n",
+ "B=np.array([[1,-1]])\n",
+ "X=np.linalg.solve(A,B)\n",
+ "Vx = X[0][1] # V\n",
+ "Vo = Vx/R5*(R5+R6)\n",
+ "print \"Output Voltage, Vo = %0.f V\"%Vo"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output Voltage, Vo = 4 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 4.9 : page 130"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# given data\n",
+ "R1=10 #in Kohm\n",
+ "R4=8 #in Kohm\n",
+ "R5=3 #in Kohm\n",
+ "RF=45 #in Kohm\n",
+ "AD=(1+2*R4/R5)*(RF/R1) \n",
+ "print \"Gain for the instrumention amplifier is : \",AD"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Gain for the instrumention amplifier is : 28.5\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 4.10 : page 131"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# given data\n",
+ "VA=3 #in mV\n",
+ "VB=5 #in mV\n",
+ "R1=10 #in Kohm\n",
+ "R2=10 #in Kohm\n",
+ "R3=45 #in Kohm\n",
+ "R4=8 #in Kohm\n",
+ "R5=3 #in Kohm\n",
+ "RF=45 #in Kohm\n",
+ "I=(VA-VB)/R5 #in mA\n",
+ "VoA=VA+I*R4 #in mVs\n",
+ "VoB=VB-I*R4 #in mVs\n",
+ "print \"Output of op-amp A1 = %0.2f mV\" %VoA\n",
+ "print \"Output of op-amp A2 = %0.2f mV\" %VoB\n",
+ "Vo1=(1+RF/R1)*(R3/(R3+R2))*VoB \n",
+ "Vo2=-(RF/R1)*VoA \n",
+ "Vo=Vo1+Vo2 #in mV\n",
+ "print \"Combined output of the circuit = %0.2f mV\"%Vo\n",
+ "# Answer in the textbook is not accurate."
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output of op-amp A1 = -2.33 mV\n",
+ "Output of op-amp A2 = 10.33 mV\n",
+ "Combined output of the circuit = 57.00 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 4.12 : page 135"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# given data\n",
+ "RF=10 #in Kohm\n",
+ "R1=10 #in Kohm\n",
+ "R2=R1 #in Kohm\n",
+ "R3=R1 #in Kohm\n",
+ "R5max=50 #in Kohm\n",
+ "ADmin=5 #unitless\n",
+ "ADmax=200 #unitless\n",
+ "#Formula : ADmin=1+2*R4/R5max\n",
+ "R4=(ADmin-1)*(R5max/2) #in Kohm\n",
+ "#Formula : ADmax=1+2*R4/R5min\n",
+ "R5min=(2*R4)/(ADmax-1) #in Kohm\n",
+ "print \"Thus design values of resistors in Kohm are :\" \n",
+ "print \"R1 = \",R1,\"kohm\" \n",
+ "print \"R2 = \",R2,\"kohm\" \n",
+ "print \"R3 = \",R3,\"kohm\" \n",
+ "print \"R4 = \",R4,\"kohm\" \n",
+ "print \"RF = \",RF,\"kohm\" \n",
+ "print \"R5min = %0.f kohm\"%R5min\n",
+ "print \"R5max = \",R5max,\"kohm\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Thus design values of resistors in Kohm are :\n",
+ "R1 = 10 kohm\n",
+ "R2 = 10 kohm\n",
+ "R3 = 10 kohm\n",
+ "R4 = 100.0 kohm\n",
+ "RF = 10 kohm\n",
+ "R5min = 1 kohm\n",
+ "R5max = 50 kohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 4.13 : page 136"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# given data\n",
+ "Vdc=10 #in Volt\n",
+ "R1=10 #in Kohm\n",
+ "R2=10 #in Kohm\n",
+ "R3=100 #in Kohm\n",
+ "RF=100 #in Kohm\n",
+ "# Part(i) Balance Bridge : RA=RB=RC=RT=150ohm and VAB=0\n",
+ "Vo = 0 # V\n",
+ "print \"(i) Balance bridge have output voltage Vo = %0.f volt\" %Vo\n",
+ "RA=150 #in ohm\n",
+ "RB=150 #in ohm\n",
+ "RC=150 #in ohm\n",
+ "RT=150 #in ohm\n",
+ "VAB=0 #in Volt\n",
+ "Vo=(-RF/R1)*VAB \n",
+ "# Part(ii) Unbalance Bridge : RT=200ohm\n",
+ "RT=200 #in ohm\n",
+ "VA=(RA/(RA+RT))*Vdc \n",
+ "VB=(RB/(RB+RC))*Vdc \n",
+ "VAB=VA-VB #in Volt\n",
+ "Vo=(-RF/R1)*VAB \n",
+ "print \"(ii) Unbalance bridge have output voltage Vo = %0.1f Volt\" %Vo"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "(i) Balance bridge have output voltage Vo = 0 volt\n",
+ "(ii) Unbalance bridge have output voltage Vo = 7.1 Volt\n"
+ ]
+ }
+ ],
+ "prompt_number": 40
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 4.15 : page 146"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import numpy as np\n",
+ "# given data\n",
+ "Gain=10 #Unitless\n",
+ "fb=10 #in KHz\n",
+ "#Assuming fa=fb/10\n",
+ "fa=fb/10 #in KHz\n",
+ "# Formula : fa=1/(2*pi*RF*CF)\n",
+ "RFCF=1/(2*np.pi*fa) \n",
+ "#Assuming R1=1Kohm\n",
+ "R1=1 #in Kohm\n",
+ "RF=10*R1 #in Kohm\n",
+ "CF=RFCF/RF #in uF\n",
+ "Rcomp=(R1*RF)/(R1+RF) # in Kohm\n",
+ "print \"Value of RF = %0.2f kohm\"%RF\n",
+ "print \"Value of CF = %0.3f uF\"%CF\n",
+ "print \"Value of Rcomp = %0.f ohm\"%(Rcomp*1000)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of RF = 10.00 kohm\n",
+ "Value of CF = 0.016 uF\n",
+ "Value of Rcomp = 909 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 4.16 : page 146"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Using superposition theorem\n",
+ "CF=10 #in uF\n",
+ "R1=1/(3*CF*10**-6) #in KOhm\n",
+ "R2=1/(2*CF*10**-6) #in KOhm\n",
+ "print \"Value of R1 = %0.2f kohm \"%(R1/1000) \n",
+ "print \"Value of R2 = %0.2f kohm \"%(R2/1000) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of R1 = 33.33 kohm \n",
+ "Value of R2 = 50.00 kohm \n"
+ ]
+ }
+ ],
+ "prompt_number": 45
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 4.22 : page 156"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import numpy as np\n",
+ "# given data\n",
+ "fa=1.5 #in KHz\n",
+ "fmax=1.5 #in KHz\n",
+ "C1=0.1 #in uF\n",
+ "RF=1/(2*np.pi*fa*C1) #in Kohm\n",
+ "fb=10*fa #in Khz\n",
+ "R1=1/(2*np.pi*fb*C1) #in Kohm\n",
+ "CF=(R1*C1)/RF #in uF\n",
+ "Rcomp=RF #in Kohm\n",
+ "print \"Value of resistance RF = %0.2f kohm\"%(RF)\n",
+ "print \"Value of resistance R1 = %0.2f ohm\"%(R1*1000)\n",
+ "print \"Value of Capacitance CF = %0.2f uF\"%(CF)\n",
+ "print \"Value of resistance Rcomp = %0.2f kohm\"%(Rcomp)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of resistance RF = 1.06 kohm\n",
+ "Value of resistance R1 = 106.10 ohm\n",
+ "Value of Capacitance CF = 0.01 uF\n",
+ "Value of resistance Rcomp = 1.06 kohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 46
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 4.25 : page 159"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "# given data\n",
+ "C1=0.1 #in uF\n",
+ "f=100 #in Hz\n",
+ "T=1/f #in sec\n",
+ "# Given also R1C1=0.2*T \n",
+ "R1=(0.2*T)/(C1*10**-6) #in ohm\n",
+ "RF=0.05/(C1*10**-6) #in ohm\n",
+ "CF=(R1*C1)/RF #in uF\n",
+ "print \"Value of resistance R1 = %0.2f ohm\"%(R1/1000)\n",
+ "print \"Value of resistance RF = %0.2f kohm\"%(RF/1000)\n",
+ "print \"Value of Capacitance CF = %0.2e uF\"%(CF)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of resistance R1 = 20.00 ohm\n",
+ "Value of resistance RF = 500.00 kohm\n",
+ "Value of Capacitance CF = 4.00e-03 uF\n"
+ ]
+ }
+ ],
+ "prompt_number": 47
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Analog_Integrated_Circuits_by__Pramod_Sharma/Chapter05.ipynb b/Analog_Integrated_Circuits_by__Pramod_Sharma/Chapter05.ipynb
new file mode 100755
index 00000000..df466cfa
--- /dev/null
+++ b/Analog_Integrated_Circuits_by__Pramod_Sharma/Chapter05.ipynb
@@ -0,0 +1,863 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:59cd343af66270b4e29714c4ca9503ff6321478ece54592a85a310df01cfd603"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter05 : Waveform Generators"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 5.1 : page 170"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "# given data \n",
+ "fo=1 #in KHz\n",
+ "# assume R1=1 Kohm and C=1 uF\n",
+ "R1=1 #in Kohm\n",
+ "C=1 #in uF\n",
+ "R2=1.16*R1 #in Kohm\n",
+ "R=1/(2*fo*10**3*C*10**-6)\n",
+ "print \"Value of R1 = %0.2f kohm\" %R1\n",
+ "print \"Value of R2 = %0.2f kohm\" %R2\n",
+ "print \"Value of R = %0.2f ohm\" %R\n",
+ "print \"Value of C = %0.2f uF\"%C"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of R1 = 1.00 kohm\n",
+ "Value of R2 = 1.16 kohm\n",
+ "Value of R = 500.00 ohm\n",
+ "Value of C = 1.00 uF\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 5.2 : page 170"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import log\n",
+ "# given data \n",
+ "fo=1 #in KHz\n",
+ "BETA=0.6 #unitless\n",
+ "print \"As choosing R1=1 Kohm\"\n",
+ "# assume R1=1 Kohm and C=1 uF\n",
+ "R1=1 #in Kohm\n",
+ "C=1 #in uF\n",
+ "R=1/(2*fo*10**3*C*10**-6*log((1+BETA)/(1-BETA))) \n",
+ "print \"Value of R = %0.2f ohm\"%R\n",
+ "#Answer in the book is wrong"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "As choosing R1=1 Kohm\n",
+ "Value of R = 360.67 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 5.3 : page 170"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# given data \n",
+ "BETA=0.41 #unitless\n",
+ "R=2.7 #in Kohm\n",
+ "C=0.1 #in uF\n",
+ "fo=1/(2*R*C*log((1+BETA)/(1-BETA))) #in KHz\n",
+ "print \"Output signal frequency = %0.3f khz\"%fo,"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output signal frequency = 2.126 khz\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 5.4 : page 171"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# given data \n",
+ "Ton=100 #in mSEC\n",
+ "Toff=200 #in mSEC\n",
+ "BETA=0.2 #unitless\n",
+ "#Let R1=1 Kohm\n",
+ "R1=1 #in Kohm\n",
+ "R2=R1*(1-BETA)/BETA #in Kohm\n",
+ "# Assuming C=10 uF\n",
+ "C=10 #in uF\n",
+ "R3=Ton*10**-3/(C*10**-6*0.41) #in Kohm\n",
+ "R4=Toff*10**-3/(C*10**-6*0.41) # in Kohm\n",
+ "print \"Value of R1 = %0.2f kohm\"%R1\n",
+ "print \"Value of R2 = %0.2f kohm\"%R2\n",
+ "print \"Value of R3 = %0.2f kohm\"%(R3/1000)\n",
+ "print \"Value of R4 = %0.2f kohm\"%(R4/1000)\n",
+ "print \"Value of C = %0.2f uF\"%C"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of R1 = 1.00 kohm\n",
+ "Value of R2 = 4.00 kohm\n",
+ "Value of R3 = 24.39 kohm\n",
+ "Value of R4 = 48.78 kohm\n",
+ "Value of C = 10.00 uF\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 5.5 : page 171"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# given data \n",
+ "Vo=7.5 #in Volt\n",
+ "fo=1 # in KHz\n",
+ "DutyCycle=60 #in %\n",
+ "Vz=6.8 # in volt\n",
+ "Vz1=6.8 # in volt\n",
+ "Vz2=6.8 # in volt\n",
+ "VD=0.7 # in volt\n",
+ "T=1/fo #in mSec\n",
+ "# duty cycle 60% gives Ton & Toff\n",
+ "Ton=0.6*T #in mSec\n",
+ "Toff=T-Ton #in mSec\n",
+ "# choosing R2=1.16*R1\n",
+ "R1=1 #in Kohm\n",
+ "C=0.1 #in uF\n",
+ "R2=1.16*R1 #in Kohm\n",
+ "R3=Ton*10**-3/(C*10**-6) #in ohm\n",
+ "R4=Toff*10**-3/(C*10**-6) #in ohm\n",
+ "print \"Value of R1 = %0.2f kohm\"%R1\n",
+ "print \"Value of R2 = %0.2f kohm\"%R2\n",
+ "print \"Value of R3 = %0.2f kohm\"%(R3/1000)\n",
+ "print \"Value of R4 = %0.2f kohm\"%(R4/1000)\n",
+ "print \"Value of C = %0.2f uF\"%C"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of R1 = 1.00 kohm\n",
+ "Value of R2 = 1.16 kohm\n",
+ "Value of R3 = 6.00 kohm\n",
+ "Value of R4 = 4.00 kohm\n",
+ "Value of C = 0.10 uF\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 5.6 : page 179"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# given data \n",
+ "RA=6.8 #in Kohm\n",
+ "RB=3.3 #in Kohm\n",
+ "C=0.1 #in uF\n",
+ "fo=1.45/((RA+2*RB)*C) # in KHz\n",
+ "d=(RA+RB)/(RA+2*RB) \n",
+ "print \"Frequency of oscillation = %0.2f khz\"%fo\n",
+ "print \"Duty cycle = %0.2f %%\" %(d*100)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Frequency of oscillation = 1.08 khz\n",
+ "Duty cycle = 75.37 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 5.7 : page 179"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# given data \n",
+ "fo=50 #in kHz\n",
+ "d=75/100 #unitless\n",
+ "C=1 #in nF\n",
+ "print \"RA+2RB=28.9 kohm\" \n",
+ "print \"d=0.75=(RA+RB)/(RA+2*RB)\" \n",
+ "print \"It gives RA=2*RB\" \n",
+ "RA=28.9/2 # in kohm\n",
+ "RB=RA/2 #in kohm\n",
+ "print \"Value of RA = %0.1f kohm \" %RA\n",
+ "print \"Value of RB = %0.2f kohm \" %RB"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "RA+2RB=28.9 kohm\n",
+ "d=0.75=(RA+RB)/(RA+2*RB)\n",
+ "It gives RA=2*RB\n",
+ "Value of RA = 14.4 kohm \n",
+ "Value of RB = 7.22 kohm \n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 5.8 : page 180"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# given data \n",
+ "fo=800 # in Hz\n",
+ "d=60/100 #unitless\n",
+ "T=1/fo #in Sec\n",
+ "TC=0.6*T #in Sec\n",
+ "TD=T-TC #in Sec\n",
+ "C=0.01 #in uF\n",
+ "C2=10 #in uF\n",
+ "RB=TD/(0.69*C*10**-6) #in ohm\n",
+ "RA=(TC-0.69*RB*C*10**-6)/(0.69*C*10**-6) #in ohm\n",
+ "print \"Value of RA = %0.2f kohm \" %(RA/1000)\n",
+ "print \"Value of RB = %0.2f kohm \" %(RB/1000)\n",
+ "print \"Value of C = %0.2f uF\" %C\n",
+ "print \"Value of C2 = %0.2f uF\" %C2"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of RA = 36.23 kohm \n",
+ "Value of RB = 72.46 kohm \n",
+ "Value of C = 0.01 uF\n",
+ "Value of C2 = 10.00 uF\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 5.9 : page 180"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# given data \n",
+ "fo=700 # in Hz\n",
+ "d=50/100 #unitless\n",
+ "T=1/fo #in Sec\n",
+ "TC=0.5*T #in Sec\n",
+ "TD=T-TC #in Sec\n",
+ "C=0.1 #in uF\n",
+ "RB=TD/(0.69*C*10**-6) #in ohm\n",
+ "RA=TC/(0.69*C*10**-6) #in ohm\n",
+ "print \"Value of RA = %0.1f kohm \" %(RA/1000)\n",
+ "print \"Value of RB = %0.1f kohm \" %(RB/1000)\n",
+ "print \"We have TC = TD = %0.3f ms\" %(TC*1000)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of RA = 10.4 kohm \n",
+ "Value of RB = 10.4 kohm \n",
+ "We have TC = TD = 0.714 ms\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 5.10 : page 181"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# given data \n",
+ "fo=1 # in KHz\n",
+ "d=40/100 #unitless\n",
+ "T=1/fo #in Sec\n",
+ "TC=0.4*T #in mSec\n",
+ "TD=T-TC #in mSec\n",
+ "C=0.1 #in uF\n",
+ "RB=TD*10**-3/(0.69*C*10**-6) #in ohm\n",
+ "RA=TC*10**-3/(0.69*C*10**-6) #in ohm\n",
+ "print \"Value of RA = %0.2f kohm \" %(RA/1000)\n",
+ "print \"Value of RB = %0.2f kohm \" %(RB/1000)\n",
+ "print \"We have TC = %0.2f ms\" %(TC)\n",
+ "print \"We have TD = %0.2f ms\" %(TD)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of RA = 5.80 kohm \n",
+ "Value of RB = 8.70 kohm \n",
+ "We have TC = 0.40 ms\n",
+ "We have TD = 0.60 ms\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 5.11 : page 186"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# given data \n",
+ "T=100 # in uSec\n",
+ "C=15 #in \n",
+ "R=T*10**-6/(1.1*C*10**-9) #in ohm\n",
+ "print \"To obtain a output pulse at 100uSec resistor required = %0.2f kohm\"%(R/1000)\n",
+ "#Note : in the question 15uF is given but in the solution 15nF is used in the book"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "To obtain a output pulse at 100uSec resistor required = 6.06 kohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 5.12 : page 187"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# given data \n",
+ "VCC=15 #in Volt\n",
+ "T=10 #in mSec\n",
+ "ILED=20 #in mA\n",
+ "Vf=1.4 #in Volt\n",
+ "VBE=0.7 #in Volt\n",
+ "VCEsat=0.2 #in Volt\n",
+ "C=0.22 #in uF\n",
+ "R=T*10**-3/(1.1*C*10**-6) #in ohm\n",
+ "#output of the device \n",
+ "Vo=VCC-2*VBE-VCEsat \n",
+ "R5=(Vo-Vf)/(ILED*10**-3) #in ohm\n",
+ "print \"Value of R = %0.2f kohm\" %(R/1000)\n",
+ "print \"Output of the device = %0.2f Volt\" %(Vo)\n",
+ "print \"Value of RB = %0.2f ohm\" %(R5)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of R = 41.32 kohm\n",
+ "Output of the device = 13.40 Volt\n",
+ "Value of RB = 600.00 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 5.13 : page 187"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# given data \n",
+ "fo=2 # in KHz\n",
+ "C=0.01 #in uF\n",
+ "T=1/fo #in mSec\n",
+ "tp=1.2*T #in mSec\n",
+ "R=tp*10**-3/(1.1*C*10**-6) #in ohm\n",
+ "print \"Period of trigger pulse = %0.2f ms\" %(tp)\n",
+ "print \"Value of R = %0.2f kohm\"%(R/1000)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Period of trigger pulse = 0.60 ms\n",
+ "Value of R = 54.55 kohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 5.14 : page 193"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# given data \n",
+ "fo=2 # in KHz\n",
+ "Vopp=5 #in volts\n",
+ "Vsat=13 #in Volts\n",
+ "# Let the value of R2 used be 10 Kohm \n",
+ "R2=10 #in Kohm\n",
+ "R3=(2*R2*Vsat)/Vopp #in Kohm \n",
+ "# Let C1=0.1 uF\n",
+ "C1=0.1 # in uF\n",
+ "R1=R3/(4*fo*10**3*C1*10**-6*R2) # in ohm\n",
+ "print \"Value of R1 = %0.2f kohm\" %(R1/1000)\n",
+ "print \"Value of C1 = %0.2f uF\" %(C1)\n",
+ "print \"Value of R2 = %0.2f kohm\" %R2\n",
+ "print \"Value of R3 = %0.2f kohm\" %R3 "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of R1 = 6.50 kohm\n",
+ "Value of C1 = 0.10 uF\n",
+ "Value of R2 = 10.00 kohm\n",
+ "Value of R3 = 52.00 kohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 5.15 : page 193"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# given data \n",
+ "Vcc=12 #in Volt\n",
+ "R1=10 #in Kohm\n",
+ "R2=100 #in Kohm\n",
+ "R3=820 #in Kohm\n",
+ "# Let Vsat=10 volt\n",
+ "Vsat=10 #in volt\n",
+ "# part (a)\n",
+ "Vopp=2*R2*Vsat/R3 #in Volt\n",
+ "print \"Amplitude of triangular wave = %0.2f Volt\" %(Vopp)\n",
+ "Vopp=Vsat-(-Vsat) # in Volt\n",
+ "print \"Amplitude of square wave = %0.2f Volt\" %(Vopp)\n",
+ "# part (b)\n",
+ "C1=0.1 # in uF\n",
+ "fo=R3*1000/(4*R1*1000*R2*1000*C1*10**-6) # in Hz\n",
+ "print \"Frequency = %0.2f kHz\" %(fo/1000)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Amplitude of triangular wave = 2.44 Volt\n",
+ "Amplitude of square wave = 20.00 Volt\n",
+ "Frequency = 2.05 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 5.16 : page 205"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt, pi\n",
+ "# given data \n",
+ "fo=1 # in KHz\n",
+ "# choose C=.01 uF\n",
+ "C=.01 # in uF\n",
+ "R=1/(2*pi*sqrt(6)*fo*1000*C*10**-6) # in ohm\n",
+ "R1=35.6 # in Kohm\n",
+ "RF=29*R1 #in ohm\n",
+ "print \"Value of C = %0.2f uF\" %(C)\n",
+ "print \"Value of R = %0.2f kohm\" %(R/1000)\n",
+ "print \"Value of R1 = %0.2f kohm\" %R1\n",
+ "print \"Value of RF = %0.2f Mohm\" %(RF/1000) \n",
+ "# Note : Answer in the book is wrong"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of C = 0.01 uF\n",
+ "Value of R = 6.50 kohm\n",
+ "Value of R1 = 35.60 kohm\n",
+ "Value of RF = 1.03 Mohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 5.17 : page 206"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt, pi\n",
+ "# given data \n",
+ "fo=1 # in KHz\n",
+ "# choose C=.01 uF\n",
+ "C=.01 # in uF\n",
+ "R=1/(2*pi*fo*1000*C*10**-6) # in ohm\n",
+ "# choosing R1=10 Kohm\n",
+ "R1=10 # in Kohm\n",
+ "RF=2*R1 #in Kohm\n",
+ "print \"Value of C = %0.2f uF\" %(C)\n",
+ "print \"Value of R = %0.2f kohm\" %(R/1000)\n",
+ "print \"Value of R1 = %0.2f kohm\" %R1\n",
+ "print \"Value of RF = %0.2f kohm\" %(RF) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of C = 0.01 uF\n",
+ "Value of R = 15.92 kohm\n",
+ "Value of R1 = 10.00 kohm\n",
+ "Value of RF = 20.00 kohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 5.19 : page 207"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# given data \n",
+ "R=1 #in Kohm\n",
+ "C=3.6 #in uF\n",
+ "fo=1/(2*pi*R*1000*C*10**-6) # in Hz\n",
+ "print \"The frequency of oscillation = %0.2f Hz\" %fo"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The frequency of oscillation = 44.21 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 5.20 : page 217"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# given data \n",
+ "R1=10 #in Kohm\n",
+ "R2=47 #in Kohm\n",
+ "R3=5.6 #in Kohm\n",
+ "RT=4.7 #in Kohm\n",
+ "CT=0.05 #in uF\n",
+ "V1=-10 #in Volt\n",
+ "V2=2 #in Volt\n",
+ "Vop=-(R1*V1/R2+R1*V2/R3) # in volt\n",
+ "VEE=0 #in Volt\n",
+ "I=(VEE+3-Vop)/RT # in mA\n",
+ "fo=0.32*I*10**-3/(CT*10**-6) #in Hz\n",
+ "print \"Op-amp voltage = %0.2f V \"%Vop\n",
+ "print \"Frequency = %0.2f kHz\" %(fo/1000)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Op-amp voltage = -1.44 V \n",
+ "Frequency = 6.05 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 5.21 : page 233"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# given data \n",
+ "RT=50 #in Kohm\n",
+ "CT=0.001 #in uF\n",
+ "V=20 #in Volt\n",
+ "C=10 #in uF\n",
+ "fo=0.25/(RT*10**3*CT*10**-6) #in Hz\n",
+ "dfl=7.8*fo/V #in Hz\n",
+ "dfc=sqrt(dfl/(2*pi*3.6*10**3*C*10**-6)) #in Hz\n",
+ "print \"Free running frequency = %0.2f kHz\" %(fo/1000)\n",
+ "print \"Lock range = %0.2f kHz\" %(dfl/1000)\n",
+ "print \"Capture range = %0.2f Hz\" %(dfc)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Free running frequency = 5.00 kHz\n",
+ "Lock range = 1.95 kHz\n",
+ "Capture range = 92.85 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 5.22 : page 237"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import log10, ceil\n",
+ "# given data \n",
+ "fomax=100 # in KHz\n",
+ "Resolution=2 #in Hz\n",
+ "flowest=Resolution #in Hz\n",
+ "fclk=fomax*2.2 #in KHz\n",
+ "# formula: 2**n=fclk/flowest\n",
+ "n=(log10(fclk*1000/flowest))/log10(2) \n",
+ "print \" Frequency of reference oscillator = %0.2f kHz\" %fclk\n",
+ "print \" No. of bits needed is \",ceil(n) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ " Frequency of reference oscillator = 220.00 kHz\n",
+ " No. of bits needed is 17.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Analog_Integrated_Circuits_by__Pramod_Sharma/Chapter06.ipynb b/Analog_Integrated_Circuits_by__Pramod_Sharma/Chapter06.ipynb
new file mode 100755
index 00000000..ad869619
--- /dev/null
+++ b/Analog_Integrated_Circuits_by__Pramod_Sharma/Chapter06.ipynb
@@ -0,0 +1,778 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:c1b2528db2720418783c3dceac0aaa6b8c59f82b11d59cc3bcd5977ffc3ae345"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter06 : Active Filters"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 6.2 : page 250"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi\n",
+ "# given data \n",
+ "R=10 #in Kohm\n",
+ "C=0.01 #in uF\n",
+ "R1=4.7 #in Kohm\n",
+ "RF=47 #in Kohm\n",
+ "fc=1/(2*pi*R*1000*C*10**-6) #in Hz\n",
+ "AF=1+RF/R1 #unitless\n",
+ "print \"Cut-off frequency = %0.2f kHz\" %(fc/1E3)\n",
+ "print \"Pass band gain =\",AF"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Cut-off frequency = 1.59 kHz\n",
+ "Pass band gain = 11.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 6.3 : page 250"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi, ceil\n",
+ "# given data \n",
+ "fc=2 #in KHz\n",
+ "AF=2 #unitless\n",
+ "# let C=0.01 uF\n",
+ "C=0.01 #in uF\n",
+ "R=(1/(2*pi*fc*1E3*C*1E-6))/1E3 #in Kohm\n",
+ "R=ceil(R) \n",
+ "# Bias compensation Rbc\n",
+ "# Rbc=R1*RF/(R1+RF) ohm\n",
+ "# R=R1*RF/(R1+RF)=Rdash/2 ohm \n",
+ "#Rdash=R1=RF=2*R #in ohm\n",
+ "Rdash=2*R #in ohm\n",
+ "R1=2*R #in ohm\n",
+ "RF=2*R #in ohm\n",
+ "R1=RF #in kohm\n",
+ "print \"Component values are :\" \n",
+ "print \"R1 = RF = %0.2f kohm\" %(R1)\n",
+ "print \"R = %0.2f kohm\"%R"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Component values are :\n",
+ "R1 = RF = 16.00 kohm\n",
+ "R = 8.00 kohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 6.4 : page 251"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "# given data \n",
+ "fc_original=2 #in KHz\n",
+ "fc_new=3 #in KHz\n",
+ "R_original=8 #in Kohm\n",
+ "R_new=fc_original*R_original/fc_new #in Kohm\n",
+ "print \"New value of resistance = %0.2f ohm\"%R_new"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "New value of resistance = 5.33 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 6.5 : page 254"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# given data \n",
+ "fc=1 #in KHz\n",
+ "AF=2 #unitless\n",
+ "# let C=0.01 uF\n",
+ "C=0.01 #in uF\n",
+ "R=(1/(2*pi*fc*1000*C*10**-6))/1000 #in Kohm\n",
+ "#For Bias compensation\n",
+ "#Rbc=R1*RF/(R1+RF) ohm\n",
+ "#R=R1*RF/(R1+RF)=Rdash/2 ohm\" \n",
+ "#Rdash=R1=RF=2*R #in ohm\n",
+ "Rdash=2*R #in ohm\n",
+ "R1=2*R #in ohm\n",
+ "RF=2*R #in ohm\n",
+ "R1=RF #in kohm\n",
+ "print \"Component values are :\" \n",
+ "print \"R1 = RF = %0.1f kohm\" %(R1)\n",
+ "print \"R = %0.1f kohm\"%R "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Component values are :\n",
+ "R1 = RF = 31.8 kohm\n",
+ "R = 15.9 kohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 6.6 : page 260"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt, pi\n",
+ "# given data \n",
+ "AF=5 #unitless\n",
+ "fc=1 #in KHz\n",
+ "alfa=1.414 #unitless\n",
+ "# assume C2=0.1 uF\n",
+ "C2=0.1 #in uF\n",
+ "C3=(C2*alfa**2)/4 # in uF\n",
+ "R=1/(2*pi*fc*10**3*sqrt(C2*10**-6*C3*10**-6)) #in ohm\n",
+ "#Take RF=10 Kohm\n",
+ "RF=10 #in Kohm\n",
+ "R1=RF/(AF-1) #in Kohm\n",
+ "print \"Value of R = %0.2f kohm\"%(R/1E3)\n",
+ "print \"Value of RF = %0.2f kohm\" %(RF)\n",
+ "print \"Value of R1 = %0.2f kohm\"%R1"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of R = 2.25 kohm\n",
+ "Value of RF = 10.00 kohm\n",
+ "Value of R1 = 2.50 kohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 6.7 : page 261"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt, pi\n",
+ "# given data \n",
+ "C2=0.1 #in uF\n",
+ "C3=0.0333 #in uF\n",
+ "alfa=2*sqrt(C3/C2) #unitless\n",
+ "print \"Value of alfa = %0.2f\" %alfa \n",
+ "print \"This filter is situated between Butterworth and the Chebyshev, hence approximating Klp=1.1\" \n",
+ "Klp=1.1 #unitless\n",
+ "R=2.25 #in Kohm\n",
+ "f3dB=Klp/(2*pi*R*sqrt(C2*C3)) #in KHz\n",
+ "print \"f3dB = %0.2f kHz\" %f3dB\n",
+ "#Note : Answer in the book is wrong"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of alfa = 1.15\n",
+ "This filter is situated between Butterworth and the Chebyshev, hence approximating Klp=1.1\n",
+ "f3dB = 1.35 kHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 6.8 : page 261"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi\n",
+ "# given data \n",
+ "Klp=1 #unitless# it is 1 for butterworth filter\n",
+ "alfa=1.414 #unitless# it is 1.414 for butterworth filter\n",
+ "fc=1 #in KHz\n",
+ "R=15.9 #in Kohm\n",
+ "# assume C=0.01 uF\n",
+ "C=0.01 #in uF\n",
+ "R=Klp/(2*pi*fc*1000*C*10**-6) # in ohm\n",
+ "AF=3-alfa #unitless\n",
+ "R1=2*R/0.369 #in Kohm\n",
+ "RF=(AF-1)*R1 #in Kohm\n",
+ "A2=5/AF #unitless\n",
+ "print \"Value of RF = %0.2f kohm\" %(RF/1000)\n",
+ "print \"Gain of this amplifier = %0.2f \"%A2 "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of RF = 50.55 kohm\n",
+ "Gain of this amplifier = 3.15 \n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 6.9 : page 262"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "from math import pi\n",
+ "# given data \n",
+ "R2=20 #in Kohm\n",
+ "R3=20 #in Kohm\n",
+ "R=R2 #in Kohm\n",
+ "C2=0.47 #in uF\n",
+ "C3=0.47 #in uF\n",
+ "C=C2 #in uF\n",
+ "RF=56 #in Kohm\n",
+ "R1=56 #in Kohm\n",
+ "AF=1+RF/R1 #unitless\n",
+ "alfa=3-AF #unitless\n",
+ "Klp=1.238 #unitless\n",
+ "print \"Value of alfa = %0.2f\" %alfa \n",
+ "print \"alfa=1 corresponds to chebyshev filter response.\" \n",
+ "f3dB=Klp/(2*pi*R*1000*C*10**-6) #in Hz\n",
+ "print \"Critical frequency = %0.2f Hz\" %(f3dB)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of alfa = 1.00\n",
+ "alfa=1 corresponds to chebyshev filter response.\n",
+ "Critical frequency = 20.96 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 6.10 : page 263"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi\n",
+ "# given data \n",
+ "fc=2 #in kHz\n",
+ "alfa=1.414 #unitless\n",
+ "Klp=1 #unitless\n",
+ "#assume C=0.01 uF\n",
+ "C=0.01 #in uF\n",
+ "R=Klp/(2*pi*fc*1000*C*10**-6) #in ohm\n",
+ "AF=3-alfa #unitless\n",
+ "R1=2*R/0.369 #in ohm\n",
+ "RF=0.586*R1 #in ohm\n",
+ "print \"Design components values are :\" \n",
+ "print \"Value of R1 = %0.2f kohm\"%(R1/1000)\n",
+ "print \"Value of RF = %0.2f kohm\"%(RF/1000)\n",
+ "print \"Value of R2=R3=R= %0.2f kohm\" %(R/1000)\n",
+ "print \"Value of C2=C3=C= %0.2f uF\" %(C)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Design components values are :\n",
+ "Value of R1 = 43.13 kohm\n",
+ "Value of RF = 25.28 kohm\n",
+ "Value of R2=R3=R= 7.96 kohm\n",
+ "Value of C2=C3=C= 0.01 uF\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 6.11 : page 267"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# given data \n",
+ "C=0.1 #in uF\n",
+ "R=11 #in Kohm\n",
+ "RF=5.6 #in Kohm\n",
+ "R1=10 #in Kohm\n",
+ "AF=1+RF/R1 #unitless\n",
+ "alfa=3-AF #unitless\n",
+ "Klp=1 #unitless# for Butterworth filter\n",
+ "Khp=1/Klp #unitless\n",
+ "f3dB=Khp/(2*pi*R*1000*C*10**-6) #in Hz\n",
+ "print \"3 dB frequency = %0.2f Hz\"%(f3dB)\n",
+ "print \"Value of alfa = %0.2f\"%alfa \n",
+ "print \"Value of alfa shows that it is a Butterworth flter.\" \n",
+ "print \"Passband gain for a high pass filter = %0.2f\"%Khp"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "3 dB frequency = 144.69 Hz\n",
+ "Value of alfa = 1.44\n",
+ "Value of alfa shows that it is a Butterworth flter.\n",
+ "Passband gain for a high pass filter = 1.00\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 6.12 : page 267"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi\n",
+ "# given data \n",
+ "fc=2 #in KHz\n",
+ "alfa=1.414 #unitless\n",
+ "Klp=1 #unitless\n",
+ "#assume C=0.01 uF\n",
+ "C=0.01 #in uF\n",
+ "R=Klp/(2*pi*fc*1000*C*10**-6) #in ohm\n",
+ "AF=3-alfa #unitless\n",
+ "R1=2*R/0.369 #in ohm\n",
+ "RF=0.586*R1 #in ohm\n",
+ "print \"Design components values are :\" \n",
+ "print \"Value of R1 = %0.2f kohm\" %(R1/1000)\n",
+ "print \"Value of RF = %0.2f kohm\" %(RF/1000)\n",
+ "print \"Value of R2=R3=R= %0.2f kohm \" %(R/1000)\n",
+ "print \"Value of C2=C3=C= %0.2f uF\" %(C)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Design components values are :\n",
+ "Value of R1 = 43.13 kohm\n",
+ "Value of RF = 25.28 kohm\n",
+ "Value of R2=R3=R= 7.96 kohm \n",
+ "Value of C2=C3=C= 0.01 uF\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 6.13 : page 270"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import pi, sqrt\n",
+ "# given data \n",
+ "fL=200 #in Hz\n",
+ "fH=1 #in KHz\n",
+ "AFBP=4 #unitless\n",
+ "#for LP section design\n",
+ "#assume C=0.01 uF\n",
+ "C=0.01 #in uF\n",
+ "R=1/(2*pi*fH*1000*C*10**-6) #in ohm\n",
+ "print \"For low pass section design component values are :\" \n",
+ "print \"Value of R = %0.1f kohm\" %(R/1000)\n",
+ "print \"Value of C = %0.2f uF \"%C\n",
+ "#for HP section design\n",
+ "#assume C=0.05 uF\n",
+ "C=0.05 #in uF\n",
+ "R=1/(2*pi*fL*1000*C*10**-6) #in ohm\n",
+ "print \"For high pass section design component values are :\" \n",
+ "print \"Value of R = %0.1f kohm\" %R\n",
+ "print \"Value of C = %0.2f uF\"%C\n",
+ "print \"We have AFBP=AFHP*AFLP=4\" \n",
+ "print \"R=10 kohm\" \n",
+ "fc=sqrt(fH*fL*1000) #in Hz\n",
+ "BW=fH*1000-fL #in Hz\n",
+ "Q=fc/BW #unitless\n",
+ "print \"Center frequency = %0.2f Hz\"%fc\n",
+ "print \"BW = %0.2f Hz\"%BW\n",
+ "print \"Selectivity = %0.2f\" %Q\n",
+ "print \"As Q<10, hence the given filter is wide band pass filter.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "For low pass section design component values are :\n",
+ "Value of R = 15.9 kohm\n",
+ "Value of C = 0.01 uF \n",
+ "For high pass section design component values are :\n",
+ "Value of R = 15.9 kohm\n",
+ "Value of C = 0.05 uF\n",
+ "We have AFBP=AFHP*AFLP=4\n",
+ "R=10 kohm\n",
+ "Center frequency = 447.21 Hz\n",
+ "BW = 800.00 Hz\n",
+ "Selectivity = 0.56\n",
+ "As Q<10, hence the given filter is wide band pass filter.\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 6.14 : page 274"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import sqrt, pi\n",
+ "# given data \n",
+ "fL=2 #in KHz\n",
+ "fH=2.5 #in KHz\n",
+ "AF=-5 #unitless\n",
+ "fc=sqrt(fH*1000*fL*1000) #in Hz\n",
+ "BW=fH*1000-fL*1000 #in Hz\n",
+ "Q=fc/BW #unitless\n",
+ "print \"Center frequency = %0.f Hz\"%fc\n",
+ "print \"BW = %0.2f Hz\"%BW\n",
+ "print \"Selectivity = %0.3f \" %Q \n",
+ "#assume C=0.01 uF\n",
+ "C=0.01 #in uF\n",
+ "R2=2/(2*pi*C*10**-6*BW) #in Kohm\n",
+ "R1=-R2/(2*AF) #in KOhm\n",
+ "R3=R1/((4*pi*pi*R1*R2*fc*1000*fc*1000*C*C*10**-12)-1) #in Kohm\n",
+ "print \"Value of R1 = %0.2f kohm \"%(R1/1000)\n",
+ "print \"Value of R2 = %0.2f kohm \"%(R2/1000)\n",
+ "print \"Value of R3 = %0.2f ohm \"%(R3*1000)\n",
+ "print \"Value of C = %0.2f uF\" %C"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Center frequency = 2236 Hz\n",
+ "BW = 500.00 Hz\n",
+ "Selectivity = 4.472 \n",
+ "Value of R1 = 6.37 kohm \n",
+ "Value of R2 = 63.66 kohm \n",
+ "Value of R3 = 0.80 ohm \n",
+ "Value of C = 0.01 uF\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 6.15 : page 276"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# given data \n",
+ "AF=-10 #unitless\n",
+ "Q=20 #unitless\n",
+ "fc=50 #in Hz\n",
+ "fc1=fc #in Hz\n",
+ "fc2=fc #in Hz\n",
+ "fc3=fc #in Hz\n",
+ "Q1=0.51*Q #unitless\n",
+ "Q2=0.51*Q #unitless\n",
+ "Q3=0.51*Q #unitless\n",
+ "AF1=-(-AF)**(1/3) #unitless\n",
+ "print \"A single op-amp band passed filter can be design with specifications :\" \n",
+ "print \"Center frequency = %0.2f Hz\" %fc\n",
+ "print \"AF1 = %0.2f \"%AF1 \n",
+ "print \"Q1 = %0.2f \"%Q1 "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "A single op-amp band passed filter can be design with specifications :\n",
+ "Center frequency = 50.00 Hz\n",
+ "AF1 = -2.15 \n",
+ "Q1 = 10.20 \n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 6.16 : page 282"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from math import tan, pi\n",
+ "# given data \n",
+ "f=2 #in KHz\n",
+ "fi_degree=-135 #in degree\n",
+ "fi_radian=fi_degree*(pi/180) \n",
+ "print \"A phase shift of -135 degree is achieved by an all pass phase lag filter.\" \n",
+ "#assume C=0.1 uF and R1=RF=10 Kohm\n",
+ "C=0.1 #in uF\n",
+ "R1=10 #in Kohm\n",
+ "RF=10 #in Kohm\n",
+ "R=tan(-fi_radian/2)/(2*pi*f*1000*C*10**-6) \n",
+ "print \"Component values are :\" \n",
+ "print \"Value of R1 = %0.2f kohm \"%R1\n",
+ "print \"Value of RF = %0.2f kohm\"%RF\n",
+ "print \"Value of R = %0.2f kohm \" %(R/1000)\n",
+ "print \"Value of C = %0.2f uF \"%C"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "A phase shift of -135 degree is achieved by an all pass phase lag filter.\n",
+ "Component values are :\n",
+ "Value of R1 = 10.00 kohm \n",
+ "Value of RF = 10.00 kohm\n",
+ "Value of R = 1.92 kohm \n",
+ "Value of C = 0.10 uF \n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 6.17 : page 286"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ " # given data \n",
+ "R=10 #in Kohm\n",
+ "R1=R #in Kohm\n",
+ "R2=R #in Kohm\n",
+ "R3=R #in Kohm\n",
+ "Rf=5.6 #in Kohm\n",
+ "R4=Rf #in Kohm\n",
+ "R5=Rf #in Kohm\n",
+ "RA=2.7 #in Kohm\n",
+ "RB=1.5 #in Kohm\n",
+ "C=0.01 #in uF\n",
+ "C1=C #in uF\n",
+ "C2=C #in uF\n",
+ "alfa=3*RB/(RA+RB) \n",
+ "print \"Value of alfa = %0.2f\"%alfa \n",
+ "print \"This value correspondes to the chebyshev response.\" \n",
+ "C=0.01 #in uF\n",
+ "C1=C #in uF\n",
+ "C2=C #in uF\n",
+ "fc=1/(2*pi*Rf*1000*C*10**-6) #in Hz\n",
+ "Klp=1.238 #unitless\n",
+ "fH=fc*Klp #in Hz\n",
+ "Khp=1/Klp #unitless\n",
+ "fL=fc*Khp#in Hz\n",
+ "print \"Critical frequency = %0.2f kHz\"%(fc/1000)\n",
+ "print \"High cut-off frequency = %0.2f kHz\" %(fH/1000)\n",
+ "print \"Low cut-off frequency = %0.2f kHz \"%(fL/1000)\n",
+ "C=0.01 #in uF\n",
+ "C1=C #in uF\n",
+ "C2=C #in uF\n",
+ "fc=1/(2*pi*Rf*1000*C*10**-6) #in Hz\n",
+ "print \"Band pass center frequency = %0.2f kHz\" %(fc/1000)\n",
+ "C=0.01 #in uF\n",
+ "C1=C #in uF\n",
+ "C2=C #in uF\n",
+ "alfa=3*RB/(RA+RB) #unitless\n",
+ "Q=1/alfa #unitless\n",
+ "fc=1/(2*pi*Rf*1000*C*10**-6) #in Hz\n",
+ "BW=fc/Q #in Hz\n",
+ "print \"Band pass bandwidth = %0.2f kHz\" %(BW/1000)\n",
+ "C=0.01 #in uF\n",
+ "C1=C #in uF\n",
+ "C2=C #in uF\n",
+ "alfa=3*RB/(RA+RB) #in unitless\n",
+ "Q=1/alfa #in unitless\n",
+ "print \"The band pass gain at center frequency = %0.3f \"%Q "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of alfa = 1.07\n",
+ "This value correspondes to the chebyshev response.\n",
+ "Critical frequency = 2.84 kHz\n",
+ "High cut-off frequency = 3.52 kHz\n",
+ "Low cut-off frequency = 2.30 kHz \n",
+ "Band pass center frequency = 2.84 kHz\n",
+ "Band pass bandwidth = 3.05 kHz\n",
+ "The band pass gain at center frequency = 0.933 \n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Analog_Integrated_Circuits_by__Pramod_Sharma/Chapter07.ipynb b/Analog_Integrated_Circuits_by__Pramod_Sharma/Chapter07.ipynb
new file mode 100755
index 00000000..3bda5469
--- /dev/null
+++ b/Analog_Integrated_Circuits_by__Pramod_Sharma/Chapter07.ipynb
@@ -0,0 +1,139 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:633401d9dc343504b92f5c6c8c0ce8a9244d452bbc7c55d1a9f47615b5cd01fb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter07 : Non-Linear Circuits"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 7.3 : page 326"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "# given data \n",
+ "VH=4 #in Volt\n",
+ "VSat=13 #in Volt\n",
+ "# Assume R2=10 Kohm\n",
+ "R2=10 #in Kohm\n",
+ "R1=R2/((2*VSat/VH)-1) #in Kohm\n",
+ "print \"Component values are :\" \n",
+ "print \"Value of R1 = %0.2f kohm\" %R1\n",
+ "print \"Value of R2 = %0.2f kohm\" %R2"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Component values are :\n",
+ "Value of R1 = 1.82 kohm\n",
+ "Value of R2 = 10.00 kohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 7.4 : page 327"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "# given data \n",
+ "VSat=13 #in Volt\n",
+ "R1=270 #in ohm\n",
+ "R2=39 #in Kohm\n",
+ "Vut=R1*VSat/(R1+R2*1000) #in Volt\n",
+ "Vlt=R1*(-VSat)/(R1+R2*1000) #in Volt\n",
+ "VH=Vut-Vlt #in Volt\n",
+ "print \"The upper threshold voltage = %0.1f mV\" %(Vut*1000)\n",
+ "print \"The lower threshold voltage = %0.1f mV\" %(Vlt*1000)\n",
+ "print \"Hysteresis voltage = %0.1f mV\" %(VH*1000)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The upper threshold voltage = 89.4 mV\n",
+ "The lower threshold voltage = -89.4 mV\n",
+ "Hysteresis voltage = 178.8 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 7.5 : page 327"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "# given data \n",
+ "VSat=13 #in Volt\n",
+ "Vut=2 #in Volt\n",
+ "Vlt=-1 #in Volt\n",
+ "# Assume R1=10 Kohm\n",
+ "R1=10 #in Kohm\n",
+ "R2=((VSat/Vut)-1)*R1 #in Kohm\n",
+ "R3=((-VSat/Vlt)-1)*R1 #in Kohm\n",
+ "print \"Value of R1 = %0.2f kohm\" %R1\n",
+ "print \"Value of R2 = %0.2f kohm\" %R2\n",
+ "print \"Value of R3 = %0.2f kohm\" %R3"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Value of R1 = 10.00 kohm\n",
+ "Value of R2 = 55.00 kohm\n",
+ "Value of R3 = 120.00 kohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Analog_Integrated_Circuits_by__Pramod_Sharma/Chapter09.ipynb b/Analog_Integrated_Circuits_by__Pramod_Sharma/Chapter09.ipynb
new file mode 100755
index 00000000..43811e6a
--- /dev/null
+++ b/Analog_Integrated_Circuits_by__Pramod_Sharma/Chapter09.ipynb
@@ -0,0 +1,404 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:2de7fc45fa4af4f15b7c3a8c570a56406c01593cbaa6b905a79129b1b124ba5a"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter09 : Voltage Regulators"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 9.1 : page 380"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "Iq=5 #in mA\n",
+ "Vo=18 #in volts\n",
+ "Vreg=15 #in volts\n",
+ "R1=Vreg/(10*Iq*10**-3) #in Ohms Iq must be in Amperes here\n",
+ "R2=(Vo-Vreg)/(11*Iq*10**-3) #in Ohms Iq must be in Amperes here\n",
+ "print \"the values of R1 and R2 are : %0.2f & %0.1f ohms\"%(R1,R2) "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "the values of R1 and R2 are : 300.00 & 54.5 ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 9.2 : page 381"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "Vreg=8 #in volts as IC 7808 is given\n",
+ "IL=100 #in mA\n",
+ "IR=100 #in mA\n",
+ "Iq=0 #in mA\n",
+ "RL=50 #in ohms\n",
+ "# let find the value of resistor to deliver required current\n",
+ "R=Vreg/(IR*10**-3) # in ohms so current must be in amperes\n",
+ "print \"Required Resistance = %0.2f ohms \"%R \n",
+ "Vo = (IR*10**-3)*R+(IL*10**-3)*RL \n",
+ "print \"Vo = %0.2f Volts\"%Vo\n",
+ "#considering 2 volt dropout\n",
+ "Vdropout=2 #in volts\n",
+ "VI=Vo+Vdropout \n",
+ "print \"Input voltage, VI = %0.2f Volts \"%VI "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Required Resistance = 80.00 ohms \n",
+ "Vo = 13.00 Volts\n",
+ "Input voltage, VI = 15.00 Volts \n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 9.3 : page 382"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "from __future__ import division\n",
+ "#given data\n",
+ "RL1=100 #in ohms\n",
+ "RL2=8 #in ohms\n",
+ "RL3=1 #in ohms\n",
+ "VEBon=0.7 #in volts\n",
+ "Beta=25 \n",
+ "R=5 #in ohms\n",
+ "#device used 7808 so V=8 volts\n",
+ "V=8 \n",
+ "# part(i) for a laod of 100 ohms\n",
+ "IL1=V/RL1 #in amperes\n",
+ "VacR1=IL1*R \n",
+ "print \"Part(i) : \"\n",
+ "print \"VacR = %0.2f Volts \"%VacR1\n",
+ "print \" Which is less than the given VEBon. Hence Transistor remains OFF.\"\n",
+ "#so Io=IL and Ic=0\n",
+ "Io1=IL1 #in amperes \n",
+ "Ic1=0 \n",
+ "print \"Ic and Io for the 100 ohms load are %0.2f mA & %0.2f Amperes \"%(Io1*1E3,Ic1)\n",
+ "# part(ii) for a laod of 8 ohms\n",
+ "IL2=V/RL2 #in amperes\n",
+ "VacR2=IL2*R \n",
+ "print \"Part(ii) : \"\n",
+ "print \"The voltage across R will be = %0.2f Volts \"%VacR2\n",
+ "print \"Which is greater than the given VEBon.Hence Transistor will be ON.\"\n",
+ "#expression for Io\n",
+ "Io2=((IL2+(Beta*VEBon)/R))/(Beta+1) #in amperes \n",
+ "Ic2=IL2-Io2 \n",
+ "print \"Ic and Io for the 8 ohms load are %0.f & %0.f Amperes \"%(Io2*1e3,Ic2*1e3)\n",
+ "\n",
+ "# part(iii) for a laod of 1 ohms\n",
+ "IL3=V/RL3 #in amperes\n",
+ "VacR3=IL3*R \n",
+ "print \"Part(iii) : \"\n",
+ "print \"VacR = %0.2f Volt \"%VacR3\n",
+ "print \" Which is greater than the given VEBon.Hence Transistor will be ON.\"\n",
+ "#expression for Io\n",
+ "Io3=((IL3+(Beta*VEBon)/R))/(Beta+1) #in amperes \n",
+ "Ic3=IL3-Io3 \n",
+ "print \"Ic and Io for the 1 ohms load are %0.f & %0.3f Amperes \"%(Io3*1e3,Ic3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Part(i) : \n",
+ "VacR = 0.40 Volts \n",
+ " Which is less than the given VEBon. Hence Transistor remains OFF.\n",
+ "Ic and Io for the 100 ohms load are 80.00 mA & 0.00 Amperes \n",
+ "Part(ii) : \n",
+ "The voltage across R will be = 5.00 Volts \n",
+ "Which is greater than the given VEBon.Hence Transistor will be ON.\n",
+ "Ic and Io for the 8 ohms load are 173 & 827 Amperes \n",
+ "Part(iii) : \n",
+ "VacR = 40.00 Volt \n",
+ " Which is greater than the given VEBon.Hence Transistor will be ON.\n",
+ "Ic and Io for the 1 ohms load are 442 & 7.558 Amperes \n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 9.4 : page 384"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "#for the given IC LM317: \n",
+ "Iadj=100 #in micro amperes\n",
+ "Vref=1.25 #in volts\n",
+ "R1=240 #in ohms\n",
+ "#(i) For Vo=2 volts\n",
+ "#on solving equation Vo=Vref(1+R2/R1)+R2*Iadj\n",
+ "Vo=2 #in volts\n",
+ "R2=(Vo-Vref)/((Vref/R1)+Iadj*10**-6) \n",
+ "print \"for Output 2 volts the requires value of resistance R2 = %0.f ohms \"%(R2)\n",
+ "#(i) For Vo=12 volts\n",
+ "Vo1=12 #in volts\n",
+ "#on solving equation Vo=Vref(1+R2/R1)+R2*Iadj\n",
+ "R21=(Vo1-Vref)/(Vref/R1+Iadj*10**-6) \n",
+ "print \"for Output 12 volts the requires value of resistance R2 = %0.2f kohms\"%(R21/1e3)\n",
+ "#use potentiometer for adjustable value\n",
+ "print \"Hence use 3kohm potentiometer to set R2.\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "for Output 2 volts the requires value of resistance R2 = 141 ohms \n",
+ "for Output 12 volts the requires value of resistance R2 = 2.03 kohms\n",
+ "Hence use 3kohm potentiometer to set R2.\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 9.5 : page 385"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "#for the given IC LM317: \n",
+ "Iadj=100 #in micro amperes\n",
+ "Vref=1.25 #in volts\n",
+ "R1=240 #in ohms\n",
+ "#we have output equation Vo=Vref(1+R2/R1)+R2*Iadj\n",
+ "R2min=0 #in ohms\n",
+ "R2max=3000 #in ohms\n",
+ "Vomin=Vref*(1+R2min/R1)+R2min*Iadj*10**-6 #in volts\n",
+ "Vomax=Vref*(1+R2max/R1)+R2max*Iadj*10**-6 #in volts\n",
+ "print \"Minimum output voltage = %0.2f Volts \"%(Vomin)\n",
+ "print \"Maximum output voltage = %0.3f Volts \"%Vomax"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Minimum output voltage = 1.25 Volts \n",
+ "Maximum output voltage = 17.175 Volts \n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 9.6 : page 389"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "#IC 723\n",
+ "Vsense=0.7#in volts\n",
+ "Vo=5 #in volts\n",
+ "Im=50 #in mA\n",
+ "Id=1 #in mA\n",
+ "Vr=7 #in volts\n",
+ "R1=(Vr-Vo)/(Id*10**-3) \n",
+ "R2=Vo/(Id*10**-3) \n",
+ "R3=(R1*R2)/(R1+R2) \n",
+ "Rcl=Vsense/(Im*10**-3) \n",
+ "print \"various resistance values for the circuit is as follows : \"\n",
+ "print \"R1 = %0.2f kohm\"%(R1/1e3)\n",
+ "print \"R2 = %0.2f kohm\"%(R2/1e3)\n",
+ "print \"R3 = %0.2f kohm\"%(R3/1e3)\n",
+ "print \"Rcl = %0.2f ohm\"%Rcl"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "various resistance values for the circuit is as follows : \n",
+ "R1 = 2.00 kohm\n",
+ "R2 = 5.00 kohm\n",
+ "R3 = 1.43 kohm\n",
+ "Rcl = 14.00 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 9.7 : page 390"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "# IC 723\n",
+ "Id=1 #in mA\n",
+ "Vsense=0.7 #in volts\n",
+ "Vo=15 #in volts\n",
+ "Im=50 #in mA\n",
+ "Vr=7 #in volts\n",
+ "R1=(Vo-Vr)/(Id*10**-3) \n",
+ "R2=Vr/(Id*10**-3) \n",
+ "R3=(R1*R2)/(R1+R2) \n",
+ "Rcl=Vsense/(Im*10**-3) \n",
+ "print \"various resistance values for the circuit is as follows : \"\n",
+ "print \"R1 = %0.2f kohm\"%(R1/1e3)\n",
+ "print \"R2 = %0.2f kohm\"%(R2/1e3)\n",
+ "print \"R3 = %0.2f kohm\"%(R3/1e3)\n",
+ "print \"Rcl = %0.2f ohm\"%Rcl"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "various resistance values for the circuit is as follows : \n",
+ "R1 = 8.00 kohm\n",
+ "R2 = 7.00 kohm\n",
+ "R3 = 3.73 kohm\n",
+ "Rcl = 14.00 ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 25
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Exa 9.8 : page 390"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#given data\n",
+ "Im=100 #in mA\n",
+ "Vr=7 #in volts\n",
+ "R2=10 #in kohm\n",
+ "Vsense=0.7 #in volts\n",
+ "#using equation Vo=((R1+R2)/R2)*Vr\n",
+ "#for Vo=10 volts assuming R2=10kohm\n",
+ "Vo=10 #in volts\n",
+ "R1=((Vo*R2)/Vr)-R2#it gives 3R2=7R1 \n",
+ "print \"Part(i) : \"\n",
+ "print \"Value of resistance R1 = %0.2F kohms \"%R1\n",
+ "#now let output voltage is 15 volts\n",
+ "Vo=15 #in volts\n",
+ "R1=((Vo*R2)/Vr)-R2#it gives 3R2=7R1 \n",
+ "print \"Part(ii) : \"\n",
+ "print \"Value of resistance R1 = %0.2f kohms\"%R1\n",
+ "R3=(R1*R2)/(R1+R2) \n",
+ "print \"value of resistance R3 = %0.2f kohms\"%R3\n",
+ "Rcl=Vsense/(Im*10**-3) #in ohms\n",
+ "print \"Value of Rcl = %0.2f ohms\" %Rcl"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Part(i) : \n",
+ "Value of resistance R1 = 4.29 kohms \n",
+ "Part(ii) : \n",
+ "Value of resistance R1 = 11.43 kohms\n",
+ "value of resistance R3 = 5.33 kohms\n",
+ "Value of Rcl = 7.00 ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 29
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/Analog_Integrated_Circuits_by__Pramod_Sharma/README.txt b/Analog_Integrated_Circuits_by__Pramod_Sharma/README.txt
new file mode 100755
index 00000000..ea9a0fb5
--- /dev/null
+++ b/Analog_Integrated_Circuits_by__Pramod_Sharma/README.txt
@@ -0,0 +1,10 @@
+Contributed By: Priyanka Saini
+Course: btech
+College/Institute/Organization: UKTU
+Department/Designation: EN
+Book Title: Analog Integrated Circuits
+Author: Pramod Sharma
+Publisher: S.k. Kataria & Sons, Delhi
+Year of publication: 2009
+Isbn: 81-89757-74-1
+Edition: 2 \ No newline at end of file
diff --git a/Analog_Integrated_Circuits_by__Pramod_Sharma/screenshots/ConstantAB_ch4.png b/Analog_Integrated_Circuits_by__Pramod_Sharma/screenshots/ConstantAB_ch4.png
new file mode 100755
index 00000000..209201ed
--- /dev/null
+++ b/Analog_Integrated_Circuits_by__Pramod_Sharma/screenshots/ConstantAB_ch4.png
Binary files differ
diff --git a/Analog_Integrated_Circuits_by__Pramod_Sharma/screenshots/Res_and_Vol_Ch9.png b/Analog_Integrated_Circuits_by__Pramod_Sharma/screenshots/Res_and_Vol_Ch9.png
new file mode 100755
index 00000000..e573cc39
--- /dev/null
+++ b/Analog_Integrated_Circuits_by__Pramod_Sharma/screenshots/Res_and_Vol_Ch9.png
Binary files differ
diff --git a/Analog_Integrated_Circuits_by__Pramod_Sharma/screenshots/unknownRes_Ch4.png b/Analog_Integrated_Circuits_by__Pramod_Sharma/screenshots/unknownRes_Ch4.png
new file mode 100755
index 00000000..4d7c689c
--- /dev/null
+++ b/Analog_Integrated_Circuits_by__Pramod_Sharma/screenshots/unknownRes_Ch4.png
Binary files differ