summaryrefslogtreecommitdiff
path: root/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/Chapter_6.ipynb
diff options
context:
space:
mode:
Diffstat (limited to 'Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/Chapter_6.ipynb')
-rw-r--r--Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/Chapter_6.ipynb659
1 files changed, 659 insertions, 0 deletions
diff --git a/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/Chapter_6.ipynb b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/Chapter_6.ipynb
new file mode 100644
index 00000000..3361cca7
--- /dev/null
+++ b/Electronic_Measurements_and_Instrumentation_by_Er.R.K.Rajput/Chapter_6.ipynb
@@ -0,0 +1,659 @@
+{
+ "cells": [
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "# Chapter 6:Instrument Transformers"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:6.1,Page No:367"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 19,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "actual tranformation ratio = 240.77\n",
+ "phase angle = 4.57 ° \n",
+ "maximum flux density in core = 0.0938 Wb/m**2\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Np = 1; #number of primary turns\n",
+ "Ns = 240; #number of secondary turns\n",
+ "Is = 5; #secondary current in A\n",
+ "Re = 1.2; #external burden in Ω \n",
+ "mmf = 96; #magnetomotive force in AT\n",
+ "Ac = 1200*10**-6; #cross section area mm**2\n",
+ "f = 50; #frequency in Hz\n",
+ "\n",
+ "#calculation\n",
+ "Kt = Ns/float(Np); #turns ratio\n",
+ "Es = Is*Re; #voltage induced in secondary winding in V\n",
+ "Im = mmf/float(Np); #secondary current in A\n",
+ "Ip = math.sqrt(((Kt*Is)**2)+((Im)**2)); #primary current in A\n",
+ "Kact = Ip/float(Is); #actual transformation ratio \n",
+ "x = Im/float(Kt*Is); #tangential component\n",
+ "theta = math.atan(x); #phase angle \n",
+ "phimax = Es/float(4.44*f*Ns);\n",
+ "Bmax = phimax/float(Ac);\n",
+ "\n",
+ "#result\n",
+ "print'actual tranformation ratio = %3.2f'%Kact;\n",
+ "print'phase angle = %3.2f'%((theta*180)/float(math.pi)),'° ';\n",
+ "print'maximum flux density in core = %3.4f'%Bmax,'Wb/m**2';\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:6.2,Page No:368"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 4,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio error at full load = -0.0450 %\n",
+ "phase angle = 5.116677 degrees(equal to (3 minutes 4 seconds))\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "I0 = 1; #exciting current in A\n",
+ "Knom = 200; #current transformer ratio \n",
+ "Re = 1.1; #non inductive resistance in Ω \n",
+ "p = 0.45; #power factor \n",
+ "delta = 0;\n",
+ "Is = 5; #rated secondary winding current in A\n",
+ "\n",
+ "#calculations\n",
+ "alpha = 90-(((math.acos(p))*180)/float(math.pi));\n",
+ "Kt = Knom #since no turn compenasation\n",
+ "y = math.sin(((delta+alpha)*math.pi)/float(180));\n",
+ "Kact = Kt+((I0/float(Is))*(y)); #actual transformation ratio\n",
+ "r = ((Knom-Kact)/float(Kact))*100; #ratio error\n",
+ "k =math.cos(((delta+alpha)*math.pi)/float(180));\n",
+ "theta = (180/math.pi)*((I0*k)/float(Kt*Is)); #phase angle degreess\n",
+ "\n",
+ "#calculation\n",
+ "print'ratio error at full load = %3.4f'%r,'%';\n",
+ "print'phase angle = %f'%(theta*100),'degrees(equal to (3 minutes 4 seconds))';\n",
+ "\n",
+ "\n",
+ " "
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:6.3,Page No:369"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 21,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "flux in the core = 1.5766e-04 wb\n",
+ "ratio error = -3.846 %\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variuable declaration\n",
+ "Knom = 200; #nominal ratio\n",
+ "Np = 1; #number of primary turns\n",
+ "R = 1.4; #secondary impendance in Ω \n",
+ "L = 1.4; #iron loss in W\n",
+ "I = 5; #current in A\n",
+ "d = 0; #load angle when burden is pure resistive \n",
+ "mmf = 80; #magnetomotive force in A\n",
+ "f = 50;\n",
+ "\n",
+ "#calculations\n",
+ "Kt = Knom; #turns ratio\n",
+ "Ns = Kt*Np; #number of secondary turns\n",
+ "Es = I*R; #secondary induced voltage in V\n",
+ "phimax = Es/float(4.44*f*Ns); #flux in core Wb\n",
+ "Ep = Es/float(Kt); #primary induced voltage in V\n",
+ "Iw = L/float(Ep); #loss component of exciting current in A\n",
+ "Im = mmf/float(Np); #magnetising current\n",
+ "Kact = Kt+(((Im*math.sin(d))+(Iw*math.cos(d)))/float(Is)); #actual ratio \n",
+ "r = (Knom-Kact)/float(Kact); #ratio error in %\n",
+ "r1 = r*100;\n",
+ "\n",
+ "#result\n",
+ "print'flux in the core = %3.4e'%phimax,'wb';\n",
+ "print'ratio error = %3.3f'%r1,'%';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:6.4,Page No:370"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 22,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio error = -5.57 %\n",
+ "phase angle =2.01 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Np = 1; #number of primary turns\n",
+ "Ns = 250; #number of secondary turns\n",
+ "Rp = 1.4; #resistance of secondary circuit in Ω\n",
+ "Xs = 1.1; #reactance of secondary circuit in Ω\n",
+ "Is = 5; #current in secondary winding in A\n",
+ "mmf = 80; #magnetomotive force in A\n",
+ "L = 1.1; #iron loss in W\n",
+ "\n",
+ "#calculations\n",
+ "Kt = Ns/float(Np); #turns ratio\n",
+ "Knom = Kt; \n",
+ "Rs = math.sqrt((Rp**2)+(Xs**2)); #secondary circuit impedance\n",
+ "cosd = Rp/float(Rs); \n",
+ "sind = Xs/float(Rs);\n",
+ "Es = Is*Rs; #secondary induced voltage in V\n",
+ "Ep = Es/float(Ns); #primary induced voltage in V\n",
+ "Iw = L/float(Ep); #loss of component reffering to primary winding in A\n",
+ "Im = mmf/float(Np); #magnetising current in A\n",
+ "Kact = Kt+(((Im*sind)+(Iw*cosd))/float(Is)); #actual transformation ratio\n",
+ "r = ((Knom-Kact)/float(Kact))*100; #ratio error in %\n",
+ "theta = (180/math.pi)*(((Im*cosd)-(Iw*sind))/float(Kt*Is)); #phase angle degreess\n",
+ "\n",
+ "#result\n",
+ "print'ratio error = %3.2f'%r,'%';\n",
+ "print'phase angle =%3.2f'%theta,'°';\n",
+ "\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:6.5,Page No:371"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 23,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "actual ratio = 317.10\n",
+ "primary current = 1585.49 A\n",
+ "reduction in secondary winding turns = 17\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Np = 1; #number of primary windings\n",
+ "Ns = 300; #umber of secondary windings\n",
+ "Re = 1; #ammeter ressistance in Ω\n",
+ "Xe = 0.55; #reactance in Ω\n",
+ "Rs = 0.3; #resistance if secondary winding in Ω\n",
+ "Xs = 0.25; #reactance of secondary winding in Ω\n",
+ "mmf = 90; # mmf for magnetisation\n",
+ "mmfc = 45; #mmf for core loss \n",
+ "Is = 5; #current in A\n",
+ "\n",
+ "#calculations\n",
+ "R = Rs+Re; #total secondarycircuit resistance in Ω\n",
+ "X = Xs+Xe; #total secondarycircuit reactance in Ω\n",
+ "delta = math.atan(X/float(R)); #secondary circuit phase angle \n",
+ "c = math.cos(delta);\n",
+ "s = math.sin(delta);\n",
+ "Kt = Ns/float(Np); #turn ratio \n",
+ "Im = mmf/float(Np); #magnetising current in A\n",
+ "Iw = mmfc/float(Np); #loss component in A\n",
+ "Kact = Kt+(((Im*math.sin(delta))+(Iw*math.cos(delta)))/float(Is)); #actual ratio\n",
+ "Ip = Kact*Is; #primary current A\n",
+ "Knom = Kt;\n",
+ "y = (((Im*math.sin(delta))+(Iw*math.cos(delta)))/float(Is));\n",
+ "Kt1 = (Knom)-(y);\n",
+ "Ns1 = Kt1*Np; #secondary winding turns\n",
+ "r = Ns-Ns1; #reduction in secondary winding turns\n",
+ "\n",
+ "#result\n",
+ "print'actual ratio = %3.2f'%Kact;\n",
+ "print'primary current = %3.2f'%Ip,'A';\n",
+ "print'reduction in secondary winding turns = %3.0f'%r;"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:6.6,Page No:372"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 24,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "actual ratio 101.12 °\n",
+ "phase angle 0.641 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Np = 1; #number of primary windings\n",
+ "Ns = 100; #number of secondary windings\n",
+ "Knom = 100; #nominal ratio\n",
+ "Re = 1.45; #external burden non inductive in Ω\n",
+ "Rs = 0.25; #winding resistance in Ω\n",
+ "I0 = 1.8; #current in A\n",
+ "l = 38.4; #lagging angle with secondary voltage reversed in °\n",
+ "Is = 1; #current in secondary winding in A\n",
+ "delta = 0;\n",
+ "\n",
+ "\n",
+ "#calculations\n",
+ "Kt = Ns/float(Np); #turn ratio\n",
+ "Rt = Re+Rs; #totaal secondary circuit resistance in Ω\n",
+ "alpha = 90-l;\n",
+ "x = math.cos(((delta+alpha)*math.pi)/float(180));\n",
+ "Kact = Kt+((I0/float(Is))*x); #actual ratio\n",
+ "y = math.cos(((delta+alpha)*math.pi)/float(180));\n",
+ "theta = (180/float(math.pi))*((I0*y/float(Kt*Is))); #phase angle in °\n",
+ "\n",
+ "#result\n",
+ "print'actual ratio %3.2f'%Kact,'°';\n",
+ "print'phase angle %3.3f'%theta,'°';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "## Example:6.7,Page No:373"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 25,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio error -0.87 %\n",
+ "phase angle 0.1948\n",
+ "ratio error 0.08 %\n",
+ "phase angle 0.5386 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Np = 1; #number of primary windings\n",
+ "Ns = 200; #number of secondary winding\n",
+ "Kt = 200; #actual ratio\n",
+ "Im = 8; #magnetising current in A\n",
+ "Iw = 5; #loss component in A\n",
+ "cosphi = 0.8; # leading by\n",
+ "Knom = 200; #transformer is rated \n",
+ "cosphi1 = 0.8; #lagging by\n",
+ "Is = 5; #current in A\n",
+ "\n",
+ "#calculations\n",
+ "sinphi = math.sqrt((1**2)-(cosphi**2));\n",
+ "Kact = Kt+(((Im*sinphi)+(Iw*cosphi))/float(Is)); #actual ratio\n",
+ "er = ((Knom-Kact)/float(Kact))*100; #error ratio\n",
+ "theta = (180/float(math.pi))*(((Im*cosphi)-(Iw*sinphi))/float(Kt*Is)); #phase angle\n",
+ "sinphi1 = -math.sqrt((1**2)-(cosphi1**2));\n",
+ "Kact1 = Kt+(((Im*sinphi1)+(Iw*cosphi1))/float(Is)); #actual ratio\n",
+ "er1 = ((Knom-Kact1)/float(Kact1))*100; #ratio error\n",
+ "theta1 = (180/float(math.pi))*(((Im*cosphi1)-(Iw*sinphi1))/float(Kt*Is)); #phase angle\n",
+ "\n",
+ "#result\n",
+ "print'ratio error %3.2f'%er,'%';\n",
+ "print'phase angle %3.4f'%theta;\n",
+ "print'ratio error %3.2f'%er1,'%';\n",
+ "print'phase angle %3.4f'%theta1,'°';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": false
+ },
+ "source": [
+ "#Example:6.8,Page No:373"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 5,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio error -0.86 %\n",
+ "phase angle 0.4074\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Np = 1; #number of primary windings\n",
+ "Ns = 99; #number of secondary winding\n",
+ "Rs = 0.4; #secondary winding resistance in Ω\n",
+ "Xs = 0.35; #secondary winding reactance in Ω\n",
+ "Knom = 100; #ratio \n",
+ "mmf = 6; #magnetising mmf in AT\n",
+ "lmmf = 8; #loss mmf in AT\n",
+ "V = 20; #voltage in VA\n",
+ "\n",
+ "\n",
+ "#calculations\n",
+ "Kt = Ns/float(Np); #actual ratio\n",
+ "Im = mmf/float(Np); #magnetising current in A\n",
+ "Iw = lmmf/float(Np); #loss component in A\n",
+ "Re = V/float(Is**2); #external reistance burden in Ω\n",
+ "R = Rs+Re; #resistance of total seccondary circuit in Ω\n",
+ "#reactance is zero \n",
+ "Xe = 0;\n",
+ "X = Xs+Xe; #reactance of total secondary circcuit burden in Ω\n",
+ "delta = ((math.atan(X/float(R))*180)/float(math.pi)); #phase angle\n",
+ "c = math.cos((delta*math.pi)/float(180));\n",
+ "s = math.sin((delta*math.pi)/float(180));\n",
+ "Kact = Kt+(((Im*s)+(Iw*c))/float(Is)); #actual ratio\n",
+ "er = ((Knom-Kact)/float(Kact))*100; #error ratio\n",
+ "theta = (180/float(math.pi))*(((Im*c)-(Iw*s))/float(Kt*Is)); #phase angle\n",
+ "\n",
+ "#result\n",
+ "print'ratio error %3.2f'%er,'%';\n",
+ "print'phase angle %3.4f'%theta;\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {
+ "collapsed": false
+ },
+ "source": [
+ "#Example:6.9,Page No:374"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 27,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio error -1.198 %\n",
+ "phase angle 0.6531 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Knom = 20; #nominal ratio of 100/5A\n",
+ "V = 20; #rated load in VA\n",
+ "Il = 0.18; #iron loss in W\n",
+ "Im = 1.4; #magnetising current in A\n",
+ "x = 4; #ratio of reactance to resistance \n",
+ "Ip = 100; #primary currnt widing in A\n",
+ "Is = 5; #current in secondary winding in A\n",
+ "\n",
+ "#calculations\n",
+ "Kt = Knom; #assuming the value of Kt\n",
+ "Ep = V/float(Ip); #voltage across primary winding in V\n",
+ "Iw = Il/float(Ep); #loss current of exciting current in A\n",
+ "delta = ((math.atan(1/float(x))*180)/float(math.pi)); #phase angle\n",
+ "c = math.cos((delta*math.pi)/float(180));\n",
+ "s = math.sin((delta*math.pi)/float(180));\n",
+ "Kact = Kt+(((Im*s)+(Iw*c))/float(Is)); #actual ratio\n",
+ "er = ((Knom-Kact)/float(Kact))*100; #error ratio\n",
+ "theta = (180/float(math.pi))*(((Im*c)-(Iw*s))/float(Kt*Is)); #phase angle\n",
+ "\n",
+ "#result\n",
+ "print'ratio error %3.3f'%er,'%';\n",
+ "print'phase angle %3.4f'%theta,'°';\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#Example:6.10,Page No:382"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 6,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "phase angle error at no load -0.00156 °\n",
+ "Note:printing mistake in textbook,theta value is printed wrong\n",
+ "burden load in VA 15.34 V A\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declaration\n",
+ "Kt = 10; #ratio of 1000/100volts potentia meter \n",
+ "Rp = 86.4; #primary resistance in Ω\n",
+ "Rs = 0.78; #secondary resistance in Ω\n",
+ "Xp = 62.5; #primary reactance in Ω\n",
+ "Xs = 102; #total equivalent reactance in Ω\n",
+ "I0 = 0.03; #no-load current in A\n",
+ "cosphi = 0.42; #power factor \n",
+ "cosgamma = 1; #since power factor = 1\n",
+ "Vs = 100; #voltage in V\n",
+ "\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "sinphi = math.sqrt(1-(cosphi**2));\n",
+ "Im = I0*sinphi; #magnetising current in A\n",
+ "Iw = I0*cosphi; #loss current in A\n",
+ "\n",
+ "#theta = ((((Is/Kt)*((X*cosgamma)-(Rp*singamma)))+(Iw*Xp)-(Im*Rp))/float(Kt*Vs));\n",
+ "#since Is =0 \n",
+ "\n",
+ "theta = (((Iw*Xp)-(Im*Rp))/float(Kt*Vs));\n",
+ "singamma = math.sqrt(1-(cosgamma**2));\n",
+ "\n",
+ "#burden in VA,theta1 = 0,thus ((((Is/Kt)*((X*cosgamma)-(Rp*singamma)))+(Iw*Xp)-(Im*Rp))/float(Kt*Vs))=0\n",
+ "#(((Is/Kt)*((X*cosgamma)-(Rp*singamma)))+(Iw*Xp)-(Im*Rp)) =0\n",
+ "#Is/Kt = ((Im*Rp)-(Iw*Xp)))/float(((X*cosgamma)-(Rp*singamma)))\n",
+ "#assume x = ((X*cosgamma)-(Rp*singamma)),y = (Iw*Xp)-(Im*Rp)\n",
+ "#Is = Kt*(y/x)\n",
+ "\n",
+ "x = ((Xs*cosgamma)-(Rp*singamma));\n",
+ "y = (Im*Rp)-(Iw*Xp);\n",
+ "Is = Kt*(y/float(x)); #current in A\n",
+ "l = Vs*Is; # burden load in VA \n",
+ "\n",
+ "#result\n",
+ "print'phase angle error at no load %3.5f'%theta,'°';\n",
+ "print'Note:printing mistake in textbook,theta value is printed wrong';\n",
+ "print'burden load in VA %3.2f'%l,'V A'\n",
+ "\n",
+ "\n"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "#Example:6.11,Page No:383"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": 29,
+ "metadata": {
+ "collapsed": false
+ },
+ "outputs": [
+ {
+ "name": "stdout",
+ "output_type": "stream",
+ "text": [
+ "ratio error -0.7937 %\n",
+ "phase angle -0.3438 °\n"
+ ]
+ }
+ ],
+ "source": [
+ "import math\n",
+ "\n",
+ "#variable declartion\n",
+ "Kt = 60.476; #turns ratio 3810/63 tranformer\n",
+ "Vs = 63; #secondary voltage in V\n",
+ "Rs = 2; #series resistance in Ω\n",
+ "Xs = 1; #reactance in Ω\n",
+ "R = 100; #resistance in Ω\n",
+ "X = 200; #reactance in Ω\n",
+ "\n",
+ "#calculations\n",
+ "\n",
+ "delta = ((math.atan(X/float(R))*180)/float(math.pi)); #phase angle\n",
+ "Z = math.sqrt((R**2)+(X**2)); #agnitude of impedance\n",
+ "\n",
+ "#Kact = Kt+(((Rs*c)+(Xs*s))/float(Vs/float(Is))); \n",
+ "#Vs/float(Is) = Z\n",
+ "\n",
+ "c = math.cos((delta*math.pi)/float(180));\n",
+ "s = math.sin((delta*math.pi)/float(180));\n",
+ "x =(Rs*c)+(Xs*s);\n",
+ "y = ((x*Kt)/float(Z));\n",
+ "Kact = Kt+y; #actual ratio\n",
+ "Knom = Kt; #nominal ration \n",
+ "er = ((Knom-Kact)/float(Kact))*100; #error ratio\n",
+ "theta = (180/float(math.pi))*(((Xs*c)-(Rs*s))/float(Z)); #phase angle\n",
+ "\n",
+ "\n",
+ "\n",
+ "#result\n",
+ "print'ratio error %3.4f'%er,'%';\n",
+ "print'phase angle %3.4f'%theta,'°';\n"
+ ]
+ }
+ ],
+ "metadata": {
+ "kernelspec": {
+ "display_name": "Python 2",
+ "language": "python",
+ "name": "python2"
+ },
+ "language_info": {
+ "codemirror_mode": {
+ "name": "ipython",
+ "version": 2
+ },
+ "file_extension": ".py",
+ "mimetype": "text/x-python",
+ "name": "python",
+ "nbconvert_exporter": "python",
+ "pygments_lexer": "ipython2",
+ "version": "2.7.6"
+ }
+ },
+ "nbformat": 4,
+ "nbformat_minor": 0
+}