Chapter 02 : Basic Concepts

Example 2.1, Page No 21

In [6]:
import math
import numpy
#initialisation of variables
E1=complex(100,0)
E2=complex(86.6,50)
Z=complex(5)
X=5.0
print(" Value of voltage source one designated as a machine 1 = {0:.5f}+{1:.5f}i v".format(E1.real, E1.imag))
print(" Value of voltage source two designated as a machine 2 = {0:.5f}+{1:.5f}i v".format(E2.real, E2.imag))
print(" Impedance connected  = %.4f ohms " %abs(Z))


#Calculation Of Current
I=(E1-E2)/Z
print(" Current through the impedance = {0:.5f}+{1:.5f}i A".format(I.real, I.imag))

#Calculations
#Calculation Of Power
M1=E1*numpy.conj(I)
print('Machine one Power =  %.2f' %M1)
M2=E2*numpy.conj(I)
print('Machine Two Power =  %.2f' %M2)


#Calculation Of Reactive Power Required By Inductive Reactance
RP=(abs(I))**2*X
print(" Reactive power required by inductive reactance i.e, impedance = %.4f VAR " %RP)
print(" Machine 1 consumes energy at the rate of %.4f W " %abs(M1.real))
print(" Machine 2 generates energy at the rate of %.4f W " %abs(M2.real))
print(" Machine 1 supplies reactive power at the rate of  %.4f VAR " %(M1.imag))
print(" Machine 2 supplies reactive power at the rate of %.4f VAR " %abs(M2.imag))
print(" Reactive power required by inductive reactance i.e, impedance = Sum of reactive power supplied by machine 1 + reactive power supplied by machine 2  = %.4f VAR "%RP)
print('Real Power consumed by impedance is Zero')
print('The real power generated by machine two is transferred to machine one')
 Value of voltage source one designated as a machine 1 = 100.00000+0.00000i v
 Value of voltage source two designated as a machine 2 = 86.60000+50.00000i v
 Impedance connected  = 5.0000 ohms 
 Current through the impedance = 2.68000+-10.00000i A
Machine one Power =  268.00
Machine Two Power =  -267.91
 Reactive power required by inductive reactance i.e, impedance = 535.9120 VAR 
 Machine 1 consumes energy at the rate of 268.0000 W 
 Machine 2 generates energy at the rate of 267.9120 W 
 Machine 1 supplies reactive power at the rate of  1000.0000 VAR 
 Machine 2 supplies reactive power at the rate of 1000.0000 VAR 
 Reactive power required by inductive reactance i.e, impedance = Sum of reactive power supplied by machine 1 + reactive power supplied by machine 2  = 535.9120 VAR 
Real Power consumed by impedance is Zero
The real power generated by machine two is transferred to machine one

Example 2.2 Page No 26

In [7]:
import math
#initialisation of variables
Vab = 173.2*complex(math.cos(0),math.sin(0))
Vbc = 173.2*complex(math.cos(240*math.pi/180),math.sin(240*math.pi/180))
Vca = 173.2*complex(math.cos(120*math.pi/180),math.sin(120*math.pi/180))
print('The given line-line voltages are')


#'/_' this symbol has been used to show angle
print( "Vab= {0:.2f}".format(abs(Vab.real)))
print("Angle = %.2f v " %(math.degrees(math.atan2(Vab.imag,Vab.real))*180/math.pi))
print( "Vbc= {0:.2f}".format(abs(Vbc)))
print("Angle = %.2f v " %(math.degrees(math.atan2(Vbc.imag,Vbc.real))))
print( "Vca= {0:.2f}".format(abs(Vca)))
print("Angle = %.2f v " %(math.degrees(math.atan2(Vca.imag,Vca.real))))

#Calculation of line-neutral voltage
Van = (Vab/math.sqrt(3)/complex(0.866,0.5))
Vbn = (Vbc/math.sqrt(3)/complex(0.866,0.5))
Vcn = (Vca/math.sqrt(3)/complex(0.866,0.5))
print('The line-neutral voltages are')
print( "Van= {0:.2f}".format(abs(Van.real)))
print("Angle = %.2f v " %(math.degrees(math.atan2(Van.imag,Van.real))*180/math.pi))
print( "Vbn= {0:.2f}".format(abs(Vbn)))
print("Angle = %.2f v " %(math.degrees(math.atan2(Vbn.imag,Vbn.real))))
print( "Vcn= {0:.2f}".format(abs(Vcn)))
print("Angle = %.2f v " %(math.degrees(math.atan2(Vcn.imag,Vcn.real))))
ZL = 10*complex(math.cos(20*math.pi/180),math.sin(20*math.pi/180))

print( "Load Impedance ZL = {0:.2f}".format(abs(ZL)))
print("Angle = %.2f v " %(math.degrees(math.atan2(ZL.imag,ZL.real))))

#Calculation of line-neutral current
Ian = Van / ZL
Ibn = Vbn / ZL
Icn = Vcn / ZL

#Results
print('The resulting current in each phase')
print( "Ian= {0:.2f}".format(abs(Ian.real)))
print("Angle = %.2f v " %(math.degrees(math.atan2(Ian.imag,Ian.real))*180/math.pi))
print( "Ibn= {0:.2f}".format(abs(Ibn)))
print("Angle = %.2f v " %(math.degrees(math.atan2(Vbn.imag,Vbn.real))))
print( "Icn= {0:.2f}".format(abs(Icn)))
print("Angle = %.2f v " %(math.degrees(math.atan2(Icn.imag,Icn.real))))
The given line-line voltages are
Vab= 173.20
Angle = 0.00 v 
Vbc= 173.20
Angle = -120.00 v 
Vca= 173.20
Angle = 120.00 v 
The line-neutral voltages are
Van= 86.60
Angle = -1718.92 v 
Vbn= 100.00
Angle = -150.00 v 
Vcn= 100.00
Angle = 90.00 v 
Load Impedance ZL = 10.00
Angle = 20.00 v 
The resulting current in each phase
Ian= 6.43
Angle = -2864.83 v 
Ibn= 10.00
Angle = -150.00 v 
Icn= 10.00
Angle = 70.00 v 

Example 2.3, Page No 28

In [8]:
import math
#initialisation of variables
Vll = 4.4e3
Vln=Vll /math.sqrt(3)
Zline=1.4*complex(math.cos(75* math.pi/180),math.sin(75*math.pi/180))
Van = Vln*complex(math.cos(0),math.sin(0))
Zload = 20*complex(math.cos(30*math.pi/180),math.sin(30*math.pi/180))
print(" Given line-line voltage = %.4f V " %Vll)
print(" Line-neutral voltage = %.4f V " %Vln)


#'/_' this symbol has been used to specify angle

print( "Impedance of the load = {0:.2f}".format(abs(Zload.real)))
print("Angle = %.2f ohms " %(math.degrees(math.atan2(Zload.imag,Zload.real))))
print( "Impedance of the line = {0:.2f}".format(abs(Zline.real)))
print("Angle = %.2f ohms " %(math.degrees(math.atan2(Zline.imag,Zline.real))))

#Calculation of phase current
Ian = Van / Zload
print( "Van = {0:.2f}".format(abs(Van.real)))
print("Angle = %.2f v " %(math.degrees(math.atan2(Van.imag,Van.real))))
print( "Ian =  {0:.2f}".format(abs(Ian.real)))
print("Angle = %.2f v " %(math.degrees(math.atan2(Ian.imag,Ian.real))))

#Calculation of line-neutral voltage at the substation
Vltn = Van + Ian * Zline


#Magnitude of the voltage at the substation bus
magVl = math.sqrt(3) * abs(Vltn)

#Results
print( "The line to neutral voltage at the substation = {0:.2f} ".format(abs(Vltn.real)))
print("Angle = %.2f v " %(math.degrees(math.atan2(Vltn.imag,Vltn.real))))
print(" The magnitude of the voltage at the substation bus = %.4f V" %magVl)
 Given line-line voltage = 4400.0000 V 
 Line-neutral voltage = 2540.3412 V 
Impedance of the load = 17.32
Angle = 30.00 ohms 
Impedance of the line = 0.36
Angle = 75.00 ohms 
Van = 2540.34
Angle = 0.00 v 
Ian =  110.00
Angle = -30.00 v 
The line to neutral voltage at the substation = 2666.08 
Angle = 2.70 v 
 The magnitude of the voltage at the substation bus = 4622.9218 V

Example 2.4, Page No 32

In [9]:
import math
#initialisation of variables
Vll = 4.4e3
Zline = 1.4*complex(math.cos(75*math.pi/180),math.sin(75*math.pi/180))
Zload = 20*complex(math.cos(30*math.pi/180),math.sin(30*math.pi/180))
Vbase = Vll
Ibase = 127
Zbase = (Vbase / math.sqrt(3)) / Ibase 

#Calculations
#Displaying the given values and the base values
print(" Given line-line voltage = %.4f V " %Vll)
print( "Impedance of the load = {0:.2f}".format(abs(Zload.real)))
print("Angle = %.2f ohms " %(math.degrees(math.atan2(Zload.imag,Zload.real))))
print( "Impedance of the line = {0:.2f}".format(abs(Zline.real)))
print("Angle = %.2f ohms " %(math.degrees(math.atan2(Zline.imag,Zline.real))))
print(" Base Voltage = %.4f V  " %Vbase)
print(" Base Current = %.4f V " %Ibase)
print(" Base Impedance = %.4f V " %Zbase)
Van = (Vll/math.sqrt(3))*complex(math.cos(0),math.sin(0))
Ian = Van / Zload
print( "Van = {0:.2f}".format(abs(Van.real)))
print("Angle = %.2f v " %(math.degrees(math.atan2(Van.imag,Van.real))))
print( "Ian =  {0:.2f}".format(abs(Ian.real)))
print("Angle = %.2f v " %(math.degrees(math.atan2(Ian.imag,Ian.real))))

#Calculation of per-unit quantities
V_pu = Vll / Vbase
I_pu = Ian / Ibase
Zline_pu = Zline / Zbase
Zload_pu = Zload / Zbase
Van_pu = V_pu + I_pu * Zline_pu
print('Per-unit Quantities')
print( "Per Unit line-line voltage = {0:.2f}".format(abs(V_pu.real)))
print("Angle = %.2f  per unit " %(math.degrees(math.atan2(V_pu.imag,V_pu.real))))
print( "Per Unit line-neutral current = {0:.2f}".format(abs(I_pu.real)))
print("Angle = %.2f  per unit " %(math.degrees(math.atan2(I_pu.imag,I_pu.real))))
print( "Per Unit line-neutral voltage = {0:.2f}".format(abs(V_pu.real)))
print("Angle = %.2f  per unit " %(math.degrees(math.atan2(Van_pu.imag,Van_pu.real))))
print( "Per Unit line impedance = {0:.2f}".format(abs(Zline_pu.real)))
print("Angle = %.2f  per unit " %(math.degrees(math.atan2(Zline_pu.imag,Zline_pu.real))))
print( "Per Unit load impedance = {0:.2f}".format(abs(Zload_pu.real)))
print("Angle = %.2f  per unit " %(math.degrees(math.atan2(Zload_pu.imag,Zload_pu.real))))


#Calculation of line-neutral and line-line voltage
Vln = abs(Van_pu) * Vll / math.sqrt(3)
VLL = abs(Van_pu) * Vll

#Results
print( "The line to neutral voltage at the substation , VLN = {0:.2f}".format(abs(Vln.real)))
print("Angle = %.2f V " %(math.degrees(math.atan2(Vln.imag,Vln.real))))
print(" The magnitude of the voltage at the substation bus , VLL= %.4f V" %VLL)
 Given line-line voltage = 4400.0000 V 
Impedance of the load = 17.32
Angle = 30.00 ohms 
Impedance of the line = 0.36
Angle = 75.00 ohms 
 Base Voltage = 4400.0000 V  
 Base Current = 127.0000 V 
 Base Impedance = 20.0027 V 
Van = 2540.34
Angle = 0.00 v 
Ian =  110.00
Angle = -30.00 v 
Per-unit Quantities
Per Unit line-line voltage = 1.00
Angle = 0.00  per unit 
Per Unit line-neutral current = 0.87
Angle = -30.00  per unit 
Per Unit line-neutral voltage = 1.00
Angle = 2.70  per unit 
Per Unit line impedance = 0.02
Angle = 75.00  per unit 
Per Unit load impedance = 0.87
Angle = 30.00  per unit 
The line to neutral voltage at the substation , VLN = 2669.05
Angle = 0.00 V 
 The magnitude of the voltage at the substation bus , VLL= 4622.9218 V

Example 2.5 Page No 34

In [10]:
import math
#initialisation of variables

pu_Z_given = 0.25
base_kV_given = 18
base_kV_new = 20.0
base_kVA_new = 100.0
base_kVA_given = 500.0

#Calculations
X11=(pu_Z_given * (base_kV_given/base_kV_new)**2 * (base_kVA_new/base_kVA_given))

#Results
print('Per-Unit Znew = per-unit Zgiven * (base kVgiven/base kVnew)**2 * (base kVAnew/base kVAgiven)')
print(' = 0.25 * (18/20)**2 * (100/500)')
print(" Per-Unit Znew = %.4f per unit" %X11)
Per-Unit Znew = per-unit Zgiven * (base kVgiven/base kVnew)**2 * (base kVAnew/base kVAgiven)
 = 0.25 * (18/20)**2 * (100/500)
 Per-Unit Znew = 0.0405 per unit