import math
#Variable declaration
V = 2.5*10**3 #Supply voltage(V)
R_r = 0.12 #Per phase resistance(ohm)
X_r = 3.2 #Syncronous reactance(ohm)
I_a = 185.0 #Line current(A)
pf = 0.8 #Leading power factor
#Calculation
phi = math.acos(pf) #Angle(radians)
phi_deg = phi*180/math.pi #Angle(degree)
V_t = V/3**0.5 #Terminal voltage per phase(V)
Z_s = complex(R_r,X_r) #Impedance per phase(ohm)
beta = math.atan(X_r/R_r) #Angle(radians)
beta_deg = beta*180/math.pi #Angle(degree)
E_r = I_a*abs(Z_s) #Resultant voltage due to impedance(V)
E_f = (V_t**2+E_r**2-2*V_t*E_r*math.cos(beta+phi))**0.5 #Excitation voltage per phase(V)
#Result
print('Excitation voltage per phase , E = %.2f V' %E_f)
print('\nNOTE : Changes in answer is due to precision i.e more number of decimal places')
print(' ERROR : Line current I_a = 185 A not 180 A as given in textbook question')
import math
#Variable declaration
kVA = 1200.0 #kVA ratings
V = 14.0*10**3 #Supply voltage(V)
R_r = 4.8 #Per phase resistance(ohm)
X_r = 35.0 #Syncronous reactance(ohm)
pf = 0.95 #Leading power factor
#Calculation
phi = math.acos(pf) #Angle(radians)
phi_deg = phi*180/math.pi #Angle(degree)
Z_s = complex(R_r,X_r) #Impedance per phase(ohm)
I_a = kVA*10**3/(3**0.5*V) #Armature current(A)
E_r = I_a*abs(Z_s) #Resultant voltage due to impedance(V)
V_t = V/3**0.5 #Terminal voltage per phase(V)
b = math.atan(X_r/R_r) #Beta value(radians)
b_deg = b*180/math.pi #Beta value(degree)
E_f = (V_t**2+E_r**2-2*V_t*E_r*math.cos(b-phi))**0.5 #Excitation voltage per phase(V)
sin_delta = (E_r/E_f)*math.sin(b-phi)
delta = math.asin(sin_delta)*180/math.pi #Torque angle(degree)
#Result
print('Excitation voltage per phase , E_f = %.2f V' %E_f)
print('Torque angle , δ = %.2f°' %delta)
import math
#Variable declaration
V = 440.0 #Supply voltage(V)
R_a = 1.5 #Per phase armature resistance(ohm)
X_a = 8.0 #Synchronous reactance(ohm)
P = 4.0 #Number of poles
f = 50.0 #Supply frequency(Hz)
pf = 0.9 #Leading power factor
I_a = 50.0 #Armature current(A)
#Calculation
V_t = V/3**0.5 #Terminal voltage per phase(V)
phi = math.acos(pf) #Angle(radians)
phi_deg = phi*180/math.pi #Angle(degree)
Z_s = complex(R_a,X_a) #Impedance per phase(ohm)
E_r = I_a*abs(Z_s) #Resultant voltage due to impedance(V)
beta = math.atan(X_a/R_a) #Beta value(radians)
beta_deg = beta*180/math.pi #Beta value(degree)
E_f = (V_t**2+E_r**2-2*V_t*E_r*math.cos(beta+phi))**0.5 #Excitation voltage per phase(V)
P_dm = (((E_f*V_t)/abs(Z_s))-((E_f**2*R_a)/abs(Z_s)**2)) #Maximum power per phase(W)
#Result
print('Maximum power per phase , P_dm = %.1f W' %P_dm)
print('\nNOTE : ERROR : In textbook solution E_f = 513.5 V is taken instead of 533.337089826 V')
#Variable declaration
P = 4.0 #Number of poles
f = 50.0 #Supply frequency(Hz)
V_t = 1500.0 #Terminal voltage per phase(V)
E_f = 1000.0 #Excitation voltage per phase(V)
Z_s = 12.0 #Synchronous impedance per phase(ohm)
R_a = 1.5 #Armature resistance(ohm)
#Caclulation
P_dm = ((E_f*V_t/Z_s)-(E_f**2*R_a/Z_s**2)) #Maximum power(W)
N_s = 120*f/P #Synchronous speed(rpm)
T_dm = 9.55*P_dm/N_s #Maximum torque(N-m)
#Result
print('Maximum power developed , P_dm = %.f W' %P_dm)
print('Maximum toruqe , T_dm = %.1f N-m' %T_dm)