summaryrefslogtreecommitdiff
path: root/Elements_of_Power_system_by_J.B._Gupta/Chapter_5.ipynb
diff options
context:
space:
mode:
authorkinitrupti2017-05-12 18:53:46 +0530
committerkinitrupti2017-05-12 18:53:46 +0530
commit6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d (patch)
tree22789c9dbe468dae6697dcd12d8e97de4bcf94a2 /Elements_of_Power_system_by_J.B._Gupta/Chapter_5.ipynb
parentd36fc3b8f88cc3108ffff6151e376b619b9abb01 (diff)
downloadPython-Textbook-Companions-6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d.tar.gz
Python-Textbook-Companions-6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d.tar.bz2
Python-Textbook-Companions-6279fa19ac6e2a4087df2e6fe985430ecc2c2d5d.zip
Removed duplicates
Diffstat (limited to 'Elements_of_Power_system_by_J.B._Gupta/Chapter_5.ipynb')
-rwxr-xr-xElements_of_Power_system_by_J.B._Gupta/Chapter_5.ipynb1386
1 files changed, 1386 insertions, 0 deletions
diff --git a/Elements_of_Power_system_by_J.B._Gupta/Chapter_5.ipynb b/Elements_of_Power_system_by_J.B._Gupta/Chapter_5.ipynb
new file mode 100755
index 00000000..49ce6211
--- /dev/null
+++ b/Elements_of_Power_system_by_J.B._Gupta/Chapter_5.ipynb
@@ -0,0 +1,1386 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:ddc558b09e8a48f2e508ce080e711444f5dcc5027e225fbf933fb8580dbc869f"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter 5 - REPRESENTATION AND PERFORMANCE OF SHORT AND MEDIUM TRANSMISSION LINES"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E1 - Pg 128"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate Voltage at sending end,Regulation,Transmission Efficiency\n",
+ "import math\n",
+ "#Given data :\n",
+ "P=1100.##kW\n",
+ "VR=11.*1000.##V\n",
+ "pf=0.8##power factor\n",
+ "R=2.##ohm\n",
+ "X=3.##ohm\n",
+ "I=P*1000./VR/pf##A\n",
+ "cos_fi_r=pf#\n",
+ "sin_fi_r=math.sqrt(1.-cos_fi_r**2)#\n",
+ "VS=math.sqrt((VR*cos_fi_r+I*R)**2.+(VR*sin_fi_r+I*X)**2.)##V\n",
+ "print '%s %.f' %(\"Voltage at sending end(V)\",VS)#\n",
+ "Reg=(VS-VR)/VR*100.##%\n",
+ "print '%s %.3f' %(\"Regulation\",Reg)#\n",
+ "LineLoss=I**2.*R/1000.##kW\n",
+ "Eta_T=P*100./(P+LineLoss)##%\n",
+ "print '%s %.2f' %(\"Transmission Efficiency(%)\",Eta_T)#\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Voltage at sending end(V) 11426\n",
+ "Regulation 3.873\n",
+ "Transmission Efficiency(%) 97.24\n"
+ ]
+ }
+ ],
+ "prompt_number": 3
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E2 - Pg 128"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate Transmission Efficiency(%)\n",
+ "import math \n",
+ "#Given data :\n",
+ "R=0.4##ohm\n",
+ "X=0.4##ohm \n",
+ "P=2000.##kVA\n",
+ "pf=0.8##power factor\n",
+ "VL=3000.##V\n",
+ "VR=VL/math.sqrt(3.)##V\n",
+ "cos_fi_r=pf#\n",
+ "sin_fi_r=math.sqrt(1-cos_fi_r**2.)#\n",
+ "I=P*1000./3./VR##A\n",
+ "VS=VR+I*(R*cos_fi_r+X*sin_fi_r)##V\n",
+ "Reg=(VS-VR)/VR*100.##%\n",
+ "print '%s %.2f' %(\"% Regulation\",Reg)#\n",
+ "LineLoss=3.*I**2.*R/1000.##kW\n",
+ "Pout=P*cos_fi_r##kW\n",
+ "Eta_T=Pout*100./(Pout+LineLoss)##%\n",
+ "print '%s %.f' %(\"Transmission Efficiency(%)\",Eta_T)#\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "% Regulation 12.44\n",
+ "Transmission Efficiency(%) 90\n"
+ ]
+ }
+ ],
+ "prompt_number": 4
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E3 - Pg 129"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate \n",
+ "import math\n",
+ "#Given data :\n",
+ "l=15.##km\n",
+ "P=5.##MW\n",
+ "V=11.##kV\n",
+ "f=50.##Hz\n",
+ "pf=0.8##power factor\n",
+ "cos_fi_r=pf#\n",
+ "sin_fi_r=math.sqrt(1-cos_fi_r**2)#\n",
+ "L=1.1##mH/Km\n",
+ "VR=V*1000./math.sqrt(3.)##V\n",
+ "I=P*1000./math.sqrt(3.)/V/cos_fi_r##A\n",
+ "LineLoss=12./100.*P*10**6##W\n",
+ "R=LineLoss/3./I**2##ohm\n",
+ "X=2.*math.pi*f*L*10**-3*l##ohm/phase\n",
+ "VS=VR+I*(R*cos_fi_r+X*sin_fi_r)##V\n",
+ "VSL=math.sqrt(3.)*VS/1000.##KV\n",
+ "print '%s %.3f' %(\"Line voltage at sending end(kV)\",VSL)#\n",
+ "Reg=(VSL-V)/V*100.##%\n",
+ "print '%s %.3f' %(\"% Regulation\",Reg)#\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Line voltage at sending end(kV) 13.612\n",
+ "% Regulation 23.745\n"
+ ]
+ }
+ ],
+ "prompt_number": 22
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E4 - Pg 130"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate Line voltage at sending end(kV),Sending end pf(lagging),Transmission Efficiency(%),Regulation\n",
+ "import math \n",
+ "#Given data :\n",
+ "l=50.##km\n",
+ "S=10000.##kVA\n",
+ "pf=0.8##power factor\n",
+ "d=1.2*100.##cm\n",
+ "cos_fi_r=pf#\n",
+ "sin_fi_r=math.sqrt(1-cos_fi_r**2)#\n",
+ "V=33000.##Volts\n",
+ "VR=V/math.sqrt(3.)##V\n",
+ "f=50.##Hz\n",
+ "I=S*1000./math.sqrt(3.)/V##A\n",
+ "LineLoss=10./100.*S*10.**3*pf##W\n",
+ "R=LineLoss/3./I**2##ohm\n",
+ "rho=1.73*10**-6##kg/m**3\n",
+ "a=rho*l*1000.*100./R##cm**2\n",
+ "r=math.sqrt(a/math.pi)##cm\n",
+ "L=0.2*math.log(d/r/0.7788)*l##mH\n",
+ "X=2*math.pi*f*L*10**-3##ohm\n",
+ "VS=VR+I*(R*cos_fi_r+X*sin_fi_r)##V\n",
+ "VSL=math.sqrt(3.)*VS/1000.##kV\n",
+ "print '%s %.2f' %(\"Line voltage at sending end(kV)\",VSL)#\n",
+ "pf_s=(VR*cos_fi_r+I*R)/VS##lagging(sendinf end pf)\n",
+ "print '%s %.4f' %(\"Sending end pf(lagging) \",pf_s)#\n",
+ "Eta_T=S*pf/(S*pf+LineLoss/1000.)*100.#\n",
+ "print '%s %.2f' %(\"Transmission Efficiency(%)\",Eta_T)#\n",
+ "Reg=(VSL-V/1000.)/(V/1000.)*100.##%\n",
+ "print '%s %.2f' %(\"% Regulation\",Reg)#\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Line voltage at sending end(kV) 38.32\n",
+ "Sending end pf(lagging) 0.7579\n",
+ "Transmission Efficiency(%) 90.91\n",
+ "% Regulation 16.12\n"
+ ]
+ }
+ ],
+ "prompt_number": 23
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E5 - Pg 130"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate Resistance per phase(ohm/phase),Inductance per phase(mH/phase)\n",
+ "import math \n",
+ "#Given data :\n",
+ "VRL=30000.##Volts\n",
+ "VSL=33000.##Volts\n",
+ "f=50.##Hz\n",
+ "P=10.*10.**6##W\n",
+ "pf=0.8##power factor\n",
+ "cos_fi_r=pf#\n",
+ "sin_fi_r=math.sqrt(1-cos_fi_r**2)#\n",
+ "VR=VRL/math.sqrt(3.)##V\n",
+ "I=P/math.sqrt(3.)/VRL/pf##A\n",
+ "Eta_T=0.96##Efficiency\n",
+ "LineLoss=P*(1/Eta_T-1)##W\n",
+ "R=LineLoss/3/I**2##ohm/phase\n",
+ "print '%s %.1f' %(\"Resistance per phase(ohm/phase)\",R)#\n",
+ "VS=VSL/math.sqrt(3.)##V\n",
+ "X=(VS-VR-I*R*cos_fi_r)/I/sin_fi_r##V\n",
+ "L=X/2./math.pi/f##H/phase\n",
+ "print '%s %.f' %(\"Inductance per phase(mH/phase)\",L*1000)#\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Resistance per phase(ohm/phase) 2.4\n",
+ "Inductance per phase(mH/phase) 28\n"
+ ]
+ }
+ ],
+ "prompt_number": 7
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E6 - Pg 131"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate Line voltage at load end(volt),Transmission Efficiency(%)\n",
+ "import math\n",
+ "import numpy\n",
+ "from numpy import roots\n",
+ "#Given data :\n",
+ "l=3.##km\n",
+ "P=3000.##KW\n",
+ "VSL=11.*10**3##volt\n",
+ "R=l*0.4##ohm\n",
+ "X=l*0.8##ohm\n",
+ "VS=VSL/math.sqrt(3.)##Volts\n",
+ "pf=0.8##power factor\n",
+ "cos_fi_r=pf#\n",
+ "sin_fi_r=math.sqrt(1-cos_fi_r**2)#\n",
+ "#VS=VR+I*(R*cos_fi_r+X*sin_fi_r)##V\n",
+ "I_into_VR=P*1000./3./cos_fi_r##VA\n",
+ "#VR**2-VS*VR+I_into_VR*(R*cos_fi_r+X*sin_fi_r)#\n",
+ "p=([1, -VS, I_into_VR*(R*cos_fi_r+X*sin_fi_r)])#\n",
+ "VR=numpy.roots(p)#\n",
+ "VR=VR[0]##taking greater value\n",
+ "I=I_into_VR/VR##A\n",
+ "VRL=math.sqrt(3.)*VR##volt\n",
+ "print '%s %.f' %(\"Line voltage at load end(volt) : \",VRL)#\n",
+ "Eta_T=P*1000/(P*1000+3*I**2*R)*100##%\n",
+ "print '%s %.1f' %(\"Transmission Efficiency(%) : \",Eta_T)#\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Line voltage at load end(volt) : 10110\n",
+ "Transmission Efficiency(%) : 94.8\n"
+ ]
+ }
+ ],
+ "prompt_number": 24
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E7 - Pg 131"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate Power output(kW),Power factor at sending end(lagging)\n",
+ "import math\n",
+ "#Given data :\n",
+ "R=5.##ohm/phase\n",
+ "X=20.##ohm/phase\n",
+ "VSL=46.85##kV\n",
+ "VRL=33.##kV\n",
+ "VRL=VRL*1000.##v\n",
+ "pf=0.8##power factor\n",
+ "cos_fi_r=pf#\n",
+ "sin_fi_r=math.sqrt(1-cos_fi_r**2)#\n",
+ "VR=VRL/math.sqrt(3.)##V\n",
+ "I=(VSL*1000./math.sqrt(3.)-VR)/(R*cos_fi_r+X*sin_fi_r)##A\n",
+ "Pout=math.sqrt(3.)*VRL*I*pf/1000.##kW\n",
+ "print '%s %.f' %(\"Power output(kW)\",Pout)#\n",
+ "cosfi_s=(VR*pf+I*R)/(VSL*1000/math.sqrt(3.))##power factor\n",
+ "print '%s %.3f' %(\"Power factor at sending end(lagging)\",cosfi_s)#\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Power output(kW) 22853\n",
+ "Power factor at sending end(lagging) 0.656\n"
+ ]
+ }
+ ],
+ "prompt_number": 9
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E8 - Pg 136"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate Sending end power factor(lag),Regulation(%),Transmission Efficiency(%)\n",
+ "import math\n",
+ "import cmath\n",
+ "#Given data :\n",
+ "l=80.##km\n",
+ "P=15.##MW\n",
+ "VR=66.*10**3##Volt\n",
+ "R=l*0.3125##ohm\n",
+ "X=l*1.##ohm\n",
+ "Y=l*17.5*10**-6##S\n",
+ "pf=0.8##power factor\n",
+ "cos_fi_r=pf#\n",
+ "sin_fi_r=math.sqrt(1-cos_fi_r**2)#\n",
+ "IR=P*10**6/(VR*pf)##A\n",
+ "IR=IR*(cos_fi_r-1j*sin_fi_r)##A\n",
+ "IC=1j*Y*VR##A\n",
+ "IS=IR+IC##A\n",
+ "print '%s %.1f %s %.2f' %(\"Sending end current(A), magnitude is \",abs(IS),\" and angle in degree is \",cmath.phase(IS)*180/math.pi)#\n",
+ "VS=VR+IS*(R+1j*X)##volt\n",
+ "print '%s %.f %s %.2f' %(\"Sending end voltage(V), magnitude is \",abs(VS),\" and angle in degree is \",cmath.phase(VS)*180/math.pi)#\n",
+ "fi_s=cmath.phase(VS)-cmath.phase(IS)##\n",
+ "cos_fis=math.cos(fi_s)##sending end pf\n",
+ "print '%s %.2f' %(\"Sending end power factor(lag) : \",cos_fis)#\n",
+ "Reg=(abs(VS)-VR)/VR*100##%\n",
+ "print '%s %.1f' %(\"Regulation(%) : \",Reg)#\n",
+ "LineLoss=abs(IS)**2*R/1000.##kW\n",
+ "print '%s %.1f' %(\"Line Losses in kW : \",LineLoss)#\n",
+ "Eta_T=P*1000/(P*1000+LineLoss)*100##%\n",
+ "print '%s %.2f' %(\"Transmission Efficiency(%) : \",Eta_T)#\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Sending end current(A), magnitude is 240.3 and angle in degree is -18.95\n",
+ "Sending end voltage(V), magnitude is 79598 and angle in degree is 11.77\n",
+ "Sending end power factor(lag) : 0.86\n",
+ "Regulation(%) : 20.6\n",
+ "Line Losses in kW : 1443.6\n",
+ "Transmission Efficiency(%) : 91.22\n"
+ ]
+ }
+ ],
+ "prompt_number": 67
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E9 - Pg 137"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate Sending end line voltage(Volt) ,Regulation(%),Transmission Efficiency(%)\n",
+ "import math\n",
+ "import cmath\n",
+ "#Given data :\n",
+ "l=100.##km\n",
+ "P=20.##MW\n",
+ "VRL=66.*10**3##volt\n",
+ "f=50.##Hz\n",
+ "R=10.##ohm\n",
+ "L=111.7*10**-3##H\n",
+ "C=0.9954*10**-6##F\n",
+ "pf=0.8##power factor\n",
+ "X=2.*math.pi*f*L##ohm\n",
+ "Y=2.*math.pi*f*C##S\n",
+ "cos_fi_r=pf#\n",
+ "sin_fi_r=math.sqrt(1-cos_fi_r**2)#\n",
+ "VR=VRL/math.sqrt(3.)##volt\n",
+ "IR=P*10**6/(math.sqrt(3.)*VRL*pf)##A\n",
+ "IR=IR*(cos_fi_r-1j*sin_fi_r)##A\n",
+ "Z=R+1j*X##ohm\n",
+ "Vdash=VR+1./2.*IR*Z##Volt\n",
+ "IC=Vdash*1j*Y##A\n",
+ "IS=IR+IC##A\n",
+ "VS=Vdash+1./2.*IS*Z##Volt\n",
+ "VSL=abs(VS)*math.sqrt(3.)##Volt\n",
+ "print '%s %.f' %(\"Sending end line voltage(Volt) :\",VSL)#\n",
+ "Reg=(VSL-VRL)/VRL*100.##%\n",
+ "print '%s %.2f' %(\"Regulation(%) : \",Reg)#\n",
+ "fi_s=cmath.phase(VS)-cmath.phase(IS)##\n",
+ "cos_fi_s=math.cos(fi_s)##sending end pf\n",
+ "Eta_T=math.sqrt(3.)*VRL*abs(IR)*cos_fi_r/(math.sqrt(3)*VSL*abs(IS)*cos_fi_s)*100##%\n",
+ "print '%s %.1f' %(\"Transmission Efficiency(%) : \",Eta_T)#\n",
+ "#Ans is not accurate in the book.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Sending end line voltage(Volt) : 77071\n",
+ "Regulation(%) : 16.77\n",
+ "Transmission Efficiency(%) : 93.5\n"
+ ]
+ }
+ ],
+ "prompt_number": 27
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E10 - Pg 138"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate Sending end line voltage(kV),Regulation(%),Transmission Efficiency(%) \n",
+ "import math\n",
+ "import cmath\n",
+ "#Given data :\n",
+ "l=200.##km\n",
+ "P=50.##MVA\n",
+ "VRL=132.*10**3.##Volt\n",
+ "f=50.##Hz\n",
+ "R=l*0.15##ohm\n",
+ "X=l*0.50##ohm\n",
+ "Y=l*2.*10**-6##mho\n",
+ "pf=0.85##power factor\n",
+ "cos_fi_r=pf#\n",
+ "sin_fi_r=math.sqrt(1-cos_fi_r**2)#\n",
+ "VR=VRL/math.sqrt(3.)##Volt\n",
+ "IR=P*10**6/(math.sqrt(3.)*VRL)##A\n",
+ "Z=R+1j*X##ohm\n",
+ "IR=IR*(cos_fi_r-1j*sin_fi_r)##A\n",
+ "Vdash=VR+1/2*IR*Z##Volt\n",
+ "IC=Vdash*1j*Y##A\n",
+ "IS=IR+IC##A\n",
+ "print '%s %.2f %s %.2f' %(\"Sending end current(A), magnitude is \",abs(IS),\" and angle in degree is \",cmath.phase(IS)*180/math.pi)#\n",
+ "VS=Vdash+1/2*IS*Z##Volt\n",
+ "VSL=abs(VS)*math.sqrt(3)##Volt\n",
+ "print '%s %.2f' %(\"Sending end line voltage(kV) :\",VSL/1000)#\n",
+ "Reg=(VSL-VRL)/VRL*100##%\n",
+ "print '%s %.2f' %(\"Regulation(%) : \",Reg)#\n",
+ "fi_s=cmath.phase(VS)-cmath.phase(IS)##\n",
+ "cos_fi_s=math.cos(fi_s)##sending end pf\n",
+ "Eta_T=math.sqrt(3.)*VRL*abs(IR)*cos_fi_r/(math.sqrt(3)*VSL*abs(IS)*cos_fi_s)*100##%\n",
+ "print '%s %.2f' %(\"Transmission Efficiency(%) : \",Eta_T)#\n",
+ "#Ans is wrong in the book.Angle of VS is calculated wrong leads to wrong answers.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Sending end current(A), magnitude is 204.28 and angle in degree is -24.50\n",
+ "Sending end line voltage(kV) : 132.00\n",
+ "Regulation(%) : 0.00\n",
+ "Transmission Efficiency(%) : 100.00\n"
+ ]
+ }
+ ],
+ "prompt_number": 65
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E11 - Pg 139"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate Sending end power factor(lag)\n",
+ "import math\n",
+ "import cmath\n",
+ "#Given data :\n",
+ "S=1.*10**3##kVA\n",
+ "pf=0.71##power factor\n",
+ "VRL=22.*10**3##Volt\n",
+ "f=50.##Hz\n",
+ "R=15.##ohm\n",
+ "L=0.2##H\n",
+ "C=0.5*10**-6##F\n",
+ "cos_fi_r=pf#\n",
+ "sin_fi_r=math.sqrt(1-cos_fi_r**2)#\n",
+ "IR=S*10.**3/VRL##A\n",
+ "IR=IR*(cos_fi_r-1j*sin_fi_r)##A\n",
+ "X=2.*math.pi*f*L##ohm\n",
+ "#Z=sqrt(R**2+X**2)##ohm\n",
+ "Z=R+1j*X##ohm\n",
+ "Y=2.*math.pi*f*C##S\n",
+ "ICR=1./2.*1j*Y*VRL##A\n",
+ "IL=IR+ICR##A\n",
+ "VS=VRL+IL*Z##Volt\n",
+ "print '%s %.f %s %.2f' %(\"Sending end voltage(Volt), magnitude is \",abs(VS),\" and angle in degree is \",cmath.phase(VS))#\n",
+ "ICS=1./2.*1j*Y*VS##A\n",
+ "IS=IL+ICS##A\n",
+ "print '%s %.3f %s %.2f' %(\"Sending end current(A), magnitude is \",abs(IS),\" and angle in degree is \",cmath.phase(IS))#\n",
+ "fi_s=cmath.phase(VS)-cmath.phase(IS)##\n",
+ "cos_fi_s=math.cos(fi_s)##sending end pf\n",
+ "print '%s %.3f' %(\"Sending end power factor(lag) : \",cos_fi_s)#\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Sending end voltage(Volt), magnitude is 24437 and angle in degree is 0.06\n",
+ "Sending end current(A), magnitude is 42.874 and angle in degree is -0.72\n",
+ "Sending end power factor(lag) : 0.706\n"
+ ]
+ }
+ ],
+ "prompt_number": 31
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E12 - Pg 139"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate Sending end line to line voltage(kV)\n",
+ "import math\n",
+ "#Given data :\n",
+ "P=50.*10**6##W\n",
+ "f=50.##Hz\n",
+ "l=150.##km\n",
+ "pf=0.8##power factor\n",
+ "VRL=110.*10**3##Volt\n",
+ "VR=VRL/math.sqrt(3.)##Volt\n",
+ "cos_fi_r=pf#\n",
+ "sin_fi_r=math.sqrt(1-cos_fi_r**2)#\n",
+ "R=0.1*l##ohm\n",
+ "XL=0.5*l##ohm\n",
+ "Z=R+1j*XL##ohm\n",
+ "IR=P/(math.sqrt(3)*VRL*pf)##A\n",
+ "IR=IR*(cos_fi_r-1j*sin_fi_r)##A\n",
+ "Y=3.*10**-6*l##S\n",
+ "ICR=1./2.*1j*Y*VR##A\n",
+ "IL=IR+ICR##A\n",
+ "VS=VR+IL*Z##Volt\n",
+ "VSL=math.sqrt(3.)*abs(VS)##Volt\n",
+ "print '%s %.3f' %(\"Sending end line to line voltage(kV) :\",VSL/1000.)#\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Sending end line to line voltage(kV) : 143.562\n"
+ ]
+ }
+ ],
+ "prompt_number": 32
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E13 - Pg 140"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate Sending end line to line voltage(kV),Sending end power factor(lag)\n",
+ "import math\n",
+ "import cmath\n",
+ "#Given data :\n",
+ "f=50.##Hz\n",
+ "l=30.##km\n",
+ "Z=40.+1j*125##ohm\n",
+ "Y=10**-3##mho\n",
+ "P=50.*10**6##W\n",
+ "VRL=220.*10**3##Volt\n",
+ "VR=VRL/math.sqrt(3)##Volt\n",
+ "pf=0.8##power factor\n",
+ "cos_fi_r=pf#\n",
+ "sin_fi_r=math.sqrt(1-cos_fi_r**2)#\n",
+ "IR=P/(math.sqrt(3.)*VRL*pf)##A\n",
+ "IR=IR*(cos_fi_r-1j*sin_fi_r)##A\n",
+ "ICR=1./2.*1j*Y*VR##A\n",
+ "IL=IR+ICR##A\n",
+ "VS=VR+IL*Z##Volt\n",
+ "VSL=math.sqrt(3)*abs(VS)##Volt\n",
+ "print '%s %.2f ' %(\"Sending end line to line voltage(kV) :\",VSL/1000)#\n",
+ "IS=IL+1./2.*1j*Y*VS##A\n",
+ "print '%s %.2f %s %.1f' %(\"Sending end current(A), magnitude is \",abs(IS),\" and angle in degree is \",cmath.phase(IS)*180/math.pi)#\n",
+ "fi_s=cmath.phase(VS)-cmath.phase(IS)##\n",
+ "cos_fis=math.cos(fi_s)##sending end pf\n",
+ "print '%s %.3f' %(\"Sending end power factor(lag) : \",cos_fis)#\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Sending end line to line voltage(kV) : 238.07 \n",
+ "Sending end current(A), magnitude is 128.15 and angle in degree is 15.1\n",
+ "Sending end power factor(lag) : 0.988\n"
+ ]
+ }
+ ],
+ "prompt_number": 63
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E14 - Pg 141"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate Sending end line to line voltage(kV)\n",
+ "import math \n",
+ "#Given data :\n",
+ "f=50.##Hz\n",
+ "l=30.##km\n",
+ "Z=40.+1j*125.##ohm\n",
+ "Y=10**-3##mho\n",
+ "P=50.*10**6##W\n",
+ "VRL=220.*10**3##Volt\n",
+ "VR=VRL/math.sqrt(3.)##Volt\n",
+ "pf=0.8##power factor\n",
+ "cos_fi_r=pf#\n",
+ "sin_fi_r=math.sqrt(1-cos_fi_r**2)#\n",
+ "IR=P/(math.sqrt(3.)*VRL*pf)##A\n",
+ "IR=IR*(cos_fi_r-1j*sin_fi_r)##A\n",
+ "ICR=1./2.*1j*Y*VR##A\n",
+ "IL=IR+ICR##A\n",
+ "VS=VR+IL*Z##Volt\n",
+ "VSL=math.sqrt(3.)*abs(VS)##Volt\n",
+ "print '%s %.2f' %(\"Sending end line to line voltage(kV) :\",VSL/1000.)#\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Sending end line to line voltage(kV) : 238.07\n"
+ ]
+ }
+ ],
+ "prompt_number": 16
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E15 - Pg 141"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate Sending end line voltage(kV),Sending end power factor(lag),Transmission Efficiency(%)\n",
+ "import math\n",
+ "import cmath\n",
+ "#Given data :\n",
+ "f=50.##Hz\n",
+ "l=100.##km\n",
+ "P=50.*10**6##W\n",
+ "pf=0.8##power factor\n",
+ "cos_fi_r=pf#\n",
+ "sin_fi_r=math.sqrt(1-cos_fi_r**2)#\n",
+ "VRL=132.*10**3##Volt\n",
+ "VR=VRL/math.sqrt(3.)##Volt\n",
+ "R=0.1*l##ohm\n",
+ "XL=0.3*l##ohm\n",
+ "Z=R+1j*XL##ohm\n",
+ "Y=3.*10**-6*l##S\n",
+ "IR=P/(math.sqrt(3)*VRL*pf)##A\n",
+ "IR=IR*(cos_fi_r-1j*sin_fi_r)##A\n",
+ "ICR=1/2*1j*Y*VR##A\n",
+ "IL=IR+ICR##A\n",
+ "VS=VR+IL*Z##Volt\n",
+ "VSL=math.sqrt(3.)*abs(VS)##Volt\n",
+ "print '%s %.2f' %(\"Sending end line voltage(kV) :\",VSL/1000)#\n",
+ "ICS=1./2.*1j*Y*VS##A\n",
+ "IS=IL+ICS##A\n",
+ "fi_s=cmath.phase(VS)-cmath.phase(IS)##\n",
+ "cos_fi_s=math.cos(fi_s)##sending end pf\n",
+ "print '%s %.2f' %(\"Sending end power factor(lag) : \",cos_fi_s*180/math.pi)#\n",
+ "Eta_T=math.sqrt(3)*VRL*abs(IR)*cos_fi_r/(math.sqrt(3)*VSL*abs(IS)*cos_fi_s)*100##%\n",
+ "print '%s %.3f' %(\"Transmission Efficiency(%) : \",Eta_T)#\n",
+ "#answer in book is wrong\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Sending end line voltage(kV) : 144.56\n",
+ "Sending end power factor(lag) : 45.03\n",
+ "Transmission Efficiency(%) : 95.709\n"
+ ]
+ }
+ ],
+ "prompt_number": 61
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E16 - Pg 142"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate Line voltage at mid point(kV),Sending end line voltage(kV)\n",
+ "import math \n",
+ "import cmath\n",
+ "#Given data :\n",
+ "f=50.##Hz\n",
+ "l=10.##km\n",
+ "S1=5000.*10**3##VA\n",
+ "S2=10000.*10**3##VA\n",
+ "pf=0.8##power factor\n",
+ "cos_fi_r=pf#\n",
+ "sin_fi_r=math.sqrt(1-cos_fi_r**2)#\n",
+ "pf2=0.7071##power factor\n",
+ "cos_fi_r2=pf2#\n",
+ "sin_fi_r2=math.sqrt(1-cos_fi_r2**2)#\n",
+ "R=0.6*l##ohm\n",
+ "XL=1.5*l##ohm\n",
+ "VRL=33*10**3##Volt\n",
+ "VR=VRL/math.sqrt(3.)##Volt\n",
+ "I1=S1/(math.sqrt(3.)*VRL)##A\n",
+ "I1=I1*(cos_fi_r-1j*sin_fi_r)##A\n",
+ "Z1=R+1j*XL##ohm\n",
+ "VB=VR+I1*Z1##Volt\n",
+ "VBL=math.sqrt(3)*abs(VB)##Volt\n",
+ "print '%s %.3f' %(\"Line voltage at mid point(kV) : \",VBL/1000)#\n",
+ "I2=S2/(math.sqrt(3.)*VBL)##A\n",
+ "I2=I2*(cos_fi_r2-1j*sin_fi_r2)##A\n",
+ "I=I1+I2##A\n",
+ "print '%s %.2f %s %.2f' %(\"Total current(A), magnitude is \",abs(I),\" and angle in degree is \",cmath.phase(I))#\n",
+ "Z2=R+1j*XL##ohm\n",
+ "VS=VB+I*Z2##Volt\n",
+ "VSL=math.sqrt(3.)*abs(VS)##Volt\n",
+ "print '%s %.2f' %(\"Sending end line voltage(kV) :\",VSL/1000)#\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Line voltage at mid point(kV) : 35.114\n",
+ "Total current(A), magnitude is 251.32 and angle in degree is -0.74\n",
+ "Sending end line voltage(kV) : 41.64\n"
+ ]
+ }
+ ],
+ "prompt_number": 34
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E17 - Pg 143"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate Power supplied by line A(kW),B(kW)\n",
+ "import cmath\n",
+ "import math \n",
+ "#Given data :\n",
+ "P=10.##MWatt\n",
+ "pf=0.8##power factor\n",
+ "VRL=30.*10**3##Volt\n",
+ "R1=5.5##ohm\n",
+ "XL1=13.5##ohm\n",
+ "R2=6.##ohm\n",
+ "XL2=11.##ohm\n",
+ "ZA=R1+1j*XL1##ohm\n",
+ "ZB=R2+1j*XL2##ohm\n",
+ "S=P*10.**3./pf*(math.cos(-36.52*math.pi/180.) + 1j*math.sin(-36.52*math.pi/180.))##kVA\n",
+ "SA=S*ZB/(ZA+ZB)##kVA\n",
+ "print '%s %.f %s %.3f' %(\"Load supply by line A(kVA), magnitude is \",abs(SA),\" at pf \",cmath.phase(SA))#\n",
+ "SB=S*ZA/(ZA+ZB)##kVA\n",
+ "print '%s %.f %s %.2f' %(\"Load supply by line B(kVA), magnitude is \",abs(SB),\" and angle in degree is \",cmath.phase(SA))#\n",
+ "PA=abs(SA)*(math.cos(cmath.phase(SA)*180/math.pi))##kW\n",
+ "print '%s %.2f' %(\"Power supplied by line A(kW) : \",PA)#\n",
+ "PB=abs(SB)*(math.cos(cmath.phase(SB)*180/math.pi))##kW\n",
+ "print '%s %.2f' %(\"Power supplied by line B(kW) : \",PB)#\n",
+ "#Answer is not accurate in the book.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Load supply by line A(kVA), magnitude is 5787 at pf -0.698\n",
+ "Load supply by line B(kVA), magnitude is 6733 and angle in degree is -0.70\n",
+ "Power supplied by line A(kW) : -3797.43\n",
+ "Power supplied by line B(kW) : -3546.79\n"
+ ]
+ }
+ ],
+ "prompt_number": 36
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E18 - Pg 145"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate Percentage rise in voltage\n",
+ "import math \n",
+ "#Given data :\n",
+ "L=200.##km\n",
+ "f=50.##Hz\n",
+ "omega=2.*math.pi*f##rad/s\n",
+ "Rise=omega**2.*L**2.*10.**-8./18.##%\n",
+ "print '%s %.2f' %(\"Percentage rise in voltage : \",Rise)#\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Percentage rise in voltage : 2.19\n"
+ ]
+ }
+ ],
+ "prompt_number": 20
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E19 - Pg 151"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate Parameter A,B,C,D\n",
+ "import math \n",
+ "import cmath\n",
+ "#Given data :\n",
+ "L=80.##km\n",
+ "f=50.##Hz\n",
+ "Z=(0.15+1j*0.78)*L##ohm\n",
+ "Y=(1j*5.*10.**-6)*L##mho\n",
+ "A=1.+1./2.*Y*Z##parameter of 3-phase line\n",
+ "D=A##parameter of 3-phase line\n",
+ "B=Z*(1.+1./4.*Y*Z)##parameter of 3-phase line\n",
+ "C=Y##parameter of 3-phase line\n",
+ "print (\"Parameter A : \",A)#\n",
+ "print (\"Parameter B : \",B)#\n",
+ "print (\"Parameter C : \",C)#\n",
+ "print (\"Parameter D : \",D)#\n",
+ "#Answer of B is wrong in the book.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "('Parameter A : ', (0.98752+0.0024j))\n",
+ "('Parameter B : ', (11.85024+62.02502400000001j))\n",
+ "('Parameter C : ', 0.00039999999999999996j)\n",
+ "('Parameter D : ', (0.98752+0.0024j))\n"
+ ]
+ }
+ ],
+ "prompt_number": 47
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E20 - Pg 151"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate Power Input(MW),Transmission Efficiency(%),Sending end power factor(lag)\n",
+ "import math \n",
+ "import cmath\n",
+ "#Given data :\n",
+ "Z=200*math.cos(80.*math.pi/180.) + 1j*math.sin(80.*math.pi/180.)##ohm\n",
+ "Y=0.0013*math.cos(90.*math.pi/180.) + 1j*math.sin(90.*math.pi/180.)##mho/phase\n",
+ "P=80*10**6##W\n",
+ "pf=0.8##power factor\n",
+ "cos_fi_r=pf#\n",
+ "sin_fi_r=math.sqrt(1-cos_fi_r**2)#\n",
+ "VRL=220.*10**3##Volt\n",
+ "VR=VRL/math.sqrt(3)##Volt\n",
+ "f=50##Hz\n",
+ "IR=P/(math.sqrt(3.)*VRL*pf)##A\n",
+ "IR=IR*(cos_fi_r-1j*sin_fi_r)##A\n",
+ "A=1.+1./2.*Y*Z##parameter of 3-phase line\n",
+ "D=A##parameter of 3-phase line\n",
+ "B=Z*(1.+1./4.*Y*Z)##parameter of 3-phase line\n",
+ "C=Y##parameter of 3-phase line\n",
+ "print '%s %.2f %s %.2f' %(\"Parameter A, magnitude is \",abs(A),\" and angle in degree is \",cmath.phase(A)*180/math.pi)#\n",
+ "print '%s %.2f %s %.2f' %(\"Parameter B, magnitude is \",abs(B),\" and angle in degree is \",cmath.phase(B)*180/math.pi)#\n",
+ "print '%s %.2f %s %.2f' %(\"Parameter C, magnitude is \",abs(C),\" and angle in degree is \",cmath.phase(C)*180/math.pi)#\n",
+ "print '%s %.2f %s %.2f' %(\"Parameter D, magnitude is \",abs(D),\" and angle in degree is \",cmath.phase(D)*180/math.pi)#\n",
+ "VS=A*VR+B*IR##Volt\n",
+ "VSL=math.sqrt(3)*abs(VS)##Volt\n",
+ "print '%s %.2f' %(\"Sending end Line voltage(kV) : \",VSL/1000.)#\n",
+ "IS=C*VR+D*IR##A\n",
+ "print '%s %.2f %s %.2f' %(\"Sending end current(A), magnitude is \",abs(IS),\" and angle in degree is \",cmath.phase(IS)*180/math.pi)#\n",
+ "fi_s=cmath.phase(VS)-cmath.phase(IS)##\n",
+ "cos_fis=math.cos(fi_s)##sending end pf\n",
+ "print '%s %.2f' %(\"Sending end power factor(lag) : \",cos_fis)#\n",
+ "Pin=math.sqrt(3.)*VSL*abs(IS)*cos_fis*10**-6##MW\n",
+ "print '%s %.2f' %(\"Power Input(MW) : \",Pin)#\n",
+ "Eta=P/(Pin*10**6)*100.##%\n",
+ "print '%s %.2f' %(\"Transmission Efficiency(%) : \",Eta)#\n",
+ "#Answer in book is wrong"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Parameter A, magnitude is 17.37 and angle in degree is 88.33\n",
+ "Parameter B, magnitude is 302.79 and angle in degree is 86.66\n",
+ "Parameter C, magnitude is 1.00 and angle in degree is 90.00\n",
+ "Parameter D, magnitude is 17.37 and angle in degree is 88.33\n",
+ "Sending end Line voltage(kV) : 3930.49\n",
+ "Sending end current(A), magnitude is 130613.70 and angle in degree is 88.75\n",
+ "Sending end power factor(lag) : 1.00\n",
+ "Power Input(MW) : 888811.72\n",
+ "Transmission Efficiency(%) : 0.01\n"
+ ]
+ }
+ ],
+ "prompt_number": 69
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E21 - Pg 152"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate Sending end power factor(lag),Power Input(MW),Transmission Efficiency(%)\n",
+ "import math \n",
+ "import cmath\n",
+ "#Given data :\n",
+ "P=50.*10**6##VA\n",
+ "pf=0.8##power factor\n",
+ "cos_fi_r=pf#\n",
+ "sin_fi_r=math.sqrt(1-cos_fi_r**2)#\n",
+ "A=0.98*math.cos(3.*math.pi/180.) + 1j*math.sin(3.*math.pi/180.)##parameter of 3-phase line\n",
+ "D=0.98*math.cos(3.*math.pi/180.) + 1j*math.sin(3.*math.pi/180.)##parameter of 3-phase line\n",
+ "B=110*math.cos(75.*math.pi/180.) + 1j*math.sin(75.*math.pi/180.)##parameter of 3-phase line\n",
+ "C=0.0005*math.cos(80.*math.pi/180.) + 1j*math.sin(80.*math.pi/180.)##parameter of 3-phase line\n",
+ "VRL=110.*10**3##Volt\n",
+ "VR=VRL/math.sqrt(3.)##Volt\n",
+ "IR=P/(math.sqrt(3.)*VRL)##A\n",
+ "IR=IR*(cos_fi_r-1j*sin_fi_r)##A\n",
+ "VS=A*VR+B*IR##Volt\n",
+ "VSL=math.sqrt(3.)*abs(VS)##Volt\n",
+ "print '%s %.2f' %(\"Sending end Line voltage(kV) : \",VSL/1000.)#\n",
+ "IS=C*VR+D*IR##A\n",
+ "print '%s %.2f %s %.2f' %(\"Sending end current(A), magnitude is \",abs(IS),\" and angle in degree is \",cmath.phase(IS)*180/math.pi)#\n",
+ "fi_s=cmath.phase(VS)-cmath.phase(IS)##\n",
+ "cos_fis=math.cos(fi_s)##sending end pf\n",
+ "print '%s %.2f' %(\"Sending end power factor(lag) : \",cos_fis)#\n",
+ "Pin=math.sqrt(3.)*VSL*abs(IS)*cos_fis*10**-6##MW\n",
+ "print '%s %.2f' %(\"Power Input(MW) : \",Pin)#\n",
+ "Eta=P*pf/(Pin*10**6)*100.##%\n",
+ "print '%s %.2f' %(\"Transmission Efficiency(%) : \",Eta)#\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Sending end Line voltage(kV) : 118.28\n",
+ "Sending end current(A), magnitude is 62400.97 and angle in degree is 89.80\n",
+ "Sending end power factor(lag) : -0.01\n",
+ "Power Input(MW) : -134.12\n",
+ "Transmission Efficiency(%) : -29.82\n"
+ ]
+ }
+ ],
+ "prompt_number": 68
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E22 - Pg 153"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate \n",
+ "import math\n",
+ "import cmath\n",
+ "import numpy\n",
+ "from numpy import roots\n",
+ "#Given data :\n",
+ "f=50##Hz\n",
+ "L=300##km\n",
+ "r=0.15##ohm/km\n",
+ "x=0.5##ohm/km\n",
+ "y=3*10**-6##mho/km\n",
+ "VRL=220*10**3##Volt\n",
+ "VR=VRL/math.sqrt(3.)##Volt\n",
+ "P=200*10**6##W\n",
+ "pf=0.85##power factor\n",
+ "cos_fi_r=pf#\n",
+ "sin_fi_r=math.sqrt(1-cos_fi_r**2)#\n",
+ "R=r*L##ohm\n",
+ "X=x*L##ohm\n",
+ "Y=y*L##mho\n",
+ "Z=R+1j*X##ohm\n",
+ "#part (i)\n",
+ "A=1+1/2.*1j*Y*Z##parameter of 3-phase line\n",
+ "D=A##parameter of 3-phase line\n",
+ "B=Z##parameter of 3-phase line\n",
+ "C=1j*Y*(1.+1./4.*1j*Y*Z)##parameter of 3-phase line\n",
+ "print '%s %.4f %s %.2f' %(\"Parameter A, magnitude is \",abs(A),\" and angle in degree is \",cmath.phase(A)*180/math.pi)#\n",
+ "print '%s %.1f %s %.1f' %(\"Parameter B, magnitude is \",abs(B),\" and angle in degree is \",cmath.phase(B)*180/math.pi)#\n",
+ "print '%s %.2e %s %.2f' %(\"Parameter C, magnitude is \",abs(C),\" and angle in degree is \",cmath.phase(C)*180/math.pi)#\n",
+ "print '%s %.2f %s %.2f' %(\"Parameter D, magnitude is \",abs(D),\" and angle in degree is \",cmath.phase(D)*180/math.pi)#\n",
+ "#part (ii)\n",
+ "p=([0.024525, 11.427, -2102])##from VS=A*VR+B*IR##Volt\n",
+ "IR=roots(p)#\n",
+ "IR=IR[1]##taking +ve value\n",
+ "P=math.sqrt(3.)*VRL*IR*10**-6##MW\n",
+ "print '%s %.1f' %(\"Power received in MW : \",P)#\n",
+ "#/part (iii)\n",
+ "P=200.*10.**6##W\n",
+ "IR=P/math.sqrt(3.)/VRL/pf##A\n",
+ "fi=math.acos(pf) *180./math.pi##degree\n",
+ "IR=IR*math.cos(-fi*math.pi/180.) + 1j*math.sin(-fi*math.pi/180.)#\n",
+ "VS=A*VR+B*IR##Volt\n",
+ "VSL=math.sqrt(3.)*abs(VS)##Volt\n",
+ "print '%s %.2f' %(\"Sending end Line voltage(kV) : \",VSL/1000.)#\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Parameter A, magnitude is 0.9327 and angle in degree is 1.24\n",
+ "Parameter B, magnitude is 156.6 and angle in degree is 73.3\n",
+ "Parameter C, magnitude is 8.70e-04 and angle in degree is 90.60\n",
+ "Parameter D, magnitude is 0.93 and angle in degree is 1.24\n",
+ "Power received in MW : 53.8\n",
+ "Sending end Line voltage(kV) : 283.60\n"
+ ]
+ }
+ ],
+ "prompt_number": 59
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E23 - Pg 154"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#Exa 5.23\n",
+ "import math \n",
+ "import cmath\n",
+ "#Given data :\n",
+ "A=0.936+1j*0.016##parameter of 3-phase line\n",
+ "D=A##parameter of 3-phase line\n",
+ "B=33.5+1j*138##parameter of 3-phase line\n",
+ "C=(-0.9280+1j*901.223)*10**-6##parameter of 3-phase line\n",
+ "VRL=200.*10**3##Volt\n",
+ "VR=VRL/math.sqrt(3.)##Volt\n",
+ "P=40*10**6##W\n",
+ "pf=0.86##power factor\n",
+ "cos_fi_r=pf#\n",
+ "sin_fi_r=math.sqrt(1-cos_fi_r**2)#\n",
+ "IR=P/math.sqrt(3.)/VRL/pf##A\n",
+ "fi=math.acos(pf) *180/math.pi##degree\n",
+ "IR=IR*(math.cos(-fi*math.pi/180.) + 1j*math.sin(-fi*math.pi/180.))#\n",
+ "VS=A*VR+B*IR##Volt\n",
+ "VSL=math.sqrt(3.)*abs(VS)##Volt\n",
+ "print '%s %.2f' %(\"Sending end Line voltage(kV) : \",VSL/1000.)#\n",
+ "IS=C*VR+D*IR##A\n",
+ "print '%s %.1f %s %.2f' %(\"Sending end current(A), magnitude is \",abs(IS),\" and angle in degree is \",cmath.phase(IS)*180/math.pi)#\n",
+ "fi_s=cmath.phase(VS)-cmath.phase(IS)##degree\n",
+ "print '%s %.4f' %(\"Sending end phase angle(degree): \",math.cos(fi_s))#\n",
+ "Ps=math.sqrt(3.)*abs(VSL)*abs(IS)*math.cos(fi_s)*10**-6##MW\n",
+ "print '%s %.3f' %(\"Sending end power(MW) : \",Ps)#\n",
+ "Vreg=(VSL-VRL)*100./VRL##%\n",
+ "print '%s %.2f' %(\"Voltage regulation in % : \",Vreg)#\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Sending end Line voltage(kV) : 211.98\n",
+ "Sending end current(A), magnitude is 116.8 and angle in degree is 20.96\n",
+ "Sending end phase angle(degree): 0.9716\n",
+ "Sending end power(MW) : 41.665\n",
+ "Voltage regulation in % : 5.99\n"
+ ]
+ }
+ ],
+ "prompt_number": 54
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E24 - Pg 155"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate Sending end Line voltage(kV)\n",
+ "import cmath\n",
+ "import math\n",
+ "#Given data :\n",
+ "A1=0.98*(math.cos(2.*math.pi/180.) + 1j*math.sin(2.*math.pi/180.))##parameter of 3-phase line\n",
+ "D1=A1##parameter of 3-phase line\n",
+ "B1=28.*(math.cos(69.*math.pi/180.) + 1j*math.sin(69.*math.pi/180.))##parameter of 3-phase line\n",
+ "C1=0.0002*(math.cos(88.*math.pi/180.) + 1j*math.sin(88.*math.pi/180.))##parameter of 3-phase line\n",
+ "A2=0.95*(math.cos(3.*math.pi/180.) + 1j*math.sin(3.*math.pi/180.))##parameter of 3-phase line\n",
+ "D2=A2##parameter of 3-phase line\n",
+ "B2=40.*(math.cos(85.*math.pi/180.) + 1j*math.sin(85.*math.pi/180.))##parameter of 3-phase line\n",
+ "C2=0.0004*(math.cos(90.*math.pi/180.) + 1j*math.sin(90.*math.pi/180.))##parameter of 3-phase line\n",
+ "VRL=110.*10**3##Volt\n",
+ "VR=VRL/math.sqrt(3.)##Volt\n",
+ "IR=200.##A\n",
+ "pf=0.95##power factor\n",
+ "cos_fi_r=pf#\n",
+ "sin_fi_r=math.sqrt(1-cos_fi_r**2)#\n",
+ "fi=math.cos(pf)##degree\n",
+ "A=A1*A2+B1*C2##generalized parameter of 2 line\n",
+ "B=A1*B2+B1*D2##generalized parameter of 2 line\n",
+ "C=C1*A2+D1*C2##generalized parameter of 2 line\n",
+ "D=C1*B2+D1*D2##generalized parameter of 2 line\n",
+ "IR=IR*(math.cos(-fi*math.pi/180.) + 1j*math.sin(-fi*math.pi/180.))#\n",
+ "VS=A*VR+B*IR##Volt\n",
+ "VSL=math.sqrt(3.)*abs(VS)##Volt\n",
+ "print '%s %.2f' %(\"Sending end Line voltage(kV) : \",VSL/1000)#\n",
+ "IS=C*VR+D*IR##A\n",
+ "print '%s %.2f %s %.2f' %(\"Sending end current(A), magnitude is \",abs(IS),\" and angle in degree is \",cmath.phase(IS)*180/math.pi)#\n",
+ "#Answer for VSL is wrong in the book.\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Sending end Line voltage(kV) : 109.34\n",
+ "Sending end current(A), magnitude is 190.09 and angle in degree is 15.72\n"
+ ]
+ }
+ ],
+ "prompt_number": 51
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Example E25 - Pg 156"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#calculate Sending end power factor(lagging)\n",
+ "import cmath\n",
+ "import math\n",
+ "#Given data :\n",
+ "A1=0.98*(math.cos(1.*math.pi/180.) + 1j*math.sin(1.*math.pi/180.))##parameter of 3-phase line\n",
+ "D1=A1##parameter of 3-phase line\n",
+ "B1=100*(math.cos(75.*math.pi/180.) + 1j*math.sin(75.*math.pi/180.))##parameter of 3-phase line\n",
+ "C1=0.0005*(math.cos(90.*math.pi/180.) + 1j*math.sin(90.*math.pi/180.))##parameter of 3-phase line\n",
+ "A2=0.98*(math.cos(1.*math.pi/180.) + 1j*math.sin(1.*math.pi/180.))##parameter of 3-phase line\n",
+ "D2=A2##parameter of 3-phase line\n",
+ "B2=100*(math.cos(75.*math.pi/180.) + 1j*math.sin(75.*math.pi/180.))##parameter of 3-phase line\n",
+ "C2=0.0005*(math.cos(90.*math.pi/180.) + 1j*math.sin(90.*math.pi/180.))##parameter of 3-phase line\n",
+ "P=100*10**6##W\n",
+ "VRL=132*10**3##Volt\n",
+ "VR=VRL/math.sqrt(3)##Volt\n",
+ "pf=0.8##power factor\n",
+ "cos_fi_r=pf#\n",
+ "sin_fi_r=math.sqrt(1-cos_fi_r**2)#\n",
+ "fi=math.acos(pf)##degree\n",
+ "A=(A1*B2+A2*B1)/(B1+B2)##generalized parameter of 2 line\n",
+ "B=B1*B2/(B1+B2)##generalized parameter of 2 line\n",
+ "C=C1+C2-(A1-A2)*(D1-D2)/(B1+B2)##generalized parameter of 2 line\n",
+ "D=(B1*D2+B2*D1)/(B1+B2)##generalized parameter of 2 line\n",
+ "print '%s' %(\"Generalised constants ot two lines combined are : \")#\n",
+ "print '%s %.2f %s %.f' %(\"Parameter A, magnitude is \",abs(A),\" and angle in degree is \",cmath.phase(A)*180/math.pi)#\n",
+ "print '%s %.f %s %.2f' %(\"Parameter B, magnitude is \",abs(B),\" and angle in degree is \",cmath.phase(B)*180/math.pi)#\n",
+ "print '%s %.3f %s %.2f' %(\"Parameter C, magnitude is \",abs(C),\" and angle in degree is \",cmath.phase(C)*180/math.pi)#\n",
+ "print '%s %.2f %s %.2f' %(\"Parameter D, magnitude is \",abs(D),\" and angle in degree is \",cmath.phase(D)*180/math.pi)#\n",
+ "IR=P/math.sqrt(3.)/VRL/pf##A\n",
+ "IR=IR*(math.cos(-fi*math.pi/180.) + 1j*math.sin(-fi*math.pi/180.))#\n",
+ "VS=A*VR+B*IR##Volt\n",
+ "VSL=math.sqrt(3.)*abs(VS)##Volt\n",
+ "IS=C*VR+D*IR##A\n",
+ "fi_s=cmath.phase(VS)-cmath.phase(IS)#\n",
+ "print '%s %.4f' %(\"Sending end power factor(lagging) : \",math.cos(fi_s))#\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "Generalised constants ot two lines combined are : \n",
+ "Parameter A, magnitude is 0.98 and angle in degree is 1\n",
+ "Parameter B, magnitude is 50 and angle in degree is 75.00\n",
+ "Parameter C, magnitude is 0.001 and angle in degree is 90.00\n",
+ "Parameter D, magnitude is 0.98 and angle in degree is 1.00\n",
+ "Sending end power factor(lagging) : 0.9843\n"
+ ]
+ }
+ ],
+ "prompt_number": 50
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file