In [1]:

```
#Variable declaration
rating = 1000.0 #Rating of alternator(kW)
load = 1600.0 #Total load(kW)
X_fl = 100.0 #Full load speed regulation of alernator X(%)
Y_fl = 104.0 #Full load speed regulation of alernator Y(%)
X_nl = 100.0 #No load speed regulation of alernator X(%)
Y_nl = 105.0 #No load speed regulation of alernator Y(%)
#Calculation
h = 400.0/450.0 #Point obtained from graph in textbook directly
PB = (Y_nl-X_nl)-h
PR = rating/(Y_nl-X_nl)*PB #Load shared by machine X(kW)
QQ = (Y_fl-X_fl)-h
RQ = rating/(Y_fl-X_fl)*QQ #Load shared by machine Y(kW)
load_cease = rating/(Y_nl-X_nl) #Y cease supply load(kW)
#Result
print('Load shared by machine X, PR = %.f kW' %PR)
print('Load shared by machine Y, RQ = %.f kW' %RQ)
print('Load at which machine Y ceases to supply any portion of load = %.f kW' %load_cease)
```

In [1]:

```
import math
#Variable declaration
kVA = 5000.0 #Rating of alternator(kVA)
N = 1500.0 #Speed(rpm)
V = 6600.0 #Voltage(V)
f = 50.0 #Frequency(Hz)
PF = 0.8 #Lagging power factor
x = 0.15 #Short circuit reactance
#Calculation
E = V/3**0.5 #Phase voltage(V)
I = kVA*1000/(3**0.5*V) #Full load current of alternator(A)
V_drop = E*x #Synchronous reactance drop(V)
X = V_drop/I #Synchronous reactance per phase(ohm)
P = 120*f/N #Number of poles
n = N/60 #Speed(rps)
phi = math.acos(PF)*180/math.pi #Φ(°)
#Case(a)
theta_a = 2.0 #For a 4 pole m/c. 1 mech degree = 2 elect degree
E_s_a = E*math.sin(theta_a*math.pi/180) #Synchronizing voltage(V)
I_s_a = E_s_a/X #Synchronizing current(A)
P_s_a = E*I_s_a #Synchronizing power per phase(W)
P_s_a_total = 3.0*P_s_a #Total synchronizing power(W)
P_s_a_total_kw = P_s_a_total/1000.0 #Total synchronizing power(kW)
T_s_a = P_s_a_total/(2*math.pi*n) #Synchronizing torque(N-m)
#Case(b)
sin_phi = math.sin(phi*math.pi/180)
OB = ((E*PF)**2+(E*sin_phi+V_drop)**2)**0.5 #Voltage(V)
E_b = OB #Voltage(V)
alpha_phi = math.atan((E*sin_phi+V_drop)/(E*PF))*180/math.pi #α+Φ(°)
alpha = alpha_phi-phi #α(°)
E_s_b = 2.0*E_b*math.sin(2.0/2*math.pi/180) #Synchronizing voltage(V)
I_s_b = E_s_b/X #Synchronizing current(A)
P_s_b = E*I_s_b*math.cos((alpha+1.0)*math.pi/180) #Synchronizing power per phase(W)
P_s_b_total = 3.0*P_s_b #Total synchronizing power(W)
P_s_b_total_kw = P_s_b_total/1000.0 #Total synchronizing power(kW)
T_s_b = P_s_b_total/(2*math.pi*n) #Synchronizing torque(N-m)
#Result
print('Case(a): Synchronizing power for no-load, P_s = %.1f kW' %P_s_a_total_kw)
print(' Synchronizing torque for no-load, T_s = %.f N-m' %T_s_a)
print('Case(b): Synchronizing power at full-load, P_s = %.1f kW' %P_s_b_total_kw)
print(' Synchronizing torque at full-load, T_s = %.f N-m' %T_s_b)
print('\nNOTE: ERROR: Calculation mistakes in textbook')
```

In [1]:

```
#Variable declaration
V = 6600.0 #Voltage(V)
R = 0.045 #Resistance(ohm)
X = 0.45 #Reactance(ohm)
Load = 10000.0*10**3 #Total load(W)
PF = 0.8 #Lagging power factor
I_a = 437.5 #Armature current(A)
#Calculation
I = Load/(3**0.5*V*PF) #Load current(A)
I_working = PF*I #Working component of current(A)
I_watless = (1-PF**2)**0.5*I #Watless component of current(A)
I_second = (I_a**2+I_watless**2)**0.5 #Load current supplied by second alternator(A)
PF_second = I_a/I_second #Lagging power factor of second alternator
V_ph = V/3**0.5 #Terminal voltage per phase(V)
I_R = I_second*R #Voltage drop due to resistance(V)
I_X = I_second*X #Voltage drop due to reactance(V)
sin_phi_second = (1-PF_second**2)**0.5
E = ((V_ph+I_R*PF_second+I_X*sin_phi_second)**2+(I_X*PF_second-I_R*sin_phi_second)**2)**0.5 #EMF of the alternator(V/phase)
E_ll = 3**0.5*E #Line-to-line EMF of the alternator(V)
#Result
print('Armature current of other alternator = %.1f A' %I_second)
print('e.m.f of other alternator = %.f V (line-to-line)' %E_ll)
print('Power factor of other alternator = %.3f (lagging)' %PF_second)
```

In [1]:

```
#Variable declaration
X = 10.0 #Reactance(ohm)
I_a = 220.0 #Armature current(A)
PF = 1.0 #Unity power factor
V = 11000.0 #Phase voltage(V)
emf_raised = 0.2 #EMF rasied by 20%
#Calculation
I_X = I_a*X #Reactance drop(V)
E_0 = (V**2+I_X**2)**0.5 #EMF(V)
E_00 = (1+emf_raised)*E_0 #New value of induced emf(V)
U = ((E_00**2-I_X**2)**0.5-V)/X #Current(A)
I_1 = (I_a**2+U**2)**0.5 #Current(A)
PF_1 = I_a/I_1 #Lagging power factor
I_X_2 = (E_00**2+V**2)**0.5 #Reactance drop(V)
I_2 = I_X_2/X #Current corresponding to this drop(A)
PF_2 = E_00/I_X_2 #Leading power factor
P_max = V*I_2*PF_2/1000 #Maximum power output(kW)
#Result
print('New value of machine current = %.1f A' %I_1)
print('New vaue of power factor, p.f = %.4f (lagging)' %PF_1)
print('Power output at which alternator break from synchronism = %.f kW' %P_max)
print('Current corresponding to maximum load = %.f A' %I_2)
print('Power factor corresponding to maximum load = %.4f (leading)' %PF_2)
print('\nNOTE: ERROR: Calculation mistakes in the textbook solution')
```

In [1]:

```
import math
#Variable declaration
V = 10000.0 #Voltage(V)
rating = 10000.0 #Full load rating(kW)
V_drop_per = 0.2 #Voltage drop of 20% for 10000 kW
#Calculation
V_drop = V_drop_per*rating #Voltage drop(V)
sin_theta_2 = (V_drop/2)/V #Sin(θ/2)
theta_2 = math.asin(sin_theta_2)*180/math.pi #θ/2(°)
theta = 2.0*theta_2 #Phase angle between busbar sections, θ(°)
#Result
print('Phase angle between busbar sections, θ = %.2f° ' %theta)
print('\nNOTE: ERROR: Calculation mistakes in the textbook solution')
```

In [1]:

```
import math
import cmath
#Variable declaration
load_1 = 20000.0 #Total load(kW)
V = 11000.0 #Voltage(V)
PF_1 = 1.0 #Unity power factor
load_2 = 8000.0 #Load supplied(kW)
PF_2 = 0.8 #Lagging power factor
R = 0.5 #Resistance(ohm/phase)
X = 0.8 #Reactance(ohm/phase)
#Calculation
I_1 = load_1*1000/(3**0.5*V*PF_1) #Load current(A)
I_2 = load_2*1000/(3**0.5*V*PF_2)*cmath.exp(1j*-math.acos(PF_2)) #Current supplied by local generators(A)
I_3 = I_1-I_2 #Current through interconnector(A)
angle_I_3 = cmath.phase(I_3)*180/math.pi #Current through interconnector leads reference phasor by angle(°)
V_drop = (R+1j*X)*I_3 #Voltage drop across interconnector(V)
V_ph = V/3**0.5 #Phase voltage(V)
V_S = V_ph+V_drop #Sending end voltage(V/phase)
V_S_ll = 3**0.5*V_S #Sending end voltage(V)
angle_V_S_ll = cmath.phase(V_S_ll)*180/math.pi #Angle of sending end voltage(°)
PF_S = math.cos((angle_I_3-angle_V_S_ll)*math.pi/180) #Power factor at sending station
#Result
print('Voltage at this latter station = %.f∠%.2f° V (line-to-line)' %(abs(V_S_ll),angle_V_S_ll))
print('Power factor at this latter station = %.4f (leading)' %PF_S)
```

In [1]:

```
import math
import cmath
#Variable declaration
V = 33000.0 #Voltage(V)
R = 0.7 #Resistance(ohm/phase)
X = 3.5 #Reactance(ohm/phase)
load_1 = 60.0 #Load on generator at station X(MW)
PF_1 = 0.8 #Lagging power factor
load_2 = 40.0 #Local load taken by consumer(MW)
PF_2 = 0.707 #Lagging power factor
#Calculation
V_ph = V/3**0.5 #Phase voltage(V)
I_1 = load_1*10**6/(3**0.5*V*PF_1)*cmath.exp(1j*-math.acos(PF_1)) #Load current on generator at X(A)
I_2 = load_2*10**6/(3**0.5*V*PF_2)*cmath.exp(1j*-math.acos(PF_2)) #Current due to local load(A)
I_3 = I_1-I_2 #Current through interconnector(A)
angle_I_3 = cmath.phase(I_3)*180/math.pi #Current through interconnector leads reference phasor by angle(°)
V_drop = (R+1j*X)*I_3 #Voltage drop across interconnector(V)
V_Y = V_ph-V_drop #Voltage at Y(V)
angle_V_Y = cmath.phase(V_Y)*180/math.pi #Angle of voltage at Y(°)
phase_diff = angle_I_3-angle_V_Y #Phase difference b/w Y_Y and I_3(°)
PF_Y = math.cos(phase_diff*math.pi/180) #Power factor of current received by Y
P_Y = 3*abs(V_Y*I_3)*PF_Y/1000.0 #Power received by station Y(kW)
phase_XY = abs(angle_V_Y) #Phase angle b/w voltages of X & Y(°)
#Result
print('Load received from station X to station Y = %.f kW' %P_Y)
print('Power factor of load received by Y = %.4f (lagging)' %PF_Y)
print('Phase difference between voltage of X & Y = %.2f° (lagging)' %phase_XY)
print('\nNOTE: Changes in the obtained answer from that of textbook is due to more precision here')
```

In [1]:

```
import math
import cmath
#Variable declaration
V_tie = 11000.0 #Tie line Voltage(V)
Z = (3.5+1j*7.0) #Impedance of tie line(ohm/conductor)
V = 6600.0 #Bus bar voltage(V)
Z_per = (2.5+1j*7.5) #Percentage impedance on 1000kVA rating
kVA = 2500.0 #Load receieved by other(kVA)
#Calculation
V_ph = V/3**0.5 #Phase voltage(V)
I_fl_LV = 100.0*V_tie/V_ph #LV side Full load current of each transformer(A)
R_eq = V_ph*Z_per.real/(100*I_fl_LV) #Equivalent resistance of transformer(ohm/phase)
X_eq = 3.0*R_eq #Equivalent reactance of transformer(ohm/phase)
R_phase = Z.real*(V/V_tie)**2 #Resistance of line per phase(ohm)
X_phase = Z.imag*(V/V_tie)**2 #Resistance of line per phase(ohm)
R_total = 2.0*R_eq+R_phase #Total resistance per phase(ohm)
X_total = 2.0*X_eq+X_phase #Total resistance per phase(ohm)
Z_total = R_total+1j*X_total #Total impedance(ohm/phase)
I = kVA*1000/(3**0.5*V) #Load current(A)
V_drop = I*Z_total #Voltage drop per phase(V)
V_A = V_ph
V_AA = V_A+V_drop #Sending end voltage per phase(V)
V_increase = abs(V_AA)-V_A #Increase in voltage required(V/phase)
percentage_increase = V_increase/V_A*100 #Percentage increase required(%)
phase_diff = cmath.phase(V_AA)*180/math.pi #Angle at which V_A & V_B are displaced(°)
#Result
print('Case(a): Percentage increase in voltage = %.2f percent' %percentage_increase)
print('Case(b): Phase angle difference between the two busbar voltages = %.2f° ' %phase_diff)
print('\nNOTE: ERROR: Several calculation mistakes in the textbook')
```

In [1]:

```
import math
import cmath
#Variable declaration
X = 2.80 #Combined reactance(ohm/phase)
load_1 = 7000.0 #Consumer load at station A(kW)
PF_1 = 0.9 #Lagging power factor
V = 11000.0 #Voltage(V)
load_2 = 10000.0 #Load supplied by station B(kW)
PF_2 = 0.75 #Lagging power factor
#Calculation
V_ph = V/3**0.5 #Phase voltage(V)
I_1 = load_1*10**3/(3**0.5*V*PF_1)*cmath.exp(1j*-math.acos(PF_1)) #Current at A due to local load(A)
I_2 = load_2*10**3/(3**0.5*V*PF_2)*cmath.exp(1j*-math.acos(PF_2)) #Current at B due to local load(A)
IA_X = 0.5*(load_1+load_2)*1000/(3**0.5*V) #Current(A)
Y_1 = 220.443/V_ph #Solved manually referring textbook
X_1 = (1-Y_1**2)**0.5
angle_1 = math.atan(Y_1/X_1)*180/math.pi #Phasor lags by an angle(°)
IA_Y = (6849.09119318-V_ph*X_1)/X #Current(A)
Y_X = IA_Y/IA_X
angle_2 = math.atan(Y_X)*180/math.pi #Angle by which I_A lags behind V_A(°)
PF_A = math.cos(angle_2*math.pi/180) #Power factor of station A
angle_3 = (math.acos(PF_2)*180/math.pi)+angle_1 #Angle by which I_2 lags V_A(°)
I_22 = load_2*10**3/(3**0.5*V*PF_2)*cmath.exp(1j*-angle_3*math.pi/180) #Current(A)
I = 78.7295821622-1j*(IA_Y-177.942225747) #Current(A)
I_B = I_22-I #Current(A)
angle_4 = abs(cmath.phase(I_B)*180/math.pi)-angle_1 #Angle by which I_B lags behind V_B(°)
PF_B = math.cos(angle_4*math.pi/180) #Power factor of station B
#Result
print('Power factor of station A = %.4f (lagging)' %PF_A)
print('Power factor of station B = %.4f (lagging)' %PF_B)
print('Phase angle between two bus bar voltages = %.f° (V_B lagging V_A)' %angle_1)
```

In [1]:

```
import math
import cmath
#Variable declaration
load_1 = 10000.0 #Total balanced load(kW)
V = 33000.0 #Voltage(V)
PF_1 = 0.8 #Lagging power factor
R = 1.6 #Resistance of feeder(ohm/phase)
X = 2.5 #Reactance of feeder(ohm/phase)
load_2 = 4460.0 #Load delivered by feeder(kW)
PF_2 = 0.72 #Lagging power factor
#Calculation
I = load_1*1000/(3**0.5*V*PF_1)*cmath.exp(1j*-math.acos(PF_1)) #Total line current(A)
I_1 = load_2*1000/(3**0.5*V*PF_2)*cmath.exp(1j*-math.acos(PF_2)) #Line current of first feeder(A)
I_2 = I-I_1 #Line current of first feeder(A)
Z_1 = complex(1.6,2.5) #Impedance of first feeder(ohm)
Z_2 = I_1*Z_1/I_2 #Impedance of second feeder(ohm)
#Result
print('Impedance of second feeder, Z_2 = %.2f∠%.1f° ohm' %(abs(Z_2),cmath.phase(Z_2)*180/math.pi))
print('\nNOTE: ERROR: Changes in the obtained answer from that of textbook is due to wrong values of substitution')
```

In [1]:

```
#Variable declaration
P = 9.0 #Load supplied from substation(MW)
V = 33000.0 #Voltage(V)
PF_1 = 1.0 #Unity power factor
Z_A = complex(2.0,8.0) #Impedance of circuit A(ohm)
Z_B = complex(4.0,4.0) #Impedance of circuit B(ohm)
#Calculation
V_ph = V/3**0.5 #Voltage at receiving end per phase(V)
P_A = 1.0/3*P #Power supplied by line A(MW)
P_B = 2.0/3*P #Power supplied by line B(MW)
I_A = P_A*10**6/(3**0.5*V) #Current through line A(A)
I_B = P_B*10**6/(3**0.5*V) #Current through line B(A)
IA_ZA_drop = I_A*Z_A #I_A Z_A drop(V/phase)
IB_ZB_drop = I_B*Z_B #I_B Z_B drop(V/phase)
phase_boost = IB_ZB_drop.real-IA_ZA_drop.real #Voltage in phase boost(V/phase)
quad_boost = IB_ZB_drop.imag-IA_ZA_drop.imag #Voltage in quadrature boost(V/phase)
constant_P = V_ph+IA_ZA_drop #Assumed that sending end voltage at P is kept constant(V/phase)
#Result
print('Voltage in-phase boost = %.2f V/phase' %phase_boost)
print('Voltage in quadrature boost = %.f V/phase' %quad_boost)
```

In [1]:

```
#Variable declaration
cap_A = 15000.0 #Capacity of station A(kW)
cap_B = 10000.0 #Capacity of station B(kW)
cap_C = 2000.0 #Capacity of station C(kW)
speed_reg_A = 2.4/100 #Speed regulation of A
speed_reg_B = 3.2/100 #Speed regulation of B
slip_C = 4.5/100 #Full load slip
local_load_B_a = 10000.0 #Local load on station B(kW)
local_load_A_a = 0 #Local load on station A(kW)
local_load_both = 10000.0 #Local load on both station(kW)
#Calculation
#Case(a)
speed_A = speed_reg_A/cap_A #% of speed drop for A
speed_C = slip_C/cap_C #% of speed drop for C
speed_B = speed_reg_B/cap_B #% of speed drop for B
X = local_load_B_a*speed_B/(speed_A+speed_B+speed_C) #Load on C when local load of B is 10000 kW and A has no load(kW)
#Case(b)
Y = local_load_both*(speed_B-speed_A)/(speed_A+speed_B+speed_C) #Load on C when both station have local loads of 10000 kW(kW)
#Result
print('Case(a): Load on C when local load of B is 10000 kW and A has no load, X = %.f kW' %X)
print('Case(b): Load on C when both station have local loads of 10000 kW, Y = %.f kW' %Y)
```

In [1]:

```
import math
#Variable declaration
l = 20.0 #Length of cable(km)
r = 0.248 #Resistance(ohm/km)
x = 0.50*10**-3 #Inductance(H/m)
V_gen = 6600.0 #Generation voltage(V)
f = 50.0 #Frequency(Hz)
V = 33000.0 #Transmission voltage(V)
rating = 10.0 #Transformer rating(MVA)
loss_cu = 100.0 #Copper loss at full load(kW)
x_tr = 2.5/100 #Transformer reactance
load = 7.5 #Load to be transmitted(MW)
PF = 0.71 #Lagging power factor
#Calculation
R = l*r #Resistance of the cable(ohm)
I_fl = rating*10**6/(3**0.5*V) #Transformer current at full load(A)
R_eq = loss_cu*1000/(3*I_fl**2) #Equivalent resistance per phase of transformer(ohm)
R_total_hv = R+2.0*R_eq #Total resistance per conductor in terms of hv side(ohm)
X = 2.0*math.pi*f*l*x #Reactance of cable per conductor(ohm)
per_X_tr = V/3**0.5*x_tr/I_fl #% reactance of transformer(ohm)
X_total_hv = X+2.0*per_X_tr #Total reactance per conductor in terms of hv side(ohm)
I = load*10**6/(3**0.5*V*PF) #Line current at receiving end(A)
IR = I*R_total_hv #IR drop(V)
IX = I*X_total_hv #IX drop(V)
E_r = V/3**0.5 #Phase voltage at station B(V)
cos_phi_r = PF
sin_phi_r = (1-PF**2)**0.5
E_s = ((E_r*cos_phi_r+IR)**2+(E_r*sin_phi_r+IX)**2)**0.5/1000 #Sending end voltage(kV)
E_s_ll = 3**0.5*E_s #Sending end line voltage(kV)
V_booster = 3**0.5*(E_s-E_r/1000) #Booster voltage between lines(kV)
tan_phi_s = (E_r*sin_phi_r+IX)/(E_r*cos_phi_r+IR) #tanΦ_s
phi_s = math.atan(tan_phi_s)*180/math.pi #Φ_s(°)
cos_phi_s = math.cos(phi_s*math.pi/180) #cosΦ_s
P_s = 3.0*E_s*I*cos_phi_s #Power at sending end(kW)
loss = P_s-load*1000 #Loss(kW)
loss_per = loss/(load*1000)*100 #loss percentage
#Result
print('Loss in the interconnector as a percentage of power received = %.3f percent' %loss_per)
print('Required voltage of the booster = %.3f kV (in terms of H.V)' %V_booster)
print('\nNOTE: Changes in the obtained answer from that of textbook is due to more precision here')
print(' kVA rating of booster is not calculated in textbook and here')
```