diff options
author | Trupti Kini | 2016-05-07 23:30:29 +0600 |
---|---|---|
committer | Trupti Kini | 2016-05-07 23:30:29 +0600 |
commit | cf1d6e42383334d18a21bc297720bf52fca2f488 (patch) | |
tree | 73d5f1970acba799dfa8b1cf05300b4b554cba8a /Electronics_Circuits_and_Systems_by_Y._N._Bapat | |
parent | 4a32f089d7db0bd3cba8169c194b9e01b5b56d75 (diff) | |
download | Python-Textbook-Companions-cf1d6e42383334d18a21bc297720bf52fca2f488.tar.gz Python-Textbook-Companions-cf1d6e42383334d18a21bc297720bf52fca2f488.tar.bz2 Python-Textbook-Companions-cf1d6e42383334d18a21bc297720bf52fca2f488.zip |
Added(A)/Deleted(D) following books
A Analog_Electronics_by_U._A._Bakshi_And_A._P._Godse/chapter1.ipynb
A Analog_Electronics_by_U._A._Bakshi_And_A._P._Godse/chapter2.ipynb
A Analog_Electronics_by_U._A._Bakshi_And_A._P._Godse/chapter3.ipynb
A Analog_Electronics_by_U._A._Bakshi_And_A._P._Godse/chapter4.ipynb
A Analog_Electronics_by_U._A._Bakshi_And_A._P._Godse/chapter5.ipynb
A Analog_Electronics_by_U._A._Bakshi_And_A._P._Godse/chapter6.ipynb
A Analog_Electronics_by_U._A._Bakshi_And_A._P._Godse/screenshots/CloseLoopVoltageGain3-5.png
A Analog_Electronics_by_U._A._Bakshi_And_A._P._Godse/screenshots/ValueOfResistance3_9.png
A Analog_Electronics_by_U._A._Bakshi_And_A._P._Godse/screenshots/requiredResistance3_8.png
A Electrical_Engineering_Fundamentals_by__Del_Toro_Vincent_/CHAPTER01_2.ipynb
A Electrical_Engineering_Fundamentals_by__Del_Toro_Vincent_/CHAPTER02_2.ipynb
A Electrical_Engineering_Fundamentals_by__Del_Toro_Vincent_/CHAPTER03_2.ipynb
A Electrical_Engineering_Fundamentals_by__Del_Toro_Vincent_/CHAPTER04_2.ipynb
A Electrical_Engineering_Fundamentals_by__Del_Toro_Vincent_/CHAPTER07_2.ipynb
A Electrical_Engineering_Fundamentals_by__Del_Toro_Vincent_/CHAPTER09_2.ipynb
A Electrical_Engineering_Fundamentals_by__Del_Toro_Vincent_/CHAPTER11_2.ipynb
A Electrical_Engineering_Fundamentals_by__Del_Toro_Vincent_/CHAPTER15_2.ipynb
A Electrical_Engineering_Fundamentals_by__Del_Toro_Vincent_/CHAPTER16_2.ipynb
A Electrical_Engineering_Fundamentals_by__Del_Toro_Vincent_/CHAPTER18_2.ipynb
A Electrical_Engineering_Fundamentals_by__Del_Toro_Vincent_/CHAPTER19_2.ipynb
A Electrical_Engineering_Fundamentals_by__Del_Toro_Vincent_/CHAPTER20_2.ipynb
A Electrical_Engineering_Fundamentals_by__Del_Toro_Vincent_/CHAPTER23_2.ipynb
A Electrical_Engineering_Fundamentals_by__Del_Toro_Vincent_/CHAPTER24_2.ipynb
A Electrical_Engineering_Fundamentals_by__Del_Toro_Vincent_/screenshots/Capture02_2.png
A Electrical_Engineering_Fundamentals_by__Del_Toro_Vincent_/screenshots/Capture04_2.png
A Electrical_Engineering_Fundamentals_by__Del_Toro_Vincent_/screenshots/Capture20_2.png
A Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch1.ipynb
A Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch10.ipynb
A Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch11.ipynb
A Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch12.ipynb
A Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch13.ipynb
A Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch14.ipynb
A Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch2.ipynb
A Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch3.ipynb
A Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch4.ipynb
A Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch5.ipynb
A Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch6.ipynb
A Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch7.ipynb
A Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch8.ipynb
A Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch9.ipynb
A Electronics_Circuits_and_Systems_by_Y._N._Bapat/screenshots/AntilogOpamp13.png
A Electronics_Circuits_and_Systems_by_Y._N._Bapat/screenshots/LogOpamp13.png
A Electronics_Circuits_and_Systems_by_Y._N._Bapat/screenshots/OutPutLogAmp13.png
A Manufacturing_Engineering_&_Technology_by__S._Kalpakjian_and_S._R._Schmid/CHAPTER10_10.ipynb
A Manufacturing_Engineering_&_Technology_by__S._Kalpakjian_and_S._R._Schmid/CHAPTER10_11.ipynb
A Manufacturing_Engineering_&_Technology_by__S._Kalpakjian_and_S._R._Schmid/CHAPTER13_10.ipynb
A Manufacturing_Engineering_&_Technology_by__S._Kalpakjian_and_S._R._Schmid/CHAPTER13_11.ipynb
A Manufacturing_Engineering_&_Technology_by__S._Kalpakjian_and_S._R._Schmid/CHAPTER14_10.ipynb
A Manufacturing_Engineering_&_Technology_by__S._Kalpakjian_and_S._R._Schmid/CHAPTER14_11.ipynb
A Manufacturing_Engineering_&_Technology_by__S._Kalpakjian_and_S._R._Schmid/CHAPTER15_10.ipynb
A Manufacturing_Engineering_&_Technology_by__S._Kalpakjian_and_S._R._Schmid/CHAPTER15_11.ipynb
A Manufacturing_Engineering_&_Technology_by__S._Kalpakjian_and_S._R._Schmid/CHAPTER16_10.ipynb
A Manufacturing_Engineering_&_Technology_by__S._Kalpakjian_and_S._R._Schmid/CHAPTER16_11.ipynb
A Manufacturing_Engineering_&_Technology_by__S._Kalpakjian_and_S._R._Schmid/CHAPTER17_10.ipynb
A Manufacturing_Engineering_&_Technology_by__S._Kalpakjian_and_S._R._Schmid/CHAPTER17_9.ipynb
A Manufacturing_Engineering_&_Technology_by__S._Kalpakjian_and_S._R._Schmid/CHAPTER18_10.ipynb
A Manufacturing_Engineering_&_Technology_by__S._Kalpakjian_and_S._R._Schmid/CHAPTER18_11.ipynb
A Manufacturing_Engineering_&_Technology_by__S._Kalpakjian_and_S._R._Schmid/CHAPTER20_10.ipynb
A Manufacturing_Engineering_&_Technology_by__S._Kalpakjian_and_S._R._Schmid/CHAPTER20_9.ipynb
A Manufacturing_Engineering_&_Technology_by__S._Kalpakjian_and_S._R._Schmid/CHAPTER22_10.ipynb
A Manufacturing_Engineering_&_Technology_by__S._Kalpakjian_and_S._R._Schmid/CHAPTER22_9.ipynb
A Manufacturing_Engineering_&_Technology_by__S._Kalpakjian_and_S._R._Schmid/CHAPTER23_10.ipynb
A Manufacturing_Engineering_&_Technology_by__S._Kalpakjian_and_S._R._Schmid/CHAPTER23_11.ipynb
A Manufacturing_Engineering_&_Technology_by__S._Kalpakjian_and_S._R._Schmid/CHAPTER25_10.ipynb
A Manufacturing_Engineering_&_Technology_by__S._Kalpakjian_and_S._R._Schmid/CHAPTER25_9.ipynb
A Manufacturing_Engineering_&_Technology_by__S._Kalpakjian_and_S._R._Schmid/CHAPTER28_10.ipynb
A Manufacturing_Engineering_&_Technology_by__S._Kalpakjian_and_S._R._Schmid/CHAPTER28_9.ipynb
A Manufacturing_Engineering_&_Technology_by__S._Kalpakjian_and_S._R._Schmid/CHAPTER2_10.ipynb
A Manufacturing_Engineering_&_Technology_by__S._Kalpakjian_and_S._R._Schmid/CHAPTER2_11.ipynb
A Manufacturing_Engineering_&_Technology_by__S._Kalpakjian_and_S._R._Schmid/CHAPTER32_10.ipynb
A Manufacturing_Engineering_&_Technology_by__S._Kalpakjian_and_S._R._Schmid/CHAPTER32_9.ipynb
A Manufacturing_Engineering_&_Technology_by__S._Kalpakjian_and_S._R._Schmid/CHAPTER36_10.ipynb
A Manufacturing_Engineering_&_Technology_by__S._Kalpakjian_and_S._R._Schmid/CHAPTER36_11.ipynb
A Manufacturing_Engineering_&_Technology_by__S._Kalpakjian_and_S._R._Schmid/CHAPTER9_10.ipynb
A Manufacturing_Engineering_&_Technology_by__S._Kalpakjian_and_S._R._Schmid/CHAPTER9_11.ipynb
A Strength_Of_Materials_by_S_S_Bhavikatti/chapter_no.10_3.ipynb
A Strength_Of_Materials_by_S_S_Bhavikatti/chapter_no.1_3.ipynb
A Strength_Of_Materials_by_S_S_Bhavikatti/chapter_no.2_3.ipynb
A Strength_Of_Materials_by_S_S_Bhavikatti/chapter_no.3_3.ipynb
A Strength_Of_Materials_by_S_S_Bhavikatti/chapter_no.4_3.ipynb
A Strength_Of_Materials_by_S_S_Bhavikatti/chapter_no.5_3.ipynb
A Strength_Of_Materials_by_S_S_Bhavikatti/chapter_no.6_3.ipynb
A Strength_Of_Materials_by_S_S_Bhavikatti/chapter_no.7_3.ipynb
A Strength_Of_Materials_by_S_S_Bhavikatti/chapter_no.8_3.ipynb
A Strength_Of_Materials_by_S_S_Bhavikatti/chapter_no.9_3.ipynb
A Strength_Of_Materials_by_S_S_Bhavikatti/screenshots/B.M.D_1_2.JPG
A Strength_Of_Materials_by_S_S_Bhavikatti/screenshots/S.F.D_1_2.jpg
A Strength_Of_Materials_by_S_S_Bhavikatti/screenshots/S.F.D_2_2.jpg
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/Chapter10_2.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/Chapter28_2.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/Chapter29_2.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter11_2.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter12_2.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter13_2.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter14_2.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter15_2.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter16_2.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter17_2.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter18_2.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter19_2.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter1_2.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter20_2.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter21_2.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter22_2.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter23_2.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter24_2.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter25_2.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter26_2.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter27_2.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter2_2.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter3_2.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter4_2.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter5_2.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter6_2.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter7_2.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter8_2.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/chapter9_2.ipynb
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/screenshots/image11_1.png
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/screenshots/image12_1.png
A principle_of_physics_by_V.K.MEHTA_,_ROHIT_MEHTA_/screenshots/image13_1.png
Diffstat (limited to 'Electronics_Circuits_and_Systems_by_Y._N._Bapat')
17 files changed, 7032 insertions, 0 deletions
diff --git a/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch1.ipynb b/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch1.ipynb new file mode 100644 index 00000000..61004ac2 --- /dev/null +++ b/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch1.ipynb @@ -0,0 +1,516 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter1 - Vaccum Tubes and Semiconductors" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1.1 Page No. : 6" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "VAK2 = 300.00 volts\n", + "VAK1 = 170.00 volts\n", + "IA2 = 0.0020 ampere\n", + "IA1 = 0.0000 ampere\n", + "resistance,rP =(VAK2-VAK1)/(IA2-IA1)=65000.00 ohm\n", + "VGK2 = -2.50 volts\n", + "VGK1 = -1.50 volts\n", + "VAK3 = 200.00 volts\n", + "amplification factor,u =(VAK2-VAK1)/(VGK2-VGK1)=-100.00 unitless \n", + "IA4 = 0.0022 ampere\n", + "IA1 = 0.0005 ampere\n", + "transconductance,gm =(IAK4-IAK3)/(VGK2-VGK3)=-0.00 ampere/volt \n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "#refer to fig 1.2(c) and given d.c operating points VGKQ=-2 V,VAKQ=250 V,IAQ=-1.2 mA\n", + "VAK2=300\n", + "print \"VAK2 = %0.2f\"%(VAK2),\" volts\" # value of anode voltage2 \n", + "VAK1=170\n", + "print \"VAK1 = %0.2f\"%(VAK1),\" volts\" # value of anode voltage1 \n", + "IA2=2*10**(-3)\n", + "print \"IA2 = %0.4f\"%(IA2),\" ampere\" # value of anode current2\n", + "IA1=0*10**(-3)\n", + "print \"IA1 = %0.4f\"%(IA1),\" ampere\" # value of anode current1\n", + "rP=(VAK2-VAK1)/(IA2-IA1)#anode resistance at VGK=VGKQ\n", + "print \"resistance,rP =(VAK2-VAK1)/(IA2-IA1)=%0.2f\"%(rP),\" ohm\" #calculation\n", + "VGK2=-2.5\n", + "print \"VGK2 = %0.2f\"%(VGK2),\" volts\" # value of grid voltage2 \n", + "VGK3=-1.5\n", + "print \"VGK1 = %0.2f\"%(VGK3),\" volts\" # value of grid voltage1\n", + "VAK3=200\n", + "print \"VAK3 = %0.2f\"%(VAK3),\" volts\" # value of anode voltage1 \n", + "u=(VAK2-VAK3)/(VGK2-VGK3)#amplification factor at IA=IAQ\n", + "print \"amplification factor,u =(VAK2-VAK1)/(VGK2-VGK1)=%0.2f\"%(u),\" unitless \" #calculation\n", + "IA4=2.2*10**(-3)\n", + "print \"IA4 = %0.4f\"%(IA4),\" ampere\" # value of anode current4\n", + "IA3=0.5*10**(-3)\n", + "print \"IA1 = %0.4f\"%(IA3),\" ampere\" # value of anode current1\n", + "gm=(IA4-IA3)/(VGK2-VGK3)# transconductance at VAK=VAKQ\n", + "print \"transconductance,gm =(IAK4-IAK3)/(VGK2-VGK3)=%0.2f\"%(gm),\" ampere/volt \" #calculation\n", + "#mistake of negative sign for answers for u(amplification factor) and gm(transconductance)in book" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1_2 Page No. : 10" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "d = 0.01 metre\n", + "l = 0.02 metre\n", + "L = 0.20 metre\n", + "Va = 2000.00 volts\n", + "Vd = 100.00 volts\n", + "m = 9.11e-31 Kg\n", + "q = 1.60e-19 coulomb\n", + "horizontal beam velocity,Vx =(2*Va*q/m)**(0.5) metre/second\n", + "horizontal beam velocity,Vx =(2*Va*q/m)**(0.5)= 2.65e+07 metre/second\n", + "transit time,t1 =(l/Vx) second\n", + "transit time,t1 =(l/Vx)= 7.55e-10 second\n", + "vertical beam velocity,Vy =(q*Vd*l/d*m*Vx) metre/second\n", + "vertical beam velocity,Vy =(q*Vd*l/d*m*Vx)= 2.65e+06 metre/second\n", + "vertical displacement,D =((l*L*Vd)/(2*d*Va) metre\n", + "vertical displacement,D =((l*L*Vd)/(2*d*Va)=0.02 metre\n", + "sensitivity of CRT,S =(0.5*l*L)/(d*Va) metre/volt\n", + "sensitivity of CRT,S =(0.5*l*L)/(d*Va)=2.0e-04 metre/volt\n" + ] + } + ], + "source": [ + "d=0.5*10**(-2)\n", + "print \"d = %0.2f\"%(d),\"metre\" #initializing value of distance b/w plates\n", + "l=2*10**(-2)\n", + "print \"l = %0.2f\"%(l),\"metre\" #initializing value of length of plates\n", + "L=20*10**(-2)\n", + "print \"L = %0.2f\"%(L),\"metre\" #initializing value of distance b/w centre of plates and screen\n", + "Va=2000\n", + "print \"Va = %0.2f\"%(Va),\"volts\" ##initializing value ofanode voltage\n", + "Vd=100\n", + "print \"Vd = %0.2f\"%(Vd),\"volts\" #initializing value of deflecting voltage\n", + "m=9.11*10**(-31)\n", + "print \"m = %0.2e\"%(m),\"Kg\" #mass of electron\n", + "q=1.6*10**(-19)\n", + "print \"q = %0.2e\"%(q),\"coulomb\" #charge on an electron\n", + "print \"horizontal beam velocity,Vx =(2*Va*q/m)**(0.5) metre/second\" #formula\n", + "Vx =(2*Va*q/m)**(0.5)\n", + "print \"horizontal beam velocity,Vx =(2*Va*q/m)**(0.5)= %0.2e\"%(Vx),\" metre/second\" #calculation\n", + "print \"transit time,t1 =(l/Vx) second\" #formula\n", + "t1=(l/Vx)\n", + "print \"transit time,t1 =(l/Vx)= %0.2e\"%(t1),\" second\" #calculation\n", + "print \"vertical beam velocity,Vy =(q*Vd*l/d*m*Vx) metre/second\" #formula\n", + "Vy=((q*Vd*l)/(d*m*Vx))\n", + "print \"vertical beam velocity,Vy =(q*Vd*l/d*m*Vx)= %0.2e\"%(Vy),\" metre/second\" #calculation\n", + "print \"vertical displacement,D =((l*L*Vd)/(2*d*Va) metre\" #formula\n", + "D =(l*L*Vd)/(2*d*Va)\n", + "print \"vertical displacement,D =((l*L*Vd)/(2*d*Va)=%0.2f\"%(D),\" metre\" #calculation\n", + "print \"sensitivity of CRT,S =(0.5*l*L)/(d*Va) metre/volt\" #formula\n", + "S =(0.5*l*L)/(d*Va)\n", + "print \"sensitivity of CRT,S =(0.5*l*L)/(d*Va)=%0.1e\"%(S),\" metre/volt\" #calculation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1-3 Page No. : 11" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "m = 9.11e-31 Kg\n", + "q = 1.60e-19 coulomb\n", + "B = 1.50e-03 wb/m**2\n", + "l = 0.05 metre\n", + "L = 0.30 metre\n", + "Va = 10000.00 volts\n", + "horizontal beam velocity,Vx =(2*Va*q/m)**(0.5) metre/second\n", + "horizontal beam velocity,Vx =(2*Va*q/m)**(0.5)= 5.93e+07 metre/second\n", + "radius,r =(m*Vx)/(B*q) metre\n", + "radius,r =(m*Vx)/(B*q)= 0.22 metre\n", + "deflection,D =(L*l)/r) metre\n", + "deflection,D =(L*l)/r)=0.07 metre\n" + ] + } + ], + "source": [ + "m=9.11*10**(-31)\n", + "print \"m = %0.2e\"%(m),\" Kg\" #mass of electron\n", + "q=1.6*10**(-19)\n", + "print \"q = %0.2e\"%(q),\" coulomb\" #charge on an electron\n", + "B=1.5*10**(-3)\n", + "print \"B = %0.2e\"%(B)+ \" wb/m**2\" #initializing value of magnetic field\n", + "l=5*10**(-2)\n", + "print \"l = %0.2f\"%(l),\" metre\" #initializing axial length of magnetic field\n", + "L=30*10**(-2)\n", + "print \"L = %0.2f\"%(L),\" metre\" #initializing value of distance of screen from centre of magnetic field\n", + "Va=10000\n", + "print \"Va = %0.2f\"%(Va),\" volts\" ##initializing value of anode voltage\n", + "print \"horizontal beam velocity,Vx =(2*Va*q/m)**(0.5) metre/second\" #formula\n", + "Vx =(2*Va*q/m)**(0.5)\n", + "print \"horizontal beam velocity,Vx =(2*Va*q/m)**(0.5)= %0.2e\"%(Vx),\" metre/second\" #calculation\n", + "print \"radius,r =(m*Vx)/(B*q) metre\" #formula\n", + "r =(m*Vx)/(B*q)\n", + "print \"radius,r =(m*Vx)/(B*q)= %0.2f\"%(r),\" metre\" #calculation\n", + "print \"deflection,D =(L*l)/r) metre\" #formula\n", + "D =(L*l)/r\n", + "print \"deflection,D =(L*l)/r)=%0.2f\"%(D),\" metre\" #calculation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example -1.4 Page No. : 12" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "q = 1.60e-19 coulomb\n", + "I = 10.00 Ampere\n", + "radius,r = 64.25 mils\n", + "r1 = 0.00 metre\n", + "n = 5.00e+28 electrons/m**3\n", + "cross sectional area,A =(pi*r1**2)= 8.37e-06 square metre\n", + "drift velocity,v=(I)/(A*q*n)=1.49e-04 metre/second\n" + ] + } + ], + "source": [ + "from math import pi\n", + "q=1.6*10**(-19)\n", + "print \"q = %0.2e\"%(q),\"coulomb\" #charge on an electron\n", + "I=10\n", + "print \"I = %0.2f\"%(I),\"Ampere\" #initializing value of current\n", + "r=64.25\n", + "print \"radius,r = %0.2f\"%(r),\" mils\" #initializing value of radius of wire\n", + "def mils2metres(mils):\n", + " metres=(mils*2.54)/(1000*100)\n", + " return metres\n", + "r1=mils2metres(r) \n", + "print \"r1 = %0.2f\"%(r1),\" metre\"\n", + "n=5*10**(28)\n", + "print \"n = %0.2e\"%(n),\" electrons/m**3\" # electrons concentration in copper\n", + "A=(pi*r1**2) #formulae \n", + "print \"cross sectional area,A =(pi*r1**2)= %0.2e\"%(A),\" square metre\" #calculation\n", + "v=(I)/(A*q*n)#formulae(I=A*q*n*v)\n", + "print \"drift velocity,v=(I)/(A*q*n)=%0.2e\"%(v),\" metre/second\" #calculation\n", + "\n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1_5 Page No. : 12" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cross sectional area,A =1.00e-05 merer square\n", + "resitivity(rho),p1 =1.00e-04 ohm-m\n", + "resitivity(rho),p2 =1000.00 ohm-m\n", + "resitivity(rho),p3 =1.00e+10 ohm-m\n", + "conductor length,l =0.01 metre\n", + " resistance for copper,R = p1*l/A = 0.10 ohm\n", + " resistance for silicon,R = p2*l/A = 1.00e+06 ohm\n", + " resistance for glass,R = p3*l/A = 1.00e+13 ohm\n" + ] + } + ], + "source": [ + "A=10*10**(-6)\n", + "p1=10**(-4)\n", + "p2=10**(3)\n", + "p3=10**(10)\n", + "l=1*10**(-2)# #initializations\n", + "print \"cross sectional area,A =%0.2e\"%(A),\"merer square\" \n", + "print \"resitivity(rho),p1 =%0.2e\"%(p1),\" ohm-m\"\n", + "print \"resitivity(rho),p2 =%0.2f\"%(p2),\" ohm-m\"\n", + "print \"resitivity(rho),p3 =%0.2e\"%(p3),\" ohm-m\"\n", + "print \"conductor length,l =%0.2f\"%(l),\" metre\"\n", + "print \" resistance for copper,R = p1*l/A = %0.2f\"%(p1*l/A),\"ohm\" #calculations for copper\n", + "print \" resistance for silicon,R = p2*l/A = %0.2e\"%(p2*l/A),\"ohm\" #calculations for silicon\n", + "print \" resistance for glass,R = p3*l/A = %0.2e\"%(p3*l/A),\"ohm\" #calculations for glass" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1_6 Page No. : 16" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "I = 1.00e-06 Ampere\n", + "intrinsic charge concentration,ni = 1.45e+10 /centimetre cube\n", + "silicon atoms concntration, nV = 5.00e+22 /centimetre cube \n", + "electron mobility,un = 1500.00 cm.sq/V-s\n", + "hole mobility,up = 475.00 cm.sq/V-s\n", + "temperature,T = 300.00 K\n", + "q = 1.59e-19 coulomb\n", + "cross sectional area,A =2.50e-05 cm square\n", + "conductor length,l =0.01 cm\n", + "relative concentration,N =nV/ni= 3.45e+12 silicon atoms per electron -hole pair\n", + "intrinsic conductivityi,sigma =(1.59*10**(-19)*(1.45*10**10)*(1500+0475))= 0.00 (ohm-cm)**-1\n", + "resitivity(rho),pi =(1/sigma)=2.20e+05 ohm-cm\n", + " resistance for silicon,R =((2.22*10**5*0.5)/0.000025) = 4.44e+09 ohm\n", + " voltage drop,V =I*R = 4440.00 V\n" + ] + } + ], + "source": [ + "ni = 1.45*10**10 #initializations\n", + "nV = 5*10**22 #initializations\n", + "un = 1500 #initializations\n", + "up = 475#initializations\n", + "T = 300 #initializations\n", + "I=10**(-6)\n", + "print \"I = %0.2e\"%(I),\"Ampere\" #initializing value of current\n", + "A=(50*10**(-4))**2# l=0.5 #initializations\n", + "q=1.59*10**(-19) #charge on an electron\n", + "print \"intrinsic charge concentration,ni = %0.2e\"%(ni),\" /centimetre cube\"\n", + "print \"silicon atoms concntration, nV = %0.2e\"%(nV),\" /centimetre cube \"\n", + "\n", + "print \"electron mobility,un = %0.2f\"%(un),\" cm.sq/V-s\"\n", + "print \"hole mobility,up = %0.2f\"%(up),\"cm.sq/V-s\"\n", + "print \"temperature,T = %0.2f\"%(T),\"K\"\n", + "print \"q = %0.2e\"%(q),\"coulomb\" #charge on an electron\n", + "print \"cross sectional area,A =%0.2e\"%(A),\"cm square\" \n", + "print \"conductor length,l =%0.2f\"%(l),\"cm\"\n", + "N=nV/ni\n", + "print \"relative concentration,N =nV/ni= %0.2e\"%(N),\" silicon atoms per electron -hole pair\" #calculation\n", + "sigma=(1.59*10**(-19)*(1.45*10**10)*(1500+475))\n", + "print \"intrinsic conductivityi,sigma =(1.59*10**(-19)*(1.45*10**10)*(1500+0475))= %0.2f\"%(sigma),\" (ohm-cm)**-1\" #calculation\n", + "pi =(1/sigma)#formulae\n", + "print \"resitivity(rho),pi =(1/sigma)=%0.2e\"%(pi),\" ohm-cm\" #calculation\n", + "R=(2.22*10**5*0.5)/0.000025\n", + "print \" resistance for silicon,R =((2.22*10**5*0.5)/0.000025) = %0.2e\"%(R),\" ohm\" #calculations for silicon\n", + "V=I*R\n", + "print \" voltage drop,V =I*R = %0.2f\"%(V),\" V\" #calculations " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1_7 Page No. : 20" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "I = 1.00e-06 Ampere\n", + "intrinsic charge concentration,ni = 1.45e+10 /centimetre cube\n", + "silicon atoms concntration, nV = 5.00e+22 /centimetre cube \n", + "electron mobility,un = 1500.00 cm.sq/V-s\n", + "hole mobility,up = 317.00 cm.sq/V-s\n", + "temperature,T = 300.00 K\n", + "q = 0.00 coulomb\n", + "cross sectional area,A =0.00 cm square\n", + "conductor length,l =0.01 cm\n", + "donor concentration,nD= nV/10**6=50000000000000000.00 /cm.cube\n", + "resulting mobile electron concentration,nn= nD=5.00e+16 /cm.cube\n", + "resulting hole concentration,pn= ni**2/nD=4.20e+03 /cm.cube\n", + "n-type semiconductor conductivity,sigma=q*nD*un= 11.93 (ohm-cm)**-1\n", + "doped silicon resitivity(rho),pn =(1/sigma)=0.08 ohm-cm\n", + " resistance for silicon,R =((0.084*0.5)/A) = 1680.00 ohm\n", + " voltage drop,V =I*R = 1.68e-03 V\n" + ] + } + ], + "source": [ + "ni = 1.45*10**10 #initializations\n", + "nV = 5*10**22 #initializations\n", + "un = 1500 #initializations\n", + "up = 0475#initializations\n", + "T = 300 #initializations\n", + "I=10**(-6)\n", + "print \"I = %0.2e\"%(I),\"Ampere\" #initializing value of current\n", + "A=(50*10**(-4))**2# l=0.5 #initializations\n", + "q=1.59*10**(-19) #charge on an electron\n", + "print \"intrinsic charge concentration,ni = %0.2e\"%(ni),\" /centimetre cube\"\n", + "print \"silicon atoms concntration, nV = %0.2e\"%(nV),\" /centimetre cube \"\n", + "\n", + "print \"electron mobility,un = %0.2f\"%(un),\" cm.sq/V-s\"\n", + "print \"hole mobility,up = %0.2f\"%(up),\" cm.sq/V-s\"\n", + "print \"temperature,T = %0.2f\"%(T),\" K\"\n", + "print \"q = %0.2f\"%(q),\"coulomb\" #charge on an electron\n", + "print \"cross sectional area,A =%0.2f\"%(A),\" cm square\" \n", + "print \"conductor length,l =%0.2f\"%(l),\" cm\"\n", + "nD=nV/10**6#formulae\n", + "print \"donor concentration,nD= nV/10**6=%0.2f\"%(nD),\" /cm.cube\" #calculation\n", + "nn=nD#formulae\n", + "print \"resulting mobile electron concentration,nn= nD=%0.2e\"%(nn),\" /cm.cube\" #calculation\n", + "pn= ni**2/nD#formulae\n", + "print \"resulting hole concentration,pn= ni**2/nD=%0.2e\"%(pn),\" /cm.cube\" #calculation\n", + "sigma=q*nD*un#formulae\n", + "print \"n-type semiconductor conductivity,sigma=q*nD*un= %0.2f\"%(sigma),\" (ohm-cm)**-1\" #calculation\n", + "pn =(1/sigma)\n", + "print \"doped silicon resitivity(rho),pn =(1/sigma)=%0.2f\"%(pn),\" ohm-cm\" #calculation\n", + "R=(0.084*0.5)/A\n", + "print \" resistance for silicon,R =((0.084*0.5)/A) = %0.2f\"%(R),\" ohm\" #calculations for silicon\n", + "V=I*R\n", + "print \" voltage drop,V =I*R = %0.2e\"%(V),\" V\" #calculations " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 1_8 Page No. : 22" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "q = 1.59e-19 coulomb\n", + "dimension of semiconductor,d=0.04 cm\n", + "cross sectional area,A =d**2=1.37e-03 cm square\n", + "thickness,x =1.00e-04 cm\n", + "thickness,x0 =0 cm\n", + "hole concentration at x,p= 9.22e+15 /cm-cube\n", + "hole concentration at x0,p0= 0 /cm-cube\n", + " change in concentration at ,dp= 9.22e+15 /cm-cube\n", + "change in thickness,dx= 1.00e-04 cm\n", + " slope,(dp/dx) =(p-p0)/(x-x0)=9.22e+19 holes/cm-cube\n", + "hole diffusion constant,Dp= 12.00 cm-sq/s\n", + " hole diffusion current,Ip =A*q*Dp*(dp/dx)=0.24 ampere\n" + ] + } + ], + "source": [ + "q=1.59*10**(-19) #charge on an electron\n", + "print \"q = %0.2e\"%(q),\"coulomb\" #charge on an electron\n", + "d=0.037\n", + "print \"dimension of semiconductor,d=%0.2f\"%(d),\" cm\"\n", + "A=(d**2) #area formulae for square shaped semiconductor\n", + "print \"cross sectional area,A =d**2=%0.2e\"%(A),\" cm square\" \n", + "x=10**(-4)\n", + "print \"thickness,x =%0.2e\"%(x),\" cm\"\n", + "x0=0\n", + "print \"thickness,x0 =%0.f\"%(x0),\" cm\"\n", + "p=9.22*10**(15)#\n", + "print \"hole concentration at x,p= %0.2e\"%(p),\" /cm-cube\" #calculation\n", + "p0=0#\n", + "print \"hole concentration at x0,p0= %0.f\"%(p0),\" /cm-cube\" #calculation\n", + "dp=(p-p0)#formulae\n", + "dx=(x-x0)#formulae\n", + "print \" change in concentration at ,dp= %0.2e\"%(dp),\" /cm-cube\" #calculation\n", + "print \"change in thickness,dx= %0.2e\"%(dx),\" cm\" #calculation\n", + "(dp/dx)==(p-p0)/(x-x0)#formulae\n", + "print \" slope,(dp/dx) =(p-p0)/(x-x0)=%0.2e\"%(dp/dx),\" holes/cm-cube\" #calculation\n", + "Dp=12\n", + "print \"hole diffusion constant,Dp= %0.2f\"%(Dp),\" cm-sq/s\" #calculation\n", + "Ip=A*q*Dp*(dp/dx)\n", + "print \" hole diffusion current,Ip =A*q*Dp*(dp/dx)=%0.2f\"%(Ip),\" ampere\" #calculation" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch10.ipynb b/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch10.ipynb new file mode 100644 index 00000000..686dc777 --- /dev/null +++ b/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch10.ipynb @@ -0,0 +1,368 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 10 - Combinational Logic Systems" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10_1 Page No. 308" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Decimal number= 72\n", + "Eqivalent Binary number= 1001000\n" + ] + } + ], + "source": [ + "x=72##given value in Decimal\n", + "print \"Decimal number=\",(x)\n", + "Str=bin(x)[2:]\n", + "print \"Eqivalent Binary number=\",(Str)#Binary value" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10_2 Page No. 308" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Binary number= 1001000\n", + "Eqivalent Decimal number= 72\n" + ] + } + ], + "source": [ + "x='1001000'##Binary value\n", + "print \"Binary number=\",(x)\n", + "Str=int(x,2)\n", + "print \"Eqivalent Decimal number=\",(Str)#decimal value" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10_3 Page No. 308" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Binary number= 1001000\n", + "Eqivalent Octal number= 0110\n" + ] + } + ], + "source": [ + "b='1001000'#\n", + "print \"Binary number=\",(b)#Binary value\n", + "d=int(b,2)# Binary to decimal value\n", + "o=oct(d)# Decimal to octal\n", + "print \"Eqivalent Octal number=\",(o)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10_4 Page No. 309" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Decimal number= 72\n", + "Eqivalent Octal number= 0110\n" + ] + } + ], + "source": [ + "x=72#\n", + "print \"Decimal number=\",(x)#Decimal value\n", + "Str=oct(x)#decimal to octal\n", + "print \"Eqivalent Octal number=\",(Str)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10_5 Page No. 309" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Octal number= 110\n", + "Eqivalent Binary number= 1001000\n" + ] + } + ], + "source": [ + "x='110'#\n", + "print \"Octal number=\",(x)#octal value\n", + "y=int(x,8)# octal to decimal\n", + "Str=bin(y)[2:] #decimal to binary\n", + "print \"Eqivalent Binary number=\",(Str)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10_6 Page No. 309" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Octal number= 110\n", + "Eqivalent Decimal number= 72\n" + ] + } + ], + "source": [ + "x='110'#\n", + "print \"Octal number=\",(x)# octal value\n", + "Str=int(x,8)#octal to decimal\n", + "print \"Eqivalent Decimal number=\",(Str)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10_7 Page No. 309" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Decimal number= 72\n", + "Eqivalent Hexadecimal number= 48\n" + ] + } + ], + "source": [ + "x=72#\n", + "print \"Decimal number=\",(x) #decimal value\n", + "Str=hex(x)[2:]# decimal to hexadecimal\n", + "print \"Eqivalent Hexadecimal number=\",(Str)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10_8 Page No. 310" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Hexadecimal number= 48\n", + "Eqivalent Decimal number= 72\n" + ] + } + ], + "source": [ + "h='48'#\n", + "print \"Hexadecimal number=\",(h)# value in hexadecimal\n", + "d=int(h,16)#hexadecimal to decimal\n", + "print \"Eqivalent Decimal number=\",(d)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10_9 Page No. 310" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Hexadecimal number= 48\n", + "Eqivalent Binary number= 1001000\n" + ] + } + ], + "source": [ + "h='48'#\n", + "print \"Hexadecimal number=\",(h) #hexadecimal\n", + "d=int(h,16)# converting hexadecimal to decimal\n", + "Str=bin(d)[2:]# converting decimal to binary\n", + "print \"Eqivalent Binary number=\",(Str)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10_10 Page No. 310" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Binary number= 1001000\n", + "Eqivalent hexadecimal number= 48\n" + ] + } + ], + "source": [ + "x='1001000'#\n", + "print \"Binary number=\",(x)#binary value\n", + "d=int(x,2)#binary to decimal\n", + "h=hex(d)[2:] #decimal to hexa decimal\n", + "print \"Eqivalent hexadecimal number=\",(h)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 10_11 Page No. 311" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Eqivalent BCD of 72 = 111010\n" + ] + } + ], + "source": [ + "#for two digit decimal value to convert into BCD\n", + "#for two digit decimal value to convert into BCD\n", + "x='72'#\n", + "digits = [int(c) for c in x]\n", + "zero_padded_BCD_digits = [format(d, '03b') for d in digits]\n", + "print \"Eqivalent BCD of 72 = \",\n", + "print ''.join(zero_padded_BCD_digits)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch11.ipynb b/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch11.ipynb new file mode 100644 index 00000000..8ba889a0 --- /dev/null +++ b/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch11.ipynb @@ -0,0 +1,162 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 11 - Sequential Logic Systems" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11_1 Page No. 338" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "tsu= 2.00e-08 seconds\n", + "tpd= 3.00e-08 seconds\n", + "Tmin=tpd+tsu= 5.00e-08 seconds\n", + "fCkmax=1/Tmin = 2.00e+07 Hz\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "tsu=20*10**(-9)\n", + "print \"tsu= %0.2e\"%(tsu),\" seconds\" # Input set-up time of second flip flop\n", + "tpd=30*10**(-9)\n", + "print \"tpd= %0.2e\"%(tpd),\" seconds\" # Input set-up time of first flip flop\n", + "Tmin=tpd+tsu\n", + "print \"Tmin=tpd+tsu= %0.2e\"%(Tmin),\" seconds\" # Minimum allowed time interval b/w threshold levels of two consecutive triggering clock edges activating two flip-flops\n", + "fCkmax=1/Tmin # formulae \n", + "print \"fCkmax=1/Tmin = %0.2e\"%(fCkmax),\" Hz\"# Maximum clock frequency at which flip-flop can operate reliably" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11_4 Page No. 338" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "tphL= 4.00e-08 seconds\n", + "n= 3.00\n", + "fmax=1/(n*tphL) = 8.33e+06 Hz\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "tphL=40*10**(-9)\n", + "print \"tphL= %0.2e\"%(tphL),\" seconds\" # Time taken from Clear to output\n", + "n=3\n", + "print \"n= %0.2f\"%(n) # Number of bits in counter i.e no. of flip-flops used\n", + "fmax=1/(n*tphL) # Using formulae fmax<= 1/(n*tphL)\n", + "print \"fmax=1/(n*tphL) = %0.2e\"%(fmax),\" Hz\"# Maximum counting rate at which flip-flop can operate reliably" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 11_6 Page No. 340" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fs= 2000.00 Hz\n", + "fB= 1000000.00 Hz\n", + "part(i)\n", + "fb= fB/(10**5)=10.00 Hz\n", + "delta_t=1/fb= 0.10 seconds\n", + "fs*delta_t= 200.00\n", + "Display indication=0200\n", + "part(ii)\n", + "fb=fB/(10**3)= 1000.00 Hz\n", + "delta_t=1/fb= 0.00 seconds\n", + "fs*delta_t= 2.00\n", + "Display indication=0002\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "fs=2*10**(3) \n", + "print \"fs= %0.2f\"%(fs),\" Hz\"# sine wave input signal frequency\n", + "fB=1*10**(6)\n", + "print \"fB= %0.2f\"%(fB),\" Hz\"# input Time-Base clock frequency\n", + "\n", + "print \"part(i)\"# part(i)of question\n", + "fb=fB/(10**5)\n", + "print \"fb= fB/(10**5)=%0.2f\"%(fb),\" Hz\"# Time-Base frequency for 5 decade counter\n", + "delta_t=1/fb\n", + "print \"delta_t=1/fb= %0.2f\"%(delta_t),\" seconds\" # Gate Time interval\n", + "DISP1=fs*delta_t\n", + "print \"fs*delta_t= %0.2f\"%(DISP1)# Display indication for 5 decade counter\n", + "print \"Display indication=0200\"# Display indication as 4-bit\n", + "\n", + "print \"part(ii)\"# part(ii)of question\n", + "fb=fB/(10**3)\n", + "print \"fb=fB/(10**3)= %0.2f\"%(fb),\" Hz\"# Time-Base frequency for 3 decade counter\n", + "delta_t=1/fb\n", + "print \"delta_t=1/fb= %0.2f\"%(delta_t),\" seconds\" # Gate Time interval for 3 decade counter\n", + "DISP2=fs*delta_t\n", + "print \"fs*delta_t= %0.2f\"%(DISP2)# Display indication for 3 decade counter\n", + "print \"Display indication=0002\"# Display indication as 4-bit" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch12.ipynb b/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch12.ipynb new file mode 100644 index 00000000..17087c70 --- /dev/null +++ b/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch12.ipynb @@ -0,0 +1,331 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 12 - Waveshaping and Waveform Generation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_1 Page No. 370" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "VEE= 15.00 volts\n", + "VCC= 15.00 volts\n", + "VHI= 5.00 volts\n", + "VLO= -5.00 volts\n", + "IZmin= 0.00 A\n", + "SR= 500000.00 volts/seconds\n", + "RB= 100.00 ohm\n", + "RA= 10000.00 ohm\n", + "A = 5000.00\n", + "VREF= 1.00 volts\n", + "part(i)\n", + "RD=(VCC-Vo)/IZmin= 10000.00 ohm\n", + "part(ii)\n", + "t=(VHI-VLO)/SR= 2.00e-05 seconds\n", + "tp=(VHI-VLO)/SR= 2.00e-04 seconds\n", + "fmax=1/(2*tp) = 2500.00 Hz\n", + "part(iii)\n", + "B=RB/(RA+RB)= 0.01\n", + "VLTP=(VLO*B)+[VREF*(RA/(RA+RB))]= 0.94 volts\n", + "VUTP=(VHI*B)+[VREF*(RA/(RA+RB))]= 1.04 volts\n", + "VH=VUTP-VLTP= 0.10 volts\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "VEE=15\n", + "print \"VEE= %0.2f\"%(VEE),\" volts\" # voltage supply \n", + "VCC=15\n", + "print \"VCC= %0.2f\"%(VCC),\" volts\" # voltage supply\n", + "VHI=+5\n", + "print \"VHI= %0.2f\"%(VHI),\" volts\" # output voltage upper limit\n", + "VLO=-5\n", + "print \"VLO= %0.2f\"%(VLO),\" volts\" # output voltage Lower limit\n", + "Vo=-VLO\n", + "IZmin=1*10**(-3)\n", + "print \"IZmin= %0.2f\"%(IZmin),\" A\" # Zener diode current rating\n", + "SR=0.5*10**(6)\n", + "print \"SR= %0.2f\"%(SR),\" volts/seconds\"#Slew rate\n", + "RB=100\n", + "print \"RB= %0.2f\"%(RB)+ \" ohm\" # resistance\n", + "RA=10*10**(3) \n", + "print \"RA= %0.2f\"%(RA)+ \" ohm\" # resistance\n", + "A = 5000\n", + "print \"A = %0.2f\"%(A)#op-amp gain\n", + "VREF=1\n", + "print \"VREF= %0.2f\"%(VREF),\" volts\" # Reference- voltage \n", + "print \"part(i)\"\n", + "RD=(VCC-Vo)/IZmin\n", + "print \"RD=(VCC-Vo)/IZmin= %0.2f\"%(RD)+ \" ohm\" # Series dropping-resistance\n", + "\n", + "print \"part(ii)\"\n", + "t=(VHI-VLO)/SR\n", + "print \"t=(VHI-VLO)/SR= %0.2e\"%(t),\" seconds\"# Time required to swing the output\n", + "tp=10*t\n", + "print \"tp=(VHI-VLO)/SR= %0.2e\"%(tp),\" seconds\"# Pulse width\n", + "fmax=1/(2*tp) \n", + "print \"fmax=1/(2*tp) = %0.2f\"%(fmax),\" Hz\"# Maximum frequency of operation of OP-AMP comparator\n", + "print \"part(iii)\"\n", + "B=RB/(RA+RB)\n", + "print \"B=RB/(RA+RB)= %0.2f\"%(B)#Feedback factor\n", + "VLTP=(VLO*B)+(VREF*(RA/(RA+RB)))\n", + "print \"VLTP=(VLO*B)+[VREF*(RA/(RA+RB))]= %0.2f\"%(VLTP),\" volts\" # Lower trigger point\n", + "VUTP=(VHI*B)+(VREF*(RA/(RA+RB)))\n", + "print \"VUTP=(VHI*B)+[VREF*(RA/(RA+RB))]= %0.2f\"%(VUTP),\" volts\" # Upper trigger point\n", + "VH=VUTP-VLTP\n", + "print \"VH=VUTP-VLTP= %0.2f\"%(VH),\" volts\" # Hysteresis voltage " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_2 Page No. 372" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Vo= 14.00 volts\n", + "f = 500.00 Hz\n", + "IB2= 5.00e-07 A\n", + "B=0.50\n", + "vf=B*Vo= +7.00 , -7.00 volts\n", + "IR=100*IB2= 5.00e-05 A\n", + "RB=vf/IR= 140000.00 ohm\n", + "RA=RB*((1/B)-1)= 140000.00 ohm\n", + "RF= 100000.00 ohm\n", + "C1=1/[2*RF*f*log(1+(2*RB/RA))]= 9.10e-09 farad\n" + ] + } + ], + "source": [ + "from math import log\n", + "from __future__ import division \n", + "Vo=14\n", + "print \"Vo= %0.2f\"%(Vo),\" volts\" # output voltage\n", + "f=500 \n", + "print \"f = %0.2f\"%(f),\" Hz\"#frequency\n", + "IB2=500*10**(-9)\n", + "print \"IB2= %0.2e\"%(IB2),\" A\" #base- Current\n", + "B=0.5\n", + "print \"B=%0.2f\"%(B)#Feedback factor\n", + "vf=B*Vo\n", + "print \"vf=B*Vo= +%0.2f\"%(vf),\", -%0.2f\"%(vf),\" volts\" # Feedback voltage\n", + "IR=100*IB2# Taking IR as 100 times that of IB2\n", + "print \"IR=100*IB2= %0.2e\"%(IR),\" A\" # Current in RB resistor\n", + "RB=vf/IR\n", + "print \"RB=vf/IR= %0.2f\"%(RB)+ \" ohm\" # resistance\n", + "RA=RB*((1/B)-1)# Using formulae B=RA/(RA+RB)\n", + "print \"RA=RB*((1/B)-1)= %0.2f\"%(RA)+ \" ohm\" # resistance\n", + "RF=100*10**(3)#Choosing RF=100k\n", + "print \"RF= %0.2f\"%(RF)+ \" ohm\" #Feedback resistance\n", + "C1=1/(2*RF*f*log(1+(2*RB/RA)))\n", + "print \"C1=1/[2*RF*f*log(1+(2*RB/RA))]= %0.2e\"%(C1),\" farad\" # calculated capacitance value" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_3 Page No. 373" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Vo= 14.00 volts\n", + "f = 500.00 Hz\n", + "R2= 10000.00 ohm\n", + "VTW= 14.00 volts\n", + "C2=(Vo*T)/(2*VTW*R2)= 1.00e-07 farad\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "Vo=14\n", + "print \"Vo= %0.2f\"%(Vo),\" volts\" # output voltage\n", + "f=500 \n", + "print \"f = %0.2f\"%(f),\" Hz\"#frequency\n", + "R2=10*10**(3)\n", + "print \"R2= %0.2f\"%(R2)+ \" ohm\" # resistance\n", + "VTW=14\n", + "print \"VTW= %0.2f\"%(VTW),\" volts\" # Triangular peak-peak output voltage\n", + "T=1/f\n", + "C2=(Vo*T)/(2*VTW*R2)\n", + "print \"C2=(Vo*T)/(2*VTW*R2)= %0.2e\"%(C2),\" farad\" # calculated capacitance value for deriving triangular wave from square wave astable multivibrator" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_4 Page No. 374" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "VI= -15.00 volts\n", + "TSW= 2.00e-03 seconds\n", + "R= 10000.00 ohm\n", + "C= 5.00e-07 farad\n", + "Sweep rate=VI/(R*C)=3000.00 V/s\n", + "VSW=TSW*S= 6.00 volts\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "VI=-15\n", + "print \"VI= %0.2f\"%(VI),\" volts\" # Input voltage\n", + "TSW=2*10**(-3)\n", + "print \"TSW= %0.2e\"%(TSW),\" seconds\"# triangular wave Sweep time\n", + "R=10*10**(3)\n", + "print \"R= %0.2f\"%(R)+ \" ohm\" # resistance as ckt. parameter\n", + "C=0.5*10**(-6)\n", + "print \"C= %0.2e\"%(C),\" farad\" # capacitance as ckt. parameter\n", + "S=-VI/(R*C)\n", + "print \"Sweep rate=VI/(R*C)=%0.2f\"%(S)+ \" V/s\" # Sweep rate for sweep generator\n", + "VSW=TSW*S\n", + "print \"VSW=TSW*S= %0.2f\"%(VSW),\" volts\" # Sweep voltage amplitude\n", + "\n", + "\n", + "# note in book author has not provided any variable for sweep rate ... but here I have used 'S' for it ." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 12_5 Page No. 375" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "VEE= 15.00 volts\n", + "VCC= 15.00 volts\n", + "R1= 10000.00 ohm\n", + "RF= 20000.00 ohm\n", + "R1= 10000.00 ohm\n", + "RF1= 1000.00 ohm\n", + "Av= 1000.00\n", + "part(i)\n", + "VBR1=VBR2=(VCC*RF1)/RB1= 5.00 volts\n", + "So=-RF/R1= -2.00\n", + "S1=S2=-RF1/R1= -0.10\n", + "VSL=VSU=(-VBR1/So)= 2.50 volts\n", + "part(ii)\n", + "VSU=VSL=(VBR2/Av)= -0.01 , +0.01 volts\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "VEE=15\n", + "print \"VEE= %0.2f\"%(VEE),\" volts\" # voltage supply \n", + "VCC=15\n", + "print \"VCC= %0.2f\"%(VCC),\" volts\" # voltage supply\n", + "R1=10*10**(3)\n", + "print \"R1= %0.2f\"%(R1)+ \" ohm\" # resistance\n", + "RF=20*10**(3) \n", + "print \"RF= %0.2f\"%(RF)+ \" ohm\" # Feedback resistance\n", + "RB1=3*10**(3)\n", + "print \"R1= %0.2f\"%(R1)+ \" ohm\" # resistance\n", + "RB2=RB1\n", + "RF1=1*10**(3) \n", + "print \"RF1= %0.2f\"%(RF1)+ \" ohm\" # Feedback resistance\n", + "RF2=RF1\n", + "Av=1*10**(3)\n", + "print \"Av= %0.2f\"%(Av) \n", + "print \"part(i)\"\n", + "VBR1= (VCC*RF1)/RB1\n", + "VBR2 = VBR1\n", + "print \"VBR1=VBR2=(VCC*RF1)/RB1= %0.2f\"%(VBR1),\" volts\" #Limit values at the break points and VBR=VBR1=VBR2\n", + "So=-RF/R1\n", + "print \"So=-RF/R1= %0.2f\"%(So) # slope of Transfer characteristic at zero crossings \n", + "S1=-(RF1/R1)\n", + "print \"S1=S2=-RF1/R1= %0.2f\"%(S1)# slope of Transfer characteristic at the extreme ends\n", + "VSL=(-VBR1/So)\n", + "print \"VSL=VSU=(-VBR1/So)= %0.2f\"%(VSL),\" volts\" # magnitude of input voltage required to produce vo=VBR\n", + "VSU=VSL\n", + "print \"part(ii)\"\n", + "VSU=(VBR2/Av)#Formulae\n", + "print \"VSU=VSL=(VBR2/Av)= -%0.2f\"%(VSU),\", +%0.2f\"%(VSU),\" volts\" # magnitude of input voltage required to produce vo=VBR in case gain Av is very large" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch13.ipynb b/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch13.ipynb new file mode 100644 index 00000000..4b40a3f3 --- /dev/null +++ b/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch13.ipynb @@ -0,0 +1,185 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 13 - Non-linear Analog Systems" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13_1 Page No. 395" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "VT= 0.03 volts\n", + "R1= 5000.00 ohm\n", + " Iso = 1.00e-10 ampere\n", + "part(i)\n", + "vs= 1.00e-03 volts\n", + "vo=-VT*(log(vs/(Iso*R1)))= -0.20 volts\n", + "part(ii)\n", + "vs= 1.00e-02 volts\n", + "vo=-VT*(log(vs/(Iso*R1)))= -0.26 volts\n", + "part(iii)\n", + "vs= 0.10 volts\n", + "vo=-VT*(log(vs/(Iso*R1)))= -0.32 volts\n", + "part(iv)\n", + "vs= 1.00 volts\n", + "vo=-VT*(log(vs/(Iso*R1)))= -0.38 volts\n" + ] + } + ], + "source": [ + "from math import log\n", + "from __future__ import division \n", + "VT=26*10**(-3)\n", + "print \"VT= %0.2f\"%(VT),\" volts\" # Thermal voltage \n", + "R1=5*10**(3)\n", + "print \"R1= %0.2f\"%(R1),\" ohm\" # resistance\n", + "Iso=1*10**(-10)\n", + "print \" Iso = %0.2e\"%(Iso),\" ampere\" # Scale factor (as current)directly proportional to cross-section area of EBJ \n", + "\n", + "print \"part(i)\"\n", + "vs=1*10**(-3)\n", + "print \"vs= %0.2e\"%(vs),\" volts\" # Input voltage1\n", + "vo=-VT*(log(vs/(Iso*R1)))\n", + "print \"vo=-VT*(log(vs/(Iso*R1)))= %0.2f\"%(vo),\" volts\" # Output voltage of Log OP-AMP for input1 i.e vs = 1 mV\n", + "\n", + "print \"part(ii)\"\n", + "vs=10*10**(-3)\n", + "print \"vs= %0.2e\"%(vs),\" volts\" # Input voltage2\n", + "vo=-VT*(log(vs/(Iso*R1)))\n", + "print \"vo=-VT*(log(vs/(Iso*R1)))= %0.2f\"%(vo),\" volts\" # Output voltage of Log OP-AMP for input1 i.e vs = 10 mV\n", + "\n", + "print \"part(iii)\"\n", + "vs=100*10**(-3)\n", + "print \"vs= %0.2f\"%(vs),\" volts\" # Input voltage3\n", + "vo=-VT*(log(vs/(Iso*R1)))\n", + "print \"vo=-VT*(log(vs/(Iso*R1)))= %0.2f\"%(vo),\" volts\" # Output voltage of Log OP-AMP for input1 i.e vs = 100 mV\n", + "\n", + "print \"part(iv)\"\n", + "vs=1\n", + "print \"vs= %0.2f\"%(vs),\" volts\" # Input voltage4\n", + "vo=-VT*(log(vs/(Iso*R1)))\n", + "print \"vo=-VT*(log(vs/(Iso*R1)))= %0.2f\"%(vo),\" volts\" # Output voltage of Log OP-AMP for input1 i.e vs = 1V" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13_2 Page No. 396" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "VT= 0.03 volts\n", + "R1= 100000.00 ohm\n", + " Iso = 5.00e-08 ampere\n", + "vs= 2.50 volts\n", + "vo=-VT*(log(vs/(Iso*R1)))= -0.16 volts\n" + ] + } + ], + "source": [ + "from math import log\n", + "from __future__ import division \n", + "VT=26*10**(-3)\n", + "print \"VT= %0.2f\"%(VT),\" volts\" # Thermal voltage \n", + "R1=100*10**(3)\n", + "print \"R1= %0.2f\"%(R1),\" ohm\" # resistance\n", + "Iso=50*10**(-9)\n", + "print \" Iso = %0.2e\"%(Iso),\" ampere\" # Scale factor (as current)directly proportional to cross-section area of EBJ \n", + "vs=2.5\n", + "print \"vs= %0.2f\"%(vs),\" volts\" # Input voltage\n", + "vo=-VT*(log(vs/(Iso*R1)))\n", + "print \"vo=-VT*(log(vs/(Iso*R1)))= %0.2f\"%(vo),\" volts\" # Output voltage of Log OP-AMP for input1 i.e vs = 2.5 V" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 13_3 Page No. 397" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "VT= 0.03 volts\n", + "RF= 1.00e+05 ohm\n", + " Iso = 5.00e-08 ampere\n", + "vs= -0.16 volts\n", + "vo=Iso*RF*(exp(-vs/VT))= 2.54 volts\n" + ] + } + ], + "source": [ + "from math import exp\n", + "from __future__ import division \n", + "VT=26*10**(-3)\n", + "print \"VT= %0.2f\"%(VT),\" volts\" # Thermal voltage \n", + "RF=100*10**(3)\n", + "print \"RF= %0.2e\"%(RF),\" ohm\" # resistance\n", + "Iso=50*10**(-9)\n", + "print \" Iso = %0.2e\"%(Iso),\" ampere\" # Scale factor (as current)directly proportional to cross-section area of EBJ \n", + "vs=-0.162\n", + "print \"vs= %0.2f\"%(vs),\" volts\" # Input voltage\n", + "vo=Iso*RF*(exp(-vs/VT))\n", + "print \"vo=Iso*RF*(exp(-vs/VT))= %0.2f\"%(vo),\" volts\" # Output voltage of Antilog OP-AMP for input1 i.e vs = -0.162 V" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch14.ipynb b/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch14.ipynb new file mode 100644 index 00000000..e210fc04 --- /dev/null +++ b/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch14.ipynb @@ -0,0 +1,312 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 14 - Digital-Analog Systems" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14_1 Page No. 420" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "n= 3.00\n", + "L=2**(n)= 8.00\n", + "VFS= 10.00 volts\n", + "Q.E=VFS/L= 1.25\n", + "Q.E= +0.625,-0.625\n", + "Resolution=(100/2**(n))= 12.50 percent\n", + "Resolution= 12.50 percent,-12.50 percent\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "n=3\n", + "print \"n= %0.2f\"%(n) # Number of bits \n", + "L=2**(n)\n", + "print \"L=2**(n)= %0.2f\"%(L)# Number of quantization levels\n", + "VFS=10\n", + "print \"VFS= %0.2f\"%(VFS),\" volts\" # Maximum value of analog input voltage\n", + "QE=VFS/L\n", + "print \"Q.E=VFS/L= %0.2f\"%(QE)# Quantization error\n", + "print \"Q.E= +0.625,-0.625\"# To make Quantization error symmetrical ittaken as (-Q.E/2) negative and positive value(+Q.E/2)\n", + "Resolution=(100/2**(n))#Formulae\n", + "print \"Resolution=(100/2**(n))= %0.2f\"%(Resolution),\" percent\"#Resolution\n", + "print \"Resolution= %0.2f\"%(+Resolution),\" percent,%0.2f\"%(-Resolution),\" percent\"# Since Resolution is (+)as well as (-)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14_2 Page No. 420" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "n= 3.00\n", + "L=2**(n)= 8.00\n", + "VFS= 1.02 volts\n", + "part(i)\n", + "LSB=VFS/(2**n)= 0.13 volts\n", + "part(ii)\n", + "vh= 64 to 192 mV with offset\n", + "part(iii)\n", + "Inherent error,I.E= (LSB)/2= -0.06 V,+0.06 V\n", + "part(iv)\n", + "Resolution= 0.00 V\n", + "VFS= 1.00 V\n", + "k=VFS/(Resolution)= 1.00e+03\n", + "number of bits=10\n", + "so 10-bit ADC required\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "n=3\n", + "print \"n= %0.2f\"%(n) # Number of bits \n", + "L=2**(n)\n", + "print \"L=2**(n)= %0.2f\"%(L) # Number of quantization levels\n", + "VFS=1024*10**(-3)\n", + "print \"VFS= %0.2f\"%(VFS),\" volts\" # Maximum value of analog input voltage\n", + "\n", + "print \"part(i)\"# Part(i)\n", + "LSB=VFS/(2**n)\n", + "print \"LSB=VFS/(2**n)= %0.2f\"%(LSB),\" volts\" # Lowest significant bit of 3-bit ADC\n", + "\n", + "print \"part(ii)\"# Part(ii)\n", + "print \"vh= 64 to 192 mV with offset\" # Analog voltage corresponding to binary word 001\n", + "\n", + "print \"part(iii)\"# Part(iii)\n", + "IE=(LSB)/2\n", + "print \"Inherent error,I.E= (LSB)/2= -%0.2f\"%(IE),\" V,+%0.2f\"%(IE),\" V\"# Inherent error in each binary word\n", + "\n", + "print \"part(iv)\"# Part(iv)\n", + "Resolution=(1*10**(-3))\n", + "print \"Resolution= %0.2f\"%(Resolution),\" V\"#Resolution\n", + "VFS=1\n", + "print \"VFS= %0.2f\"%(VFS),\" V\" # Maximum value of analog input voltage2\n", + "k=VFS/(Resolution)\n", + "print \"k=VFS/(Resolution)= %0.2e\"%(k) # 'k' taken only for calculation purpose\n", + "print \"number of bits=10\"# since k =[VFS/(Resolution)]is approximately equal to 2**10,\n", + "print \"so 10-bit ADC required\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14_3 Page No. 421" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "VREF= -10.00 V\n", + "RF= 5000.00 ohm\n", + "R= 10000.00 ohm\n", + "vLSB=(-RF*VREF)/(8*R)=0.62 V\n", + "vo = -2*vLSB =-1.25 V\n", + "vo= -15*vLSB =-9.38 V\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "VREF=-10\n", + "print \"VREF= %0.2f\"%(VREF),\" V\" # Reference voltage\n", + "RF=5*10**(3)\n", + "print \"RF= %0.2f\"%(RF)+ \" ohm\" #Feedback resistance\n", + "R=10*10**(3)\n", + "print \"R= %0.2f\"%(R)+ \" ohm\" # resistance\n", + "vLSB=(-RF*VREF)/(8*R)# Since IF=I/8,so vLSB=(-RF*IF)=(-RF*I/8)=(-RF*VREF/8*R)\n", + "print \"vLSB=(-RF*VREF)/(8*R)=%0.2f\"%(vLSB),\" V\" # Equivalent voltage for binary word 0001\n", + "vo=-2*vLSB# Since current IF=I/4\n", + "print \"vo = -2*vLSB =%0.2f\"%(vo),\" V\" # Equivalent voltage for binary word 0010=2 (in decimal)\n", + "vo=-15*vLSB# Since current IF=I+(I/2)+(I/4)+(I/8)=(15*I/8),so vo=15*VLSB\n", + "print \"vo= -15*vLSB =%0.2f\"%(vo),\" V\" # Equivalent voltage for binary word 0010=2 (in decimal)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14_4 Page No. 422" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "VREF= -10.00 V\n", + "RF= 5000.00 ohm\n", + "R= 10000.00 ohm\n", + "vMSB=-(RF*VREF)/(2*R)=2.50 V\n", + "vo2 = vMSB/2 =1.25 V\n", + "vo3= (15/8)*vMSB =4.69 V\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "VREF=-10\n", + "print \"VREF= %0.2f\"%(VREF),\" V\" # Reference voltage\n", + "RF=5*10**(3)\n", + "print \"RF= %0.2f\"%(RF)+ \" ohm\" #Feedback resistance\n", + "R=10*10**(3)\n", + "print \"R= %0.2f\"%(R)+ \" ohm\" # resistance\n", + "vMSB=-(RF*VREF)/(2*R)# Since IF=I/2,so vMSB=(-RF*IF)=(-RF*I/2)=(-RF*VREF/2*R)\n", + "print \"vMSB=-(RF*VREF)/(2*R)=%0.2f\"%(vMSB),\" V\" # Equivalent voltage for binary word 1000=8(in decimal)\n", + "vo2=vMSB/2# Since current IF=I/4\n", + "print \"vo2 = vMSB/2 =%0.2f\"%(vo2),\" V\" # Equivalent voltage for binary word 0100=4 (in decimal)\n", + "vo3=(15/8)*vMSB# Since current IF=I+(I/2)+(I/4)+(I/8)+(I/16)=(15*I/6),so vo=(15/8)*VMSB\n", + "print \"vo3= (15/8)*vMSB =%0.2f\"%(vo3),\" V\" # Equivalent voltage for binary word 1111=15 (in decimal)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14_5 Page No. 422" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "n= 12.00\n", + "VFS= 50.00 volts\n", + "S=VFS/(2**n)= 0.01 volts\n", + "Resolution=(100/2**(n))= -0.02 percent, +0.02 percent\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "n=12\n", + "print \"n= %0.2f\"%(n) # Number of bits\n", + "VFS=50\n", + "print \"VFS= %0.2f\"%(VFS),\" volts\" # Maximum value of analog input voltage\n", + "S=VFS/(2**n)\n", + "print \"S=VFS/(2**n)= %0.2f\"%(S),\" volts\" # Maximum quantization error\n", + "Resolution=(100/2**(n))#Formulae\n", + "print \"Resolution=(100/2**(n))= -%0.2f\"%(Resolution),\" percent, +%0.2f\"%(Resolution),\" percent\"# Since Resolution is (+)as well as (-)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 14_7 Page No. 423" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "n= 12.00\n", + "t= 5.00e-06 A\n", + "Vsp= 10.00 volts\n", + "LSB=Vsp/(2**n)= 0.0024 volts\n", + "LSB/2= -0.0012 V, -0.00 V\n", + "SR=(LSB/2)/t= 244.14 V/s\n", + "f = SR/(2*pi*Vsp)=3.89 Hz\n" + ] + } + ], + "source": [ + "from math import pi\n", + "from __future__ import division \n", + "n=12\n", + "print \"n= %0.2f\"%(n) # Number of bits\n", + "t=5*10**(-6)\n", + "print \"t= %0.2e\"%(t),\" A\"\n", + "Vsp=10\n", + "print \"Vsp= %0.2f\"%(Vsp),\" volts\" # value of analog input voltage\n", + "LSB=Vsp/(2**n)\n", + "print \"LSB=Vsp/(2**n)= %0.4f\"%(LSB),\" volts\" # Lowest significant bit of 12-bit ADC\n", + "print \"LSB/2= -%0.4f\"%(LSB/2),\" V, -%0.2f\"%(LSB/2),\" V\" \n", + "SR=(LSB/2)/t\n", + "print \"SR=(LSB/2)/t= %0.2f\"%(SR),\" V/s\"\n", + "fmax=SR/(2*pi*Vsp)\n", + "print \"f = SR/(2*pi*Vsp)=%0.2f\"%(fmax),\" Hz\"# Highest frequency allowed at the input" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch2.ipynb b/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch2.ipynb new file mode 100644 index 00000000..db94475e --- /dev/null +++ b/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch2.ipynb @@ -0,0 +1,508 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 2 - The Semiconductor Diode" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_1 Page No. 35" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "IR = 5.00e-08 ampere\n", + " Thermal voltage,VT= 0.03 volt\n", + "Junction voltage,VAK1= -0.25 volt\n", + "Diode current,IA =IR*(exp(VAK1/(2*VT))-1)= -4.96e-08 ampere\n", + "Junction voltage,VAK2= 0.25 volt\n", + "Diode current,IA =IR*(exp(VAK2/(2*VT))-1)= 6.07e-06 ampere\n", + "Junction voltage,VAK3= 0.50 volt\n", + "Diode current,IA =IR*(exp(VAK3/(2*VT))-1)= 7.50e-04 ampere\n", + "Junction voltage,VAK4= 0.60 volt\n", + "Diode current,IA =IR*(exp(VAK4/(2*VT))-1)= 0.01 ampere\n", + "Junction voltage,VAK3= 0.70 volt\n", + "Diode current,IA =IR*(exp(VAK5/(2*VT))-1)= 0.04 ampere\n", + "Junction voltage,VAK3= 0.80 volt\n", + "Diode current,IA =IR*(exp(VAK6/(2*VT))-1)= 0.24 ampere\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "from math import exp\n", + "IR=50*10**(-9)\n", + "print \"IR = %0.2e \"%(IR),\" ampere\" # value of Reverse saturation current\n", + "VT=26*10**(-3)\n", + "print \" Thermal voltage,VT= %0.2f \"%(VT),\"volt\"\n", + "VAK1=(-0.25)# diode junction voltage\n", + "print \"Junction voltage,VAK1= %0.2f\"%(VAK1),\"volt\"\n", + "IA =IR*(exp(VAK1/(2*VT))-1)# formulae for diode current\n", + "print \"Diode current,IA =IR*(exp(VAK1/(2*VT))-1)= %0.2e \"%(IR*(exp(VAK1/(2*VT))-1)),\" ampere\" # calculation\n", + "VAK2=(+0.25)\n", + "print \"Junction voltage,VAK2= %0.2f\"%(VAK2),\"volt\"\n", + "IA =IR*(exp(VAK2/(2*VT))-1)\n", + "print \"Diode current,IA =IR*(exp(VAK2/(2*VT))-1)= %0.2e \"%(IA),\" ampere\" # calculation\n", + "VAK3=(+0.5)\n", + "print \"Junction voltage,VAK3= %0.2f\"%(VAK3),\"volt\"\n", + "print \"Diode current,IA =IR*(exp(VAK3/(2*VT))-1)= %0.2e \"%(IR*(exp(VAK3/(2*VT))-1)),\" ampere\" # calculation\n", + "VAK4=(+0.6)\n", + "print \"Junction voltage,VAK4= %0.2f\"%(VAK4),\"volt\"\n", + "print \"Diode current,IA =IR*(exp(VAK4/(2*VT))-1)= %0.2f \"%(IR*(exp(VAK4/(2*VT))-1)),\" ampere\" # calculation\n", + "VAK5=(+0.7)\n", + "print \"Junction voltage,VAK3= %0.2f\"%(VAK5),\"volt\"\n", + "print \"Diode current,IA =IR*(exp(VAK5/(2*VT))-1)= %0.2f \"%(IR*(exp(VAK5/(2*VT))-1)),\" ampere\" # calculation\n", + "VAK6=(+0.8)\n", + "print \"Junction voltage,VAK3= %0.2f\"%(VAK6),\"volt\"\n", + "print \"Diode current,IA =IR*(exp(VAK6/(2*VT))-1)= %0.2f \"%(IR*(exp(VAK6/(2*VT))-1)),\" ampere\" # calculation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_2 Page No. 36" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "source voltage,VF = 5.00 volts\n", + "voltage drop,VD = 0.70 volts\n", + "resistance,R = 5000.00 ohm\n", + "resistance,R = 100.00 ohm\n", + "VR = 0.60 volts\n", + "Diode current ,IA = 0.00 ampere\n", + " using large signal model,IA = 8.63e-04 ampere\n", + "Junction voltage,VAK = 0.69 volts\n" + ] + } + ], + "source": [ + "from __future__ import division\n", + "VF=5\n", + "print \"source voltage,VF = %0.2f \"%(VF)+ \" volts\"#initialization\n", + "VD=0.7\n", + "print \"voltage drop,VD = %0.2f \"%(VD)+ \" volts\"#initialization\n", + "R=5*10**(3)\n", + "print \"resistance,R = %0.2f \"%(R)+ \"ohm\"#initialization\n", + "RF=100\n", + "print \"resistance,R = %0.2f \"%(RF)+ \"ohm\"#initialization\n", + "VR=0.6\n", + "print \"VR = %0.2f \"%(VR)+ \" volts\"#initialization\n", + "IA=(VF-VD)/R #formulae\n", + "print \"Diode current ,IA = %0.2f \"%(IA),\" ampere\" # calculation\n", + "IA=(VF-VR)/(R+RF)# Formulae\n", + "print \" using large signal model,IA = %0.2e \"%(IA),\" ampere\" # calculation\n", + "VAK=(VR+IA*RF)# Formulae\n", + "print \"Junction voltage,VAK = %0.2f\"%(VAK),\" volts\"#calculation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_3 Page No. 38" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " Thermal voltage,VT= 0.03 volt\n", + "IR = 0.00 ampere\n", + "Junction voltage,VAK1= 0.70 volt\n", + "Forward conductance,gf= 0.67 mho\n", + "Forward resistance,rf = 1.48 ohm\n", + "Reverse conductance,gr= 1.37e-12 mho\n", + " Reverse resistance,rr = 7.30e+11 ohm\n" + ] + } + ], + "source": [ + "from math import exp\n", + "from __future__ import division\n", + "VT=26*10**(-3)\n", + "print \" Thermal voltage,VT= %0.2f \"%(VT),\" volt\"#initialization\n", + "IR=50*10**(-9)\n", + "print \"IR = %0.2f \"%(IR),\" ampere\" # value of Reverse saturation current\n", + "VAK1=(0.7)# diode junction voltage\n", + "print \"Junction voltage,VAK1= %0.2f\"%(VAK1),\" volt\"#initialization\n", + "gf=(IR/(2*VT))*exp(VAK1/(2*VT)) #Formulae\n", + "print \"Forward conductance,gf= %0.2f\"%(gf),\" mho\"\n", + "rf=1/gf #Formulae\n", + "print \"Forward resistance,rf = %0.2f \"%(rf)+ \" ohm\"\n", + "VAK2=(-0.7)\n", + "gr=(IR/(2*VT))*exp(VAK2/(2*VT)) #Formulae\n", + "print \"Reverse conductance,gr= %0.2e\"%(gr),\" mho\"\n", + "rr=1/gr #Formulae\n", + "print \" Reverse resistance,rr = %0.2e \"%(rr)+ \" ohm\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_4 Page No. 39" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "input voltage,Vi = 10.00 volts\n", + "resistance,Rs = 0.20 ohm\n", + "resistance,RL = 10.00 ohm\n", + "input voltage,VD = 0.70 volts\n", + " Peak load current ,Iim =(Vim-VD)/(RL+Rs) = 1.32 ampere\n", + " D.C load current ,Ildc =(2*Iim/(pi)) = 0.84 ampere\n", + " diode d.c current ,Iadc =(Ildc/2)= 0.42 ampere\n", + "peak inverse voltage ,PIV = 2*Vim= 28.28 volts\n", + "D.C output voltage,Vldc=Ildc*RL= 8.39 volts\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "Vi=10\n", + "print \"input voltage,Vi = %0.2f \"%(Vi),\" volts\" #initialization\n", + "Rs=0.2\n", + "print \"resistance,Rs = %0.2f \"%(Rs)+ \"ohm\" #initialization\n", + "RL=10\n", + "print \"resistance,RL = %0.2f \"%(RL)+ \"ohm\" #initialization\n", + "VD=0.7\n", + "print \"input voltage,VD = %0.2f \"%(VD),\" volts\" #initialization\n", + "Vim=Vi*sqrt(2) #Formulae\n", + "Iim=(Vim-VD)/(RL+Rs) #Formulae\n", + "print \" Peak load current ,Iim =(Vim-VD)/(RL+Rs) = %0.2f\"%(Iim),\" ampere\" # calculation\n", + "Ildc=(2*Iim/(pi)) #Formulae\n", + "print \" D.C load current ,Ildc =(2*Iim/(pi)) = %0.2f\"%(Ildc),\" ampere\" # calculation\n", + "Iadc=(Ildc/2) #Formulae\n", + "print \" diode d.c current ,Iadc =(Ildc/2)= %0.2f \"%(Iadc),\" ampere\" # calculation\n", + "PIV=2*Vim #Formulae\n", + "print \"peak inverse voltage ,PIV = 2*Vim= %0.2f\"%(PIV),\" volts\" # calculation\n", + "Vldc=Ildc*RL #Formulae\n", + "print \"D.C output voltage,Vldc=Ildc*RL= %0.2f \"%(Vldc),\" volts\" # calculation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_5 Page No. 40" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " D.C load current ,Idc = 1.00e-03 ampere\n", + "input voltage,Vi = 2.50 volts\n", + "voltage drop,VD = 0.70 volts\n", + "resistance,Rm = 50.00 ohm\n", + "resistance,R =[(2/pi)*((Vim-2*VD)/Idc)-Rm]= 1309.52 ohm\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "Idc=1*10**(-3)\n", + "print \" D.C load current ,Idc = %0.2e \"%(Idc),\" ampere\" #initialization\n", + "Vi=2.5\n", + "print \"input voltage,Vi = %0.2f \"%(Vi),\" volts\"#initialization\n", + "Vim=Vi*sqrt(2)\n", + "VD=0.7\n", + "print \"voltage drop,VD = %0.2f \"%(VD)+ \" volts\" #initialization\n", + "Rm=50\n", + "print \"resistance,Rm = %0.2f \"%(Rm)+ \" ohm\" #initialization\n", + "R=((2/pi)*((Vim-2*VD)/Idc)-Rm) #Formulae\n", + "print \"resistance,R =[(2/pi)*((Vim-2*VD)/Idc)-Rm]= %0.2f \"%(R)+ \" ohm\"\n", + "\n", + "# NOTE: VALUE OF R=1310 ohm as given in book but here calculated ans is 1309.5231ohm " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_6 Page No. 45" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "input voltage,Vi = 10.00 volts\n", + "frequency,f1= 50.00 hertz\n", + "resistance,RL = 1100.00 ohm\n", + "Ripple factor,r = 0.05 \n", + "output voltage,VLDC = VLDC=Vim/(1+x)= 12.96 volts\n", + " voltage Regulation,VR =(Vim-VLDC)/(VLDC)= 0.09 volts\n", + "Ripple output voltage,Vr = Vr=VLDC*r= 0.68 volts\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "Vi=10\n", + "print \"input voltage,Vi = %0.2f \"%(Vi),\" volts\" #initialization\n", + "Vim=Vi*sqrt(2)\n", + "f1=50\n", + "print \"frequency,f1= %0.2f\"%(f1),\" hertz\" #initialization\n", + "RL=1100\n", + "print \"resistance,RL = %0.2f \"%(RL)+ \" ohm\" #initialization\n", + "C=50*10**(-6)\n", + "r=1/((4*sqrt(3))*f1*RL*C) # Formulae\n", + "print \"Ripple factor,r = %0.2f \"%(r),\"\"\n", + "x=1/(4*f1*RL*C) # Formulae\n", + "VLDC=Vim/(1+x) # Formulae\n", + "print \"output voltage,VLDC = VLDC=Vim/(1+x)= %0.2f\"%(VLDC),\" volts\" #calculation\n", + "VR=(Vim-VLDC)/(VLDC) # Formulae\n", + "print \" voltage Regulation,VR =(Vim-VLDC)/(VLDC)= %0.2f \"%(VR),\" volts\" #calculation\n", + "Vr=VLDC*r # Formulae\n", + "print \"Ripple output voltage,Vr = Vr=VLDC*r= %0.2f\"%(Vr),\" volts\"#calculation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_7 Page No. 48" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "input voltage,VI = 10.00 volts\n", + "diode voltage,Vz = 5.00 volts\n", + "resistance,Rz = 100.00 ohm\n", + "resistance,RD = 500.00 ohm\n", + "percentage change in VI,DVI= 25.00 volts\n", + "percentage change in VL,DVL=(DVI)*(Rz/(RD+Rz))= 0.00 %\n", + "Output resistance,R0 =(RD*Rz)/(RD+Rz)= 83.00 ohm\n", + "resistance,RD = 500.00 ohm\n", + "Power dissipated,PZmax =PZmax=(Izmax*Vz)= 0.06 watt\n", + "Power dissipated,Prd=Prd=(Izmax*Izmax*RD)= 0.08 watt\n", + "Power dissipated,PD = 0.14 watt\n", + "resistance,RL = 500.00 ohm\n", + " voltage Regulation Percentage,%VR =(R0/RL)*(100)= 16.60 % \n" + ] + } + ], + "source": [ + "VI=10\n", + "print \"input voltage,VI = %0.2f \"%(VI),\" volts\" #initialization\n", + "Vz=5\n", + "print \"diode voltage,Vz = %0.2f \"%(Vz),\" volts\" #initialization\n", + "Rz=100\n", + "print \"resistance,Rz = %0.2f \"%(Rz)+ \" ohm\" #initialization\n", + "RD=500\n", + "print \"resistance,RD = %0.2f \"%(RD)+ \" ohm\" #initialization\n", + "DVI=25\n", + "print \"percentage change in VI,DVI= %0.2f \"%(DVI),\" volts\" #initialization\n", + "DVL=(DVI)*(Rz/(RD+Rz)) #Formulae\n", + "print \"percentage change in VL,DVL=(DVI)*(Rz/(RD+Rz))= %0.2f \"%(DVL),\" %\"\n", + "R0=(RD*Rz)/(RD+Rz) #Formulae\n", + "print \"Output resistance,R0 =(RD*Rz)/(RD+Rz)= %0.2f \"%(R0)+ \" ohm\"\n", + "VImax=12.5\n", + "Izmax=(VImax-Vz)/(RD+Rz) #Formulae\n", + "print \"resistance,RD = %0.2f \"%(RD)+ \" ohm\"\n", + "PZmax=(Izmax*Vz) #Formulae\n", + "print \"Power dissipated,PZmax =PZmax=(Izmax*Vz)= %0.2f \"%(PZmax)+ \" watt\"\n", + "Prd=(Izmax*Izmax*RD) #Formulae\n", + "print \"Power dissipated,Prd=Prd=(Izmax*Izmax*RD)= %0.2f \"%(Prd)+ \" watt\"\n", + "PD=(PZmax+Prd) #Formulae\n", + "print \"Power dissipated,PD = %0.2f \"%(PD)+ \" watt\"\n", + "RL=0.5*(10**3)\n", + "print \"resistance,RL = %0.2f \"%(RL)+ \" ohm\" #initialization\n", + "P_VR=(R0*100)/RL #Formulae\n", + "print \" voltage Regulation Percentage,%%VR =(R0/RL)*(100)= %0.2f \"%(P_VR),\"% \"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_8 Page No. 49" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "diode voltage,Vz = 10.00 volts\n", + " Zener diode TC1 = 2.00e-03 V/degree celsius\n", + " voltage drop,VD = 0.70 volts\n", + "Si diode TC = -0.00 V/degree celsius\n", + "Combined voltage ,Vref=VD+Vz= 10.70 volts\n", + " Combined TC = -0.00 V/degree celsius\n", + "New Combined TC = (TC1+TC2)*100/(Vref1)= -4.67e-03 percent/degree celsius\n", + "New Combined reference voltage ,Vref= Vref1-((-TC3)*(T2-T1))= 10.69 volts\n" + ] + } + ], + "source": [ + "Vz=10 #initialization\n", + "print \"diode voltage,Vz = %0.2f \"%(Vz),\" volts\"\n", + "TC1=(10*0.02)/(100) #calculation\n", + "print \" Zener diode TC1 = %0.2e \"%(TC1),\" V/degree celsius\"\n", + "VD=0.7\n", + "print \" voltage drop,VD = %0.2f \"%(VD),\" volts\"\n", + "TC2=(-2.5*10**(-3)) #calculation\n", + "print \"Si diode TC = %0.2f \"%(TC2),\" V/degree celsius\"\n", + "Vref1=VD+Vz\n", + "print \"Combined voltage ,Vref=VD+Vz= %0.2f \"%(Vref1),\" volts\"\n", + "TC3=(TC1+TC2) #calculation\n", + "print \" Combined TC = %0.2f \"%(TC3),\" V/degree celsius\"\n", + "TC=(TC1+TC2)*100/(Vref1) #calculation\n", + "print \"New Combined TC = (TC1+TC2)*100/(Vref1)= %0.2e\"%(TC),\" percent/degree celsius\"\n", + "T1=25#temperature\n", + "T2=50# new temperature\n", + "Vref=Vref1-((-TC3)*(T2-T1))#calculation\n", + "print \"New Combined reference voltage ,Vref= Vref1-((-TC3)*(T2-T1))= %0.2f\"%(Vref),\" volts\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 2_9 Page No. 52" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "input voltage,Vi1 = 0.20 volts\n", + " voltage drop,VD = 0.70 volts\n", + "resistance,RL = 5000.00 ohm\n", + "Supply voltage,Vcc = 5.00 volts\n", + "output voltage ,V01 ==VD+Vi1 = 0.90 volts\n", + " output current ,IL1=IL1=(Vcc-V01)/RL = 8.20e-04 ampere\n", + "input voltage,Vi2 = 5.00 volts\n", + "output voltage ,V02 =3*VD= 2.10 volts\n", + " output current ,IL2= IL2=(Vcc-V02)/RL = 5.80e-04 ampere\n", + " Diode voltage ,VAK = V02-Vi2 = -2.90 volts\n" + ] + } + ], + "source": [ + "Vi1=0.2\n", + "print \"input voltage,Vi1 = %0.2f \"%(Vi1),\" volts\" #initialization\n", + "VD=0.7\n", + "print \" voltage drop,VD = %0.2f \"%(VD),\" volts\" #initialization\n", + "RL=5*(10**3)\n", + "print \"resistance,RL = %0.2f \"%(RL)+ \" ohm\" #initialization\n", + "Vcc=5\n", + "print \"Supply voltage,Vcc = %0.2f \"%(Vcc),\" volts\"\n", + "V01=VD+Vi1 #Formulae\n", + "print \"output voltage ,V01 ==VD+Vi1 = %0.2f \"%(V01),\" volts\" \n", + "IL1=(Vcc-V01)/RL #Formulae\n", + "print \" output current ,IL1=IL1=(Vcc-V01)/RL = %0.2e \"%(IL1),\" ampere\" # calculation\n", + "Vi2=5\n", + "print \"input voltage,Vi2 = %0.2f \"%(Vi2),\" volts\" #initialization\n", + "V02=3*VD #Formulae\n", + "print \"output voltage ,V02 =3*VD= %0.2f \"%(V02),\" volts\"\n", + "IL2=(Vcc-V02)/RL #Formulae\n", + "print \" output current ,IL2= IL2=(Vcc-V02)/RL = %0.2e \"%(IL2),\" ampere\" # calculation\n", + "VAK=V02-Vi2 #Formulae\n", + "print \" Diode voltage ,VAK = V02-Vi2 = %0.2f \"%(VAK),\" volts\"\n", + "\n", + "#NOTE:correct value of IL2=0.58 mA but in book given as 0.592mA" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch3.ipynb b/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch3.ipynb new file mode 100644 index 00000000..664bb97e --- /dev/null +++ b/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch3.ipynb @@ -0,0 +1,700 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 3 - Bipolar Junction Transistor" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_1 Page No. 64" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Vcc = 15.00 volts\n", + "VBB = 1.00 volts\n", + "VBE = 0.70 volts\n", + "resistance,RB = 5000.00 ohm\n", + "resistance,RL = 650.00 ohm\n", + "Gain,Bf = 200.00 \n", + "IB =(VBB-VBE)/RB = 6.00e-05 ampere\n", + "IC =IB*Bf= 0.01 ampere\n", + "IE = IB+IC=0.01 ampere\n", + "VCE =Vcc-IC*RL= 7.20 volts\n", + "VCB = VCE-VBE=6.50 volts\n", + "resistance,RB =(Vcc-VBE)/IB= 2.38e+05 ohm\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "Vcc=15\n", + "print \"Vcc = %0.2f\"%(Vcc),\" volts\" #initialization\n", + "VBB=1\n", + "print \"VBB = %0.2f\"%(VBB),\" volts\" #initialization\n", + "VBE=0.7\n", + "print \"VBE = %0.2f\"%(VBE),\" volts\" #initialization\n", + "RB=5*(10**3)\n", + "print \"resistance,RB = %0.2f\"%(RB)+ \" ohm\" #initialization\n", + "RL=650\n", + "print \"resistance,RL = %0.2f\"%(RL)+ \" ohm\" #initialization\n", + "Bf=200\n", + "print \"Gain,Bf = %0.2f\"%(Bf)+ \" \" #initialization\n", + "IB=(VBB-VBE)/RB #Formulae\n", + "print \"IB =(VBB-VBE)/RB = %0.2e\"%(IB),\" ampere\" #calculation\n", + "IC=IB*Bf #Formulae\n", + "print \"IC =IB*Bf= %0.2f\"%(IC),\" ampere\"#calculation\n", + "IE=IB+IC #Formulae\n", + "print \"IE = IB+IC=%0.2f\"%(IE),\" ampere\"#calculation\n", + "VCE=Vcc-IC*RL #Formulae\n", + "print \"VCE =Vcc-IC*RL= %0.2f\"%(VCE),\" volts\" #calculation\n", + "VCB=VCE-VBE #Formulae\n", + "print \"VCB = VCE-VBE=%0.2f\"%(VCB),\" volts\"#calculation\n", + "RB=(Vcc-VBE)/IB #Formulae\n", + "print \"resistance,RB =(Vcc-VBE)/IB= %0.2e\"%(RB)+ \" ohm\" #calculation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_2 Page No. 65" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Vbe1 = 0.03 volts\n", + "Vbe2 = -0.03 volts\n", + "ib1 = 2.00e-05 ampere\n", + "ib2 = -2.00e-05 ampere\n", + "IBQ = 6.00e-05 ampere\n", + "ICP = 0.02 ampere\n", + "ICR = 0.01 ampere\n", + "VCEP = 5.00 volts\n", + "VCER = 9.00 volts\n", + "change_IC = 0.01 ampere\n", + "change_VCE = 4.00 volts\n", + "AV = 80.00 \n", + "AI = 175.00 \n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "Vbe1=0.025\n", + "print \"Vbe1 = %0.2f\"%(Vbe1),\" volts\" # value of base-emitter voltage1\n", + "Vbe2=(-0.025)\n", + "print \"Vbe2 = %0.2f\"%(Vbe2),\" volts\" # value of base-emitter voltage2\n", + "ib1=20*10**(-6)\n", + "print \"ib1 = %0.2e\"%(ib1),\" ampere\" # value of base current1\n", + "ib2=(-20*10**(-6))\n", + "print \"ib2 = %0.2e\"%(ib2),\" ampere\"# value of base current2\n", + "IBQ=60*10**(-6)\n", + "print \"IBQ = %0.2e\"%(IBQ),\" ampere\" # operating point\n", + "ICP=15.5*10**(-3)\n", + "print \"ICP = %0.2f\"%(ICP),\" ampere\" # initialization\n", + "ICR=8.5*10**(-3)\n", + "print \"ICR = %0.2f\"%(ICR),\" ampere\" # initialization\n", + "VCEP=5\n", + "print \"VCEP = %0.2f\"%(VCEP),\" volts\" # value of collector-emitter voltage1\n", + "VCER=9\n", + "print \"VCER = %0.2f\"%(VCER),\" volts\" # value of collector-emitter voltage2\n", + "change_IC=ICP-ICR #change in collector current\n", + "print \"change_IC = %0.2f\"%(change_IC),\" ampere\"\n", + "change_VCE=VCER-VCEP #change in collector voltage\n", + "print \"change_VCE = %0.2f\"%(change_VCE),\" volts\" \n", + "change_VBE=Vbe1-Vbe2\n", + "change_IB=ib1-ib2\n", + "AV=(change_VCE/change_VBE) #formulae voltage gain\n", + "print \"AV = %0.2f\"%(AV),\" \"#voltage gain\n", + "AI=change_IC/change_IB #formulae current gain\n", + "print \"AI = %0.2f\"%(AI),\" \"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_3 Page No. 68" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ICQ = 0.01 ampere\n", + "B = 200.00 \n", + "capacitance,Cbe = 1.00e-10 F \n", + "VT = 0.03 volts\n", + "gm =(ICQ/VT)= 0.46 A/V\n", + "hie =(B/gm)= 433.33 ohm\n", + "fT =((1/2)*(gm/Cbe)*(1/pi))= 7.35e+08 hertz\n" + ] + } + ], + "source": [ + "from math import pi\n", + "from __future__ import division \n", + "ICQ=12*10**(-3)\n", + "print \"ICQ = %0.2f\"%(ICQ),\" ampere\" # collector current\n", + "B=200\n", + "print \"B = %0.2f\"%(B),\" \" #BJT gain\n", + "Cbe=100*10**(-12)# capacitance\n", + "print \"capacitance,Cbe = %0.2e\"%(Cbe),\" F \"\n", + "VT=26*10**(-3)\n", + "print \"VT = %0.2f\"%(VT),\" volts\" # thermal voltage\n", + "gm=(ICQ/VT) #transconductance\n", + "print \"gm =(ICQ/VT)= %0.2f\"%(gm),\" A/V\"\n", + "hie=B/gm #forward resistance hybrid parameter\n", + "print \"hie =(B/gm)= %0.2f\"%(hie),\" ohm\"\n", + "fT=((1/2)*(gm/Cbe)*(1/pi)) #unity gain frequency formulae\n", + "print \"fT =((1/2)*(gm/Cbe)*(1/pi))= %0.2e\"%(fT),\" hertz\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_4 Page No. 71" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "VCC = 20.00 volts\n", + "RL= 5000.00 ohm\n", + "RB = 9.65e+05 ohm\n", + "VBE = 0.70 volts\n", + "BF = 50.00 \n", + "ICO = 1.00e-08 ampere\n", + "Vi = 0.00e+00 volts\n", + "IBQ = 2.00e-05 ampere\n", + "ICQ =BF*IBQ= 1.00e-03 ampere\n", + "VCEQ =VCC-ICQ*RL = 15.00 volts\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "VCC=20\n", + "print \"VCC = %0.2f\"%(VCC),\" volts\" # collector supply voltage \n", + "VBB=VCC\n", + "RL=5*(10**3)\n", + "print \"RL= %0.2f\"%(RL)+ \" ohm\" #resistance\n", + "RB=965*(10**3)\n", + "print \"RB = %0.2e\"%(RB)+ \" ohm\" #initialization base resistance\n", + "VBE=(0.7)\n", + "print \"VBE = %0.2f\"%(VBE),\" volts\" # value of base-emitter voltage\n", + "BF=50\n", + "print \"BF = %0.2f\"%(BF),\" \" #BJT gain\n", + "ICO=10*10**(-9)\n", + "print \"ICO = %0.2e\"%(ICO),\" ampere\" # collector reverse bias current\n", + "Vi=0\n", + "print \"Vi = %0.2e\"%(Vi),\" volts\" # value of input\n", + "IBQ=(VCC-VBE)/RB #base current as operating point\n", + "print \"IBQ = %0.2e\"%(IBQ),\" ampere\"\n", + "ICQ=BF*IBQ #operating point (collector current)\n", + "print \"ICQ =BF*IBQ= %0.2e\"%(ICQ),\" ampere\" # calculation\n", + "VCEQ=VCC-ICQ*RL # collector-emitter voltage as operating point\n", + "print \"VCEQ =VCC-ICQ*RL = %0.2f\"%(VCEQ),\" volts\" #calculation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_5 Page No. 74" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "BF1 = 100.00 \n", + "VCC = 20.00 volts\n", + "resistance,RL= 5.00e+03 ohm\n", + "resistance,RB = 9.65e+05 ohm\n", + "VBE = 0.70 volts\n", + "ICO = 1.00e-08 ampere\n", + "Vi = 0 volts\n", + "IBQ = 2.00e-05 ampere\n", + "ICQ1 =BF1*IBQ= 2.00e-03 ampere\n", + "VCEQ1 =VCC-ICQ1*RL = 10.00 volts\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "BF1=100\n", + "print \"BF1 = %0.2f\"%(BF1),\" \" #BJT gain\n", + "VCC=20\n", + "print \"VCC = %0.2f\"%(VCC),\" volts\" # collector supply voltage \n", + "VBB=VCC\n", + "RL=5*(10**3)\n", + "print \"resistance,RL= %0.2e\"%(RL)+ \" ohm\" #initialization\n", + "RB=965*(10**3)\n", + "print \"resistance,RB = %0.2e\"%(RB)+ \" ohm\" #initialization\n", + "VBE=(0.7)\n", + "print \"VBE = %0.2f\"%(VBE),\" volts\" # value of base-emitter voltage\n", + "ICO=10*10**(-9)\n", + "print \"ICO = %0.2e\"%(ICO),\" ampere\" # collector reverse bias current\n", + "Vi=0\n", + "print \"Vi = %0.f\"%(Vi),\" volts\" # value of input\n", + "IBQ=(VCC-VBE)/RB #base current as operating point\n", + "print \"IBQ = %0.2e\"%(IBQ),\" ampere\"\n", + "ICQ1=BF1*IBQ #operating point (collector current)\n", + "print \"ICQ1 =BF1*IBQ= %0.2e\"%(ICQ1),\" ampere\" # calculation\n", + "VCEQ1=VCC-ICQ1*RL # collector-emitter voltage as operating point\n", + "print \"VCEQ1 =VCC-ICQ1*RL = %0.2f\"%(VCEQ1),\" volts\" #calculation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_6 Page No. 75" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "VBE2 = 0.50 volts\n", + "VCC = 20.00 volts\n", + "BF2 = 150.00 \n", + "ICO2 = 5.00e-07 ampere\n", + "RB = 9.65e+05 ohm\n", + "RL= 5.00e+03 ohm\n", + "IBQ2 = (VCC-VBE2)/RB=2.02e-05 ampere\n", + "ICQ2 =BF2*IBQ2= 3.03e-03 ampere\n", + "dICQ2 =BF2*ICO2= 7.50e-05 ampere\n", + "ICQ3 =ICQ2+dICQ2= 3.11e-03 ampere\n", + "VCEQ3 =VCC-ICQ3*RL = 4.47 volts\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "VBE2=(0.5)\n", + "print \"VBE2 = %0.2f\"%(VBE2),\" volts\" # value of base-emitter voltage\n", + "VCC=20\n", + "print \"VCC = %0.2f\"%(VCC),\" volts\" # collector supply voltage \n", + "BF2=150\n", + "print \"BF2 = %0.2f\"%(BF2),\" \" #BJT gain\n", + "ICO2=500*10**(-9)\n", + "print \"ICO2 = %0.2e\"%(ICO2),\" ampere\" # collector reverse bias current\n", + "RB=965*(10**3)\n", + "print \"RB = %0.2e\"%(RB)+ \" ohm\" #initialization base resistance\n", + "RL=5*(10**3)\n", + "print \"RL= %0.2e\"%(RL)+ \" ohm\" # load resistance\n", + "IBQ2=(VCC-VBE2)/RB #base current as operating point\n", + "print \"IBQ2 = (VCC-VBE2)/RB=%0.2e\"%(IBQ2),\" ampere\"\n", + "ICQ2=(BF2*IBQ2) #operating point (collector current)\n", + "print \"ICQ2 =BF2*IBQ2= %0.2e\"%(ICQ2),\" ampere\" # \n", + "dICQ2=BF2*ICO2 # increase in reverse bias current\n", + "print \"dICQ2 =BF2*ICO2= %0.2e\"%(dICQ2),\" ampere\" # \n", + "ICQ3=ICQ2+dICQ2\n", + "print \"ICQ3 =ICQ2+dICQ2= %0.2e\"%(ICQ3),\" ampere\" # calculation\n", + "VCEQ3=VCC-ICQ3*RL # collector-emitter voltage as operating point\n", + "print \"VCEQ3 =VCC-ICQ3*RL = %0.2f\"%(VCEQ3),\" volts\" #calculation\n", + "#NOTE: Calculated ans for VCEQ3=4.4695596 volts but in book it is given as 4.625volts(due to approximations done in) \n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_7 Page No. 76" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "VCC = 20.00 volts\n", + "resistance,RL= 5000.00 ohm\n", + "resistance,R1 = 90000.00 ohm\n", + "resistance,R2 = 10000.00 ohm\n", + "resistance,Rc = 1000.00 ohm\n", + "VBEmax = 0.70 volts\n", + "VBEmin = 0.50 volts\n", + "BFmax = 150.00 \n", + "BFmin = 50.00 \n", + "ICOmax = 5.00e-07 ampere\n", + "ICOmin = 1.00e-08 ampere\n", + "VBB = 2.00 volts\n", + "RB = (R1*R2)/(R1+R2)=9000.00 ohm\n", + "ICmin = 0.00 ampere\n", + "VCEQmax =VCC-ICmin*RL = 14.58 volts\n", + "ICmax = 1.41e-03 ampere\n", + "VCEQmin =VCC-ICmax*RL = 12.95 volts\n", + "change_IC= 3.28e-04 ampere\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "VCC=20\n", + "print \"VCC = %0.2f\"%(VCC),\" volts\" # collector supply voltage \n", + "RL=5*(10**3)\n", + "print \"resistance,RL= %0.2f\"%(RL)+ \" ohm\" #initialization\n", + "R1=90*(10**3)\n", + "print \"resistance,R1 = %0.2f\"%(R1)+ \" ohm\" #initialization\n", + "R2=10*(10**3)\n", + "print \"resistance,R2 = %0.2f\"%(R2)+ \" ohm\" #initialization \n", + "Rc=1*(10**3)\n", + "print \"resistance,Rc = %0.2f\"%(Rc)+ \" ohm\" # resistance at collector\n", + "VBEmax=(0.7)\n", + "print \"VBEmax = %0.2f\"%(VBEmax),\" volts\" # maximum base-emitter voltage\n", + "VBEmin=(0.5)\n", + "print \"VBEmin = %0.2f\"%(VBEmin),\" volts\" # minimum base-emitter voltage\n", + "BFmax=150\n", + "print \"BFmax = %0.2f\"%(BFmax),\" \" #BJT gain maximum\n", + "BFmin=50\n", + "print \"BFmin = %0.2f\"%(BFmin),\" \" #BJT gain minimum\n", + "ICOmax=500*10**(-9)\n", + "print \"ICOmax = %0.2e\"%(ICOmax),\" ampere\" # maximum collector reverse bias current\n", + "ICOmin=10*10**(-9)\n", + "print \"ICOmin = %0.2e\"%(ICOmin),\" ampere\" # minimum collector reverse bias current\n", + "VBB=(VCC*R2)/(R1+R2)\n", + "print \"VBB = %0.2f\"%(VBB),\" volts\" # Base supply voltage \n", + "RB=(R1*R2)/(R1+R2)\n", + "print \"RB = (R1*R2)/(R1+R2)=%0.2f\"%(RB)+ \" ohm\" # eqivalent base resistance\n", + "ICmin=((BFmin*(VBB-VBEmax)+(RB+Rc)*(1+BFmin)*ICOmin)/(RB+Rc*(1+BFmin))) # minimum collector current\n", + "print \"ICmin = %0.2f\"%(ICmin),\" ampere\"\n", + "VCEQmax=VCC-ICmin*RL # maximum collector-emitter voltage (d.c value)\n", + "print \"VCEQmax =VCC-ICmin*RL = %0.2f\"%(VCEQmax),\" volts\" #calculation\n", + "ICmax=((BFmax*(VBB-VBEmin)+(RB+Rc)*(1+BFmax)*ICOmax)/(RB+Rc*(1+BFmax))) # maximum collector current\n", + "print \"ICmax = %0.2e\"%(ICmax),\" ampere\"\n", + "VCEQmin=VCC-ICmax*RL # minimum collector-emitter voltage (d.c value)\n", + "print \"VCEQmin =VCC-ICmax*RL = %0.2f\"%(VCEQmin),\" volts\" #calculation\n", + "change_IC=ICmax-ICmin\n", + "print \"change_IC= %0.2e\"%(change_IC),\" ampere\" # extreme variation in collector current\n", + "# ERROR - NOTE: Extreme variation in collector current given in book is 0.397 mA but calculated correct ans is 0.3276 mA \n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_8 Page No. 79" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "VCC = 20.00 volts\n", + "RL= 2000.00 ohm\n", + "R1 =R2= 100000.00 ohm\n", + "VBE = 0.70 volts\n", + "BF = 100.00 \n", + "VBB = 10.00 volts\n", + "RB = (R1*R2)/(R1+R2)=50000.00 ohm\n", + "IC = 3.69e-03 ampere\n", + "VE = 7.38 volts\n", + "VB = 8.08 volts\n", + "VCB = 11.92 volts\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "VCC=20\n", + "print \"VCC = %0.2f\"%(VCC),\" volts\" # collector supply voltage \n", + "RL=2*(10**3)\n", + "print \"RL= %0.2f\"%(RL)+ \" ohm\" #resistance\n", + "R1=100*(10**3)\n", + "R2=R1\n", + "print \"R1 =R2= %0.2f\"%(R1)+ \" ohm\" #resistance\n", + "VBE=(0.7)\n", + "print \"VBE = %0.2f\"%(VBE),\" volts\" # base-emitter voltage\n", + "BF=100\n", + "print \"BF = %0.2f\"%(BF),\" \" #BJT gain\n", + "ICO=0\n", + "VBB=(VCC*R2)/(R1+R2)\n", + "print \"VBB = %0.2f\"%(VBB),\" volts\" # Base supply voltage \n", + "RB=(R1*R2)/(R1+R2)\n", + "print \"RB = (R1*R2)/(R1+R2)=%0.2f\"%(RB)+ \" ohm\" # eqivalent base resistance\n", + "IC=((BF*(VBB-VBE))/(RB+RL*(1+BF))) # collector current\n", + "print \"IC = %0.2e\"%(IC),\" ampere\"\n", + "VE=IC*RL\n", + "print \"VE = %0.2f\"%(VE),\" volts\" # emitter voltage\n", + "VB=VBE+VE\n", + "print \"VB = %0.2f\"%(VB),\" volts\" # base voltage\n", + "VCB=VCC-VB\n", + "print \"VCB = %0.2f\"%(VCB),\" volts\" # collector-base voltage\n", + "#hence BJT in active region." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_9 Page No. 84" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "VCC = 5.00 volts\n", + "RL= 250.00 ohm\n", + "RB =25000.00 ohm\n", + "VCS = 0.20 volts\n", + "BF = 200.00 \n", + "VBS = 0.80 volts\n", + "VI = 5.00 volts\n", + "VCON = 0.30 volts\n", + "ICON = (VCC-VCON)/RL=0.02 ampere\n", + "IBON = (ICON)/BF=9.40e-05 ampere\n", + "IBS = (VI-VBS)/RB=1.68e-04 ampere\n", + "ICS = (VCC-VCS)/RL=1.92e-02 ampere\n", + "Bforced = ICS/IBS=114.29 \n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "VCC=5\n", + "print \"VCC = %0.2f\"%(VCC),\" volts\" # collector supply voltage \n", + "RL=250\n", + "print \"RL= %0.2f\"%(RL)+ \" ohm\" #initialization\n", + "RB=25*10**(3)\n", + "print \"RB =%0.2f\"%(RB)+ \" ohm\" # base resistance\n", + "VCS=(0.2)\n", + "print \"VCS = %0.2f\"%(VCS),\" volts\" # voltage\n", + "BF=200\n", + "print \"BF = %0.2f\"%(BF),\" \" #BJT gain\n", + "VBS=(0.8)\n", + "print \"VBS = %0.2f\"%(VBS),\" volts\" # base-emitter voltage for BJT switch\n", + "VI=5\n", + "print \"VI = %0.2f\"%(VI),\" volts\"# input voltage\n", + "VCON=0.3\n", + "print \"VCON = %0.2f\"%(VCON),\" volts\"\n", + "ICON=(VCC-VCON)/RL\n", + "print \"ICON = (VCC-VCON)/RL=%0.2f\"%(ICON),\" ampere\"#collector current for saturated BJT\n", + "IBON=(ICON)/BF\n", + "print \"IBON = (ICON)/BF=%0.2e\"%(IBON),\" ampere\"#Base current for saturated BJT\n", + "IBS=(VI-VBS)/RB\n", + "print \"IBS = (VI-VBS)/RB=%0.2e\"%(IBS),\" ampere\"#Base-emitter current for saturated BJT\n", + "ICS=(VCC-VCS)/RL\n", + "print \"ICS = (VCC-VCS)/RL=%0.2e\"%(ICS),\" ampere\"#Collector-emitter current for saturated BJT\n", + "Bforced=ICS/IBS\n", + "print \"Bforced = ICS/IBS=%0.2f\"%(Bforced),\" \" #BJT forced gain\n", + "#IBS>>IBON hence BJT in saturation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_10 Page No. 85" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "TJmax= 175.00 degree celsius\n", + "theta= 0.50 degree celsius/mW \n", + "at 25 degree celsius,PDmax=(TJmax-25 )/theta = 300.00 mW \n", + "at 75 degree celsius,PDmax2= (TJmax-75)/theta = 200.00 mW \n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "TJmax=175\n", + "print \"TJmax= %0.2f\"%(TJmax),\"degree celsius\" #maximum allowed junction temperature\n", + "theta=0.5\n", + "print \"theta= %0.2f\"%(theta),\"degree celsius/mW \" #thermal resistances b/w junction to ambient\n", + "change_T=TJmax-25#temperature difference\n", + "PDmax=change_T/theta\n", + "print \"at 25 degree celsius,PDmax=(TJmax-25 )/theta = %0.2f\"%(PDmax)+ \" mW \" #maximum allowed power dissipation at TA=25 degree celsius\n", + "change_T=TJmax-75\n", + "PDmax2=change_T/theta\n", + "print \"at 75 degree celsius,PDmax2= (TJmax-75)/theta = %0.2f\"%(PDmax2)+ \" mW \" #maximum allowed power dissipation at TA=75 degree celsius" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_11 Page No. 85" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "TJmax= 175.00 degree celsius\n", + "theta= 0.10 degree celsius/mW \n", + "at 25 degree celsius,PDmax=(TJmax-25 )/theta = 1500.00 mW \n", + "at 75 degree celsius,PDmax= (TJmax-75)/theta = 1000.00 mW \n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "TJmax=175\n", + "print \"TJmax= %0.2f\"%(TJmax),\" degree celsius\" #maximum allowed junction temperature\n", + "theta=0.1\n", + "print \"theta= %0.2f\"%(theta),\" degree celsius/mW \" #thermal resistances b/w junction to ambient\n", + "change_T=TJmax-25 #temperature difference\n", + "PDmax=change_T/theta\n", + "print \"at 25 degree celsius,PDmax=(TJmax-25 )/theta = %0.2f\"%(PDmax)+ \" mW \" #maximum allowed power dissipation at TA=25 degree celsius\n", + "change_T=TJmax-75 #temperature difference\n", + "PDmax=change_T/theta\n", + "print \"at 75 degree celsius,PDmax= (TJmax-75)/theta = %0.2f\"%(PDmax)+ \" mW \" #maximum allowed power dissipation at TA=75 degree celsius" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 3_12 Page No. 86" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "VBE = 0.70 volts\n", + "VCC = 10.00 volts\n", + "IREF =IQ= 0.01 ampere\n", + "R=(VCC-VBE)/(IREF)= 1860.00 ohm\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "VBE=(0.7)\n", + "print \"VBE = %0.2f\"%(VBE),\" volts\" # value of base-emitter voltage\n", + "VCC=10\n", + "print \"VCC = %0.2f\"%(VCC),\" volts\" # collector supply voltage \n", + "IREF=5*10**(-3)\n", + "print \"IREF =IQ= %0.2f\"%(IREF),\" ampere\" # current mirror source current\n", + "R=(VCC-VBE)/(IREF)# formulae\n", + "print \"R=(VCC-VBE)/(IREF)= %0.2f\"%(R)+ \" ohm\" #resistance" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch4.ipynb b/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch4.ipynb new file mode 100644 index 00000000..56fa8f97 --- /dev/null +++ b/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch4.ipynb @@ -0,0 +1,936 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 4 - Field Effect Transistors" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_1 Page No. 98" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "IDSS = 0.01 ampere\n", + "VP= -4.00 volts\n", + "VGS = -2.00 volts\n", + "VDSmin =VGS-VP=2.00 volts\n", + "ID =IDSS*(1-VGS/VP)**2= 2.50e-03 ampere\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "IDSS=10*10**(-3)\n", + "print \"IDSS = %0.2f\"%(IDSS),\" ampere\" # maximum drain current\n", + "VP=(-4)\n", + "print \"VP= %0.2f\"%(VP),\" volts\" # pinch off voltage \n", + "VGS=(-2)\n", + "print \"VGS = %0.2f\"%(VGS),\" volts\" # gate to source voltage \n", + "VDSmin=VGS-VP\n", + "print \"VDSmin =VGS-VP=%0.2f\"%(VDSmin),\" volts\" # Drain to source voltage \n", + "ID=IDSS*(1-VGS/VP)**2\n", + "print \"ID =IDSS*(1-VGS/VP)**2= %0.2e\"%(ID),\" ampere\" # drain current" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_2 Page No. 99" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "IDSS = 0.01 ampere\n", + "VP= -4.00 volts\n", + "VGS = 0.00 volts\n", + "RDS = 1/[(2*(IDSS/(-VP)))*(1-VGS/VP)]=200.00 ohm\n", + "VGS = -2.00 volts\n", + "RDS = 1/[(2*(IDSS/(-VP)))*(1-VGS/VP)]=400.00 ohm\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "IDSS=10*10**(-3)\n", + "print \"IDSS = %0.2f\"%(IDSS),\" ampere\" # maximum drain current\n", + "VP=(-4)\n", + "print \"VP= %0.2f\"%(VP),\" volts\" # pinch off voltage \n", + "VGS=(0)\n", + "print \"VGS = %0.2f\"%(VGS),\" volts\" # gate to source voltage1 \n", + "RDS=1/((2*(IDSS/(-VP)))*(1-VGS/VP))#formula for JFET\n", + "print \"RDS = 1/[(2*(IDSS/(-VP)))*(1-VGS/VP)]=%0.2f\"%(RDS),\" ohm\" # drain to source resistance for VGS=0V\n", + "VGS=(-2)\n", + "print \"VGS = %0.2f\"%(VGS),\" volts\" # gate to source voltage2 \n", + "RDS=1/((2*(IDSS/(-VP)))*(1-VGS/VP))\n", + "print \"RDS = 1/[(2*(IDSS/(-VP)))*(1-VGS/VP)]=%0.2f\"%(RDS),\" ohm\" # drain to source resistance for VGS=(-2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_3 Page No. 104" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "ID = 0.01 ampere\n", + "VDD= 24.00 volts\n", + "VT= 5.00 volts\n", + "VGS= 10.00 volts\n", + "KF = ID/(VGS-VT)**2 = 4.00e-04 A/V**2\n", + "VDS =VGS= 7.00 volts\n", + "ID =KF*(VGS-VT)**2= 1.60e-03 ampere\n", + "RL=(VDD-VDS)/ID= 1.06e+04 ohm\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "ID=10*10**(-3)\n", + "print \"ID = %0.2f\"%(ID),\" ampere\" # given drain current \n", + "VDD=(24)\n", + "print \"VDD= %0.2f\"%(VDD),\" volts\" # Drain voltage \n", + "VT=(5)\n", + "print \"VT= %0.2f\"%(VT),\" volts\" # Threshold voltage \n", + "VGS=(10)\n", + "print \"VGS= %0.2f\"%(VGS),\" volts\" # gate to source voltage1 \n", + "KF=ID/(VGS-VT)**2\n", + "print \"KF = ID/(VGS-VT)**2 = %0.2e\"%(KF),\" A/V**2\" # To calculate Scale factor for finding ID2\n", + "VDS=(7)\n", + "print \"VDS =VGS= %0.2f\"%(VDS),\" volts\" # drain to source voltage \n", + "VGS=(VDS)\n", + "ID=KF*(VGS-VT)**2\n", + "print \"ID =KF*(VGS-VT)**2= %0.2e\"%(ID),\" ampere\" # New drain current for VDS=24V\n", + "RL=(VDD-VDS)/ID\n", + "print \"RL=(VDD-VDS)/ID= %0.2e\"%(RL)+ \" ohm\" #calculation for load resistance at VDS=24V" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_4 Page No. 105" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "part(i) \n", + "IDSS = 0.01 ampere\n", + "VP= 2.00 volts\n", + "IDQ = 0.00 ampere\n", + "gm =[(2)*sqrt(IDQ*IDSS)]/VP= 4.70e-03 A/V\n", + "part(ii) \n", + "IDQ = 0.01 ampere\n", + "IDSS = 0.01 ampere\n", + "VP= 6.00 volts\n", + "gm =[(2)*sqrt(IDQ*IDSS)]/VP= 3.17e-03 A/V\n", + "part(iii) \n", + "IDQ = 1.00e-03 ampere\n", + "KF = 2.50e-04 A/V**2\n", + "gm =sqrt(4*IDQ*KF)= 1.00e-03 A/V\n", + "part(iv) \n", + "IDQ = 9.10e-04 ampere\n", + "KF = 3.75e-04 A/V**2\n", + "gm =sqrt(4*IDQ*KF)= 1.17e-03 A/V\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "from __future__ import division \n", + "print \"part(i) \"# part(i) of this question\n", + "IDSS=5*10**(-3)\n", + "print \"IDSS = %0.2f\"%(IDSS),\" ampere\" # maximum drain current JFET 1\n", + "VP=(2)\n", + "print \"VP= %0.2f\"%(VP),\" volts\" # pinch off voltage for JFET 1\n", + "IDQ=4.42*10**(-3)\n", + "print \"IDQ = %0.2f\"%(IDQ),\" ampere\" # drain current for JFET 1\n", + "gm=((2)*sqrt(IDQ*IDSS))/VP\n", + "print \"gm =[(2)*sqrt(IDQ*IDSS)]/VP= %0.2e\"%(gm),\" A/V\"# calculating transconductance for JFET with IDQ = 4.42 mA\n", + "\n", + "print \"part(ii) \"# part(ii) of this question\n", + "IDQ=6.04*10**(-3)\n", + "print \"IDQ = %0.2f\"%(IDQ),\" ampere\" # drain current for JFET 1\n", + "IDSS=15*10**(-3)\n", + "print \"IDSS = %0.2f\"%(IDSS),\" ampere\" # maximum drain current JFET2\n", + "VP=(6)\n", + "print \"VP= %0.2f\"%(VP),\" volts\" # pinch off voltage for JFET2 \n", + "gm=((2)*sqrt(IDQ*IDSS))/VP\n", + "print \"gm =[(2)*sqrt(IDQ*IDSS)]/VP= %0.2e\"%(gm),\" A/V\"# calculating transconductance for JFET with IDQ = 6.04 mA\n", + "\n", + "print \"part(iii) \"# part(iii) of this question\n", + "IDQ=1*10**(-3)\n", + "print \"IDQ = %0.2e\"%(IDQ),\" ampere\" # drain current for EMOSFET 1\n", + "KF=0.25*10**(-3)\n", + "print \"KF = %0.2e\"%(KF),\" A/V**2\" # Scale factor for finding EMOSFET1\n", + "gm=sqrt(4*IDQ*KF)\n", + "print \"gm =sqrt(4*IDQ*KF)= %0.2e\"%(gm),\" A/V\"# calculating transconductance for EMOSFET1 with IDQ = 1 mA\n", + "\n", + "print \"part(iv) \"# part(iv) of this question\n", + "IDQ=0.91*10**(-3)\n", + "print \"IDQ = %0.2e\"%(IDQ),\" ampere\" # drain current for EMOSFET 2\n", + "KF=0.375*10**(-3)\n", + "print \"KF = %0.2e\"%(KF),\" A/V**2\" # Scale factor for finding EMOSFET2\n", + "gm=sqrt(4*IDQ*KF)\n", + "print \"gm =sqrt(4*IDQ*KF)= %0.2e\"%(gm),\" A/V\"# calculating transconductance for EMOSFET2 with IDQ = 0.91 mA" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_5 Page No. 106" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "IDQmax = 0.01 ampere\n", + "IDQmin = 0.00 ampere\n", + "VDD= 20.00 volts\n", + "VDSmin= 6.00 volts\n", + "ID = 2.40e-03 ampere\n", + "VGG= 3.00 volts\n", + "Ri= 1.00e+05 ohm\n", + "RF= (VGG-0)/(ID-0)= 1250.00 ohm\n", + "R1= VDD*Ri/VGG= 6.67e+05 ohm\n", + "R2= R1*VGG/(VDD-VGG)= 1.18e+05 ohm\n", + "RL=[((VDD-VDSmin)/IDmax)-RF]=1550.00 ohm\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "IDQmax=5*10**(-3)\n", + "print \"IDQmax = %0.2f\"%(IDQmax),\" ampere\" # drain current for JFET for maximum transfer characteristics\n", + "IDmax=IDQmax# maximum drain current will be given by IDQmax\n", + "IDQmin=3*10**(-3)\n", + "print \"IDQmin = %0.2f\"%(IDQmin),\" ampere\" # drain current for JFET for minimum transfer characteristics \n", + "VDD=(20)\n", + "print \"VDD= %0.2f\"%(VDD),\" volts\" # Drain voltage supply\n", + "VDSmin=(6)\n", + "print \"VDSmin= %0.2f\"%(VDSmin),\" volts\" # minimum Drain to source voltage supply\n", + "ID=2.4*10**(-3)\n", + "print \"ID = %0.2e\"%(ID),\" ampere\" # drain current chosen for operation within max and min limits \n", + "VGG=3\n", + "print \"VGG= %0.2f\"%(VGG),\" volts\" # Gate voltage from fig.\n", + "Ri=100*10**(3)\n", + "print \"Ri= %0.2e\"%(Ri)+ \" ohm\" #eqivalent input resistance\n", + "RF=(VGG-0)/(ID-0)\n", + "print \"RF= (VGG-0)/(ID-0)= %0.2f\"%(RF)+ \" ohm\" #calculation for feedback resistance \n", + "R1=VDD*Ri/VGG #using formulae VGG=VDD*Ri/R1\n", + "print \"R1= VDD*Ri/VGG= %0.2e\"%(R1)+ \" ohm\" #calculation for first resistance R1 at input side\n", + "R2=R1*VGG/(VDD-VGG)\n", + "print \"R2= R1*VGG/(VDD-VGG)= %0.2e\"%(R2)+ \" ohm\" #calculation for second resistance R2 at input side\n", + "RL=(((VDD-VDSmin)/IDmax)-RF) # using formulae VDD=IDmax(RL+RF)+VDSmin\n", + "print \"RL=[((VDD-VDSmin)/IDmax)-RF]=%0.2f\"%(RL)+ \" ohm\" #Load resistance calculation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_6 Page No. 107" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "IDSS = 0.05 ampere\n", + "VP= -10.00 volts\n", + "VGSQ= -5.00 volts\n", + "ID =IDSS*(1-VGS/VP)**2= 0.01 ampere\n", + "RF= (VGSQ)/(ID)= 400.00 ohm\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "IDSS=50*10**(-3)\n", + "print \"IDSS = %0.2f\"%(IDSS),\" ampere\" # maximum drain current JFET \n", + "VP=(-10)\n", + "print \"VP= %0.2f\"%(VP),\" volts\" # pinch off voltage for JFET \n", + "VGSQ=(-5)\n", + "print \"VGSQ= %0.2f\"%(VGSQ),\" volts\" # Gate operating point voltage \n", + "ID=IDSS*(1-VGSQ/VP)**2\n", + "print \"ID =IDSS*(1-VGS/VP)**2= %0.2f\"%(ID),\" ampere\" # drain current JFET \n", + "RF=abs(VGSQ/ID) \n", + "print \"RF= (VGSQ)/(ID)= %0.2f\"%(RF)+ \" ohm\" #calculation for feedback resistance " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_7 Page No. 108" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "IDSS = 0.01 ampere\n", + "RL= 910.00 ohm\n", + "RF= 2290.00 ohm\n", + "R1= 1.20e+07 ohm\n", + "R2= 8.57e+06 ohm\n", + "VDD= 24.00 volts\n", + "VP= -2.00 volts\n", + "VGG= VDD*R2/(R1+R2)=10.00 volts\n", + "Quadratic equation =5.244*ID**(2)-55.76*ID+144=0\n", + "ID = 0.00 ampere\n", + "Since ID <=IDSS, hence ID=6.214 mA cannot be chosen, so we chose ID=4.42 mA\n", + "IDQ =0.00 A\n", + "VGSQ = VGG-IDQ*RF = -0.12 volts\n", + "VDSQ= VDD-IDQ*(RL+RF)= 9.86 volts\n", + "VDGQ = VDSQ-VGSQ =9.98 volts\n", + "VDGQ >magnitude_VP,Hence FET is in pinch off region\n" + ] + } + ], + "source": [ + "from sympy import symbols,solve\n", + "from __future__ import division \n", + "IDSS=5*10**(-3)\n", + "print \"IDSS = %0.2f\"%(IDSS),\" ampere\" # maximum drain current JFET \n", + "RL=910\n", + "print \"RL= %0.2f\"%(RL)+ \" ohm\" #Load resistance\n", + "RF=2.29*10**(3) \n", + "print \"RF= %0.2f\"%(RF)+ \" ohm\" # feedback resistance \n", + "R1=12*10**(6)\n", + "print \"R1= %0.2e\"%(R1)+ \" ohm\" # first resistance R1 at input side\n", + "R2=8.57*10**(6)\n", + "print \"R2= %0.2e\"%(R2)+ \" ohm\" # second resistance R2 at input side\n", + "VDD=(24)\n", + "print \"VDD= %0.2f\"%(VDD),\" volts\" # Drain voltage supply\n", + "VP=(-2)\n", + "print \"VP= %0.2f\"%(VP),\" volts\" # pinch off voltage for JFET \n", + "VGG=(VDD*R2)/(R1+R2)\n", + "print \"VGG= VDD*R2/(R1+R2)=%0.2f\"%(VGG),\" volts\" # Gate voltage for JFET\n", + "print \"Quadratic equation =5.244*ID**(2)-55.76*ID+144=0\"# Forming Quadratic equation using VGS = VGG-ID*RF and ID = IDSS(1-VGS/VP)**2 where ID in mA\n", + "p = [5.244, -55.76, 144]\n", + "P=symbols('P')\n", + "ID=solve(p[0]*P**2+p[1]*P+p[2])[0]*10**(-3)# values of ID converted into Ampere by multiplying by 10**(-3)\n", + "print \"ID = %0.2f\"%(ID),\" ampere\" # drain current JFET \n", + "print \"Since ID <=IDSS, hence ID=6.214 mA cannot be chosen, so we chose ID=4.42 mA\"\n", + "IDQ=4.42*10**(-3) \n", + "print \"IDQ =%0.2f\"%(IDQ),\" A\"#Since ID <=IDSS, hence ID=6.214 mA cannot be chosen, so we chose ID=4.42 mA\n", + "VGSQ=VGG-IDQ*RF\n", + "print \"VGSQ = VGG-IDQ*RF = %0.2f\"%(VGSQ),\" volts\" # Gate operating point voltage \n", + "VDSQ=VDD-IDQ*(RL+RF)\n", + "print \"VDSQ= VDD-IDQ*(RL+RF)= %0.2f\"%(VDSQ),\" volts\" # Drain voltage for JFET\n", + "VDGQ=VDSQ-VGSQ\n", + "print \"VDGQ = VDSQ-VGSQ =%0.2f\"%(VDGQ),\" volts\" # Drain-Gate voltage for JFET\n", + "print \"VDGQ >magnitude_VP,Hence FET is in pinch off region\"" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_8 Page No. 108" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "IDSS = 0.01 ampere\n", + "RL= 910.00 ohm\n", + "RF= 2290.00 ohm\n", + "R1= 1.20e+07 ohm\n", + "R2= 8.57e+06 ohm\n", + "VDD= 24.00 volts\n", + "VP= -6.00 volts\n", + "VGG= VDD*R2/(R1+R2)=10.00 volts\n", + "Quadratic equation =5.244*ID**(2)-75.68*ID+256=0\n", + "ID = 0.01 ampere\n", + "VDG= 9.08 volts\n", + "since VDG < magnitude_VP for ID=9.0189 mA which is inappropriate for JFET pinch off region ,hence ID=5.4128 mA is choosen !\n", + "IDQ =0.01 ampere\n", + "VGSQ = VGG-IDQ*RF = -2.39 volts\n", + "VDSQ= VDD-IDQ*(RL+RF)= 6.69 volts\n", + "VDGQ = VDSQ-VGSQ =9.08 volts\n", + "VDGQ > VP,Hence FET is in pinch off region\n" + ] + } + ], + "source": [ + "from sympy import symbols,solve\n", + "from __future__ import division \n", + "IDSS=15*10**(-3)\n", + "print \"IDSS = %0.2f\"%(IDSS),\" ampere\" # maximum drain current of JFET \n", + "RL=910\n", + "print \"RL= %0.2f\"%(RL)+ \" ohm\" #Load resistance\n", + "RF=2.29*10**(3) \n", + "print \"RF= %0.2f\"%(RF)+ \" ohm\" # feedback resistance \n", + "R1=12*10**(6)\n", + "print \"R1= %0.2e\"%(R1)+ \" ohm\" # first resistance R1 at input side\n", + "R2=8.57*10**(6)\n", + "print \"R2= %0.2e\"%(R2)+ \" ohm\" # second resistance R2 at input side\n", + "VDD=(24)\n", + "print \"VDD= %0.2f\"%(VDD),\" volts\" # Drain voltage supply\n", + "VP=(-6)\n", + "print \"VP= %0.2f\"%(VP),\" volts\" # pinch off voltage for JFET \n", + "VGG=(VDD*R2)/(R1+R2)\n", + "print \"VGG= VDD*R2/(R1+R2)=%0.2f\"%(VGG),\" volts\" # Gate voltage for JFET\n", + "print \"Quadratic equation =5.244*ID**(2)-75.68*ID+256=0\"# where ID in mA\n", + "p = [5.244, -75.68, 256]\n", + "P=symbols('P')\n", + "ID=solve(p[0]*P**2+p[1]*P+p[2])[0]*10**(-3)#values of ID converted into Ampere by multiplying by 10**(-3)\n", + "print \"ID = %0.2f\"%(ID),\" ampere\" # drain current JFET \n", + "VDG=VDD-(ID*RL)-VGG\n", + "print \"VDG= %0.2f\"%(VDG),\" volts\" # Drain-gate voltage for JFET\n", + "print \"since VDG < magnitude_VP for ID=9.0189 mA which is inappropriate for JFET pinch off region ,hence ID=5.4128 mA is choosen !\" \n", + "IDQ=5.41*10**(-3) # since VDG < magnitude_VP for ID=9.0189 mA which is inappropriate for JFET pinch off region ,hence ID=5.4128 mA is choosen !\n", + "print \"IDQ =%0.2f\"%(IDQ),\" ampere\"\n", + "VGSQ=VGG-IDQ*RF\n", + "print \"VGSQ = VGG-IDQ*RF = %0.2f\"%(VGSQ),\" volts\" # Gate operating point voltage \n", + "VDSQ=VDD-IDQ*(RL+RF)\n", + "print \"VDSQ= VDD-IDQ*(RL+RF)= %0.2f\"%(VDSQ),\" volts\" # Drain voltage for JFET\n", + "VDGQ=VDSQ-VGSQ\n", + "print \"VDGQ = VDSQ-VGSQ =%0.2f\"%(VDGQ),\" volts\" # Drain-Gate voltage for JFET\n", + "print \"VDGQ > VP,Hence FET is in pinch off region\"\n", + "\n", + "# NOTE :all values of book ans is wrong so give note-INCOMPLETE QUESTION\n", + "#Roots for drain current quadratic equation are wrong in the book thus value for VGSQ,VDSQ and VDGQ are also wrong" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_9 Page No. 112" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RL= 12000.00 ohm\n", + "RF= 6000.00 ohm\n", + "R1= 1.20e+07 ohm\n", + "R2= 8.57e+06 ohm\n", + "VDD= 24.00 volts\n", + "VT= 3.00 volts\n", + "KF= 0.00 A/V**2\n", + "VGG= VDD*R2/(R1+R2)=10.00 volts\n", + "Quadratic equation =9*ID**(2)-25*ID+16=0\n", + "ID = 0.00 A\n", + "VGS = VGG-ID*RF = 4.00 volts\n", + "Since VGS < VT for ID=1.78 mA, hence ID = 1.78 mA cannot be chosen, so we chose ID= 1 mA as operating drain current IDQ\n", + "IDQ =0.00 A\n", + "VGSQ = VGG-IDQ*RF = 4.00 volts\n", + "VDSQ= VDD-IDQ*(RL+RF)= 6.00 volts\n" + ] + } + ], + "source": [ + "from sympy import symbols,solve\n", + "from __future__ import division \n", + "RL=12*10**(3)\n", + "print \"RL= %0.2f\"%(RL)+ \" ohm\" #Load resistance\n", + "RF=6*10**(3) \n", + "print \"RF= %0.2f\"%(RF)+ \" ohm\" # feedback resistance \n", + "R1=12*10**(6)\n", + "print \"R1= %0.2e\"%(R1)+ \" ohm\" # first resistance R1 at input side\n", + "R2=8.57*10**(6)\n", + "print \"R2= %0.2e\"%(R2)+ \" ohm\" # second resistance R2 at input side\n", + "VDD=(24)\n", + "print \"VDD= %0.2f\"%(VDD),\" volts\" # Drain voltage supply\n", + "VT=(3)\n", + "print \"VT= %0.2f\"%(VT),\" volts\" # Threshold voltage for n-channel EMOSFET\n", + "KF=0.25*10**(-3)\n", + "print \"KF= %0.2f\"%(KF),\" A/V**2\" # Constant for n-channel EMOSFET \n", + "VGG=(VDD*R2)/(R1+R2)\n", + "print \"VGG= VDD*R2/(R1+R2)=%0.2f\"%(VGG),\" volts\" # Gate voltage for n-channel EMOSFET \n", + "print \"Quadratic equation =9*ID**(2)-25*ID+16=0\"# IDS=KF*(VGS-VT)**2 and VGS=VGG-ID*RD ,so Quadratic equation formed is :IDS=KF*(VGG-ID*RD-VT)**2 where ID in mA\n", + "p = [9, -25, 16]\n", + "P=symbols('P')\n", + "ID=solve(p[0]*P**2+p[1]*P+p[2])[0]*10**(-3)#values of ID converted into Ampere by multiplying by 10**(-3)\n", + "print \"ID = %0.2f\"%(ID),\" A\" # drain current n-channel EMOSFET in Ampere \n", + "VGS=VGG-ID*RF# For ID=1.78 mA and ID=1mA\n", + "print \"VGS = VGG-ID*RF = %0.2f\"%(VGS),\" volts\" # Gate operating point voltage \n", + "print \"Since VGS < VT for ID=1.78 mA, hence ID = 1.78 mA cannot be chosen, so we chose ID= 1 mA as operating drain current IDQ\"\n", + "IDQ=1*10**(-3)\n", + "print \"IDQ =%0.2f\"%(IDQ),\"A\"#Since VGS < VT for ID=1.78 mA, hence ID = 1.78 mA cannot be chosen, so we chose ID= 1 mA as operating drain current IDQ\n", + "VGSQ=VGG-IDQ*RF\n", + "print \"VGSQ = VGG-IDQ*RF = %0.2f\"%(VGSQ),\" volts\" # Gate operating point voltage \n", + "VDSQ=VDD-IDQ*(RL+RF)\n", + "print \"VDSQ= VDD-IDQ*(RL+RF)= %0.2f\"%(VDSQ),\" volts\" # Drain voltage for n-channel EMOSFET \n", + "# NOTE:Value of VGS= -0.6676390 volts for ID=1.78 mA but in book given as -0.68 V" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_10 Page No. 113" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RL= 12000.00 ohm\n", + "RF= 6000.00 ohm\n", + "R1= 1.20e+07 ohm\n", + "R2= 8.57e+06 ohm\n", + "VDD= 24.00 volts\n", + "VT= 3.00 volts\n", + "KF= 0.00 A/V**2\n", + "VGG= VDD*R2/(R1+R2)=10.00 volts\n", + "Quadratic equation =36*ID**(2)-86.67*ID+49=0\n", + "ID = 0.00 A\n", + "VGS = VGG-ID*RF = 4.56 volts\n", + "Since VGS < VT for ID=1.5 mA, hence ID = 1.5 mA cannot be chosen, so we chose ID= 0.91 mA as operating drain current IDQ\n", + "IDQ =0.00 A\n", + "change in IDQ = 9.00 percent\n", + "VGSQ = VGG-IDQ*RF = 4.54 volts\n", + "VDSQ= VDD-IDQ*(RL+RF)= 7.62 volts\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "from __future__ import division \n", + "RL=12*10**(3)\n", + "print \"RL= %0.2f\"%(RL)+ \" ohm\" #Load resistance\n", + "RF=6*10**(3) \n", + "print \"RF= %0.2f\"%(RF)+ \" ohm\" # feedback resistance \n", + "R1=12*10**(6)\n", + "print \"R1= %0.2e\"%(R1)+ \" ohm\" # first resistance R1 at input side\n", + "R2=8.57*10**(6)\n", + "print \"R2= %0.2e\"%(R2)+ \" ohm\" # second resistance R2 at input side\n", + "VDD=(24)\n", + "print \"VDD= %0.2f\"%(VDD),\" volts\" # Drain voltage supply\n", + "VT=(3)\n", + "print \"VT= %0.2f\"%(VT),\" volts\" # Threshold voltage for n-channel EMOSFET\n", + "KF=0.375*10**(-3)\n", + "print \"KF= %0.2f\"%(KF),\" A/V**2\" # Constant for n-channel EMOSFET \n", + "VGG=(VDD*R2)/(R1+R2)\n", + "print \"VGG= VDD*R2/(R1+R2)=%0.2f\"%(VGG),\" volts\" # Gate voltage for n-channel EMOSFET \n", + "print \"Quadratic equation =36*ID**(2)-86.67*ID+49=0\"# IDS=KF*(VGS-VT)**2 and VGS=VGG-ID*RD ,so Quadratic equation formed is :IDS=KF*(VGG-ID*RD-VT)**2 ,where ID in mA\n", + "p = [36, -86.67, 49]\n", + "P=symbols('P')\n", + "ID=solve(p[0]*P**2+p[1]*P+p[2])[0]*10**(-3)#values of ID converted into Ampere by multiplying by 10**(-3)\n", + "print \"ID = %0.2f\"%(ID),\" A\" # drain current n-channel EMOSFET in Ampere \n", + "VGS=VGG-ID*RF# Gate voltage for ID = 1.5 mA and ID = 0.91 mA\n", + "print \"VGS = VGG-ID*RF = %0.2f\"%(VGS),\" volts\" # Gate voltage \n", + "print \"Since VGS < VT for ID=1.5 mA, hence ID = 1.5 mA cannot be chosen, so we chose ID= 0.91 mA as operating drain current IDQ\"\n", + "IDQ=0.91*10**(-3)\n", + "print \"IDQ =%0.2f\"%(IDQ),\" A\"#Since VGS < VT for ID=1.5 mA, hence ID = 1.5 mA cannot be chosen, so we chose ID= 0.91 mA as operating drain current IDQ\n", + "change_IDQ=((1-0.91)*100)/(1)# \n", + "print \"change in IDQ = %0.2f\"%(change_IDQ),\" percent\"# Percent change in IDQ from value 1 mA from its actual value IDQ=0.91mA\n", + "VGSQ=VGG-IDQ*RF\n", + "print \"VGSQ = VGG-IDQ*RF = %0.2f\"%(VGSQ),\" volts\" # Gate operating point voltage \n", + "VDSQ=VDD-IDQ*(RL+RF)\n", + "print \"VDSQ= VDD-IDQ*(RL+RF)= %0.2f\"%(VDSQ),\" volts\" # Drain voltage for n-channel EMOSFET \n", + "\n", + "\n", + "# note: in the textbook author has given KF = .375 but I have work with KF = .375*10**-3A/V**2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_11 Page No. 114" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RF= 6000.00 ohm\n", + "VDD= 20.00 volts\n", + "part(i) \n", + "VT= 2.00 volts\n", + "KF= 0.00 A/V**2\n", + "ID = 0.00 A\n", + "RL=[VDD-VT-sqrt(ID/KF)]/ID= 16000.00 ohm\n", + "part(ii) \n", + "VT= 3.00 volts\n", + "KF= 0.00 A/V**2\n", + "Quadratic equation =(256)*ID**(2)-(546.67)*ID+289=0\n", + "ID = 0.00 A\n", + "VDS =VDD-ID*RL = 4.60 volts\n", + "IDQ =0.00 A\n", + "Percentage change= 3.80 percent\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "from sympy import symbols,solve\n", + "from __future__ import division \n", + "RF=6*10**(3) \n", + "print \"RF= %0.2f\"%(RF)+ \" ohm\" # feedback resistance \n", + "VDD=(20)\n", + "print \"VDD= %0.2f\"%(VDD),\" volts\" # Drain voltage supply\n", + "print \"part(i) \"# part(i) of this question\n", + "VT=(2)\n", + "print \"VT= %0.2f\"%(VT),\" volts\" # Threshold voltage for EMOSFET\n", + "KF=0.25*10**(-3)\n", + "print \"KF= %0.2f\"%(KF),\" A/V**2\" # Constant for EMOSFET \n", + "ID=1*10**(-3)\n", + "print \"ID = %0.2f\"%(ID),\" A\" # drain current EMOSFET in Ampere \n", + "RL=(VDD-VT-sqrt(ID/KF))/ID # Using formulae ID=KF*(VDD-ID*RL-VT)\n", + "print \"RL=[VDD-VT-sqrt(ID/KF)]/ID= %0.2f\"%(RL)+ \" ohm\" #Load resistance\n", + "print \"part(ii) \"# part(ii) of this question\n", + "VT=(3)\n", + "print \"VT= %0.2f\"%(VT),\" volts\" # Threshold voltage for EMOSFET\n", + "KF=0.375*10**(-3)\n", + "print \"KF= %0.2f\"%(KF),\" A/V**2\" # Constant for EMOSFET \n", + "print \"Quadratic equation =(256)*ID**(2)-(546.67)*ID+289=0\"#IDS=KF*(VGS-VT)**2 =KF*(VDS-VT)**2 and VDS=VDD-ID*RL,so Quadratic equation is:IDS=KF*(VDD-ID*RL-VT)**2 ,where ID in mA\n", + "p = [256, -546.66 , 289]\n", + "P=symbols('P')\n", + "ID=solve(p[0]*P**2+p[1]*P+p[2])[0]*10**(-3)#values of ID converted into Ampere by multiplying by 10**(-3)\n", + "print \"ID = %0.2f\"%(ID),\" A\" # drain current EMOSFET in Ampere \n", + "VDS=VDD-ID*RL# Drain voltage for ID = 1.173 mA and ID = 0.962 mA\n", + "print \"VDS =VDD-ID*RL = %0.2f\"%(VDS),\" volts\" # Drain voltage \n", + "IDQ=0.962*10**(-3)\n", + "print \"IDQ =%0.2f\"%(IDQ),\" A\"#Since VDS < VT for ID=1.173 mA, hence ID = 1.173 mA cannot be chosen, so we chose ID= 0.962 mA as operating drain current IDQ\n", + "Percentage_change=((1-0.962)*100)/(1)\n", + "print \"Percentage change= %0.2f\"%(Percentage_change),\" percent\"# Percent change in IDQ value from 1 mA(part(i)) to its value ( of part(ii))IDQ=0.91mA\n", + "# NOTE: part(ii):the values of ID = 1.173 mA or ID = 0.962 mA but in book given as ID= 1.197 mA and ID = 0.939 mA .Hence (correct) Percentage_change in ID= 3.8 % but in book given as 6.1 % \n", + "# ANS is not correct check &correct" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_12 Page No. 115" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "VDD= 5.00 volts\n", + "RL1= 1.25e+05 ohm\n", + "RL2= 2.00e+05 ohm\n", + "IDON1 =0.00 A\n", + "IDON2 =0.00 A\n", + "VDON1=VDD-IDON1*RL1= 0.64 volts\n", + "VDON2=VDD-IDON2*RL2= 0.50 volts\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "VDD=(5)\n", + "print \"VDD= %0.2f\"%(VDD),\" volts\" # Drain voltage supply\n", + "RL1=125*10**(3)\n", + "print \"RL1= %0.2e\"%(RL1)+ \" ohm\" #Load resistance\n", + "RL2=200*10**(3)\n", + "print \"RL2= %0.2e\"%(RL2)+ \" ohm\" #Load resistance\n", + "IDON1=34.88*10**(-6)\n", + "print \"IDON1 =%0.2f\"%(IDON1),\" A\"#Drain current for load line 1 from fig.\n", + "IDON2=22.5*10**(-6)\n", + "print \"IDON2 =%0.2f\"%(IDON2),\" A\"#Drain current for load line 2 from fig.\n", + "VDON1=VDD-IDON1*RL1\n", + "print \"VDON1=VDD-IDON1*RL1= %0.2f\"%(VDON1),\" volts\" # output voltage at drain terminal for IDON1\n", + "VDON2=VDD-IDON2*RL2\n", + "print \"VDON2=VDD-IDON2*RL2= %0.2f\"%(VDON2),\" volts\" # output voltage at drain terminal for IDON2" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_13 Page No. 120" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "IDSS = 0.01 ampere\n", + "VP= -4.00 volts\n", + "VGS= 0.00 volts\n", + "VDD= 10.00 volts\n", + "RL= 500.00 ohm\n", + "VDS=VDD-ID*RL= 5.00 volts\n", + "VDS>VP,so pinch off region\n", + "RL= 750.00 ohm\n", + "VDS=VDD-ID*RL= 2.50 volts\n", + "VDS<VP,so ohmic region\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "IDSS=10*10**(-3)\n", + "print \"IDSS = %0.2f\"%(IDSS),\" ampere\" # maximum drain current for n-channel DEMOSFET\n", + "ID=IDSS # since VGS=0V, so ID=maximum\n", + "VP=(-4)\n", + "print \"VP= %0.2f\"%(VP),\" volts\" # pinch off voltage \n", + "VGS=(0)\n", + "print \"VGS= %0.2f\"%(VGS),\" volts\" # Gate to source voltage \n", + "VDD=(10)\n", + "print \"VDD= %0.2f\"%(VDD),\" volts\" # Drain supply voltage \n", + "RL=0.5*10**(3)\n", + "print \"RL= %0.2f\"%(RL)+ \" ohm\" #Load resistance\n", + "VDS=VDD-ID*RL\n", + "print \"VDS=VDD-ID*RL= %0.2f\"%(VDS),\" volts\" # Drain to source voltage ,since VDS>VP DEMOSFET is in pinch off\n", + "print \"VDS>VP,so pinch off region\"\n", + "RL=0.75*10**(3)\n", + "print \"RL= %0.2f\"%(RL)+ \" ohm\" # New Load resistance value\n", + "VDS=VDD-ID*RL\n", + "print \"VDS=VDD-ID*RL= %0.2f\"%(VDS),\" volts\" # New Drain to source voltage for RL=750 ohm\n", + "print \"VDS<VP,so ohmic region\"# since VDS < VP DEMOSFET is in ohmic region for RL=750 ohm and hence will not operate as a current source" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_14 Page No. 122" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "KF1 = 2.50e-04 A/V**2\n", + "KF2 = 2.50e-04 A/V**2\n", + "IQ= 1.00e-03 ampere\n", + "VT1 = 2.00 volts\n", + "VT2 = 2.00 volts\n", + "VDD= 15.00 volts\n", + "IREF =IQ= 1.00e-03 ampere\n", + "VGS= VT1+sqrt(2*IREF/KF1)=4.83 volts\n", + "R= (VDD-VGS)/IREF=10171.57 ohm\n" + ] + } + ], + "source": [ + "from math import sqrt\n", + "from __future__ import division \n", + "KF1=0.25*10**(-3)\n", + "print \"KF1 = %0.2e\"%(KF1),\" A/V**2\" # Scale factor \n", + "KF2=KF1\n", + "print \"KF2 = %0.2e\"%(KF2),\" A/V**2\" # Scale factor \n", + "IQ=1*10**(-3)\n", + "print \"IQ= %0.2e\"%(IQ),\" ampere\" # constant current source value\n", + "VT1=2\n", + "print \"VT1 = %0.2f\"%(VT1),\" volts\"# Threshold voltage\n", + "VT2=VT1\n", + "print \"VT2 = %0.2f\"%(VT2),\" volts\"# Threshold voltage\n", + "VDD=(15)\n", + "print \"VDD= %0.2f\"%(VDD),\" volts\" # Drain supply voltage \n", + "IREF=IQ\n", + "print \"IREF =IQ= %0.2e\"%(IREF),\" ampere\" # Reference current value\n", + "VGS=VT1+sqrt(2*IREF/KF1) # Formulae\n", + "print \"VGS= VT1+sqrt(2*IREF/KF1)=%0.2f\"%(VGS),\" volts\" # Gate to source voltage \n", + "R=(VDD-VGS)/IREF\n", + "print \"R= (VDD-VGS)/IREF=%0.2f\"%(R)+ \" ohm\" # resistance value to obtain constant current\n", + "# ERROR NOTE:values of VGS and R (correct) are 4.8284271 volts and 10171.573 ohm respectively but given in book are VGS=4V and R=11 kilo ohms" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 4_15 Page No. 123" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RON= 100.00 ohm\n", + "ROFF= 1.00e+10 ohm\n", + "Vip= 1.00 volts\n", + "Rs= 100.00 ohm\n", + "RL= 10000.00 ohm\n", + "part(i) \n", + "Vo=(Vip*RL)/(RL+RON+Rs)= 0.98 volts\n", + "ErON=[Vip*(RON+Rs)/(RL+RON+Rs)]*100= 1.96 percent\n", + "vOFF=(Vip*RL)/ROFF= 0.00 volts\n", + "OFF_isolation=20*log10(Vip/vOFF)= 120.00 dB\n", + "part(ii) \n", + "vOFF=(Vip*RON)/(Rs+RON)= 0.50 volts\n", + "OFF_isolation=20*log10((Rs+RON)/RON)= 6.02 dB\n" + ] + } + ], + "source": [ + "from math import log10\n", + "from __future__ import division \n", + "RON=100\n", + "print \"RON= %0.2f\"%(RON)+ \" ohm\" #ON resistance of analog series switch\n", + "ROFF=10**(10)\n", + "print \"ROFF= %0.2e\"%(ROFF)+ \" ohm\" #OFF resistance analog series switch\n", + "Vip=1\n", + "print \"Vip= %0.2f\"%(Vip),\" volts\"# Peak amplitude of analog voltage\n", + "Rs=100\n", + "print \"Rs= %0.2f\"%(Rs)+ \" ohm\" #Voltage source resistance\n", + "RL=10*10**(3)\n", + "print \"RL= %0.2f\"%(RL)+ \" ohm\" #Load resistance\n", + "print \"part(i) \"# part(i) of this question\n", + "Vo=(Vip*RL)/(RL+RON+Rs)\n", + "print \"Vo=(Vip*RL)/(RL+RON+Rs)= %0.2f\"%(Vo),\" volts\"# ON voltage\n", + "ErON=(Vip*(RON+Rs)/(RL+RON+Rs))*100\n", + "print \"ErON=[Vip*(RON+Rs)/(RL+RON+Rs)]*100= %0.2f\"%(ErON),\" percent\"# Output voltage error \n", + "vOFF=(Vip*RL)/ROFF\n", + "print \"vOFF=(Vip*RL)/ROFF= %0.2f\"%(vOFF),\" volts\"# Output voltage in OFF state\n", + "OFF_isolation=20*log10(Vip/vOFF)\n", + "print \"OFF_isolation=20*log10(Vip/vOFF)= %0.2f\"%(OFF_isolation),\" dB\" # OFF_isolation=20*log10(Vip/vOFF) in dB# Thus ON error and OFF isolation decrease with increasing values of RL.\n", + "print \"part(ii) \"# part(ii) of this question\n", + "vOFF=(Vip*RON)/(Rs+RON)\n", + "print \"vOFF=(Vip*RON)/(Rs+RON)= %0.2f\"%(vOFF),\" volts\"# Output voltage in OFF state for analog shunt switch\n", + "OFF_isolation=20*log10((Rs+RON)/RON)# OFF_isolation of shunt switch\n", + "print \"OFF_isolation=20*log10((Rs+RON)/RON)= %0.2f\"%(OFF_isolation),\" dB\"# Thus shunt switch is inferior to series switch in its OFF isolation property\n", + "\n", + "# ERROR NOTE: in question the author has given RL = 10K but in solution he has used RL = 1 k ... I have done programming using RL = 10 K." + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch5.ipynb b/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch5.ipynb new file mode 100644 index 00000000..4278055d --- /dev/null +++ b/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch5.ipynb @@ -0,0 +1,566 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 5 - Basic Transistor Amplifiers" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_1 Page No. 136" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RL= 5000.00 ohm\n", + "R1= 100000.00 ohm\n", + "R2= 10000.00 ohm\n", + "rc= 50000.00 ohm\n", + "rbe= 1000.00 ohm\n", + "gm = 0.05 A/V\n", + "For BJT,Av=(-gm*RL)= -250.00\n", + "AI=(gm*rbe)= 50.00\n", + "gm = 0.01 A/V\n", + "For FET,Av=(-gm*RL)= -25.00 \n", + "R0= 50000.00 ohm\n", + "Ri= 1000.00 ohm\n", + "RB=(R1*R2)/(R1+R2)= 9090.91 ohm\n", + "Ri= (RB*rbe)/(RB+rbe)=900.90 ohm\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "RL=5*10**(3)\n", + "print \"RL= %0.2f\"%(RL),\" ohm\" #Load resistance\n", + "R1=100*10**(3)\n", + "print \"R1= %0.2f\"%(R1),\" ohm\" # resistance\n", + "R2=10*10**(3)\n", + "print \"R2= %0.2f\"%(R2),\" ohm\" # resistance\n", + "rc=50*10**(3)\n", + "print \"rc= %0.2f\"%(rc),\" ohm\" #collector resistance\n", + "rd=rc # Drain and collector resistance are equal\n", + "rbe=1*10**(3)\n", + "print \"rbe= %0.2f\"%(rbe),\" ohm\" #Load resistance\n", + "gm=50*10**(-3)\n", + "print \"gm = %0.2f\"%(gm),\" A/V\"# transconductance for BJT \n", + "Av=(-gm*RL)\n", + "print \"For BJT,Av=(-gm*RL)= %0.2f\"%(Av) #Voltage gain for BJT\n", + "AI=gm*rbe\n", + "print \"AI=(gm*rbe)= %0.2f\"%(AI) # current gain for BJT\n", + "gm=5*10**(-3)\n", + "print \"gm = %0.2f\"%(gm),\" A/V\"# transconductance for FET \n", + "Av=(-gm*RL)\n", + "print \"For FET,Av=(-gm*RL)= %0.2f\"%(Av),\" \" # gain for FET\n", + "R0=rd\n", + "print \"R0= %0.2f\"%(R0),\" ohm\" #output resistance for FET and BJT\n", + "Ri=rbe\n", + "print \"Ri= %0.2f\"%(Ri),\" ohm\" #BJT input resistance \n", + "RB=(R1*R2)/(R1+R2)\n", + "print \"RB=(R1*R2)/(R1+R2)= %0.2f\"%(RB),\" ohm\" # eqivalent Base resistance for BJT\n", + "Ri=(RB*rbe)/(RB+rbe)\n", + "print \"Ri= (RB*rbe)/(RB+rbe)=%0.2f\"%(Ri),\" ohm\" #New value of BJT input resistance " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_2 Page No. 137" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RL= 5000.00 ohm\n", + "R1= 100000.00 ohm\n", + "R2= 100000.00 ohm\n", + "Rs= 5000.00 ohm\n", + "Beta_o = 50.00\n", + "rbe= 1000.00 ohm\n", + "gm = 0.05 A/V\n", + "rc= 50000.00 ohm\n", + "Av=RL/(RL+1/gm)= 1.00\n", + "Avs=RL/[(Rs/Beta_o)+(1/gm)+(RL)]= 0.98\n", + "AI=-(Beta_o+1)= -51.00\n", + "R0= (Rs+rbe)/Beta_o=120.00 ohm\n", + "Ri= rbe+Beta_o*RL=251000.00 ohm\n", + "RB=(R1*R2)/(R1+R2)= 50000.00 ohm\n", + "Rieff= (Ri*RB)/(RB+Ri)=41694.35 ohm\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "RL=5*10**(3)\n", + "print \"RL= %0.2f\"%(RL),\" ohm\" #Load resistance\n", + "R1=100*10**(3)\n", + "print \"R1= %0.2f\"%(R1),\" ohm\" # resistance\n", + "R2=100*10**(3)\n", + "print \"R2= %0.2f\"%(R2),\" ohm\" # resistance\n", + "Rs=5*10**(3)\n", + "print \"Rs= %0.2f\"%(Rs),\" ohm\" # Source resistance\n", + "Beta_o=50\n", + "print \"Beta_o = %0.2f\"%(Beta_o) #BJT gain\n", + "rbe=1*10**(3)\n", + "print \"rbe= %0.2f\"%(rbe),\" ohm\" #Base-emitter resistance\n", + "gm=50*10**(-3)\n", + "print \"gm = %0.2f\"%(gm),\" A/V\"# transconductance for BJT \n", + "rc=50*10**(3)\n", + "print \"rc= %0.2f\"%(rc),\" ohm\" #collector resistance\n", + "Av=RL/(RL+1/gm) # Gain formulae\n", + "print \"Av=RL/(RL+1/gm)= %0.2f\"%(Av) # voltage gain for BJT\n", + "Avs=RL/((Rs/Beta_o)+(1/gm)+(RL))\n", + "print \"Avs=RL/((Rs/Beta_o)+(1/gm)+(RL))= %0.2f\"%(Avs) # Overall voltage gain for BJT\n", + "AI=-(Beta_o+1)\n", + "print \"AI=-(Beta_o+1)= %0.2f\"%(AI) # current gain for BJT\n", + "R0=(Rs+rbe)/Beta_o\n", + "print \"R0= (Rs+rbe)/Beta_o=%0.2f\"%(R0),\" ohm\" #output resistance for BJT\n", + "Ri=rbe+Beta_o*RL # formulae\n", + "print \"Ri= rbe+Beta_o*RL=%0.2f\"%(Ri),\" ohm\" # value of BJT input resistance \n", + "RB=(R1*R2)/(R1+R2)\n", + "print \"RB=(R1*R2)/(R1+R2)= %0.2f\"%(RB),\" ohm\" # eqivalent Base resistance for BJT\n", + "Rieff=(Ri*RB)/(RB+Ri)\n", + "print \"Rieff= (Ri*RB)/(RB+Ri)=%0.2f\"%(Rieff),\" ohm\" #Effective value of BJT input resistance " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_3 Page No. 142" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RL= 5000.00 ohm\n", + "RF= 5000.00 ohm\n", + "Beta_o = 50.00\n", + "rbe= 1000.00 ohm\n", + "gm = 0.05 A/V\n", + "rc= 50000.00 ohm\n", + "Ri= rbe+RF*(1+gm*rbe)=256000.00 ohm\n", + "Av=(-gm*RL)/(1+gm*RF)= -1.00\n", + "AI=(Beta_o)= 50.00\n", + "R0= Beta_o*rc=2500000.00 ohm\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "RL=5*10**(3)\n", + "print \"RL= %0.2f\"%(RL),\" ohm\" #Load resistance\n", + "RF=5*10**(3)\n", + "print \"RF= %0.2f\"%(RF),\" ohm\" # resistance\n", + "Beta_o=50\n", + "print \"Beta_o = %0.2f\"%(Beta_o) #BJT gain\n", + "rbe=1*10**(3)\n", + "print \"rbe= %0.2f\"%(rbe),\" ohm\" #Base-emitter resistance\n", + "gm=50*10**(-3)\n", + "print \"gm = %0.2f\"%(gm),\" A/V\"# transconductance for BJT \n", + "rc=50*10**(3)\n", + "print \"rc= %0.2f\"%(rc),\" ohm\" #collector resistance\n", + "Ri=rbe+RF*(1+gm*rbe) # formulae\n", + "print \"Ri= rbe+RF*(1+gm*rbe)=%0.2f\"%(Ri),\" ohm\" # BJT input resistance \n", + "Av=(-gm*RL)/(1+gm*RF)# formulae\n", + "print \"Av=(-gm*RL)/(1+gm*RF)= %0.2f\"%(Av) # voltage gain for BJT\n", + "AI=Beta_o\n", + "print \"AI=(Beta_o)= %0.2f\"%(AI) # current gain for BJT\n", + "R0=Beta_o*rc\n", + "print \"R0= Beta_o*rc=%0.2f\"%(R0),\" ohm\" #output resistance for BJT" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_4 Page No. 148" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RL= 5000.00 ohm\n", + "RF= 2500.00 ohm\n", + "Rs= 50.00 ohm\n", + "ro= 50000.00 ohm\n", + "rc= 50000.00 ohm\n", + "rbe= 1000.00 ohm\n", + "For CG Amplifier\n", + "gm = 0.01 A/V\n", + "Ri= 1/gm=200.00 ohm\n", + "Avs=gm*RL/(1+gm*Rs)= 20.00\n", + "Ro=rd*(1+gm*Rs)=62500.00 ohm\n", + "For CB Amplifier\n", + "gm = 0.05 A/V\n", + "Ri= 1/gm=20.00 ohm\n", + "Avs=gm*RL/(1+gm*Rs)= 71.43\n", + "Ro=gm*(rbe*rc)=2.50e+06 ohm\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "RL=5*10**(3)\n", + "print \"RL= %0.2f\"%(RL),\" ohm\" #Load resistance\n", + "RF=2.5*10**(3)\n", + "print \"RF= %0.2f\"%(RF),\" ohm\" # resistance\n", + "Rs=50\n", + "print \"Rs= %0.2f\"%(Rs),\" ohm\" # resistance\n", + "ro=50*10**(3)\n", + "print \"ro= %0.2f\"%(ro),\" ohm\" # output resistance\n", + "rd=ro # drain resistance\n", + "rc=ro# Collector resistance\n", + "print \"rc= %0.2f\"%(rc),\" ohm\" # Collector resistance\n", + "rbe=1*10**(3)\n", + "print \"rbe= %0.2f\"%(rbe),\" ohm\" #base -emitter resistance\n", + "print \"For CG Amplifier\"\n", + "gm=5*10**(-3)\n", + "print \"gm = %0.2f\"%(gm),\" A/V\"# transconductance for FET \n", + "Ri=1/gm # formulae\n", + "print \"Ri= 1/gm=%0.2f\"%(Ri),\" ohm\" # value of CGA (common gate amplifier)input resistance for FET\n", + "Avs=gm*RL/(1+gm*Rs)\n", + "print \"Avs=gm*RL/(1+gm*Rs)= %0.2f\"%(Avs) # Overall voltage gain for FET (CGA)\n", + "Ro=rd*(1+gm*Rs)\n", + "print \"Ro=rd*(1+gm*Rs)=%0.2f\"%(Ro),\" ohm\" #output resistance for FET (CGA)\n", + "print \"For CB Amplifier\"\n", + "gm=50*10**(-3)\n", + "print \"gm = %0.2f\"%(gm),\" A/V\"# transconductance for BJT\n", + "Ri=1/gm # formulae\n", + "print \"Ri= 1/gm=%0.2f\"%(Ri),\" ohm\" # value of CBA (common base amplifier)input resistance for BJT\n", + "Avs=gm*RL/(1+gm*Rs)\n", + "print \"Avs=gm*RL/(1+gm*Rs)= %0.2f\"%(Avs) # Overall voltage gain for BJT (CBA)\n", + "Ro=gm*(rbe*rc)\n", + "print \"Ro=gm*(rbe*rc)=%0.2e\"%(Ro),\" ohm\" #output resistance for BJT (CBA)\n", + "\n", + "#NOTE: I have calculated first all the parameters for CG amplifier and then for CB amplifier but in book parameters have been calculated alternatingly for CG and CB amplifiers." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_5 Page No. 152" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RL= 5000.00 ohm\n", + "Cc= 1.00e-07 farad\n", + "Ri= 100000.00 ohm\n", + "CSH= 0.00 farad\n", + "Avm=100.00\n", + "fL=1/(2*(pi)*(Ri)*(Cc))= 15.92 Hz \n", + "fH=1/(2*(pi)*(RL)*(CSH))= 3.18e+05 Hz\n", + "BW=fH-fL= 318293.97 Hz\n", + "fT=Avm*fH= 3.18e+07 Hz\n" + ] + } + ], + "source": [ + "from math import pi\n", + "from __future__ import division \n", + "RL=5*10**(3)\n", + "print \"RL= %0.2f\"%(RL),\" ohm\" #Load resistance\n", + "Cc=0.1*10**(-6)\n", + "print \"Cc= %0.2e\"%(Cc),\" farad\" #capacitance\n", + "Ri=100*10**(3)\n", + "print \"Ri= %0.2f\"%(Ri),\" ohm\" # input resistance for Amplifier\n", + "CSH=100*10**(-12)\n", + "print \"CSH= %0.2f\"%(CSH),\" farad\" #shunt load capacitance\n", + "Avm=100\n", + "print \"Avm=%0.2f\"%(Avm) # Mid-frequency gain \n", + "fL=1/(2*(pi)*(Ri)*(Cc))\n", + "print \"fL=1/(2*(pi)*(Ri)*(Cc))= %0.2f\"%(fL),\"Hz \" # Lower cutoff-frequency \n", + "fH=1/(2*(pi)*(RL)*(CSH))\n", + "print \"fH=1/(2*(pi)*(RL)*(CSH))= %0.2e\"%(fH),\" Hz\" # Higher cutoff-frequency \n", + "BW=fH-fL\n", + "print \"BW=fH-fL= %0.2f\"%(BW),\" Hz\" # Bandwidth\n", + "fT=Avm*fH\n", + "print \"fT=Avm*fH= %0.2e\"%(fT),\" Hz\" # Unity gain bandwidth\n", + "# ERROR NOTE: calculated value of lower cutoff frequency, fL= 15.915494 Hz but in book given as 15.0 Hz " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_6 Page No. 152" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "IDSS = 0.02 ampere\n", + "VP= -4.00 volts\n", + "VGSQ= -2.00 volts\n", + "Vsm= 0.20 volts\n", + "D=(((0.5)*(Vsm)**2)/(4*Vsm))*100 =2.50 % \n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "IDSS=16*10**(-3)\n", + "print \"IDSS = %0.2f\"%(IDSS),\" ampere\" # maximum drain current JFET \n", + "VP=(-4)\n", + "print \"VP= %0.2f\"%(VP),\" volts\" # pinch off voltage for JFET \n", + "VGSQ=(-2)\n", + "print \"VGSQ= %0.2f\"%(VGSQ),\" volts\" # Gate operating point voltage \n", + "Vsm=(0.2)\n", + "print \"Vsm= %0.2f\"%(Vsm),\" volts\" # sinusoidal input voltage for JFET \n", + "D=(((0.5)*(Vsm)**2)/(4*Vsm))*100 # derived from ID=IDSS(1-VGS/VP)**2 and putting value of VGS=VGSQ+Vs, where Vs=Vsm sinwt\n", + "print \"D=(((0.5)*(Vsm)**2)/(4*Vsm))*100 =%0.2f\"%(D),\"% \" # Percentage second harmonic distortion calculation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_7 Page No. 153" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ic = 1.00e-03 ampere\n", + "rbe= 2000.00 ohm\n", + "gm = 0.05 A/V\n", + "Beta_o = 100.00 \n", + "rc= 50000.00 ohm\n", + "Cbe= 1.00e-11 farad\n", + "Ctc= 1.00e-12 farad\n", + "part(i)\n", + "RL= 10000.00 ohm\n", + "Rs= 500.00 ohm\n", + "Rth=(Rs*rbe)/(Rs+rbe)=400.00 ohm\n", + "Avm=(-gm*RL)=-500.00\n", + "CM=Ctc*(1-Avm)= 0.00 farad\n", + "Ci=Cbe= 0.00 farad\n", + "fHi=1/(2*(pi)*(Rth)*(Cbe+CM))= 778644.54 Hz\n", + "Ri=rbe =2000.00 ohm\n", + "R0= rc=50000.00 ohm\n", + "fB=1/(2*(pi)*(rbe)*(Cbe))= 7.96e+06 Hz\n", + "fT=Beta_o*fB= 7.96e+08 Hz\n", + "part(ii)\n", + "Rs= 50000.00 ohm\n", + "RL= 1000.00 ohm\n", + "fhi=1/(2*(pi)*(Rs)*(Ctc))= 3.18e+06 Hz\n", + "Avm=(gm*RL)/(1+gm*RL)=0.98\n", + "Ro= 1/gm=20.00 ohm\n", + "Ri=Beta_o*RL =100000.00 ohm\n", + "part(iii)\n", + "RL= 10000.00 ohm\n", + "Rs= 50.00 ohm\n", + "fHi=gm/(2*(pi)*(Cbe))= 7.96e+08 Hz\n", + "fHo=gm/(2*(pi)*(Ctc)*(RL))= 1.59e+07 Hz\n", + "Avs=(gm*RL)/(1+gm*Rs)=142.86\n", + "Ri= 1/gm=20.00 ohm\n", + "Ro=Beta_o*rc =5.00e+06 ohm\n" + ] + } + ], + "source": [ + "from math import pi\n", + "from __future__ import division \n", + "Ic=1*10**(-3)\n", + "print \"Ic = %0.2e\"%(Ic),\" ampere\" # collector current BJT\n", + "rbe=2*10**(3)\n", + "print \"rbe= %0.2f\"%(rbe),\" ohm\" #base -emitter resistance\n", + "gm=50*10**(-3)\n", + "print \"gm = %0.2f\"%(gm),\" A/V\"# transconductance for BJT\n", + "Beta_o=100\n", + "print \"Beta_o = %0.2f\"%(Beta_o),\" \" #BJT gain\n", + "rc=50*10**(3)\n", + "print \"rc= %0.2f\"%(rc),\" ohm\" #collector resistance\n", + "Cbe=10*10**(-12)\n", + "print \"Cbe= %0.2e\"%(Cbe),\" farad\" #base -emitter capacitance\n", + "Ctc=1*10**(-12)\n", + "print \"Ctc= %0.2e\"%(Ctc),\" farad\" #input device capacitance\n", + "print \"part(i)\"# part(i)of question\n", + "RL=10*10**(3)\n", + "print \"RL= %0.2f\"%(RL),\" ohm\" #Load resistance\n", + "Rs=500\n", + "print \"Rs= %0.2f\"%(Rs),\" ohm\" #input source resistance\n", + "Rth=(Rs*rbe)/(Rs+rbe)\n", + "print \"Rth=(Rs*rbe)/(Rs+rbe)=%0.2f\"%(Rth),\" ohm\" # eqivalent resistance\n", + "Avm=(-gm*RL)\n", + "print \"Avm=(-gm*RL)=%0.2f\"%(Avm) # Mid-frequency gain for CE amplifier\n", + "CM=Ctc*(1-Avm)\n", + "print \"CM=Ctc*(1-Avm)= %0.2f\"%(CM),\" farad\" #calculated capacitance\n", + "Ci=Cbe\n", + "print \"Ci=Cbe= %0.2f\"%(Ci),\" farad\" #calculated input capacitance\n", + "fHi=1/(2*(pi)*(Rth)*(Cbe+CM))\n", + "print \"fHi=1/(2*(pi)*(Rth)*(Cbe+CM))= %0.2f\"%(fHi),\" Hz\" # Higher-frequency cutoff for CE amplifier\n", + "Ri=rbe\n", + "print \"Ri=rbe =%0.2f\"%(Ri),\" ohm\" #input resistance CE amplifier\n", + "Ro=rc\n", + "print \"R0= rc=%0.2f\"%(Ro),\" ohm\" #output resistance for CE amplifier\n", + "fB=1/(2*(pi)*(rbe)*(Cbe))\n", + "print \"fB=1/(2*(pi)*(rbe)*(Cbe))= %0.2e\"%(fB),\" Hz\" # base terminal frequency cutoff\n", + "fT=Beta_o*fB\n", + "print \"fT=Beta_o*fB= %0.2e\"%(fT),\" Hz\" # Unity gain bandwidth for CE amplifier\n", + "print \"part(ii)\"# part(ii)of question\n", + "Rs=50*10**(3)\n", + "print \"Rs= %0.2f\"%(Rs),\" ohm\" #input source resistance for CC amplifier\n", + "RL=1*10**(3)\n", + "print \"RL= %0.2f\"%(RL),\" ohm\" #Load resistance for CC amplifier\n", + "fhi=1/(2*(pi)*(Rs)*(Ctc))\n", + "print \"fhi=1/(2*(pi)*(Rs)*(Ctc))= %0.2e\"%(fhi),\" Hz\" # Higher-frequency cutoff for CC amplifier\n", + "Avm=(gm*RL)/(1+gm*RL)\n", + "print \"Avm=(gm*RL)/(1+gm*RL)=%0.2f\"%(Avm) # Mid-frequency gain for CC amplifier\n", + "Ro=1/gm\n", + "print \"Ro= 1/gm=%0.2f\"%(Ro),\" ohm\" #output resistance for CC amplifier\n", + "Ri=Beta_o*RL\n", + "print \"Ri=Beta_o*RL =%0.2f\"%(Ri),\" ohm\" #input resistance CE amplifier\n", + "print \"part(iii)\"# part(iii)of question\n", + "RL=10*10**(3)\n", + "print \"RL= %0.2f\"%(RL),\" ohm\" #Load resistance for CB amplifier\n", + "Rs=50\n", + "print \"Rs= %0.2f\"%(Rs),\" ohm\" #input source resistance for CB amplifier\n", + "fHi=gm/(2*(pi)*(Cbe))\n", + "print \"fHi=gm/(2*(pi)*(Cbe))= %0.2e\"%(fHi),\" Hz\" # Higher-frequency cutoff for CB amplifier\n", + "fHo=1/(2*(pi)*(Ctc)*(RL))\n", + "print \"fHo=gm/(2*(pi)*(Ctc)*(RL))= %0.2e\"%(fHo),\" Hz\" # Higher-frequency cutoff for CB amplifier\n", + "Avs=(gm*RL)/(1+gm*Rs)\n", + "print \"Avs=(gm*RL)/(1+gm*Rs)=%0.2f\"%(Avs) # Mid-frequency gain for CB amplifier\n", + "Ri=1/gm\n", + "print \"Ri= 1/gm=%0.2f\"%(Ri),\" ohm\" #output resistance for CB amplifier\n", + "Ro=Beta_o*rc\n", + "print \"Ro=Beta_o*rc =%0.2e\"%(Ro),\" ohm\" #input resistance CB amplifier\n", + "#ERROR NOTE:some parameters in the book have been calculated using gm=40 mA/V while given value is gm=50 mA/V. So ,for part(ii) CC amplifier correct value of R0=20 ohm,Ri=100000 ohm,and for part(iii)CB amplifier over all voltage gain Avs=142.85714 ,Ri=20 ohm all calculated for gm=50 mA/V." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 5_8 Page No. 154" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "tp= 0.01 s\n", + "tr= 5.00e-08 s\n", + "CSH= 5.00e-11 farad\n", + "percentage tilt= 5.00 %\n", + "Ri= 100000.00 ohm\n", + "RL=tr/(2.2*CSH)= 454.55 ohm\n", + "Cc= (tp*100)/( tilt*Ri)=2.00e-06 farad\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "tp=10*10**(-3)\n", + "print \"tp= %0.2f\"%(tp),\" s\" # Time period of pulse\n", + "tr=0.05*10**(-6)\n", + "print \"tr= %0.2e\"%(tr),\" s\" # Rise-Time of pulse\n", + "CSH=50*10**(-12)\n", + "print \"CSH= %0.2e\"%(CSH),\" farad\" #output capacitor\n", + "tilt=5\n", + "print \"percentage tilt= %0.2f\"%(tilt),\"%\" #Sag or percentage tilt of output \n", + "Ri=100*10**(3)\n", + "print \"Ri= %0.2f\"%(Ri),\" ohm\" # source resistance\n", + "RL=tr/(2.2*CSH)\n", + "print \"RL=tr/(2.2*CSH)= %0.2f\"%(RL),\" ohm\" #Load resistance calculation\n", + "Cc=(tp*100)/(tilt*Ri)\n", + "print \"Cc= (tp*100)/( tilt*Ri)=%0.2e\"%(Cc),\" farad\" #capacitance\n", + "#ERROR NOTE: calculated value of RL=454.54545 ohm but in book given as 455 ohm " + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch6.ipynb b/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch6.ipynb new file mode 100644 index 00000000..50416414 --- /dev/null +++ b/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch6.ipynb @@ -0,0 +1,449 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 6 - Multitransistor and Multistage Amplifier" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_1 Page No. 168" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Av= 0.10\n", + "Av(dB)=20*log10(Av)= -20.00 dB \n", + "Av= 0.71\n", + "Av(dB)=20*log10(Av)= -3.01 dB \n", + "Av= 1.00\n", + "Av(dB)=20*log10(Av)= 0.00 dB \n", + "Av= 10.00\n", + "Av(dB)=20*log10(Av)= 20.00 dB \n", + "Av= 100.00\n", + "Av(dB)=20*log10(Av)= 40.00 dB \n", + "Av= 1000.00\n", + "Av(dB)=20*log10(Av)= 60.00 dB \n" + ] + } + ], + "source": [ + "from math import log10\n", + "from __future__ import division \n", + "Av=0.1\n", + "print \"Av= %0.2f\"%(Av) #Voltage gain\n", + "AvdB=20*log10(Av)\n", + "print \"Av(dB)=20*log10(Av)= %0.2f\"%(AvdB),\"dB \" #Voltage gain in decibel\n", + "Av=0.707\n", + "print \"Av= %0.2f\"%(Av) #Voltage gain\n", + "AvdB=20*log10(Av)\n", + "print \"Av(dB)=20*log10(Av)= %0.2f\"%(AvdB),\"dB \" #Voltage gain in decibel\n", + "Av=1\n", + "print \"Av= %0.2f\"%(Av) #Voltage gain\n", + "AvdB=20*log10(Av)\n", + "print \"Av(dB)=20*log10(Av)= %0.2f\"%(AvdB),\"dB \" #Voltage gain in decibel\n", + "Av=10\n", + "print \"Av= %0.2f\"%(Av) #Voltage gain\n", + "AvdB=20*log10(Av)\n", + "print \"Av(dB)=20*log10(Av)= %0.2f\"%(AvdB),\"dB \" #Voltage gain in decibel\n", + "Av=100\n", + "print \"Av= %0.2f\"%(Av) #Voltage gain\n", + "AvdB=20*log10(Av)\n", + "print \"Av(dB)=20*log10(Av)= %0.2f\"%(AvdB),\"dB \" #Voltage gain in decibel\n", + "Av=1000\n", + "print \"Av= %0.2f\"%(Av) #Voltage gain\n", + "AvdB=20*log10(Av)\n", + "print \"Av(dB)=20*log10(Av)= %0.2f\"%(AvdB),\"dB \" #Voltage gain in decibel\n", + "#NOTE:calculated voltage gain in dB for Av=0.707 is -3.0116117dB " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_2 Page No. 169" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ri= 500.00 ohm\n", + "RL= 50.00 ohm\n", + "Vom= 1.00 volts\n", + "Vim= 0.00 volts\n", + "Av(in dB)=20*log10(Vo/Vi)= 60.00 dB \n", + "Iim= Vim/Ri= 0.00 A\n", + "Iom= Vom/RL= 0.02 A\n", + "Ai=20*log10(Io/Ii)= 80.00 dB \n", + "pi= Vi**2/Ri= 0.00 W\n", + "po= Vo**2/RL= 0.01 W\n", + "Ap=10*log10(po/pi)= 70.00 dB \n" + ] + } + ], + "source": [ + "from math import sqrt,log10\n", + "from __future__ import division \n", + "Ri=0.5*10**(3)\n", + "print \"Ri= %0.2f\"%(Ri)+ \" ohm\" # Amplifier input resistance\n", + "RL=0.05*10**(3)\n", + "print \"RL= %0.2f\"%(RL)+ \" ohm\" # Load resistance\n", + "Vom=1\n", + "print \"Vom= %0.2f\"%(Vom),\" volts\" # Output voltage \n", + "Vo=Vom/sqrt(2)#RMS value of Output voltage \n", + "Vim=1*10**(-3)\n", + "print \"Vim= %0.2f\"%(Vim),\" volts\" # Peak Input voltage\n", + "Vi=Vim/sqrt(2)#RMS Input voltage \n", + "Av=20*log10(Vo/Vi)\n", + "print \"Av(in dB)=20*log10(Vo/Vi)= %0.2f\"%(Av),\" dB \" #Voltage gain in decibel\n", + "Iim=Vim/Ri\n", + "print \"Iim= Vim/Ri= %0.2f\"%(Iim),\" A\" # Input peak current\n", + "Ii=Iim/sqrt(2) #RMS value of input current\n", + "Iom=Vom/RL \n", + "print \"Iom= Vom/RL= %0.2f\"%(Iom),\" A\" # Output peak current\n", + "Io=Iom/sqrt(2) #RMS value of Output current\n", + "Ai=20*log10(Io/Ii)\n", + "print \"Ai=20*log10(Io/Ii)= %0.2f\"%(Ai),\" dB \" #Current gain in decibel\n", + "pi=Vi**2/Ri\n", + "print \"pi= Vi**2/Ri= %0.2f\"%(pi),\" W\" # Input power \n", + "po=Vo**2/RL\n", + "print \"po= Vo**2/RL= %0.2f\"%(po),\" W\" # Output power \n", + "Ap=10*log10(po/pi)\n", + "print \"Ap=10*log10(po/pi)= %0.2f\"%(Ap),\" dB \" #Power gain in decibel" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_3 Page No. 172" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "RL= 1000.00 ohm\n", + "RF= 500000.00 ohm\n", + "Beta_o = 50.00\n", + "rbe= 1000.00 ohm\n", + "gm = 0.05 A/V\n", + "rc= 50000.00 ohm\n", + "part(i)\n", + "Adm1=(-gm*RL)= -50.00\n", + "Adm2=(0.5*gm*RL)= 25.00\n", + "Rid=2*rbe= 2000.00 ohm\n", + "Acm=(-RL)/(2*RF)= -1.00e-03\n", + "Ric=Beta_o*RF= 2.50e+07 ohm\n", + "CMRR=2*gm*RF= 50000.00\n", + "part(ii)\n", + "Vi1= -5.00e-04 volts\n", + "Vi2= 5.00e-04 volts\n", + "Vcm= 0.01 volts\n", + "Vd=Vi1-Vi2= -1.00e-03 volts\n", + "Vod=abs(Vd*Adm2)= 0.03 volts\n", + "Voc=abs(Vcm*Acm)= 1.00e-05 volts\n", + "percentage error=(Voc/Vod)*100= 0.04 %\n", + "part(iii)\n", + "RLeff=(RL*Rid)/(RL+Rid)= 666.67 ohm\n", + "Adm=gm*RLeff= 33.33\n", + "Acm=(-RLeff)/(2*RF)= -6.67e-04\n", + "CMRR=abs(Adm/(Acm))= 50000.00\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "RL=1*10**(3)\n", + "print \"RL= %0.2f\"%(RL)+ \" ohm\" #Load resistance\n", + "RF=500*10**(3)\n", + "print \"RF= %0.2f\"%(RF)+ \" ohm\" #Feedback resistance\n", + "Beta_o=50\n", + "print \"Beta_o = %0.2f\"%(Beta_o) #BJT gain\n", + "rbe=1*10**(3)\n", + "print \"rbe= %0.2f\"%(rbe)+ \" ohm\" #Base-emitter resistance\n", + "gm=50*10**(-3)\n", + "print \"gm = %0.2f\"%(gm),\" A/V\"# transconductance for BJT \n", + "rc=50*10**(3)\n", + "print \"rc= %0.2f\"%(rc)+ \" ohm\" #collector resistance\n", + "print \"part(i)\"\n", + "Adm1=(-gm*RL)\n", + "print \"Adm1=(-gm*RL)= %0.2f\"%(Adm1) # Differential mode gain for BJT for DIDO and SIDO modes\n", + "Adm2=(0.5*gm*RL)\n", + "print \"Adm2=(0.5*gm*RL)= %0.2f\"%(Adm2) # Differential mode gain for BJT for DISO and SISO modes\n", + "Rid=2*rbe\n", + "print \"Rid=2*rbe= %0.2f\"%(Rid)+ \" ohm\" #input differential mode resistance\n", + "Acm=(-RL)/(2*RF)\n", + "print \"Acm=(-RL)/(2*RF)= %0.2e\"%(Acm) # Common mode gain for BJT for DISO and SISO modes\n", + "Ric=Beta_o*RF\n", + "print \"Ric=Beta_o*RF= %0.2e\"%(Ric)+ \" ohm\" # common mode input resistance\n", + "CMRR=2*gm*RF\n", + "print \"CMRR=2*gm*RF= %0.2f\"%(CMRR) # common mode rejection ratio\n", + "print \"part(ii)\"\n", + "Vi1=(-0.5)*10**(-3)\n", + "print \"Vi1= %0.2e\"%(Vi1),\" volts\" # input voltage1 \n", + "Vi2=(+0.5)*10**(-3)\n", + "print \"Vi2= %0.2e\"%(Vi2),\" volts\" # input voltage2\n", + "Vcm=(10)*10**(-3)\n", + "print \"Vcm= %0.2f\"%(Vcm),\" volts\" # common mode voltage\n", + "Vd=Vi1-Vi2\n", + "print \"Vd=Vi1-Vi2= %0.2e\"%(Vd),\" volts\" # differential voltage\n", + "Vod=abs(Vd*Adm2)\n", + "print \"Vod=abs(Vd*Adm2)= %0.2f\"%(Vod),\" volts\" # output differential voltage for DISO and SISO modes\n", + "Voc=abs(Vcm*Acm)\n", + "print \"Voc=abs(Vcm*Acm)= %0.2e\"%(Voc),\" volts\" # output common mode voltage\n", + "Error=(Voc/Vod)*100\n", + "print \"percentage error=(Voc/Vod)*100= %0.2f\"%(Error),\"%\"#percentage error due to CM signal\n", + "print \"part(iii)\"\n", + "RLeff=(RL*Rid)/(RL+Rid)\n", + "print \"RLeff=(RL*Rid)/(RL+Rid)= %0.2f\"%(RLeff)+ \" ohm\" # Effective load resistance\n", + "Adm=gm*RLeff\n", + "print \"Adm=gm*RLeff= %0.2f\"%(Adm) # Modified Differential mode gain for BJT for DIDO and SIDO modes\n", + "Acm=(-RLeff)/(2*RF)\n", + "print \"Acm=(-RLeff)/(2*RF)= %0.2e\"%(Acm) # Modified Common mode gain for BJT for DISO and SISO modes\n", + "CMRR=abs(Adm/(Acm))\n", + "print \"CMRR=abs(Adm/(Acm))= %0.2f\"%(CMRR) # Modified common mode rejection ratio\n", + "#NOTE: In Book, Formulae used for Acm in part(iii) is written as Acm=(-RL)/(2*RF)but ans is calculated by using RLeff in place of RL.So i have written formulae as Acm=(-RLeff)/(2*RF) in programming.\n", + "# Assigned variable name: in part(i) Adm for DIDO and SIDO modes is represented by Adm1 and Adm for DISO and SISO modes is represented by Adm2 to resist any anamoly in the programming." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_4 Page No. 175" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "VCC= 10.00 volts\n", + "VEE=VCC= 10.00 volts\n", + "IQ = 0.00 ampere\n", + "VBE= 0.70 volts\n", + "part(i)\n", + "RL=VCC/IQ= 5000.00 ohm\n", + "Pomax=VCC**2/(2*RL)= 0.01 W\n", + "PDC=2*VCC*IQ= 0.04 W\n", + "Efficiency,Etta_max=(Pomax/PDC)*100= 25.00 %\n", + "PDmax=VCC*IQ= 0.02 W\n", + "part(ii)\n", + "Vcm= 5.00 volts\n", + "Po=Vcm**2/(2*RL)= 2.50e-03 W\n", + "Efficiency,Etta=(Po/PDC)*100= 6.25 %\n", + "PDCavg=PDmax-Po= 0.02 W\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "VCC=(10)\n", + "print \"VCC= %0.2f\"%(VCC),\" volts\" # Collector voltage supply\n", + "VEE=VCC\n", + "print \"VEE=VCC= %0.2f\"%(VEE),\" volts\" # Emitter supply voltage\n", + "IQ=2*10**(-3)\n", + "print \"IQ = %0.2f\"%(IQ),\" ampere\" # operating current for CC class-Aamplifier\n", + "VBE=(0.7)\n", + "print \"VBE= %0.2f\"%(VBE),\" volts\" # Base-emitter voltage \n", + "print \"part(i)\"\n", + "RL=VCC/IQ\n", + "print \"RL=VCC/IQ= %0.2f\"%(RL)+ \" ohm\" #Load resistance\n", + "Pomax=VCC**2/(2*RL)\n", + "print \"Pomax=VCC**2/(2*RL)= %0.2f\"%(Pomax),\" W\" # maximum Output power \n", + "PDC=2*VCC*IQ\n", + "print \"PDC=2*VCC*IQ= %0.2f\"%(PDC),\" W\" # Total D.C power supply\n", + "Etta_max=(Pomax/PDC)*100\n", + "print \"Efficiency,Etta_max=(Pomax/PDC)*100= %0.2f\"%(Etta_max),\"%\" #maximum power amplifier conversion efficiency\n", + "PDmax=VCC*IQ\n", + "print \"PDmax=VCC*IQ= %0.2f\"%(PDmax),\" W\" # maximum power dissipation \n", + "print \"part(ii)\"\n", + "Vcm=(5)\n", + "print \"Vcm= %0.2f\"%(Vcm),\" volts\" # common mode voltage\n", + "Po=Vcm**2/(2*RL)\n", + "print \"Po=Vcm**2/(2*RL)= %0.2e\"%(Po),\" W\" # Output power \n", + "Etta=(Po/PDC)*100\n", + "print \"Efficiency,Etta=(Po/PDC)*100= %0.2f\"%(Etta),\" %\" # power amplifier conversion efficiency\n", + "PDCavg=PDmax-Po#Using law of conservation of energy\n", + "print \"PDCavg=PDmax-Po= %0.2f\"%(PDCavg),\" W\" # Average power dissipated in BJT" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_5 Page No. 178" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "VCC= 10.00 volts\n", + "VEE=VCC= 10.00 volts\n", + "ICQ_0 = 1.00e-02 ampere\n", + "RL= 5.00 ohm\n", + "part(i)\n", + "Po=0.00 W\n", + "PDC=2*VCC*ICQ_0= 0.20 W\n", + "part(ii)\n", + "Vcm=VCC = 10.00 volts\n", + "Icm = VCC/RL=2.00e+00 ampere\n", + "Po=(1/2)*(Icm*Vcm)=10.00 W\n", + "ICavg=(Icm)/(pi)=6.37e-01 ampere\n", + "PDC=2*VCC*ICavg= 12.73 W\n", + "Efficiency,Etta=(Po/PDC)*100= 78.54 %\n", + "part(iii)\n", + "Vcm1= 5.00 volts\n", + "ICavg1=(Vcm1)/(pi*RL)=3.18e-01 ampere\n", + "Po1=(Vcm1**2)/(2*RL)=2.50 W\n", + "PDC1=2*VCC*ICavg1= 6.37e+00 W\n", + "Efficiency,Etta=(Po1/PDC1)*100= 39.27 %\n" + ] + } + ], + "source": [ + "from math import pi,sqrt\n", + "from __future__ import division \n", + "VCC=(10)\n", + "print \"VCC= %0.2f\"%(VCC),\" volts\" # Collector voltage supply\n", + "VEE=VCC\n", + "print \"VEE=VCC= %0.2f\"%(VEE),\" volts\" # Emitter supply voltage\n", + "ICQ_0=10*10**(-3)\n", + "print \"ICQ_0 = %0.2e\"%(ICQ_0),\" ampere\" # Zero signal collector current\n", + "RL=5\n", + "print \"RL= %0.2f\"%(RL)+ \" ohm\" #Load resistance\n", + "print \"part(i)\"\n", + "Po=0# Since Output power at Zero signal condition is Zero\n", + "print \"Po=%0.2f\"%(Po),\" W\" # Output power at Zero signal condition\n", + "PDC=2*VCC*ICQ_0\n", + "print \"PDC=2*VCC*ICQ_0= %0.2f\"%(PDC),\" W\" # Total D.C power supply for Zero signal condition\n", + "print \"part(ii)\"\n", + "Vcm=VCC#For Full output voltage swing Vcm=VCC\n", + "print \"Vcm=VCC = %0.2f\"%(Vcm),\" volts\" # common mode voltage for full swing condition\n", + "Icm=VCC/RL\n", + "print \"Icm = VCC/RL=%0.2e\"%(Icm),\" ampere\" # common mode current\n", + "Po=(1/2)*(Icm*Vcm)\n", + "print \"Po=(1/2)*(Icm*Vcm)=%0.2f\"%(Po),\" W\" # Output power at full swing condition\n", + "ICavg=(Icm)/(pi)\n", + "print \"ICavg=(Icm)/(pi)=%0.2e\"%(ICavg),\" ampere\" # Average value of common mode current\n", + "PDC=2*(ICavg*VCC)\n", + "print \"PDC=2*VCC*ICavg= %0.2f\"%(PDC),\" W\" # Total D.C power supply for full swing condition\n", + "Etta=(Po/PDC)*100\n", + "print \"Efficiency,Etta=(Po/PDC)*100= %0.2f\"%(Etta),\" %\" # power amplifier conversion efficiency\n", + "print \"part(iii)\"\n", + "Vcm1=(5)#given value\n", + "print \"Vcm1= %0.2f\"%(Vcm1),\" volts\" # common mode voltage for output swing Vcm=5 V\n", + "ICavg1=(Vcm1)/(pi*RL)\n", + "print \"ICavg1=(Vcm1)/(pi*RL)=%0.2e\"%(ICavg1),\" ampere\" # Average value of common mode current\n", + "Po1=(Vcm1**2)/(2*RL)\n", + "print \"Po1=(Vcm1**2)/(2*RL)=%0.2f\"%(Po1),\" W\" # Output power for output swing Vcm=5 V\n", + "PDC1=2*(ICavg1*VCC)\n", + "print \"PDC1=2*VCC*ICavg1= %0.2e\"%(PDC1),\" W\" # Total D.C power supply for output swing Vcm=5 V\n", + "Etta=(Po1/PDC1)*100\n", + "print \"Efficiency,Etta=(Po1/PDC1)*100= %0.2f\"%(Etta),\" %\" # power amplifier conversion efficiency for output swing Vcm=5 V\n", + "# NOTE:Correct value of Efficiency,Etta=(Po1/PDC1)*100= 39.269908 % for part(iii) but book ans is 39.31%(because of approximation used during calculation)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 6_6 Page No. 180" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Av= 100000.00\n", + "VCC= 10.00 volts\n", + "vo= VCC=10.00 volts\n", + "Vdmax= VCC/Av=1.00e-04 volts\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "Av=1*10**(5)\n", + "print \"Av= %0.2f\"%(Av) #Voltage gain\n", + "VCC=(10)\n", + "print \"VCC= %0.2f\"%(VCC),\" volts\" # Collector voltage supply\n", + "vo=VCC\n", + "print \"vo= VCC=%0.2f\"%(vo),\" volts\" # maximum output voltage\n", + "Vdmax=VCC/Av\n", + "print \"Vdmax= VCC/Av=%0.2e\"%(Vdmax),\" volts\" # Difference input voltage at OP-amp terminals" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch7.ipynb b/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch7.ipynb new file mode 100644 index 00000000..af9fd2a9 --- /dev/null +++ b/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch7.ipynb @@ -0,0 +1,622 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 7 - Feedback Amplifiers and Sinusoidal Oscillators" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_1 Page No. 204" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "A= 60000.00\n", + "Af= 10000.00\n", + "N_dB=20*log10(Af/A)= -15.56 dB\n", + "B=(1/(Af))-(1/A)= 8.33e-05\n" + ] + } + ], + "source": [ + "from math import log10\n", + "from __future__ import division \n", + "A=60000\n", + "print \"A= %0.2f\"%(A) #Amplifier gain\n", + "Af=10000\n", + "print \"Af= %0.2f\"%(Af) #Feedback gain\n", + "N_dB=20*log10(Af/A)\n", + "print \"N_dB=20*log10(Af/A)= %0.2f\"%(N_dB),\"dB\" #Negative feedback gain\n", + "B=(1/(Af))-(1/A)# formulae using (Af=A/(1+A*B))\n", + "print \"B=(1/(Af))-(1/A)= %0.2e\"%(B) #Feedback factor" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_2 Page No. 205" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "A= 10000.00\n", + "B= 0.01\n", + "Af= (A/(1+A*B))=99.01\n", + "A1= 100000.00\n", + "Af1= (A1/(1+A1*B))=99.90\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "A=10000\n", + "print \"A= %0.2f\"%(A) #Amplifier gain\n", + "B=0.01\n", + "print \"B= %0.2f\"%(B) #Feedback factor\n", + "Af=(A/(1+A*B))\n", + "print \"Af= (A/(1+A*B))=%0.2f\"%(Af) #Feedback gain\n", + "A1=100000\n", + "print \"A1= %0.2f\"%(A1) #New amplifier gain value\n", + "Af1=(A1/(1+A1*B))\n", + "print \"Af1= (A1/(1+A1*B))=%0.2f\"%(Af1) #New feedback gain" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_3 Page No. 208" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Vo= 50.00 volts\n", + "Vi= 0.50 volts\n", + "part(i)\n", + "A= Vo/Vi=100.00\n", + "Harmonic_distortion=10.00 %\n", + "D= (10*Vo)/100 = 5.00 volts\n", + "Df= (1*Vo)/100 = 0.50 volts\n", + "B=(D/(Df*A))-(1/A) = 0.09\n", + "part(ii)\n", + "Af= (A/(1+A*B)) = 10.00\n", + "part(iii)\n", + "Vif= Vo/Af = 5.00 volts\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "Vo=(50)\n", + "print \"Vo= %0.2f\"%(Vo),\" volts\" # output voltage\n", + "Vi=(0.5)\n", + "print \"Vi= %0.2f\"%(Vi),\" volts\" # input voltage\n", + "print \"part(i)\" \n", + "A=Vo/Vi\n", + "print \"A= Vo/Vi=%0.2f\"%(A) #Amplifier gain\n", + "HD=10\n", + "print \"Harmonic_distortion=%0.2f\"%(HD),\"%\"# Percentage second harmonic distortion\n", + "D=(10*Vo)/100\n", + "print \"D= (10*Vo)/100 = %0.2f\"%(D),\" volts\" # Second Harmonic distortion \n", + "Df=(1*Vo)/100\n", + "print \"Df= (1*Vo)/100 = %0.2f\"%(Df),\" volts\" # Harmonic distortion with Feedback\n", + "B=(D/(Df*A))-(1/A) #Using formulae Df=(D/(1+A*B))\n", + "print \"B=(D/(Df*A))-(1/A) = %0.2f\"%(B) #Feedback factor\n", + "print \"part(ii)\" \n", + "Af=(A/(1+A*B))\n", + "print \"Af= (A/(1+A*B)) = %0.2f\"%(Af) #Feedback gain\n", + "print \"part(iii)\" \n", + "Vif=Vo/Af\n", + "print \"Vif= Vo/Af = %0.2f\"%(Vif),\" volts\" # New input voltage required" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_4 Page No. 210" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "GBW= 1000000.00 Hz\n", + "AMf=100.00\n", + "fHF=GBW/AMf= 10000.00 Hz\n", + "f_10per cent=(10*fHF)/100= 1000.00 Hz\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "GBW=10**(6)\n", + "print \"GBW= %0.2f\"%(GBW),\" Hz\"# Gain-Bandwidth product\n", + "AMf=100\n", + "print \"AMf=%0.2f\"%(AMf) # Midband gain with feedback\n", + "fHF=GBW/AMf\n", + "print \"fHF=GBW/AMf= %0.2f\"%(fHF),\" Hz\"#Signal bandwidth\n", + "f_10percent=(10*fHF)/100\n", + "print \"f_10per cent=(10*fHF)/100= %0.2f\"%(f_10percent),\" Hz\"#Frequency below which AMf will not deviate by more than 10 percent" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_5 Page No. 212" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "AM=50000.00\n", + "fH= 20000.00 Hz\n", + "fL= 30.00 Hz\n", + "B= 5.00e-05\n", + "AMf=AM/(1+B*AM)=14285.71\n", + "fHf=fH*(1+B*AM)= 70000.00 Hz\n", + "fLf=fL/(1+B*AM)= 8.57 Hz\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "AM=50000\n", + "print \"AM=%0.2f\"%(AM) # Midband gain \n", + "fH=20*10**(3)\n", + "print \"fH= %0.2f\"%(fH),\" Hz\"# Upper cut-off frequency\n", + "fL=30\n", + "print \"fL= %0.2f\"%(fL),\" Hz\"# Lower cut-off frequency\n", + "B=5*10**(-5)\n", + "print \"B= %0.2e\"%(B) #Feedback factor\n", + "AMf=AM/(1+B*AM)\n", + "print \"AMf=AM/(1+B*AM)=%0.2f\"%(AMf) # Midband gain with feedback\n", + "fHf=fH*(1+B*AM)\n", + "print \"fHf=fH*(1+B*AM)= %0.2f\"%(fHf),\" Hz\"#Upper cut-off frequency with feedback\n", + "fLf=fL/(1+B*AM)\n", + "print \"fLf=fL/(1+B*AM)= %0.2f\"%(fLf),\" Hz\"#Lower cut-off frequency with feedback\n", + "#NOTE: calculated value of AMf is AMf=14285.714 and fLF=8.5714286 but in book given as AMf=14286 and fLF=8.58 Hz" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_6 Page No. 214" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "AM=100.00 dB\n", + "fc1= 10000.00 Hz\n", + "fc2= 100000.00 Hz\n", + "fc3= 1000000.00 Hz\n", + "part(i)\n", + "Af1=85.00 dB\n", + "f= 50000.00 Hz\n", + "theta_A=-108.12 degree\n", + "theta_pm=180-abs(theta_A)=71.88 degree\n", + "Amplifier stable\n", + "part(ii)\n", + "Af2=50.00 dB\n", + "f= 500000.00 Hz\n", + "theta_A= -194.11 degree\n", + "theta_pm=180-abs(theta_A)=-14.11 degree\n", + "Amplifier unstable\n", + "part(iii)\n", + "Af3=20.00 dB\n", + "f= 1100000.00 Hz\n", + "theta_A=-222.01 degree\n", + "theta_pm=180-abs(theta_A)=-42.01 degree\n", + "Amplifier unstable\n" + ] + } + ], + "source": [ + "from math import atan,pi\n", + "from __future__ import division \n", + "AM=100\n", + "print \"AM=%0.2f\"%(AM),\"dB\" # Midband gain \n", + "fc1=1*10**(4)\n", + "print \"fc1= %0.2f\"%(fc1),\" Hz\"# First Critical frequency\n", + "fc2=10**5\n", + "print \"fc2= %0.2f\"%(fc2),\" Hz\"# Second Critical frequency\n", + "fc3=10**6\n", + "print \"fc3= %0.2f\"%(fc3),\" Hz\"# Third Critical frequency\n", + "print \"part(i)\"\n", + "Af1=85\n", + "print \"Af1=%0.2f\"%(Af1),\"dB\" # gain at 50 kHz and -20dB/decade roll-off\n", + "f=50*10**(3)\n", + "print \"f= %0.2f\"%(f),\" Hz\"# operating frequency\n", + "theta_A=- atan(f/fc1)*180/pi- atan(f/fc2)*180/pi- atan(f/fc3)*180/pi#phase shift in radians\n", + "print \"theta_A=%0.2f\"%(theta_A),\" degree\"# Phase shift for feedback gain Af1\n", + "theta_pm=180-abs(theta_A)# formulae phase margin\n", + "print \"theta_pm=180-abs(theta_A)=%0.2f\"%(theta_pm),\" degree\"# Phase Margin for feedback gain Af1\n", + "print \"Amplifier stable\"# Since phase margin is (+)ive\n", + "print \"part(ii)\"\n", + "Af2=50\n", + "print \"Af2=%0.2f\"%(Af2),\" dB\" # gain at 500 kHz and -40dB/decade roll-off\n", + "f=500*10**(3)\n", + "print \"f= %0.2f\"%(f),\" Hz\"# frequency\n", + "theta_A=- atan(f/fc1)- atan(f/fc2)- atan(f/fc3)#phase shift in radians\n", + "theta_A=theta_A*180/pi # degree\n", + "print \"theta_A= %0.2f\"%(theta_A),\" degree\"# Phase shift for feedback gain Af2\n", + "theta_pm=180-abs(theta_A)# formulae phase margin\n", + "print \"theta_pm=180-abs(theta_A)=%0.2f\"%(theta_pm),\" degree\"# Phase Margin for feedback gain Af1\n", + "print \"Amplifier unstable\"# Since phase margin is (-)ive\n", + "print \"part(iii)\"\n", + "Af3=20\n", + "print \"Af3=%0.2f\"%(Af3),\"dB\" # gain at 1100 kHz and -60dB/decade roll-off\n", + "f=1100*10**(3)\n", + "print \"f= %0.2f\"%(f),\" Hz\"# frequency\n", + "theta_A=- atan(f/fc1)- atan(f/fc2)- atan(f/fc3)#phase shift in radians\n", + "theta_A=theta_A*180/pi # degree\n", + "print \"theta_A=%0.2f\"%(theta_A),\" degree\"# Phase shift for feedback gain Af3\n", + "theta_pm=180-abs(theta_A)# formulae phase margin\n", + "print \"theta_pm=180-abs(theta_A)=%0.2f\"%(theta_pm),\" degree\"# Phase Margin for feedback gain Af1\n", + "print \"Amplifier unstable\"# Since phase margin is (-)ive\n", + "#NOTE:Correct ans for part(i) phase margin ,theta_pm=71.882476 degree but in book given as 71.86 degree\n", + "# correct ans for part(iii) phase shift, theta_A=-222.01103 degree but in book given as -220.02 degree " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_7 Page No. 216" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "AV=50000.00\n", + "Ri= 5.00e+07 ohm\n", + "R0= 1000.00 ohm\n", + "AVf=10.00\n", + "RSf= 50000.00 ohm\n", + "RF=AVf*(R1)= 5.00e+05 ohm\n", + "VS= 30.00 volts\n", + "Vomax=0.5*(VS)= -15.00 , +15.00 volts\n", + "Vsmax=Vomax/AVf= -1.50 , +1.50 volts\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "AV=50000\n", + "print \"AV=%0.2f\"%(AV) # Voltage gain \n", + "Ri=50*10**(6)\n", + "print \"Ri= %0.2e\"%(Ri),\" ohm\" #Input resistance of OP-AMP\n", + "R0=1*10**(3)\n", + "print \"R0= %0.2f\"%(R0),\" ohm\" #Output resistance\n", + "AVf=10\n", + "print \"AVf=%0.2f\"%(AVf) # Overall Voltage gain \n", + "RSf=50*10**(3)\n", + "print \"RSf= %0.2f\"%(RSf),\" ohm\" #Source resistance\n", + "R1=RSf\n", + "RF=AVf*(R1)\n", + "print \"RF=AVf*(R1)= %0.2e\"%(RF),\" ohm\" #Feedback resistance\n", + "VS=30\n", + "print \"VS= %0.2f\"%(VS),\" volts\" # Peak-peak output swing voltage\n", + "Vomax=0.5*(VS)\n", + "print \"Vomax=0.5*(VS)= -%0.2f\"%(Vomax),\", +%0.2f\"%(Vomax),\" volts\" # Maximum output voltage swing at negative and positive polarities respectively\n", + "Vsmax=Vomax/AVf\n", + "print \"Vsmax=Vomax/AVf= -%0.2f\"%(Vsmax),\", +%0.2f\"%(Vsmax),\" volts\" # Maximum output voltage without overload clipping at both polarities\n", + "\n", + "\n", + "#for overall voltage gain author has used two notations 'Avf' and 'Af' ... but I am working with 'Avf' only" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_8 Page No. 218" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R1= 50000.00 ohm\n", + "RF= 500000.00 ohm\n", + "VS= 1.00 volts\n", + "part(i)\n", + "A = infinite\n", + "Vo1=-(RF/R1)= -10.00 volts\n", + "part(ii)\n", + "A=50000.00\n", + "B=R1/(R1+RF)= 0.09\n", + "Vo2=-((RF)*(B*A))/(R1*(1+A*B))= -10.00 volts\n", + "%Error,e= ((Vo2-Vo1)*100)/Vo1=0.02 % \n", + "part(iii)\n", + "%Error,e=0.01 % \n", + "Vo3=Vo1-(e*Vo1/100)= 10.00 volts\n", + "A=(Vo*R1)/(B*RF*(1-(Vo*RF/R1)))=1.10e+05\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "R1=50*10**(3)\n", + "print \"R1= %0.2f\"%(R1),\" ohm\" # resistance at input terminal of OP-AMP\n", + "RF=500*10**(3)\n", + "print \"RF= %0.2f\"%(RF),\" ohm\" #Feedback resistance\n", + "VS=1\n", + "print \"VS= %0.2f\"%(VS),\" volts\" # Peak-peak output swing voltage\n", + "print \"part(i)\" \n", + "print \"A = infinite\"# voltage gain\n", + "Vo1=-(RF/R1) #Output voltage when gain, A=infinite\n", + "print \"Vo1=-(RF/R1)= %0.2f\"%(Vo1),\" volts\"\n", + "print \"part(ii)\" \n", + "A=50000\n", + "print \"A=%0.2f\"%(A) # gain of OP-AMP\n", + "B=R1/(R1+RF)\n", + "print \"B=R1/(R1+RF)= %0.2f\"%(B) #Feedback factor\n", + "Vo2=-((RF)*(B*A))/(R1*(1+A*B))\n", + "print \"Vo2=-((RF)*(B*A))/(R1*(1+A*B))= %0.2f\"%(Vo2),\" volts\"# output voltage for A=50000\n", + "e=-((Vo2-Vo1)*100)/Vo1\n", + "print \"%%Error,e= ((Vo2-Vo1)*100)/Vo1=%0.2f\"%(e),\"% \"# calculation for percentage error in output voltage\n", + "print \"part(iii)\" \n", + "e=0.01\n", + "print \"%%Error,e=%0.2f\"%(e),\"% \"#Given percentage error in output voltage\n", + "Vo3=-(Vo1-(e*Vo1/100))\n", + "print \"Vo3=Vo1-(e*Vo1/100)= %0.2f\"%(Vo3),\" volts\"# output voltage for error 0.01%\n", + "x=Vo3*(R1/RF)\n", + "A=(x)/(B*(1-x)) #using formulae Vo=-(RF/R1)*((B*A)/1+A*B))\n", + "print \"A=(Vo*R1)/(B*RF*(1-(Vo*RF/R1)))=%0.2e\"%(A) # New Required gain for error less than 0.01%\n", + "\n", + "# while solving the problem I have used 'e' for the error as no varriable is given for the same in textbook by author\n", + "# in textbook author has used 'Vo' for output voltage in all parts.. but to remove any ambiguity in the programe I have used 'Vo1' 'Vo2' 'Vo3' for part i, ii, iii, respectively" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_9 Page No. 218" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "AV=100000.00\n", + "Ri= 10000.00 ohm\n", + "Ro= 10.00 ohm\n", + "Rs= 1.00e+07 ohm\n", + "RL= 1000.00 ohm\n", + "B=(Rs-Ri)/(AV*Ri)= 0.01\n", + "AVf=AV/(1+B*AV)=100.00\n", + "Rof=Ro/(1+B*AV) =0.01 ohm\n", + "Rif=Ri/(1+B*AV) =1.00e+07 ohm\n", + "Ap=(AVf**2)*(Rif/RL)=1.00e+08\n", + "AP=10*log10(Ap)=80.00 dB\n" + ] + } + ], + "source": [ + "from math import log10\n", + "from __future__ import division \n", + "AV=100000\n", + "print \"AV=%0.2f\"%(AV) # Voltage gain \n", + "Ri=10*10**(3)\n", + "print \"Ri= %0.2f\"%(Ri),\" ohm\" #Input resistance of OP-AMP\n", + "Ro=10\n", + "print \"Ro= %0.2f\"%(Ro),\" ohm\" #Output resistance\n", + "Rs=10*10**(6)\n", + "print \"Rs= %0.2e\"%(Rs),\" ohm\" #Source resistance\n", + "RL=1*10**(3)\n", + "print \"RL= %0.2f\"%(RL),\" ohm\" #Load resistance\n", + "B=(Rs-Ri)/(AV*Ri)\n", + "print \"B=(Rs-Ri)/(AV*Ri)= %0.2f\"%(B) #Feedback factor\n", + "AVf=AV/(1+B*AV)\n", + "print \"AVf=AV/(1+B*AV)=%0.2f\"%(AVf) # Overall Voltage gain with feedback\n", + "Rof=Ro/(1+B*AV)\n", + "print \"Rof=Ro/(1+B*AV) =%0.2f\"%(Rof),\" ohm\" #output resistance with feedback\n", + "Rif=Ri*(1+B*AV)\n", + "print \"Rif=Ri/(1+B*AV) =%0.2e\"%(Rif),\" ohm\" #Input resistance with feedback\n", + "Ap=(AVf**2)*(Rif/RL)\n", + "print \"Ap=(AVf**2)*(Rif/RL)=%0.2e\"%(Ap) # Overall Power gain \n", + "AP=10*log10(Ap)\n", + "print \"AP=10*log10(Ap)=%0.2f\"%(AP),\"dB\" # Overall Power gain in dB " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 7_10 Page No. 220" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "gm = 0.01 A/V\n", + "Cgs= 5.00e-12 farad\n", + "Cds= 1.00e-12 farad\n", + "rd= 50000.00 ohm\n", + "RG= 1.00e+07 ohm\n", + "Rse= 1.00e+03 ohm\n", + "L= 0.50 H\n", + "C2= 5.00e-14 farad\n", + "C1= 1.00e-12 farad\n", + "part(i)\n", + "CT= 0.00 farad\n", + "part(ii)\n", + "fo= sqrt(2)/(2*pi*sqrt(L*CT))=1.44e+06 Hz\n", + "part(iii)\n", + "fp= 1.03e+06 Hz\n", + "fs= 1.01e+06 Hz\n", + "Q=(sqrt(L/C2))/(Rse)= 3162.28\n", + "part(iv)\n", + "AB=gm*rd*(Cds/Cgs)= 100.00\n", + "T_bias=RG*(Cgs+Cds)= 6.00e-05 s\n", + "T_r =1/(2*pi*fo)= 1.10e-07 s\n", + "for proper operation T_bias >> T_r\n" + ] + } + ], + "source": [ + "from math import sqrt,pi,log10\n", + "from __future__ import division \n", + "gm=10*10**(-3)\n", + "print \"gm = %0.2f\"%(gm),\" A/V\"# transconductance \n", + "Cgs=5*10**(-12)\n", + "print \"Cgs= %0.2e\"%(Cgs),\" farad\" # capacitance between gate-source\n", + "Cds=1*10**(-12)\n", + "print \"Cds= %0.2e\"%(Cds),\" farad\" # capacitance between drain-source\n", + "rd=50*10**(3)\n", + "print \"rd= %0.2f\"%(rd),\" ohm\" #Drain resistance\n", + "RG=10*10**(6)\n", + "print \"RG= %0.2e\"%(RG),\" ohm\" #Gate resistance\n", + "Rse=1*10**(3)\n", + "print \"Rse= %0.2e\"%(Rse),\" ohm\" #Gate resistance\n", + "L=0.5\n", + "print \"L= %0.2f\"%(L),\" H\" #Inductance\n", + "C2=0.05*10**(-12)\n", + "print \"C2= %0.2e\"%(C2),\" farad\" # Crystal parameter \n", + "C1=1*10**(-12)\n", + "print \"C1= %0.2e\"%(C1),\" farad\" # Crystal parameter\n", + "print \"part(i)\" \n", + "x=C1+((Cds*Cgs)/(Cds+Cgs))\n", + "CT=1/((1/C2)+(1/x))\n", + "print \"CT= %0.2f\"%(CT),\" farad\" # Equivalent series-resonating capacitance\n", + "print \"part(ii)\" \n", + "fo=sqrt(2)/(2*pi*sqrt(L*CT))\n", + "print \"fo= sqrt(2)/(2*pi*sqrt(L*CT))=%0.2e\"%(fo),\" Hz\"# frequency of oscillations\n", + "print \"part(iii)\"\n", + "z=sqrt((L*C1*C2)/(C1+C2))\n", + "fp=1/(2*pi*z)\n", + "print \"fp= %0.2e\"%(fp),\" Hz\"# parallel-resonant frequency\n", + "p=sqrt(L*C2)\n", + "fs=1/(2*pi*p)\n", + "print \"fs= %0.2e\"%(fs),\" Hz\"# series-resonant frequency\n", + "Q=(sqrt(L/C2))/(Rse)\n", + "print \"Q=(sqrt(L/C2))/(Rse)= %0.2f\"%(Q) #Quality factor\n", + "print \"part(iv)\"\n", + "AB=gm*rd*(Cds/Cgs)\n", + "print \"AB=gm*rd*(Cds/Cgs)= %0.2f\"%(AB) #Loop gain\n", + "T_bias=RG*(Cgs+Cds)\n", + "print \"T_bias=RG*(Cgs+Cds)= %0.2e\"%(T_bias),\"s\"#Bias Time-Constant\n", + "T_r = 1/(2*pi*fo)\n", + "print \"T_r =1/(2*pi*fo)= %0.2e\"%(T_r),\"s\"#resonant Time-Constant for 'fo'\n", + "print \"for proper operation T_bias >> T_r\"\n", + "\n", + "\n", + "# in part (ii)... value calculated for series resonant frequecy 'fo' is wrong in textbook.\n", + "# NOTE: in part(iii)... there is a misprint in the calculated value of Quality factor 'Q' in the textbook.\n", + "#I have used T_r instead of 1/wo (given in the book)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch8.ipynb b/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch8.ipynb new file mode 100644 index 00000000..5a864926 --- /dev/null +++ b/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch8.ipynb @@ -0,0 +1,781 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 8 - Linear Op-amp Systems" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_1 Page No. 245" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Amin=8000.00\n", + "Amax=64000.00\n", + "part (i)\n", + "delta_Af=0.01\n", + "delta_A= (Amax-Amin)/Amin = 7.00\n", + "Sg = delta_Af/delta_A = 0.00\n", + " B = (1/Sg - 1)/Amax = 0.01\n", + " part (ii)\n", + "Af_min = Amin/(1+B*Amin) = 90.52\n", + "Af_max = Amax/(1+B*Amax) = 91.43\n", + "variation in Af = 1.01\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "Amin=8000\n", + "print \"Amin=%0.2f\"%(Amin) # Minimum gain of OP-AMP\n", + "Amax=64000\n", + "print \"Amax=%0.2f\"%(Amax) # Maximum gain \n", + "print \"part (i)\"\n", + "delta_Af=0.01\n", + "print \"delta_Af=%0.2f\"%(delta_Af) # Change in overall feedBack gain \n", + "delta_A=(Amax-Amin)/Amin\n", + "print \"delta_A= (Amax-Amin)/Amin = %0.2f\"%(delta_A) # Change in open loop gain \n", + "Sg = delta_Af/delta_A\n", + "B = (1/Sg - 1)/Amax\n", + "print \"Sg = delta_Af/delta_A = %0.2f\"%(Sg)#desensitivity factor\n", + "print \" B = (1/Sg - 1)/Amax = %0.2f\"%(B)#feedBack factor\n", + "print \" part (ii)\"\n", + "Af_min = Amin/(1+B*Amin)#minimum change in overall feedBack gain \n", + "Af_max = Amax/(1+B*Amax)#/maximum change in overall feedBack gain \n", + "print \"Af_min = Amin/(1+B*Amin) = %0.2f\"%(Af_min)\n", + "print \"Af_max = Amax/(1+B*Amax) = %0.2f\"%(Af_max)\n", + "print \"variation in Af = %0.2f\"%(Af_max/Af_min)#variation in Af with feedBack factor 'B'\n", + "\n", + "\n", + "# for above problem author has divided question in two parts but during solution has written 3 parts. \n", + "# part (i) and part (ii) combinedly equivlent to part (i) \n", + "# part (iii) is equivalent to part (ii)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_2 Page No. 248" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Avf=-100.00\n", + "Rif= 1.00 ohm\n", + "RF= -R1*Avf=100.00 ohm\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "Avf=-100\n", + "print \"Avf=%0.2f\"%(Avf) # Voltage gain \n", + "Rif=1\n", + "print \"Rif= %0.2f\"%(Rif),\" ohm\" #Input resistance of OP-AMP\n", + "R1=Rif\n", + "RF=-R1*Avf # using formulae Vo=(-RF/R1)*Vi\n", + "print \"RF= -R1*Avf=%0.2f\"%(RF),\" ohm\" #Feedback resistance of OP-AMP\n", + "# NOTE:Error in value of RF since they have given value of Rif=1ohm but calculated RF by using Rif=1 Kilo ohm\n", + "# So i have calculated using Ri=1ohm and hence RF=100 ohm" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_3 Page No. 249" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R11= 1000.00 ohm\n", + "RF= 100000.00 ohm\n", + "R12= 10000.00 ohm\n", + "R13= 100000.00 ohm\n", + "vo = -(100.00 vs1 +10.00 vs2 +1.00 vs3)\n", + "vo = -(0.33 vs1 +0.33 vs2 +0.33 vs3)\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "R11=1*10**(3)\n", + "print \"R11= %0.2f\"%(R11),\" ohm\" # resistance at input terminal of OP-AMP Adder\n", + "RF=100*10**(3)\n", + "print \"RF= %0.2f\"%(RF),\" ohm\" #Feedback resistance\n", + "R12=10*10**(3)\n", + "print \"R12= %0.2f\"%(R12),\" ohm\" # resistance at input terminal of OP-AMP Adder\n", + "R13=100*10**(3)\n", + "print \"R13= %0.2f\"%(R13),\" ohm\" # resistance at input terminal of OP-AMP Adder\n", + "print \"vo = -(%0.2f\"%(RF/R11),\"vs1 +%0.2f\"%(RF/R12),\"vs2 +%0.2f\"%(RF/R13),\"vs3)\" # output voltage of opamp adder in terms of input vs1,vs2 vs3\n", + "\n", + "# for average value of input signal\n", + "n = 3# given inputs are '3'\n", + "R11 = n*RF\n", + "R12 = n*RF\n", + "R13 = n*RF\n", + "print \"vo = -(%0.2f\"%(RF/R11),\" vs1 +%0.2f\"%(RF/R12),\" vs2 +%0.2f\"%(RF/R13),\" vs3)\" # output voltage of opamp adder \n", + "\n", + "\n", + "# note : the output voltage of inverting adder is negative \n", + "# but while calculating weighted output voltage in above question ..author has neglected or miss the negative sign" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_4 Page No. 250" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ir = 0.01 ampere/lumen of radiant energy \n", + "RF= 10000.00 ohm\n", + "E = 0.01 lumens\n", + "IR =Ir*E= 1.00e-04 ampere\n", + "Vo=IR*RF= 1.00 volts\n", + "scale factor=E/Vo= 0.01 lumens/V\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "Ir=10*10**(-3)\n", + "print \"Ir = %0.2f\"%(Ir),\" ampere/lumen of radiant energy \" #photodiode Reverse saturation current for constant reverse bias VR\n", + "RF=10*10**(3)\n", + "print \"RF= %0.2f\"%(RF),\" ohm\" #Feedback resistance\n", + "E=1*10**(-2)\n", + "print \"E = %0.2f\"%(E),\" lumens\"# radiant energy\n", + "IR=Ir*E\n", + "print \"IR =Ir*E= %0.2e\"%(IR),\" ampere\" # Reverse saturation current\n", + "Vo=IR*RF\n", + "print \"Vo=IR*RF= %0.2f\"%(Vo),\" volts\" # output voltage\n", + "s=E/Vo\n", + "print \"scale factor=E/Vo= %0.2f\"%(E),\" lumens/V\" # Scale factor of photometer" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_5 Page No. 252" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Av= 100000.00\n", + "RF= 100000.00 ohm\n", + "RM= 10000.00 ohm\n", + "is = 1.00e-05 ampere\n", + "vo=is*RF= 1.00 volts\n", + "S=vo/is= 100000.00 V/A\n", + "Rif=RF/(1+Av)= 1.00 ohm\n", + "im = 0.00 ampere\n", + "RF=(im*RM)/is= 100000.00 ohm\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "Av=1*10**(5)\n", + "print \"Av= %0.2f\"%(Av) #Voltage gain\n", + "RF=100*10**(3)\n", + "print \"RF= %0.2f\"%(RF),\" ohm\" #Feedback resistance\n", + "RM=10*10**(3)\n", + "print \"RM= %0.2f\"%(RM),\" ohm\" # D.C Ammeter internal resistance\n", + "Is=10*10**(-6)\n", + "print \"is = %0.2e\"%(Is),\" ampere\" # Source current\n", + "vo=Is*RF\n", + "print \"vo=is*RF= %0.2f\"%(vo),\" volts\" # output voltage\n", + "S=vo/Is\n", + "print \"S=vo/is= %0.2f\"%(S),\" V/A\" # Sensitivity of Ammeter\n", + "Rif=RF/(1+Av)\n", + "print \"Rif=RF/(1+Av)= %0.2f\"%(Rif),\" ohm\" #Input resistance of OP-AMP\n", + "im=100*10**(-6)\n", + "print \"im = %0.2f\"%(im),\" ampere\" # Meter Full-Scale deflection current \n", + "RF=(im*RM)/Is\n", + "print \"RF=(im*RM)/is= %0.2f\"%(RF),\" ohm\" # New required Feedback resistance for im=100 micro ampere" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_6 Page No. 255" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Av= 36.00 dB\n", + "R1= 1000.00 ohm\n", + "RF=R1*[10**(Av/20)-1]= 62095.73 ohm\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "Av=36\n", + "print \"Av= %0.2f\"%(Av),\" dB\" #Voltage gain\n", + "R1=1*10**(3)# Choosing value of R1\n", + "print \"R1= %0.2f\"%(R1),\" ohm\" # Resistor at input side of OP-AMP\n", + "RF=R1*(10**(Av/20)-1) # Using formulae Av=20*log(1+RF/R1)\n", + "print \"RF=R1*[10**(Av/20)-1]= %0.2f\"%(RF),\" ohm\" # Calculated Feedback resistance\n", + "#NOTE: Correct value of RF=62095.734 ohm or 62.095 kilo ohm but in book given as 62.24 kilo ohm \n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_7 Page No. 256" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "if = 1.00e-04 ampere\n", + "Av= 100000.00\n", + "vs= 0.01 volts\n", + "RM= 100.00 ohm\n", + "Ri= 10000.00 ohm\n", + "R1=vs/if= 100.00 ohm\n", + "Avf=1+(RM/R1)=2.00\n", + "Rif=Ri*(Av/Avf)=5.00e+08 ohm\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "If=100*10**(-6)\n", + "print \"if = %0.2e\"%(If),\" ampere\" #Full-Scale deflection current\n", + "Av=1*10**(5)\n", + "print \"Av= %0.2f\"%(Av) #Voltage gain \n", + "vs=10*10**(-3) \n", + "print \"vs= %0.2f\"%(vs),\" volts\" # Input voltage \n", + "RM=100\n", + "print \"RM= %0.2f\"%(RM),\" ohm\" # Moving coil Ammeter internal resistance\n", + "Ri=10*10**(3)\n", + "print \"Ri= %0.2f\"%(Ri),\" ohm\" #Input resistance of OP-AMP\n", + "R1=vs/If\n", + "print \"R1=vs/if= %0.2f\"%(R1),\" ohm\" # Resistor at input side of OP-AMP in Voltage-to-Current converter \n", + "Avf=1+(RM/R1) # formulae using Avf=1+(RF/R1)=1+(RM/R1)# since RF=RM\n", + "print \"Avf=1+(RM/R1)=%0.2f\"%(Avf) # Overall Voltage gain\n", + "Rif=Ri*(Av/Avf)\n", + "print \"Rif=Ri*(Av/Avf)=%0.2e\"%(Rif),\" ohm\" # Equivalent input side resistance of OP-AMP with feedback" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_8 Page No. 258" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Ro= 1.00e-03 ohm\n", + "Sv= 0.01 %\n", + "change in regulator voltage= 3.00 volts\n", + "change in regulator Current= 0.25 A\n", + "change in regulator output voltage= 0.00 volts\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "Ro=0.001\n", + "print \"Ro= %0.2e\"%(Ro),\" ohm\" #Output resistance\n", + "Sv=0.01\n", + "print \"Sv= %0.2f\"%(Sv),\"%\" # Input Regulation for IC regulator\n", + "delta_VI=12-9\n", + "print \"change in regulator voltage= %0.2f\"%(delta_VI),\" volts\" # Regulator input voltage variation\n", + "delta_IL=1.25-1\n", + "print \"change in regulator Current= %0.2f\"%(delta_IL),\" A\" # Regulator Current variation\n", + "delta_Vo=(delta_VI*(Sv/100)+delta_IL*Ro)\n", + "print \"change in regulator output voltage= %0.2f\"%(delta_Vo),\" volts\" # Regulator output voltage variation" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_9 Page No. 260" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "alpha=1.41\n", + "AM=1.59\n", + "fOH= 1000.00 Hz\n", + "R1= 10000.00 ohm\n", + "RF=R1*(AM-1)=5860.00 ohm\n", + "C=1.00e-07 farad\n", + "R=1/(omega_OH*C)=1/(2*pi*fOH*C)=1591.55 ohm\n" + ] + } + ], + "source": [ + "from math import pi\n", + "from __future__ import division \n", + "alpha=1.414# Damping coefficient for Butterworth LP filter\n", + "print \"alpha=%0.2f\"%(alpha)\n", + "AM=3-alpha\n", + "print \"AM=%0.2f\"%(AM) # Midband gain of filter \n", + "fOH=1*10**(3)\n", + "print \"fOH= %0.2f\"%(fOH),\" Hz\"#Cut off frequency\n", + "R1=10*10**(3)# Choosing value of R1 same as in book\n", + "print \"R1= %0.2f\"%(R1),\" ohm\" # Resistor at input side of (OP-AMP)filter \n", + "RF=R1*(AM-1)\n", + "print \"RF=R1*(AM-1)=%0.2f\"%(RF),\" ohm\" #Feedback resistance \n", + "C=0.1*10**(-6) # Choosing value of capacitor same a in book\n", + "print \"C=%0.2e\"%(C),\"farad\"\n", + "R=1/(2*pi*fOH*C)# Using formulae wOH=1/C*R and wOH=(2*pi*fOH)\n", + "print \"R=1/(omega_OH*C)=1/(2*pi*fOH*C)=%0.2f\"%(R),\" ohm\" # resistance value for filter design" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_10 Page No. 261" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "fo= 150.00 Hz\n", + "BW= 15.00 Hz\n", + "Q= 10.00\n", + "C=5.00e-08 farad\n", + "R=sqrt(2)/(2*pi*fo*C)=30010.54 ohm\n", + "Am=5-(sqrt(2)/Q)=4.86\n", + "Abp=Am/(5-Am)=34.36\n" + ] + } + ], + "source": [ + "from math import sqrt,pi\n", + "from __future__ import division \n", + "fo=150\n", + "print \"fo= %0.2f\"%(fo),\" Hz\"#Central frequency of band pass filter\n", + "BW=15\n", + "print \"BW= %0.2f\"%(BW),\" Hz\"# Upper cut-off frequency or 3-dB bandwidth\n", + "Q=fo/BW # Quality factor\n", + "print \"Q= %0.2f\"%(Q)\n", + "C=0.05*10**(-6) # Choosing value of capacitor same as in book\n", + "print \"C=%0.2e\"%(C),\"farad\"\n", + "R=sqrt(2)/(2*pi*fo*C)\n", + "print \"R=sqrt(2)/(2*pi*fo*C)=%0.2f\"%(R),\" ohm\" # resistance value for filter design\n", + "Am=5-(sqrt(2)/Q) # formulae\n", + "print \"Am=5-(sqrt(2)/Q)=%0.2f\"%(Am) # Midband gain \n", + "Abp=Am/(5-Am)\n", + "print \"Abp=Am/(5-Am)=%0.2f\"%(Abp) # Central frequency gain " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_11 Page No. 263" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "R= 10000.00 ohm\n", + "R1= 10000.00 ohm\n", + "C=1.00e-08 farad\n", + "R1_ratio_K= 2500.00 ohm\n", + "R= 10000.00 ohm\n", + "alpha_R2= 250.00 ohm\n", + "alpha=alpha_R2/R2= 0.05\n", + "Q= 1/alpha=20.00\n", + "omega_o=1/(R*C)= 10000.00 radian\n", + "Bandwidth=omega_o/Q= 500.00 radian\n", + "K=R1/(R1_ratio_K)= 4.00\n", + "center frequency gain for BPF, K/alpha=K*Q= 80.00\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "R=10*10**(3)\n", + "print \"R= %0.2f\"%(R),\" ohm\" # resistance\n", + "R1=10*10**(3)\n", + "print \"R1= %0.2f\"%(R1),\" ohm\" # resistance\n", + "C=0.01*10**(-6) # value of capacitor\n", + "print \"C=%0.2e\"%(C),\" farad\"\n", + "R1_ratio_K=2.5*10**(3)\n", + "print \"R1_ratio_K= %0.2f\"%(R1_ratio_K),\" ohm\" # resistance\n", + "R2=5*10**(3)\n", + "print \"R= %0.2f\"%(R),\" ohm\" # resistance\n", + "alpha_R2=250\n", + "print \"alpha_R2= %0.2f\"%(alpha_R2),\" ohm\" # resistance\n", + "alpha=alpha_R2/R2\n", + "print \"alpha=alpha_R2/R2= %0.2f\"%(alpha) # Damping factor\n", + "Q=1/alpha\n", + "print \"Q= 1/alpha=%0.2f\"%(Q) # Quality factor\n", + "omega_o=1/(R*C)\n", + "print \"omega_o=1/(R*C)= %0.2f\"%(omega_o),\" radian\"# centre angular frequency\n", + "BW=omega_o/Q\n", + "print \"Bandwidth=omega_o/Q= %0.2f\"%(BW),\" radian\"# Upper cut-off frequency or 3-dB bandwidth\n", + "K=R1/(R1_ratio_K)# Pass band gain for lPF and HPF of state variable filter\n", + "print \"K=R1/(R1_ratio_K)= %0.2f\"%(K)\n", + "Gm=K/alpha# Pass band gain of state variable filter\n", + "print \"center frequency gain for BPF, K/alpha=K*Q= %0.2f\"%(Gm) # Centre frequency gain for BP filter" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_12 Page No. 264" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "IB = 5.00e-07 ampere\n", + "Iio = 5.00e-08 ampere\n", + "Vio= 1.00e-03 volts\n", + "R1= 10000.00 ohm\n", + "RF= 500000.00 ohm\n", + "Vos1=Vio*(1+RF/R1)=0.05 volts\n", + "Vos2=IB*RF=0.25 volts\n", + "Vos=Vos1+Vos2=0.30 volts\n", + "R2=(R1*RF)/(R1+RF)= 9803.92 ohm\n", + "Vos2=Iio*RF=0.02 volts\n", + "Vos=Vos1+Vos2=0.08 volts\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "IB=0.5*10**(-6)\n", + "print \"IB = %0.2e\"%(IB),\" ampere\" #Input bias current \n", + "Iio=0.05*10**(-6)\n", + "print \"Iio = %0.2e\"%(Iio),\" ampere\" #Input offset current \n", + "Vio=1*10**(-3)\n", + "print \"Vio= %0.2e\"%(Vio),\" volts\" #Input offset voltage\n", + "R1=10*10**(3)\n", + "print \"R1= %0.2f\"%(R1),\" ohm\" # resistance\n", + "RF=500*10**(3)\n", + "print \"RF= %0.2f\"%(RF),\" ohm\" #Feedback resistance\n", + "Vos1=Vio*(1+RF/R1)\n", + "print \"Vos1=Vio*(1+RF/R1)=%0.2f\"%(Vos1),\" volts\" #output offset voltage due to input offset voltage\n", + "Vos2=IB*RF\n", + "print \"Vos2=IB*RF=%0.2f\"%(Vos2),\" volts\" #output offset voltage due to Input bias current \n", + "Vos=Vos1+Vos2\n", + "print \"Vos=Vos1+Vos2=%0.2f\"%(Vos),\" volts\" #total output offset voltage \n", + "R2=(R1*RF)/(R1+RF)\n", + "print \"R2=(R1*RF)/(R1+RF)= %0.2f\"%(R2),\" ohm\" # resistance to balance IB effect \n", + "Vos2=Iio*RF\n", + "print \"Vos2=Iio*RF=%0.2f\"%(Vos2),\" volts\" # Reduced output offset voltage due to Input offset current \n", + "Vos=Vos1+Vos2\n", + "print \"Vos=Vos1+Vos2=%0.2f\"%(Vos),\" volts\" # output offset voltage with compensation \n", + " " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_13 Page No. 265" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Iio = 1.00e-10 ampere/degree _celsius\n", + "Vio= 1.00e-05 volt/degree _celsius\n", + "Vs= 0.01 volts\n", + "R1= 10000.00 ohm\n", + "RF= 100000.00 ohm\n", + "part(i)\n", + "R2=(R1*RF)/(R1+RF)= 9090.91 ohm\n", + "part(ii)\n", + "delta_T=75-25 = 50.00 degree_celsius\n", + "delta_Vo=[(Vio*delta_T)*(1+RF/R1)]+(Iio*delta_T*RF)= 0.01 volts\n", + "part(iii)\n", + "Vo=(-RF/R1)*Vs= -0.10 volts\n", + "Percentage error=(delta_Vo/Vo)*100 =(-)6.00 , (+)6.00 percent\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "Iio=0.1*10**(-9)\n", + "print \"Iio = %0.2e\"%(Iio),\" ampere/degree _celsius\" #Input offset current \n", + "Vio=10*10**(-6)\n", + "print \"Vio= %0.2e\"%(Vio),\" volt/degree _celsius\" #Input offset voltage\n", + "Vs=10*10**(-3)\n", + "print \"Vs= %0.2f\"%(Vs),\" volts\" #Input voltage\n", + "R1=10*10**(3)\n", + "print \"R1= %0.2f\"%(R1),\" ohm\" # resistance\n", + "RF=100*10**(3)\n", + "print \"RF= %0.2f\"%(RF),\" ohm\" #Feedback resistance\n", + "print \"part(i)\"\n", + "R2=(R1*RF)/(R1+RF)# R1 in parallel with RF\n", + "print \"R2=(R1*RF)/(R1+RF)= %0.2f\"%(R2),\" ohm\" # resistance to balance IB i.e offset effect \n", + "print \"part(ii)\"\n", + "delta_T=75-25\n", + "print \"delta_T=75-25 = %0.2f\"%(delta_T),\" degree_celsius\" #Temperature change\n", + "delta_Vo=((Vio*delta_T)*(1+RF/R1))+(Iio*delta_T*RF)\n", + "print \"delta_Vo=[(Vio*delta_T)*(1+RF/R1)]+(Iio*delta_T*RF)= %0.2f\"%(delta_Vo),\" volts\" #Output voltage drift\n", + "print \"part(iii)\"\n", + "Vo=(-RF/R1)*Vs\n", + "print \"Vo=(-RF/R1)*Vs= %0.2f\"%(Vo),\" volts\" #Inverting OP-AMP output voltage\n", + "e=(delta_Vo/Vo)*100\n", + "print \"Percentage error=(delta_Vo/Vo)*100 =(-)%0.2f\"%(abs(e)),\", (+)%0.2f\"%(abs(e)),\" percent\"#percentage error" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_14 Page No. 266" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Iio = 1.00e-10 ampere\n", + "VCC= 15.00 volts\n", + "PSRR= 1.50e-04 volts/V\n", + "Vio= 1.00e-05 volts\n", + "R1= 10000.00 ohm\n", + "RF= 100000.00 ohm\n", + "delta_T=75-25 = 50.00 celsius\n", + "delta_Vo=[(Vio*delta_T)*(1+RF/R1)]+(Iio*delta_T*RF)= 0.01 volts\n", + "delta_Vio1=(delta_Vo)*(R1/RF)= 0.00 volts\n", + "delta_Vio2=(delta_Vio1)*(1/10)= 0.00 volts\n", + "power supply regulation=[(delta_Vio2)/(VCC*PSRR)]*100 =2.67 percent\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "Iio=0.1*10**(-9)\n", + "print \"Iio = %0.2e\"%(Iio),\" ampere\" #Input offset current\n", + "VCC=15\n", + "print \"VCC= %0.2f\"%(VCC),\" volts\" # voltage supply \n", + "PSRR=150*10**(-6)\n", + "print \"PSRR= %0.2e\"%(PSRR),\" volts/V\"# Power supply rejection ratio\n", + "Vio=10*10**(-6)\n", + "print \"Vio= %0.2e\"%(Vio),\" volts\" #Input offset voltage\n", + "R1=10*10**(3)\n", + "print \"R1= %0.2f\"%(R1),\" ohm\" # resistance\n", + "RF=100*10**(3)\n", + "print \"RF= %0.2f\"%(RF),\" ohm\" #Feedback resistance\n", + "delta_T=75-25\n", + "print \"delta_T=75-25 = %0.2f\"%(delta_T),\" celsius\" #Temperature change\n", + "delta_Vo=((Vio*delta_T)*(1+RF/R1))+(Iio*delta_T*RF)\n", + "print \"delta_Vo=[(Vio*delta_T)*(1+RF/R1)]+(Iio*delta_T*RF)= %0.2f\"%(delta_Vo),\" volts\" #Output voltage drift\n", + "delta_Vio1=(delta_Vo)*(R1/RF)\n", + "print \"delta_Vio1=(delta_Vo)*(R1/RF)= %0.2f\"%(delta_Vio1),\" volts\" # voltage change at Input for voltage drift found\n", + "delta_Vio2=(delta_Vio1)*(1/10)\n", + "print \"delta_Vio2=(delta_Vio1)*(1/10)= %0.2f\"%(delta_Vio2),\" volts\" # change in Vio due to PSRR\n", + "p=((delta_Vio2)/(VCC*PSRR))*100\n", + "print \"power supply regulation=[(delta_Vio2)/(VCC*PSRR)]*100 =%0.2f\"%(p),\" percent\"# power supply regulation requirement\n", + "\n", + "#delta_Vio1 corresponds to voltage change at Input for voltage drift found \n", + "#delta_Vio2 corresponds voltage change at input due to PSRR" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 8_15 Page No. 271" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "SR= 0.65 volts/microsecond\n", + "part(i)\n", + "Vm= 5.00 volts\n", + "fsm=SR/[10**(-6)*(2*pi*Vm)] = 20690.14 Hz\n", + "part(ii)\n", + "Vm= 1.00 volts\n", + "fsm=SR/[10**(-6)*(2*pi*Vm)] = 103450.71 Hz\n" + ] + } + ], + "source": [ + "from math import pi\n", + "from __future__ import division \n", + "SR=0.65\n", + "print \"SR= %0.2f\"%(SR),\" volts/microsecond\"# Slew rate of OP-AMP\n", + "print \"part(i)\"\n", + "Vm=5\n", + "print \"Vm= %0.2f\"%(Vm),\" volts\" # Output peak voltage1\n", + "fsm=SR/(10**(-6)*(2*pi*Vm)) # using formulae SR=2*pi*fsm*Vm\n", + "print \"fsm=SR/[10**(-6)*(2*pi*Vm)] = %0.2f\"%(fsm),\" Hz\"# # Full power bandwidth for Output peak voltage Vm=5V\n", + "print \"part(ii)\"\n", + "Vm=1\n", + "print \"Vm= %0.2f\"%(Vm),\" volts\" # Output peak voltage2\n", + "fsm=SR/(10**(-6)*(2*pi*Vm)) # using formulae SR=2*pi*fsm*Vm\n", + "print \"fsm=SR/[10**(-6)*(2*pi*Vm)] = %0.2f\"%(fsm),\" Hz\"# # Full power bandwidth for Output peak voltage Vm=1V" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch9.ipynb b/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch9.ipynb new file mode 100644 index 00000000..9a2daba4 --- /dev/null +++ b/Electronics_Circuits_and_Systems_by_Y._N._Bapat/Ch9.ipynb @@ -0,0 +1,596 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Chapter 9 - Digital Circuits and Logic Families" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9_1 Page No. 278" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "VCC= 5.00 volts\n", + "RB= 10000.00 ohm\n", + "RL= 1000.00 ohm\n", + "VCS= 0.20 volts\n", + "VBS= 0.80 volts\n", + "V_gamma= 0.60 volts\n", + "ICS = (VCC-VCS)/RL=4.80e-03 ampere\n", + "vi= 5.00 volts\n", + "IBS=(vi-VBS)/RB=4.20e-04 ampere\n", + "Beta_Fmin=ICS/IBS= 11.43\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "VCC=5\n", + "print \"VCC= %0.2f\"%(VCC),\" volts\" # voltage supply \n", + "RB=10*10**(3)\n", + "print \"RB= %0.2f\"%(RB),\" ohm\" # Base-resistance\n", + "RL=1*10**(3)\n", + "print \"RL= %0.2f\"%(RL),\" ohm\" # Load resistance\n", + "VCS=0.2\n", + "print \"VCS= %0.2f\"%(VCS),\" volts\" # collector saturated voltage \n", + "VBS=0.8\n", + "print \"VBS= %0.2f\"%(VBS),\" volts\" # Base voltage at saturation \n", + "V_gamma=0.6\n", + "print \"V_gamma= %0.2f\"%(V_gamma),\" volts\" # Threshold or cut-in voltage\n", + "ICS=(VCC-VCS)/RL\n", + "print \"ICS = (VCC-VCS)/RL=%0.2e\"%(ICS),\" ampere\" #Saturation collector current of transistor T1\n", + "vi=5\n", + "print \"vi= %0.2f\"%(vi),\" volts\" # Input voltage \n", + "IBS=(vi-VBS)/RB\n", + "print \"IBS=(vi-VBS)/RB=%0.2e\"%(IBS),\" ampere\" # Forward base drive required to sustain ICS\n", + "Beta_Fmin=ICS/IBS\n", + "print \"Beta_Fmin=ICS/IBS= %0.2f\"%(Beta_Fmin) # Common-emitter current gain\n", + "\n", + "#NOTE: Correct formulae for ICS=(VCC-VCS)/RL\n", + "# but in book it is written wrong as ICS=(VCC-VCS)/RB but had calculated ans (in book) according to correct formulae ICS=(VCC-VCS)/RL" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9_2 Page No. 279" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "VD= 0.70 V\n", + "part(i)\n", + "vA= 0.00 V\n", + "vB= 0.00 V\n", + "vX=0.00 V\n", + "part(ii)\n", + "vA= 0.00 V\n", + "vB= 5.00 V\n", + "vX=vB-VD= 4.30 V\n", + "part(iii)\n", + "vA= 5.00 V\n", + "vB= 0.00 V\n", + "vX=vA-VD= 4.30 V\n", + "part(iv)\n", + "vA= 5.00 V\n", + "vB= 5.00 V\n", + "vX=vA-VD=vB-VD= 4.30 V\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "VD=0.7\n", + "print \"VD= %0.2f\"%(VD),\" V\" # Diode voltage drop in conduction mode\n", + "\n", + "print \"part(i)\"# part(i)of question\n", + "vA=0\n", + "print \"vA= %0.2f\"%(vA),\" V\" # Input voltage1 of diode OR logic gate\n", + "vB=0\n", + "print \"vB= %0.2f\"%(vB),\" V\" # Input voltage2 of diode OR logic gate\n", + "vX=0 # Since both input voltages vA=vB=0V\n", + "print \"vX=%0.2f\"%(vX),\" V\" # Output voltage of diode OR logic gate for part(i)\n", + "\n", + "print \"part(ii)\"# part(ii)of question\n", + "vA=0\n", + "print \"vA= %0.2f\"%(vA),\" V\" # Input voltage1 of diode OR logic gate\n", + "vB=5\n", + "print \"vB= %0.2f\"%(vB),\" V\" # Input voltage2 of diode OR logic gate for SECOND CASE: when vA=0V and vB=5V\n", + "vX=vB-VD\n", + "print \"vX=vB-VD= %0.2f\"%(vX),\" V\" # Output voltage of diode OR logic gate for SECOND CASE\n", + "\n", + "print \"part(iii)\"# part(iii)of question\n", + "vA=5\n", + "print \"vA= %0.2f\"%(vA),\" V\" # Input voltage1 of diode OR logic gate for THIRD CASE when vA=5V and vB=0V\n", + "vB=0\n", + "print \"vB= %0.2f\"%(vB),\" V\" # Input voltage2 of diode OR logic gate\n", + "vX=vA-VD\n", + "print \"vX=vA-VD= %0.2f\"%(vX),\" V\" # Output voltage of diode OR logic gate for THIRD CASE\n", + "\n", + "print \"part(iv)\"# part(iv)of question\n", + "vA=(+5)\n", + "print \"vA= %0.2f\"%(vA),\" V\" # Input voltage1 of diode OR logic gate\n", + "vB=(+5)\n", + "print \"vB= %0.2f\"%(vB),\" V\" # Input voltage2 of diode OR logic gate\n", + "vX=vA-VD # Since both diodes D1 and D2 are conducting\n", + "vX=vB-VD \n", + "print \"vX=vA-VD=vB-VD= %0.2f\"%(vX),\" V\" # Output voltage of diode OR logic gate for FOURTH CASE: when vA=5V and vB=5V" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9_3 Page No. 281" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "VD= 0.70 V\n", + "part(i)\n", + "vA= 0.00 V\n", + "vB= 0.00 V\n", + "vX=VD=0.70 V\n", + "part(ii)\n", + "vA= 0.00 V\n", + "vB= 5.00 V\n", + "vX=VD 0.70 V\n", + "part(iii)\n", + "vA= 5.00 V\n", + "vB= 0.00 V\n", + "vX= 0.70 V\n", + "part(iv)\n", + "vA= 5.00 V\n", + "vB= 5.00 V\n", + "vX = vA = vB= 5.00 V\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "VD=0.7\n", + "print \"VD= %0.2f\"%(VD),\" V\" # Diode voltage drop in conduction mode\n", + "\n", + "print \"part(i)\"\n", + "vA=0\n", + "print \"vA= %0.2f\"%(vA),\" V\" # Input voltage of diode AND logic gate\n", + "vB=0\n", + "print \"vB= %0.2f\"%(vB),\" V\" # Input voltage2 of diode AND logic gate\n", + "\n", + "vX=VD # Since both input voltages vA=vB=0V\n", + "print \"vX=VD=%0.2f\"%(vX),\" V\" # Output voltage of diode AND logic gate for FIRST CASE: when vA=0V and vB=0V\n", + "\n", + "print \"part(ii)\"\n", + "vA=0\n", + "print \"vA= %0.2f\"%(vA),\" V\" # Input voltage of diode AND logic gate\n", + "vB=5\n", + "print \"vB= %0.2f\"%(vB),\" V\" # Input voltage2 of diode AND logic gate for SECOND CASE: when vA=0V and vB=5V\n", + "vX=VD #due to diode A which is conducting and the Diode B is reverse biased with a voltage VD-VB=0.7-5=-4.3\n", + "print \"vX=VD %0.2f\"%(vX),\" V\"\n", + "#due to diode B which is conducting\n", + "\n", + "\n", + "\n", + "print \"part(iii)\"\n", + "vA=5\n", + "print \"vA= %0.2f\"%(vA),\" V\" # Input voltage for THIRD CASE when vA=5V and vB=0V\n", + "vB=0\n", + "print \"vB= %0.2f\"%(vB),\" V\" # Input voltage2 of diode AND logic gate\n", + "vX = VD#due to diode B which is conducting and the Diode A is reverse biased with a voltage VD-VA=0.7-5=-4.3\n", + "print \"vX= %0.2f\"%(vX),\" V\"\n", + "\n", + "print \"part(iv)\"\n", + "vA=5\n", + "print \"vA= %0.2f\"%(vA),\" V\" # Input voltage forfourth CASE when vA=5V and vB=5V\n", + "vB=5\n", + "print \"vB= %0.2f\"%(vB),\" V\" # Input voltage2 of diode AND logic gate for CASE: when vA=0V and vB=5V\n", + "vX=vA # Since both diodes D1 and D2 are Non-conducting, so no voltage drop across'R'(resistor)\n", + "print \"vX = vA = vB= %0.2f\"%(vX),\" V\" # Output voltage of diode AND logic gate for FOURTH CASE: when vA=5V and vB=5V" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9_6 Page No. 285" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "VIL= 0.60 V\n", + "VIH= 0.75 V\n", + "VOL= 0.20 V\n", + "VOH= 1.00 V\n", + "NML=VIL-VOL= 0.40 V\n", + "NMH=VOH-VIH= 0.25 V\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "VIL=0.6\n", + "print \"VIL= %0.2f\"%(VIL),\" V\" # Minimum input voltage level for which output is maximum\n", + "VIH=0.75\n", + "print \"VIH= %0.2f\"%(VIH),\" V\" # Maximum input voltage level for which output is minimum\n", + "VOL=0.2\n", + "print \"VOL= %0.2f\"%(VOL),\" V\" # Minimum output voltage level for maximum input level\n", + "VOH=1\n", + "print \"VOH= %0.2f\"%(VOH),\" V\" # Maximum output voltage level for minimum input level\n", + "NML=VIL-VOL\n", + "print \"NML=VIL-VOL= %0.2f\"%(NML),\" V\" # Low level noise immunities\n", + "NMH=VOH-VIH\n", + "print \"NMH=VOH-VIH= %0.2f\"%(NMH),\" V\" # High level noise immunities" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9_7 Page No. 287" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "IIL= -1.60e-03 A\n", + "IIH= 4.00e-05 A\n", + "IOL= 1.60e-02 A\n", + "IOH= -4.00e-04 A\n", + "Fan-out=abs((IOH/IIH)=abs((IOL/IIL))= 10.00\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "IIL=-1.6*10**(-3)\n", + "print \"IIL= %0.2e\"%(IIL),\" A\" # Input sink Current of TTL driver\n", + "IIH=40*10**(-6)\n", + "print \"IIH= %0.2e\"%(IIH),\" A\" # source (supply) reverse Current of TTL driver\n", + "IOL=16*10**(-3)\n", + "print \"IOL= %0.2e\"%(IOL),\" A\" # Specified Maximum sink Current of TTL driver\n", + "IOH=-400*10**(-6)\n", + "print \"IOH= %0.2e\"%(IOH),\" A\" # Specified Maximum source Current of TTL driver\n", + "Fan_out=abs((IOH/IIH))\n", + "print \"Fan-out=abs((IOH/IIH)=abs((IOL/IIL))= %0.2f\"%(Fan_out)# Fan-out of TTL" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9_8 Page No. 288" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "VIL= 0.80 V\n", + "VIH= 2.00 V\n", + "VOL= 0.40 V\n", + "VOH= 2.40 V\n", + "NML=VIL-VOL= 0.40 V\n", + "NMH=VOH-VIH= 0.40 V\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "VIL=0.8\n", + "print \"VIL= %0.2f\"%(VIL),\" V\" # Minimum input voltage level for which output is maximum\n", + "VIH=2\n", + "print \"VIH= %0.2f\"%(VIH),\" V\" # Maximum input voltage level for which output is minimum\n", + "VOL=0.4\n", + "print \"VOL= %0.2f\"%(VOL),\" V\" # Minimum output voltage level for maximum input level\n", + "VOH=2.4\n", + "print \"VOH= %0.2f\"%(VOH),\" V\" # Maximum output voltage level for minimum input level\n", + "NML=VIL-VOL\n", + "print \"NML=VIL-VOL= %0.2f\"%(NML),\" V\" # Low level noise immunities\n", + "NMH=VOH-VIH\n", + "print \"NMH=VOH-VIH= %0.2f\"%(NMH),\" V\" # High level noise immunities" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9_9 Page No. 289" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "VIL= 1.00 V\n", + "VIH= 4.00 V\n", + "VOL= 0.50 V\n", + "VOH= 4.50 V\n", + "NML=VIL-VOL= 0.50 V\n", + "NMH=VOH-VIH= 0.50 V\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "VIL=1\n", + "print \"VIL= %0.2f\"%(VIL),\" V\" # Minimum input voltage level for which output is maximum\n", + "VIH=4\n", + "print \"VIH= %0.2f\"%(VIH),\" V\" # Maximum input voltage level for which output is minimum\n", + "VOL=0.5\n", + "print \"VOL= %0.2f\"%(VOL),\" V\" # Minimum output voltage level for maximum input level\n", + "VOH=4.5\n", + "print \"VOH= %0.2f\"%(VOH),\" V\" # Maximum output voltage level for minimum input level\n", + "NML=VIL-VOL\n", + "print \"NML=VIL-VOL= %0.2f\"%(NML),\" V\" # Low level noise immunities\n", + "NMH=VOH-VIH\n", + "print \"NMH=VOH-VIH= %0.2f\"%(NMH),\" V\" # High level noise immunities" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9_10 Page No. 291" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "V_gamma= 0.60 volts\n", + "VEE= -5.20 volts\n", + "VBE3=VBE4=VBE5 0.70 volts\n", + "RE= 779.00 ohm\n", + "RL2= 220.00 ohm\n", + "RL3= 245.00 ohm\n", + "VREF= -1.29 volts\n", + "V(1)= -0.70 volts\n", + "V(0)= -1.70 volts\n", + "part(i)\n", + "VE=VREF-VBE3= -1.99 volts\n", + "IE=(VEE-VE)/RE= -0.00 A\n", + "IC3=IE= -0.00 A\n", + "vC3=IC3*RL3= -1.01 volts\n", + "vY=vC3-VBE5= -1.71 volts\n", + "vX=vC2-VBE4= -0.70 volts\n", + "Base -Emitter reverse voltage,VBEr=V(0)-VE= 0.29 volts\n", + "Transistor T1 and T2 off since VBEr < V_gamma\n", + "part(ii)\n", + "vY=VC3-VBE= -0.70 volts\n", + "VE=vB-VBE= -1.40 volts\n", + "VBE3=VREF-VE= 0.11 volts\n", + "VBE3 is smaller than V_gamma,hence T3 is off\n", + "IC2=(VEE-VE)/RE= -0.00 A\n", + "vC2=IC2*RL2= -1.07 volts\n", + "vX=vC2-VBE4= -1.77 volts\n", + "part(iii)\n", + "VE3=VE= -1.99 volts\n", + "VB3=VREF= -1.29 volts\n", + "IC3=(VEE-VE3)/RE= -0.00 A\n", + "VC3=IC3*RL3= -1.01 volts\n", + "VCB3=VC3-VB3= 0.28 volts\n", + "All parameters have appropriate signs for npn BJT hence BJT in active region\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "V_gamma=0.6\n", + "print \"V_gamma= %0.2f\"%(V_gamma),\" volts\" #Threshold voltage\n", + "VEE=-5.2\n", + "print \"VEE= %0.2f\"%(VEE),\" volts\" # voltage supply \n", + "VBE3=0.7\n", + "VBE4=VBE3\n", + "VBE5=VBE3\n", + "print \"VBE3=VBE4=VBE5 %0.2f\"%(VBE3),\" volts\" #base-emitter voltage\n", + "RE=779\n", + "print \"RE= %0.2f\"%(RE),\" ohm\" # Emitter-resistance\n", + "RL2=220\n", + "print \"RL2= %0.2f\"%(RL2),\" ohm\" # Load resistance\n", + "RL3=245\n", + "print \"RL3= %0.2f\"%(RL3),\" ohm\" # Load resistance\n", + "VREF=-1.29\n", + "print \"VREF= %0.2f\"%(VREF),\" volts\" # Reference- voltage \n", + "V_1=-0.7\n", + "print \"V(1)= %0.2f\"%(V_1),\" volts\" # Acceptable voltage for high logic \n", + "V_0=-1.7\n", + "print \"V(0)= %0.2f\"%(V_0),\" volts\" # Acceptable voltage for low logic \n", + "\n", + "print \"part(i)\"# part(i)of question\n", + "VE=VREF-VBE3\n", + "print \"VE=VREF-VBE3= %0.2f\"%(VE),\" volts\" # Emitter- voltage \n", + "IE=(VEE-VE)/RE\n", + "print \"IE=(VEE-VE)/RE= %0.2f\"%(IE),\" A\" #Emitter- Current\n", + "IC3=IE# since IC=IE neglecting IB\n", + "print \"IC3=IE= %0.2f\"%(IE),\" A\" #Collector- Current\n", + "vC3=IC3*RL3\n", + "print \"vC3=IC3*RL3= %0.2f\"%(vC3),\" volts\" # Collector- voltage \n", + "vY=vC3-VBE5\n", + "print \"vY=vC3-VBE5= %0.2f\"%(vY),\" volts\" # Emitter follower output voltage for vB=V(0) \n", + "vC2=0 \n", + "vX=vC2-VBE4\n", + "print \"vX=vC2-VBE4= %0.2f\"%(vX),\" volts\" # Emitter follower output voltage for vB=V(0) \n", + "VBEr=(V_0)-VE\n", + "print \"Base -Emitter reverse voltage,VBEr=V(0)-VE= %0.2f\"%(VBEr),\" volts\"#Base- Emitter junction reverse voltage ,this is sufficient to keep T1 and T2 off since threshold =0.6V\n", + "print \"Transistor T1 and T2 off since VBEr < V_gamma\" # Since VBEr < V_gamma hence T1 and T2 off\n", + "\n", + "print \"part(ii)\"# part(ii)of question\n", + "IC2=IE\n", + "VBE=0.7 \n", + "vB=V_1\n", + "IC3=0\n", + "VC3=0\n", + "vY=VC3-VBE5\n", + "print \"vY=VC3-VBE= %0.2f\"%(vY),\" volts\"# Emitter follower output voltage for SECOND CASE for vB=V(1) \n", + "VE=vB-VBE\n", + "print \"VE=vB-VBE= %0.2f\"%(VE),\" volts\" # Emitter- voltage \n", + "VBE3=VREF-VE\n", + "print \"VBE3=VREF-VE= %0.2f\"%(VBE3),\" volts\"#Base- Emitter junction voltage\n", + "print \"VBE3 is smaller than V_gamma,hence T3 is off\"\n", + "IC2=(VEE-VE)/RE\n", + "print \"IC2=(VEE-VE)/RE= %0.2f\"%(IC2),\" A\" #Collector- Current for T2(transistor)\n", + "vC2=IC2*RL2\n", + "print \"vC2=IC2*RL2= %0.2f\"%(vC2),\" volts\" # Collector- voltage for T2\n", + "vX=vC2-VBE4\n", + "print \"vX=vC2-VBE4= %0.2f\"%(vX),\" volts\" # Emitter follower output voltage for vB=V(1)\n", + "\n", + "print \"part(iii)\"# part(iii)of question \n", + "VE3=-1.99\n", + "print \"VE3=VE= %0.2f\"%(VE3),\" volts\" # Transistor T3 Emitter- voltage ,when T3 is conducting \n", + "VB3=VREF\n", + "print \"VB3=VREF= %0.2f\"%(VB3),\" volts\" # Base- voltage when T3 is conducting\n", + "IC3=(VEE-VE3)/RE# Collector current for T3 neglecting IB\n", + "print \"IC3=(VEE-VE3)/RE= %0.2f\"%(IC3),\" A\" #Collector- Current\n", + "VC3=IC3*RL3\n", + "print \"VC3=IC3*RL3= %0.2f\"%(VC3),\" volts\" # Collector- voltage when T3 is conducting \n", + "VCB3=VC3-VB3\n", + "print \"VCB3=VC3-VB3= %0.2f\"%(VCB3),\" volts\" # Base- voltage when T3 is conducting \n", + "#All parameters have appropriate signs for npn BJT hence BJT in active region not in saturation in which VCB will have a (-)value\n", + "print \"All parameters have appropriate signs for npn BJT hence BJT in active region\" \n", + "\n", + "\n", + "# NOTE: Author ha not used any symbol for Base- Emitter junction reverse voltage But I have used 'VBEr' for it.\n", + "# ERROR :sign of IE is given wrong in the book in part(i) and sign of IC2 in part(ii)\n", + "# In part(i) Correct Formulae of vC3 is vC3 =IC3*RL3 but given in book is vC3 =(-)IC3*RL3 because author has included the (-)ive sign or the polarity of IC3 in the formulae \n", + "# IN book in part(ii) mistakenly it is written as vB=V_0 =-0.7 V but Correct expression is vB=V_1=-0.7 V because vB is at high at V_1=-0.7 V\n", + "# In part(ii) Author has used formulae vC2=-IC2*RL2 because he has included the (-)ive sign of the IC2 in the formulae but I have used vC2=IC2*RL2 to remove any ambiguity in program" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Example 9_11 Page No. 292" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": { + "collapsed": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "VIL= -1.48 V\n", + "VIH= -1.10 V\n", + "VOL= -1.63 V\n", + "VOH= -0.98 V\n", + "NML=VIL-VOL= 0.15 V\n", + "NMH=VOH-VIH= 0.12 V\n" + ] + } + ], + "source": [ + "from __future__ import division \n", + "VIL=-1.475\n", + "print \"VIL= %0.2f\"%(VIL),\" V\" # Minimum input voltage level for which output is maximum\n", + "VIH=-1.105\n", + "print \"VIH= %0.2f\"%(VIH),\" V\" # Maximum input voltage level for which output is minimum\n", + "VOL=-1.63\n", + "print \"VOL= %0.2f\"%(VOL),\" V\" # Minimum output voltage level for maximum input level\n", + "VOH=-0.98\n", + "print \"VOH= %0.2f\"%(VOH),\" V\" # Maximum output voltage level for minimum input level\n", + "NML=VIL-VOL\n", + "print \"NML=VIL-VOL= %0.2f\"%(NML),\" V\" # Low level noise immunities\n", + "NMH=VOH-VIH\n", + "print \"NMH=VOH-VIH= %0.2f\"%(NMH),\" V\" # High level noise immunities" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 2", + "language": "python", + "name": "python2" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 2 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython2", + "version": "2.7.9" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/Electronics_Circuits_and_Systems_by_Y._N._Bapat/screenshots/AntilogOpamp13.png b/Electronics_Circuits_and_Systems_by_Y._N._Bapat/screenshots/AntilogOpamp13.png Binary files differnew file mode 100644 index 00000000..8da12993 --- /dev/null +++ b/Electronics_Circuits_and_Systems_by_Y._N._Bapat/screenshots/AntilogOpamp13.png diff --git a/Electronics_Circuits_and_Systems_by_Y._N._Bapat/screenshots/LogOpamp13.png b/Electronics_Circuits_and_Systems_by_Y._N._Bapat/screenshots/LogOpamp13.png Binary files differnew file mode 100644 index 00000000..8a3b67f0 --- /dev/null +++ b/Electronics_Circuits_and_Systems_by_Y._N._Bapat/screenshots/LogOpamp13.png diff --git a/Electronics_Circuits_and_Systems_by_Y._N._Bapat/screenshots/OutPutLogAmp13.png b/Electronics_Circuits_and_Systems_by_Y._N._Bapat/screenshots/OutPutLogAmp13.png Binary files differnew file mode 100644 index 00000000..46c771cd --- /dev/null +++ b/Electronics_Circuits_and_Systems_by_Y._N._Bapat/screenshots/OutPutLogAmp13.png |