import math
#variable declaration
Np = 1; #number of primary turns
Ns = 240; #number of secondary turns
Is = 5; #secondary current in A
Re = 1.2; #external burden in Ω
mmf = 96; #magnetomotive force in AT
Ac = 1200*10**-6; #cross section area mm**2
f = 50; #frequency in Hz
#calculation
Kt = Ns/float(Np); #turns ratio
Es = Is*Re; #voltage induced in secondary winding in V
Im = mmf/float(Np); #secondary current in A
Ip = math.sqrt(((Kt*Is)**2)+((Im)**2)); #primary current in A
Kact = Ip/float(Is); #actual transformation ratio
x = Im/float(Kt*Is); #tangential component
theta = math.atan(x); #phase angle
phimax = Es/float(4.44*f*Ns);
Bmax = phimax/float(Ac);
#result
print'actual tranformation ratio = %3.2f'%Kact;
print'phase angle = %3.2f'%((theta*180)/float(math.pi)),'° ';
print'maximum flux density in core = %3.4f'%Bmax,'Wb/m**2';
import math
#variable declaration
I0 = 1; #exciting current in A
Knom = 200; #current transformer ratio
Re = 1.1; #non inductive resistance in Ω
p = 0.45; #power factor
delta = 0;
Is = 5; #rated secondary winding current in A
#calculations
alpha = 90-(((math.acos(p))*180)/float(math.pi));
Kt = Knom #since no turn compenasation
y = math.sin(((delta+alpha)*math.pi)/float(180));
Kact = Kt+((I0/float(Is))*(y)); #actual transformation ratio
r = ((Knom-Kact)/float(Kact))*100; #ratio error
k =math.cos(((delta+alpha)*math.pi)/float(180));
theta = (180/math.pi)*((I0*k)/float(Kt*Is)); #phase angle degreess
#calculation
print'ratio error at full load = %3.4f'%r,'%';
print'phase angle = %f'%(theta*100),'degrees(equal to (3 minutes 4 seconds))';
import math
#variuable declaration
Knom = 200; #nominal ratio
Np = 1; #number of primary turns
R = 1.4; #secondary impendance in Ω
L = 1.4; #iron loss in W
I = 5; #current in A
d = 0; #load angle when burden is pure resistive
mmf = 80; #magnetomotive force in A
f = 50;
#calculations
Kt = Knom; #turns ratio
Ns = Kt*Np; #number of secondary turns
Es = I*R; #secondary induced voltage in V
phimax = Es/float(4.44*f*Ns); #flux in core Wb
Ep = Es/float(Kt); #primary induced voltage in V
Iw = L/float(Ep); #loss component of exciting current in A
Im = mmf/float(Np); #magnetising current
Kact = Kt+(((Im*math.sin(d))+(Iw*math.cos(d)))/float(Is)); #actual ratio
r = (Knom-Kact)/float(Kact); #ratio error in %
r1 = r*100;
#result
print'flux in the core = %3.4e'%phimax,'wb';
print'ratio error = %3.3f'%r1,'%';
import math
#variable declaration
Np = 1; #number of primary turns
Ns = 250; #number of secondary turns
Rp = 1.4; #resistance of secondary circuit in Ω
Xs = 1.1; #reactance of secondary circuit in Ω
Is = 5; #current in secondary winding in A
mmf = 80; #magnetomotive force in A
L = 1.1; #iron loss in W
#calculations
Kt = Ns/float(Np); #turns ratio
Knom = Kt;
Rs = math.sqrt((Rp**2)+(Xs**2)); #secondary circuit impedance
cosd = Rp/float(Rs);
sind = Xs/float(Rs);
Es = Is*Rs; #secondary induced voltage in V
Ep = Es/float(Ns); #primary induced voltage in V
Iw = L/float(Ep); #loss of component reffering to primary winding in A
Im = mmf/float(Np); #magnetising current in A
Kact = Kt+(((Im*sind)+(Iw*cosd))/float(Is)); #actual transformation ratio
r = ((Knom-Kact)/float(Kact))*100; #ratio error in %
theta = (180/math.pi)*(((Im*cosd)-(Iw*sind))/float(Kt*Is)); #phase angle degreess
#result
print'ratio error = %3.2f'%r,'%';
print'phase angle =%3.2f'%theta,'°';
import math
#variable declaration
Np = 1; #number of primary windings
Ns = 300; #umber of secondary windings
Re = 1; #ammeter ressistance in Ω
Xe = 0.55; #reactance in Ω
Rs = 0.3; #resistance if secondary winding in Ω
Xs = 0.25; #reactance of secondary winding in Ω
mmf = 90; # mmf for magnetisation
mmfc = 45; #mmf for core loss
Is = 5; #current in A
#calculations
R = Rs+Re; #total secondarycircuit resistance in Ω
X = Xs+Xe; #total secondarycircuit reactance in Ω
delta = math.atan(X/float(R)); #secondary circuit phase angle
c = math.cos(delta);
s = math.sin(delta);
Kt = Ns/float(Np); #turn ratio
Im = mmf/float(Np); #magnetising current in A
Iw = mmfc/float(Np); #loss component in A
Kact = Kt+(((Im*math.sin(delta))+(Iw*math.cos(delta)))/float(Is)); #actual ratio
Ip = Kact*Is; #primary current A
Knom = Kt;
y = (((Im*math.sin(delta))+(Iw*math.cos(delta)))/float(Is));
Kt1 = (Knom)-(y);
Ns1 = Kt1*Np; #secondary winding turns
r = Ns-Ns1; #reduction in secondary winding turns
#result
print'actual ratio = %3.2f'%Kact;
print'primary current = %3.2f'%Ip,'A';
print'reduction in secondary winding turns = %3.0f'%r;
import math
#variable declaration
Np = 1; #number of primary windings
Ns = 100; #number of secondary windings
Knom = 100; #nominal ratio
Re = 1.45; #external burden non inductive in Ω
Rs = 0.25; #winding resistance in Ω
I0 = 1.8; #current in A
l = 38.4; #lagging angle with secondary voltage reversed in °
Is = 1; #current in secondary winding in A
delta = 0;
#calculations
Kt = Ns/float(Np); #turn ratio
Rt = Re+Rs; #totaal secondary circuit resistance in Ω
alpha = 90-l;
x = math.cos(((delta+alpha)*math.pi)/float(180));
Kact = Kt+((I0/float(Is))*x); #actual ratio
y = math.cos(((delta+alpha)*math.pi)/float(180));
theta = (180/float(math.pi))*((I0*y/float(Kt*Is))); #phase angle in °
#result
print'actual ratio %3.2f'%Kact,'°';
print'phase angle %3.3f'%theta,'°';
import math
#variable declaration
Np = 1; #number of primary windings
Ns = 200; #number of secondary winding
Kt = 200; #actual ratio
Im = 8; #magnetising current in A
Iw = 5; #loss component in A
cosphi = 0.8; # leading by
Knom = 200; #transformer is rated
cosphi1 = 0.8; #lagging by
Is = 5; #current in A
#calculations
sinphi = math.sqrt((1**2)-(cosphi**2));
Kact = Kt+(((Im*sinphi)+(Iw*cosphi))/float(Is)); #actual ratio
er = ((Knom-Kact)/float(Kact))*100; #error ratio
theta = (180/float(math.pi))*(((Im*cosphi)-(Iw*sinphi))/float(Kt*Is)); #phase angle
sinphi1 = -math.sqrt((1**2)-(cosphi1**2));
Kact1 = Kt+(((Im*sinphi1)+(Iw*cosphi1))/float(Is)); #actual ratio
er1 = ((Knom-Kact1)/float(Kact1))*100; #ratio error
theta1 = (180/float(math.pi))*(((Im*cosphi1)-(Iw*sinphi1))/float(Kt*Is)); #phase angle
#result
print'ratio error %3.2f'%er,'%';
print'phase angle %3.4f'%theta;
print'ratio error %3.2f'%er1,'%';
print'phase angle %3.4f'%theta1,'°';
import math
#variable declaration
Np = 1; #number of primary windings
Ns = 99; #number of secondary winding
Rs = 0.4; #secondary winding resistance in Ω
Xs = 0.35; #secondary winding reactance in Ω
Knom = 100; #ratio
mmf = 6; #magnetising mmf in AT
lmmf = 8; #loss mmf in AT
V = 20; #voltage in VA
#calculations
Kt = Ns/float(Np); #actual ratio
Im = mmf/float(Np); #magnetising current in A
Iw = lmmf/float(Np); #loss component in A
Re = V/float(Is**2); #external reistance burden in Ω
R = Rs+Re; #resistance of total seccondary circuit in Ω
#reactance is zero
Xe = 0;
X = Xs+Xe; #reactance of total secondary circcuit burden in Ω
delta = ((math.atan(X/float(R))*180)/float(math.pi)); #phase angle
c = math.cos((delta*math.pi)/float(180));
s = math.sin((delta*math.pi)/float(180));
Kact = Kt+(((Im*s)+(Iw*c))/float(Is)); #actual ratio
er = ((Knom-Kact)/float(Kact))*100; #error ratio
theta = (180/float(math.pi))*(((Im*c)-(Iw*s))/float(Kt*Is)); #phase angle
#result
print'ratio error %3.2f'%er,'%';
print'phase angle %3.4f'%theta;
import math
#variable declaration
Knom = 20; #nominal ratio of 100/5A
V = 20; #rated load in VA
Il = 0.18; #iron loss in W
Im = 1.4; #magnetising current in A
x = 4; #ratio of reactance to resistance
Ip = 100; #primary currnt widing in A
Is = 5; #current in secondary winding in A
#calculations
Kt = Knom; #assuming the value of Kt
Ep = V/float(Ip); #voltage across primary winding in V
Iw = Il/float(Ep); #loss current of exciting current in A
delta = ((math.atan(1/float(x))*180)/float(math.pi)); #phase angle
c = math.cos((delta*math.pi)/float(180));
s = math.sin((delta*math.pi)/float(180));
Kact = Kt+(((Im*s)+(Iw*c))/float(Is)); #actual ratio
er = ((Knom-Kact)/float(Kact))*100; #error ratio
theta = (180/float(math.pi))*(((Im*c)-(Iw*s))/float(Kt*Is)); #phase angle
#result
print'ratio error %3.3f'%er,'%';
print'phase angle %3.4f'%theta,'°';
import math
#variable declaration
Kt = 10; #ratio of 1000/100volts potentia meter
Rp = 86.4; #primary resistance in Ω
Rs = 0.78; #secondary resistance in Ω
Xp = 62.5; #primary reactance in Ω
Xs = 102; #total equivalent reactance in Ω
I0 = 0.03; #no-load current in A
cosphi = 0.42; #power factor
cosgamma = 1; #since power factor = 1
Vs = 100; #voltage in V
#calculations
sinphi = math.sqrt(1-(cosphi**2));
Im = I0*sinphi; #magnetising current in A
Iw = I0*cosphi; #loss current in A
#theta = ((((Is/Kt)*((X*cosgamma)-(Rp*singamma)))+(Iw*Xp)-(Im*Rp))/float(Kt*Vs));
#since Is =0
theta = (((Iw*Xp)-(Im*Rp))/float(Kt*Vs));
singamma = math.sqrt(1-(cosgamma**2));
#burden in VA,theta1 = 0,thus ((((Is/Kt)*((X*cosgamma)-(Rp*singamma)))+(Iw*Xp)-(Im*Rp))/float(Kt*Vs))=0
#(((Is/Kt)*((X*cosgamma)-(Rp*singamma)))+(Iw*Xp)-(Im*Rp)) =0
#Is/Kt = ((Im*Rp)-(Iw*Xp)))/float(((X*cosgamma)-(Rp*singamma)))
#assume x = ((X*cosgamma)-(Rp*singamma)),y = (Iw*Xp)-(Im*Rp)
#Is = Kt*(y/x)
x = ((Xs*cosgamma)-(Rp*singamma));
y = (Im*Rp)-(Iw*Xp);
Is = Kt*(y/float(x)); #current in A
l = Vs*Is; # burden load in VA
#result
print'phase angle error at no load %3.5f'%theta,'°';
print'Note:printing mistake in textbook,theta value is printed wrong';
print'burden load in VA %3.2f'%l,'V A'
import math
#variable declartion
Kt = 60.476; #turns ratio 3810/63 tranformer
Vs = 63; #secondary voltage in V
Rs = 2; #series resistance in Ω
Xs = 1; #reactance in Ω
R = 100; #resistance in Ω
X = 200; #reactance in Ω
#calculations
delta = ((math.atan(X/float(R))*180)/float(math.pi)); #phase angle
Z = math.sqrt((R**2)+(X**2)); #agnitude of impedance
#Kact = Kt+(((Rs*c)+(Xs*s))/float(Vs/float(Is)));
#Vs/float(Is) = Z
c = math.cos((delta*math.pi)/float(180));
s = math.sin((delta*math.pi)/float(180));
x =(Rs*c)+(Xs*s);
y = ((x*Kt)/float(Z));
Kact = Kt+y; #actual ratio
Knom = Kt; #nominal ration
er = ((Knom-Kact)/float(Kact))*100; #error ratio
theta = (180/float(math.pi))*(((Xs*c)-(Rs*s))/float(Z)); #phase angle
#result
print'ratio error %3.4f'%er,'%';
print'phase angle %3.4f'%theta,'°';