import math
from math import exp
E=220.0 #dc supply voltage in volts
El=22.0 #Load voltage in volts
Ton=1000.0 #conducting period in microseconds
T=2500.0 #Total timeperiod in microseconds
L=1.0 #inductance in milliHenry
R=0.25 #resistance in ohms
t=L/R #time constant in milliseconds
print 'time constant=t=',t,'milliseconds'
A=0.133
Td=A*T #Discontinuous condition starts at
print 'Discontinuous condition starts from Td=',Td,'microseconds'
Eo=0.4*E #output voltage in volts
print 'Output voltage=Eo=',Eo,'volts'
Iav=(Eo-El)/R #Average current in amps
print 'Average current=Iav=',Iav,'amp'
Imax=((E*(1-exp(-Ton/(t*1000))))/(R*(1-exp(-T/(t*1000)))))-(El/R)
Imax=round(Imax,2)
print 'Maximum current=Imax=',Imax,'amp'
Imin=((E*(exp(Ton/(t*1000))-1))/(R*(exp(T/(t*1000))-1)))-(El/R)
Imin=round(Imin,2)
print 'Minimum current=Imin=',Imin,'amp'
import math
f=1.0 #operating frequency in KHZ
E=220.0 #dc supply voltage in volts
El=165.0 #Load voltage in volts
Ton=El/(E*f) #conduction period in ms
print 'Conduction period=Ton=',Ton,'ms'
T=1/f #total time period in ms
print 'Total time period=T=',T,'ms'
Toff=T-Ton #blocking period in ms
print 'Blocking period=Toff=',Toff,'ms'
import math
from math import pi
E=220.0 #dc supply voltage in volts
Toff=200.0 #blocking period in microseconds
Il=50.0 #load current in amps
C=pi*Toff*Il/(2*E) #capacitance for optimum frequency in microfarad
C=75.0
print 'Load capacitance required for optimum frequency=C=',C,'microfarad'
L1=Toff**2*10**-3/C #inductance required in milliHenry
L2=L1
L1=round(L1,2)
print 'Inductance parameters=L1=L2=',L1,'milliHenry'
import math
E=220.0 #dc supply voltage in volts
El=660.0 #Load voltage in volts
Toff=100.0 #blocking period in microseconds
Ton=(El/E-1)*Toff #Conduction period in microseconds
print 'Conduction period=Ton=',Ton,'microseconds'
import math
f=200.0 #chopper frequency in HZ
E=220.0 #dc supply voltage in volts
Iav=100.0 #Average current in the circuit in amps
Ra=0.02 #Armature resistance in ohms
Rf=0.01 #Field resistance in ohms
Ebav=50 #Average value of the Back emf in volts
Eav=Iav*(Ra+Rf)+Ebav #Average voltage in the circuit in volts
print 'Average voltage in the circuit=Eav=',Eav,'volts'
Ton=Eav*1000/(E*f) #conduction period in ms
Ton=round(Ton,2)
print 'Conduction period=Ton=',Ton,'ms'
import math
f=200.0 #chopper frequency in HZ
T=1000/f #total time period in ms
Toff=4.0 #Blocking period in ms
Ton=T-Toff #conduction period in ms
R1=2.0 #R1 in ohms
R2=4.0 #R2 in ohms
R=((R1*Ton)+(R1+R2)*Toff)/T #rotor resistance referred to stator in ohms
print 'Rotor resistance referred to stator=R=',R,'ohms'
V=415.0 #stator voltage in volts
s=0.02 #slip of the motor
MT=V**2*s/R #motor torque in Syn . Watts
MT=round(MT,2)
print 'Motor torque=MT=',MT,'Snc . Watts'
import math
#R1=rotor resistance before introduction of control
#R2=rotor resistance after introduction of control
print 'R2=1.5*R1'
R2=((R1*Ton)+(R1+R1)*Toff)/T #rotor resistance referred to stator in ohms
print 'the above condition satisfies when Ton= Toff'
T=4 #total time period in ms
f=1000/T #chopper frequency in hz
f=round(f,1)
print 'Chopper frequency=f=',f,'hz'