from __future__ import division
from math import pi, sin, cos, sqrt
#Given data:
Vin=400.0 #V
alfa=30.0 #degree
R=50.0 #ohm
#Solution :
Vdc=Vin/pi/2*(1+cos(alfa*pi/180)) #V
print "Average load voltage = %0.1f V " %Vdc
I=Vdc/R #A
print "Average load current = %0.3f A " %I
Vrms=Vin*sqrt((180-alfa)/4/180+sin(2*alfa*pi/180)/8/pi) #V
print "rms load voltage = %0.2f V " %Vrms
Irms=Vrms/R #A
print "rms load current = %0.3f A " %Irms
from __future__ import division
from sympy.mpmath import quad
from math import asin, pi, sin
#Given data:
Vo=50 #V
R=10 #ohm
#Vin=100*sin(omega*t) #V
Vm=100 #V
#Solution :
omega_t=asin(Vo/Vm) #radian
Iavg=1/2/pi*quad(lambda omega_t:(Vm*sin(omega_t)-Vo)/R,[omega_t,omega_t+2*pi/3]) #A
print "Average current in the circuit = %0.2f A " %Iavg
from __future__ import division
from math import sqrt, degrees, asin, sin, pi
from sympy.mpmath import quad
#Given data:
V=110 # V
Eb=55.5 #V
R=10 #ohm
Vm=V*sqrt(2) #V
#Solution :
omega_t=degrees(asin(Eb/Vm)) #degree
Iavg=1/2/180*quad(lambda omega_t:(Vm*sin(omega_t*pi/180)-Eb)/R,[omega_t,180-omega_t]) #A
print "Average current in the circuit = %0.3f A " %Iavg
#Given data:
Vs=230 #V
R=15 #ohm
alfa=pi/2 #radian
#Solution :
Vm=sqrt(2)*Vs #V
Vdc=Vm/2/pi*(1+cos(alfa)) #V
print "Vdc = %0.2f V " %Vdc
Idc=Vdc/R #A
print "Idc = %0.2f A " %Idc
Vrms=Vm*sqrt((pi-alfa)/4/pi+sin(pi)/8/pi) #V
print "Vrms = %0.2f V " %Vrms
Irms=Vrms/R #A
print "Irms = %0.2f A" %Irms
Pdc=Vdc*Idc #W
print "Pdc = %0.2f W" %Pdc
Pac=Vrms*Irms #W
print "Pac = %0.2f W" %Pac
R_eff=Pdc/Pac #rectification efficiency
print "Rectification efficiency %0.2f " %R_eff
Kf=Vrms/Vdc #Form factor
print "Form factor %0.2f "%Kf
Kr=sqrt(Kf**2-1) #Ripple factor
print "Ripple factor %0.2f " %Kr
VA_rating=Vs*Irms #VA
print "VoltAmpere rating = %0.2f VA" %VA_rating
TUF=Pdc/VA_rating #Transformer utilization factor
print "Transformer utilization factor %.2f" %TUF
PIV=Vm #V
print "Peak Inverse Voltage across thyristor = %0.f2 V" %PIV
#Ans in the book is wrong for some part.
from math import pi, sqrt, cos
from __future__ import division
#Given data:
Vo=150 #V
R=30 #ohm
alfa=45 #degree
#Solution :
Vdc=sqrt(2)*Vo/pi*(1+cos(alfa*pi/180)) #V
print "Average dc Voltage = %0.2f V" %Vdc
Iavg=Vdc/R #A
print "Average load current = %0.2f A" %Iavg
Vrms=sqrt(2)*Vo*sqrt((180-alfa)/2/180+sin(90*pi/180)/4/pi ) #V
print "rms load Voltage = %0.f V" %Vrms
Irms=Vrms/R #A
print "rms load current = %0.3f A " %Irms
from math import pi, sqrt, cos
from __future__ import division
#Given data:
Vs=230 #V
f=50 #Hz
Vdc=100 #V
Ip=15 #A
alfa=30 #degree
#Solution :
Vm=Vdc*pi/(2*cos(alfa*pi/180))+1.7 #V
Vrms_2nd=Vm/sqrt(2) #V
TurnRatio=Vs/Vrms_2nd
print "(a) Turn ratio of transformer",round(TurnRatio, 2)
Irms_2nd=sqrt(Ip**2/2) #A
Rating=2*Vrms_2nd*Irms_2nd #VA
print "(b) Transformer rating = %0.2f VA" %Rating
PIV=2*Vm #V
print "(c) PIV = %0.2f V" %PIV
print "(d) RMS value of thyristor current = %0.2f A" %Irms_2nd
#/Answer in the book is wrong for some part.
from math import pi, cos
from __future__ import division
#Given data:
P=10 #kW
Idc=50 #A
SF=2 #safety factor
#Solution :
Vdc=P*1000/Idc #V
alfa=0 #degree
Vm=Vdc*pi/(2*cos(alfa*pi/180))+1.7 #V
PIV=2*Vm #V
Vthy=SF*PIV #V
print "(a) Voltage rating of thristor = %0.2f V" %Vthy
PIV=Vm #V#for bridge rectifier
Vthy=SF*PIV #V
print "(b) Voltage rating of thristor = %0.2f V" %Vthy
#/Answer in the book is wrong.
from math import pi, cos, acos
from __future__ import division
#Given data:
Vs=230 #V
f=50 #Hz
Io=15 #A
R=0.5 #ohm
L=0.3 #H
E1=100 #V
E2=-100 #V
#Solution :
#/part (a)
Vm=sqrt(2)*Vs #V
#2*Vm/pi*cos(alfa)=E1+Io*R
alfa1=degrees(acos((E1+Io*R)/(2*Vm/pi))) #degree
print "(a) Firing angle = %0.2f degree" %alfa1
#/part (b)
alfa2=degrees(acos((E2+Io*R)/(2*Vm))) #degree
print "(b) Firing angle = %0.3f degree" %alfa2
print "Part(c) : "
#Pin=Vs*Io*cos(theta)
Pout=E1*Io+Io**2*R #W
#Pin=Pout
cos_theta=(Pout/Vs/Io) #laging
print "When E=100, input power factor = %0.3f lagging " %cos_theta
Pout=-E2*Io-Io**2*R #W
#Pin=Pout
cos_theta=(Pout/Vs/Io) #laging
print "When E=-100, input power factor = %0.3f lagging " %cos_theta
from math import pi, sqrt
from __future__ import division
#Given data:
V=230 #V
f=50 #Hz
R=5 #ohm
L=8*10**-3 #H
E=50 #V
alfa=40 #degree
#Solution :
#Vdc=2*sqrt(2)*V*cosd(alfa)/pi=E+Io*R
Io=(2*sqrt(2)*V*cos(alfa*pi/180)/pi-E)/R #A
print "Average value of load current = %0.2f A" %Io
from math import pi, sqrt
from __future__ import division
#Given data:
Vs=230 #V
f=50 #Hz
Vdc=100 #V
Ip=15 #A
alfa=30 #degree
#Solution :
#Vdc=2*Vm*cos(alfa)/pi-2*1.7#(Full converter bridge)
Vm=(Vdc+2*1.7)/2/cos(alfa*pi/180)*pi #V
Vrms=Vm/sqrt(2) #V
TurnRatio=Vs/Vrms
print "(a) Turn ratio of transformer",round(TurnRatio, 3)
Irms=sqrt(Ip**2/2) #A
Rating=Vrms*Ip #VA
print "(b) Transformer rating = %0.2f VA" %Rating
PIV=Vm #V
print "(c) PIV = %0.2f V" %PIV
print "(d) RMS value of thyristor current = %0.2f A" %Irms
from math import pi, sqrt, sin
from __future__ import division
#Given data:
Vs=230 #V
f=50 #Hz
alfa=90 #degree
#Solution :
Vm=Vs*sqrt(2) #V
Vdc=Vm/pi*(1+cos(alfa*pi/180))#V
print "Vdc = %0.2f V" %Vdc
Vrms=Vm/sqrt(2)*sqrt(1/pi*(pi-pi/2+sin(pi)/2)) #V
print "Vrms = %0.1f V" %Vrms
kF=Vrms/Vdc
print "Form factor =",round(kF,3)
from math import pi, sqrt, cos
from __future__ import division
#Given data:
Vs=230 #V
f=50 #Hz
alfa=90 #degree
#Solution :
Vm=Vs*sqrt(2) #V
Vdc=Vm/pi*(1+cos(alfa*pi/180))#V
print "Vdc = %0.2f V" %Vdc
Vrms=Vm/sqrt(2)*sqrt(1/pi*(pi-pi/2+sin(pi)/2)) #V
print "Vrms = %0.2f V" %Vrms
Is_by_I=sqrt(1-pi/2/pi)
Is1_by_I=2*sqrt(2)/pi*cos(pi/4)
HF=sqrt((Is_by_I/Is1_by_I)**2-1) #unitless
print "Harmonic factor =",round(HF,3)
theta1=-alfa/2*pi/180 #radian
DF=cos(theta1) #unitless
print "Displacement factor =",round(DF,4)
PF=(Is1_by_I/Is_by_I)*DF #lagging
print "Power factor = %0.4f lagging " %PF
from math import pi, sqrt, cos
from __future__ import division
#Given data:
Vs=230 #V
f=50 #Hz
alfa=pi/3 #radian
#Solution :
Vm=Vs*sqrt(2) #V
Vdc=2*Vm/pi*cos(alfa)#V
print "Vdc = %0.2f V" %Vdc
Vrms=Vs #V
print "Vrms = %0.2f V" %Vrms
Is_by_I=sqrt(1-pi/2/pi)
Is1_by_I=2*sqrt(2)/pi*cos(pi/4)
HF=sqrt((Is_by_I/Is1_by_I)**2-1) #unitless
print "Harmonic factor =",round(HF,3)
fi1=-alfa #radian
DF=cos(fi1) #unitless
print "Displacement factor =",round(DF,2)
PF=(Is1_by_I/Is_by_I)*DF #lagging
print "Power factor = %0.2f lagging " %PF
from math import pi, sqrt, cos
from __future__ import division
#Given data:
Vs=230 #V
f=50 #Hz
alfa=30*pi/180 #radian
I=4 #A
#Solution :
print "part (a) : "
Vm=Vs*sqrt(2) #V
Vdc=2*Vm/pi*cos(alfa)#V
RL=Vdc/I #ohm
IL=I*2*sqrt(2)/pi #A
Pin_active=Vs*IL*cos(alfa) #W
Pin_reactive=Vs*IL*sin(alfa) #vars
Pin_appearent=Vs*IL #VA
print "dc output voltage = %0.2f V " % Vdc
print "Active power input = %0.2f W" %Pin_active
print "Reactive power input = %0.2f vars " %Pin_reactive
print "Appearent power input = %0.2f VA " %Pin_appearent
print "part (b) : "
Vdc=Vm/pi*(1+cos(alfa))#V
IL=Vdc/RL #A
I_fund=2*sqrt(2)/pi*IL*cos(alfa/2) #A
Pin_active=Vs*I_fund*cos(alfa/2) #W
Pin_reactive=Vs*I_fund*sin(alfa/2) #vars
Pin_appearent=Vs*I_fund #VA
print "dc output voltage = %0.2f V " % Vdc
print "Active power input = %0.2f W" %Pin_active
print "Reactive power input = %0.2f vars " %Pin_reactive
print "Appearent power input = %0.2f VA " %Pin_appearent
print "part (c) : "
Vdc=Vs/sqrt(2)/pi*(1+cos(alfa))#V
Idc=Vdc/RL #A
print "dc output voltage = %0.2f V "%Vdc
print "dc output current = %0.2f A " %Idc
from math import pi, sqrt, cos
from __future__ import division
#Given data:
Vs=230 #V
f=50 #Hz
alfa=30 #degree
IL=10 #A
#Solution :
Vm=Vs*sqrt(2) #V
Vdc=2*Vm/pi*cos(alfa*pi/180)#V
print "dc output voltage = %0.2f V "%Vdc
Irms=IL #A
print "(b) Irms = %0.2f A" %Irms
Is1=2*sqrt(2)/pi*IL #A
print "(c) Fundamental component of input current = %0.2f A" %Is1
DF=cos(-alfa*pi/180) #unitless
print "(d) Displacement fator =",round(DF,3)
pf_in=Is1/IL*DF #lagging
print "(e) Input power fator = %0.3f lagging " %pf_in
HF=sqrt((IL/Is1)**2-1) #unitless
print "(f) Harmonic factor =",round(HF,3)
Vrms=Vs #V
FF=Vrms/Vdc #form fator
RF=sqrt(FF**2-1) #ripple fator
print "(g) Ripple factor =",round(RF,3)
from math import pi, sqrt, cos
from __future__ import division
#Given data:
Vs=240 #V
f=50 #Hz
alfa=60 #degree
RL=10 #ohm
#Solution :
Vm=Vs*sqrt(2) #V
Vdc=Vm/pi*(1+cos(alfa*pi/180))#V
print "(a) average load voltage = %0.2f V " %Vdc
I=Vdc/RL #A
Is=I*sqrt(1-alfa/180) #A
Irms=Is #A
print "(b) rms input current = %0.2f A " %Irms
Is1=2*sqrt(2)/pi*I*cos(alfa/2*pi/180) #A
fi1=-alfa/2 #degree
DF=cos(fi1*pi/180) #unitless
pf_in=Is1/Is*DF #lagging
print "(c) Input power fator = %0.3f lagging " %pf_in
Pavg=I**2*RL #W
print "(d) Average power dissipated = %0.2f W " %Pavg
from math import pi, sqrt, cos
from __future__ import division
#Given data:
IL=200 #A
VL=400 #V
Vdc=360 #V
variation=10 #%
#Solution :
Vm=VL*sqrt(2)/sqrt(3) #V
#Vdc=3*sqrt(3)/pi*Vm*cosd(alfa)#V
alfa = degrees(acos(Vdc/(3*sqrt(3)/pi*Vm)))#degree
print "Firing angle = %0.1f degree" %alfa
S=sqrt(3)*VL*IL #VA
print "Apparent power = %0.f VA " %S
P=S*cos(alfa*pi/180) #W
print "Active power = %0.2f W " %P
Q=sqrt(S**2-P**2) #vars
print "Rective power = %0.2f vars " %Q
Vac1=(1+variation/100)*VL #V
alfa1=degrees(acos(Vdc/(3*Vac1*sqrt(2)/pi))) #degree
Vac2=(1-variation/100)*VL #V
alfa2=degrees(acos(Vdc/(3*Vac2*sqrt(2)/pi))) #degree
print "When variation is +10%%, firing angle = %0.1f degree " %alfa1
print "When variation is -10%%, firing angle = %0.1f degree " %alfa2
#Answer in the book is wrong for some part.
from math import pi, sqrt, cos
from __future__ import division
#Given data:
Vs=400 #V
f=50 #Hz
Idc=150 #A
alfa=60 #degree
#Solution :
Vm=Vs*sqrt(2)/sqrt(3) #V
Vdc=3*sqrt(3)/pi*Vm*cos(alfa*pi/180)#V
Pdc=Vdc*Idc #W
print "Output power, Pdc = %0.2f W " %Pdc
Iavg=Idc/3 #A
print "Average thyristor current = %0.2f A " %Iavg
Irms=Idc/sqrt(3) #A
print "RMS value of thyristor current = %0.2f A " %Irms
Ipeak=Idc #A
print "Peak current through thyristor = %0.2f A " %Ipeak
PIV=sqrt(2)*Vs #V
print "Peak inverse voltage = %0.2f V " %PIV
#Answer of first part in the book is wrong.
from math import pi, sqrt, cos
from __future__ import division
#Given data:
V=415 #V
Vdc=460 #V
I=200 #A
f=50 #Hz
#Solution :
Vm=V*sqrt(2)/sqrt(3) #V
alfa=degrees(acos(Vdc/(3*sqrt(3)/pi*Vm))) #degree
print "Converter firing angle = %0.2f degree " %alfa
Pdc=Vdc*I #W
print "dc power = %0.2f kW " %(Pdc/1000)
IL=I*sqrt(120/180) #A
print "AC line current = %0.2f A " %(IL)
Ipeak=I #A
Irms=Ipeak*sqrt(120/360) #A
print "RMS value of thyristor current = %0.1f A " %(Irms)
Iavg=Ipeak/3 #A
print "Average thyristor current = %0.2f A " %Iavg
from math import pi, sqrt, cos
from __future__ import division
#Given data:
Vs=230 #V
f=50 #Hz
emf=200 #V
Rint=0.5 #ohm
I=20 #A
#Solution :
Vm=Vs*sqrt(2)/sqrt(3) #V
Vdc=emf+Rint*I #V
alfa=degrees(acos(Vdc/(3*sqrt(3)/pi*Vm))) #degree
print "Firing angle = %0.2f degree " %(alfa)
Pout=emf*I+I**2*Rint #W
Is=sqrt(I**2*120/180) #A
cos_theta=Pout/(sqrt(3)*Vs*Is) #power factor
print "Input power factor = %0.3f lagging " %(cos_theta)
from math import pi, sqrt, cos
from __future__ import division
#Given data:
Vs=400 #V
R=10 #ohm
f=50 #Hz
#Solution :
Vm=Vs*sqrt(2)/sqrt(3) #V
Vdc_max=3*sqrt(3)*Vm/2/pi*(1+cos(0)) #V
#Vdc should be Vdc_max/2
Vdc=Vdc_max*50/100 #V
alfa=degrees(acos(1-Vdc/(3*sqrt(3)*Vm/2/pi)))#degree
print "Firing angle = %0.2f degree " %alfa
Idc=Vdc/R #A
print "Average output current = %0.2f A " %Idc
Vrms=sqrt(3)*Vm*sqrt(3/4/pi*(pi-pi/2+sin(pi)/2)) #V
Irms=Vrms/R #A
print "RMS output voltage = %0.2f V " %Vrms
print "RMS output current = %0.2f A " %Irms
Iavg_thy=Idc/3 #A
print "Average thyristor current = %0.2f A " %Iavg_thy
Irms_thy=Irms/sqrt(3) #A
print "RMS thyristor current = %0.2f A " %Irms_thy
Eff=Vdc*Idc/(Vrms*Irms)*100 #%
print "Rectification Efficiency = %0.2f %% " %Eff
Iline_rms=Irms*sqrt(120/180) #A
VA_in=3*Vs*Iline_rms/sqrt(3) #VA
TUF=Vdc*Idc/VA_in
print "Transformer utilisation factor = %0.2f " %TUF
Pin_active=Irms**2*R #W
pf_in=Pin_active/VA_in #lagging
print "Input power factor = %0.2f lagging " %pf_in
#Answer in the book is wrong for some part.
from math import pi, sqrt, acos, cos
from __future__ import division
#Given data:
Vs=400 #V
R=10 #ohm
f=50 #Hz
#Solution :
Vm=Vs*sqrt(2)/sqrt(3) #V
alfa=60 #degree(For 50% output voltage)
Vdc=3*sqrt(3)*Vm/pi*cos(alfa*pi/180) #V
alfa=degrees(acos(Vdc/3/sqrt(3)/Vm*pi)) #V
print "Firing angle = %0.2f degree " %alfa
Idc=Vdc/R #A
print "Average output current = %0.2f A " %Idc
Vrms=sqrt(3)*Vm*sqrt(0.5+3*sqrt(3)/4/pi*cos(2*alfa*pi/180)) #V
Irms=Vrms/R #A
print "RMS output voltage = %0.2f V " %Vrms
print "RMS output current = %0.2f A " %Irms
Iavg_thy=Idc/3 #A
print "Average thyristor current = %0.2f A " %Iavg_thy
Irms_thy=Irms/sqrt(3) #A
print "RMS thyristor current = %0.2f A " %Irms_thy
Eff=Vdc*Idc/(Vrms*Irms)*100 #%
print "Rectification Efficiency = %0.2f %% " %Eff
Iline_rms=Irms*sqrt(120/180) #A
VA_in=3*Vs*Iline_rms/sqrt(3) #VA
TUF=Vdc*Idc/VA_in
print "Transformer utilisation factor = %0.2f " %TUF
Pin_active=Irms**2*R #W
pf_in=Pin_active/VA_in #lagging
print "Input power factor = %0.2f lagging " %pf_in
#Answer in the book is wrong for some part.
from math import acos, degrees, pi, sqrt
from __future__ import division
#Given data:
Vs=400 #V
f=50 #Hz
Eb=300 #V
#Solution :
Vdc=Eb #V
Vm=Vs*sqrt(2) #V
#Vdc=3*sqrt(3)/2/pi*Vm*cosd(alfa) #V
alfa=degrees(acos(Vdc/(3*sqrt(3)/2/pi*Vm))) #degree
print "Firing angle = %0.1f degree " %alfa