#Chapter 16,Example 1, page 556
#Determine the (a)ripple voltage (b)voltage drop (c)Average output volatge (d)ripple factor
I1 = 5*10**-3 # A
C2 = 0.05*10**-6 # F
C1 = 0.01*10**-6 # F
Vs = 100 # kV
f = 50 # Hz
from math import sqrt
# (a) Ripple voltage
print"\n Part (a)"
delV = I1/(C2*f)
print"\n Ripple Voltage = V", delV
# (b) Voltage drop
print"\n Part (b)"
Vd = I1/f*((1/C1)+(1/(2*C2)))
print"\n Voltage drop = V", Vd
# (c) Average output voltage
print"\n Part (c)"
Vav = 2*Vs*sqrt(2)-Vd*10**-3
print"\n Average output voltage = kV", round(Vav,1)
# (d) Ripple factor
print"\n Part (d)"
RF = Vd*10**-3/(2*Vs*sqrt(2))
print"\n Ripple Factor in percentage = ", round(RF*100,2)
#Chapter 16,Example 2, page 556
#Determine the (a)ripple voltage (b)voltage drop (c)Average output volatge (d)ripple factor
I1 = 5*10**-3 # A
C3 = 0.10*10**-6 # F
C2 = 0.05*10**-6 # F
C1 = 0.01*10**-6 # F
Vs = 100 # kV
f = 50 # Hz
from math import sqrt
# (a) Ripple voltage
print"\n Part (a)"
delV = I1/f*((2/C1)+(1/C3))
print"\n Ripple Voltage = kV", delV*10**-3
# (b) Voltage drop
print"\n Part (b)"
Vd = I1/f*((1/C2)+(1/C1)+(1/(2*C3)))
print"\n Voltage drop = kV", round(Vd*10**-3,1)
# (c) Average output voltage
print"\n Part (c)"
Vav = 3*Vs*sqrt(2)-Vd*10**-3
print"\n Average output voltage = kV", round(Vav,2)
# (d) Ripple factor
print"\n Part (d)"
RF = Vd*10**-3/(3*Vs*sqrt(2))
print"\n Ripple Factor in percentage = ", round(RF*100,2)
# Answers may vary due to round off error
#Chapter 16,Example 3, page 557
#Determine the (a)ripple voltage (b)voltage drop (c)Average output volatge (d)ripple factor (e)optimum number of stages
I1 = 5*10**-3 # A
C = 0.15*10**-6 # F
Vs = 200 # kV
f = 50 # Hz
n = 12
from math import sqrt
# (a) Ripple voltage
print"\n Part (a)"
delV = I1*n*(n+1)/(f*C*2)
print"\n Ripple Voltage = kV", delV*10**-3
# (b) Voltage drop
print"\n Part (b)"
a = I1/(f*C)
Vd = a*((2/3*n**3)+(n**2/2)-(n/6)+(n*(n+1)/4))
print"\n Voltage drop = kV", Vd*10**-3*12
# (c) Average output voltage
print"\n Part (c)"
Vav = 2*n*Vs*sqrt(2)-Vd*10**-3
print"\n Average output voltage = kV", Vav
# (d) Ripple factor
print"\n Part (d)"
RF = Vd*10**-3/(2*n*Vs*sqrt(2))*10
print"\n Ripple Factor in percentage = ", RF*100
# (e) Optimum number of stages
print"\n Part (e)"
nopt = sqrt(Vs*sqrt(2)*10**3*f*C/I1)
print"\n Optimum number of stages = stages", round(nopt)
# Answers may vary due to round off error
#Chapter 16,Example 4, page 558
#Determine the input voltage and power
from math import pi
Vc = 500*10**3 # V
A = 4 # A
Xl = 8./100. # in percentage
kV = 250.
Xc = Vc/A # Reactance of the cable
XL = Xl*(kV**2/100)*10**3 # Leakage reactance of the transformer
Radd = Xc-XL # Additional series reactance
Ind = Radd/(2*pi*XL) # Inductance of required series inductor
R = 3.5/100.*(kV**2/100)*10**3 # Total circuit resistance
Imax = 100./250. # maximum current that can be supplied by the transformer
Vex = Imax*R # Exciting voltage of transformer secondary
Vin = Vex*220/kV # Input voltage of transformer primary
P = Vin*100./220. # Input power of the transformer
print"\n Reactance of the cable = k ohm", Xc*10**-3
print"\n Leakage reactance of the transformer = k ohm", XL*10**-3
print"\n Additional series reactance = k ohm", Radd*10**-3
print"\n Inductance of required series inductor = H", Ind*10**3
print"\n Total circuit resistance = k ohm", R*10**-3
print"\n maximum current that can be supplied by the transformer = A", Imax
print"\n Exciting voltage of transformer secondary = kV", Vex*10**-3
print"\n Input voltage of transformer primary = V", Vin*10**-3
print"\n Input power of the transformer = kW", P*10**-3
# Answers may vary due to round off error
#Chapter 16,Example 5,page 559
#Determine the charging current and potential difference
ps = 0.5*10**-6 # C/m**2
u = 10 # m/s
w = 0.1 # m
I = ps*u*w
Rl = 10**14 # ohm
V = I*Rl*10**-6
print"\n Charging current= micro A", I*10**6
print"\n Potential difference = MV", V
# Answers may vary due to round off error
#Chapter 16,Example 6,page 560
#Determine the wave generated
# With refrence to table 16.1
C1 = 0.125*10**-6 # F
C2 = 1*10**-9 # F
R1 = 360. # ohm
R2 = 544. # ohm
V0 = 100. # kV
from math import sqrt
theta = sqrt(C1*C2*R1*R2)
neta = 1/(1+(1+R1/R2)*C2/C1)
alpha = R2*C1/(2*theta*neta)
print"\n Theta = micro S",theta*10**6
print"\n Neta = ",neta
print"\n Alpha = ",alpha
# Coresponding to alpha the following can be deduced from Fig 16.12
T2 = 10.1*theta*10**6
T1 = T2/45
imp = T1/T2 # generated lighting impulse
# From equations 16.41 and 16.42
a1 = (alpha-sqrt(alpha**2-1))*10**-6/(theta)
a2 = (alpha+sqrt(alpha**2-1))*10**-6/theta
print"\n T1 = microS", T1
print"\n T2 = microS", T2
print"\n Generated lighting impulse = wave", imp
print"\n alpha1 = microS", a1
print"\n alpha2 = microS", a2
# According to equation 16.40
et = neta*(alpha*V0)/sqrt(alpha**2-1)
print"\n e(t) = * (e**t - f**t)",et,round(-a1,3),round(-a2,2) # Equation of the wave form generated by the impulese
#Answers may vary due to round off error
#Chapter 16,Example 6,page 561
#Determine the wave generated
C1 = 0.125*10**-6 # F
C2 = 1*10**-9 # F
R1 = 360. # ohm
R2 = 544. # ohm
V0 = 100. # kV
from math import sqrt
theta = sqrt(C1*C2*R1*R2)
neta = 1/(1+R1/R2+C2/C1)
alpha = R2*C1/(2*theta*neta)
print"\n Theta = micro S",theta*10**6
print"\n Neta = ",neta
print"\n Alpha = ",alpha
# Coresponding to alpha the following can be deduced from Fig 16.12
T2 = 16.25*theta*10**6
T1 = T2/120
# From equations 16.41 and 16.42
a1 = (alpha-sqrt(alpha**2-1))*10**-6/(theta)
a2 = (alpha+sqrt(alpha**2-1))*10**-6/theta
print"\n T1 = microS", T1 # Answer given in the text is wrong
print"\n T2 = microS", T2
print"\n alpha1 = microS", a1
print"\n alpha2 = microS", a2
# According to equation 16.40
et = neta*(alpha*V0)/sqrt(alpha**2-1)
print"\n e(t) = * (e**t - f**t)",et,round(-a1,4),round(-a2,2) # Equation of the wave form generated by the impulese
#Answers may vary due to round off error
#Chapter 16,Example 8,page 562
#Determine the circuit efficiency
C1 = 0.125*10**-6 # F
C2 = 1*10**-9 # F
T2 = 2500.
T1 = 250.
from math import sqrt
# Bsaed on Figure 16.12
T2T1 = T2/T1
a = 4. # alpha
theta = T2/6.
# From table 16.1
X = (1/a**2)*(1+C2/C1)
R1 = (a*theta*10**-6/C2)*(1-sqrt(1-X))
R2 = (a*theta*10**-6/(C1+C2))*(1+sqrt(1-X))
neta = 1/(1+(1+R1/R2)*C2/C1)
print"\n Theta = micro S", theta
print"\n X = ", X
print"\n R1 = k Ohm", R1*10**-3
print"\n R2 = k Ohm", R2*10**-3
print"\n neta = ", round(neta,3)
# Answers may vary due to round off error
#Chapter 16,Example 9,page 563
#Determine the maximum output voltage and energy rating
n = 8.
C1 = 0.16/n # micro F
C2 = 0.001 # micro F
T2 = 50.
T1 = 1.2
from math import sqrt
# beased on figure 16.12
a = 6.4 # alpha
theta = T2/9.5
X = (1/a**2)*(1+C2/C1)
R1 = (a*theta*10**-6/C2)*(1-sqrt(1-X))
R2 = (a*theta*10**-6/(C1+C2))*(1+sqrt(1-X))
R1n = R1/n
R2n = R2/n
V0 = n*120
neta = 1/(1+(1+R1/R2)*C2/C1)
V = neta*V0
E = 1./2.*C1*V0**2
print"\n Theta = micro S", theta
print"\n X = ", X
print"\n V0 = ", V0
print"\n R1 = Ohm", R1*10**6
print"\n R2 = Ohm", R2*10**6
print"\n R1/n = Ohm", R1n*10**6
print"\n R2/n = Ohm", R2n*10**6
print"\n neta = ", neta
print"\n Maximum output voltage = kV", V
print"\n Energy rating = kJ", E/1000
# Answers greatly vary due to round off error
#Chapter 16,Example 10,page 564
#Determine the from and tail times
n = 12
C1 = 0.125*10**-6/n # micro F
C2 = 0.001*10**-6 # micro F
R1 = 70*n # ohm
R2 = 400*n # ohm
from math import sqrt
# beased on figure 16.15
theta = sqrt(C1*C2*R1*R2)
neta = 1/(1+R1/R2+C2/C1)
a = R2*C1/(2*theta*neta) # alpha
T2 = 7*theta*10**6
T1 = T2/25
print"\n R1 = Ohm", R1
print"\n R2 = Ohm", R2
print"\n Theta = microS",theta*10**6
print"\n Neta = ",neta
print"\n Alpha = ",a
print"\n T1 = microS", round(T1,2)
print"\n T2 = microS", round(T2,2)
# Answers greatly vary due to round off error
#Chapter 16,Example 11,page 564
#Determine the equation generated by impulse
from math import sqrt
w = 0.02*10**6 # s**-1 obtained by solving eq 16.47 iteratively
R = sqrt(4-(sqrt(8*8*4)*0.02)**2) # solved the simplified equation
L = 8*10**-6
V = 25*10**3
# In equation 16.46
y = R/(2*L)
# Deriving the equation
a = V/(w*L)
print"\n R = ohm",R
print"\n y = s**-1",y
print"\n I(t) = * exp(t) * sin(t) A",a/10000,round(-y,1)/10000,w
# Answers may vary due to round off error