from __future__ import division
from math import sqrt,pi,cos,sin
R=100 # ohm
Vs=230 # V
f=50 # Hz
alpha=45 # degree
Vo=Vs*sqrt(2)/2/pi*(1+cos(pi/180*alpha)) # V
Io=Vo/R # A
Vor=Vs/sqrt(2)*sqrt(1/180*((180-alpha)+sin(pi/180*2*alpha)/2)) # V
Ior=Vor/R # A
P=Ior**2*R # W
print 'Power delivered = %.2f W'%(P)
#Ans in the textbook is not accurate.
from __future__ import division
from math import sqrt,pi,asin,cos,sin
R=10 # ohm
E=165 # V
#vt=330*sin(314*t)
Vm=330 # V
f=314/2/pi # Hz
alpha1=asin(E/Vm) # radian
alpha2=pi-alpha1 # radian
Io=1/2/pi/R*(2*Vm*cos(alpha1)-E*(alpha2-alpha1)) # A
P=E*Io # W
print 'Power supplied to battery = %d W'%(P)
from __future__ import division
from math import sqrt,pi,cos,sin
#v2t = 325*sin(w*t)
R=20 # ohm
alfa=45 # degree
vm=325 # V
V=230 # V
print 'part (a)\n'
Vo=vm/2/pi*(1+cos(pi/180*alfa)) # V
Io=Vo/R # A
print ' dc voltage Vo = %.1f V'%(Vo)
print '\n & Current Io = %.3f A'%(Io)
print '\n\n part (b)\n'
Vor=vm/2/sqrt(pi)*sqrt((pi-pi/180*alfa)+1/2*sin(pi/180*2*alfa)) # V
Ior=Vor/R # A
print ' rms voltage Vor = %.3f V'%(Vor)
print '\n & Current Ior = %.3f A'%(Ior)
print '\n\n part (c)'
Pdc=Vo*Io # W
Pac=Vor*Ior # W
eta=Pdc/Pac # rectification efficiency
print "\n dc Power = %.2f W"%(Pdc)
print "\n ac Power = %.2f W"%(Pac)
print "\n Rectification efficiency = %.4f"% (eta)
print '\n\n part (d)'
FF=Vor/Vo # form factor
RF=sqrt(FF**2-1)
print '\n Form factor = %.3f '%(FF)
print '\n Ripple factor = %.3f '%(RF)
print '\n\n part (e)'
VA=V*Ior # VA
TUF=Pdc/V/Ior # Transformer Utilization factor
print "\n VA rating = %.1f VA"%(VA)
print "\n Transformer Utilization factor = %.4f"%TUF
print '\n\n part (f)'
Vp=vm # V
print "\n Peak inverse voltage = %d V"%Vp
from __future__ import division
from math import sqrt,pi,cos,sin,asin
R=10 # ohm
E=165 # V
#vt=330*sin(314*t)
Vm=330 # V
Vs=233 # V
f=314/2/pi # Hz
theta1=asin(E/Vm) # radian
#alpha2=pi-alpha1 # radian
Io=1/2/pi/R*(2*Vm*cos(theta1)-E*(pi-2*theta1)) # A
print '(a) Average value of current = %.2f A'%(Io)
P=E*Io # W
print '\n (b) Power supplied to battery = %d W'%(P)
Ior=sqrt(1/2/pi/R**2*((pi-2*theta1)*(Vs**2+E**2)+Vm**2*sin(2*theta1)-4*Vm*E*cos(theta1))) # A
Pr=Ior**2*R # W
print '\n (c) Power dissipated in the resistor = %.2f W'%(Pr)
pf=(Pr+P)/Vs/Ior # power factor
print '\n (d) Power factor = %.4f'%(pf)
from __future__ import division
from math import sqrt,pi,cos,sin
R=20 # ohm
V=230 # V
f=50 # Hz
alpha=30 # degree
Vm=V*sqrt(2) # V
Vo=Vm/pi*(1+cos(alpha*pi/180)) # V
print 'Average load voltage = %.1f V'%(Vo)
Io=Vo/R # A
print '\n Average load current = %.2f A'%( Io)
Vor=V/sqrt(pi)*sqrt((pi-alpha*pi/180)+sin(2*alpha*pi/180)/2) # V
Ior=Vor/R # A
print '\n rms load current = %.2f A'%( Ior)
Iav=Io/2 # A
print '\n Average thyristor current = %.2f A'%( Iav)
Irms=Ior/sqrt(2) # A
print '\n rms thyristor current = %.3f A'%( Irms)
from __future__ import division
from math import sqrt,pi,cos,sin
R=10 # ohm
L=100/1000 # H
E=100 # V
Vs=230 # V
f=50 # Hz
alpha = 45 # degree
Vm=Vs*sqrt(2) # V
Vo=2*Vm/pi*cos(alpha*pi/180) # V
Io=(Vo-E)/R # A
print 'Average load current = %.3f A'%(Io)
from __future__ import division
from math import sqrt,pi,cos,sin
R=2 # ohm
L=0.3 # H
E=100 # V
Vs=230 # V
f=50 # Hz
alpha = 30 # degree
Vm=Vs*sqrt(2) # V
Vo=2*Vm/pi*cos(alpha*pi/180) # V
print ' Average load voltage = %.2f V'%( Vo)
Io=(Vo)/R # A
print '\n Average load current = %.2f A'%( Io)
Is=Io # A
Is1=4*Io/pi/sqrt(2) # A
PF=Vo*Io/Vs/Is # power factor
print '\n Power factor = %.4f'%(PF)
from __future__ import division
from math import sqrt,pi,cos,sin
R=5 # ohm
L=1 # H
E=10 # V
Vs=230 # V
f=50 # Hz
alpha = 45 # degree
Vm=Vs*sqrt(2) # V
Vo=Vm/pi*(1+cos(alpha*pi/180)) # V
print ' Average load voltage = %.2f V'%( Vo)
Io=(Vo-E)/R # A
print '\n Average load current = %.2f A'%( Io)
PF=(Io**2*R+E*Io)/Vs/Io # power factor
print '\n Power factor = %.4f'%(PF)
from __future__ import division
from math import sqrt,pi,cos,sin
R=50 # ohm
Vs=230 # V
f=50 # Hz
alpha = 30 # degree
Vm=Vs*sqrt(2) # V
Vo=2*Vm/pi*cos(alpha*pi/180) # V
print ' (i) Average voltage across 50 ohm resistor = %.2f V'%( Vo)
Io=(Vo)/R # A
Ior=Io/sqrt(2) # A
print '\n (ii) rms current = %.4f A'%( Ior)
from __future__ import division
from math import sqrt,pi,cos,sin
R=2 # ohm
Vs=230 # V
f=50 # Hz
alpha = 120 # degree
Ia=10 # A
Vo=2*sqrt(2)*Vs*cos(alpha*pi/180)/pi
V=Ia*R-Vo # V
print 'emf on load side = %.2f V'%( V)
from __future__ import division
from math import sqrt,pi,cos,sin
Vs=230 # V
Io=5 # A
alpha = 45 # degree
print 'part(i)'
Vo=2*sqrt(2)*Vs/pi*cos(alpha*pi/180) # V
print '\n dc output voltage = %.1f V'%(Vo)
Pi=Vo*Io # W
print '\n Active power = %.1f W'%(Pi)
Qi=2*sqrt(2)*Vs/pi*sin(alpha*pi/180)*Io # VAR
print '\n Reactive power = %.1f VAR'%(Qi)
print '\n\n part(ii)'
R=Vo/Io # ohm
Vo=sqrt(2)*Vs/pi*(1+cos(alpha*pi/180)) # V
print '\n dc output voltage = %.1f V'%(Vo)
Io=Vo/R # A
Pi=Vo*Io # W
print '\n Active power = %.1f W'%(Pi)
Qi=sqrt(2)*Vs/pi*sin(alpha*pi/4)*Io # VAR
print '\n Reactive power = %.1f VAR'%(Qi)
print '\n\n part(iii)'
Vo=sqrt(2)*Vs/pi/2*(1+cos(alpha*pi/180)) #
print '\n Average load voltage = %.0f V'%(Vo)
Io=Vo/R # A
print '\n Average load current = %.2f A'%(Io)
from __future__ import division
from math import sqrt,pi,cos,sin
R=20 # ohm
Vs=400 # V
f=50 # Hz
alpha = 30 # degree
Vm=Vs*sqrt(2) # V
Vo=3*Vm/pi*cos(alpha*pi/180) # V
Io=Vo/R # A
print '\n Average load voltage = %.3f V'%(Vo)
print '\n Average load current = %.3f A'%(Io)
from __future__ import division
from math import sqrt,pi,cos,sin
n=3 # no. of phase
Vs=400 # V
f=50 # Hz
Io=100 # A
alpha = 60 # degree
Vm=Vs*sqrt(2) # V
Vo=n*Vm/pi*cos(alpha*pi/180) # V
Po=Vo*Io # W
print ' (i)'
print '\n Output voltage = %.0f V'%(Vo)
print '\n Output power = %.0f W'%(Po)
print '\n\n (ii)'
Iav=Io*2*pi/3/2/pi # A
print '\n average current through thyristor = %.2f A'%( Iav)
Ior=sqrt(Io**2*2*pi/3/2/pi) # A
print '\n rms current through thyristor = %.2f A'%( Ior)
Ip=Io # A
print '\n peak current through thyristor = %.2f A'%( Ip)
print '\n\n (iii)'
PIV=sqrt(2)*Vs # V
print '\n PIV of thyristor = %.1f V'%(PIV)
# Ans in the book is not accurate.
from __future__ import division
from math import sqrt,pi,cos,sin
n=3 # no. of phase
R=60 # ohm
Vs=400 # V
alpha = 30 # degree
Vm=Vs*sqrt(2) # V
Vo=3*Vm/pi*cos(alpha*pi/180) # V
Io=Vo/R # A
P=Io**2*R # W
pf=P/sqrt(3)/Vs/Io # power factor
print '\n Average load voltage = %.3f V'%(Vo)
print '\n Average load current = %.1f A'%(Io)
print '\n input power factor = %.4f'%(pf)
from __future__ import division
from math import sqrt,pi,cos,sin
n=3 # no. of phase
R=50 # ohm
Vs=400 # V
f=50 # Hz
alpha = 45 # degree
Vm=Vs*sqrt(2) # V
Vo=3*Vm/2/pi*(1+cos(alpha*pi/180)) # V
Io=Vo/R # A
print '\n Average load voltage = %.2f V'%(Vo)
print '\n Average load current = %.2f A'%(Io)
from __future__ import division
from math import sqrt,pi,cos,sin,acos
n=3 # no. of phase
Vs=400 # V
f=50 # Hz
Ls=5/1000 # H
Io=20 # A
Ri=1 # ohm
Vdc=400 # V
Vo=Vdc+Io*Ri # V
# Vo=3*Vm/pi*cos(alpha*pi/180)-3*2*pi*f*Ls/pi*Io
Vm=sqrt(2)*Vs # V
alpha=acos((Vo+3*2*pi*f*Ls/pi*Io)/(3*Vm/pi))*180/pi # degree
# Vo=3*Vm/pi*cos((alpha+mu)*pi/180)-3*2*pi*f*Ls/pi*Io
mu=acos((Vo-3*2*pi*f*Ls/pi*Io)/(3*Vm/pi))*180/pi-alpha # degree
print '\n Firing angle = %.2f degree'%(alpha)
print '\n Overlap angle = %.2f degree'%(mu)
# ans in the textbook is not accurate.
from __future__ import division
from math import sqrt,pi,cos,sin,acos
n=3 # no. of phase
Vs=400 # V
f=50 # Hz
alpha = pi/4 # radian
Io=10 # A
Vo=360 # V
# Vo=n*Vs*sqrt(2)/pi/sqrt(2)-3*2*pi*f*Ls*Io/pi
Ls=(n*Vs*sqrt(2)/pi/sqrt(2)-Vo)/(3*2*pi*f)/(Io/pi)*1000 # mH
R=Vo/Io # ohm
print ' Load resistance = %.f ohm'%(R)
print '\n Source inductance = %.1f mH'%(Ls)
# Vo = n*Vs*sqrt(2)/pi*cos(alpha+mu)+3*2*pi*f*Ls*Io/pi
mu=acos((Vo-3*2*pi*f*Ls/1000*Io/pi)/(n*Vs*sqrt(2)/pi))-alpha # radian
mu=mu*180/pi # degree
print '\n Overlap angle = %.d degree'%(mu)