In [1]:

```
import math
# Variables
SL = 700.; #Load in kVA
pf1 = 65./100; #Power Factor
PL = SL*pf1; #Real Power
#From the Table of Power Factor Correction
CR = 0.74; #Co-relation factor
CS = PL*CR; #Capacitor Size
CSr = 360.; #Next Higher standard Capacitor Size
# Calculations
CRn = CSr/PL; #New Co-Relation Factor
#From the table by linear interpolation
pfr = 93.; #In Percentage
pfn = pfr+(172./320);
# Results
print 'a) The Correction Factor is %g'%(CR)
print 'b) The Capacitor Size Required is %g kVAr'%(CS)
print 'c) Resulting power factor if the next higher standard capacitor size is used is %g percent'%(pfn)
```

In [2]:

```
import math
# Variables
Vll = 4.16; #Line to Line Voltage in kV
Pr = (500*0.7457); #Rating of motor in kW
pf1 = 0.75; #Initial Power Factor
pfn = 0.9; #Improved Power Factor
eff = 0.88; #Efficiency
P = Pr/eff; #Input Power of Induction Motor
# Calculations
Q1 = P*math.degrees(math.atan(math.acos(pf1))); #Reactive Power
Q2 = P*math.degrees(math.atan(math.acos(pfn))); #REactive power of motor after power factor improvement
f = 60.; #Frequency of supply
w = 2.*math.pi*f; #Angular Frequency
Qc = Q1-Q2; #Reactive Power of Capacitor
Il = Qc/(math.sqrt(3)*Vll);
#Capacitor Connectd in Delta
Ic1 = Il/(math.sqrt(3));
Xc1 = Vll*1000/Ic1; #Reacmath.tance of each capacitor
C1 = (10**6)/(w*Xc1); #Capacimath.tance in Micro Farad
#Capacitor Connected in Wye
Ic2 = Il;
Xc2 = Vll*1000/(math.sqrt(3)*Ic2); #Reacmath.tance of each capacitor
C2 = (10**6)/(w*Xc2); #Capacimath.tance in Micro Farad
# Results
print 'a) Rating of Capacitor Bank is %g kVAr'%(Qc)
print 'b) The Value of Capacimath.tance if there are connected in delta is %g micro F'%(C1)
print 'c) The Value of Capacimath.tance if there are connected in wye is %g micro F'%(C2)
```

In [3]:

```
import math
# Variables
V = 2.4; #Voltage in kV
I = 200; #Load Current
P = 360; #Real Load in kW
S1 = V*I; #Total Load in kVA
pf1 = P/S1; #Power Factor
Q1 = S1*math.sin(math.radians(math.acos(pf1))); #Reactive Load
# Calculations
Qc = 300; #Capacitor Size
Q2 = Q1-Qc; #The New Reactive Load
pf2 = P/math.sqrt((P**2)+((Q1-Qc)**2)); #Improved Power Factor
# Results
print 'a) The Uncorrected power factor and reactive load is %g and %g kVAr'%(pf1,Q1)
print 'b) The New Corrected factor after the introduction of capacitor unit is %g'%(pf2)
```

In [4]:

```
import math
# Variables
S1 = 7800.; #Peak Load in kVA
T = 3*2000.; #Total Rating of the Transformer
pf1 = 0.89; #Load Power Factor
TC = 120./100; #Thermal Capability
Qc = 1000.; #Size of capacitor
# Calculations
P = S1*pf1; #Real Load
Q1 = S1*math.sin(math.radians(math.acos(pf1))); #Reactive Load
Q2 = Q1-Qc; #The New Reactive Load
pf2 = P/math.sqrt((P**2)+((Q1-Qc)**2)); #Improved Power Factor
S2 = P/pf2; #Corrected Apprarent power
ST = T*TC; #Transformer Capabilty
pf3 = P/ST; #New Corrected Power factor required
Q2new = P*math.degrees(math.atan(math.acos(pf3))); #Required Reactive Power
Qcadd = Q2-Q2new; #Additional Rating of the Capacitor
# Results
print 'a) Since the Apparent Power%g kVAr is more than Transformer Capability %g kVAr),\
Hence Additional Capacitors are required'%(S2,ST)
print 'b) The Rating of the Addtional capacitor is %g kVAr'%(Qcadd)
```

In [6]:

```
import math
from numpy import array
# Variables
# 1 is Total Loss Reduction due to Capacitors
# 2 is Additional Loss Reduction due to Capacitor
# 3 is Total Demand Reduction due to capacitor
# 4 is Total required capacitor additions
C90 = array([495165,85771,22506007,9810141]); #Characteristics at 90% Power Factor
C98 = array([491738,75343,21172616,4213297]); #Characteristics at 98% Power Factor
#Responsibility Factors
RF90 = 1;
RF98 = 0.9;
SLF = 0.17; #System Loss Factor
FCR = 0.2; #Fixed Charge Rate
DC = 250; #Demand Cost
ACC = 4.75; #Average Capacitor Cost
EC = 0.045; #Energy Cost
Cd = C90-C98; #Difference in Characteristics
# Calculations
TAS = Cd[0]+Cd[1]; #Total Additional Kilowatt Savings
ASDR1 = Cd[0]*RF90*DC*FCR;
ASDR2 = Cd[1]*RF98*DC*FCR;
TASDR = ASDR1+ASDR2; #Total Annual Savings due to demand
x = 27; # Cost for Per kVA of the capacity
TASTC = Cd[2]*FCR*x; #Annual Savings due to Transmission Capacity
TASEL = TAS*SLF*EC*8760; #Savings due to energy loss reduction
TACAC = Cd[3]*FCR*ACC; #Annual Cost of Additional Capacitors
Savings = TASEL+TASDR+TASTC; #Total Savings
# Results
print 'a) The Resulting additional savings in kilowatt losses due to power factor improvement at the\
substation buses is %g kW'%(Cd[0])
print 'b) The Resulting assitional savings in kilowatt losses due to the power factor improvement for feeders is %g kW'%(Cd[1])
print 'c) The Additional Kilowatt Savings is %g kW'%(TAS)
print 'd) The Additional savings in the system kilovoltampere capacity is %g kVA'%(Cd[2])
print 'e) The Additional Capacitors required are %g kVAr'%(Cd[3])
print 'f) The Annual Savings in demand reduction due to capacitors applied to distribution substation buses\
is approximately is %g dollars/year'%(TASDR)
print 'g) The Annual Savings due to the additional released transmission capacity is %g dollars/year'%(TASTC)
print 'h) The Total Anuual Savings due to the energy loss reduction is %g dollars/year'%(TASEL)
print 'i) The Total Annual Cost of the additional capacitors is %g dollars/year'%(TACAC)
print 'j) The Total Annual Savings is %g dollars/year'%(Savings)
print 'k) No Since the total net annual savings is not zero'
```