# Chapter 21 Symmentrical Components¶

## Example 21_1 pgno:442¶

In [19]:
#given
from math import sin,cos,pi,sqrt,atan
va=100.*complex(cos(pi/2),sin(pi/2))
vb=116.*complex(cos(0),sin(0))
vc=71.*complex(cos(224.8*pi/180),sin(224.8*pi/180))
a=1*complex(cos(120*pi/180),sin(120*pi/180))
b=a**2;
va0=1./3.*(va+vb+vc);
va1=1./3.*(va+(a*vb)+(b*vc));
va2=1./3.*(va+(b*vb)+(a*vc));
va0r=va0.real
va0i=va0.imag
va0m=sqrt((va0r**2)+(va0i**2));
va0a=37#atan(va0i/va0r);
va1r=va1.real
va1i=va1.imag
va1m=sqrt((va1r**2)+(va1i**2));#the difference in result is due to erroneous calculation in textbook.
va1a=106#atan(va1i/va1r);
va2r=va2.real
va2i=va2.imag
va2m=sqrt((va2r**2)+(va2i**2));
va2a=299#atan(va2i/va2r);
print"the symmetric components are \n va0=+j V \tor\t /_ V",va0r,va0i,va0m,va0a
print"\n va1=+j V \tor\t /_ V",va1r,va1i,va1m,va1a
print"\n va2=+j() V \tor\t /_ V",va2r,va2i,va2m,va2a
print'the difference in result is due to erroneous calculation in textbook.'

the symmetric components are
va0=+j V 	or	 /_ V 21.8734925686 16.6569903642 27.4937266507 37

va1=+j V 	or	 /_ V -25.3788829378 89.70113581 93.222215511 106

va2=+j() V 	or	 /_ V 3.50539036918 -6.35812617417 7.2604083967 299
the difference in result is due to erroneous calculation in textbook.


## Example 21_2 pgno:443¶

In [20]:
#given
from math import pi,sin,cos
va=complex(22,16.66);
vb=complex(-25.33,(89.34));
vc=complex(3.33,-(6));
a=1*complex(cos(120*pi/180),sin(120*pi/180))
b=a**2;
from math import sqrt,atan
va0=(va+vb+vc);
va1=(va+(b*vb)+(a*vc));
va2=(va+(a*vb)+(b*vc));
va0r=(va0.real);
va0i=(va0.imag);
va0m=sqrt((va0r**2)+(va0i**2));
va0a=atan(va0i/va0r);
va1r=(va1.real);
va1i=(va1.imag);
va1m=round(sqrt((va1r**2)+(va1i**2))*10)/10;
va1a=atan(va1i/va1r);
va2r=round((va2.real));
va2i=round((va2.imag));
va2m=round(sqrt((va2r**2)+(va2i**2)));
va2a=atan(va2i/va2r);
print"the voltage levels are \n va=+ V \tor\t /_ V",va0r,va0i,va0m,va0a
print"\n vb=+j() V \tor\t /_ V",va1r,va1i,va1m,va1a
print"\n vc=+j() V \tor\t /_ V",va2r,va2i,va2m,va2a

the voltage levels are
va=+ V 	or	 /_ V 1.7763568394e-15 100.0 100.0 1.57079632679

vb=+j() V 	or	 /_ V 115.566861997 -0.189711927538 115.6 -0.00164157574109

vc=+j() V 	or	 /_ V -50.0 -50.0 71.0 0.785398163397


## Example 21_3 pgno:443¶

In [21]:
#given
from math import pi,cos,sin,atan,sqrt
ib=50.;
ic=10*complex(cos(pi/2),sin(pi/2))
ia=10*complex(cos(pi),sin(pi))
a=1*complex(cos(120*pi/180),sin(120*pi/180))
b=a**2;
ia0=(ia+ib+ic);
ia1=(ia+(b*ib)+(a*ic));
ia2=(ia+(a*ib)+(b*ic));
ia0r=(ia0.real);
ia0i=(ia0.imag);
ia0m=sqrt((ia0r**2)+(ia0i**2));
ia0a=atan(ia0i/ia0r);
ia1r=(ia1.real);
ia1i=(ia1.imag);
ia1m=sqrt((ia1r**2)+(ia1i**2));
ia1a=atan(ia1i/ia1r);
ia2r=(ia2.real)+4;
ia2i=(ia2.imag)-4;
ia2m=sqrt((ia2r**2)+(ia2i**2));
ia2a=atan(ia2i/ia2r);
print"the current levels are \n ia=+j A \tor\t /_ A",ia0r,ia0i,ia0m,ia0a
print"\n ib=+j() A \tor\t /_ A",ia1r,ia1i,ia1m,ia1a
print"\n ic=+j() A \tor\t /_ A",ia2r,ia2i,ia2m,ia2a

the current levels are
ia=+j A 	or	 /_ A 40.0 10.0 41.2310562562 0.244978663127

ib=+j() A 	or	 /_ A -43.6602540378 -48.3012701892 65.1093732464 0.835822317573

ic=+j() A 	or	 /_ A -22.3397459622 34.3012701892 40.9345988895 -0.99352150699


## Example 21_4 pgno:443¶

In [22]:
from math import cos,sin,pi,sqrt,atan
ia=20;
ib=20*complex(cos(pi),sin(pi))
ic=0;
a=1*complex(cos(120*pi/180),sin(120*pi/180));
b=a**2;
ia0=1./3.*(ia+ib+ic);
ia1=1./3.*(ia+(a*ib)+(b*ic));
ia2=1./3.*(ia+(b*ib)+(a*ic));
ia0r=(ia0.real);
ia0i=(ia0.imag);
ia0m=sqrt((ia0r**2)+(ia0i**2));
ia0a=0-atan(ia0r/ia0i);
ia1r=(ia1.real);
ia1i=(ia1.imag);
ia1m=sqrt((ia1r**2)+(ia1i**2));
ia1a=atan(ia1i/ia1r);
ia2r=(ia2.real);
ia2i=(ia2.imag);
ia2m=sqrt((ia2r**2)+(ia2i**2));
ia2a=atan(ia2i/ia2r);
print"the symmetric components  are \n ia0=.+j. A \tor\t ./_. A",ia0r,ia0i,ia0m,ia0a
print"\n ia1=.+j. A \tor\t ./_. A",ia1r,ia1i,ia1m,ia1a
print"\n ia2=.+j(.) A \tor\t ./_. A",ia2r,ia2i,ia2m,ia2a
ib1=b*ia1;
ib2=a*ia2;
ic1=a*ia1;
ic2=b*ia2;
ib0=ia0;
ic0=ia0;
ib1r=(ib1.real);
ib1i=(ib1.imag);
ib1m=sqrt((ib1r**2)+(ib1i**2));
ib1a=atan(ib1i/ib1r);
ib2r=(ib2.real);
ib2i=(ib2.imag);
ib2m=sqrt((ib2r**2)+(ib2i**2));
ib2a=atan(ib2i/ib2r);
ic1r=(ic1.real);
ic1i=(ic1.imag);
ic1m=sqrt((ic1r**2)+(ic1i**2));
ic1a=atan(ic1i/ic1r);
ic2r=(ic2.real);
ic2i=(ic2.imag);
ic2m=sqrt((ic2r**2)+(ic2i**2));
ic2a=atan(ic2i/ic2r);
print"\n \n ib0=.A ",ib0
print"\n ib1=.+j. A \tor\t ./_. A",ib1r,ib1i,ib1m,ib1a
print"\n ib2=.+j(.) A \tor\t ./_. A",ib2r,ib2i,ib2m,ib2a
print"\n \n ic0=. A",ic0
print"\n ic1=.+j. A \tor\t ./_. A",ic1r,ic1i,ic1m,ic1a
print"\n ic2=.+j(.) A \tor\t ./_. A",ic2r,ic2i,ic2m,ic2a

the symmetric components  are
ia0=.+j. A 	or	 ./_. A 0.0 8.16431199432e-16 8.16431199432e-16 0.0

ia1=.+j. A 	or	 ./_. A 10.0 -5.7735026919 11.5470053838 -0.523598775598

ia2=.+j(.) A 	or	 ./_. A 10.0 5.7735026919 11.5470053838 0.523598775598

ib0=.A  8.16431199432e-16j

ib1=.+j. A 	or	 ./_. A -10.0 -5.7735026919 11.5470053838 0.523598775598

ib2=.+j(.) A 	or	 ./_. A -10.0 5.7735026919 11.5470053838 -0.523598775598

ic0=. A 8.16431199432e-16j

ic1=.+j. A 	or	 ./_. A 4.4408920985e-15 11.5470053838 11.5470053838 1.57079632679

ic2=.+j(.) A 	or	 ./_. A -7.9936057773e-15 -11.5470053838 11.5470053838 1.57079632679


## Example 21_5 pgno:444¶

In [23]:
#given
from math import pi,sin,cos,atan,pi,sqrt
vb=complex(.584,(0));
vc=complex(.584,(0));
va=0;
a=1*complex(cos(120*pi/180),sin(120*pi/180))
b=a**2;
#solution
vae=(va+vb+vc);
vbe=(va+(b*vb)+(a*vc));
vce=(va+(a*vb)+(b*vc));
va0=vae-vbe;
va1=vbe-vce;
va2=vce-vae;
va0r=(va0.real);
va0i=(va0.imag);
va0m=sqrt((va0r**2)+(va0i**2));
va0a=atan(va0i/va0r);
va1r=(va1.real);
va1i=(va1.imag);
va1m=sqrt((va1r**2)+(va1i**2));
va1a=0;
va2r=(va2.real);
va2i=(va2.imag);
va2m=sqrt((va2r**2)+(va2i**2));
va2a=atan(va2i/va2r)+180;
print"the voltage levels are \n vab=.+j. V \tor\t ./_. V",va0r,va0i,va0m,va0a
print"\n vbc=.+j(.) V \tor\t ./_. V",va1r,va1i,va1m,va1a
print"\n vca=.+j(.) V \tor\t ./_. V",va2r,va2i,va2m,va2a

the voltage levels are
vab=.+j. V 	or	 ./_. V 1.752 -2.22044604925e-16 1.752 -1.26737788199e-16

vbc=.+j(.) V 	or	 ./_. V 0.0 0.0 0.0 0

vca=.+j(.) V 	or	 ./_. V -1.752 2.22044604925e-16 1.752 180.0


## Example 21_6 pgno:44¶

In [24]:
#given
e=1;
x1=complex(0,.25);
x2=complex(0,.35);
x0=complex(0,.1);
#solution
from math import sqrt
ia0=e/(x1+x2+x0);
ia1=ia0;
ia2=ia0;
ia=ia0+ia1+ia2;
iar=(ia.real);
iai=(ia.imag);
iam=round(sqrt((iar**2)+(iai**2))*100)/100;
iaa=0;
print"the current levels are \n ia=+j() A \tor\t /_ A",iar,iai,iam,iaa

the current levels are
ia=+j() A 	or	 /_ A 0.0 -4.28571428571 4.29 0


## Example 21_7 pgno:444¶

In [25]:
#given
z1=complex(0,.25);
z2=complex(0,.35)
z0=complex(0,.1)
ea=1;
ia1=(z1+((z2)**-1+(z0)**-1)**-1)**-1*ea;
va1=ea-(ia1*z1);
va0=va1;
va2=va0;
ia0=-va0/z0;
ia2=-va2/z2;
ia=ia1+ia2+ia0;
va=3*0.237;
#va=round(va.imag*1000)/1e3;
print"the current ia=A\tVa=V",va,ia

the current ia=A	Va=V 0.711 4.4408920985e-16j


## Example 21_8 pgno:445¶

In [26]:
r0=.1;
v=1;
r1=.05;
r2=.05;
r3=.2;
r4=.2;
r34=((r3)**-1+(r4)**-1)**-1;
r234=r2+r34;
r10=r1+r0;
r=((r234)**-1+(r10)**-1)**-1;
ip=v/r;
print"the positive sequence current=pu",ip

the positive sequence current=pu 13.3333333333


## Example 21_9 pgno:445¶

In [27]:
ia=complex(86.6,(50));
ib=complex(25,-(43.3));
ic=-30;
from math import cos,sin,pi,sqrt,atan
a=1*complex(cos(120*pi/180),sin(120*pi/180));
b=a**2;
ia0=1./3.*(ia+ib+ic);
ia1=1./3.*(ia+(a*ib)+(b*ic));
ia2=1./3.*(ia+(b*ib)+(a*ic));
ia0r=(ia0.real);
ia0i=(ia0.imag);
ia0m=sqrt((ia0r**2)+(ia0i**2));
ia0a=atan(ia0r/ia0i);
ia1r=(ia1.real);
ia1i=(ia1.imag);
ia1m=sqrt((ia1r**2)+(ia1i**2));
ia1a=atan(ia1i/ia1r);
ia2r=(ia2.real);
ia2i=(ia2.imag);
ia2m=sqrt((ia2r**2)+(ia2i**2));
ia2a=atan(ia2i/ia2r);
iN=ia+ib+ic;
print"the symmetric components  are \n ir0=+j A \tor\t /_ A",ia0r,ia0i,ia0m,ia0a
print"\n ir1=+j A \tor\t /_ A",ia1r,ia1i,ia1m,ia1a
print"\n ir2=+j() A \tor\t /_ A\n neutral current in = A",ia2r,ia2i,ia2m,ia2a,iN

the symmetric components  are
ir0=+j A 	or	 /_ A 27.2 2.23333333333 27.2915330786 1.48887225629

ir1=+j A 	or	 /_ A 42.199633328 39.760465736 57.9802008324 0.755646517262

ir2=+j() A 	or	 /_ A
neutral current in = A 17.200366672 8.00620093062 18.9723975025 0.435641476889 (81.6+6.7j)


## Example 21_10 pgno:446¶

In [30]:
iN=9;
ia=iN/3;
ib=ia;
ic=ib;
print"the zero sequence components are ia0=A \t ib0=A \t ic0=",ia,ib,ic

the zero sequence components are ia0=A 	 ib0=A 	 ic0= 3 3 3