import math
import cmath
#Variable declaration
P = 20.0 #Number of poles
hp = 40.0 #Power rating of the synchronous motor(hp)
V_L = 660.0 #Line voltage(V)
beta = 0.5 #At no-load, the rotor is retarded 0.5 mechanical degree from its synchronous position
X_s = 10.0 #Synchronous reactance(ohm)
R_a = 1.0 #Effective armature resistance(ohm)
#Calculation
#Case(a)
alpha = P*(beta/2) #Rotor shift from the synchronous position in electrical degrees
#Case(b)
V_p = V_L/3**0.5 #Phase voltage(V)
E_gp = V_p #Generated voltage/phase at no-load(V)
E_r = complex((V_p-E_gp*math.cos(alpha*math.pi/180)),(E_gp*math.sin(alpha*math.pi/180))) #Resultant emf across the armature per phase(V/phase)
#Case(c)
Z_s = complex(R_a,X_s) #Synchronous impedance(ohm/phase)
I_a = E_r/Z_s #Armature current/phase(A/phase)
#Case(d)
Ia = abs(I_a) #Magnitude of armature current/phase(A/phase)
theta = cmath.phase(I_a)*180/math.pi #Phase angle of armature current(degree)
P_p = V_p*Ia*math.cos(theta*math.pi/180) #Power per phase drawn by the motor from the bus(W/phase)
P_t = 3*P_p #Total power drawn by the motor from the bus(W)
#Case(e)
P_a = 3*Ia**2*R_a #Armature power loss at no-load(W)
P_d = (P_t-P_a)/746.0 #Internal developed horsepower at no-load
#Result
print('Case(a): Rotor shift from the synchronous position in electrical degrees , α = %.f° ' %alpha)
print('Case(b): Resultant EMF across the armature per phase , E_r = %.1f∠%.1f° V/phase' %(abs(E_r),cmath.phase(E_r)*180/math.pi))
print('Case(c): Armature current per phase , I_a = %.2f∠%.1f° A/phase' %(Ia,theta))
print('Case(d): Power per phase drawn by the motor from the bus , P_p = %.f W/phase' %P_p)
print(' Total power drawn by the motor from the bus , P_t = %.f W' %P_t)
print('Case(e): Armature power loss = %.f W' %P_a)
print(' Internal developed horsepower at no-load , P_d = %.f hp' %P_d)
import math
import cmath
#Variable declaration
P = 20.0 #Number of poles
hp = 40.0 #Power rating of the synchronous motor(hp)
V_L = 660.0 #Line voltage(V)
beta = 5.0 #At no-load, the rotor is retarded 0.5 mechanical degree from its synchronous position
X_s = 10.0 #Synchronous reactance(ohm)
R_a = 1.0 #Effective armature resistance(ohm)
#Calculation
#Case(a)
alpha = P*(beta/2) #Rotor shift from the synchronous position in electrical degrees
#Case(b)
V_p = V_L/3**0.5 #Phase voltage(V)
E_gp = V_p #Generated voltage/phase at no-load(V)
E_r = complex((V_p-E_gp*math.cos(alpha*math.pi/180)),(E_gp*math.sin(alpha*math.pi/180))) #Resultant emf across the armature per phase(V/phase)
#Case(c)
Z_s = complex(R_a,X_s) #Synchronous impedance(ohm/phase)
I_a = E_r/Z_s #Armature current/phase(A/phase)
#Case(d)
Ia = abs(I_a) #Magnitude of armature current/phase(A/phase)
theta = cmath.phase(I_a)*180/math.pi #Phase angle of armature current(degree)
P_p = V_p*Ia*math.cos(theta*math.pi/180) #Power per phase drawn by the motor from the bus(W/phase)
P_t = 3*P_p #Total power drawn by the motor from the bus(W)
#Case(e)
P_a = 3*Ia**2*R_a #Armature power loss at no-load(W)
P_d = (P_t-P_a)/746.0 #Internal developed horsepower at no-load
#Result
print('Case(a): Rotor shift from the synchronous position in electrical degrees , α = %.f° ' %alpha)
print('Case(b): Resultant EMF across the armature per phase , E_r = %.f∠%.f° V/phase' %(abs(E_r),cmath.phase(E_r)*180/math.pi))
print('Case(c): Armature current per phase , I_a = %.1f∠%.1f° A/phase' %(Ia,theta))
print('Case(d): Power per phase drawn by the motor from the bus , P_p = %.f W/phase' %P_p)
print(' Total power drawn by the motor from the bus , P_t = %.f W' %P_t)
print('Case(e): Armature power loss = %.f W' %P_a)
print(' Internal developed horsepower at no-load , P_d = %.1f hp' %P_d)
print('\nNOTE: Changes in obtained answer from that of textbook is due to more precision i.e more number of decimal places')
import math
import cmath
#Variable declaration
P = 6.0 #Number of poles
hp = 50.0 #Power rating of the synchronous motor(hp)
V_L = 440.0 #Line voltage(V)
alpha = 20.0 #At no-load, the rotor is retarded 0.5 mechanical degree from its synchronous position
X_s = 2.4 #Synchronous reactance(ohm)
R_a = 0.1 #Effective armature resistance(ohm)
E_gp_a = 240.0 #Generated phase voltage(V)
E_gp_b = 265.0 #Generated phase voltage(V)
E_gp_c = 290.0 #Generated phase voltage(V)
#Calculation
#Case(a)
V_p = V_L /3**0.5 #Phase voltage(V)
E_ra = complex((V_p-E_gp_a*math.cos(alpha*math.pi/180)),(E_gp_a*math.sin(alpha*math.pi/180))) #Resultant emf
Z_s = complex(R_a,X_s) #Synchronous impedance(ohm)
I_ap1 = E_ra/Z_s #Armature current(A)
theta_1 = cmath.phase(I_ap1)*180/math.pi #Angle(degree)
pf_1 = math.cos(theta_1*math.pi/180) #Power factor
I_a1 = abs(I_ap1) #Magnitude of armature current(A)
P_d1 = 3*E_gp_a*I_a1*math.cos((160-theta_1)*math.pi/180) #Power drawn from the bus(W)
Horse_power1 = abs(P_d1)/746.0 #Horsepower developed by the armature(hp)
#Case(b)
E_rb = complex((V_p-E_gp_b*math.cos(alpha*math.pi/180)),(E_gp_b*math.sin(alpha*math.pi/180))) #Resultant emf
Z_s = complex(R_a,X_s) #Synchronous impedance(ohm)
I_ap2 = E_rb/Z_s #Armature current(A)
theta_2 = cmath.phase(I_ap2)*180/math.pi #Angle(degree)
pf_2 = math.cos(theta_2*math.pi/180) #Power factor
I_a2 = abs(I_ap2) #Magnitude of armature current(A)
P_d2 = 3*E_gp_b*I_a2*math.cos((160-theta_2)*math.pi/180) #Power drawn from the bus(W)
Horse_power2 = abs(P_d2)/746.0 #Horsepower developed by the armature(hp)
#Case(c)
E_rc = complex((V_p-E_gp_c*math.cos(alpha*math.pi/180)),(E_gp_c*math.sin(alpha*math.pi/180))) #Resultant emf
Z_s = complex(R_a,X_s) #Synchronous impedance(ohm)
I_ap3 = E_rc/Z_s #Armature current(A)
theta_3 = cmath.phase(I_ap3)*180/math.pi #Angle(degree)
pf_3 = math.cos(theta_3*math.pi/180) #Power factor
I_a3 = abs(I_ap3) #Magnitude of armature current(A)
P_d3 = 3*E_gp_c*I_a3*math.cos((160-theta_3)*math.pi/180) #Power drawn from the bus(W)
Horse_power3 = abs(P_d3)/746.0 #Horsepower developed by the armature(hp)
#Result
print('Case(a): Armature current , I_ap = %.2f∠%.2f° A' %(I_a1,theta_1))
print(' Power factor = %.4f lagging' %pf_1)
print(' Horsepower developed by the armature , Horsepower = %.1f hp' %Horse_power1)
print('Case(b): Armature current , I_ap = %.2f∠%.2f° A' %(I_a2,theta_2))
print(' Power factor = %.f (Unity PF)' %pf_2)
print(' Horsepower developed by the armature , Horsepower = %.1f hp' %Horse_power2)
print('Case(c): Armature current , I_ap = %.f∠%.2f° A' %(I_a3,theta_3))
print(' Power factor = %.4f leading' %pf_3)
print(' Horsepower developed by the armature , Horsepower = %.1f hp' %Horse_power3)
import math
import cmath
#Variable declaration
P = 2.0 #Number of poles
hp = 1000.0 #Power rating of the synchronous motor(hp)
V_L = 6000.0 #Line voltage(V)
f = 60.0 #Frequency(Hz)
R_a = 0.52 #Effective armature resistance(ohm)
X_s = 4.2 #Synchronous reactance(ohm)
P_t = 811.0 #Input power(kW)
PF = 0.8 #Power factor leading
#Calculation
V_p = V_L/3**0.5 #Phase voltage(V)
I_L = P_t*1000/(3**0.5*V_L*PF) #Line current(A)
I_ap = I_L #Phase armature current(A)
Z_p = complex(R_a,X_s) #Impedance per phase(ohm)
Zp = abs(Z_p) #Magnitude of impedance per phase(ohm)
beta = cmath.phase(Z_p)*180/math.pi #Phase angle of impedance per phase(degree)
E_r = I_ap*Zp #EMF(V)
theta = math.acos(PF)*180/math.pi#Power factor angle(degree)
delta = beta+theta #Difference angle(degree)
E_gp_f = (E_r**2+V_p**2-2*E_r*V_p*math.cos(delta*math.pi/180))**0.5 #Generated phase voltage(V)
E_gp_g = complex((V_p+E_r*math.cos((180-delta)*math.pi/180)),(E_r*math.sin((180-delta)*math.pi/180))) #Generated phase voltage(V)
E_gp_h = complex((V_p*PF-I_ap*R_a),(V_p*math.sin(theta*math.pi/180)+I_ap*X_s)) #Generated phase voltage(V)
#Result
print('Case(a): Line current , I_L = %.2f A' %I_L)
print(' Phase armature current , I_ap = %.2f A' %I_ap)
print('Case(b): Impedance per phase , Z_p∠β = %.3f∠%.2f° Ω' %(Zp,beta))
print('Case(c): Magnitude I_aZ_p = E_r = %.1f V' %E_r)
print('Case(d): Power factor angle , θ = %.2f° leading' %theta)
print('Case(e): Difference angle at 0.8 PF , δ = %.2f° ' %delta)
print('Case(f): Generated phase voltage , E_gp = %.f V' %E_gp_f)
print('Case(g): Generated phase voltage , E_gp = %.f∠%.2f° V' %(abs(E_gp_g),cmath.phase(E_gp_g)*180/math.pi))
print('Case(h): Generated phase voltage , E_gp = %.f∠%.2f° V' %(abs(E_gp_h),cmath.phase(E_gp_h)*180/math.pi))
import math
#Variable declaration
E_gp = 3687.0 #Generated phase voltage(V)
V_L = 6000.0 #Line voltage(V)
E_r = 412.8 #EMF(V)
V_p = V_L/3**0.5 #Phase voltage(V)
delta = 119.82 #Difference angle(degree)
theta = 36.87 #Power factor angle(degree)
R_a = 0.52 #Effective armature resistance(ohm)
X_s = 4.2 #Synchronous reactance(ohm)
I_a = 97.55 #Armature current(A)
#Calculation
alpha_1 = math.acos((E_gp**2+V_p**2-E_r**2)/(2*E_gp*V_p))*180/math.pi #Torque angle(degree)
alpha_2 = math.asin(E_r*math.sin(delta*math.pi/180)/E_gp)*180/math.pi #Torque angle(degree)
alpha_3 = theta-math.atan((V_p*math.sin(theta*math.pi/180)+I_a*X_s)/(V_p*math.cos(theta*math.pi/180)-I_a*R_a))*180/math.pi #Torque angle(degree)
#Result
print('Case(a): Torque angle , α = %.2f° '%alpha_1)
print('Case(b): Torque angle , α = %.2f° '%alpha_2)
print('Case(c): Torque angle , α = %.2f° '%alpha_3)
print('\nNOTE: ERROR : Negative sign is not mentioned in angle α part(c) in textbook answer')
import math
#Variable declaration
P = 2.0 #Number of poles
hp = 1000.0 #Power rating of the synchronous motor(hp)
V_L = 6000.0 #Line voltage(V)
f = 60.0 #Frequency(Hz)
P_t = 811.0 #Input power(kW)
PF = 0.8 #Power factor leading
E_gp = 3687.0 #Generated phase voltage(V)
I_a = 97.55 #Armature current(A)
E_gpI_a = 42.45 #Angle between Generated phase voltage and armature current(degree)
#Calculation
P_p = E_gp*I_a*math.cos(E_gpI_a*math.pi/180)/1000 #Mechanical power developed per phase(kW)
P_t_a = 3*P_p #Total mechanical power developed(kW)
P_t_b = P_t_a/0.746 #Internal power developed at rated load(hp)
S = 120*f/P #Speed of the motor(rpm)
T_int = P_t_b*5252/S #Internal torque developed(lb-ft)
T_ext = hp*5252/3600 #External torque developed(lb-ft)
n = T_ext/T_int*100 #Motor efficiency(%)
#Result
print('Case(a): Mechanical power developed in the armature per phase , P_p = %.3f kW' %P_p)
print(' Total Mechanical power developed in the armature , P_t = %.1f kW' %P_t_a)
print('Case(b): Internal power developed at rated load , P_t = %.1f hp' %P_t_b)
print('Case(c): Internal torque developed , T_int = %.f lb-ft' %T_int)
print('Case(d): Motor efficiency , η = %.1f percent' %n)
import math
import cmath
#Variable declaration
P_o = 2000.0 #Total power consumed by a factory from the transformer(kW)
pf_tr = 0.6 #Lagging power factor at which power is consumed from the transformer
V_L = 6000.0 #Primary line voltage of a transformer(V)
P = 750.0 #Power expected to be delivered by the dc motor-generator(kW)
hp = 1000.0 #Rating of the motor(hp)
V_L_m = 6000.0 #Line voltage of a synchronous motor(V)
pf_sm = 0.8 #Leading power factor of the synchronous motor
pf_im = 0.8 #Lagging power factor of the induction motor
n = 0.92 #Efficiency of each motor
#Calculation
#Case(a)
P_m_a = hp*746/n #Induction/synchronous motor load(kW)
I_1_a = P_m_a/(3**0.5*V_L*pf_im)*cmath.exp(1j*-math.acos(pf_im)) #Lagging current drawn by induction motor(A)
I_1_prime = P_o*1000/(3**0.5*V_L*pf_tr)*cmath.exp(1j*-math.acos(pf_tr)) #Original lagging factory load current(A)
I_TM = I_1_a+I_1_prime #Total load current(A)
angle_I_TM = cmath.phase(I_TM)*180/math.pi #Angle of total load current(degree)
PF_1 = math.cos(angle_I_TM*math.pi/180) #Overall sysytem PF
#Case(b)
I_s1 = P_m_a/(3**0.5*V_L*pf_sm)*cmath.exp(1j*math.acos(pf_sm)) #Leading current drawn by synchronous motor(A)
I_TSM = I_s1+I_1_prime #Total load current(A)
angle_I_TSM = cmath.phase(I_TSM)*180/math.pi #Angle of total load current(degree)
PF_2 = math.cos(angle_I_TSM*math.pi/180) #Overall sysytem PF
#Case(c)
percent_I_L = (abs(I_TM)-abs(I_TSM))/abs(I_TM)*100 #Percent reduction in total load current(%)
#Result
print('Case(a): Total load current of the induction motor , I_TM = %.1f∠%.1f° A' %(abs(I_TM),angle_I_TM))
print(' Power factor of the induction motor , Overall system PF = %.4f lagging' %PF_1)
print('Case(b): Total load current of the synchronous motor , I_TSM = %.1f∠%.1f° A' %(abs(I_TSM),angle_I_TSM))
print(' Power factor of the synchronous motor , Overall system PF = %.1f lagging' %PF_2)
print('Case(c): Percent reduction in total load current = %.1f percent' %percent_I_L)
print('Case(d): PF improvement: Using the synchronous motor raises the total system PF from %.4f lagging to %.1f lagging' %(PF_1,PF_2))
print('\nNOTE: Changes in obtained answer is due to precision and error in some data in the textbook solution')
import math
#Variable declaration
P = 6.0 #Number of poles
f = 60.0 #Frequency(Hz)
V_L = 440.0 #Line voltage(V)
alpha = 20.0 #At no-load, the rotor is retarded 0.5 mechanical degree from its synchronous position
X_s = 2.4 #Synchronous reactance(ohm)
R_a = 0.1 #Effective armature resistance(ohm)
E_gp = 240.0 #Generated phase voltage(V)
V_p = V_L/3**0.5 #Phase voltage(V)
#Calculation
S = 120*f/P #Speed(rpm)
T_p = 7.04*E_gp*V_p*math.sin(alpha*math.pi/180)/(S*X_s) #Torque developed per phase(lb-ft)
Horsepower = 3*T_p*S/5252 #Total horsepower developed(hp)
#Result
print('Case(a): Torque developed per phase , T_p = %.2f lb-ft' %T_p)
print('Case(b): Total horsepower developed , Horsepower = %.1f hp' %Horsepower)
import math
import cmath
#Variable declaration
P_o = 2000.0 #Total power consumed by a factory(kW)
pf = 0.6 #Lagging power factor
V = 6000.0 #Line voltage(V)
loss = 275.0 #Synchronous capacitor losses(kW)
#Calculation
#Case(a)
S_o_conjugate = P_o/pf #Apparent complex power(kW)
sin_theta = (1-pf**2)**0.5 #Sinθ
jQ_o = S_o_conjugate*sin_theta #Original kilovars of lagging load(kvar)
#Case(b)
jQ_c = -jQ_o #Kilovars of correction needed to bring the PF to unity(kvar)
#Case(c)
R = loss #Synchronous capacitor losses(kW)
S_c_conjugate = complex(R,jQ_c) #kVA rating of the synchronous capacitor(kVA)
angle_S_c_conjugate = cmath.phase(S_c_conjugate)*180/math.pi #Angle of #kVA rating of the synchronous capacitor(degree)
PF = math.cos(angle_S_c_conjugate*math.pi/180) #Power factor of the synchronous capacitor
#Case(d)
I_o = S_o_conjugate*1000/V #Original current drawn from the mains(A)
#Case(e)
P_f = P_o+loss #Total power(kW)
S_f = P_f #Total apparent power(kW)
I_f = S_f*1000/V #Final current drawn from the mains after correction(A)
#Result
print('Case(a): Original kilovars of lagging load , jQ_o = j%.1f kvar' %jQ_o)
print('Case(b): Kilovars of correction needed to bring the PF to unity , -jQ_c = %.1fj kvar' %jQ_c)
print('Case(c): kVA rating of the synchronous capacitor , S_*c = %.f∠%.1f° kVA' %(abs(S_c_conjugate),angle_S_c_conjugate))
print(' Power factor of the synchronous capacitor = %.3f leading' %PF)
print('Case(d): Original current drawn from the mains , I_o = %.1f A' %I_o)
print('Case(e): Final current drawn from the mains after correction , I_f = %.1f A' %I_f)
print('Case(f): See fig.8-25 in textbook page no.251')
#Variable declaration
kVA = 10000.0 #Rating of a system(kVA)
PF = 0.65 #Power factor of the system
PF_2 = 0.85 #Raised lagging PF
cost = 60.0 #Cost of the synchronous capacitor to improve the PF($/kVA)
#Calculation
#Case(a)
kW_a = kVA*PF #Power(kW)
sin_theta = (1-PF**2)**0.5 #Sinθ
kvar = kVA*sin_theta #Reactive power(kvar)
kVA_a = kvar
cost_cap_a = kVA_a*cost #Cost of raising the PF to unity PF($)
#Case(b)
kVA_b = kW_a/PF_2 #kVA of final system(kVA)
sin_theta_b = (1-PF_2**2)**0.5 #Sinθ
kvar_b = kVA_b*sin_theta_b #kvar of final system(kvar)
kvar_add = kvar-kvar_b #kvar of correction added(kvar)
kVA_b = kvar_add
cost_cap_b = kVA_b*cost #Cost of raising the PF to 0.85 PF($)
#Result
print('Case(a): Cost of raising the PF to Unity PF = $%.f ' %cost_cap_a)
print('Case(b): Cost of raising the PF to 0.85 PF lagging = $%.f ' %cost_cap_b)
print('\nNOTE: Slight variations in the obtained answer is due to non-approximation of the values while calculating in python')
#Variable declaration
S_conjugate = 1000.0 #Apparent complex power(kVA)
PF = 0.6 #Lagging PF
#Calculation
P_o = S_conjugate*PF #Active power dissipated by the load(kW)
sin_theta = (1-PF**2)**0.5 #Sinθ
jQ_o = S_conjugate*sin_theta #Inductive reactive quadrature power drawn from and returned to the supply(kvar)
#Result
print('Case(a): Active(true) power originally dissipated by load , P_o = %.f kW' %P_o)
print('Case(b): Inductive reactive quadrature power drawn from and returned to supply , +jQ_o = j%.f kvar' %jQ_o)
print('Case(c): The original power triangle is shown in Fig.8-26a in textbook page no.255')
#Variable declaration
S_conjugate = 1000.0 #Apparent complex power(kVA)
PF = 0.8 #Lagging PF
jQ_o = 800.0 #Inductive reactive quadrature power drawn from and returned to the supply(kvar)
P_o = 600.0 #Active power dissipated by the load(kW)
PF1 = 0.6 #Lagging PF from ex 8.11
#Calculation
P_f = S_conjugate*PF #Final active power supplied by the alternator(kW)
sin_theta = (1-PF**2)**0.5 #Sinθ
jQ_f = S_conjugate*sin_theta #Reactive power stored and returned to the supply(kvar)
P_a = P_f-P_o #Additional active power that may be supplied to new consumer(kW)
jQ_a = jQ_f-jQ_o #Correction kilovars required to raise PF from 0.6 to 0.8 lagging(kvar)
S_c = 0-jQ_a #Rating of correction capacitors needed(kVA)
#Result
print('Case(a): Final active power supplied by the alternator , P_f = %.f kW' %P_f)
print('Case(b): Reactive power stored and returned to the supply , +jQ_f = j%.f kvar' %jQ_f)
print('Case(c): Additional active power that may be supplied to new consumer , P_a = %.f kW' %P_a)
print('Case(d): Correction kilovars required to raise PF from 0.6 to 0.8 lagging , -jQ_a = %.fj kvar' %jQ_a)
print('Case(e): Rating of correction capacitors needed to accomplish above correction , S_*c = %.f kVA' %S_c)
print('Case(f): The power tabulation grid is shown below:')
print('_____________________________________________________________________')
print('\t P(kW) \t ±jQ(kvar) \t S*(kVA) \t Lagging cosθ')
print('_____________________________________________________________________')
print('Original %.f \t\t j%.f \t\t %.f \t\t %.1f ' %(P_o,jQ_o,S_conjugate,PF1))
print('Added %.f \t\t %.fj \t - \t\t - ' %(P_a,jQ_a))
print('Final %.f \t\t j%.f \t\t %.f \t\t %.1f ' %(P_f,jQ_f,S_conjugate,PF))
print('_____________________________________________________________________')
#Variable declaration
S_conjugate = 1000.0 #Apparent complex power(kVA)
PF = 1.0 #Unity PF
jQ_o = 800.0 #Inductive reactive quadrature power drawn from and returned to the supply(kvar)
P_o = 600.0 #Active power dissipated by the load(kW)
PF1 = 0.6 #Lagging PF from ex 8.11
#Calculation
P_f = S_conjugate*PF #Final active power supplied by the alternator(kW)
sin_theta = (1-PF**2)**0.5 #Sinθ
jQ_f = S_conjugate*sin_theta #Reactive power stored and returned to the supply(kvar)
P_a = P_f-P_o #Additional active power that may be supplied to new consumer(kW)
jQ_a = jQ_f-jQ_o #Correction kilovars required to raise PF from 0.6 to 0.8 lagging(kvar)
S_c = 0-jQ_a #Rating of correction capacitors needed(kVA)
#Result
print('Case(a): Final active power supplied by the alternator , P_f = %.f kW' %P_f)
print('Case(b): Reactive power stored and returned to the supply , +jQ_f = j%.f kvar' %jQ_f)
print('Case(c): Additional active power that may be supplied to new consumer , P_a = %.f kW' %P_a)
print('Case(d): Correction kilovars required to raise PF from 0.6 to 0.8 lagging , -jQ_a = %.fj kvar' %jQ_a)
print('Case(e): Rating of correction capacitors needed to accomplish above correction , S_*c = %.f kVA' %S_c)
print('Case(f): The power tabulation grid is shown below:')
print('_____________________________________________________________________')
print('\t P(kW) \t ±jQ(kvar) \t S*(kVA) \t cosθ')
print('_____________________________________________________________________')
print('Original %.f \t\t j%.f \t\t %.f \t\t %.1f ' %(P_o,jQ_o,S_conjugate,PF1))
print('Added %.f \t\t %.fj \t - \t\t - ' %(P_a,jQ_a))
print('Final %.f \t\t %.f \t\t %.f \t\t %.1f ' %(P_f,jQ_f,S_conjugate,PF))
print('_____________________________________________________________________')
import math
import cmath
#Variable declaration
P_o = 2000.0 #Load drawn by a factory(kW)
pf_o = 0.6 #Lagging PF
pf_f = 0.85 #lagging PF required
P_a = 275.0 #Losses in the synchronous capacitor(kW)
#Calculation
S_o_conjugate = P_o/pf_o #Original kVA load drawn from the utility(kVA)
sin_theta_o = (1-pf_o**2)**0.5 #Sinθ
jQ_o = S_o_conjugate*sin_theta_o #Original lagging kilovars(kvar)
P_f = P_o+P_a #Final system active power consumed from the utility(kW)
S_f_conjugate = (P_f/pf_f)*cmath.exp(1j*-math.acos(pf_f)) #Final kVA load drawn from the utility(kVA)
sin_theta_f = (1-pf_f**2)**0.5 #Sinθ
jQ_f = abs(S_f_conjugate)*sin_theta_f #Final lagging kvar
jQ_a = jQ_f-jQ_o #Correction kvar produced by the synchronous capacitor(kvar)
S_a_conjugate = complex(P_a,jQ_a) #kVA rating of the synchronous capacitor(kVA)
angle_S_a_conjugate = cmath.phase(S_a_conjugate)*180/math.pi #Angle(degree)
pf_S_a_conjugate = math.cos(angle_S_a_conjugate*math.pi/180) #Leading PF
#Result
print('Case(a): Original kVA load drawn from the utility , S_*o = %.1f kVA' %S_o_conjugate)
print('Case(b): Original lagging kilovars , jQ_o = j%.f kvar' %jQ_o)
print('Case(c): Final system active power consumed from the utility , P_f = %.f kW' %P_f)
print('Case(d): Final kVA load drawn from the utility , S_*f = %.1f∠%.1f° kVA' %(abs(S_f_conjugate),cmath.phase(S_f_conjugate)*180/math.pi))
print('Case(e): Correction kilovars produced by the synchronous capacitor , -jQ_a = %.fj kvar' %jQ_a)
print('Case(f): kVA rating of the synchronous capacitor , S_*a = %.f∠%.2f° kVA' %(abs(S_a_conjugate),cmath.phase(S_a_conjugate)*180/math.pi))
print('Case(g): Power tabulation grid: ')
print('_____________________________________________________________________')
print('\t P(kW) \t ±jQ(kvar) \t S*(kVA) \t cosθ')
print('_____________________________________________________________________')
print('Original %.f \t\t j%.f \t %.1f \t\t %.1f lag' %(P_o,jQ_o,S_o_conjugate,pf_o))
print('Added %.f \t\t %.fj \t %.f \t\t %.3f lead' %(P_a,jQ_a,abs(S_a_conjugate),pf_S_a_conjugate))
print('Final %.f \t\t j%.f \t %.1f \t\t %.2f lag' %(P_f,jQ_f,abs(S_f_conjugate),pf_f))
print('_____________________________________________________________________')
import math
import cmath
#Variable declaration
S_f_conjugate = 3333.3 #Rating of alternator(kVA)
S_o_conjugate = complex(2275,1410) #Load(kVA)
PF = 0.8 #Lagging power factor
#Calculation
#Case(a)
a = 1.0 #Co-efficient of x^2
b = 5332.0 #Co-efficient of x
c = -3947163.0 #Constant
sol_1 = (-b+(b**2-4*a*c)**0.5)/(2*a) #Solution 1
sol_2 = (-b-(b**2-4*a*c)**0.5)/(2*a) #Solution 1
x = sol_1
#Case(b)
P_a = PF*x #Added active power of the additional load(kW)
sin_theta = (1-PF**2)**0.5 #Sinθ
Q_a = sin_theta*x #Added reactive power of the additional load(kvar)
#Case(c)
P_o = S_o_conjugate.real #Real power(kW)
Q_o = S_o_conjugate.imag #Reactive power(kvar)
P_f = P_o+P_a #Final active power supplied by alternator(kW)
Q_f = Q_o+Q_a #Final reactive power supplied by alternator(kvar)
#Case(d)
PF_final = P_f/S_f_conjugate #Final PF of the alternator
#Result
print('Case(a): Additional kVA load that may be added without overloading the alternator , x = S_*a = %.2f kVA' %x)
print('Case(b): Added active power of the additional load , P_a = %.1f kW' %P_a)
print(' Added reactive power of the additional load , Q_a = j%.2f kvar' %Q_a)
print('Case(c): Final active power supplied by alternator , P_f = %.1f kW' %P_f)
print(' Final reactive power supplied by alternator , Q_f = j%.1f kvar' %Q_f)
print('Case(d): Final PF of the alternator , PF = %.3f lagging' %PF_final)
print('Power tabulation grid: ')
print('_____________________________________________________________________')
print('\t P(kW) \t ±jQ(kvar) \t S*(kVA) \t cosθ')
print('_____________________________________________________________________')
print('Original %.f \t\t j%.f \t %.1f \t\t %.2f lag' %(P_o,Q_o,abs(S_o_conjugate),math.cos(cmath.phase(S_o_conjugate))))
print('Added %.1fx \t\t j%.1fx \t %.fx \t\t %.1f lag' %(PF,sin_theta,(PF**2+sin_theta**2),PF))
print('Final (%.f+%.1fx) \t (%.f+%.1fx) \t %.1f \t\t %.3f lag' %(P_o,PF,Q_o,sin_theta,S_f_conjugate,PF_final))
print('_____________________________________________________________________')
import math
import cmath
#Variable declaration
S_o_conjugate = complex(2275,1410) #Load(kVA)
theta_S_o_conjugate = cmath.phase(S_o_conjugate)*180/math.pi #Angle of load(degree)
S_a_conjugate = complex(527.1,395.32) #Additional load(kVA)
theta_S_a_conjugate = cmath.phase(S_a_conjugate)*180/math.pi #Angle of additional load(degree)
S_f_conjugate = complex(2802.1,1805.32) #Final load(kVA)
theta_S_f_conjugate = cmath.phase(S_f_conjugate)*180/math.pi #Angle of final load(degree)
#Calculation
x = S_o_conjugate+S_a_conjugate+(-S_f_conjugate) #Tellegens theorem
#Result
if(x==0):
print('Validity is checked Tellegens theorem , S_*o + S_*a + (_S_*f) = %.f' %abs(x))
else:
print('Validity is not checked')
import math
import cmath
#Variable declaration
kW = 40000.0 #Load on a factory(kW)
PF = 0.8 #Lagging PF
hp = 7500.0 #Power rating of the induction motor(hp)
PF_IM = 0.75 #Lagging PF of the induction motor
n = 0.91 #Efficiency of induction motor
PF_SM = 1.0 #Power factor of the synchronous motor
#Calculation
kVA_original = kW/PF #Original kVA
sin_theta = (1-PF**2)**0.5 #Sinθ
kvar_original = kVA_original*sin_theta #Original kvar
kW_IM = hp*746/(1000*n) #Induction motor(kW)
kVA_IM = kW_IM/PF_IM #Induction motor(kVA)
sin_theta_IM = (1-PF_IM**2)**0.5 #Sinθ
kvar_IM = kVA_IM*sin_theta_IM #Induction motor(kvar)
kvar_final = kvar_original-kvar_IM #Final kvar
kVA_final = complex(kW,kvar_final) #Final kVA
angle_kVA_final = cmath.phase(kVA_final)*180/math.pi #Angle of Final kVA(degree)
PF_final = math.cos(angle_kVA_final*math.pi/180) #Final power factor
#Result
print('Overall system PF using a unity PF synchronous motor , Final PF = %.3f lagging' %PF_final)
import math
import cmath
#Variable declaration
kW = 40000.0 #Load on a factory(kW)
PF = 0.8 #Lagging PF
hp = 7500.0 #Power rating of the synchronous motor(hp)
PF_SM = 0.8 #Lagging PF of the synchronous motor
n = 0.91 #Efficiency of synchronous motor
hp_IM = 7500.0 #Power rating of the induction motor(hp)
PF_IM = 0.75 #Lagging PF of the induction motor
#Calculation
kVA_original = kW/PF #Original kVA
sin_theta = (1-PF**2)**0.5 #Sinθ
kvar_original = kVA_original*sin_theta #Original kvar
kW_IM = hp_IM*746/(1000*n) #Induction motor(kW)
kVA_IM = kW_IM/PF_IM #Induction motor(kVA)
sin_theta_IM = (1-PF_IM**2)**0.5 #Sinθ
kvar_IM = kVA_IM*sin_theta_IM #Induction motor(kvar)
kvar_final_IM = kvar_original-kvar_IM #Final kvar
kW_SM = hp*746/(1000*n) #synchronous motor(kW)
kVA_SM = kW_SM/PF_SM #synchronous motor(kVA)
sin_theta_SM = (1-PF_SM**2)**0.5 #Sinθ
kvar_SM = kVA_SM*sin_theta_SM #synchronous(kvar)
kvar_final = kvar_original-kvar_SM-kvar_IM #Final kvar
kVA_final = complex(kW,kvar_final) #Final kVA
angle_kVA_final = cmath.phase(kVA_final)*180/math.pi #Angle of Final kVA(degree)
PF_final = math.cos(angle_kVA_final*math.pi/180) #Final power factor
#Result
print('Case(a): Overall system PF using a unity PF synchronous motor , Final PF = %.3f lagging' %PF_final)
print('Case(b): In Ex.8-17, a 6148 kVA, unity PF, 7500 hp synchronous motor is needed. In Ex.8-18, a 7685 kVA, 0.8 PF leading, 7500 hp synchronous motor is needed')
print(' Ex.8-18b shows that a 0.8 PF leading, 7500 hp synchronous motor must be physically larger than a unity PF, 7500 hp synchronous motor because of its higher kVA rating')
import math
import cmath
#Variable declaration
kVA_load = 500.0 #Load(kVA)
PF_load = 0.65 #Lagging PF of load
hp = 200.0 #Power rating of the system(hp)
n = 0.88 #Efficiency of the system after adding the load
PF_final = 0.85 #Final lagging PF after adding the load
#Calculation
kW_original = kVA_load*PF_load #Original kW
sin_theta_load = (1-PF_load**2)**0.5 #Sinθ
kvar_original = kVA_load*sin_theta_load #Original kvar
kW_SM = hp*746/(1000*n) #Synchronous motor kW
#Case(a)
kW_final = kW_original+kW_SM #Final kW of the system with the motor added
kVA_final = kW_final/PF_final #Final kVA of the system with the motor added
PF_system = kW_final/kVA_final #Final PF of the system with the motor added
sin_theta_system = (1-PF_final**2)**0.5 #Sinθ
kvar_final = kVA_final*sin_theta_system #Final kvar of the system with the motor added
#Case(b)
kvar_SM = kvar_final-kvar_original #kvar rating of the synchronous motor
kVA_SM = complex(kW_SM,kvar_SM) #kVA rating of the synchronous motor
kVA_SM_a = cmath.phase(kVA_SM)*180/math.pi #Angle of kVA rating of the synchronous motor(degree)
PF_SM = math.cos(kVA_SM_a*math.pi/180) #PF of the sychronous motor
#Result
print('Case(a): kVA of the system with the motor added , Final kVA = %.f kVA' %kVA_final)
print(' PF of the system with the motor added , System PF = %.2f lagging' %PF_system)
print('Case(b): kVA of the synchronous motor , Synchronous motor kVa = %.f∠%.1f° kVA' %(abs(kVA_SM),kVA_SM_a))
print(' PF of the synchronous motor at which it operates , Synchronous motor PF = %.3f leading' %PF_SM)
#Variable declaration
f_m = 60.0 #Frequency of motor(Hz)
f_a = 4000.0 #Frequency of alternator(Hz)
#Calculation
Pole_ratio = f_a/f_m #Ratio of number of poles in alternator to that of motor
P_a = 20.0
P_m = 3.0
P_a1 = 2*P_a #First combination must have 40 poles on the alternator
P_m1 = 2*P_m #First combination must have 6 poles on the synchronous motor
S_1 = 120*f_m/P_m1 #Speed of motor and alternator(rpm)
P_a2 = 4*P_a #Second combination must have 40 poles on the alternator
P_m2 = 4*P_m #Second combination must have 6 poles on the synchronous motor
S_2 = 120*f_m/P_m2 #Speed of motor and alternator(rpm)
P_a3 = 6*P_a #Third combination must have 40 poles on the alternator
P_m3 = 6*P_m #Third combination must have 6 poles on the synchronous motor
S_3 = 120*f_m/P_m3 #Speed of motor and alternator(rpm)
#Result
print('First combination have %.f poles on the alternator and %.f poles on the synchronous motor at a speed %.f rpm' %(P_a1,P_m1,S_1))
print('Second combination have %.f poles on the alternator and %.f poles on the synchronous motor at a speed %.f rpm' %(P_a2,P_m2,S_2))
print('Third combination have %.f poles on the alternator and %.f poles on the synchronous motor at a speed %.f rpm' %(P_a3,P_m3,S_3))