Chapter 06 : System Modelling

Example 6.1, Page No 142

In [12]:
import math
#initialisation of variables
N_1 = 2000.0
N_2 = 500.0
V_1 = 1200.0*complex(math.cos(0),math.sin(0))
I_1 = 5*complex(math.cos(-30*math.pi/180),math.sin(-30*math.pi/180))

#Calculations
a = N_1 / N_2
V_2 = V_1/a
I_2 = a * I_1
Z_2 = V_2 / I_2
Z1_2 = Z_2 * a**2

#Results
print( "V_2 = {0:.2f}".format(abs(V_2.real)))
print("Angle = %.2f v " %(math.degrees(math.atan2(V_2.imag,V_2.real))))
print( "I_2 = {0:.2f}".format(abs(I_2.real)))
print("Angle = %.2f A " %(math.degrees(math.atan2(I_2.imag,I_2.real))))
print( "Z_2 = {0:.2f}".format(abs(Z_2.real)))
print("Angle = %.2f ohm " %(math.degrees(math.atan2(Z_2.imag,Z_2.real))))
print( "Z1_2 = {0:.2f}".format(abs(I_2.real)))
print("Angle = %.2f ohm " %(math.degrees(math.atan2(Z1_2.imag,Z1_2.real))))
V_2 = 300.00
Angle = 0.00 v 
I_2 = 17.32
Angle = -30.00 A 
Z_2 = 12.99
Angle = 30.00 ohm 
Z1_2 = 17.32
Angle = 30.00 ohm 

Example 6.2, Page No 144

In [13]:
import math
#initialisation of variables
N_1 = 2000.0
N_2 = 500.0
V_1 = 1200*complex(math.cos(0),math.sin(0))
r1 = 2
r2 = 0.125
x1 = 8
x2 = 0.5
Z_2 = 12

#Calculations
a = N_1 / N_2
R1 = r1 + a**2 * r2
X1 = x1 + a**2 * x2
Z1_2 = Z_2 * a**2

I_1 = V_1 /(Z1_2+ complex(R1,X1))
V_2 = I_1 * Z1_2 / a
voltage_regulation = ((V_1/4)-abs(V_2))*100.0/V_2

print( "I_1 = {0:.2f}".format(abs(I_1.real)))
print("Angle = %.2f A " %(math.degrees(math.atan2(I_1.imag,I_1.real))))
print( "V_2 = {0:.2f}".format(abs(V_2.real)))
print("Angle = %.2f V " %(math.degrees(math.atan2(V_2.imag,V_2.real))))
print( "Voltage Regulation ={0:.5f}+{1:.5f}i".format(voltage_regulation.real, voltage_regulation.imag))
I_1 = 6.08
Angle = -4.67 A 
V_2 = 291.93
Angle = -4.67 V 
Voltage Regulation =2.41487+0.19713i

Example 6.3, Page No 145

In [14]:
import math
#initialisation of variables
P = 30e3
V_lt = 120.0
V_ht = 240.0

#Calculations
I_1 = P / V_lt
I_2 = P / V_ht
V_2 = V_lt + V_ht
I_in = I_1 + I_2
input_kva = I_in * V_lt / 1e3
output_kva = I_2 * V_2 / 1e3

#Results
print(" Input kVA = %.0f kVA " %input_kva)
print(" Output kVA = %.0f kVA " %output_kva)
 Input kVA = 45 kVA 
 Output kVA = 45 kVA 

Example 6.4 Page No 147

In [15]:
import math
#initialisation of variables
V_lt = 110.0
V_ht = 440.0
P = 2.5e3
x_lt = 0.06

#Calculations
print('Viewed from low-tension side')
lt_base_impedance = (V_lt)**2 / P
print(" Leakage reactance from low-tension side = %.2f ohm" %x_lt)
print(" Low-tension base impedance = %.2f ohmn" %lt_base_impedance)
X_lt_pu = x_lt / lt_base_impedance
print(" Leakage reactance in per unit from Low-tension side = %.4f per unit " %X_lt_pu)
print('Viewed from high-tension side')
x_ht = x_lt * (V_ht / V_lt)**2
ht_base_impedance = (V_ht)**2 / P

#Results
print(" Leakage reactance from high-tension side = %.2f ohm" %x_ht)
print(" High-tension base impedance = %.2f ohmn" %ht_base_impedance)
X_ht_pu = x_ht / ht_base_impedance
print(" Leakage reactance in per unit from Low-tension side = %.4f per unit " %X_ht_pu)
Viewed from low-tension side
 Leakage reactance from low-tension side = 0.06 ohm
 Low-tension base impedance = 4.84 ohmn
 Leakage reactance in per unit from Low-tension side = 0.0124 per unit 
Viewed from high-tension side
 Leakage reactance from high-tension side = 0.96 ohm
 High-tension base impedance = 77.44 ohmn
 Leakage reactance in per unit from Low-tension side = 0.0124 per unit 

Example 6.5, Page No 147

In [16]:
import math
#initialisation of variables
P_AB = 10e6
V_AB_lt = 13.8e3
V_AB_ht = 138e3
x_AB = complex(0.1)
P_BC = 10e6
V_BC_lt = 69e3
V_BC_ht = 138e3
x_BC = complex(0.08)
P_base_B = 10e6
V_base_B = 138e3
Z_L = 300
V_load = 66e3

#Calculations
V_base_A = (V_AB_lt/V_AB_ht)*V_base_B
V_base_C = (V_BC_lt/V_BC_ht)*V_base_B
base_impedance_C = (V_base_C)**2 / P_BC
Z_L_pu = Z_L / base_impedance_C

#impedance diagram is shown in the xcos file
V_load_pu = V_load / V_base_C
I_L_pu = V_load_pu / Z_L_pu
voltage_input = (I_L_pu * (x_AB + x_BC)) + V_load_pu
voltage_regulation = (abs(voltage_input)-abs(V_load_pu))*100/abs(V_load_pu)

#Results
print(" Voltage regulation = %.2f percent " %voltage_regulation)
 Voltage regulation = 28.57 percent 

Example 6.6, Page No 151

In [17]:
import math
#initialisation of variables
P = 25e6
V_ht = 38.1e3
V_lt = 3.81e3
R_l = 0.6
P_ht_base = 75e6
V_ht_base = 66e3

#Calculations
#Low-tension side base ratings
print('Low-tension side')
P_lt_base = P_ht_base
V_lt_base = (V_lt/(V_ht*math.sqrt(3)))*V_ht_base
print(" Base for low tension side is %.0f MVA,%.2f kV" %(P_lt_base/1e6,V_lt_base/1e3))
Z_lt_base = (V_lt_base)**2/P_lt_base
R_lt_l_base = R_l / Z_lt_base
print(" Base impedance for the low-tension side = %.2f ohm" %Z_lt_base)
print(" Per unit impedance of load on the low-tension side = %.2f per unit " %R_lt_l_base)

#Results
print('High-tension side')
R_l_ht = R_l * ((V_ht*math.sqrt(3))/V_lt)**2
Z_ht_base = (V_ht_base)**2 / P_ht_base
R_ht_l_base = R_l_ht / Z_ht_base
print(" Base impedance for the high-tension side = %.2f ohm" %Z_ht_base)
print(" Per unit impedance of load on the high-tension side = %.2f per unit" %R_ht_l_base)
Low-tension side
 Base for low tension side is 75 MVA,3.81 kV
 Base impedance for the low-tension side = 0.19 ohm
 Per unit impedance of load on the low-tension side = 3.10 per unit 
High-tension side
 Base impedance for the high-tension side = 58.08 ohm
 Per unit impedance of load on the high-tension side = 3.10 per unit

Example 6.7 Page No 152

In [18]:
import math
#initialisation of variables
z = 0.121
P = 400e6
V_ht = 220e3
V_lt = 22e3
V_ht_base = 230e3
P_ht_base = 100e6

#Calculations
z_pu = z * P / (V_lt)**2

#Results
print(" On its own base the transformer reactance = %.2f per unit" %z_pu)
z_new_pu=(z_pu * (V_ht/P_ht_base)**2 * (P_ht_base/P))
print(" On the chosen base the reactance = %.4f per unit" %z_new_pu)
 On its own base the transformer reactance = 0.10 per unit
 On the chosen base the reactance = 0.0000 per unit

Example 6.7, Page No 154

In [19]:
import math
#initialisation of variables
Z_ps = complex(0.07)
P_ps_base = 15e6
V_ps_base = 66e3

Z_pt = complex(0.09)
P_pt_base = 15e6
V_pt_base = 66e3
Z_st = complex(0.08)
P_st_base = 10e6
V_st_base = 13.2e3

#Calculations
Z_st_new = Z_st * P_ps_base / P_st_base
Z_p = (Z_ps + Z_pt - Z_st_new)/2
Z_s = (Z_ps - Z_pt + Z_st_new)/2
Z_t = (-Z_ps + Z_pt + Z_st_new)/2

#Results
print( "Z_p in per unit = {0:.5f}i".format(Z_p.real))
print( "Z_s in per unit = {0:.5f}i".format(Z_s.real))
print( "Z_t in per unit = {0:.5f}i".format(Z_t.real))
Z_p in per unit = 0.02000i
Z_s in per unit = 0.05000i
Z_t in per unit = 0.07000i

Example 6.9 Page No 155

In [20]:
import math
#initialisation of variables
Z_ps = complex(0.07)
P_ps_base = 15e6
V_ps_base = 66e3
P_r_load = 5e6
V_r_load = 2.3e3
P_m = 7.5e6
V_m = 13.2e3
R_l = 1
X_11 = 0.20

Z_pt = complex(0.09)
P_pt_base = 15e6
V_pt_base = 66e3

Z_st = complex(0.08)
P_st_base = 10e6
V_st_base = 13.2e3

#Calculations
Z_st_new = Z_st * P_ps_base / P_st_base
Z_p = (Z_ps + Z_pt - Z_st_new)/2
Z_s = (Z_ps - Z_pt + Z_st_new)/2
Z_t = (-Z_ps + Z_pt + Z_st_new)/2

R_pu = R_l * P_ps_base / P_r_load
X11_pu = X_11 *  P_ps_base / P_m

#Results
print(" On a base of 15MVA,2.3kV load resistance = %.1f per unit" %R_pu)
print(" Reactance of the motor at a base of 15MVA,13.2kV = %.2f per unit" %X11_pu)

#Reactance diagram is drawn in the xcos file
 On a base of 15MVA,2.3kV load resistance = 3.0 per unit
 Reactance of the motor at a base of 15MVA,13.2kV = 0.40 per unit

Example 6.10 Page No 159

In [21]:
import math
#initialisation of variables

def pucalc(pu_Z_given,base_kV_given,base_kV_new,base_kVA_new,base_kVA_given):
    X11=(pu_Z_given * (base_kV_given/base_kV_new)**2 * (base_kVA_new/base_kVA_given))
    return X11


P_g = 300e6
V_g = 20e3
X11_g = 0.20
l = 64
V_m = 13.2e3
P_m1 = 200e6
P_m2 = 100e6
X11_m = 0.20
T1_P = 350e6
T1_vht = 230e3
T1_vlt = 20e3
x_T1 = 0.10
T2_1_P = 100e6
T2_1_vht = 127e3
T2_1_vlt = 13.2e3
x_T2 = 0.10
x_line = 0.5		#ohm per km
V_base = V_g
P_base = P_g

#Calculations
T2_P = 3*T2_1_P
T2_vht = math.sqrt(3)*T2_1_vht
T2_vlt = T2_1_vlt
V_base_line = (T1_vht/T1_vlt)*V_base
V_base_m = V_base_line * (T2_vlt/T2_vht)
x_T1_base = x_T1 * (P_base/T1_P)
x_T2_base = x_T2 * (T2_vlt/V_base_m)
z_line_base = (V_base_line)**2/P_base
x_line_pu = x_line * l / z_line_base
X11_m1_pu = pucalc(X11_m,V_m,V_base_m,P_base,P_m1)
X11_m2_pu = pucalc(X11_m,V_m,V_base_m,P_base,P_m2)

#Results
#Reactance diagram is given in xcos file
print('Base Voltages in different parts of circuit')
print(" Generator voltage = %.0f kV" %(V_g/1e3))
print(" Line voltage = %.0f kV" %(V_base_line/1e3))
print(" Motor voltage = %.1f kV " %(V_base_m/1e3))

print('Base reactance in different parts of circuit')
print(" Transformer 1 reactance = %.4f per unit" %x_T1_base)
print(" Transformer 2 reactance = %.4f per unit" %x_T2_base)
print(" Line reactance = %.4f per unit" %x_line_pu)
print(" Motor 1 reactance = %.4f per unit" %X11_m1_pu)
print(" Motor 2 reactance = %.4f per unit" %X11_m2_pu)
#impedance diagram is shown in the xcos file
Base Voltages in different parts of circuit
 Generator voltage = 20 kV
 Line voltage = 230 kV
 Motor voltage = 13.8 kV 
Base reactance in different parts of circuit
 Transformer 1 reactance = 0.0857 per unit
 Transformer 2 reactance = 0.0956 per unit
 Line reactance = 0.1815 per unit
 Motor 1 reactance = 0.2744 per unit
 Motor 2 reactance = 0.5488 per unit

Example 6.11 Page No 160

In [22]:
import math
#initialisation of variables
P_g = 300e6
V_g = 20e3
X11_g = 0.20
l = 64
V_m = 13.2e3
P_m1 = 120e6
P_m2 = 60e6
X11_m = 0.20
T1_P = 350e6
T1_vht = 230e3
T1_vlt = 20e3
x_T1 = 0.10
T2_1_P = 100e6
T2_1_vht = 127e3
T2_1_vlt = 13.2e3
x_T2 = 0.10
x_line = 0.5#onhm per km
V_base = V_g
P_base = P_g

#Calculations
T2_P = 3*T2_1_P
T2_vht = math.sqrt(3)*T2_1_vht
T2_vlt = T2_1_vlt
V_base_line = (T1_vht/T1_vlt)*V_base
V_base_m = V_base_line * (T2_vlt/T2_vht)
x_T1_base = x_T1 * (P_base/T1_P)
x_T2_base = x_T2 * (T2_vlt/V_base_m)
z_line_base = (V_base_line)**2/P_base
x_line_pu = x_line * l / z_line_base
P = P_m1 + P_m2
P_pu = P / P_base
V = V_m / V_base_m
I = P_pu / V
Vg = V + I * (complex(x_T1_base) + complex(x_T2_base) + complex(x_line_pu))
V_terminal = abs(Vg) * V_g

#Results
print(" The generator terminal voltage = %.2f kV" %(V_terminal / 1e3))
 The generator terminal voltage = 23.68 kV