# a
V1 = 1100.; # higher voltage
V2 = 220.; # lower voltage
a = V1/V2; # turns ratio
r1 = 0.1; # high voltage winding resistance(in ohms)
x1 = 0.3; # high voltage leakage reactance(in ohms)
r2 = 0.004; # low voltage winding resistance(in ohms)
x2 = 0.012; # low voltage leakage reactance(in ohms)
Re1 = r1 + (a**2.)*r2 ; # equivalent winding resistance referred to the primary side
Xe1 = x1 + (a**2.)*x2 ; # equivalent leakage reactance referred to the primary side
Re2 = (r1/a**2.) + r2 ; # equivalent winding resistance referred to the secondary side
Xe2 = (x1/a**2.) + x2 ; # equivalent leakage reactance referred to the secondary side
print '%s' %("a")
print '%s %.2f' %("equivalent winding resistance referred to the primary side",Re1)
print '%s %.2f' %("equivalent leakage reactance referred to the primary side",Xe1)
print '%s %.2f' %("equivalent winding resistance referred to the secondary side",Re2)
print '%s %.2f' %("equivalent leakage reactance referred to the secondary side",Xe2)
# b
P = 100.; # power (in kVA)
I21 = P*1000./V1; # primary winding current rating
Vre1 = I21*Re1; # equivalent resistance drop (in volts)
VperR1 = Vre1*100./V1 ; # % equivalent resistance drop
Vxe1 = I21*Xe1; # equivalent reactance drop (in volts)
VperX1 = Vxe1*100./V1; # % equivalent reactance drop
print '%s' %("b")
print '%s %.2f' %("equivalent resistance drop expressed in terms of primary quantities(in volts) = ",Vre1)
print '%s %.2f' %("% equivalent resistance drop expressed in terms of primary quantities = ",VperR1)
print '%s %.2f' %("equivalent reactance drop expressed in terms of primary quantities(in volts) =",Vxe1)
print '%s %.2f' %("% equivalent reactance drop expressed in terms of primary quantities = ",VperX1)
# c
I2 = a*I21; # secondary winding current rating
Vre2 = I2*Re2; # equivalent resistance drop (in volts)
VperR2 = Vre2*100./V2 ; # % equivalent resistance drop
Vxe2 = I2*Xe2; # equivalent reactance drop (in volts)
VperX2 = Vxe2*100./V2; # % equivalent reactance drop
print '%s' %("c")
print '%s %.2f' %("equivalent resistance drop expressed in terms of secondary quantities(in volts) = ",Vre2)
print '%s %.2f' %("% equivalent resistance drop expressed in terms of secondary quantities = ",VperR2)
print '%s %.2f' %("equivalent reactance drop expressed in terms of secondary quantities(in volts) =",Vxe2)
print '%s %.2f' %("% equivalent reactance drop expressed in terms of secondary quantities = ",VperX2)
# d
Ze1 = complex(Re1,Xe1); # equivalent leakage impedance referred to the primary
Ze2 = Ze1/a ; # equivalent leakage impedance referred to the secondary
print '%s' %("d")
print "equivalent leakage impedance referred to the primary = ",Ze1
print "equivalent leakage impedance referred to the secondary = ",Ze2
import math
Pl = 396.; # wattmeter reading on open circuit test
Vl = 120.; # voltmeter reading on open circuit test
Il = 9.65; # ammeter reading o open circuit test
a = 2400./120.; # turns ratio
theata = math.acos(Pl/(Vl*Il)); # phase difference between voltage and current
Irl = Il*math.cos(theata); # resistive part of Im
Ixl = Il*math.sin(theata); # reactive part of Im
rl = Vl/Irl; # low voltage winding resistance
rh = (a**2.)*rl; # rl on the high side
xl = Vl/Ixl; # magnetizing reactance referred to the lower side
xh = (a**2.)*xl; # corresponding high side value
Ph = 810.; # wattmeter reading on short circuit test
Vh = 92.; # voltmeter reading on short circuit test
Ih = 20.8; # ammeter reading on short circuit test
Zeh = Vh/Ih; # equivalent impeadance referred to the higher side
Zel = Zeh/(a**2.); # equivalent impedance referred to the lower side
Reh = Ph/(Ih**2.); # equivalent resistance referred to the higher side
Rel = Reh/(a**2.); # equivalent resistance referred to the lower side
Xeh = math.sqrt((Zeh**2.) - (Reh**2.)); # equivalent reactance referred to the higher side
Xel = Xeh/(a**2.); # equivalent reactance referred to the lower side
print '%s %.2f' %("equivalent impeadance referred to the higher side = ",Zeh)
print '%s %.2f' %("equivalent impedance referred to the lower side = ",Zel)
print '%s %.2f' %("equivalent resistance referred to the higher side = ",Reh)
print '%s %.2f' %("equivalent resistance referred to the lower side = ",Rel)
print '%s %.2f' %("equivalent reactance referred to the higher side = ",Xeh)
print '%s %.2f' %("equivalent reactance referred to the lower side = ",Xel)
# a
import math
P = 50.; # power rating (in kVA)
Ph = 810.; # wattmeter reading on short circuit test
Pl = 396.; # wattmeter reading on open circuit test
Ih = 20.8; # ammeter reading on short circuit test
pf = 0.8; # power factor = 0.8 lagging
losses = (Ph + Pl)/1000.; # losses in kW
outputP = P*pf; # output power
inputP = outputP + losses ; # input power
efficiency = outputP/inputP ;
print '%s' %("a")
print '%s %.2f' %("efficiency = ",efficiency)
# b
Xeh = 4.; # equivalent reactance referred to the higher side
Reh = 1.87; # equivalent resistance referred to the higher side
Zeh = complex(Reh, Xeh); # equivalent impedance referred to the higher side
ih = complex(Ih*pf, -Ih*math.sqrt(1. - (pf**2.)));
V1 = 2400 + Zeh*ih ; # primary voltage
voltageRegulation =3.37;# (real(V1)-2400.)*100./2400.;# percent voltage regulation
print '%s' %("b")
print "percent voltage regulaton = ",voltageRegulation