from __future__ import division
import math
import cmath
#initializing the variables:
Na = 1200;
Nb = 1000;
Ia = 0.8;# in amperes
Phia = 100E-6;# in Wb
xb = 0.75;
#calculation:
#self inductance of coil A
La = Na*Phia/Ia
#mutual inductance, M
Phib = xb*Phia
M = Nb*Phib/Ia
#Results
print "\n\n Result \n\n"
print "\n self inductance of coil A is ",La," H"
print "\n mutual inductance, M is ",M,"H"
from __future__ import division
import math
import cmath
#initializing the variables:
M = 600E-3;# in Henry
Ia = 5;# in amperes
dt = 0.2;# in secs
#calculation:
#change of current
dIa = 2*Ia
dIadt = dIa/dt
#secondary induced e.m.f., E2
E2 = -1*M*dIadt
#Results
print "\n\n Result \n\n"
print "\n secondary induced e.m.f., E2 is ",E2," V"
from __future__ import division
import math
import cmath
#initializing the variables:
La = 250E-3;# in Henry
Lb = 400E-3;# in Henry
M = 80E-3;# in Henry
#calculation:
#coupling coefficient,
k = M/(La*Lb)**0.5
#Results
print "\n\n Result \n\n"
print "\n coupling coefficient, is ",round(k,3)
from __future__ import division
import math
import cmath
#initializing the variables:
Lx = 80E-3;# in Henry
Ly = 60E-3;# in Henry
Nx = 200;# turns
Ny = 100;# turns
Ix = 4;# in Amperes
Phiy = 0.005;# in Wb
#calculation:
#mutual inductance, M
M = Ny*Phiy/(2*Ix)
#coupling coefficient,
k = M/(Lx*Ly)**0.5
#Results
print "\n\n Result \n\n"
print "\n mutual inductance, M is ",M*1E3,"mH"
print "\n coupling coefficient, is ",round(k,3)
from __future__ import division
import math
import cmath
#initializing the variables:
La = 40E-3;# in Henry
Lb = 10E-3;# in Henry
L = 60E-3;# in Henry
#calculation:
#mutual inductance, M
M = (L - La - Lb)/2
#coupling coefficient,
k = M/(La*Lb)**0.5
#Results
print "\n\n Result \n\n"
print "\n mutual inductance, M is ",M*1E3,"mH"
print "\n coupling coefficient, is ",k
from __future__ import division
import math
import cmath
#initializing the variables:
V = 240;# in Volts
Ra = 5;# in Ohm
La = 1;# in Henry
Rb = 10;# in Ohm
Lb = 5;# in Henry
I = 8;# in amperes
dIdt = 15;# in A/sec
#calculation:
#Kirchhoff’s voltage law
L = (V - I*(Ra + Rb))/dIdt
#mutual inductance, M
M = (L - La - Lb)/2
#coupling coefficient,
k = M/(La*Lb)**0.5
#Results
print "\n\n Result \n\n"
print "\n mutual inductance, M is ",M,"H"
print "\n coupling coefficient, is ",round(k,3)
from __future__ import division
import math
import cmath
#initializing the variables:
k = 0.7;# coefficient of coupling
L1 = 15E-3;# in Henry
L2 = 10E-3;# in Henry
#calculation:
#L1 = La + Lb + 2*k*(La*Lb)**0.5
#L2 = La + Lb - 2*k*(La*Lb)**0.5
#self inductance of coils
a = ((L1 - (L1 + L2)/2)/(2*k))**2
La1 =((L1 + L2)/2 + (((L1 + L2)/2)**2 - 4*a)**0.5)/2
La2 =((L1 + L2)/2 - (((L1 + L2)/2)**2 - 4*a)**0.5)/2
Lb1 = (L1 + L2)/2 - La1
Lb2 = (L1 + L2)/2 - La2
#mutual inductance, M
M = (L1 - L2)/4
#Results
print "\n\n Result \n\n"
print "\nself inductance of coils are ",round(La1*1E3,2),"mH and ",round( Lb1*1E3,2),"mH"
print "\n mutual inductance, M is ",round(M*1E3,2),"mH"
from __future__ import division
import math
import cmath
#initializing the variables:
E1 = 8;# in Volts
thetae1 = 0;# in degrees
w = 2500;# in rad/sec
R = 15;# in ohm
L = 5E-3;# in Henry
M = 0.1E-3;# in Henry
#calculation:
#voltage
E1 = E1*math.cos(thetae1*math.pi/180) + 1j*E1*math.sin(thetae1*math.pi/180)
#Impedance of primary
Z1 = R + 1j*w*L
#Primary current I1
I1 = E1/Z1
#E2
E2 = 1j*w*M*I1
#Results
print "\n\n Result \n\n"
print "\nE2 is ",round(abs(E2),3),"/_",round(cmath.phase(complex(E2.real,E2.imag))*180/math.pi,2),"deg V"
from __future__ import division
import math
import cmath
#initializing the variables:
Lx = 20E-3;# in Henry
Ly = 80E-3;# in Henry
k = 0.75;# coupling coeff.
Ex = 5;# in Volts
#calculation:
#mutual inductance
M = k*(Lx*Ly)**0.5
#magnitude of the open circuit e.m.f. induced
Ey = M*Ex/Lx
#Results
print "\n\n Result \n\n"
print "\n mutual inductance is ",M," H"
print "\n magnitude of the open circuit e.m.f. induced is ",Ey," V"
from __future__ import division
import math
import cmath
#initializing the variables:
E1 = 2;# in Volts
thetae1 = 0;# in degrees
f = 1000/math.pi;# in Hz
R1 = 4;# in ohm
R2 = 16;# in ohm
R3 = 16;# in ohm
R4 = 50;# in ohm
L = 10E-3;# in Henry
M = 2E-3;# in Henry
#calculation:
w = 2*math.pi*f
#R1e is the real part of Z1e
R1e = R1 + R2 + ((R3 + R4)*(M**2)*(w**2))/((R3 + R4)**2 + (w*L)**2)
#X1e is the imaginary part of Z1e
X1e = w*L - (L*(M**2)*(w**3))/((R3 + R4)**2 + (w*L)**2)
Z1e = R1e + 1j*X1e
Z2e = R3 + R4 + 1j*w*L
#primary current, I1
I1 = E1/Z1e
#E2
E2 = 1j*w*M*I1
#secondary current I2
I2 = E2/Z2e
#Results
print "\n\n Result \n\n"
print "secondary current I2 is ",round(abs(I2)*1E3,3),"/_", round(cmath.phase(complex(I2.real,I2.imag))*180/math.pi,2),"deg mA"
from __future__ import division
import math
import cmath
#initializing the variables:
E1 = 50;# in Volts
thetae1 = 0;# in degrees
w = 500;# in rad/sec
R1 = 300;# in ohm
L1 = 0.2;# in Henry
L2 = 0.5;# in Henry
L3 = 0.3;# in Henry
R2 = 500;# in ohm
C = 5E-6;# in farad
M = 0.2;# in Henry
#calculation:
# Self impedance of primary circuit
Z1 = R1 + 1j*w*(L1 + L2)
#Self impedance of secondary circuit,
Z2 = R2 + 1j*(w*L3 - 1/(w*C))
#reflected impedance, Zr
Zr = (w*M)**2/Z2
#Effective primary impedance,
Z1e = Z1 + Zr
#Primary current I1
I1 = E1/Z1e
#Secondary current I2
E2 = 1j*w*M*I1
I2 = E2/Z2
#Results
print "\n\n Result \n\n"
print "\n Self impedance of primary circuit, Z1 is ",Z1.real," + (", Z1.imag,")i ohm"
print "\n Self impedance of secondary circuit, Z2 is ",Z2.real," + (", Z2.imag,")i ohm"
print "\n reflected impedance, Zr is ",Zr.real," +(", Zr.imag,")i ohm"
print "\n Effective primary impedance Z1(eff) is ",Z1e.real," +(",Z1e.imag,")i ohm"
print "\n primary current I1 is ",round(abs(I1),2),"/_",round(cmath.phase(complex(I1.real,I1.imag))*180/math.pi,2),"deg A"
print "\n secondary current I2 is ",round(abs(I2),2),"/_",round(cmath.phase(complex(I2.real,I2.imag))*180/math.pi,2),"deg A"
from __future__ import division
import math
import cmath
#initializing the variables:
E1 = 20;# in Volts
thetae1 = 0;# in degrees
R1 = 15;# in ohm
C1 = 400E-12;# in farad
R2 = 30;# in ohm
L1 = 0.001;# in Henry
L2 = 0.0002;# in Henry
R3 = 50;# in ohm
M = 10E-6;# in Henry
#calculation:
#voltage
E1 = E1*math.cos(thetae1*math.pi/180) + 1j*E1*math.sin(thetae1*math.pi/180)
#the resonant frequency, fr
fr = 1/(2*math.pi*(L1*C1)**0.5)
#The secondary is also tuned to a resonant frequency
#capacitance,C2
C2 = 1/(L2*(2*math.pi*fr)**2)
#the effective primary impedance Z1eff
w = 2*math.pi*fr
Z1e = R1 + R2 + ((w*M)**2)/R3
#Primary current I1
I1 = E1/Z1e
#Secondary current I2
E2 = 1j*w*M*I1
I2 = E2/Z1e
#voltage across capacitor C2
Vc2 = I2*(-1*1j/(w*C2))
#coefficient of coupling, k
k = M/(L1*L2)**0.5
#Results
print "\n\n Result \n\n"
print "\n the resonant frequency,fr is ",round(fr/1000,2),"KHz"
print "\n capacitance,C2 is ",round(C2*1E9,2),"nF"
print "\n Effective primary impedance Z1(eff) is ",round(abs(Z1e),2)," ohm"
print "\n primary current I1 is ",round(abs(I1),2),"/_",round(cmath.phase(complex(I1.real,I1.imag)),0),"deg A"
print "\n voltage across capacitor C2 is ",round(abs(Vc2),2),"/_",round(abs(cmath.phase(complex(Vc2.real,Vc2.imag))),0),"deg V"
print "\n coefficient of coupling, k is ",round(k,4),""
from __future__ import division
import math
import cmath
#initializing the variables:
E1 = 250;# in Volts
thetae1 = 0;# in degrees
R1 = 50j;# in ohm
R2 = 10;# in ohm
R3 = 10;# in ohm
R4 = 50j;# in ohm
R5 = 50;# in ohm
M = 10j;# in ohm
#calculation:
#voltage
E1 = E1*math.cos(thetae1*math.pi/180) + 1j*E1*math.sin(thetae1*math.pi/180)
#Applying Kirchhoff’s voltage law to the primary circuit gives
#(R1 + R2)*I1 - M*I2 = E1
#Applying Kirchhoff’s voltage law to the secondary circuit gives
#-1*M*I1 + ( R3 + R4 + R5)*I2 = 0
#solving these two
I2 = E1/((R1 + R2)*(R3 + R4 + R5)/(-1*M) + (-1*M))
I1 = I2*(R3 + R4 + R5)/(-1*M)
#Results
print "\n\n Result \n\n"
print "\n primary current I1 is ",round(I1.real,2)," +(",round( I1.imag,2),")i A"
print "\n secondary current I2 is ",round(I2.real,2)," +(",round( I2.imag,2),")i A"
from __future__ import division
import math
import cmath
#initializing the variables:
E1 = 40;# in Volts
thetae1 = 0;# in degrees
R1 = 5;# in ohm
L1 = 0.001;# in Henry
L2 = 0.006;# in Henry
R2 = 40;# in ohm
rzl = 200;# in ohm
thetazl = -60;# in degrees
k = 0.70
f = 20000;# in Hz
#calculation:
w = 2*math.pi*f
#voltage
#E1 = E1*math.cos(thetae1*math.pi/180) + 1j*E1*math.sin(thetae1*math.pi/180)
#impedance
ZL = rzl*math.cos(thetazl*math.pi/180) + 1j*rzl*math.sin(thetazl*math.pi/180)
#mutual inductance, M
M = k*(L1*L2)**0.5
#Applying Kirchhoff’s voltage law to the primary circuit gives
#(R1 + 1j*w*L1)*I1 - 1j*w*M*I2 = E1
#Applying Kirchhoff’s voltage law to the secondary circuit gives
#-1j*w*M*I1 + ( R2 + ZL + 1j*w*L2)*I2 = 0
#solving these two
a = R1 + 1j*w*L1
b = 1j*w*M
c = R2 + ZL + 1j*w*L2
I1 = E1/(1*a - (b**2)/c)
d = -1*cmath.phase(complex(I1.real,I1.imag))
e = abs(I1)
I2 = (b/c)*(e*math.cos(d) + 1j*e*math.sin(d))
pd2 = I2*ZL
#Results
print "\n\n Result \n\n"
print "\n mutual induction M is ",round(M*1E3,3),"mH"
print "\n primary current I1 is ",round(abs(I1),3),"/_",round(-1*cmath.phase(complex(I1.real,I1.imag))*180/math.pi,2),"deg A"
print "\n secondary current I2 is ",round(abs(pd2),1),"/_",round(cmath.phase(complex(pd2.real,pd2.imag))*180/math.pi,2),"deg V"
from __future__ import division
import math
import cmath
#initializing the variables:
E1 = 50;# in Volts
thetae1 = 0;# in degrees
r = 5;# in ohm
R1 = 20;# in ohm
L1 = 0.2;# in Henry
L2 = 0.4;# in Henry
R2 = 25;# in ohm
RL = 20;# in ohm
M = 0.1;# in Henry
f = 75/math.pi;# in Hz
#calculation:
w = 2*math.pi*f
#Applying Kirchhoff’s voltage law to the primary circuit gives
#(r + R1 + 1j*w*L1)*I1 - 1j*w*M*I2 = E1
#Applying Kirchhoff’s voltage law to the secondary circuit gives
#-1*1j*w*M*I1 + ( R2 + RL + 1j*w*L2)*I2 = 0
#solving these two
I2 = E1/((r + R1 + 1j*w*L1)*(R2 + RL + 1j*w*L2)/(1j*w*M) + (-1*1j*w*M))
I1 = I2*(R2 + RL + 1j*w*L2)/(1j*w*M)
#Results
print "\n\n Result \n\n"
print "\n primary current I1 is ",round(abs(I1),2),"/_",round(cmath.phase(complex(I1.real,I1.imag))*180/math.pi,2),"deg A"
print "\n load current I2 is ",round(abs(I2),2),"/_",round(cmath.phase(complex(I2.real,I2.imag))*180/math.pi,2),"deg A"
from __future__ import division
import math
import cmath
#initializing the variables:
E1 = 50;# in Volts
thetae1 = 0;# in degrees
r = 5;# in ohm
R1 = 20;# in ohm
L1 = 0.2;# in Henry
R = 8;# in ohm
L = 0.1;# in Henry
L2 = 0.4;# in Henry
R2 = 25;# in ohm
RL = 20;# in ohm
M = 0.1;# in Henry
f = 75/math.pi;# in Hz
#calculation:
w = 2*math.pi*f
#Applying Kirchhoff’s voltage law to the primary circuit gives
#(r + R1 + 1j*w*L1 + R + 1j*w*L)*I1 - (1j*w*M + R + 1j*w*L)*I2 = E1
#Applying Kirchhoff’s voltage law to the secondary circuit gives
#-1*(1j*w*M + R + 1j*w*L)*I1 + (R2 + RL + 1j*w*L2 + R + 1j*w*L)*I2 = 0
#solving these two
I2 = E1/((r + R1 + 1j*w*L1 + R + 1j*w*L)*(R2 + RL + 1j*w*L2 + R + 1j*w*L)/(1j*w*M + R + 1j*w*L) + (-1*(1j*w*M + R + 1j*w*L)))
I1 = I2*(R2 + RL + 1j*w*L2 + R + 1j*w*L)/(1j*w*M + R + 1j*w*L)
#reversing
#Applying Kirchhoff’s voltage law to the primary circuit gives
#(r + R1 + 1j*w*L1 + R + 1j*w*L)*I1r - (-1*1j*w*M + R + 1j*w*L)*I2r = E1
#Applying Kirchhoff’s voltage law to the secondary circuit gives
#-1*(-1*1j*w*M + R + 1j*w*L)*I1r + (R2 + RL + 1j*w*L2 + R + 1j*w*L)*I2r = 0
#solving these two
I2r = E1/((r + R1 + 1j*w*L1 + R + 1j*w*L)*(R2 + RL + 1j*w*L2 + R + 1j*w*L)/(-1*1j*w*M + R + 1j*w*L) + (-1*(-1*1j*w*M + R + 1j*w*L)))
I1r = I2r*(R2 + RL + 1j*w*L2 + R + 1j*w*L)/(-1*1j*w*M + R + 1j*w*L)
#Results
print "\n\n Result \n\n"
print "primary current I1 is ",round(abs(I1),2),"/_",round(cmath.phase(complex(I1.real,I1.imag))*180/math.pi,2),"deg A"
print "load current I2 is ",round(abs(I2),2),"/_",round(cmath.phase(complex(I2.real,I2.imag))*180/math.pi,2),"deg A"
print "reversed primary current I1r is ",round(abs(I1r),2),"/_",round(cmath.phase(complex(I1r.real,I1r.imag))*180/math.pi,2),"deg A"
print "reversed load current I2r is ",round(abs(I2r),2),"/_",round(cmath.phase(complex(I2r.real,I2r.imag))*180/math.pi,2),"deg A"