In [1]:

```
#Variable declaration
V = 6600.0 #Alternator Voltage(V)
P = 2000.0*10**3 #Rating of alternator(W)
PF = 0.8 #Power factor of alternator
X = 12.5 #Alternator reactance(%)
I = 200.0 #Current protection(A)
per = 10.0 #Percentage of winding unprotected(%)
#Calculation
I_fl = P/(3**0.5*V*PF) #Full load current of alternator(A)
x = X*V/(3**0.5*100*I_fl) #Reactance per phase of alternator(ohm)
x_per = per/100*x #Reactance of 10% of the winding(ohm)
NA = V/(3**0.5*per) #Voltage induced in winding(V)
r = ((NA/I)**2-x_per**2)**0.5 #Neutral earthing reactance(ohm)
#Result
print('Neutral earthing reactance, r = %.2f ohm' %r)
```

In [1]:

```
#Variable declaration
MVA = 20.0 #Generator rating(MVA)
V = 11.0*10**3 #Generator voltage(V)
ratio_CT = 1200.0/5 #Ratio of current transformer
I_min_op = 0.75 #Minimum operating current of relay(A)
R = 6.0 #Neutral point earthing resistance(ohm)
#Calculation
I_max_fault = ratio_CT*I_min_op #Maximum fault current to operate relay(A)
x = I_max_fault*3**0.5*100*R/V #Unprotected portion for R = 6 ohm(%)
R_1 = 3.0 #Neutral point earthing resistance(ohm)
x_1 = I_max_fault*3**0.5*100*R_1/V #Unprotected portion for R = 3 ohm(%)
R_3 = 12.0 #Neutral point earthing resistance(ohm)
x_3 = I_max_fault*3**0.5*100*R_3/V #Unprotected portion for R = 12 ohm(%)
#Result
print('Unprotected portion of each phase of the stator winding against earth fault, x = %.f percent' %x)
print('Effect of varying neutral earthing resistance keeping relay operating current the same')
print(' (i) R = 3 ohms')
print(' Unprotected portion = %.1f percent' %x_1)
print(' Protected portion = %.1f percent' %(100-x_1))
print(' (ii) R = 6 ohms')
print(' Unprotected portion = %.f percent' %x)
print(' Protected portion = %.f percent' %(100-x))
print(' (iii) R = 12 ohms')
print(' Unprotected portion = %.f percent' %x_3)
print(' Protected portion = %.f percent' %(100-x_3))
```

In [1]:

```
#Variable declaration
kVA = 5000.0 #Alternator rating(kVA)
V = 6600.0 #Alternator voltage(V)
X = 2.0 #Synchronous reactance per phase(ohm)
R = 0.5 #Resistance(ohm)
ofb = 30.0 #Out-of-balance current(%)
R_n = 6.5 #Resistance of resistor earthed to star point(ohm)
#Calculation
I_fl = kVA*1000/(3**0.5*V) #Full load current(A)
I_ofb = ofb/100*I_fl #Out-of-balance current(A)
x = R_n/((V/(3**0.5*100*I_ofb))-(R/100)) #Portion of winding unprotected(%)
#Result
print('Portion of alternator winding unprotected, x = %.1f percent' %x)
```

In [1]:

```
#Variable declaration
I_min = 0.15 #Minimum pick up current of relay(A)
slope = 12.0 #Slope(%)
CT_ratio = 400.0/5 #CT ratio
I_1 = 360.0 #Current(A)
I_2 = 300.0 #Current(A)
#Calculation
i_1 = I_1/CT_ratio #Current(A)
i_2 = I_2/CT_ratio #Current(A)
percentage = (i_1-i_2)/((i_1+i_2)/2)*100 #Percentage(%)
#Result
if(percentage>slope):
print('Relay would trip the circuit breaker, since the point lie on +ve torque regime')
else:
print('Relay would not trip the circuit breaker, since the point do not lie on +ve torque regime')
```

In [1]:

```
#Variable declaration
MVA = 50.0 #Alternator rating(MVA)
V = 33.0*10**3 #Alternator voltage(V)
CT_ratio = 2000.0/5 #CT ratio
R = 7.5 #Resistor earthed generator neutral(ohm)
I = 0.5 #Current above which pick up current(A)
#Calculation
I_min = CT_ratio*I #Minimum current required to operate relay(A)
x = I_min*R/(V/3**0.5)*100 #Winding unprotected during normal operation(%)
#Result
print('Winding of each phase unprotected against earth when machine operates at nominal voltage, x = %.2f percent' %x)
```

In [1]:

```
#Variable declaration
MVA = 50.0 #Alternator rating(MVA)
kV = 11.0 #Alternator voltage(kV)
X = 2.0 #Synchronous reactance per phase(ohm)
R = 0.7 #Resistance per phase(ohm)
R_n = 5.0 #Resistance through which alternator is earthed(ohm)
ofb = 25.0 #Out-of-balance current(%)
#Calculation
I_fl = MVA*1000/(3**0.5*kV) #Full load current(A)
I_ofb = ofb/100*I_fl #Out-of-balance current(A)
x = R_n/((kV*1000/(3**0.5*100*I_ofb))-(R/100)) #Portion of winding unprotected(%)
#Result
print('Portion of winding unprotected, x = %.f percent' %x)
```

In [1]:

```
#Variable declaration
MVA = 5.0 #Alternator rating(MVA)
kV = 11.0 #Alternator voltage(kV)
X = 2.0 #Reactance per phase(ohm)
ofb = 35.0 #Out-of-balance current(%)
R_n = 5.0 #Resistance through which star point is earthed(ohm)
#Calculation
I_fl = MVA*1000/(3**0.5*kV) #Full load current(A)
I_ofb = ofb/100*I_fl #Out-of-balance current(A)
x = I_ofb*R_n*100/(kV*1000/3**0.5) #Portion of winding unprotected(%)
protected = 100.0-x #Winding that is protected against earth faults(%)
#Result
print('Percentage of winding that is protected against earth faults = %.2f percent' %protected)
```

In [1]:

```
#Variable declaration
kV = 11.0 #Alternator voltage(kV)
P = 100.0 #Alternator maximum rating(MW)
PF = 0.8 #Power factor
X = 0.1 #Reactance of alternator(pu)
i = 500.0 #Current(A)
per = 10.0 #Windings unprotected(%)
#Calculation
I = P*1000/(3**0.5*kV*PF) #Rated current of alternator(A)
a = i/I #Relay setting
I_n = a*I*100/per #Current through neutral(A)
R = kV*1000/(3**0.5*I_n) #Magnitude of neutral earthing resistance(ohm)
#Result
print('Magnitude of neutral earthing resistance, R = %.2f ohm' %R)
print('\nNOTE: ERROR: Unit of resistance is not mentioned in textbook solution')
```