import math
#Variable declaration
T=10.0 #[turns]
Coil=144.0 #[no. of coils]
R=0.011 #[Resitance] ohm
fi=0.05 #Wb(flux per pole)
N=200.0 #[Speed] rpm
par_paths=2.0 #[Parallel paths] for wave winding
#Calculation
T_path=Coil*T/par_paths #no. of turns in each parallel path
R_path=R*T_path #ohm
Ra=R_path/par_paths #ohm(armature resistance)
p=12.0 #poles
emf=par_paths*Coil*T*p*fi*N/60.0/2.0 #V
R1=1000.0 #ohm
IL=emf/R1 #A
Ia=IL #A
T=par_paths*Coil*T*p*fi*Ia/2.0/math.pi/par_paths #N-m
#Result
print"(a) Armature resistance : ",Ra,"ohm"
print"(b) Torque: ",round(T,2),"N-m"
import math
#Variable declaration
Ia=110.0 #[Armature current] A
V=480.0 #[Volatge] volt
Ra=0.2 #[Resistance] ohm
p=6.0 #[poles]
C=864.0 #No of conductors
fi=0.05 #Wb[(flux per pole)]
#Calculation
back_emf=V-(Ia*Ra) #Volt
N=back_emf*60.0*p/C/p/fi #rpm
T=C*p*fi*Ia/2.0/math.pi/p #N-m
#Result
print"Speed : ",round(N,1),"rpm"
print"Torque: ",round(T,1),"N-m"
import math
#Variable declaration
Ia=100.0 #[Current] A
V=200.0 #[Voltage] volt
N=600.0 #[Speed] rpm
Ra=0.05 #[Resistance] ohm
Eff=85.0/100.0 # [Efficiency]
#Calculation
Ia1=Ia*Eff #armature current in separately excited dc motor
emf=V-Ia*Ra #V(motoring mode induced emf)
N1=500.0 #rpm(generating mode speed)
Gen_emf=emf*N1/N #V
Vo=round(Gen_emf)-Ia1*Ra #V
#Result
print"Voltage of source : ",Vo,"V"
import math
#Variable declaration
Ia1=10.0 #[Current] A
V1=200.0 #[Voltage] volt
N1=1800.0 #[Speed] rpm
Ra=0.6 #[Resistance] ohm
Rfield=360.0 #[Field resistance] ohm
V2=180.0 #[Voltage] volt
I_line=20.0 #[Limit line surrent] A
#Calculation
#fi2=V2/V1*fi1
fi2BYfi1=V2/V1
#Ia1*fi1=Ia2*fi2
Ia2=Ia1/fi2BYfi1 #A
Eb1=V1-Ia1*Ra #V
Eb2=V2-Ia2*Ra #V
#Eb1/Eb2=fi1*N1/fi2/N2
N2=N1/(Eb1/Eb2*fi2BYfi1) #rpm
Ifield=V2/Rfield #A
Ia=I_line-Ifield
#V2=Ia*(R+Ra)
R=V2/Ia-Ra #ohm
#Result
print"(a) Motor speed after supply voltage decreases : ",round(N2,2),"rpm"
print"(b) Additional resistance is: ",round(R,2),"ohm"
import math
#Variable declaration
Ia1=10.0 #A
V1=200.0 #[Supply voltage] volt
N1=1800.0 #[Motor speed] rpm
Ra=0.6 #[Resistance] ohm
Rfield=360.0 #[Field resistace] ohm
V2=180.0 #[Voltage] volt
I_line=20.0 #[Limit line current] A
#Calculation
Ia=Ia1-V1/Rfield #A(At changeover time)
emf=V1-Ia*Ra #volt
Ifield=emf/Rfield #A(At changeover time)
Iout=Ia1-Ifield #A
Rbraking=emf/Iout #ohm(Braking Resistance)
#Result
print"Braking resistance : ",round(Rbraking,3),"ohm"
from scipy import integrate
import math
#Variable declaration
Ia1=10.0 #[Current] A
V1=200.0 #[Voltage] volt
N1=1800.0 #[Motor speed] rpm
Ra=0.6 #[Resistance] ohm
Rfield=360.0 #[Field resistnce] ohm
V2=180.0 #[VOltage] volt
I_line=20.0 #[Limit line current] A
#Calculation
#Part (a)
Ia=Ia1-V1/Rfield #A(At changeover time)
emf=V1-Ia*Ra #volt
Ifield=emf/Rfield #A(At changeover time)
Iout=Ia1-Ifield #A
Rbraking=emf/Iout #ohm(Braking Resistance)
I_initial=Iout #A(Inotial current)
t=30.0 #sec(time taken to stop)
I_change_rate=I_initial/t #A/s
#i=I_initial-I_change_rate*t , for 0<t<30(during braking time)
def f(t):
return((I_initial**2+(I_initial/30.0)**2.0/3.0*t**2.0-2.0*I_initial*I_initial/30.0*t)*Rbraking)
E_dissipated=integrate.quad(f,0.0,t) #W-s
#Part (b)
#Rbraking=Rbraking-Rbraking/30*t #ohm
def g(t):
return(I_initial**2*(Rbraking-Rbraking/30*t))
E=integrate.quad(g,0.0,30.0) #Watt-sec
#Result
print"Part(a) Energy dissipated : ",round(E_dissipated[0],1),"watts-seconds"
print"Part(b) Energy dissipated in watts-sec : ",round(E[0]),"watt-seconds"
print"NOTE:calculation of first part is not accurate in the book."
import math
#Variable declaration
I=50.0 #[DC Current] A
V=200.0 #[DC Volatge] volt
N=1000.0 #[Motor speed] rpm
Ra=0.2 #[Resiatnce[ ohm
#Calculation
Eb=V-I*Ra #V
Rt=(V+Eb)/2.0/I #ohm(Total resistance required)
omega_m=N/60.0*2.0*math.pi #rad/s
T1=Eb*2.0*I/omega_m #N-m
Eb=0.0 #for speed=0
I=V/Rt #A
#T proportional to I(for separately excited motor)
T2=T1*(I/100.0) #N-m
#Result
print"Additional resistance required to limit the current : ",Rt-0.5,"ohm"
print"Braking torque : ",round(T1,2),"N-m"
print"Torque when speed decreased to zero : ",round(T2,2),"N-m"
import math
#Variable declaration
Ra=0.2 #[Armature resistance] ohm
Rf=100.0 #[Field resistance] ohm
N=500.0 #[Rate dspeed] rpm
Rb=2.0 #Braking resistance ohm
E1=100.0 #back emf in V
If1=2.0 #Field curremn [A]
If2=2.5 #[Current] A
If3=3.0 #A
E2=125.0 #[EMF] V
E3=150.0 #[EMF] V
#Ib=Rf*If1/2
#Ia=If+Ib #A
#Calculation
omega_m=N/60.0*2.0*math.pi #rad/s
Kefi1=E1/omega_m
Kefi2=E2/omega_m
Kefi3=E3/omega_m
T1=E1/omega_m*51.0*If1 #N-m
T2=E2/omega_m*51.0*If2 #N-m
T3=E3/omega_m*51.0*If3 #N-m
Tload=300.0 #N-m
Kefi=2.36
If=2.482 #A
Ia=51.0*If #A
E=If*Rf/2.0+Ia*Ra #V
N=E/Kefi #rad/s
N=N*60.0/2.0/math.pi #rpm
#Result
print"Speed of motor : ",round(N,1),"rpm"
import math
%matplotlib inline
#Variable declaration
E1=200.0 #[EMF]V
E2=300.0 #V
E3=400.0 #V
E4=500.0 #V
E5=600.0 #V
E6=700.0 #V
Ia1=20.0 #[Current] A
Ia2=30.0 #A
Ia3=40.0 #A
Ia4=50.0 #A
Ia5=60.0 #A
Ia6=70.0 #A
Rt=0.6 #ohm
Tload=600.0 #N-m
#Calculation
from pylab import *
from numpy import *
omega_m=Tload*2*math.pi/60.0 #rad/s
Kefi1=E1/omega_m
Kefi2=E2/omega_m
Kefi3=E3/omega_m
Kefi4=E4/omega_m
Kefi5=E5/omega_m
Kefi6=E6/omega_m
T1=E1/omega_m*Ia1 #N-m
T2=E2/omega_m*Ia2 #N-m
T3=E3/omega_m*Ia3 #N-m
T4=E4/omega_m*Ia4 #N-m
T5=E5/omega_m*Ia5 #N-m
T6=E6/omega_m*Ia6 #N-m
fig,P1 = plt.subplots()
P1.plot([Ia1,Ia2,Ia3,Ia4,Ia5,Ia6],[Kefi1,Kefi2,Kefi3,Kefi4,Kefi5,Kefi6],marker='o')
xlabel("Ia(A)")
ylabel("Kefi")
pylab.ylim(0, 12.0)
P2 =P1.twinx()
P2.plot([Ia1,Ia2,Ia3,Ia4,Ia5,Ia6],[T1,T2,T3,T4,T5,T6],marker='o',color='r')
xlabel("Ia(A)")
ylabel("T(N-m)")
pylab.ylim(0,1000.0)
plt.xlim((0,80))
show()
#From the graph :
T=600.0 #N-m
Ia=63.0 #A
Kefi=9.8
E=Kefi*omega_m #V
R=E/Ia #ohm
Rdb=R-Rt
#Result
print"Resistance for dynamic braking : ",round(Rdb,2),"ohm"
import math
#Variable declaration
V=240.0 #[DC voltage] V
Ra=0.4 #[Resistnce] ohm
N1=600.0 #[Motor speed] rpm
Ifl=25.0 #[Full load current] A
Radd=1.0 #[Added resistance] ohm
#If1=If2
#T1=T2 leads to If1*Ia1=If2*Ia2: Ia1=Ia2
Ia1=25.0 #A
Ia2=25.0 #A
#Calculation
Eb1=V-Ia1*Ra #V
Eb2=V-Ia2*(Ra+Radd) #V
N2=N1*Eb2/Eb1 #rpm
#T3=2*T1
#If3=If1
Ia3=2*Ia1 #A
Eb3=V-Ia3*(Ra+Radd) #V
N3=N1*Eb3/Eb1 #rpm
Eb4=0.0 #V(at speed zero Eb=0)
Ia4=V/(Ra+Radd) #V
T4ByT1=Ia4/Ia1 #(field constant)
#Result
print"(a). Speed at full load torque in rpm : ",round(N2,2),"rpm"
print"(b) Speed at twice the full load torque : ",round(N3,2),"rpm"
print"(c) Stalling torque is ",round(T4ByT1,3)," times of full load torque."
import math
#Variable declaration
V=250.0 #[Voltage] V
Ra=1.0 #[Resistance] ohm
Ia1=25.0 #[Armature current] A
N1=900.0 #Speed rpm
If=2.0 #[Filed current ] A
N2=1100.0 #[Increased speed [rpm]
#Calculation
Eb1=V-Ia1*Ra #V
#If1*Ia1=If2*Ia2
#Eb2=V-Ia2*Ra #V
#-Ia2**2*Ra+Ia2*V-Eb1*Ia1*N2/N1=0
polynomial=[-Ra,V,-Eb1*Ia1*N2/N1]
Ia2=roots(polynomial) #A
Ia2=Ia2[1] #A(wide range not allowed)
If2=Ia1/Ia2*If #A
#Result
print"New value of field current: ",round(If2,2),"A"
import math
#Variable declaration
V=230.0 #[Votage] V
f=50.0 #[Frequency] Hz
Rf=200.0 #[Resistance] ohm
Ra=0.3 #[Resiatnce] ohm
T=50.0 #[Load torque] N-m
N=900.0 #[Speed at load torque] rpm
Kv=0.8 #[Voltage constant] V/A-rad/s
Kt=0.8 #[Voltage constant] N-m/A**2
from scipy import integrate
#Calculation
Vm=V*math.sqrt(2) #V
Vf=2*Vm/math.pi #V
If=Vf/Rf #A
#T=Kt*If*Ia
Ia=T/Kt/If #A
omega=N*2*math.pi/60.0 #rad/s
Eb=Kv*omega*If #V
Va=Eb+Ia*Ra #V
#Va=Vm/math.pi*(1+cosd(alfa_a))
alfa_a=math.acos(Va/Vm*math.pi-1.0) #degree
Pout=Ia*Va #W
def f(t):
return(1)
I=integrate.quad(f,math.degrees(alfa_a),math.degrees(math.pi))
Iin=math.sqrt(2/(2.0*180.0)*(Ia**2)*I[0])
VAin=V*Iin #VA
pf_in=Pout/VAin #lagging
#Result
print"(a) Field current:",If,"A"
print"(b) Fringe angle of converter in degree : ",round(math.degrees(alfa_a),3),"degree"
print"(c) Power factor of convertyer(lagging) : ",round(pf_in,3)
import math
#Variable declaration
V=230.0 #[Voltage] V
f=50.0 #[Frequency] Hz
Rf=200.0 #[Resistance] ohm
Ra=0.25#[Armature resistance] ohm
Kv=1.1 #[Torque constant] V/A-rad/s
Kt=1.1 #[Voltage constant] N-m/A**2
alfa_a=45.0 #[Firing angle] degree
Ia=50.0 #[Armature current] A
alfa_f=0.0
#Calculation
Vf=2*V*math.sqrt(2.0)/math.pi*math.cos(alfa_f) #V
#Va=(2*230.0*math.sqrt(2.0)/math.pi)*math.cos(alfa_a) #V
Va=(2.0*V/math.pi)
If=Vf/Rf #A
T=Kt*Ia*If #N-m
Eb=Va-Ia*Ra-2.0 #V
omega=Eb/Kv/If #rad/s
N=omega*60.0/(2.0*math.pi) #rpm
#Result
print"Torque developed : ",round(T,3),"N-m"
print"Motor speed in rpm : ",round(N,1),"rpm "
import math
#Variable declaration
V=400 #[Voltage] V
Ra=0.3#Resiatnce armature inohm
Rf=250 #Filed resisatnce in ohm
Ia=50 #Armature current in A
Kv=1.3 #Voltage constantV/A-rad/s
N=1200 #Speed in rpm
alfa_f=0
#Calculation
Vf=3*math.sqrt(3)*V*math.sqrt(2)/math.sqrt(3)/math.pi*math.cos(alfa_f) #V
If=Vf/Rf #A
Eb=Kv*If*2*math.pi*N/60 #V
Va=Eb+Ia*Ra #V
alfa_a=math.acos(Va/3/math.sqrt(3)/V/math.sqrt(2)*math.sqrt(3)*math.pi) #degree
#Result
print"Fringe angle of converter in degree : ",round(math.degrees(alfa_a),2),"degree"
import math
#Variable declaration
V=500.0 #V [Voltage]
Ia=200.0 # [Armature Current] A
Ra=0.1#ohm[Armature resistance]
Kv=1.4 #[Voltage constant] V/A-rad/s
Kt=1.4 #[torque constant] N-m/A**2
If=2.0 #[Field current] A
cycle=0.5 #[Duty cycle of chopper] sec
#Calculation
Pin=cycle*V*Ia/1000.0 #KW
Va=cycle*V #V
Eb=Va-Ia*Ra #V
omega=Eb/Kv/2.0 #rad/s
N=omega*60.0/2.0/math.pi #rpm
T=Kt*2.0*Ia #N-m
#Result
print"(a) Input power in KW : ",Pin,"kW"
print"(b) Speed in rpm : ",round(N,1),"rpm"
print"(c) Torque in N-m : ",T,"N-m"
import math
#Variable declaration
Ra=0.1#[Resistance] ohm
Rb=7.5#[Braking resistance] ohm
Kv=1.4 #[Volate constant] V/A-rad/s
Ia=120.0 #[Armature current] A
If=1.6 #[Filed current] A
cycle=0.35 #[Duty cycle of chopper] sec
#Calculation
Vavg=Rb*Ia*(1.0-cycle) #V
Pb=Ia**2*Rb*(1.0-cycle)**2 #W
emf=Vavg+Ra*Ia #V
omega=emf/Kv/If #rad/s
N=omega*60.0/2.0/math.pi #rpm
#Result
print"Average voltage across chopper : ",Vavg,"V"
print"Power dissipated: ",Pb,"W"
print"Speed : ",round(N),"rpm"
print "NOTE:Answer of Pb & speed is wrong in the book."
import math
%matplotlib inline
#Variable declaration
V=220.0 #[Voltage] V
f=50.0 #[Frequency] Hz
L=0.012 #[Inductance] H
Ra=0.72 #[Resistance] ohm
K=2.0 #[Armature constant] V/rad/s
T=60.0 #[Torque characterisitc] N-m
alfa=90.0 #degree
#Calculation
Va=(3.0*math.sqrt(3.0)*V*math.sqrt(2.0)/(2.0*math.pi))*(1.0) #V
Ia=5.0 #A
print"Armature Current : ",Ia,"A"
T1=Ia*K #N-m
print"Torque : ",T1,"N-m"
Eb=Va-Ia*Ra #V
omega=Eb/K #rad/s
N1=omega*60.0/2.0/math.pi #rpm
print"Speed :",N1,"rpm"
Ia=10.0 #A
print"Armature Current : ",Ia,"A"
T2=Ia*K #N-m
print"Torque : ",T2,"N-m"
Eb=Va-Ia*Ra #V
omega=Eb/K #rad/s
N2=omega*60.0/(2.0*math.pi) #rpm
print"Speed : ",N2,"rpm"
Ia=20.0 #A
print"Armature Current: ",Ia,"A"
T3=Ia*K #N-m
print"Torque in N-m : ",T3,"N-m"
Eb=Va-Ia*Ra #V
omega=Eb/K #rad/s
N3=omega*60.0/2.0/math.pi #rpm
print"Speed in rpm : ",N3,"rpm"
Ia=30.0 #A
print"Armature Current : ",Ia,"A"
T4=Ia*K #N-m
print"Torque: ",T4,"N-m"
Eb=Va-Ia*Ra #V
omega=Eb/K #rad/s
N4=omega*60.0/2.0/math.pi #rpm
print"Speed : ",T4,"rpm"
plot([T1,T2,T3,T4],[N1,N2,N3,N4])
title('Speed Torque Characteristics')
xlabel('Torque(N-m)')
ylabel('speed(RPM)')
plt.ylim(0.0,1500.0)
plt.xlim(0.0,60.0)
plt.show()
import math
#Variable declaration
V=400.0 #[Thyrisotr bridge voltage] V
f=50.0 #[Frequency] Hz
I=50.0 #[Rated current] A
Ra=0.1 #[Resustnce] ohm
K=0.3 #[Voltage constant] V/rpm
Ia=5.0 #[Currentarmature] A
alfa=30.0 #[Firing angle] degree
#Calculation
Vavg=(3.0*math.sqrt(3)*V*math.sqrt(2)/(math.sqrt(3)*2.0*math.pi))*(1+math.cos(math.radians(alfa))) #V
Eb=Vavg-Ia*Ra #V
N=Eb/K #rpm
Speed=1600.0 #rpm
Eb=Speed*K #V
Vin=Eb+I*Ra #V
alfa=math.acos(Vin/3/math.sqrt(3)/V/math.sqrt(2)*math.sqrt(3)*2*math.pi-1.0) #degree
#Result
print"No load speed : ",round(N),"rpm"
print"Fringe angle : ",round(math.degrees(alfa),2),"degree"
import math
#Variable declaration
V=230.0 #[Voltage] V
f=50.0 #[Frequency] Hz
Rf=200.0 #[Feild resistance] ohm
Ra=0.25#[Armature resistance] ohm
Kv=1.1 #[Volatge constant] V/A-rad/s
Kt=1.1 #[Torque constant] N-m/A**2
alfa_a=45.0 #[Firng angle] degree
Ia=50.0 #[armature current] A
alfa_f=0.0 #Final angle
#Calculation
Vf=2.0*V*math.sqrt(2.0)/math.pi*math.cos(math.radians(alfa_f)) #V
Va=2.0*V*math.sqrt(2.0)/math.pi*math.cos(math.radians(alfa_a)) #V
If=Vf/Rf #A
T=Kt*Ia*If #N-m
Eb=Va-Ia*Ra-2.0 #V
omega=Eb/Kv/If #rad/s
Eg=-Eb #V
Va=Eg+Ia*Ra+2 #V
alfa=math.acos(Va/2.0/V/math.sqrt(2.0)*math.pi) #degree
P=abs(Va)*Ia #W(power fed back to source)
#Result
print"Fringe angle to converter : ",round(math.degrees(alfa),2),"degree"
print"Power fed back to source : ",round(P),"W (approx)"
import math
#Variable declaration
V=240.0 #[Voltage] V
alfa=100.0 #degree [Firing angle]
Ra=6.0# [Armature resistanec] ohm
Ia=1.8 #[Armature current] A
#Calculation
Vm=V*math.sqrt(2.0) #V
Vdc=Vm/math.pi*(1.0+math.cos(math.radians(alfa))) #Volt
Eb=Vdc-Ia*Ra #V
#Result
print"Back emf : ",round(Eb,2),"V"
import math
#Variable declaration
V1=230.0 #[Voltage] V
N1=1500.0 #[Speed] rpm
Ra=1.0 #[Armature resistance] ohm
Ia=10.0 #[Armature current] A
T=5.0 #[Troque] N-m
#V=K*omega+Ia*Ra
#Calculation
K=V1/(N1*2*math.pi/60.0+Ia*Ra) #V-s/rad or N-m/A
K=round(K,1)
Ia=T/K #A
Ia=round(Ia,2)
alfa1=30.0 #degree
V=(2*V1*math.sqrt(2)/math.pi)*math.cos(math.radians(alfa1)) #Volt
V=round(V,1)
omega=(V-Ia*Ra)/K #rad/s
N=(omega*60.0)/(2.0*math.pi) #rpm
print"Parrt(a) Speed:",N,"rpm"
alfa=45.0 #degree
N=950.0 #rpm
V=(2*V1*math.sqrt(2)/math.pi)*math.cos(math.radians(alfa)) #Volt
V=round(V,2)
Ia=(V-K*2*math.pi/60.0*N)/Ra #A
Ia=round(Ia,2)
T=K*Ia #N-m
print"Part(b) Torque : ",T,"N-m"
print"\nNOTE:Answer for (b) is wrong in the book."
import math
#Variable declaration
V1=500.0 #[Voltage] V
N1=1500.0 #[Speed] rpm
Ia=100.0 #[Armature current] A
V2=350.0 #[Voltage] V
Ra=1.1 #[Resistance] ohm
alfa=45.0 #[Firing angle] degree
N2=1200.0 #[Motor speed] rpm
#V=K*omega+Ia*Ra
#Calculation
K=(V1-Ia*Ra)/(N1*2*math.pi/60.0) #V-s/rad or N-m/A
V=3*math.sqrt(3)*V2*math.sqrt(2.0)/2.0/math.pi/math.sqrt(3.0)*(1+math.cos(math.radians(alfa))) #Volt
Ia=(V-K*N2*2*math.pi/60.0)/Ra #A
Vin_rms=Ia*math.sqrt(120.0/180.0) #V
Iavg=Ia/3.0 #A
Irms=Ia/math.sqrt(3) #A
pf_in=V*Ia/math.sqrt(3)/V2/Vin_rms #lagging
#Result
print"RMS source current : ",round(Ia,2),"A"
print"RMS input voltage:",round(Vin_rms,1),"A"
print"Average thyristor current : ",round(Iavg,2),"A"
print"RMS thyristor current : ",round(Irms,2),"A"
print"Input power factor = ",round(pf_in,3),"lagging"
import math
#Variable declaration
T1=40.0 #[Torque] N-m
N1=500.0 #[Speed] rpm
J=0.01 #[Inertia of drive] N-m_sec**2/rad
T2=100.0 #[Troque] N-m
N2=1000.0 #[Speed]rpm
#Calculation
#Te=J*d(omega)/dt+D*omega+TL
d_omegaBYdt=(T2-T1)/J #
#t=omega/d_omegaBYdt+A
omega1=N1*2*math.pi/60 #rad/s
t=0 #s(initial time)
A=t-omega1/d_omegaBYdt #
omega2=N2*2*math.pi/60 #rad/s
t=omega2/d_omegaBYdt+A #s
#Result
print"Time taken by the motor in sec : ",round(t,6),"seconds"
import math
from sympy import Symbol
#Variable declaration
f=400.0 #[Feed frequency] Hz
V=200.0 #[Voltage] V
T=30.0 #[Torque] N-m
N=1000.0 #[Speed] rpm
R=0.2 #[Resistance] ohm
L=2.0 #[Motor resistance] mH
Kv=1.5 #[Voltage constant] V-sec/rad
Kt=1.5 #[Troque constant] N-m/A
#Calculation
Ia=T/Kt #A
omega=N*2*math.pi/60.0 #rad/s
Eb=Kv*omega #V
alfa=(Eb+Ia*R)/V
T=1.0/f*1000.0 #ms
Ton=alfa*T #ms
Toff=T-Ton #ms
Imax=V/R*((1-math.exp(-alfa*T*10**-3*R/(L*10**-3)))/(1-math.exp(-T*10**-3*R/(L*10**-3))))-Eb/R #A
#Result
print"(a) Maximum motor armature current : ",round(Imax,3),"A"
Imin=V/R*((math.exp(alfa*T*R/L)-1)/(math.exp(T*R/L)-1))-Eb/R #A
print"(a) Minimum motor armature current : ",abs(round(Imin)),"A"
Iexc=Imax #A
print"(b) Excursion of armature current : ",round(Iexc,3),"A"
import sympy
t_= Symbol('t`')
e=Symbol('e')
#yy=2*math.exp(-100*t_dash/2).expand()
L=L/1000
i=(round(Imax,1)*e**(-R*t_/L))
i2=round((Eb/R),1)*(1.0-e**(-R*t_/L))
print"(c) Expression for armature current:\n i=", i,i2
import math
#Variable declaration
V=230.0 #[Voltage] V
f=50.0 #[Frequency] Hz
Rf=1.5 #[Frequency] ohm
Kt=0.25 #[Torque constant] N-m/A
T=25.0 #[Torque] N-m
Kv=0.25 #[Voltage constant] V-sec/rad
from scipy.optimize import fsolve
#Calculation
Vdc=2*math.sqrt(2)*V/math.pi #V
Em=Vdc #V
Ia=math.sqrt(T/Kt) #A
def f(omega_m):
return(1.5*Ia+Kt*omega_m*Ia-Em)
omega_m=fsolve(f,1)
N=omega_m*60.0/2.0/math.pi #RPM
#Result
print"Average motor current: ",Ia,"A"
print"Motor speed : ",round(N[0],2),"RPM"
import math
#Variable declaration
V1=675.0 #[Secondary voltage] V
alfa1=90.5 #[Firing angle] degree
N1=350.0 #[Motor speed] rpm
Ia1=30.0 #[Armature current] A
N2=500.0 #[Second motor speed] rpm
Rf=0.22 #[Field resistance] ohm
Ra=0.22 #[Armature resistance] ohm
#Calculation
Ia2=Ia1*N2/N1 #A
Va1=V1*math.sqrt(2.0)/math.pi*(1.0+math.cos(math.radians(alfa1))) #V
Eb1=Va1-Ia1*(Ra+Rf) #V
#Eb1/Eb2=Ia1*N1/(Ia2*N2)
#Eb2=Va2-Ia2*(Ra+Rf)
Va2=Eb1*Ia2*N2/(Ia1*N1)+Ia2*(Ra+Rf) #V
alfa2=math.acos(Va2/V1/math.sqrt(2.0)*math.pi-1.0) #degree
#Result
print"Armature current of converter in A : ",round(Ia2,2),"A"
print"Fringe angle of converter in degree : ",round(math.degrees(alfa2),2),"degree"
import math
#Variable declaration
V1=230.0 #[Voltage] V
P=15.0 #[Power] hp
N=1500.0 #[Speed] rpm
V2=220.0 #[Voltage]] V
Ke=0.03 #[emf constant] V/A-s
Kt=0.03 #[torque constant] N-m/A**2
alfa=45.0 #[firing angle] degree
#Calculation
Vm=V1*math.sqrt(2) #V
omega=N*2*math.pi/60 #rad/s
T=4*Kt*Vm**2*math.cos(math.radians(alfa))**2/(math.pi**2*(Ke*omega)**2) #N-m
Ia=math.sqrt(T/Kt) #A
#Result
print"part (a) : "
print"Torque in N-m : ",round(T,2),"N-m"
print"Armature current : ",round(Ia,2),"A"
print"part (b) : "
Ia=Vm*(1+math.cos(math.radians(alfa)))/(math.pi*(Ke*omega)) #A
T=Kt*Ia**2 #N-m
print"Armature current : ",round(Ia,1),"A"
print"Torque : ",round(T,4),"N-m"
import math
#Variable declaration
V1=230.0 #[Voltage] V
N=1000.0 #[Speed] rpm
P=15.0 #[Power rating] hp
Rt=0.2 #[Resistance] ohm
Ke=0.03 #[emf rating] V/A-s
Kt=0.03 #[torque rating] N-m/A**2
alfa=30.0 #[Firng angle] degree
#Calculation
Vm=V1*math.sqrt(2) #V
omega=N*2*math.pi/60.0 #rad/s
V=Vm/math.pi*(1+math.cos(math.radians(alfa))) #V
#V=Ke*Ia*omega+Ia*Rt
Ia=V/(Ke*omega+Rt) #A
T=Kt*Ia**2 #N-m
#Result
print"Motor current : ",round(Ia,3),"A"
print"Torque : ",round(T,2),"N-m"
import math
#Variable declaration
V=220.0 #[Voltage] V
Vin=230.0 #[input volatge] V
N1=1500.0 #[Speed of motor] rpm
Ia1=10.0 #[Armature current] A
Ra=3.0 #[Armature resistance] ohm
N2=600.0 #[Speed] rpm
#Calculation
E1=V-Ia1*Ra #V
E2=E1*N2/N1 #V
Ia2=Ia1/2.0 #A(because of Tnew=T/2)
Vapp=E2+Ia2*Ra #V
alfa=math.acos(Vapp*math.pi/2/math.sqrt(2)/Vin) #degree
#Result
print"Firing angle of converter : ",round(math.degrees(alfa),1),"degree"
import math
#Variable declaration
V=230.0 #[Volatge] V
N=870.0 #[Motor speed] rpm
Ia=100.0 #[Armaturecurrent] A
Ra=0.05 #[Armature resisatce]ohm
T=400.0 #[Torque] N-m
#Calculation
E=V-Ia*Ra #V
Vgen=V+Ia*Ra #V
N2=N*Vgen/E #rpm
#Result
print"Motor speed in rpm : ",round(N2,2),"rpm"
import math
#Variable declaration
V=220.0 #[Voltage] V
P=2.2 #[Power of motor] KW
N1=1000.0 #[Motor speed] rpm
Ra=2.0 #[Resistance] ohm
f=250.0 #[Frequency] Hz
alfa=0.9 #[duty cycle] cycle
N2=1200.0 #[Load torque]rpm
N3=800.0 #[Final speed] rpm
#Calculation
Ia1=P*1000.0/V #A
Ia2=Ia1*N2/N1 #A
Eb2=alfa*V-Ia2*Ra #V
Eb3=Eb2*N3/N2 #V
Ia3=Ia1*N3/N1 #A
alfa3=(Eb3+Ia3*Ra)/V #cycle
ton=alfa3/f #sec
#Result
print"On time of chopper %.1e"%ton,"sec"
import math
#Variable declaration
V=230.0 #[Voltage]V
N1=1000.0 #[Motor speed]rpm
Ia1=100.0 #[Armature current]A
Ra=0.1 #[Armature resistance]ohm
Rf=0.1 #[Field ressiatnce]ohm
N2=800.0 #[Final speed of motor]rpm
#Calculation
Ia2=math.sqrt(2)*Ia1 #A(As T2=2*T1 & T proportional to Ia**2)
Eb1=V-Ia1*(Ra+Rf) #V
Eb2=N2*Ia2/(N1*Ia1)*Eb1 #V
#Eb2=Ia2*(Ra+Rf+Rbraking)
Rbraking=Eb2/Ia2-Ra-Rf #ohm
Ibraking=Eb2/Rbraking #A
#Result
print'Braking resistance : ' ,Rbraking,"ohm"
print'Braking current : ',round(Ibraking,1),"A"
print"NOTE:Braking current is not calculated in the textbook but asked in the example."
import math
#Variable declaration
P=6.0 #poles
V=220.0 #[Voltage] V
f=50.0 #[Frequency] Hz
Ra=0.2 #[Armature resistance] ohm
Rf=150.0 #[Field resistance] ohm
Z=150.0 #[no. of conductors]
fi=0.02027 #[Field flux per mole]Wb(flux)
alfa=0.0 #[Delay angle for field converter] degree
alfa_a=45.0 #[Delay angle for armature converters] degree
Ia=25.0 #[Armature current] A
A=2.0 # [Area]
#Calculation
T=Z*P*fi*Ia/(2*math.pi*A) #N-m
Vm=V*math.sqrt(2) #V
Vdc=2*Vm/math.pi*math.cos(math.radians(alfa_a)) #V
Eb=Vdc-Ia*Ra #V
N=Eb*60*A/(Z*P*fi) #rpm
Pout=Vdc*Ia #W
pf=Pout/V/Ia #lagging
#Result
print"Totque : ",round(T,3),"N-m"
print"Speed : ",round(N,2),"rpm"
print'Power factor : ',round(pf,4),"Lagging"
#Variable declaration
R=0.1 #Armature resistance in [ohm]
V1=220.0 #Voltage in [V]
N1=1000.0 #speed in [rpm]
I=100.0 #Current in [A]
V2=200.0 #Dropped voltage in [V]
#Calculation
Eb2=V2-I*R
Eb1=V1-I*R
N2=Eb2*N1/Eb1 #Motor speed after drop
#Result
print"Motor speed after voltage drop is",round(N2,2),"rpm"
import math
V1=200.0 #[Voltage] V
N1=940.0 #[Speed] rpm
Ra=0.02 #[Armature resistance] ohm
Ia=100.0 #[Armature current] A
N2=500.0 #[Speed] rpm
#Calculation
Eb1=V1-Ia*Ra #V
#Eb1/Eb2=N1/N2
#Eb2=V2-Ia*Ra #V
V2=Eb1*N2/N1+Ia*Ra #V
cycle=V2/V1
#Result
print"Duty cycle : ",round(cycle,4)
import math
#Variable declaration
V1=220.0 #[Voltage] V
Ra=0.05 #[Armature resistance]ohm
N1=1000.0 #[Speed]rpm
Ia=100.0 #[Armature current]A
N2=500.0 #[Speed]rpm
#Calculation
Eb=V1-Ia*Ra #V
Ib=2*Ia #A
Rb=(V1+Eb)/Ib-Ra #ohm
Tb=Eb/(N1*2*math.pi/60.0)*Ib #N-m
Eb2=Eb*N2/N1 #V
Ib2=(V1+Eb2)/(Ra+Rb) #A
Tb2=Eb2/(N2*2*math.pi/60.0)*Ib2 #N-m
#Result
print"Resistance to be added:",Rb,"ohm"
print"Initial braking torque : ",round(Tb,2),"N-m"
print"Initial braking torque: ",round(Tb2,1),"N-m"
import math
#Variable declaration
V1=230.0 #[Voltage] V
N1=870.0 #[Speed] rpm
Ia=100.0 #[Armature current] A
Ra=0.05 #[Armature resistance] ohm
T=400.0 #[Torqu] N-m
#Calculation
Eb=V1-Ia*Ra #V
Vgen=V1+Ia*Ra #V
N2=N1*Vgen/Eb #rpm
#Result
print"Speed : ",round(N2,2),"rpm"
import math
#Variable declaration
P=10.0 #[Power] KW
V1=230.0 #[Voltage] V
N1=1200.0 #[Speed] rpm
Ra=0.5 #[Armature resistance] ohm
Ke=0.182 #[emf constant] V/rpm
V2=260.0 #[Voltage]V
alfa=30.0 #[Firing angle] degree
Ia=30.0 #[Armature current] A
#Calculation
Vm=V2*math.sqrt(2) #V
Vdc=2*Vm/math.pi*math.cos(math.radians(alfa)) #V
Eb=Vdc-Ia*Ra #V
Kt=Ke*60/2/math.pi #N-m/A
T=Kt*Ia #N-m
N2=Eb/Ke #rpm
Pout=Vdc*Ia #W
pf=Pout/V2/Ia #lagging power factor
#Result
print"Torque in N-m : ",round(T,2),"N-m"
print"Speed in rpm : ",round(N2,2),"rpm"
print"Power factor : ",round(pf,3),"lagging"
import math
#Variable declaration
P=2.2 #[Power] KW
V=220 #[Voltage] V
N1=1000 #[Speed] rpm
Ra=2 #[Resistance armature] ohm
f=250 #[frequency] Hz
alfa=0.9 #duty cycle
N2=1200 #[Speed]rpm
N3=800 #[Motor sped] rpm
#Calculation
Ia1=P*1000/V #A
Ia2=Ia1*N2/N1 #A
Eb1=alfa*V-Ia2*Ra #V
Eb2=Eb1*N3/N2 #V
Ia3=Ia1*N3/N1 #A
alfa3=(Eb2+Ia3*Ra)/V #cycle
ton=alfa3/f #sec
#Result
print'On time of chopper : ',ton*1000,"milli seconds"
import math
#Variable declaration
V=220.0 #[Voltage] V
Eff1=85/100.0 #Efficiency
Eff2=80/100.0 #Efficiency
Load=400.0 #[Load in Kg
t=2.5 #[time] ms
Ra=0.1 #[Armature resistance] ohm
g=9.81 #constant for gravity acceleration
#Calculation
Pout=Load*g*t #W
IL=Pout/V/Eff1/Eff2 #A
Eb=V-IL*Ra #V
R=(V+Eb)/IL-Ra #ohm
#Result
print"Current drawn : ",round(IL,3),"A"
print"Resistance to be added : ",round(R,2),"ohm"
import math
#Variable declaration
V1=220.0 #[Voltage] V
N1=1500.0 #[Speed] rpm
I=10.0 #[Current] A
Ra=3.0 #[Armature resistance] ohm
V2=230.0 #[Voltage]V
N2=600.0 #[Speed] rpm
#Calculation
Eb1=V1-I*Ra #V
Eb2=Eb1*N2/N1 #V
Ia=I/2 #A(at half rated torque)
Vm=V1*math.sqrt(2) #V
alfa=math.acos((Eb2+Ia*Ra)*math.pi/2/Vm) #degree
#Result
print"Firing angle : ",round(math.degrees(alfa),2),"degree"