summaryrefslogtreecommitdiff
path: root/Electronic_Principles_/Chapter_18_New.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Electronic_Principles_/Chapter_18_New.ipynb')
-rw-r--r--Electronic_Principles_/Chapter_18_New.ipynb641
1 files changed, 641 insertions, 0 deletions
diff --git a/Electronic_Principles_/Chapter_18_New.ipynb b/Electronic_Principles_/Chapter_18_New.ipynb
new file mode 100644
index 00000000..1fbf3765
--- /dev/null
+++ b/Electronic_Principles_/Chapter_18_New.ipynb
@@ -0,0 +1,641 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "CHAPTER 18 OPERATIONAL AMPLIFIERS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18-1, Page 672"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Example 18.1.py\n",
+ "#How much inverting input voltage required to drive the 741C of figure 18-11a into negative saturation?\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vout=13.5 #As per figure 18-7b(V)\n",
+ "Aov=100000 #open loop voltage gain\n",
+ "\n",
+ "#Calculation\n",
+ "V2=Vout/Aov #required input voltage(V)\n",
+ "\n",
+ "#Result\n",
+ "print 'Required input voltage V2 = ',V2*10**6,'uV'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Required input voltage V2 = 135.0 uV\n"
+ ]
+ }
+ ],
+ "prompt_number": 71
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18-2, Page 672"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Example 18.2.py\n",
+ "#What is the CMRR of a 741C when the input frequency is 100KHz?\n",
+ "\n",
+ "#Variable declaration\n",
+ "CMRR_dB=40 #As per figure 18-7a at 100KHz(dB)\n",
+ "\n",
+ "#Calculation\n",
+ "CMRR=10**(CMRR_dB/20)\n",
+ "\n",
+ "#Result\n",
+ "print 'Common-mode rejection ratio = ',CMRR"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Common-mode rejection ratio = 100\n"
+ ]
+ }
+ ],
+ "prompt_number": 76
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18-3, Page 673"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Example 18.3.py\n",
+ "#what is the open loop voltage gain of 741C when input frequency is 1KHz? 10KHZ? 100KHz?\n",
+ "\n",
+ "#Variable declaration / Calculation\n",
+ "\n",
+ "Av1=1000 #Voltage gain as per figure 18-7c for 1KHZ\n",
+ "Av10=100 #Voltage gain as per figure 18-7c for 10KHZ\n",
+ "Av100=10 #Voltage gain as per figure 18-7c for 100KHZ\n",
+ "\n",
+ "#Result\n",
+ "print 'Voltage gain for 1KHZ = ',Av1\n",
+ "print 'Voltage gain for 1KHZ = ',Av10\n",
+ "print 'Voltage gain for 1KHZ = ',Av100"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Voltage gain for 1KHZ = 1000\n",
+ "Voltage gain for 1KHZ = 100\n",
+ "Voltage gain for 1KHZ = 10\n"
+ ]
+ }
+ ],
+ "prompt_number": 77
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18-4, Page 673"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Example 18.4.py\n",
+ "#the output changes to 0.25 V in 0.1us. What is te slew rate of the op amp?\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vout=0.25 #output changes in 0.1us (V)\n",
+ "t=0.1 #time for output change(us) \n",
+ "\n",
+ "#Calculation\n",
+ "SR=Vout/t #slew rate(V/us)\n",
+ "\n",
+ "#Result\n",
+ "print 'Slew rate SR = ',SR,'V/us'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Slew rate SR = 2.5 V/us\n"
+ ]
+ }
+ ],
+ "prompt_number": 79
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18-5, Page 673"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Example 18.5.py\n",
+ "#The LF411A has a slew ratwe of 15 V/us. what is power bandwidth for peak output voltage of 10V?\n",
+ "import math\n",
+ "#Variable declaration\n",
+ "SR=15 #slew rate(V/us)\n",
+ "Vp=10 #Peak output voltage(V)\n",
+ "\n",
+ "#Calculation\n",
+ "fmax=1000*SR/(2*math.pi*Vp) #power bandwidth (KHz) \n",
+ "\n",
+ "#Result\n",
+ "print 'Power bandwidth = ',round(fmax),'KHz'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power bandwidth = 239.0 KHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18-6, Page 673"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Example 18.6.py\n",
+ "#What is the power bandwidth for each of following?\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "SR1=0.5 #Slew rate1(V/us)\n",
+ "SR2=5 #Slew rate2(V/us)\n",
+ "SR3=50 #Slew rate3(V/us)\n",
+ "Vp=8 #peak voltage(V)\n",
+ "\n",
+ "#Calculation\n",
+ "fmax1=1000*SR1/(2*math.pi*Vp) #power bandwidth1 (KHz) \n",
+ "fmax2=1000*SR2/(2*math.pi*Vp) #power bandwidth2 (KHz) \n",
+ "fmax3=SR3/(2*3*math.pi*Vp) #power bandwidth3 (MHz) \n",
+ "\n",
+ "#Result\n",
+ "print 'Power bandwidth1 = ',math.ceil(fmax1),'KHz'\n",
+ "print 'Power bandwidth2 = ',math.ceil(fmax2),'KHz'\n",
+ "print 'Power bandwidth3 = ',math.ceil(fmax3),'MHz'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power bandwidth1 = 10.0 KHz\n",
+ "Power bandwidth2 = 100.0 KHz\n",
+ "Power bandwidth3 = 1.0 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18-7, Page 678"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Example 18.7.py\n",
+ "#What are closed-loop voltage gain and bandwidth? what is output voltage at 1KHz & 1MHz?\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vin=10 #input voltage(mV)\n",
+ "Rf=75 #feedback path resistance Rf (KOhm)\n",
+ "R1=1.5 #inverting input resistance R1(KOhm)\n",
+ "Funity=1 #Funity (MHz)\n",
+ "\n",
+ "#Calculation\n",
+ "Av_CL=-Rf/R1 #closed loop voltage gain\n",
+ "f2_CL1=Funity/-Av_CL #closed loop bandwidth1(KHz)\n",
+ "Vout1=Av_CL*Vin #output voltage1(mV)\n",
+ "Vout2=-Vin #output voltage2(mV)\n",
+ "\n",
+ "#Result\n",
+ "print 'Output voltage for 1KHz = ',Vout1,'mVpp'\n",
+ "print 'Output voltage for 1MHz = ',Vout2,'mVpp'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output voltage for 1KHz = -500.0 mVpp\n",
+ "Output voltage for 1MHz = -10 mVpp\n"
+ ]
+ }
+ ],
+ "prompt_number": 90
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18-8, Page 679"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Example 18.8.py\n",
+ "#What is output voltage in figure 18-17 when Vin=0?\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vin=10 #input voltage(mV)\n",
+ "Rf=75 #feedback path resistance Rf (KOhm)\n",
+ "R1=1.5 #inverting input resistance R1(KOhm)\n",
+ "Iinb=80*10**-9 #bias current(A)\n",
+ "Iino =20*10**-9 #Iin(off) (A) \n",
+ "Vino=2.0 #Vin(off) (mV)\n",
+ "Av=50 #voltage gain \n",
+ "RB1=0 #resistance at noninverting input(KOhm) \n",
+ "\n",
+ "#Calculation\n",
+ "RB2=R1*Rf/(Rf+R1) #thevenin resistance at inverting input(KOhm) \n",
+ "V1err=(RB1-RB2)*Iinb*10**6 #dc error input1 (mV)\n",
+ "V2err=(RB1+RB2)*(Iino/2)*10**6 #dc error input2 (mV)\n",
+ "V3err=Vino #dc error input3 (mV)\n",
+ "Verror=Av*(abs(V1err)+V2err+V3err) #output error voltage(mV)\n",
+ "\n",
+ "#Result\n",
+ "print 'output error voltage Verror = ',round(Verror,2),'mV'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output error voltage Verror = 106.62 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18-9, Page 679"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Example 18.9.py\n",
+ "#Iin(bias)=500nA, Iin(off) =200 nA. and Vin(off)= 6mV. \n",
+ "#Calculate output voltage for Vin=0.\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vin=10 #input voltage(mV)\n",
+ "Rf=75 #feedback path resistance Rf (KOhm)\n",
+ "R1=1.5 #inverting input resistance R1(KOhm)\n",
+ "Iinb=500*10**-9 #bias current(A)\n",
+ "Iino =200*10**-9 #Iin(off) (A) \n",
+ "Vino=6.0 #Vin(off) (mV)\n",
+ "Av=50 #voltage gain \n",
+ "RB1=0 #resistance at noninverting input(KOhm) \n",
+ "\n",
+ "#Calculation\n",
+ "RB2=R1*Rf/(Rf+R1) #thevenin resistance at inverting input(KOhm) \n",
+ "V1err=(RB1-RB2)*Iinb*10**6 #dc error input1 (mV)\n",
+ "V2err=(RB1+RB2)*(Iino/2)*10**6 #dc error input2 (mV)\n",
+ "V3err=Vino #dc error input3 (mV)\n",
+ "Verror=Av*(abs(V1err)+V2err+V3err) #output error voltage(mV)\n",
+ "\n",
+ "#Result\n",
+ "print 'output error voltage Verror = ',round(Verror,2),'mV'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output error voltage Verror = 344.12 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18-10, Page 683"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Example 18.10.py\n",
+ "#In figure 18-22a, What is closed-loop voltage gain, bandwidth and output voltage at 250KHz?\n",
+ "\n",
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vin=50 #input voltage(mV)\n",
+ "Rf=3.9*10**3 #feedback path resistance Rf (Ohm)\n",
+ "R1=100 #inverting input resistance R1(Ohm)\n",
+ "Funity=1*10**6 #Funity (Hz)\n",
+ "\n",
+ "#Calculation\n",
+ "Av_CL=1+(Rf/R1) #closed loop voltage gain\n",
+ "f2_CL1=Funity/Av_CL #closed loop bandwidth1(KHz)\n",
+ "Av_CL1=math.ceil(10**(12/20.0)) #Av for 12 dB at 250 KHz \n",
+ "Vout=Av_CL1*Vin #output voltage(mV)\n",
+ "\n",
+ "#Result\n",
+ "print 'Output voltage for 250KHz = ',Vout,'mVpp'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output voltage for 250KHz = 200.0 mVpp\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18-11, Page 684"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Example 18.11.py\n",
+ "#Iin(bias)=500nA, Iin(off) =200 nA. and Vin(off)= 6mV. \n",
+ "#What is the output voltage?\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vin=10 #input voltage(mV)\n",
+ "Rf=3.9*10**3 #feedback path resistance Rf (Ohm)\n",
+ "R1=100 #inverting input resistance R1(Ohm)\n",
+ "Iinb=500*10**-9 #bias current(A)\n",
+ "Iino =200*10**-9 #Iin(off) (A) \n",
+ "Vino=6.0*10**-3 #Vin(off) (V)\n",
+ "Av=40 #voltage gain \n",
+ "RB1=0 #resistance at noninverting input(KOhm) \n",
+ "\n",
+ "#Calculation\n",
+ "RB2=R1*Rf/(Rf+R1) #thevenin resistance at inverting input(KOhm) \n",
+ "V1err=(RB1-RB2)*Iinb #dc error input1 (mV)\n",
+ "V2err=(RB1+RB2)*(Iino/2) #dc error input2 (mV)\n",
+ "V3err=Vino #dc error input3 (mV)\n",
+ "Verror=Av*(abs(V1err)+V2err+V3err) #output error voltage(mV)\n",
+ "\n",
+ "#Result\n",
+ "print 'output error voltage Verror = ',Verror*1000,'mV'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "output error voltage Verror = 242.34 mV\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18-12, Page 687"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Example 18.12.py\n",
+ "#Three audio signals drive the summing amplifier of figure 18-25. What is the ac output voltage?\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vin1=100*10**-3 #input voltage1(V)\n",
+ "Vin2=200*10**-3 #input voltage2(V)\n",
+ "Vin3=300*10**-3 #input voltage3(V)\n",
+ "Rf=100.0 #feedback path resistance Rf (KOhm)\n",
+ "R1=20.0 #inverting input resistance R1(KOhm)\n",
+ "R2=10.0 #inverting input resistance R2(KOhm)\n",
+ "R3=50.0 #inverting input resistance R3(KOhm)\n",
+ "\n",
+ "#Calculation\n",
+ "Av1_CL=-Rf/R1 #closed loop voltage gain\n",
+ "Av2_CL=-Rf/R1 #closed loop voltage gain\n",
+ "Av3_CL=-Rf/R1 #closed loop voltage gain\n",
+ "Vout=Av1_CL*Vin1+Av2_CL*Vin2+Av3_CL*Vin3 #output voltage1(mV)\n",
+ "RB2=(R1**-1+R2**-1+R3**-1+Rf**-1)**-1 #thevenin resistance at inverting input(KOhm) \n",
+ "\n",
+ "#Result\n",
+ "print 'Output voltage = ',Vout,'Vpp'\n",
+ "print 'thevenin resistance at inverting input RB2 = ',round(RB2,2),'KOhm'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output voltage = -3.0 Vpp\n",
+ "thevenin resistance at inverting input RB2 = 5.56 KOhm\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18-13, Page 688"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Example 18.13.py\n",
+ "#An ac voltage source of 10 mVpp with an internal resistance of 100 KOhm drives voltage follower. \n",
+ "#RL is 1 Ohm. Find output voltage & bandwidth.\n",
+ "\n",
+ "#Variable declaration\n",
+ "Vin=10 #ac voltage source (mVpp)\n",
+ "Av=1 #voltage gain\n",
+ "Funity=1 #unity frequency (MHz) \n",
+ "\n",
+ "#Calculation\n",
+ "Vout=Av*Vin #output voltage(V) \n",
+ "f2_CL=Funity #bandwidth(MHz) \n",
+ "\n",
+ "#Result \n",
+ "print 'Output voltage = ',Vout,'mVpp'\n",
+ "print 'Bandwidth f2(CL) = ',f2_CL,'MHz'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Output voltage = 10 mVpp\n",
+ "Bandwidth f2(CL) = 1 MHz\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18-14, Page 688"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Example 18.14.py\n",
+ "#In voltage follower of figure 18-26a, the output voltage across the 1 Ohm load is 9.99 mV. \n",
+ "#calculate closed loop output impedance.\n",
+ "\n",
+ "#Variable declaration\n",
+ "RL=1.0 #load resistance(Ohm)\n",
+ "Vout=9.99 #load voltage(mV)\n",
+ "Vz=0.01 #voltage across Zout(CL) (mV)\n",
+ "\n",
+ "#Calculation\n",
+ "iout=Vout/RL #load current(mA)\n",
+ "Zout_CL=Vz/iout #output impedance(Ohm)\n",
+ "\n",
+ "#Result\n",
+ "print 'Load current iout = ',iout,'mA'\n",
+ "print 'closed loop output impedance Zout(CL) = ',round(Zout_CL,3),'Ohm'"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Load current iout = 9.99 mA\n",
+ "closed loop output impedance Zout(CL) = 0.001 Ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file