Chapter5, Inverters

Example 5.3.1: page 5-8

In [1]:
from math import pi, sqrt
#Maximum frequency
#given data :
T_off=100 # in micro-sec
L=40 # in micro-H
C=5 # in micro-farad
R=4 #in ohm
Tr=((2*pi)/sqrt((1/(C*10**-6*L*10**-6))-(R**2/(4*(L*10**-6)**2))))*10**6 
f=(1/(Tr+T_off))*10**3 
print "maximum frequency, f = %0.3f kHz " %f
maximum frequency, f = 4.431 kHz 

Example 5.12.1: page 5-37

In [2]:
from __future__ import division
from numpy import arange, pi, sqrt, nditer, array
#rms output voltage,output power, average and peak currents,peak reverse blocking voltage,
#THD,DF,harmonic factor and distortion factor of the lowest order harmonic
print "part (a)"
v=24 #in volts
V=v #
r=3 #in ohms
v1rms=(2*v)/(sqrt(2)*pi) #in volts
print "rms output voltage at fundamental frequency = %0.2f V" %v1rms
print "part (b)"
po=((v/2)**2)/r #in watts
print "output power = %0.2f Watt" %po
print "part (c)"
itav=(v/(4*r)) #in amperes
itp=((v/2)/r) #in amperes
print "average transistor current = %0.2f A" %itav
print "transistor peak current = %0.2f A" %itp
print "part (d)"
vbr=2*(v/2) #in volts
print "peak reverse blocking voltage = %0.2f V" %vbr
print "part (e)"
vo=v/2 #
THD1=((vo)**2-(v1rms)**2)**(1/2) #in volts
THD=THD1/v1rms #
print "Total Hramonic distortion = %0.2f %%" %(THD*100)
print "part (f)"
n=array([0,0,(1/3),0,(1/5),0,(1/7),0,(1/9),0,(1/11),0,(1/13)]) #
i = arange(3,15,2)
def fun1(n):
    it = nditer([n, None])
    for x,y in it:
        y[...] = 2*V*x/pi/sqrt(2)
    return it.operands[1]
v = fun1(n)
x=sqrt((((v[2])/(3**2))**2)+(((v[4])/(5**2))**2)+(((v[6])/(7**2))**2)+(((v[8])/(9**2))**2)+(((v[10])/(11**2))**2)+(((v[12])/(13**2))**2)) #
DF=x/v1rms #
print "distortion factor = %0.2f %%" %(DF*100)
#distortion factor is calculated wrong in the textbook
print "part (g)"
HF3=v[2]/v1rms #
DF3=((v[2]/(3**2)))/v1rms
print "HF for the third harmonic = %0.2f %%" %(HF3*100)
print "DF the third harmonic = %0.2f %%" %(DF3*100)
# answer for part f is wrong in the textbook.
part (a)
rms output voltage at fundamental frequency = 10.80 V
part (b)
output power = 48.00 Watt
part (c)
average transistor current = 2.00 A
transistor peak current = 4.00 A
part (d)
peak reverse blocking voltage = 24.00 V
part (e)
Total Hramonic distortion = 48.34 %
part (f)
distortion factor = 3.80 %
part (g)
HF for the third harmonic = 33.33 %
DF the third harmonic = 3.70 %

Example 5.12.2: page 5-39

In [3]:
#rms output voltage,output power,average and peak currents,peak reverse blocking voltage,
#THD,DF,harmonic factor and distortion factor of the lowest order harmonic
v=48 #in volts
V=v #
r=2.4 #in ohms
v1rms=(4*v)/(sqrt(2)*pi) #in volts
print "part (a)"
print "rms output voltage at fundamental frequency = %0.2f V" %v1rms
print "part (b)"
po=((v)**2)/r #in watts
print "output power = %0.2f Watt" %po
print "part (c)"
itav=(v/(r)) #in amperes
itp=((v/2)/r) #in amperes
print "average transistor current = %0.2f A" %itp
print "transistor peak current = %0.2f A" %itav
print "part (d)"
vbr=2*(v/2) #in volts
print "peak reverse bloacking voltage = %0.2f V" %vbr
print "part (e)"
vo=v #
THD1=((vo)**2-(v1rms)**2)**(1/2) #in volts
THD=THD1/v1rms #
print "Total Hramonic distortion = %0.2f %%" %(THD*100)
print "part (f)"
n=array([0, 0, (1/3), 0, (1/5), 0, (1/7), 0, (1/9), 0, (1/11), 0, (1/13)]) #
i = arange(3,15,2)
def fun1(n):
    it = nditer([n, None])
    for x,y in it:
        y[...] = 2*V*x/pi/sqrt(2)
    return it.operands[1]
v = fun1(n)
x=sqrt((((v[2])/(3**2))**2)+(((v[4]/(5**2))**2)+(((v[6]/(7**2))**2)+(((v[8]/(9**2))**2)+
(((v[10]/(11**2))**2)+(((v[12])/(13**2))**2)))))) #
vorms=0.9
DF=x/vorms #
print "distor factor = %0.2f %%" %(DF*100)
#distortion factor is calculated  wrong in the textbook
print "part (g)"
HF3=2*v[2]/v1rms #
DF3=2*((v[2]/(3**2)))/v1rms
print "HF for the third harmonic = %0.2f %%" %(HF3*100)
print "DF the third harmonic = %0.2f %%" %(DF3*100)
# Answer not accurate for some part.
part (a)
rms output voltage at fundamental frequency = 43.22 V
part (b)
output power = 960.00 Watt
part (c)
average transistor current = 10.00 A
transistor peak current = 20.00 A
part (d)
peak reverse bloacking voltage = 48.00 V
part (e)
Total Hramonic distortion = 48.34 %
part (f)
distor factor = 91.32 %
part (g)
HF for the third harmonic = 33.33 %
DF the third harmonic = 3.70 %

Example 5.12.3: page 5-40

In [4]:
#amplitude of the first three lower order harmonis
#given data :
v=200 #in volts
n=array([(1/3), (1/5), (1/7)]) #
def fun1(n):
    it = nditer([n, None])
    for x,y in it:
        y[...] = 4*v*x/pi/sqrt(2)
    return it.operands[1]
vn = fun1(n)
print "Rms value of third harmonic component of output voltage = %0.2f V" %round(vn[0])
print "Rms value of fifth harmonic component of output voltage = %0.2f V" %round(vn[1])
print "Rms value of seventh harmonic component of output voltage = %0.2f V" %(vn[2])
Rms value of third harmonic component of output voltage = 60.00 V
Rms value of fifth harmonic component of output voltage = 36.00 V
Rms value of seventh harmonic component of output voltage = 25.72 V

Example 5.12.4: page 5-42

In [5]:
#amplitude of the first three lower order harmonis
#given data :
v=200 #in volts
n=array([(1/3), (1/5), (1/7)]) #
vo1rms=(2*v)/(sqrt(2)*pi) #in volts
def fun1(n):
    it = nditer([n, None])
    for x,y in it:
        y[...] = 2*v*x/pi/sqrt(2)
    return it.operands[1]
vn = fun1(n)
print "Vo1rms for half bridge circuit = %0.2f V" %round(vo1rms)
print "Rms value of third harmonic component for half bridge circuit = %0.2f V" %round(vn[0])
print "Rms value of fifth harmonic component for half bridge circuit = %0.2f V" %round(vn[1])
print "Rms value of seventh harmonic component for half bridge circuit = %0.2f V" %vn[2]
print "for bridge inverter"
vo1rms1=(4*v)/(sqrt(2)*pi) #in volts
def fun2(n):
    
    it = nditer([n, None])
    for x,y in it:
        y[...] = 4*v*x/pi/sqrt(2)
    return it.operands[1]
vn1 = fun2(n)
print "Vo1rms for half bridge circuit = %0.2f V" %round(vo1rms1)
print "Rms value of third harmonic component for bridge inverter circuit = %0.2f V" %round(vn1[0])
print "Rms value of fifth harmonic component for half bridge inverter circuit = %0.2f V" %round(vn1[1])
print "Rms value of seventh harmonic component for half bridge inverter circuit = %0.2f V" %vn1[2]
Vo1rms for half bridge circuit = 90.00 V
Rms value of third harmonic component for half bridge circuit = 30.00 V
Rms value of fifth harmonic component for half bridge circuit = 18.00 V
Rms value of seventh harmonic component for half bridge circuit = 12.86 V
for bridge inverter
Vo1rms for half bridge circuit = 180.00 V
Rms value of third harmonic component for bridge inverter circuit = 60.00 V
Rms value of fifth harmonic component for half bridge inverter circuit = 36.00 V
Rms value of seventh harmonic component for half bridge inverter circuit = 25.72 V