     This program uses ABC rotation. The output of the program will be positive
sequence first then negative then zero.  Some utilities have ACB rotation.
The program will work with ACB rotation as the output of the program will
then be negative sequence first then positive then zero.

     The basic principal of using symmetrical components is to convert the
unbalanced 3-phase system into three balanced 3-phase systems.  This follows 
the theorem in mathematics developed by Fortescue that states that 
unsymmetrical systems may be represented by multiple symmetrical systems.
In this case an unbalanced 3-phase system can be represented by three 
balanced symmetrical networks called the positive sequence, negative sequence 
and zero sequence networks.  The positive sequence network has three values 
all equal in magnatude and 120 degrees apart from each other with 
counterclockwise rotation.  The negative sequence network has three 
values all equal in magnatude and 120 degrees apart, but with a clockwise 
rotation.  The zero sequence network has three values all equal in magnatude 
and all at the same angle.

     A typical unbalanced system might look like this;
[(147 @ 13deg.) (154 @ 129deg.) (150 @ 237deg.)]

     The positive sequence network from the above system is this;
[(149.285 @ 6.321) (149.285 @ 126.321) (149.285 @ 246.321)]

     The negative sequence network from the unbalanced system above is this;
[(10.135 @ 49.004) (10.135 @ 289.004) (10.135 @ 169.004)]

     The zero sequence network from the unbalanced system above is this;
[(14.824 @ 142.704) (14.824 @ 142.704) (14.824 @ 142.704)]

     When the three balanced networks are added together the total sum will be 
equal to the original unbalanced system.  

     The equations required to convert the unbalanced system into the three 
balanced systems are as follows;

First, let us define these terms.
A = A phase
B = B phase
C = C phase
t = total
p = positive sequence
n = negative sequence
z = zero sequence
a = (1 @ 120 deg.) and is a multiplier used for rotating a vector 120 degrees
b = (1 @ -120 deg.)

for the unbalanced system;
At = Ap + An + Az
Bt = Bp + Bn + Bz
Ct = Cp + Cn + Cz

for the positive sequence network;
Ap = (At + (a * Bt) + (b * Ct)) / 3
Bp = Ap * b
Cp = Ap * a

for the negative sequence network;
An = (At + (b * Bt) + (a * Ct)) / 3
Bn = An * a
Cn = An * b

for the zero sequence network;
Az = (At + Bt + Ct) / 3
Az = Bz = Cz