import math
# GIVEN DATA
D = 35*10**-2; # Outer diameter of the conducting disk in Meter
d = 10*10**-2; # Inner diameter of the conducting disk in Meter
B = 1.0; # Axial magnetic field in Telsa
N = 900; # Rotating shaft running in RPM
# ,S
Wr = (2*math.pi*N)/60; # Rotational angular speed in radians/s
Er = ((D**2-d**2)*B*Wr)/8; # EMF induced in Volts
# DISPLAY RESULTS
print ("EXAMPLE : 7.1: SOLUTION :-");
print " a) Induced EMF in the outer and inner rims of the disk, Er = %.4f V "%(Er)
import math
# GIVEN DATA
D = 0.120; # Outer Radius of the Printed Circuit Motor in meter
d = 0.060; # Inner Radius of the Printed Circuit Motor in meter
B = 0.7; # Axial Flux Density in Telsa
V = 12; # Volage Supplied to the Motor in Volts
R = 2700; # Motor Speed in RPM
n = 0.65; # Efficiency of Motor
p = 94; # Output Power of Motor in Watts
I = 12; # Motor current in Ampheres
# ,S
w = ((2*(math.pi))*R)/60; # The Angular Velocity in Radians/second
T = p/w; # Torque in Newton-Meter
N = (8*T)/((D**2-d**2)*B*I) # Total Number of Conductors
# DISPLAY RESULTS
print ("EXAMPLE : 7.2 : SOLUTION :-") ;
print " a) Torque, T = %.2f N-m "%(T);
print " b) Total Number of Conductors, N = %.2f nearly 30 "%(N);
import math
# GIVEN DATA
m = 2; # Total number of phase in servo Motor
f = 50; # Frequency in Hertz
V = 220; # Operating Voltage of the servo Motor in Volts
R1 = 250; # Circuit Parameter in Ohms
R2 = 750; # Circuit Parameter in Ohms
X1 = 50; # Circuit Parameter in Ohms
X2 = 50; # Circuit Parameter in Ohms
Xm = 1000; # Circuit Parameter in Ohms
s = 0.6; # Slip
Va = 220; # Unbalanced Voltage in Volts
Vb = 150 * (1j * (-60) * math.pi/180)**2; # Unbalanced Voltage in Volts
# ,S
Va1 = (Va + 1j*Vb)/2; # Positive sequence voltage in Volts
Va2 = (Va - 1j*Vb)/2; # Negative sequence voltage in Volts
Z11 = (R1+1j*X1);
Z12 = (((1j*Xm)*(R2/s+1j*X2))/(1j*Xm+R2/s+1j*X2));
Z1 = Z11 + Z12 ; # Positive sequence impedance in Ohms
Z2 = (R1+1j*X1) + (((1j*Xm)*(R2/(2-s)+1j*X2))/(1j*Xm+R2/(2-s)+1j*X2)); # Negative sequence impedance in Ohms
Ia1 = Va1/Z1; # Positive sequence current in Amphere
I12 = (Ia1*Z12)/(R2/s); # Positive sequence current in Amphere
Ia2 = Va2/Z2; # Negative sequence current in Amphere
I22 = (Ia2*Z2)/(R2/(2-s)); # Negative sequence current in Amphere
T1 = 2*(abs(I12)**2)*R2/s; # Positive sequence torque in Newton-meter
T2 = 2*(abs(I22)**2)*R2/(2-s); # Negative sequence torque in Newton-meter
T = T1 - T2; # resultant torque in Newton-meter
Ia = Ia1 + Ia2; # Line current in Amphere
Ib = (-1j*Ia1) + (1j*Ia2); # Line current in Amphere
# DISPLAY RESULTS
print ("EXAMPLE : 7.3: SOLUTION :-");
print " a) resultant torque, T = %.2f N-m "%(T)
print " b) Phase currents line currents), Ia = %.2f < %.2f A Ib = %.2f < %.2f "%(abs(Ia), math.atan2(Ia.imag,Ia.real), abs(Ib), math.degrees(math.atan2(Ib.imag,Ib.real)))
print " IN THE ABOVE PROBLEM ALL THE VALUES PRINTED IN THE TEXT BOOK ARE NOT ACCURATE%( SO VALUE OF THE TORQUE AND LINE CURRENTS ARE DIFFERING, WHEN WE COMPARED TO THE TEXT BOOK ANSWERS FOR THE SAME. "
print " IN EVERY CALCULATED PARAMETER IN THE TEXT BOOK SLIGHT VARIATION IS THERE AS WE COMPARED TO MANUAL , ITS FROM POSITIVE SEQUENCE VOLTAGE Va1 "
import math
# GIVEN DATA
m = 2; # Total number of phase in AC drag-cup servo Motor
p = 2; # Number of poles
Va = 220; # Operating Voltage of the servo Motor in Volts
R1 = 350; # Circuit Parameter in Ohms
R2 = 250; # Circuit Parameter in Ohms
X1 = 60; # Circuit Parameter in Ohms
X2 = 50; # Circuit Parameter in Ohms
Xm = 900; # Circuit Parameter in Ohms
s = 0.3; # Slip
p = 0.8; # Ratio of the control winding and main winding voltage
# ,S
Va1 = (Va*(1+p))/2; # Positive sequence voltage in Volts
Va2 = (Va*(1-p))/2; # Negative sequence voltage in Volts
Z11 = (R1+1j*X1);
Z12 = (((1j*Xm)*(R2/s+1j*X2))/(1j*Xm+R2/s+1j*X2));
Z1 = Z11 + Z12 ; # Positive sequence impedance in Ohms
Z2 = (R1+1j*X1) + (((1j*Xm)*(R2/(2-s)+1j*X2))/(1j*Xm+R2/(2-s)+1j*X2)); # Negative sequence impedance in Ohms
Ia1 = Va1/Z1; # Positive sequence current in Amphere
I12 = (Ia1*Z12)/(R2/s); # Positive sequence current in Amphere
Ia2 = Va2/Z2; # Negative sequence current in Amphere
I22 = (Ia2*Z2)/(R2/(2-s)); # Negative sequence current in Amphere
T1 = 2*(abs(I12)**2)*R2/s; # Positive sequence torque in Newton-meter
T2 = 2*(abs(I22)**2)*R2/(2-s); # Negative sequence torque in Newton-meter
T = T1 - T2; # resultant torque in Newton-meter
# DISPLAY RESULTS
print ("EXAMPLE : 7.4: SOLUTION :-");
print " a) resultant torque, T = %.2f N-m "%(T)
print " IN THE ABOVE PROBLEM ALL THE VALUES PRINTED IN THE TEXT BOOK ARE NOT ACCURATE, SO VALUE OF THE TORQUE AND LINE CURRENTS ARE DIFFERING WHEN WE COMPARED TO THE TEXT BOOK ANSWERS FOR THE SAME. "
print " IN EVERY CALCULATED PARAMETER IN THE TEXT BOOK SLIGHT VARIATION IS THERE AS WE COMPARED TO MANUAL , ITS FROM POSITIVE SEQUENCE IMPEDANCE Z1 "
import math
# GIVEN DATA
R = 15; # resistance of the fractional horse power AC series motor in Ohms
V = 230; # AC supply voltage in Volts
f = 50; # Frequency in Hertz
I = 1.2; # Motor current in Amphere
NDC = 2500; # Rotating speed of the Motor during DC Operation in RPM
L = 0.5; # Total inducmath.tance in Henry
# CALCUALTIONS
X = 2*math.pi*f*L; # reactance in Ohms
NAC = NDC * (math.sqrt(V**2-(I*X)**2)-(I*R)) / (V-(I*R)); # Rotating speed of the Motor during AC Operation in RPM
pf = math.sqrt(1-((I*X)/V)**2); # Power factor lagging
# DISPLAY RESULTS
print ("EXAMPLE : 7.5: SOLUTION :-");
print " When the Motor operting at AC 230V, 50 Hz a) NAC = %.f RPM "%(NAC)
print " b) Power factor = %.4f lagging "%(pf)
import math
from numpy import roots
from numpy import poly
# GIVEN DATA
R = 1.4; # Total resistance of the AC series motor in Ohms
V = 115.; # supply voltage in Volts
f = 50.; # Frequency in Hertz
N = 5000.; # Rotating speed in RPM
X = 12.; # Total reactance in Ohms
P = 250.; # Electrical power output in Watts
loss = 18.; # Rotational losses in Watts
# ,S
Pd = P + loss; # Mechanical power developed in Watts
# We know that Er = Pd/I and from phasor diagram in figure 7.11 page no. 501 V**2 = (Er+I*R)**2+(I*X)**2, 115**2 = (268/I-1.4*I)**2+(12*I)**2, 13225*I**2 = 71824+2.036*I**4-750.4*I**2+144*I**2, solving this we get 2.036*I**4-13831.4*I**2+71824 = 0, I**4-6793.42*I**2+3577 = 0 this gives I = 2.28A or 82.38A (The above , part is wrong )
i = poly([3577,0,-6793.42,0,1]); # Expression for the Current in Quadratic form
a = roots (i); # 4-Value of the current in Amphere
print a;
print i;
I = a[4]; # Curent in Amphere neglecting higher value and negative value
pf_a = math.sqrt(1-((I*X)/V)**2); # Power factor lagging
Er_a = math.sqrt(V**2-(I*X)**2)-(I*R); # Rotational Voltage in Volts
T_a = (Er_a*I)/(2*math.pi*N/60); # Developed torque in Newton-meter
Ih = I/2; # Current halved in Amphere
pf_b = math.sqrt(1-((Ih*X)/V)**2); # Power factor lagging when load current halved
Er_b = math.sqrt(V**2-(Ih*X)**2)-(Ih*R); # Rotational Voltage in Volts when load current halved
N2 = (N*Er_b*I)/(Er_a*Ih); # New speed in RPM when load current halved
T_b = (Er_b*Ih)/(2*math.pi*N2/60); # Developed torque in Newton-meter when load current halved
eta = 100*(Er_b*Ih)/(V*Ih*pf_b); # Efficiency when load current halved
# DISPLAY RESULTS
print ("EXAMPLE : 7.6: SOLUTION :-");
print " At rated condition, \n\n (a.1) Current, I = %.2f A "%(I)
print " a.2) Power factor = %.3f lagging "%(pf_a)
print " a.3) Developed torque = %.2f N-m "%(T_a)
print " When load current halved (reduced to half), \n\n (b.1) Speed, N2 = %.f RPM "%(N2)
print " b.2) Power factor = %.4f lagging "%(pf_b)
print " b.3) Developed torque = %.2f N-m "%(T_b)
print " b.4) Efficiency = %.1f percenatge "%(eta)
print " From , of the Current(I), rest all the Calculated values in the TEXT BOOK is WRONG because of the Current equation and its value both are WRONGLY calculated and the same used for the further , part, so all the values are in the TEXT BOOK IS WRONG ";
import math
# GIVEN DATA
V = 220; # supply voltage in Volts
f = 50; # Frequency in Hertz
p = 4; # Number of poles
Xm = 50; # Mutual reactance in Ohms
Rs = 0.4; # resistance of stator windings in Ohms
Xs = 2.5; # Leakage reactance of stator windings in Ohms
Ra = 2.2; # resistance of Armature windings in Ohms
Xa = 3.1; # Leakage reactance of armature windings in Ohms
loss = 30; # Rotational losses in Watts
N = 2000; # Motor running speed in RPM
# ,S
Ns = (120*f)/p; # Synchronous speed in RPM
s = N/Ns; # Speed ratio
I1 = V/(2*Rs + 2*1j*Xs + 2*1j*Xm + (1j*Xm**2)*((s-1j)/(Ra+1j*Xa+1j*Xm)));# line current in Amphere
pf = math.degrees(math.cos(math.radians(math.degrees(math.atan2(I1.imag,I1.real))))); # Power factor lagging
I2 = (s-1j)*(1j*Xm*I1)/(Ra+1j*Xa+1j*Xm); # line current in Amphere
P1 = V*abs(I1)*math.degrees(math.cos(math.radians(math.degrees(math.atan2(I1.imag,I1.real))))); # Input power in Watts
Pm = P1 - 2*(abs(I1)**2)*Rs - (abs(I2)**2)*Ra; # Mechanical power developed in Watts
Po = Pm - loss; # output power in Watts
eta = 100*(Po/P1); # Efficiency
# DISPLAY RESULTS
print ("EXAMPLE : 7.7: SOLUTION :-");
print " a) Line currents, I1 = %.2f < %.2f A and I2 = %.2f < %.2f A "%(abs(I1),math.degrees(math.atan2(I1.imag,I1.real)),abs(I2),math.degrees(math.atan2(I2.imag,I2.real)))
print " b) Power factor = %.2f lagging "%(pf)
print " c) Efficiency = %.2f percentage "%(eta)
print " [ TEXT BOOK SOLUTION IS PRINTED WRONGLY I verified by manual , ]" ;
print " WRONGLY PRINTED ANSWERS ARE :- a) I1 = 3.37 < -42.78 A instead of %.2f < j%.2f) A "%(abs(I1),math.degrees(math.atan2(I1.imag,I1.real)));
print " b) I2 = 5.26 < -77.34 A instead of %.2f < j%.2f) A "%(abs(I2),math.degrees(math.atan2(I2.imag,I2.real)));
print " b) eta = 81.53 percent instead of %.2f percent "%(eta)
print " From , of the I1, rest all the Calculated values in the TEXT BOOK is WRONG because of the I1 value is WRONGLY calculated and the same used for the further , part "
import math
# GIVEN DATA
V = 220.; # supply voltage in Volts
f = 50.; # Frequency in Hertz
p = 4.; # Number of poles
Xm = 60.; # Mutual reactance in Ohms
Rs = 1.0; # resistance of stator windings in Ohms
Xs = 6.0; # Leakage reactance of stator windings in Ohms
Ra = 2.5; # resistance of Armature windings in Ohms
Xa = 6.0; # Leakage reactance of armature windings in Ohms
P_hp = 1.; # Output power in HP
N = 1400.; # Motor running speed in RPM
alpha = 15.; # Brush print lacement from the low-impedance position in degree
# CALCULATIONS
Ns = (120*f)/p; # Synchronous speed in RPM
s = N/Ns; # Speed ratio
I = V / (Rs + 1j*(Xs+Xm) + (1j*Xm**2*((math.cos(math.radians(alpha)))))*(s*(math.sin(math.radians(alpha)))-(1j*((math.cos(math.radians(alpha))))))/(Ra+1j*(Xa+Xm))); # Curent in Amphere
# I = V / (Rs + %i*(Xs+Xm) + (%i*Xm^2*cosd(alpha))*(s*sind(alpha)-(%i*cosd(alpha)))/(Ra+%i*(Xa+Xm))); // Curent in Amphere
pf = math.degrees(math.cos(math.radians(math.degrees(math.atan2(I.imag,I.real))))); # Power factor lagging
# DISPLAY RESULTS
print ("EXAMPLE : 7.8: SOLUTION :-");
print " a) Currents, I = %.2f < %.2f A "%(abs(I), math.degrees(math.atan(I.imag))%(I.real))
print " b) Power factor = %.4f lagging "%(pf)
import math
# GIVEN DATA
E2 = 100.; # Per phase smath.degrees(math.atanstill EMF in Volts
Z2s = 0.025 + 1j*0.08; # Rotor circuit impedance at smath.degrees(math.atanstill
E = 50.; # Injected EMF in Volts
# ,S
I2 = 0; # Assuming Current is zero
s1 = (E/E2)+(I2*Z2s)/E2; # Slip when injected EMF is opposite to the E2
s2 = (-E/E2)+(I2*Z2s)/E2; # Slip when injected EMF is phase with E2
# DISPLAY RESULTS
print ("EXAMPLE : 7.9: SOLUTION :-");
print " a) Slip when injected EMF is opposite to the E2, s = %.1f "%(s1.real)
print " b) Slip when injected EMF is phase with E2, s = %.1f "%(s2.real)
import math
# GIVEN DATA
L = 1.0; # Length in Meter
S = 60; # Number of slots
f = 50; # Frequency in Hertz
v = 440; # Operating Volage of the Motor in Volts
V = 11.5; # Running speed of the motor in Meter/second
m = 3; # Number of phases
p = 8; # Total number of Poles
# ,S
Vs = (2*L*f)/p; # Synchronous linear speed in Meter/second
s = (Vs-V)/Vs; # Linear slip
Vph = v/math.sqrt(3); # Phase Voltage in Volts
Z1 = 6.0 + 1j*5; # Impedance in Ohms refer figure and page no. 526
Z2 = ((100*1j)*(5*1j+8.2/s))/(100*1j+5*1j+8.2/s); # Impedance in Ohms refer figure and page no. 526
Z = Z1 + Z2; # Total Impedance in Ohms
I = Vph/Z; # Per phase Current when Machine is running at 11.5 m/s in Amphere
pf = math.degrees(math.cos(math.radians(math.degrees(math.atan2(I.imag,I.real))))); # Power factor lagging
# DISPLAY RESULTS
print ("EXAMPLE : 7.10 : SOLUTION :-") ;
print " a) Synchronous linear speed, Vs = %.1f m/s "%(Vs);
print " b) Per phase current when Machine is running at 11.5 m/s, I = %.2f < %.2f A "%(abs(I),math.degrees(math.atan2(I.imag,I.real)))
import math
# GIVEN DATA
s = 9.; # Degree per step of the stepper motor
N = 200.; # Rotation Speed of the Stepper motor in RPM
# ,S
spr = 360/s; # Steps Per Revolution (360 is full revolution)
pps = (N*spr)/60; # Input pulse rate in pulses per second
# DISPLAY RESULTS
print ("EXAMPLE : 7.11: SOLUTION :-");
print " a) Input pulse rate is %.2f pulses per second "%(pps)
import math
# GIVEN DATA
L1 = 1.1; # Inducmath.tance in Henry
L2 = 1.07; # Inducmath.tance in Henry
dtheta = 1; # Rotor rotation in Mechanical degree
r = 0.10; # Radius of the rotor in Meter
I = 20; # Coil Current in Amphere
# ,S
dl = L1-L2; # Change in Inducmath.tance of one of its stator coils in Henry
F = (I**2*dl)/(2*dtheta); # Force on the math.single rotor pole in Newton
T = F*r; # Insmath.tanmath.taneous Torque in Newton-meter
# DISPLAY RESULTS
print ("EXAMPLE : 7.13: SOLUTION :-");
print " a) Insmath.tanmath.taneous Torque, T = %.1f N-m "%(T)
print "The force is a motoring force math.since inducmath.tance of the coil is rimath.sing"
import math
# GIVEN DATA
Va = 220 * ( 1j * 0 * math.pi/180)**2; # Three phase in Volts
Vb = 230 * ( 1j * (-115) * math.pi/180)**2; # Three phase in Volts
Vc = 250 * ( 1j * (-245) * math.pi/180)**2; # Three phase in Volts
# CALCUALTIONS
# We know that operator :-
alpha = 1 * ( 1j * 120 * math.pi/180)**2;
alpha2 = 1 * ( 1j * (-120) * math.pi/180)**2;
Va0 = (Va+Vb+Vc)/3 # Zero sequence Voltage in Volts
Va1 = (Va+alpha*Vb+alpha2*Vc)/3 # Positive sequence Voltage in Volts
Va2 = (Va+alpha2*Vb+alpha*Vc)/3 # Negative sequence Voltage in Volts
# DISPLAY RESULTS
print ("EXAMPLE : 7.14 : SOLUTION :-") ;
print " a) Zero sequence Voltage, Va0 = %.2f < %.2f V "%(abs(Va0),math.degrees(math.atan2(Va0.imag,Va0.real)));
print " b) Positive sequence Voltage, Va1 = %.3f < %.2f V "%(abs(Va1),math.degrees(math.atan2(Va1.imag,Va1.real)));
print " c) Negative sequence Voltage, Va1 = %.2f < %.1f V "%(abs(Va2),math.degrees(math.atan2(Va2.imag,Va2.real)));