import math
#Variable declaration
phase = 3 #three phase winding
ns = 36. #number of slots
np = 4 #number of poles
#Calculations
nsp = ns/phase #number of slots per phase
npp = nsp/np #number of slots pole/phase
alpha = 180*np/ns #slot angle
Kd = math.sin(npp*alpha/2*math.pi/180)/(3*math.sin(alpha/2*math.pi/180))
#Results
print "The distribution factor is %.2f"%Kd
import math
#Variable declaration
np = 3 #number of phases
npl = 4 #number of poles
ns = 24 #number of slots
#calculaions
nsp = ns/npl #number of slot/pole
alpha = 180/nsp #slot pitch(degrees)
m = ns/(npl*np)
Kd = math.sin(m*alpha/2*math.pi/180)/(m*math.sin(alpha/2*math.pi/180))
Kc = math.cos(alpha/2*math.pi/180)
#Results
print "Distribution factor = %.2f"%Kd
print "Pitch factor = %.3f degrees"%Kc
import math
#Variable declaration
Vl= 11000 #V
N = 1500 #rpm
f = 50 #Hz
#Calculations
P = (120*f)/N
Vp = Vl/math.sqrt(3)
#Results
print "Number of poles = %d"%P
print "Voltage per phase of alternator = %d V"%Vp
import math
#Variable declaration
P = 4 #number of poles
ph = 3 #number of phases
s = 36 #number of slots
cs = 8 #coil span
#calculations
nsp = s/P #number of slots/pole
alpha = 180/nsp #slot pitch
m = s/(P*ph)
Kd = math.sin(m*alpha/2*math.pi/180)/(m*math.sin(alpha/2*math.pi/180))
ns = nsp-cs #no. of slots by which coil is short pitched
B = 1*alpha
Kc= math.cos(B/2*math.pi/180)
#Results
print "Distribution factor = %.3f"%Kd
print "Pitch factor = %.3f degrees"%Kc
import math
#Variable declaration
P= 16. #number of poles
N = 375 #rpm
s = 144. #number of slots
c = 10 #number of conductors
phase = 3
phi = 0.035 #flux per pole
#Calculations
f = (P*N)/120 #Hz
ns = s/P #slot/pole
m = ns/phase
alpha = 180/ns #slot angle
Kd = math.sin(m*alpha/2*math.pi/180)/(m*math.sin(alpha/2*math.pi/180))
Tc = s*c #total number of conductor
Tcp = Tc/phase #total number of conductors/phase
Ncp = Tcp/2 #number of turns/phase
emf = 4.44*Kd*phi*f*Ncp
Vl = math.sqrt(3)*emf
#Results
print "Frequency = %d Hz"%f
print "E.M.F = %d V"%emf
print "Line voltage = %d V"%Vl
import math
#Variable declaration
P = 4 #no. of poles
s = 36 #no. of slots
ph = 3 #no. of phases
cs = 8 #coil span
#Calculations
ns = s/P #no. of slots/pole
alpha = 180/ns #slot pitch
m = s/(P*ph)
Kd = math.sin(m*alpha/2*math.pi/180)/(m*math.sin(alpha/2*math.pi/180))
Ns = ns-cs
Kc = math.cos(alpha/2*math.pi/180)
#Results
print "Distribution factor = %.2f"%Kd
print "Pitch factor = %.4f degrees"%Kc
import math
#Variable declaration
El = 6600 #V
P = 4 #number of poles
s = 60 #number of slots
ph = 3 #number of phases
c = 2 #number of conductors
sn = 13 #slot number
f = 50 #Hz
T = 20 #V
#Calculations
n = s/P
m = n/ph
Zp = (s*c)/ph
B = 180/n #degrees
Kd = math.sin(m*B/2*math.pi/180)/(m*math.sin(B/2*math.pi/180))
Cs = (sn-1)*180/n #degrees
Kp = math.cos((180-Cs)/2*math.pi/180)
phi = El/(math.sqrt(3)*4.44*Kd*Kp*f*T)
#Results
print "The required flux pole is %.3f V"%phi
import math
#Varible declaration
Vl = 230 #V
Rt = 10*10**3 #VA
ph = 3 #no. of phases
Ra = 0.5 #ohms/phase
Xs = 1.2 #ohms/phase
cos_phi = 0.8 #lagging
sin_phi = 0.6 #leading
V = 132.8 #V
#Calculations
I = Rt/(ph*V) #A
print I
#Part(a)
Eo = math.sqrt(((V*cos_phi)+(I*Ra))**2+((V*sin_phi)+(I*Xs))**2)
Reg1 = (Eo-V)/V*100
#Part(b)
Eo = math.sqrt((V*cos_phi+I*Ra)**2+(V*sin_phi-I*Xs)**2)
Reg2 = (Eo-V)/V*100
#Results
print "Part(a): Regulation = %.2f %%"%Reg1
print "Part(b): Regulation = %.2f %%"%Reg2
import math
#Variable declaration
El = 10000 #V
Kd = 0.96
Kp = 1.0
phi = 15*10**-2 #wb
f = 50 #Hz
#Calculations
T = El/(math.sqrt(3)*4.44*Kd*Kp*phi*f)
Zp = 2*T
#Result
print "Number of armature conductors in series/phase = %d"%Zp
#Answer differs due to rounding-off errors
import math
#Variable declaration
s = 90 #no. of slots
P = 10 #no. of poles
ph = 3 #no. of phases
E = 11000. #E.M.F(V)
phi = 0.16 #flux(Wb)
f = 50 #Hz
#Calculations
nsp = s/(P*ph) #slot/pole/phase
alpha = 180/(s/P) #slot angle
m = s/(P*ph)
Kd = math.sin(m*alpha/2*math.pi/180)/(m*math.sin(alpha/2*math.pi/180))
N = E/(math.sqrt(3)*4.44*Kd*phi*f)
Nc = 2*N
#Result
print "Number of conductors/phase are %d"%Nc
#Incorrect answer for N in the textbook. Hence the result differs
import math
#Variable declaration
Vl = 400 #V
cos_phi = 1 #pf
n = 85./100 #efficiency
Zs = 10 #reactance(ohms)
#Calculations
out = Zs*735.5 #output
mi = out/n #motor input(W)
Il = mi/(math.sqrt(3)*Vl*cos_phi)
I = Il #since current is minimum when power factor is unity
Er = I*Zs
V = Vl/math.sqrt(3)
E = math.sqrt(V**2+Er**2)
emf = math.sqrt(3)*E
#Results
print "Minimum current = %.1f A"%I
print "Line induces e.m.f. = %d V"%emf
#Answers differ due to rounding-off errors
import math
#Variable declaration
P = 6
phi = 25*10**-3 #wb
f = 50 #Hz
ph = 3 #no. of phases
s = 12 #no. of slots/pole
nc = 4 #no. of conductors/slot
#Calculations
Zph = nc*s*P/ph
T = Zph/2
alpha = 180*(1-5./P)
Kc = math.cos(alpha/2*math.pi/180)
m = s/ph
B = 180/s
Kd = math.sin(m*alpha/2*math.pi/180)/(m*math.sin(alpha/2*math.pi/180))
Eph = 4.44*Kc*Kd*f*phi*T
El = math.sqrt(3)*Eph
#Results
print "Line e.m.f. = %.1f V"%El
#incorrect answer for Kd in the textbook. Hence the result differs
import math
#Variable declaration
P = 1200 #kW
V = 2300 #V
Ia = 200 #A
cos_phi_a = 0.9 #lagging
#Calculations
Pa = V*Ia*cos_phi_a/10**3 #kW
phi = math.atan(cos_phi_a)
Pra = Pa*math.tan(phi)
Pr = 0 #since power factor is unity
Prb = Pr-Pra
Pb = P-Pa
tan_phi = Prb/Pb
cos_phi_b = math.cos(math.atan(tan_phi))
Ia = Pb*10**3/(V*cos_phi_b)
#Results
print "Power = %d kW"%Pb
print "Power factor = %.3f"%cos_phi_b
print "Current = %.1f A"%Ia
#incorrect answers in the textbook
import math
#Part (a) - for lighting load
P1 = 600 #kW
cos_phi =1 #power factor
tan_phi = 0
Prl = P1*tan_phi
#Part(b) - for inductive load
P2 = 800 #W
cos_phi = 0.9
tan_phi = 0.4843
Pri = P2*tan_phi
#Part(c) - for capacitive power
P3 = 800
cos_phi = 0.8
tan_phi = 0.75
Prc = -P3*tan_phi
P = P1+P2+P3
Pr = Prl+Pri+Prc
Pa = 1000 #kW
cos_phi_a = 0.85
tan_phi_a = math.tan(math.acos(cos_phi_a))
Pra = Pa*tan_phi_a
Pb = P-Pa
Prb = Pr-Pra
tan_phi_2 = Prb/Pb
cos_phi_b = math.cos(math.atan(tan_phi_2))
#Results
print "Active power supplied by alternator B = %d kW"%Pb
print "Power factor of alternator B = %.4f leading"%cos_phi_b
import math
#Variable declaration
E = 1000 #KVa
Vl = 11000 #V
ph = 3 #no. of phases
Ra = 3.5 #armature resistance(ohms)
Xs = 40 #armature reactance(ohms)
cos_phi = 0.8
#Calculations
Ia = round(E*1000/(math.sqrt(3)*Vl),1)
V = Vl/math.sqrt(3)
phi = math.degrees(math.acos(cos_phi))
Rad = round(Ia*Ra) #armature resistance drop/phase
Xad = round(Ia*Xs) #armature reactance drop per phase
Er = math.sqrt(Rad**2+Xad**2) #incorrect answer in the textbook
theta = math.degrees(math.atan(Xs/Ra))
#Part a - Unity p.f.
Eba = math.sqrt(V**2+Er**2-(2*V*Er*math.cos(theta*math.pi/180)))
Vla = Eba*math.sqrt(3)
#From triangle OAB
alpha_a = math.degrees(math.asin((Er*math.sin(theta*math.pi/180))/Eba))
#Part b - At p.f. 0.8 lagging
BOA_b = theta-phi
Ebb = math.sqrt(V**2+Er**2-(2*V*Er*math.cos(BOA_b*math.pi/180)))
Vlb = Ebb*math.sqrt(3)
alpha_b = math.degrees(math.asin(Er*math.sin(BOA_b*math.pi/180)/Ebb))
#Part c - At p.f. 0.8 leading
BOA_c = theta+phi
Ebc = math.sqrt(V**2+Er**2-(2*V*Er*math.cos(BOA_c*math.pi/180)))
Vlc = Ebc*math.sqrt(3)
alpha_c = math.degrees(math.asin(Er*math.sin(BOA_c*math.pi/180)/Ebc))
#Results
print "Induced e.m.f. and angular retardation are as below:"
print "Part a : %d V,%.2f degrees"%(Vla,alpha_a)
print "Part b : %d V,%.2f degrees"%(Vlb,alpha_b)
print "Part c : %d V,%.2f degrees"%(Vlc,alpha_c)
#Incorrect answers in the textbook
import math
#Variable declaration
Em = 6000 #V
Xs = 1.5 #ohms/phase
Il = 1000 #amps
sin_phi = 1 #power factor
#Calculations
#Since load is inductive
Vt = Em-Il*Xs
Vl = round(math.sqrt(3)*Vt) #since winding is connected in star
Pr = math.sqrt(3)*Vl*Il*sin_phi/10**6
#Results
print "Reactive power supplied to the load is %.2f MVAR"%Pr
#Incorrect answer in textbook
import math
#Variable declaration
V = 7000 #V
I = 1400 #amps
Xs = 1.2 #ohms
f = 50 #Hz
Po = 4 #number of poles
cos_phi = 1 #power factor, since load is resistive
#Calculations
E = math.sqrt(V**2+(I*Xs)**2) #V
P = 3*V*I*cos_phi #W
N = 120*f/Po #rpm
w = (2*math.pi*N)/60 #rad/sec
T = P/(w*9.81)
#Result
print "The required torque is %.2e kg-meter"%T
#Variable declaration
Ep = 5700 #V
Xs = 1.5 #ohms
#Calculations
#Since windings are connected in star
Ip = Ep/Xs #phase current(A)
Il = Ip
#Result
print "The current per phase is %d Amps"%Il
import math
#Variable declaration
Vt = 15 #KV
Ps = 100*10**6 #power supplied by generator VA
cos_phi = 0.8 #power factor(lagging)
Xs = 0.7 #ohm per phase
Vl = 15 #KV
f = 50 #Hz
Po = 2 #no. of poles
#Calculations
Vp = Vl/math.sqrt(3) #KV
AC = Vp*cos_phi
sin_phi = 0.6
BC = Vp*sin_phi #KV
Il = Ps/(math.sqrt(3)*Vl*10**3) #amps
Vd = Il*Xs #voltage drop in synchronous reactance KV
BL = 2.697
LC = BL+BC #V
AL = math.sqrt(AC**2+LC**2) #V
Em = AL*math.sqrt(3) #V
Ns = (120*f)/Po #rpm
P = Ps*cos_phi #W
wT = 80*10**6
T = (wT*60)/(2*math.pi*Ns)
print
#Result
print "Induced e.m.f. = %.2f V"%Em
print "Torque = %.2e Nw-m"%T
print "Speed = %d rpm"%Ns
#Answers differ due to rounding-off errors