Chapter 6 : Synchronization and Parallel Operation of Alternators

Example 6.2 Page no : 31

In [1]:
import math 

# Variables
X_d = 0.7 
X_q = 0.4  			#direct and quadrature axis synchronous reactance p.u.
R_a = 0
phi = math.acos(0.8)  			#Lag

V_t = 1. 			#assumed rated terminal Voltage 
I_a = 1. 			#Full-load armature current

# Calculations
psi = math.atan(  (V_t*math.sin(phi)+I_a*X_q)/(V_t*math.cos(phi)+I_a*R_a)            )
delta = psi-phi
I_d = I_a*math.sin(psi)
I_q = I_a*math.cos(psi)
E_f = V_t*math.cos(delta)+I_d*X_d+I_q*R_a

# Results
print 'Total e.m.f induced on open circuit is %.4f p.u.'%(E_f)
Total e.m.f induced on open circuit is 1.5149 p.u.

Example 6.3 Page no : 35

In [6]:
import math 
import cmath

#note that a new function p2z has been defined below for direct representation of complex numbers in polar form
def  p2z(RRRR,Theeeta):
        return  RRRR*cmath.exp((math.pi*Theeeta/180.)*1j);

# Variables
Z1 = complex(0,3) 			#impedance of alternator 1
Z2 = complex(0,4) 			#impedance of alternator 2
Z = 6.       #load

E1 = p2z(220,0) 			#induced emf vector on no load
E2 = p2z(220,10)			#induced emf vector on no load

# Calculations and Results
I1 = ((E1-E2)*Z+E1*Z2)/(Z*(Z1+Z2)+Z1*Z2)
I2 = ((E2-E1)*Z+E2*Z1)/(Z*(Z1+Z2)+Z1*Z2)

phi1 = math.degrees(math.atan(I1.imag/I1.real))  			#Phasemag returns the angle of complex number in degrees
phi2 = math.degrees(math.atan(I2.imag/I2.real))  			#Phasemag returns the angle of complex number in degrees

I = I1+I2
V = I*Z 			#Terminal voltage
print 'i) Terminal voltage is %.1f volts at %.2f degrees'%(abs(V),math.degrees(math.atan(V.imag/V.real)))
print 'ii) Currents are %.2f A at %.2f degrees and %.2f A at %.2f degrees      \
\nTotal current is %.2f A at %.2f degrees  '%(abs(I1),math.degrees(math.atan(I1.imag/I1.real)),\
                                              abs(I2),math.degrees(math.atan(I2.imag/I2.real)),\
                                              abs(I),math.degrees(math.atan(I.imag/I.real)))

P1 = abs(V)*abs(I1)*math.cos(math.radians(phi1))
P2 = abs(V)*abs(I2)*math.cos(math.radians(phi2))
print 'iii)Power delivered is %.2f watts and %.2f watts'%(P1,P2)

# note : rounding off error.
i) Terminal voltage is 210.7 volts at -11.66 degrees
ii) Currents are 14.91 A at -17.71 degrees and 20.36 A at -7.24 degrees      
Total current is 35.12 A at -11.66 degrees  
iii)Power delivered is 2992.46 watts and 4257.11 watts

Example 6.4 Page no : 54

In [7]:
import math 

# Variables
V_l = 10000.
V_ph = V_l/math.sqrt(3)
VA = 10.*10**6
I_FL = VA/(V_l*math.sqrt(3)) 			#Current at full laod
IX_s = (20./100)*V_ph 			#product of I and X_s

# Calculations
X_s = IX_s/I_FL
N_s = 1500.
f = 50.
P = 120*f/N_s 			#poles

delta_dash_mech = math.pi/180 			#phase print lacement in degree mechanical
delta_dash_elec = delta_dash_mech*(P/2)  			#P/2 is pole pairs(and not poles)
E = V_ph 			#math.since alternator is on no-load
P_SY = delta_dash_elec*E**2/X_s  			#Synchronous Power
P_SY_3ph = P_SY*3 			#For 3 phases

# Results
print 'Synchronising Power of armature is %.3f kW.\
\nSynchronising Power for 3 phase is %.3f kW'%(P_SY*10**-3,P_SY_3ph*10**-3)
Synchronising Power of armature is 581.776 kW.
Synchronising Power for 3 phase is 1745.329 kW

Example 6.5 Page no : 55

In [11]:
import math 
import cmath

#note that a new function p2z has been defined below for direct representation of complex numbers in polar form

def  p2z(RRRR,Theeeta):
    return  RRRR*cmath.exp(1j*math.pi*Theeeta/180.);

# Variables
V_L = 6.6*10**3
V_ph = V_L/math.sqrt(3)
VA = 3.*10**6
I_FL = VA/(V_L*math.sqrt(3)) 			#full load current 
P = 8.
f = 50. 			#poles and frequency

X_s = complex(0,2.9)			#X_s = 2.9
delta_dash_mech = math.pi/180
delta_dash_elec = delta_dash_mech*(P/2)  			#P/2 is pole pairs(and not poles)

# Calculations and Results
#part(i)
E = V_ph
P_SY = delta_dash_elec*E**2/abs(X_s)  			#Synchronous Power per phase
P_SY_3ph = P_SY*3 			#For 3 phases
print 'i)   Synchronising power at no load is %.3f kW'%(P_SY*10**-3)
print '   Total Synchronising power at no load is %.2f kW'%(P_SY_3ph*10**-3)

N_s = 120*f/P 			#in rpm
n_s = (N_s)/60 			#in rps
T_SY = P_SY_3ph/(2*math.pi*n_s)
print 'Synchronous torque per mechanical degree of phase print lacement is %.2f * 10**3 N-m'%(T_SY*10**-3)

#part(ii)
phi = math.acos(math.radians(0.85))
I = p2z(I_FL,0)
V = p2z(V_ph,phi)

E = V+I*X_s
#E leads I by phasemag(E). V leads I by phasemag(V)

delta = (math.pi/180)* (math.atan(E.imag/E.real)-math.atan(V.imag/V.real) ) 			#power angle in radians
P_SY2 = abs(E)*abs(V)*math.cos(delta)*math.sin(delta_dash_elec)/abs(X_s)

P_SY_total_2 = 3*P_SY2
#n_s = T_SY/(P_SY/(2*math.pi) )       			#because T_SY = P_SY/(2*math.pi*n_s)
print 'ii)Total Synchronising power is %.0f kW'%(P_SY_total_2*10**-3)

T_SY2 = P_SY_total_2/(2*math.pi*n_s)
print 'Synchronising torque is %.2f * 10**3 N-m'%(T_SY2/1000)

# note : book answer is wrong.
i)   Synchronising power at no load is 349.547 kW
   Total Synchronising power at no load is 1048.64 kW
Synchronous torque per mechanical degree of phase print lacement is 13.35 * 10**3 N-m
ii)Total Synchronising power is 1074 kW
Synchronising torque is 13.68 * 10**3 N-m

Example 6.6 Page no : 57

In [16]:
import math 
import cmath

#note that a new function p2z has been defined below for direct representation of complex numbers in polar form
def  p2z(RRRR,Theeeta):
    return  RRRR*cmath.exp(1j*math.pi*Theeeta/180.)

# Variables
V_l = 10.*10**3
V_ph = V_l/math.sqrt(3)
R_a = 0.4
Z = complex(R_a,6)
I_a = p2z(300,-math.acos(math.radians(0.8)))
E = V_ph+I_a*Z

# Calculations
phi = math.acos(0.8)
alternator_op_ph = V_ph*abs(I_a)*math.cos(phi) 			#Power delivered to infinite bus per phase

#Power deliered to the altrernator  =  Power delivewred to bus bar +  I**2*R losses in armature
alternator_power =  alternator_op_ph+ abs(I_a)**2*R_a

#this power developed remains constant.change pf to 1 and calculate corresponding armature current
#alternator_power = V_ph*I_a1*math.cos(phi1)+I_a1**2*0.4
#solve the quadratic equation  0.4 I_a1**2+5773.50 I_a1- 1421640  = 0
I_a1 = (-1*V_ph+math.sqrt(V_ph**2-4*R_a*-1*alternator_power))/(2*R_a)

#also as follows 
E1 = V_ph+I_a1*Z
decrease = 100*(abs(E)-abs(E1))/abs(E)

# Results
print 'Percentage decrease in induced e.m.f is %.1f percent'%(decrease)
Percentage decrease in induced e.m.f is 2.6 percent

Example 6.7 Page no : 58

In [17]:
import math 

#Line PQ for Altermnator 1 and PR for alternaator 2.AB is at frequency x from P where total load is 3000 kW

# Variables
QC = 2000.
PS = 2.5
#PC = x
TR = 2000.
PT = 2.

# Calculations and Results
#using similarity of triangles PAC and PQS
AC_by_PC = (QC/PS)			# because (AC/QC) = (PC/PS)
#using similarity of triangles PCB and PTR
CB_by_PC = (TR/PT) 			# because (CB/TR) = (PC/PT)

AC_by_x = AC_by_PC   			#which implies AC = 12.5*x
CB_by_x = CB_by_PC  			#which implies CB = 16.67*x

AC_plus_CB = 3000.  			#total load at the frequency at P is 30 kW
x =  AC_plus_CB/(AC_by_x + CB_by_x)
AC = AC_by_x * x
CB = CB_by_x * x  
frequency = 50-x
print 'Loads shared by alternator 1 and 2 are %.2f kW and %.2f kW respectively'%(AC,CB)

#construction for max load: RT is extended to cut PQ at X.
QS = 2000.
RT = 2000. 			#see figure
XT = QS*(PT/PS)
RX = RT+XT  			#maximum load

print 'Maximum load is %.0f kW'%(RX)
Loads shared by alternator 1 and 2 are 1333.33 kW and 1666.67 kW respectively
Maximum load is 3600 kW

Example 6.8 Page no : 60

In [18]:
import math 

# Variables
P_out = 1500.*10**3
V_L = 11000.
phi = math.acos(0.8)
I_L = P_out/(math.sqrt(3)*V_L*math.cos(phi))

I_L_actv = I_L*math.cos(phi)   			#wattful or active component of current
I_L_reactive = I_L*math.sin(phi) 			#wattless or reactive component of current

# Calculations and Results
I_each = I_L/2  			#in identical conditions
I_arm1 = 45. 			#given
I_1_reactive = math.sqrt(I_arm1**2-39.364**2 )  			#from the power triangle 
I_2_reactive = 59.046-21.80
I_a_2 = math.sqrt( 39.364**2 + I_2_reactive**2 )  			#required armature current of 2nd alternator
print 'Required armature current of second alternator is %.4f A'%(I_a_2)
#power factors of 2 machines
cos_phi1 = 39.364/45 
cos_phi2 = 39.364/54.1921

print 'Power factors are %.4f lagging and %.4f lagging'%(cos_phi1,cos_phi2)
Required armature current of second alternator is 54.1921 A
Power factors are 0.8748 lagging and 0.7264 lagging

Example 6.9 Page no : 61

In [19]:
import math 

#Line AB for Altermnator 1 and AC for alternator 2.AF is at frequency x measured from A where total load is 3000 kW
# Variables
BO = 2000.
AO = 5.			#AF = x
DC = 2000.
AD = 3.
#AF = x

# Calculations
#using similarity of triangles AEF and ABO
EF_by_AF = (BO/AO)			# because (EF/BO) = (AF/AO)
#using similarity of triangles AFG and ADC
FG_by_AF = (DC/AD) 			#because (FG/DC) = (AF/AD)

EF_by_x = EF_by_AF   			#which implies EF = 400*x
FG_by_x = FG_by_AF   			#which implies FG = 666.67*x

EF_plus_FG = 3000  			#total load at the frequency at P is 3000 kW
x =  EF_plus_FG/(EF_by_x + FG_by_x)
EF = (BO/AO)*x
FG = (DC/AD)*x  

# Results
print 'Loads shared by machine 1 and 2 are %.0f kW and %.0f kW respectively'%(EF,FG)
Loads shared by machine 1 and 2 are 1125 kW and 1875 kW respectively

Example 6.10 Page no : 63

In [21]:
import math 
import cmath

#note that a new function p2z has been defined below for direct representation of complex numbers in polar form

def  p2z(RRRR,Theeeta):
    return  RRRR*cmath.exp(1j*math.pi*Theeeta/180.);

# Variables
V_l = 6000.
V_ph = V_l/math.sqrt(3)
VA = 2000.*10**3
I_FL = VA/(V_l*math.sqrt(3))
X_s = complex(0,6) 			#synchronous reactance
P = 8.
f = 50.

delta_mech = math.pi/180 			#phase print lacemant in degree mechanical 
#phase print lacemant in degree electrical
delta_elec = delta_mech*(P/2)  			#P/2 is pole pairs(and not poles)

phi = math.acos(math.radians(0.8))
V = p2z(V_ph,phi)
E = V+I_FL*X_s
#E leads I by phasemag(E). V leads I by phasemag(V)

# Calculations and Results
delta = (math.pi/180)* (math.atan(E.imag/E.real)-(math.atan(V.imag/V.real ) ) ) 			#power angle in radians
P_SY = abs(E)*abs(V)*math.cos(delta)*math.sin(delta_elec)/abs(X_s) 			#Synchronising power
P_SY_total = 3*P_SY 			#totla Synchronising power 
print 'Total Synchronising power is %.3f kW'%(10**-3*P_SY_total)

N_s = 120*f/P 			#in rpm
n_s = (N_s)/60 			#in rps
T_SY = P_SY_total/(2*math.pi*n_s)
print 'Synchronising torque is %.0f N-m'%(T_SY)

# note : book answer it seems wrong.
Total Synchronising power is 444.753 kW
Synchronising torque is 5663 N-m

Example 6.11 Page no : 64

In [22]:
import math 
import cmath

#note that a new function p2z has been defined below for direct representation of complex numbers in polar form
def  p2z(RRRR,Theeeta):
    return  RRRR*cmath.exp(1j*math.pi*Theeeta/180.);

# Variables
V_l = 3300.
V_ph = V_l/math.sqrt(3)
VA = 3*10.**6
I_FL = VA/(V_l*math.sqrt(3))
IX_s = (25./100)*V_ph 			#product of I and X_s
X_s = complex(0,IX_s/I_FL) 			#synchronous reactance
N_s = 1000. 			#in rpm
P = 6.
f = 50.

# Calculations and Results
delta_dash_mech = math.pi/180
delta_dash_elec = delta_dash_mech*(P/2)  			#P/2 is pole pairs(and not poles)

I = I_FL
phi = math.acos(math.radians(0.8))
V = p2z(V_ph,phi)
E = V+I*X_s
#E leads I by phasemag(E). V leads I by phasemag(V)

delta = (math.pi/180)* (math.atan(E.imag/E.real)-math.atan(V.imag/V.real) ) 			#power angle in radians
P_SY = abs(E)*abs(V)*math.cos(delta)*math.sin(delta_dash_elec)/abs(X_s) 			#Synchronising power per phase
print 'Synchronising power is %.3f kW'%(10**-3*P_SY)
P_SY_total = 3*P_SY 			#Total Synchronising power

N_s = 120*f/P 			#in rpm
n_s = (N_s)/60 			#in rps
T_SY = P_SY_total/(2*math.pi*n_s)
print 'Synchronising torque is %.0f N-m'%(T_SY)

print 'Answer mismatches due to approximation'
Synchronising power is 217.160 kW
Synchronising torque is 6221 N-m
Answer mismatches due to approximation

Example 6.12 Page no : 65

In [23]:
import math 

# Variables
V_l = 3300.
V_ph = V_l/math.sqrt(3)
VA = 3*10.**6
I_FL = VA/(V_l*math.sqrt(3))
IX_s = (20./100)*V_ph 			#product of I and X_s
X_s = complex(0,IX_s/I_FL) 			#synchronous reactance
N_s = 1000.
P = 6.
f = 50.

delta_dash_mech = math.pi/180 			#phase print lacement in degree mechanical
#phase print lacement in degree electrical
delta_dash_elec = delta_dash_mech*(P/2)  			#P/2 is pole pairs(and not poles)

# Calculations and Results
E = V_ph
Z_s = X_s 			#math.since R = 0
P_SY = abs(E)*abs(V_ph)*delta_dash_elec/abs(Z_s) 			#Synchronising power per phase
print 'Synchronising power is %.3f kW'%(10**-3*P_SY)
P_SY_total = 3*P_SY 			#Total Synchronising power
print '3 phase Synchronising power is %.3f kW'%(10**-3*P_SY_total)

N_s = 120*f/P 			#in rpm
n_s = (N_s)/60 			#in rps
T_SY = P_SY_total/(2*math.pi*n_s)
print 'Synchronising torque is %.0f N-m'%(T_SY)
Synchronising power is 261.799 kW
3 phase Synchronising power is 785.398 kW
Synchronising torque is 7500 N-m

Example 6.13 Page no : 66

In [24]:
import math 

# Variables
V_L = 11.*10**3
V_ph = V_L/math.sqrt(3)
VA = 700.*10**3
I_FL = VA/(math.sqrt(3)*V_L) 			#full load current
IR_a = (1.5/100)*V_ph 			#product of I and R_a
R_a = IR_a/I_FL
IX_s = (14./100)*V_ph 			# product of I and X_s
X_s = IX_s/I_FL 			#synchronous reactance

# Calculations
#at full load and 0.8 pf
I = I_FL
phi = math.acos(0.8)
V_ph = complex(V_ph*math.cos(phi),V_ph*math.sin(phi))  			#just introduced the angle
E_ph = math.sqrt(    (abs(V_ph)*math.cos(phi)+ IR_a)**2+   (abs(V_ph)*math.sin(phi)+ IX_s)**2     )

Poles = 4.
f = 50. 			#poles and frequency
delta = math.asin( (abs(V_ph)*math.sin(phi)+IX_s)/E_ph)  -phi
delta_dash_mech = (math.pi/180) 			#print lacement in degree mechanical
			#print lacement in degree electrical
delta_dash_elec = delta_dash_mech*(Poles/2)
P_SY = abs(E_ph)*abs(V_ph)*math.cos(delta)*math.sin(delta_dash_elec)/X_s   			#Synchronising power per phase 
P_SY_total = 3*P_SY  			#total Synchronising power

ns = 120*f/(60*Poles)  			#in r.p.s
T_SY = P_SY_total/(2*math.pi*ns)   			#Synchronising torque 

# Results
print 'Synchronising power is %.2fkW'%(P_SY_total/1000)
print 'Synchronising torque is %.2f N-m'%(T_SY)
Synchronising power is 191.25kW
Synchronising torque is 1217.53 N-m

Example 6.14 Page no : 68

In [25]:
import math 

# Variables
V_l = 9.*10**3
V_ph = V_l/math.sqrt(3)
VA = 5.5*10**6
I_FL = VA/(V_l*math.sqrt(3))
IX_s = (25./100)*V_ph 			#product of I and X_s
X_s = complex(0,IX_s/I_FL) 			#synchronous reactance
N_s = 1500. 			#in rpm
n_s = N_s/60 			#in rps
f = 50.
P = 120.*f/N_s 			#frequency and pole

# Calculations
delta_dash_mech = math.pi/180 			#print lacemnt in degree mechanical 
#print lacemnt in degree electrical
delta_dash_elec = delta_dash_mech*(P/2)  			#P/2 is pole pairs(and not poles)

E = V_ph
P_SY = abs(E)*abs(V_ph)*delta_dash_elec/abs(X_s) 			#Synchronising power per phase
P_SY_total = 3*P_SY 			#Total Synchronising power

T_SY = P_SY_total/(2*math.pi*n_s)

# Results
print 'Synchronising torque is %.2f N-m'%(T_SY)
print 'Answer mismatches due to approximation'
Synchronising torque is 4888.89 N-m
Answer mismatches due to approximation

Example 6.15 Page no : 69

In [27]:
import math 

# Variables
V_L = 6.*10**3
V_ph = V_L/math.sqrt(3)
VA = 2000.*10**3
I_FL = VA/(math.sqrt(3)*V_L)  
I = I_FL

# Calculations
X_s = 1.2
R_a = 0.01 			#both per unit
IR_a = (1/100)*V_ph 			#product of I and R_a
R_a = IR_a/I_FL
IX_s = (120/100)*V_ph 			#product of I and X_s
#IX_s = (12/100)*V_ph   			# this is the mistake made in the textbook
X_s = IX_s/I_FL

#at full load and 0.8 pf
phi = math.acos(0.8)
#V_ph = complex(V_ph*math.cos(phi)V_ph*math.sin(phi))  			#just introduced the angle
E_ph = math.sqrt(    (abs(V_ph)*math.cos(phi)+ IR_a)**2+   (abs(V_ph)*math.sin(phi)+ IX_s)**2     )
Poles = 8
f = 50

delta = math.asin( (abs(V_ph)*math.sin(phi)+IX_s)/E_ph)  -phi
delta_dash_mech = (math.pi/180) 			#print lacemnt in degree mechanical 
#print lacemnt in degree electrical
delta_dash_elec = delta_dash_mech*(Poles/2)
P_SY = abs(E_ph)*abs(V_ph)*math.cos(delta)*math.sin(delta_dash_elec)/X_s   			#Synchronising power per phase
P_SY_total = 3*P_SY  			#total Synchronising power

ns = 120*f/(60*Poles)  			#in r.p.s
T_SY = P_SY_total/(2*math.pi*ns)   			#Synchronising torque 

# Results
print 'Synchronising power is %.2f kW'%(P_SY_total/1000)
print 'Synchronising torque is %.2f N-m'%(T_SY)

print 'Note that answer obtained doesnt match with textbook due to the following reasons: \
\niIX_s is considered wrong in textbook.It should have been 4156.92instead of 415.692  To verify this use commented statement of IX_s line 13and notice that it matches with textbook ans then' 
Synchronising power is 223.22 kW
Synchronising torque is 2960.56 N-m
Note that answer obtained doesnt match with textbook due to the following reasons: 
iIX_s is considered wrong in textbook.It should have been 4156.92instead of 415.692  To verify this use commented statement of IX_s line 13and notice that it matches with textbook ans then

Example 6.16 Page no : 71

In [28]:
import math 

# Variables
E = 11.*10**3/math.sqrt(3)
I_sc = 1000.
Pole = 2.
f = 50.
delta_dash_mech = 1*math.pi/180 			#print lacemnt in degree mechanical 

# Calculations
#print lacemnt in degree electrical 
delta_dash_elec = delta_dash_mech*(Pole/2)
P_SY = E*I_sc*delta_dash_mech 			#Synchronising power per phase
P_SY_total = P_SY*3 			#total Synchronising power

ns = 120*f/(60*Pole)  			#in r.p.s
T_SY = P_SY_total/(2*math.pi*ns)   			#Synchronising torque 

# Results
print 'Synchronising power is %.2f kW'%(P_SY_total/1000)
print 'Synchronising torque is %.2f N-m'%(T_SY)
Synchronising power is 332.53 kW
Synchronising torque is 1058.48 N-m

Example 6.17 Page no : 72

In [29]:
import math 

#Line PQ for Altermnator 1 and PR for alternaator 2.AB is at frequency x from P where total load is 30 MW
# Variables
QT = 25.
PT = 2.
#PC = x
SR = 25.
PS = 1.5

# Calculations
#using similarity of triangles PAC and PQT
AC_by_PC = (QT/PT)			# because (AC/QT) = (PC/PT)
#using similarity of triangles PCB and PSR
CB_by_PC = (SR/PS)

AC_by_x = AC_by_PC   			#which implies AC = 12.5*x
CB_by_x = CB_by_PC  			#which implies CB = 16.67*x

AC_plus_CB = 30  			#total load at the frequency at P is 30 MW
x =  AC_plus_CB/(AC_by_x + CB_by_x)
AC = 12.5*x
CB = 16.67*x  
frequency = 50-x

# Results
print 'Loads shared by alternator 1 and 2 are %.2f MW and %.2f MW respectively'%(AC,CB)
Loads shared by alternator 1 and 2 are 12.86 MW and 17.15 MW respectively

Example 6.18 Page no : 73

In [30]:
import math 
import cmath

#note that a new function p2z has been defined below for direct representation of complex numbers in polar form
def  p2z(RRRR,Theeeta):
    return  RRRR*cmath.exp(1j*math.pi*Theeeta/180.);

# Variables
load_total = 1600.*10**3
pf = 1/math.sqrt(2)  			#lag
V_L = 6600.

# Calculations
I_L = p2z(load_total/(math.sqrt(3)*V_L*pf),-1*math.acos(math.radians(pf)) )
I_1 = p2z(90,-1*math.acos(math.radians(0.8)))
I_2 = I_L-I_1
phi = abs(math.atan(I_2.imag/I_2.real))
I_a = abs(I_2)
R_a = 1.05
X_s = 5 			#resistance and synchronous reactance per phase
V_ph = V_L/math.sqrt(3)
E_ph = math.sqrt(  (V_ph*math.cos(phi)+I_a*R_a )**2 + ( V_ph*math.sin(phi)+I_a*X_s )**2        )
E_line = math.sqrt(3)*E_ph

# Results
print 'Excitation of second alternator is %.2f V '%(E_line)
print ' The corresponding field current from the graph is about 310 A'
print 'Note: The answer obtained will differ from textbook answer because of higher degree of accuracy while storing I_2 and the improper rounding off of I_2 in the textbook'
Excitation of second alternator is 6884.65 V 
 The corresponding field current from the graph is about 310 A
Note: The answer obtained will differ from textbook answer because of higher degree of accuracy while storing I_2 and the improper rounding off of I_2 in the textbook

Example 6.19 Page no : 75

In [33]:
import math 

# Variables
V_L = 10.*10**3
V_ph = V_L/math.sqrt(3)
VA = 5.*10**6
I_FL = VA/(math.sqrt(3)*V_L) 			#full-load current
IX_s = (20./100)*V_ph 			#product of I and X_s
X_s = IX_s/I_FL 			#synchronous reactance
P = 4.

# Calculations
delta_dash_mech = 1*(math.pi/180) 			#print lacement in degree mechanical 
#print lacement in degree electrical
delta_dash_elec = delta_dash_mech*(P/2)
E = V_ph  			#at no load
P_SY =  delta_dash_elec*E**2/X_s  			#Synchronising power per phase
P_SY_total = P_SY*3  			#Total Synchronising power

# Results
print 'Synchronising power per phase is %.2fkW \
\nTotal Synchronising power is %.2fkW '%(P_SY/1000,P_SY_total/1000)
Synchronising power per phase is 290.89kW 
Total Synchronising power is 872.66kW 

Example 6.20 Page no : 76

In [34]:
import math 

# Variables
Power_total = 1.414 			#per unit
V_L = 1. 			#per unit
phi_t = math.acos(0.707)
I_L_T = Power_total/(math.sqrt(3)*V_L*math.cos(phi_t))  			#Total current

# Calculations
#Current supplied by each alternator
I_1 = I_L_T/2
I_2 = I_1
V_ph = V_L/math.sqrt(3)

phi = math.acos(0.707)
R_a = 0
X_s = 0.6 			#resistacne and synchronous reactance
E_ph = math.sqrt(  (V_ph*math.cos(phi)+ I_1*R_a)**2 + (V_ph*math.sin(phi)+I_1*X_s)**2          )
delta =  math.atan((I_1*X_s+V_ph*math.sin(phi)) / (V_ph*math.cos(phi))) - phi    			#power angle

# Results
print 'EMF is %.4f p.u. and power angle is %.2f degrees '%(E_ph,delta*180/math.pi)
print 'Following assumptions were made :'
print '1.Terminal or bus bar voltage at ppoint of connection is constant'
print '2.The alternators are identical and are initially equally excited'
print '3.The power supplied by prime movers is adjusted so that each machine carries half the load represented by external impedance Z = R+ j 2pifL %( where R and L are constant'
print '4.The stator resistance is negligible'
EMF is 0.8580 p.u. and power angle is 16.58 degrees 
Following assumptions were made :
1.Terminal or bus bar voltage at ppoint of connection is constant
2.The alternators are identical and are initially equally excited
3.The power supplied by prime movers is adjusted so that each machine carries half the load represented by external impedance Z = R+ j 2pifL %( where R and L are constant
4.The stator resistance is negligible

Example 6.21 Page no : 77

In [37]:
import math 

# Variables
V_l = 480.
X_d = 0.1
X_q = 0.075
R_a = 0. 			#armature resistance and synchronous reactance of direct quadrature axis
I_l = 1200.
I_ph = I_l/math.sqrt(3)
V_ph = V_l
V_t = V_l
I_a = I_ph

# Calculations
phi = math.acos(0.8)
psi = math.atan(  (V_t*math.sin(phi)+I_a*X_q)/(V_t*math.cos(phi)+I_a*R_a)            )
delta = psi-phi 

I_d = I_a*math.sin(psi)
I_q = I_a*math.cos(psi)
E_f = V_t*math.cos(delta)+I_d*X_d+I_q*R_a

# Results
print 'Excitation e.m.f is %.f V '%(E_f)

# note : rounding off error.
Excitation e.m.f is 524 V 

Example 6.22 Page no : 78

In [38]:
import math 

# Variables
VA = 3.5*10**6
P = 32.        			#Poles
Power = 2.5*10**6 			#In watts
V_l = 6.6*10**3
phi = math.acos(0.8)
I_l = Power/(V_l*math.cos(phi)*math.sqrt(3))
X_d = 9.6
X_q = 6.
R_a = 0. 			#armature resistance and synchronous reactance of direct quadrature axis

# Calculations
V_t = V_l/math.sqrt(3)
psi = math.atan(  (V_t*math.sin(phi)+I_l*X_q)/(V_t*math.cos(phi)+I_l*R_a)            )
delta = psi-phi
I_s = I_l
I_d = I_s*math.sin(psi)
I_q = I_s*math.cos(psi)
E_f = V_t*math.cos(delta)+I_d*X_d+I_q*R_a
regulation = 100*(E_f-V_t)/V_t

# Results
print 'percentage regulation is %.2f percent'%(regulation)
print 'Excitation emf =  %.0f V'%(E_f)
percentage regulation is 50.85 percent
Excitation emf =  5748 V

Example 6.23 Page no : 79

In [39]:
import math 

# Variables
X_d = 7.6
X_q = 4.5
R_a = 0.15 			#armature resistance and synchronous reactance of directquadrature 
axisV_l = 13.8*10**3
V_l = 13.8*10**3
V_t = V_l/math.sqrt(3)
phi = math.acos(0.8)
VA = 25*10**6
I_a = VA/(math.sqrt(3)*V_l)
psi = math.atan(  (V_t*math.cos(phi)+I_a*X_q)/(V_t*math.sin(phi)+I_a*R_a)            )

# Calculations
delta = psi-phi
I_s = I_a
I_d = I_s*math.sin(psi)
I_q = I_s*math.cos(psi)

E_f = V_t*math.cos(delta)+I_d*X_d+I_q*R_a
regulation = 100*(E_f-V_t)/V_t

# Results
print 'percentage regulation is %.2f percent'%(regulation)
percentage regulation is 79.30 percent

Example 6.24 Page no : 80

In [40]:
import math 

# Variables
X_d = 1.
X_q = 0.6
R_a = 0. 			#armature resistance and synchronous reactance of direct quadrature axis
phi = math.acos(0.8) 			#lag
V_t = 1.
I_a = 1. 			#full load
psi = math.atan(  (V_t*math.sin(phi)+I_a*X_q)/(V_t*math.cos(phi)+I_a*R_a)            )

# Calculations
delta = psi-phi
I_s = I_a
I_d = I_a*math.sin(psi)
I_q = I_a*math.cos(psi)

E_f = V_t*math.cos(delta)+I_d*X_d+I_q*R_a
regulation = 100*(E_f-V_t)/V_t

# Results
print 'percentage regulation is %.2f percent'%(regulation)
percentage regulation is 77.50 percent

Example 6.25 Page no : 81

In [53]:
import math 

# Variables
I_a = 10.
phi = 20. 			#lag and degrees
V_t = 400.
X_d = 10.
X_q = 6.5
R_a = 0. 			#armature resistance and synchronous reactance of direct quadrature axis

# Calculations
psi = math.atan((V_t*math.sin(math.radians(phi))+I_a*X_q)/(V_t*math.cos(math.radians(phi))+I_a*R_a))
delta = math.degrees(psi)-phi
I_d = math.degrees(I_a*math.sin(math.radians(psi)))
I_q = (I_a*math.cos(psi))

# Results
print 'Load angle is %.2f degrees '%(delta)
print 'I_d and I_q are %.4f A and %.4f A respectively '%(I_d,I_q  )

# note : rounding off error.
Load angle is 8.23 degrees 
I_d and I_q are 4.9272 A and 8.8105 A respectively 

Example 6.26 Page no : 81

In [55]:
import math 

X_d = 0.8
X_q = 0.5
R_a = 0.02 			#armature resistance and synchronous reactance of direct quadrature axis

			#case(i)  lag
phi = math.acos(0.8)
V_t = 1
I_a = 1			#full-load
psi = math.atan(  (V_t*math.sin(phi)+I_a*X_q)/(V_t*math.cos(phi)+I_a*R_a)            )
delta = psi-phi

I_d = I_a*math.sin(psi)
I_q = I_a*math.cos(psi)

E_f = V_t*math.cos(delta)+I_d*X_d+I_q*R_a
regulation = 100*(E_f-V_t)/V_t
print 'percentage regulation at 0.8 pf lag is %.2f percent'%(regulation)

			#case(ii)  lead
phi2 = -1*math.acos(0.8) 			#minus sign because of leading pf
psi2 = math.atan(  (V_t*math.sin(phi2)+I_a*X_q)/(V_t*math.cos(phi2)+I_a*R_a)            )
delta2 = psi2-phi2

I_d2 = I_a*math.sin(psi2)
I_q2 = I_a*math.cos(psi2)

E_f2 = V_t*math.cos(delta2)+I_d2*X_d+I_q2*R_a
regulation2 = 100*(E_f2-V_t)/V_t
print 'percentage regulation at 0.8 pf lead is %.f percent'%(regulation2)
percentage regulation at 0.8 pf lag is 61.25 percent
percentage regulation at 0.8 pf lead is -21 percent

Example 6.27 Page no : 83

In [2]:
import math 
from numpy import array,tan,arccos

# Variables
kW = array([800,500,1000,600])
cosphi = array([1,0.9,0.8,0.9])
tanphi = tan(arccos(cosphi))
kVAR = kW*tanphi

# Calculations
kW_total = kW[0]+kW[1]+kW[2]+kW[3]
kVAR_total = kVAR[0]+kVAR[1]+kVAR[2]+-1*kVAR[3] 			#4th case is leading 

phi_c = math.atan(kVAR_total/kW_total)  			#total power factor angle
phi_1 = math.acos(0.95)			#pf of machine 1
kW_1 = 1000 			#active component of machine 1
kVAR_1 = kW_1*math.tan(phi_1) 			#reactive component of machine 1
kW_2 = kW_total - kW_1 			#active component of machine 1
kVAR_2 = kVAR_total-kVAR_1 			#reactive component of machine 2

phi_2 = math.atan(kVAR_2/kW_2) 
pf_2 = math.cos(phi_2) 			#power factor of machine 2

# Results
print 'Output of second alternator =  %.0f kW'%(kW_2)
print 'power factor of machine 2  =  %.2f and lagging'%(pf_2)
Output of second alternator =  1900 kW
power factor of machine 2  =  0.98 and lagging

Example 6.28 Page no : 84

In [3]:
import math 
from numpy import array,tan,arccos

# Variables
kW = array([250,300,150])
cosphi = array([0.9,0.75,0.8]) 			#all lagging
tanphi = tan(arccos(cosphi))
kVAR = kW*tanphi

# Calculations
kW_total = kW[0]+kW[1]+kW[2]
kVAR_total = kVAR[0]+kVAR[1]+kVAR[2] 

phi_1 = math.acos(0.8)			#pf of machine 1
kW_1 = 100 			#active component of machine 1
kVAR_1 = kW_1*math.tan(phi_1) 			#reactive component of machine 1
kW_2 = kW_total - kW_1 			#active component of machine 1
kVAR_2 = kVAR_total-kVAR_1 			#reactive component of machine 2
phi_2 = math.atan(kVAR_2/kW_2) 
pf_2 = math.cos(phi_2) 			#power factor of machine 2

# Results
print 'Output of second alternator =  %.0f kW'%(kW_2)
print 'power factor of machine 2  =  %.4f and lagging'%(pf_2)
Output of second alternator =  600 kW
power factor of machine 2  =  0.8172 and lagging

Example 6.29 Page no : 85

In [58]:
import math 

# Variables
V_L = 6.6*10**3
V_ph = V_L/math.sqrt(3)
V_t = V_ph
X_d = 9.6
X_q = 6.
R_a = 0. 			#armature resistance and synchronous reactance of direct quadrature axis
VA = 3.5*10**6
I_L = VA/(math.sqrt(3)*V_L)

# Calculations
P = 2.5*10**6
phi = math.acos(0.8)
I_a = P/(math.sqrt(3)*V_L*math.cos(phi))
psi = math.atan(  (V_t*math.sin(phi)+ I_a*X_q)/(V_t*math.cos(phi)+ I_a*R_a)     )

delta = psi-phi
I_d = I_a*math.sin(psi)
I_q = I_a*math.cos(phi)

E_f = V_t*math.cos(delta)+I_d*X_d+I_q*R_a
regulation = 100*(E_f-V_t)/V_t
P_max = (V_ph**2/2)*((X_d-X_q)/(X_d*X_q))*(math.sin(2*delta))

# Results
print 'percentage voltage regulation is %.2f percent'%(regulation)
print 'Power under open circuit is %.1f kW per phase'%(P_max/1000)
percentage voltage regulation is 50.85 percent
Power under open circuit is 231.1 kW per phase

Example 6.30 Page no : 86

In [60]:
import math 

# Variables
V_L = 3.3*10**3
V_ph = V_L/math.sqrt(3)
VA = 3.*10**6
I_FL = VA/(math.sqrt(3)*V_L)
IX_s = (25./100)*V_ph 			#product of I and X_s
X_s = complex(0,IX_s/I_FL)
N_s = 1000 			#in r.p.m


# Calculations
Poles = 6.
f = 50.
delta_dash_mech = (math.pi/180) 			#print lacement in degree mechanical
#print lacement in degree electrical
delta_dash_elec = delta_dash_mech*(Poles/2)

I = I_FL
phi = math.acos(0.8)
V = complex(V_ph*math.cos(phi),V_ph*math.sin(phi))
E =  V+ I*X_s

delta = (math.pi/180)*math.atan(E.imag/E.real)-phi   			#E leads I by (math.pi/180)*phasemag(E) and V leads I by phi radians 
P_SY = abs(E)*abs(V_ph)*math.cos(delta)*math.sin(delta_dash_elec)/abs(X_s)   			#Synchronising power per phase 
P_SY_total = 3*P_SY  			#total Synchronising power

ns = 120*f/(60*Poles)  			#in r.p.m
T_SY = P_SY_total/(2*math.pi*ns)   			#Synchronising torque 

# Results
print 'Synchronising power per phase is %.3f kW'%(P_SY/1000)
print 'Synchronising torque is %.0f N-m'%(T_SY)
print 'Answer mismatches due to improper approximation'
Synchronising power per phase is 197.555 kW
Synchronising torque is 5660 N-m
Answer mismatches due to improper approximation

Example 6.31 Page no : 87

In [61]:
import math 

# Variables
V_L = 3.3*10**3
V_ph = V_L/math.sqrt(3)
VA = 3.*10**6
I_FL = VA/(math.sqrt(3)*V_L)
IX_s = (20./100)*V_ph 			#product of I and X_s
X_s = complex(0,IX_s/I_FL)
N_s = 1000. 			#in r.p.m
Poles = 6.
f = 50.

# Calculations
delta_dash_mech = (math.pi/180) 			#print lacement in degree mechanical
#print lacement in degree electrical 
delta_dash_elec = delta_dash_mech*(Poles/2)

#E = V as the alternator is on no-load and X_s = Z_s
P_SY = abs(V_ph)**2*(delta_dash_elec)/abs(X_s)   			#Synchronising power per phase
P_SY_total = 3*P_SY  			#total Synchronising power

ns = 120*f/(60*Poles)  			#in r.p.s
T_SY = P_SY_total/(2*math.pi*ns)   			#Synchronising torque 

# Results
print 'Synchronising power per phase is %.3f kW'%(P_SY/1000)
print 'Total Synchronising power is %.3f kW'%(P_SY_total/1000)
print 'Synchronising torque is %.0f N-m'%(T_SY)
Synchronising power per phase is 261.799 kW
Total Synchronising power is 785.398 kW
Synchronising torque is 7500 N-m

Example 6.32 Page no : 88

In [62]:
import math 

# Variables
V_L = 11.*10**3
V_ph = V_L/math.sqrt(3)
VA = 700.*10**3
I_FL = VA/(math.sqrt(3)*V_L)
IX_s = (14./100)*V_ph 			#product of I and X_s
X_s = IX_s/I_FL
#X_s = complex(0,IX_s/I_FL)
IR_a = (1.5/100)*V_ph 			#product of I and R_a
R_a = IR_a/I_FL


# Calculations
I = I_FL
phi = math.acos(0.8)
V = complex(V_ph*math.cos(phi),V_ph*math.sin(phi))
E_ph = math.sqrt(  (V_ph*math.cos(phi)+IR_a)**2 +(V_ph*math.sin(phi)+IX_s)**2    )
delta = math.asin((V_ph*math.sin(phi)+IX_s)/E_ph)   -phi

Poles = 4.
f = 50.
delta_dash_mech = (math.pi/180) 			#phase print lacemnt in degree mechanical
delta_dash_elec = delta_dash_mech*(Poles/2)			#phase print lacemnt in degree electrical

P_SY = abs(V_ph)*abs(E_ph)*math.cos(delta)*math.sin(delta_dash_elec)/abs(X_s)   			#Synchronising power per phase
P_SY_total = 3*P_SY  			#total Synchronising power

ns = 120*f/(60*Poles)  			#in r.p.s
T_SY = P_SY_total/(2*math.pi*ns)   			#Synchronising torque 

# Results
print 'Synchronising power per phase is %.3f kW'%(P_SY/1000)
print 'Synchronising power is %.3f kW ; '%(P_SY/1000)
print 'Total Synchronising power is %.3f kW'%(P_SY_total/1000)
print 'Synchronising torque is %.2f N-m'%(T_SY)
Synchronising power per phase is 63.750 kW
Synchronising power is 63.750 kW ; 
Total Synchronising power is 191.249 kW
Synchronising torque is 1217.53 N-m

Example 6.33 Page no : 91

In [65]:
import math 
import cmath

#note that a new function p2z has been defined below for direct representation of complex numbers in polar form
def  p2z(RRRR,Theeeta):
    return  RRRR*cmath.exp(1j*math.pi*Theeeta/180.);

# Variables
Z1 = complex(0,2)
Z2 = complex(0,3)
Z = 6.
E1 = p2z(230,0)
E2 = p2z(230,10)

# Calculations
I1 = ((E1-E2)*Z+E1*Z2)/(Z*(Z1+Z2)+Z1*Z2)
I2 = ((E2-E1)*Z+E2*Z1)/(Z*(Z1+Z2)+Z1*Z2)

phi1 = math.atan(I1.imag/I1.real)  			#Phasemag returns the angle of complex number in degrees
phi2 = math.atan(I2.imag/I2.real)  			#Phasemag returns the angle of complex number in degrees

I = I1+I2
V = I*Z 			#Terminal voltage

# Results
print 'i) Terminal voltage is %.2f volts at %.1f degrees'%(abs(V),math.degrees(math.atan(V.imag/V.real)))
print 'ii) Currents are %.2f A at %.0f degrees and %.2f A at %.2f degrees     \
\nTotal current is %.2f A at %.1f degrees  '%(abs(I1),math.degrees(math.atan(I1.imag/I1.real)),abs(I2),\
                                              math.degrees(math.atan(I2.imag/I2.real)),abs(I) \
                                              ,math.degrees(math.atan(I.imag/I.real)))

P1 = abs(V)*abs(I1)*math.cos(math.radians(phi1))
P2 = abs(V)*abs(I2)*math.cos(math.radians(phi2))
print 'iii)Power delivered %.2f watts and  %.2f watts'%(P1,P2)

# note : rounding off error. kindly check the calculations
i) Terminal voltage is 224.71 volts at -7.3 degrees
ii) Currents are 14.74 A at -14 degrees and 22.88 A at -3.03 degrees     
Total current is 37.45 A at -7.3 degrees  
iii)Power delivered 3311.43 watts and  5141.03 watts

Example 6.34 Page no : 91

In [66]:
import math 

# Variables
X_d = 0.8
X_q = 0.5  			#both per unit
R_a = 0. 			#assumed
phi = math.acos(0.8)
V_t = 1.			#pu
I_a = 1. 			#full-load

# Calculations
psi = math.atan(  (V_t*math.sin(phi)+I_a*X_q)/(V_t*math.cos(phi)+I_a*R_a)            )
delta = psi-phi
I_d = I_a*math.sin(psi)
I_q = I_a*math.cos(psi)
E_f = V_t*math.cos(delta)+I_d*X_d+I_q*R_a

# Results
print 'Open circuit voltage is %.3f p.u.'%(E_f)
Open circuit voltage is 1.603 p.u.

Example 6.35 Page no : 92

In [4]:
import math 
from numpy import array,tan,arccos

# Variables
V_L = 6600.
I_L = 110.
phi_1 = math.acos(0.9) 			#lagging
kW = array([400,1000,400,300])*10**3
cosphi = array([1,0.71,0.8,0.9])
tanphi = tan(arccos(cosphi))
kVAR = kW*tanphi

# Calculations
kW_total = kW[0]+kW[1]+kW[2]+kW[3]
kVAR_total = kVAR[0]+kVAR[1]+kVAR[2]+kVAR[3]

phi_c = math.atan(kVAR_total/kW_total)  			#total power factor angle
load_1 = math.sqrt(3)*V_L*I_L*math.cos(phi_1)

kW_1 = load_1 			#active component of machine 1
kVAR_1 = kW_1*math.tan(phi_1) 			#reactive component of machine 1
kW_2 = kW_total - kW_1 			#active component of machine 1
kVAR_2 = kVAR_total-kVAR_1 			#reactive component of machine 2

phi_2 = math.atan(kVAR_2/kW_2) 
pf_2 = math.cos(phi_2) 			#power factor of machine 2

# Results
print 'Output of second alternator =  %.2f kW'%(kW_2/1000)
print 'Power factor of machine 2  =  %.4f and lagging'%(pf_2)
Output of second alternator =  968.28 kW
Power factor of machine 2  =  0.7366 and lagging

Example 6.36 Page no : 93

In [68]:
import math 

# Variables
V_L = 11000.
V_ph = V_L/math.sqrt(3)
VA = 2.*10**6
phi = math.acos(0.8)
I_FL = VA/(math.sqrt(3)*V_L)
phi_1 = math.acos(0.8)
IX_s = (20./100)*V_ph 			#product of I and X_s

# Calculations
X_s = IX_s/I_FL
I_1 = I_FL
BC = I_1*math.cos(phi_1)*X_s
AB = I_1*math.sin(phi_1)*X_s    
OA = V_ph
OC = math.sqrt( (OA+AB)**2+(BC)**2 ) 
E_1 = OC
E_2 = 1.25*E_1
OE = E_2
DE = BC
AD = math.sqrt(OE**2-DE**2) -OA           			#because OE = math.sqrt( (OA+AD)**2 + (DE)**2  )

I_2sinphi2 = AD/X_s
I_2cosphi2 = I_1*math.cos(phi)
I_2 = math.sqrt( (I_2cosphi2)**2 + (I_2sinphi2)**2  )
phi2 = math.atan( I_2sinphi2/ I_2cosphi2 )
new_pf = math.cos(phi2)

# Results
print 'Machine current is %.2f A '%(I_2)
print 'Power factor is  %.4f lagging'%(new_pf)
Machine current is 228.62 A 
Power factor is  0.3673 lagging

Example 6.37 Page no : 95

In [73]:
import math 

#note that a new function p2z has been defined below for direct representation of complex numbers in polar form
def  p2z(RRRR,Theeeta):
    return  RRRR*exp(1j*math.pi*Theeeta/180.);


# Variables
P_out = 3000.*10**3
V_L = 6.6*10**3
V_ph = V_L/math.sqrt(3)
phi = math.acos(0.8)
I_L = p2z(P_out/(math.sqrt(3)*V_L*math.cos(phi)),-1*(180/math.pi)*phi)

# Calculations
P_out1 = P_out/2
I_L1 = 150  			#given
phi_L1 = math.acos(    P_out1/(math.sqrt(3)*V_L*I_L1)  )
I_L1 = p2z(I_L1,-1*(180/math.pi)*phi_L1)

I_L2 = I_L-I_L1
pf_2 = math.cos(math.atan(I_L2.imag/I_L2.real))
Z_1 = complex(0.5,10)
I_1 = I_L1
E_1 = V_ph + I_1*Z_1
delta_1 =  math.atan(E_1.imag/E_1.real)   			#load angle of alternator 1
E_1L = math.sqrt(3)*E_1

Z_2 = complex(0.4,12)
I_2 = I_L2
E_2 = V_ph + I_2*Z_2
delta_2 = (math.pi/180)*math.atan(E_2.imag/E_2.real)    			#load angle of alternator 2

# Results
print 'Part i) Currents are %.0f A at %.1f degrees and %.1f A at %.1f degrees\nTotal current is %.0f at %.2f' %(abs(I_L1),\
                            math.degrees(math.atan(I_L1.imag/I_L1.real)),abs(I_L2),\
                            math.degrees(math.atan(I_L2.imag/I_L2.real)),abs(I_L),math.degrees(math.atan(I_L.imag/I_L.real)))
print 'Part ii)Power factor is %.4f and lagging'%(math.cos(phi_L1))
print 'Part iii)emf are %.2f V at %.2f degrees and %.4f V at %.0f degrees'%(abs(E_1),\
                            math.degrees(math.atan(E_1.imag/E_1.real)),abs(E_2),math.degrees(math.atan(E_2.imag/E_2.real)))
print 'Part iv)Power angles are %.2f degrees and %.0f degrees '%(180/math.pi*delta_1,(180/math.pi)*delta_2)

# note : rounding off error. kindly check the calculations
Part i) Currents are 150 A at -29.0 degrees and 180.6 A at -43.4 degrees
Total current is 328 at -36.87
Part ii)Power factor is 0.8748 and lagging
Part iii)emf are 4776.46 V at 15.49 degrees and 5565.7081 V at 16 degrees
Part iv)Power angles are 15.49 degrees and 0 degrees 

Example 6.38 Page no : 97

In [74]:
import math 

# Variables
Z1 = complex(0.2,2)
Z2 = Z1
ZL = complex(3,4)
Z = ZL
E1 = complex(2000,0)
E2 = complex(2200,100)

# Calculations
I1 = ((E1-E2)*Z+E1*Z2)/(Z*(Z1+Z2)+Z1*Z2)
I2 = ((E2-E1)*Z+E2*Z1)/(Z*(Z1+Z2)+Z1*Z2)

IL = I1+I2
V = IL*Z 			#Terminal voltage

phi1 = math.atan(V.imag/V.real)-math.atan(I1.imag/I1.real)  			#Phasemag returns the angle of complex number in degrees
phi2 = math.atan(V.imag/V.real)-math.atan(I2.imag/I2.real)  			#Phasemag returns the angle of complex number in degrees

Pout1 = math.sqrt(3)*math.sqrt(3)*abs(V)*abs(I1)*math.cos(math.radians(phi1))
Pout2 = math.sqrt(3)*math.sqrt(3)*abs(V)*abs(I2)*math.cos(math.radians(phi2))

# Results
print 'Power delivered is %.2f kW and %.2f kW at power-factors %.4f lag and %.4f lag respectively'%(Pout1/1000,Pout2/1000,math.cos(math.radians(phi1)),math.cos(math.radians(phi2)))
Power delivered is 658.24 kW and 1253.92 kW at power-factors 0.9999 lag and 0.9999 lag respectively

Example 6.39 Page no : 99

In [76]:
import math 

# Variables
f = 50.
P = 12.
V_L = 6600.
V_ph = V_L/math.sqrt(3)
VA = 2000.*10**3
I_FL = VA/(math.sqrt(3)*V_L)

# Calculations
IX_s = (25./100)*V_ph 			#product of I and X_s
X_s = complex(0,IX_s/I_FL)
N_s = 12*f/P 			#in rpm
delta_dash_mech = (math.pi/180) 			#phase print lacemnt in degree mechanical
delta_dash_elec = delta_dash_mech*(P/2) 			#phase print lacemnt in degree electrical

phi = math.acos(0.8) 			#lag
I = complex(I_FL*math.cos(-1*phi),I_FL*math.sin(-1*phi))
V = V_ph
E = V + I*X_s
delta = math.atan(E.imag/E.real)*(math.pi/180)
P_SY = abs(E)*abs(V)*math.cos(delta)*math.sin(delta_dash_elec)/abs(X_s)
P_SY_total = 3*P_SY

# Results
print 'Synchronising power is %.2f kW'%(P_SY/1000)
print 'Total Synchronising power is %.2f kW'%(P_SY_total/1000)

# note : rounding off error. kindly check.
Synchronising power is 325.36 kW
Total Synchronising power is 976.09 kW

Example 6.40 Page no : 101

In [77]:
import math 

# Variables
V_L = 22000.
V_ph = V_L/math.sqrt(3)
power = 230.*10**6
phi = math.acos(1.)
I_FL = power/(math.sqrt(3)*V_L*math.cos(phi))
I_1 = I_FL
X_s = 1.2

# Calculations
E_1 = math.sqrt( V_ph**2 + (I_1*X_s)**2 )
E_2 = 1.3*E_1
AC =   math.sqrt( E_2**2-(I_1*X_s)**2  )   -V_ph     			# because E**2 = (V_ph+AC)**2+(I_1*X_s)**2
I2X_S = AC

I_2cosphi2 = I_1  			#because phi_2 = math.acos(I_1/I_2) 			#from ACD
I_2sinphi2 = AC/X_s
I_2 = math.sqrt( (I_2cosphi2)**2 + (I_2sinphi2)**2  )
phi2 = math.atan( I_2sinphi2/ I_2cosphi2 )
new_pf = math.cos(phi2)

# Results
print 'Machine current is %.2f A '%(I_2)
print 'Power factor is  %.4f and lagging'%(new_pf)
Machine current is 7274.58 A 
Power factor is  0.8297 and lagging

Example 6.41 Page no : 102

In [81]:
import math 
import cmath

#note that a new function p2z has been defined below for direct representation of complex numbers in polar form
def  p2z(RRRR,Theeeta):
	return RRRR*cmath.exp(1j*math.pi*Theeeta/180.);

# Variables
P_out = 1500.*10**3
V_L = 3.3*10**3
phi = math.acos(0.8)
I_L = p2z(P_out/(math.sqrt(3)*V_L*math.cos(phi)),-1*math.acos(math.radians(0.8)))

I_L1_magnitude = 150.  			#given
P_out1 = (3.*10**6)/2 			#because load is EQUALLY shared between 2 alternators
pf_L1 = P_out1/(math.sqrt(3)*2*V_L*I_L1_magnitude)  			#operating pf of alternator 1
phi1 = math.acos(math.radians(pf_L1))
I_L1 = p2z(I_L1_magnitude,-1*phi1)
I_L2 = I_L-I_L1   			#because I_L = I_L1 + I_L2
pf_L2 = math.cos(math.atan(I_L2.imag/I_L2.real))

# Calculations
V_ph = 6.6*10**3/math.sqrt(3)
Z_1 = complex(0.5,10)
I_1 = I_L1
E_1 =  V_ph + I_1*Z_1
delta_1 = math.atan(E_1.imag/E_1.real)  			#load angle of alternator 1
I_2 = I_L2

Z_2 = complex(0.4,12)
E_2 =  V_ph + I_2*Z_2
delta_2 = math.atan(E_2.imag/E_2.real) 			#load angle of alternator 1

# Results
print 'for machine 1current is %.0f A at %.2f degrees \nPower factor of %.4f laginduced emf \
        of %.2f V \nload angle of %.2f degrees'%(abs(I_L1),math.degrees(math.atan(I_L1.imag/I_L1.real)),pf_L1,abs(E_1),delta_1)
print 'for machine 2current is %.1f A at %.1f degrees\nPower factor of %.4f laginduced emf \
        of %.2f V\nload angle of %.0f degrees'%(abs(I_L2),math.degrees(math.atan(I_L2.imag/I_L2.real)),pf_L2,abs(E_2),math.degrees(delta_2))
for machine 1current is 150 A at -1.56 degrees 
Power factor of 0.8748 laginduced emf         of 4202.06 V 
load angle of 0.36 degrees
for machine 2current is 178.0 A at -1.6 degrees
Power factor of 0.9996 laginduced emf         of 4480.49 V
load angle of 28 degrees

Example 6.42 Page no : 104

In [82]:
import math 

# Variables
V_l = 230
VA = 5*10**3
X_d = 12
X_q = 7
R_a = 0 			#armature resistance and synchronous reactance of direct quadrature axis
phi = math.acos(1)

# Calculations
I_l = VA/(V_l*math.sqrt(3))
V_ph = V_l/math.sqrt(3)
V_t = V_ph
I_a = I_l

psi = math.atan(  (V_t*math.sin(phi)+I_a*X_q)/(V_t*math.cos(phi)+I_a*R_a)            )
delta = psi-phi
I_d = I_a*math.sin(psi)
I_q = I_a*math.cos(psi)
E_f = V_t*math.cos(delta)+I_d*X_d+I_q*R_a

# Results
print 'Excitation voltage is %.3f V '%(E_f)
Excitation voltage is 193.852 V 

Example 6.43 Page no : 104

In [83]:
import math 

# Variables
V_l = 6.6*10**3
V_t = V_l/math.sqrt(3)
X_d = 23.2
X_q = 14.5
R_a = 0. 			#armature resistance and synchronous reactance of direct quadrature axis
VA = 1800.*10**3
phi = math.acos(0.8) 			#lag

# Calculations and Results
I_a = VA/(V_l*math.sqrt(3))

psi = math.atan(  (V_t*math.sin(phi)-I_a*X_q)/(V_t*math.cos(phi)-I_a*R_a)  ) 			#minus sign in numerator and denomenator for motors
delta = psi+phi
I_d = I_a*math.sin(psi)
I_q = I_a*math.cos(psi)
E_f = V_t*math.cos(delta)-I_d*X_d-I_q*R_a
print 'Excitation emf  =  %.4f V'%(E_f)
#P_m =  ( V_t*E_f*math.sin(delta)/X_d  ) + ((1/X_q)-(1/X_d))*0.5*math.sin(2*delta)*V_t**2
#P_m = 0.4996*math.cos(delta)+0.1877*math.sin(2*delta)
#for maximum power output differenciate and equate to zero

delta_max = 63.4 			#degree

P_m_max = ((1/X_q)-(1/X_d))*0.5*math.sin(math.radians(2*delta_max))*V_t**2   			#Maximuum load supplied with E_f = 0
print 'Maximum load the motor can supply is %.4f MW per phase '%(P_m_max*10**-6      )
Excitation emf  =  3042.2721 V
Maximum load the motor can supply is 0.1503 MW per phase