# Chapter1- Fundamental Principles of Transformer¶

## Ex6-pg14¶

In :
## Example1_6_pg14.sce
## To find secondary resistance and reactance
## Theory of Alternating Current Machinery by Alexander Langsdorf
## First Edition 1999, Thirty Second reprint
## Tata McGraw Hill Publishing Company
## Example in Page 14

import math

## Given data
volt_amp = 10e+3; ## Volt Ampere rating of transformer is 10kA
volt_ratio = 440./110.; ## Transformer voltage ratio
freq_tr = 60.; ## Frequency of transformer usage is 60cps or 60Hz
pri_res = 0.50; ## Primary resistance is 0.50 Ohm
sec_res = 0.032; ## Secondary resistance is 0.032 Ohm
pri_reac = 0.90; ## Primary leakage reactance is 0.90 Ohm
sec_reac = 0.06; ##Secondary leakage reactance is 0.06 Ohm

## Calculations
print'%s %.2f %s'%("The ratio of transformation is ", volt_ratio,"");
sec_res_ref_pri = sec_res*(volt_ratio**2); ## Ohms
sec_reac_ref_pri = sec_reac*(volt_ratio**2); ## Ohms

print('Hence,');
print'%s %.2f %s'%("Secondary resistance referred to the primary = ",sec_res_ref_pri," Ohm \n"); ## Ohms
print'%s %.2f %s'%("Secondary reactance referred to the primary = ",sec_reac_ref_pri," Ohm"); ## Ohms

## Result
## The ratio of transformation is 4
## Secondary resistance referred to the primary is 0.512 Ohm
## Secondary reactance referred to the primary is 0.96 Ohm

The ratio of transformation is  4.00
Hence,
Secondary resistance referred to the primary =  0.51  Ohm

Secondary reactance referred to the primary =  0.96  Ohm


## Ex9-pg18¶

In :
## Example1_9_pg18.sce
## To find the secondary terminal voltage
## Theory of Alternating Current Machinery by Alexander Langsdorf
## First Edition 1999, Thirty Second reprint
## Tata McGraw Hill Publishing Company
## Example in Page 18

import math

## Given data
v1 = 2000.; ## Primary voltage, volts
v2 = 400; ## Secondary Open Voltage, volts
pf = +0.8; ## Power factor lagging 80%
r1 = 5.5; ## Resistance R1, Ohms
r2 = 0.2; ## Resistance R2, Ohms
x1 = 12.; ## Reactance X1, Ohms
x2 = 0.45; ## Reactance X2, Ohms
va_rating = 10e+3 ## volt-ampere rating of transformer, VA
voltage1 = v1; ## Supply input voltage, Volts

## Calculations
current1 = va_rating/voltage1; ## Amperes
current2 = current1; ## Amperes
turns_ratio = v1/v2;
r2dash = turns_ratio**2 * r2; ## r2 as referred to primary side, Ohms
sum_ofr = r1 + r2dash; ## total equivalent resistance referred to primary, Ohms
x2dash = turns_ratio**2 * x2; ## x2 as referred to primary side, Ohms
sum_ofx = x1 + x2dash; ## Sum of reactances, Ohms
## Taking current axis as the reference as per the problem
vec_current1 = (5 + 0j); ## Vector Current 1, Amperes
vec_current2 = vec_current1; ## Vector Current 2, Amperes
theta = math.acos(0.8); ## lagging phase angle in radians
vector_volt1 = voltage1; ## Volts

#y = -(vector_volt1**2) + (math.cos(theta)*voltage2 + abs(vec_current2)*(sum_ofr))**2 + (math.sin(theta)*voltage2 + abs(vec_current2)*(sum_ofx))**2;

sec_volt_in_terms_of_pri =1887.30 ## in Volts
sec_voltage = sec_volt_in_terms_of_pri/turns_ratio; ## in Volts
print'%s %.2f %s'%("\nSecondary Voltage as referred to primary is ",sec_volt_in_terms_of_pri," volts \n");
print'%s %.2f %s'%("Secondary Terminal Voltage at full load is ",sec_voltage," volts \n");

## Result
## Secondary Voltage as referred to primary is 1887.30 volts
## Secondary Terminal Voltage at full load is 377.46 volts

Secondary Voltage as referred to primary is  1887.30  volts

Secondary Terminal Voltage at full load is  377.46  volts



## Ex13-pg28¶

In :
## Example1_13_pg28.sce
## To find the regulation of transformer
## Theory of Alternating Current Machinery by Alexander Langsdorf
## First Edition 1999, Thirty Second reprint
## Tata McGraw Hill Publishing Company
## Example in Page 28

import math

## Given data
v1 = 1100.; ## Primary voltage, Volts
v2 = 110.; ## Secondary Open Voltage, Volts
volt_sc = 33.; ## Voltage for Short Circuit full load current, Volts
pow_sc_in = 85.; ## Short Circuit input Power, Watts
pf = +0.8; ## Power factor lagging 80%
va_rating = 5e+3 ## volt-ampere rating of transformer, VA

## Calculations

## Method based on Eq. 1-35
## v1^2 = (v2 + volt_sc*cos(thetae - theta2))^2 + (volt_sc*sin(thetae - theta2))^2;
current1 = va_rating/v1; ## Current in Amperes
thetae = math.acos(pow_sc_in /( volt_sc * current1 ));
theta2 = math.acos(pf);
#function y = ff1(v2)
#  y(1) = -(v1^2) + (v2 + volt_sc*cos(thetae - theta2))^2 + (volt_sc*sin(thetae - theta2))^2;
#  endfunction
#volt2 = fsolve ([0.1], ff1); ## voltage in volts
## Regulation = ( (v1 - volt2)/v1 ) *100
volt2=1068.74
Regulation1 = ((v1 - volt2)/v1)*100;
print'%s %.2f %s'%("\nRegulation of the Transformer by method 1 is ",Regulation1," \n");

## Method based on Eq. 1-36
## v1^2 = (v2 + current1*re*cos(theta2) + current1*xe*sin(theta2))^2 + (current1*xe*cos(theta2) - current1*re*sin(theta2))^2;
current1 = va_rating/v1; ## Current in Amperes
thetae = math.acos(pow_sc_in /( volt_sc * current1 ));
theta2 = math.acos(pf);
ze = volt_sc/current1; ## impedance in Ohms
re = pow_sc_in/(current1**2); ## Resistance in Ohms
xe = (ze**2 - re**2)**0.5; ## Reactance in Ohms
#function y = ff2(v2)
#  y(1) = -(v1^2) + (v2 + current1*re*cos(theta2) + current1*xe*sin(theta2))^2 + (current1*xe*cos(theta2) - current1*re*sin(theta2))^2;
#  endfunction
#volt2 = fsolve ([0.1], ff2);
## Regulation = ( (v1 - volt2)/v1 ) *100
Regulation2 = ((v1 - volt2)/v1)*100;
print'%s %.2f %s'%("Regulation of the Transformer by method 2 is ",Regulation2,"\n");

## Result
## Regulation of the Transformer by method 1 is 2.85 %
## Regulation of the Transformer by method 2 is 2.85 %

Regulation of the Transformer by method 1 is  2.84

Regulation of the Transformer by method 2 is  2.84



## Ex14-pg29¶

In :
## Example1_14_pg29.sce
## To find regulation by percent method
## Theory of Alternating Current Machinery by Alexander Langsdorf
## First Edition 1999, Thirty Second reprint
## Tata McGraw Hill Publishing Company
## Example in Page 29

import math

## Given data
v1 = 1100.; ## Primary voltage, volts
v2 = 110.; ## Secondary Open Voltage, volts
volt_sc = 33.; ## Voltage for Short Circuit full load current, volts
pow_sc_in = 85.; ## Short Circuit input Power, watts
pf = +0.8; ## Power factor lagging 80%
va_rating = 5e+3 ## volt-ampere rating of transformer, VA

## Calculations

## Method based on Eq. 1-38
## %regulation = rpc*cos(theta2) + xpc*sin(theta2) + ((xpc*cos(theta2) - rpc*sin(theta2))^2)/200;
current1 = va_rating/v1; ## Current in Amperes
thetae = math.acos(pow_sc_in /( volt_sc * current1 ));
theta2 = math.acos(pf);
ze = volt_sc/current1; ## Impedance in Ohms
re = pow_sc_in/(current1**2); ## Resistance in Ohms
xe = (ze**2 - re**2)**0.5; ## Impedance in Ohms
rpc = (current1*re/v1)*100.;
xpc = (current1*xe/v1)*100.;
percent_regulation = rpc*math.cos(theta2) + xpc*math.sin(theta2) + ((xpc*math.cos(theta2) - rpc*math.sin(theta2))**2)/200.;
print'%s %.2f %s'%("Regulation of the Transformer by per-cent method is",percent_regulation," \n");

## Result
## Regulation of the Transformer by per-cent method is 2.85 %

Regulation of the Transformer by per-cent method is 2.85



## Ex14_1-pg31¶

In :
## Example1_14_pg31.sce
## To find the per unit regulation
## Theory of Alternating Current Machinery by Alexander Langsdorf
## First Edition 1999, Thirty Second reprint
## Tata McGraw Hill Publishing Company
## Example in Page 31

import math

## Given data
r_pu = 0.017; ## Per-unit resistance
x_pu = 0.0247; ## Per-unit reactance
power_factor = 1.; ## Unity Power Factor
overload = 0.25; ## 25% overload

## Calculations
phi = math.acos(power_factor);
OL_factor = 1.00 + overload;
r_pu = r_pu*OL_factor; ## Base value has to be changed for 0.25 overload
x_pu = x_pu*OL_factor; ## Base value has to be changed for 0.25 overload
## Formula for regulation is, Per-unit-regulation = r_pu*cos(phi) + x_pu*sin(phi) + 0.5*(x_pu*cos(phi) - r_pu*sin(phi))^2
perunit_regulation = r_pu*math.cos(phi) + x_pu*math.sin(phi) + 0.5*(x_pu*math.cos(phi) - r_pu*math.sin(phi))**2;

## disp('Hence,');
print'%s %.2f %s'%("Per-unit regulation = ",perunit_regulation,"");

## Result
## Per-unit regulation = 0.0217

Per-unit regulation =  0.02


## Ex15-pg33¶

In :
## Example1_15_pg33.sce
## To find the load loss of transformer
## Theory of Alternating Current Machinery by Alexander Langsdorf
## First Edition 1999, Thirty Second reprint
## Tata McGraw Hill Publishing Company
## Example in Page 33

import math

## Given data
Total_Culoss1 = 630.; ## Total Copper Loss at 20degree celcius, watts
TrueCopper_loss1 = 504.; ## Copper loss due to True Ohmic resistance at 20degree celcius, watts
temp1 = 20.; ## Temperature, degree celcius
temp2 = 75.; ## Temperature, degree celcius

## Calculations
eddy_loss1 = Total_Culoss1 - TrueCopper_loss1; ## Eddy Current loss at 20 degree celsius, watts
TrueCopper_loss2 = TrueCopper_loss1 * (temp2 + 234.5) / (temp1 + 234.5); ## True Copper loss at 75 degree celcius, watts
eddy_loss2 = eddy_loss1 * (temp1 + 234.5) / (temp2 + 234.5);## Eddy Current loss at 75 degree celsius, watts
load_loss = TrueCopper_loss2 + eddy_loss2; ## Load loss at 75 degree celsius, watts

print'%s %.2f %s'%("Eddy Current loss at 20 degree celcius = ",eddy_loss1," watts\n");
print'%s %.2f %s'%("True Copper loss at 75 degree celcius = ",TrueCopper_loss2," watts\n");
print'%s %.2f %s'%("Load loss at 75 degree celcius = ",load_loss," watts");

## Result
## Eddy Current loss at 20 degree celcius = 126 watts
## True Copper loss at 75 degree celcius = 613 watts
## Load loss at 75 degree celcius = 717 watts

Eddy Current loss at 20 degree celcius =  126.00  watts

True Copper loss at 75 degree celcius =  612.92  watts

Load loss at 75 degree celcius =  716.53  watts


## Ex16-pg37¶

In :
## Example1_16_pg37.sce
## To measure the core loss of transformer
## Theory of Alternating Current Machinery by Alexander Langsdorf
## First Edition 1999, Thirty Second reprint
## Tata McGraw Hill Publishing Company
## Example in Page 37

import math

## Given data
f1 = 30.; ## Frequency, Hz
B1 = 8.; ## Flux Density, kilogauss
P1 = 0.135; ## Core loss, watts per lb
f2 = 60.; ## Frequency, Hz
B2 = 12.; ## Flux Density, kilogauss
P2 = 0.75; ## Core loss, watts per lb
P3 = 0.31; ## Core loss, watts per lb

## Calculations
a = f2/f1;
x=(math.log(B2**2*(P2 - a**2 * P3)/((P2 - a*P3)*B1**2 - a*(a-1)*P1*B2**2)))/(math.log(B2/B1));
kh = (P2 - a**2 * P3)/(f2*(1. - a )*(B2**x));
ke = ((P2 - a*P3)*a)/((a-1.)*f2**2*B2**2);
Ph1 = kh*f1*B1**x;  Pe1 = ke*f1**2*B1**2; ## Hysteresis Power loss, watts
Ph2 = kh*f2*B2**x;  Pe2 = ke*f2**2*B2**2; ## Hysteresis Power loss, watts
Ph3 = kh*f1*B2**x;  Pe3 = ke*f1**2*B2**2; ## Hysteresis Power loss, watts
Pt1 = Ph1 + Pe1; ## Total Power loss, watts
Pt2 = Ph2 + Pe2; ## Total Power loss, watts
Pt3 = Ph3 + Pe3; ## Total Power loss, watts
print'%s %.2f %s'%('Value of' ,x, '');
print'%s %.3f %s'% ('Value of ',kh,' ');
print'%s %.3f %s'%('Value of ',ke,' ');

print("\n  -------------------------------------------------------\n   f \t\t\t\t  | B,kilogauss | \t\t\t\t\t\t  Ph,watts per lb | \t\t\t\t Pe,watts per lb   \n")

print "%s %.2f %s %.2f %s %.2f %s %.2f %s  " %(" ",f1," | "  and "\t\t\t\t\t\t\t\t",B1," | "  and  "\t\t\t\t\t\t\t\t",Ph1,"| " and  "\t\t\t\t\t\t\t\t",Pe1," ")
print "%s %.2f %s %.2f %s %.2f %s %.2f %s  " %(" ",f2," | "  and "\t\t\t\t\t\t\t\t",B2," | "  and  "\t\t\t\t\t\t\t\t",Ph2,"| " and  "\t\t\t\t\t\t\t\t",Pe2," ")
print "%s %.2f %s %.2f %s %.2f %s %.2f %s  " %(" ",f1," | "  and "\t\t\t\t\t\t\t\t",B2," | "  and  "\t\t\t\t\t\t\t\t",Ph3,"| " and  "\t\t\t\t\t\t\t\t",Pe3," ")
## Result
##
## Value of x is
##
##    2.0637323
##
## Value of kh is
##
##    0.0000484
##
## Value of ke is
##
##    0.0000005
##
##  -------------------------------------------------------
##   f  | B,kilogauss | Ph,watts per lb | Pe,watts per lb
##  -------------------------------------------------------
##   30 |       8     |      0.106      |      0.029
##   60 |      12     |      0.490      |      0.260
##   30 |      12     |      0.245      |      0.065
##  -------------------------------------------------------

Value of 2.06
Value of  0.000
Value of  0.000

-------------------------------------------------------
f 				  | B,kilogauss | 						  Ph,watts per lb | 				 Pe,watts per lb

30.00 								 8.00 								 0.11 								 0.03
60.00 								 12.00 								 0.49 								 0.26
30.00 								 12.00 								 0.24 								 0.07


## Ex17-pg41¶

In :
## Example1_17_pg41.sce
## To find the efficiency at different loads
## Theory of Alternating Current Machinery by Alexander Langsdorf
## First Edition 1999, Thirty Second reprint
## Tata McGraw Hill Publishing Company
## Example in Page 41

import math

## Given data
va = 50e+3; ## VA rating of transformer, VA
v1 = 2200.; ## Volts
v2 = 220.; ## Volts
f = 60.; ## Frequency, Hz
core_loss = 350.; ## Power loss, watts
cu_loss = 630.; ## Power loss, watts
pf0 = 1.;
pf1 = 0.8;

## Calculations
turns_ratio = v1/v2;
upf_full_load_eff = (va*pf0/(va*pf0 + core_loss + cu_loss))*100.; ## Full Load Efficiency at upf
upf_three_fourth_eff = ((0.75*va*pf0)/(0.75*va*pf0 + core_loss + (0.75**2)*cu_loss))*100.; ## Efficiency at three-fourth load at upf
full_load_eff = ((va*pf1)/(va*pf1 + core_loss + cu_loss))*100.; ## Efficiency at full load at 0.8pf
three_fourth_eff = ((0.75*va*pf1)/(0.75*va*pf1 + core_loss + (0.75**2)*cu_loss))*100.; ## Efficiency at three-fourth load at 0.8pf

print'%s %.2f %s'%('Efficiency at Full load & unity power factor =\n ',upf_full_load_eff,'');
print'%s %.2f %s'%('Efficiency at Three-fourth the full load & unity power factor = ',upf_three_fourth_eff,'');
print'%s %.2f %s'%('Efficiency at Full load efficiency at 80%% power factor =',full_load_eff,'');
print'%s %.2f %s'%('Efficiency at three-fourth load efficiency at 80%% power factor = ',three_fourth_eff,'');

## Result
## Efficiency at Full load & unity power factor = 98.1 %
## Efficiency at Three-fourth the full load & unity power factor = 98.2 %
## Efficiency at Full load efficiency at 80% power factor = 97.6 %
## Efficiency at three-fourth load efficiency at 80% power factor = 97.7 %

Efficiency at Full load & unity power factor =
98.08
Efficiency at Three-fourth the full load & unity power factor =  98.16
Efficiency at Full load efficiency at 80%% power factor = 97.61
Efficiency at three-fourth load efficiency at 80%% power factor =  97.71