diff options
Diffstat (limited to 'Electrical_Network_by_R._Singh/Chapter4_1.ipynb')
-rw-r--r-- | Electrical_Network_by_R._Singh/Chapter4_1.ipynb | 1876 |
1 files changed, 1876 insertions, 0 deletions
diff --git a/Electrical_Network_by_R._Singh/Chapter4_1.ipynb b/Electrical_Network_by_R._Singh/Chapter4_1.ipynb new file mode 100644 index 00000000..cc47617a --- /dev/null +++ b/Electrical_Network_by_R._Singh/Chapter4_1.ipynb @@ -0,0 +1,1876 @@ +{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:15adbacd624e62f6c267b9512c0735c4ab19ee7a3215fada8af088cb74ddd009"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter4-AC Circuits"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex1-pg4.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##AC Circuits:example 4.1:(pg4.4)\n",
+ "import math\n",
+ "i=15.;\n",
+ "\n",
+ "t=3.375*10**-3;\n",
+ "f=40.;\n",
+ "pi=3.14;\n",
+ "Im=(i/math.sin(2.*pi*f*t));\n",
+ "print(\"i=15 Amp\");\n",
+ "print(\"t=3.375 ms\");\n",
+ "print(\"f=40 Hz\");\n",
+ "print(\"i=Im*sin(2*pi*f*t)\");\n",
+ "print'%s %.2f %s'%(\"Im= \",Im, \"Amp\");"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "i=15 Amp\n",
+ "t=3.375 ms\n",
+ "f=40 Hz\n",
+ "i=Im*sin(2*pi*f*t)\n",
+ "Im= 20.00 Amp\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex2-pg4.4"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##AC Circuits:example 4.2:(pg4.4)\n",
+ "import math\n",
+ "f=50.;\n",
+ "Im=100.;\n",
+ "i1=86.6;\n",
+ "t=(1/600.);\n",
+ "pi=3.14;\n",
+ "print(\"f=50 c/s\");\n",
+ "print(\"Im=100 A\");\n",
+ "## part(a)\n",
+ "print(\"i=Im*sin(2*pi*f*t)\");\n",
+ "i=Im*math.sin(2*pi*f*t);\n",
+ "print'%s %.2f %s'%(\"i= \",i,\" A\");\n",
+ "## part (b)\n",
+ "print(\"i=Im*sin(2*pi*f*t1)\");\n",
+ "t1=(math.asin(i1/Im)/(2.*pi*f));\n",
+ "print'%s %.2e %s'%(\"t1= \",t1,\" second\");"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "f=50 c/s\n",
+ "Im=100 A\n",
+ "i=Im*sin(2*pi*f*t)\n",
+ "i= 49.98 A\n",
+ "i=Im*sin(2*pi*f*t1)\n",
+ "t1= 3.33e-03 second\n"
+ ]
+ }
+ ],
+ "prompt_number": 2
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex3-pg4.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##AC Circuits:example 4.3:(pg4.5)\n",
+ "f=50.;\n",
+ "import math\n",
+ "I=20.;\n",
+ "t1=0.0025;\n",
+ "t2=0.0125;\n",
+ "I1=14.14;\n",
+ "pi=3.14;\n",
+ "print(\"f=50 c/s\");\n",
+ "print(\"I=20 A\");\n",
+ "print(\"Im=I*sqrt(2)\");\n",
+ "Im=(math.sqrt(2)*I);\n",
+ "print'%s %.2f %s'%(\"\\nIm= \",Im,\" A\");\n",
+ "print(\"\\nEquation of current, \\ni=Im*sin(2*pi*f*t)\");\n",
+ "print(\"=28.28sin(2*pi*f*t)=28.28sin(100*pi*t)\");\n",
+ "print(\"(a)At t=0.0025 seconds\");\n",
+ "i=(Im*math.sin(2.*pi*f*t1));\n",
+ "print'%s %.2f %s'%(\"i= \",i,\" A\"); ##when t=0.0025seconds\n",
+ "print(\"(b)At t=0.0125 seconds\");\n",
+ "i=(Im*math.sin(2*pi*f*t2));\n",
+ "print'%s %.2f %s'%(\"i= \",i,\" A\"); ##when t=0.0125seconds\n",
+ "print(\"(c) i=28.28sin(100*pi*t) \");\n",
+ "t=(math.asin(I1/Im)/(2*math.pi*f));\n",
+ "print'%s %.2e %s'%(\"t= \",t,\" second\");## when I=14.14A"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "f=50 c/s\n",
+ "I=20 A\n",
+ "Im=I*sqrt(2)\n",
+ "\n",
+ "Im= 28.28 A\n",
+ "\n",
+ "Equation of current, \n",
+ "i=Im*sin(2*pi*f*t)\n",
+ "=28.28sin(2*pi*f*t)=28.28sin(100*pi*t)\n",
+ "(a)At t=0.0025 seconds\n",
+ "i= 19.99 A\n",
+ "(b)At t=0.0125 seconds\n",
+ "i= -19.96 A\n",
+ "(c) i=28.28sin(100*pi*t) \n",
+ "t= 1.67e-03 second"
+ ]
+ },
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n"
+ ]
+ }
+ ],
+ "prompt_number": 1
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex4-pg4.5"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##AC Circuits : example 4.4 :pg(4.5)\n",
+ "import math\n",
+ "pi=3.14;\n",
+ "Vm=200.;\n",
+ "print(\"v=200sin314t\");\n",
+ "print(\"v=Vmsin(2*pi*f*t)\");\n",
+ "print(\"(2*pi*f)=314\");\n",
+ "f=(314./(2.*pi));\n",
+ "print'%s %.2f %s'%(\"f= \",f,\" Hz\");\n",
+ "Vavg=((2.*Vm)/pi);\n",
+ "Vrms=(Vm/math.sqrt(2.));\n",
+ "print('\\nFor a sinusoidal waveform, \\nVavg=(2*Vm/pi) \\nVrms=(Vm/sqrt(2))');\n",
+ "kf=(Vrms/Vavg);\n",
+ "kc=(Vm/Vrms);\n",
+ "print'%s %.2f %s'%('\\nform fator=',kf,'');\n",
+ "print'%s %.2f %s'%('\\ncrest factor=',kc,'');\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "v=200sin314t\n",
+ "v=Vmsin(2*pi*f*t)\n",
+ "(2*pi*f)=314\n",
+ "f= 50.00 Hz\n",
+ "\n",
+ "For a sinusoidal waveform, \n",
+ "Vavg=(2*Vm/pi) \n",
+ "Vrms=(Vm/sqrt(2))\n",
+ "\n",
+ "form fator= 1.11 \n",
+ "\n",
+ "crest factor= 1.41 \n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex5-pg4.6"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##AC Circuits : example 4.5 :(pg 4.6)\n",
+ "kf=1.2;\n",
+ "import math\n",
+ "kp=1.5;\n",
+ "Vavg=10.;\n",
+ "print(\"kf=1.2\");\n",
+ "print(\"kp=1.5\");\n",
+ "print(\"Vavg=10\");\n",
+ "print(\"form factor kf=(Vrms/Vavg)\");\n",
+ "Vrms=(kf*Vavg);\n",
+ "print'%s %.2f %s'%(\"\\nVrms= \",Vrms,\" V\");\n",
+ "print(\"peak factor kp=(Vm/Vrms)\");\n",
+ "Vm=(kp*Vrms);\n",
+ "print'%s %.2f %s'%(\"\\nVm= \",Vm,\" V\");"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "kf=1.2\n",
+ "kp=1.5\n",
+ "Vavg=10\n",
+ "form factor kf=(Vrms/Vavg)\n",
+ "\n",
+ "Vrms= 12.00 V\n",
+ "peak factor kp=(Vm/Vrms)\n",
+ "\n",
+ "Vm= 18.00 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex14-pg4.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##AC Circuits: example 4.14 :(pg 4.11)\n",
+ "v1=0.;\n",
+ "import math\n",
+ "v2=40.;\n",
+ "v3=60.;\n",
+ "v4=80.;\n",
+ "v5=100.;\n",
+ "t=8.;\n",
+ "Vavg=((v1+v2+v3+v4+v5+v4+v3+v2)/t);\n",
+ "Vrms=math.sqrt((v1**2+v2**2+v3**2+v4**2+v5**2+v4**2+v3**2+v2**2)/t);\n",
+ "print(\"Vavg=((0.+40.+60.+80.+100.+80.+60.+40.)/8.)\");\n",
+ "print'%s %.2f %s'%(\"\\nVavg= \",Vavg,\" V\");\n",
+ "print(\"Vrms=sqrt((0+(40)^2+(60)^2+(80)^2+(100)^2+(80)^2+(60)^2+(40)^2)/8)\");\n",
+ "print'%s %.2f %s'%(\"\\nVrms= \",Vrms,\" V\");"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Vavg=((0.+40.+60.+80.+100.+80.+60.+40.)/8.)\n",
+ "\n",
+ "Vavg= 57.50 V\n",
+ "Vrms=sqrt((0+(40)^2+(60)^2+(80)^2+(100)^2+(80)^2+(60)^2+(40)^2)/8)\n",
+ "\n",
+ "Vrms= 64.42 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 5
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex15-pg4.11"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##AC Circuits : example 4.15 :pg(4.11 & 4.12)\n",
+ "v1=0.;\n",
+ "import math\n",
+ "v2=10.;\n",
+ "v3=20.;\n",
+ "t=3.;\n",
+ "Vavg=((v1+v2+v3)/t);\n",
+ "Vrms=(math.sqrt((v1**2+v2**2+v3**2)/t));\n",
+ "print(\"Vavg=((0+10+20)/3)\");\n",
+ "print'%s %.2f %s'%(\"Vavg= \",Vavg, \"V\");\n",
+ "print(\"Vrms=(((0)^2+(10)^2+(20)^2)/3)\");\n",
+ "print'%s %.2f %s'%(\"Vrms= \",Vrms,\" V\");"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Vavg=((0+10+20)/3)\n",
+ "Vavg= 10.00 V\n",
+ "Vrms=(((0)^2+(10)^2+(20)^2)/3)\n",
+ "Vrms= 12.91 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 6
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex33-pg4.27"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##AC Circuits : example 4.33 :pg(4.27)\n",
+ "Vm=177.;\n",
+ "import math\n",
+ "Im=14.14;\n",
+ "phi=30.;\n",
+ "V=(Vm/math.sqrt(2));\n",
+ "I=(Im/math.sqrt(2));\n",
+ "pf=math.cos(30/57.3);\n",
+ "P=(V*I*pf);\n",
+ "print(\"v(t)=177sin(314t+10)\");## value of 10 is in degrees\n",
+ "print(\"i(t)=14.14sin(314t-20)\");##value of 20 is in degrees\n",
+ "print(\"\\nCurrent i(t) lags behind voltage v(t) by 30degrees\");\n",
+ "print(\"phi=30degrees\");\n",
+ "print'%s %.2f %s'%(\"Power factor pf=cos(30)= \",pf,\" (lagging)\");\n",
+ "print'%s %.2f %s'%(\"\\nPower consumed P=V*I*cos(phi)= \",P,\" W\");"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "v(t)=177sin(314t+10)\n",
+ "i(t)=14.14sin(314t-20)\n",
+ "\n",
+ "Current i(t) lags behind voltage v(t) by 30degrees\n",
+ "phi=30degrees\n",
+ "Power factor pf=cos(30)= 0.87 (lagging)\n",
+ "\n",
+ "Power consumed P=V*I*cos(phi)= 1083.76 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex42-pg4.32"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##AC Circuits : example 4.42 :pg(4.32 & 4.33)\n",
+ "import math\n",
+ "PR=1000.;\n",
+ "VR=200.;\n",
+ "Pcoil=250.;\n",
+ "Vcoil=300.;\n",
+ "R=((VR**2)/PR);\n",
+ "I=(VR/R);\n",
+ "r=((Pcoil/(I**2)));\n",
+ "Zcoil=(Vcoil/I);\n",
+ "XL=math.sqrt((Zcoil**2)-(r**2));\n",
+ "RT=(R+r);\n",
+ "ZT=math.sqrt((RT**2)+(XL**2));\n",
+ "V=(ZT*I);\n",
+ "print(\"\\nPR=1000 W \\nVR=200 V \\nPcoil=250 W \\nVcoil=300 V \\nPR=(VR^2/R)\");\n",
+ "print'%s %.2f %s'%(\"\\nR= \",R,\" Ohms\");\n",
+ "print'%s %.2f %s'%(\"\\nVR=R*I \\nI= \",I,\" A\");\n",
+ "print(\"Pcoil=(I^2)*r\");\n",
+ "print'%s %.2f %s'%(\"\\nResistance of coil r= \",r,\" Ohm\");\n",
+ "print'%s %.2f %s'%(\"\\nImpedance of coil Zcoil=(Vcoil/I)= \",Zcoil,\" Ohms\");\n",
+ "print'%s %.2f %s'%(\"\\nReactance of coil XL=sqrt((Zcoil^2)-(r^2)) = \",XL,\" Ohms\");\n",
+ "print'%s %.2f %s'%(\"\\nCombined resistance RT=R+r= \",RT,\"Ohms\");\n",
+ "print'%s %.2f %s'%(\"\\nCombined impedance ZT=sqrt(((R+r)^2)+(XL^2)) = \",ZT,\" Ohms\");\n",
+ "print'%s %.2f %s'%(\"\\nSupply voltage V=ZT*I= \",V,\" V\");"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "PR=1000 W \n",
+ "VR=200 V \n",
+ "Pcoil=250 W \n",
+ "Vcoil=300 V \n",
+ "PR=(VR^2/R)\n",
+ "\n",
+ "R= 40.00 Ohms\n",
+ "\n",
+ "VR=R*I \n",
+ "I= 5.00 A\n",
+ "Pcoil=(I^2)*r\n",
+ "\n",
+ "Resistance of coil r= 10.00 Ohm\n",
+ "\n",
+ "Impedance of coil Zcoil=(Vcoil/I)= 60.00 Ohms\n",
+ "\n",
+ "Reactance of coil XL=sqrt((Zcoil^2)-(r^2)) = 59.16 Ohms\n",
+ "\n",
+ "Combined resistance RT=R+r= 50.00 Ohms\n",
+ "\n",
+ "Combined impedance ZT=sqrt(((R+r)^2)+(XL^2)) = 77.46 Ohms\n",
+ "\n",
+ "Supply voltage V=ZT*I= 387.30 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 8
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex47-pg4.36"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##AC Circuits : example 4.47 :pg(4.47)\n",
+ "import math\n",
+ "f1=60.;\n",
+ "V=200.;\n",
+ "P=600.;\n",
+ "I=5.;\n",
+ "f=50.;\n",
+ "Z=V/I;\n",
+ "r=(P/(I**2));\n",
+ "XL=math.sqrt((Z**2)-(r**2));\n",
+ "L=(XL/(2.*math.pi*f));\n",
+ "XL1=(2.*math.pi*f1*L);\n",
+ "Z1=math.sqrt((r**2)+(XL1**2));\n",
+ "I=(V/Z1);\n",
+ "print(\"\\nI=5 A \\nV=200 V \\nP=600 W \\nFor f=50 Hz,\");\n",
+ "print'%s %.2f %s'%(\"\\nZ=V/I = \",Z,\" Ohms\");\n",
+ "print'%s %.2f %s'%(\"\\nP=((I^2)*r) \\nr= \",r,\" Ohms\");\n",
+ "print'%s %.2f %s'%(\"\\nXL=sqrt((Z^2)-(r^2)) \\nXL= \",XL,\" Ohms\");\n",
+ "print'%s %.2f %s'%(\"\\nXL=(2*pi*f*L)\\nL= \",L,\" H\");\n",
+ "print'%s %.2f %s'%(\"\\nFor f=60 Hz \\nXL= \",XL1,\" Ohm\");\n",
+ "print'%s %.2f %s'%(\"\\nr=24 Ohms \\nZ=sqrt((r^2)+(XL^2))= \",Z1,\" Ohms\");\n",
+ "print'%s %.2f %s'%(\"\\nI=V/Z= \",I,\" A\");"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "I=5 A \n",
+ "V=200 V \n",
+ "P=600 W \n",
+ "For f=50 Hz,\n",
+ "\n",
+ "Z=V/I = 40.00 Ohms\n",
+ "\n",
+ "P=((I^2)*r) \n",
+ "r= 24.00 Ohms\n",
+ "\n",
+ "XL=sqrt((Z^2)-(r^2)) \n",
+ "XL= 32.00 Ohms\n",
+ "\n",
+ "XL=(2*pi*f*L)\n",
+ "L= 0.10 H\n",
+ "\n",
+ "For f=60 Hz \n",
+ "XL= 38.40 Ohm\n",
+ "\n",
+ "r=24 Ohms \n",
+ "Z=sqrt((r^2)+(XL^2))= 45.28 Ohms\n",
+ "\n",
+ "I=V/Z= 4.42 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex48-pg4.37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##AC Circuits : example 4.48 :(pg 4.37)\n",
+ "f=50.;\n",
+ "import math\n",
+ "pi=3.14;\n",
+ "Vdc=12.;\n",
+ "Idc=2.5;\n",
+ "Vac=230.;\n",
+ "Iac=2.;\n",
+ "Pac=50.;\n",
+ "R=(Vdc/Idc);\n",
+ "Z=(Vac/Iac);\n",
+ "Pi=(Pac-((Iac**2)*R));\n",
+ "RT=(Pac/(Iac**2));\n",
+ "XL=math.sqrt((Z**2)-(RT**2));\n",
+ "L=(XL/(2.*pi*f));\n",
+ "pf=(RT/Z);\n",
+ "i=(Pi/(Iac**2));\n",
+ "print(\"\\nFor dc V=12 V, I=2.5 A \\nFor ac V=230 V, I=2 A, P=50 W\");\n",
+ "print(\"\\nIn an iron-cored coil,there are two types of losses \\n(i)Losses in core known as core or iron loss \\n(ii)Losses in winding known as copper loss\");\n",
+ "print(\"\\nP=(I^2)*R+Pi \\nP/(I^2)=R+((Pi)/(I^2)) \\nRT=R+(Pi/(I^2)) \\nwhere R is the resistance of the coil and (Pi/I^2) is the resistance which is equivalent to the effect of iron loss\");\n",
+ "print(\"\\nFor dc supply, f=0 \\nXL=0\");\n",
+ "print'%s %.2f %s'%(\"\\nR= \",R,\" Ohm\");\n",
+ "print'%s %.2f %s'%(\"\\nFor ac supply \\nZ= \",Z,\" Ohms\");\n",
+ "print'%s %.2f %s'%(\"\\nIron loss Pi=P-I^2*R= \",Pi,\" W\");\n",
+ "print'%s %.2f %s'%(\"\\nRT=(P/I^2)= \",RT,\" Ohm\");\n",
+ "print'%s %.2f %s'%(\"\\nXL=sqrt((Z^2)-(RT^2))= \",XL,\" Ohm\");\n",
+ "print'%s %.2f %s'%(\"\\nXL=2*pi*L \\nInductance L= \",L,\" H\");\n",
+ "print'%s %.2f %s'%(\"\\nPower factor =RT/Z= \",pf,\" (lagging)\");\n",
+ "print'%s %.2f %s'%(\"\\nThe series resistance equivalent to the effect of iron loss= Pi/(I^2)= \",i,\" Ohms\");"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "For dc V=12 V, I=2.5 A \n",
+ "For ac V=230 V, I=2 A, P=50 W\n",
+ "\n",
+ "In an iron-cored coil,there are two types of losses \n",
+ "(i)Losses in core known as core or iron loss \n",
+ "(ii)Losses in winding known as copper loss\n",
+ "\n",
+ "P=(I^2)*R+Pi \n",
+ "P/(I^2)=R+((Pi)/(I^2)) \n",
+ "RT=R+(Pi/(I^2)) \n",
+ "where R is the resistance of the coil and (Pi/I^2) is the resistance which is equivalent to the effect of iron loss\n",
+ "\n",
+ "For dc supply, f=0 \n",
+ "XL=0\n",
+ "\n",
+ "R= 4.80 Ohm\n",
+ "\n",
+ "For ac supply \n",
+ "Z= 115.00 Ohms\n",
+ "\n",
+ "Iron loss Pi=P-I^2*R= 30.80 W\n",
+ "\n",
+ "RT=(P/I^2)= 12.50 Ohm\n",
+ "\n",
+ "XL=sqrt((Z^2)-(RT^2))= 114.32 Ohm\n",
+ "\n",
+ "XL=2*pi*L \n",
+ "Inductance L= 0.36 H\n",
+ "\n",
+ "Power factor =RT/Z= 0.11 (lagging)\n",
+ "\n",
+ "The series resistance equivalent to the effect of iron loss= Pi/(I^2)= 7.70 Ohms\n"
+ ]
+ }
+ ],
+ "prompt_number": 10
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex49-pg4.37"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##AC Circuits : example 4.49 :(pg 4.37 & 4.38)\n",
+ "import math\n",
+ "f=50.;\n",
+ "I1=4.;\n",
+ "pf1=0.5;\n",
+ "V1=200.;\n",
+ "I2=5.;\n",
+ "pf2=0.8;\n",
+ "V2=40.;\n",
+ "Z1=(V2/I2);\n",
+ "R=(Z1*pf2);\n",
+ "XL1=math.sqrt((Z1**2)-(R**2));\n",
+ "L1=(XL1/(2.*math.pi*f));\n",
+ "Z2=(V1/I1);\n",
+ "RT=(Z2*pf1);\n",
+ "XL2=math.sqrt((Z2**2)-(RT**2));\n",
+ "L2=(XL2/(2.*math.pi*f));\n",
+ "Pi=(V1*I1*pf1-(I1**2)*R);\n",
+ "print(\"\\nWith iron core I=4 A pf=0.5, V=200 V \\nWithout iron core I=5 A pf=0.8, V=40 V \\nWhen the iron-core is removed,\");\n",
+ "print'%s %.2f %s'%(\"\\nZ=V/I= \",Z1,\" Ohms\");\n",
+ "print'%s %.2f %s'%(\"\\npf=R/Z \\nR= \",R,\" Ohms\");\n",
+ "print'%s %.2f %s'%(\"\\nXL=sqrt((Z**2)-(RT**2))= \",XL1,\" Ohms\");\n",
+ "print'%s %.2f %s'%(\"\\nXL=(2*pi*f*L) \\nInductance L= \",L1,\" H\");\n",
+ "print'%s %.2f %s'%(\"\\nWith iron core, \\nZ= \",Z2,\" Ohms\");\n",
+ "print'%s %.2f %s'%(\"\\npf=RT/Z \\nRT= \",RT,\" Ohm\");\n",
+ "print'%s %.2f %s'%(\"\\nXL=sqrt((Z**2)-(RT**2))= \",XL2,\" Ohm\");\n",
+ "print'%s %.2f %s'%(\"\\nXL=(2*pi*f*L) \\nInductance L= \",L2,\" H\");\n",
+ "print'%s %.2f %s'%(\"\\nIron loss Pi=P=(I**2)*R \\n=VIcos(phi)-I**2*R \\n= \",Pi,\" W\");\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "With iron core I=4 A pf=0.5, V=200 V \n",
+ "Without iron core I=5 A pf=0.8, V=40 V \n",
+ "When the iron-core is removed,\n",
+ "\n",
+ "Z=V/I= 8.00 Ohms\n",
+ "\n",
+ "pf=R/Z \n",
+ "R= 6.40 Ohms\n",
+ "\n",
+ "XL=sqrt((Z**2)-(RT**2))= 4.80 Ohms\n",
+ "\n",
+ "XL=(2*pi*f*L) \n",
+ "Inductance L= 0.02 H\n",
+ "\n",
+ "With iron core, \n",
+ "Z= 50.00 Ohms\n",
+ "\n",
+ "pf=RT/Z \n",
+ "RT= 25.00 Ohm\n",
+ "\n",
+ "XL=sqrt((Z**2)-(RT**2))= 43.30 Ohm\n",
+ "\n",
+ "XL=(2*pi*f*L) \n",
+ "Inductance L= 0.14 H\n",
+ "\n",
+ "Iron loss Pi=P=(I**2)*R \n",
+ "=VIcos(phi)-I**2*R \n",
+ "= 297.60 W\n"
+ ]
+ }
+ ],
+ "prompt_number": 11
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex51-pg4.40"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##AC Circuits : example 4.51 :(pg 4.40 & 4.41)\n",
+ "import math\n",
+ "P=2000.;\n",
+ "pf=0.5;\n",
+ "V=230.;\n",
+ "S=(P/pf);\n",
+ "phi=math.acos(pf)*57.3;\n",
+ "I=(P/(V*pf));\n",
+ "Q=(V*I*math.sin(phi/57.3));\n",
+ "print(\"P=2000 W\");\n",
+ "print(\"pf=0.5 (leading)\");\n",
+ "print(\"V=230 V\");\n",
+ "print(\"P=V*I*cos(phi)\");\n",
+ "print'%s %.2f %s'%(\"\\nI= \",I,\" A\");\n",
+ "print'%s %.2f %s'%(\"\\nS=V*I=P/cos(phi)= \",S,\" VA\");\n",
+ "print'%s %.2f %s'%(\"\\nphi= \",phi,\" degrees\");\n",
+ "print'%s %.2f %s'%(\"\\nQ=V*I*sin(phi)= \",Q,\" VAR\");"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "P=2000 W\n",
+ "pf=0.5 (leading)\n",
+ "V=230 V\n",
+ "P=V*I*cos(phi)\n",
+ "\n",
+ "I= 17.39 A\n",
+ "\n",
+ "S=V*I=P/cos(phi)= 4000.00 VA\n",
+ "\n",
+ "phi= 60.00 degrees\n",
+ "\n",
+ "Q=V*I*sin(phi)= 3464.10 VAR\n"
+ ]
+ }
+ ],
+ "prompt_number": 12
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex52-pg4.41"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##AC Circuits : example 4.52 :(pg 4.41)\n",
+ "import math\n",
+ "V=240.;\n",
+ "VR=100.;\n",
+ "P=300.;\n",
+ "f=50.;\n",
+ "R=((VR**2)/P);\n",
+ "I=math.sqrt(P/R);\n",
+ "Z=V/I;\n",
+ "XC=math.sqrt((Z**2)-(R**2));\n",
+ "C=(1./(2.*math.pi*f*XC));\n",
+ "VC=math.sqrt((V**2)-(VR**2));\n",
+ "VCmax=(VC*math.sqrt(2.));\n",
+ "Qmax=(C*VCmax);\n",
+ "Emax=((1./2.)*C*(VCmax**2));\n",
+ "print(\"\\nV=240 V \\nVR=100 V \\nP=300 W \\nf=50 Hz\");\n",
+ "print'%s %.2f %s'%(\"\\nP=(VR^2)/R \\nR=((VR^2)/P)= \",R,\" Ohm\");\n",
+ "print'%s %.2f %s'%(\"\\nP=(I^2)*R \\nI=sqrt((P/R)) \\nI= \",I,\" A\");\n",
+ "print'%s %.2f %s'%(\"\\nZ=V/I=\",Z,\" Ohm\");\n",
+ "print'%s %.2f %s'%(\"\\nXC=sqrt((Z^2)-(R^2))= \",XC,\" Ohm\");\n",
+ "print'%s %.2e %s'%(\"\\nXC=1/2*pi*f*C \\nC= \",C,\" F\");\n",
+ "print'%s %.2f %s'%(\"\\nVoltage across capacitor VC=sqrt((V^2)-(VR^2))= \",VC,\" V\");\n",
+ "print'%s %.2f %s %.2f %s '%(\"\\nMaximum value of max charge \\nVC= \",VCmax,\" V\" and \" \\nQmax=C*VCmax= \",Qmax,\" C\");\n",
+ "print'%s %.2f %s'%(\"\\nMax stored energy Emax=((1/2)*C*(VCmax^2)) \\n= \",Emax,\" J\");\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "V=240 V \n",
+ "VR=100 V \n",
+ "P=300 W \n",
+ "f=50 Hz\n",
+ "\n",
+ "P=(VR^2)/R \n",
+ "R=((VR^2)/P)= 33.33 Ohm\n",
+ "\n",
+ "P=(I^2)*R \n",
+ "I=sqrt((P/R)) \n",
+ "I= 3.00 A\n",
+ "\n",
+ "Z=V/I= 80.00 Ohm\n",
+ "\n",
+ "XC=sqrt((Z^2)-(R^2))= 72.72 Ohm\n",
+ "\n",
+ "XC=1/2*pi*f*C \n",
+ "C= 4.38e-05 F\n",
+ "\n",
+ "Voltage across capacitor VC=sqrt((V^2)-(VR^2))= 218.17 V\n",
+ "\n",
+ "Maximum value of max charge \n",
+ "VC= 308.54 \n",
+ "Qmax=C*VCmax= 0.01 C \n",
+ "\n",
+ "Max stored energy Emax=((1/2)*C*(VCmax^2)) \n",
+ "= 2.08 J\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex53-pg4.42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##AC Circuits : example 4.53 :(pg 4.42)\n",
+ "import math\n",
+ "C=35.*10**-6;\n",
+ "f=50.;\n",
+ "XC=(1./(2.*math.pi*f*C));\n",
+ "R=math.sqrt(3.*(XC**2));\n",
+ "R2=(3*(XC**2));\n",
+ "print'%s %.2f %s'%(\"\\nC=35*10^-6 F \\nf=50 Hz \\nVC=1/2.V \\nXC=1/(2*pi*f*C)= \",XC,\" Ohm\");\n",
+ "print(\"\\nVC=1/2.V \\nXC.I=1/2.Z.I \\nXC=1/2.Z \\nZ=2.XC \\nZ=sqrt((R^2)+(XC^2)) \\n(2XC)^2=(R^2)+(XC^2) \\n3XC^2=R^2\");\n",
+ "print'%s %.2f %s %.2f %s '%(\"\\nR^2=3*XC^2= \",R2,\" Ohm\" and \" \\nR= \",R,\" Ohm\");\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "C=35*10^-6 F \n",
+ "f=50 Hz \n",
+ "VC=1/2.V \n",
+ "XC=1/(2*pi*f*C)= 90.95 Ohm\n",
+ "\n",
+ "VC=1/2.V \n",
+ "XC.I=1/2.Z.I \n",
+ "XC=1/2.Z \n",
+ "Z=2.XC \n",
+ "Z=sqrt((R^2)+(XC^2)) \n",
+ "(2XC)^2=(R^2)+(XC^2) \n",
+ "3XC^2=R^2\n",
+ "\n",
+ "R^2=3*XC^2= 24813.35 \n",
+ "R= 157.52 Ohm \n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex54-pg4.42"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##AC Circuits : example 4.54 :(pg 4.42)\n",
+ "V=125.;\n",
+ "import math\n",
+ "I=2.2;\n",
+ "P=96.8;\n",
+ "f=50.;\n",
+ "Z=V/I;\n",
+ "R=(P/(I**2));\n",
+ "Xc=math.sqrt((Z**2)-(R**2));\n",
+ "C=(1./(2.*math.pi*f*Xc));\n",
+ "print(\"\\nV=125 V \\nP=96.8 W \\nI=2.2 A \\nf=50 Hz\");\n",
+ "print'%s %.2f %s'%(\"\\nZ=V/I= \",Z,\" A\");\n",
+ "print'%s %.2f %s'%(\"\\nP=(I^2)*R \\nR= \",R,\" Ohm\");\n",
+ "print'%s %.2f %s'%(\"\\nXc=sqrt((Z^2)-(R^2))= \",Xc,\" Ohm\");\n",
+ "print'%s %.2e %s'%(\"\\nXc=1/(2*pi*f*C) \\n C= \",C,\" F\");"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "V=125 V \n",
+ "P=96.8 W \n",
+ "I=2.2 A \n",
+ "f=50 Hz\n",
+ "\n",
+ "Z=V/I= 56.82 A\n",
+ "\n",
+ "P=(I^2)*R \n",
+ "R= 20.00 Ohm\n",
+ "\n",
+ "Xc=sqrt((Z^2)-(R^2))= 53.18 Ohm\n",
+ "\n",
+ "Xc=1/(2*pi*f*C) \n",
+ " C= 5.99e-05 F\n"
+ ]
+ }
+ ],
+ "prompt_number": 15
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex57-pg4.46"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##AC Circuits :example 4.57 :(pg 4.46)\n",
+ "import math\n",
+ "j=-math.sqrt(1);\n",
+ "f=50.;\n",
+ "L=0.22;\n",
+ "R1=3.;\n",
+ "Z=3.8+j*6.4;\n",
+ "XL=2.*math.pi*f*L;\n",
+ "R2=3.8;\n",
+ "R=R2-R1;\n",
+ "X=6.4;\n",
+ "XC=XL-X;\n",
+ "C=(1./(2.*math.pi*f*XC));\n",
+ "print(\"\\nZ=(3.8+j*6.4) Ohm\");\n",
+ "print'%s %.2f %s'%(\"\\nXL=2*pi*f*L= \",XL,\" Ohm\");\n",
+ "print(\"\\nZ=(3+j69.12+R-jXC) \\n=(3+R)+j(69.12-XC)\");\n",
+ "print'%s %.2f %s'%(\"\\n3+R=3.8 \\nR= \",R,\" Ohm\");\n",
+ "print'%s %.2f %s'%(\"\\nXC= \",XC,\"Ohm\");\n",
+ "print'%s %.2e %s'%(\"\\nXC=1/2.pi.f.C \\nC= \",C,\" F\");"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "Z=(3.8+j*6.4) Ohm\n",
+ "\n",
+ "XL=2*pi*f*L= 69.12 Ohm\n",
+ "\n",
+ "Z=(3+j69.12+R-jXC) \n",
+ "=(3+R)+j(69.12-XC)\n",
+ "\n",
+ "3+R=3.8 \n",
+ "R= 0.80 Ohm\n",
+ "\n",
+ "XC= 62.72 Ohm\n",
+ "\n",
+ "XC=1/2.pi.f.C \n",
+ "C= 5.08e-05 F\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex58-pg4.46"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##AC Circuits : example 4.58 :(pg 4.46)\n",
+ "import math\n",
+ "R=20.;\n",
+ "phi=45.;\n",
+ "Z=R/math.cos(phi/57.3);\n",
+ "XC=math.sqrt((Z**2)-(R**2));\n",
+ "XL=(2.*XC);\n",
+ "w=1000.;\n",
+ "L=(XL/w);\n",
+ "C=(1./(w*XC));\n",
+ "print(\"\\nvL=300sin(1000t) \\nR=20 Ohm \\nphi=45 \\nVL(max)=2Vcc(max) \\nsqrt(2)*VL=2*sqrt(2)*VC \\nI*XL=2*I*XC \\nXL=2*XC \\ncos(phi)=R/Z\");\n",
+ "print'%s %.2f %s'%(\"\\nZ= \",Z,\" Ohm\");\n",
+ "print'%s %.2f %s'%(\"\\nZ=sqrt((R^2)+(XL-XC)^2) \\nXC = \",XC,\" Ohm\"); ##for series R-L-C ckt\n",
+ "print'%s %.2f %s'%(\"\\nXL=2*XC = \",XL,\" Ohm\");\n",
+ "print'%s %.2f %s'%(\"\\nXL=w*L \\nL= \",L,\" H\");\n",
+ "print'%s %.2e %s'%(\"\\nXC=1/w*C \\nC= \",C,\" F\");\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "vL=300sin(1000t) \n",
+ "R=20 Ohm \n",
+ "phi=45 \n",
+ "VL(max)=2Vcc(max) \n",
+ "sqrt(2)*VL=2*sqrt(2)*VC \n",
+ "I*XL=2*I*XC \n",
+ "XL=2*XC \n",
+ "cos(phi)=R/Z\n",
+ "\n",
+ "Z= 28.28 Ohm\n",
+ "\n",
+ "Z=sqrt((R^2)+(XL-XC)^2) \n",
+ "XC = 20.00 Ohm\n",
+ "\n",
+ "XL=2*XC = 40.00 Ohm\n",
+ "\n",
+ "XL=w*L \n",
+ "L= 0.04 H\n",
+ "\n",
+ "XC=1/w*C \n",
+ "C= 5.00e-05 F\n"
+ ]
+ }
+ ],
+ "prompt_number": 17
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex59-pg4.47"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##AC Circuits : example 4.59 :(pg 4.47)\n",
+ "import math\n",
+ "pf=0.5;\n",
+ "C=79.59*10**-6;\n",
+ "f=50.;\n",
+ "XC=(1./(2.*math.pi*f*C));\n",
+ "R=pf*XC;\n",
+ "Zcoil=XC;\n",
+ "XL=math.sqrt((Zcoil**2)-(R**2));\n",
+ "L=(XL/(2.*math.pi*f));\n",
+ "print(\"\\npf=0.5 \\nC=79.57uF \\nf=50 Hz \\nVcoil=VC \");\n",
+ "print'%s %.2f %s'%(\"\\nXC=1/2*pi*f*C = \",XC,\" Ohm\");\n",
+ "print'%s %.2f %s'%(\"\\nVcoil=VC \\nZcoil=XC= \",XC,\" Ohm\");\n",
+ "print'%s %.2f %s'%(\"\\npf of coil=cos(phi)=R/Zcoil \\nResistance of coil R= \",R,\" Ohm\");\n",
+ "print'%s %.2f %s'%(\"\\nXL=sqrt((Zcoil^2)-(R^2))= \",XL,\" Ohm\");\n",
+ "print'%s %.2f %s'%(\"\\nXL=2*pi*f*L \\nInductance of coil= \",L,\" H\");"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "pf=0.5 \n",
+ "C=79.57uF \n",
+ "f=50 Hz \n",
+ "Vcoil=VC \n",
+ "\n",
+ "XC=1/2*pi*f*C = 39.99 Ohm\n",
+ "\n",
+ "Vcoil=VC \n",
+ "Zcoil=XC= 39.99 Ohm\n",
+ "\n",
+ "pf of coil=cos(phi)=R/Zcoil \n",
+ "Resistance of coil R= 20.00 Ohm\n",
+ "\n",
+ "XL=sqrt((Zcoil^2)-(R^2))= 34.64 Ohm\n",
+ "\n",
+ "XL=2*pi*f*L \n",
+ "Inductance of coil= 0.11 H\n"
+ ]
+ }
+ ],
+ "prompt_number": 18
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex60-pg4.48"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##AC Circuits : example 4.60 :(pg 4.48)\n",
+ "import math\n",
+ "f=50.;\n",
+ "V=250.;\n",
+ "R=5.;\n",
+ "L=9.55;\n",
+ "Vcoil=300.;\n",
+ "XL=2.*math.pi*f*L;\n",
+ "Zcoil=(math.sqrt((R**2)+(XL**2)));\n",
+ "I=Vcoil/Zcoil;\n",
+ "Z=V/I;\n",
+ "XC1=Zcoil-Z;\n",
+ "XC2=Zcoil+Z;\n",
+ "C1=(1./(2.*math.pi*f*XC1));\n",
+ "C2=(1./(2.*math.pi*f*XC2));\n",
+ "print(\"\\nV=250 V \\nR=5 Ohm \\nL=9.55 H \\nVcoil=300 V\");\n",
+ "print'%s %.2f %s'%(\"\\nXL=2*pi*f*L = \",XL,\" Ohm\");\n",
+ "print'%s %.2f %s'%(\"\\nZcoil=sqrt(R^2)+(XL^2) = \",Zcoil,\" Ohm\");\n",
+ "print'%s %.2f %s'%(\"\\nI=Vcoil/Zcoil = \",I,\" A\");\n",
+ "print'%s %.2f %s'%(\"\\nZ=V/I = \",Z,\" Ohm\");##total impedance\n",
+ "print'%s %.2f %s'%(\"\\nZ=sqrt((R^2)+(XL-XC)^2) \\nXC= \",XC1,\" Ohm\");##when XL>XC\n",
+ "print'%s %.2f %s'%(\"\\nC=1/2*pi*f*XC = \",C1,\" F\");\n",
+ "print'%s %.2f %s'%(\"\\nZ=sqrt((R^2)+(XC-XL)^2) \\nXC= \",XC2,\" Ohm\");##when XC>XL\n",
+ "print'%s %.2e %s'%(\"\\nC= \",C2,\" F\");\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "V=250 V \n",
+ "R=5 Ohm \n",
+ "L=9.55 H \n",
+ "Vcoil=300 V\n",
+ "\n",
+ "XL=2*pi*f*L = 3000.22 Ohm\n",
+ "\n",
+ "Zcoil=sqrt(R^2)+(XL^2) = 3000.23 Ohm\n",
+ "\n",
+ "I=Vcoil/Zcoil = 0.10 A\n",
+ "\n",
+ "Z=V/I = 2500.19 Ohm\n",
+ "\n",
+ "Z=sqrt((R^2)+(XL-XC)^2) \n",
+ "XC= 500.04 Ohm\n",
+ "\n",
+ "C=1/2*pi*f*XC = 0.00 F\n",
+ "\n",
+ "Z=sqrt((R^2)+(XC-XL)^2) \n",
+ "XC= 5500.41 Ohm\n",
+ "\n",
+ "C= 5.79e-07 F\n"
+ ]
+ }
+ ],
+ "prompt_number": 19
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex79-pg4.64"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##AC Circuits : example 4.79 :(pg 4.64)\n",
+ "import math\n",
+ "R=10.;\n",
+ "L=0.01;\n",
+ "C=100.*10**-6;\n",
+ "f0=(1./(2.*math.pi*math.sqrt(L*C)));\n",
+ "BW=(R/(2.*math.pi*L));\n",
+ "f1=f0-(BW/2.);\n",
+ "f2=f0+(BW/2.);\n",
+ "print(\"\\nR=10 Ohm \\nL=0.01H \\nC=100uF\");\n",
+ "print'%s %.2f %s'%(\"\\nf0=1/2*pi*sqrt(L*C)= \",f0,\" Hz\");##resonant frequency\n",
+ "print'%s %.2f %s'%(\"\\nBW=R/2*pi*L = \",BW,\" Hz\"); ##bandwidth\n",
+ "print'%s %.2f %s'%(\"\\nf1=f0-BW/2 \\n= \",f1,\" Hz\"); ##lower frequency\n",
+ "print'%s %.2f %s'%(\"\\nf2=f0+BW/2 = \",f2,\" Hz\"); ##higher frequency"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "R=10 Ohm \n",
+ "L=0.01H \n",
+ "C=100uF\n",
+ "\n",
+ "f0=1/2*pi*sqrt(L*C)= 159.15 Hz\n",
+ "\n",
+ "BW=R/2*pi*L = 159.15 Hz\n",
+ "\n",
+ "f1=f0-BW/2 \n",
+ "= 79.58 Hz\n",
+ "\n",
+ "f2=f0+BW/2 = 238.73 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 28
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex80-pg4.65"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##AC Circuits : example 4.80 :(pg 4.65)\n",
+ "import math\n",
+ "R=10.;\n",
+ "L=0.2;\n",
+ "C=40.*10**-6;\n",
+ "V=100.;\n",
+ "f0=(1./(2.*math.pi*math.sqrt(L*C)));\n",
+ "I0=(V/R);\n",
+ "P0=((I0**2)*R);\n",
+ "pf=1.;\n",
+ "Vr=(R*I0);\n",
+ "Vl=((2.*math.pi*f0*L)*I0);\n",
+ "Vc=((1/(2.*math.pi*f0*C))*I0);\n",
+ "Q=((1./R)*math.sqrt(L/C));\n",
+ "f1=(f0-(R/(4.*math.pi*L)));\n",
+ "f2=(f0+(R/(4.*math.pi*L)));\n",
+ "print(\"\\nR=10 Ohm \\nL=0.2 H \\nC=40uF \\nV=100 V\");\n",
+ "print'%s %.2f %s'%(\"\\n(i) f0= 1/2*pi*sqrt(LC) = \",f0,\" Hz\"); ##resonant frequency\n",
+ "print'%s %.2f %s'%(\"\\n(ii) I0= V/R = \",I0,\" A\"); ##current\n",
+ "print'%s %.2f %s'%(\"\\n(iii) P0=(I0^2)*R = \",P0,\" W\");##power\n",
+ "print(\"\\n(iv) pf=1\");##power factor\n",
+ "print'%s %.2f %s'%(\"\\n(v) Rv = R.I = \",Vr,\" V\");##voltage across resistor\n",
+ "print'%s %.2f %s'%(\"\\n Lv = XL.I = \",Vl,\" V\");##voltage across inductor\n",
+ "print'%s %.2f %s'%(\"\\n Cv = XC.I = \",Vc,\" V\"); ##voltage across capacitor\n",
+ "print'%s %.2f %s'%(\"\\n(vi) Q =1/R*sqrt(L/C)=\",Q,\"\");##Quality factor\n",
+ "print'%s %.2f %s'%(\"\\n(vii)f1 = f0-R/4.pi.L = \",f1,\" Hz\"); ##half power points\n",
+ "print'%s %.2f %s'%(\"\\nf2=f0+R/4.pi.L = \",f2,\" Hz\");\n",
+ "## x initialisation \n",
+ "import math\n",
+ "%matplotlib inline\n",
+ "import warnings\n",
+ "warnings.filterwarnings('ignore')\n",
+ "from math import log\n",
+ "import numpy\n",
+ "from math import tan\n",
+ "import matplotlib\n",
+ "from matplotlib import pyplot\n",
+ "x=numpy.array([-1,0.1,6.28]);\n",
+ "##simple plot\n",
+ "y=numpy.sin(x)\n",
+ "pyplot.plot(x,y)\n",
+ "\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "R=10 Ohm \n",
+ "L=0.2 H \n",
+ "C=40uF \n",
+ "V=100 V\n",
+ "\n",
+ "(i) f0= 1/2*pi*sqrt(LC) = 56.27 Hz\n",
+ "\n",
+ "(ii) I0= V/R = 10.00 A\n",
+ "\n",
+ "(iii) P0=(I0^2)*R = 1000.00 W\n",
+ "\n",
+ "(iv) pf=1\n",
+ "\n",
+ "(v) Rv = R.I = 100.00 V\n",
+ "\n",
+ " Lv = XL.I = 707.11 V\n",
+ "\n",
+ " Cv = XC.I = 707.11 V\n",
+ "\n",
+ "(vi) Q =1/R*sqrt(L/C)= 7.07 \n",
+ "\n",
+ "(vii)f1 = f0-R/4.pi.L = 52.29 Hz\n",
+ "\n",
+ "f2=f0+R/4.pi.L = 60.25 Hz\n"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "pyout",
+ "prompt_number": 37,
+ "text": [
+ "[<matplotlib.lines.Line2D at 0x5aad050>]"
+ ]
+ },
+ {
+ "metadata": {},
+ "output_type": "display_data",
+ "png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAFdpJREFUeJzt3X20XHV97/H3l0SKQRBTbB5MaCKQq1UQ8KFRRAdM7gpc\nSu0ft8oqldtru/yjtN57266mupaevyy61l3l2qerqL3Yax9WKZeFokuSwxkB0fD8IElIUcE83JyQ\nBKJIXU3g2z9mAicnM+fMzJ5zZs+e92utWcye2TP7S7Lymb2/e+/fLzITSVJ1nTDoAiRJc8ugl6SK\nM+glqeIMekmqOINekirOoJekiisc9BGxISK2R8S/RMQft3j/NyLi4Yh4JCK+HRHnFt2mJKlzUeQ6\n+ohYADwOrAN2A/cCV2bmtinrvBPYmpmHImIDMJaZa4uVLUnqVNE9+ncAT2Tmk5l5GPgH4FenrpCZ\n38nMQ83FLcCKgtuUJHWhaNC/Dtg5ZXlX87V2Pgx8veA2JUldWFjw8x33fSLiYuC/AhcW3KYkqQtF\ng343sHLK8koae/XHaJ6AvR7YkJnPtPqiiHDQHUnqQWbGTO8Xbd3cB5wdEasi4kTgA8AtU1eIiDOA\nm4CrMvOJWYot/eOTn/zkwGuoSp3DUKN1WmfZH50otEefmUci4hrgm8AC4IuZuS0iPtJ8/3PAJ4DX\nAH8dEQCHM/MdRbYrSepc0dYNmfkN4BvTXvvclOe/Dfx20e1IknrjnbFdqtVqgy6hI8NQ5zDUCNbZ\nb9Y5/wrdMNVPEZFlqUWShkVEkHN8MlaSVHIGvSRVnEEvSRVn0EtSxRn0klRxBr0kVZxBL0kVZ9BL\nUsUZ9JJUcQa9JFWcQS9JFVd49MpRtmsXPPUU/PzPNx6veQ0s9E9UUsk4qFkBl17aCPrDh+HAATh0\nCE499eXg7/SxaBHEjEMSSVJrnQxqZtD36N/+D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Xm\nysxcTeMQ/vayhnxELIqIU5rPTwb+I41RcEsjM/cCOyNiTfOldcBjAyxpNlcCfz/bSqUJ+nY3YJXB\nsNz4FRF/D9wNrImInRHxW4OuqY0LgauAi6dcHrZh0EW1sAy4vdmj3wJ8NTPHB1zTbMrcZlwC3Dnl\nz/NrmXnbgGtq5feAr0TEw8C5wKcGXE9LzR/LdcBNs65blssrJUlzozR79JKkuWHQS1LFGfSSVHEG\nvSRVnEEvSRVn0EtSxRn0klRxBr0kVdy/Axa1VVXVraQUAAAAAElFTkSuQmCC\n",
+ "text": [
+ "<matplotlib.figure.Figure at 0x5932610>"
+ ]
+ }
+ ],
+ "prompt_number": 37
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex81-pg4.66"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##AC Circuits : example 4.81 :(pg 4.66)\n",
+ "import math\n",
+ "V=200.;\n",
+ "Vc=5000.;\n",
+ "I0=20.;\n",
+ "C=4.*10**-6;\n",
+ "R=V/I0;\n",
+ "Xco=Vc/I0;\n",
+ "f0=(1./(2.*math.pi*Xco*C));\n",
+ "L=(Xco/(2.*math.pi*f0));\n",
+ "print(\"\\nV=200 V \\nI0= 20 A \\nVc=5000 V \\nC=4uF\");\n",
+ "print'%s %.2f %s'%(\"\\nR=V/I0 = \",R,\" Ohm\");##resistance\n",
+ "print'%s %.2f %s'%(\"\\nXco=Vco/Io = \",Xco,\" Ohm\");\n",
+ "print'%s %.2f %s'%(\"\\nXco=1/2*pi*f0*C \\nf0=1/2*pi*Xco*C = \",f0,\" Hz\");\n",
+ "print'%s %.2f %s'%(\"\\nat resonance Xco=Xlo \\nXlo= \",Xco,\" Ohm\");\n",
+ "print'%s %.2f %s'%(\"\\nXlo=2*pi*f0*L \\nL= \",L,\" H\");\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "V=200 V \n",
+ "I0= 20 A \n",
+ "Vc=5000 V \n",
+ "C=4uF\n",
+ "\n",
+ "R=V/I0 = 10.00 Ohm\n",
+ "\n",
+ "Xco=Vco/Io = 250.00 Ohm\n",
+ "\n",
+ "Xco=1/2*pi*f0*C \n",
+ "f0=1/2*pi*Xco*C = 159.15 Hz\n",
+ "\n",
+ "at resonance Xco=Xlo \n",
+ "Xlo= 250.00 Ohm\n",
+ "\n",
+ "Xlo=2*pi*f0*L \n",
+ "L= 0.25 H\n"
+ ]
+ }
+ ],
+ "prompt_number": 38
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex82-pg4.66"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##AC Circuits : example 4.82 :(pg 4.66)\n",
+ "import math\n",
+ "V=230.;\n",
+ "f0=50.;\n",
+ "I0=2.;\n",
+ "Vco=500.;\n",
+ "R=V/I0;\n",
+ "Xco=Vco/I0;\n",
+ "C=(1/(2.*math.pi*f0*Xco));\n",
+ "L=(Xco/(2.*math.pi*f0));\n",
+ "print(\"\\nV = 230 V \\nf0 = 50 Hz \\nI0 = 2A \\nVco = 500 V\");\n",
+ "print'%s %.2f %s'%(\"\\nR=V/I0 = \",R,\" Ohm\");\n",
+ "print'%s %.2f %s'%(\"\\nXco=Vco/I0 = \",Xco,\" Ohm\");\n",
+ "print'%s %.2f %s'%(\"\\nXco=1/2.pi.f0.C \\nC= \",C,\" F\");##capacitance\n",
+ "print'%s %.2f %s'%(\"\\nXco=Xlo \\nXlo= \",Xco,\" Ohm\");##at resonance\n",
+ "print'%s %.2f %s'%(\"\\nXlo=2.pi.f0.L \\nL= \",L,\" H\");##inductance\n",
+ "\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "V = 230 V \n",
+ "f0 = 50 Hz \n",
+ "I0 = 2A \n",
+ "Vco = 500 V\n",
+ "\n",
+ "R=V/I0 = 115.00 Ohm\n",
+ "\n",
+ "Xco=Vco/I0 = 250.00 Ohm\n",
+ "\n",
+ "Xco=1/2.pi.f0.C \n",
+ "C= 0.00 F\n",
+ "\n",
+ "Xco=Xlo \n",
+ "Xlo= 250.00 Ohm\n",
+ "\n",
+ "Xlo=2.pi.f0.L \n",
+ "L= 0.80 H\n"
+ ]
+ }
+ ],
+ "prompt_number": 39
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex83-pg4.67"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##AC Circuits : example 4.82 :(pg 4.66)\n",
+ "import math\n",
+ "R=2.;\n",
+ "L=0.01;\n",
+ "V=200.;\n",
+ "f0=50.;\n",
+ "C=(1./(4.*(math.pi)**2*L*(f0**2)));\n",
+ "I0=V/R;\n",
+ "Vco=I0*(1./(2.*math.pi*f0*C));\n",
+ "print(\"\\nR= 2 Ohm \\nL= 0.01 H \\nV=200 V \\nf0=50 Hz \\nf0=1/(2.pi.sqrt(LC)\");\n",
+ "print'%s %.2f %s'%(\"\\nC = \",C,\" F\");##capacitance\n",
+ "print'%s %.2f %s'%(\"\\nI0= V/R = \",I0,\" A\");##current\n",
+ "print'%s %.2f %s'%(\"\\nVco=I0.Xco \\n= \",Vco,\" V\"); ##voltage across capacitor\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "R= 2 Ohm \n",
+ "L= 0.01 H \n",
+ "V=200 V \n",
+ "f0=50 Hz \n",
+ "f0=1/(2.pi.sqrt(LC)\n",
+ "\n",
+ "C = 0.00 F\n",
+ "\n",
+ "I0= V/R = 100.00 A\n",
+ "\n",
+ "Vco=I0.Xco \n",
+ "= 314.16 V\n"
+ ]
+ }
+ ],
+ "prompt_number": 41
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex84-pg4.67"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##AC Circuits : example 4.84 :(pg 4.67)\n",
+ "import math\n",
+ "BW=400.;\n",
+ "Vco=500.;\n",
+ "R=100.;\n",
+ "Vm=10.;\n",
+ "V=(Vm/math.sqrt(2.));\n",
+ "I0=V/R;\n",
+ "L=R/BW;\n",
+ "Q0=Vco/V;\n",
+ "C=(L/(Q0*R)**2);\n",
+ "f0=(1/(2.*math.pi*math.sqrt(L*C)));\n",
+ "f1=(f0-(R/(4.*math.pi*L)));##lower cut-off frequency\n",
+ "f2=(f0+(R/(4.*math.pi*L)));##upper cut-off frequency\n",
+ "print(\"\\nv(t)=10sinwt \\nVco=5000V \\nBW=400rad/s \\nR=100 Ohm\");\n",
+ "print'%s %.2f %s'%(\"\\nV= \",V,\" V\");\n",
+ "print'%s %.2f %s'%(\"\\nI0=V/R= \",I0,\" A\");\n",
+ "print'%s %.2f %s'%(\"\\nBW=R/L \\nL= \",L,\" H\");\n",
+ "print'%s %.2f %s'%(\"\\nQ0=Vco/V =\",Q0,\"\");\n",
+ "print'%s %.2e %s'%(\"\\nQ0=1/R*sqrt(L/C) \\nC= \",C,\" F\");\n",
+ "print'%s %.2f %s'%(\"\\nf0=1/2.pi.sqrt(LC)= \",f0,\" Hz\");\n",
+ "print'%s %.2f %s'%(\"\\nf1=f0-R/4.pi.L = \",f1,\" Hz\");##lower cut-off frequency\n",
+ "print'%s %.2f %s'%(\"\\nf2=f0+R/4.pi.L = \",f2,\" Hz\"); ##upper cut-off frequency"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "v(t)=10sinwt \n",
+ "Vco=5000V \n",
+ "BW=400rad/s \n",
+ "R=100 Ohm\n",
+ "\n",
+ "V= 7.07 V\n",
+ "\n",
+ "I0=V/R= 0.07 A\n",
+ "\n",
+ "BW=R/L \n",
+ "L= 0.25 H\n",
+ "\n",
+ "Q0=Vco/V = 70.71 \n",
+ "\n",
+ "Q0=1/R*sqrt(L/C) \n",
+ "C= 5.00e-09 F\n",
+ "\n",
+ "f0=1/2.pi.sqrt(LC)= 4501.58 Hz\n",
+ "\n",
+ "f1=f0-R/4.pi.L = 4469.75 Hz\n",
+ "\n",
+ "f2=f0+R/4.pi.L = 4533.41 Hz\n"
+ ]
+ }
+ ],
+ "prompt_number": 42
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex85-pg4.68"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##AC Circuits : example 4.85 :(pg 4.68)\n",
+ "import math\n",
+ "R=500.;\n",
+ "f1=100.;\n",
+ "f2=10.*10**3;\n",
+ "BW=f2-f1;\n",
+ "f0=((f1+f2)/2.);\n",
+ "L=(R/(2.*math.pi*BW));\n",
+ "XL0=(2.*math.pi*f0*L);\n",
+ "C=(1/(2.*math.pi*f0*XL0));\n",
+ "Q0=((1./R)*(math.sqrt(L/C)));\n",
+ "print'%s %.2f %s'%(\"\\nR= 500 Ohm \\nf1 = 100 Hz \\nf2=10kHz \\nBW= f2-f1 = \",BW,\" Hz\");\n",
+ "print'%s %.2f %s'%(\"\\nf1=f0-BW/2 ------(i) \\nf2=f0+BW/2 ------(ii) \\nf1+f2 =2f0 \\nf0=(f1+f2)/2 = \",f0,\" Hz\");\n",
+ "print'%s %.2f %s'%(\"\\nBW=R/2.pi.f0.L \\nL= \",L,\" H\");\n",
+ "print'%s %.2f %s'%(\"\\nXL0=2.pi.f0.L = \",XL0,\" Ohm\");\n",
+ "print'%s %.2f %s'%(\"\\nXL0=XC0 = \",XL0,\" Ohm\");##at resonance\n",
+ "print'%s %.2e %s'%(\"\\nXC0 =1/2.pi.f0.C \\nC= \",C,\" F\");\n",
+ "print'%s %.2f %s'%(\"\\nQ0=(1/R*sqrt(L/C)) =\",Q0,\"\");\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "R= 500 Ohm \n",
+ "f1 = 100 Hz \n",
+ "f2=10kHz \n",
+ "BW= f2-f1 = 9900.00 Hz\n",
+ "\n",
+ "f1=f0-BW/2 ------(i) \n",
+ "f2=f0+BW/2 ------(ii) \n",
+ "f1+f2 =2f0 \n",
+ "f0=(f1+f2)/2 = 5050.00 Hz\n",
+ "\n",
+ "BW=R/2.pi.f0.L \n",
+ "L= 0.01 H\n",
+ "\n",
+ "XL0=2.pi.f0.L = 255.05 Ohm\n",
+ "\n",
+ "XL0=XC0 = 255.05 Ohm\n",
+ "\n",
+ "XC0 =1/2.pi.f0.C \n",
+ "C= 1.24e-07 F\n",
+ "\n",
+ "Q0=(1/R*sqrt(L/C)) = 0.51 \n"
+ ]
+ }
+ ],
+ "prompt_number": 43
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex87-pg4.69"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##AC Circuits : example 4.87 :(pg 4.69 & 4.70)\n",
+ "import math\n",
+ "f0=10**6;\n",
+ "C1=500.*10**-12;\n",
+ "C2=600.*10**-12;\n",
+ "C=500.*10**-12;\n",
+ "x=((2.*math.pi*f0)**2);\n",
+ "L=(1./(x*C));\n",
+ "XL=(2.*math.pi*f0*L);\n",
+ "y=2.*math.pi*f0*C2;\n",
+ "XC=(1./y);\n",
+ "R=math.sqrt(((XL-XC)**2)/3.);\n",
+ "x=math.sqrt(L/C);\n",
+ "Q0=((1./R)*x);\n",
+ "print(\"\\nf0= 1MHz \\nC1=500pF \\nC2=600pF \\nC=500pF\");##At resonance\n",
+ "print'%s %.2e %s'%(\"\\nf0=1/2.pi.sqrt(LC)\\nL= \",L,\" H\");\n",
+ "print'%s %.2f %s'%(\"\\nXL=2.pi.f0.L = \",XL,\" Ohm\");\n",
+ "print'%s %.2f %s'%(\"\\nXC=1/2.pi.f0.C \\nXC= \",XC,\" Ohm\");\n",
+ "print(\"\\nI=1/2.I0 \\nV/Z=1/2.V/R \\nZ=2R\");\n",
+ "print'%s %.2f %s'%(\"\\nsqrt((R^2)-(XL-XC)^2)=2R \\nR= \",R,\" Ohm\");##Resistance of Inductor\n",
+ "print'%s %.2f %s'%(\"\\nQ0=1/R.sqrt(L/C) \\n=\",Q0,\"\");\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "f0= 1MHz \n",
+ "C1=500pF \n",
+ "C2=600pF \n",
+ "C=500pF\n",
+ "\n",
+ "f0=1/2.pi.sqrt(LC)\n",
+ "L= 5.07e-05 H\n",
+ "\n",
+ "XL=2.pi.f0.L = 318.31 Ohm\n",
+ "\n",
+ "XC=1/2.pi.f0.C \n",
+ "XC= 265.26 Ohm\n",
+ "\n",
+ "I=1/2.I0 \n",
+ "V/Z=1/2.V/R \n",
+ "Z=2R\n",
+ "\n",
+ "sqrt((R^2)-(XL-XC)^2)=2R \n",
+ "R= 30.63 Ohm\n",
+ "\n",
+ "Q0=1/R.sqrt(L/C) \n",
+ "= 10.39 \n"
+ ]
+ }
+ ],
+ "prompt_number": 44
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex88-pg4.72"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##AC Circuits : example 4.88 :(pg 4.72)\n",
+ "import math\n",
+ "R=20.;\n",
+ "C=100.*10**-6;\n",
+ "L=0.2;\n",
+ "DR=(L/(C*R));\n",
+ "x=(1./(L*C));\n",
+ "y=((R/L)**2);\n",
+ "f0=((1./(2.*math.pi))*math.sqrt(x-y));\n",
+ "DR=(L/(C*R));\n",
+ "print(\"\\nR=20 Ohm \\nL=0.2 H \\nC=100uF\");\n",
+ "print'%s %.2f %s'%(\"\\nf0=1/2.pi.sqrt(1/LC-R^2/L^2) \\n= \",f0,\" Hz\");\n",
+ "print'%s %.2f %s'%(\"\\n dynamic resistance =L/CR \\n= \",DR,\" Ohm\");"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "R=20 Ohm \n",
+ "L=0.2 H \n",
+ "C=100uF\n",
+ "\n",
+ "f0=1/2.pi.sqrt(1/LC-R^2/L^2) \n",
+ "= 31.83 Hz\n",
+ "\n",
+ " dynamic resistance =L/CR \n",
+ "= 100.00 Ohm\n"
+ ]
+ }
+ ],
+ "prompt_number": 45
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex89-pg4.72"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "##AC Circuits : example 4.89 :(pg 4.72 & 4.73)\n",
+ "import math\n",
+ "R=20.;\n",
+ "L=200.*10**-6;\n",
+ "f=10**6;\n",
+ "V=230.;\n",
+ "Rs=8000.;\n",
+ "XL=2.*math.pi*f*L;\n",
+ "x=((2.*math.pi*f)**2);\n",
+ "y=((R/L)**2);\n",
+ "C=(1./((x+y)*L));\n",
+ "Q=((2.*math.pi*f*L)/R);\n",
+ "Z=(L/(C*R));\n",
+ "ZT=(Rs+Z);\n",
+ "IT=(V/ZT);\n",
+ "print'%s %.2f %s'%(\"\\nR=20 Ohm \\nL=200uH \\nf=10^6 \\nV=230 V \\nRs=8000 Ohm \\nXL=2.pi.f.L = \",XL,\"Ohm\");\n",
+ "print'%s %.2f %s'%(\"\\nf0=1/2.pi.sqrt(1/LC-R^2/L^2) \\nC= \",C,\" F\");\n",
+ "print'%s %.2f %s'%(\"\\nQ0=2.pi.f.L/R =\",Q,\"\");##quality factor\n",
+ "print'%s %.2f %s'%(\"\\nZ=L/CR \\n \",Z,\" Ohm\");##dynamic impedance\n",
+ "print'%s %.2f %s'%(\"\\nZt= \",ZT,\" Ohm\");##total equivalent Z at resonance\n",
+ "print'%s %.2e %s'%(\"\\nIt= \",IT,\" A\");##total ckt current"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "\n",
+ "R=20 Ohm \n",
+ "L=200uH \n",
+ "f=10^6 \n",
+ "V=230 V \n",
+ "Rs=8000 Ohm \n",
+ "XL=2.pi.f.L = 1256.64 Ohm\n",
+ "\n",
+ "f0=1/2.pi.sqrt(1/LC-R^2/L^2) \n",
+ "C= 0.00 F\n",
+ "\n",
+ "Q0=2.pi.f.L/R = 62.83 \n",
+ "\n",
+ "Z=L/CR \n",
+ " 78976.84 Ohm\n",
+ "\n",
+ "Zt= 86976.84 Ohm\n",
+ "\n",
+ "It= 2.64e-03 A\n"
+ ]
+ }
+ ],
+ "prompt_number": 46
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+}
\ No newline at end of file |