from math import pi
#back emf ,Required armature voltage and Rated armatuer current
#given data :
TL=45 # in N-M
N=1200 #in rpm
Rf=147 #in ohm
Ra=25 # in ohm
Kv=0.7032
w=(2*pi*N)/60
Vf=220 #in volts
Kt=Kv
If=Vf/Rf
T=TL
Ia=T/(Kt*If)
Eg=Kv*w*If
print "part (a)"
print "Back emf,Eg = %0.2f Volts" %Eg
print "part (b)"
Ea=(Ia*(Ra/100))+Eg
print "Required armature voltage, Ea = %0.2f V"%Ea
print "part (c)"
rac=11191.4/Vf #
print "rated armature current = %0.2f A" %rac
from math import sqrt, cos, pi, acos
#the field current,Evaluation of alfa,Evaluation of power factor
#given data :
TL=50 # in N-M
N=1000 #in rpm
Rf=150 #in ohm
Ra=.25 # in ohm
Kv=0.7032
alfa=0
Vm=230 # in volts
Ef=((Vm*sqrt(2))/pi)*(1+cos(pi/180*alfa))
If=Ef/Rf
print "part (a)"
print "Field current, If = %0.2f A" %If
print "part (b)"
w=(2*pi*N)/60
Ia=TL/(Kv*If)
Eg=Kv*w*If
Ea=Eg+(Ra*Ia)
alfa_a=acos(((Ea*pi)/(Vm*sqrt(2)))-1)*180/pi
print "angle = %0.2f degree" %alfa_a
print "part (c)"
Ismax=Ia*((180-alfa_a)/180)**(1/2) #in amperes
PF=((Ea*Ia)/(Vm*Ismax)) #lagging
print "power factor = %0.3f lagging" %PF
#torque
#given data :
Ia=50 # in A
Rf=150 #in ohm
Ra=.25 # in ohm
Kv=1.4 # in V/A-rad/sec
alfa_f=0
alfa_a=45 # in degree
Vm=230*sqrt(2) # in volts
Vs=230 # in volts
Ef=((2*Vm)/pi)*(cos(pi/180*alfa_f))
If=Ef/Rf
T=Kv*Ia*If
print "part (a)"
print "Torque developed by the motor, T = %0.2f N/m" %T
Ea=((2*Vm)/pi)*(cos(pi/180*alfa_a))
Eg=Ea-(Ia*Ra)
w=Eg/(Kv*If)
N=(w/(2*pi))*60
print "part (b)"
print "Speed, N = %0.2f rpm "%N
print "part (c)"
Ea=Eg+(Ra*Ia)
alfa_a=180/pi*acos(((Ea*pi)/(Vm*sqrt(2)))-1)
Ismax=Ia*((180-alfa_a)/180)**(1/2) #in amperes
PF=((Ea*Ia)/(Vm*Ismax)) #lagging
print "power factor = %0.4f lagging" %PF
#supply power factor is calculated wrong in the textbook
#Motor torque
#given data :
Vs_rms=230 # in volts
N=1200 # in rpm
Ia=40 # in A
Ra=0.25 #in ohm
Ka_fi1=0.182 # in V/rpm
Ka_fi=(0.182*60)/(2*pi)
alfa_a=30
T=Ka_fi*Ia
print "part (a)"
print "Motor torque, T = %0.1f N-m" %T
print "part (b)"
Ea=((2*sqrt(2)*Vs_rms)/pi)*(cos(alfa_a*pi/180))
N=(Ea-(Ra*Ia))/Ka_fi1
print "Speed of the motor, N = %0.1f rpm "%N
print "part (c)"
Is_rms=Ia
PF=(Ea*Ia)/(Vs_rms*Is_rms)
print "Power factor, PF = %0.4f lagging" %PF
from numpy import arange, nditer
#Torque speed charaterstics
#given data :
v=230 #in volts
vm=sqrt(2)*v #in clts
Ka=1
QR=1 #
ra=0.05 #
alpha=30 #in degree
y=(60/(2*pi)) #
z=((vm/pi)*(1+cos(pi/180*alpha))) #
x=(ra/(0.5)**2)
i = arange(0,9)
def func(i):
it = nditer([i, None])
for a, b in it:
b[...] = (z-a*x)*y
return it.operands[1]
wm = func(i)
print "varoius values of speed in RPM is"
for x in nditer([wm]):
print x,'\t',
T=arange(0,9)
###############PLOT#############
%matplotlib inline
import matplotlib.pyplot as plt
plt.plot(T, wm)
plt.xlabel("Torque ,N-m")
plt.ylabel("Speed (rpm) for alpha=30 degree")
plt.show()
from math import sqrt, degrees, pi, acos, cos
from __future__ import division
#No load speed ,firing angle ,Power Factor and speed regulation
#given data :
Ra=0.075 #in ohm
alfa1=0 # in degree
alfa2=30 # in degree
VL_rms=480 # in volts
Ka_fi=0.3 # in V/rms
Vs_rms=round(VL_rms/sqrt(3))
Vm=sqrt(2)*Vs_rms
Ea=round((3*sqrt(3)*Vm*cos(pi/180*alfa1))/pi)
Ea1=((3*sqrt(3)*Vm*cos(alfa2*pi/180))/pi)
Ia=(10/100)*160 # in A
N_0=(Ea-Ia*Ra)/Ka_fi
N_30=(Ea1-Ia*Ra)/Ka_fi
print "part (a)"
print "No load speed at alfa=0 degree = %0.2f rpm "%N_0
print "No load speed at alfa=30 degree = %0.2f rpm "%N_30
print "part (b)"
Ia=160 # in A
N=1800 # in rpm
Eg=540 # in volts
Ea=(Eg+(Ia*Ra))
alfa=degrees(acos((Ea*pi)/(3*sqrt(3)*Vm)))
print "the firng angel, alfa = %0.1f degree "%alfa
print "part (c)"
Is_rms=sqrt(2/3)*Ia
Sva=3*Vs_rms*Is_rms
PF=(Ea*Ia)/(Sva)
print "Power Factor, PF = %0.4f lagging"%PF
print "part (d)"
Ra=0.075 #in ohm
Ia=160 # in A
Ia1=16 # in A
Eg=540 # in volts
Ka_fi=0.3 # in V/rms
N=1800 # in rpm
Ea=(Eg+(Ia*Ra))
Eg1=Ea-(Ia1*Ra)
N_0=Eg1/Ka_fi
SR=((N_0-N)/N)*100
print "Speed Regulation, SR = %0.2f %%" %SR
#Delay Angel of Armature,No load speed and speed regulation
#given data :
VL_rms=208 # in volts
Kv=1.2 # in V/A-rad/sec
Vs_rms=round(VL_rms/sqrt(3))
Vm=sqrt(2)*Vs_rms
Rf=240 # in ohm
Ra=0.25 # in ohm
alfa_f=0 # in degree
V=280 # in volts
Twenty_HP=20*746 #in watt
Ia=Twenty_HP/V
Ef=round((3*sqrt(3)*Vm*cos(pi/180*alfa_f))/pi)
N=1800
w=(N*2*pi)/60
If=Ef/Rf
Eg=Kv*w*If
Ea=round(Eg+(Ia*Ra))
alfa_a=degrees(acos((Ea*pi)/(3*sqrt(3)*Vm)))
print "part (a)"
print "Delay Angel Of Armature, alfa_a = %0.2f degree"%alfa_a
print "part (b)"
Ia1=(Ia*10)/100
Eg_noL=Ea-(Ia1*Ra)
w_0=(Eg_noL/(1.2*1.17)) # rad/sec
N_0=(w_0*60)/(2*pi)
print "NO load speed at alfa|_a, = %0.2f "%N_0
# no load speed is calculated wrong in textbook
print "part (c)"
SR=((N_0-N)/N)*100
print "Speed Regulation, SR = %0.2f %% "%SR
# speed regulation is calculated wrong in the textbook
#alphas,speed and delay angle
#given data :
v1=208 #
vsrms=v1/sqrt(3) #
n=1000 #rpm
w=n*(pi/30) #in rad/s
ang=0 #
ef=((3*sqrt(3)*sqrt(2)*vsrms*cos(pi/180*ang))/pi) #in volts
rf=140 #in ohms
If=ef/rf #in amperes
t=120 #N-m
kv=1.2 #
ia=(t)/(kv*If) #in amperes
eg=kv*If*w #in volts
ra=0.25 #in ohms
ea=eg+(ia*ra) #
alpha=degrees(acos((ea*pi)/(3*sqrt(3)*sqrt(2)*vsrms)))
print "part (a)"
print "alpha = %0.2f degree"%round(alpha)
print "part (b)"
rf=140 #in ohms
If=ea/rf #in amperes
t=120 #N-m
kv=1.2 #
ia=(t)/(kv*If) #in amperes
ra=0.25 #in ohms
eg=ea-(ia*ra) #
w=(eg/(kv*If)) #in rad/s
N=w*(30/pi) #rpm
print "speed = %0.2f rpm" %N
#speed is calculated wrong in the textbook
print "part (c)"
n1=1000 #rpm
w=n1*(pi/30) #in rad/s
v1=208 #
vsrms=v1/sqrt(3) #
w1=(1800*(pi/30)) #
n=1800 #rpm
ang=0 #
T=120 #n-m
alphas=0 #
ang=0 #
ea=((3*sqrt(3)*sqrt(2)*vsrms*cos(pi/180*ang))/pi) #in volts
rf=140 #in ohms
If=ea/rf #in amperes
t=120 #N-m
kv=1.2 #
ia=(t)/(kv*If) #in amperes
ra=0.25 #in ohms
eg=ea-(ia*ra) #
if1=eg/(kv*w1) #in amperese
ef1=if1*rf #in volts
alphaf=degrees(acos((ef1*pi)/(3*sqrt(3)*120*sqrt(2))))
print "delay angle = %0.2f degree"%alpha
# Ans in the textbook are not accurate.
#Firing angle to keep the motor current and Power fed back
#given data :
Vs_rms=260 # in volts
Ia=40 # in A
Eg=192 #in volts
kv=0.182 # in V/rpm
Ra=0.3 # in ohm
Ea=Eg+(Ia*Ra)
alfa_a=degrees(acos((Ea*pi)/(2*Vs_rms*sqrt(2))) )
print "part (a)"
print "Firing angle to keep motor current, alfa_a = %0.2f degree" %alfa_a
Ea1=-Eg+(Ia*Ra)
alfa_b=degrees(acos((Ea1*pi)/(2*Vs_rms*sqrt(2))) )
print "Firing angle, alfa_a = %0.2f degree"%alfa_b
print "part (b)"
Ia=40 # in A
Eg=192 #in volts
Ra=0.3 # in ohm
Ea=-Eg+(Ia*Ra)
P=abs(Ea)*Ia
print "Power fed back, P = %0.2f Watt" %P
#Average armature voltage ,back emf ,speed of the motor , motor torque and supply power factor
#given data :
Vm=230 # in volts
Ia=40 # in A
Ra=0.5 # in ohm
Ka_fi=0.2 # in V/rpm
alfa=30
Ea=(Vm*sqrt(2)*(1+cos(pi/180*alfa)))/pi
print "part (a)"
print "Average armature current, Ea = %0.2f V"%Ea
print "part (b)"
Eb=Ea-(Ia*Ra)
print "Back emf, Eb = %0.2f V"%Eb
print "part (c)"
N=Eb/Ka_fi
print "Speed of the motor, N = %0.2f rpm" %round(N)
print "part (d)"
Ka_fi1=(Ka_fi*60)/(2*pi)
T=Ka_fi1*Ia
print "Torque, T = %0.1f N/m" %T
print "part (e)"
alfa=pi/6
PF=(2*sqrt(2)*cos(alfa/2)**2)/(sqrt(pi*(pi-alfa)))
print "power factor = %0.2f lagging" %PF
#torque developed,speed and input power factor
#given data :
v=208 #in volts
f=50 #in Hz
ra=0.5 #in ohms
rf=345 #in ohms
kv=0.71 #in V/A-rad/sec
alpha=45 #in degree
ia=55 #in amperes
If=((2*sqrt(2)*v*cos(0))/(pi*rf)) #in amperes
t=kv*If*ia #in N/m
print "part (a)"
print "torque = %0.2f N/m"%t
print "part (b)"
eb=((2*sqrt(2)*v*cos(pi/180*alpha))/pi)-(ia*ra) #in volts
w=eb/(kv*If) #in rad/sec
N=w/(2*pi) #rps
N*=60 # rpm
print "speed = %0.2f rpm" %N
#speed is calculated wrong in the textbook
print "part (c)"
ea=132.4 #in volts
ef=187.3 #in volts
pi=(ea*ia)+(ef*If) #in watts
Isrms=sqrt((ia)**2+(If)**2) #in amperes
va1=Isrms*v #in VA
Pf=pi/va1 #
print "Power factor = %0.4f lagging" %Pf
from math import sqrt, pi
#develepoed back emf,required armature voltage and firing angle and rated armature current
#given data :
hp=20 #
v=230 #volts
n=1000 #rpm
lt=50 #load torque in N-m
s=1000 #speed in rpm
ra=0.2 #in ohms
rf=150 #in ohms
la=10 #in mH
kv=0.7 #
vf=(2*sqrt(2)*v)/(pi) #
If=vf/rf #in amperes
ia=(lt/(kv*If)) #in amperes
eg=((kv*2*pi*n*If))/(60) #in volts
print "part (a)"
print "back emf = %0.1f V"%eg
print "part (b)"
ea=eg+(ia*ra) #in volts
alpha=degrees(acos((ea*pi)/(2*sqrt(2)*v))) #
print "armature voltage = %0.2f V" %ea
print "firing angle = %0.1f degree" %alpha
print "part (c)"
ea1=220 #in volts
ha20=746*20 #
iar=(ha20/ea1) #in amperes
print "rated armature current = %0.1f A" %iar
#Average armature current
#given data :
V=200 # in volts
D=50/100 # duty cycle
VL_dc=V*D
Eb=75 # in volts
Ra=1 # in ohm
Ia=(VL_dc-Eb)/Ra
print "Average armature current, Ia = %0.2f A" %Ia