diff options
author | hardythe1 | 2015-06-03 15:27:17 +0530 |
---|---|---|
committer | hardythe1 | 2015-06-03 15:27:17 +0530 |
commit | df60071cf1d1c18822d34f943ab8f412a8946b69 (patch) | |
tree | ab059cf19bad4a1233a464ccf5d72cf8b3fb323c /Integrated_Electronics__Analog_And_Digital_Circuits_and_Systems/Chapter18.ipynb | |
parent | fba055ce5aa0955e22bac2413c33493b10ae6532 (diff) | |
download | Python-Textbook-Companions-df60071cf1d1c18822d34f943ab8f412a8946b69.tar.gz Python-Textbook-Companions-df60071cf1d1c18822d34f943ab8f412a8946b69.tar.bz2 Python-Textbook-Companions-df60071cf1d1c18822d34f943ab8f412a8946b69.zip |
add books
Diffstat (limited to 'Integrated_Electronics__Analog_And_Digital_Circuits_and_Systems/Chapter18.ipynb')
-rwxr-xr-x | Integrated_Electronics__Analog_And_Digital_Circuits_and_Systems/Chapter18.ipynb | 566 |
1 files changed, 566 insertions, 0 deletions
diff --git a/Integrated_Electronics__Analog_And_Digital_Circuits_and_Systems/Chapter18.ipynb b/Integrated_Electronics__Analog_And_Digital_Circuits_and_Systems/Chapter18.ipynb new file mode 100755 index 00000000..f9d407fd --- /dev/null +++ b/Integrated_Electronics__Analog_And_Digital_Circuits_and_Systems/Chapter18.ipynb @@ -0,0 +1,566 @@ +{
+ "metadata": {
+ "name": ""
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 18 : Power Circuits and Systems"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.1a, Page No 780"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "\n",
+ "Vo=25.0 #in V\n",
+ "ro=10.0 #in ohm\n",
+ "\n",
+ "print('select a silicon reference diode')\n",
+ "print('two IN7555 diodes are provided')\n",
+ "Rz = 12.0 #in ohm\n",
+ "Vo=25.0 #output voltage in V\n",
+ "Vr = 7.5 + 7.5 #because two diodes are used\n",
+ "Iz = 20.0 #in mA\n",
+ "Ie2=10.0 #in mA\n",
+ "Ic2 = Ie2\n",
+ "Icmax=30.0 #in mA\n",
+ "Vcemax=45.0 #in V\n",
+ "hFE2=220.0 \n",
+ "hfe2=200.0 \n",
+ "hie2=800.0 #in ohm\n",
+ "Id=10.0 #in mA\n",
+ "Il = 1000.0 #in mA\n",
+ "Vi = 50.0 #in V\n",
+ "dVi = 10.0 #change in input voltage\n",
+ "dIl = 1.0 #change in load current\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#For D1 and D2 operate\n",
+ "Iz = Id + Id\n",
+ "Rd = (Vo-Vr)/Id\n",
+ "print(\"The value of Rd is %.2f K \" %Rd)\n",
+ "Ib2 = (1000.0*Ic2)/hFE2\n",
+ "print(\"The value of Ib2 is %.2f microA \" %Ib2)\n",
+ "#Since we require I1>Ib2 , we select\n",
+ "I1=10*(10**-3)#in A\n",
+ "Vbe = 0.7#in V\n",
+ "V2 = Vbe + Vr\n",
+ "print(\"The value of V2 is %.2f v \" %V2)\n",
+ "R1 = (Vo-V2)/I1\n",
+ "R2 = V2/I1\n",
+ "print(\"The value of R1 is %.2f ohm \" %R1)\n",
+ "print(\"The value of R2 is %.2f ohm \" %R2)\n",
+ "#We are selecting Texas Instruments 2N1722 silicon power transistor, so following parameters are required\n",
+ "print('We are selecting Texas Instruments 2N1722 silicon power transistor')\n",
+ "Ic1 = 1#in A\n",
+ "hFE1=125.0\n",
+ "hfe1=100.0\n",
+ "hie1=20.0\n",
+ "\n",
+ "\n",
+ "#Results\n",
+ "Ib1 =(1000*I1 + Il + Id)/hFE1\n",
+ "print(\"The current through resistor R3 is %.2f mA \" %(Ib1+Ic2))\n",
+ "I=Ib1 + Ic2\n",
+ "\n",
+ "R3 = (Vi - (Vbe + Vo))/I\n",
+ "print(\"The value of R3 is %.2f K \" %R3)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "select a silicon reference diode\n",
+ "two IN7555 diodes are provided\n",
+ "The value of Rd is 1.00 K \n",
+ "The value of Ib2 is 45.45 microA \n",
+ "The value of V2 is 15.70 v \n",
+ "The value of R1 is 930.00 ohm \n",
+ "The value of R2 is 1570.00 ohm \n",
+ "We are selecting Texas Instruments 2N1722 silicon power transistor\n",
+ "The current through resistor R3 is 18.16 mA \n",
+ "The value of R3 is 1.34 K \n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.1b, Page No 780"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initialisation of variables\n",
+ "Vo=25.0 #in V\n",
+ "ro=10.0 #in ohm\n",
+ "\n",
+ "Rz = 12.0 #in ohm\n",
+ "Vo=25.0 #output voltage in V\n",
+ "Vr = 7.5 + 7.5#because two diodes are used\n",
+ "Iz = 20.0 #in mA\n",
+ "Ie2=10.0 #in mA\n",
+ "Ic2 = Ie2\n",
+ "Icmax=30.0 #in mA\n",
+ "Vcemax=45.0 #in V\n",
+ "hFE2=220.0 \n",
+ "hfe2=200.00 \n",
+ "hie2=800.0 #in ohm\n",
+ "Id=10.0 #in mA\n",
+ "Il = 1000.0 #in mA\n",
+ "Vi = 50.0 #in V\n",
+ "dVi = 10.0 #change in input voltage\n",
+ "dIl = 1.0 #change in load current\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#For D1 and D2 operate\n",
+ "Iz = Id + Id\n",
+ "Rd = (Vo-Vr)/Id\n",
+ "Ib2 = (1000*Ic2)/hFE2\n",
+ "\n",
+ "#Since we require I1>Ib2 , we select\n",
+ "I1=10*(10**-3)#in A\n",
+ "Vbe = 0.7#in V\n",
+ "\n",
+ "V2 = Vbe + Vr\n",
+ "\n",
+ "R1 = (Vo-V2)/I1\n",
+ "R2 = V2/I1\n",
+ "\n",
+ "#We are selecting Texas Instruments 2N1722 silicon power transistor, so following parameters are required\n",
+ "Ic1 = 1#in A\n",
+ "hFE1=125.0\n",
+ "hfe1=100.0\n",
+ "hie1=20.0 \n",
+ "\n",
+ "Ib1 =(1000.0*I1 + Il + Id)/hFE1\n",
+ "#The current through resistor R3\n",
+ "I=Ib1 + Ic2\n",
+ "\n",
+ "R3 = (Vi - (Vbe + Vo))/I\n",
+ "Gm = hfe2*(R2/(R2+R1))*(1/((R1*R2/(R1+R2))+hie2+(1+hfe2)*Rz)) \n",
+ "Sv = (10**-3)/(Gm*R3)\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print(\"The value of Sv is %.2f \" %Sv)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of Sv is 0.02 \n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.1c Page No 780"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initialisation of variables\n",
+ "Vo=25.0 #in V\n",
+ "ro=10.0 #in ohm\n",
+ "Rz = 12.0 #in ohm\n",
+ "Vo=25.0 #output voltage in V\n",
+ "Vr = 7.5 + 7.5#because two diodes are used\n",
+ "Iz = 20.0 #in mA\n",
+ "Ie2=10.0 #in mA\n",
+ "Ic2 = Ie2\n",
+ "Icmax=30.0 #in mA\n",
+ "Vcemax=45.0 #in V\n",
+ "hFE2=220.0\n",
+ "hfe2=200.0\n",
+ "hie2=800.0 #in ohm\n",
+ "Id=10.0 #in mA\n",
+ "Il = 1000.0 #in mA\n",
+ "Vi = 50.0 #in V\n",
+ "dVi = 10.0 #change in input voltage\n",
+ "dIl = 1.0 #change in load current\n",
+ "\n",
+ "#Calculations\n",
+ "#For D1 and D2 operate\n",
+ "Iz = Id + Id\n",
+ "Rd = (Vo-Vr)/Id\n",
+ "\n",
+ "Ib2 = (1000.0*Ic2)/hFE2\n",
+ "\n",
+ "#Since we require I1>Ib2 , we select\n",
+ "I1=10*(10**-3)#in A\n",
+ "Vbe = 0.7#in V\n",
+ "\n",
+ "V2 = Vbe + Vr\n",
+ "\n",
+ "R1 = (Vo-V2)/I1\n",
+ "R2 = V2/I1\n",
+ "\n",
+ "#We are selecting Texas Instruments 2N1722 silicon power transistor, so following parameters are required\n",
+ "Ic1 = 1#in A\n",
+ "hFE1=125.0\n",
+ "hfe1=100.0\n",
+ "hie1=20.0\n",
+ "\n",
+ "Ib1 =(1000*I1 + Il + Id)/hFE1\n",
+ "#The current through resistor R3 is\n",
+ "I=Ib1 + Ic2\n",
+ "\n",
+ "R3 = (Vi - (Vbe + Vo))/I\n",
+ "\n",
+ "Gm = hfe2*(R2/(R2+R1))*(1/((R1*R2/(R1+R2))+hie2+(1+hfe2)*Rz)) \n",
+ "\n",
+ "#Results\n",
+ "print(\"The value of Gm is %.2f \" %Gm)\n",
+ "Ro = (ro + (((1000*R3) + hie1)/(1+hfe1)))/(1 + (Gm*((1000*R3) + ro)))\n",
+ "print(\"The output impedence is = %.2f K \" %Ro)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of Gm is 0.03 \n",
+ "The output impedence is = 0.51 K \n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.1d, Page No 780"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "Vo=25.0 #in V\n",
+ "ro=10.0 #in ohm\n",
+ "\n",
+ "Rz = 12.0 #in ohm\n",
+ "Vo=25.0 #output voltage in V\n",
+ "Vr = 7.5 + 7.5#because two diodes are used\n",
+ "Iz = 20.0 #in mA\n",
+ "Ie2=10.0 #in mA\n",
+ "Ic2 = Ie2\n",
+ "Icmax=30.0 #in mA\n",
+ "Vcemax=45.0 #in V\n",
+ "hFE2=220.0 \n",
+ "hfe2=200.0 \n",
+ "hie2=800.0 #in ohm\n",
+ "Id=10.0 #in mA\n",
+ "Il = 1000.0 #in mA\n",
+ "Vi = 50.0 #in V\n",
+ "dVi = 10.0 #change in input voltage\n",
+ "dIl = 1.0 #change in load current\n",
+ "\n",
+ "#Calculations\n",
+ "\n",
+ "#For D1 and D2 operate\n",
+ "Iz = Id + Id\n",
+ "Rd = (Vo-Vr)/Id\n",
+ "\n",
+ "Ib2 = (1000.0*Ic2)/hFE2\n",
+ "\n",
+ "#Since we require I1>Ib2 , we select\n",
+ "I1=10.0*(10**-3)#in A\n",
+ "Vbe = 0.7#in V\n",
+ "\n",
+ "V2 = Vbe + Vr\n",
+ "\n",
+ "R1 = (Vo-V2)/I1\n",
+ "R2 = V2/I1\n",
+ "\n",
+ "#We are selecting Texas Instruments 2N1722 silicon power transistor, so following parameters are required\n",
+ "Ic1 = 1#in A\n",
+ "hFE1=125.0\n",
+ "hfe1=100.0\n",
+ "hie1=20.0\n",
+ "\n",
+ "Ib1 =(1000.0*I1 + Il + Id)/hFE1\n",
+ "#The current through resistor R3 is\n",
+ "I=Ib1 + Ic2\n",
+ "\n",
+ "R3 = (Vi - (Vbe + Vo))/I\n",
+ "\n",
+ "Gm = hfe2*(R2/(R2+R1))*(1/((R1*R2/(R1+R2))+hie2+(1+hfe2)*Rz)) \n",
+ "Sv = (10**-3)/(Gm*R3)\n",
+ "\n",
+ "Ro = (ro + (((1000*R3) + hie1)/(1+hfe1)))/(1 + (Gm*((1000*R3) + ro)))\n",
+ "\n",
+ "dVo = (Sv*dVi)+(Ro*dIl)\n",
+ "\n",
+ "#Results\n",
+ "print(\"Change in output voltage = %.2f v \" %dVo)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Change in output voltage = 0.74 v \n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.2a Page No 792"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "from scipy import integrate\n",
+ "#initialisation of variables\n",
+ "Vs=230.0 #in V\n",
+ "Rl=200.0 #in ohm\n",
+ "#Trigger is adjusted so that conduction starts after 60degree of start of cycle\n",
+ "#Instantaneous Current il = (230*2^0.5*sin(a))/200\n",
+ "\n",
+ "#Calculations\n",
+ "# to find rms value\n",
+ "xo = math.pi/3.0 #lower limit of integration\n",
+ "x1 = math.pi #upper limit of integration\n",
+ "def f(x):\n",
+ " return((230.0*(2.0**0.5)*math.sin(x))/200.0)**2.0\n",
+ "\n",
+ "\n",
+ "X = integrate.quad(f,xo,x1)\n",
+ "Irms = (X[0]/(2*math.pi))**0.5\n",
+ "\n",
+ "#Results\n",
+ "print(\"The value of Irms is %.2f A \" %Irms)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of Irms is 0.73 A \n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.2b Page No 792"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "from scipy import integrate\n",
+ "#initialisation of variables\n",
+ "Vs=230.0 #in V\n",
+ "Rl=200.0 #in ohm\n",
+ "#Trigger is adjusted so that conduction starts after 60degree of start of cycle\n",
+ "#Instantaneous Current il = (230*2^0.5*sin(a))/200\n",
+ "#It is noted that between 0 to pi/3 SCR voltage equals line voltage and between pi/3 to pi it is zer and for the rest it is equal to line voltage\n",
+ "#Vl = 230*2^0.5*sin(x)\n",
+ "#To find instantaneous power\n",
+ "\n",
+ "x0=math.pi/3#lower limit of integral\n",
+ "x1=math.pi#upper limit of integral\n",
+ "def f(x):\n",
+ " return((230*230*2*(math.sin(x)**2))/200)\n",
+ "\n",
+ "X = integrate.quad(f,xo,x1)\n",
+ "P = X[0]/(2*3.14)\n",
+ "print(\"The value of P is %.2f W \" %P)\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of P is 106.45 W \n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.2c Page No 792"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "\n",
+ "#initialisation of variables\n",
+ "\n",
+ "Vs=230.0 #in V\n",
+ "Rl=200.0 #in ohm\n",
+ "#Trigger is adjusted so that conduction starts after 60degree of start of cycle\n",
+ "#Instantaneous Current il = (230*2**0.5*sin(a))/200\n",
+ "\n",
+ "#To find Vrms\n",
+ "\n",
+ "#Calculations\n",
+ "#It is noted that between 0 to pi/3 SCR voltage equals line voltage and between pi/3 to pi it is zer and for the rest it is equal to line voltage\n",
+ "xo=0 #lower limit of first integral\n",
+ "x1=math.pi/3.0 #upper limit of first integral\n",
+ "x2=math.pi #lower limit of second integral\n",
+ "x3=2.0*(math.pi) #upper limit of second integral\n",
+ "\n",
+ "def f(x):\n",
+ " return((230*(2**0.5)*math.sin(x))**2)\n",
+ "\t\n",
+ "def g(x):\n",
+ " return((230*(2**0.5)*math.sin(x))**2)\n",
+ "\n",
+ "X1 = integrate.quad(f,xo,x1)\n",
+ "X2 = integrate.quad(g,x2,x3)\n",
+ "Vrms = ((X1[0]+X2[0])/(2*math.pi))**0.5\n",
+ "\n",
+ "#Results\n",
+ "print(\"The value of Vrms is %.2f v \" %Vrms)"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of Vrms is 177.82 v \n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example 18.3, Page No 794"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "import math\n",
+ "#initialisation of variables\n",
+ "\n",
+ "#Caption:SCR Relaxation Oscillator Phase control Circuit\n",
+ "#Given Data\n",
+ "C=0.1#in microF\n",
+ "V=60.0 #in V\n",
+ "Vb=32.0 #in V\n",
+ "Vh=10.0 #holding voltage in V\n",
+ "Ih=100.0 #in microA\n",
+ "c=45.0 #conductance angle in degree\n",
+ "cd = 360.0 - c#angle in which capacitor will get charged\n",
+ "td = (cd/360.0)*(1.0/60)#in ms\n",
+ "\n",
+ "#Calculations\n",
+ "#if the anode voltage is positive,the SCR will fire when vc=32V\n",
+ "vc=32#in V\n",
+ "#let time constant = t = R*C\n",
+ "#vc-Vh = (V-Vh)(1-exp(-td/t))\n",
+ "t = -td/math.log(1-((vc-Vh)/(V-Vh)))\n",
+ "\n",
+ "#Results\n",
+ "\n",
+ "print(\"The value of time constant = is %.2f sec \" %t)\n",
+ "R = t/C#Resistance in K\n",
+ "print(\"The value of R is %.2f K \" %(R*1000))\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The value of time constant = is 0.03 sec \n",
+ "The value of R is 251.52 K \n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file |