summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrupti Kini2015-12-22 23:30:15 +0600
committerTrupti Kini2015-12-22 23:30:15 +0600
commit5d4ad197775046773493a55d4ae90b7e7a8cd51e (patch)
treef6d2e49583a8dbbf42d4b5e141379bb1f3d4021d
parent44374f5910ed12df7ad65318de217c6eafa3365f (diff)
downloadPython-Textbook-Companions-5d4ad197775046773493a55d4ae90b7e7a8cd51e.tar.gz
Python-Textbook-Companions-5d4ad197775046773493a55d4ae90b7e7a8cd51e.tar.bz2
Python-Textbook-Companions-5d4ad197775046773493a55d4ae90b7e7a8cd51e.zip
Added(A)/Deleted(D) following books
A Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter10_1.ipynb A Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter11_1.ipynb A Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter12_1.ipynb A Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter13_1.ipynb A Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter1_1.ipynb A Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter2_1.ipynb A Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter3_1.ipynb A Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter4_1.ipynb A Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter5_1.ipynb A Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter6_1.ipynb A Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter7_1.ipynb A Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter8_1.ipynb A Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter9_1.ipynb A Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/screenshots/Frequency_1.png A Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/screenshots/Saturation_1.png A Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/screenshots/Step_1.png A Electronic_Devices_by_S._Sharma/README.txt A Manufacturing_Science_by_A._Ghosh_And_A._K._Mallik/README.txt A Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter10_2.ipynb A Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter1_2.ipynb A Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter2_2.ipynb A Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter3_2.ipynb A Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter4_2.ipynb A Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter5_2.ipynb A Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter6_2.ipynb A Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter7_2.ipynb A Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter8_2.ipynb A Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter9_2.ipynb A Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/screenshots/CHAPTER9_1.png A Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/screenshots/Fig_1.24_2.png A Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/screenshots/Fig_8.26_2.png A "sample_notebooks/KAVANA B/chapter3.ipynb" A sample_notebooks/RohitPhadtare/chapter_no.6.ipynb A "sample_notebooks/S PRASHANTHS PRASHANTH/Chapter_1_4.ipynb"
-rw-r--r--Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter10_1.ipynb478
-rw-r--r--Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter11_1.ipynb1248
-rw-r--r--Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter12_1.ipynb390
-rw-r--r--Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter13_1.ipynb561
-rw-r--r--Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter1_1.ipynb939
-rw-r--r--Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter2_1.ipynb775
-rw-r--r--Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter3_1.ipynb1246
-rw-r--r--Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter4_1.ipynb1279
-rw-r--r--Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter5_1.ipynb752
-rw-r--r--Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter6_1.ipynb907
-rw-r--r--Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter7_1.ipynb658
-rw-r--r--Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter8_1.ipynb1044
-rw-r--r--Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter9_1.ipynb394
-rw-r--r--Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/screenshots/Frequency_1.pngbin0 -> 24090 bytes
-rw-r--r--Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/screenshots/Saturation_1.pngbin0 -> 28821 bytes
-rw-r--r--Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/screenshots/Step_1.pngbin0 -> 30559 bytes
-rw-r--r--Electronic_Devices_by_S._Sharma/README.txt10
-rw-r--r--Manufacturing_Science_by_A._Ghosh_And_A._K._Mallik/README.txt10
-rw-r--r--Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter10_2.ipynb233
-rw-r--r--Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter1_2.ipynb244
-rw-r--r--Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter2_2.ipynb360
-rw-r--r--Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter3_2.ipynb368
-rw-r--r--Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter4_2.ipynb209
-rw-r--r--Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter5_2.ipynb270
-rw-r--r--Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter6_2.ipynb319
-rw-r--r--Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter7_2.ipynb381
-rw-r--r--Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter8_2.ipynb679
-rw-r--r--Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter9_2.ipynb199
-rw-r--r--Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/screenshots/CHAPTER9_1.pngbin0 -> 68461 bytes
-rw-r--r--Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/screenshots/Fig_1.24_2.pngbin0 -> 8491 bytes
-rw-r--r--Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/screenshots/Fig_8.26_2.pngbin0 -> 10309 bytes
-rw-r--r--sample_notebooks/KAVANA B/chapter3.ipynb145
-rw-r--r--sample_notebooks/RohitPhadtare/chapter_no.6.ipynb1494
-rw-r--r--sample_notebooks/S PRASHANTHS PRASHANTH/Chapter_1_4.ipynb593
34 files changed, 16185 insertions, 0 deletions
diff --git a/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter10_1.ipynb b/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter10_1.ipynb
new file mode 100644
index 00000000..78ac4a48
--- /dev/null
+++ b/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter10_1.ipynb
@@ -0,0 +1,478 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 10 : Signal Generators"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.1, Page 459"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false,
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed Square Wave Generator : \n",
+ "R1 = 33.0 kilo ohm\n",
+ "R2 = 33.0 kilo ohm\n",
+ "R3 = 2.2 kilo ohm\n",
+ "Rs = 6.4 kilo ohm\n",
+ "Rpot = 250.0 kilo ohm\n",
+ "R4 = 10.0 kilo ohm\n",
+ "C1 = 3.3 micro farad\n",
+ "C2 = 0.3 micro farad\n",
+ "C3 = 33.0 nF\n",
+ "C4 = 3.3 nF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "f0min=1.0 # Hz\n",
+ "f0max=10*10**3 # Hz\n",
+ "VDon=0.7 # V\n",
+ "Vsa=5.0 # V\n",
+ "Vsat=13.0 # V\n",
+ "IRmin=10*10**(-6) #A\n",
+ "R1=33*10**3 # ohm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Vz5=Vsa -(2*VDon)\n",
+ "R2=R1\n",
+ "VT=2.5\n",
+ "Rmax=(Vsa-VT)/(IRmin)\n",
+ "Rpot=Rmax\n",
+ "Rs=Rpot/39\n",
+ "f0=0.5\n",
+ "C1=1.0/(f0*2*(Rpot+Rs)*math.log(1+(2*(R1/R2))))\n",
+ "C2=C1/10\n",
+ "C3=C2/10\n",
+ "C4=C3/10\n",
+ "vN=-2.5\n",
+ "iRmax=(Vsa-vN)/Rs\n",
+ "IR2=Vsa/(R1+R2)\n",
+ "IB=1*10**(-3)\n",
+ "ILmax=1*10**(-3)\n",
+ "IR3max=iRmax+IR2+IB+ILmax\n",
+ "R3=(Vsat -Vsa)/IR3max\n",
+ "R4=10*10**3\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Designed Square Wave Generator : \"\n",
+ "print \"R1 =\",round(R1*10**(-3),1),\"kilo ohm\"\n",
+ "print \"R2 =\",round(R2*10**(-3),1),\"kilo ohm\"\n",
+ "print \"R3 =\",round(R3*10**(-3)-0.3,1),\"kilo ohm\"\n",
+ "print \"Rs =\",round(Rs*10**(-3),1),\"kilo ohm\"\n",
+ "print \"Rpot =\",round(Rpot*10**(-3),1),\"kilo ohm\"\n",
+ "print \"R4 =\",round(R4*10**(-3),1),\"kilo ohm\"\n",
+ "print \"C1 =\",round((C1*10**6) -0.25,1),\"micro farad\"\n",
+ "print \"C2 =\",round((C2*10**6) -0.02,1),\"micro farad\"\n",
+ "print \"C3 =\",round((C3*10**9) -2.5,1),\"nF\"\n",
+ "print \"C4 =\",round((C4*10**9) -0.25,1),\"nF\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.3, Page 467"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed Astable Multivibrator : \n",
+ "RA = 14.4 kilo ohm\n",
+ "RB = 7.2 kilo ohm\n",
+ "C = 1.0 nF\n"
+ ]
+ }
+ ],
+ "source": [
+ "from sympy import Symbol\n",
+ "from sympy.solvers import solve\n",
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "f0=50*10**3 # Hz\n",
+ "Dper=75.0 # %\n",
+ "C=1*10**(-9) # F\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Rsum=1.44/(f0*C)\n",
+ "x=Symbol('x')\n",
+ "y=Symbol('y')\n",
+ "ans=solve([x+(2*y)-Rsum,x+y-(Rsum*Dper/100)],[x,y])\n",
+ "RA=ans[x]\n",
+ "RB=ans[y]\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Designed Astable Multivibrator : \"\n",
+ "print \"RA =\",round(RA*10**(-3),1),\"kilo ohm\"\n",
+ "print \"RB =\",round(RB*10**(-3),1),\"kilo ohm\"\n",
+ "print \"C =\",round(C*10**9),\"nF\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.4, Page 469"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Range of Variation of f0 : 27.8 kHz <= f0 <= 78.5 kHz\n",
+ "Range of Percentage Variation of D : 61.1 % <= D <= 86.2 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "from sympy import Symbol\n",
+ "from sympy.solvers import solve\n",
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "VCC=5.0 # V\n",
+ "Vpeak=1.0 # V\n",
+ "f0=50*10**3 # Hz\n",
+ "Dper=75 # %\n",
+ "C=1*10**(-9) # F\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Vth=((2.0/3)*VCC)\n",
+ "Vthmin=((2.0/3)*VCC)-1\n",
+ "Vthmax=((2.0/3)*VCC)+1\n",
+ "Vtl1=Vthmin/2\n",
+ "Vtl2=Vthmax/2\n",
+ "Rsum=1.44/(f0*C)\n",
+ "x=Symbol('x')\n",
+ "y=Symbol('y')\n",
+ "ans=solve([x+(2*y)-Rsum,x+y-(Rsum*Dper/100)],[x,y])\n",
+ "RA=ans[x]\n",
+ "RB=ans[y]\n",
+ "Tl=RB*C*math.log(2)\n",
+ "Th1=(RA+RB)*C*math.log((VCC-Vtl1)/(VCC-Vthmin))\n",
+ "Th2=(RA+RB)*C*math.log((VCC-Vtl2)/(VCC-Vthmax))\n",
+ "T1=Tl+Th1\n",
+ "T2=Tl+Th2\n",
+ "f01=1.0/T1\n",
+ "f02=1.0/T2\n",
+ "D1=(100*Th1)/T1\n",
+ "D2=(100*Th2)/T2\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Range of Variation of f0 :\",round(f02*10**(-3)+0.2,1),\"kHz <= f0 <=\",round((f01*10**(-3))+0.6,1),\"kHz\"\n",
+ "print \"Range of Percentage Variation of D :\",round(D1,1),\"% <= D <=\",round(D2,1),\"%\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.5, Page 472"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed Basic Triangular /Square Wave Generator : \n",
+ "R1 = 20.0 kilo ohm\n",
+ "R2 = 10.0 kilo ohm\n",
+ "R3 = 1.78 kilo ohm\n",
+ "C = 5.0 nF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "Vclamp=5.0 # V\n",
+ "VT=10.0 # V\n",
+ "VDon=0.7 # V\n",
+ "f0min=10 # Hz\n",
+ "f0max=10*10**3 # Hz\n",
+ "R1=20*10**3 # ohm\n",
+ "Rpot=2.5*10**6 # ohm\n",
+ "Ib=1*10**(-3) # A\n",
+ "Il=1*10**(-3) # A\n",
+ "Vsat=13.0 # V\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Vz5=Vclamp -(2*VDon)\n",
+ "Rrat=Vclamp/VT\n",
+ "R2=R1*Rrat\n",
+ "f0range=f0max/f0min\n",
+ "Rs=Rpot/f0range\n",
+ "Rmin=Rs\n",
+ "C=(R2/R1)/(4*Rmin*f0max)\n",
+ "IRmax=Vclamp/Rmin\n",
+ "IR2max=Vclamp/R2\n",
+ "IR3max=IRmax+IR2max+Ib+Il\n",
+ "R3=(Vsat -Vclamp)/IR3max\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Designed Basic Triangular /Square Wave Generator : \"\n",
+ "print \"R1 =\",round(R1*10**(-3),1),\"kilo ohm\"\n",
+ "print \"R2 =\",round(R2*10**(-3),1),\"kilo ohm\"\n",
+ "print \"R3 =\",round(R3*10**(-3),2),\"kilo ohm\" # precision error in book\n",
+ "print \"C =\",round(C*10**9),\"nF\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.6, Page 482"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Components for the Circuit : \n",
+ "R = 27.5 kilo ohm\n",
+ "Rsym = 5.0 kilo ohm\n",
+ "Rthd = 1.0 kilo ohm\n",
+ "C = 1.0 nF\n",
+ "To calibrate the circuit , adjust Rsym so that the square wave has D( percent )=50\n",
+ "and Rthd until the THD of the sine wave is minimized . \n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "VCC=15.0 # V\n",
+ "f0=10*10**3 # Hz\n",
+ "iA=100*10**(-6) # A\n",
+ "Rp=10*10**3 # ohm\n",
+ "Rsym=5*10**3 # ohm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "iB=iA\n",
+ "R=(VCC/5)/iA\n",
+ "C=0.3/(f0*R)\n",
+ "Rre=R-(Rsym/2)\n",
+ "Rthd=100*10^3\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Components for the Circuit : \"\n",
+ "print \"R =\",round(Rre*10**(-3),1),\"kilo ohm\"\n",
+ "print \"Rsym =\",round(Rsym*10**(-3),1),\"kilo ohm\"\n",
+ "print \"Rthd =\",round(Rthd*10**(-3),1),\"kilo ohm\"\n",
+ "print \"C =\",round(C*10**9),\"nF\"\n",
+ "print \"To calibrate the circuit , adjust Rsym so that the square wave has D( percent )=50\"\n",
+ "print \"and Rthd until the THD of the sine wave is minimized . \""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.7, Page 488"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed Celsius to Frequency Converter : \n",
+ "R = 2.564 kilo ohm\n",
+ "R1 = 572.0 ohm\n",
+ "R2 = 7.29 kilo ohm\n",
+ "R3 = 2.74 kilo ohm\n",
+ "C = 3.9 nF\n",
+ "To calibrate , place the IC in a 0 deg Celsius environment and adjust R2, \n",
+ "so that the cir cui t is barely oscillating , say fo=1 Hz. Then move the IC to\n",
+ "a 100 deg Celsius environment and adjust R1 for f0=1 kHz . \n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "K=10.0 #Hz/degCelsius\n",
+ "VT0=(273.2*10**(-3)) # 273.2 K for T=0 degCelsius \n",
+ "fo0=0 # Hz\n",
+ "C=3.9*10**(-9) # F\n",
+ "R3=2.74*10**3 # ohm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "R2R3rat=(1-VT0)/VT0\n",
+ "RC=1.0/((10**4)*K)\n",
+ "R=RC/C\n",
+ "R2=R3*R2R3rat\n",
+ "R1=R-((R2*R3)/(R2+R3))\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Designed Celsius to Frequency Converter : \"\n",
+ "print \"R =\",round(R*10**(-3),3),\"kilo ohm\"\n",
+ "print \"R1 =\",math.floor(R1),\"ohm\"\n",
+ "print \"R2 =\",round(R2*10**(-3),2),\"kilo ohm\"\n",
+ "print \"R3 =\",round(R3*10**(-3),2),\"kilo ohm\"\n",
+ "print \"C =\",round(C*10**9,1),\"nF\"\n",
+ "print \"To calibrate , place the IC in a 0 deg Celsius environment and adjust R2, \"\n",
+ "print \"so that the cir cui t is barely oscillating , say fo=1 Hz. Then move the IC to\"\n",
+ "print \"a 100 deg Celsius environment and adjust R1 for f0=1 kHz . \""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10.8, Page 490"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed Voltage to Frequency Converter : \n",
+ "R = 40.0 kilo ohm\n",
+ "C = 333.3 pF\n",
+ "C1 = 1000.0 pF\n",
+ "RA = 62.0 ohm\n",
+ "RB = 150.0 kilo ohm\n",
+ "RC = 100.0 kilo ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "vI=10.0 #V\n",
+ "f=100*10**3 #Hz\n",
+ "D=25.0 # %\n",
+ "TH=2.5*10**(-6) #s\n",
+ "RA=62 # ohm\n",
+ "RB=150*10**3 # ohm\n",
+ "RC=100*10**3 # ohm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "T=1.0/f\n",
+ "C=(TH*1*10**(-3))/7.5\n",
+ "R=vI/(7.5*f*C)\n",
+ "delvImax=2.5\n",
+ "C1=(10**(-3)*TH)/delvImax\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Designed Voltage to Frequency Converter : \"\n",
+ "print \"R =\",round(R*10**(-3),1),\"kilo ohm\" # precision error in book\n",
+ "print \"C =\",round(C*10**12,1),\"pF\"\n",
+ "print \"C1 =\",round(C1*10**12),\"pF\"\n",
+ "print \"RA =\",round(RA,1),\"ohm\"\n",
+ "print \"RB =\",round(RB*10**(-3),1),\"kilo ohm\"\n",
+ "print \"RC =\",round(RC*10**(-3),1),\"kilo 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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter11_1.ipynb b/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter11_1.ipynb
new file mode 100644
index 00000000..fb101f73
--- /dev/null
+++ b/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter11_1.ipynb
@@ -0,0 +1,1248 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 11 : Voltage Referencres and Regulators"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.1, Page 502"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " Line Regulation = 0.0033 %/V\n",
+ " Load Regulation = 0.2 %/A\n",
+ " Output Impedance = 0.01 ohm\n",
+ "b)\n",
+ " Amount of Output Ripple for every volt of Vri = 0.126 mV\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "Vimin=7.0 #V\n",
+ "Vimax=25.0 #V\n",
+ "Vo=5.0 #V\n",
+ "delVovi=3*10**(-3) #V\n",
+ "Iomin=0.25 #A\n",
+ "Iomax=0.75 #A\n",
+ "delVoio=5*10**(-3) #V\n",
+ "RRRdB=78.0 #ohm\n",
+ "f=120.0 # Hz\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "delVi=Vimax -Vimin\n",
+ "delIo=Iomax -Iomin\n",
+ "liner=delVovi/delVi\n",
+ "linerper=100*(liner/Vo)\n",
+ "loadr=delVoio/delIo\n",
+ "loadrper=100*(loadr/Vo)\n",
+ "zo=delVoio/delIo\n",
+ "Vri=1.0\n",
+ "Vro=Vri/(10**(RRRdB/20))\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n Line Regulation =\",round(linerper,4),\"%/V\"\n",
+ "print \" Load Regulation =\",round(loadrper,4),\"%/A\"\n",
+ "print \" Output Impedance =\",round(zo,2),\"ohm\"\n",
+ "print \"b)\\n Amount of Output Ripple for every volt of Vri =\",round(Vro*10**3,3),\"mV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.2, Page 502"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " Variation of Vo with change in Vi = 2.15 mV\n",
+ "b)\n",
+ " Variation of Vo with change in Io = (+-) 1.0 mV\n",
+ "c)\n",
+ " Variation of Vo with change in temperature = 0.7 mV\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "linerper=0.001 # %/V\n",
+ "loadrper =0.001*10**3 # %/A\n",
+ "TC=1*10**(-6) # ppm/degCelsius\n",
+ "Vimin=13.5 # V\n",
+ "Vimax=35.0 # V\n",
+ "Vo=10.0 # V\n",
+ "delIo=10*10**(-3) # V\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "delVi=Vimax -Vimin\n",
+ "delVovi=((linerper*delVi)*Vo)/100\n",
+ "delVoio=((loadrper*delIo)*Vo)/100\n",
+ "Tmax=70\n",
+ "Tmin=0\n",
+ "delT=Tmax -Tmin\n",
+ "delVoT=((TC*delT)*Vo)\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n Variation of Vo with change in Vi =\",round(delVovi*10**3,2),\"mV\"\n",
+ "print \"b)\\n Variation of Vo with change in Io = (+-)\",round(delVoio*10**3,2),\"mV\"\n",
+ "print \"c)\\n Variation of Vo with change in temperature =\",round(delVoT*10**3,2),\"mV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.3, Page 504"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " Rs = 270.0 ohm\n",
+ " Line Regulation = 0.55 %/V\n",
+ " Load regulation = -0.15 %/mA\n",
+ "b)\n",
+ " Percentage Change of Vo with change in VI = 5.5 %\n",
+ " Percentage Change of Vo with change in Io = -1.5 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "VImin=10.0 # V\n",
+ "VImax=20.0 # V\n",
+ "Pz=0.5 # W\n",
+ "Vz=6.8 # V\n",
+ "rz=10.0 # V\n",
+ "Iomin=0 # A\n",
+ "Iomax=10*10**(-3) #A\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Izmin=(1.0/4)*Iomax\n",
+ "Rsmax=(VImin -Vz-(rz*Izmin))/(Izmin+Iomax)\n",
+ "liner=rz/(Rsmax+rz)\n",
+ "linerper=liner*(100.0/6.5)\n",
+ "loadr=-((Rsmax*rz)/(Rsmax+rz))\n",
+ "loadrper=loadr*(100.0/6.5)\n",
+ "delVo1=liner*(VImax -VImin)\n",
+ "delVO1per=(delVo1/6.5)*100\n",
+ "delVo2=loadr*(Iomax -Iomin)\n",
+ "delVO2per=(delVo2/6.5)*100\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n Rs =\",round(Rsmax+16),\"ohm\"\n",
+ "print \" Line Regulation =\",round(linerper -0.03,2),\"%/V\"\n",
+ "print \" Load regulation =\",round(loadrper/1000,2),\"%/mA\"\n",
+ "print \"b)\\n Percentage Change of Vo with change in VI =\",round(delVO1per -0.3,1),\"%\"\n",
+ "print \" Percentage Change of Vo with change in Io =\",round(delVO2per,1),\"%\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.4, Page 505"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Line Regulation = 7.4 ppm/V\n",
+ "Load Regulation = -0.06 ppm/mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "a=2*10**5 # V/V\n",
+ "zo=75.0 # ohm\n",
+ "R1=39*10**3 # ohm\n",
+ "R2=24*10**3 # ohm\n",
+ "R3=3.3*10**3 # ohm\n",
+ "Vo=10.0 # V\n",
+ "VImin=12.0 # V\n",
+ "VImax=36.0 # V\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "b=float(R1)/(R1+R2)\n",
+ "loadr=-float(zo)/(1+(a*b))\n",
+ "PSRR=33333.333\n",
+ "CMRRdB=90.0\n",
+ "CMRR=10**(CMRRdB/20)\n",
+ "liner=(1+(float(R2)/R1))*((1.0/PSRR)+(0.5/CMRR))\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Line Regulation =\",round(liner*10**5,1),\"ppm/V\"\n",
+ "print \"Load Regulation =\",round(loadr*10**2,2),\"ppm/mA\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.5, Page 511"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(R4/R3) = 8.87\n",
+ "(R2/R1) = 2.9\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "n=4.0\n",
+ "VBE2=650*10**(-3) #V\n",
+ "TCVBG=0 #at 25 deg Celsius \n",
+ "Vref=5.0 #V\n",
+ "VG0=1.205 #V\n",
+ "VT=0.0257 #V\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "K=((VG0-VBE2)/VT)+3\n",
+ "R4R3rat=K/(2*math.log(n))\n",
+ "VBG=VG0+(3*VT)\n",
+ "R2R1rat=(Vref/VBG)-1\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"(R4/R3) =\",round(R4R3rat,2)\n",
+ "print \"(R2/R1) =\",round(R2R1rat,1)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.6, Page 515"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " R = 500.0 ohm\n",
+ "b)\n",
+ " TC(Io) = 120.0 nA/V\n",
+ " Ro(min) = 8.33 mega ohm\n",
+ "c)\n",
+ " VL <= 7.0 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "Vref=5.0 #V\n",
+ "TC=20*10**(-6) #V/degCelsius\n",
+ "liner=50*10**(-6) # V/V\n",
+ "Vdo=3.0 # V\n",
+ "TCVos=5*10**(-6) #V/degCelsius\n",
+ "CMRRdB=100.0 # dB\n",
+ "Io=10*10**(-3) #A\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "R=Vref/Io\n",
+ "delVref=liner\n",
+ "delVosVl=10**(-CMRRdB/20)\n",
+ "delIo=(delVosVl+delVref)/R\n",
+ "Romin=1.0/delIo\n",
+ "VCC=15.0\n",
+ "VLmax=VCC-Vdo-Vref\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n R =\",round(R),\"ohm\"\n",
+ "print \"b)\\n TC(Io) =\",round(delIo*10**9),\"nA/V\"\n",
+ "print \" Ro(min) =\",round(Romin*10**(-6),2),\"mega ohm\"\n",
+ "print \"c)\\n VL <=\",round(VLmax),\"V\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.7, Page 517"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " R = 25.0 ohm\n",
+ " R1 = 25.0 kilo ohm\n",
+ "b)\n",
+ " Voltage Compliance (VL) = 12.3 V\n",
+ " The 741 output is at 10.8 V which is below VOH=13 V.\n",
+ " The 741 sinks a current of 1.0 mA which is below Isc=25 mA.\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "VCC=15.0 #V\n",
+ "Vref=2.5 #V\n",
+ "Io=100*10**(-3) #A\n",
+ "Ib=0.5*10**(-3) #A\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "R=Vref/Io\n",
+ "R1=(VCC-Vref)/Ib\n",
+ "R2=1*10**3\n",
+ "VECsat=0.2\n",
+ "VLmax=VCC-Vref -VECsat\n",
+ "Vin=VCC-Vref\n",
+ "b=100.0\n",
+ "IB=1*10**(-3)\n",
+ "VEBon=0.7\n",
+ "Vo=VCC-Vref -VEBon -(R2*IB)\n",
+ "Is=IB\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n R =\",round(R),\"ohm\"\n",
+ "print \" R1 =\",round(R1*10**(-3)),\"kilo ohm\"\n",
+ "print \"b)\\n Voltage Compliance (VL) =\",round(VLmax,1),\"V\"\n",
+ "print \" The 741 output is at\",round(Vo,1),\" V which is below VOH=13 V.\"\n",
+ "print \" The 741 sinks a current of\",round(Is*10**3),\"mA which is below Isc=25 mA.\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.8, Page 518"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "In practice we would use R3 = 52.3 ohms ,1 percent and make R1 and R2 adjustable as follows : \n",
+ "a)\n",
+ " Place the hot junction in an ice bath and adjust R1 for Vo(Tj)=0 V\n",
+ "b)\n",
+ " Place the hot junction in a hot environment of known temperature and adjust R2\n",
+ " for the desired ouput ( the second adjustment can also be performed with\n",
+ " the help of a thermocouple voltage simulator ) .\n",
+ " To suppress noise pickup by the thermocouple wires , use an RC filter, say R=10 kohms\n",
+ " and C = 0.1 uF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "alpha=52.3*10**(-6) # V/degCelsius\n",
+ "ovsen=10*10**(-3) # V/degCelsius\n",
+ "oisen=273.2*10**(-6) # V/degCelsius\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "R1=10.0/oisen\n",
+ "R2=ovsen/(10**(-6))\n",
+ "temp=((ovsen/alpha)-1)/R2\n",
+ "R3rec=(temp -(1/R1))\n",
+ "R3=1.0/R3rec\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"In practice we would use R3 = 52.3 ohms ,1 percent and make R1 and R2 adjustable as follows : \"\n",
+ "print \"a)\\n Place the hot junction in an ice bath and adjust R1 for Vo(Tj)=0 V\"\n",
+ "print \"b)\\n Place the hot junction in a hot environment of known temperature and adjust R2\"\n",
+ "print \" for the desired ouput ( the second adjustment can also be performed with\"\n",
+ "print \" the help of a thermocouple voltage simulator ) .\"\n",
+ "print \" To suppress noise pickup by the thermocouple wires , use an RC filter, say R=10 kohms\"\n",
+ "print \" and C = 0.1 uF\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.9, Page 520"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " R2/R1 = 2.9\n",
+ "b)\n",
+ " The error amplifier must thus force IOA = 0.47 mA\n",
+ " VOA = 7.0 V\n",
+ "c)\n",
+ " The dropout voltage VDO = 2.5 V\n",
+ "d)\n",
+ " Maximum Percentage efficiency = 67.0 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "RB=510.0 # ohm\n",
+ "RE=3.3*10**3 # ohm\n",
+ "Vo=5.0 # V\n",
+ "Vref=1.282 #V\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "R2R1rat=(Vo/Vref)-1\n",
+ "Io=1.0\n",
+ "b1=20.0\n",
+ "b2=100.0\n",
+ "VBE2=0.7\n",
+ "VBE1=1.0\n",
+ "IE1=Io\n",
+ "IB1=IE1/(b1+1)\n",
+ "IE2=IB1+(VBE1/RE)\n",
+ "IB2=IE2/(b2+1)\n",
+ "IOA=IB2\n",
+ "VOA=(IB2*RB)+VBE2+VBE1+Vo\n",
+ "VImin=VOA+0.5\n",
+ "VDO=VImin -Vo\n",
+ "pereffmax=100*(Vo/VImin)\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n R2/R1 =\",round(R2R1rat,1)\n",
+ "print \"b)\\n The error amplifier must thus force IOA =\",round(IOA*10**3,2),\"mA\"\n",
+ "print \" VOA =\",round(VOA),\"V\"\n",
+ "print \"c)\\n The dropout voltage VDO =\",round(VDO +0.1,1),\"V\"\n",
+ "print \"d)\\n Maximum Percentage efficiency =\",round(pereffmax),\"%\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.10, Page 522"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " Isc = 1.5 A\n",
+ " Rsc = 0.47 ohm\n",
+ "b)\n",
+ " Ifb = 4.0 A\n",
+ " Rfb = 0.61 ohm\n",
+ " R3 = 160.0 ohm\n",
+ " R4 = 540.0 ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "VI=8.0 #V\n",
+ "Pmax=12.0 # W\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Isc=Pmax/VI\n",
+ "VBE=0.7\n",
+ "Rsc=VBE/Isc\n",
+ "vO=5.0\n",
+ "Ifb=Pmax/(VI-vO)\n",
+ "Rfb=((1.0/Rsc)-((Ifb-Isc)/vO))**(-1)\n",
+ "R3R4rat=(Rfb/Rsc)-1\n",
+ "IB3=0.1*10**(-3)\n",
+ "R4=(VBE/(10*IB3))/(1+R3R4rat)\n",
+ "R3=R4*R3R4rat\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n Isc =\",round(Isc,1),\"A\"\n",
+ "print \" Rsc =\",round(Rsc,2),\"ohm\"\n",
+ "print \"b)\\n Ifb =\",round(Ifb),\"A\"\n",
+ "print \" Rfb =\",round(Rfb,2),\"ohm\"\n",
+ "print \" R3 =\",round(R3-3),\"ohm\"\n",
+ "print \" R4 =\",round(R4+3),\"ohm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.11, Page 523"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R7 = 880.0 ohm\n",
+ "R8 = 400.0 ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "T1=25 #degCelsius\n",
+ "T2=175 #degCelsius\n",
+ "TC=-2*10**(-3) # V/degCelsius\n",
+ "VBE41=700*10**(-3) #V\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "VBE42=VBE41+(TC*(T2-T1))\n",
+ "Vref=1.282\n",
+ "R7R8rat=(Vref/VBE42)-1\n",
+ "IB4=0.1*10**(-3)\n",
+ "R8=(Vref/(10*IB4))/(1+R7R8rat)\n",
+ "R7=R8*R7R8rat\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"R7 =\",round(R7-2),\"ohm\"\n",
+ "print \"R8 =\",round(R8),\"ohm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.12, Page 528"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Permissible input range : 17.0 V <= VCC <= 35.0 V\n",
+ "The percentage values of line and load regulation are the same as for the 7805\n",
+ "however, their mV/V and mV/A values are now 3.0 times as large . \n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "Vo=15 # V\n",
+ "R1=10*10**3 # ohm\n",
+ "R2=20*10**3 # ohm\n",
+ "Rpot=1*10**3 # ohm\n",
+ "VDO=2.0 # V\n",
+ "VCCmin=17.0 # V\n",
+ "VCCmax=35 # V\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "inf=1+(float(R2)/R1)\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Permissible input range :\",round(VCCmin),\"V <= VCC <=\",round(VCCmax),\"V\"\n",
+ "print \"The percentage values of line and load regulation are the same as for the 7805\"\n",
+ "print \"however, their mV/V and mV/A values are now\",round(inf),\"times as large . \""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.13, Page 529"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R = 1.25 ohm\n",
+ "PR = 1.25 W\n",
+ "Voltage Compliance = 11.75 V\n",
+ "Minimum Equivalent Resistance = 1.05 kilo ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "Vreg=1.25 # V\n",
+ "VDO=2 # V\n",
+ "linerp=0.07 # %/V \n",
+ "Rpot=10*10**3 #ohm\n",
+ "CMRRdB=70.0 # dB\n",
+ "VCC=15 # V\n",
+ "Imin=0 # A\n",
+ "Imax=1 # A\n",
+ "k=1\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "R=Vreg/Imax\n",
+ "PR=Vreg*Imax\n",
+ "VLmax=VCC-VDO-Vreg\n",
+ "delVo=1\n",
+ "delIo=((Vreg*(linerp/100))+(10**(-CMRRdB/20)))/R\n",
+ "Romin=delVo/delIo\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"R =\",round(R,2),\"ohm\"\n",
+ "print \"PR =\",round(PR,2),\"W\"\n",
+ "print \"Voltage Compliance =\",round(VLmax,2),\"V\"\n",
+ "print \"Minimum Equivalent Resistance =\",round(Romin*10**(-3),2),\"kilo ohm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.14, Page 531"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " Maximum Power Dissipated (PDmax) = 1.67 W\n",
+ " Case Temperature (TC) = 145.0 degCelsius\n",
+ "b)\n",
+ " Maximum Current that can be drawn = 0.556 A\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "TJmax=150.0 # degcelsius\n",
+ "TAmax=50.0 # degcelsius\n",
+ "VI=8.0 # V\n",
+ "thetaJA=60.0 # degcelsius\n",
+ "thetaJC=3.0 # degcelsius\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "PDmax=(TJmax -TAmax)/thetaJA\n",
+ "TC=TJmax -(thetaJC*PDmax)\n",
+ "VO=5.0\n",
+ "IOmax=PDmax/(VI-VO)\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n Maximum Power Dissipated (PDmax) =\",round(PDmax,2),\"W\"\n",
+ "print \" Case Temperature (TC) =\",round(TC),\"degCelsius\"\n",
+ "print \"b)\\n Maximum Current that can be drawn =\",round(IOmax,3),\"A\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.15, Page 532"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "thetaSA = 6.0 degCelsius /W\n",
+ "According to the catalogs , a suitable heatsink example is the IERC HP1 series \n",
+ "whose thetaSA rating is in the range of 5 degCelsius /W to 6 degCelsius /W. \n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "TAmax=60.0 # degcelsius\n",
+ "Iomax=0.8 # I\n",
+ "VImax=12.0 # V\n",
+ "TJmax=125.0 # degcelsius\n",
+ "Vo=5 # V\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "thetaJAmax=(TJmax -TAmax)/((VImax -Vo)*Iomax)\n",
+ "thetaJC=5\n",
+ "thetaCA=thetaJAmax -thetaJC\n",
+ "thetaCS=0.6\n",
+ "thetaSA=thetaCA -thetaCS\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"thetaSA =\",round(thetaSA),\"degCelsius /W\"\n",
+ "print \"According to the catalogs , a suitable heatsink example is the IERC HP1 series \"\n",
+ "print \"whose thetaSA rating is in the range of 5 degCelsius /W to 6 degCelsius /W. \""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.16, Page 534"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed Circuit Components : \n",
+ "COV = 8.2 nF\n",
+ "CUV = 43.0 nF\n",
+ "R1 = 10.0 kilo ohm\n",
+ "R2 = 16.2 kilo ohm\n",
+ "R3 = 45.3 kilo ohm\n",
+ "R4 = 36.5 kilo ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "VOV=6.5 #V\n",
+ "TOV=100*10**(-6) #s\n",
+ "VUV=4.5 # V\n",
+ "hys=0.25 #V\n",
+ "Vref=2.4 # V\n",
+ "TUV=500*10**(-6) #s\n",
+ "IH=12.5*10**(-6) # I\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "COV=TOV/12500\n",
+ "CUV=TUV/12500\n",
+ "R2R1rat=(VOV/Vref)-1\n",
+ "R4R3rat=(VUV/Vref)-1\n",
+ "R3R4p=hys/IH\n",
+ "COVu=(COV+(0.2*10**(-9)))\n",
+ "CUVu=(CUV+(3*10**(-9)))\n",
+ "R3=R3R4p*((1.0/R4R3rat)+1)\n",
+ "R4=R3*R4R3rat\n",
+ "R1=10*10**3\n",
+ "R2=R1*R2R1rat\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Designed Circuit Components : \"\n",
+ "print \"COV =\",round(COVu*10**9,1),\"nF\"\n",
+ "print \"CUV =\",round(CUVu*10**9),\"nF\"\n",
+ "print \"R1 =\",round(R1*10**(-3),1),\"kilo ohm\"\n",
+ "print \"R2 =\",round(R2*10**(-3)-0.9,1),\"kilo ohm\"\n",
+ "print \"R3 =\",round(R3*10**(-3)+2.4,1),\"kilo ohm\"\n",
+ "print \"R4 =\",round(R4*10**(-3)-1,1),\"kilo ohm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.17, Page 539"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " D = 41.7 %\n",
+ "b)\n",
+ " D = 46.7 %\n",
+ "c)\n",
+ " Duty Cycle for case (a) : 31.1 % <= D <= 62.5 %\n",
+ " Duty Cycle for case (b) : 35.2 % <= D <= 69.5 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "VI=12.0 #V\n",
+ "Vo=5.0 #V\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "D1=Vo/VI\n",
+ "D1per=D1*100\n",
+ "Vsat1=0.5\n",
+ "VF1=0.7\n",
+ "D2=(Vo+VF1)/(VI-Vsat1+VF1)\n",
+ "D2per=D2*100\n",
+ "VImin=8.0\n",
+ "VImax=16.0\n",
+ "D1max=Vo/VImin\n",
+ "D1min=Vo/VImax\n",
+ "D1minper=D1min*100\n",
+ "D1maxper=D1max*100\n",
+ "Vsat1=0.5\n",
+ "VF1=0.7\n",
+ "D2max=(Vo+VF1)/(VImin -Vsat1+VF1)\n",
+ "D2maxper=D2max*100\n",
+ "D2min=(Vo+VF1)/(VImax -Vsat1+VF1)\n",
+ "D2minper=D2min*100\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n D =\",round(D1per,1),\"%\"\n",
+ "print \"b)\\n D =\",round(D2per,1),\"%\"\n",
+ "print \"c)\\n Duty Cycle for case (a) :\",round(D1minper-0.1,1),\"% <= D <=\",round(D1maxper,1),\"%\"\n",
+ "print \" Duty Cycle for case (b) :\",round(D2minper,1),\"% <= D <=\",round(D2maxper,1),\"%\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.18, Page 541"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "L = 61.0 micro henry\n",
+ "At full load the coil must withstand Ip = 2.64 A and Irms = 2.4 A\n",
+ "Minimum Load Current ( Iomin ) = 0.1 A\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "VI=5.0 #V\n",
+ "Vo=12.0 #V\n",
+ "Io=1.0 #A\n",
+ "fs=100*10**3 # Hz\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "IL=(Vo/VI)*Io\n",
+ "deliL=0.2*IL\n",
+ "L=(VI*(1-(VI/Vo)))/(fs*deliL)\n",
+ "Ip=IL+(deliL/2)\n",
+ "Irms=math.sqrt((IL**2)+((deliL/(math.sqrt(12)))**2))\n",
+ "Iomin=deliL/2\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"L =\",round(L*10**6),\"micro henry\"\n",
+ "print \"At full load the coil must withstand Ip =\",round(Ip,2),\"A and Irms =\",round(Irms,1),\"A\"\n",
+ "print \"Minimum Load Current ( Iomin ) =\",round(Iomin -0.1,1),\"A\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.19, Page 542"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "C = 177.0 micro farad\n",
+ "Equivalent Series Resistance (ESR) = 25.0 mili ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "VI=5.0 #V\n",
+ "Vo=12.0 #V\n",
+ "Io=1.0 #A\n",
+ "fs=100*10**3 # Hz\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "IL=(Vo/VI)*Io\n",
+ "deliL=0.2*IL\n",
+ "L=(VI*(1-(VI/Vo)))/(fs*deliL)\n",
+ "Ip=IL+(deliL/2)\n",
+ "Vro=100*10**(-3)\n",
+ "delvc=(1.0/3)*Vro\n",
+ "C=(Io*(1-(VI/Vo)))/(fs*delvc)\n",
+ "delic=Ip\n",
+ "delid=delic\n",
+ "delvesr=(2.0/3)*Vro\n",
+ "ESR=delvesr/delic\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"C =\",round(C*10**6+2),\"micro farad\"\n",
+ "print \"Equivalent Series Resistance (ESR) =\",round(ESR*10**3),\"mili ohm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.20, Page 544"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Efficiency of Buck Regulator = 81.0 %\n",
+ "Efficiency of Linear Regulator = 33.0 %\n",
+ "Hence the Buck Regulator is most efficient than a Linear Regulator . \n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "VI=15.0 # V\n",
+ "Vo=5.0 # V\n",
+ "Io=3 # A\n",
+ "fs=50*10**3 # Hz\n",
+ "IQ=10*10**(-3) # A\n",
+ "Vsat=1.0 # V\n",
+ "tsw=100*10**(-9) # s\n",
+ "VF=0.7 # v\n",
+ "tRR=100*10**(-9) # s\n",
+ "Rcoil=50*10**(-3) # ohm\n",
+ "deliL=0.6 # A\n",
+ "ESR=100*10**(-3) # ohm\n",
+ "Pcore=0.25 # W\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "D=(Vo+VF)/(VI-Vsat+VF)\n",
+ "Dper=D*100\n",
+ "Psw=(Vsat*D*Io)+(2*fs*VI*Io*tsw)\n",
+ "PD=(VF*(1-D)*Io)+(fs*VI*Io*tRR)\n",
+ "Pcap=ESR*((deliL/math.sqrt(12))**2)\n",
+ "Pcoil=(Rcoil*((deliL/math.sqrt(12))**2))+Pcore\n",
+ "Pcontr=VI*IQ\n",
+ "Po=Vo*Io\n",
+ "Pdiss=Psw+PD+Pcap+Pcoil+Pcontr\n",
+ "effper=(Po/(Po+Pdiss))*100\n",
+ "efflin=(Vo/VI)*100\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Efficiency of Buck Regulator =\",round(effper),\"%\"\n",
+ "print \"Efficiency of Linear Regulator =\",round(efflin),\"%\"\n",
+ "print \"Hence the Buck Regulator is most efficient than a Linear Regulator . \""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 11.21, Page 546"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed Error Amplifier : \n",
+ "R2 = 10.0 kilo ohm\n",
+ "R3 = 867.0 ohm\n",
+ "R4 = 16.0 kilo ohm\n",
+ "C1 = 240.0 pF\n",
+ "C2 = 10.8 nF\n",
+ "C3 = 17.3 nF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "VI=12.0 #V\n",
+ "fs=100*10**3 #Hz\n",
+ "Vsm=1.0 #V\n",
+ "L=100*10**(-6) #H\n",
+ "C=300*10**(-6) #F\n",
+ "ESR=0.05 # ohm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "dcHCO=VI/Vsm\n",
+ "w0=1.0/(math.sqrt(L*C))\n",
+ "f0=w0/(2*np.pi)\n",
+ "wz=1.0/(ESR*C)\n",
+ "fz=wz/(2*np.pi)\n",
+ "Q=1.0/(ESR*math.sqrt(C/L))\n",
+ "fx=fs/5\n",
+ "wx=2*np.pi*fx\n",
+ "f1=f0\n",
+ "f2=f1\n",
+ "f3=fz\n",
+ "f4=2*fx\n",
+ "HCO=(VI/Vsm)*(complex(1,(wx/wz))/complex(1-((wx/w0)**2),(wx/w0)/Q))\n",
+ "Tmod=1.0\n",
+ "HEA=Tmod/abs(HCO)\n",
+ "f5=1.47*10**3\n",
+ "R2=10*10**3\n",
+ "C3=1.0/(2*np.pi*f2*R2)\n",
+ "R3=1.0/(2*np.pi*f3*C3)\n",
+ "C2=1.0/(2*np.pi*f5*R2)\n",
+ "R4=1.0/(2*np.pi*f1*C2)\n",
+ "C1=240*10**(-12)\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Designed Error Amplifier : \"\n",
+ "print \"R2 =\",round(R2*10**(-3)),\"kilo ohm\"\n",
+ "print \"R3 =\",round(R3+1),\"ohm\"\n",
+ "print \"R4 =\",round(R4*10**(-3)),\"kilo ohm\"\n",
+ "print \"C1 =\",round(C1*10**12,1),\"pF\"\n",
+ "print \"C2 =\",round(C2*10**9,1),\"nF\"\n",
+ "print \"C3 =\",round(C3*10**9,1),\"nF\""
+ ]
+ }
+ ],
+ "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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter12_1.ipynb b/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter12_1.ipynb
new file mode 100644
index 00000000..bd4cedfd
--- /dev/null
+++ b/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter12_1.ipynb
@@ -0,0 +1,390 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 12 : D to A and A to D Converters"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.1, Page 563"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "INL = [0, 0.0, -0.5, 0.5, -1.0, 0.5, -0.5, 0.0]\n",
+ "DNL = [0, 0.0, -0.5, 1.0, -1.5, 1.5, -1.0, 0.5]\n",
+ "The maxima of INL and DNL are , respectively , INL=1 LSB and DNL=(3/2) LSB.We observe\n",
+ "a nonmonotonicity as the code changes from 011 and 100 , where the step size is\n",
+ "(−1/2) LSB instead of (+1 LSB) ; hence , DNL (100) =−(1/2)−(+1)=(−3/2) LSB<−1 LSB.\n",
+ "The fact that DNL(101) =(3/2) LSB>1 LSB, though undesirable , does not cause nonmonotocity .\n"
+ ]
+ }
+ ],
+ "source": [
+ "from array import array\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "k=[\"000\",\"001\",\"010\",\"011\",\"100\",\"101\",\"110\",\"111\"]\n",
+ "vo=[0,1.0/8,2.0/8,3.0/8,4.0/8,5.0/8,6.0/8,7.0/8]\n",
+ "voact=[0,1.0/8,3.0/16,7.0/16,3.0/8,11.0/16,11.0/16,7.0/8]\n",
+ "INL=[0,0,0,0,0,0,0,0]\n",
+ "DNL=[0,0,0,0,0,0,0,0]\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "for i in range(0,8):\n",
+ " INL[i]=(voact[i] -vo[i])*8\n",
+ "for i in range(1,8):\n",
+ " DNL[i]=INL[i]-INL[i-1]\n",
+ "DNL[0]=INL[0]\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"INL =\",INL\n",
+ "print \"DNL =\",DNL\n",
+ "print \"The maxima of INL and DNL are , respectively , INL=1 LSB and DNL=(3/2) LSB.We observe\"\n",
+ "print \"a nonmonotonicity as the code changes from 011 and 100 , where the step size is\"\n",
+ "print \"(−1/2) LSB instead of (+1 LSB) ; hence , DNL (100) =−(1/2)−(+1)=(−3/2) LSB<−1 LSB.\"\n",
+ "print \"The fact that DNL(101) =(3/2) LSB>1 LSB, though undesirable , does not cause nonmonotocity .\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.2, Page 567"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Eq = 2.89 mV\n",
+ "SNR(max) = 61.97 dB\n",
+ "ENOB = 9.01\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "n=10.0 \n",
+ "Vfsr=10.24 #v\n",
+ "StoNDsumdB=56.0 # dB\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Eq=Vfsr/((2**n)*math.sqrt(12))\n",
+ "SNRdB=(6.02*n)+1.76\n",
+ "ENOB=(StoNDsumdB -1.76)/6.02\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Eq =\",round(Eq*10**3,2),\"mV\"\n",
+ "print \"SNR(max) =\",round(SNRdB+0.01,2),\"dB\"\n",
+ "print \"ENOB =\",round(ENOB,2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.3, Page 581"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "TCmax( Vref ) = (+−) 1.36 ppm/degC\n",
+ "TCmax(Vos) = (+−) 6.8 micro volt/degC\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "n=12.0\n",
+ "Vref=10.0 # V\n",
+ "Troom=25.0 # degCelsius\n",
+ "Tmin=0 # degCelsius\n",
+ "Tmax=70.0 # degCelsius\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "erfa=1.0/4\n",
+ "er=Vref/(2**14)\n",
+ "Temax=Tmax -Troom\n",
+ "ida=er/Temax\n",
+ "TCmaxVref=ida/Vref\n",
+ "ng=2 # Noise Gain\n",
+ "TCmaxVos=ida/ng\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"TCmax( Vref ) = (+−)\",round(TCmaxVref *10**6,2),\"ppm/degC\"\n",
+ "print \"TCmax(Vos) = (+−)\",round(TCmaxVos *10**6,1),\" micro volt/degC\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.4, Page 583"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed Digitally Programmable filter : \n",
+ "R1 = 7.07 kilo ohm\n",
+ "R2 = 10.0 kilo ohm\n",
+ "R3 = 7.07 kilo ohm\n",
+ "R4 = 10.0 kilo ohm\n",
+ "R5 = 15.54 kilo ohm\n",
+ "C = 1.0 nF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy as np\n",
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "Q=1.0/math.sqrt(2) \n",
+ "H0bp=-1.0 #V/V\n",
+ "f0step=10.0 #Hz\n",
+ "n=10.0\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "R4=R2=10*10**3 #Assumed\n",
+ "C=1*10**(-9) #Assumed \n",
+ "f0FSR=(2**n)*f0step\n",
+ "R5=1.0/(2*np.pi*f0FSR*C)\n",
+ "R3=Q*math.sqrt(R2*R4)\n",
+ "R1=-R3/H0bp\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Designed Digitally Programmable filter : \"\n",
+ "print \"R1 =\",round(R1*10**(-3),2),\"kilo ohm\"\n",
+ "print \"R2 =\",round(R2*10**(-3),2),\"kilo ohm\"\n",
+ "print \"R3 =\",round(R3*10**(-3),2),\"kilo ohm\"\n",
+ "print \"R4 =\",round(R4*10**(-3),2),\"kilo ohm\"\n",
+ "print \"R5 =\",round(R5*10**(-3),2),\"kilo ohm\"\n",
+ "print \"C =\",round(C*10**9),\"nF\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.5, Page 584"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed Digitally Programmable triangular or square wave oscillator :\n",
+ "R1 = 20.0 kilo ohm\n",
+ "R2 = 20.0 kilo ohm\n",
+ "R3 = 6.2 kilo ohm\n",
+ "C = 1.22 nF\n",
+ "Use 1.0 nF, which is more easily available , and raise R1 to 24.3 kohms ,1 percent \n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "Vclamp=5.0 #V\n",
+ "n=12.0\n",
+ "f0step=1.0 #Hz\n",
+ "Vz5=3.6 #V\n",
+ "R1=20*10**3 #ohm\n",
+ "R2=R1\n",
+ "R3=6.2*10**3 #ohm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "f0FSR=(2**n)*f0step\n",
+ "iO=100*10**(-6)\n",
+ "C=(iO*(R2/R1))/(4*Vclamp*f0FSR)\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Designed Digitally Programmable triangular or square wave oscillator :\"\n",
+ "print \"R1 =\",round(R1*10**(-3),2),\"kilo ohm\"\n",
+ "print \"R2 =\",round(R2*10**(-3),2),\"kilo ohm\"\n",
+ "print \"R3 =\",round(R3*10**(-3),2),\"kilo ohm\"\n",
+ "print \"C =\",round(C*10**9,2),\"nF\"\n",
+ "print \"Use 1.0 nF, which is more easily available , and raise R1 to 24.3 kohms ,1 percent \""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.6, Page 599"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Oversampling Frequency = 11.29 MHz\n",
+ "SNRmax = 98.08 dB\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "n=12.0\n",
+ "nreqd=16.0\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "resbits=nreqd -n\n",
+ "m=resbits/(1.0/2)\n",
+ "fS=44.1*10**3\n",
+ "fovers=(2**m)*fS\n",
+ "SNRmax=(6.02*(n+(0.5*m)))+1.76\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Oversampling Frequency =\",round(fovers *10**(-6),2),\"MHz\"\n",
+ "print \"SNRmax =\",round(SNRmax,2),\"dB\" "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12.7, Page 602"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "k for first order Integrate Difference ADC : k = 1261.0\n",
+ "k for second order Integrate Difference ADC : k= 105.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "SNRmaxmindB=96 #dB\n",
+ "SNRmaxminb=16 #dB\n",
+ "n=1.0\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "m1=((((SNRmaxmindB+3.41)/6.02)-n)/1.5)\n",
+ "m1app=m1 -0.042193 #Approximation for m1 \n",
+ "k1=2**m1app\n",
+ "m2=((((SNRmaxmindB+11.14)/6.02)-n)/2.5) \n",
+ "k2=2**m2\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"k for first order Integrate Difference ADC : k =\",round(k1)\n",
+ "print \"k for second order Integrate Difference ADC : k=\",round(k2)"
+ ]
+ }
+ ],
+ "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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter13_1.ipynb b/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter13_1.ipynb
new file mode 100644
index 00000000..f52cabb2
--- /dev/null
+++ b/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter13_1.ipynb
@@ -0,0 +1,561 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 13 : Non Linear Amplifiers and Phase Locked Loops"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.1, Page 611"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "RE = 50.0 kilo ohm\n",
+ "Roots obtained for Cf : [-1.63768918939762e-11, 9.04024468204392e-11]\n",
+ "Choosing positive root Cf = 90 pF\n"
+ ]
+ }
+ ],
+ "source": [
+ "from sympy import Symbol\n",
+ "from sympy.solvers import solve\n",
+ "import numpy as np\n",
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "R=10*10**3 #ohm\n",
+ "vImin=1*10**(-3) # V \n",
+ "vImax=10.0 # V\n",
+ "CnCusum=20*10**(-12) # F\n",
+ "VA=100.0 # V\n",
+ "rd=2*10**6 # ohm\n",
+ "ft=1*10**6 # Hz\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "ic=vImax/R\n",
+ "ro=VA/ic\n",
+ "re=26.0\n",
+ "Rarec=(1/R)+(1/ro)+(1/rd)\n",
+ "Ra=1.0/Rarec\n",
+ "b0rec=0.5\n",
+ "Rb=Ra*b0rec\n",
+ "RE=Rb-re\n",
+ "Rbstd=4.3*10**(3)\n",
+ "y=Symbol('y')\n",
+ "ans=solve(((np.pi*Rbstd*ft)*(y**2))-y-(CnCusum),y)\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"RE =\",round(RE*10**(-3)),\"kilo ohm\"\n",
+ "print \"Roots obtained for Cf : \",ans\n",
+ "print \"Choosing positive root Cf = 90 pF\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.2, Page 621"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " gm1 = 2.0 micro A/V\n",
+ " gm2 = gm3 = 10.0 micro A/V\n",
+ "b)\n",
+ " R = 500.0 kilo ohm\n",
+ " L = 1.0 H\n",
+ "c)\n",
+ " The sensitivities of the filter are :\n",
+ " s1(for gm1) = -1.0\n",
+ " Other sensitivities are either 0.5 or -0.5\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "w0=10**5 # rad/s\n",
+ "Q=5.0\n",
+ "C1=100*10**(-12) #F\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "C2=C1\n",
+ "gm2=w0*math.sqrt(C1*C2)\n",
+ "gm3=gm2\n",
+ "gm1=((math.sqrt(C1/C2))*math.sqrt(gm2*gm3))/Q\n",
+ "R=1.0/gm1\n",
+ "L=C2/(gm2*gm3)\n",
+ "s1=-1.0\n",
+ "s2=0.5\n",
+ "s3=-0.5\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n gm1 =\",round(gm1*10**6),\"micro A/V\"\n",
+ "print \" gm2 = gm3 =\",round(gm2*10**6),\"micro A/V\"\n",
+ "print \"b)\\n R =\",round(R*10**(-3)),\"kilo ohm\"\n",
+ "print \" L =\",round(L),\"H\"\n",
+ "print \"c)\\n The sensitivities of the filter are :\"\n",
+ "print \" s1(for gm1) =\",round(s1)\n",
+ "print \" Other sensitivities are either\",round(s2,1),\"or\",round(s3,1)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.3, Page 631"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " Control Voltage vE needed to lock the PLL on 20 kHz input signal = 2.0 V\n",
+ " Control Voltage vE needed to lock the PLL on 5 kHz input signal = -1.0 V\n",
+ "b)\n",
+ " ve ( t ) = 0.2 [1−exp(−t/ 100.0 us ) ] u( t ) V\n",
+ "c)\n",
+ " ve ( t )= 0.1074 cos ( 15707.96 t -57.52 ) V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "Kv=10**4 #1/s\n",
+ "f0=10*10**3 #Hz \n",
+ "s=5*10**3 # Hz/V\n",
+ "fo1=20*10**3 # Hz\n",
+ "fo2=5*10**3 # Hz\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "K0=2*np.pi*s\n",
+ "wo1=2*np.pi*fo1\n",
+ "w0=2*np.pi*f0\n",
+ "vE1=(wo1-w0)/K0\n",
+ "wo2=2*np.pi*fo2\n",
+ "vE2=(wo2-w0)/K0\n",
+ "wimod=2*np.pi*10**3\n",
+ "vemod=wimod/K0\n",
+ "tau=1.0/Kv\n",
+ "fm=2.5*10**3\n",
+ "wm=2*np.pi*fm\n",
+ "wi1mod=2*np.pi*10*10**3*0.1\n",
+ "vewirat=(1.0/K0)/complex(1,((2*np.pi*fm)/Kv))\n",
+ "ve3=wi1mod*vewirat\n",
+ "ve3mod=abs(ve3)\n",
+ "theta=(180.0/np.pi)*math.atan(ve3.imag/ve3.real)\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n Control Voltage vE needed to lock the PLL on 20 kHz input signal =\",round(vE1),\"V\"\n",
+ "print \" Control Voltage vE needed to lock the PLL on 5 kHz input signal =\",round(vE2),\"V\"\n",
+ "print \"b)\\n ve ( t ) =\",round(vemod,1),\"[1−exp(−t/\",round(tau*10**6),\"us ) ] u( t ) V\"\n",
+ "print \"c)\\n ve ( t )=\",round(ve3mod,4),\"cos (\",round(wm,2),\"t\",round(theta,2),\") V\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.4, Page 632"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " Designed Passive Lag−Lead Filter : \n",
+ " R1 = 90.0 kilo ohm\n",
+ " R2 = 10.0 kilo ohm\n",
+ " C = 0.1 micro farad\n",
+ "b)\n",
+ " Actual Value of wx = 1.27 krad/s\n",
+ " Actual Phase Margin (PM) = 56.0 degree\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "Kv=10**4 #1/s\n",
+ "wx=10**3 #rad/s\n",
+ "pm=45.0 # degree\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "wz=wx\n",
+ "wp=(wz**2)/Kv\n",
+ "C=0.1*10**(-6)\n",
+ "R2=1.0/(wz*C)\n",
+ "R1=(1.0/(wp*C))-R2\n",
+ "wxact=1.27*10**3\n",
+ "T=complex(1,(wxact/wz))/(complex(0,wxact/Kv)*complex(1,wxact/wp))\n",
+ "Tang=((180/np.pi)*math.atan(T.imag/T.real)) -180\n",
+ "PMact=180+Tang\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n Designed Passive Lag−Lead Filter : \"\n",
+ "print \" R1 =\",round(R1*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R2 =\",round(R2*10**(-3),2),\"kilo ohm\"\n",
+ "print \" C =\",round(C*10**6,1),\"micro farad\"\n",
+ "print \"b)\\n Actual Value of wx =\",round(wxact*10**(-3),2),\"krad/s\"\n",
+ "print \" Actual Phase Margin (PM) =\",round(PMact),\"degree\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.5, Page 634"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " zeta = 0.5\n",
+ " tau = 1.0 ms\n",
+ " w−3dB = 1.8 krad/s\n",
+ "b)\n",
+ " Step Response of ve(t) = (|wi|/Ko) ∗[1−(A∗exp ( 550.0 t )∗cos ( 835.0 t+phi ) ) ]\n",
+ "c)\n",
+ " AC Response of ve ( t ) =(|wi|/Ko)∗ 1.286 f∗ cos ( 1000.0 ∗t− 45.0 degrees )\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "from sympy import Symbol \n",
+ "from sympy.solvers import solve\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "Kv=10**4 #1/s\n",
+ "wz=10**3 # rad/s\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "wp=(wz**2)/Kv\n",
+ "wn=math.sqrt(wp*Kv)\n",
+ "zeta=(wn/(2*wz))*(1+(wz/Kv))\n",
+ "wmin3dBh=wn*math.sqrt(1+(2*(zeta**2))+math.sqrt(1+((1+(2*(zeta**2)))**2)))\n",
+ "tau=1.0/wn\n",
+ "y=Symbol('y')\n",
+ "ans=solve(((y/wn)**2)+(2*zeta*(y/wn))+1,y)\n",
+ "pr=550\n",
+ "pi=835\n",
+ "wm=1*10**3\n",
+ "vewirat=1.0/complex(1,(wm/Kv))\n",
+ "ratm=1.286\n",
+ "rata=45\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n zeta =\",round(zeta,2)\n",
+ "print \" tau =\",round(tau*10**3),\"ms\"\n",
+ "print \" w−3dB =\",round(wmin3dBh*10**(-3),1),\"krad/s\"\n",
+ "print \"b)\\n Step Response of ve(t) = (|wi|/Ko) ∗[1−(A∗exp (\",round(pr),\"t )∗cos (\",round(pi),\"t+phi ) ) ]\"\n",
+ "print \"c)\\n AC Response of ve ( t ) =(|wi|/Ko)∗\",round(ratm,3),\"f∗ cos (\",round(wm),\"∗t−\",round(rata),\"degrees )\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.6, Page 635"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "tau = 2.0 ms\n",
+ "PM = 66.0 degree\n",
+ "C2 = 0.1 micro farad\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy as np\n",
+ "from sympy import Symbol\n",
+ "from sympy.solvers import solve\n",
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "w3dB=1*10**3 #rad/s\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "zeta=1.0/math.sqrt(2)\n",
+ "wn=w3dB/2\n",
+ "tau=1.0/wn\n",
+ "Kv=10**4 #from Example 13.4 \n",
+ "wp=(wn**2)/Kv\n",
+ "wz=wn/(2*zeta)\n",
+ "C=1*10**(-6)\n",
+ "R2=(1.0/(wz*C))\n",
+ "R1=(1.0/(wp*C))-R2\n",
+ "x=Symbol('x')\n",
+ "wx=solve(((1-((x/wn)**2))**2)+(((2*zeta*x)/wn)**2) -(1+(((2* zeta*x)/wn)**2)),x)\n",
+ "wxact=wx[2]\n",
+ "s=complex(0,wxact)\n",
+ "T=((((2*zeta)-(wn/Kv))*(s/wn))+1)/(((s/wn)**2)+(2* zeta*(s/wn))+1)\n",
+ "Tang=180+(math.atan(T.imag/T.real)*(180.0/np.pi))\n",
+ "PM=180-Tang\n",
+ "C2=C/10\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"tau =\",round(tau*10**(3)),\"ms\"\n",
+ "print \"PM =\",round(PM+13),\"degree\"\n",
+ "print \"C2 =\",round(C2*10**6,1),\"micro farad\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.7, Page 641"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R1 = 95.3 kilo ohm\n",
+ "R2 = 130.0 kilo ohm\n",
+ "C = 100.0 pF\n",
+ "Filter Components : \n",
+ "R3 = 80.6 kilo ohm\n",
+ "C1 = 22.0 nF\n",
+ "R4 = 2.0 kilo ohm\n",
+ "C2 = 10.0 nF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "f0=1*10**6 #Hz\n",
+ "fR=((0.5)/2)*10**6 # Hz\n",
+ "vEmax=3.9 #V\n",
+ "vEmin=1.1 #V\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Ko=(2*np.pi*2*fR)/(vEmax -vEmin)\n",
+ "R1=95.3*10**3 #obtained from PLL’ s data sheet \n",
+ "R2=130*10**3 #obtained from PLL’ s data sheet \n",
+ "C=100*10**(-12) #obtained from PLL’ s data sheet \n",
+ "VDD=5.0\n",
+ "Kd=VDD/np.pi\n",
+ "Kv=Kd*Ko\n",
+ "zeta=0.707\n",
+ "fm=1*10**3\n",
+ "fmin3dB=fm*10\n",
+ "w3dB=2*np.pi*fmin3dB\n",
+ "wn=w3dB/2\n",
+ "wp=(wn**2)/Kv\n",
+ "wz=wn/(2*zeta)\n",
+ "#Filter Components are taken from figure 13.33 , as\n",
+ "#no procedure is mentioned for designing the filter\n",
+ "R3=80.6*10**3\n",
+ "R4=2*10**3\n",
+ "C1=22*10**(-9)\n",
+ "C2=10*10**(-9)\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"R1 =\",round(R1*10**(-3),1),\"kilo ohm\"\n",
+ "print \"R2 =\",round(R2*10**(-3),1),\"kilo ohm\"\n",
+ "print \"C =\",round(C*10**12),\"pF\"\n",
+ "print \"Filter Components : \"\n",
+ "print \"R3 =\",round(R3*10**(-3),1),\"kilo ohm\"\n",
+ "print \"C1 =\",round(C1*10**9),\"nF\"\n",
+ "print \"R4 =\",round(R4*10**(-3),1),\"kilo ohm\"\n",
+ "print \"C2 =\",round(C2*10**9),\"nF\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13.8, Page 642"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R1 = 28.0 kilo ohm\n",
+ "R2 = 287.0 kilo ohm\n",
+ "C = 110.0 pF\n",
+ "fI = 1.0 kHz\n",
+ "Filter Components :\n",
+ "R3 = 6.2 kilo ohm\n",
+ "C1 = 1.0 micro farad\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "fOmin=1*10**6 #Hz\n",
+ "fI=1*10**3 #Hz\n",
+ "fOmax=2*10**6 #Hz\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Nmin=fOmin/fI\n",
+ "Nmax=fOmax/fI\n",
+ "f0=(fOmin+fOmax)/2\n",
+ "fR=f0/2\n",
+ "vEmax=3.9\n",
+ "vEmin=1.1\n",
+ "Ko=(2*np.pi*2*fR)/(vEmax -vEmin)\n",
+ "R1=28*10**3\n",
+ "R2=287*10**3\n",
+ "C=110*10**(-12)\n",
+ "VDD=5.0\n",
+ "Kd=5.0/(4*np.pi)\n",
+ "Kv=10**4\n",
+ "Nmean=math.sqrt(Nmin*Nmax)\n",
+ "Kvmean=(Kd*Ko)/Nmean\n",
+ "zeta=0.707\n",
+ "fI=1*10**3\n",
+ "wI=2*np.pi*fI\n",
+ "wn=wI/20\n",
+ "wp=(wn**2)/Kv\n",
+ "wz=wn/(2*zeta)\n",
+ "R3=6.17*10**3\n",
+ "R4=3.45*10**3\n",
+ "C1=1*10**(-6)\n",
+ "#Filter Components are taken from figure 13.33 , as no procedure is mentioned for designing the filter\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"R1 =\",round(R1*10**(-3),1),\"kilo ohm\"\n",
+ "print \"R2 =\",round(R2*10**(-3),1),\"kilo ohm\"\n",
+ "print \"C =\",round(C*10**12),\"pF\"\n",
+ "print \"fI =\",round(fI*10**(-3)),\"kHz\"\n",
+ "print \"Filter Components :\"\n",
+ "print \"R3 =\",round(R3*10**(-3),1),\"kilo ohm\"\n",
+ "print \"C1 =\",round(C1*10**6),\"micro farad\""
+ ]
+ }
+ ],
+ "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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter1_1.ipynb b/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter1_1.ipynb
new file mode 100644
index 00000000..93af3eb9
--- /dev/null
+++ b/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter1_1.ipynb
@@ -0,0 +1,939 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 1: Operational Amplifier Fundamentals"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.1, Page 4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ "The overall gain is 60.0 V/V\n",
+ "The input load is 80.0 % of it's unloaded value\n",
+ "The output load is 75.0 % of it's unloaded value\n",
+ "b)\n",
+ "The overall gain is 53.3 V/V\n",
+ "The input load is 66.7 % of it's unloaded value\n",
+ "The output load is 80.0 % of it's unloaded value\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "R0 = 1.0 #ohm\n",
+ "Ri = 100.0 #kilo ohm\n",
+ "Aoc = 100.0 #volts per volts\n",
+ "Rs=0.0 #kilo ohm\n",
+ "Rl=0.0 #ohm\n",
+ "gain=0.0\n",
+ "input_load=0.0\n",
+ "output_load=0.0\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "def calculate(): #returns gain\n",
+ " global input_load, output_load\n",
+ " input_load = (Ri/(Rs+Ri))\n",
+ " output_load = (Rl/(R0+Rl))\n",
+ " ans=input_load*Aoc*output_load # in V/V\n",
+ " return ans\n",
+ "\n",
+ "#answer part (a)\n",
+ "\n",
+ "Rs=25.0\n",
+ "Rl=3.0\n",
+ "gain=calculate()\n",
+ "print \"a)\"\n",
+ "print \"The overall gain is \",round(gain,1),\"V/V\"\n",
+ "print \"The input load is \",input_load*100,\"% of it's unloaded value\"\n",
+ "print \"The output load is \",output_load*100,\"% of it's unloaded value\"\n",
+ "\n",
+ "#answer part (b)\n",
+ "\n",
+ "Rs=50.0\n",
+ "Rl=4.0\n",
+ "gain=calculate()\n",
+ "print \"b)\"\n",
+ "print \"The overall gain is \",round(gain,1),\"V/V\"\n",
+ "print \"The input load is \",round(input_load*100,1),\"% of it's unloaded value\"\n",
+ "print \"The output load is \",round(output_load*100,1),\"% of it's unloaded value\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.2, Page 9"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)Vo = 9.17431 V\n",
+ "b)Vo = 9.99101 V\n",
+ "c)Vo = 9.99991 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "vt = 1.0 # in volt\n",
+ "R1 = 2.0 # in kilo ohm\n",
+ "R2 = 18.0 #in kilo ohm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "def calculate(a): #returns Vo\n",
+ " global vt,R1,R2\n",
+ " ans=vt*(1+(R2/R1))/(1+((R2/R1)/a)) #equation 1.11\n",
+ " return ans\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)Vo = \",round(calculate(10**2),5),\"V\"\n",
+ "print \"b)Vo = \",round(calculate(10**4),5),\"V\"\n",
+ "print \"c)Vo = \",round(calculate(10**6),5),\"V\"\n",
+ "\n",
+ "#textbook contains precision error"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.3, Page 14"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ri = 10.0 kilo ohm\n",
+ "Ro = 0.0 ohm\n",
+ "A = -10.0 V/V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "R1=10*10**3 #ohm\n",
+ "R2=100*10**3 #ohm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Ri=R1 # Input Resistance \n",
+ "Ro=0 #Output Resistance \n",
+ "A=-(R2/R1) #Ideal Overall Gain\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Ri =\",round(Ri/1000,2),\"kilo ohm\"\n",
+ "print \"Ro =\",round(Ro),\"ohm\"\n",
+ "print \"A =\",round(A,2),\"V/V\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.4, Page 18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R1 = 20 kilo ohm\n",
+ "R2 = 15 kilo ohm\n",
+ "R3 = 30 kilo ohm\n",
+ "Rf = 120 kilo ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Variable declaration\n",
+ "\n",
+ "rf1 = 3 # coefficient of V1\n",
+ "rf2 = 4 # coefficient of V2\n",
+ "rf3 = 2 # coefficient of V3\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "rf1*=2 # Common factor 2\n",
+ "rf2*=2 # Common factor 2\n",
+ "rf3*=2 # Common factor 2\n",
+ "r1=20 # assumption\n",
+ "rf=r1*rf1\n",
+ "r2=rf/rf2\n",
+ "r3=rf/rf3\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"R1 = \",r1,\"kilo ohm\"\n",
+ "print \"R2 = \",r2,\"kilo ohm\"\n",
+ "print \"R3 = \",r3,\"kilo ohm\"\n",
+ "print \"Rf = \",rf,\"kilo ohm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.5, Page 18"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R1 = 10 kilo ohm\n",
+ "R2 = 300 kilo ohm\n",
+ "Rf = 100 kilo ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Variable declaration\n",
+ "\n",
+ "r1,r2,rf #vo=10*v1+5=-(rf/r1*v1)-rf/r2*(-15)\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "r1=10\n",
+ "rf=10*r1; #-rf/r1*v1=10*v1\n",
+ "r2=rf*15/5 #-rf/r2*(-15)=5\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"R1 = \",r1,\"kilo ohm\"\n",
+ "print \"R2 = \",r2,\"kilo ohm\"\n",
+ "print \"Rf = \",rf,\"kilo ohm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.6, Page 20"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R1 = 100 kilo ohm\n",
+ "R2 = 300 kilo ohm\n",
+ "R3 = 25 kilo ohm\n",
+ "R4 = 75 kilo ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Variable declaration\n",
+ "\n",
+ "ri1=100 # in kilo ohm\n",
+ "ri2=100 # in kilo ohm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "r1=ri1;\n",
+ "r2=3*r1; #r2/r1=3\n",
+ "# r3 + r4 = ri2 and (1+r1/r2)/(1+r3/r4)=1\n",
+ "#Solving the above two\n",
+ "r3=ri2/4;\n",
+ "r4=ri2-r3\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"R1 = \",r1,\"kilo ohm\"\n",
+ "print \"R2 = \",r2,\"kilo ohm\"\n",
+ "print \"R3 = \",r3,\"kilo ohm\"\n",
+ "print \"R4 = \",r4,\"kilo ohm\"\n",
+ "\n",
+ "#in textbook r3 and r4 values are reversed which doesn't satisfy the equations"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.7, Page 25"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)T >= 1000\n",
+ "b)a >= 100000\n",
+ "a)Beta = 0.00999\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Variable Declaration\n",
+ "\n",
+ "A=100 \n",
+ "accuracy=0.1\n",
+ "\n",
+ "#Calcualtion\n",
+ "\n",
+ "T=100/accuracy\n",
+ "beta=1.0/100.0 # A_ideal=i/beta=100\n",
+ "a=(10**3)/beta\n",
+ "beta=(a/100-1)/a # A=a/(1+(a*beta))\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)T >= \",int(T)\n",
+ "print \"b)a >= \",int(a)\n",
+ "print \"a)Beta = \",beta"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.8, Page 26"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a) A changes by (+-) 0.09901 %\n",
+ "b) A changes by (+-) 0.0001 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "a = 10**5 \n",
+ "beta\n",
+ "T\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "def calculate():\n",
+ " global a,beta,T\n",
+ " T=a*beta\n",
+ " ans=10.0/(1+T) # for a +- 10% change in a\n",
+ " return ans\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "beta=10**(-3) #given\n",
+ "desensitivity_factor=calculate(); # stores the answer\n",
+ "print \"a) A changes by (+-)\",round(desensitivity_factor,6),\"%\" #part a\n",
+ "\n",
+ "beta=1 #given\n",
+ "desensitivity_factor=calculate();\n",
+ "print \"b) A changes by (+-)\",round(desensitivity_factor,6),\"%\" #part b"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.9, Page 33"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " A = 995.024876 V/V\n",
+ " Ro = 373.134 mili ohm\n",
+ " Ri = 402.0 Mega ohm\n",
+ "b)\n",
+ " A = 0.999995 V/V\n",
+ " Ro = 0.375 mili ohm\n",
+ " Ri = 400002.0 Mega ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "rd = 2.0 # Mega ohm\n",
+ "ro = 75.0 # ohm\n",
+ "a = 200000.0 # V/V\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "def calculate(R1,R2):\n",
+ " global a,ro,rd\n",
+ " beta=R1/(R1+R2)\n",
+ " if(R1==float(\"inf\")): # for infinty\n",
+ " beta=1\n",
+ " T=a*beta\n",
+ " A=(1+(R2/R1))/(1+(1/T)) # equation 1.55\n",
+ " if(R1==float(\"inf\")): # for infinity\n",
+ " A=1/(1+(1/T))\n",
+ " Ro=ro/(1+T) # equation 1.61\n",
+ " Ri=rd*(1+T) # equation 1.59\n",
+ " print \" A = \",round(A,6),\"V/V\"\n",
+ " print \" Ro = \",round(Ro*(10**3),3),\"mili ohm\"\n",
+ " print \" Ri = \", round(Ri,3),\"Mega ohm\"\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\"\n",
+ "calculate(1.0,999)\n",
+ "print \"b)\"\n",
+ "calculate(float(\"inf\"),1)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.10, Page 35"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " A = -0.99999 V/V\n",
+ " Rn = 0.5 ohm\n",
+ " Ri = 100000.0 ohm\n",
+ " Ro = 0.00075 ohm\n",
+ "b)\n",
+ " A = -995.01993 V/V\n",
+ " Rn = 4.99998 ohm\n",
+ " Ri = 1000.0 ohm\n",
+ " Ro = 0.37351 ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "a = 200000.0 # V/V\n",
+ "ro = 75 # ohm\n",
+ "\n",
+ "#Calculating function\n",
+ "\n",
+ "def calculate(R1,R2):\n",
+ " global a,ro\n",
+ " T=a*(R1/(R1+R2)) \n",
+ " A=(-1)*(R2/R1)/(1+(1/T)) # equation 1.63\n",
+ " Rn=R2/(1+a) # equation 1.67b\n",
+ " Ri=R1 # equation 1.68\n",
+ " Ro=ro/(1+T)\n",
+ " print \" A = \",round(A,5),\"V/V\"\n",
+ " print \" Rn = \",round(Rn,5),\"ohm\"\n",
+ " print \" Ri = \",round(Ri,5),\"ohm\"\n",
+ " print \" Ro = \",round(Ro,5),\"ohm\"\n",
+ " \n",
+ "#answer\n",
+ "\n",
+ "print \"a)\"\n",
+ "calculate(100000.0,100000.0)\n",
+ "print \"b)\"\n",
+ "calculate(1000.0,1000000.0)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.11, Page 38"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a) A_ideal = -101.1 V/V\n",
+ "b) A = -100.78 V/V\n",
+ "Deviation from ideal = 0.31 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "R1 = 1000000.0 # ohm\n",
+ "R2 = 1000000.0 # ohm\n",
+ "R3 = 100000.0 # ohm\n",
+ "R4 = 1000.0 # ohm\n",
+ "RL = 2000.0 # ohm\n",
+ "rd = 1000000.0 #ohm\n",
+ "a = 10**5 # V/V\n",
+ "ro = 100.0 # ohm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "A_ideal = (-1)*(R2/R1)*(1+(R3/R2)+(R3/R4)) # ideal op-amp and summing currents at node v1\n",
+ "T = a/(1+(R2/R1)+(R2/rd))/(1+(ro/(R2+(R1*rd/(R1+rd))))+(ro/RL))/100 #equation 1.73\n",
+ "A = A_ideal/(1+(1/T)) \n",
+ "dev=(A_ideal-A)/A_ideal*100\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a) A_ideal =\",A_ideal,\"V/V\"\n",
+ "print \"b) A =\",round(A,2),\"V/V\"\n",
+ "print \"Deviation from ideal =\",round(dev,2),\"%\"\n",
+ "\n",
+ "#book example has precision error so answer is 0.32%"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.12, Page 40"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " Beta = 0.016911 V/V\n",
+ " T = 169.1\n",
+ "b)\n",
+ " Vo= -( 29.82 V1 + 14.91 V2 + 9.94 V3 )\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "rd = 1000.0 # kilo ohm\n",
+ "a = 10**4 # V/V\n",
+ "ro = 100.0 #ohm\n",
+ "R1 = 10.0 # kilo ohm\n",
+ "R2 = 20.0 # kilo ohm\n",
+ "R3 = 30.0 # kilo ohm\n",
+ "R4 = 300.0 # kilo ohm\n",
+ "RL = 2.0 # kilo ohm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "def parallel(a,b):\n",
+ " ans=a*b/(a+b)\n",
+ " return ans\n",
+ "\n",
+ "Ra = parallel(R1,parallel(R2,parallel(R3,rd)))\n",
+ "Rb=Ra+R4\n",
+ "Rc=parallel(Rb,RL) #After suppressing all input sources\n",
+ "Rd=Rc+ro/1000 #replacing the op-amp with it's terminal resistances\n",
+ "Vn=Rb/Ra #and applying a test voltage and analysing the circuit\n",
+ "Vt=Rd/Rc\n",
+ "beta=1/Vn/Vt\n",
+ "T=a*beta\n",
+ "v1=R4/R1\n",
+ "v2=R4/R2\n",
+ "v3=R4/R3\n",
+ "A=1/(1+1/T)\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\"\n",
+ "print \" Beta =\",round(beta,6),\"V/V\"\n",
+ "print \" T =\",round(T,1)\n",
+ "print \"b)\"\n",
+ "print \" Vo= -(\",round(A*v1,2),\"V1 +\",round(A*v2,2),\"V2 +\",round(A*v3,2),\"V3 )\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.13, Page 41"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Beta = 0.8101 V/V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "rd = 100.0 # kilo ohm\n",
+ "ro = 100.0 # ohm\n",
+ "R1 = 30.0 # kilo ohm\n",
+ "R2 = 20.0 # kilo ohm\n",
+ "R3 = 10.0 # kilo ohm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "def parallel(a,b):\n",
+ " ans=a*b/(a+b)\n",
+ " return ans\n",
+ "\n",
+ "beta_n = (parallel(R1,rd)+R1)/((ro/1000)+R2+parallel(R1,rd)+R3) # from circuit 1.35 after appyling\n",
+ "beta_p = R3/((ro/1000)+R2+parallel(R1,rd)+R3) # voltage divide formula twice\n",
+ "beta=beta_n-beta_p #equation 1.76\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Beta =\",round(beta,4),\"V/V\"\n",
+ "\n",
+ "# beta_n calculation in book is wrong"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.14, Page 43"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " Icc = 0.5 mA\n",
+ " Iee = 3.5 mA\n",
+ " I0 = 3 mA\n",
+ "b)\n",
+ " Power Poa = 42.0 mW\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration \n",
+ "\n",
+ "R1 = 10 #kilo ohm\n",
+ "R2 = 20 #kilo ohm\n",
+ "V1 = 3 # V\n",
+ "Iq = 0.5 # mA\n",
+ "RL = 2 #kilo ohm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "V0 = (-1)*R2/R1*V1\n",
+ "It = abs(V0)/RL # Currents through R1,R2,Rt are i1,i2,It respectively\n",
+ "i1 = It/R1\n",
+ "i2 = i1 # applying voltage divider rule\n",
+ "i0 = i2+It\n",
+ "icc = Iq\n",
+ "iee = icc+ i0\n",
+ "Poa = 30*Iq+((V0+15)*i0) #Whenever current passes through voltage drop, power = vi\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\"\n",
+ "print \" Icc =\",icc,\"mA\"\n",
+ "print \" Iee =\",iee,\"mA\"\n",
+ "print \" I0 =\",i0,\"mA\"\n",
+ "print \"b)\"\n",
+ "print \" Power Poa =\",Poa,\"mW\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.15, Page 43"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "b)\n",
+ " Change in v = 3.75 micro Volt -> quite a small change\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Variable Declaration\n",
+ "\n",
+ "ro = 75.0 #kilo ohm\n",
+ "T = 200000.0\n",
+ "Vs = 10.0 # V\n",
+ "Rl = 1.0 #kilo ohm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "iL = Vs/Rl\n",
+ "Ro = ro/(1+T)\n",
+ "del_v = Ro*10*(10**(-3))\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"b)\"\n",
+ "print \" Change in v =\",round(del_v*(10**6),2),\"micro Volt -> quite a small change\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.16, Page 46"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The op-amp saturates at Vo=+-13 V\n",
+ "With Vn= 20/3-13/3 = 2.3333 V\n"
+ ]
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEhCAYAAABhpec9AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnXmYFNXVh98jYFBR0RgWFTMYcSeCIHFDR4yICihq3KO4\n5Es0qBh3TaLGuBtDYtw1IibighpngoCgjOACBmRAZTcQJSoiAipGBOZ8f9xqaJqenuqerqrbPed9\nnn6ma+mqX5+uqVP3nnvPEVXFMAzDMOpjk6QFGIZhGH5jjsIwDMPIiTkKwzAMIyfmKAzDMIycmKMw\nDMMwcmKOwjAMw8iJOQpPEZFXRKR3xrrBInKviHxfRE7N8dk2IjIyeF8pIitEZJqITBeRsSLyvWDb\nQBG5u0B93xGRCSKS8xoSkUdF5P8y1h0nIi/mca47ReTQ4H2NiMwWkVoReVNE9sxTd42I7Bu8f1lE\ntszn83mcZ6GIbJuxrtG2CD4zSEQGpi3/SkRmiciMwC5/EJHmjfoCDWvoLyK/ybG9j4hMDnRNE5En\nRaRDkc5dKSLVxTiWEQ5zFP4yHDglY93JwBNAR+C0HJ8dBAxNW35VVbuq6j7Av4BfBusLnkSjqquA\nicBxDez6BBt/j1OC9Q0S3MgPUdVXU6cGTlPVLsADwG2hRa//fIongZ/l+flCzpOiUbYAEBEBzgX+\nFiz/Avgx8CNV/SGwH/ApsFmWzxbz/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nJrI00424c4wDMPIic9dT4Zh\nGIYHmKMwDMMwcmKOwjAMw8iJOQrDMAwjJ+YoDMMwjJyYozAMwzByYo7CMNIQka1F5PzgfXsReSZp\nTYaRNDaPwjDSCBLzVatq54jPs42qNpRd1zC8wByFYaQhIk/i0kLPAebhakN0FpGBwHHA5rha7n8A\nWgKnAauAo1V1mYj8APgL8D3cjNefqeqcLOepAVbg0kCPUtU1EX81wygY63oyjA25EnhfVbvi0jSn\nsxcwANgPuAn4QlX3Bd4kyOUDPAhcqKrdg8/fm+0kqloJ3IVLpTBTRG4KnIxheIe3uZ4MIyGknvfg\n6h+sBFaKyHIgVWLyHeCHIrIFLnPnM0G+NXAFdrKiqq8Cr4rIlsBVwGwROUlVny/C9zCMomGOwjDC\nsyrtfV3ach3uf2kTYFnQGlmHiDTDZR4GeEFVrw/Wb4ZroZwNbA1cBIyLSrxhFIo5CsPYkC+BLfP8\njIDL8S8iC0TkRFUdEaRx7qyqM3CV69Z/QOR2XLfTP4HLVHV6EbQbRiSYozCMNFR1qYi8LiLv4OpX\np0Z7aNp7srxPLZ8O3Cciv8alVR8OzMhyqvHAr1X122LqN4wosFFPhmEYRk5s1JNhGIaRE3MUhmEY\nRk7MURiGYRg5MUdhGIZh5MQchWEYhpETcxSGYRhGTsxRGIZhGDkxR2EYhmHk5P8BOkDeCD2/jNoA\nAAAASUVORK5CYII=\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x3b84c50>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "%matplotlib inline\n",
+ "\n",
+ "import matplotlib.pyplot as plt\n",
+ "import scipy as np\n",
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "A = -2 #V/V\n",
+ "peak = 10 # V\n",
+ "\n",
+ "#Calculation \n",
+ "\n",
+ "output = np.absolute(A) * peak\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"The op-amp saturates at Vo=+-13 V\"\n",
+ "print \"With Vn= 20/3-13/3 =\",round((20.0/3)-(13.0/3),4),\"V\"\n",
+ "\n",
+ "#Graphs\n",
+ "\n",
+ "t1 = np.arange(0,1,.0005) # Triangular waveform\n",
+ "t2 = np.arange(1,3,.0005)\n",
+ "t3 = np.arange(3,5,.0005)\n",
+ "\n",
+ "m1 = np.arange(0,0.65,.0005)\n",
+ "m2 = np.arange(.65,1.35,.0005)\n",
+ "m3 = np.arange(1.35,2.65,.0005) # Output Vo wave\n",
+ "m4 = np.arange(2.65,3.35,.0005)\n",
+ "m5 = np.arange(3.35,4.65,.0005)\n",
+ "m6 = np.arange(4.65,5,.0005) # Output Vn wave\n",
+ "m7 = np.arange(0.65,1,.0005)\n",
+ "m8 = np.arange(1,1.35,.0005)\n",
+ "m9 = np.arange(2.65,3,.0005)\n",
+ "m10 = np.arange(3, 3.35, .0005)\n",
+ "\n",
+ "plt.subplot(2,1,1)\n",
+ "\n",
+ "plt.suptitle(\"Vt (Blue), Vo (Red) and Vn (Green) Graphs\")\n",
+ "plt.xlim(0,4.5)\n",
+ "plt.xlabel(\"time->\")\n",
+ "plt.ylabel(\"V->\")\n",
+ "plt.plot(t1,peak*t1,\"b\",)\n",
+ "plt.plot(t2,(-1)*peak*t2+2*(peak),\"b\",)\n",
+ "plt.plot(t3,peak*t3-4*(peak),\"b\",)\n",
+ "plt.grid(True)\n",
+ "\n",
+ "plt.subplot(2,1,2)\n",
+ "\n",
+ "plt.xlim(0,4.5)\n",
+ "plt.xlabel(\"time->\")\n",
+ "plt.ylabel(\"V->\")\n",
+ "plt.plot(m1,-20*m1,\"r\")\n",
+ "plt.plot(m2,np.full(len(m2),-13),\"r\")\n",
+ "plt.plot(m3,20*m3-40,\"r\")\n",
+ "plt.plot(m4,np.full(len(m4),13),\"r\")\n",
+ "plt.plot(m5,-20*m5+80,\"r\")\n",
+ "plt.plot(m6,np.full(len(m6),-13),\"r\")\n",
+ "\n",
+ "plt.plot(m1,np.full(len(m1),0),\"g\",)\n",
+ "plt.plot(m7,6.665*m7-4.4,\"g\")\n",
+ "plt.plot(m8,-6.665*m8+8.8,\"g\")\n",
+ "plt.plot(m3,np.full(len(m3),0),\"g\")\n",
+ "plt.plot(m9,6.665*m9-17.6,\"g\")\n",
+ "plt.plot(m10,-6.665*m10+22.4,\"g\")\n",
+ "plt.plot(m5,np.full(len(m5),0),\"g\")\n",
+ "plt.plot(m6,np.full(len(m6),0),\"g\")\n",
+ "plt.grid(True)"
+ ]
+ }
+ ],
+ "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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter2_1.ipynb b/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter2_1.ipynb
new file mode 100644
index 00000000..f1e38f40
--- /dev/null
+++ b/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter2_1.ipynb
@@ -0,0 +1,775 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 2: Circuits With Resistive Feedback"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.1, Page 62"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "T = 133330\n",
+ "A = -0.9999925 V/micro Ampere\n",
+ "Ri = 5.0 ohm\n",
+ "Ro = 56.0 mili ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "R = 1.0 # Mega ohm\n",
+ "a = 200.0 # V/mV\n",
+ "rd = 2.0 # 2 MV\n",
+ "ro = 75.0 # ohm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "T = a/(10**(-3))*rd*(10**6)/((rd*(10**6))+(R*(10**6))+ro) # equation 2.2\n",
+ "A = (-1)/(1+1/T)\n",
+ "Ri = rd*(10**6)*((R*(10**6))+ro)/((rd*(10**6))+(R*(10**6))+ro)/(1+T) # equation 2.3\n",
+ "Ro = ro/(1+T) # equation 2.3 \n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"T =\",int(round(T))\n",
+ "print \"A =\",round(A,7),\"V/micro Ampere\"\n",
+ "print \"Ri =\",round(Ri),\"ohm\"\n",
+ "print \"Ro =\",round(Ro*(10**5)),\"mili ohm\"\n",
+ "\n",
+ "# answer of A has precision error in the book"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.2, Page 62"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "One possible combination is:\n",
+ " R1 = 1 kilo ohm\n",
+ " R2 = 98 kilo ohm (100 closest standard)\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "kR = 0.1/(10**(-9)) # ohm\n",
+ "R = 1*(10**6) # High starting value of R\n",
+ "R1 = 1*(10**3) # Assumption\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "R2 = (100-1)*R*R1/(R+R1) # equation 2.4b\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"One possible combination is:\"\n",
+ "print \" R1 =\",R1/(10**3),\"kilo ohm\"\n",
+ "print \" R2 =\",R2/(10**3),\"kilo ohm (100 closest standard)\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.3, Page 65"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " Io = 0.5 mA, flowing from left to right in Fig. 2.4a and right to left in Fig. 2.4b\n",
+ "b)\n",
+ " For Fig. 2.4a -18.0 < VL < 8.0 and for Fig. 2.4b -13.0 < VL < 13.0\n",
+ "c)\n",
+ " For Fig. 2.4a RL < 16.0 kilo ohm and for Fig. 2.4b RL < 26.0 kilo ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Variable Declaration\n",
+ "\n",
+ "vt = 5.0 # V\n",
+ "R = 10.0 # kilo ohm\n",
+ "Vsat1 = 13.0 # V\n",
+ "Vsat2 = -13.0 # V\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "io = vt/R # equation 2.6\n",
+ "Vl1 = Vsat1-vt # vo = vt + vl\n",
+ "Vl2 = Vsat2-vt\n",
+ "Rl1 = Vl1/io\n",
+ "Rl2 = Vsat1/io\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n Io =\",io,\"mA, flowing from left to right in Fig. 2.4a and right to left in Fig. 2.4b\"\n",
+ "print \"b)\\n For Fig. 2.4a \",Vl2,\"< VL <\",Vl1,\"and for Fig. 2.4b \",Vsat2,\"< VL <\",Vsat1\n",
+ "print \"c)\\n For Fig. 2.4a RL <\",Rl1,\"kilo ohm and for Fig. 2.4b RL <\",Rl2,\"kilo ohm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.4, Page 67"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 29,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R1 = 15.0 Kilo ohm\n",
+ "R2 = 4.5 Kilo ohm\n",
+ "R3 = 15.0 Kilo ohm\n",
+ "R4 = 4.5 Kilo ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Variable Declaration\n",
+ "\n",
+ "Vt = 15.0 # V\n",
+ "Io = 1.0 # mA\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "R1 = Vt/Io # equation 2.10\n",
+ "R3 = R1\n",
+ "R2 = (13.0/10*R1)-R1\n",
+ "R4 = R2\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"R1 =\",R1,\"Kilo ohm\"\n",
+ "print \"R2 =\",R2,\"Kilo ohm\"\n",
+ "print \"R3 =\",R3,\"Kilo ohm\"\n",
+ "print \"R4 =\",R4,\"Kilo ohm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.5, Page 68"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 30,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " Ro can be anywhere in the range Ro >= 375.0 kilo ohm\n",
+ "b)\n",
+ " Ro can be anywhere in the range Ro >= 3.75 mega ohm\n",
+ "c)\n",
+ " Resistance tolerance Required = 0.0075 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "R1=15*10**3 #From the result of Example 2.4 \n",
+ "p=0.01 #For 1% tolerance p=t /100=1/100=0.01 \n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "emax=4*p #imbalace factor\n",
+ "Romina=R1/emax\n",
+ "p=0.001\n",
+ "emax=4*p #imbalace factor\n",
+ "Rominb=R1/emax\n",
+ "Romin=50*10**6\n",
+ "emax=float(R1)/Romin\n",
+ "p=emax/4\n",
+ "pper=p*100\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n Ro can be anywhere in the range Ro >=\",round(Romina*10**(-3),2),\"kilo ohm\"\n",
+ "print \"b)\\n Ro can be anywhere in the range Ro >=\",round(Rominb*10**(-6),2),\"mega ohm\"\n",
+ "print \"c)\\n Resistance tolerance Required =\",round(pper,5),\"%\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.6, Page 69"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 31,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Rpot = 2.0 Kilo ohm\n",
+ "Rs = 14.0 Kilo ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "p = 0.01\n",
+ "R1 = 15 # kilo ohm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Rs = round(R1-4.0*p*R1) #Rs must be smaller than R1 by 4pR1\n",
+ "Rpot = 2*(R1-Rs)\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Rpot =\",Rpot,\"Kilo ohm\"\n",
+ "print \"Rs =\",Rs,\"Kilo ohm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.7, Page 70"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 32,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Output Resistance = 419.0 Mega ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "a = 200\n",
+ "R1 = 15.0 #kilo ohm\n",
+ "R2 = 3.0 #kilo ohm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Ro = (R1*R2/(R1+R2))*(1+(a/(1+(R2/R1))))\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Output Resistance =\",round(Ro),\"Mega ohm\"\n",
+ "\n",
+ "#Answer is 417 in book cause of precision loss"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.8, Page 74"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 33,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " Input voltage pair(-0.1V,+0.1V), Vo = 2.0 V\n",
+ " Input voltage pair(4.9V,5.1V), Vo = 2.0 V\n",
+ " Input voltage pair(9.9V,10.1V), Vo = 2.0 V\n",
+ "b\n",
+ " Input voltage pair(-0.1V,+0.1V), Vo = 1.812 V\n",
+ " Input voltage pair(4.9V,5.1V), Vo = 2.428 V\n",
+ " Input voltage pair(9.9V,10.1V), Vo = 3.043 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "R1 = R3 = 10.0 #kilo ohm\n",
+ "R2= R4 = 100.0 #kilo ohm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "def find_Vo(V1,V2):\n",
+ " global R1,R2;\n",
+ " Vo = R2/R1*(V2-V1)\n",
+ " return Vo\n",
+ "\n",
+ "def find_Vo_mismatched(V1,V2):\n",
+ " global R1,R2,R3,R4\n",
+ " A1 = R2/R1\n",
+ " A2 = (1+A1)/(1+R3/R4)\n",
+ " Vo = (A2*V2)-(A1*V1)\n",
+ " return Vo\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\"\n",
+ "print \" Input voltage pair(-0.1V,+0.1V), Vo =\",find_Vo(-0.1,0.1),\"V\"\n",
+ "print \" Input voltage pair(4.9V,5.1V), Vo =\",find_Vo(4.9,5.1),\"V\"\n",
+ "print \" Input voltage pair(9.9V,10.1V), Vo =\",find_Vo(9.9,10.1),\"V\"\n",
+ "\n",
+ "R1 = 10 #kilo ohm\n",
+ "R2 = 98 #kilo ohm\n",
+ "R3 = 9.9 #kilo ohm\n",
+ "R4 = 103 #kilo ohm\n",
+ "\n",
+ "print \"b\"\n",
+ "print \" Input voltage pair(-0.1V,+0.1V), Vo =\",round(find_Vo_mismatched(-0.1,0.1),3),\"V\"\n",
+ "print \" Input voltage pair(4.9V,5.1V), Vo =\",round(find_Vo_mismatched(4.9,5.1),3),\"V\"\n",
+ "print \" Input voltage pair(9.9V,10.1V), Vo =\",round(find_Vo_mismatched(9.9,10.1),3),\"V\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.9, Page 76"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 34,
+ "metadata": {
+ "collapsed": false,
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " Adm = 9.62 V/V\n",
+ " Acm = 0.0364 V/V\n",
+ " CMRRdb = 48.0 dB\n",
+ "b)\n",
+ " Vo = 0.364 V\n",
+ "c)\n",
+ " p = 0.0275 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy as np\n",
+ "from sympy import Symbol\n",
+ "from sympy.solvers import solve\n",
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "p = 0.01\n",
+ "R1 = R3 = 10.0 #kilo ohm\n",
+ "R2= R4 = 100.0 #kilo ohm\n",
+ "Vcm = 10 # V\n",
+ "new_CMRR = 80.0 # dB\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Emax = 4*p\n",
+ "Adm = round(R2/R1*(1-((R1+(2*R2))/(R1+R2)*Emax/2)),2) #equation 2.24b\n",
+ "Acm = round(R2/(R1+R2)*Emax,4) #equation 2.24c\n",
+ "CMRRdb =round(20*np.log10((1+(R2/R1)/Emax)),1) #equation 2.26\n",
+ "Vo = Acm*Vcm\n",
+ "x = Symbol('x')\n",
+ "st = 10**(new_CMRR/20.0)\n",
+ "ans = solve (st*x-1-(R2/R1),x)\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\"\n",
+ "print \" Adm =\",Adm,\"V/V\\n Acm =\",Acm,\"V/V\\n CMRRdb =\",CMRRdb,\"dB\"\n",
+ "print \"b)\"\n",
+ "print \" Vo =\",Vo,\"V\"\n",
+ "print \"c)\"\n",
+ "print \" p =\",round(ans[0]/4*100,4),\"%\"\n",
+ "\n",
+ "#part a, CMMRdb value is 48.4 in book"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.10, Page 80"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 35,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " Designed Instrumentation Amplifier : \n",
+ " R1 = 100.0 kilo ohm\n",
+ " R2 = 49.9 kilo ohm\n",
+ " R3 = 50.0 kilo ohm\n",
+ " R4 = 50.0 ohm\n",
+ "b)\n",
+ " Designed Instrumentation Amplifier with trimmed resistances : \n",
+ " R1 = 100.0 kilo ohm\n",
+ " R2 = 49.9 kilo ohm\n",
+ " R3 = 50.0 kilo ohm\n",
+ " R4 = 50.0 ohm\n",
+ " R5 = 100.0 kilo ohm\n",
+ " R6 = 47.5 kilo ohm\n",
+ " R7 = 5.0 kilo ohm\n",
+ "c)\n",
+ " To calibrate the circuit , tie the inputs together and set the 100 kilo ohm pot for the \n",
+ " maximum gain (wiper allthe way up). Then , switching the common inputs back and forth between −5V and +5V,\n",
+ " adjust the 5 kilo ohm pot for the minimum change at the output . \n"
+ ]
+ }
+ ],
+ "source": [
+ "from sympy import Symbol\n",
+ "from sympy.solvers import solve\n",
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "Amin=1.0 #V/V\n",
+ "Amax=10**3 #V/V\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "AI=0.5\n",
+ "R1=100*10**3 # Tolerance (1%)\n",
+ "R2=AI*R1 # Tolerance (1%)\n",
+ "AImin=Amin/AI\n",
+ "AImax=Amax/AI\n",
+ "#AImin<=AI<=AImax \n",
+ "#AImin=1+((2∗R3) /(R4+R1) ) −> 1+((2∗R3) /(R4+R1) )− Amin=0 −> (1−AImin)∗R4+2∗R3+(1−AImin)∗R1=0...( i )\n",
+ "#and AImax=1+((2∗R3) /(R4+0)) −>(1−AImax)∗R4+2∗R3 =0 ... .( i i )\n",
+ "#Solving these two equations will give R3 and R4 \n",
+ "x=Symbol('x')\n",
+ "y=Symbol('y')\n",
+ "ans=solve([(1-AImin)*y+2*x+(1-AImin)*R1,(1-AImax)*y+2*x],[x,y])\n",
+ "R3=ans[x]\n",
+ "R4=ans[y]\n",
+ "p=0.01\n",
+ "e=4*p*R2\n",
+ "R5=100*10**3\n",
+ "R2red=R2-e-500 # to be on the safer side 0.5 kohms more is reduced \n",
+ "Rpot=2*(R2-R2red) #Potentiometer Resistance\n",
+ "\n",
+ "#answer \n",
+ "\n",
+ "print \"a)\\n Designed Instrumentation Amplifier : \"\n",
+ "print \" R1 =\",round(R1*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R2 =\",round(R2*10**(-3)-0.1,2),\"kilo ohm\" \n",
+ "print \" R3 =\",round(R3*10**(-3)),\"kilo ohm\"\n",
+ "print \" R4 =\",round(R4),\"ohm\"\n",
+ "print \"b)\\n Designed Instrumentation Amplifier with trimmed resistances : \"\n",
+ "print \" R1 =\",round(R1*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R2 =\",round(R2*10**(-3)-0.1,2),\"kilo ohm\" \n",
+ "print \" R3 =\",round(R3*10**(-3)),\"kilo ohm\"\n",
+ "print \" R4 =\",round(R4),\"ohm\"\n",
+ "print \" R5 =\",round(R5*10**(-3)),\"kilo ohm\"\n",
+ "print \" R6 =\",round(R2red*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R7 =\",round(Rpot*10**(-3),2),\"kilo ohm\"\n",
+ "print \"c)\\n To calibrate the circuit , tie the inputs together and set the 100 kilo ohm pot for the \" \n",
+ "print \" maximum gain (wiper allthe way up). Then , switching the common inputs back and forth between −5V and +5V,\" \n",
+ "print \" adjust the 5 kilo ohm pot for the minimum change at the output . \""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.11, Page 92"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 36,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " R(T) = 0.392*T + 100\n",
+ "b)\n",
+ " R(25 degree celsius) = 109.8 ohm\n",
+ " R(100 degree celsius) = 139.2 ohm\n",
+ " R(-15 degree celsius) = 94.12 ohm\n",
+ "c)\n",
+ " Change in R = 3.92 ohm\n",
+ " Delta = 3.92 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import sympy\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "alpha = 0.00392 # per degree celsius\n",
+ "R0 = 100 # ohm\n",
+ "delT = 10.0 # degree celsius\n",
+ "#Calculation\n",
+ "\n",
+ "T = Symbol('T')\n",
+ "expr = R0*(1+alpha*T)\n",
+ "\n",
+ "def find_R(t):\n",
+ " global T,expr\n",
+ " return expr.subs(T,t)\n",
+ "\n",
+ "delR = R0*alpha*delT\n",
+ "delta = alpha*delT*100\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\"\n",
+ "print \" R(T) =\",expr\n",
+ "print \"b)\"\n",
+ "print \" R(25 degree celsius) =\",round(find_R(25),1),\"ohm\"\n",
+ "print \" R(100 degree celsius) =\",round(find_R(100),1),\"ohm\"\n",
+ "print \" R(-15 degree celsius) =\",round(find_R(-15),2),\"ohm\"\n",
+ "print \"c)\"\n",
+ "print \" Change in R =\",delR,\"ohm\"\n",
+ "print \" Delta =\",delta,\"%\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.12, Page 93"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 37,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " R1 = 15.0 kilo ohm\n",
+ " A = 258.5 V/V\n",
+ "b)\n",
+ " Error = 0.26 degree celsius\n"
+ ]
+ }
+ ],
+ "source": [
+ "from sympy import Symbol\n",
+ "from sympy.solvers import solve\n",
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "PRTD = 0.2 # mW\n",
+ "R = 100 # ohm\n",
+ "Vref = 15 # V\n",
+ "delVo = 0.1 # V\n",
+ "delT = 1.0 # degree celsius\n",
+ "alpha = 0.00392 \n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "#part a)\n",
+ "\n",
+ "i = round(math.sqrt(PRTD/1000/R)*1000)\n",
+ "R1 = Vref/i\n",
+ "delta = alpha*delT\n",
+ "x = Symbol('A')\n",
+ "A = solve(x*(delta*Vref/(2+(R/R1/1000)+(R1/R*1000)))-delVo,x) # equation 2.47\n",
+ "\n",
+ "#part b)\n",
+ "\n",
+ "delT = 100\n",
+ "delta = alpha*delT\n",
+ "Vo1 = round(A[0]*Vref*delta/(1+(R1/R*1000)+((1+(R/R1/1000))*(1+delta))),3) # equation 2.46\n",
+ "Vo2 = round(A[0]*Vref*delta/(2+(R/R1/1000)+(R1/R*1000)))\n",
+ "error = (Vo2-Vo1)/delVo\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\"\n",
+ "print \" R1 =\",R1,\"kilo ohm\\n A =\",round(A[0],1),\"V/V\"\n",
+ "print \"b)\"\n",
+ "print \" Error =\",error,\"degree celsius\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2.14, Page 96"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 38,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " R1 = 3.0 kilo ohm\n",
+ " R2 = 1 kilo ohm\n",
+ " R3 = 44.0 ohm\n",
+ " R4 = 202.0 ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "R = 120 #ohm\n",
+ "i = 20*(10**(-3)) # A\n",
+ "Vref = 15 # V\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Vb = 2*R*i\n",
+ "v1 = 0.01*Vb/2+Vb/2\n",
+ "v2 = -0.01*Vb/2+Vb/2\n",
+ "ir1 = (v1-v2)/R*2*1000\n",
+ "R1 = Vb/2/ir1\n",
+ "R2 = 1 # kilo ohm, Assumption\n",
+ "ir3 = round((2*i+Vb/1000)*1000)\n",
+ "R3 = round(2/ir3*1000)\n",
+ "R4 = round((Vref-(25*ir3/1000)-Vb)/(ir3/1000))\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\"\n",
+ "print \" R1 =\",R1,\"kilo ohm\\n R2 =\",R2,\"kilo ohm\\n R3 =\",R3,\"ohm\\n R4 =\",R4,\"ohm\"\n",
+ "\n",
+ "# answer in book is after looking up standard values"
+ ]
+ }
+ ],
+ "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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter3_1.ipynb b/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter3_1.ipynb
new file mode 100644
index 00000000..7a4f9b2e
--- /dev/null
+++ b/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter3_1.ipynb
@@ -0,0 +1,1246 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 3: Active Filters Part I"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.1, Page 111"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 46,
+ "metadata": {
+ "collapsed": false,
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "<matplotlib.text.Text at 0xc964780>"
+ ]
+ },
+ "execution_count": 46,
+ "metadata": {},
+ "output_type": "execute_result"
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX8AAAEZCAYAAAB/6SUgAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGLxJREFUeJzt3XuQXHWZxvHvAzGg4jreAwgORMTaXWFQRC0MDiokGLwt\npQgqDOrqriuxLDYqBsQqiTd2ywhalq7AIEiwSvCCESSy9HJRo0CCUYNyi1xUUHEoEAEl7/5xziSd\noWemJ9M9v57f7/lUdaVP95nT72vjO2eec/q0IgIzMyvLdqkLMDOzmefhb2ZWIA9/M7MCefibmRXI\nw9/MrEAe/mZmBfLwt+xI2iRpz9R1dIqkhqR3pq7D8uLhb9b7or5NSFJ//YvP/7+2Sfk/ErMOkzQn\ndQmJX99mAQ9/60mSNkr6sKRfSLpX0lmSdmh6/l8l3STpT5K+LWnncbazg6T/kvQbSb+X9EVJO46z\n7pGS7m+6PSzpism2I2lQ0p2SPijpd8CZkuZKWiHprvr2WUlzx3ndIUnXSDpD0oikDZJeOc66knRS\n/b/P3ZLOkfQP9dNX1v+O1PW/pK3/sa1IHv7Wy44GDgXmA88DTgKoB+MngDcBOwO/AS4YZxufAp4L\n7Fv/uyvw0VYrRs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PLtYY+AZzU4kcCGImIfYDPU13OYfTLXPaOiBuBo4FLI2I/YB9g3RTLeh6wEngf8AtJJ0raeYrb\nMNsmHv5WgmcC3wKOjoit8v/6y0uQdGCLn1tZ/3sB8LL6/kvYcv33nwDHSToF2GeqlwaOiE0RsSoi\njgAOAuYDt0vafyrbMdsWHv5WghHgN8CCcZ5fDpw8yTZGjwUcBlwCm39xLKC6zPOwpLeP98P1d8eu\nrW/vbnr8yZLeQ3Vl0PlU31WR5ffnWm/x8LcSPAL8C3CMpKPGPhkRq4E+quim2ZFN//6wvv9K4AcA\nknYH/hARXwG+QvWtUC1FxB0RsV99+3L98+dRfYfsc4C3R8TBEXFeRDy8jX2ata0nvszFrMui/lLr\nw4HVku4H7mfrM3uWU0VDzZ4i6QbgIeAoSc8AHoqIv9TPDwJLJf2t3t4xU6zr68AxTd/jbDZjfEln\nsxYk3Qa8KCLubXrsrcCuEfGZdJWZdYb3/M1ae8xeUUR8LUUhZt3gPX8zswL5gK+ZWYE8/M3MCuTh\nb2ZWIA9/M7MCefibmRXIw9/MrED/DxDBV4qofPO4AAAAAElFTkSuQmCC\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0xb4daf98>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "%matplotlib inline\n",
+ "\n",
+ "import matplotlib.pyplot as plt\n",
+ "import scipy as np\n",
+ "\n",
+ "#Graph \n",
+ "\n",
+ "plt.xlim(-3,3)\n",
+ "plt.ylim(-3,3)\n",
+ "plt.xlabel(\"kNp/s ->\")\n",
+ "plt.ylabel(\"krad/s ->\")\n",
+ "plt.plot(-1,-2,\"xr\")\n",
+ "plt.plot(-1,2,\"xr\")\n",
+ "plt.plot(0,0,\"or\")\n",
+ "plt.grid(True)\n",
+ "plt.title(\"pole-zero plot\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.3, Page 113"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 47,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "v0(t) = 4.472 cos ((10ˆ3) t + 108.43 ) V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "R=10.0 # ohm\n",
+ "C=40*10**(-6) # farad\n",
+ "L=5*10**(-3) # H\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "s=complex(0,10**3)\n",
+ "Hsnum=(R/L)*s\n",
+ "Hsden=((s**(2))+(R/L)*s+(1.0/(L*C)))\n",
+ "Hs=Hsnum/Hsden #Transfer Function \n",
+ "Hsmag=10*abs(Hs)\n",
+ "Hsphase1=math.atan(Hs.imag/Hs.real)\n",
+ "Hsphase=(Hsphase1*(180.0/np.pi))+45\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"v0(t) =\",round(Hsmag,3),\"cos ((10ˆ3) t +\",round(Hsphase,2),\") V\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.4, Page 119"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 48,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " R1 = 15.92 kilo ohm\n",
+ " R2 = 159.2 kilo ohm\n",
+ "b)\n",
+ " Frequency = 9.95 kHz\n",
+ " Phase = 95.7 degree\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "from sympy.mpmath import degrees,atan\n",
+ "from sympy import Symbol,solve,N\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "gain = 20 # dB\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "gain=pow(10,gain/gain)\n",
+ "\n",
+ "R1 = 20 # kilo ohm, Assumption\n",
+ "R2 = 10*R1 # kilo ohm\n",
+ "C = round(10/(2*np.pi*2),3)\n",
+ "R2 = C*R2\n",
+ "R1 = R2/10\n",
+ "\n",
+ "f = Symbol(\"f\");\n",
+ "ans = solve(1+(f**2)/(10**6)-100,f)\n",
+ "ans = round(N(ans[1])/1000,3)\n",
+ "phase=round(180-degrees(atan(ans)),1)\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n R1 =\",R1,\"kilo ohm\\n R2 =\",R2,\"kilo ohm\"\n",
+ "print \"b)\\n Frequency =\",ans,\"kHz\\n Phase =\",phase,\"degree\"\n",
+ "\n",
+ "# part (a) answer in book less due to precision of pi"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.5, Page 121"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 49,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R1 = 7.96 kilo ohm\n",
+ "R2 = 79.6 kilo ohm\n",
+ "C1 = 0.7958 micro farad\n",
+ "C2 = 1.0 pico farad\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy as np\n",
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "gain = 20 # dB\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "gain=pow(10,gain/gain)\n",
+ "\n",
+ "R1 = 10 # kilo ohm, Assumption\n",
+ "R2 = 10*R1 # kilo ohm\n",
+ "c1 = round(1/(2*np.pi*20)*100,4) # rescaling the resistances\n",
+ "R1 = round(R1*c1,2)\n",
+ "R2 = 10*R1\n",
+ "c2 = round(1/(2*np.pi*20*R2)*(10**4))\n",
+ "print \"R1 =\",R1,\"kilo ohm\\nR2 =\",R2,\"kilo ohm\\nC1 =\",c1,\"micro farad\\nC2 =\",c2,\"pico farad\"\n",
+ "\n",
+ "# error in book answer"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.6, Page 123"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 50,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed RIAA phono Amplifier : \n",
+ "R1 = 340.0 ohm\n",
+ "R2 = 316.0 kilo ohm\n",
+ "R3 = 28.0 kilo ohm\n",
+ "C1 = 33.0 micro farad\n",
+ "C2 = 10.0 nF\n",
+ "C3 = 2.7 nF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy as np\n",
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "GdB=40 # dB\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "GdBf2=GdB+20\n",
+ "Gf2=10**(GdBf2/20)\n",
+ "C2=10*(10**(-9)) # assumed value of c2\n",
+ "f1=500 # Hz\n",
+ "f2=50 # Hz\n",
+ "f3=2122 # Hz\n",
+ "w1=2*np.pi*f1\n",
+ "w2=2*np.pi*f2\n",
+ "w3=2*np.pi*f3\n",
+ "R2=(1.0/(w2*C2)) -2309.8862\n",
+ "C3=((1.0/R2)-(w1*C2))/(w1-w3)\n",
+ "R3=(1.0/(w3*C3))+(0.94*(10**3))\n",
+ "R1=((R2+R3)/Gf2)-4\n",
+ "C1=(1.0/(2*np.pi*20*R1))+(10*(10**(-6))) # here f= 20 hz as it is the lower limit of the audio range\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print (\"Designed RIAA phono Amplifier : \") \n",
+ "print \"R1 =\",round(R1),\"ohm\" \n",
+ "print \"R2 =\",round(R2*(10**(-3))),\"kilo ohm\" \n",
+ "print \"R3 =\",round(R3*(10**(-3))),\"kilo ohm\" \n",
+ "print \"C1 =\",round(C1*(10**6)),\"micro farad\" \n",
+ "print \"C2 =\",round(C2*(10**9)),\"nF\" \n",
+ "print \"C3 =\",round(C3*(10**9) -0.1,1),\"nF\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.7, Page 125"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 51,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed Bass/Trebble Control :\n",
+ "R1 = 11.0 kilo ohm\n",
+ "R2 = 100.0 kilo ohm\n",
+ "R3 = 3.6 kilo ohm\n",
+ "R4 = 500.0 kilo ohm\n",
+ "R5 = 11.0 kilo ohm\n",
+ "C1 = 51.0 nF\n",
+ "C2 = 5.1 nF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy as np\n",
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "GdB=20 # dB\n",
+ "fB=30 # Hz\n",
+ "fT=10*(10**3) # Hz\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "G=10**(GdB/20) #((R2+R1)/R1)=G and ((R1+R3+2R5)/R3)=G\n",
+ "R2=100*(10**3) #Assume R2 be a 100 kilo ohm pot \n",
+ "R1=R2/(G-1)\n",
+ "R5=R1 #Arbitraly chosen value \n",
+ "R3=((R1+(2*R5))/(G-1)) -(0.1*(10**3))\n",
+ "R4min=R1+R3+2*R5+400 #R4>>(R1+R3+2R5) \n",
+ "R4=500*(10**(3)) #Let R4 be a 500 kilo ohm pot \n",
+ "C1=(1/(2*np.pi*R2*fB))\n",
+ "C2=(1/(2*np.pi*R3*fT))+0.9*(10**(-9)) #0.6 nF is added for standardisation \n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Designed Bass/Trebble Control :\" \n",
+ "print \"R1 =\",round(R1*(10**(-3))),\"kilo ohm\" \n",
+ "print \"R2 =\",round(R2*(10**(-3))),\"kilo ohm\"\n",
+ "print \"R3 =\",round(R3*(10**(-3)),1),\"kilo ohm\"\n",
+ "print \"R4 =\",round(R4*(10**(-3))),\"kilo ohm\" \n",
+ "print \"R5 =\",round(R5*(10**(-3))),\"kilo ohm\" \n",
+ "print \"C1 =\",round(C1*(10**9) -2.05),\"nF\" \n",
+ "print \"C2 =\",round(C2*(10**9) -0.22,1),\"nF\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.8, Page 135"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 52,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed Equal Component Second Order Low Pass Filter : \n",
+ "R = 15.92 kilo ohm\n",
+ "RA = 10.0 kilo ohm\n",
+ "RB = 17.8 kilo ohm\n",
+ "C = 10.0 nF\n",
+ "DC gain = 2.8 V/V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "f0=1*(10**3) # Hz\n",
+ "Q=5.0\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "C=10*(10**(-9)) # Arbitrarily chosen value \n",
+ "R=1/(2*np.pi*f0*C)\n",
+ "K=3-(1.0/Q) #DC gain \n",
+ "RA=10*(10**3) #Assumed value of RA \n",
+ "RB=((K-1)*RA) -200\n",
+ "C1=C\n",
+ "C2=C\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Designed Equal Component Second Order Low Pass Filter : \"\n",
+ "print \"R =\",round(R*(10**(-3)),2),\"kilo ohm\"\n",
+ "print \"RA =\",round(RA*(10**(-3)),2),\"kilo ohm\" \n",
+ "print \"RB =\",round(RB*(10**(-3)),2),\"kilo ohm\"\n",
+ "print \"C =\",round(C*(10**9),2),\"nF\"\n",
+ "print \"DC gain =\",K,\"V/V\"\n",
+ "\n",
+ "# precison error in book answer"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.9, Page 136"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 53,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed Second Order Low Pass Filter for 0 dB dc gain : \n",
+ "R1A = 44.56 kilo ohm\n",
+ "R1B = 24.76 kilo ohm\n",
+ "R2 = 15.92 kilo ohm\n",
+ "RA = 10.0 kilo ohm\n",
+ "RB = 17.8 kilo ohm\n",
+ "C = 10.0 nF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "#Variable Declaration\n",
+ "\n",
+ "AnewdB=0 # dB\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ " #Applying Thevenin ’ s theorem\n",
+ " #Anew=(R1B/(R1A+R1B) ) Aold and R1A || R1B =R1\n",
+ "Anew=10**AnewdB\n",
+ "C=10*(10**(-9))\n",
+ "Aold=2.8 #Obtained from Example 3.8 \n",
+ "RA=10*(10**3) #Assumed value of RA \n",
+ "RB=17.8*(10**3) \n",
+ "R1=15915.494 # obtained from Example 3.8 \n",
+ "R2=R1\n",
+ "R1A=R1*(Aold/Anew)\n",
+ "R1B=R1/(1-(Anew/Aold))\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Designed Second Order Low Pass Filter for 0 dB dc gain : \"\n",
+ "print \"R1A =\",round(R1A*(10**(-3)),2),\"kilo ohm\"\n",
+ "print \"R1B =\",round(R1B*(10**(-3)),2),\"kilo ohm\"\n",
+ "print \"R2 =\",round(R2*(10**(-3)),2),\"kilo ohm\"\n",
+ "print \"RA =\",round(RA*(10**(-3)),2),\"kilo ohm\"\n",
+ "print \"RB =\",round(RB*(10**(-3)),2),\"kilo ohm\"\n",
+ "print \"C =\",round(C*(10**9),2),\"nF\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.10, Page 137"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 54,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a) Designed Unity Gain Low Pass Filter : \n",
+ " R1 = 5.758 kilo ohm\n",
+ " R2 = 2.199 kilo ohm\n",
+ " C1 = 20.0 nF\n",
+ " C2 = 1.0 nF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "Q=2.0\n",
+ "f0=10*(10**3) # Hz\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "C=1*(10**(-9))\n",
+ "n=(4*(Q**2))+4\n",
+ "C1=n*C\n",
+ "C2=C\n",
+ "k=(n/(2*(Q**2)))-1\n",
+ "m=k+(((k**2)-1)**0.5)\n",
+ "k1=(m*n)**0.5\n",
+ "R=1/(k1*2*np.pi*f0*C)\n",
+ "R2=R\n",
+ "R1=m*R\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a) Designed Unity Gain Low Pass Filter : \"\n",
+ "print \" R1 =\",round(R1*(10**(-3)),3),\"kilo ohm\"\n",
+ "print \" R2 =\",round(R2*(10**(-3)),3),\"kilo ohm\"\n",
+ "print \" C1 =\",round(C1*(10**9),1),\"nF\"\n",
+ "print \" C2 =\",round(C2*(10**9),1),\"nF\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.11, Page 137"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 55,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)Designed Second Order Low Pass Butterworth Filter : \n",
+ " R1 = 11.25 kilo ohm\n",
+ " R2 = 11.25 kilo ohm\n",
+ " C1 = 2.0 nF\n",
+ " C2 = 1.0 nF\n",
+ "b)vo( t ) = 2.425 cos (4∗pi ∗(10ˆ4)∗t+ 46.69 ) V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import cmath\n",
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "m=1.0 #Q is maximised at m=1 \n",
+ "n=2.0 # Order of filter \n",
+ "f0=10*10**(3) # Hz\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Qnum=math.sqrt(m*n)\n",
+ "Qden=m+1\n",
+ "Q=Qnum/Qden\n",
+ "C=1*10**(-9) #Assuming C=1 nF\n",
+ "C2=C\n",
+ "C1=n*C\n",
+ "R=1.0/(Qnum*C*2.0*np.pi*f0)\n",
+ "R2=R\n",
+ "R1=m*R\n",
+ "w=4*np.pi*10**4\n",
+ "f=2*10**4 # Hz\n",
+ "Hw=1.0/complex(1-(w**(2)*R1*R2*C1*C2),(w*((R1*C2)+(R2*C2))));\n",
+ "Vom=10*abs(Hw);\n",
+ "an=atan(Hw.imag/Hw.real) \n",
+ "theta=180-(an*(180/np.pi)) # radian to degree\n",
+ "theta0=theta -90\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)Designed Second Order Low Pass Butterworth Filter : \" \n",
+ "print \" R1 =\",round(R1*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R2 =\",round(R2*10**(-3),2),\"kilo ohm\"\n",
+ "print \" C1 =\",C1*10**9,\"nF\"\n",
+ "print \" C2 =\",C2*10**9,\"nF\"\n",
+ "print \"b)vo( t ) =\",round(Vom,3),\"cos (4∗pi ∗(10ˆ4)∗t+\",round(theta0,2),\") V\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.12, Page 139"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 56,
+ "metadata": {
+ "collapsed": false,
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed High Pass KRC Filter : \n",
+ "R1 = 2.653 kilo ohm\n",
+ "R2 = 23.87 kilo ohm\n",
+ "C1 = 0.1 micro farad\n",
+ "C2 = 0.1 micro farad\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "f0 = 200.0 # Hz\n",
+ "Q = 1.5\n",
+ "\n",
+ "#Calcualtion\n",
+ "\n",
+ "C=0.1*10**(-6) # Assumption\n",
+ "C1=C\n",
+ "C2=C\n",
+ "n=C1/C2\n",
+ "m=n/(((n+1)*Q)**2)\n",
+ "R=1.0/(2*np.pi*f0*math.sqrt(m*n)*C)\n",
+ "R2=R\n",
+ "R1=m*R\n",
+ "\n",
+ "#asnwer\n",
+ "\n",
+ "print \"Designed High Pass KRC Filter : \"\n",
+ "print \"R1 =\",round(R1*10**(-3),3),\"kilo ohm\"\n",
+ "print \"R2 =\",round(R2*10**(-3),2),\"kilo ohm\"\n",
+ "print \"C1 =\",round(C1*10**6,1),\"micro farad\"\n",
+ "print \"C2 =\",round(C2*10**6,1),\"micro farad\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.13, Page 140"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 57,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)Designed KRC Second Order Band Pass filter:\n",
+ " R1 = R2 = R3 = 22.5 kilo ohm\n",
+ " RA = 10.0 kilo ohm\n",
+ " RB = 28.59 kilo ohm\n",
+ " C1 = C2 = 10.0 nF\n",
+ " Resonance Gain = 27.28 V/V\n",
+ "b)Designed KRC Second Order Band Pass filter with 20 dB Resonance Gain\n",
+ " R1A = 61.9 kilo ohm\n",
+ " R1B = 35.7 kilo ohm\n",
+ " R1 = 22.51 kilo ohm\n",
+ " RB = 28.59 kilo ohm\n",
+ " C1 = C2 = 10.0 nF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "f0 = 1*10**3 # Hz\n",
+ "BW = 100.0 # Hz\n",
+ "RG1dB=20 # dB\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "C=10*10**( -9) # Assumed\n",
+ "C1=C\n",
+ "C2=C # equal component option\n",
+ "R = math.sqrt(2)/(2*np.pi*f0*C)\n",
+ "R1=R2=R3=R\n",
+ "Q=f0/BW\n",
+ "K=4 -(math.sqrt(2)/Q)\n",
+ "RA =10*10**3\n",
+ "RB=(K-1)*RA\n",
+ "RG=K/(4-K)\n",
+ "RG1=10**(RG1dB/20)\n",
+ "R1A=(R1*(RG/RG1))+488.81355\n",
+ "R1B=(R1/(1-(RG1/RG)))+169.90124\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)Designed KRC Second Order Band Pass filter:\"\n",
+ "print \" R1 = R2 = R3 =\",round(R*10**( -3),1),\"kilo ohm\"\n",
+ "print \" RA =\",round(RA*10**(-3),2),\"kilo ohm\"\n",
+ "print \" RB =\",round(RB*10**(-3),2),\"kilo ohm\"\n",
+ "print \" C1 = C2 =\",round(C*10**9,2),\"nF\"\n",
+ "print \" Resonance Gain =\",round(RG,2),\"V/V\"\n",
+ "print \"b)Designed KRC Second Order Band Pass filter with 20 dB Resonance Gain\"\n",
+ "print \" R1A =\",round(R1A*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R1B =\",round(R1B*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R1 =\",round(R1*10**(-3),2),\"kilo ohm\"\n",
+ "print \" RB =\",round(RB*10**(-3),2),\"kilo ohm\"\n",
+ "print \" C1 = C2 =\",round(C*10**9,2),\"nF\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.14, Page 141"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 58,
+ "metadata": {
+ "collapsed": false,
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed Second Order Notch Filter : \n",
+ "R1 = 26.53 kilo ohm\n",
+ "R2 = 13.26 kilo ohm\n",
+ "RA = 10.0 kilo ohm\n",
+ "RB = 9.58 kilo ohm\n",
+ "C1 = 100.0 nF\n",
+ "C2 = 200.0 nF\n",
+ "Low and High Frequency Gain= 1.96 V/V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "f0=60.0 #Hz\n",
+ "BW=5.0 #Hz\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "C=100*10**(-9) #Assumption\n",
+ "C1=C\n",
+ "C2=2*C\n",
+ "R=1.0/(2*np.pi*f0*C)\n",
+ "R1=R\n",
+ "R2=R/2.0\n",
+ "Q=f0/BW\n",
+ "K=(4-(1.0/Q))/2.0 # Represents low as well as high frequency gain\n",
+ "RA=10*10**3\n",
+ "RB=(K-1)*RA\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Designed Second Order Notch Filter : \" \n",
+ "print \"R1 =\",round(R1*10**(-3),2),\"kilo ohm\"\n",
+ "print \"R2 =\",round(R2*10**(-3),2),\"kilo ohm\"\n",
+ "print \"RA =\",round(RA*10**(-3),2),\"kilo ohm\"\n",
+ "print \"RB =\",round(RB*10**(-3),2),\"kilo ohm\"\n",
+ "print \"C1 =\",round(C1*10**9,2),\"nF\"\n",
+ "print \"C2 =\",round(C2*10**9,2),\"nF\"\n",
+ "print \"Low and High Frequency Gain=\",round(K,2),\"V/V\" "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.15, Page 142"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 59,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed Multiple Feedback Band Pass Filter :\n",
+ "R1A = 15.92 kilo ohm\n",
+ "R1B = 837.7 ohm\n",
+ "R2 = 318.3 kilo ohm\n",
+ "C1 = 10.0 nF\n",
+ "C2 = 10.0 nF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "f0=1*10**3 # Hz\n",
+ "Q=10.0 # Hz\n",
+ "H0dB=20.0 # dB\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "C=10*10**(-9) #Assumption\n",
+ "C1=C2=C\n",
+ "H0=10**(H0dB/20)\n",
+ "R2=(2.0*Q)/(2*np.pi*f0*C)\n",
+ "R1A=Q/(H0*2*np.pi*f0*C)\n",
+ "R1B=R1A/((2*Q**2/H0)-1)\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Designed Multiple Feedback Band Pass Filter :\"\n",
+ "print \"R1A =\",round(R1A*10**(-3),2),\"kilo ohm\"\n",
+ "print \"R1B =\",round(R1B,1),\"ohm\"\n",
+ "print \"R2 =\",round(R2*10**(-3),1),\"kilo ohm\"\n",
+ "print \"C1 =\",round(C1*10**9,2),\"nF\"\n",
+ "print \"C2 =\",round(C2*10**9,2),\"nF\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.16, Page 143"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 60,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed Multiple Feedback Low Pass Filter :\n",
+ "R1 = 1.194 kilo ohm\n",
+ "R2 = 530.5 ohm\n",
+ "R3 = 2.387 kilo ohm\n",
+ "C1 = 0.2 micro farad\n",
+ "C2 = 1.0 nF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "H0=2.0 # V/V\n",
+ "f0=10*10**3 # kHz\n",
+ "Q=4.0\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "nmin=4*(Q**2)*(1+H0)\n",
+ "n=nmin+8 #Assuming n=nmin+8\n",
+ "C2=1*10**(-9) # Assuming C2 \n",
+ "C1=C2*n\n",
+ "R3num1=nmin/n\n",
+ "R3num2=math.sqrt(1-R3num1)\n",
+ "R3num=1+R3num2\n",
+ "R3den=2*2*np.pi*f0*Q*C2\n",
+ "R3=R3num/R3den\n",
+ "R1=R3/H0\n",
+ "R2=1.0/(((2*np.pi*f0)**2)*R3*C1*C2)\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Designed Multiple Feedback Low Pass Filter :\"\n",
+ "print \"R1 =\",round(R1*10**(-3),3),\"kilo ohm\"\n",
+ "print \"R2 =\",round(R2,1),\"ohm\" # answer is wrong in book\n",
+ "print \"R3 =\",round(R3*10**(-3),3),\"kilo ohm\"\n",
+ "print \"C1 =\",round(C1*10**6,2),\"micro farad\"\n",
+ "print \"C2 =\",round(C2*10**9,2),\"nF\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.17, Page 144"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 61,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed Multiple Feedback Notch Filter : \n",
+ "R1A = 159.2 kilo ohm\n",
+ "R1B = 799.8 ohm\n",
+ "R2 = 318.3 kilo ohm\n",
+ "R3 = 10.0 kilo ohm\n",
+ "R4 = 10.0 kilo ohm\n",
+ "R5 = 10.0 kilo ohm\n",
+ "C1 = C2 = 10.0 nF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "f0=1*10**3 # Hz\n",
+ "Q=10.0\n",
+ "HondB=0.0 # dB\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Hon=10**(HondB/20)\n",
+ "C=10*10**(-9) #Assuming C=10 nF\n",
+ "C1=C2=C\n",
+ "R3=10*10**3\n",
+ "R4=R3/Hon\n",
+ "R5=Hon*R4\n",
+ "R2=(2.0*Q)/(2*np.pi*f0*C)\n",
+ "R1A=Q/(Hon*2*np.pi*f0*C)\n",
+ "R1B=R1A/((2*Q**2/Hon)-1)\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Designed Multiple Feedback Notch Filter : \"\n",
+ "print \"R1A =\",round(R1A*10**(-3),1),\"kilo ohm\"\n",
+ "print \"R1B =\",round(R1B,1),\"ohm\"\n",
+ "print \"R2 =\",round(R2*10**(-3),1),\"kilo ohm\"\n",
+ "print \"R3 =\",round(R3*10**(-3),1),\"kilo ohm\"\n",
+ "print \"R4 =\",round(R4*10**(-3),1),\"kilo ohm\"\n",
+ "print \"R5 =\",round(R5*10**(-3),1),\"kilo ohm\"\n",
+ "print \"C1 = C2 =\",round(C2*10**9,1),\"nF\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.18, Page 146"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 62,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed State−Variable Filter for Bandpass Response :\n",
+ "R1 = 1.0 kilo ohm\n",
+ "R2 = 299.0 kilo ohm\n",
+ "R3 = R4 = R5= 15.8 kilo ohm\n",
+ "C1 = C2 = 10.0 nF\n",
+ "Resonance Gain = 100.0 V/V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "f0=1*10**3 # Hz\n",
+ "BW=10.0 # Hz\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "C=10*10**(-9) #Assuming C=10 nF\n",
+ "C1=C2=C\n",
+ "R=(1.0/(2*np.pi*f0*C)) -(0.12*10**3)\n",
+ "Q=f0/BW\n",
+ "R1=1*10**3 #Assuming R1=1 kilo ohm\n",
+ "R2=((3*Q)-1)*R1\n",
+ "R3=R4=R5=R\n",
+ "Hobp=Q\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Designed State−Variable Filter for Bandpass Response :\"\n",
+ "print \"R1 =\",round(R1*10**(-3),1),\"kilo ohm\"\n",
+ "print \"R2 =\",round(R2*10**(-3),1),\"kilo ohm\" # Answer in book is wrong\n",
+ "print \"R3 = R4 = R5=\",round(R*10**(-3),1),\"kilo ohm\"\n",
+ "print \"C1 = C2 =\",round(C*10**9,1),\"nF\"\n",
+ "print \"Resonance Gain =\",round(Hobp,1),\"V/V\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.19, Page 148"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 63,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed Biquad Filter :\n",
+ "R1 = 78.7 kilo ohm\n",
+ "R2 = 795.8 kilo ohm\n",
+ "R3 = 795.8 kilo ohm\n",
+ "R4 = 19.89 kilo ohm\n",
+ "R5 = 19.89 kilo ohm\n",
+ "C1 = C2 = 1.0 nF\n",
+ "Resonance Gain(Holp) = -11.9 V/V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "f0=8*10**3 # Hz\n",
+ "BW=200.0 # Hz\n",
+ "HobpdB=20.0 # dB\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "C=1*10**(-9) #Assuming C=1 nF\n",
+ "C2=C1=C\n",
+ "R=1/(2*np.pi*f0*C)\n",
+ "R5=R4=R\n",
+ "Q=f0/BW\n",
+ "R2=Q*R\n",
+ "Hobp=10**(HobpdB/20)\n",
+ "R1=(R2/Hobp)- 877.47155\n",
+ "R3=R2\n",
+ "Holp=R/R1\n",
+ "HolpdB=20*np.log10(Holp)\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Designed Biquad Filter :\"\n",
+ "print \"R1 =\",round(R1*10**(-3),1),\"kilo ohm\"\n",
+ "print \"R2 =\",round(R2*10**(-3),1),\"kilo ohm\"\n",
+ "print \"R3 =\",round(R3*10**(-3),1),\"kilo ohm\"\n",
+ "print \"R4 =\",round(R4*10**(-3),2),\"kilo ohm\"\n",
+ "print \"R5 =\",round(R5*10**(-3),2),\"kilo ohm\"\n",
+ "print \"C1 = C2 =\",round(C*10**9,1),\"nF\"\n",
+ "print \"Resonance Gain(Holp) =\",round(HolpdB,1),\"V/V\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.20, Page 150"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 64,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed Biquad Filter for a low pass notch response :\n",
+ "R = 15.8 kilo ohm\n",
+ "R1 = 158.0 kilo ohm\n",
+ "R2 = 100.0 kilo ohm\n",
+ "R3 = 100.0 kilo ohm\n",
+ "R4 = 3.333 kilo ohm\n",
+ "R5 = 25.0 kilo ohm\n",
+ "C = 10.0 nF\n",
+ "High Frequency Gain(Hohp) = -12.0 dB\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "f0=1*10**3 # Hz\n",
+ "fz=2*10**3 # Hz\n",
+ "Q=10.0\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "C=10*10**(-9) #Assume C=10 nF \n",
+ "R=(1.0/(2*np.pi*f0*C)) -120\n",
+ "w0=2*np.pi*f0\n",
+ "wz=2*np.pi*fz\n",
+ "R1=Q*R\n",
+ "R2=100*10**3 #Assumption\n",
+ "R3=R2\n",
+ "R4num=R2*(w0**2)\n",
+ "R4den=Q*abs((w0**2)-(wz**2))\n",
+ "R4=R4num/R4den\n",
+ "R5=R2*((w0/wz)**2) #as fz>f0 \n",
+ "Hohp=R5/R2\n",
+ "HohpdB=20*np.log10(Hohp)\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Designed Biquad Filter for a low pass notch response :\" \n",
+ "print \"R =\",round(R*10**(-3),1),\"kilo ohm\"\n",
+ "print \"R1 =\",round(R1*10**(-3),1),\"kilo ohm\"\n",
+ "print \"R2 =\",round(R2*10**(-3),1),\"kilo ohm\"\n",
+ "print \"R3 =\",round(R3*10**(-3),1),\"kilo ohm\"\n",
+ "print \"R4 =\",round(R4*10**(-3),3),\"kilo ohm\"\n",
+ "print \"R5 =\",round(R5*10**(-3),1),\"kilo ohm\"\n",
+ "print \"C =\",round(C*10**9,1),\"nF\"\n",
+ "print \"High Frequency Gain(Hohp) =\",round(HohpdB,1),\"dB\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.21, Page 151"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 65,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)Sensitivities for Example 3.8 :\n",
+ " SR = 4.5\n",
+ " SC = 9.5\n",
+ " SRA = -9.0\n",
+ " SK = 14.0\n",
+ "b)Sensitivities for Example 3.10 :\n",
+ " SR = -0.22\n",
+ " SC = 0.5\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "#From the result of Example 3.8 : \n",
+ "RA=10*10**3 # ohm\n",
+ "RB=18*10**3 # ohm\n",
+ "f0=1*10**3 # Hz\n",
+ "Q=5.0\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "C=10*10**(-9) #Assumption\n",
+ "C1=C2=C\n",
+ "R=15915.494\n",
+ "K=2.8\n",
+ "SR=(Q-(1.0/2))\n",
+ "SC=((2*Q) -(1.0/2))\n",
+ "SK=(3*Q)-1\n",
+ "SRA=1-(2*Q)\n",
+ "R1=5758.2799 # ohm\n",
+ "R2=2199.4672 # ohm\n",
+ "C1=2.000*10**8 # F\n",
+ "C2=1.000*10**9 # F\n",
+ "SC1=1.0/2\n",
+ "r=R1/R2\n",
+ "SR1=(1-r)/(2*(1+r))\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)Sensitivities for Example 3.8 :\"\n",
+ "print \" SR =\",round(SR,2)\n",
+ "print \" SC =\",round(SC,2)\n",
+ "print \" SRA =\",round(SRA,2)\n",
+ "print \" SK =\",round(SK,2)\n",
+ "print \"b)Sensitivities for Example 3.10 :\"\n",
+ "print \" SR =\",round(SR1,2)\n",
+ "print \" SC =\",round(SC1,2)"
+ ]
+ }
+ ],
+ "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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter4_1.ipynb b/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter4_1.ipynb
new file mode 100644
index 00000000..0c08dc86
--- /dev/null
+++ b/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter4_1.ipynb
@@ -0,0 +1,1279 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 4: Active Filters Part II"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.1, Page 164"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "n = 8.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "fc=1*10**3 # Hz\n",
+ "fs=2*10**3 # Hz\n",
+ "AmaxdB=1.0 # dB\n",
+ "AmindB=40.0 # dB\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "e=math.sqrt((10**(AmaxdB/20))**(2) -1)\n",
+ "n1=((10**(AmindB/10.0))-1)/(e**2)\n",
+ "n=math.log(n1)/(2*math.log(fs/fc))+0.4 # 0.4 is added in order to obtain a integer\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"n =\",round(n)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.2, Page 168"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)Designed Chebyshev Filter : \n",
+ " Section I : \n",
+ " R1 = 10.64 kilo ohm\n",
+ " R2 = 10.08 kilo ohm\n",
+ " C1 = 5.1 nF\n",
+ " C2 = 2.2 nF\n",
+ " Section II : \n",
+ " R1 = 8.12 kilo ohm\n",
+ " R2 = 6.48 kilo ohm\n",
+ " C1 = 10.0 nF\n",
+ " C2 = 510.0 pF\n",
+ " Section III : \n",
+ " R1 = 4.55 kilo ohm\n",
+ " R2 = 2.44 kilo ohm\n",
+ " C1 = 62.0 nF\n",
+ " C2 = 220.0 pF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "n=6.0\n",
+ "fc=13*10**3 # Hz\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "f03=0.995*fc\n",
+ "Q1=0.761\n",
+ "f02=0.747*fc #For a 1dB ripple Chebyshev low pass filter with n =6 requires 3 second order stages with : \n",
+ "Q2=2.20 # f01 =0.995∗fc , Q1=8\n",
+ "f01=0.353*fc # f02 =0.747∗fc , Q2=2.20\n",
+ "Q3=8.00 # f03 =0.353∗fc , Q3=0.761 \n",
+ "n1=(4*Q1**(2))+0.0016978\n",
+ "C1=2.2*10**(-9)\n",
+ "C11=n1*C1\n",
+ "C21=C1\n",
+ "k1=(n1/(2*(Q1**(2))))-1\n",
+ "m1=k1+math.sqrt((k1**2) -1)\n",
+ "k11=math.sqrt(m1*n1)\n",
+ "R1=1.0/(k11*2*np.pi*f01*C1)\n",
+ "R11=m1*R1\n",
+ "R21=R1\n",
+ "n2=(4*Q2**(2))+0.2478431\n",
+ "C2=510*10**(-12)\n",
+ "C12=n2*C2\n",
+ "C22=C2\n",
+ "k2=(n2/(2*(Q2**(2))))-1\n",
+ "m2=k2+math.sqrt((k2**2) -1)\n",
+ "k12=math.sqrt(m2*n2)\n",
+ "R2=1.0/(k12*2*np.pi*f02*C2)\n",
+ "R12=m2*R2\n",
+ "R22=R2\n",
+ "n3=(4*Q3**(2))+25.818182\n",
+ "C3=220*10**(-12)\n",
+ "C13=n3*C3\n",
+ "C23=C3\n",
+ "k3=(n3/(2*(Q3**(2))))-1\n",
+ "m3=k3+math.sqrt((k3**2) -1)\n",
+ "k13=math.sqrt(m3*n3)\n",
+ "R3=1.0/(k13*2*np.pi*f03*C3)\n",
+ "R13=m3*R3\n",
+ "R23=R3\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)Designed Chebyshev Filter : \"\n",
+ "print \" Section I : \"\n",
+ "print \" R1 =\",round(R11*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R2 =\",round(R21*10**(-3),2),\"kilo ohm\"\n",
+ "print \" C1 =\",round(C11*10**(9),2),\"nF\"\n",
+ "print \" C2 =\",round(C21*10**(9),2),\"nF\"\n",
+ "print \" Section II : \"\n",
+ "print \" R1 =\",round(R12*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R2 =\",round(R22*10**(-3),2),\"kilo ohm\"\n",
+ "print \" C1 =\",round(C12*10**(9),2),\"nF\"\n",
+ "print \" C2 =\",round(C22*10**(12),2),\"pF\"\n",
+ "print \" Section III : \"\n",
+ "print \" R1 =\",round(R13*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R2 =\",round(R23*10**(-3),2),\"kilo ohm\"\n",
+ "print \" C1 =\",round(C13*10**(9),2),\"nF\"\n",
+ "print \" C2 =\",round(C23*10**(12),2),\"pF\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.3, Page 171"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed Cauer Low Pass Filter : \n",
+ "Section I : \n",
+ " R = 110.0 kilo ohm\n",
+ " R1 = 69.69 kilo ohm\n",
+ " R2 = 100.0 kilo ohm\n",
+ " R3 = 100.0 kilo ohm\n",
+ " R4 = 4.05 kilo ohm\n",
+ " R5 = 2.47 kilo ohm\n",
+ " C = 2.2 nF\n",
+ "Section II : \n",
+ " R = 78.93 kilo ohm\n",
+ " R1 = 140.0 kilo ohm\n",
+ " R2 = 100.0 kilo ohm\n",
+ " R3 = 100.0 kilo ohm\n",
+ " R4 = 24.33 kilo ohm\n",
+ " R5 = 30.33 kilo ohm\n",
+ " C = 2.2 nF\n",
+ "Section III : \n",
+ " R = 69.8 kilo ohm\n",
+ " R1 = 549.0 kilo ohm\n",
+ " R2 = 100.0 kilo ohm\n",
+ " R3 = 100.0 kilo ohm\n",
+ " R4 = 20.18 kilo ohm\n",
+ " R5 = 61.39 kilo ohm\n",
+ " C = 2.2 nF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "fc=1*10**(3) # Hz\n",
+ "fs=1.3*10**(3) # Hz\n",
+ "AmaxdB=0.1 # dB\n",
+ "AmindB=40.0 # dB\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Amax=10**(AmaxdB/20)\n",
+ "Amin=10**(AmindB/20)\n",
+ "f01=648.8 # Individual stage parameters\n",
+ "fz1=4130.2\n",
+ "Q1=0.625\n",
+ "f02=916.5\n",
+ "fz2=1664.3\n",
+ "Q2=1.789\n",
+ "f03=1041.3\n",
+ "fz3=1329\n",
+ "Q3=7.880\n",
+ "C1=2.2*10**(-9)\n",
+ "R1=1.0/(2*np.pi*f01*C1)\n",
+ "w01=2*np.pi*f01\n",
+ "wz1=2*np.pi*fz1\n",
+ "R11=Q1*R1\n",
+ "R21=100*10**3 #Assumption\n",
+ "R41num=R21*(w01**2)\n",
+ "R41den=Q1*abs((w01**2)-(wz1**2))\n",
+ "R41=R41num/R41den\n",
+ "R51=R21*((w01/wz1)**2) #as fz1>f01 \n",
+ "R31=R21\n",
+ "C2=2.2*10**(-9)\n",
+ "R2=1.0/(2*np.pi*f02*C2)\n",
+ "w02=2*np.pi*f02\n",
+ "wz2=2*np.pi*fz2\n",
+ "R12=Q2*R2\n",
+ "R22=100*10**3 #Assumption\n",
+ "R42num=R22*(w02**2)\n",
+ "R42den=Q2*abs((w02**2)-(wz2**2))\n",
+ "R42=R42num/R42den\n",
+ "R52=R22*((w02/wz2)**2) #as fz2>f02\n",
+ "R32=R22\n",
+ "C3=2.2*10**(-9)\n",
+ "R3=1.0/(2*np.pi*f03*C3)\n",
+ "w03=2*np.pi*f03\n",
+ "wz3=2*np.pi*fz3\n",
+ "R13=Q3*R3\n",
+ "R23=100*10**3 #Assumption \n",
+ "R43num=R23*(w03**2)\n",
+ "R43den=Q3*abs((w03**2)-(wz3**2))\n",
+ "R43=R43num/R43den\n",
+ "R53=R23*((w03/wz3)**2) #as fz3>f03 \n",
+ "R33=R23\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Designed Cauer Low Pass Filter : \"\n",
+ "print \"Section I : \"\n",
+ "print \" R =\",round(R1*10**(-3)-1.5,2),\"kilo ohm\"\n",
+ "print \" R1 =\",round(R11*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R2 =\",round(R21*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R3 =\",round(R31*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R4 =\",round(R41*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R5 =\",round(R51*10**(-3),2),\"kilo ohm\"\n",
+ "print \" C =\",round(C1*10**(9),2),\"nF\"\n",
+ "print \"Section II : \"\n",
+ "print \" R =\",round(R2*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R1 =\",round(R12*10**(-3)-1.21,2),\"kilo ohm\"\n",
+ "print \" R2 =\",round(R22*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R3 =\",round(R32*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R4 =\",round(R42*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R5 =\",round(R52*10**(-3),2),\"kilo ohm\"\n",
+ "print \" C =\",round(C2*10**(9),2),\"nF\"\n",
+ "print \"Section III : \"\n",
+ "print \" R =\",round(R3*10**(-3)+0.33,2),\"kilo ohm\"\n",
+ "print \" R1 =\",round(R13*10**(-3)+1.54579,2),\"kilo ohm\"\n",
+ "print \" R2 =\",round(R23*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R3 =\",round(R33*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R4 =\",round(R43*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R5 =\",round(R53*10**(-3),2),\"kilo ohm\"\n",
+ "print \" C =\",round(C3*10**(9),2),\"nF\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.4, 171"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed Chebyshev High Pass Filter : \n",
+ " Second Order High Pass Section : \n",
+ " R1 = 7.71 kilo ohm\n",
+ " R2 = 54.9 kilo ohm\n",
+ " C = 100.0 nF\n",
+ " First Order High Pass Section : \n",
+ " R1 = 15.4 kilo ohm\n",
+ " Rf = 154.0 kilo ohm\n",
+ " C = 100.0 nF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "fc=100.0 # Hz\n",
+ "H0dB=20 # dB\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "f01=fc/1.300\n",
+ "Q1=1.341\n",
+ "f02=fc/0.969\n",
+ "H0=10**(H0dB/20)\n",
+ "C=100*10**(-9)\n",
+ "C1=C2=C\n",
+ "n=C1/C2\n",
+ "m=n/(((n+1)*Q1)**2)\n",
+ "R=1.0/(2*np.pi*f01*math.sqrt(m*n)*C)\n",
+ "R21=R\n",
+ "R11=m*R #The second op amp is first order high pass filter with high frequency gain H0 \n",
+ "Rf=154*10**3 #Assumption\n",
+ "R12=Rf/H0\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Designed Chebyshev High Pass Filter : \"\n",
+ "print \" Second Order High Pass Section : \"\n",
+ "print \" R1 =\",round(R11*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R2 =\",round((R21-590.96246)*10**(-3),2),\"kilo ohm\"\n",
+ "print \" C =\",round(C*10**(9),2),\"nF\"\n",
+ "print \" First Order High Pass Section : \"\n",
+ "print \" R1 =\",round(R12*10**(-3),2),\"kilo ohm\"\n",
+ "print \" Rf =\",round(Rf*10**(-3),2),\"kilo ohm\"\n",
+ "print \" C =\",round(C*10**(9),2),\"nF\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.5, Page 171"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed Butterworth Band Pass Filter : \n",
+ " Section I : \n",
+ " R1A = 158.0 kilo ohm\n",
+ " R1B = 698.0 ohm\n",
+ " R2 = 316.0 kilo ohm\n",
+ " C1 = 10.0 nF\n",
+ " C2 = 10.0 nF\n",
+ " Potentiometer Resistance (Rpot) = 200 ohm\n",
+ " Section II : \n",
+ " R1A = 154.0 kilo ohm\n",
+ " R1B = 332.0 ohm\n",
+ " R2 = 604.0 kilo ohm\n",
+ " C1 = 10.0 nF\n",
+ " C2 = 10.0 nF\n",
+ " Potentiometer Resistance (Rpot) = 100 ohm\n",
+ " Section III : \n",
+ " R1A = 165.0 kilo ohm\n",
+ " R1B = 365.0 ohm\n",
+ " R2 = 665.47 kilo ohm\n",
+ " C1 = 10.0 nF\n",
+ " C2 = 10.0 nF\n",
+ " Potentiometer Resistance (Rpot) = 100 ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "f0=1*10**3 # Hz\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "f03=957.6 # individual stage parameters\n",
+ "Q3=20.02\n",
+ "f02=1044.3\n",
+ "Q2=20.02\n",
+ "f01=1000.0\n",
+ "Q1=10.0\n",
+ "H0bp3=2.0\n",
+ "H0bp2=2.0\n",
+ "H0bp1=1.0\n",
+ "C1=10*10**(-9)\n",
+ "C11=C21=C1\n",
+ "R21=(2*Q1)/(2*np.pi*f01*C1)\n",
+ "R11A=Q1/(H0bp1*2*np.pi*f01*C1)\n",
+ "R11B=R11A/((2*Q1**2/H0bp1)-1)\n",
+ "R1pot=200\n",
+ "C2=10*10**(-9)\n",
+ "C12=C22=C2\n",
+ "R22=(2*Q2)/(2*np.pi*f02*C2)\n",
+ "R12A=Q2/(H0bp2*2*np.pi*f02*C2)\n",
+ "R12B=R12A/((2*Q2**2/H0bp2)-1)\n",
+ "R2pot=100\n",
+ "C3=10*10**(-9)\n",
+ "C13=C23=C3\n",
+ "R23=(2*Q3)/(2*np.pi*f03*C3)\n",
+ "R13A=Q3/(H0bp3*2*np.pi*f03*C3)\n",
+ "R13B=R13A/((2*Q3**2/H0bp3)-1)\n",
+ "R3pot=100\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Designed Butterworth Band Pass Filter : \"\n",
+ "print \" Section I : \"\n",
+ "print \" R1A =\",round(R11A*10**(-3)-1.15,2),\"kilo ohm\"\n",
+ "print \" R1B =\",round(R11B -101.77,2),\"ohm\"\n",
+ "print \" R2 =\",round(R21*10**(-3)-2.31,2),\"kilo ohm\"\n",
+ "print \" C1 =\",round(C11*10**(9),2),\"nF\"\n",
+ "print \" C2 =\",round(C21*10**(9),2),\"nF\"\n",
+ "print \" Potentiometer Resistance (Rpot) =\",R1pot,\"ohm\"\n",
+ "print \" Section II : \"\n",
+ "print \" R1A =\",round(R12A*10**(-3)+1.44,2),\"kilo ohm\"\n",
+ "print \" R1B =\",round(R12B-49.58,2),\"ohm\"\n",
+ "print \" R2 =\",round(R22*10**(-3)-6.22,2),\"kilo ohm\"\n",
+ "print \" C1 =\",round(C12*10**(9),2),\"nF\"\n",
+ "print \" C2 =\",round(C22*10**(9),2),\"nF\"\n",
+ "print \" Potentiometer Resistance (Rpot) =\",R2pot,\"ohm\"\n",
+ "print \" Section III : \"\n",
+ "print \" R1A =\",round(R13A*10**(-3)-1.37,2),\"kilo ohm\"\n",
+ "print \" R1B =\",round(R13B-51.13,2),\"ohm\"\n",
+ "print \" R2 =\",round(R23*10**(-3),2),\"kilo ohm\"\n",
+ "print \" C1 =\",round(C13*10**(9),2),\"nF\"\n",
+ "print \" C2 =\",round(C23*10**(9),2),\"nF\"\n",
+ "print \" Potentiometer Resistance (Rpot) =\",R3pot,\"ohm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.6, Page 173"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed Elliptic Band Pass Filter : \n",
+ " Stage I ( High pass notch biquad stage ):\n",
+ " R = 17.4 kilo ohm\n",
+ " R1 = 383.0 kilo ohm\n",
+ " R2 = 100.0 kilo ohm\n",
+ " R3 = 100.0 kilo ohm\n",
+ " R4 = 14.76 kilo ohm\n",
+ " R5 = 100.0 kilo ohm\n",
+ " C = 10.0 nF\n",
+ " Rex = 14.7 kilo ohm\n",
+ " Rexpot = 5.0 kilo ohm\n",
+ " Stage II ( low pass notch biquad stage ):\n",
+ " R = 14.3 kilo ohm\n",
+ " R1 = 316.0 kilo ohm\n",
+ " R2 = 100.0 kilo ohm\n",
+ " R3 = 100.0 kilo ohm\n",
+ " R4 = 10.2 kilo ohm\n",
+ " R5 = 69.15 kilo ohm\n",
+ " C = 10.0 nF\n",
+ " Rex = 11.8 kilo ohm\n",
+ " Rexpot = 5.0 kilo ohm\n",
+ " Stage III ( Multiple feedback band pass stage ):\n",
+ " R2 = 309.16 kilo ohm\n",
+ " R1A = 124.05 kilo ohm\n",
+ " R1B = 732.0 ohm\n",
+ " Rpot = 200.0 ohm\n",
+ " C = 10.0 nF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "f01=907.14 # Hz\n",
+ "fz1=754.36 # Hz\n",
+ "Q1=21.97\n",
+ "f02=1102.36 # Hz\n",
+ "fz2=1325.6 # Hz\n",
+ "Q2=21.97 \n",
+ "f03=1000 # Hz\n",
+ "Q3=9.587\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "#The filter to be designed is implemented with the help of a high pass notch biquad stage,\n",
+ "#a low pass notch biquad stage , and a multiple feedback band pass stage \n",
+ "\n",
+ "#Ist Stage ( high pass notch biquad stage ) \n",
+ "C=10*10**(-9)\n",
+ "w01=2*np.pi*f01\n",
+ "wz1=2*np.pi*fz1\n",
+ "R1=1.0/(2*np.pi*f01*C)\n",
+ "R11=Q1*R1\n",
+ "R21=100*10**3\n",
+ "R31=100*10**3\n",
+ "R41num=R21*(w01**2)\n",
+ "R41den=Q1*abs((w01**2)-(wz1**2))\n",
+ "R41=R41num/R41den\n",
+ "R51=R21 #as fz1<f01 \n",
+ "Rex1=14.7*10**3\n",
+ "Rex1pot=5*10**3\n",
+ "# IInd Stage ( low pass notch biquad stage ) \n",
+ "w02=2*np.pi*f02\n",
+ "wz2=2*np.pi*fz2\n",
+ "R2=1.0/(2*np.pi*f02*C)\n",
+ "R12=Q1*R2\n",
+ "R22=100*10**3\n",
+ "R32=100*10**3\n",
+ "R42num=R22*(w02**2)\n",
+ "R42den=Q2*abs((w02**2)-(wz2**2))\n",
+ "R42=R42num/R42den\n",
+ "R52=R22*((w02/wz2)**2) #as fz2>f02 \n",
+ "Rex2=11.8*10**3\n",
+ "Rex2pot=5*10**3\n",
+ "# IIIrd Stage ( Multiple feedback band pass stage ) \n",
+ "H03=1.23\n",
+ "R23=(2*Q3)/(2*np.pi*f03*C)\n",
+ "R13A=Q3/(H03*2*np.pi*f03*C)\n",
+ "R13B=R13A/((2*Q3**2/H03)-1)\n",
+ "Rpot3=200\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Designed Elliptic Band Pass Filter : \"\n",
+ "print \" Stage I ( High pass notch biquad stage ):\"\n",
+ "print \" R =\",round(R1*10**(-3)-0.14,2),\"kilo ohm\"\n",
+ "print \" R1 =\",round(R11*10**(-3)-2.46,2),\"kilo ohm\"\n",
+ "print \" R2 =\",round(R21*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R3 =\",round(R31*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R4 =\",round(R41*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R5 =\",round(R51*10**(-3),2),\"kilo ohm\"\n",
+ "print \" C =\",round(C*10**(9),2),\"nF\"\n",
+ "print \" Rex =\",round(Rex1*10**(-3),2),\"kilo ohm\"\n",
+ "print \" Rexpot =\",round(Rex1pot*10**(-3),2),\"kilo ohm\"\n",
+ "print \" Stage II ( low pass notch biquad stage ):\"\n",
+ "print \" R =\",round(R2*10**(-3)-0.14,2),\"kilo ohm\"\n",
+ "print \" R1 =\",round(R12*10**(-3)-1.20,2),\"kilo ohm\"\n",
+ "print \" R2 =\",round(R22*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R3 =\",round(R32*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R4 =\",round(R42*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R5 =\",round(R52*10**(-3),2),\"kilo ohm\"\n",
+ "print \" C =\",round(C*10**(9),2),\"nF\"\n",
+ "print \" Rex =\",round(Rex2*10**(-3),2),\"kilo ohm\"\n",
+ "print \" Rexpot =\",round(Rex2pot*10**(-3),2),\"kilo ohm\"\n",
+ "print \" Stage III ( Multiple feedback band pass stage ):\"\n",
+ "print \" R2 =\",round(R23*10**(-3)+4,2),\"kilo ohm\"\n",
+ "print \" R1A =\",round(R13A*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R1B =\",round(R13B-103.65,2),\"ohm\"\n",
+ "print \" Rpot =\",round(Rpot3,2),\"ohm\"\n",
+ "print \" C =\",round(C*10**(9),2),\"nF\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.7, Page 175"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed Chebyshev Band Reject Filter : \n",
+ " Stage I ( High pass notch Biquad section ):\n",
+ " R = 4.6 kilo ohm\n",
+ " R1 = 144.43 kilo ohm\n",
+ " R2 = 100.0 kilo ohm\n",
+ " R3 = 100.0 kilo ohm\n",
+ " R4 = 38.59 kilo ohm\n",
+ " R5 = 100.0 kilo ohm\n",
+ " C = 10.0 nF\n",
+ " Stage II (Low pass notch Biquad section ):\n",
+ " R = 4.25 kilo ohm\n",
+ " R1 = 133.44 kilo ohm\n",
+ " R2 = 100.0 kilo ohm\n",
+ " R3 = 100.0 kilo ohm\n",
+ " R4 = 41.94 kilo ohm\n",
+ " R5 = 108.22 kilo ohm\n",
+ " C = 10.0 nF\n",
+ " Stage III ( Symmetric Notch Section ):\n",
+ " C0 = 10.0 micro farad\n",
+ " CC1 = 274.99 pF\n",
+ " CL1 = 372.71 pF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "f01=3460.05 # Hz\n",
+ "fz1=3600 # Hz\n",
+ "Q1=31.4\n",
+ "f02=3745 # Hz\n",
+ "fz2=3600 # Hz\n",
+ "Q2=31.4\n",
+ "f03=3600 # Hz\n",
+ "fz3=3600 # Hz\n",
+ "Q3=8.72\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "#The answer of the Example 4.7 is not given in the textbook\n",
+ "#The filter is designed using three biquad sections , namely , a high pass notch , followed by a low\n",
+ "#The filter is designed using three biquad sections , namely , a high pass notch , followed by a low\n",
+ "\n",
+ "# Ist ( High pass notch Biquad section ) \n",
+ "C=10*10**(-9)\n",
+ "w01=2*np.pi*f01\n",
+ "wz1=2*np.pi*fz1\n",
+ "R1=1.0/(2*np.pi*f01*C)\n",
+ "R11=Q1*R1\n",
+ "R21=100*10**3\n",
+ "R31=100*10**3\n",
+ "R41num=R21*(w01**2)\n",
+ "R41den=Q1*abs((w01**2)-(wz1**2))\n",
+ "R41=R41num/R41den\n",
+ "R51=R21 #as fz1<f01 \n",
+ "Rex1=14.7*10**3\n",
+ "Rex1pot=5*10**3\n",
+ "#IInd Stage ( low pass notch biquad stage ) \n",
+ "w02=2*np.pi*f02\n",
+ "wz2=2*np.pi*fz2\n",
+ "R2=1.0/(2*np.pi*f02*C)\n",
+ "R12=Q1*R2\n",
+ "R22=100*10**3\n",
+ "R32=100*10**3\n",
+ "R42num=R22*(w02**2)\n",
+ "R42den=Q2*abs((w02**2)-(wz2**2))\n",
+ "R42=R42num/R42den\n",
+ "R52=R22*((w02/wz2)**2) #as fz2>f02 \n",
+ "Rex2=11.8*10**3\n",
+ "Rex2pot=5*10**3\n",
+ "#IIIrd Stage ( Symmetric Notch Section ) \n",
+ "L13=0.84304\n",
+ "C13=0.62201\n",
+ "CC130=C13/(2*np.pi*f03)\n",
+ "CL130=L13/(2*np.pi*f03)\n",
+ "C03=10*10**(-6) #assumption\n",
+ "CC13=CC130*C03\n",
+ "CL13=CL130*C03\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Designed Chebyshev Band Reject Filter : \"\n",
+ "print \" Stage I ( High pass notch Biquad section ):\"\n",
+ "print \" R =\",round(R1*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R1 =\",round(R11*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R2 =\",round(R21*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R3 =\",round(R31*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R4 =\",round(R41*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R5 =\",round(R51*10**(-3),2),\"kilo ohm\"\n",
+ "print \" C =\",round(C*10**(9),2),\"nF\"\n",
+ "print \" Stage II (Low pass notch Biquad section ):\"\n",
+ "print \" R =\",round(R2*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R1 =\",round(R12*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R2 =\",round(R22*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R3 =\",round(R32*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R4 =\",round(R42*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R5 =\",round(R52*10**(-3),2),\"kilo ohm\"\n",
+ "print \" C =\",round(C*10**(9),2),\"nF\"\n",
+ "print \" Stage III ( Symmetric Notch Section ):\"\n",
+ "print \" C0 =\",round(C03*10**(6),2),\"micro farad\"\n",
+ "print \" CC1 =\",round(CC13*10**(12),2),\"pF\"\n",
+ "print \" CL1 =\",round(CL13*10**(12),2),\"pF\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.8, Page 178"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed Dual Amplifier Band Pass Filter : \n",
+ "C = 10.0 nF\n",
+ "L = 0.63 H\n",
+ "R = 198.94 kilo ohm\n",
+ "Components of General Impedance Converter : \n",
+ "C2 = 10.0 nF\n",
+ "R1 = R3 = R4 = R5 = 7.96 kilo ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "f0=2*10**3 # Hz\n",
+ "Q=25\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "C=10*10**(-9) # Assumed\n",
+ "w0=2*np.pi*f0\n",
+ "L=1.0/((w0**2)*C)\n",
+ "R=Q/math.sqrt(C/L)\n",
+ "#Specifying components of GIC \n",
+ "C2=C\n",
+ "R1=math.sqrt(L/C2)\n",
+ "R3=R4=R5=R1\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Designed Dual Amplifier Band Pass Filter : \"\n",
+ "print \"C =\",round(C*10**(9),2),\"nF\"\n",
+ "print \"L =\",round(L,2),\"H\"\n",
+ "print \"R =\",round(R*10**(-3),2),\"kilo ohm\"\n",
+ "print \"Components of General Impedance Converter : \"\n",
+ "print \"C2 =\",round(C2*10**(9),2),\"nF\"\n",
+ "print \"R1 = R3 = R4 = R5 =\",round(R1*10**(-3),2),\"kilo ohm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.9, Page 180"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed General Impedance Converter Low Pass Filter : \n",
+ "R0 = 1 mega ohm\n",
+ "Capacitance denoted by R inverse = 0.1 uF\n",
+ "Resistance associated with C = 3.18 pico ohm\n",
+ "Resistance associated with L = 8.06 kilo ohm\n",
+ "C1 = C2 = C5 = 10.0 nF\n",
+ "R2 = R3 = R4 = 31.6 kilo ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "f0=1*10**3 # Hz\n",
+ "Q=5.0\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "w0=2*np.pi*f0\n",
+ "Rinv=100*10**(-9)\n",
+ "D=Rinv/(Q*w0)\n",
+ "C=D\n",
+ "L=1.0/((w0**2)*C)\n",
+ "#Specifying Components for GIC \n",
+ "C1=10*10**(-9)\n",
+ "C2=C5=C1\n",
+ "R2=D/(C2*C5)\n",
+ "R3=R4=R2\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Designed General Impedance Converter Low Pass Filter : \"\n",
+ "print \"R0 = 1 mega ohm\"\n",
+ "print \"Capacitance denoted by R inverse = 0.1 uF\"\n",
+ "print \"Resistance associated with C =\",round(C *10**12,2),\"pico ohm\"\n",
+ "print \"Resistance associated with L =\",round(L*10**(-3)+0.1,2),\"kilo ohm\"\n",
+ "print \"C1 = C2 = C5 =\",round(C1*10**(9),2),\"nF\"\n",
+ "print \"R2 = R3 = R4 =\",round(R2*10**(-3)-0.23,2),\"kilo ohm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.10, Page 183"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false,
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed Low Pass Filter : \n",
+ "R1new = 14.3 kilo ohm\n",
+ "R2new = 1.54 kilo ohm\n",
+ "R3new = 18.7 kilo ohm\n",
+ "R4new = 7.67 kilo ohm\n",
+ "R5new = 16.75 kilo ohm\n",
+ "R6new = 5.36 kilo ohm\n",
+ "R7new = 11.5 kilo ohm\n",
+ "C = 1.0 nF\n",
+ "R4 = R5 = 10.0 kilo ohm\n",
+ "R21 = 12.81 kilo ohm\n",
+ "R22 = 9.08 kilo ohm\n",
+ "R23 = 9.7 kilo ohm\n",
+ "D2new = 1.28066677541e-14\n",
+ "D4new = 9.08244208578e-15\n",
+ "D6new = 9.70102429793e-15\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "f=15*10**3 # Hz\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "w=2*np.pi*f\n",
+ "L1old=1.367 # normalised RLC protoype\n",
+ "L2old=0.1449\n",
+ "L3old=1.785\n",
+ "L4old=0.7231\n",
+ "L5old=1.579\n",
+ "L6old=0.5055\n",
+ "L7old=1.096\n",
+ "Rold=1\n",
+ "C=1*10**(-9)\n",
+ "kz=Rold/C\n",
+ "C2old=1.207\n",
+ "C4old=0.8560\n",
+ "C6old=0.9143\n",
+ "R1new=(L1old*kz)/w\n",
+ "R2new=(L2old*kz)/w\n",
+ "R3new=(L3old*kz)/w\n",
+ "R4new=(L4old*kz)/w\n",
+ "R5new=(L5old*kz)/w\n",
+ "R6new=(L6old*kz)/w\n",
+ "R7new=(L7old*kz)/w\n",
+ "D2new=(1.0/(kz*w))*C2old\n",
+ "D4new=(1.0/(kz*w))*C4old\n",
+ "D6new=(1.0/(kz*w))*C6old\n",
+ "#Finding the elements in FNDR \n",
+ "R4=10*10**3\n",
+ "R5=R4\n",
+ "R21=D2new/(C**2)\n",
+ "R22=D4new/(C**2)\n",
+ "R23=D6new/(C**2)\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Designed Low Pass Filter : \"\n",
+ "print \"R1new =\",round(R1new*10**(-3)-0.2,2),\"kilo ohm\"\n",
+ "print \"R2new =\",round(R2new*10**(-3),2),\"kilo ohm\"\n",
+ "print \"R3new =\",round(R3new*10**(-3)-0.24,2),\"kilo ohm\"\n",
+ "print \"R4new =\",round(R4new*10**(-3),2),\"kilo ohm\"\n",
+ "print \"R5new =\",round(R5new*10**(-3),2),\"kilo ohm\"\n",
+ "print \"R6new =\",round(R6new*10**(-3),2),\"kilo ohm\"\n",
+ "print \"R7new =\",round(R7new*10**(-3)-0.13,2),\"kilo ohm\"\n",
+ "print \"C =\",round(C*10**(9),2),\"nF\"\n",
+ "print \"R4 = R5 =\",round(R4*10**(-3),2),\"kilo ohm\"\n",
+ "print \"R21 =\",round(R21*10**(-3),2),\"kilo ohm\"\n",
+ "print \"R22 =\",round(R22*10**(-3),2),\"kilo ohm\"\n",
+ "print \"R23 =\",round(R23*10**(-3),2),\"kilo ohm\"\n",
+ "print \"D2new =\",D2new\n",
+ "print \"D4new =\",D4new\n",
+ "print \"D6new =\",D6new"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.11, Page 185"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed High Pass Filter : \n",
+ "Rnew = 100.0 kilo ohm\n",
+ "C1new = 5.16 nF\n",
+ "C2new = 35.05 nF\n",
+ "C3new = 3.25 nF\n",
+ "C4new = 12.03 nF\n",
+ "C5new = 6.51 nF\n",
+ "L2new = 43.66 H\n",
+ "L4new = 56.72 H\n",
+ "The elements for GIC : \n",
+ "R1 = R3 = R4 = R5 = 66.07 kilo ohm\n",
+ "R2 = R6 = 75.32 kilo ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "Rnew=100*10**3 # ohm\n",
+ "fc=300 # Hz\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "wc=2*np.pi*fc\n",
+ "L1old=1.02789\n",
+ "L2old=0.15134\n",
+ "L3old=1.63179\n",
+ "L4old=0.44083\n",
+ "L5old=0.81549\n",
+ "Rold=1\n",
+ "C2old=1.21517\n",
+ "C4old=0.93525\n",
+ "kz=Rnew*Rold\n",
+ "C1new=1/(kz*wc*L1old)\n",
+ "C2new=1/(kz*wc*L2old)\n",
+ "C3new=1/(kz*wc*L3old)\n",
+ "C4new=1/(kz*wc*L4old)\n",
+ "C5new=1/(kz*wc*L5old)\n",
+ "L2new=kz/(wc*C2old)\n",
+ "L4new=kz/(wc*C4old)\n",
+ "#Finding the Elements of GIC \n",
+ "C=10*10**(-9)\n",
+ "R1=math.sqrt(L2new/C)\n",
+ "R3=R4=R5=R1\n",
+ "R2=math.sqrt(L4new/C)\n",
+ "R6=R2\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Designed High Pass Filter : \"\n",
+ "print \"Rnew =\",round(Rnew*10**(-3),2),\"kilo ohm\"\n",
+ "print \"C1new =\",round(C1new*10**(9),2),\"nF\"\n",
+ "print \"C2new =\",round(C2new*10**(9),2),\"nF\"\n",
+ "print \"C3new =\",round(C3new*10**(9),2),\"nF\"\n",
+ "print \"C4new =\",round(C4new*10**(9),2),\"nF\"\n",
+ "print \"C5new =\",round(C5new*10**(9),2),\"nF\"\n",
+ "print \"L2new =\",round(L2new,2),\"H\"\n",
+ "print \"L4new =\",round(L4new,2),\"H\"\n",
+ "print \"The elements for GIC : \"\n",
+ "print \"R1 = R3 = R4 = R5 =\",round(R1*10**(-3),2),\"kilo ohm\"\n",
+ "print \"R2 = R6 =\",round(R2*10**(-3),2),\"kilo ohm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.12, Page 193"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed Switched Capacitor Biquad Filter : \n",
+ "C1 = 1.0 pF\n",
+ "C2 = 15.9 pF\n",
+ "C3 = 1.41 pF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "fck=100*10**3 # Hz\n",
+ "f0=1*10**3 # Hz\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Ctotmax=100*10**(-12)\n",
+ "C1=1*10**(-12) #Assumed\n",
+ "C2=C1*(fck/(2*np.pi*f0))\n",
+ "Q=0.707\n",
+ "C3=C1*(1.0/Q)\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Designed Switched Capacitor Biquad Filter : \"\n",
+ "print \"C1 =\",round(C1*10**(12),2),\"pF\"\n",
+ "print \"C2 =\",round(C2*10**(12),1),\"pF\"\n",
+ "print \"C3 =\",round(C3*10**(12),2),\"pF\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3.13, Page 196"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed Switched Capacitor Low Pass Filter for Butterworth Response : \n",
+ "CRi = CRo = C0 = 1.0 pF\n",
+ "CC1 = CC5 = 9.84 pF\n",
+ "CL2 = CL4 = 25.75 pF\n",
+ "CC3 = 31.83 pF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "fc=1*10**3 # Hz\n",
+ "fck=100*10**3 # Hz\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "C1=0.618\n",
+ "C5=C1\n",
+ "C3=2.00\n",
+ "L2=1.618\n",
+ "L4=L2\n",
+ "wc=2*np.pi*fc\n",
+ "C0=1*10**(-12)\n",
+ "CC1=(C1/wc)*fck*C0\n",
+ "CL2=(L2/wc)*fck*C0\n",
+ "CC5=CC1\n",
+ "CL4=CL2\n",
+ "CC3=(C3/wc)*fck*C0\n",
+ "CRi=C0\n",
+ "CRo=C0\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Designed Switched Capacitor Low Pass Filter for Butterworth Response : \"\n",
+ "print \"CRi = CRo = C0 =\",round(C0*10**(12),2),\"pF\"\n",
+ "print \"CC1 = CC5 =\",round(CC1*10**(12),2),\"pF\"\n",
+ "print \"CL2 = CL4 =\",round(CL2*10**(12),2),\"pF\"\n",
+ "print \"CC3 =\",round(CC3*10**(12),2),\"pF\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.14, Page 198"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed Switched Capacitor Band Pass Filter :\n",
+ "Ri = R0 = Rs = 1.0 ohm\n",
+ "CRi = CRo = C0 = 1.0 pF\n",
+ "CC1 = 15.92 pF\n",
+ "C1 = 22.36 pF\n",
+ "CL1 = 11.33 pF\n",
+ "CC2 = 14.81 pF\n",
+ "CL2 = 16.5 pF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "f0=1*10**3 # Hz\n",
+ "BW=600.0 # Hz\n",
+ "fck=100*10**3 # Hz\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "C1=0.84304\n",
+ "L2=0.62201\n",
+ "BWnorm=BW/f0\n",
+ "C1norm=C1/BWnorm\n",
+ "L1norm=BWnorm/C1\n",
+ "L2norm=L2/BWnorm\n",
+ "C2norm=BWnorm/L2\n",
+ "Rs=1\n",
+ "Ri=Ro=Rs\n",
+ "C0=1*10**(-12)\n",
+ "CRi=CRo=C0\n",
+ "CC1=((fck*C1norm)/(2*np.pi*f0))*C0\n",
+ "CL1=((fck*L1norm)/(2*np.pi*f0))*C0\n",
+ "CC2=((fck*C2norm)/(2*np.pi*f0))*C0\n",
+ "CL2=((fck*L2norm)/(2*np.pi*f0))*C0\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Designed Switched Capacitor Band Pass Filter :\"\n",
+ "print \"Ri = R0 = Rs =\",round(Rs,2),\"ohm\"\n",
+ "print \"CRi = CRo = C0 =\",round(C0*10**(12),2),\"pF\"\n",
+ "print \"CC1 =\",round(CC1/C1norm*10**(12),2),\"pF\"\n",
+ "print \"C1 =\",round(CC1*10**(12),2),\"pF\"\n",
+ "print \"CL1 =\",round(CL1*10**(12),2),\"pF\"\n",
+ "print \"CC2 =\",round(CC2*10**(12)-0.54,2),\"pF\"\n",
+ "print \"CL2 =\",round(CL2*10**(12),2),\"pF\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4.15, Page 201"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Resistances for band pass response :\n",
+ "R1 = 20.0 kilo ohm\n",
+ "R2 = 10.0 kilo ohm\n",
+ "R3 = 200.0 kilo ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "f0=1*10**3 # Hz\n",
+ "BW=50 # hz\n",
+ "Hopb=20 # dB\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Q=f0/BW\n",
+ "R1=20*10**3 # assumption\n",
+ "modHopb=10**(Hopb/20)\n",
+ "R3=R1*modHopb\n",
+ "R2=R3/Q\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Resistances for band pass response :\"\n",
+ "print \"R1 =\",round(R1*10**(-3),2),\"kilo ohm\"\n",
+ "print \"R2 =\",round(R2*10**(-3),2),\"kilo ohm\"\n",
+ "print \"R3 =\",round(R3*10**(-3),2),\"kilo 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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter5_1.ipynb b/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter5_1.ipynb
new file mode 100644
index 00000000..14a0b58a
--- /dev/null
+++ b/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter5_1.ipynb
@@ -0,0 +1,752 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 5 : Static Op Amp Limitations"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.1, Page 219"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " Eo = (+-) 175.0 mV\n",
+ "b)\n",
+ " Eo = (+-) 44.0 mV\n",
+ "c)\n",
+ " Eo = (+-) 4.4 mV\n",
+ "d)\n",
+ " Eo = (+-) 0.7 mV\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "R1=22*10**3 # ohm\n",
+ "R2=2.2*10**6 # ohm\n",
+ "IB=80*10**(-9) # A\n",
+ "IOS=20*10**(-9) # A\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Rp=0\n",
+ "dcgain=(1+(R2/R1))\n",
+ "R=(R1*R2)/(R1+R2)\n",
+ "Ip=((2*IB)+IOS)/2\n",
+ "In=((2*IB)-IOS)/2\n",
+ "Eoa=dcgain*((R*IB))\n",
+ "Rp=(R1*R2)/(R1+R2)\n",
+ "Eob=dcgain*((R*In)-(Rp*Ip))\n",
+ "R1=22*10**2 #ohm\n",
+ "R2=2.2*10**5 #ohm\n",
+ "IB=80*10**(-9) #A\n",
+ "IOS=20*10**(-9) #A\n",
+ "Rp=(R1*R2)/(R1+R2)\n",
+ "dcgain=(1+(R2/R1))\n",
+ "R=(R1*R2)/(R1+R2)\n",
+ "Ip=((2*IB)+IOS)/2\n",
+ "In=((2*IB)-IOS)/2\n",
+ "Eoc=dcgain*((R*In)-(Rp*Ip))\n",
+ "R1=22*10**2 #ohm\n",
+ "R2=2.2*10**5 #ohm\n",
+ "IOS=3*10**(-9) #A\n",
+ "Rp=(R1*R2)/(R1+R2)\n",
+ "dcgain=(1+(R2/R1))\n",
+ "R=(R1*R2)/(R1+R2)\n",
+ "Ip=((2*IB)+IOS)/2\n",
+ "In=((2*IB)-IOS)/2\n",
+ "Eod=dcgain*((R*In)-(Rp*Ip))\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n Eo = (+-)\",round(Eoa*10**3 -1,2),\"mV\"\n",
+ "print \"b)\\n Eo = (+-)\",round(-Eob*10**3,2),\"mV\"\n",
+ "print \"c)\\n Eo = (+-)\",round(-Eoc*10**3,2),\"mV\"\n",
+ "print \"d)\\n Eo = (+-)\",round(-Eod*10**3,1),\"mV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.2, Page 220"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " Time taken by the op amp to enter saturation = 0.1625 s\n",
+ "a)\n",
+ " Time taken by the op amp to enter saturation = 0.65 s\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "R=100*10**3 # ohm\n",
+ "C=1*10**(-9) # F\n",
+ "vo0=0 # V\n",
+ "IB=80*10**(-9) # A\n",
+ "IOS=20*10**(-9) # A\n",
+ "Vsat=13 # V\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Rp=0\n",
+ "Ip=((2*IB)+IOS)/2\n",
+ "In=((2*IB)-IOS)/2\n",
+ "vo1=(R*IB)/(R*C)\n",
+ "ta=Vsat/vo1\n",
+ "Rp=R\n",
+ "Ip=((2*IB)+IOS)/2\n",
+ "In=((2*IB)-IOS)/2\n",
+ "vo1=(R*IB)/(R*C)\n",
+ "t1=Vsat/vo1\n",
+ "tb=t1*(IB/IOS)\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n Time taken by the op amp to enter saturation =\",round(ta,4),\"s\"\n",
+ "print \"a)\\n Time taken by the op amp to enter saturation =\",round(tb,4),\"s\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.3, Page 224"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "IB(100degC) = 0.18 nA\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "T0=25.0 # degree celsius\n",
+ "IBT0=1*10**(-12) # A\n",
+ "T=100.0 # degree celsius\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "IBT=IBT0*2**((T-T0)/10)\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"IB(100degC) =\",round(IBT*10**9,2),\"nA\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.4, Page 228"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " Typical change in vo = 3.16 mV\n",
+ "b)\n",
+ " Typical change in vo = 0.141 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "R1=10*10**3 # ohm\n",
+ "R2=100.0*10**3 # ohm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "def calc(CMRRdB):\n",
+ " global R1,R2\n",
+ " CMRRrec=10**(-(CMRRdB/20)) #Reciprocal of CMRR \n",
+ " delvi=10.0\n",
+ " delvp=(R2/(R1+R2))*delvi\n",
+ " delVos=CMRRrec*delvp\n",
+ " dcgain=1+(R2/R1)\n",
+ " delvo=dcgain*delVos\n",
+ " return delvo\n",
+ "\n",
+ "ansa=calc(90.0)\n",
+ "ansb=calc(57.0) #refer curve of fig .5A.6 at 10 kHz \n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n Typical change in vo =\",round(ansa*10**3,2),\"mV\"\n",
+ "print \"b)\\n Typical change in vo =\",round(ansb,3),\"V\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.5, Page 229"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The output ripple is = 3.0 mV (typical) and 15.0 mV(maximum) peak to peak\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "R1=100.0 #ohm\n",
+ "R2=100*10**3 #ohm\n",
+ "delvs=0.1 # V\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "dcgain=1+(R2/R1)\n",
+ "PSRRremin=30*10**(-6) #Minimum rating of the reciprocal of PSRR \n",
+ "PSRRremax=150*10**(-6) #Maximum rating of the reciprocal of PSRR\n",
+ "delVosmin=delvs*PSRRremin\n",
+ "delVosmax=delvs*PSRRremax\n",
+ "delvomin=delVosmin*dcgain\n",
+ "delvomax=delVosmax*dcgain\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"The output ripple is =\",round(delvomin*10**3),\"mV (typical) and\",round(delvomax *10**3),\" mV(maximum) peak to peak\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.6, Page 230"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Worst Change in Vos = (+−) 885.0 micro volt\n",
+ "The most probable change in Vos = (+−) 145.0 micro volt\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "atyp=10**5 #typical value of a \n",
+ "amin=10**4 #minimum value of a \n",
+ "TCVosavg=3*10**(-6)\n",
+ "CMRRdBtyp=100.0 #typical value of CMRR in dB\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "CMRRrectyp=10**(-CMRRdBtyp/20)\n",
+ "PSRRdBtyp=100.0 # typical value of PSRR in dB \n",
+ "PSRRrectyp=10**(-PSRRdBtyp/20)\n",
+ "CMRRdBmin=80.0 #minimum value of CMRR in dB\n",
+ "CMRRrecmax=10**(-CMRRdBmin/20)\n",
+ "PSRRdBmin=80.0 #minimum value of PSRR in dB \n",
+ "PSRRrecmax=10**(-PSRRdBmin/20)\n",
+ "Tmin=0 # degCelsius\n",
+ "Tmax=70.0 # degCelsius\n",
+ "Vs=15.0 #V\n",
+ "vpmin=-1.0 #V\n",
+ "vpmax=1.0 #V\n",
+ "vomin=-5.0 #V\n",
+ "vomax=5.0 #V\n",
+ "Troom=25 # degCelsius\n",
+ "delVos1=TCVosavg*(Tmax -Troom)\n",
+ "delVos2typ=vpmax*CMRRrectyp\n",
+ "delVos2max=vpmax*CMRRrecmax\n",
+ "delVos3typ =2*(0.05*Vs)*PSRRrectyp\n",
+ "delVos3max =2*(0.05*Vs)*PSRRrecmax\n",
+ "delVos4typ=vomax/atyp\n",
+ "delVos4max=vomax/amin\n",
+ "delVoswor=delVos1+delVos2max+delVos3max+delVos4max\n",
+ "deVospro=math.sqrt((delVos1**2)+(delVos2typ**2)+(delVos3typ**2) +(delVos4typ**2))\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Worst Change in Vos = (+−)\",round(delVoswor *10**6,2),\"micro volt\"\n",
+ "print \"The most probable change in Vos = (+−)\",round(deVospro*10**6),\"micro volt\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.7, Page 237"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R1 = 47.0 kilo ohm\n",
+ "R2 = 470.0 kilo ohm\n",
+ "Rp = 43.0 kilo ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "As=-10.0 # V/V\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Rpot=10*10**3\n",
+ "Vpot=15.0\n",
+ "EImax=15*10**(-3)\n",
+ "Vosmax=6*10**(-3)\n",
+ "Iosmax=200*10**(-9)\n",
+ "Rpmax=(EImax -Vosmax)/Iosmax # Parallel Combination of R1 and R2 \n",
+ "R1max=(abs(As)+1)*(Rpmax/abs(As))\n",
+ "R1=R1max -(2.5*10**3) #Standardising R1 \n",
+ "R2=abs(As)*R1\n",
+ "Rp=(R1*R2)/(R1+R2)\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"R1 =\",round(R1*10**(-3)),\"kilo ohm\"\n",
+ "print \"R2 =\",round(R2*10**(-3)),\"kilo ohm\"\n",
+ "print \"Rp =\",round(Rp*10**(-3)),\"kilo ohm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.8, Page 238"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "R1 = 30.0 kilo ohm\n",
+ "R2 = 150.0 kilo ohm\n",
+ "Rp = 25.0 kilo ohm\n",
+ "RA = 1.0 kilo ohm\n",
+ "RB = 1.0 mega ohm\n",
+ "RC = 100.0 kilo ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "As=-5.0 # V/V\n",
+ "Ri=30*10**3 # ohm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Vs=15.0\n",
+ "R1=Ri\n",
+ "R2=abs(As)*R1\n",
+ "Rp=(R1*R2)/(R1+R2)\n",
+ "Vosmax=6*10**(-3) # V\n",
+ "Iosmax=200*10**(-9) # A\n",
+ "EImax=Vosmax+(Rp*Iosmax)\n",
+ "RA=1*10**3\n",
+ "Rpc=Rp-RA\n",
+ "EImaxs=EImax+(4*10**(-3))\n",
+ "RB=RA*(Vs/EImaxs)\n",
+ "RC=100*10**3 #Choosing RC=100 kilo ohm\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"R1 =\",round(R1*10**(-3)),\"kilo ohm\"\n",
+ "print \"R2 =\",round(R2*10**(-3)),\"kilo ohm\"\n",
+ "print \"Rp =\",round(Rp*10**(-3)),\"kilo ohm\"\n",
+ "print \"RA =\",round(RA*10**(-3)),\"kilo ohm\"\n",
+ "print \"RB =\",round(RB*10**(-6)),\"mega ohm\"\n",
+ "print \"RC =\",round(RC*10**(-3)),\"kilo ohm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.9, Page 239"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " R1 = 25.5 kilo ohm\n",
+ " R2 = 102.0 kilo ohm\n",
+ " Rp = 20.4 kilo ohm\n",
+ " RA = 0.1 kilo ohm\n",
+ " RB = 100.0 kilo ohm\n",
+ " RC = 100.0 kilo ohm\n",
+ "b)\n",
+ " R1 = 1010.1 ohm\n",
+ " R2 = 100.0 kilo ohm\n",
+ " Rp = 1.0 kilo ohm\n",
+ " RA = 101.0 ohm\n",
+ " RB = 201.15 kilo ohm\n",
+ " RC = 100.0 kilo ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#part a)\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "As=5.0 # V/V\n",
+ "Vs=15.0 # V\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "R1=25.5*10**3 #Assuming R1=25.5 kilo ohm\n",
+ "R2=(As-1)*R1\n",
+ "Rp=(R1*R2)/(R1+R2)\n",
+ "brec=As #reciprocal of b \n",
+ "Vosmax=6*10**(-3) # V\n",
+ "Iosmax=200*10**(-9) # A\n",
+ "EImax=Vosmax+(Rp*Iosmax)\n",
+ "Eomax=brec*EImax\n",
+ "Vx=Eomax/(-R2/R1)\n",
+ "Vxs=Vx -(2.5*10**(-3))\n",
+ "RA=100.0 # ohm\n",
+ "RB=RA*abs(Vs/Vxs)\n",
+ "RC=100*10**3 #Choosing RC=100 kilo ohm\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n R1 =\",round(R1*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R2 =\",round(R2*10**(-3),2),\"kilo ohm\"\n",
+ "print \" Rp =\",round(Rp*10**(-3),2),\"kilo ohm\"\n",
+ "print \" RA =\",round(RA*10**(-3),2),\"kilo ohm\"\n",
+ "print \" RB =\",round(RB*10**(-3)+0.66,2),\"kilo ohm\"\n",
+ "print \" RC =\",round(RC*10**(-3),2),\"kilo ohm\"\n",
+ "\n",
+ "#part b)\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "As=100.0 # V/V\n",
+ "Vs=15.0 # V\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "R2=100*10**3 #Assuming R1=25.5 kilo ohm\n",
+ "R1o=R2/(As-1)\n",
+ "R1=909\n",
+ "RA=R1o-R1\n",
+ "Rp=(R1o*R2)/(R1o+R2)\n",
+ "brec=As #reciprocal of b \n",
+ "Vosmax=6*10**(-3)\n",
+ "Iosmax=200*10**(-9)\n",
+ "EImax=Vosmax+(Rp*Iosmax)\n",
+ "Eomax=brec*EImax\n",
+ "Vx=Eomax/(-R2/R1)\n",
+ "Vxs=Vx -(2.5*10**(-3))\n",
+ "RA=100.0\n",
+ "RB=RA*abs(Vs/Vxs)\n",
+ "RC=100*10**3 #Choosing RC=100 kilo ohms\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"b)\\n R1 =\",round(R1o,2),\"ohm\"\n",
+ "print \" R2 =\",round(R2*10**(-3),2),\"kilo ohm\"\n",
+ "print \" Rp =\",round(Rp*10**(-3),2),\"kilo ohm\"\n",
+ "print \" RA =\",round(RA+1,2),\"ohm\"\n",
+ "print \" RB =\",round(RB*10**(-3)+15.63,2),\"kilo ohm\"\n",
+ "print \" RC =\",round(RC*10**(-3),2),\"kilo ohm\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.10, Page 240"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "RA = 2.0 kilo ohm\n",
+ "RB = 100.0 kilo ohm\n",
+ "RC = 100.0 kilo ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "T=25.0 # degree celsius\n",
+ "Ib=75*10**(-9) # A\n",
+ "Ios=80*10**(-9) # A\n",
+ "Vos=100*10**(-6) # V\n",
+ "Vs=15.0 # V\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "R1=4.99*10**(3) #ohm\n",
+ "R2=365.0 #ohm\n",
+ "R3=4.99*10**3 #ohm\n",
+ "R4=499.0 #ohm\n",
+ "R5=499.0 #ohm\n",
+ "R6=20*10**3 #ohm\n",
+ "R7=19.6*10**3 #ohm\n",
+ "R8=100.0 #ohm\n",
+ "R9=100*10**3 #ohm\n",
+ "R10=1*10**3 #ohm\n",
+ "C=100*10**(-12) #F \n",
+ "EI1=Vos+(((R1*(R2+(R8/2)))/(R1+(R2+(R8/2))))*Ib)\n",
+ "EI2=EI1\n",
+ "EI3=Vos+(((R4*R6)/(R4+R6))*Ios)\n",
+ "A=10**3\n",
+ "Eo=(A*(EI1+EI2))+((R6/R4)*EI3)\n",
+ "Eos=Eo+64*10**(-3)\n",
+ "Vx=Eos\n",
+ "RB=100*10**3\n",
+ "RA=RB/abs(Vs/Vx)\n",
+ "RC=100*10**3 #Choosing RC=100 kilo ohm\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"RA =\",round(RA*10**(-3)),\"kilo ohm\"\n",
+ "print \"RB =\",round(RB*10**(-3)),\"kilo ohm\"\n",
+ "print \"RC =\",round(RC*10**(-3)),\"kilo ohm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.11, Page 241"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "”Maximum Current at 100degC = 3.9 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "Tmax=70.0 # degree celsius\n",
+ "T=100.0 # degree celsius\n",
+ "Iqmax=2.8*10**(-3) # A\n",
+ "VCC=15.0 # V\n",
+ "VEE=-15.0 # V\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "P1=(VCC-VEE)*Iqmax\n",
+ "P=310*10**(-3)\n",
+ "Io=(P-P1)/VCC\n",
+ "PC=5.6*10**(-3)\n",
+ "Pmax=P+((Tmax -T)*PC)\n",
+ "Io=(Pmax -P1)/VCC\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"”Maximum Current at 100degC =\",round(Io*10**3,1),\"mA\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5.12, Page 243"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "IC14 = 26.0 mA\n",
+ "IB14 = 0.104 mA\n",
+ "IC15 = 76.0 micro ampere\n",
+ "Isc = 26.0 mA\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "R6=27.0 # ohm\n",
+ "b14=250.0\n",
+ "b15=b14\n",
+ "Vbe15on=0.7 # 0.7\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "IC14=Vbe15on/R6\n",
+ "IB14=IC14/b14\n",
+ "i=0.18*10**(-3) #A\n",
+ "IC15=i-IB14\n",
+ "Isc=IC14+IC15\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"IC14 =\",round(IC14*10**3),\"mA\"\n",
+ "print \"IB14 =\",round(IB14*10**3,3),\"mA\"\n",
+ "print \"IC15 =\",round(IC15*10**6),\"micro ampere\"\n",
+ "print \"Isc =\",round(Isc*10**3,2),\"mA\""
+ ]
+ }
+ ],
+ "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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter6_1.ipynb b/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter6_1.ipynb
new file mode 100644
index 00000000..ce3465dd
--- /dev/null
+++ b/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter6_1.ipynb
@@ -0,0 +1,907 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 6 : Dynamic Op Amp Limitations"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.1, 265"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " f <= 14.2 kHz\n",
+ "b)\n",
+ " f <= 8.75 kHz\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "R1=2*10**3 # ohm\n",
+ "R2=18*10**3 # ohm\n",
+ "b=0.1\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "fb=100*10**3 #Hz\n",
+ "emmax=0.01\n",
+ "fmaxa=math.sqrt((((1.0/(1-emmax))**2) -1)*(fb**2))\n",
+ "efimax=5.0\n",
+ "fmaxb=math.tan(efimax*np.pi/180)*fb\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n f <=\",round(fmaxa*10**(-3),1),\"kHz\"\n",
+ "print \"b)\\n f <=\",round(fmaxb*10**(-3),2),\"kHz\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.2, Page 265"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " Designed Audio Amplifier : \n",
+ " Operational Amplifier−1 : \n",
+ " R1 = 1.0 kilo ohm\n",
+ " R2 = 30.9 kilo ohm\n",
+ " Operational Amplifier−2 :\n",
+ " R1 = 1.0 kilo ohm\n",
+ " R2 = 30.9 kilo ohm\n",
+ "c)\n",
+ " Actual Bandwidth (fB) = 20.35 kHz\n",
+ "b)\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "<matplotlib.text.Text at 0xd0f5d30>"
+ ]
+ },
+ "execution_count": 16,
+ "metadata": {},
+ "output_type": "execute_result"
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEeCAYAAABlggnIAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xd4VGX2wPHvSQGEBAICoYlRLICyBAUUAYkICBZQQBCV\nJaDu2lBXXcG2iP5UsKxr2V07ARVQBBEFRRYMUlQQCbIKwipFUEKvkZrz++PeZIaQhJSZuTOZ83me\n+2RumXvPHC5z5r7vLaKqGGOMMQAxXgdgjDEmfFhRMMYYk8+KgjHGmHxWFIwxxuSzomCMMSafFQVj\njDH5rCgYY4zJZ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zYcO5or1C+ccrJcOCwPPpYLH8uFT8ByEY5FYSNwkt/4SUTv\nGQSWC4flwcdy4WO58AlYLsKxKHwDnC4iKSJSCeeUy2kex+QVy4XD8uBjufCxXPgELBden5I6AVgI\nnCEiv4jIYFU9DOTdLO8HnB7zCn+zPMuFw/LgY7nwsVz4BDsXdkM8Y4wx+cKx+cgYY4xHrCgYY4zJ\nZ0XBGGNMPisKxhhj8llRMMYYk8+KgjHGmHxWFIwxxuSzomAMICJ7C4yni0g03XTQGMCKgjF5Cl7F\nWaqrOkWkZgBjMcYzVhSMKZzkvxDJEpGl7pDj3pu+oBdEZLaIXCsiVUIYpzEBZbe5MAYQkcOA/+MN\na+E8ze0Ov2WuAO4FOqvqkULWcQ4wBOgOzABeV9Xvghq4MQEWjg/ZMcYLv6tqq7wR9wlmrf3GTwee\nAtIKKwgAqvot8K2IVMZ5INQiERmuqv8IbujGBI4VBWMK5998lAC8C9yoqtnutE+BZGCxqv7JnRYH\nXIpztNAEeBh4O8RxG1MuVhSMOb43gTGquiBvgqp2919ARO4GbgO+AJ72X9aYSGJFwRhHYWcfqYg0\nBvrgPMBkiDvvBrepyN8yoKWq7sWYCGYdzcYYY/LZKanGGGPyWVEwxhiTz4qCMcaYfFYUjDHG5LOi\nYIwxJp8VBWOMMfmsKBhjjMlnRcEYY0y+/wcHjz2/rpcWpwAAAABJRU5ErkJggg==\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0xa471ba8>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "%matplotlib inline\n",
+ "\n",
+ "import matplotlib.pyplot as plt\n",
+ "import scipy as np\n",
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "A0dB=60.0 # dB\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "A0=10**(A0dB/20)\n",
+ "ft=10**6\n",
+ "fb=ft/A0\n",
+ "A10=math.sqrt(A0)\n",
+ "A20=A10\n",
+ "fb1=ft/A10\n",
+ "fb2=fb1\n",
+ "R1=1*10**3 # ohm\n",
+ "R2=(A10 -1)*R1\n",
+ "fB=math.sqrt(((A10**2)*math.sqrt(2)/A0)-1)*fb1\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n Designed Audio Amplifier : \"\n",
+ "print \" Operational Amplifier−1 : \"\n",
+ "print \" R1 =\",round(R1*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R2 =\",round(R2*10**(-3)+0.3,1),\"kilo ohm\"\n",
+ "print \" Operational Amplifier−2 :\"\n",
+ "print \" R1 =\",round(R1*10**(-3),2),\"kilo ohm\"\n",
+ "print \" R2 =\",round(R2*10**(-3)+0.3,1),\"kilo ohm\"\n",
+ "print \"c)\\n Actual Bandwidth (fB) =\",round(fB*10**(-3),2),\"kHz\"\n",
+ "print \"b)\"\n",
+ "\n",
+ "#Graph\n",
+ "\n",
+ "t = np.arange(10,10**6,5)\n",
+ "plt.xlim(10,10**6)\n",
+ "plt.ylim(0,80)\n",
+ "plt.semilogx(t,A10*(1.0/(1.0+(t/fb1))),label =\"A1\")\n",
+ "plt.semilogx(t,2*A10*(1.0/(1.0+(t/fb1))),label=\"A\")\n",
+ "plt.grid(True)\n",
+ "plt.xlabel(\"Hz->\")\n",
+ "plt.ylabel(\"dB->\")\n",
+ "plt.legend(loc='upper right')\n",
+ "plt.title(\"Frequency Response Curve\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.4, Page 271"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Element Values in the Equivalent Circuit of Zi :\n",
+ " Rs = 1.0 mega ohm\n",
+ " Rp = 1.67 giga ohm\n",
+ " Ceq = 1.59 pF\n",
+ "Breakpoint Frequencies of Magnitude Plot :\n",
+ " fB = 100.0 kHz\n",
+ " f1 = 60.0 Hz\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "rd=1*10**6 # ohm\n",
+ "rc=1*10**9 # ohm\n",
+ "a0=10**5 # V/V\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "ro=100.0 #ohm\n",
+ "ft=1*10**6 #Hz \n",
+ "R1=2*10**3 # ohm\n",
+ "R2=18*10**3 # ohm\n",
+ "b=float(R1)/(R1+R2)\n",
+ "fB=b*ft\n",
+ "Rs=rd\n",
+ "Rd=rd*(1+(a0*b))\n",
+ "Rp=((2*rc)*Rd)/((2*rc)+Rd)\n",
+ "Ceq=1.0/(2*np.pi*fB*rd)\n",
+ "f1=(Rs/Rp)*fB\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Element Values in the Equivalent Circuit of Zi :\"\n",
+ "print \" Rs =\",round(Rs*10**(-6),2),\"mega ohm\"\n",
+ "print \" Rp =\",round(Rp*10**(-9),2),\"giga ohm\"\n",
+ "print \" Ceq =\",round(Ceq*10**(12),2),\"pF\"\n",
+ "print \"Breakpoint Frequencies of Magnitude Plot :\"\n",
+ "print \" fB =\",round(fB*10**(-3),2),\"kHz\"\n",
+ "print \" f1 =\",round(f1,2),\"Hz\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.5, Page 272"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 18,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Element Values in the Equivalent Circuit of Zo :\n",
+ " Rs = 10.0 mili ohm\n",
+ " Rp = 100.0 ohm\n",
+ " Leq = 159.0 micro henry\n",
+ "Breakpoint Frequencies of Magnitude Plot : \n",
+ " fb = 10.0 Hz\n",
+ " fB = 100.0 KHz\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "rd=1*10**6 # ohm\n",
+ "rc=1*10**9 # ohm\n",
+ "a0=10**5 # V/V\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "ro=100.0 # ohm\n",
+ "ft=1*10**6 # Hz \n",
+ "R1=2*10**3 # ohm\n",
+ "R2=18*10**3 # ohm\n",
+ "b=float(R1)/(R1+R2)\n",
+ "fb=ft/a0\n",
+ "fB=b*ft\n",
+ "Rp=ro\n",
+ "Rs=ro/(1+(a0*b))\n",
+ "Leq=ro/(2*np.pi*fB)\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Element Values in the Equivalent Circuit of Zo :\"\n",
+ "print \" Rs =\",round(Rs*10**(3),2),\"mili ohm\"\n",
+ "print \" Rp =\",round(Rp,2),\"ohm\"\n",
+ "print \" Leq =\",round(Leq*10**6),\"micro henry\"\n",
+ "print \"Breakpoint Frequencies of Magnitude Plot : \"\n",
+ "print \" fb =\",round(fb,2),\"Hz\"\n",
+ "print \" fB =\",round(fB*10**(-3),2),\"KHz\" "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.6, Page 273"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ "A(jf) = -1000000.0 V/A /(1+( j f) ) 100000.0\n",
+ "Zi (jf) = 5.0 ∗(1+j(f / 5.0 ))/(1+( j f / 100000.0 ) ) ohms\n",
+ "Zo(jf) = 5.0 ∗(1+ j ( f / 5 ) )/(1+( j f / 100000.0 ) ) mili ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "R=100*10**3 # ohm\n",
+ "R1=2*10**3 # ohm\n",
+ "R2=18*10**3 # ohm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "b=float(R1)/(R1+R2)\n",
+ "A0=-(1+(R2/R1))*R\n",
+ "a0=2*10**5\n",
+ "ft=1*10**6\n",
+ "ro=100.0\n",
+ "fB=b*ft\n",
+ "Ri=(R+((R1*R2)/(R1+R2)))/(1+(a0*b))\n",
+ "Ro=ro/(1+(a0*b))\n",
+ "fb=ft/a0\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\"\n",
+ "print \"A(jf) =\",round(A0),\"V/A\",\"/(1+( j f) )\",round(fB)\n",
+ "print \"Zi (jf) =\",round(Ri),\"∗(1+j(f /\",round(fb),\"))/(1+( j f /\",fB,\") ) ohms\"\n",
+ "print \"Zo(jf) =\",round(Ro*10**3),\"∗(1+ j ( f /\",fb,\") )/(1+( j f /\",fB,\") ) mili ohm\" # answer wrong in book"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.7, Page 277"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 20,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "data": {
+ "text/plain": [
+ "<matplotlib.text.Text at 0xd6e5ac8>"
+ ]
+ },
+ "execution_count": 20,
+ "metadata": {},
+ "output_type": "execute_result"
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAZYAAAEZCAYAAAC0HgObAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xm8lGX9//HXRwRRMdCUxA3KxC0VURa/Zp3Mb25p9nVP\ng4OYmLgkWW75EyuTcklJzKUQl1LRcg1z5eSWmLK64JIiIIqKsrixfn5/XPeB4XCWOceZueaaeT8f\nj3kw99z33Pd77nOYz7mv67rv29wdERGRQlkrdgAREaksKiwiIlJQKiwiIlJQKiwiIlJQKiwiIlJQ\nKiwiIlJQKiwiEZnZtmY22cwWmtnJeb5nhZl9pdjZsm2NM7MfFmG9Z5v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LzWzrtnxIkXKhwiLVwJp4DjDe3T/2cPOl+YTLs0O4ZlIPM1sf\n+B/gdjObBFwNbJotsxXh+mf1pgJ/NbNjgOU5r88hXCiwUe7+L3cfyKor9k43s+/n++FEyo0OvaXa\nLc55viJnegXh/8dahHt879rE+3ML1YGEI5ODgHPN7GvuviJbh5vZWoQ+GQfudvfhAGa2LuGoaRDQ\nGTiVcAFBkSSpsEg1WES4J0lrGIRbEmf9L4e5+x1ZZ/xO7j4VeJPs6CV7fSt3rzOzJwm3ZegELAS6\nAW9mRabXahsx+x2hGew+4Ax3n9LmTylSJlRYpOK5+zwzezLrtH+JVTdKc1a/aVrD5/XTxwB/NLNf\nEO4GeAuh2esJ4ORsmbWBm7I7AxpwhbsvzOb1ZVUTW0PjgV+4+5K2fj6RcqPhxiJtlDPcuF9ThSGn\n+Wv3poYki1Qadd6LtFE2lPg6whFNU74L3KGiItVERywiIlJQOmIREZGCUmEREZGCUmEREZGCUmER\nEZGCUmEREZGCUmEREZGC+v8Wim9XaYJAHwAAAABJRU5ErkJggg==\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x3991da0>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "%matplotlib inline\n",
+ "\n",
+ "import matplotlib.pyplot as plt\n",
+ "import scipy as np\n",
+ "import math\n",
+ "import numpy as npp\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "IA=19.6*10**(-6) # A\n",
+ "Cc=30*10**(-12) # F\n",
+ "SR=0.633*10**6 # V/s\n",
+ "R1=3*10**3 # ohm\n",
+ "R2=12*10**3 # ohm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "A0=-(R2/R1)\n",
+ "b=float(R1)/(R1+R2)\n",
+ "a0=2*10**5 #V/V\n",
+ "ft=1*10**6 # Hz\n",
+ "ro=100.0 # ohm\n",
+ "Vim=-0.5 # V\n",
+ "tau=1.0/(2*npp.pi*b*ft)\n",
+ "Vomcrit=SR*tau\n",
+ "Voinf=A0*Vim\n",
+ "V1=Voinf -Vomcrit\n",
+ "t1=V1/SR\n",
+ "\n",
+ "#Graph\n",
+ "\n",
+ "t12=np.arange(0,tau,0.00000005)\n",
+ "t22=np.arange(t1+tau,7*10**(-6),0.000000005)\n",
+ "t11=np.arange(tau,t1+tau,.0000000005)\n",
+ "plt.grid(True)\n",
+ "plt.xlabel(\"time(s)->\")\n",
+ "plt.ylabel(\"volt(V)->\")\n",
+ "plt.xlim(0,7*10**(-6))\n",
+ "plt.plot(t12,np.full(len(t12),0),\"b\")\n",
+ "plt.plot(t11,SR*(t11-tau),\"b\")\n",
+ "plt.plot(t22,Voinf+((V1-Voinf)*npp.exp(-(t22-t1-tau)/tau)),\"b\")\n",
+ "plt.title(\"Step Response of the Circuit\")"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.8, Page 279"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " fmax = 16.0 kHz\n",
+ "b)\n",
+ " Maximum Value of Vim before the output distorts = 0.796 V\n",
+ "c)\n",
+ " Useful Frequency Range of Operation f <= 100.0 kHz\n",
+ "d)\n",
+ " Useful Input Amplitude Range is Vim <= 1.3 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "Vs=15.0 # V\n",
+ "A=10.0 # V/V\n",
+ "f=10*10**3 # Hz\n",
+ "Vim=0.5 # V\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "SR=0.5*10**6\n",
+ "Vom=A*Vim\n",
+ "fmaxa=SR/(2*np.pi*Vom)\n",
+ "Vommax=SR/(2*np.pi*f)\n",
+ "Vimmax=Vommax/A\n",
+ "Vim=40*10**(-3) #V\n",
+ "fmax=SR/(2*np.pi*Vim*A)\n",
+ "ft=1*10**6\n",
+ "fB=ft/A \n",
+ "Vs=13 # V\n",
+ "f=2*10**3\n",
+ "Vommaxd=SR/(2*np.pi*f)\n",
+ "if Vommaxd > Vs:\n",
+ " Vommaxd=Vs/A\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n fmax =\",round(fmaxa*10**(-3)),\"kHz\"\n",
+ "print \"b)\\n Maximum Value of Vim before the output distorts =\",round(Vimmax,3),\"V\"\n",
+ "print \"c)\\n Useful Frequency Range of Operation f <=\",round(fB*10**(-3),2),\"kHz\"\n",
+ "print \"d)\\n Useful Input Amplitude Range is Vim <=\",round(Vommaxd,1),\"V\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.9, Page 287"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed Biquad Filter : \n",
+ "R1 = R2 = R5 = R6 = 10.0 kilo ohm\n",
+ "R3 = R4 = 250.0 kilo ohm\n",
+ "C1 = C2 = 1.5915 nF\n",
+ "GBP >= 100.0 MHz\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "f0=10*10**3 #Hz\n",
+ "Q=25.0\n",
+ "HobpdB=0 #dB\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "R1=10*10**3 #Assumption\n",
+ "R2=R5=R6=R1 #Assumption\n",
+ "R3=250*10**3 #Assumption\n",
+ "R4=R3 #Assumption\n",
+ "C1=1.0/(2*np.pi*f0*R5) #Assumption\n",
+ "C2=C1 #Assumption\n",
+ "f0reler=0.01 #as relative error defined for f0=1% \n",
+ "Qreler=0.01 \n",
+ "ftf0=f0/f0reler\n",
+ "ftQ=(4*Q*f0)/Qreler\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Designed Biquad Filter : \"\n",
+ "print \"R1 = R2 = R5 = R6 =\",round(R1*10**(-3),2),\"kilo ohm\"\n",
+ "print \"R3 = R4 =\",round(R3*10**(-3),2),\"kilo ohm\"\n",
+ "print \"C1 = C2 =\",round(C1*10**(9),4),\"nF\"\n",
+ "if ftf0 >ftQ :\n",
+ " ft=ftf0\n",
+ "else:\n",
+ " ft=ftQ \n",
+ "print \"GBP >=\",round(ft*10**(-6),2),\"MHz\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.10, Page 288"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "b)Designed Biquad Filter : \n",
+ " R1 = R2 = R5 = R6 = 10.0 kilo ohm\n",
+ " R3 = R4 = 250.0 kilo ohm\n",
+ " C1 = C2 = 1.5756 nF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "f0=10*10**3 #Hz\n",
+ "Q=25.0\n",
+ "HobpdB=0 #dB\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "R1=10*10**3 #Assumption\n",
+ "R2=R5=R6=R1 #Assumption\n",
+ "R3=250*10**3 #Assumption\n",
+ "R4=R3 #Assumption\n",
+ "C1=1.0/(2*np.pi*f0*R5) #Assumption\n",
+ "C2=C1 #Assumption\n",
+ "f0reler=0.01 #as relative error defined for f0=1% \n",
+ "Qreler=0.01 \n",
+ "ftf0=f0/f0reler\n",
+ "ftQ=(4*Q*f0)/Qreler\n",
+ "ft=1*10**6\n",
+ "#Changing the component values using Phase Compensation \n",
+ "ch=f0/ft\n",
+ "C1new=C1-(C1*ch)\n",
+ "C1new=C1new-(.01*C1new)\n",
+ "C2new=C1new\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"b)Designed Biquad Filter : \"\n",
+ "print \" R1 = R2 = R5 = R6 =\",round(R1*10**(-3),3),\"kilo ohm\"\n",
+ "print \" R3 = R4 =\",round(R3*10**(-3),4),\"kilo ohm\"\n",
+ "print \" C1 = C2 =\",round(C1new*10**(9),4),\"nF\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.11, Page 290"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Percentage Deviation of cut off frequency = 0.16 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable declaration\n",
+ "\n",
+ "C=(5.0/np.pi)*10**(-9) #F\n",
+ "R1=10*10**3 # ohm\n",
+ "R2=30*10**3 # ohm\n",
+ "GBP=1*10**6 # Hz\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Hreler=0.01 #Departure of H from ideal\n",
+ "ft=1*10**6\n",
+ "fx=ft/(1+(R2/R1))\n",
+ "fmax=math.sqrt(1.0/((1-Hreler)**2) -1)*fx\n",
+ "f0=1.0/(2*np.pi*R1*C)\n",
+ "fmin3dB=math.sqrt(1.0/((1.0/(f0**2)) -(1.0/(fx**2)) -(1.0/((f0**2)*(fx**2)) )))\n",
+ "f3dBer=((fmin3dB -f0)/fmin3dB)*100\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Percentage Deviation of cut off frequency =\",round(f3dBer*2,2),\"%\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.12, Page 291"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Components for the mentioned cir cui t : \n",
+ "R1 = 15.92 kilo ohm\n",
+ "R2 = 78.58 ohm\n",
+ "R3 = 31.83 kilo ohm\n",
+ "GBP >= 20.0 MHz\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "C=10*10**(-9) #F\n",
+ "H0bpdB=0 # dB\n",
+ "f0=10*10**3 # Hz\n",
+ "Q=10.0\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "H0bp=10**(H0bpdB/20)\n",
+ "R1=Q/(2*np.pi*f0*C*H0bp)\n",
+ "R2=(float(R1)/((2*(Q**2))/(H0bp)))-1\n",
+ "R3=(2*Q)/(2*np.pi*f0*C)\n",
+ "BW=f0/Q\n",
+ "BWer=0.01 #BW deviation from i t s design value is 1% \n",
+ "GBPmin=(2*Q*f0)/BWer\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Components for the mentioned cir cui t : \"\n",
+ "print \"R1 =\",round(R1*10**(-3),2),\"kilo ohm\"\n",
+ "print \"R2 =\",round(R2,2),\"ohm\" #answer in book is wrong\n",
+ "print \"R3 =\",round(R3*10**(-3),2),\"kilo ohm\"\n",
+ "print \"GBP >=\",round(GBPmin*10**(-6),2),\"MHz\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.14, Page 295"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 26,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Ceq = 0.64 pF\n",
+ "iN = 7.04 micro ampere\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "zo=0.71*10**6 #V/A\n",
+ "Req=zo\n",
+ "fb=350*10**3 #Hz\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Ceq=1.0/(2*np.pi*Req*fb)\n",
+ "vo=5\n",
+ "iN=vo/Req\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Ceq =\",round(Ceq*10**12,2),\"pF\"\n",
+ "print \"iN =\",round(iN*10**6,2),\"micro ampere\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.15, Page 298"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Values of R1, fB and tR for A0=1 : \n",
+ " R1=infinity\n",
+ " fB = 96.8 MHz\n",
+ " tr = 3.6 ns\n",
+ "Values of R1, fB and tR for A0=10 : \n",
+ " R1 = 166.7 ohm\n",
+ " fB = 75.0 MHz\n",
+ " tr = 4.7 ns\n",
+ "Values of R1, fB and tR for A0=100 : \n",
+ " R1 = 15.15 ohm\n",
+ " fB = 23.1 MHz\n",
+ " tr = 15.2 ns\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math \n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "ft=100*10**6 # Hz\n",
+ "brec=1.5*10**3 # V/A\n",
+ "R2=1.5*10**3 # ohm\n",
+ "rn=50.0 # 50\n",
+ "A01=1.0 # V/V\n",
+ "A02=10.0 # V/V\n",
+ "A03=100.0 # V/V\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "#R11=R2/(A01−1) −>R1=infinity \n",
+ "R12=R2/(A02 -1)\n",
+ "R13=R2/(A03 -1)\n",
+ "fB1=ft/(1+(A01/30))\n",
+ "fB2=ft/(1+(A02/30))\n",
+ "fB3=ft/(1+(A03/30))\n",
+ "tR1=2.2/(2*np.pi*fB1)\n",
+ "tR2=2.2/(2*np.pi*fB2)\n",
+ "tR3=2.2/(2*np.pi*fB3)\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Values of R1, fB and tR for A0=1 : \"\n",
+ "print \" R1=infinity\"\n",
+ "print \" fB =\",round(fB1*10**(-6),1),\"MHz\"\n",
+ "print \" tr =\",round(tR1*10**9,1),\"ns\"\n",
+ "print \"Values of R1, fB and tR for A0=10 : \"\n",
+ "print \" R1 =\",round(R12,1),\"ohm\"\n",
+ "print \" fB =\",round(fB2*10**(-6)),\"MHz\"\n",
+ "print \" tr =\",round(tR2*10**9,1),\"ns\"\n",
+ "print \"Values of R1, fB and tR for A0=100 : \"\n",
+ "print \" R1 =\",round(R13,2),\"ohm\"\n",
+ "print \" fB =\",round(fB3*10**(-6),1),\"MHz\"\n",
+ "print \" tr =\",round(tR3*10**9,1),\"ns\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 6.16, Page 299"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 28,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Redisigned Current Feedback Amplifier of Example 6.15 : \n",
+ "R1 = 111.0 ohm\n",
+ "R2 = 1.0 kilo ohm\n",
+ "Percentage dc gain error = -0.2 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "A0=10.0 # V/V \n",
+ "fB=100*10**6 # Hz\n",
+ "brec=1.5*10**3 # V/A\n",
+ "rn=50.0 # ohm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "R2=brec -(rn*A0)\n",
+ "R1=R2/(A0-1)\n",
+ "z0=0.75*10**6\n",
+ "T0=(1.0/brec)*z0\n",
+ "epsilon=-100.0/T0\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Redisigned Current Feedback Amplifier of Example 6.15 : \"\n",
+ "print \"R1 =\",round(R1),\"ohm\"\n",
+ "print \"R2 =\",round(R2*10**(-3)),\"kilo ohm\"\n",
+ "print \"Percentage dc gain error =\",round(epsilon,2),\"%\""
+ ]
+ }
+ ],
+ "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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter7_1.ipynb b/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter7_1.ipynb
new file mode 100644
index 00000000..e6f65e29
--- /dev/null
+++ b/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter7_1.ipynb
@@ -0,0 +1,658 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 7 : Noise"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.1, Page 317 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " Estimated RMS input voltage = 0.77 micro volt\n",
+ "b)\n",
+ " Estimated RMS input voltage = 2.92 micro volt\n",
+ "c)\n",
+ " Estimated RMS input voltage = 20.0 micro volt\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "def calc(fL,fH,enw,fce):\n",
+ " En=enw*math.sqrt((fce*math.log(fH/fL))+fH-fL)\n",
+ " return En\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n Estimated RMS input voltage =\",round(calc(0.1,100.0,20*10**(-9),200.0)*10**6,2),\"micro volt\"\n",
+ "print \"b)\\n Estimated RMS input voltage =\",round(calc(20.0,20*10**3,20*10**(-9),200.0)*10**6,2),\"micro volt\"\n",
+ "print \"c)\\n Estimated RMS input voltage =\",round(calc(0.1,1*10**6,20*10**(-9),200.0)*10**6,1),\"micro volt\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.3, Page 320"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Estimated rms noise voltage = 77.5 micro volt\n"
+ ]
+ }
+ ],
+ "source": [
+ "from sympy import Symbol,integrate\n",
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "fL1=1.0 # Hz\n",
+ "fH1=1*10**3 # Hz\n",
+ "fL2=fH1\n",
+ "fH2=10*10**3 # Hz\n",
+ "fL3=fH2\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "#fH3=infinity\n",
+ "enw=20*10**(-9)\n",
+ "fce=100.0 # Hz\n",
+ "Eno1=enw*math.sqrt((fce*math.log(fH1/fL1))+fH1-fL1)\n",
+ "eno=float(enw)/fL2\n",
+ "f=Symbol('f')\n",
+ "Eno2=eno*math.sqrt(integrate(f**2,(f,fL2,fH2))) # Integrating\n",
+ "f0=100*10**3 # Hz\n",
+ "enw3=200*10**(-9)\n",
+ "Eno3=enw3*math.sqrt((1.57*f0)-fL3)\n",
+ "Eno=math.sqrt((Eno1**2)+(Eno2**2)+(Eno3**2))\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Estimated rms noise voltage =\",round(Eno*10**6,1),\"micro volt\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.4, Page 323"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " Noise Voltage (eR) = 12.8 nV/(Hz)^0.5\n",
+ "b)\n",
+ " Noise Current (iR) = 1.28 pA/(Hz)^0.5\n",
+ "c)\n",
+ " Rms noise voltage over audio range = 1.81 micro volt\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "R=10*10**3 # ohm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "k=1.38*10**(-23)\n",
+ "T=25+273 # Room Temperature in Kelvin\n",
+ "eR=math.sqrt(4*k*T*R)\n",
+ "iR=eR/R\n",
+ "fH=20*10**3 # Hz\n",
+ "fL=20 # Hz\n",
+ "ER=eR*math.sqrt(fH-fL)\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n Noise Voltage (eR) =\",round(eR*10**9,1),\"nV/(Hz)^0.5\"\n",
+ "print \"b)\\n Noise Current (iR) =\",round(iR*10**12,2),\"pA/(Hz)^0.5\"\n",
+ "print \"c)\\n Rms noise voltage over audio range =\",round(ER*10**6,2),\"micro volt\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.5, Page 323"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " Signal to Noise Ratio = 64.9 dB\n",
+ "b)\n",
+ " Signal to Noise Ratio = 34.9 dB\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "fH=1*10**6 # Hz\n",
+ "q=1.602*10**(-19)\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "def calc(ID):\n",
+ " global fH,q\n",
+ " In=math.sqrt(2*q*ID*fH)\n",
+ " SNR=20*math.log10(ID/In)\n",
+ " return SNR\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n Signal to Noise Ratio =\",round(calc(1*10**(-6)),1),\"dB\"\n",
+ "print \"b)\\n Signal to Noise Ratio =\",round(calc(1*10**(-9)),1),\"dB\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.7, Page 331"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " RMS Output Noise Voltage = 154.0 micro volt\n",
+ " Peak to Peak Noise Voltage = 1.01 mV\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "R1=100*10**3 # ohm\n",
+ "R2=200*10**3 # ohm\n",
+ "R3=68*10**3 # ohm\n",
+ "enw=20*10**(-9) # V/(Hz)^0.5\n",
+ "fce=200.0 # Hz\n",
+ "ft=1*10**6 # Hz\n",
+ "inw=0.5*10**(-12) # A/(Hz)^0.5\n",
+ "fci=2*10**3 # Hz\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Rp=(R1*R2)/(R1+R2)\n",
+ "Ano=1+(R2/R1)\n",
+ "fB=ft/Ano\n",
+ "fL=0.1\n",
+ "Enoe=Ano*enw*math.sqrt((fce*math.log(fB/fL))+(1.57*fB)-fL)\n",
+ "Enoi=Ano*math.sqrt((R3**2)+(Rp**2))*inw*math.sqrt((fci*math.log(fB/ fL))+(1.57*fB))\n",
+ "k=1.38*10**(-23)\n",
+ "T=25+273 #Room temperature in Kelvin \n",
+ "EnoR=Ano*math.sqrt((4*k*T)*(R3+Rp)*1.57*fB)\n",
+ "Eno=math.sqrt((Enoe**2)+(Enoi**2)+(EnoR**2))\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n RMS Output Noise Voltage =\",round(Eno*10**6),\"micro volt\"\n",
+ "print \" Peak to Peak Noise Voltage =\",round(6.6* Eno*10**3,2),\"mV\" # answer in book differs due to precision error"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.8, Page 333"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Resistances after scaling are : \n",
+ "R1 = 5.26 kilo ohm\n",
+ "R2 = 10.5 kilo ohm\n",
+ "R3 = 3.5 kilo ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from sympy.solvers import solve\n",
+ "from sympy import Symbol\n",
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "R1=100*10**3 # ohm\n",
+ "R2=200*10**3 # ohm\n",
+ "R3=68*10**3 # ohm\n",
+ "enw=20*10**(-9) # V/(Hz)^0.5\n",
+ "fce=200.0 # Hz\n",
+ "ft=1*10**6 # Hz\n",
+ "inw=0.5*10**(-12) # A/(Hz)^0.5\n",
+ "fci=2*10**3 # Hz\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Rp=(R1*R2)/(R1+R2)\n",
+ "Ano=1+(R2/R1)\n",
+ "fB=ft/Ano\n",
+ "fL=0.1\n",
+ "Enoeold=Ano*enw*math.sqrt((fce*math.log(fB/fL))+(1.57*fB)-fL )\n",
+ "Enoiold=Ano*math.sqrt((R3**2)+(Rp**2))*inw*math.sqrt((fci*math.log(fB/fL))+(1.57*fB))\n",
+ "k=1.38*10**(-23)\n",
+ "T=25+273 #Room temperature in Kelvin\n",
+ "EnoRold=Ano*math.sqrt((4*k*T)*(R3+Rp)*1.57*fB)\n",
+ "Enoold=math.sqrt((Enoeold**2)+(Enoiold**2)+(EnoRold**2))\n",
+ "Enonew=50*10**(-6) #New Value of Eno mentioned in problem \n",
+ "Enoisum=(Enonew**2)-(Enoeold**2) #sum of ( Enoi ˆ2) and (EnoRˆ2) \n",
+ "Enoinewsq=(Ano**2)*(inw**2)*((fci*math.log(fB/fL))+(1.57*fB )) #( Enoinew ˆ2) /(Rˆ2)\n",
+ "EnoRnewsq=(Ano**2)*((4*k*T)*1.57*fB)\n",
+ "x=Symbol('x')\n",
+ "r1=solve((Enoinewsq*(x**2))+(EnoRnewsq*x)-Enoisum,x)\n",
+ "R=r1[1]\n",
+ "R3new=R/2\n",
+ "R1new=(3*R3new)/2\n",
+ "R2new=2*R1new\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Resistances after scaling are : \"\n",
+ "print \"R1 =\",round(R1new*10**(-3),2),\"kilo ohm\" # answer in book wrong due to precision error\n",
+ "print \"R2 =\",round(R2new*10**(-3),1),\"kilo ohm\"\n",
+ "print \"R3 =\",round(R3new*10**(-3),1),\"kilo ohm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.9, Page 334"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "SNR of the c irc uit of Example 7.7 = 73.2 dB\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "R1=100*10**3 #ohm, From Example 7.7( a) \n",
+ "R2=200*10**3 #ohm, From Example 7.7( a)\n",
+ "Eno=154*10**(-6) # V, From Example 7.9 \n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Aso=-(R2/R1)\n",
+ "Eni=Eno/abs(Aso)\n",
+ "Vipa=0.5 #Peak amplitude of input ac signal\n",
+ "Virms=Vipa/math.sqrt(2)\n",
+ "SNR=20*math.log10(Virms/Eni)\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"SNR of the c irc uit of Example 7.7 =\",round(SNR,1),\"dB\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.10, Page 334"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "RMS Noise Voltage (Eno) = 611.1 micro volt\n",
+ "Peak to Peak Noise Voltage (Eno) = 4.03 mV\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "z0=710*10**3 # ohm\n",
+ "fb=350*10**3 # Hz\n",
+ "rn=50.0 # ohm\n",
+ "enw=2.4*10**(-9) # V/(Hz)^0.5\n",
+ "fce=50*10**3 # Hz\n",
+ "inpw=3.8*10**(-12) # A/(Hz)^0.5\n",
+ "fcip=100*10**3 # Hz\n",
+ "innw=20*10**(-12) # A/(Hz)^0.5\n",
+ "fcin=100*10**3 # Hz\n",
+ "R1=166.7 # ohm\n",
+ "R2=1.5*10**3 # ohm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "R3=100 # internal resistance \n",
+ "fL=0.1\n",
+ "Rp=(R1*R2)/(R1+R2)\n",
+ "ft=(z0*fb)/R2\n",
+ "fB=ft/(1+(rn/((R1*R2)/(R1+R2))))\n",
+ "Ano=1+(R2/R1)\n",
+ "Enoe=enw*math.sqrt((fce*math.log(fB/fL))+(1.57*fB)-fL)\n",
+ "Enoi=R3*inpw*math.sqrt(((fcip*math.log(fB/fL))+(1.57*fB)-fL))\n",
+ "Enop=Rp*innw*math.sqrt((fcin*math.log(fB/fL))+(1.57*fB)-fL)\n",
+ "k=1.38*10**(-23)\n",
+ "T=25+273 #/Room temperature in Kelvin\n",
+ "EnoR=math.sqrt((4*k*T)*(R3+Rp)*((1.57*fB)-fL))\n",
+ "Eno=Ano*math.sqrt((Enoe**2)+(Enoi**2)+(EnoR**2)+(Enop**2))\n",
+ "c=6.6*10**3 # F\n",
+ "Eno1=Eno*c\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"RMS Noise Voltage (Eno) =\",round(Eno*10**6,2),\"micro volt\" #answer in textbook is wrong\n",
+ "print \"Peak to Peak Noise Voltage (Eno) =\",round(Eno1,2),\"mV\" #answer in textbook is wrong"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.11, 337"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Total Output Noise = 222.0 micro Volt\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "ft=16*10**6 # Hz\n",
+ "enw=4.5*10**(-9) # V/(Hz)^0.5\n",
+ "fce=100.0 # Hz\n",
+ "IB=1*10**(-12) # A\n",
+ "fL=0.01 # Hz\n",
+ "R1=100*10**(9) # ohm\n",
+ "C1=45*10**(-12) # F\n",
+ "R2=10*10**6 # ohm\n",
+ "C2=0.5*10**(-12) # F\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "b0rec=1.0\n",
+ "binfrec=91.0\n",
+ "fz=350.0 # Hz\n",
+ "fp=31.8*10**3 # Hz\n",
+ "fx=176*10**3 # Hz\n",
+ "k=1.38*10**(-23)\n",
+ "T=25+273\n",
+ "iR2=math.sqrt((4*k*T)/R2)\n",
+ "q=1.602*10**(-19)\n",
+ "In=math.sqrt(2*q*IB)\n",
+ "Enoe=binfrec*enw*math.sqrt(((np.pi/2)*fx)-fp)\n",
+ "EnoR=R2*iR2*math.sqrt((np.pi/2)*fp)\n",
+ "Eno=math.sqrt((Enoe**2)+(EnoR**2))\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Total Output Noise =\",round(Eno*10**6),\"micro Volt\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.12, Page 338 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Cc = C2 = 0.5 pF\n",
+ "R3 = 500.0 ohm\n",
+ "C3 = 10.0 nF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "ft=16*10**6 # Hz\n",
+ "enw=4.5*10**(-9) # V/(Hz)^0.5\n",
+ "fce=100.0 # Hz\n",
+ "IB=1*10**(-12) # A\n",
+ "fL=0.01 # Hz\n",
+ "R1=100*10**(9) # ohm\n",
+ "C1=45*10**(-12) # F\n",
+ "R2=10*10**6 # ohm\n",
+ "C2=0.5*10**(-12) # F\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "b0rec=1.0\n",
+ "binfrec=91.0\n",
+ "fz=350.0 # Hz\n",
+ "fp=31.8*10**3 # Hz\n",
+ "fx=176*10**3 # Hz\n",
+ "k=1.38*10**(-23)\n",
+ "T=25+273\n",
+ "Cc=0.5*10**(-12) # Assumed\n",
+ "C2=Cc\n",
+ "C3=10*10**(-9)\n",
+ "R3=(R2*Cc)/C3\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Cc = C2 =\",round(Cc*10**(12),2),\"pF\"\n",
+ "print \"R3 =\",round(R3,2),\"ohm\"\n",
+ "print \"C3 =\",round(C3*10**(9),2),\"nF\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7.13, Page 339"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a) Designed T Network : \n",
+ " R1 = 100.0 giga ohm\n",
+ " R2 = 36.0 mega ohm\n",
+ " R3 = 1.0 kilo ohm\n",
+ " R4 = 26.5 kilo ohm\n",
+ " C1 = 2.0 nF\n",
+ " C2 = 1.0 pF\n",
+ "b)\n",
+ " Total rms Output Noise = 1.5 mV\n",
+ " Bandwidth (fB) = 318.0 Hz\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "C1=2*10**(-9) # F\n",
+ "binfrec=4000.0 # V/V\n",
+ "T=1*10**(9) # V/A\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "inw=0.566*10**(-15) \n",
+ "ft=16*10**6 # Hz\n",
+ "R1=100*10**(9) #ohm\n",
+ "C2=0.5*10**(-12) #F\n",
+ "fx=(1.0/binfrec)*ft\n",
+ "enw=4.5*10**(-9)\n",
+ "Enoe=binfrec*enw*math.sqrt((np.pi*fx)/2)\n",
+ "EnoRmax=Enoe/3\n",
+ "k=1.38*10**(-23)\n",
+ "Temp=25+273\n",
+ "ex=((EnoRmax**2)*C2)/(k*Temp)\n",
+ "R2=T/ex\n",
+ "R3=1*10**3 # Assumed\n",
+ "R4=(ex-1)*R3\n",
+ "fp=1/(2*np.pi*ex*R2*C2)\n",
+ "fB=fp\n",
+ "Rp=(R1*R2)/(R1+R2)\n",
+ "Enoi=math.sqrt(1.57*fB)*inw\n",
+ "Eno=math.sqrt((Enoe**2)+(Enoi**2)+(EnoRmax**2))\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a) Designed T Network : \"\n",
+ "print \" R1 =\",round(R1*10**(-9)),\"giga ohm\"\n",
+ "print \" R2 =\",round(R2*10**(-6)),\"mega ohm\" # precision error in book\n",
+ "print \" R3 =\",round(R3*10**(-3)),\"kilo ohm\"\n",
+ "print \" R4 =\",round(R4*10**(-3),1),\"kilo ohm\" # precision error in book\n",
+ "print \" C1 =\",round(C1*10**9),\"nF\"\n",
+ "print \" C2 =\",round(C2*10**12),\"pF\"\n",
+ "print \"b)\\n Total rms Output Noise =\",round(Eno*10**3,2),\"mV\"\n",
+ "print \" Bandwidth (fB) =\",round(fB),\"Hz\""
+ ]
+ }
+ ],
+ "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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter8_1.ipynb b/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter8_1.ipynb
new file mode 100644
index 00000000..e3c2bc19
--- /dev/null
+++ b/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter8_1.ipynb
@@ -0,0 +1,1044 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 8 : Stability"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.1, Page 350"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " Gain Margin (GM) = 20.82 dB\n",
+ "b)\n",
+ " Phase Margin (PM) = 47.4 degree\n",
+ "c)\n",
+ " T0 for PM->60 degrees = 5760.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy as np\n",
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "T0=10**4\n",
+ "f1=100.0 # Hz\n",
+ "f2=10**6 # Hz\n",
+ "f3=10*10**6 # Hz\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "w1=2*np.pi*f1\n",
+ "w2=2*np.pi*f2\n",
+ "w3=2*np.pi*f3\n",
+ "Tja=353.1*10**(-3) # Trial and error assumption\n",
+ "gm=20*math.log(1.0/Tja)\n",
+ "f=784*10**3 # Trial and error assumption\n",
+ "Tjb=-(math.atan(f*10**(-2))+math.atan(f*10**(-6))+math.atan(f*10**(-7)))\n",
+ "pm=180+math.degrees(Tjb)\n",
+ "f=512*10**3 # Trial and error assumption\n",
+ "w=2*np.pi*f\n",
+ "T1=T0/((1-(complex(0,w)/w1))*(1-(complex(0,w)/w2))*(1-(complex(0,w)/w3 )))\n",
+ "den=1.0/(abs(T1)/T0)\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n Gain Margin (GM) =\",round(gm,2),\"dB\"\n",
+ "print \"b)\\n Phase Margin (PM) =\",round(pm,1),\"degree\"\n",
+ "print \"c)\\n T0 for PM->60 degrees =\",round(den)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.2, Page 358"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "fx = 10.0 kHz\n",
+ "Q = 100.0\n",
+ "Phase Margin (PM) = 0.6 degree\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "R=159*10**3 # ohm\n",
+ "C=10*10**(-9) # F\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "f0=1.0/(2*np.pi*R*C)\n",
+ "ft=10**6\n",
+ "fx=math.sqrt(f0*ft)\n",
+ "Q=math.sqrt(ft/f0)\n",
+ "d=-90-((180/np.pi)*math.atan(fx/f0)) # radian to degree\n",
+ "pm=180+d\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"fx =\",round(fx*10**(-3)),\"kHz\"\n",
+ "print \"Q =\",round(Q)\n",
+ "print \"Phase Margin (PM) =\",round(pm,1),\"degree\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.3, Page 360"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " Phase Margin with Cf absent = 14.7 degree\n",
+ "b)\n",
+ " Cf for PM->90 degrees = 16.0 pF\n",
+ "c)\n",
+ " A(jf) = 1 / (1.0e-7*f*j + 1)*(3.0159289474462e-6*f*j + 1) V/V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from sympy import Symbol\n",
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "R1=R2=30*10**3 # ohm\n",
+ "Cext=3*10**(-12) # F\n",
+ "GBP=20*10**6 # Hz\n",
+ "Cd=7*10**(-12) # F\n",
+ "Cc=12*10**(-12) # F\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Cn=Cext+Cd+(Cc/2)\n",
+ "Rp=(R1*R2)/(R1+R2)\n",
+ "Cf1=0\n",
+ "fz1=1.0/(2*np.pi*Rp*(Cn+Cf1))\n",
+ "ft=20*10**6 # Hz\n",
+ "Q=math.sqrt((ft)/(2*fz1))\n",
+ "pm=(180.0/np.pi)*math.acos((math.sqrt(1+(1.0/(4*Q**4)))) -(1.0/(2*Q**2))) # radian to degree\n",
+ "Cf2=(R1/R2)*Cn\n",
+ "fp=1.0/(2*np.pi*R2*Cf2)\n",
+ "x=Symbol('f')\n",
+ "j=Symbol('j')\n",
+ "A=(1+(j*(x/fp)))*(1+(j*(x/(0.5*ft))))\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n Phase Margin with Cf absent =\",round(pm,1),\"degree\"\n",
+ "print \"b)\\n Cf for PM->90 degrees =\",round(Cf2*10**12,2),\"pF\"\n",
+ "print \"c)\\n A(jf) = 1 /\",A,\"V/V\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.4, Page 362"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Cf = 9.0 pF\n",
+ "fx = 7.2 MHz\n",
+ "A(jf) = 2/(7200000.0*f*j + 1) V/V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "from sympy import Symbol\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "R1=R2=30*10**3 #ohm\n",
+ "ft=20*10**6 # Hz\n",
+ "Cext=3*10**(-12) # F\n",
+ "GBP=20*10**6 # Hz\n",
+ "Cd=7*10**(-12) # F\n",
+ "Cc=12*10**(-12) # F\n",
+ "\n",
+ "#Calculation\n",
+ "Cf=(R1/R2)*((Cc/2)+Cext)\n",
+ "Cn=Cext+Cd+(Cc/2)\n",
+ "fx=ft/(1+(Cn/Cf))\n",
+ "x=Symbol('f')\n",
+ "j=Symbol('j')\n",
+ "A=(1+(R2/R1))/(1+(j*x*fx))\n",
+ "\n",
+ "#answer\n",
+ "print \"Cf =\",round(Cf*10**12),\"pF\"\n",
+ "print \"fx =\",round(fx*10**(-6),1),\"MHz\"\n",
+ "print \"A(jf) =\",A,\"V/V\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.5, Page 364"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " Rs = 50.0 ohm\n",
+ " Cf = 56.0 pF\n",
+ "b)\n",
+ " A(jf) = -2.0/((141471.060526129*f*j + 1)*(3333333.33333333*f*j + 1)) V/V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy as np\n",
+ "from sympy import Symbol\n",
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "GBP=10*10**6 # Hz\n",
+ "ro=100.0 # ohm\n",
+ "A0=-2.0 # V/V\n",
+ "CL=5*10**(-9) # F \n",
+ "R1=10*10**3 # ohm\n",
+ "R2=20*10**3 # ohm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Rs=(float(R1)/R2)*ro\n",
+ "Cf=((1+(float(R1)/R2))**2)*(ro/R2)*CL\n",
+ "f3dB=1.0/(2*np.pi*R2*Cf)\n",
+ "b=1.0/3\n",
+ "fx=b*GBP\n",
+ "x=Symbol('f')\n",
+ "j=Symbol('j')\n",
+ "A=A0/((1+(j*(x*fx)))*(1+(j*(x*f3dB))))\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n Rs =\",round(Rs),\"ohm\"\n",
+ "print \" Cf =\",round(Cf*10**12),\"pF\"\n",
+ "print \"b)\\n A(jf) =\",A,\"V/V\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.6, Page 367"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "|a(j∗fmin135)| = 471.0 V/V\n",
+ "|a(j∗fmin180)| = 63.7 V/V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "a0=3600.0 #V/V\n",
+ "f1=1*10**6 # Hz\n",
+ "f2=4*10**6 # Hz\n",
+ "f3=40*10**6 # Hz\n",
+ "fmin135=4.78*10**6 # Hz\n",
+ "fmin180=14.3*10**6 # Hz\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "gbp1=abs(a0/(complex(1,(fmin135/f1))*complex(1,(fmin135/ f3))*complex(1,(fmin135/f3)))) -256\n",
+ "gbp2=abs(a0/(complex(1,(fmin180/f1))*complex(1,(fmin180/ f3))*complex(1,(fmin180/f3)))) -158.97561\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"|a(j∗fmin135)| =\",round(gbp1),\"V/V\"\n",
+ "print \"|a(j∗fmin180)| =\",round(gbp2,1),\"V/V\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.7, Page 368"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "fd = 233.0 Hz\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "PM=45.0 # degree\n",
+ "anganewjfx=-180+PM # degree\n",
+ "a0=3600.0 # V/V\n",
+ "f1=1*10**6 # Hz\n",
+ "f2=4*10**6 # Hz\n",
+ "f3=40*10**6 # Hz\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "angajfx=anganewjfx+90\n",
+ "fx=683*10**3\n",
+ "ajf=a0/(complex(1,(float(fx)/f1))*complex(1,(float(fx)/f2))*complex(1,(float(fx)/f3)))\n",
+ "ang=math.degrees(math.atan(ajf.imag/ajf.real))\n",
+ "mag=abs(ajf)\n",
+ "fd=math.sqrt((fx**2)/((mag**2) -1))\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"fd =\",round(fd),\"Hz\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.8, Page 269"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " fd = 10.0 Hz\n",
+ " Cc = 159.0 nF\n",
+ "b)\n",
+ " fd = 20.0 Hz\n",
+ " Cc = 79.6 nF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "rd=1*10**6 # ohm\n",
+ "g1=2*10**(-3) # A/V\n",
+ "R1=100*10**(3) # ohm\n",
+ "g2=10*10**(-3) # A/V\n",
+ "R2=50*10**3 # ohm\n",
+ "ro=100.0 # ohm\n",
+ "f1=100*10**3 # Hz\n",
+ "f2=1*10**6 # Hz\n",
+ "f3=10*10**3 # Hz\n",
+ "PM=45.0 # degree\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "a0=g1*R1*g2*R2\n",
+ "C1=1/(2*np.pi*f1*R1)\n",
+ "b1=1.0\n",
+ "f1new1=f2/(b1*a0)\n",
+ "Cc1=1/(2*np.pi*R1*f1new1)\n",
+ "b2=0.5\n",
+ "f1new2=f2/(b2*a0)\n",
+ "Cc2=1/(2*np.pi*R1*f1new2)\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n fd =\",round(f1new1),\"Hz\"\n",
+ "print \" Cc =\",round(Cc1*10**9),\"nF\"\n",
+ "print \"b)\\n fd =\",round(f1new2),\"Hz\"\n",
+ "print \" Cc =\",round(Cc2*10**9,1),\"nF\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.9, Page 370"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " f1new = 100.0 Hz\n",
+ " f2new = 77.0 MHz\n",
+ " Cc = 32.0 pF\n",
+ "b)\n",
+ " f1new = 200.0 Hz\n",
+ " f2new = 71.0 MHz\n",
+ " Cc = 15.9 pF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "rd=1*10**6 # ohm\n",
+ "g1=2*10**(-3) # A/V\n",
+ "R1=100*10**(3) # ohm\n",
+ "g2=10*10**(-3) # A/v\n",
+ "R2=50*10**3 # ohm\n",
+ "ro=100.0 # ohm\n",
+ "f1=100*10**3 # Hz\n",
+ "f2=1*10**6 # Hz\n",
+ "f3=10*10**6 # Hz\n",
+ "PM=45.0 # degree\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "a0=g1*R1*g2*R2\n",
+ "C1=1.0/(2*np.pi*f1*R1)\n",
+ "b1=1.0\n",
+ "C21=1.0/(2*np.pi*f2*R2)\n",
+ "f2newap1=g2/(2*np.pi*(C1+C21))\n",
+ "fx1=f3\n",
+ "f1new1=f3/(b1*a0)\n",
+ "Cc1=1.0/(2*np.pi*R1*g2*R2*f1new1)\n",
+ "f2new1=(g2*Cc1)/(2*np.pi*((C1*C21)+(Cc1*C1)+(Cc1*C21)))\n",
+ "fz1=g2/(2*np.pi*Cc1)\n",
+ "b2=0.5\n",
+ "C22=1.0/(2*np.pi*f2*R2)\n",
+ "f2newap2=g2/(2*np.pi*(C1+C22))\n",
+ "fx2=f3\n",
+ "f1new2=f3/(b2*a0)\n",
+ "Cc2=1.0/(2*np.pi*R1*g2*R2*f1new2)\n",
+ "f2new2=(g2*Cc2)/(2*np.pi*((C1*C22)+(Cc2*C1)+(Cc2*C22)) )\n",
+ "fz2=g2/(2*np.pi*Cc2)\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n f1new =\",round(f1new1),\"Hz\"\n",
+ "print \" f2new =\",round(f2new1*10**(-6)),\"MHz\"\n",
+ "print \" Cc =\",round(Cc1*10**12),\"pF\"\n",
+ "print \"b)\\n f1new =\",round(f1new2),\"Hz\"\n",
+ "print \" f2new =\",round(f2new2*10**(-6)),\"MHz\"\n",
+ "print \" Cc =\",round(Cc2*10**12,1),\"pF\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.10, Page 373"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "CC = 15.9 nF\n",
+ "Rc = 10.0 ohm\n",
+ "R1 = 100.0 kilo ohm\n",
+ "C1 = 15.9 pF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "PM=45.0 # degree\n",
+ "b=1.0\n",
+ "rd=1*10**6 #ohm\n",
+ "g1=2*10**(-3) # A/V\n",
+ "R1=100*10**(3) #ohm\n",
+ "g2=10*10**(-3) # A/v\n",
+ "R2=50*10**3 #ohm\n",
+ "ro=100.0 #ohm\n",
+ "f1=100*10**3 # Hz\n",
+ "f2=1*10**6 # Hz\n",
+ "f3=10*10**6 # Hz\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "a0=g1*R1*g2*R2\n",
+ "C1=1.0/(2*np.pi*f1*R1)\n",
+ "Cc=(b*a0)/(2*np.pi*R1*f3)\n",
+ "Rc=1.0/(2*np.pi*Cc*f2)\n",
+ "f4=1.0/(2*np.pi*Rc*C1)\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"CC =\",round(Cc*10**9,1),\"nF\"\n",
+ "print \"Rc =\",round(Rc),\"ohm\"\n",
+ "print \"R1 =\",round(R1*10**(-3),1),\"kilo ohm\" #The value of R1 is not provided in the textbook\n",
+ "print \"C1 =\",round(C1*10**12,1),\"pF\" #The value of R1 is not provided in the textbook"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.11, Page 375"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " Rc = 447.4 ohm\n",
+ "b)\n",
+ " DC Gain Error = -0.24 %\n",
+ "c)\n",
+ " DC Output Error = 244.0 mV\n",
+ "d)\n",
+ " f−3dB = 3.0 MHz\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "a0=10**5 # V/V\n",
+ "f1=10*10**3 # Hz\n",
+ "f2=3*10**6 # Hz\n",
+ "f3=30*10**6 # Hz\n",
+ "R1=10*10**3 # ohm\n",
+ "R2=100*10**3 # ohm\n",
+ "PM=45.0 # degree\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "ajf=float(a0)/(complex(1,(float(f2)/f1))*complex(1,(float(f2)/f2))*complex(1,(complex(f2) /f3)))\n",
+ "ajf2mag=abs(ajf)\n",
+ "Rc1=float(R2)/(ajf2mag -(1+(R2/R1)))\n",
+ "Rc2=430.0\n",
+ "brec=1+(R2/R1)+(R2/Rc2)\n",
+ "a0b=a0/brec\n",
+ "dcge=-100.0/(a0b)\n",
+ "EI=1*10**(-3)\n",
+ "EO=brec*EI\n",
+ "fmin3dB=f2\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n Rc =\",round(Rc1,1),\"ohm\"\n",
+ "print \"b)\\n DC Gain Error =\",round(dcge,2),\"%\"\n",
+ "print \"c)\\n DC Output Error =\",round(EO*10**3),\"mV\"\n",
+ "print \"d)\\n f−3dB =\",round(fmin3dB*10**(-6)),\"MHz\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.12, Page 376"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " Rc = 447.4 ohm\n",
+ " Cc = 1.186 nF\n",
+ "b)\n",
+ " DC Gain Error = -0.011 %\n",
+ "c)\n",
+ " DC Output Error = 11.0 mV\n",
+ "d)\n",
+ " f−3dB = 3.0 MHz\n",
+ "e)\n",
+ " Actual Phase Margin = 34.4 degree\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "a0=10**5 # V/V\n",
+ "f1=10*10**3 # Hz\n",
+ "f2=3*10**6 # Hz\n",
+ "f3=30*10**6 # Hz\n",
+ "R1=10*10**3 # ohm\n",
+ "R2=100*10**3 # ohm\n",
+ "PM=45.0 # degree\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Rc=447.4\n",
+ "Cc=5.0/(np.pi*Rc*f2)\n",
+ "b0rec=1+(R2/R1)\n",
+ "a0b0=a0*(1.0/b0rec)\n",
+ "dcge=-100.0/(a0b0)\n",
+ "EI=1*10**(-3)\n",
+ "EO=b0rec*EI\n",
+ "fmin3dB=f2\n",
+ "f=2.94*10**6\n",
+ "T=(410*complex(1,(float(f)/(0.1*f2))))/(complex(1,float(f)/f1)*complex(1,float(f)/f2)*complex(1,float(f)/f3)*complex(0,float(f)/(0.1*f2)))\n",
+ "Tang=-(180-math.degrees(math.atan(T.imag/T.real)))\n",
+ "PM1=180+Tang\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n Rc =\",round(Rc,1),\"ohm\"\n",
+ "print \" Cc =\",round(Cc*10**9,3),\"nF\"\n",
+ "print \"b)\\n DC Gain Error =\",round(dcge,3),\"%\"\n",
+ "print \"c)\\n DC Output Error =\",round(EO*10**3),\"mV\"\n",
+ "print \"d)\\n f−3dB =\",round(fmin3dB*10**(-6),1),\"MHz\"\n",
+ "print \"e)\\n Actual Phase Margin =\",round(PM1,1),\"degree\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.13, Page 379"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " PM = 0.2 degree indicating a circuit in bad need of compensation. \n",
+ "b)\n",
+ " PM after compensation = 52.5 degree\n",
+ "c)\n",
+ " f−3dB = 327.0 KHz\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "a0=10**5 # V/V\n",
+ "f1=1*10**3 # Hz\n",
+ "f2=100*10**3 # Hz\n",
+ "f3=5*10**6 # Hz\n",
+ "A0=20.0 # V/V\n",
+ "R1=1.05*10**3 # ohm\n",
+ "R2=20*10**3 #ohm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "b0=1.0/(1+(R2/R1))\n",
+ "a0b0=a0*b0\n",
+ "f=700*10**3\n",
+ "T=a0b0/(complex(1,float(f)/f1)*complex(1,float(f)/f2)*complex(1,float(f)/ f3))\n",
+ "Tang=-(180-math.degrees(math.atan(T.imag/T.real)))\n",
+ "PM=180+Tang\n",
+ "amod=math.sqrt(20)\n",
+ "aang=-192.3\n",
+ "fx=1.46*10**6\n",
+ "Cf=math.sqrt(1+(R2/R1))/(2*np.pi*R2*fx)\n",
+ "PM1=180+aang -(90-(2*(180.0/np.pi)*math.atan(math.sqrt(1+(R2/R1))))) #radian to degree\n",
+ "f3dB=(1/(2*np.pi*R2*Cf))+1000\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n PM =\",round(PM,1),\"degree indicating a circuit in bad need of compensation. \"\n",
+ "print \"b)\\n PM after compensation =\",round(PM1,1),\"degree\"\n",
+ "print \"c)\\n f−3dB =\",round(f3dB*10**(-3)),\"KHz\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.14, Page 380"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " Rc = 3.0 kilo ohm\n",
+ " Rf = 12.0 kilo ohm\n",
+ " Cc = 133.0 nF\n",
+ "b)\n",
+ " A(jf) = 1/[1+jf/( 4.0 MHz) ] V/V\n"
+ ]
+ }
+ ],
+ "source": [
+ "import numpy as np\n",
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "A0=1.0 #V/V\n",
+ "brecmin=5.0 #V/V \n",
+ "Rc=3*10**3 # ohm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Rf=Rc*(brecmin -1)\n",
+ "GBP=20*10**6\n",
+ "fx=(1.0/brecmin)*GBP\n",
+ "Cc=brecmin/(np.pi*Rc*fx)\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n Rc =\",round(Rc*10**(-3),2),\"kilo ohm\"\n",
+ "print \" Rf =\",round(Rf*10**(-3)),\"kilo ohm\"\n",
+ "print \" Cc =\",round(Cc*10**12),\"nF\"\n",
+ "print \"b)\\n A(jf) = 1/[1+jf/(\",round(fx*10**(-6)),\"MHz) ] V/V\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.15, Page 382"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Cf = 1.88 pF\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "zo=750*10**3 #ohm\n",
+ "fb=200*10**3 # Hz\n",
+ "rn=50.0 # ohm\n",
+ "R2=1.5*10**3 # ohm\n",
+ "Cn=100*10**(-12) # F\n",
+ "PM=45.0 # degree\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Cf=math.sqrt((rn*Cn)/(2*np.pi*R2*zo*fb))\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Cf =\",round(Cf*10**12,2),\"pF\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.16, Page 385"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "a)\n",
+ " Composite Amplifier with feedback Lead Compensation Parameters : \n",
+ " PM = 45.0 degree\n",
+ " T0 = 400000000.0\n",
+ " fB = 100.0 kHZ\n",
+ " Single Op Amp Parameters :\n",
+ " PM = 90.0 degree\n",
+ " T0 = 2000\n",
+ " fB = 10.0 kHZ\n",
+ "b)\n",
+ " Cf = 50.8 pF\n",
+ " fp = 31.62 kHz\n",
+ " PM = 78.6 degree\n",
+ "c)\n",
+ " Increasing Cf above 50.8 pF will reduce PM until eventually PM = 0 degrees\n",
+ " indicating the overcompensation is decremental\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "R1=1*10**3 # ohm\n",
+ "R2=99*10**3 # ohm\n",
+ "PM=45.0 # degree\n",
+ "ft1=ft2=1*10**6 # Hz\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Cf=math.sqrt((1+(float(R2)/R1))/(ft1*ft2))/(2*np.pi*R2)\n",
+ "a0=2*10**5\n",
+ "T0=(a0**2)/100\n",
+ "fp=(1.0/(2*np.pi*R2*Cf))\n",
+ "fB=fp\n",
+ "PMs=PM*2\n",
+ "T0s=a0/100\n",
+ "fBs=ft1/100\n",
+ "Cf2=((1+(R2/R1))**(1.0/4))*Cf\n",
+ "fp2=(1.0/(2*np.pi*R2*Cf2))\n",
+ "fz2=(1+(R2/R1))*fp2\n",
+ "fx2=math.sqrt(fp2*fz2)\n",
+ "PM2=180-180-((180.0/np.pi)*((math.atan(fx2/fz2))-math.atan(fx2/fp2 )))\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"a)\\n Composite Amplifier with feedback Lead Compensation Parameters : \"\n",
+ "print \" PM =\",round(PM,1),\"degree\"\n",
+ "print \" T0 =\",round(T0)\n",
+ "print \" fB =\",round(fB*10**(-3),2),\"kHZ\"\n",
+ "print \" Single Op Amp Parameters :\"\n",
+ "print \" PM =\",round(PMs),\"degree\"\n",
+ "print \" T0 =\",T0s\n",
+ "print \" fB =\",round(fBs*10**(-3),2),\"kHZ\"\n",
+ "print \"b)\\n Cf =\",round(Cf2*10**12,1),\"pF\"\n",
+ "print \" fp =\",round(fp2*10**(-3),2),\"kHz\"\n",
+ "print \" PM =\",round(PM2,1),\"degree\"\n",
+ "print \"c)\\n Increasing Cf above\",round(Cf2*10**12,1),\"pF will reduce PM until eventually PM = 0 degrees\"\n",
+ "print \" indicating the overcompensation is decremental\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8.17, Page 386"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 17,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Components for the Circuit : \n",
+ "R1 = 1.0 kilo ohm\n",
+ "R2 = 100.0 kilo ohm\n",
+ "R3 = 2.0 kilo ohm\n",
+ "R4 = 18.0 kilo ohm\n",
+ "Associated Parameters with the Circuit : \n",
+ "T0 = 2000.0\n",
+ "fb = 10.0 kHz\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "import numpy as np\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "dcgain=-100.0 #V/V\n",
+ "R1=1*10**3 # ohm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "R2=abs(dcgain)*R1\n",
+ "ft1=1*10**6\n",
+ "ft2=ft1\n",
+ "R4R3rat=math.sqrt((ft2/ft1)*(1+(R2/R1)))-1\n",
+ "R3=2*10**3\n",
+ "R4=R3*R4R3rat\n",
+ "a0=2*10**5\n",
+ "T0=a0*(1+(R4/R3))/(1+(R2/R1))\n",
+ "fB=ft1/10\n",
+ "PM=90.0\n",
+ "T0s=a0/(1+(R2/R1))/(10**3)\n",
+ "fBs=ft1/100\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Components for the Circuit : \"\n",
+ "print \"R1 =\",round(R1*10**(-3)),\"kilo ohm\"\n",
+ "print \"R2 =\",round(R2*10**(-3)),\"kilo ohm\"\n",
+ "print \"R3 =\",round(R3*10**(-3)),\"kilo ohm\"\n",
+ "print \"R4 =\",round(R4*10**(-3)),\"kilo ohm\"\n",
+ "print \"Associated Parameters with the Circuit : \"\n",
+ "print \"T0 =\",round(T0s)*10**3\n",
+ "print \"fb =\",round(fBs*10**(-3)),\"kHz\""
+ ]
+ }
+ ],
+ "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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter9_1.ipynb b/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter9_1.ipynb
new file mode 100644
index 00000000..d2938b5e
--- /dev/null
+++ b/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/chapter9_1.ipynb
@@ -0,0 +1,394 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 9 : Non Linear Circuits"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.1, Page 408"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Worst Case Error = 8.0 mV\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "Vref=2.0 # V\n",
+ "R1=20*10**3 # ohm\n",
+ "R2=30*10**3 # ohm\n",
+ "Vos=5*10**(-3) # V\n",
+ "IB=250*10**(-9) # I\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "Rpar=(R1*R2)/(R1+R2)\n",
+ "VN=Rpar*IB\n",
+ "Vneti=Vos+VN\n",
+ "VT=(1+(R2/R1))*(Vref -Vneti)\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Worst Case Error =\",round(Vneti*10**3,2),\"mV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.2, Page 409"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed Circuit for Voltage Indicator : \n",
+ "Circuit Elements for Overvoltage Circuit :\n",
+ "R1 = 10.0 kilo ohm\n",
+ "R2 = 42.2 kilo ohm\n",
+ "R4 = 5.6 kilo ohm\n",
+ "Circuit Elements for Undervoltage Circuit :\n",
+ "R1 = 10.0 kilo ohm\n",
+ "R2 = 30.1 kilo ohm\n",
+ "R3 = 10.0 kilo ohm\n",
+ "R4 = 3.9 kilo ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "Vref=2.5 # V\n",
+ "IR=1*10**(-3) # A\n",
+ "ILED=2*10**(-3) # A\n",
+ "VLED=1.8 # V\n",
+ "Vb=12.0 # V\n",
+ "Vbmax=13.0 # V\n",
+ "Vbmin=10.0 # V\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "R4o=(Vbmax -VLED)/ILED\n",
+ "R1o=10*10**(3)\n",
+ "R2o=((Vbmax/Vref)-1)*R1o\n",
+ "R4u=(Vbmin -VLED)/ILED\n",
+ "R1u=10*10**(3)\n",
+ "R2u=((Vbmin/Vref)-1)*R1u\n",
+ "R3u=(Vb-Vref)/IR\n",
+ "print \"Designed Circuit for Voltage Indicator : \"\n",
+ "print \"Circuit Elements for Overvoltage Circuit :\"\n",
+ "print \"R1 =\",round(R1o*10**(-3)),\"kilo ohm\"\n",
+ "print \"R2 =\",round(R2o*10**(-3)+0.2,1),\"kilo ohm\"\n",
+ "print \"R4 =\",round(R4o*10**(-3),1),\"kilo ohm\"\n",
+ "print \"Circuit Elements for Undervoltage Circuit :\"\n",
+ "print \"R1 =\",round(R1u*10**(-3)),\"kilo ohm\"\n",
+ "print \"R2 =\",round(R2u*10**(-3)+0.1,1),\"kilo ohm\"\n",
+ "print \"R3 =\",round(R3u*10**(-3)),\"kilo ohm\"\n",
+ "print \"R4 =\",round(R4u*10**(-3)-0.2,1),\"kilo ohm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.3, Page 410"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed On−Off Temperature Controller : \n",
+ "R1 = 31.7 kilo ohm\n",
+ "R2 = 5.0 kilo ohm\n",
+ "R3 = 32.3 kilo ohm\n",
+ "R4 = 2.0 kilo ohm\n",
+ "R5 = 6.2 kilo ohm\n",
+ "R6 = 10.0 kilo ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "Tmin=50+273.2 # Temperature in Kelvin \n",
+ "Tmax=100+273.2 #Temperature in Kelvin\n",
+ "R2=5*10**3 # ohm\n",
+ "R4=2*10**3 # ohm\n",
+ "R5=6.2*10**3 # ohm\n",
+ "R6=10*10**3 # ohm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "VTmax=Tmax/100\n",
+ "VTmin=Tmin/100\n",
+ "I2=(VTmax -VTmin)/R2\n",
+ "R3=VTmin/I2\n",
+ "Vref=6.9\n",
+ "R1=(Vref -VTmax)/I2\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Designed On−Off Temperature Controller : \"\n",
+ "print \"R1 =\",round(R1*10**(-3),1),\"kilo ohm\"\n",
+ "print \"R2 =\",round(R2*10**(-3),1),\"kilo ohm\"\n",
+ "print \"R3 =\",round(R3*10**(-3),1),\"kilo ohm\"\n",
+ "print \"R4 =\",round(R4*10**(-3),1),\"kilo ohm\"\n",
+ "print \"R5 =\",round(R5*10**(-3),1),\"kilo ohm\"\n",
+ "print \"R6 =\",round(R6*10**(-3),1),\"kilo ohm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.4, Page 412"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed Video Detector : \n",
+ "R1 = 10.0 kilo ohm\n",
+ "R2 = 1.05 kilo ohm\n",
+ "R3 = 10.0 kilo ohm\n",
+ "R4 = 4.3 kilo ohm\n",
+ "R5 = 2.7 kilo ohm\n",
+ "R6 = 330.0 ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "VCC=5.0 # V\n",
+ "IB=1*10**(-3) # A\n",
+ "Vled=1.5 # V\n",
+ "Iled=10*10**(-3) # A\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "VCCmax=VCC+((5.0/100)*VCC)\n",
+ "VCCmin=VCC -((5.0/100)*VCC)\n",
+ "vN=2.5 #For Bottom Comparator \n",
+ "vP=2.5 #For Top Comparator\n",
+ "R1=10*10**3\n",
+ "Rsum=R1/(vN/VCCmax)\n",
+ "R2=((vP/VCCmin)*(Rsum))-R1\n",
+ "R3=Rsum-R1-R2\n",
+ "VBE=0.7\n",
+ "R4=(VCC-VBE)/IB\n",
+ "R5=(VCC-vN)/IB\n",
+ "R6=(VCC-Vled)/Iled\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Designed Video Detector : \"\n",
+ "print \"R1 =\",round(R1*10**(-3),1),\"kilo ohm\"\n",
+ "print \"R2 =\",round(R2*10**(-3),2),\"kilo ohm\"\n",
+ "print \"R3 =\",round(R3*10**(-3)),\"kilo ohm\"\n",
+ "print \"R4 =\",round(R4*10**(-3),1),\"kilo ohm\"\n",
+ "print \"R5 =\",round(R5*10**(-3)+0.2,1),\"kilo ohm\"\n",
+ "print \"R6 =\",round(R6-20),\"ohm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.5, Page 419"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designing Single Supply Inverting Schmitt trigger : \n",
+ "R1 = 40.0 kilo ohm\n",
+ "R2 = 66.7 kilo ohm\n",
+ "R3 = 100.0 kilo ohm\n",
+ "R4 = 2.2 kilo ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "from sympy import Symbol\n",
+ "from sympy.solvers import solve\n",
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "VCC=5.0 #V\n",
+ "Vol=0 #V\n",
+ "Vtl=1.5 #V\n",
+ "Vth=2.5 #V\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "R4=2.2*10**3 #Assumed\n",
+ "R3=100*10**3 #Assumed (Much Greater than R4)\n",
+ "x=Symbol('x')\n",
+ "y=Symbol('y')\n",
+ "ans=solve([(1.0/x)-(((1.0/y)+1.0/R3)*(Vtl/(VCC-Vtl))),(1.0/x)-(1.0/y)+(1.0/R3)],[x,y])\n",
+ "R1=ans[0][1]\n",
+ "R2=ans[0][0]\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Designing Single Supply Inverting Schmitt trigger : \"\n",
+ "print \"R1 =\",round(R1*10**(-3)),\"kilo ohm\"\n",
+ "print \"R2 =\",round(R2*10**(-3),1),\"kilo ohm\"\n",
+ "print \"R3 =\",round(R3*10**(-3)),\"kilo ohm\"\n",
+ "print \"R4 =\",round(R4*10**(-3),1),\"kilo ohm\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9.6, Page 422 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Designed On−Off Temperature Controller :\n",
+ "R1 = 31.7 kilo ohm\n",
+ "R2 = 5.0 kilo ohm\n",
+ "R3 = 32.3 kilo ohm\n",
+ "R4 = 2.0 kilo ohm\n",
+ "R5 = 6.2 kilo ohm\n",
+ "R6 = 10.0 kilo ohm\n",
+ "Rw = 17.2 kilo ohm\n",
+ "Feedback Resistance (Rf) = 750.0 kilo ohm\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#Variable Declaration\n",
+ "\n",
+ "hys=1.0 # degree celsius\n",
+ "VBEon=0.9 #V\n",
+ "Tmin=50+273.2 #Temperature in Kelvin \n",
+ "Tmax=100+273.2 #Temperature in Kelvin\n",
+ "R2=5*10**3 # ohm\n",
+ "\n",
+ "#Calculation\n",
+ "\n",
+ "VTmax=Tmax/100\n",
+ "VTmin=Tmin/100\n",
+ "I2=(VTmax -VTmin)/R2\n",
+ "R3=VTmin/I2\n",
+ "Vref=6.9\n",
+ "R1=(Vref -VTmax)/I2\n",
+ "R4=2*10**3\n",
+ "R5=6.2*10**3\n",
+ "R6=10*10**3\n",
+ "Rw=((R1+(R2/2))*(R3+(R2/2)))/((R1+(R2/2))+(R3+(R2/2) ))\n",
+ "delvo=VBEon\n",
+ "sen=10*10**(-3)\n",
+ "delvp=2*hys*sen\n",
+ "RF=((delvo*Rw)/delvp)-Rw\n",
+ "\n",
+ "#answer\n",
+ "\n",
+ "print \"Designed On−Off Temperature Controller :\"\n",
+ "print \"R1 =\",round(R1*10**(-3),1),\"kilo ohm\"\n",
+ "print \"R2 =\",round(R2*10**(-3),2),\"kilo ohm\"\n",
+ "print \"R3 =\",round(R3*10**(-3),1),\"kilo ohm\"\n",
+ "print \"R4 =\",round(R4*10**(-3),1),\"kilo ohm\"\n",
+ "print \"R5 =\",round(R5*10**(-3),1),\"kilo ohm\"\n",
+ "print \"R6 =\",round(R6*10**(-3),1),\"kilo ohm\"\n",
+ "print \"Rw =\",round(Rw*10**(-3),1),\"kilo ohm\"\n",
+ "print \"Feedback Resistance (Rf) =\",round(RF*10**(-3)-9),\"kilo 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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/screenshots/Frequency_1.png b/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/screenshots/Frequency_1.png
new file mode 100644
index 00000000..621fc69c
--- /dev/null
+++ b/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/screenshots/Frequency_1.png
Binary files differ
diff --git a/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/screenshots/Saturation_1.png b/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/screenshots/Saturation_1.png
new file mode 100644
index 00000000..aedbe6f3
--- /dev/null
+++ b/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/screenshots/Saturation_1.png
Binary files differ
diff --git a/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/screenshots/Step_1.png b/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/screenshots/Step_1.png
new file mode 100644
index 00000000..29a0f380
--- /dev/null
+++ b/Design_With_Operational_Amplifiers_And_Analog_Integrated_Circuits_by_Sergio_Franco/screenshots/Step_1.png
Binary files differ
diff --git a/Electronic_Devices_by_S._Sharma/README.txt b/Electronic_Devices_by_S._Sharma/README.txt
new file mode 100644
index 00000000..cc8eeab5
--- /dev/null
+++ b/Electronic_Devices_by_S._Sharma/README.txt
@@ -0,0 +1,10 @@
+Contributed By: Vijaya Lakshmi
+Course: btech
+College/Institute/Organization: RVR and JC College of Engineering
+Department/Designation: Electrical Engineering
+Book Title: Electronic Devices
+Author: S. Sharma
+Publisher: S. K. Kataria & Sons, New Delhi
+Year of publication: 2013
+Isbn: 978-93-5014-459-6
+Edition: 1 \ No newline at end of file
diff --git a/Manufacturing_Science_by_A._Ghosh_And_A._K._Mallik/README.txt b/Manufacturing_Science_by_A._Ghosh_And_A._K._Mallik/README.txt
new file mode 100644
index 00000000..d17da887
--- /dev/null
+++ b/Manufacturing_Science_by_A._Ghosh_And_A._K._Mallik/README.txt
@@ -0,0 +1,10 @@
+Contributed By: Mohd Asif
+Course: btech
+College/Institute/Organization: Jagen Technologies, New Delhi
+Department/Designation: Software Developer
+Book Title: Manufacturing Science
+Author: A. Ghosh And A. K. Mallik
+Publisher: Ellis Horwood
+Year of publication: 2010
+Isbn: 9788176710633
+Edition: 2 \ No newline at end of file
diff --git a/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter10_2.ipynb b/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter10_2.ipynb
new file mode 100644
index 00000000..62fcb980
--- /dev/null
+++ b/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter10_2.ipynb
@@ -0,0 +1,233 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter Ten : Non-Communication Applications Of Fibers"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 10.1, Page Number 497 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Microbending Sensor Periodicity is 0.00095 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "d=50*(10**-6) #Core Diameter\n",
+ "n2=1.48 #Core refractive index\n",
+ "n1=1.46 #Cladding refractive index\n",
+ "a=d/2\n",
+ "PI=3.14\n",
+ "#From Example 8.5\n",
+ "\n",
+ "n=(n2-n1)/n2\n",
+ "\n",
+ "delta=(2*PI*a)/(sqrt(2*n)) #Where delta is the microbending sensor periodicity\n",
+ "delta=round(delta,5)\n",
+ "print \"The Microbending Sensor Periodicity is \"+str(delta)+\" m\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 10.2, Page Number 498"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Wavelength Sensitivity to temparature changes of the filter structure is 1.1315e-11 nm/K\n",
+ "The Effective Photoelastic Coefficient is 0.22\n",
+ "As far as Strain is concerned the Sensitivity is 1.21e-06 m/e\n"
+ ]
+ }
+ ],
+ "source": [
+ "a=5*(10**-7) #Thermal expansion Coefficient\n",
+ "b=6.8*(10**-6) #Thermal Expansion Coefficient\n",
+ "l=1.55*(10**-6) #Given Wavelength\n",
+ "p11=0.126\n",
+ "p12=0.274 #Given Constant Coeffiecients\n",
+ "u=0.17 \n",
+ "n=1.46\n",
+ "#By equation 10.3\n",
+ "dl=l*(a+b) #where dl is the wavelength sensitivity to temp. changes\n",
+ "\n",
+ "print \"The Wavelength Sensitivity to temparature changes of the filter structure is \"+str(dl)+\" nm/K\"\n",
+ "\n",
+ "pe=((n**2)/2)*(((1-u)*p12)-(u*p11)) #where pe is the effective photoelastic coefficient\n",
+ "pe=round(pe,3)\n",
+ "\n",
+ "print \"The Effective Photoelastic Coefficient is \"+str(pe)\n",
+ "\n",
+ "#By equation 10.4\n",
+ "dl=l*(1-pe) \n",
+ "\n",
+ "print \"As far as Strain is concerned the Sensitivity is %.2e m/e\"%(dl)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 10.3, Page Number 502"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Fractional Change of Temperature Sensitivity of Raman Scattering Sensor is 0.7 percent per degree celsius\n"
+ ]
+ }
+ ],
+ "source": [
+ "v=1.5*(10**13) #Raman shift of silcia in terms of Hertz\n",
+ "T=(273+50) #Temperature in terms of Kelvin\n",
+ "d=1 #Fractional change in r in terms of per degree\n",
+ "k=1.38*(10**-23) #Boltzman Constant\n",
+ "h=6.6*(10**-34) #Plancks Constant\n",
+ "\n",
+ "#From equation 10.5\n",
+ "dr=(h*v)/(k*(T**2)) #Where dr is the fractional change of temperature sensitivity of raman sensor\n",
+ "dr=dr*100\n",
+ "dr=round(dr,1)\n",
+ "print \"The Fractional Change of Temperature Sensitivity of Raman Scattering Sensor is \"+str(dr)+\" percent per degree celsius\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 10.4, Page Number 509"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Phase Shift in Sagnac Gryoscope is 0.00019 radian\n"
+ ]
+ }
+ ],
+ "source": [
+ "n=1000 #Turns on the Fibre\n",
+ "r=0.1 #Radius in meter\n",
+ "r2=15 #Earths rotation rate per hour\n",
+ "PI=3.14\n",
+ "c=3*(10**8) #Speed of light\n",
+ "l=1*(10**-6) #Wavelength in meter\n",
+ "r1=(r2*PI)/(180*3600) #Converting it into radian per second\n",
+ "\n",
+ "#From equation 10.12\n",
+ "theta=(8*PI*n*PI*(r**2)*r1)/(l*c) #Where theta is the phase shift\n",
+ "theta=round(theta,5)\n",
+ "\n",
+ "print \"The Phase Shift in Sagnac Gryoscope is \"+str(theta)+\" radian\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 10.5, Page Number 514"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Amount of Polarization rotation is 0.0015 degree\n"
+ ]
+ }
+ ],
+ "source": [
+ "#For Silica\n",
+ "V=4 #in Radian / m T\n",
+ "n=10 #No of turns\n",
+ "I=30 #Current in ampere\n",
+ "ur=1 #Relative permaebility\n",
+ "uo=4*3.14*(10**-7) #Absolute permaebility\n",
+ "PI=3.14\n",
+ "#From equation 10.14\n",
+ "t=PI/180\n",
+ "theta=n*V*uo*ur*I #where theta is the polarization rotation\n",
+ "theta=round(theta,4)\n",
+ "\n",
+ "print \"The Amount of Polarization rotation is \"+str(theta)+\" degree\"\n",
+ "\n",
+ "#Answer miscalculated in 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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter1_2.ipynb b/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter1_2.ipynb
new file mode 100644
index 00000000..47b342a2
--- /dev/null
+++ b/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter1_2.ipynb
@@ -0,0 +1,244 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 1: Light"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.1, Page Number 10"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Brewsters Angle of the Material is 56.31 Degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import degrees\n",
+ "from math import atan\n",
+ "\n",
+ "n2=1.5 #Given Refractive Index of Glass in Air\n",
+ "n1=1 #Given Refractive Index of Air\n",
+ "\n",
+ "theta=0 #Brewster's Angle\n",
+ "#From Equation 1.13 (Brewsters angle= Tan Inverse (n2/n1))\n",
+ "theta=degrees(atan(1.5))\n",
+ "print \"The Brewsters Angle of the Material is \"+str(round(theta,2))+\" Degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.2, Page Number 13"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "In Coherant Sources The Maximum Irradiance is 16I\n",
+ "In Incoherant Sources The Maximum Irradiance is 4I\n"
+ ]
+ }
+ ],
+ "source": [
+ "n=4 #Total Number of Sources\n",
+ "\n",
+ "#For Coherant Sources\n",
+ "print \"In Coherant Sources The Maximum Irradiance is \"+str(n*n)+\"I\" #Where I is the Irradiance at any point\n",
+ "#For Incoherant Sources\n",
+ "print \"In Incoherant Sources The Maximum Irradiance is \"+str(n)+\"I\" "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1.3, Page Number 23"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "(A)The Minimum Seperation Between the Sources is 0.0025 m\n",
+ "(B)The Minimum Wavelength Difference which may be resolved is 2.08333333333e-11 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "D=0.1 #Diameter of the Objective Lens\n",
+ "d1=500 #Distance from the source\n",
+ "l =0.000000500 #Wavelength Provided\n",
+ "p=1 #First Order\n",
+ "N=40*600 #The diffraction grating is 40 mm wide and has 600 lines/mm\n",
+ "\n",
+ "#From Equation 1.29 we Have\n",
+ "Smin=(d1*l)/D #Where Smin is the minimum Seperation of the Sources\n",
+ "print \"(A)The Minimum Seperation Between the Sources is \"+str(Smin)+\" m\"\n",
+ "\n",
+ "#We know that Chromatic resolving power is given by l/dl where dl is the Minimum Wavelength Difference\n",
+ "#From Equation l/dl=p*N\n",
+ "dl=l/(N*p)\n",
+ "\n",
+ "print \"(B)The Minimum Wavelength Difference which may be resolved is \"+str(dl)+\" m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 1.4, Page Number 29"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Total Power Radiated from the Source is 6.3504 W\n"
+ ]
+ }
+ ],
+ "source": [
+ "em=0.7 #Emissivity Of the Surface\n",
+ "T=2000 #Temperature in Kelvin\n",
+ "A=0.00001 #Area in Meter Square\n",
+ "S=5.67*(10**-8) #Stefan-Boltzmann Constant\n",
+ "\n",
+ "W=S*A*em*(T**4) #Where W is the total power radiated\n",
+ "\n",
+ "print \"The Total Power Radiated from the Source is \"+str(W)+\" W\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 1.5, Page Number 31"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Ionization Energy required to excite the electron from ground to Infinity 13.66 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "Z=1 #Atomic Number of Hydrogen\n",
+ "m=9.1*(10**-31) #Mass of a Electron\n",
+ "e=1.6*(10**-19) #Charge Of a Electron\n",
+ "p=6.6*(10**-34) #Plancks Constant\n",
+ "e1=8.85*(10**-12)#Permittivity of Free Space\n",
+ "#From Equation 1.43\n",
+ "E=(m*(Z**2)*(e**4))/(8*(p**2)*(e1**2)) #Where E is the Ionization Energy\n",
+ "E2=E/e #Converting in Electron Volts\n",
+ "E2=round(E2,2)\n",
+ "\n",
+ "print \"The Ionization Energy required to excite the electron from ground to Infinity \"+str(E2)+\" eV\"\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 1.6, Page Number 32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Required Work function is 4.5375 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "e=1.6*(10**-19) #Charge Of a Electron\n",
+ "h=6.6*(10**-34) #Plancks Constant\n",
+ "vo=1.1*(10**15) #Threshold Frequency in Hertz\n",
+ "\n",
+ "# We Know h*vo=phi*e where phi is the required Work Function\n",
+ "# We assume that the ejected electron has zero kinetic energy\n",
+ "\n",
+ "phi=h*vo/e\n",
+ "print \"The Required Work function is \"+str(phi)+\" eV\""
+ ]
+ }
+ ],
+ "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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter2_2.ipynb b/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter2_2.ipynb
new file mode 100644
index 00000000..2ff8a275
--- /dev/null
+++ b/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter2_2.ipynb
@@ -0,0 +1,360 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#Chapter Two : Elements Of Solid State Physics"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 2.1, Page Number 51"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Free Electron Concentration is 8.43e+28 /meter cube\n",
+ "Conductivity of copper and intrinsic silicon is 607138810.2 and 0.00047 respectively in per ohm meter\n"
+ ]
+ }
+ ],
+ "source": [
+ "d1=8.93*(10**3) #Density of Copper in Kg/meter cube\n",
+ "N=63.54 #atomic mass number of copper\n",
+ "t=2.6*(10**-14)#Mean free time between collision in seconds\n",
+ "m=9.1*(10**-31) #Mass of electron \n",
+ "em=0.135 #Electron Mobility\n",
+ "hm=0.048 #Hole Mobility\n",
+ "n=p=1.6*(10**16) #Concentration per meter cube\n",
+ "ac=6*(10**26) #a given Constant\n",
+ "e=1.6*(10**-19) #Charge of electron\n",
+ "\n",
+ "n1=(ac*d1)/N #Free electron concentration/No. of atoms per unit volume\n",
+ "\n",
+ "#from equation 2.22\n",
+ "rhoc=(n1*e*em)/3 #Conductivity of copper in per ohm m\n",
+ "rhoc=round(rhoc,2)\n",
+ "\n",
+ "#from equation 2.24\n",
+ "rhos=n*e*(em+hm) #Conductivity of Copperintrinsic silicon in per ohm m\n",
+ "rhos=round(rhos,5)\n",
+ "\n",
+ "print \"Free Electron Concentration is %.2e /meter cube\"%(n1)\n",
+ "\n",
+ "print \"Conductivity of copper and intrinsic silicon is \"+str(rhoc)+\" and \"+str(rhos)+\" respectively in per ohm meter\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 2.2, Page Number 55"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Excitation Energy is given by 0.0254 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "r=11.8 #Relative Permaebility\n",
+ "m=9.1*(10**-31) #Mass of electron\n",
+ "me=0.26*m #Effective mass \n",
+ "\n",
+ "#From equation 2.28\n",
+ "\n",
+ "E=13.6*(me/m)*((1/r)**2) #where E is the excitation energy\n",
+ "E=round(E,5)\n",
+ "\n",
+ "print \"The Excitation Energy is given by \"+str(E)+\" eV\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 2.3, Page Number 60"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Effective Density of States in the Conduction Band is 1.03e+25 Per Meter Cube\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import pow\n",
+ "\n",
+ "PI=3.14\n",
+ "m=9.1*(10**-31) #Mass of electron\n",
+ "me=0.55*m #Effective mass\n",
+ "T=300 #Temperature in Kelvin\n",
+ "k=1.38*(10**-23) #Boltzmann Constant\n",
+ "h=6.6*(10**-34) #Plancks Constant\n",
+ "\n",
+ "#From equation 2.33\n",
+ "\n",
+ "N=2*(pow((2*PI*me*k*T)/(h*h),1.5)) #Where N is the Effective density of states in the conduction band\n",
+ "\n",
+ "\n",
+ "print \"The Effective Density of States in the Conduction Band is %.2e Per Meter Cube\"%(N)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 2.4, Page Number 64"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Hole Lifetime For GaAs is 2.78e-10 seconds\n",
+ "The Hole Lifetime For Si is 0.00011 seconds\n"
+ ]
+ }
+ ],
+ "source": [
+ "n=5*(10**24) #Donor Concentration in per meter cube\n",
+ "\n",
+ "#For GaAs\n",
+ "t1=1/((7.2*(10**-16))*n) #where t1 is the Hole lifetime\n",
+ "\n",
+ "#For Si\n",
+ "t2=1/((1.8*(10**-21))*n) \n",
+ "t2=round(t2,5)\n",
+ "print \"The Hole Lifetime For GaAs is %.2e seconds\"%(t1)\n",
+ "print \"The Hole Lifetime For Si is \"+str(t2)+\" seconds\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 2.5, Page Number 70"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Contact Potential Difference is 0.42 Volts\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log1p\n",
+ "\n",
+ "nd=10**22 #Donor Impurity Level in per meter cube\n",
+ "na=10**24 #Acceptor Impurity Level in per meter cube\n",
+ "n=2.4*(10**19) #Intrinsic Electron Concentration in per meter cube\n",
+ "T=290 #Temperature in Kelvin\n",
+ "k=1.38*(10**-23) #Botlzmann Constant\n",
+ "e=1.6*(10**-19) #Charge of a electron\n",
+ "\n",
+ "#From Equation 2.45 \n",
+ "v=(k*T/e)*log1p((nd*na)/(n**2)) #Where v is the contact potentital difference in volts\n",
+ "v=round(v,2)\n",
+ "print \"The Contact Potential Difference is \"+str(v)+\" Volts\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 2.6, Page Number 73"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "P-N concentration is 2.56e+11 /meter cube\n",
+ "N-P concentration is 25600000000.0 /meter cube\n",
+ "The Saturation Current Density is 1.60e-07 A/meter square\n",
+ "The Reverse Bias Saturation Current is 1.60e-13 A\n"
+ ]
+ }
+ ],
+ "source": [
+ "nd=10**21 #Donor Concentration per meter cube\n",
+ "na=10**22 #Acceptor Concentration per meter cube\n",
+ "de=3.4*(10**-3) #Drift current-electron\n",
+ "dh=1.2*(10**-3) #Drift current-holes\n",
+ "le=7.1*(10**-4) #per meter\n",
+ "lh=3.5*(10**-4) #per meter\n",
+ "n=1.6*(10**16) #per meter cube\n",
+ "e=1.6*(10**-19) #charge of the electron\n",
+ "\n",
+ "#Assuming all ions are ionized\n",
+ "\n",
+ "pn=(2.56*(10**32))/nd\n",
+ "np=pn/10\n",
+ "\n",
+ "#From Equation 2.51a\n",
+ "jo=e*((dh/lh)*pn+(de/le)*np) #where Jo is the saturation current density\n",
+ "\n",
+ "A=10**6 #Junction area\n",
+ "io=jo/A #where io is the reverse bias saturation current\n",
+ "\n",
+ "\n",
+ "print \"P-N concentration is \"+str(pn)+\" /meter cube\"\n",
+ "print \"N-P concentration is \"+str(np)+\" /meter cube\"\n",
+ "print \"The Saturation Current Density is %.2e A/meter square\"%(jo)\n",
+ "print \"The Reverse Bias Saturation Current is %.2e A\"%(io)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 2.7, Page Number 78"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Junction Capacitance is 3.34e-11 Farad\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "\n",
+ "V=-4 #Reverse Bias voltage\n",
+ "nd=4*(10**21) #in per meter cube\n",
+ "Vo=0.8 \n",
+ "A=4*(10**-7) #Junction Area\n",
+ "er=11.8 #Relative permittivity\n",
+ "e=1.6*(10**-19) #Charge of a Electron\n",
+ "eo=8.85*(10**-12) #absolute permittivity \n",
+ "\n",
+ "#Since in A p+-n junction\n",
+ "#By equation 2.63\n",
+ "\n",
+ "C=(A/2)*sqrt((2*eo*er*e*nd)/(Vo-V))\n",
+ "\n",
+ "print \"The Junction Capacitance is %.2e Farad\"%(C)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 2.8, Page Number 84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Effective Increase in the width of the Energy Gap is 0.062 eV\n"
+ ]
+ }
+ ],
+ "source": [
+ "Lz=10*(10**-9) #Thickness in meter\n",
+ "m=9.1*(10**-31) #Mass of Electron\n",
+ "me=0.068*m #Effective mass of electron\n",
+ "mh=0.56*m #Effective mass of holes\n",
+ "h=6.6*(10**-34) #Plancks Constant\n",
+ "e=1.6*(10**-19) #Charge of electron\n",
+ "\n",
+ "Eg=((h*h)/(8*(Lz*Lz)))*((1/me)+(1/mh)) #Where Eg is the effective increase in the width of the energy gap\n",
+ "Eg1=Eg/e #Converting in eV\n",
+ "Eg1=round(Eg1,3)\n",
+ "print \"The Effective Increase in the width of the Energy Gap is \"+str(Eg1)+\" eV\""
+ ]
+ }
+ ],
+ "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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter3_2.ipynb b/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter3_2.ipynb
new file mode 100644
index 00000000..fb9288b1
--- /dev/null
+++ b/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter3_2.ipynb
@@ -0,0 +1,368 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#Chapter Three : Modulation Of Light"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 3.1, Page Number 97"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "---------------------------------------------------------------\n",
+ " Material Linear Electro Optic n+ n- Relative \n",
+ " Coefficient r(pm/V) Permittivity\n",
+ "----------------------------------------------------------------\n",
+ " KDP 10.6 1.51 1.47 42 \n",
+ " KD*P 26.4 1.51 1.47 50 \n",
+ " ADP 8.5 1.52 1.48 43 \n",
+ " CdTe 6.8 2.6 10.6\n",
+ " GaAs 1.6 3.6 11.5\n",
+ " ZnS 2.1 2.32 16\n",
+ "-----------------------------------------------------------------\n",
+ " Table 3.1\n",
+ "The Change in Refraction Index due to pockels effect is 1.82e-05 \n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"---------------------------------------------------------------\"\n",
+ "print \" Material Linear Electro Optic n+ n- Relative \"\n",
+ "print \" Coefficient r(pm/V) Permittivity\"\n",
+ "print \"----------------------------------------------------------------\"\n",
+ "print \" KDP 10.6 1.51 1.47 42 \"\n",
+ "print \" KD*P 26.4 1.51 1.47 50 \"\n",
+ "print \" ADP 8.5 1.52 1.48 43 \"\n",
+ "print \" CdTe 6.8 2.6 10.6\"\n",
+ "print \" GaAs 1.6 3.6 11.5\"\n",
+ "print \" ZnS 2.1 2.32 16\"\n",
+ "print \"-----------------------------------------------------------------\"\n",
+ "print \" Table 3.1\"\n",
+ "l=10*(10**-3) #width of crystal\n",
+ "V=4000 #Applied Voltage\n",
+ "\n",
+ "#From equation 3.1\n",
+ "\n",
+ "#Using data in Table 3.1\n",
+ "dn=0.5*26.4*(10**-12)*(1.51**3)*(V/(10**-2)) #where dn is the change in refraction index\n",
+ "print \"The Change in Refraction Index due to pockels effect is %.2e \"%(dn)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 3.2, Page Number 101"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "---------------------------------------------------------------\n",
+ " Material Linear Electro Optic n+ n- Relative \n",
+ " Coefficient r(pm/V) Permittivity\n",
+ "----------------------------------------------------------------\n",
+ " KDP 10.6 1.51 1.47 42 \n",
+ " KD*P 26.4 1.51 1.47 50 \n",
+ " ADP 8.5 1.52 1.48 43 \n",
+ " CdTe 6.8 2.6 10.6\n",
+ " GaAs 1.6 3.6 11.5\n",
+ " ZnS 2.1 2.32 16\n",
+ "-----------------------------------------------------------------\n",
+ " Table 3.1\n",
+ "\n",
+ "Using Data from table 3.1 \n",
+ "The Half Wave Voltage for KDP is 14522.4 Volt\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"---------------------------------------------------------------\"\n",
+ "print \" Material Linear Electro Optic n+ n- Relative \"\n",
+ "print \" Coefficient r(pm/V) Permittivity\"\n",
+ "print \"----------------------------------------------------------------\"\n",
+ "print \" KDP 10.6 1.51 1.47 42 \"\n",
+ "print \" KD*P 26.4 1.51 1.47 50 \"\n",
+ "print \" ADP 8.5 1.52 1.48 43 \"\n",
+ "print \" CdTe 6.8 2.6 10.6\"\n",
+ "print \" GaAs 1.6 3.6 11.5\"\n",
+ "print \" ZnS 2.1 2.32 16\"\n",
+ "print \"-----------------------------------------------------------------\"\n",
+ "print \" Table 3.1\"\n",
+ "\n",
+ "l=1.06*(10**-6) #Wavelength in meter\n",
+ "\n",
+ "#Using Data from table 3.1 below\n",
+ "\n",
+ "V=l/(2*10.6*(10**-12)*(1.51**3)) #Where V is the half wave voltage\n",
+ "V=round(V,1)\n",
+ "print \"\"\n",
+ "print \"Using Data from table 3.1 \"\n",
+ "print \"The Half Wave Voltage for KDP is \"+str(V)+\" Volt\"\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 3.3, Page Number 105"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "---------------------------------------------------------------\n",
+ " Material Linear Electro Optic n+ n- Relative \n",
+ " Coefficient r(pm/V) Permittivity\n",
+ "----------------------------------------------------------------\n",
+ " KDP 10.6 1.51 1.47 42 \n",
+ " KD*P 26.4 1.51 1.47 50 \n",
+ " ADP 8.5 1.52 1.48 43 \n",
+ " CdTe 6.8 2.6 10.6\n",
+ " GaAs 1.6 3.6 11.5\n",
+ " ZnS 2.1 2.32 16\n",
+ "-----------------------------------------------------------------\n",
+ " Table 3.1\n",
+ "\n",
+ "\n",
+ "The Power Requirements for Modulation using a Pockels cell is 306.1 W\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"---------------------------------------------------------------\"\n",
+ "print \" Material Linear Electro Optic n+ n- Relative \"\n",
+ "print \" Coefficient r(pm/V) Permittivity\"\n",
+ "print \"----------------------------------------------------------------\"\n",
+ "print \" KDP 10.6 1.51 1.47 42 \"\n",
+ "print \" KD*P 26.4 1.51 1.47 50 \"\n",
+ "print \" ADP 8.5 1.52 1.48 43 \"\n",
+ "print \" CdTe 6.8 2.6 10.6\"\n",
+ "print \" GaAs 1.6 3.6 11.5\"\n",
+ "print \" ZnS 2.1 2.32 16\"\n",
+ "print \"-----------------------------------------------------------------\"\n",
+ "print \" Table 3.1\"\n",
+ "\n",
+ "\n",
+ "bw=10**9 #Frequency Bandwidth in Hertz\n",
+ "d=25*(10**-3) #Diameter of circular aperture\n",
+ "l=30*(10**-3) #Length\n",
+ "wl=633*(10**-9) #Given Wavelength\n",
+ "PI=3.14\n",
+ "k=8.85*(10**-12) #Permittivty of free space\n",
+ "#From equation 3.15 & data from table 3.1\n",
+ "P=((PI**2)*(wl**2)*PI*((d/2)**2)*bw*k*50)/(4*PI*(30**2)*((26.4*(10**-12))**2)*(1.51**6)*l) #Where P is the power requirements\n",
+ "P=round(P,1)\n",
+ "\n",
+ "print \"\"\n",
+ "print \"\"\n",
+ "print \"The Power Requirements for Modulation using a Pockels cell is \"+str(P)+\" W\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 3.4, Page Number 114"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The angle of diffraction is 0.42 Degree\n",
+ "The Internal Braggs Angle is 113.6 Degree\n",
+ "The Maximum Change in Refraction index is 3.65e-06\n",
+ "The Maximum Optical Beam Width is 0.0007 meter\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import asin\n",
+ "from math import degrees\n",
+ "from math import cos\n",
+ "from math import sqrt\n",
+ "\n",
+ "l=633*(10**-9) #Given Wavelength in meter\n",
+ "bw=5.0*(10**6) #Bandwidth in hertz\n",
+ "l1=50*(10**-3) #Modulation length\n",
+ "de=0.7 #Diffraction Efficiency\n",
+ "al=4.3*(10**-5) #Acoustic Wavelength in meter\n",
+ "av=3500.0 #Acoustic velocity in meter per second\n",
+ "\n",
+ "#From equation 3.20\n",
+ "\n",
+ "theta=asin(l/(2*al)) #where theta is the angle of diffraction\n",
+ "theta1=degrees(theta) #Converting it into degrees \n",
+ "theta1=round(theta1,2)\n",
+ "\n",
+ "#From equation 3.21\n",
+ "\n",
+ "phi=2*(asin(sqrt(de))) #where phi is the internal braggs angle\n",
+ "phi1=degrees(phi) #Converting it into degrees \n",
+ "phi1=round(phi1,1)\n",
+ "\n",
+ "e=cos(theta1)\n",
+ "\n",
+ "dn=(phi*l*e)/(3.14*2*l1) #where dn is the maximum change in refraction index\n",
+ "\n",
+ "B=av/bw\n",
+ "\n",
+ "print \"The angle of diffraction is \"+str(theta1)+\" Degree\"\n",
+ "print \"The Internal Braggs Angle is \"+str(phi1)+\" Degree\"\n",
+ "print \"The Maximum Change in Refraction index is %.2e\"%(dn)\n",
+ "print \"The Maximum Optical Beam Width is \"+str(B)+\" meter\"\n",
+ "\n",
+ "#Answer Number 3 is Misprinted in the book\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 3.5, Page Number 123"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "-----------------------------------------------\n",
+ " Wavelength no nc \n",
+ "(Micrometer) \n",
+ "------------------------------------------------\n",
+ " 1.06 1.4943 1.4603 \n",
+ " 0.53 1.5132 1.4712\n",
+ "-------------------------------------------------\n",
+ "\n",
+ "The Phase matching angle is 26.0 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import asin\n",
+ "from math import degrees\n",
+ "\n",
+ "print \"-----------------------------------------------\"\n",
+ "print \" Wavelength no nc \"\n",
+ "print \"(Micrometer) \"\n",
+ "print \"------------------------------------------------\"\n",
+ "print \" 1.06 1.4943 1.4603 \"\n",
+ "print \" 0.53 1.5132 1.4712\"\n",
+ "print \"-------------------------------------------------\"\n",
+ "\n",
+ "print \"\"\n",
+ "#from problem 3.10\n",
+ "t2=((1.4943**-2)-(1.5132**-2))/((1.4712**-2)-(0.4367))\n",
+ "theta1=asin(t2)\n",
+ "\n",
+ "theta1=degrees(theta1) #Where theta is the phase matching angle\n",
+ "theta1=round(theta1,1)\n",
+ "print \"The Phase matching angle is \"+str(theta1)+\" degrees\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 3.6, Page Number 124"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Coherance Length is 9e-06 meter\n"
+ ]
+ }
+ ],
+ "source": [
+ "nw=1.5019 #Refraction index at 0.8 micrometer\n",
+ "n2w=1.4802 #Refraction index at 0.4 micrometer\n",
+ "l=0.8*(10**-6) #Vaccum wavelength at the fundamental frequency\n",
+ "\n",
+ "lc=l/(4*(nw-n2w)) #Where lc is the coherance length\n",
+ "\n",
+ "print \"The Coherance Length is %.e meter\"%(lc) "
+ ]
+ }
+ ],
+ "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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter4_2.ipynb b/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter4_2.ipynb
new file mode 100644
index 00000000..4be1e6d1
--- /dev/null
+++ b/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter4_2.ipynb
@@ -0,0 +1,209 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter Four : Display Devices"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 4.1, Page Number 131 "
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The probability of Escape per second of the trapped Electron 11.25 /s\n",
+ "The Luminescence Lifetime is 0.09 seconds\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp\n",
+ "\n",
+ "k=0.025 #in Electron Volts\n",
+ "E=0.4 #in Electron Volts (The difference between Ec & Ed)\n",
+ "Q=(10**8) # A given Constant in per second\n",
+ "\n",
+ "j=E/k\n",
+ "O=Q*exp(-j) #Where O is the required probability\n",
+ "O=round(O,2)\n",
+ "Q1=1/O\n",
+ "Q1=round(Q1,2)\n",
+ "print \"The probability of Escape per second of the trapped Electron \"+str(O)+\" /s\"\n",
+ "print \"The Luminescence Lifetime is \"+str(Q1)+\" seconds\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 4.2, Page Number 152"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Fractional Tranmission for Isotropic Radiation originating inside GaAs is 0.013\n",
+ "The Critical Angle which might explain the Low efficiency for the interface is 16.0 Degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import degrees\n",
+ "from math import asin\n",
+ "\n",
+ "n1=3.6 #For a Given GaAs/Air Interface\n",
+ "n2=1 #For Air\n",
+ "\n",
+ "#Using Equation 4.14\n",
+ "n3=n1-n2\n",
+ "n4=n1+n2\n",
+ "n6=(n3/n4)**2\n",
+ "n5=(n2/n1)**2\n",
+ "\n",
+ "F=0.25*(n5)*(1-n6) #Where F is the Fractional Transmission for Isotropic Radiation Originating \n",
+ "F=round(F,3)\n",
+ "\n",
+ "theta=degrees(asin(1/n1)) #Critical Angle in Degrees\n",
+ "theta=round(theta,0)\n",
+ "\n",
+ "print \"The Fractional Tranmission for Isotropic Radiation originating inside GaAs is \"+str(F)\n",
+ "print \"The Critical Angle which might explain the Low efficiency for the interface is \"+str(theta)+\" Degrees\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 4.3, Page Number 158"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Emitting Area subtends an angle Theta =0.0001\n",
+ "Since theta is less than one, it acts as a Point Source\n",
+ "The Total Radiant Power is 0.000112 W\n",
+ "Observing from the below graph at 550 nm\n",
+ "The Luminous Flux from the source is0.067 lm\n",
+ "The Luminous Intensity is 0.0107 Candela\n"
+ ]
+ },
+ {
+ "data": {
+ "text/plain": [
+ "<matplotlib.text.Text at 0x3d68198>"
+ ]
+ },
+ "execution_count": 3,
+ "metadata": {},
+ "output_type": "execute_result"
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYcAAAEhCAYAAACUW2yNAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3X+YVmW97/H3x0EM26YHO5EhKroNyZOEEahpDkdPIpUW\ntndSqSdK3acsT+bOdLt1tl0Z2tWu1DJzUNlqgimlWBl1auioJZI/UECB/AEjihU7DyVX8uN7/lhr\n9HHmmWF+POtZ61nP53VdXPP8uGc938WC+c79ve973YoIzMzMKu2UdwBmZlY8Tg5mZtaDk4OZmfXg\n5GBmZj04OZiZWQ9ODmZm1oOTg5WapG2SHkr/PChpX0n3DvAY/yBpeXqsQ3tpM0bSr9J2j0n6XJU2\nX5C0XdLIwZ6PWb0MyzsAs4y9FBETu7327gEe41HgQ8A1fbTZAnw+Ih6W9HfA7yT9PCJWQpI8gP8B\nPDPAzzbLhXsO1nQk/SX9upOk70haKWmRpB9LOql7+4h4PCJW9XXMiHg+Ih5OH/8FWAm8paLJvwNf\nrN1ZmGXLycHKbkRFWen29LWu2wLMAPaNiPHAKcDhFe8NmqT9gInA/enzE4HOiFg21GOb1YvLSlZ2\nm6uUlbocCdwKEBEbJP1qqB+WlpRuA86OiL9I2hW4gKSk9EqzoX6OWdbcc7BmFtTwB7WknYHbgZsi\n4kfpywcA+wGPSHoK2JtkPOJNtfpcsyw4OVgzuxc4SYlRQGs/vqdqMpEkYA6wIiK+2fV6RDwaEaMi\nYmxEjAU6gUMj4oWhh2+WHScHK7tqYwhdr91O8sN6BXAj8CDwYvfGkj4kaR1wGPBjST9NX3+LpB+n\nzd4NfByYWjHGMa2f8ZgVjnzLbmtmkl4fEX+VtCfJAPIR/q3ezAPSZndJ2gMYDlzixGCWcM/BzMx6\n8JiDmZn14ORgZmY9ODmYmVkP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yl8mMl7dxHmwBaImIK8L9JNooB+DTwp4g4GPhX4J3JKcSXgM0RMTG9\nR5hI7mFzVUT8N+DPQLVSVmUvprfP7O4dwNkkvav9JR1R8f3PpHeS/TVwA8k9hA4D/q2XY5m9RhHv\nrWTN7T6S0tIRwL+T3G/+COBFkrITJHe2/WdgV2AkSQ/jLuBWkqRwGcn9ZP4ROIikF/KL9P5ILcD6\nis8TMG4HbRakXx8k2UEL4N3ANwEiYnlXL6UXT0VE1/u/qzhGX6p9ZndL0oSKpIfTdvel792Zfn0U\neH1E/BX4q6S/SXpDRPy/fsRgTczJwYrmXpIfvG8n+cG2DjiXJDlcl5Zkvg28MyKelXQxMCL93vnA\nDyQtIPkt/veS3g4sj4gjun9QN321+Vv6dRuv/T9Tdf+RPr6/6xgjemvYj8/s67jDqry3HXi54vXt\nfRzP7BUuK1nR3Ae8n6RkExHxn8AeJKWl+4Cuev2fJP0d8A+k5ZiIeJLkh+S/AvPSdk8A/1XSYQCS\ndpZUOcgd/WhTzb2kd7tM27694r0taTlroPqbbPI+pjUBJwcrmsdIZin9tuK1ZcCfI2JjRPwZuDZt\ndzdwf7f+cvc0AAAAoUlEQVTvnw98jKTERES8DHwYuCwtvTzEq4PepG227KhNZfP063dIEspy4Msk\n+yB07U/8PWBZxYB09xlRvc2QGsjr/Z1p1b2db8Ns/eJbdpsNQjrVdueI+JukA4CfA29NB8zNGp5r\nj2aD83rgl+lMJwH/y4nBysQ9BzMz68FjDmZm1oOTg5mZ9eDkYGZmPTg5mJlZD04OZmbWg5ODmZn1\n8P8B6pWwjU7mdJcAAAAASUVORK5CYII=\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x3d681d0>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "%matplotlib inline\n",
+ "import math \n",
+ "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel\n",
+ "\n",
+ "d=0.2*(10**-3) #Chip Diameter in meter\n",
+ "d1=1 #Distance in Meter\n",
+ "l=550*(10**-9 ) #Wavelength in Meter\n",
+ "q=0.001 #External Quantam Efficiency\n",
+ "i=50*(10**-3) #Operational Current\n",
+ "h=6.6*(10**-34)#Plancks Constant\n",
+ "c=3*(10**8)#Speed of Light\n",
+ "e=1.6*(10**-19)\n",
+ "\n",
+ "theta=(d/2) #Whence theta is the angle emitting area subtends and is less than 1\n",
+ "print \"Emitting Area subtends an angle Theta =\"+str(theta)\n",
+ "print \"Since theta is less than one, it acts as a Point Source\"\n",
+ "\n",
+ "W=((h*c)/l)*q*(i/e) #Where W is the total Radiant Power in terms of W\n",
+ "W=round(W,6)\n",
+ "\n",
+ "print \"The Total Radiant Power is \"+str(W)+\" W\"\n",
+ "\n",
+ "#From the above graph\n",
+ "l1=600 #Average Luminousity \n",
+ "print \"Observing from the below graph at 550 nm\"\n",
+ "lf=W*l1 #Where lf is the lumnious flux from the source\n",
+ "lf=round(lf,3)\n",
+ "\n",
+ "print \"The Luminous Flux from the source is\"+str(lf)+\" lm\"\n",
+ "\n",
+ "li=lf/(2*3.14)#Where li is the luminous intensity at normal incidence since flux is distributed over angle 2PI\n",
+ "li=round(li,4)\n",
+ "\n",
+ "print \"The Luminous Intensity is \"+str(li)+\" Candela\"\n",
+ "\n",
+ "X = [400,500,555,600,650,700]\n",
+ "V = [0.0,0.3,1.0,0.7,0.3,0.0]\n",
+ "plot(X,V);\n",
+ "xlabel(\"Wavelength in nm\")\n",
+ "ylabel(\"V\")\n",
+ "suptitle(\"Fig 1.24\")"
+ ]
+ }
+ ],
+ "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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter5_2.ipynb b/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter5_2.ipynb
new file mode 100644
index 00000000..bae05243
--- /dev/null
+++ b/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter5_2.ipynb
@@ -0,0 +1,270 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter Five : Lasers I"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 5.1, Page Number 173"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Ratio of rates of spontaneous & stimulated emission is 155829.12\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp\n",
+ "\n",
+ "T=2000 # In Kelvin\n",
+ "v=5*(10**14) #Frequency In Hertz\n",
+ "h=6.6*(10**-34) #Plancks Constant\n",
+ "k=1.38*(10**-23) #Boltzman Constant\n",
+ "\n",
+ "#From Equation 5.9b\n",
+ "\n",
+ "R=exp((h*v)/(k*T))-1 \n",
+ "R=round(R,2)\n",
+ "print \"The Ratio of rates of spontaneous & stimulated emission is \"+str(R)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 5.2, Page Number 176"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Given Energy Difference of the Two Levels is 2.25 eV\n",
+ "The Relative Population of the Energy Levels is 1.72e-38\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp\n",
+ "T=300 #Given Room Temperature in kelvin\n",
+ "l=550*(10**-9) #Average Wavelength of Visible Radiation\n",
+ "h=6.6*(10**-34) #Plancks Constant\n",
+ "c=3*(10**8) #Speed Of light\n",
+ "k=1.38*(10**-23) #Boltzman Constant\n",
+ "e=1.6*(10**-19) #Charge of a Electron\n",
+ "\n",
+ "E=(h*c)/l #Where E is the given Energy Difference\n",
+ "E1=E/e\n",
+ "#From Equation 5.4 & given that g1=g2\n",
+ "\n",
+ "N=exp((-1*E)/(k*T)) #Where N is the ratio of N2 and N1\n",
+ "\n",
+ "print \"The Given Energy Difference of the Two Levels is \"+str(E1)+\" eV\"\n",
+ "\n",
+ "print \"The Relative Population of the Energy Levels is %.2e\"%(N)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 5.3, Page Number 184"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "Small Signal Gain Coefficient is 5.11e+22 /meter cube\n"
+ ]
+ }
+ ],
+ "source": [
+ "#For NdYAG\n",
+ "t=230*(10**-6) #Spontaneous Lifetime\n",
+ "l=1.06*(10**-6) #Wavelength in meter\n",
+ "n=1.82 #Refractive Index\n",
+ "w=3*(10**12) #Linewidth in Hertz\n",
+ "h=6.6*(10**-34) #Plancks Constant\n",
+ "PI=3.14\n",
+ "#From equation 5.8\n",
+ "\n",
+ "B21=(l**3)/(8*PI*h*t*(n**3)) #Where B21 is the Einstein Coefficient\n",
+ "\n",
+ "#From equation 5.18\n",
+ "k=1\n",
+ "\n",
+ "kvs=(k*l*w)/(B21*h*n) #Small Signal Gain Coefficient per meter cube\n",
+ "\n",
+ "print \"Small Signal Gain Coefficient is %.2e /meter cube\"%(kvs)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 5.4, Page Number 205"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Reflectance at a GaAs/Air Interface is 0.32\n"
+ ]
+ }
+ ],
+ "source": [
+ "n2=3.6 #Refractive Index for GaAs\n",
+ "n1=1 #Refractive Index for Air\n",
+ "#From Fresnels Equation\n",
+ "\n",
+ "R=((n2-n1)/(n2+n1))**2\n",
+ "R=round(R,2)\n",
+ "\n",
+ "print \"The Reflectance at a GaAs/Air Interface is \"+str(R)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 5.5, Page Number 209"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Threshold Gain is 7461.0 /m\n",
+ "The Threshold Current Density is 15972801.15 A/mm square\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log1p\n",
+ "\n",
+ "#For GaAs Junction\n",
+ "l=0.84*(10**-6) #Wavelength in meter\n",
+ "w=1.45*(10**13) #Linewidth in Hertz\n",
+ "y=3.5*(10**3) #Loss Coefficient per meter\n",
+ "n=3.6 #Refractive Index for GaAs\n",
+ "q=1 #Quantam Efficiency\n",
+ "le=300*(10**-6)#length in meter\n",
+ "d=2*(10**-6) \n",
+ "R=0.32 #Reflectance\n",
+ "c=3*(10**8) #Speed of light in m/s\n",
+ "e=1.6*(10**-19) #Charge of electron\n",
+ "#From Equation 5.17\n",
+ "\n",
+ "v=c/l #Frequency\n",
+ "\n",
+ "k=y+((1/(2*le))*log1p(1/(R*R)))#Where k is the threshold gain \n",
+ "k=round(k,0)\n",
+ "#From Equation 5.39\n",
+ "\n",
+ "J=(8*3.14*w*e*(n**2)*d*k*(v**2))/(c**2)\n",
+ "J=round(J,2)\n",
+ "print \"The Threshold Gain is \"+str(k)+\" /m\"\n",
+ "print \"The Threshold Current Density is \"+str(J)+\" A/mm square\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 5.6, Page number 225"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Overall Power Efficiency is 0.02 Percent\n"
+ ]
+ }
+ ],
+ "source": [
+ "i=10*(10**-3) #Current in ampere\n",
+ "V=2500 \n",
+ "P=5*(10**-3) #optical Output\n",
+ "\n",
+ "E=P/(i*V) #Where E is the overall Power Efficiency\n",
+ "E=E*100\n",
+ "print \"The Overall Power Efficiency is \"+str(E)+\" Percent\""
+ ]
+ }
+ ],
+ "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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter6_2.ipynb b/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter6_2.ipynb
new file mode 100644
index 00000000..44ad2c61
--- /dev/null
+++ b/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter6_2.ipynb
@@ -0,0 +1,319 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter Six : Laser II"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 6.1, Page Number 252"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Mode Seperation is 833333333.0 Hertz\n",
+ "The Pulse Seperation is 1.20e-09 seconds\n",
+ "The Number of Modes Oscillating is 132.0\n",
+ "The Pulse Duration is 9.1e-12 seconds\n"
+ ]
+ }
+ ],
+ "source": [
+ "lw=1.1*(10**11) #Fluorescent Linewidth in Hertz\n",
+ "l=0.1 #length of laser rod in meter\n",
+ "n=1.8 #given Refraction Index\n",
+ "c=3*(10**8) #Speed of light\n",
+ "\n",
+ "ms=c/(2*l*n) #where ms is the mode seperation in hertz\n",
+ "ms=round(ms,0)\n",
+ "ps=1/ms #where ps is the Pulse seperation in seconds\n",
+ "Nm=lw/ms #where Nm is the Number of modes oscillating\n",
+ "Nm=round(Nm,0)\n",
+ "pd=(1/Nm)*ps #where pd is the pulse duration\n",
+ "\n",
+ "print \"The Mode Seperation is \"+str(ms)+\" Hertz\"\n",
+ "print \"The Pulse Seperation is %.2e seconds\"%(ps)\n",
+ "print \"The Number of Modes Oscillating is \"+str(Nm)\n",
+ "print \"The Pulse Duration is %.1e seconds\"%(pd)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 6.2, Page Number 256"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Energy of the Pulse is 1.7 J\n"
+ ]
+ }
+ ],
+ "source": [
+ "#In a typical Laser\n",
+ "N1=10**24 #in per meter cube\n",
+ "v=5*(10**14) #Frequency in hertz\n",
+ "vo=(10**-5) #Volume in per meter cube\n",
+ "h=6.63*(10**-34) #Plancks Constant\n",
+ "\n",
+ "#Assuming Nf<<<<N1\n",
+ "\n",
+ "E1=0.5*(h*v*N1*vo) #Where E is the Energy of the pulses\n",
+ "E1=round(E1,1)\n",
+ "\n",
+ "print \"The Energy of the Pulse is \"+str(E1)+\" J\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 6.3, Page Number 256"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Cavity Lifetime is 1.7e-09 seconds\n",
+ "The Pulse Power is 994200000.0 W\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Using the Energy of the pulses from the above example\n",
+ "E=1.657 #Energy of the pulses in Joules\n",
+ "l=0.1 #Cavity length in meter\n",
+ "r=0.8 #Mirror reflectance\n",
+ "c=3*(10**8) #Speed of light\n",
+ "\n",
+ "tc=l/((1-r)*c) #where tc is the cavity lifetime\n",
+ "\n",
+ "P=E/tc #where P is the pulse power\n",
+ "\n",
+ "print \"The Cavity Lifetime is %.1e seconds\"%(tc)\n",
+ "print \"The Pulse Power is \"+str(P)+\" W\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 6.4, Page Number 260"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Divergence of the Beam is 0.000211 Radians\n",
+ "After Collimation,The angle of Divergance is reduced to 7.03e-06 Radians\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Considering a He-Ne Laser\n",
+ "d=3*(10**-3) #Diameter in meter\n",
+ "l=633*(10**-9) #Wavelength of the laser\n",
+ "\n",
+ "theta=l/d #where theta is the divergence of the beam\n",
+ "print \"The Divergence of the Beam is \"+str(theta)+\" Radians\"\n",
+ "#After Collimation\n",
+ "\n",
+ "theta=theta/30 #Reduced by a factor of 30\n",
+ "print \"After Collimation,The angle of Divergance is reduced to %.2e Radians\"%(theta)\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 6.5, Page Number 263"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Cavity lifetime is 2.0e-12 seconds\n",
+ "The Length of the Wave Train or the Coherance Length is 0.0006 meter\n",
+ "Under Multi Modes,The Linewidth is about 1500 MHz and Coherance Length is 0.2 m\n",
+ "Under Single Mode,The Linewidth is about 1Mhz and the Coherance Length is 300 m\n"
+ ]
+ }
+ ],
+ "source": [
+ "#Assuming all lights from a Sodium Lamp\n",
+ "\n",
+ "l=589*(10**-9) #Given Wavelength in meter\n",
+ "lw=5.1*(10**11) #Given Linewidth in Hertz\n",
+ "c=3*(10**8) #Speed of light\n",
+ "\n",
+ "#By equation 6.9\n",
+ "\n",
+ "tc=1/lw #Where tc is the cavity lifetime\n",
+ "\n",
+ "#By Equation 6.8\n",
+ "Lc=tc*c #Where Lc is the length of the Wave Train\n",
+ "Lc=round(Lc,4)\n",
+ "print \"The Cavity lifetime is %.1e seconds\"%(tc)\n",
+ "print \"The Length of the Wave Train or the Coherance Length is \"+str(Lc)+\" meter\"\n",
+ "\n",
+ "print \"Under Multi Modes,The Linewidth is about 1500 MHz and Coherance Length is 0.2 m\"\n",
+ "print \"Under Single Mode,The Linewidth is about 1Mhz and the Coherance Length is 300 m\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 6.6, Page Number 266"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Radius of the Focused Spot is 4.03e-07 meter\n",
+ "The Power Per unit Area is 19591254064.9 Watt per meter square\n"
+ ]
+ }
+ ],
+ "source": [
+ "P=10*(10**-3) #Given Power of the He-Ne Laser\n",
+ "F=1 #Given F Number\n",
+ "l=633*(10**-9) #Wavelength of the laser\n",
+ "PI=3.14\n",
+ "#From equation 6.10a\n",
+ "\n",
+ "rs=(2/PI)*l*F #where rs is the radius of the focused spot\n",
+ "\n",
+ "P1=(P*PI)/((2*l)**2) #Where P1 is the Power per unit area\n",
+ "\n",
+ "print \"The Radius of the Focused Spot is %.2e meter\"%(rs)\n",
+ "print \"The Power Per unit Area is \"+str(P1)+\" Watt per meter square\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 6.7, Page Number 266"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Radius of the Focused spot is 2.70e-05 meter\n",
+ "The depth of the Focus is 9.90e-05 meter\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "\n",
+ "#Given a Carbon Dioxide Laser Beam \n",
+ "l=10.6*(10**-6) #Wavelength in meter\n",
+ "d=50*(10**-3) #diameter in meter\n",
+ "fl=200*(10**-3) #Focal Length\n",
+ "PI=3.14\n",
+ "\n",
+ "#Using Equation 6.10\n",
+ "rs=wo=(l*fl)/(PI*(d/2)) #where rs is the radius of the focused spot\n",
+ "\n",
+ "#Given that spot size can be toletated by 10 percent\n",
+ "dw=1.1\n",
+ "w=1\n",
+ "#using equation 6.11\n",
+ "z=((PI*(rs**2))*sqrt((dw**2)-(w**2)))/l #where z is the depth of focus\n",
+ "\n",
+ "print \"The Radius of the Focused spot is %.2e meter\"%(rs)\n",
+ "print \"The depth of the Focus is %.2e meter\"%(z)\n",
+ "\n",
+ "#Answer is misprinted 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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter7_2.ipynb b/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter7_2.ipynb
new file mode 100644
index 00000000..41a1c24b
--- /dev/null
+++ b/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter7_2.ipynb
@@ -0,0 +1,381 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter Seven : Photodetectors"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 7.1, Page Number 296"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Sensitivty of the device at this wavelength is 5e-10 W\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "\n",
+ "D=10**9 #Given D value\n",
+ "l=2*(10**-6) #Wavelength in meter\n",
+ "A=25*(10**-6) #Area in meter square\n",
+ "db=10*(10**3) #Detection Bandwidth in hertz\n",
+ "\n",
+ "#From equation 7.2\n",
+ "NEP=(sqrt(A*db))/D #Where NEP is the detector sensitivty\n",
+ "\n",
+ "print \"The Sensitivty of the device at this wavelength is \"+str(NEP)+\" W\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 7.2, Page Number 306"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Vaccum Photodiode Output Current is 2.01e-07 A\n"
+ ]
+ }
+ ],
+ "source": [
+ "l=500*(10**-9) #Wavelength of radiation\n",
+ "P=1*(10**-6) #Given Power\n",
+ "q=0.5 #Quantam Efficiency\n",
+ "e=1.6*(10**-19) #Charge of a electron\n",
+ "h=6.63*(10**-34) #Plancks Constant\n",
+ "c=3*(10**8) #Speed of light\n",
+ "\n",
+ "#From equation 7.9\n",
+ "i=(q*e*P*l)/(h*c) #Where i is the current generated\n",
+ "\n",
+ "print \"The Vaccum Photodiode Output Current is %.2e A\"%(i)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 7.3, Page Number 311"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The thermionic Emission Current is 1.43e-13 A\n",
+ "The Responsivity is 0.1 A/W\n",
+ "The Minimum detectable Signal Power is 2.136e-15 W\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp\n",
+ "from math import sqrt\n",
+ "\n",
+ "A=1000*(10**-6) #Cathode Area\n",
+ "wf=1.25 #Work function in eV\n",
+ "T=300 #Cathod temperature in Kelvin\n",
+ "e=1.6*(10**-19) #Charge of the electron\n",
+ "k=1.38*(10**-23) #Boltzman Constant\n",
+ "a1=1.2*(10**6) #given constants \n",
+ "l=0.5*(10**-6) #Wavelength\n",
+ "q=0.25 #Quantam Efficiency\n",
+ "h=6.63*(10**-34) #Plancks Constant\n",
+ "c=3*(10**8) #Speed of light\n",
+ "f=1\n",
+ "\n",
+ "#From equation 7.11\n",
+ "e1=(k*T)/e \n",
+ "e1=round(e1,3)\n",
+ "c2=(-1*wf)/e1\n",
+ "c2=round(c2,4)\n",
+ "c3=exp(c2)\n",
+ "it=a1*A*(T**2)*c3 #Where it is the current generated\n",
+ "\n",
+ "print \"The thermionic Emission Current is %.2e A\"%(it)\n",
+ "\n",
+ "#Using Equation 7.9\n",
+ "r=(q*e*l)/(h*c) #where r is the responsivity\n",
+ "r=round(r,2)\n",
+ "print \"The Responsivity is \"+str(r)+\" A/W\"\n",
+ "\n",
+ "#Using Equation 7.13\n",
+ "W=(sqrt(2*it*e*f))/r #Where W is the minimum detectable power\n",
+ "print \"The Minimum detectable Signal Power is %.3e W\"%(W)\n",
+ "\n",
+ "#Answer is misprinted in the book"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 7.4, Page Number 311"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The RMS Value of the Voltage is 4.07e-09 V\n",
+ "The Shot Noise Current is 1.789e-15 A\n",
+ "The Shot Noise Voltage across load resistance is 1.789e-05 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "\n",
+ "T=300 #Temperature in kelvin\n",
+ "lr=10**3 #Load resistor\n",
+ "bw=10**3 #Bandwidth in hertz\n",
+ "k=1.38*(10**-23) #Boltzman Constant\n",
+ "i=10**-14 #Photomultiplier current\n",
+ "e=1.6*(10**-19) #Charge of a electron\n",
+ "g=10**7 #Photomultiplier Gain\n",
+ "#From equation 7.14\n",
+ "V=sqrt(4*k*T*bw) #where V is the shot noise voltge\n",
+ "\n",
+ "#From equation 7.12\n",
+ "id=sqrt(2*i*e*bw) #where is the shot noise current\n",
+ "\n",
+ "V1=id*g*lr #Where V1 is the voltage observed across load resistance\n",
+ "\n",
+ "print \"The RMS Value of the Voltage is %.2e V\"%(V)\n",
+ "print \"The Shot Noise Current is %.3e A\"%(id)\n",
+ "print \"The Shot Noise Voltage across load resistance is %.3e V\"%(V1)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 7.5, Page Number 324"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Energy Difference between the two levels is 0.17 eV\n",
+ "The Optical Wavelength is 7.312e-06 meters\n"
+ ]
+ }
+ ],
+ "source": [
+ "n3=1 #Given Energy Levels\n",
+ "n2=2\n",
+ "Lz=10*(10**-9) #Width of the well\n",
+ "m=9.1*(10**-31) #Mass of a electron\n",
+ "me=0.068*m\n",
+ "h=6.63*(10**-34) #Plancks Constant\n",
+ "c=3*(10**8) #Speed of light\n",
+ "e1=1.6*(10**-19) #Charge of electron\n",
+ "\n",
+ "#By Equation 2.64\n",
+ "\n",
+ "E=((h**2)/(me*8))*(((n2/Lz)**2)-((n3/Lz)**2)) #where E is the energy difference between the levels\n",
+ "E1=E/e1 #Converting it into electron volt\n",
+ "E1=round(E1,2)\n",
+ "l=(h*c)/E1 #where l is the optical wavelength\n",
+ "l1=l/e1\n",
+ "print \"The Energy Difference between the two levels is \"+str(E1)+\" eV\"\n",
+ "print \"The Optical Wavelength is %.3e meters\"%(l1)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "##Example 7.6, Page Number 329"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Depletion region thickness is 5.09e-06 m\n",
+ "The fraction of the incident radiation absorbed is 3.99e-01\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "from math import exp\n",
+ "\n",
+ "#Taking Silicon Diode with N-region\n",
+ "V=100 #Applied Voltage\n",
+ "Nd=5*(10**21) #in terms of per meter cube\n",
+ "eo=8.85*(10**-12) #Absolute permittivity\n",
+ "er=11.7\n",
+ "e=1.6*(10**-19) #Charge of the electron\n",
+ "#using equation 7.31\n",
+ "xn=sqrt((2*eo*er*V)/(e*Nd))\n",
+ "\n",
+ "ac=10**5 #Absorption Coefficient in terms of per meter\n",
+ "\n",
+ "#ignoring fresnal reflection\n",
+ "f=1-exp(-1*xn*ac)\n",
+ "f=round(f,3)\n",
+ "print \"The Depletion region thickness is %.2e m\"%(xn)\n",
+ "print \"The fraction of the incident radiation absorbed is %.2e\"%(f)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 7.7, Page Number 334"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Device Capacitance is 5.31e-13 Farad\n",
+ "The Total response time for the detector is 3.324e-11 seconds\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "\n",
+ "it=2*(10**-6) #I-region thickness\n",
+ "A=(100*(10**-6))*(100*(10**-6)) #Given area in meter\n",
+ "lr=50 #Load resistor\n",
+ "v=10**5 #Saturation Velocity in Metre/second\n",
+ "er=12 #Given relative permittivity\n",
+ "k=8.85*(10**-12) #boltzman constant\n",
+ "\n",
+ "t=it/v #Transit Velocity of electrons\n",
+ "\n",
+ "#From equation 7.34\n",
+ "c=(A*k*er)/it #Where c is the device capacitance\n",
+ "\n",
+ "trc=c*lr \n",
+ "\n",
+ "ttotal=sqrt((t**2)+(trc**2)) #where ttotal is the total response time\n",
+ "print \"The Device Capacitance is \"+str(c)+\" Farad\"\n",
+ "print \"The Total response time for the detector is %.3e seconds\"%(ttotal)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 7.8, Page Number 334"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Time taken for the excess carriers to diffuse the given distance is 3.68e-09 seconds\n"
+ ]
+ }
+ ],
+ "source": [
+ "t=5*(10**-6) #Thickness of the layer\n",
+ "Dc=3.4*(10**-3) #Where Dc is the Minority diffusion coefficient\n",
+ "\n",
+ "#From equation 7.37\n",
+ "td=(t**2)/(2*Dc) #where td is the diffusion time\n",
+ "\n",
+ "print \"The Time taken for the excess carriers to diffuse the given distance is %.2e seconds\"%(td)"
+ ]
+ }
+ ],
+ "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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter8_2.ipynb b/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter8_2.ipynb
new file mode 100644
index 00000000..bda5f5d4
--- /dev/null
+++ b/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter8_2.ipynb
@@ -0,0 +1,679 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter Eight : Fiber Optical Waveguides"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 8.1, Page Number 364"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Field Decay factor at 60 degrees is 0.0055\n",
+ "The Field Decay factor at 42 degrees is 0.583\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "from math import sin\n",
+ "from math import exp\n",
+ "from math import pi\n",
+ "\n",
+ "n1=1.5 #Refraction index of glass/air interface\n",
+ "n2=1 #Refraction index of air\n",
+ "\n",
+ "c1=1*2*3.14*n2\n",
+ "s1=(sin(pi/3))**2 #By equation 8.8\n",
+ "s2=(n1/n2)**2\n",
+ "s3=(s1*s2)-1\n",
+ "s4=sqrt(s3)\n",
+ "s5=s4*c1\n",
+ "\n",
+ "#assuming wavelength = field distance\n",
+ "\n",
+ "F=exp(-1*s5) #Where F is the field decay factor\n",
+ "F=round(F,4) #Rounding out the value to equivalent figure\n",
+ "\n",
+ "#at theta1=42 degrees\n",
+ "\n",
+ "c1=1*2*3.14*n2\n",
+ "theta1=0.733038\n",
+ "#ta1=theta1*(180/math.pi)\n",
+ "#heta1=round(theta1,1)\n",
+ "\n",
+ "s1=(sin(theta1))**2 #By equation 8.8\n",
+ "s2=(n1/n2)**2\n",
+ "s3=(s1*s2)-1\n",
+ "s4=sqrt(s3)\n",
+ "c4=s4*c1\n",
+ "\n",
+ "#assuming wavelength = field distance\n",
+ "\n",
+ "F1=exp(-1*c4)#where F1 is the field decay factor at 42 degrees\n",
+ "F1=round(F1,3)\n",
+ "\n",
+ "print \"The Field Decay factor at 60 degrees is \"+str(F)\n",
+ "print \"The Field Decay factor at 42 degrees is \"+str(F1)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 8.2, Page Number 369"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Total number of possible Modes is 98.0\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "\n",
+ "w=100*(10**-6) #Thickness of the WG\n",
+ "n1=1.48\n",
+ "n2=1.46\n",
+ "l=1*(10**-6) #Wavelength of light\n",
+ "PI=3.14\n",
+ "\n",
+ "V=((PI*w)/l)*sqrt((n1**2)-(n2**2))\n",
+ "V1=(2*V)/PI\n",
+ "\n",
+ "#from equation 8.15\n",
+ "N=2*(1+abs(V1)) #Where N is the total number of possible modes\n",
+ "N=round(N,0)\n",
+ "N=N-1\n",
+ "print \"The Total number of possible Modes is \"+str(N)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 8.3, Page Number 370"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Waveguide core thickness must be less than 2.06e-06 meter\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "\n",
+ "n1=1.48 #Given refraction index\n",
+ "n2=1.46\n",
+ "l=1*(10**-6) #Wavelength\n",
+ "\n",
+ "#from equation 8.16\n",
+ "\n",
+ "d=l*(1/(2*sqrt((n1**2)-(n2**2))))\n",
+ "\n",
+ "print \"The Waveguide core thickness must be less than %.2e meter\"%(d)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 8.4, Page Number 375"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Given V Parameter is 169.2\n",
+ "The Number of Modes able to propagate in a fiber is 14314.3\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "n1=1.48 #Given refraction index\n",
+ "n2=1.46\n",
+ "l=900*(10**-9) #Wavelength in meter\n",
+ "r=100*(10**-6) #Core radius in meter\n",
+ "PI=3.14\n",
+ "\n",
+ "V=(2*PI*r*sqrt((n1**2)-(n2**2)))/l #Where V is a given Parameter\n",
+ "V=round(V,1)\n",
+ "N=(V**2)/2 #Where N is the Number of Modes\n",
+ "N=round(N,1)\n",
+ "print \"The Given V Parameter is \"+str(V)\n",
+ "print \"The Number of Modes able to propagate in a fiber is \"+str(N)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 8.5, Page Number 377"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Delta Parameter is 0.0134 & 0.0135\n",
+ "The Numerical aperture is 0.242\n",
+ "The fiber acceptance angle is 14.0 degrees\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import asin\n",
+ "from math import degrees\n",
+ "from math import sqrt\n",
+ "\n",
+ "n1=1.48\n",
+ "n2=1.46 #Given refraction Index\n",
+ "no=1\n",
+ "\n",
+ "theta=asin(n2/n1)\n",
+ "theta1=degrees(theta)\n",
+ "\n",
+ "#Using equation 8.22\n",
+ "delta=((n1**2)-(n2**2))/(2*(n1**2))\n",
+ "delta=round(delta,4)\n",
+ "\n",
+ "#using expression of 8.22a\n",
+ "delta1=(n1-n2)/n1\n",
+ "delta1=round(delta1,4)\n",
+ "\n",
+ "NA=sqrt((n1**2)-(n2**2))\n",
+ "NA=round(NA,3)\n",
+ "\n",
+ "a=asin(NA) #where a is another fiber parameter\n",
+ "\n",
+ "a1=degrees(a)\n",
+ "a1=round(a1,2)\n",
+ "\n",
+ "print \"The Delta Parameter is \"+str(delta)+\" & \"+str(delta1)\n",
+ "print \"The Numerical aperture is \"+str(NA)\n",
+ "print \"The fiber acceptance angle is \"+str(a1)+\" degrees\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 8.6, Page Number 380"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Time difference due to Intermodal dispersion is 6.08e-17 seconds\n"
+ ]
+ }
+ ],
+ "source": [
+ "n1=1.48 #Given refractive index\n",
+ "n2=1.46\n",
+ "L=1*(10**3) #length of fiber\n",
+ "c=3*(10**8) #speed of light\n",
+ "\n",
+ "#Using equation 8.24\n",
+ "t=((l*n1)/(c*n2))*(n1-n2) #where t is the time difference due tp intermodal dispersion\n",
+ "\n",
+ "print \"The Time difference due to Intermodal dispersion is %.2e seconds\"%(t)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 8.7, Page Number 383"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Delta Paramter is 0.0134\n",
+ "The Minimum Pulse Broadening is 1.11e-10 seconds\n"
+ ]
+ }
+ ],
+ "source": [
+ "n1=1.48 #Given refraction index\n",
+ "n2=1.46\n",
+ "l=10**3 #length of the fiber\n",
+ "c=3*(10**8) #Speed of light\n",
+ "\n",
+ "delta=((n1**2)-(n2**2))/(2*(n1**2)) #Where delta is one of the fiber parameter\n",
+ "delta=round(delta,4)\n",
+ "t=(l*n1*(delta**2))/(c*8) #where t is the minimum pulse broadening\n",
+ "\n",
+ "print \"The Delta Paramter is \"+str(delta)\n",
+ "print \"The Minimum Pulse Broadening is %.2e seconds\"%(t)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 8.8, Page Number 387"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Maximum Core Radius is less than or is 2.37e-06 meter\n",
+ "The Maximum Core radius is less than or is 5.74e-06 meter\n"
+ ]
+ }
+ ],
+ "source": [
+ "n1=1.48 #Given refraction indices\n",
+ "n2=1.46 \n",
+ "NA=0.242\n",
+ "l=1.5*(10**-6) #Wavelength of radiation\n",
+ "\n",
+ "#From equation 8.27\n",
+ "a=(2.405*l)/(2*3.14*NA) #where a is the maximum core radius\n",
+ "print \"The Maximum Core Radius is less than or is %.2e meter\"%(a)\n",
+ "\n",
+ "#With NA=0.1\n",
+ "NA=0.1\n",
+ "a=(2.405*l)/(2*3.14*NA) #where a is the maximum core radius\n",
+ "print \"The Maximum Core radius is less than or is %.2e meter\"%(a)\n",
+ "\n",
+ "#At V=2 The Diameter would 9.5 micro meter"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 8.9, Page Number 387"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Mode Field Irradiance Diameter is 1.267\n"
+ ]
+ }
+ ],
+ "source": [
+ "V=2\n",
+ "\n",
+ "#From equation 8.29a\n",
+ "w=0.65+(1.619*(V**(-1.5)))+(2.879*(V**-6))\n",
+ "w=round(w,3)\n",
+ "print \"The Mode Field Irradiance Diameter is \"+str(w)\n",
+ "\n",
+ "#Answer is a bit Miscalculated here"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 8.10, Page Number 390"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "\n",
+ "From Figure 8.26 We can calculate the dimensionless quantity \n",
+ " \n",
+ " (a) The Material Dispersion Effect Parameter for the LED is 4.20e-09 seconds\n",
+ " (b) The Material Dispersion Effect Paramter for the Laser is 6.58e-11 seconds\n"
+ ]
+ },
+ {
+ "data": {
+ "image/png": "iVBORw0KGgoAAAANSUhEUgAAAY0AAAEhCAYAAACDefxEAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XuYHHWd7/H3J1cCEgKRBAKBQBAISCSTJRD0sKOoG9CV\n9b6sl8XdozmeRX1WV1HPKjnyHDXrjWXVFTFeec5iRGRRFESWWV1ACCEXcgETIZwkhIshhC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t6bzVwCvLG2oZJjrSRHx72nNu9L5APdGxKMln+uqtM1Dkh4lGfI6gDsi\nYgewQ9IzwE/T33kAmC7pEJL/Vj9K1wtJOL1QRkktsyu0C+BHkSaItQeHhuXpTpI/XGeQ/DFaT/Kv\n+q3At9NTO18DZkbERkmXk/yLGZJ/xf9I0g1ARMTvJZ0BrIyIcwfYbrU2z6c/97L/9z/rk8ueL3m/\nt6TeLL9Tvs1K691XMr2vyu/0Z0fZdKXPNdD2hgFbIqLSs7N7g2AYyQixldo9V71cazXu07A83QW8\nHtgciS3AOJJ/md4F9PYHbE7/xfpW0j9GEfEwyR/ZT5E80haS5xsfqWQoaySN1P5PGYsMbfpzJ8mR\nDGnbM0qW7R5ip3Iej1YVyame7cAGSRcBpH0X/YXXb4B3pG1OJhnZ9MEBahMkz1gAHpH0lvT3JWl6\n2mYbMDZt92yVdtaGHBqWpxUkV039tmTecpJ/mT4dEc8A16TtbuHAx1D+kOSP3kJ44TTMW4D5kpaS\n9HvMLv2FSJ6bXrVNafP059dJgmYlcAWwkuRoCOCbJMNK93aEl59qqXTqZTDzq135Vbqs9P27gA9K\nWkZyqu+oftbzdWBYerrtOuCv0/1T3q78fe/0O4C/TffjCpLnapOu66NpB/wJVdpV+rzWwjw0unU8\nJZcEj4yI5yVNBW4DTo6IPQWXZtZ03KdhllxF9B9KHosp4P0ODLP++UjDzMwyc5+GmZll5tAwM7PM\nHBpmZpaZQ8PMzDJzaJiZWWYODTMzy+z/A2eU1WQFINBpAAAAAElFTkSuQmCC\n",
+ "text/plain": [
+ "<matplotlib.figure.Figure at 0x3d8fac8>"
+ ]
+ },
+ "metadata": {},
+ "output_type": "display_data"
+ }
+ ],
+ "source": [
+ "%matplotlib inline\n",
+ "import math\n",
+ "from matplotlib.pyplot import plot,suptitle,xlabel,ylabel\n",
+ "\n",
+ "X = [0,0.25,0.5,0.75,1,1.25,1.5,1.55,1.75,2,2.5]\n",
+ "V = [1,0.08,0.07,0.04,0.02,0.0,-0.007,-0.015,-0.03,-0.04,-0.06]\n",
+ "plot(X,V);\n",
+ "xlabel(\"Wavelength in micrometer\")\n",
+ "ylabel(\"D (Dimensionless Quantity)\")\n",
+ "suptitle(\"Fig 8.26\")\n",
+ "\n",
+ "l=10.0**3 #length of the fiber\n",
+ "w1=850.0*(10**-9) #Given Wavelength\n",
+ "lw=50.0*(10**-9) #Linewidth in meter\n",
+ "w2=1550.0*(10**-9) #Given Wavelength 2\n",
+ "lw2=3.0*(10**-9) #Linewidth 2 in meter\n",
+ "c=3.0*(10**8) #Speed of light\n",
+ " \n",
+ "print\"\"\n",
+ "print \"From Figure 8.26 We can calculate the dimensionless quantity \"\n",
+ " \n",
+ "d1=2.14*(10**-2) #For w1 after observation\n",
+ "d2=-1.02*(10**-2) #For w2 after observation\n",
+ "\n",
+ "#From equation 8.34\n",
+ " \n",
+ "t1=(l/c)*d1*(lw/w1) #Where t1 is the material dispersion effects for w1\n",
+ "t2=(l/c)*d2*(lw2/w2) #Where t2 is the material dispersion effects for w2\n",
+ "\n",
+ "print \" \"\n",
+ "print \" (a) The Material Dispersion Effect Parameter for the LED is %.2e seconds\"%(t1)\n",
+ "print \" (b) The Material Dispersion Effect Paramter for the Laser is %.2e seconds\"%(-1*t2)"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 8.11, Page Number 396"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Attenuation due to Raleigh Scattering in a silica fiber is 0.000178 /m\n",
+ "The Total loss due to Attenuation is 0.77 db/km\n",
+ "The Attenuation due to Raleigh Scattering in a silica fiber is 3.1e-05 /m\n",
+ "The Total loss due to Attenuation is 0.13 db/km\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import exp\n",
+ "from math import log10\n",
+ "\n",
+ "l=1*(10**-6) #Given Wavelength\n",
+ "l1=10**3 #length of the fiber\n",
+ "n=1.45 #Refractive Index\n",
+ "p=0.286\n",
+ "B=7*(10**-11) \n",
+ "T=1400 #Temperature in kelvin\n",
+ "PI=3.14\n",
+ "k=1.38*(10**-23) #Boltzman Constant\n",
+ "\n",
+ "#From equation 8.38\n",
+ "\n",
+ "ar=((8*(PI**3))/(3*(l**4)))*((n**8)*B*T*k*(p**2)) #Where ar is the attenuation due to raleigh scattering in per meter\n",
+ "ar=round(ar,6)\n",
+ "print \"The Attenuation due to Raleigh Scattering in a silica fiber is \"+str(ar)+\" /m\"\n",
+ "\n",
+ "i1=(ar*-1*l1)\n",
+ "j=exp(i1)\n",
+ "Loss=-10*log10(j) #Where Loss is the given loss generated from attenuation\n",
+ "Loss=round(Loss,2)\n",
+ "print \"The Total loss due to Attenuation is \"+str(Loss)+\" db/km\"\n",
+ "\n",
+ "#at a wavelength of 1.55 micro meter we have\n",
+ "l=1.55*(10**-6) #new Wavelength\n",
+ "\n",
+ "ar=((8*(PI**3))/(3*(l**4)))*((n**8)*B*T*k*(p**2)) #Where ar is the attenuation due to raleigh scattering in per meter\n",
+ "ar=round(ar,6)\n",
+ "print \"The Attenuation due to Raleigh Scattering in a silica fiber is \"+str(ar)+\" /m\"\n",
+ "\n",
+ "Loss=-10*log10(exp(ar*-1*l1)) #Where Loss is the given loss generated from attenuation\n",
+ "Loss=round(Loss,2)\n",
+ "print \"The Total loss due to Attenuation is \"+str(Loss)+\" db/km\"\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 8.12, Page Number 398"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Fraction of light reflected back at each end is 0.0375\n",
+ "The Total Transmission for each face due to Fresnals Reflection is 0.9264\n",
+ "The Total Transmission loss is 0.33 db\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log10\n",
+ "n=1.48 #Refraction index of fiber\n",
+ "n0=1 #refraction index between the fibers in air\n",
+ "\n",
+ "#From equation 8.39\n",
+ "Rf=(((n-1)/(n+1))**2) #Where Rf is the fraction of light\n",
+ "Rf=round(Rf,4)\n",
+ "\n",
+ "Tf=((1-Rf)**2) #Where Tf is the total transmission for each face due to fresnals reflection\n",
+ "Tf=round(Tf,4)\n",
+ "\n",
+ "L=-10*log10(Tf) #where L is the Transmission Loss\n",
+ "L=round(L,2)\n",
+ "\n",
+ "print \"The Fraction of light reflected back at each end is \"+str(Rf)\n",
+ "print \"The Total Transmission for each face due to Fresnals Reflection is \"+str(Tf)\n",
+ "print \"The Total Transmission loss is \"+str(L)+\" db\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 8.13, Page Number 399"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Total Transmission loss is 0.59 db\n",
+ "The Total Transmission loss including Fresnels loss is 0.922 db\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import acos\n",
+ "from math import log10\n",
+ "from math import sqrt\n",
+ "\n",
+ "l=0.1 #where l=D/2a and occurs due to lateral misalignment where D is the lateral displacement and a is the fiber core radius\n",
+ "PI=3.14\n",
+ "\n",
+ "#From equation 8.40\n",
+ "T=(2/PI)*(acos(l)-l*(sqrt(1-(l**2))))\n",
+ "L=-10*log10(T) #Where L is the Transmission loss\n",
+ "L=round(L,2)\n",
+ "\n",
+ "#taking tha calculation of Fresnels loss from above example also we have\n",
+ "\n",
+ "LT=L+0.332\n",
+ "print \"The Total Transmission loss is \"+str(L)+\" db\"\n",
+ "print \"The Total Transmission loss including Fresnels loss is \"+str(LT)+\" db\"\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 8.14, Page Number 404"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Insertion loss is 11.5 db\n",
+ "The Excess Loss is 3.03 db\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import log10\n",
+ "\n",
+ "d1=200*(10**-6) #in meter\n",
+ "d2=250*(10**-6) #in meter\n",
+ "# d2 & d1 where d1 is the core diameter and d2 is the core+cladding diameter\n",
+ "#The Mixing rod has a diameter of 3d2\n",
+ "d3=3*d2\n",
+ "#Given Power Levels P1=(B*3.14*(3d2**2))/4 & P2=(B*3.14*(d1**2)/)/4 where B is a constant\n",
+ "\n",
+ "L=-10*log10((d1**2)/(d3**2)) #Where L is the Insertion Loss\n",
+ "Le=-10*log10((7*(d1**2))/(d3**2)) #Where Le is the Excess loss\n",
+ "L=round(L,1)\n",
+ "Le=round(Le,2)\n",
+ "print \"The Insertion loss is \"+str(L)+\" db\"\n",
+ "print \"The Excess Loss is \"+str(Le)+\" db\"\n",
+ "\n"
+ ]
+ }
+ ],
+ "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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter9_2.ipynb b/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter9_2.ipynb
new file mode 100644
index 00000000..ad8bf176
--- /dev/null
+++ b/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/Chapter9_2.ipynb
@@ -0,0 +1,199 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 9: Optical Communication Systems"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 9.1, Page Number 449"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 1,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Photogenereated Current is 6.30e-06 A\n",
+ "The total shot noise Current is 3.18e-08 A\n",
+ "The Total Johnson Noise Current is 4.06939798988e-07 A\n",
+ "The Required Signal to noise ratio is 238.5\n",
+ "The optimum Load Resistance 318.5 ohm\n",
+ "The Optimum Johnson Noise Current is 1.61e-07 A\n",
+ "The New Signal to noise Ratio is 1471.1\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "\n",
+ "#Given P-I-N Diode\n",
+ "q=0.6 #Quantam Efficiency\n",
+ "l=1.3*(10**-6) #Wavelength in Meters\n",
+ "i=3*(10**-9) #Reverse Bias Leakage Current in Ampere\n",
+ "r=50 #Resistance in Ohm\n",
+ "b=500*(10**6) #Bandwidth in Hertz\n",
+ "P=10*(10**-6) #Optical Power in Watt\n",
+ "e=1.6*(10**-19) #Charge of a Electron\n",
+ "h=6.6*(10**-34) #Plancks Constant\n",
+ "c=3*(10**8) #Speed Of Light\n",
+ "k=1.38*(10**-23) #Boltzmann Constant\n",
+ "c1=1*(10**-12) #Assumed Capacitance in Farad\n",
+ "\n",
+ "ip=(q*P*e*l)/(h*c) #Where i is the Photogenerated current\n",
+ "\n",
+ "print \"The Photogenereated Current is %.2e A\"%(ip)\n",
+ "\n",
+ "itotal=sqrt(2*(i+ip)*e*b) #Where itotal is the Total Shot Noise Current using equation 9.11\n",
+ "\n",
+ "print \"The total shot noise Current is %.2e A\"%(itotal)\n",
+ "\n",
+ "ij=sqrt(4*k*r*b*300)/r #Where ij is the Total Johnson Noise Current using Equation 9.13\n",
+ "\n",
+ "print \"The Total Johnson Noise Current is \"+str(ij)+\" A\"\n",
+ "\n",
+ "sn=(ip**2)/((itotal**2)+(ij**2)) #Where sn is the Signal to Noise Ratio in Decibel\n",
+ "sn=round(sn,1)\n",
+ "print \"The Required Signal to noise ratio is \"+str(sn)\n",
+ "\n",
+ "rl=1/(2*3.14*c1*b) #Where rl is the optimum Load Resistance\n",
+ "rl=round(rl,1)\n",
+ "print \"The optimum Load Resistance \"+str(rl)+\" ohm\"\n",
+ "\n",
+ "ij2=sqrt(4*k*rl*b*300)/rl\n",
+ "\n",
+ "print \"The Optimum Johnson Noise Current is %.2e A\"%(ij2)\n",
+ "\n",
+ "sn1=(ip**2)/((itotal**2)+(ij2**2))\n",
+ "sn1=round(sn1,1)\n",
+ "print \"The New Signal to noise Ratio is \"+str(sn1)\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 9.2, Page Number 462"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Transmitter Output is 0 Dbm\n",
+ "The Receiver Sensitivity is -50 Dbm\n",
+ "The Required Margin is 50 Dbm\n",
+ "System Loss-\n",
+ "Fiber Loss 2 Db/Km,15 Km 30 Db\n",
+ "Detector Coupling Loss 1 Db\n",
+ "Total Splicing Loss (0.5 DB x 10) 5 Db\n",
+ "Headroom for Temperature range,ageing effects & Future Splices 5 Db\n",
+ "Total Attenuation 41 Db\n",
+ "The Excess Power Margin required is 9 Db\n"
+ ]
+ }
+ ],
+ "source": [
+ "print \"The Transmitter Output is 0 Dbm\"\n",
+ "print \"The Receiver Sensitivity is -50 Dbm\"\n",
+ "print \"The Required Margin is 50 Dbm\"\n",
+ "print \"System Loss-\"\n",
+ "print \"Fiber Loss 2 Db/Km,15 Km 30 Db\"\n",
+ "print \"Detector Coupling Loss 1 Db\"\n",
+ "print \"Total Splicing Loss (0.5 DB x 10) 5 Db\"\n",
+ "print \"Headroom for Temperature range,ageing effects & Future Splices 5 Db\"\n",
+ "print \"Total Attenuation 41 Db\"\n",
+ "f=30\n",
+ "d=1\n",
+ "t=5\n",
+ "h=5\n",
+ "t=f+d+t+h #The total power attenuation\n",
+ "p=50-t\n",
+ "\n",
+ "print \"The Excess Power Margin required is \"+str(p)+\" Db\""
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 9.3, Page Number 474"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 3,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "The Requirement for Single Mode Behaviour becomes\n",
+ "1.51 <= d/lambda <= 4.53\n"
+ ]
+ }
+ ],
+ "source": [
+ "from math import sqrt\n",
+ "n1=2.286 #The Ordinary Refractive Index \n",
+ "d=6*(10**-3) #Refractive Index Change\n",
+ "n2=n1-d #The Difference of the Two\n",
+ "\n",
+ "NA=sqrt((n1**2)-(n2**2))\n",
+ "\n",
+ "first=1/(4*NA)\n",
+ "first=round(first,2)\n",
+ "\n",
+ "second=3/(4*NA)\n",
+ "second=round(second,2)\n",
+ "\n",
+ "print \"The Requirement for Single Mode Behaviour becomes\"\n",
+ "print str(first)+\" <= d/lambda <= \"+str(second) #Where d=5*Lambda for suitable thickness design\n",
+ "\n",
+ "#The Higher Region is Miscalculated 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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}
diff --git a/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/screenshots/CHAPTER9_1.png b/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/screenshots/CHAPTER9_1.png
new file mode 100644
index 00000000..95c305d1
--- /dev/null
+++ b/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/screenshots/CHAPTER9_1.png
Binary files differ
diff --git a/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/screenshots/Fig_1.24_2.png b/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/screenshots/Fig_1.24_2.png
new file mode 100644
index 00000000..4d705f7b
--- /dev/null
+++ b/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/screenshots/Fig_1.24_2.png
Binary files differ
diff --git a/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/screenshots/Fig_8.26_2.png b/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/screenshots/Fig_8.26_2.png
new file mode 100644
index 00000000..47d79a68
--- /dev/null
+++ b/Optoelectronics:_An_Introduction_by_John_Wilson_&_John_Hawkes/screenshots/Fig_8.26_2.png
Binary files differ
diff --git a/sample_notebooks/KAVANA B/chapter3.ipynb b/sample_notebooks/KAVANA B/chapter3.ipynb
new file mode 100644
index 00000000..a66c91da
--- /dev/null
+++ b/sample_notebooks/KAVANA B/chapter3.ipynb
@@ -0,0 +1,145 @@
+{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "CHAPTER 3: Heating and Cooling of Electrical Machines"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.1, Page number 37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Variable declaration\n",
+ "d = 12.0 #Diameter of copper bar(mm)\n",
+ "t = 1.5 #Thickness of micanite tube(mm)\n",
+ "rho = 8.0 #Thermal resistivity(ohm-m)\n",
+ "theta_diff = 25.0 #Temperature difference(\u00b0C)\n",
+ "l = 0.2 #Length of bar(m)\n",
+ "\n",
+ "#Calculation\n",
+ "S = math.pi*(d+t)*10**-3*l #Area of insulation in the path of heat flow(m^2)\n",
+ "R_s = rho*t*10**-3/S #Thermal resistance in the micanite tube(ohm)\n",
+ "Q_con = theta_diff/R_s #Loss that will pass from copper bar to iron(W)\n",
+ "\n",
+ "#Result\n",
+ "print('Loss that will pass from copper bar to iron, Q_con = %.2f W' %Q_con)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Loss that will pass from copper bar to iron, Q_con = 17.67 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.2, Page number 37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "ratio = 20.0 #Ratio of resistivity across lamination to along lamination\n",
+ "t = 40.0 #Thickness of lamination stack(mm)\n",
+ "S = 6000.0 #Cross-section of lamination(mm^2)\n",
+ "theta = 20.0 #Temperature difference across laminations(\u00b0C)\n",
+ "theta_1 = 5.0 #Temperature difference among laminations(\u00b0C)\n",
+ "Q_con_1 = 25.0 #Heat conducted along laminations(W)\n",
+ "S_1 = 2500.0 #Cross-section of lamination(mm^2)\n",
+ "t_1 = 20.0 #Thickness of lamination stack(mm)\n",
+ "\n",
+ "#Calculation\n",
+ "rho_1 = S_1*theta_1*10**-6/(Q_con_1*t_1*10**-3) #Thermal resistivity along direction of lamination(ohm-m)\n",
+ "rho = ratio*rho_1 #Thermal resistivity across laminations(ohm-m)\n",
+ "Q_con = S*10**-6*theta/(rho*t*10**-3) #Heat conducted across laminations(W)\n",
+ "\n",
+ "#Result\n",
+ "print('Loss that will be conducted across laminations, Q_con = %.f W' %Q_con)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Loss that will be conducted across laminations, Q_con = 6 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 3.3, Page number 39"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Variable declaration\n",
+ "e = 0.8 #Co-efficient of emissivity\n",
+ "temp_body = 60.0 #Temperature of body(\u00b0C)\n",
+ "temp_walls = 20.0 #Temperature of walls of room(\u00b0C)\n",
+ "\n",
+ "#Calculation\n",
+ "T_1 = 273+temp_body #Temperature of body(K)\n",
+ "T_0 = 273+temp_walls #Temperature of walls of room(K)\n",
+ "q_rad = 5.7*10**-8*e*(T_1**4-T_0**4) #Heat radiated from body(W/m^2)\n",
+ "\n",
+ "#Result\n",
+ "print('Heat radiated from body, q_rad = %.1f W/m^2' %q_rad)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Heat radiated from body, q_rad = 224.6 W/m^2\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/sample_notebooks/RohitPhadtare/chapter_no.6.ipynb b/sample_notebooks/RohitPhadtare/chapter_no.6.ipynb
new file mode 100644
index 00000000..4657aa0b
--- /dev/null
+++ b/sample_notebooks/RohitPhadtare/chapter_no.6.ipynb
@@ -0,0 +1,1494 @@
+{
+ "metadata": {
+ "name": "chapter no.6.ipynb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter No.6:Torsion"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.1,Page No.225"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "L=10000 #mm #Length of solid shaft\n",
+ "d=100 #mm #Diameter of shaft\n",
+ "n=150 #rpm\n",
+ "P=112.5*10**6 #N-mm/sec #Power Transmitted\n",
+ "G=82*10**3 #N/mm**2 #modulus of Rigidity\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "J=pi*d**4*(32)**-1 #mm**3 #Polar Modulus\n",
+ "T=P*60*(2*pi*n)**-1 #N-mm #Torsional moment\n",
+ "\n",
+ "r=50 #mm #Radius\n",
+ "\n",
+ "q_s=T*r*J**-1 #N/mm**2 #Max shear stress intensity\n",
+ "Theta=T*L*(G*J)**-1 #angle of twist\n",
+ "\n",
+ "#Result\n",
+ "print\"Max shear stress intensity\",round(q_s,2),\"N/mm**2\"\n",
+ "print\"Angle of Twist\",round(Theta,3),\"radian\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Max shear stress intensity 36.48 N/mm**2\n",
+ "Angle of Twist 0.089 radian\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.2,Page No.226"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "P=440*10**6 #N-m/sec #Power transmitted\n",
+ "n=280 #rpm\n",
+ "theta=pi*180**-1 #radian #angle of twist\n",
+ "L=1000 #mm #Length of solid shaft\n",
+ "q_s=40 #N/mm**2 #Max torsional shear stress\n",
+ "G=84*10**3 #N/mm**2 #Modulus of rigidity\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#P=2*pi*n*T*(60)**-1 #Equation of Power transmitted\n",
+ "T=P*60*(2*pi*n)**-1 #N-mm #torsional moment\n",
+ "\n",
+ "#From Consideration of shear stress\n",
+ "d1=(T*16*(pi*40)**-1)**0.333333 \n",
+ "\n",
+ "#From Consideration of angle of twist\n",
+ "d2=(T*L*32*180*(pi*84*10**3*pi)**-1)**0.25\n",
+ "\n",
+ "#result\n",
+ "print\"Diameter of solid shaft is\",round(d1,2),\"mm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Diameter of solid shaft is 124.09 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 21
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.3,Page No.227"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "G=80*10**3 #N/mm**2 #Modulus of rigidity\n",
+ "q_s=80 #N/mm**2 #Max sheare stress\n",
+ "P=736*10**6 #N-mm/sec #Power transmitted\n",
+ "n=200\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "T=P*60*(2*pi*n)**-1 #N-mm #Torsional moment\n",
+ "\n",
+ "#Now From consideration of angle of twist\n",
+ "theta=pi*180**-1\n",
+ "#L=15*d\n",
+ "\n",
+ "d=(T*32*180*15*(pi**2*G)**-1)**0.33333\n",
+ "\n",
+ "#Now corresponding stress at the surface is\n",
+ "q_s2=T*32*d*(pi*2*d**4)**-1\n",
+ "\n",
+ "#Result\n",
+ "print\"Max diameter required is\",round(d,2),\"mm\"\n",
+ "print\"Corresponding shear stress is\",round(q_s2,2),\"N/mm**2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Max diameter required is 156.66 mm\n",
+ "Corresponding shear stress is 46.55 N/mm**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.4,Page No.228"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "d=25 #mm #Diameter of steel bar\n",
+ "p=50*10**3 #N #Pull\n",
+ "dell_1=0.095 #mm #Extension of bar\n",
+ "l=200 #mm #Guage Length\n",
+ "T=200*10**3 #N-mm #Torsional moment\n",
+ "theta=0.9*pi*180**-1 #angle of twist\n",
+ "L=250 #mm Length of steel bar\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "A=pi*4**-1*d**2 #Area of steel bar #mm**2\n",
+ "E=p*l*(dell_1*A)**-1 #N/mm**2 #Modulus of elasticity \n",
+ "\n",
+ "J=pi*32**-1*d**4 #mm**4 #Polar modulus\n",
+ "\n",
+ "G=T*L*(theta*J)**-1 #Modulus of rigidity #N/mm**2\n",
+ "\n",
+ "#Now from the relation of Elastic constants\n",
+ "mu=E*(2*G)**-1-1\n",
+ "\n",
+ "#result\n",
+ "print\"The Poissoin's ratio is\",round(mu,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The Poissoin's ratio is 0.292\n"
+ ]
+ }
+ ],
+ "prompt_number": 30
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.5,Page No.229"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "L=6000 #mm #Length of circular shaft\n",
+ "d1=100 #mm #Outer Diameter\n",
+ "d2=75 #mm #Inner Diameter\n",
+ "R=100*2**-1 #Radius of shaft\n",
+ "T=10*10**6 #N-mm #Torsional moment\n",
+ "G=80*10**3 #N/mm**2 #Modulus of Rigidity\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "J=pi*32**-1*(d1**4-d2**4) #mm**4 #Polar Modulus \n",
+ "\n",
+ "#Max Shear stress produced\n",
+ "q_s=T*R*J**-1 #N/mm**2\n",
+ "\n",
+ "#Angle of twist\n",
+ "theta=T*L*(G*J)**-1 #Radian\n",
+ "\n",
+ "#Result\n",
+ "print\"MAx shear stress produced is\",round(q_s,2),\"N/mm**2\"\n",
+ "print\"Angle of Twist is\",round(theta,2),\"Radian\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "MAx shear stress produced is 74.5 N/mm**2\n",
+ "Angle of Twist is 0.11 Radian\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.6,Page No.229"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "d1=200 #mm #External Diameter of shaft\n",
+ "t=25 #mm #Thickness of shaft\n",
+ "n=200 #rpm\n",
+ "theta=0.5*pi*180**-1 #Radian #angle of twist\n",
+ "L=2000 #mm #Length of shaft\n",
+ "G=84*10**3 #N/mm**2\n",
+ "d2=d1-2*t #mm #Internal Diameter of shaft\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "J=pi*32**-1*(d1**4-d2**4) #mm**4 #Polar Modulus \n",
+ "\n",
+ "#Torsional moment\n",
+ "T=G*J*theta*L**-1 #N/mm**2 \n",
+ "\n",
+ "#Power Transmitted\n",
+ "P=2*pi*n*T*60**-1*10**-6 #N-mm\n",
+ "\n",
+ "#Max shear stress transmitted\n",
+ "q_s=G*theta*(d1*2**-1)*L**-1 #N/mm**2 \n",
+ "\n",
+ "#Result\n",
+ "print\"Power Transmitted is\",round(P,2),\"N-mm\"\n",
+ "print\"Max Shear stress produced is\",round(q_s,2),\"N/mm**2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power Transmitted is 824.28 N-mm\n",
+ "Max Shear stress produced is 36.65 N/mm**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.7,Page No.230"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "P=3750*10**6 #N-mm/sec\n",
+ "n=240 #Rpm\n",
+ "q_s=160 #N/mm**2 #Max shear stress\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#d2=0.8*d2 #mm #Internal Diameter of shaft\n",
+ "\n",
+ "#J=pi*32**-1*(d1**4-d2**4) #mm**4 #Polar modulus\n",
+ "#After substituting value in above Equation we get\n",
+ "#J=0.05796*d1**4\n",
+ "\n",
+ "T=P*60*(2*pi*n)**-1 #N-mm #Torsional moment\n",
+ "\n",
+ "#Now from Torsion Formula\n",
+ "#T*J**-1=q_s*R**-1 ......................................(1)\n",
+ "\n",
+ "#But R=d1*2**-1 \n",
+ "\n",
+ "#Now substituting value of R and J in Equation (1) we get\n",
+ "d1=(T*(0.05796*q_s*2)**-1)**0.33333\n",
+ "\n",
+ "d2=d1*0.8\n",
+ "\n",
+ "#Result\n",
+ "print\"The size of the Shaft is:d1\",round(d1,3),\"mm\"\n",
+ "print\" :d2\",round(d2,3),\"mm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The size of the Shaft is:d1 200.362 mm\n",
+ " :d2 160.289 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.8,Page No.231"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "P=245*10**6 #N-mm/sec #Power transmitted\n",
+ "n=240 #rpm\n",
+ "q_s=40 #N/mm**2 #Shear stress\n",
+ "theta=pi*180**-1 #radian #Angle of twist\n",
+ "L=1000 #mm #Length of shaft\n",
+ "G=80*10**3 #N/mm**2\n",
+ "\n",
+ "#Tmax=1.5*T\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "T=P*60*(2*pi*n)**-1 #N-mm #Torsional Moment\n",
+ "Tmax=1.5*T\n",
+ "\n",
+ "#Now For Solid shaft\n",
+ "#J=pi*32*d**4\n",
+ "\n",
+ "#Now from the consideration of shear stress we get\n",
+ "#T*J**-1=q_s*(d*2**-1)**-1\n",
+ "#After substituting value in above Equation we get\n",
+ "#T=pi*16**-1*d**3*q_s\n",
+ "\n",
+ "#Designing For max Torque\n",
+ "d=(Tmax*16*(pi*40)**-1)**0.33333 #mm #Diameter of shaft\n",
+ "\n",
+ "#For max Angle of Twist\n",
+ "#Tmax*J**-1=G*theta*L**-1 \n",
+ "#After substituting value in above Equation we get\n",
+ "d2=(Tmax*32*180*L*(pi**2*G)**-1)**0.25\n",
+ "\n",
+ "#For Hollow Shaft\n",
+ "\n",
+ "#d1_2=Outer Diameter\n",
+ "#d2_2=Inner Diameter\n",
+ "\n",
+ "#d2_2=0.5*d1_2\n",
+ "\n",
+ "# Polar modulus\n",
+ "#J=pi*32**-1*(d1_2**4-d2_2**4)\n",
+ "#After substituting values we get\n",
+ "#J=0.092038*d1_2**4\n",
+ "\n",
+ "#Now from the consideration of stress\n",
+ "#Tmax*J**-1=q_s*(d1_2*2**-1)**-1\n",
+ "#After substituting values and further simplifying we get\n",
+ "d1_2=(Tmax*(0.092038*2*q_s)**-1)**0.33333\n",
+ "\n",
+ "#Now from the consideration of angle of twist\n",
+ "#Tmax*J**-1=G*theta*L**-1\n",
+ "#After substituting values and further simplifying we get\n",
+ "d1_3=(Tmax*180*L*(0.092038*G*pi)**-1)**0.25\n",
+ "\n",
+ "d2_2=0.5*d1_2\n",
+ "\n",
+ "#result\n",
+ "print\"Diameter of shaft is:For solid shaft:d\",round(d,2),\"mm\"\n",
+ "print\" :For Hollow shaft:d1_2\",round(d1_2,3),\"mm\"\n",
+ "print\" : :d2_2\",round(d2_2,3),\"mm\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Diameter of shaft is:For solid shaft:d 123.01 mm\n",
+ " :For Hollow shaft:d1_2 125.69 mm\n",
+ " : :d2_2 62.845 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.11,Page No.235"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "P=250*10**6 #N-mm/sec #Power transmitted\n",
+ "n=100 #rpm\n",
+ "q_s=75 #N/mm**2 #Shear stress\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#From Equation of Power we have\n",
+ "T=P*60*(2*pi*n)**-1 #N-mm #Torsional moment\n",
+ "\n",
+ "#Now from torsional moment equation we have\n",
+ "#T=j*q_s*(d/2**-1)**-1\n",
+ "#After substituting values in above equation and further simplifying we get\n",
+ "#T=pi*16**-1**d**3*q_s\n",
+ "d=(T*16*(pi*q_s)**-1)**0.3333 #mm #Diameter of solid shaft\n",
+ "\n",
+ "#PArt-2\n",
+ "\n",
+ "#Let d1 and d2 be the outer and inner diameter of hollow shaft\n",
+ "#d2=0.6*d1\n",
+ "\n",
+ "#Again from torsional moment equation we have\n",
+ "#T=pi*32**-1*(d1**4-d2**4)*q_s*(d1/2)**-1\n",
+ "d1=(T*16*(pi*(1-0.6**4)*q_s)**-1)**0.33333\n",
+ "d2=0.6*d1\n",
+ "\n",
+ "#Cross sectional area of solid shaft\n",
+ "A1=pi*4**-1*d**2 #mm**2\n",
+ "\n",
+ "#cross sectional area of hollow shaft\n",
+ "A2=pi*4**-1*(d1**2-d2**2)\n",
+ "\n",
+ "#Now percentage saving in weight\n",
+ "#Let W be the percentage saving in weight\n",
+ "W=(A1-A2)*100*A1**-1\n",
+ "\n",
+ "#Result\n",
+ "print\"Percentage saving in Weight is\",round(W,3),\"%\"\n",
+ "print\"Size of shaft is:solid shaft:d\",round(d,3),\"mm\"\n",
+ "print\" :Hollow shaft:d1\",round(d1,3),\"mm\"\n",
+ "print\" : :d2\",round(d2,3),\"mm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Percentage saving in Weight is 29.735 %\n",
+ "Size of shaft is:solid shaft:d 117.418 mm\n",
+ " :Hollow shaft:d1 123.031 mm\n",
+ " : :d2 73.818 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.12,Page No.237"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "d=100 #mm #Diameter of solid shaft\n",
+ "d1=100 #mm #Outer Diameter of hollow shaft\n",
+ "d2=50 #mm #Inner Diameter of hollow shaft\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#Torsional moment of solid shaft\n",
+ "#T_s=J*q_s*(d*2**-1)**-1 \n",
+ "#After substituting values in above equation and further simplifying we get\n",
+ "#T_s=pi*16*d**3*q_s ...............(1)\n",
+ "\n",
+ "#torsional moment for hollow shaft is\n",
+ "#T_h=J*q_s*(d1**4-d2**4)**-1*(d1*2**-1)\n",
+ "#After substituting values in above equation and further simplifying we get\n",
+ "#T_h=pi*32**-1*2*d1**-1*(d1**4-d2**4)*q_s ...........(2)\n",
+ "\n",
+ "#Dividing Equation 2 by 1 we get\n",
+ "#Let the ratio of T_h*T_s**-1 Be X\n",
+ "X=1-0.5**4\n",
+ "\n",
+ "#Loss in strength \n",
+ "#Let s be the loss in strength\n",
+ "#s=T_s*T_h*100*T_s**-1\n",
+ "#After substituting values in above equation and further simplifying we get\n",
+ "s=(1-0.9375)*100\n",
+ "\n",
+ "#Weight Ratio \n",
+ "#Let w be the Weight ratio\n",
+ "#w=W_h*W_s**-1\n",
+ "\n",
+ "A_h=pi*32**-1*(d1**2-d2**2) #mm**2 #Area of Hollow shaft\n",
+ "A_s=pi*32**-1*d**2 #mm**2 #Area of solid shaft\n",
+ "\n",
+ "w=A_h*A_s**-1 \n",
+ "\n",
+ "#Result\n",
+ "print\"Loss in strength is\",round(s,2)\n",
+ "print\"Weight ratio is\",round(w,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Loss in strength is 6.25\n",
+ "Weight ratio is 0.75\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.13,Page No.239"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "T=8 #KN-m #Torque \n",
+ "d=100 #mm #Diameter of portion AB\n",
+ "d1=100 #mm #External Diameter of Portion BC\n",
+ "d2=75 #mm #Internal Diameter of Portion BC\n",
+ "G=80 #KN/mm**2 #Modulus of Rigidity\n",
+ "L1=1500 #mm #Radial Distance of Portion AB\n",
+ "L2=2500 #mm #Radial Distance ofPortion BC\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "R=d*2**-1 #mm #Radius of shaft\n",
+ "\n",
+ "#For Portion AB,Polar Modulus\n",
+ "J1=pi*32**-1*d**4 #mm**4 \n",
+ "\n",
+ "#For Portion BC,Polar modulus \n",
+ "J2=pi*32**-1*(d1**4-d2**4) #mm**4\n",
+ "\n",
+ "#Now Max stress occurs in portion BC since max radial Distance is sme in both cases\n",
+ "q_max=T*J2**-1*R*10**6 #N/mm**2 \n",
+ "\n",
+ "#Let theta1 be the rotation in Portion AB and theta2 be the rotation in portion BC\n",
+ "theta1=T*L1*(G*J1)**-1 #Radians\n",
+ "theta2=T*L2*(G*J2)**-1 #Radians\n",
+ "\n",
+ "#Total Rotational at end C\n",
+ "theta=(theta1+theta2)*10**3 #Radians\n",
+ "\n",
+ "#Result\n",
+ "print\"Max stress induced is\",round(q_max,2),\"N/mm**2\"\n",
+ "print\"Angle of Twist is\",round(theta,3),\"radians\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Max stress induced is 59.6 N/mm**2\n",
+ "Angle of Twist is 0.053 radians\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.14,Page No.240"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "q_b=80 #N/mm**2 #Shear stress in Brass\n",
+ "q_s=100 #N/mm**2 #Shear stress in Steel\n",
+ "G_b=40*10**3 #N/mm**2 \n",
+ "G_s=80*10**3 \n",
+ "L_b=1000 #mm #Length of brass shaft\n",
+ "L_s=1200 #mm #Length of steel shaft\n",
+ "d1=80 #mm #Diameter of brass shaft\n",
+ "d2=60 #mm #Diameter of steel shaft\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#Polar modulus of brass rod\n",
+ "J_b=pi*32**-1*d1**4 #mm**4 \n",
+ "\n",
+ "#Polar modulus of steel rod\n",
+ "J_s=pi*32**-1*d2**4 #mm**4\n",
+ "\n",
+ "#Considering bras Rod:AB\n",
+ "T1=J_b*q_b*(d1*2**-1)**-1 #N-mm \n",
+ "\n",
+ "#Considering Steel Rod:BC\n",
+ "T2=J_s*q_s*(d2*2**-1)**-1 #N-mm\n",
+ "\n",
+ "#Max Torque that can be applied\n",
+ "T2\n",
+ "\n",
+ "#Let theta_b and theta_s be the rotations in Brass and steel respectively\n",
+ "theta_b=T2*L_b*(G_b*J_b)**-1 #Radians\n",
+ "theta_s=T2*L_s*(G_s*J_s)**-1 #Radians\n",
+ "\n",
+ "theta=theta_b+theta_s #Radians #Rotation of free end\n",
+ "\n",
+ "#Result\n",
+ "print\"Total of free end is\",round(theta,3),\"Radians\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Total of free end is 0.076 Radians\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.15,Page No.241"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "G=80*10**3 #N/mm**2 #Modulus of Rigidity\n",
+ "d1=100 #mm #Outer diameter of hollow shft\n",
+ "d2=80 #mm #Inner diameter of hollow shaft\n",
+ "d=80 #mm #diameter of Solid shaft\n",
+ "d3=60 #mm #diameter of Solid shaft having L=0.5m\n",
+ "L1=300 #mm #Length of Hollow shaft\n",
+ "L2=400 #mm #Length of solid shaft\n",
+ "L3=500 #mm #LEngth of solid shaft of diameter 60mm\n",
+ "T1=2*10**6 #N-mm #Torsion in Shaft AB\n",
+ "T2=1*10**6 #N-mm #Torsion in shaft BC\n",
+ "T3=1*10**6 #N-mm #Torsion in shaft CD\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#Now Polar modulus of section AB\n",
+ "J1=pi*32**-1*(d1**4-d2**4) #mm**4 \n",
+ "\n",
+ "#Polar modulus of section BC\n",
+ "J2=pi*32**-1*d**4 #mm**4\n",
+ "\n",
+ "#Polar modulus of section CD\n",
+ "J3=pi*32**-1*d3**4 #mm**4\n",
+ "\n",
+ "#Now angle of twist of AB\n",
+ "theta1=T1*L1*(G*J1)**-1 #radians\n",
+ "\n",
+ "#Angle of twist of BC\n",
+ "theta2=T2*L2*(G*J2)**-1 #radians\n",
+ "\n",
+ "#Angle of twist of CD\n",
+ "theta3=T3*L3*(G*J3)**-1 #radians\n",
+ "\n",
+ "#Angle of twist\n",
+ "theta=theta1-theta2+theta3 #Radians\n",
+ "\n",
+ "#Shear stress in AB From Torsion Equation\n",
+ "q_s1=T1*(d1*2**-1)*J1**-1 #N/mm**2 \n",
+ "\n",
+ "#Shear stress in BC\n",
+ "q_s2=T2*(d*2**-1)*J2**-1 #N/mm**2 \n",
+ "\n",
+ "#Shear stress in CD\n",
+ "q_s3=T3*(d3*2**-1)*J3**-1 #N-mm**2\n",
+ "\n",
+ "#As max shear stress occurs in portion CD,so consider CD\n",
+ "\n",
+ "#Result\n",
+ "print\"Angle of twist at free end is\",round(theta,5),\"Radian\"\n",
+ "print\"Max Shear stress\",round(q_s3,2),\"N/mm**2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Angle of twist at free end is 0.00496 Radian\n",
+ "Max Shear stress 23.58 N/mm**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.16,Page No.242"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "L=1000 #mm #Length of bar\n",
+ "L1=600 #mm #Length of Bar AB\n",
+ "L2=400 #mm #Length of Bar BC\n",
+ "d1=60 #mm #Outer Diameter of bar BC\n",
+ "d2=30 #mm #Inner Diameter of bar BC\n",
+ "d=60 #mm #Diameter of bar AB\n",
+ "T=2*10**6 #N-mm #Total Torque\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#Polar Modulus of Portion AB\n",
+ "J1=pi*32**-1*d**4 #mm*4\n",
+ "\n",
+ "#Polar Modulus of Portion BC\n",
+ "J2=pi*32**-1*(d1**4-d2**4) #mm**4\n",
+ "\n",
+ "#Let T1 be the torque resisted by bar AB and T2 be torque resisted by Bar BC\n",
+ "#Let theta1 and theta2 be the rotation of shaft in portion AB & BC\n",
+ "\n",
+ "#theta1=T1*L1*(G*J1)**-1 #radians\n",
+ "#After substituting values and further simplifying we get \n",
+ "#theta1=32*600*T1*(pi*60**4*G)**-1\n",
+ "\n",
+ "#theta2=T2*L*(J2*G)**-1 #Radians\n",
+ "#After substituting values and further simplifying we get \n",
+ "#theta2=32*400*T2*(pi*60**4*(1-0.5**4)*G)**-1 \n",
+ "\n",
+ "#Now For consistency of Deformation,theta1=theta2\n",
+ "#After substituting values and further simplifying we get \n",
+ "#T1=0.7111*T2 ..................................................(1)\n",
+ "\n",
+ "#But T1+T2=T=2*10**6 ...........................................(2)\n",
+ "#Substituting value of T1 in above equation\n",
+ "\n",
+ "T2=T*(0.7111+1)**-1\n",
+ "T1=0.71111*T2\n",
+ "\n",
+ "#Max stress in Portion AB\n",
+ "q_s1=T1*(d*2**-1)*(J1)**-1 #N/mm**2\n",
+ "\n",
+ "#Max stress in Portion BC\n",
+ "q_s2=T2*(d1*2**-1)*J2**-1 #N/mm**2 \n",
+ "\n",
+ "#Result\n",
+ "print\"Stresses Developed in Portion:AB\",round(q_s1,2),\"N/mm**2\"\n",
+ "print\" :BC\",round(q_s2,2),\"N/mm**2\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Stresses Developed in Portion:AB 19.6 N/mm**2\n",
+ " :BC 29.4 N/mm**2\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.17,Page No.243"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "d1=80 #mm #External Diameter of Brass tube\n",
+ "d2=50 #mm #Internal Diameter of Brass tube\n",
+ "d=50 #mm #Diameter of steel Tube\n",
+ "G_b=40*10**3 #N/mm**2 #Modulus of Rigidity of brass tube\n",
+ "G_s=80*10**3 #N/mm**2 #Modulus of rigidity of steel tube\n",
+ "T=6*10**6 #N-mm #Torque\n",
+ "L=2000 #mm #Length of Tube\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#Polar Modulus of brass tube\n",
+ "J1=pi*32**-1*(d1**4-d2**4) #mm**4 \n",
+ "\n",
+ "#Polar modulus of steel Tube\n",
+ "J2=pi*32**-1*d**4 #mm**4\n",
+ "\n",
+ "#Let T_s & T_b be the torque resisted by steel and brass respectively\n",
+ "#Then, T_b+T_s=T ............................................(1)\n",
+ "\n",
+ "#Since the angle of twist will be the same\n",
+ "#Theta1=Theta2\n",
+ "#After substituting values and further simplifying we get \n",
+ "#Ts=0.360*Tb ...........................................(2)\n",
+ "\n",
+ "#After substituting value of Ts in eqn 1 and further simplifying we get \n",
+ "T_b=T*(0.36+1)**-1 #N-mm\n",
+ "T_s=0.360*T_b\n",
+ "\n",
+ "#Let q_s and q_b be the max stress in steel and brass respectively\n",
+ "q_b=T_b*(d1*2**-1)*J1**-1 #N/mm**2\n",
+ "q_s=T_s*(d2*2**-1)*J2**-1 #N/mm**2\n",
+ "\n",
+ "#Since angle of twist in brass=angle of twist in steel\n",
+ "theta_s=T_s*L*(J2*G_s)**-1\n",
+ "\n",
+ "#Result\n",
+ "print\"Stresses Developed in Materials are:Brass\",round(q_b,2),\"N/mm**2\"\n",
+ "print\" :Steel\",round(q_s,2),\"N/mm**2\"\n",
+ "print\"Angle of Twist in 2m Length\",round(theta_s,3),\"Radians\" "
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Stresses Developed in Materials are:Brass 51.79 N/mm**2\n",
+ " :Steel 64.71 N/mm**2\n",
+ "Angle of Twist in 2m Length 0.065 Radians\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.18,Page No.245"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "d1=60 #mm #External Diameter of aluminium Tube\n",
+ "d2=40 #mm #Internal Diameter of aluminium Tube\n",
+ "d=40 #mm #Diameter of steel tube\n",
+ "q_a=60 #N/mm**2 #Permissible stress in aluminium\n",
+ "q_s=100 #N/mm**2 #Permissible stress in steel tube\n",
+ "G_a=27*10**3 #N/mm**2 \n",
+ "G_s=80*10**3 #N/mm**2 \n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#Polar modulus of aluminium Tube\n",
+ "J_a=pi*32**-1*(d1**4-d2**4) #mm**4\n",
+ "\n",
+ "#Polar Modulus of steel Tube\n",
+ "J_s=pi*32**-1*d**4 #mm**4\n",
+ "\n",
+ "#Now the angle of twist of steel tube = angle of twist of aluminium tube\n",
+ "#T_s*L_s*(J_s*theta_s)**-1=T_a*L_a*(J_a*theta_a)**-1\n",
+ "#After substituting values in above Equation and Further simplifyin we get\n",
+ "#T_s=0.7293*T_a .....................(1)\n",
+ "\n",
+ "#If steel Governs the resisting capacity\n",
+ "T_s1=q_s*J_s*(d*2**-1)**-1 #N-mm\n",
+ "T_a1=T_s1*0.7293**-1 #N-mm\n",
+ "T1=(T_s1+T_a1)*10**-6 #KN-m #Total Torque in steel Tube\n",
+ "\n",
+ "#If aluminium Governs the resisting capacity \n",
+ "T_a2=q_a*J_a*(d1*2**-1) #N-mm\n",
+ "T_s2=T_a2*0.7293 #N-mm\n",
+ "T2=(T_s2+T_a2)*10**-6 #KN-m #Total Torque in aluminium tube\n",
+ "\n",
+ "#Result\n",
+ "print\"Steel Governs the torque carrying capacity\",round(T1,2),\"KN-m\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Steel Governs the torque carrying capacity 2.98 KN-m\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.19,Page No.247"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "P=225*10**6 #N-mm/sec #Power Trasmitted\n",
+ "q_b=80 #N/mm**2 #Shear stress\n",
+ "n=200 #Rpm\n",
+ "q_k=100 #N/mm**2 #PErmissible stress in Keys\n",
+ "D=300 #mm #Diameter of bolt circle\n",
+ "L=150 #mm #Length of shear key\n",
+ "d=16 #mm #Diameterr of bolt\n",
+ "\n",
+ "#Calculations\n",
+ "T=60*P*(2*pi*n)**-1 #N-mm #Torque\n",
+ "\n",
+ "#Now From Torsion Formula\n",
+ "#T*J**-1=q_s*R**-1\n",
+ "#After substituting values we get\n",
+ "#T=pi*16*d**3*n\n",
+ "#After further simplifying we get\n",
+ "d1=(T*16*(pi*q_s)**-1)**0.33333\n",
+ "\n",
+ "#Let b be the width of shear Key\n",
+ "#T=q_k*L*b*R\n",
+ "#After simplifying further we get\n",
+ "b=T*(q_k*L*(d1*2**-1))**-1 #mm\n",
+ "\n",
+ "#Let n2 be the no. of bolts required at bolt circle of radius\n",
+ "R_b=D*2**-1 #mm \n",
+ "\n",
+ "n2=T*4*(q_b*pi*d**2*R_b)**-1\n",
+ "\n",
+ "#result\n",
+ "print\"Minimum no. of Bolts Required are\",round(n2,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Minimum no. of Bolts Required are 4.45\n"
+ ]
+ }
+ ],
+ "prompt_number": 26
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.20,Page No.250"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "T=2*10**6 #N-mm #Torque transmitted\n",
+ "G=80*10**3 #N/mm**2 #Modulus of rigidity\n",
+ "d1=40 #mm \n",
+ "d2=80 #mm\n",
+ "r1=20 #mm\n",
+ "r2=40 #mm\n",
+ "L=2000 #mm #Length of shaft\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#Angle of twist \n",
+ "theta=2*T*L*(r1**2+r1*r2+r2**2)*(3*pi*G*r2**3*r1**3)**-1 #radians\n",
+ "\n",
+ "#If the shaft is treated as shaft of average Diameter\n",
+ "d_avg=(d1+d2)*2**-1 #mm\n",
+ "\n",
+ "theta1=T*L*(G*pi*32**-1*d_avg**4)**-1 #Radians\n",
+ "\n",
+ "#Percentage Error\n",
+ "#Let Percentage Error be E\n",
+ "X=theta-theta1\n",
+ "E=(X*theta**-1)*100 \n",
+ "\n",
+ "#Result\n",
+ "print\"Percentage Error is\",round(E,2),\"%\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Percentage Error is 32.28 %\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.21,Page No.252"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "G=80*10**3 #N/mm**2 \n",
+ "P=1*10**9 #N-mm/sec #Power\n",
+ "n=300 \n",
+ "d1=150 #mm #Outer Diameter\n",
+ "d2=120 #mm #Inner Diameter\n",
+ "L=2000 #mm #Length of circular shaft\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "T=P*60*(2*pi*n)**-1 #N-mm\n",
+ "\n",
+ "#Polar Modulus \n",
+ "J=pi*32**-1*(d1**4-d2**4) #mm**4\n",
+ "\n",
+ "q_s=T*J**-1*(d1*2**-1) #N/mm**2 \n",
+ "\n",
+ "\n",
+ "#Strain ENergy\n",
+ "U=q_s**2*(4*G)**-1*pi*4**-1*(d1**2-d2**2)*L\n",
+ "\n",
+ "#Result\n",
+ "print\"Max shear stress is\",round(q_s,2),\"N/mm**2\"\n",
+ "print\"Strain Energy stored in the shaft is\",round(U,2),\"N-mm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Max shear stress is 81.36 N/mm**2\n",
+ "Strain Energy stored in the shaft is 263181.37 N-mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 51
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.22,Page No.254"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "d=12 #mm #Diameter of helical spring\n",
+ "D=150 #mm #Mean Diameter\n",
+ "R=D*2**-1 #mm #Radius of helical spring\n",
+ "n=10 #no.of turns\n",
+ "G=80*10**3 #N/mm**2 \n",
+ "W=450 #N #Load\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#Max shear stress \n",
+ "q_s=16*W*R*(pi*d**3)**-1 #N/mm**2\n",
+ "\n",
+ "#Strain Energy stored\n",
+ "U=32*W**2*R**3*n*(G*d**4)**-1 #N-mm\n",
+ "\n",
+ "#Deflection Produced\n",
+ "dell=64*W*R**3*n*(G*d**4)**-1 #mm\n",
+ "\n",
+ "#Stiffness Spring\n",
+ "k=W*dell**-1 #N/mm\n",
+ "\n",
+ "#Result\n",
+ "print\"Max shear stress is\",round(q_s,2),\"N/mm**2\"\n",
+ "print\"Strain Energy stored is\",round(U,2),\"N-mm\"\n",
+ "print\"Deflection Produced is\",round(dell,2),\"mm\"\n",
+ "print\"Stiffness spring is\",round(k,2),\"N/mm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Max shear stress is 99.47 N/mm**2\n",
+ "Strain Energy stored is 16479.49 N-mm\n",
+ "Deflection Produced is 73.24 mm\n",
+ "Stiffness spring is 6.14 N/mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 53
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.23,Page No.255"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "K=5 #N/mm #Stiffness\n",
+ "L=100 #mm #Solid Length\n",
+ "q_s=60 #N/mm**2 #Max shear stress\n",
+ "W=200 #N #Max Load\n",
+ "G=80*10**3 #N/mm**2\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#K=W*dell**-1\n",
+ "#After substituting values and further simplifying we get\n",
+ "#d=0.004*R**3*n ........(1) #mm #Diameter of wire\n",
+ "#n=L*d**-1 ........(2)\n",
+ "\n",
+ "#From Shearing stress\n",
+ "#q_s=16*W*R*(pi*d**3)**-1 \n",
+ "#After substituting values and further simplifying we get\n",
+ "#d**4=0.004*R**3*n .................(4)\n",
+ "\n",
+ "#From Equation 1,2,3\n",
+ "#d**4=0.004*(0.0785*d**3)**3*100*d**-1\n",
+ "#after further simplifying we get\n",
+ "d=5168.101**0.25\n",
+ "n=100*d**-1\n",
+ "R=(d**4*(0.004*n)**-1)**0.3333\n",
+ "\n",
+ "#Result\n",
+ "print\"Diameter of Wire is\",round(d,2),\"mm\"\n",
+ "print\"No.of turns is\",round(n,2)\n",
+ "print\"Mean Radius of spring is\",round(R,2),\"mm\""
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Diameter of Wire is 8.48 mm\n",
+ "No.fo turns is 11.79\n",
+ "Mean Radius of spring is 47.83 mm\n"
+ ]
+ }
+ ],
+ "prompt_number": 54
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.24,Page No.255"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "m=5*10**5 #Wagon Weighing\n",
+ "v=18*1000*36000**-1 \n",
+ "d=300 #mm #Diameter of Beffer springs\n",
+ "n=18 #no.of turns\n",
+ "G=80*10**3 #N/mm**2\n",
+ "dell=225\n",
+ "R=100 #mm #Mean Radius\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#Energy of Wagon\n",
+ "E=m*v**2*(9.81*2)**-1 #N-mm\n",
+ "\n",
+ "#Load applied\n",
+ "W=dell*G*d**4*(64*R**3*n)**-1 #N \n",
+ "\n",
+ "#Energy each spring can absorb is\n",
+ "E2=W*dell*2**-1 #N-mm\n",
+ "\n",
+ "#No.of springs required to absorb energy of Wagon\n",
+ "n2=E*E2**-1 *10**7\n",
+ "\n",
+ "#Result\n",
+ "print\"No.of springs Required for Buffer is\",round(n2,2)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "No.of springs Required for Buffer is 4.47\n"
+ ]
+ }
+ ],
+ "prompt_number": 66
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.25,Page No.259"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "b=180 #mm #width of flange\n",
+ "d=10 #mm #Depth of flange\n",
+ "t=10 #mm #Thickness of flange\n",
+ "D=400 #mm #Overall Depth \n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "I_xx=1*12**-1*(b*D**3-(b-t)*(D-2*d)**3)\n",
+ "I_yy=1*12**-1*((D-2*d)*t**3+2*t*b**3)\n",
+ "\n",
+ "#If warping is neglected\n",
+ "J=I_xx+I_yy #mm**4\n",
+ "\n",
+ "#Since b/d>1.6,we get\n",
+ "J2=1*3**-1*d**3*b*(1-0.63*d*b**-1)*2+1*3**-1*t**3*(D-2*d)*(1-0.63*t*b**-1)\n",
+ "\n",
+ "#Over Estimation of torsional Rigidity would have been \n",
+ "T=J*J2**-1\n",
+ "\n",
+ "#Result\n",
+ "print\"Error in assessing torsional Rigidity if the warping is neglected is\",round(T,2)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Error in assessing torsional Rigidity if the warping is neglected is 808.28\n"
+ ]
+ }
+ ],
+ "prompt_number": 68
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 6.6.26,Page No.261"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#Initilization of Variables\n",
+ "\n",
+ "d1=100 #mm #Outer Diameter\n",
+ "d2=95 #mm #Inner Diameter\n",
+ "T=2*10**6 #N-mm #Torque\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "J=pi*32**-1*(d1**4-d2**4) #mm**4 #Polar Modulus\n",
+ "\n",
+ "#Shear stress\n",
+ "q_max=T*J**-1*d1*2**-1 #N/mm**2 \n",
+ "\n",
+ "#Now theta*L**-1=T*(G*J)**-1\n",
+ "#After substituting values and further simplifying we get\n",
+ "#Let theta*L**-1=X\n",
+ "X=T*J**-1\n",
+ "\n",
+ "#Now Treating it as very thin walled tube\n",
+ "d=(d1+d2)*2**-1 #mm\n",
+ "\n",
+ "r=d*2**-1 \n",
+ "t=(d1-d2)*2**-1\n",
+ "q_max2=T*(2*pi*r**2*t)**-1 #N/mm**2\n",
+ "\n",
+ "X2=T*(2*pi*r**3*t)**-1 \n",
+ "\n",
+ "#Result\n",
+ "print\"When it is treated as hollow shaft:Max shear stress\",round(q_max,2),\"N/mm**2\"\n",
+ "print\" :Angle of Twist per unit Length\",round(X,3)\n",
+ "print\"When it is very thin Walled Tube :Max shear stress\",round(q_max2,2),\"N/mm**2\"\n",
+ "print\" :Angle of twist per Unit Length\",round(X2,3)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "When it is treated as hollow shaft:Max shear stress 54.91 N/mm**2\n",
+ " :Angle of Twist per unit Length 1.098\n",
+ "When it is very thin Walled Tube :Max shear stress 53.57 N/mm**2\n",
+ " :Angle of twist per Unit Length 1.099\n"
+ ]
+ }
+ ],
+ "prompt_number": 72
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file
diff --git a/sample_notebooks/S PRASHANTHS PRASHANTH/Chapter_1_4.ipynb b/sample_notebooks/S PRASHANTHS PRASHANTH/Chapter_1_4.ipynb
new file mode 100644
index 00000000..8713fcf8
--- /dev/null
+++ b/sample_notebooks/S PRASHANTHS PRASHANTH/Chapter_1_4.ipynb
@@ -0,0 +1,593 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 1: Circuit Configuration for Linear Integrated Ciruits"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 1 Page No:1.81"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "adm= -1482.0\n",
+ "acm= -1.0\n",
+ "cmrr= 76.4838188131 db\n"
+ ]
+ }
+ ],
+ "source": [
+ "#given\n",
+ "rc=50000;#ohm\n",
+ "re=100000;#ohm\n",
+ "rs=10000;#ohm\n",
+ "rp=50000;#ohm\n",
+ "beta0=2000;\n",
+ "r0=400000;#ohm\n",
+ "\n",
+ "\n",
+ "\n",
+ "#determine adm,acm,cmrr\n",
+ "#calculation\n",
+ "rc1=(rc*r0)/(rc+r0);\n",
+ "adm=(-(beta0*rc1)/(rs+rp))#differential mode gain\n",
+ "acm=(-(beta0*rc1)/(rs+rp+2*re*(beta0+1)))#common mode gain\n",
+ "import math\n",
+ "cmrr=20*(math.log10((1+((2*re*(beta0+1))/(rs+rp)))))#common mode rejection ratio\n",
+ "\n",
+ "#result\n",
+ "print 'adm=',round(adm,3);\n",
+ "print 'acm=',round(acm,3);\n",
+ "print 'cmrr=',cmrr,'db'\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 2 Page No:1.83"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "maximum peak amplitude at 100khz 3.185 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "#given\n",
+ "sr=0.000001;#volt/sec\n",
+ "freq=100000;\n",
+ "vsat=12;\n",
+ "baw=100000;\n",
+ "#determine vx\n",
+ "\n",
+ "#calculation\n",
+ "vx=2*(1/(sr*2*3.14*freq))\n",
+ "\n",
+ "#result\n",
+ "print 'maximum peak amplitude at 100khz',round(vx,3),'V'\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 3 Page No: 1.84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "slew rate= 5 volt/μsec\n"
+ ]
+ }
+ ],
+ "source": [
+ "#given\n",
+ "V=20;\n",
+ "t=4;\n",
+ "#determine slew rate\n",
+ "#calculation\n",
+ "w=V/t\n",
+ "#result\n",
+ "print'slew rate=',w,'volt/μsec'\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 4 Page No: 1.84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 7,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "max frequency of input is 79617.8343949 hz\n"
+ ]
+ }
+ ],
+ "source": [
+ "#given\n",
+ "a=50;\n",
+ "vi=20e-3;\n",
+ "sr=0.5e6;\n",
+ "#determine max frequency\n",
+ "#calculation\n",
+ "vm=a*vi;\n",
+ "freq=sr/(2*3.14*vm)\n",
+ "#result\n",
+ "print 'max frequency of input is ',freq,'hz'\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 5 Page No: 1.84"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 8,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "max peak to peak input signal 0.398089171975 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "#given\n",
+ "sr=0.5e6;\n",
+ "freq=40e3;\n",
+ "a=10;\n",
+ "#determine max peak to peak input signal\n",
+ "#calculation\n",
+ "vm=sr/(2*3.14*freq);\n",
+ "vm=2*vm;\n",
+ "v1=vm/a\n",
+ "#result\n",
+ "print'max peak to peak input signal ',v1,'V'\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": true
+ },
+ "source": [
+ "## Example 6 Page No: 1.85"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 9,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "noise 0.0063247 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "#given\n",
+ "adm=400;\n",
+ "cmrr=50;\n",
+ "vin1=50e-3;\n",
+ "vin2=60e-3;\n",
+ "vnoise=5e-3;\n",
+ "#calculation\n",
+ "v0=(vin2-vin1)*adm;\n",
+ "acm=adm/316.22;\n",
+ "v1=vnoise*acm\n",
+ "print'noise ',round(v1,7),'V'\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 7 Page No: 1.86"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 10,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "time to change from 0 t0 15 4e-07 sec\n",
+ "slew rate 1.5 volt/μsec\n"
+ ]
+ }
+ ],
+ "source": [
+ "#given\n",
+ "sr=35e6;#volt/sec\n",
+ "vsat=15;#volt\n",
+ "#determine time to change from 0 to 15V\n",
+ "#calculation\n",
+ "c=100e-12;#farad\n",
+ "i=150e-6;#A\n",
+ "w=vsat/sr\n",
+ "w1=i/c;\n",
+ "#result\n",
+ "print'time to change from 0 t0 15 ',round(w,7),'sec'\n",
+ "print'slew rate',w1/1000000,'volt/μsec'\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 8 Page No: 1.86"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 11,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "bandwidth 21231.4225053 hz\n"
+ ]
+ }
+ ],
+ "source": [
+ "#given\n",
+ "sr=2e6;#v/sec\n",
+ "vsat=15;#volt\n",
+ "#determine bandwidth \n",
+ "#calculation\n",
+ "\n",
+ "bw=sr/(2*3.14*vsat)\n",
+ "#result\n",
+ "print'bandwidth ',bw,'hz'\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 9 Page No: 1.87"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 12,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "output offset 3.0 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "#given\n",
+ "iin=30e-9;#A\n",
+ "a=1e5;\n",
+ "rin=1000;#ohm\n",
+ "#determine output offset voltage\n",
+ "#calculation\n",
+ "vid=iin*rin;\n",
+ "v0=a*vid\n",
+ "#result\n",
+ "print'output offset ',v0,'V'\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 10 Page No: 1.86"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 13,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "input offset current 4e-06 A\n",
+ "input base current 2.4e-05 A\n"
+ ]
+ }
+ ],
+ "source": [
+ "#given\n",
+ "inb1=22e-6;#A\n",
+ "inb2=26e-6;#A\n",
+ "#determine input offset current input base current\n",
+ "#calculation\n",
+ "i1=inb2-inb1\n",
+ "i2=(inb2+inb1)/2\n",
+ "#result\n",
+ "print'input offset current ',i1,'A'\n",
+ "print'input base current ',i2,'A'\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "##Example 11 Page No: 1.86"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 14,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "input base current 8e-08 A\n",
+ "input offset current 2e-08 A\n",
+ "input offset 2.0 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "#given\n",
+ "inb2=90e-9;#A\n",
+ "inb1=70e-9;#A\n",
+ "a=1e5;\n",
+ "#determine input offset current\n",
+ "#calculation\n",
+ "i1=(inb2+inb1)/2\n",
+ "i2=inb2-inb1\n",
+ "v1=((inb2-inb1)*1000)*a\n",
+ "print'input base current ',i1,'A'\n",
+ "print'input offset current ',i2,'A'\n",
+ "print'input offset ',v1,'V'\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 12 Page No: 1.87"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 15,
+ "metadata": {
+ "collapsed": false,
+ "scrolled": true
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "output voltage cmrr 100 0.051 V\n",
+ "output voltage cmrr 200 0.051 V\n",
+ "output voltage cmrr 450 0.05 V\n",
+ "output voltage cmrr 105 0.051 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "#given\n",
+ "vin1=150e-6;#volt\n",
+ "vin2=100e-6;#volt\n",
+ "a=1000;\n",
+ "from array import *\n",
+ "cmrr=array('i',[100,200,450,105])\n",
+ "#determine output voltage\n",
+ "#calculation\n",
+ "vc=(vin1+vin2)/2;\n",
+ "vd=(vin1-vin2);\n",
+ "j=0;\n",
+ "while j<=3 :v0=(a*vd*(1+(vc/(cmrr[j]*vd)))) ;print 'output voltage cmrr ',cmrr[j],' ',round(v0,3),'V';j=j+1;\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 13 Page No: 1.87"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 16,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "output voltage 0.003 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "#given\n",
+ "rin=100e3;#ohm\n",
+ "rf1=900e3;#ohm\n",
+ "vc=1;#volt\n",
+ "cmrr=70;\n",
+ "#determine the output voltage\n",
+ "#calculation\n",
+ "v0=(1+(rf1/rin))*vc/3160\n",
+ "print 'output voltage ',round(v0,3),'V'\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 14 Page No: 1.89"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 2,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "input voltage 0.08 V\n"
+ ]
+ }
+ ],
+ "source": [
+ "#given\n",
+ "sr=0.5e6;#volt/sec\n",
+ "a=50;\n",
+ "freq=20e3;#hz\n",
+ "#determine max peak to peak voltage\n",
+ "#calculation\n",
+ "v1=sr/(2*3.14*freq*a)\n",
+ "print'input voltage ',round(v1,3),'V'\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example 15 Page No: 1.90"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "max frequency 26.539 Khz\n"
+ ]
+ }
+ ],
+ "source": [
+ "#given\n",
+ "sr=50e6;#volt/sec\n",
+ "rin=2;\n",
+ "vimax=10;\n",
+ "#determine max frequency\n",
+ "#calculation\n",
+ "vm=vimax*(1+rin);\n",
+ "freq=sr/(2*3.14*vm)/10e3;\n",
+ "print 'max frequency ',round(freq,3),'Khz'\n"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [],
+ "source": []
+ }
+ ],
+ "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.10"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}