import math
from math import pi
#Given
V=115.0 #voltage given to control phase winding
N=3000.0 # in rpm
F=60.0 #frequency in Hz
J=10**-5
T=0.2
#alculations
Km=T/V
Wm=(N*2*pi/F)
Fm=T/Wm
Tm=J/Fm
A=Km/Fm
Kmv=A*V
KmvT=A*Tm
A=round(A,3)
Tm=round(Tm,3)
#tf=A/s(1+Tm*s)
print 'Transfer function=',A,'/s(1+s*',Tm,')'
import math
from math import pi
#Given
Rw=1.0 #resistance
Lw=30.0 #average phase winding inductance
I=3.0 #rated winding current
TimeOn=2.0 #electrical time constant at turnon
RF=0.0675
StepRate=300.0 #stepping rate
Turns=100.0 #no.of turns
TimeOff=1.0 #electrical time constant at turnoff
PeakI=3.0
#calculations
R=Lw/TimeOn #turn-on time constant
Rext=R-TimeOff
Prext=(I**Rext)
Vs=I*R #required dc supply voltage
Rext=R-Rw
R1=Lw/TimeOff #turn-off time constant
Rf=R1-R
V=45 #voltage across the diode
Energy=(1/2*Lw*I**2) #energy stored in phasewinding
Power=Turns*Rf
Power=Turns*RF
Vc=V+(PeakI*R)
print 'maximum voltage=',Vc,'V'
print 'current rating of the transistor is',I,'A'
import math
from math import pi,exp
#Given
Lw=30 #average winding inductance in mH
R=15 #total resistance in each phase
Ia=3 #rated current
V=45 #dc supply
#calculations
Tow=Lw/R
t1=0.7*Tow
a=81
Energy=(0.5)*Lw*(Ia**2)
ProEnergy=(a/Energy)*100
print 'stored energy=',Energy,'mJ'
print 'Proportion of energy returned to supply=',ProEnergy,'%'