#Variable declaration
N_1 = 500.0 #Number of turns in the hv side i.e primary
N_2 = 100.0 #Number of turns in the lv side i.e secondary
I_2 = 12.0 #Load current i.e secondary(A)
#Calculation
#For step-down transformer
alpha = N_1/N_2 #Transformation ratio
I_1 = I_2/alpha #Load component of primary current(A)
#For step-up transformer
N1 = 100.0 #Number of turns in the lv side i.e primary
N2 = 500.0 #Number of turns in the hv side i.e secondary
alpha_c = N1/N2 #Transformation ratio
#Result
print('Case(a): Transformation ratio , α = %.f ' %alpha)
print('Case(b): Load component of primary current , I_1 = %.1f A' %I_1)
print('Case(c): Transformation ratio if transformer is used as step-up , α = %.1f ' %alpha_c)
#Variable declaration
V_h = 2300.0 #Primary voltage i.e hv(V)
V_l = 115.0 #Secondary voltage i.e lv(V)
f = 60.0 #Frequency(Hz)
S = 4.6 #Rating of the step-down transformer(kVA)
V_per_turn = 2.5 #Induced EMF per turn(V/turn)
#Calculation
#Case(a)
N_h = V_h/V_per_turn #Number of high-side turns
N_l = V_l/V_per_turn #Number of low-side turns
N_1 = N_h
N_2 = N_l
#Case(b)
V_1 = V_h
V_2 = V_l
S_1 = S
S_2 = S
I_1 = S_1*1000/V_1 #Rated primary current(A)
I_2 = S_2*1000/V_2 #Rated secondary current(A)
I_h = I_1
I_l = I_2
#Case(c)
alpha_stepdown_c = N_1/N_2 #Step-down transformation ratio
alpha_stepup_c = N_l/N_h #Step-up transformation ratio
#Case(d)
alpha_stepdown_d = I_2/I_1 #Step-down transformation ratio
alpha_stepup_d = I_h/I_l #Step-up transformation ratio
#Result
print('Case(a): Number of high-side turns , N_h = %.f t = N_1 ' %N_h)
print(' Number of low-side turns , N_l = %.f t = N_2 ' %N_l)
print('Case(b): Rated primary current , I_h = I_1 = %.f A' %I_h)
print(' Rated secondary current , I_l = I_2 = %.f A' %I_l)
print('Case(c): Step-down transformation ratio , α = %.f ' %alpha_stepdown_c);
print(' Step-up transformation ratio , α = %.2f ' %alpha_stepup_c);
print('Case(d): Step-down transformation ratio , α = %.f ' %alpha_stepdown_d);
print(' Step-up transformation ratio , α = %.2f ' %alpha_stepup_d);
#Variable declaration
N_1 = 500.0 #Number of primary turns
N_2 = 25.0 #Number of secondary turns
Z_L = 8.0 #Impedance(ohm)
V_1 = 10.0 #Output voltage of the amplifier(V)
#Calculation
alpha = N_1/N_2 #Step-down transformation ratio
Z_1 = alpha**2*Z_L #Impedance reflected to the transformer primary at the output of the amplifier(ohm)
I_1 = V_1/Z_1*1000 #Matching transformer primary current(mA)
#Result
print('Case(a): Impedance reflected to the transformer primary at the output of the amplifier , Z_1 = %.f Ω' %Z_1)
print('Case(b): Matching transformer primary current , I_1 = %.3f mA' %I_1)
#Variable declaration
N_1 = 600.0 #Number of primary turns
N_2 = 150.0 #Some number of secondary turns
N_3 = 300.0 #Some number of secondary turns
Z_2 = 30.0 #Resistive load across N_2(ohm)
Z_3 = 15.0 #Resistive load across N_3(ohm)
V_p = 16.0 #Primary applied voltage(V)
cos_theta = 1.0 #Unity PF
#Calculation
#Case(a)
Z_2_prime = Z_2*(N_1/N_2)**2 #Impedance reflected to the primary by load Z_2(ohm)
#Case(b)
Z_3_prime = Z_3*(N_1/N_3)**2 #Impedance reflected to the primary by load Z_3(ohm)
#Case(c)
Z_1 = (Z_2_prime*Z_3_prime)/(Z_2_prime+Z_3_prime) #Total impedance reflected to primary(ohm)
#Case(d)
I_1 = V_p/Z_1 #Total current drawn from the supply(A)
#Case(e)
P_t = V_p*I_1*cos_theta #Total power drawn from the supply at unity PF(W)
#Case(f)
R_2 = Z_2
V_2 = V_p*(N_2/N_1) #Voltage across load Z_2(V)
P_2 = V_2**2/R_2 #Power dissipated in load Z_2(W)
#Case(g)
R_3 = Z_3
V_3 = V_p*(N_3/N_1) #Voltage across Z_3 in volt
P_3 = V_3**2 / R_3 #Power dissipated in load Z_3(W)
#Case(h)
P_total = P_2+P_3 #Total power dissipated in both loads(W)
#Result
print('Case(a): Impedance reflected to the primary by load Z_2 = %.f Ω' %Z_2_prime)
print('Case(b): Impedance reflected to the primary by load Z_3 = %.f Ω' %Z_3_prime)
print('Case(c): Total impedance reflected to the primary , Z_1 = %.1f Ω' %Z_1)
print('Case(d): Total current drawn from the supply , I_1 = %.1f A' %I_1)
print('Case(e): Total power drawn from the supply at unity power factor , P_t = %.1f W' %P_t)
print('Case(f): Voltage across load Z_2 , V_2 = %.f V' %V_2)
print(' Power dissipated in load Z_2 , P_2 = %.2f W' %P_2)
print('Case(g): Voltage across load Z_3 , V_3 = %.f V' %V_3)
print(' Power dissipated in load Z_3 , P_3 = %.2f W' %P_3)
print('Case(h): Total power dissipated in both loads , P_t = %.1f W ' %P_total)
#Variable declaration
P = 100.0 #Power rating of the single channel power amplifier(W)
Z_p = 3200.0 #Output impedance ohm of the single channel power amplifier(ohm)
N_p = 1500.0 #Number of primary turns in a tapped impedance-matching transformer
Z_L1 = 8.0 #Amplifier output using a tapped impedance-matching transformer(ohm)
Z_L2 = 4.0 #Amplifier output using a tapped impedance-matching transformer(ohm)
#Calculation
#Case(a)
alpha = (Z_p/Z_L1)**0.5 #Transformation ratio
N_2 = N_p/alpha #Total number of secondary turns to match 8 ohm speaker
#Case(b)
alpha_b = (Z_p/Z_L2)**0.5 #Transformation ratio
N_1 = N_p/alpha_b #Number of primary turns to match 4 ohm speaker
#Case(c)
turns_difference = N_2-N_1 #Difference in secondary and primary turns
alpha_c = (N_p/turns_difference) #Transformation ratio
Z_L = Z_p/alpha_c**2 #Impedance that must be connected(ohm)
#Result
print('Case(a): Total number of secondary turns to match 8 Ω impedance speaker , N_2 = %.f t' %N_2)
print('Case(b): Number of turns to match 4 Ω impedance speaker , N_1 = %.f t' %N_1)
print('Case(c): Impedance that must be connected , Z_L = %.2f Ω' %Z_L)
#Variable declaration
P = 100.0 #Power rating of the single channel power amplifier(W)
Z_L1 = 8.0 #Amplifier output using a tapped impedance-matching transformer(ohm)
Z_L2 = 4.0 #Amplifier output using a tapped impedance-matching transformer(ohm)
P_servo = 10.0 #Power rating of the servo motor(W)
Z_servo = 0.7 #Impedance of the servo motor(ohm)
#Calculation
root_Z_AB = 8**0.5-4**0.5
Z_AB = (root_Z_AB)**2
#Result
print('Impedance between terminals A and B , Z_AB = %.2f Ω' %Z_AB)
import math
import cmath
#Variable declaration
V_s = 10.0*cmath.exp(1j*0*math.pi/180) #Supply voltage of the source(V)
R_s = 1000.0 #Resistance of the source(ohm)
R_L = 10.0 #Load resistance(ohm)
#Calculation
#Case(a)
alpha = (R_s/R_L)**0.5 #Transformation ratio of the matching transformer for MPT
#Case(b)
V = abs(V_s) #Considering only absolute value of Supply voltage for easy simplification
V_1 = V/2 #Terminal voltage of the source at MPT(V)
#Case(c)
V_2 = V_1/alpha #Terminal voltage across the load at MPT(V)
#Case(d)
Z_L = R_L
I_2 = V_2/Z_L #Secondary load current(A). Method 1
I2 = V/(2*alpha*R_L) #Secondary load current(A). Method 2
#Case(e)
I_1 = I_2/alpha #Primary load current drawn from the source(A). Method 1
I1 = V/(2*R_s) #Primary load current drawn from the source(A). Method 2
#Case(f)
P_L = (I_2)**2*R_L #Maximum power dissipated in the load(W)
#Case(g)
P_s = (I_1)**2*R_s #Power dissipated internally within the source(W)
#Case(h)
theta = 0
P_T1 = abs(V)*I_1*math.cos(theta) #Total power supplied by the source(W). Method 1
P_T2 = P_L+P_s #Total power supplied by the source(W). Method 2
#Case(i)
P_T = P_T1
n = P_L/P_T*100 #Power transfer efficiency(%)
#Result
print('Case(a): Transformation ratio of the matching transformer for MPT , α = %.f ' %alpha)
print('Case(b): Terminal voltage of the source at MPT , V_1 = %.1f V' %V_1)
print('Case(c): Terminal voltage across the load at MPT , V_2 = %.1f V' %V_2)
print('Case(d): Secondary load current , I_2 = %.f mA (Method 1)' %(1000*I_2))
print(' Secondary load current , I_2 = %.f mA (Method 2)' %(1000*I2))
print('Case(e): Primary load current drawn from the source , I_1 = %.f mA (Method 1)' %(1000*I_1))
print(' Primary load current drawn from the source , I_1 = %.f mA (Method 2)' %(1000*I1))
print('Case(f): Maximum power dissipated in the load , P_L = %.f mW' %(1000*P_L))
print('Case(g): Power dissipated internally within the source , P_s = %.f mW' %(1000*P_s))
print('Case(h): Total power supplied by the source , P_T = %.f mW (Method 1)' %(1000*P_T1))
print(' Total power supplied by the source , P_T = %.f mW (Method 2)' %(1000*P_T2))
print('Case(i): Power transfer efficiency , η = %.f percent' %n)
#Variable declaration
V = 20.0 #No-load voltage(V)
R_s = 18.0 #Internal resistance of the power amplifier(ohm)
R_L = 8.0 #Load resistance(ohm)
#Calculation
V_L = (R_L/(R_L+R_s))* V #Load voltage(V)
P_L = (V_L)**2/R_L #Power delivered to the speaker when connected directly to the amplifier(W)
alpha = (R_s/R_L)**0.5 #Turns ratio of the transformer to maximize speaker power
V_2 = V/(2*alpha) #Secondary voltage(V)
P_L2 = (V_2)**2/R_L #Maximum power delivered to the speaker(W)
#Result
print('Case(a): Power delivered to the speaker when connected directly to the amplifier , P_L = %.2f W' %P_L)
print('Case(b): Turns ratio of the transformer to maximize speaker power , α = %.1f ' %alpha)
print('Case(c): Maximum power delivered to the speaker using matching transformer of part(b) , P_L = %.1f W' %P_L2)
#Variable declaration
kVA = 1.0 #Rating of the transformer(kVA)
V_1 = 220.0 #Primary voltage(V)
V_2 = 110.0 #Secondary voltage(V)
f_o = 400.0 #Original frequency(Hz)
f_f = 60.0 #Frequency for which the transformer is to be used(Hz)
#Calculation
#Case(a)
alpha = V_1/V_2 #Transformation ratio
E_h = V_1*(f_f/f_o) #Maximum rms voltage applied to HV side(V)
E_1 = E_h
E_l = E_1/alpha #Maximum voltage output of LV side(V)
#Case(b)
V_h = V_1 #High voltage(V)
I_h = kVA*1000/V_h #High current(A)
Vh = E_h
kVA_new = Vh*I_h/1000 #kVA rating of transformer under reduced frequency
#Result
print('Case(a): Maximum rms voltage that may be applied to high-voltage side , E_h = %.f V' %E_h)
print(' Maximum voltage output of the low-voltage side , E_l = %.1f V' %E_l)
print('Case(b): kVA rating of transformer under conditions of reduced frequency , V_h*I_h = %.2f kVA' %kVA_new)
#Variable declaration
kVA = 1.0 #kVA rating of the transformer
V_1 = 220.0 #Primary voltage(V)
V_2 = 110.0 #Secondary voltage(V)
f_o = 400.0 #Frequency(Hz)
f_f = 60.0 #Frequency for which the transformer is to be used(Hz)
P_orig = 10.0 #Original iron losses of the transformer(W)
#Calculation
B = f_o/f_f #Flux density
P_iron = P_orig*B**2 #Iron losses(W)
#Result
print('Iron losses if is operated at reduced frequency of 60 Hz , P_iron = %.f W' %P_iron)
#Variable declaration
kVA = 500.0 #Rating of the step-down transformer(kVA)
V_1 = 2300.0 #Primary voltage(V)
V_2 = 230.0 #Secondary voltage(V)
f = 60.0 #Frequency(Hz)
r_1 = 0.1 #Primary winding resistance(ohm)
x_1 = 0.3 #Primary winding reactance(ohm)
r_2 = 0.001 #Secondary winding resistance(ohm)
x_2 = 0.003 #Secondary winding reactance(ohm)
#Calculation
alpha = V_1/V_2 #Transformation ratio
#Case(a)
I_2 = kVA*1000/V_2 #Secondary current(A)
I_1 = I_2/alpha #Primary current(A)
#Case(b)
Z_2 = complex(r_2,x_2) #Secondary internal impedance(ohm)
Z_2_m = abs(Z_2) #Magnitude of Z_2(ohm)
Z_1 = complex(r_1,x_1) #Primary internal impedance(ohm)
Z_1_m = abs(Z_1) #Magnitude of Z_1(ohm)
#Case(c)
I_2_Z_2 = I_2*Z_2_m #Secondary internal voltage drop(V)
I_1_Z_1 = I_1*Z_1_m #Primary internal voltage drop(V)
#Case(d)
E_2 = V_2+I_2_Z_2 #Secondary induced voltage(V)
E_1 = V_1-I_1_Z_1 #Primary induced voltage(V)
#Case(e)
ratio_E = E_1/E_2 #Ratio of primary to secondary induced voltage
ratio_V = V_1/V_2 #Ratio of primary to secondary terminal voltage
#Result
print('Case(a): Secondary current , I_2 = %.f A' %I_2)
print(' Primary current , I_1 = %.1f A' %I_1)
print('Case(b): Secondary internal impedance , Z_2 = %.5f Ω' %Z_2_m)
print(' Primary internal impedance , Z_1 = %.3f Ω' %Z_1_m)
print('Case(c): Secondary internal voltage drop , I_2*Z_2 = %.2f V' %I_2_Z_2)
print(' Primary internal voltage drop , I_1*Z_1 = %.1f V' %I_1_Z_1)
print('Case(d): Secondary induced voltage , E_2 = %.2f V' %E_2)
print(' Primary induced voltage , E_1 = %.1f V' %E_1)
print('Case(e): Ratio of primary to secondary induced voltages , E_1/E_2 = %.2f ' %ratio_E)
print(' Ratio of primary to secondary iterminal voltages , V_1/V_2 = %.1f ' %ratio_V)
#Variable declaration
V_1 = 2300.0 #Primary voltage(V)
V_2 = 230.0 #Secondary voltage(V)
I_2 = 2174.0 #Secondary current(A)
I_1 = 217.4 #Primary current(A)
Z_2 = 0.00316 #Secondary internal impedance(ohm)
Z_1 = 0.316 #Primary internal impedance(ohm)
#Calculation
alpha = V_1/V_2 #Transformation ratio
#Case(a)
Z_L = V_2/I_2 #Load impedance(ohm)
#Case(b)
Z_p = V_1/I_1 #Primary input impedance(ohm)
Zp = alpha**2*Z_L #Primary input impedance(ohm)
#Result
print('Case(a): Load impedance , Z_L = %.4f Ω' %Z_L)
print('Case(b): Primary input impedance , Z_p = %.2f Ω (Method 1)' %Z_p)
print(' Primary input impedance , Z_p = %.2f Ω (Method 2)' %Zp)
print('Case(c): Impedance of load Z_L = %.4f Ω, is much greater than internal secondary impedance Z_2 = %.5f Ω' %(Z_L,Z_2))
print(' Primary input impedance Z_p = %.2f Ω, is much greater than the internal primary impedance Z_1 = %.3f Ω' %(Z_p,Z_1))
print('Case(d): Z_L must be much greater than Z_2 so that major part of the voltage produced by E_2 is dropped across Z_L')
print(' As Z_L is reduced in proportion to Z_2, the load current increases and more voltage is dropped internally across Z_2')
#Variable declaration
kVA = 500.0 #Rating of the step-down transformer(kVA)
V_1 = 2300.0 #Primary voltage(V)
V_2 = 230.0 #Secondary voltage(V)
f = 60.0 #Frequency(Hz)
r_1 = 0.1 #Primary winding resistance(ohm)
x_1 = 0.3 #Primary winding reactance(ohm)
r_2 = 0.001 #Secondary winding resistance(ohm)
x_2 = 0.003 #Secondary winding reactance(ohm)
Z_L = 0.1058 #Load impedance(ohm)
#Calculation
alpha = V_1/V_2 #Transformation ratio
R_c1 = r_1+alpha**2*r_2 #Equivalent internal resistance referred to the primary side(ohm)
X_c1 = x_1+alpha**2*x_2 #Equivalent internal reactance referred to the primary side(ohm)
Z_c1 = complex(R_c1,X_c1) #Equivalent internal impedance referred to the primary side(ohm)
Z_c1_m = abs(Z_c1) #Magnitude of Z_e1(ohm)
Z_L_prime = alpha**2*Z_L #Equivalent secondary load impedance referred to the primary side(ohm)
R_L = Z_L #Load resistance(ohm)
X_L = 0 #Load reactance(ohm)
I_1 = V_1/complex((R_c1+alpha**2*R_L),(X_c1+alpha**2*X_L)) #Primary load current(A)
#Result
print('Case(a): Equivalent internal resistance referred to the primary side , R_c1 = %.1f Ω' %R_c1)
print('Case(b): Equivalent internal reactance referred to the primary side , X_c1 = %.1f Ω' %X_c1)
print('Case(c): Equivalent internal impedance referred to the primary side , Z_c1 = %.3f Ω' %Z_c1_m)
print('Case(d): Equivalent secondary load impedance referred to the primary side , α^2*Z_L = %.2f Ω' %Z_L_prime)
print('Case(e): Primary load current , I_1 = %.f A' %abs(I_1))
#Variable declaration
kVA = 500.0 #Rating of the step-down transformer(kVA)
V_1 = 2300.0 #Primary voltage(V)
V_2 = 230.0 #Secondary voltage(V)
R_e2 = 2.0 #Equivalent resistance referred to the primary side(mΩ)
X_e2 = 6.0 #Equivalent reactance referred to the primary side(mΩ)
cos_theta2 = 1.0 #Unity PF
#Calculation
I_2 = kVA/V_2 #Rated secondary current(kA)
R_e2_drop = I_2*R_e2 #Full-load equivalent resistance voltage drop(V)
X_e2_drop = I_2*X_e2 #Full-load equivalent reactance voltage drop(V)
sin_theta2 = (1-cos_theta2**2)**0.5
E_2 = complex((V_2*cos_theta2+I_2*R_e2),(V_2*sin_theta2+I_2*X_e2)) #Induced voltage(V)
E_2_m = abs(E_2) #Magnitude of E_2(V)
VR = (E_2_m-V_2)/V_2*100 #Percent voltage regulation at unity PF(%)
#Result
print('Case(a): Rated secondary current , I_2 = %.3f kA' %I_2)
print('Case(b): Full-load equivalent resistance voltage drop , I_2*R_e2 = %.2f V' %R_e2_drop)
print('Case(c): Full-load equivalent reactance voltage drop , I_2*X_e2 = %.2f V' %X_e2_drop)
print('Case(d): Induced voltage when the transformer is delivering rated current at unity PF , E_2 = %.2f V' %E_2_m)
print('Case(e): Voltage regulation at unity PF , VR = %.2f percent' %VR)
#Variable declaration
kVA = 500.0 #Rating of the step-down transformer(kVA)
V_1 = 2300.0 #Primary voltage(V)
V_2 = 230.0 #Secondary voltage(V)
R_e2 = 2.0 #Equivalent resistance referred to the primary side(mΩ)
X_e2 = 6.0 #Equivalent reactance referred to the primary side(mΩ)
cos_theta2 = 0.8 #Lagging PF
#Calculation
I_2 = kVA/V_2 #Rated secondary current(kA)
R_e2_drop = I_2*R_e2 #Full-load equivalent resistance voltage drop(V)
X_e2_drop = I_2*X_e2 #Full-load equivalent reactance voltage drop(V)
sin_theta2 = (1-cos_theta2**2)**0.5
E_2 = complex((V_2*cos_theta2+I_2*R_e2),(V_2*sin_theta2+I_2*X_e2)) #Induced voltage(V)
E_2_m = abs(E_2) #Magnitude of E_2(V)
VR = (E_2_m-V_2)/V_2*100 #Percent voltage regulation(%)
#Result
print('Case(d): Induced voltage when the transformer is delivering rated current at 0.8 PF lagging , E_2 = %.2f V' %E_2_m)
print('Case(e): Voltage regulation at 0.8 PF lagging , VR = %.2f percent' %VR)
#Variable declaration
kVA = 500.0 #Rating of the step-down transformer(kVA)
V_1 = 2300.0 #Primary voltage(V)
V_2 = 230.0 #Secondary voltage(V)
R_e2 = 2.0 #Equivalent resistance referred to the primary side(mΩ)
X_e2 = 6.0 #Equivalent reactance referred to the primary side(mΩ)
cos_theta2 = 0.6 #Leading PF
#Calculation
I_2 = kVA/V_2 #Rated secondary current(kA)
R_e2_drop = I_2*R_e2 #Full-load equivalent resistance voltage drop(V)
X_e2_drop = I_2*X_e2 #Full-load equivalent reactance voltage drop(V)
sin_theta2 = (1-cos_theta2**2)**0.5
E_2 = complex((V_2*cos_theta2+I_2*R_e2),(V_2*sin_theta2-I_2*X_e2)) #Induced voltage(V)
E_2_m = abs(E_2) #Magnitude of E_2(V)
VR = (E_2_m-V_2)/V_2*100 #Percent voltage regulation(%)
#Result
print('Case(d): Induced voltage when the transformer is delivering rated current at 0.6 PF leading , E_2 = %.1f V' %E_2_m)
print('Case(e): Voltage regulation at 0.6 PF leading , VR = %.2f percent' %VR)
import math
#Variable declaration
kVA = 20.0 #kVA rating of the step-down transformer
S = 20000.0 #Power rating of the step-down transformer in VA
V_1 = 2300.0 #Primary voltage(V)
V_2 = 230.0 #Secondary voltage(V)
P1 = 250.0 #Wattmeter reading(W)
I1 = 8.7 #Input current(A)
V1 = 50.0 #Input voltage(V)
#Calculation
alpha = V_1/V_2 #Transformation ratio
#Case(a)
Z_e1 = V1/I1 #Equivalent impedance w.r.t HV side(ohm)
R_e1 = P1/I1**2 #Equivalent resistance w.r.t HV side(ohm)
theta = math.acos(R_e1/Z_e1) #PF angle(radians)
theta_a = theta*180/math.pi #PF angle(degree)
X_e1 = Z_e1*math.sin(theta) #Equivalent reactance w.r.t HV side(ohm)
#Case(b)
Z_e2 = Z_e1/alpha**2 #Equivalent impedance w.r.t LV side(ohm)
R_e2 = R_e1/alpha**2 #Equivalent resistance w.r.t LV side(ohm)
X_e2 = Z_e2*math.sin(theta) #Equivalent reactance w.r.t LV side(ohm)
#Case(c)
I_2 = S/V_2 #Rated secondary load current(A)
R_e2_drop = I_2*R_e2 #Full-load equivalent resistance voltage drop(V)
X_e2_drop = I_2*X_e2 #Full-load equivalent reactance voltage drop(V)
cos_theta2 = 1.0 #Unity PF
sin_theta2 = (1-cos_theta2**2)**0.5
E_2 = complex((V_2*cos_theta2+I_2*R_e2),(V_2*sin_theta2+I_2*X_e2)) #Induced voltage(V)
E_2_m = abs(E_2) #Magnitude of E_2(V)
VR_unity_PF = (E_2_m-V_2)/V_2*100 #Transformer voltage regulation(%)
#Case(d)
cos_theta_2 = 0.7 #Lagging PF
sin_theta_2 = (1-(cos_theta_2)**2)**0.5
E2 = complex((V_2*cos_theta_2+I_2*R_e2),(V_2*sin_theta_2+I_2*X_e2)) #Induced voltage(V)
E2_m = abs(E2) #Magnitude of E2(V)
VR_lag_PF = (E2_m-V_2)/V_2*100 #Transformer voltage regulation(%)
#Result
print('Case(a): Equivalent impedance referred to HV side , Z_e1 = %.2f Ω' %Z_e1)
print(' Equivalent resistance referred to HV side , R_e1 = %.1f Ω' %R_e1)
print(' Equivalent reactance referred to HV side , X_e1 = %.2f Ω' %X_e1)
print('Case(b): Equivalent impedance referred to LV side , Z_e2 = %.1f mΩ' %(1000*Z_e2))
print(' Equivalent resistance referred to LV side , R_e2 = %.f mΩ' %(1000*R_e2))
print(' Equivalent reactance referred to LV side , X_e2 = %.1f mΩ' %(1000*X_e2))
print('Case(c): Transformer voltage regulation , VR = %.2f percent' %VR_unity_PF)
print('Case(c): Transformer voltage regulation , VR = %.2f percent' %VR_lag_PF)
#Variable declaration
V1_rated = 2300.0 #Primary voltage(V)
V_sc = 50.0 #Short circuit test voltage(V)
#Calculation
Pc_sc_Pc = (V_sc/V1_rated)**2 #Fraction of rated core loss
#Result
print('Fraction of P_c measured by wattmeter , P_c(sc) = %.6f*P_c ' %Pc_sc_Pc)
import math
#Variable declaration
kVA = 20.0 #kVA rating of the step-down transformer
S = 20000.0 #Power rating of the step-down transformer in VA
V_1 = 2300.0 #Primary voltage(V)
V_2 = 230.0 #Secondary voltage(V)
P1 = 250.0 #Wattmeter reading(W)
I1 = 8.7 #Input current(A)
V1 = 50.0 #Input voltage(V)
#Calculation
#Case(a)
I1_Ze1 = V1 #HV impedance drop(V)
#Case(b)
theta = math.acos(P1/(V1*I1)) #PF angle(radian)
theta_a = theta*180/math.pi #PF angle(degree)
I1_Re1 = I1_Ze1*math.cos(theta) #HV side resistance volt drop(V)
#Case(c)
I1_Xe1 = I1_Ze1*math.sin(theta) #HV side resistance volt drop(V)
#Case(d)
cos_theta1 = 1.0 #Unity PF
sin_theta1 = (1-cos_theta1**2)**0.5
E1 = complex((V_1*cos_theta1+I1_Re1),(V_1*sin_theta1+I1_Xe1)) #Induced voltage(V)
E1_m = abs(E1) #Magnitude of E1(V)
VR = (E1_m-V_1)/V_1*100 #Transformer voltage regulation at unity PF(%)
#Case(e)
cos_theta_1 = 0.7 #Lagging PF
sin_theta_1 = (1-cos_theta_1**2)**0.5
E_1 = complex((V_1*cos_theta_1+I1_Re1),(V_1*sin_theta_1+I1_Xe1)) #Induced voltage(V)
E_1_m = abs(E_1) #Magnitude of E_1(V)
VR_1 = (E_1_m-V_1)/V_1*100 #Transformer voltage regulation at 0.7 PF lagging(%)
#Result
print('Case(a): High voltage impedance drop , I_1*Z_e1 = %.f V' %I1_Ze1)
print('Case(b): HV side resistance volt drop , I_1*R_e1 = %.2f V' %I1_Re1)
print('Case(c): HV side reactance volt drop , I_1*X_e1 = %.2f V' %I1_Xe1)
print('Case(d): Transformer voltage regulation at unity PF , VR = %.2f percent' %VR)
print('Case(e): Transformer voltage regulation at 0.7 PF lagging , VR = %.2f percent' %VR_1)
#Variable declaration
kVA = 500.0 #kVA rating of the step-down transformer
V_1 = 2300.0 #Primary voltage(V)
V_2 = 208.0 #Secondary voltage(V)
f = 60.0 #Frequency(Hz)
P_sc = 8200.0 #Wattmeter reading in SC test(W)
I_sc = 217.4 #Short circuit current(A)
V_sc = 95.0 #Short circuit voltage(V)
P_oc = 1800.0 #Wattmeter reading in OC test(W)
I_oc = 85.0 #Open circuit current(A)
V_oc = 208.0 #Open circuit voltage(V)
#Calculation
alpha = V_1/V_2 #Transformation ratio
#Case(a)
P = P_sc #Wattmeter reading(W)
I1 = I_sc #Short circuit current(A)
R_e1 = P/(I1)**2 #Equivalent resistance w.r.t HV side(ohm)
R_e2 = R_e1/alpha**2 #Equivalent resistance referred to LV side(ohm)
#Case(b)
r_2 = R_e2/2 #Resistance of low-voltage side(ohm)
#Case(c)
I_m = I_oc #Open circuit current(A)
P_cu = I_m**2*r_2 #Transformer copper loss of the LV side winding during OC-test(W)
#Case(d)
P_c = P_oc-P_cu #Transformer core loss(W)
#Result
print('Case(a): Equivalent resistance to low voltage side , R_e2 = %.3f mΩ' %(1000*R_e2))
print('Case(b): Resistance of low voltage side , r_2 = %.2f mΩ' %(1000*r_2))
print('Case(c): Transformer copper loss of the LV side winding during OC-test , I_m^2*r_2 = %.2f W' %P_cu)
print('Case(d): Transformer core loss when rated voltage is applied , P_c = %.1f W' %P_c)
print('Case(e): Yes.The error is approximately 5/1800 = 0.278 percent, which is within error produced by the instruments used in test');
print(' We may assume that the core loss is %d W' %P_oc)
#Variable declaration
V_sc = 50.0 #Short circuit voltage(V)
V_1 = 2300.0 #Rated primary voltage(V)
P_c = 1.8 #Core losses(kW)
P_k = 1.8 #Fixed losses(kW)
P_cu_rated = 8.2 #Rated copper loss(kW)
kVA = 500.0 #Power rating(kVA)
PF = 1.0 #Power factor
P_o = kVA*PF #Full-load output at unity PF(kW)
#Calculation
#Case(a)
LF1 = 1.0/4 #Load fraction
LF2 = 1.0/2 #Load fraction
LF3 = 3.0/4 #Load fraction
LF4 = 5.0/4 #Load fraction
P_cu_fl = 8.2 #Equivalent copper loss at full-load slip(kW)
P_cu_LF1 = LF1**2*P_cu_fl #Equivalent copper loss at 1/4 rated load(kW)
P_cu_LF2 = LF2**2*P_cu_fl #Equivalent copper loss at 1/2 rated load(kW)
P_cu_LF3 = LF3**2*P_cu_fl #Equivalent copper loss at 3/4 rated load(kW)
P_cu_LF4 = LF4**2*P_cu_fl ; #Equivalent copper loss at 5/4 rated load(kW)
P_L_fl = P_c+P_cu_fl #Total losses at rated load(kW)
P_L_1 = P_c+P_cu_LF1 #Total losses at 1/4 rated load(kW)
P_L_2 = P_c+P_cu_LF2 #Total losses at 1/2 rated load(kW)
P_L_3 = P_c+P_cu_LF3 #Total losses at 3/4 rated load(kW)
P_L_4 = P_c+P_cu_LF4 #Total losses at 5/4 rated load(kW)
P_o_fl = P_o #Total output at rated load(kW)
P_o_1 = P_o*LF1 #Total output at 1/4 rated load(kW)
P_o_2 = P_o*LF2 #Total output at 1/2 rated load(kW)
P_o_3 = P_o*LF3 #Total output at 3/4 rated load(kW)
P_o_4 = P_o*LF4 #Total output at 5/4 rated load(kW)
P_in_fl = P_L_fl+P_o_fl #Total input at rated load(kW)
P_in_1 = P_L_1+P_o_1 #Total input at 1/4 rated load(kW)
P_in_2 = P_L_2+P_o_2 #Total input at 1/2 rated load(kW)
P_in_3 = P_L_3+P_o_3 #Total input at 3/4 rated load(kW)
P_in_4 = P_L_4+P_o_4 #Total input at 5/4 rated load(kW)
n_fl = (P_o_fl/P_in_fl)*100 #Efficiency at rated load(%)
n_1 = (P_o_1/P_in_1)*100 #Efficiency at 1/4 rated load(%)
n_2 = (P_o_2/P_in_2)*100 #Efficiency at 1/2 rated load(%)
n_3 = (P_o_3/P_in_3)*100 #Efficiency at 3/4 rated load(%)
n_4 = (P_o_4/P_in_4)*100 #Efficiency at 5/4 rated load(%)
#Case(b)
PF_b = 0.8 #PF lagging
Po_fl = P_o*PF_b #Total output at 1rated load(kW)
Po_1 = P_o*LF1*PF_b #Total output at 1/4 rated load(kW)
Po_2 = P_o*LF2*PF_b #Total output at 1/2 rated load(kW)
Po_3 = P_o*LF3*PF_b #Total output at 3/4 rated load(kW)
Po_4 = P_o*LF4*PF_b #Total output at 5/4 rated load(kW)
Pin_fl = P_L_fl+Po_fl #Total input at rated load(kW)
Pin_1 = P_L_1+Po_1 #Total input at 1/4 rated load(kW)
Pin_2 = P_L_2+Po_2 #Total input at 1/2 rated load(kW)
Pin_3 = P_L_3+Po_3 #Total input at 3/4 rated load(kW)
Pin_4 = P_L_4+Po_4 #Total input at 5/4 rated load(kW)
nfl = (Po_fl/Pin_fl)*100 #Efficiency at rated load(%)
n1 = (Po_1/Pin_1)*100 #Efficiency at 1/4 rated load(%)
n2 = (Po_2/Pin_2)*100 #Efficiency at 1/2 rated load(%)
n3 = (Po_3/Pin_3)*100 #Efficiency at 3/4 rated load(%)
n4 = (Po_4/Pin_4)*100 #Efficiency at 5/4 rated load(%)
#Case(c)
R_e2 = 1.417*10**-3 #Equivalent resistance referred to LV side(ohm)
Pc = 1800.0 #Core losses(W)
I_2 = (Pc/R_e2)**0.5 #Load current for maximum efficiency invariant of LF(A)
#Case(d)
V = 208.0 #Voltage rating(V)
I_2_rated = kVA*1000/V #Rated secondary current(A)
LF_max = I_2/I_2_rated #Load fraction for maximum efficiency
#Case(e)
cos_theta = 1.0 #Unity PF
V_2 = V #Secondary voltage(V)
n_max_e = (V_2*I_2*cos_theta)/((V_2*I_2*cos_theta)+(Pc+I_2**2*R_e2))*100 #Maximum efficiency(%)
#Case(f)
cos_theta2 = 0.8 #PF lagging
n_max_f = (V_2*I_2*cos_theta2)/((V_2*I_2*cos_theta2)+(Pc+I_2**2*R_e2))*100 #Maximum efficiency(%)
#Result
print('Case(a): Tabulation at unity PF:')
print('__________________________________________________________________________________________________________')
print('L.F \t Core loss \t Copper loss \tTotal loss \t Total Output \t Total Input \t Efficiency')
print(' \t (kW) \t (kW) \t P_L (kW) \t P_o(kW) \t P_L+P_o(kW) \t P_o/P_in(percent)')
print('__________________________________________________________________________________________________________')
print('%.2f \t %.1f \t\t %.3f \t %.3f \t\t %.1f \t %.2f \t %.2f' %(LF1,P_c,P_cu_LF1,P_L_1,P_o_1,P_in_1,n_1))
print('%.2f \t %.1f \t\t %.3f \t %.2f \t\t %.1f \t %.2f \t %.2f' %(LF2,P_c,P_cu_LF2,P_L_2,P_o_2,P_in_2,n_2))
print('%.2f \t %.1f \t\t %.3f \t %.2f \t\t %.1f \t %.2f \t %.2f' %(LF3,P_c,P_cu_LF3,P_L_3,P_o_3,P_in_3,n_3))
print('1 \t %.1f \t\t %.3f \t %.2f \t\t %.1f \t %.1f \t %.2f' %(P_c,P_cu_fl,P_L_fl,P_o_fl,P_in_fl,n_fl))
print('%.2f \t %.1f \t\t %.3f \t %.1f \t\t %.1f \t %.1f \t %.2f' %(LF4,P_c,P_cu_LF4,P_L_4,P_o_4,P_in_4,n_4))
print('__________________________________________________________________________________________________________')
print('\nCase(b): Tabulation at 0.8 PF lagging:')
print('__________________________________________________________________________________________________________')
print('L.F \t Core loss \t Copper loss \tTotal loss \t Total Output \t Total Input \t Efficiency')
print('\t (kW) \t (kW) \t P_L (kW) \t P_o(kW) \t P_L+P_o(kW)\t P_o/P_in(percent)')
print('__________________________________________________________________________________________________________')
print('%.2f \t %.1f \t\t %.3f \t %.3f \t\t %.1f \t %.2f \t %.2f' %(LF1,P_c,P_cu_LF1,P_L_1,Po_1,Pin_1,n1))
print('%.2f \t %.1f \t\t %.2f \t %.2f \t\t %.1f \t %.2f \t %.2f' %(LF2,P_c,P_cu_LF2,P_L_2,Po_2,Pin_2,n2))
print('%.2f \t %.1f \t\t %.2f \t %.2f \t\t %.1f \t %.2f \t %.2f' %(LF3,P_c,P_cu_LF3,P_L_3,Po_3,Pin_3,n3))
print('1 \t %.1f \t\t %.1f \t\t %.2f \t\t %.1f \t %.f \t\t %.2f' %(P_c,P_cu_fl,P_L_fl,Po_fl,Pin_fl,nfl))
print('%.2f \t %.1f \t\t %.1f \t %.1f \t\t %.1f \t %.1f \t %.2f' %(LF4,P_c,P_cu_LF4,P_L_4,Po_4,Pin_4,n4))
print('__________________________________________________________________________________________________________\n')
print('Case(c): Load current at which maximum efficiency occurs regardless of load PF , I_2 = %.1f A' %I_2)
print('Case(d): Load fraction at which maximum efficiency occurs = %.3f (approximately half rated load)' %LF_max)
print('Case(e): Maximum efficiency at unity PF , η_max = %.2f percent' %n_max_e)
print('Case(f): Maximum efficiency at 0.8 PF lagging , η_max = %.2f percent' %n_max_f)
import math
import cmath
#Variable declaration
V_1 = 2300.0 #Primary voltage(V)
V_2 = 230.0 #Secondary voltage(V)
P = 20.0 #Power rating of the transformer(kVA)
P_sc = 250.0 #Power measured(W)
V_sc = 50.0 #Short circuit voltage(V)
I_sc = 8.7 #Short circuit current(A)
#Calculation
#Case(a)
V_1b = V_1 #Base voltage(V)
Z_eq_pu = V_sc/V_1
beta = math.acos(P_sc/(V_sc*I_sc)) #Angle(radian)
beta_a = beta*180/math.pi #Angle(degree)
Zeq_pu = Z_eq_pu*cmath.exp(1j*beta) #Equivalent pu impedance
#Case(b)
PF_b = 1.0 #Unity PF
theta_b = math.acos(PF_b)*180/math.pi #PF angle(degree)
V_1_pu = 1.0*cmath.exp(1j*0*math.pi/180)+1.0*cmath.exp(1j*theta_b*math.pi/180)*Zeq_pu #pu voltage
V_1_pu_m = abs(V_1_pu) #Magnitude of V_1_pu
#Case(c)
theta = math.acos(0.7)*180/math.pi #Power factor angle(degrees)
V1_pu = 1.0*cmath.exp(1j*0*math.pi/180)+1.0*cmath.exp(1j*(-theta)*math.pi/180)*Zeq_pu #pu voltage
V1_pu_m = abs(V1_pu) #Magnitude of V1_pu
#Case(d)
VR_unity_PF = (V_1_pu_m-1.0)*100 #Voltage regulation at unity PF(%)
#Case(e)
VR_lag_PF = (V1_pu_m-1.0)*100 #Voltage regulation at 0.7 lagging PF(%)
#Result
print('Case(a): Z_eq(pu)∠β = %.5f∠%.f° p.u' %(abs(Z_eq_pu),beta_a))
print('Case(b): V_1(pu) at unity PF , |V_1(pu)| = %.4f ' %V_1_pu_m)
print('Case(c): V_1(pu) at 0.7 PF lagging , |V_1(pu)| = %.5f ' %V1_pu_m)
print('Case(d): Voltage regulation at unity PF , VR = %.2f percent' %VR_unity_PF)
print('Case(e): Voltage regulation at 0.7 PF lagging , VR = %.2f percent' %VR_lag_PF)
print('Case(f): VRs as found by p.u method are essentially the same as those found in Exs.14-17 and 14-19 using the same data, for the same transformer but with much less effort')
#Variable declaration
V_1 = 2300.0 #Primary voltage(V)
V_2 = 230.0 #Secondary voltage(V)
S = 500.0 #Power rating of the transformer(kVA)
f= 60.0 #Frequency(Hz)
V_oc = 208.0 #Open circuit voltage(V)
I_oc = 85.0 #Open circuit current(A)
P_oc = 1800.0 #Power measured(W)
V_sc = 95.0 #Short circuit voltage(V)
I_sc = 217.4 #Short circuit current(A)
P_sc = 8200.0 #Power measured(W)
#Calculation
#Case(a)
S_b = S ; #Base voltage(kVA)
Psc = 8.2 #Power measured in kW during SC-test
P_Cu_pu = Psc/S_b #Per unit value of P_Cu at rated load
#Case(b)
Poc = 1.8 #Power measured during OC-test(kW)
P_CL_pu = Poc/S_b #Per unit value of P_CL at rated load
#Case(c)
PF = 1.0 #Unity Power factor
n_pu = PF/(PF+P_CL_pu+P_Cu_pu)*100 #Efficiency at rated load,unity PF(%)
#Case(d)
PF_d = 0.8 #Lagging Power factor
n_pu_d = PF_d/(PF_d+P_CL_pu+P_Cu_pu)*100 #Efficiency at rated load,0.8 lagging PF
#Case(e)
LF = (P_CL_pu/P_Cu_pu)**0.5 #Load fraction producing maximum efficiency
#Case(f)
n_pu_max = (LF*PF)/((LF*PF)+2*(P_CL_pu))*100 #Maximum efficiency at unity PF load
#Case(f)
n_pu_max_g = (LF*PF_d)/((LF*PF_d)+2*(P_CL_pu))*100 #Maximum efficiency at 0.8 lagging PF load
#Result
print('Case(a): Per unit copper loss at rated load , P_Cu(pu) = %.4f p.u = R_eq(pu)' %P_Cu_pu)
print('Case(b): Per unit core loss at rated load , P_CL(pu) = %.4f p.u' %P_CL_pu)
print('Case(c): Efficiency at rated load, unity PF , η_pu = %.2f percent' %n_pu)
print('Case(d): Efficiency at rated load, 0.8 PF lagging , η_pu = %.2f percent' %n_pu_d)
print('Case(e): Load fraction producing maximum efficiency , L.F = %.3f ' %LF)
print('Case(f): Maximum efficiency at unity PF load , η_pu = %.2f percent' %n_pu_max)
print('Case(g): Maximum efficiency at 0.8 PF lagging , η_pu = %.2f percent' %n_pu_max_g)
print('Case(h): All efficiency values are identical to those computed in solution to Ex.14-21')
print('Case(i): Per-unit method is much simpler and less subject to error than conventional method')
#Variable declaration
V_1 = 2300.0 #Primary voltage(V)
V_2 = 230.0 #Secondary voltage(V)
S = 500.0 #Power rating of the transformer(kVA)
f= 60.0 #Frequency(Hz)
V_oc = 208.0 #Open circuit voltage(V)
I_oc = 85.0 #Open circuit current(A)
P_oc = 1800.0 #Power measured(W)
V_sc = 95.0 #Short circuit voltage(V)
I_sc = 217.4 #Short circuit current(A)
P_sc = 8200.0 #Power measured(W)
#Calculation
S_b = S ; #Base voltage(kVA)
Psc = 8.2 #Power measured in kW during SC-test
P_Cu_pu = Psc/S_b #Per unit value of P_Cu at rated load
Poc = 1.8 #Power measured during OC-test(kW)
P_CL_pu = Poc/S_b #Per unit value of P_CL at rated load
#Case(a)
LF1 = 3.0/4 #Load fraction of rated load
PF1 = 1.0 #Unity Power factor
n_pu_LF1 = (LF1*PF1)/((LF1*PF1)+P_CL_pu+(LF1)**2*P_Cu_pu)*100 #Efficiency at rated load,unity PF(%)
#Case(b)
LF2 = 1.0/4 #Load fraction of rated load
PF2 = 0.8 #Lagging PF
n_pu_LF2 = (LF2*PF2)/((LF2*PF2)+P_CL_pu+(LF2)**2*P_Cu_pu)*100 #Efficiency at 1/4 rated load,0.8 lagging PF(%)
#Case(c)
LF3 = 5.0/4 #Load fraction of rated load
PF3 = 0.8 #Leading PF
n_pu_LF3 = (LF3*PF3)/((LF3*PF3)+P_CL_pu+(LF3)**2*P_Cu_pu)*100 #Efficiency at r1/4 rated load,0.8 leading PF(%)
#Result
print('Case(a): p.u efficiency at 3/4 load unity PF , η_pu = %.2f percent' %n_pu_LF1)
print('Case(b): p.u efficiency at 1/4 load 0.8 PF lagging , η_pu = %.2f percent' %n_pu_LF2)
print('Case(c): p.u efficiency at 5/4 load 0.8 PF leading , η_pu = %.2f percent' %n_pu_LF3)
import math
import cmath
#Variable declaration
kVA_1 = 500.0 #Power rating of the transformer 1(kVA)
R_1_pu = 0.01 #Per-unit value of resistance of the transformer 1
X_1_pu = 0.05 #Per-unit value of reactance of the transformer 1
Z_1_pu = complex(R_1_pu,X_1_pu) #Per-unit value of impedance of the transformer 1
PF = 0.8 #Lagging PF
V_2 = 400.0 #Secondary voltage(V)
S_load = 750.0 #Increased system load(kVA)
kVA_2 = 250.0 #Power rating of the transformer 2(kVA)
R_pu_2 = 0.015 #Per-unit value of resistance of the transformer 2
X_pu_2 = 0.04 #Per-unit value of reactance of the transformer 2
#Calculation
Z_pu_1 = complex(R_pu_2,X_pu_2) #New transformer p.u. impedance
#Case(a)
V_b1 = 400.0 #Base voltage(V)
V_b2 = 400.0 #Base voltage(V)
Z_pu_2 = (kVA_1/kVA_2)*(V_b1/V_b2)**2*(Z_pu_1) #New transformer p.u impedance
Z_2_pu = Z_pu_2 #New transformer p.u impedance
#Case(b)
cos_theta = PF #Power factor
sin_theta = (1-(cos_theta)**2)**0.5
S_t_conjugate = (kVA_1+kVA_2)*complex(cos_theta,sin_theta) #kVA of total load
#Case(c)
S_2_conjugate = S_t_conjugate*(Z_1_pu/(Z_1_pu+Z_2_pu)) #Portion of load carried by the smaller transformer(kVA)
S_2_conjugate_m = abs(S_2_conjugate) #Magnitude of S_2_conjugate(kVA)
S_2_conjugate_a = cmath.phase(S_2_conjugate)*180/math.pi #Phase angle of S_2_conjugate(degree)
#Case(d)
S_1_conjugate = S_t_conjugate*(Z_2_pu/(Z_1_pu+Z_2_pu)) #Portion of load carried by the original transformer(kVA)
S_1_conjugate_m = abs(S_1_conjugate) #Magnitude of S_1_conjugate(kVA)
S_1_conjugate_a = cmath.phase(S_1_conjugate)*180/math.pi #Phase angle of S_1_conjugate(degree)
#Case(e)
S_1 = S_1_conjugate_m
S_b1 = kVA_1 #Base power of trancsformer 1(kVA)
LF1 = (S_1/S_b1)*100 #Load factor of the original transformer(%)
#Case(f)
S_2 = S_2_conjugate_m
S_b2 = kVA_2 #Base power of trancsformer 1(kVA)
LF2 = (S_2/S_b2)*100 #Load factor of the new transformer(%)
#Result
print('Case(a): New transformer p.u impedance , Z_p.u.2 = (%.2f+j%.2f) p.u' %(Z_pu_2.real,Z_pu_2.imag))
print('Case(b): kVA of total load , S*_t = (%.f+j%.f) kVA ' %(S_t_conjugate.real,S_t_conjugate.imag))
print('Case(c): Portion of load now carried by the smaller transformer , S*_2 = (%.2f+j%.2f) kVA = %.1f∠%.1f° kVA' %(S_2_conjugate.real,S_2_conjugate.imag,S_2_conjugate_m,S_2_conjugate_a))
print('Case(d): Portion of load now carried by the original transformer , S*_1 = (%.2f+j%.1f) kVA = %.1f∠%.1f° kVA' %(S_1_conjugate.real,S_1_conjugate.imag,S_1_conjugate_m,S_1_conjugate_a))
print('Case(e): Load factor of the original transformer , L.F_1 = %.1f percent' %LF1)
print('Case(f): Load factor of the new transformer , L.F_w = %.1f percent' %LF2)
print('Case(g): Yes. Reduce no-load voltage of the new transformer to some value below that of its present value so that its share of the load is reduced')
import math
import cmath
#Variable declaration
kVA_1 = 500.0 #Power rating of the transformer 1(kVA)
R_1_pu = 0.01 #Per-unit value of resistance of the transformer 1
X_1_pu = 0.05 #Per-unit value of reactance of the transformer 1
Z_1_pu = complex(R_1_pu,X_1_pu) #Per-unit value of impedance of the transformer 1
PF = 0.8 #Lagging PF
V = 400.0 #Secondary voltage(V)
S_load = 750.0 #Increased system load(kVA)
kVA_2 = 250.0 #Power rating of the transformer 2(kVA)
R_pu_2 = 0.015 #Per-unit value of resistance of the transformer 2
X_pu_2 = 0.04 #Per-unit value of reactance of the transformer 2
#Calculation
Z_pu_1 = complex(R_1_pu,X_1_pu) #New transformer p.u. impedance
Z_pu1 = complex(R_pu_2,X_pu_2) #New transformer p.u. impedance
#Case(a)
V_b = V #Base voltage(V)
#Case(b)
S_b = kVA_1 #Base power(kVA)
I_b = S_b/V_b*1000 #Base current(A)
#Case(c)
Zb = V_b/I_b #Base impedance(ohm). Method 1
Z_b = V**2/(S_b*1000) #Base impedance(ohm). Method 2
#Case(d)
Z_1 = Z_b*Z_pu_1*1000 #Actual impedance of larger transformer(mΩ)
Z_1_m = abs(Z_1) #Magnitude of Z_1(Ω)
Z_1_a = cmath.phase(Z_1)*180/math.pi #Phase angle of Z_1(degree)
#Case(e)
V_b1 = V_b #Base voltage(V)
V_b2 = V_b #Base voltage(V)
Z_pu_2 = (kVA_1/kVA_2)*(V_b1/V_b2)**2*(Z_pu1) #New transformer p.u impedance
Z_2_pu = Z_pu_2
Z_2 = Z_b*Z_2_pu*1000 #Actual impedance of smaller transformer(mΩ)
Z_2_m = abs(Z_2) #Magnitude of Z_2(Ω)
Z_2_a = cmath.phase(Z_2)*180/math.pi #Phase angle of Z_2(degree)
#Case(f)
cos_theta = 0.8 #Lagging power factor
sin_theta = (1-(cos_theta)**2)**0.5
S_T = (kVA_1+kVA_2)*complex(cos_theta,-sin_theta) #kVA of total load
I_T = S_T*1000/V_b #Total current(A)
I_1 = I_T*(Z_2/(Z_1+Z_2)) #Actual current delivered by larger transformer(A)
I_1_m = abs(I_1) #Magnitude of I_1(A)
I_1_a = cmath.phase(I_1)*180/math.pi #Phase angle of I_1(degree)
#Case(g)
I_2 = I_T*(Z_1/(Z_1+Z_2)) #Actual current delivered by smaller transformer(A)
I_2_m = abs(I_2) #Magnitude of I_2(A)
I_2_a = cmath.phase(I_2)*180/math.pi #Phase angle of I_2(degree)
#Case(h)
Z1 = Z_1/1000 #Actual impedance of larger transformer(Ω)
E_1 = I_1*Z1+V_b #No-load voltage of larger transformer(V)
E_1_m = abs(E_1) #Magnitude of E_1(V)
E_1_a = cmath.phase(E_1)*180/math.pi #Phase angle of E_1(degree)
#Case(i)
Z2 = Z_2/1000 #Actual impedance of smaller transformer(Ω)
E_2 = I_2*Z2+V_b #No-load voltage of smaller transformer(V)
E_2_m = abs(E_2) #Magnitude of E_2(V)
E_2_a = cmath.phase(E_2)*180/math.pi #Phase angle of E_2(degree)
#Result
print('Case(a): Base voltage , V_b = %.f V' %V_b)
print('Case(b): Base current , I_b = %.2f kA' %(I_b/1000))
print('Case(c): Base impedance , Z_b = %.2f Ω (Method 1)' %Zb)
print(' Base impedance , Z_b = %.2f Ω (Method 2)' %Z_b)
print('Case(d): Actual impedance of larger transformer , Z_1 = %.2f∠%.1f° mΩ' %(Z_1_m,Z_1_a))
print('Case(e): Actual impedance of smaller transformer , Z_2 = %.2f∠%.2f° mΩ' %(Z_2_m,Z_2_a))
print('Case(f): Actual current delivered by larger transformer , I_1 = %.f∠%.2f° A' %(I_1_m,I_1_a))
print('Case(g): Actual current delivered by smaller transformer , I_2 = %.1f∠%.1f° A' %(I_2_m,I_2_a))
print('Case(h): No-load voltage of larger transformer , E_1 = %.2f∠%.2f° V' %(E_1_m,E_1_a))
print('Case(i): No-load voltage of smaller transformer , E_2 = %.2f∠%.2f° V' %(E_2_m,E_2_a))
import math
import cmath
#Variable declaration
P_L = 14400.0 #Load output power(W)
V_L = 120.0 #Load voltage(V)
V_b1 = 120.0 #Base voltage at point 1(V)
V_b2 = 600.0 #Base voltage at point 2(V)
V_b3 = 120.0 #Base voltage at point 3(V)
S_b3 = 14.4 #Base power(kVA)
X_2 = 0.25 #Reactance(p.u)
X_1 = 0.2 #Reactance(p.u)
I_L = 120.0 #Load current(A)
#Calculation
#Case(a)
R_L = P_L/(V_L**2) #Resistance of the load(ohm)
#Case(b)
Z_bL = (V_b3**2)/(S_b3*1000) #Base impedance(ohm)
#Case(c)
Z_L_pu = R_L/Z_bL #Per unit load impedance
#Case(d)
Z_2_pu = complex(0,X_2) #Per unit impedance of T2
#Case(e)
Z_1_pu = complex(0,X_1) #Per unit impedance of T1
#Case(g)
I_bL = (S_b3*1000)/V_b3 #Base current in load(A)
#Case(h)
I_L_pu = I_L/I_bL #Per unit load current
#Case(i)
V_R_pu = I_L_pu*Z_L_pu #Per unit voltage across load
#Case(j)
I_S_pu = I_L_pu #Per unit current of source
Z_T_pu = Z_L_pu+Z_1_pu+Z_2_pu #Total p.u impedance
V_S_pu = I_S_pu*Z_T_pu #Per unit voltage of source
V_S_pu_m = abs(V_S_pu) #Magnitude of V_S_pu
V_S_pu_a = cmath.phase(V_S_pu)*180/math.pi #Phase angle of V_S_pu(degrees)
#Case(k)
V_S = V_S_pu*V_b1 #Actual voltage across source(V)
V_S_m = abs(V_S) #Magnitude of V_S(V)
V_S_a = cmath.phase(V_S)*180/math.pi #Phase angle of V_S(degrees)
#Case(l)
I_x_pu = I_L_pu #p.u current at point x
Z_x_pu = Z_L_pu+Z_2_pu #p.u impedance at point x
V_x_pu = I_x_pu*Z_x_pu #p.u voltage at point x
#Case(m)
V_x = V_x_pu*V_b2 #Actual voltage at point x(V)
V_x_m = abs(V_x) #Magnitude of V_x(V)
V_x_a = cmath.phase(V_x)*180/math.pi #Phase angle of V_x(degrees)
#Result
print('Case(a): Resistance of the load , R_L = %.f Ω' %R_L)
print('Case(b): Base impedance of the load , Z_bL = %.f Ω' %Z_bL)
print('Case(c): Per-unit load impedance , Z_L(pu) = (%.f+j%.f) p.u' %(Z_L_pu.real,Z_L_pu.imag))
print('Case(d): Per-unit impedance of transformer T2 , Z_2(pu) = j%.2f p.u' %Z_2_pu.imag)
print('Case(e): Per-unit impedance of transformer T1 , Z_1(pu) = j%.1f p.u' %Z_2_pu.imag)
print('Case(f): See Fig.14-23b in textbook page no-526')
print('Case(g): Base current in the load , I_bL = %.f A (resistive)' %I_bL)
print('Case(h): Per-unit load current , I_L_pu = (%.f+j%.f) p.u' %(I_L_pu.real,I_L_pu.imag))
print('Case(i): Per-unit voltage across load , V_R_pu = (%.f+j%.f) p.u' %(V_R_pu.real,V_R_pu.imag))
print('Case(j): Per-unit voltage of source , V_S_pu = %.3f∠%.2f° pu' %(V_S_pu_m,V_S_pu_a))
print('Case(k): Actual voltage across source , V_S = %.1f∠%.2f° pu' %(V_S_m,V_S_a))
print('Case(l): Per-unit voltage at point x in the second transmission loop , V_x(pu) = (%.f+j%.2f) p.u' %(V_x_pu.real,V_x_pu.imag))
print('Case(m): Voltage at point x , V_x = %.1f∠%.f° V' %(V_x_m,V_x_a))
import math
import cmath
#Variable declaration
V_1 = 11.0 #Tr.1 voltage(kV)
V_b1 = 11.0 #Base Tr.1 voltage(kV)
S_1 = 50.0 #KVA rating of power for Tr.1
S_2 = 100.0 #KVA rating of power for Tr.2
Z_1_pu = complex(0,0.1) #Per unit impedance of Tr.1
Z_2_pu = complex(0,0.1) #Per unit impedance of Tr.2
V_b2 = 55.0 #Base Tr.2 voltage(kV)
S_b = 100.0 #Base power(kVA)
PF = 0.8 #Power factor of the load
Z_line = complex(0,200) #Line impedance(ohm)
V_L = 10.0 #Load voltage(kV)
V_Lb3 = 11.0 #Base line voltage at point 3(V)
V_b3 = 11.0 #Line voltage at point 3(V)
P_L = 50.0 #Power rating of each transformer(kW)
cos_theta_L = 0.8 #Lagging PF of load
#Calculation
#Case(a)
Z_T1 = Z_1_pu*(V_1/V_b1)**2*(S_2/S_1) #p.u impedance of T1
#Case(b)
Z_T2 = Z_2_pu*(V_1/V_b3)**2*(S_2/S_1) #p.u impedance of T2
#Case(c)
V_b = V_b2 #Base voltage(V)
Z_b_line = (V_b**2)/S_b*1000 #Base line impedance(ohm)
Z_line_pu = Z_line/Z_b_line #p.u impedance of the transmission line
#Case(d)
V_L_pu = V_L/V_Lb3 #p.u voltage across load
#Case(f)
I_bL = S_b/V_b3 #Base current in load(A)
#Case(g)
VL = V_b3 #Load voltage(kV)
I_L = P_L/(VL*cos_theta_L) #Load current(A)
I_L_pu = I_L/I_bL #p.u load current
theta = math.acos(cos_theta_L) #PF angle(radian)
theta_a = theta*180/math.pi #PF angle(degree)
I_Lpu = I_L_pu*complex(math.cos(theta),-math.sin(theta)) #p.u current in complex form
#Case(h)
Z_series_pu = Z_T1+Z_line_pu+Z_T2 #p.u series impedance of the transmission line
V_S_pu = I_Lpu*Z_series_pu+V_L_pu #p.u source voltage
V_S_pu_m = abs(V_S_pu) #Magnitude of V_S_pu
V_S_pu_a = cmath.phase(V_S_pu)*180/math.pi #Phase angle of V_S_pu(degrees)
#Case(i)
V_S = V_S_pu*V_b1 #Actual value of source voltage(kV)
V_S_m = abs(V_S) #Magnitude of V_S_pu(kV)
V_S_a = cmath.phase(V_S)*180/math.pi #Phase angle of V_S(degrees)
#Result
print('Case(a): Per-unit impedance of transformer T1 , Z_T1 = j%.1f p.u' %Z_T1.imag)
print('Case(b): Per-unit impedance of transformer T2 , Z_T2 = j%.1f p.u' %Z_T2.imag)
print('Case(c): Per-unit impedance of transmission line , Z(line)_pu = j%.4f p.u' %Z_line_pu.imag)
print('Case(d): Per-unit voltage across load , V_L_pu = (%.3f+j%.f) p.u' %(V_L_pu.real,V_L_pu.imag))
print('Case(e): See Fig.14-24b in textbook Page no-527')
print('Case(f): Base current in load , I_bL = %.3f A' %I_bL)
print('Case(g): Per-unit load current , I_L_pu = (%.1f%.3fj) p.u' %(I_Lpu.real,I_Lpu.imag))
print('Case(h): Per-unit source voltage , V_S_pu = %.3f∠%.2f° pu' %(V_S_pu_m,V_S_pu_a))
print('Case(i): Actual value of source voltage , V_S = %.1f∠%.2f° kV' %(V_S_m,V_S_a))
#Variable declaration
Z_pu_1 = 1j*0.1 #p.u impedance
MVA_2 = 80.0 #MVA rating os system 2
MVA_1 = 100.0 #MVA rating of T1 and T2
V_2 = 30.0 #Voltage(kV)
V_1 = 32.0 #Voltage(kV)
Z_pu_2 = 1j*0.15 #p.u impedance
V_b1 = 100.0 #Base voltage of T1(kV)
Z_line = 1j*60 #Line impedance(ohm)
MVA_M1 = 20.0 #MVA rating of motor load 1
Z_pu_M1 = 1j*0.15 #p.u impedance of motor load M1
MVA_M2 = 35.0 #MVA rating of motor load 2
Z_pu_M2 = 1j*0.25 #p.u impedance of motor load M2
MVA_M3 = 25.0 #MVA rating of motor load 3
Z_pu_M3 = 1j*0.2 #p.u impedance of motor load M3
V_M = 28.0 #Voltage across motor loads M1,M2,M3(kV)
#Calculations
Z_1_pu = Z_pu_1*(MVA_2/MVA_1)*(V_2/V_1)**2 #p.u imepedance of T1
Z_2_pu = Z_pu_2*(MVA_2/MVA_1)*(V_2/V_1)**2 #p.u imepedance of T2
V_b_line = V_b1*(V_1/V_2) #ase voltage of the long-transmission line(kV)
MVA_b = 80.0 #Base MVA rating
V_b = V_b_line
Z_line_pu = Z_line*(MVA_b/(V_b_line)**2) #p.u impedance of the transmission line
Z_M1_pu = Z_pu_M1*(MVA_2/MVA_M1)*(V_M/V_1)**2 #p.u impedance of motor load M1
Z_M2_pu = Z_pu_M2*(MVA_2/MVA_M2)*(V_M/V_1)**2 #p.u impedance of motor load M2
Z_M3_pu = Z_pu_M3*(MVA_2/MVA_M3)*(V_M/V_1)**2 #p.u impedance of motor load M3
#Result
print('Case(a): Per-unit impedance of T1 , Z_1(pu) = j%.4f p.u' %Z_1_pu.imag)
print('Case(b): Per-unit impedance of T2 , Z_2(pu) = j%.4f p.u' %Z_2_pu.imag)
print('Case(c): Base voltage of the long-transmission line between T1 and T2 , V_b(line) = %.1f kV' %V_b_line)
print('Case(d): Per-unit impedance of the transmission line , Z(line)_pu = j%.4f p.u' %Z_line_pu.imag)
print('Case(e): Per-unit impedance of motor load M1 , Z_M1(pu) = j%.4f p.u' %Z_M1_pu.imag)
print('Case(f): Per-unit impedance of motor load M2 , Z_M2(pu) = j%.4f p.u' %Z_M2_pu.imag)
print('Case(g): Per-unit impedance of motor load M3 , Z_M3(pu) = j%.2f p.u' %Z_M3_pu.imag)
print('Case(h): See Fig.14-25b in textbook page no-529')
#Variable declaration
V_pa = 1000.0 #Phase voltage(V)
I_1a = 1.0 #Line current in primary(A)
V_2a = 100.0 #Voltage across secondary(V)
Ic_a = 10.0 #Current in lower half of auto-transformer(A)
V_s = 100.0 #Voltage in secondary winding(V)
I_2b = 10.0 #Current in secondary(A)
V_1b = 1000.0 #Voltage across primary(V)
Ic_b = 1.0 #Current in lower half of auto-transformer(A)
#Calculation
S_T1 = (V_pa*I_1a+V_2a*I_1a)/1000 #Total kVA transfer in step-down mode
S_T2 = (V_s*I_2b+V_1b*I_2b)/1000 #Total kVA transfer in step-up mode
S_x_former_c = V_pa*I_1a/1000 #kVA rating of th autotransformer in Fig.14-27a
V_1 = V_pa
S_x_former_d = V_1*Ic_b/1000 #kVA rating of th autotransformer in Fig.14-26b
#Result
print('Case(a): Total kVA transfer in step-down mode , S_T = %.1f kVA transferred' %S_T1)
print('Case(b): Total kVA transfer in step-up mode , S_T = %.1f kVA transferred' %S_T2)
print('Case(c): kVA rating of the autotransformer in Fig.14-27a , S_x-former = %.f kVA' %S_x_former_c)
print('Case(d): kVA rating of the autotransformer in Fig.14-26b , S_x-former = %.f kVA' %S_x_former_d)
print('Case(e): Both transformers have the same kVA rating of 1 kVA since the same autotransformer is used in both parts.')
print(' Both transformers transform a total of 1 KVA. But the step-down transformer in part(a) conducts only 0.1 kVA')
print(' while the step-up transformer in the part(b) conducts 10 kVA from the primary to the secondary')
#Variable declaration
S = 500.0 #kVA rating of the distribution transformer
V_1 = 2300.0 #Primary voltage(V)
V_2 = 208.0 #Secondary voltage(V)
f = 60.0 #Frequency(Hz)
P_sc = 8200.0 #Wattmeter reading in SC test(W)
I_sc = 217.4 #Short circuit current(A)
V_sc = 95.0 #Short circuit voltage(V)
P_oc = 1800.0 #Wattmeter reading in OC test(W)
I_oc = 85.0 #Open circuit current(A)
V_oc = 208.0 #Open circuit voltage(V)
LF1 = 0.2 #Load fraction
LF2 = 0.4 #Load fraction
LF3 = 0.8 #Load fraction
LF4 = 1.25 #Load fraction
PF1 = 0.7 #Power factor
PF2 = 0.8 #Power factor
PF3 = 0.9 #Power factor
PF_fl = 1.0 #Power factor
PF4 = 0.85 #Power factor
t1 = 4.0 #Period of operation(hours)
t2 = 4.0 #Period of operation(hours)
t3 = 6.0 #Period of operation(hours)
t_fl = 6.0 #Period of operation(hours)
t4 = 2.0 #Period of operation(hours)
#Calculation
#Case(a)
t = 24.0 #Hours in a day
P_c = P_oc #Wattmeter reading(W). OC test
W_c = (P_c*t)/1000 #Core loss over 24 hour period(kWh)
#Case(b)
Psc = P_sc/1000 #Wattmeter reading(W). SC test
P_loss_1 = (LF1**2)*Psc #Power loss for 20% Load(kW)
P_loss_2 = (LF2**2)*Psc #Power loss for 40% Load(kW)
P_loss_3 = (LF3**2)*Psc #Power loss for 80% Load(kW)
P_loss_fl = Psc #Power loss for 100% Load(kW)
P_loss_4 = (LF4**2)*Psc #Power loss for 125% Load(kW)
energy_loss1 = P_loss_1*t1 #Enegry loss for 20% Load(kWh)
energy_loss2 = P_loss_2*t2 #Enegry loss for 40% Load(kWh)
energy_loss3 = P_loss_3*t3 #Enegry loss for 80% Load(kWh)
energy_loss_fl = P_loss_fl*t_fl #Enegry loss for 100% Load(kWh)
energy_loss4 = P_loss_4*t4 #Enegry loss for 125% Load(kWh)
W_loss_total = energy_loss1+energy_loss2+energy_loss3+energy_loss_fl+energy_loss4 #Total energy loss(kWh)
#Case(c)
P_1 = LF1*S*PF1 #Power output for 20% load(kW)
P_2 = LF2*S*PF2 #Power output for 40% load(kW)
P_3 = LF3*S*PF3 #Power output for 80% load(kW)
P_fl = S*PF_fl #Power output for 100% load(kW)
P_4 = LF4*S*PF4 #Power output for 125% load(kW)
Energy_1 = P_1*t1 #Energy delivered for 20% load(kWh)
Energy_2 = P_2*t2 #Energy delivered for 40% load(kWh)
Energy_3 = P_3*t3 #Energy delivered for 80% load(kWh)
Energy_fl = P_fl*t_fl #Energy delivered for 100% load(kWh)
Energy_4 = P_4*t4 #Energy delivered for 125% load(kWh)
W_out_total = Energy_1+Energy_2+Energy_3+Energy_fl+Energy_4 #Total energy delivered in 24hrs(kwh)
#Case(d)
n = W_out_total/(W_out_total+W_c+W_loss_total)*100 #All-day efficiency(%)
#Result
print('case(a): Core loss over the 24 hour period , W_c = P_c*t = %.1f kWh' %W_c)
print('Case(b): Total energy loss over the 24 hour period = %.2f kWh' %W_loss_total)
print('Case(c): Total energy output over the 24 hour period = %.f kWh' %W_out_total)
print('Case(d): All-day efficiency = %.1f percent' %n)
#Variable declaration
S_1 = 10.0 #VA rating of small transformer
V = 115.0 #Voltage rating of transformer(V)
V_2_1 = 6.3 #Voltage rating of one part of secondary winding(V)
V_2_2 = 5.0 #Voltage rating of other part of secondary winding(V)
Z_2_1 = 0.2 #Impedance of one part of secondary winding(ohm)
Z_2_2 = 0.15 #Impedance of other part of secondary winding(ohm)
#Calculation
#Case(a)
V_2 = V_2_1+V_2_2 #Voltage across secondary winding(V)
I_2 = S_1/V_2 #Rated secondary current when the LV secondaries are connected in series-aiding(A)
#Case(b)
I_c = (V_2_1-V_2_2)/(Z_2_1+Z_2_2) #Circulating current when LV windings are paralled(A)
percent_overload = (I_c/I_2)*100 #Percent overload produced
#Result
print('Case(a): Rated secondary current when the low-voltage secondaries are connected series-aiding , I_2 = %.3f A' %I_2)
print('Case(b): Circulating current when LV windings are paralled , I_c = %.2f A' %I_c)
print(' Percent overload produced = %.f percent' %percent_overload)
#Variable declaration
S = 20.0 #kVA rating of transformer
N_1 = 230.0 #Number of primary turns
N_2 = 20.0 #Number of secondary turns
V_1 = 230.0 #Primary voltage(V)
V_2 = 20.0 #Secondary voltage(V)
V_sc = 4.5 #Short circuit voltage(V)
I_sc = 87.0 #Short circuit current(A)
P_sc = 250.0 #Power measured(W)
#Calculation
V_h = V_sc #Short circuit voltage on HV side(V)
I_h = I_sc #Short circuit current on HV side(A)
Z_eh = V_h/I_h #Equivalent impedance reffered to the high side when coils are series connected(ohm)
Z_el = Z_eh*(N_2/N_1)**2 #Equivalent impedance reffered to the low side when coils are series connected(ohm)
I_2_rated = (S*1000)/V_2 #Rated secondary current when coils are series connected(A)
I_2_sc = S/Z_el #Secondary current when coils in Fig.14-31a are short-circuited with rated voltage applied to HV side(A)
percent_overload = (I_2_sc/I_2_rated)*100 #Percent overload
#Result
print('Case(a): Equivalent impedance reffered to the high side when coils are series-connected , Z_eh = %.4f ohm' %Z_eh)
print('Case(b): Equivalent impedance reffered to the low side when coils are series connected , Z_el = %.2e ohm' %Z_el)
print('Case(c): Rated secondary current when coils are series connected , I_2(rated) = %.e A' %I_2_rated)
print('Case(d): Secondary current when coils in Fig.14-31a are short-circuited with rated voltage applied to HV side , I_2(sc) = %.1e A' %I_2_sc)
print(' Percent overload produced = %.f percent' %percent_overload)
#Variable declaration
I_L = 100.0 #Load current(A)
cos_theta = 0.7 #Power factor lagging
S = 60.0 #kVA rating of transformer
V_1 = 2300.0 #Primary voltage(V)
V_2 = 230.0 #Secondary voltage(V)
#Calculation
#Case(a)
V_L = 230.0 #Voltage across load(V)
P_T = (3**0.5*V_L*I_L*cos_theta)/1000 #Power consumed by the plant(kW)
kVA_T = P_T/cos_theta #Apparent power(kVA)
#Case(b)
kVA = S #kVA rating of transformer
V_p = V_2 #Phase voltage(V). delta-connection on load side
I_P2_rated = (kVA*1000)/(3*V_p) #Rated secondary phase current(A)
I_L2_rated = 3**0.5*I_P2_rated #Rated secondary line current(A)
#Case(c)
percent_load = I_L/I_L2_rated*100 #Percent load on each transformer
#Case(d)
V_L_d = 2300.0
I_P1 = (kVA_T*1000)/(3**0.5*V_L_d) #Primary phase current(A)
I_L1 = I_P1 #Primary line current(A). Y-connection
#Case(e)
kVA_transformer = kVA/3 #kVA rating of each transformer
#Result
print('Case(a): Power consumed by the plant , P_T = %.1f kW' %P_T)
print(' Apparent power , kVA_T = %.1f kVA' %kVA_T)
print('Case(b): Rated secondary phase current of transformer bank , I_P2(rated) = %.f A' %I_P2_rated)
print(' Rated secondary line current of transformer bank , I_L2(rated) = %.1f A' %I_L2_rated)
print('Case(c): Percent load on each transformer = %.1f percent' %percent_load)
print('Case(d): Primary phase current drawn by each transformer , I_P1 = %.f A' %I_P1)
print(' Primary line current drawn by each transformer , I_L1 = %.f A' %I_L1)
print('Case(e): kVA rating of each transformer = %.f kVA' %kVA_transformer)
#Variable declaration
I_L = 100.0 #Load current(A)
cos_theta = 0.7 #Power factor lagging
S = 60.0 #kVA rating of transformer
V_1 = 2300.0 #Primary voltage(V)
V_2 = 230.0 #Secondary voltage(V)
#Calculation
#Case(a)
V_L = 230.0 #Voltage across load(V)
P_T = (3**0.5*V_L*I_L*cos_theta)/1000 #Power consumed by the plant(kW)
kVA_T = P_T/cos_theta #Apparent power(kVA)
#Case(b)
kVA = S #kVA rating of transformer
V_p = V_2 #Phase voltage(V)
I_P2_rated = (kVA*1000)/(3*V_p) #Rated secondary phase current(A)
I_L2_rated = 3**0.5*I_P2_rated #Rated secondary line current(A)
#Case(c)
percent_load = I_L/I_L2_rated*100 #Percent load on each transformer
#Case(d)
V_L_d = 2300.0
I_P1 = (kVA_T*1000)/(3**0.5*V_L_d) #Primary phase current(A)
I_L1 = 3**0.5*I_P1 #Primary line current(A)
#Case(e)
kVA_transformer = kVA/3 #kVA rating of each transformer
#Result
print('Case(a): Power consumed by the plant , P_T = %.1f kW' %P_T)
print(' Apparent power , kVA_T = %.1f kVA' %kVA_T)
print('Case(b): Rated secondary phase current of transformer bank , I_P2(rated) = %.f A' %I_P2_rated)
print(' Rated secondary line current of transformer bank , I_L2(rated) = %.1f A' %I_L2_rated)
print('Case(c): Percent load on each transformer = %.1f percent' %percent_load)
print('Case(d): Primary phase current drawn by each transformer , I_P1 = %.f A' %I_P1)
print(' Primary line current drawn by each transformer , I_L1 = %.1f A' %I_L1)
print(' Primary line current drawn by a Δ-Δ bank is √3 times the line current drawn by a Y-Δ bank')
print('Case(e): kVA rating of each transformer = %.f kVA' %kVA_transformer)
import math
import cmath
#Variable declaration
V_L = 33.0 #Line voltage(kV)
f = 60.0 #Frequency(Hz)
PF1 = 1.0 #Unity power factor for I_AB
PF2 = 0.7 #Lagging power factor for I_BC
PF3 = 0.9 #Leading power factor for I_CA
IAB = 10.0 #Magnitude of I_AB(kA)
IBC = 15.0 #Magnitude of I_BC(kA)
ICA = 12.0 #Magnitude of I_CA(kA)
#Calculation
V_AB = V_L*cmath.exp(1j*0*math.pi/180) #Line voltage taken as reference voltage(kV)
V_AB_a = cmath.phase(V_AB)*180/math.pi #Voltage angle(degree)
V_BC = V_L*cmath.exp(1j*-120*math.pi/180) #Line voltage(kV)
V_BC_a = cmath.phase(V_BC)*180/math.pi #Voltage angle(degree)
V_CA = V_L*cmath.exp(1j*120*math.pi/180) #Line voltage(kV)
V_CA_a = cmath.phase(V_CA)*180/math.pi #Voltage angle(degree)
theta_1 = math.acos(PF1)*180/math.pi #PF1 angle(degree)
theta_2 = math.acos(PF2)*180/math.pi #PF2 angle(degree)
theta_3 = math.acos(PF3)*180/math.pi #PF3 angle(degree)
I_AB = IAB*cmath.exp(1j*(theta_1)*math.pi/180) #Current(kA)
I_BC = IBC*cmath.exp(1j*(V_BC_a-theta_2)*math.pi/180) #Current(kA)
I_CA = ICA*cmath.exp(1j*(V_CA_a+theta_3)*math.pi/180) #Current(kA)
#Case(a)
I_AC = -I_CA
I_A = I_AB+I_AC #Phase current(kA)
I_A_m = abs(I_A) #Magnitude of I_A(kA)
I_A_a = cmath.phase(I_A)*180/math.pi #Phase angle of I_A(degrees)
#Case(b)
I_BA = -I_AB
I_B = I_BC+I_BA #Phase current(kA)
I_B_m = abs(I_B) #Magnitude of I_B(kA)
I_B_a = cmath.phase(I_B)*180/math.pi #Phase angle of I_B(degrees)
#Case(c)
I_CB = -I_BC
I_C = I_CA+I_CB #Phase current(kA)
I_C_m = abs(I_C) #Magnitude of I_C(kA)
I_C_a = cmath.phase(I_C)*180/math.pi #Phase angle of I_C(degrees)
#Case(d)
phasor_sum = I_A+I_B+I_C #Phasor sum of line currents
#Result
print('Case(a): Current in line A , I_A = %.2f∠%.2f° kA' %(I_A_m,I_A_a))
print('Case(b): Current in line B , I_B = %.2f∠%.2f° kA' %(I_B_m,I_B_a))
print('Case(c): Current in line C , I_C = %.2f∠%.2f° kA' %(I_C_m,I_C_a))
print('Case(d): Phasor sum of line currents , ΣI_L = (%.f+j%.f) ' %(phasor_sum.real,phasor_sum.imag))
#Variable declaration
kVA_1 = 20.0 #kVA rating of transformer 1
kVA_2 = 20.0 #kVA rating of transformer 2
kVA_3 = 20.0 #kVA rating of transformer 3
V_1 = 2300.0 #Primary voltage(V)
V_2 = 230.0 #Secondary voltage(V)
kVA = 40.0 #kVA supplied by the bank
PF = 0.7 #Lagging power factor at which bank supplies kVA
#Calculation
kVA_transformer = kVA/3**0.5 #kVA load carried by each transformer
percent_ratedload_Tr = kVA_transformer/kVA_1*100 #Percent load carried by each transformer
kVA_V_V = 3**0.5*kVA_1 #Total kVA rating of the transformer bank in V-V
ratio_banks = kVA_V_V/(kVA_1+kVA_2+kVA_3)*100 #Ratio of V-V bank to Δ-Δ bank transformer ratings
kVA_Tr = kVA/3
percent_increase_load = kVA_transformer/kVA_Tr*100 #Percent increase in load on each transformer when one transformer is removed
#Result
print('Case(a): kVA load carried by each transformer = %.1f kVA/transformer' %kVA_transformer)
print('Case(b): Percent rated load carried by each transformer = %.1f percent' %percent_ratedload_Tr)
print('Case(c): Total kVA rating of the transformer bank in V-V = %.2f kVA' %kVA_V_V)
print('Case(d): Ratio of V-V bank to Δ-Δ bank transformer ratings = %.1f percent' %ratio_banks)
print('Case(e): Percent increase in load on each transformer when one transformer is removed = %.1f percent' %percent_increase_load)
#Variable declaration
V = 440.0 #Rated voltage of SCIM(V)
hp = 100.0 #Rated power of SCIM(hp)
PF = 0.8 #Power factor
V_1 = 155.0 #Primary voltage of transformer(V)
V_2 = 110.0 #Secondary voltage of transformer(V)
V_a = 110.0 #Armature voltage(V)
V_L = 440.0 #Load voltage(V)
n = 0.98 #Efficiency of the transformer
#Calculation
I_L = 124*1.25 #Motor line current(A). Appendix A-3
alpha = V_a/V_L #Transformation ratio
I_a = (3**0.5/2)*(I_L/(alpha*n)) #Current in the primary of the scott transformers(A)
kVA = (V_a*I_a)/((3**0.5/2)*1000) #kVA rating of the main and teaser transformers
#Result
print('Case(a): Motor line current , I_L = %.f A' %I_L)
print('Case(b): Transformation ratio , α = N_1/N_2 = V_a/V_L = %.2f ' %alpha)
print('Case(c): Current in the primary of the scott transformers , I_a = %.f A' %I_a)
print('Case(d): kVA rating of the main and teaser transformers , kVA = %.1f kVA' %kVA)
#Variable declaration
I_L = 1.0 #Load current(kA)
V_m = 750.0 #Peak voltage(kV)
#Calculation
V_L = (V_m)/2**0.5 #Maximum allowable rms voltagethat may be applied to the lines using ac(kV)
S_T_ac = 3**0.5*V_L*I_L #Total 3-phase apparent power(MVA)
I_rms = I_L #rms value of load current(kA)
I_dc =I_rms*2**0.5 #Maximum allowable current that can be delivered by dc transmission(kA)
V_dc = V_m #dc voltage(kV)
S_T_dc = V_dc*I_dc #Total dc apparent power delivered by two lines(MVA)
S_ac_line = S_T_ac/3 #Power per ac line
S_dc_line = S_T_dc/2 #Power per dc line
#Result
print('Case(a): Maximum allowable rms voltage that may be applied to the lines using ac , V_L = %.1f kV' %V_L)
print('Case(b): Total 3-phase ac apparent power delivered by three lines , S_T = %.1f MVA' %S_T_ac)
print('Case(c): Maximum allowable current that can be delivered by dc transmission , I_dc = %.3f kA' %I_dc)
print('Case(d): Total dc apparent power delivered by two lines , S_T = %.1f MVA' %S_T_dc)
print('Case(e): Power per ac line , S/ac line = %.1f MVA/line' %S_ac_line)
print('Case(f): Power per dc line , S/dc line = %.1f MVA/line' %S_dc_line)