#finding ramp current and current at 5 micro sec
#initialisation of variable
from math import pi,tan,sqrt,sin,cos,acos,atan
Ip=3.0;
f=150000.0;
t=5.0e-6;
#calculation
T=1/f;
It=Ip/T;
I5=It*t;
#result
print "ramp current is",round(It/1000,3), "kAt/s"
print "current at 5 micro sec is",round(I5,3), "A"
#finding current at different time
#initialisation of variable
from math import pi,tan,sqrt,sin,cos,acos,atan
Ip=2.0;
f=500000.0;
Ir=.3;
Cd=.4#duty cycle
t1=4.0e-7;
t2=1.0e-6;
I1=0;
#calculation
T=1/f;
Im=Ip-Ir;
I4=(Ip-Im)*t1/(Cd*T)+Im;
It=(Ip-Im)*t/(Cd*T)+Im;
It1=0
#resilt
print "current in time 0<=t<800ns is",round(It,3),"A"
print "current in time 800ns<=t<2 microsec is",round(It1,2), "A"
print "current in time 400ns is",round(I4,2), "A"
print "current in time 1 microsec is",round(I1,2), "A"
#finding average voltage
#initialisation of variable
from math import pi,tan,sqrt,sin,cos,acos,atan
Vr=120;
#calculation
V=(Vr*2**.5)/pi;
#result
print "average voltage is",round(V,2), "V"
#finding average current
#initialisation of variable
from math import pi,tan,sqrt,sin,cos,acos,atan
f=100000.0;
Cd=.35#duty cycle
Ip=3.0;
Ir=.4;
#calculation
Im=Ip-Ir;
T=1/f;
I=Cd*((Ip-Im)/2+Im)
#result
print "average current is",round(I,2), "A"
#finding rms voltage
#initialisation of variable
from math import pi,tan,sqrt,sin,cos,acos,atan
Vp=15.0;
Cd=.35;
f=100000.0;
#calculation
V=Vp*Cd**.5;
#result
print "rms voltage is",round(V,2), "V"
#finding rms current
#initialisation of variable
from math import pi,tan,sqrt,sin,cos,acos,atan
Ip=3.0;
f=100000.0;
#calculation
I=Ip/3**.5;
#result
print "rms current is",round(I,2), "A"
#finding rms voltage
#initialisation of variable
from math import pi,tan,sqrt,sin,cos,acos,atan
Vp=170.0;
f=60.0;
#calculation
Vr=Vp/2;
#result
print "rms voltage is",round(Vr,2), "V"
#finding current and power
#initialisation of variable
from math import pi,tan,sqrt,sin,cos,acos,atan
M=1000.0;
H=40.0;
T=30.0;
E1=.9;
E2=.5;
V=220.0;
P1=5.0;
#calculation
W=M*H;
P=(W)/(T*550);
Pe=P1/E1;
I=(Pe*746)/V;
#result
print "power required is",round(P,2), "hp"
print('Pick a 5HP motor')
print "current required is",round(I,2), "amp"
#finding power
#initialisation of variable
from math import pi,tan,sqrt,sin,cos,acos,atan
Vin=1.0;
Ri=1100.0;
Rf=10000.0;
Rl=8.0;
Vs=18.0;
#calculation
Ir=Vin/Ri;
Vl=Ir*(Ri+Rf);
Ip=Vl/Rl;
Pl=(Vl*Ip)/2;
Ps=(Vs*Ip)/pi;
#result
print "power delivered to the load is",round(Pl,2),"Watt"
print "power provided by each supply is",round(Ps,2), "Watt"
#finding power
#initialisation of variable
from math import pi,tan,sqrt,sin,cos,acos,atan
V=170.0;
R=51.0;
#calculation
I=V/R;
P=(V*I)/4;
#result
print "power delivered is",round(P,2), "Watt"
#finding power
#initialisation of variable
from math import pi,tan,sqrt,sin,cos,acos,atan
V=7.2;
Rq=.2;
Rl=4;
D=.6;
#calculation
Ip=V/(Rq+Rl);
Vl=Ip*Rl;
P=D*Vl*Ip;
Vq=Ip*Rq;
Pq=D*Vq*Ip;
#result
print "power dissipated is",round(P,2), "watt"
print "power dissipated when transistor resistance is 0.2 hm is",round(Pq,2), "watt"