0% found this document useful (0 votes)
7 views

Optimal Compensation

This document presents a backward-forward sweep (BFS) based algorithm for optimal placement of shunt capacitors in distribution systems to minimize active power loss and improve voltage stability. The method evaluates various bus locations for capacitor installation, forming a loss matrix to identify optimal sites. The effectiveness of the BFS approach is demonstrated through simulations on a 33-bus distribution network, showing significant reductions in power losses and improved voltage magnitudes compared to other optimization methods.

Uploaded by

Phan Minh Đức
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Optimal Compensation

This document presents a backward-forward sweep (BFS) based algorithm for optimal placement of shunt capacitors in distribution systems to minimize active power loss and improve voltage stability. The method evaluates various bus locations for capacitor installation, forming a loss matrix to identify optimal sites. The effectiveness of the BFS approach is demonstrated through simulations on a 33-bus distribution network, showing significant reductions in power losses and improved voltage magnitudes compared to other optimization methods.

Uploaded by

Phan Minh Đức
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 39

Optimal Capacitor Placement

in Distribution Systems Using


a Backward-Forward Sweep Based Load
Flow Method

Farkhondeh Jabari, Khezr Sanjani and Somayeh Asadi

Abstract Nowadays, the non-optimal placement of the shunt capacitors in dis-


tributed electricity systems may increase the total active power loss and lead to
the voltage instability. Therefore, many researchers have recently focused on opti-
mization of capacitor placement problem in radial and meshed distribution grids
aiming to minimize transmission losses and improve the overall efficiency of the
power delivery process. This chapter aims to present a backward-forward sweep
(BFS) based algorithm for optimal allocation of shunt capacitors in distribution net-
works. The total real power loss of the whole system is minimized as the objective
function. Moreover, the feeder current capacity and the bus voltage magnitude limits
are considered as the optimization constraints. In addition, it is assumed that the sizes
of capacitors are the known scalars. The 1st capacitor is considered to be located
at the 1st bus of the test system. Then, the BFS load flow is run and the objective
function is saved as 1st row and 1st column component of a loss matrix. Secondly,
the 1st capacitor is assumed to be installed at bus 2 and the BFS load flow is run to
obtain objective function as 2nd row and 1st column component of loss matrix. When
all buses are assessed for installation of capacitor 1 and losses are calculated in each
scenario, similar analyses are carried out for the 2nd capacitor bank and the values
of the active power loss are saved as the 2nd column of the loss matrix. The same
strategy is applied to other capacitors. Finally, a loss matrix is formed with number
of rows and columns equal to the number of buses and shunt capacitors, respectively.
The best places for installation of capacitors are determined based on the compo-
nents of the loss matrix. Simulation of BFS based capacitor placement problem

F. Jabari · K. Sanjani
Faculty of Electrical and Computer Engineering, University of Tabriz, Tabriz, Iran
e-mail: [email protected]
K. Sanjani
e-mail: [email protected]
S. Asadi (B)
Department for Management of Science and Technology Development, Ton Duc Thang
University, Ho Chi Minh City, Vietnam
e-mail: [email protected]
Faculty of Applied Sciences, Ton Duc Thang University, Ho Chi Minh City, Vietnam
© Springer Nature Switzerland AG 2020 63
M. Pesaran Hajiabbas and B. Mohammadi-Ivatloo (eds.),
Optimization of Power System Problems, Studies in Systems, Decision and Control 262,
https://doi.org/10.1007/978-3-030-34050-6_3
64 F. Jabari et al.

is conducted on the 33-bus distribution network to demonstrate its robustness and


effectiveness in comparison with other procedures.

Keywords Optimal capacitor placement · Distribution system · Voltage


improvement · Loss minimization · Feeder capacity

Nomenclature

J˙ik+1 The current injected to the load i in iteration (k + 1)


V̇ik The voltage of the node i in iteration k
Ṡ D,i The appearance power consumption of the load i
nl The number of lines
I˙h,i
k+1
The current of the feeder h-i in iteration (k + 1)
Ib The current of the line b
Z h,i The impedance of the feeder h-i
V̇hk+1 The voltage of the bus h in iteration (k + 1)
Ibmax Maximum current of line b
Floss The real power loss of the distribution grid
gi, j The conductance of the line i-j
Vm The voltage magnitude of the node m
θm The voltage angle of the node m
Ṡi The appearance power injected to the bus i
Q̇ C,i The reactive power of the capacitor located at bus i
ṖD,i The real power consumption at bus i
Vimin , Vimax Minimum and maximum values of voltage magnitude for node i
Q̇ D,i The reactive power consumption at bus i

1 Introduction

Recently, optimization of capacitor placement problem in distribution systems has


attracted more attention because of increased electricity demand and voltage drop,
which may lead to load-generation mismatch and uncontrolled islanding of radial
and meshed grids [1]. In [2], Gaussian and Cauchy probability distribution func-
tions based particle swarm optimization (PSO) algorithm are employed for finding
optimum places of capacitor banks, voltage profile improvement and energy loss
reduction considering feeder loading capacity and voltage limits. Non-dominated
sorting genetic algorithm (NSGA-II) is used in [3, 4] to investigate power losses,
voltage stability and total harmonic distortion (THD). A clustering method is intro-
duced in [5] for discrete optimization of capacitor places and sizes to minimize the
sum of energy losses and capacitor costs. It is revealed that the clustering algorithm
Optimal Capacitor Placement in Distribution Systems Using … 65

is computationally friendly and fast in comparison with fuzzy genetic algorithm


[6, 7], direct search method [8], intersect mutation differential evolution strategy
[9], teaching learning-based optimization [10], cuckoo search approach [11], self-
adaptive harmony search algorithm [12] and artificial bee colony [13, 14]. In [15],
cost of energy losses, capacitor installation cost, and voltage penalty factor are con-
sidered as main objectives of optimal capacitor allocation problem. In [16], a flower
pollination algorithm (FPA) is presented for optimal allocating and sizing of capac-
itors in various distribution systems. Firstly, they suggested a set of candidate buses
for installing capacitors using loss sensitivity factor. Secondly, FPA is employed to
find the best scenario. In [17], artificial bee colony and artificial immune system are
integrated for optimal co-placement of distributed generators and shunt capacitors.
Authors of [18] proposed a shark smell optimization algorithm for determining suit-
able capacitor installation places using momentum gradient and rotational movement
search strategies. Enhanced bacterial foraging optimization algorithm [19] is applied
on sub-transmission systems to find the best sites and sizes of capacitors considering
thermal loading of cables under the normal operating condition and different single
line outage contingencies. Bacterial foraging optimization algorithm with loss sen-
sitivity factor and voltage stability index is developed in [20] to find sizes and places
of capacitor banks under all possible demand variations.
As reviewed, different optimization algorithms have been implemented on distri-
bution systems to find good places and optimal sizes of shunt capacitors and improve
voltage stability and reduce system power losses. But, a search method with less cal-
culation time and computational burden, no need to membership function of fuzzy
logic, huge search space of Monte Carlo simulations, cross over and mutation pro-
cesses of genetic algorithm, and initial population of metaheuristic algorithms has not
been proposed by scholars. This chapter aims to present a novel forward-backward
sweep (BFS) based optimal capacitor placement strategy for radial distribution net-
works. In this method, the number and sizes of capacitors are considered as known
parameters. Total active power losses are considered as the objective function. Firstly,
one of the capacitors is selected. Its reactive power generation is added to third (related
to reactive power consumption) column of the bus data matrix. Then, BFS load flow
is solved and total real power losses are calculated as a component of loss matrix in
the 1st raw and 1st column. In loss matrix, a number of rows and columns are equal
to the number of buses and capacitors. Afterward, the 1st capacitor is assumed to be
installed on bus 2. A similar analysis is carried out and energy losses are computed as
2nd row and 1st column of loss matrix. When all buses are evaluated for placement
of the 1st unit, 2nd one is assumed to be located at buses 1 to N, respectively. where
N refers to a number of nodes in the test distribution system. This process is repeated
for all capacitors and loss matrix is formed. Finally, the minimum values of columns
are determined. If the minimum value of column i occurred in the jth row of loss
matrix, bus j will be selected as a good place for installation of the ith unit.
The remainder of the present chapter is organized as follows: The optimal
capacitor placement strategy is formulated in Sect. 2. The illustrative example and
discussions are provided in Sect. 3. Section 4 concludes the chapter.
66 F. Jabari et al.

2 Mathematical modeling of load flow based optimization


problem

2.1 Forward-backward load flow

Figure 1 shows the sample radial distribution grid. As illustrated in this figure, the
current injected to the load i in iteration k+1, J˙ik+1 , can be given by Eq. (1). In which,
V̇ik represents the voltage magnitude of the node i in iteration k. Moreover, Ṡi refers
to the appearance power of the node i. Equation (2) demonstrates the power balance
criterion for each bus i. The appearance power injected to the bus i is equal to the
power consumed by the load i plus the power transmitted from the node i to the
adjacent bus j.
! "∗
Ṡ D,i
J˙ik+1= (1)
V̇ik
#
Ṡi = Ṡ D,i + Ṡ j (2)
j

where,
Ṡ D,i The active and reactive power consumption in bus i
Ṡ j The complex power flowing in node j
It is assumed that the reactive power injected by the capacitor units to the bus i is
the negative reactive load, as expressed by Eq. (3). If the capacitor bank is installed
in bus i, its reactive power, Q̇ C,i , will be modeled as the negative reactive power
consumption in this node. Note that ṖD,i and Q̇ D,i are the active and reactive power
consumptions of the node i, respectively.

Ṡ D,i = ṖD,i + j ( Q̇ D,i − Q̇ C,i ) (3)

In the backward sweep, the current of the branch h-i in iteration k+1, I˙h,i
k+1
, is
calculated as (4).

Fig. 1 A simple radial


distribution network
Optimal Capacitor Placement in Distribution Systems Using … 67
#
I˙h,i
k+1
= J˙ik+1 + I˙jk+1 (4)
j

In the forward sweep, the current of the branch h to i, I˙h,i


k+1
, is used for calculating
the voltage of the node h in iteration k+1, as fulfilled by (5). where, Z h,i is the
impedance of the branch j.

V̇hk+1 = V̇ik+1 − I˙h,i


k+1
× Z h,i (5)

When the convergence criterion (6) is satisfied for all buses, the forward-backward
sweep based power flow algorithm will be finished. The scalar ε is the convergence
factor. If it is not satisfied for at least one bus, the equations (1)–(6) will be performed
in the next iteration.
$ $
$ k+1 $
$V j − V jk $ ≤ ε (6)

2.2 Optimal places for installation of capacitor banks

Equation (7) demonstrates that the minimum total real power loss is considered for
optimization of capacitor placement problem.
nl
# % &
Floss = Min gi, j Vi2 + V j2 − 2Vi V j cos(θi − θ j ) (7)
i, j=1
i%= j

where,
Floss The active power loss of the whole system
gi, j The conductance of the line i-j
θi and θ j The voltage angle of the nodes i and j
nl The number of branches
Subject to:
• Voltage permitted range constraints

Vimin ≤ Vi ≤ Vimax (8)

• Feeder capacity constraint

Ib ≤ Ibmax (9)
68 F. Jabari et al.

In which,
Vimin and Vimax Minimum and maximum voltage magnitude of bus i, respectively
Ib The current of the branch b
max
Ib The maximum current of the branch b

3 Illustrative Example

The backward-forward sweep based strategy is proposed for optimum allocation of


shunt capacitors in radial distribution grids and comprehensively described based
on MATLAB codes. In this research, it is assumed that the number and sizes of
the capacitor banks are known parameters. As obvious from Fig. 2, “Q_cap” refer
to the reactive capacities of the units. The BFS based optimization algorithm finds
the good places for installation of three capacitor banks and minimizes the total active
power losses while satisfying the voltage permitted range constraint and the feeder
current limit as stated by (8) and (9), respectively. According to MATLAB codes, a
33-bus radial distribution system [21] is considered to allocate three capacitor units
with reactive generation capacities of 50, 740, 260 kVAr, respectively. The single
line diagram of IEEE 33-bus radial distribution system is illustrated in Fig. 3. The
bus data matrix is defined as “bdata.not.per.unit”. The first column of this matrix
refers to the number of nodes. Active and reactive power consumptions in each bus
are presented at the second and third columns of the bus data matrix in kW and kVAr,
respectively. Similarly, “ldata.not.per.unit” is the line data matrix of the 33-bus radial
benchmark network. In each row of the branch information matrix, the number of
starting and ending points of each line is determined using the bus numbers. The third
and fourth columns of the line data matrix represent the resistance and reactance of
each branch in Ohm, respectively. Firstly, the capacitor unit 1 is considered to be
installed at bus 1. Then, the backward-forward sweep algorithm is implemented
on the updated bus data matrix. The total active power loss is then calculated and
considered as the 1st row and 1st column of a loss matrix, which is defined as
“Active_loss”. In other words, the loss matrix has 33 rows (number of buses) and 3
columns (number of shunt capacitors). In the second iteration, the capacitor unit 1 is
assumed to be located at bus 2 and the optimal power flow is run. The real power loss
is obtained as the 2nd row and 1st column of the loss matrix. when the 1st capacitor
bank is located at all buses, the 1st column of the loss matrix will be finished.
The similar strategy will be repeated for the 2nd and 3rd units. Finally, the loss
matrix will be formed as Fig. 4. According to this matrix, if the 1st reactive power
bank is installed at bus 33, the total real power loss will be minimum and equal to
172.4784 kW. In the same manner, buses 30 and 32 are good choices for installation
of the 2nd and 3rd units. The voltage before and after installation of capacitors are
Optimal Capacitor Placement in Distribution Systems Using … 69

Fig. 2 MATLAB codes of


forward-backward sweep
based optimal capacitor
placement
70 F. Jabari et al.

Fig. 3 Single line diagram of IEEE 33-bus radial distribution system

depicted in Fig. 5. As expected, the optimal placement of the capacitors using the
forward-backward sweep based search algorithm leads to a significant reduction
in active power losses and improvement in bus voltage magnitude. Moreover, the
number of scenarios in search space of BFS based capacitor allocation method is
reduced to 99 (number of buses × number of capacitors). In other words, the BFS
based optimal capacitor placement strategy is a computationally efficient approach in
achieving a global optimal solution in lower iterations and less calculation time. The
total active power loss in two cases, before and after installation of capacitors, can be
summarized as Table 1. Figure 5 and Table 1 reveal that the BFS search algorithm can
find a global optimal solution vector after solving 99 (number of bus × number of
capacitors) load flow problems.The applicability of the proposed algorithm in finding
the best capacitor places is compared with other recently published methods such as
intersect mutation differential evolution (IMDE) [9], analytical [22], fuzzy genetic
algorithm (FGA) [23], and bacterial foraging optimization algorithm (BFOA) [24].
Table 2 summarizes the optimal scenarios and the total real power losses obtained
from the BFS load flow based capacitor placement approach and the other ones. It is
obvious that the proposed methodology reduces the active power losses, significantly.
Moreover, the minimum value of the bus voltage magnitude is more than that of other
algorithms. In other words, if we consider that n and N respectively refer to the number
of buses and capacitors, BFS based capacitor allocation strategy not only reduces
the number of scenarios from 2n to n×N, but also improves the voltage profile and
decreases the energy losses in comparison with other introduced methods.
Optimal Capacitor Placement in Distribution Systems Using … 71

Fig. 4 Loss matrix obtained


from solving backward
forward sweep algorithm
with 33×3 iterations
(33=number of buses,
3=number of capacitors)
72 F. Jabari et al.

Fig. 5 Voltage profile in two cases: without capacitors (red), with capacitors (best scenario: blue)

Table 1 Comparison
Case study Total real power losses (kW)
between two cases with and
without installation of Without capacitors 253.9667
capacitor units With capacitors (Best scenario) 130.2507

Table 2 Comparison between the proposed approach and the other recently published algorithms
Capacitor 475, 1037 1000 950, 700 350, 820, 277
sizes
(kVAr)
Algorithms IMDE BFS Analytical BFS FGA BFS BFOA BFS
[9] [22] [23] [24]
Total 139.7 125.3 164.6 136.8 139.7 131.5 144.04 123.9
energy 141.3
losses
(kW)
Minimum 0.942 0.943 0.916 (18) 0.928 0.929 0.939 0.936 0.944
voltage (18) (18) (18) (18) (18) (18) (18)
magnitude
in per unit
(Bus
number)
Best places 14, 30 9, 30 33 27 18, 30 8, 28 18, 30, 16, 30,
(Bus 33 32
number)
Optimal Capacitor Placement in Distribution Systems Using … 73

4 Conclusions

This chapter introduced a novel forward-backward sweep based capacitor place-


ment strategy and used a loss matrix to determine the optimum places for
installing the shunt capacitors. In this approach, each capacitor unit is considered
to be located at one of the buses. Then, a backward-forward sweep based load flow
analysis is implemented on test distribution system according to the line and updated
bus data matrices. Total active power loss is calculated and reported as a component
of loss matrix. When all buses are evaluated for installation of one capacitor, a similar
strategy will be repeated for others. In summary, a loss matrix with a number of rows
equals the number of buses and number of columns equals the number of capaci-
tors is formed. Therefore, the optimum scenario for installation of the ith capacitor
is a bus with a minimum value of power losses in the ith column. Robustness and
effectiveness of BFS approach in finding global optimal places for installation of
capacitors are proved using MATLAB codes and simulations on the 33-bus standard
test system.

References

1. Aman, M.M., et al.: Optimum shunt capacitor placement in distribution system—a review and
comparative study. Renew. Sustain. Energy Rev. 30, 429–439 (2014)
2. Lee, C.-S., Ayala, H.V.H., Coelho, L.d.S.: Capacitor placement of distribution systems using
particle swarm optimization approaches. Int. J. Electr. Power Energy Syst. 64, 839–851 (2015)
3. Javadi, M.S., et al.: Shunt capacitor placement in radial distribution networks considering
switching transients decision making approach. Int. J. Electr. Power Energy Syst. 92, 167–180
(2017)
4. Cabral Leite, J., Pérez Abril, I., Santos Azevedo, M.S.: Capacitor and passive filter placement
in distribution systems by nondominated sorting genetic algorithm-II. Electric Power Syst. Res.
143, 482–489 (2017)
5. Vuletić, J., Todorovski, M.: Optimal capacitor placement in radial distribution systems using
clustering based optimization. Int. J. Electr. Power Energy Syst. 62, 229–236 (2014)
6. Das, D.: Optimal placement of capacitors in radial distribution system using a Fuzzy-GA
method. Int. J. Electr. Power Energy Syst. 30(6), 361–367 (2008)
7. Abul’Wafa, A.R.: Optimal capacitor placement for enhancing voltage stability in distribution
systems using analytical algorithm and Fuzzy-Real Coded GA. Int. J. Electr. Power Energy
Syst. 55, 246–252 (2014)
8. Ramalinga Raju, M., Ramachandra Murthy, K.V.S., Ravindra, K.: Direct search algorithm for
capacitive compensation in radial distribution systems. Int. J. Electr. Power Energy Syst. 42(1),
24–30 (2012)
9. Khodabakhshian, A., Andishgar, M.H.: Simultaneous placement and sizing of DGs and shunt
capacitors in distribution systems by using IMDE algorithm. Int. J. Electr. Power Energy Syst.
82, 599–607 (2016)
10. Sultana, S., Roy, P.K.: Optimal capacitor placement in radial distribution systems using teaching
learning based optimization. Int. J. Electr. Power Energy Syst. 54, 387–398 (2014)
11. Arcanjo, D.N., et al.: Cuckoo Search Optimization technique applied to capacitor placement
on distribution system problem. In: 2012 10th IEEE/IAS International Conference on Industry
Applications (2012)
74 F. Jabari et al.

12. Rani, D.S., Subrahmanyam, N., Sydulu, M.: Self adaptive harmony search algorithm for optimal
capacitor placement on radial distribution systems. In: 2013 International Conference on Energy
Efficient Technologies for Sustainability (2013)
13. El-Fergany, A., Abdelaziz, A.: Multi-objective capacitor allocations in distribution networks
using artificial bee colony algorithm. J. Electr. Eng. Technol. 9(2), 441–451 (2014)
14. El-Fergany, A.A., Abdelaziz, A.Y.: Capacitor placement for net saving maximization and sys-
tem stability enhancement in distribution networks using artificial bee colony-based approach.
Int. J. Electr. Power Energy Syst. 54, 235–243 (2014)
15. Azevedo, M.S.S., et al.: Capacitors placement by NSGA-II in distribution systems with non-
linear loads. Int. J. Electr. Power Energy Syst. 82, 281–287 (2016)
16. Vuletić, J., Todorovski, M.: Optimal capacitor placement in distorted distribution networks
with different load models using Penalty Free Genetic Algorithm. Int. J. Electr. Power Energy
Syst. 78, 174–182 (2016)
17. Ng, H., Salama, M., Chikhani, A.: Classification of capacitor allocation techniques. IEEE
Trans. Power Delivery 15(1), 387–392 (2000)
18. Gnanasekaran, N., et al.: Optimal placement of capacitors in radial distribution system using
shark smell optimization algorithm. Ain Shams Eng. J. 7(2), 907–916 (2016)
19. Othman, A.M.: Optimal capacitor placement by Enhanced Bacterial Foraging Optimization
(EBFO) with accurate thermal re-rating of critical cables. Electr. Power Syst. Res. 140, 671–680
(2016)
20. Devabalaji, K.R., Ravi, K., Kothari, D.P.: Optimal location and sizing of capacitor placement
in radial distribution system using Bacterial Foraging Optimization Algorithm. Int. J. Electr.
Power Energy Syst. 71, 383–390 (2015)
21. Venkatesh, B., Ranjan, R., Gooi, H.: Optimal reconfiguration of radial distribution systems to
maximize loadability. IEEE Trans. Power Syst. 19(1), 260–266 (2004)
22. Gopiya Naik, S., Khatod, D.K., Sharma, M.P.: Optimal allocation of combined DG and capac-
itor for real power loss minimization in distribution networks. Int. J. Elec. Power. 53, 967–973
(2013)
23. Reddy, S.C., Prasad, P., Laxmi, A.J.: Placement of distributed generator, capacitor and DG
and capacitor in distribution system for loss reduction and reliability improvement. Editors-in-
Chief. 198 (2013)
24. Kowsalya, M.: Optimal distributed generation and capacitor placement in power distribution
networks for power loss minimization. International Conference on Advances in Electrical
Engineering (2014)
Optimal Capacitor Placement and Sizing
in Distribution Networks

Arsalan Najafi, Ali Masoudian and Behnam Mohammadi-Ivatloo

Abstract Utilizing capacitor banks in order for local compensation of loads reac-
tive power is common in distribution networks. Using capacitors has positive effects
on networks such as power and energy loss reduction, voltage deviation and net-
work harmonic reduction as well as improvement in network power factor. Capacitor
placement is applied on the network in a form of single or multi-objective problems.
Decreasing the total network loss is often the main reason for using capacitors in
distribution networks. Capacitor placement approach involves the identification of
location for capacitor placement and the size of the capacitor to be installed at the
identified location. An optimization algorithm decides the location of the nodes
where the capacitors should be placed. As we know, the capacitors are categorized
in two main types of fixed and switchable capacitors. Selecting an appropriate type
of capacitor is related to the topology of network, load value and economic situa-
tion. They are also different from coding point of view. In this section, the model of
coding is presented at first, and then, the approach of applying is described based on
optimization algorithm. The capacitors are often used for peak loads but they may be
present in the network in off-peak due to the switching issues. The network voltage
may be increased in off-peak with the presence of capacitors. Therefore, it is very
important to consider both peak and off-peak in the capacitor sizing and placement
problem. The proposed model is applied on IEEE 10 and 33-bus standard test cases
in order to demonstrate the efficiency of the proposed model.

Keywords Capacitor placement · Teaching learning based optimization


algorithm · Capacitor sizing

A. Najafi (B)
Young Researchers and Elite Club, Sepidan Branch, Islamic Azad University, Spidan, Iran
e-mail: [email protected]
A. Masoudian
Faculty of Engineering, University of Shiraz, Shiraz, Iran
B. Mohammadi-Ivatloo
Faculty of Electrical and Computer Engineering, University of Tabriz, Tabriz, Iran
e-mail: [email protected]

© Springer Nature Switzerland AG 2020 75


M. Pesaran Hajiabbas and B. Mohammadi-Ivatloo (eds.),
Optimization of Power System Problems, Studies in Systems, Decision and Control 262,
https://doi.org/10.1007/978-3-030-34050-6_4
76 A. Najafi et al.

1 Introduction

Today, with the advent of science and technology, the use of electrical energy has
grown dramatically. On the other hand, further flourishing needs a more powerful
electricity grid. Power grid consists of three parts: production, transmission and dis-
tribution. Of course, distribution networks are important in the final section of the net-
work. Due to lower voltage levels and higher currents, losses in distribution systems
are higher than in transmission systems. The issue of reducing losses and improving
the efficiency of electric energy supply to the power system is mainly addressed to
the distribution network. Reducing the electric power losses is a way to increase the
capacity of the production, transmission and distribution network without investing
in production. Examples of such loss reduction solutions are reactive power control,
cross-sectional variation of conductors, voltage level change, transformer load man-
agement, load management, over-distribution network topology change, and so on.
The reactive power flow in the network increases the losses and reduces the useful
capacity of the lines and transformers. The use of a capacitor as a reactive power gen-
erator is very common in order to regulate and control the voltage, preventing voltage
fluctuations in the network and correcting the power factor due to the simplicity and
low cost of the system. Installed capacitors reduce the network current and losses
by reducing the reactive power flow of line from the main substation to the location
of capacitor. The absorption and injection of reactive power should be carried out
in such a way as to minimize the losses, and thus the capacitor optimal placement
problem is discussed. The objective function of the capacitor optimal placement in
distribution networks is the cost of installed capacitors, installation costs, etc., and
the cost of power and energy losses. By minimizing the cost function along with the
constraint, i.e., the permitted bus voltages and line currents, the optimal capacitor
size and the location can be determined. Optimal capacitor placement problem can
be formulated as a non-linear optimization problem with a series of equality and
inequality constraints. Therefore, most of conventional optimization techniques are
not able to solve this complex problem, thus evolutionary optimization methods need
to be used to solve the problem.
Studies show that 13% of the total energy produced by power plants is dissipated
as distribution losses [1], which caused by reactive power flow. However, losses
due to reactive current can be reduced by shunt capacitor placement. In addition to
reducing power and energy losses in load peak, optimal capacitor placement can
free up distribution equipment capacity and improve the voltage profile. Hence, over
the past decades, the optimal capacitor placement has been widely studied. Optimal
capacitor placement involves determining the location, size and number of capacitors
installed in the distribution system, so that the most benefit is obtained at different
load levels.
Optimal Capacitor Placement and Sizing in Distribution Networks 77

2 Reactive Power Compensation

Reactive power compensation is known as a very important issue in a power sys-


tem. Consuming load (residential, commercial, industrial, etc.) imposes active and
reactive demands on the network. Active powers are converted into other forms of
energies such as light, heat and rotational movement. Reactive power should be com-
pensated for warranting the provision of active energies. Capacitor banks are used
in a wide area in order to loss reduction, freeing up system capacity and improving
the voltage profile. In the last 30 years, power capacitors have recovered greatly by
improvement of dielectric materials and their manufacturing techniques. Capacitance
sizes have increased from about 15 kVar to about 200 kVAR (Capacitor banks are in
the range of about 300–1800 kVAR) [2]. Nowadays, power capacitors available to
distribution companies are more efficient and less costly than 30 years ago. Under
some conditions, even replacement of older capacitors is justified due to the lower
losses of new ones. As a result, distribution companies can make their choices based
on the economic evaluation of existing capacitor technology [2]. Shunt capacitors,
i.e., capacitors connected in parallel to the grid, are used extensively in distribution
systems. Shunt capacitors provide reactive power or reactive current to compensate
for the out of phase component of the inductive load current. In addition, shunt capac-
itors correct lag characteristics of inductive loads by drowning the lead current that
provides part or all of their lag component current. Therefore, a parallel capacitor
has the same effect as a synchronous condenser, that is, an overexcited generator or
synchronous motor. By using a shunt capacitor in the distribution feeder, the load
current can be reduced and the line power factor can be improved. As a result, the
voltage drop between the substation and the load decreases. The amount and quality
of advantages are related to the number, type of shunt capacitors and their regulations.
Therefore, an optimal way for capacitor placement is the main aspect in installing
capacitors [3].

2.1 Benefit of Reactive Power Compensation

The installed shunt capacitors in the end of power system feeder for supplying reactive
power have some advantages. In this section some of these advantages are investi-
gated. Different methods are used by different companies to calculate the economic
benefits of installing reactive power devices. In summary, the economic benefits of
installing reactive compensators can be summarized as follows:
• Freeing up production capacity
• Reducing voltage drop, and consequently, obtaining an improved voltage profile
• Releasing feeder capacity and related equipment
• Delaying or removing investments for system reform and development
• Reducing power and energy losses.
78 A. Najafi et al.

2.1.1 Improving Voltage Profile

The feeders with large loads have a weak voltage profile and they face with voltage
variations by loads changing. In a power system, voltage regulation in a small interval
(5% of nominal voltage) and having a balance situation are proposed. By the way, the
amounts of loads fluctuation and as a result, the voltage deviation will be more than
allowable amount. The shunt capacitors are one of the main solutions to improve the
voltage deviations. On the other hand, by keeping the voltage near to the nominal
value, it is not required to use expensive regulators [3]. In addition, the revenue
of distribution companies rises due to voltage increment by capacitors, which in
turn increases energy consumption. This is especially true for domestic consumers.
Increasing energy consumption depends on the nature of the equipment used; for
example, the energy consumption of bulbs increases with the square of the voltage
magnitude.

2.1.2 Loss Reduction by Capacitors

Delivering the reactive power at the load point leads to reduction in line current
and losses. Within a determined study period, the amount of energy losses is also
calculated. Now, taking into account the cost per kilowatt hour of energy production,
the energy loss reduction benefit due to the capacitor placement can be calculated.
Reducing losses at the peak load of the network has good benefits. By reducing the
losses at the peak load, the power stations depart from their nominal values, thus
reducing the need for production. Meanwhile, with the increase of new customers,
the construction of new power plants is postponed. Modifying power factor can
significantly reduce the network loss. This can lead to 15% rate of return in the
network [4]. Modifying the power factor should be done near the customers in order
to maximize the profit. Note that, installing capacitors in LV networks are more
expensive in comparison with the MV and HV networks. In the many industrial
places, the losses are about 2.5–7.5%, which is related to the states of operation,
length of lines and feeder. Capacitors can only decrease a part of losses related to
the reactive current [4].

2.1.3 Freeing up Power System Capacity

One of the other important advantages of capacitor placement in distribution network


is to free up the capacity of feeders and related equipment, delaying or eliminating
investment costs for improving or developing the system, and to free up the dis-
tribution transformers capacity. In addition, capacitor placement also frees up the
capacity of production and transmission system. This leads to a better performance
of operation and makes it possible for a larger number of customers to connect to
the network and it does not require a new feeder to connect new customers.
Optimal Capacitor Placement and Sizing in Distribution Networks 79

In short, capacitors are very effective tools for reducing the costs of the electric
power industry due to continuous increase in fuel and power costs. Power compa-
nies make profit whenever they are able to postpone or eliminate new power plant
investments and reduce energy requirements. Therefore, capacitors help minimize
operating costs and make it feasible for new consumers to invest as little as possible
in the system. Today, American distribution companies have installed almost 1 kVAR
capacitor per 2 kilowatt of installed power generation capacity to use from economic
benefits of capacitor placement [5].
In addition, by using capacitors, a reactive current is supplied for transformers,
motors and other devices. This action increases the power factor. It means, by a
lower current (or apparent power) more active power usage is occurred. Therefore,
capacitor banks can be utilized in order to decrease the load or give more flexibility
to the network for increasing load.

2.1.4 Postponing Investment

By using the capacitors and freeing up the capacity, the cost of network expansion
will be postponed. This snooze is started from distribution feeder to the substation
and transmission networks [3]. It means more economic opportunities for network
expansion planning.

2.2 Disadvantages of Reactive Power Compensation

Capacitor banks certainly have many benefits for the network. However, there are
various states in which the capacitors make the system situation worse. In this section
some bugs are investigated.

2.2.1 Resonance

Resonance is a situation in which capacitor and inductance reactance eliminates the


effects of each other. As a result, the resistive impedance will be available in the
network. The resulted frequency of this situation is called resonance frequency. The
resonance increases extremely the current and voltage magnitude. This damages not
only the capacitor but also the entire network.

2.2.2 Harmonic Resonance

If the resonance is occurred with the harmonic source (for example non-linear
loads) simultaneously, the voltage and current will be increased extremely. Moreover,
harmonic resonance will affect the performance of the capacitor.
80 A. Najafi et al.

2.2.3 Transient Switching of Capacitors

The transient mode of capacitor is occurred when a capacitor in high voltage is


committed in the system.

2.2.4 Over-Voltage

The voltage of the system is varied in a predefined interval in the power system.
Using capacitors can make over voltage in off-peak hours. It may exert unfavorable
effects on the system [3].

3 Literature Review

Problem solving methods can be divided into four categories: analytical, numerical
programming, evolutionary, and artificial intelligence. The next section summarizes
the methods of each category and their advantages and disadvantages.

3.1 Analytical Approaches

In all of the early works on optimal capacitor placement, analytical methods have
been used. These algorithms are used when powerful computing resources (high-
capacity computers) are not available or expensive. Analytical methods include the
use of algebra and calculus to determine the highest value of the saving function.
This saving function is often provided as follows:

S = K E !E + K P !P − K C C (1)

where K E !E and K P !P are respectively the cost and energy reduction caused by
capacitor placement, and K C C is the cost of capacitor placement.
Capacitor placement pioneers have used all analytical methods to solve this prob-
lem [6–9]. Although these methods can solve the problem in a simple form, they are
based on unrealistic assumptions for feeders such as constant conductor size and uni-
form loading. From these studies, the famous two-thirds method is extracted. In the
two-thirds method, for minimizing losses, a capacitor with a capacity of two-thirds
of the reactive load of the feeder is placed at about two-thirds of the feeder length.
These early analytical methods were easy to understand and implement. Despite
the disadvantages, some industries still use these methods for capacitor placement
and some companies argue the rule as a guide. To improve the results, the feeder
model is improved. References [8, 10, 11] have formulated the non-uniformity of the
load and the different sizes of the conductor. Moreover, Refs. [12–14] have included
Optimal Capacitor Placement and Sizing in Distribution Networks 81

the switching capacitors in the program, and further improved the situation by con-
sidering the location of the capacitor regulators. Another problem with analytical
methods is to model the location and size of capacitors as continuous variables. Con-
sequently, the calculated size capacitor may not correspond to the standard sizes,
and also the location obtained does not match the allowed nodes for capacitor place-
ment. Therefore, the results should be rounded to the nearest high or low standard;
this results in over-voltage status or savings below the calculated value. Of course,
most of the recent analytical methods are more accurate but require a lot of system
information and longer time to run.

3.2 Numerical Computation Algorithms

Since access to computers became easier and computer memory was reduced, numer-
ical programming algorithms were used to solve optimization problems. Numerical
programming methods are repetitive techniques maximizing or minimizing the objec-
tive function of decision variables. The values of decision variables should also be
constrained by a number of limits. The objective function is the cost saving for opti-
mal location, size and number of capacitors. Voltage and currents can be decision
variables that should satisfy all constraints. Numerical programming methods allow
a more complex cost function to be optimized for the capacitor placement problem.
The objective function can include all voltage constants, line loading, discrete capac-
itor sizes and physical locations of the nodes. Numerical programming can be used
to formulate capacitor placement problem as follows:

Max S = K L !L − K C C (2)

Subjected to:

!V ≤ !VMax (3)

In this regard, K L !L is cost savings that may include power and energy losses
reduction at peak load as well as freeing up the system capacity. The parameter K C C
is the cost of capacitor placement and V is the voltage variation that should not exceed
!VMax .
Reference [15] was the first to use dynamic programming to solve a capacitor
placement problem, which considered only energy losses reduction with a discrete
set of capacitor sizes. By examining all numerical programming methods, it can be
seen that the level of growth and complexity of the models has progressed over time.
This trend was due to increased computing capacity. Today, heavy calculations are
relatively inexpensive, and many numerical optimization packages are available for
each of the above algorithms. Some numerical programming methods consider the
location of nodes and capacitor sizes as discrete variables; this has a good advantage
over analytical methods. However, the preparation of data and the growth of the
82 A. Najafi et al.

process for numerical techniques may require more time than analytical methods.
To illustrate whether the answer obtained by numerical optimization planning meth-
ods are local or original, the convexity of capacitor placement problem should be
determined. Considering the economic value of freed capacity and the effect of load
growth in these methods may be very difficult.

3.3 Artificial Intelligent Algorithms

The recent popularity of artificial intelligence has led researchers to explore their uses
in power engineering applications. In [16], a method based on GA is used for optimal
capacitor placement. The size and location of the capacitors are encoded in the binary
strings and the intersect operator is used to generate new populations. The problem
formulation includes only the cost of capacitors and the reduction of peak power
losses. References [17] and [18] are other studies that have used genetic algorithm to
solve capacitor placement problem. In [19], the simulated annealing method is used
to solve this problem. In recent years, the use of evolutionary algorithms has been
increasing; some of these algorithms are: multi-objective algorithm of the immune
system [20], differential evolution algorithm [21], firefly algorithm [22], inclusion
and interchange of variables algorithm [23], particle swarm optimization [24], shark
smell optimization algorithm [25], enhanced bacterial foraging optimization [26].
Moreover, [27] and [28], respectively, use neural networks and fuzzy logic to solve
this problem.

4 Problem Formulation

The optimal capacitance problem has many variables and parameters, such as capac-
itor size and optimal capacitor location. In addition, constraints such as bus voltages
are also involved. In this paper, objectives and constraints are considered as follows:

4.1 Objective Function

Different objectives in the case of capacitor placement can be considered. The


following objective is considered here.
The objective function f shows the total cost of the loss and the cost of the capacitor
[29]:

Nc
! Nl
!
peak j l
f = K P Ploss + KC QC + K E Tl Ploss (4)
j=1 l=1
Optimal Capacitor Placement and Sizing in Distribution Networks 83

peak
where Ploss represents the losses in the peak, Q C the cost of the capacitor j, N c the
number of capacitor points, K P the power loss into cost conversion factor, K C the
cost of the capacitor per kilovar and K E the cost per kilowatt of energy losses.
It should be noted that losses in the distribution network include both power and
energy loss. Power loss is related to peak loading and energy loss is related to loading
during the year and can be calculated from power loss according to the loss factor.

4.2 Constraints

In addition to minimizing voltage deviation as an objective, the voltage deviation of


individual buses should not exceed the limits and must be between the maximum
and minimum values [29].

VMin ≤ Vi ≤ VMax (5)

Furthermore, due to economic and technical considerations, the capacitor place-


ment in distribution networks is usually done in such a way that the total capacitance
in the network does not exceed a certain limit of
Nc
! j
Q C ≤ Q Max (6)
j=1

5 Modeling and Optimization Algorithm

5.1 Teaching and Learning Based Optimization Algorithm

Teaching and learning based optimization (TLBO) is an algorithm inspired by the


teacher’s influence on the students. This algorithm is based on the transfer of knowl-
edge from the teacher to the students. This algorithm has two phases of knowledge
transfer; the first phase is teacher phase in which the knowledge is transferred from
teacher to class and the second phase is the student phase. In the student phase, infor-
mation is exchanged between students themselves. In this phase, knowledge transfer
is from the side of students with the higher knowledge to their cohorts [30].
84 A. Najafi et al.

• Teacher phase
The first part of the TLBO algorithm is teacher training. The main goal of the
teacher is to transfer knowledge and increase the positive output of knowledge in the
class. Efficiency in this area dates back to the teacher. Mathematically, this phase is
expressed as [30]:

Xi,new = Xi + r1 .(XTeacher + TF XMean ) (7)

In this regard, Xi is a solution (a student) of the set of problem solutions, XTeacher


the best answer to the problem that plays the role of the teacher, XMean the mean
value of the answers to the problem and TF the teacher factor, which is obtained
from relation 8:

TF = round(1 + r2 ) (8)

In this case, r 2 is a random number between zero and one. Using round, the factor
value is rounded.
In the process of answer generation, if the generated answer is better than the
previous one, it replaces the previous answer.
• Student phase
In this phase, students increase their knowledge through the exchange of informa-
tion, in which there is no stable process, and as a result, each student can exchange
knowledge with another student. These cases are mathematically motivated. Two
random answers i and j are selected. Note that the two answers are not the same.
Then, the student phase is completed using the following formula:
If the ith answer is better than the jth answer
" #
Xi,new = Xi + r3 . Xi − Xj (9)

If the ith answer is worse than the jth answer


" #
Xi,new = Xi + r3 . Xj − Xi (10)

where r3 is a vector of random numbers between zero and one. In this case, r3 is a
vector of random numbers between zero and one.
After the answers are made, the new answer would replace the previous answer
if the newly generated random answer is better than the previous one. In summary,
the TLBO algorithm can be seen in the flowchart of Fig. 1.
Optimal Capacitor Placement and Sizing in Distribution Networks 85

Fig. 1 Flowchart of TLBO algorithm


86 A. Najafi et al.

Fig. 2 Proposed model for


codding

5.2 Matching TLBO with Capacitor Placement Problem

In this case, each answer represents the optimal location and size of the capacitor.
Figure 2 shows a coding of an answer to the algorithm. This code is such that each
of the elements of this code is assigned to a bus. A number between zero and the
maximum number of types of capacitors can be placed in these elements. The value
zero means that the bus is not allocated to the capacitor and the value 1 means type
1 capacitor and the rest numbers obey the same order.

5.3 Load Model

Choosing a suitable location for capacitors is highly dependent on the system load.
Therefore, the loading information of all load points is required to be known. On the
other hand, in order to reduce the calculation, the total load of the system is estimated
as a step. Figure 3 shows the load model used in this problem [31]. These load levels
are usually expressed as a percentage of peak load. Additionally, the number of
surfaces considered for the load is not limited and the capacitor placement problem
can be solved easily without any need for modification of the model for several load
levels as well as different loading levels for different load points.

Fig. 3 Proposed load model


Optimal Capacitor Placement and Sizing in Distribution Networks 87

6 Numerical Results

6.1 Test Cases

In order to perform simulations, two IEEE 10 [32] and 33-bus test cases have been
used [33]. In the 10-bus system, the primary power and energy losses are 7070.16 kW
and 6,371,219 kWh, respectively. The initial active and reactive power of the system
are also 12,368 and 4186 kW, respectively. In the 33-bus system, the power and
energy losses are 40.15 kW and 387,058 kWh, respectively. In both systems the
objective is to reduce the losses and capacitor placement cost. The schematic of
these two systems is shown in Figs. 4 and 5, respectively. The load and network lines
specifications are given in Tables 1 and 2, respectively. We will continue to introduce
each of these test cases individually.

Fig. 4 Schematic of 10-bus test case

Fig. 5 Schematic of 33-bus test case


88 A. Najafi et al.

Table 1 Characteristics of 10-bus test case


From bus i To bus j R (Ohm) X (Ohm) P (kW) Q (kVar)
1 2 0.1233 0.4127 1840 460
2 3 0.014 0.6051 980 340
3 4 0.7463 1.2050 1790 446
4 5 0.6984 0.6084 1598 1840
5 6 1.9831 1.7276 1610 600
6 7 0.9053 0.7886 780 110
7 8 2.0552 1.1640 1150 60
8 9 4.7953 2.716 980 130
9 10 5.3434 3.0264 1640 200

6.2 10-Bus Test Case

In this system, in all three modes, low, medium and peak load, voltages at the ending
buses are lower than the limit. The acceptable range of voltage is between 0.9 and
4.1, but the voltage drop in initial conditions is about 0.84, which is less than the
limit. After optimization, according to Fig. 6, the worst voltage that is again at the
end of the network is about 0.91, which is above the lower limit. Moreover, the power
loss is up to 704.64, which is dropped to acceptable levels of casualties. The energy
loss reaches 6,100,342.29 (see Table 3). The optimum locations are buses 3, 5, 7,
and 9. Figure 7 shows rapid convergence of the algorithm with a acceptable rate of
200 iterations (Table 4).

6.3 33-Bus Test Case

In this system, the power and energy losses are 57.48 kW and 387,058.9721 kWh,
respectively. The permitted voltage range is also 0.95 to 1.05. After performing
the simulations, Table 5 shows the power loss rate decreased to 43.41. Meanwhile,
the energy losses have dropped to 348,408.4 kWh. Voltage profiles are shown in
Fig. 8 before and after simulation. In cases, low, medium and peak load, the voltage
profile is improved and voltage deviation is reduced. However, while capacitors
where allowed to be assigned to all buses, only a capacitor of 450 kV is assigned
to bus 29, and all positive effects are only due to this capacitor. This indicates the
importance of selecting the correct location for capacitor placement. Figure 9 also
depicts the convergence graph of the TLBO algorithm. The final cost of the case is
3421.6.
Optimal Capacitor Placement and Sizing in Distribution Networks 89

Table 2 Characteristics of 33-bus test case


From bus i To bus j R (Ohm) X (Ohm) P (kW) Q (kVar)
1 2 0.0922 0.0477 100 60
2 3 0.493 0.2511 90 40
3 4 0.366 0.1864 120 80
4 5 0.3811 0.1941 60 30
5 6 0.819 0.707 60 20
6 7 0.1872 0.6188 200 100
7 8 1.7114 1.2351 200 100
8 9 1.03 0.74 60 20
9 10 1.04 0.74 60 20
10 11 0.1966 0.065 45 30
11 12 0.3744 0.1238 60 35
12 13 1.468 1.155 60 35
13 14 0.5416 0.7129 120 80
14 15 0.591 0.526 60 10
15 16 0.7463 0.545 60 20
16 17 1.289 1.721 60 20
17 18 0.732 0.574 90 40
2 19 0.164 0.1565 90 40
19 20 1.5042 1.3554 90 40
20 21 0.4095 0.4784 90 40
21 22 0.7089 0.9373 90 40
3 23 0.4512 0.3083 90 50
23 24 0.898 0.7091 420 200
24 25 0.896 0.7011 420 200
6 26 0.203 0.1034 60 25
26 27 0.2842 0.1447 60 25
27 28 1.059 0.9337 60 20
28 29 0.8042 0.7006 120 70
29 30 0.5075 0.2585 200 600
30 31 0.9744 0.963 150 70
31 32 0.3105 0.3619 210 100
32 33 0.341 0.5302 60 40
90 A. Najafi et al.

Fig. 6 Voltage profile of


10-bus test case

Table 3 Results of 10-bus


Output Initial Optimized
test case
Loss (kW) 783.7763 704.64
Energy Loss (kwh) 6,371,219.877 6,100,342.29

Fig. 7 Convergence of
10-bus test case

Table 4 Place and size of optimal capacitors


Bus Bus 2 Bus 3 Bus 4 Bus 5 Bus 6 Bus 7 Bus 8 Bus 9 Bus 10
Value 0 4800 0 1800 0 600 0 600 0

Table 5 Results of 10-bus


Output Initial Optimized
test case
Loss (kw) 57.489 43.41
Energy Loss (kwh) 387,058.972 348,408.4
Optimal Capacitor Placement and Sizing in Distribution Networks 91

Fig. 8 Voltage profile of


33-bus test case

Fig. 9 Convergence of
33-bus test case

7 Conclusion

In this chapter, the optimal location and sizing of capacitors in a distribution network
were investigated using the TLBO optimization algorithm. Each answer (student)
in the TLBO algorithm was considered to be the location and optimal size of the
capacitors. The goal was to reduce the power and energy losses and the cost of
locating the capacitors. In order to consider the energy losses, a three-level model
of loads, including off-peak, medium and peak load was used. Simulations were
implemented in two standard 10 and 33-bus systems. The results showed that there
is a voltage drop problem at the end of the system in the 10-bus system, and this
voltage drop can be improved by capacitor placement. In addition, network losses
can be reduced. In the 33-bus system, network loss reduction and voltage profile
improvement can be seen.

Acknowledgements This book chapter is gratefully dedicated to my beloved wife, Samira, who
taught me how to be a better man.
92 A. Najafi et al.

MATLAB Code

In this part the MATLAB codes of optimal capacitor placement for the 10-bus test
case is presented. The code of 33-bus test case is similar. Therefore only one of test
cases is presented here. The code is separated to the some functions. Each function
should be copied in a separate MATLAB m-file and then the first code should be run.

%% Main mfile should be run


clc
clear all
definParameters();
global No_Cap_Type NBus No_pop Iter Cap_Price Ke
Loaddata Strdata T_OffPeak T_Medium T_Peak NLoadLevel
Kp
tic
PLoss = zeros(No_pop,1);f =
zeros(No_pop,1);LoadDataBase = Loaddata(:,3);
LoadOffPeak = 0.3*LoadDataBase;LoadMedium =
0.6*LoadDataBase;LoadPeak = LoadDataBase;
Loaddata(:,3) = LoadOffPeak; %%%% Evaluating Initial
conditions
[PLossOutOffPeak0,VbusOutOffPeak0,IsecOut0]=DLF(Strdata
,Loaddata); Loaddata(:,3) = LoadMedium;
[PLossOutMedium0,VbusOutMedium0,IsecOut0]=DLF(Strdata,L
oaddata); Loaddata(:,3) = LoadPeak;
[PLossOutPeak0,VbusOutPeak0,Isec0]=DLF(Strdata,Loaddata
);
EnergyLossIni = T_OffPeak*PLossOutOffPeak0 +
T_Medium*PLossOutMedium0 +...
T_Peak*PLossOutPeak0; Loaddata(:,3) = LoadDataBase;

%%%
p = ceil(rand(No_pop,NBus-1)*No_Cap_Type);%%% Initial
popoulation
pop = Cap_Mvar_determine(p); %%% Allocation MVAr to the
generated population
for i = 1:size(p,1)
pop(i,:) = Cap_Mvar_determine(p(i,:));
Load(:,1) = LoadOffPeak - (pop(i,:))';Load(:,2) =
LoadMedium - (pop(i,:))';
Optimal Capacitor Placement and Sizing in Distribution Networks 93

Load(:,3) = LoadPeak -
(pop(i,:))';Total_Cap_Price
=sum(Cap_Price((p(i,:))));
for il=1:NLoadLevel
Loaddata(:,3) = Load(:,il);
[PLoss(i,il),Vbus,Isec(i,il,:)]=DLF(Strdata
,Loaddata);%%% Running load flow
PenaltyVoltageL(i,il)= PenV(Vbus); %%%
Calculating amount of penalties
end
PenaltyVoltage(i) = sum(PenaltyVoltageL(i,:),2);
f(i) = Ke*(T_OffPeak*PLoss(i,1) +
T_Medium*PLoss(i,2) + T_Peak*PLoss(i,3)) +
Kp*PLoss(i,1) + Total_Cap_Price;%%% Calculating
objective function
f(i) = f(i) + PenaltyVoltage(i);
end
PBest = p;PBestValue = f;[GTeacherValue, index] =
min(f); GTeacher = PBest(index,:); %%% The best
solution
Xmean = mean(p);
for k = 1:Iter
k
[f,p,GTeacher, GTeacherValue, Xmean,
PenaltyVoltage, PenaltyVoltageBest] =
UpdateSolutions(GTeacher, p, Xmean, f,
PenaltyVoltage, LoadOffPeak, LoadMedium,
LoadPeak);
%%% Generating new solutions
fff(k) = GTeacherValue;
end
toc
ij = 1:Iter;
hold on
plot(ij,fff,'r')

%% Function of defining input parameters


function definParameters()
global No_Cap_Type Cap_MVar NBus No_pop Iter Cap_Price
VLoadMax VLoadMin PF Loaddata Strdata pMax pMin Ke Kp T
Kl T_OffPeak T_Medium T_Peak NLoadLevel
No_Cap_Type = 7; %%% Number of capacitor types
Cap_MVar = 4*[0 150 300 450 600 900 1200];%%% MVar of
capacitors
94 A. Najafi et al.

Cap_Price =4*[0 750 975 1140 1320 1650 2040];%%% Price


of capacitors
No_pop =100; %%% Number of population
Iter = 200; %%% Iteration number
VLoadMax = 1.1; %%% Upper voltage bound
VLoadMin = 0.9; %%% Lower voltage bound
PF = 5000; %%% Penalty factor
%%% Bus P Q
Loaddata= [2 1840 460
3 980 340
4 1790 446
5 1598 1840
6 1610 600
7 780 110
8 1150 60
9 980 130
10 1640 200
];
%%% From Bus To Bus Length R X Imax
Cap
Strdata = [1 2 1 0.1233 0.4126 0 0
2 3 1 0.014 0.6051 0 0
3 4 1 0.7463 1.205 0 0
4 5 1 0.6984 0.6084 0 0
5 6 1 1.9831 1.7276 0 0
6 7 1 0.9053 0.7886 0 0
7 8 1 2.0552 1.164 0 0
8 9 1 4.7953 2.716 0 0
9 10 1 5.3434 3.0264 0 0
];
NBus = size(Loaddata,1) + 1; %%% Number of buses
pMax = No_Cap_Type; %%% Maxiumum bound of populations
pMin = 1; %%% Minimum bound of populations
Ke = 0.06; %%% Coefficent of energy loss
Kp = 300; %%% coefficent of power loss
T = 8760; %%% time period
Kl = 168; %%%
T_OffPeak = 3000; %%% Off peak hours
T_Medium = 5300; %%% Medium load hours
T_Peak = 460; %%% Peak hours
NLoadLevel = 3; %%% Number of load levels

%% Function of updating solutions


Optimal Capacitor Placement and Sizing in Distribution Networks 95

function [f,p,GTeacher, GTeacherValue, Xmean,


PenaltyVoltage, PenaltyVoltageBest] =
UpdateSolutions(GTeacher, p, Xmean, f,
PenaltyVoltage, LoadOffPeak, LoadMedium, LoadPeak)
global Cap_Price Ke Kp Strdata Loaddata T_OffPeak
T_Medium T_Peak NLoadLevel No_Cap_Type
for i = 1:size(p,1) %%%%%%%%%%%%%%% Teacher phase
%%%%%%%%%%%%%%%
TF = round(1+rand);pnew(i,:) = p(i,:) +
rand(1,size(p,2)) .* (GTeacher - TF*Xmean);
pnew(i,:) = round(pnew(i,:));
for k = 1:size(p,2)
if pnew(i,k)>No_Cap_Type
pnew(i,k) = No_Cap_Type;
elseif pnew(i,k)<1
pnew(i,k)= 1;
end
end
pop(i,:) = Cap_Mvar_determine(pnew(i,:));
Load(:,1) = LoadOffPeak - (pop(i,:))';
Load(:,2) = LoadMedium - (pop(i,:))';
Load(:,3) = LoadPeak - (pop(i,:))';
Total_Cap_Price
=sum(Cap_Price((pnew(i,:))));
for il=1:NLoadLevel
Loaddata(:,3) = Load(:,il);
[PLoss(i,il),Vbus,Isec(i,il,:)] =
DLF(Strdata,Loaddata);
PenaltyVoltageL(i,il)= PenV(Vbus);
end
PenaltyVoltageNew(i) =
sum(PenaltyVoltageL(i,:),2);
fnew(i) = Ke*(T_OffPeak*PLoss(i,1) +
T_Medium*PLoss(i,2) + T_Peak*PLoss(i,3)) +
Kp*PLoss(i,1) + Total_Cap_Price;
fnew(i) = fnew(i) + PenaltyVoltageNew(i);
if fnew(i)<f(i)
p(i,:) = pnew(i,:);f(i)=fnew(i);
PenaltyVoltage(i) =
PenaltyVoltageNew(i);
end
j = round(1 + rand*(i-1)); %%%%%%%%%%%
Student phase %%%%%%%%%%%%%%%%%%%%%
if j~=i
96 A. Najafi et al.

if f(i)<f(j)
pnew(i,:) = p(i,:) +
rand(1,size(p,2)).*(p(i,:) -
p(j,:));
else
pnew(i,:) = p(i,:) +
rand(1,size(p,2)).*(p(j,:) -
p(i,:));
end
pnew(i,:) = round(pnew(i,:));
for k = 1:size(p,2)
if pnew(i,k)>No_Cap_Type
pnew(i,k)= No_Cap_Type;
elseif pnew(i,k)<1
pnew(i,k)= 1;
end
end
pop(i,:) =
Cap_Mvar_determine(pnew(i,:));
Load(:,1) = LoadOffPeak - (pop(i,:))';
Load(:,2) = LoadMedium - (pop(i,:))';
Load(:,3) = LoadPeak - (pop(i,:))';
Total_Cap_Price
=sum(Cap_Price((pnew(i,:))));
for il=1:NLoadLevel
Loaddata(:,3) = Load(:,il);
[PLoss(i,il),Vbus,Isec(i,il,:)] =
DLF(Strdata,Loaddata);
PenaltyVoltageL(i,il)=
PenV(Vbus);
end
PenaltyVoltageNew(i) =
sum(PenaltyVoltageL(i,:),2);
fnew(i) = Ke*(T_OffPeak*PLoss(i,1) +
T_Medium*PLoss(i,2) +
T_Peak*PLoss(i,3)) + Kp*PLoss(i,1) +
Total_Cap_Price;
fnew(i) = fnew(i) +
PenaltyVoltageNew(i);
if fnew(i)<f(i)
p(i,:) = pnew(i,:);
f(i)=fnew(i);
PenaltyVoltage(i) =
PenaltyVoltageNew(i);
Optimal Capacitor Placement and Sizing in Distribution Networks 97

end
end
end
[GTeacherValue, index] = min(f);
GTeacher = p(index,:);
PenaltyVoltageBest = PenaltyVoltage(index(1));
Xmean = mean(p);

%% Function of backward forward load flow


function [PLoss,Vbus,Isec]=DLF(Strdata,Loaddata)
% Strdata->> 1-from/2-to/3-Length(km)/4-R(ohm/km)/5-
X(ohm/km)/6-Imax(Amp)/7-Capacitor (kvar)
% Loaddata->> 1-bus/2-P(kw)/3-Q(kw)
PLoss = [];

Nsec=length(Strdata(:,1)); %Number of sections (or to


buses)
Vbase=23000; %V base of the system (v)
Isec=zeros(Nsec,1);
Vbus=Vbase*ones(Nsec,1);
Cbus=zeros(Nsec,1);
Sbus=zeros(Nsec,1);
Rsec=Strdata(:,4).*Strdata(:,3);
Xsec=Strdata(:,5).*Strdata(:,3);
Zsec= Rsec + i*Xsec;
%=============================Algorithm================
===
BI=zeros(Nsec,Nsec+1);
BI(1,1)=1;
BV=BI;
for k=1:Nsec
BI(:,Strdata(k,2))=BI(:,Strdata(k,1));
BI(k,Strdata(k,2))=1;
BV(:,Strdata(k,2))=BV(:,Strdata(k,1));
BV(k,Strdata(k,2))=Zsec(k);
end
BI(:,1)=[];
BV(:,1)=[];
BV=BV.';
Cbus(Strdata(:,2))=Strdata(:,7)*1000;
Sbus(Loaddata(:,1))=(Loaddata(:,2)+i*Loaddata(:,3))*100
0; Cbus(1,:)=[];
Sbus(1,:)=[];
Iter=0;
98 A. Najafi et al.

NERROR=1;
S_bus=Sbus-i*(Cbus.*(Vbus/Vbase).^2); %for P
constant Ibus=conj(S_bus./(sqrt(3)*Vbus));
while ((Iter<100)&&(NERROR>1e-5))
Iter=Iter+1;
OldIbus=Ibus;
VD=sqrt(3)*(BV*BI)*Ibus;
Isec=BI*Ibus;
Vbus=Vbase-VD;
S_bus=Sbus-i*(Cbus.*(Vbus/Vbase).^2); %for P
constant Ibus=conj(S_bus./(sqrt(3)*Vbus));
NERROR=max(max(abs(Ibus-OldIbus)));
end
%======================================================
===
LossSec=3*abs(Isec).^2.*(Rsec)/1000;
PLoss=sum(LossSec);
Vbus=abs(Vbus)/Vbase; % voltage of to buses
return

%% Function of allocating MVAr to the generated


population function pop = Cap_Mvar_determine(p)
global Cap_MVar NBus
for i = 1:size(p,1)
pop_row = p(i,:);
pop_row_MVar = zeros(1,NBus-1);
for j=1:NBus-1
pop_row_MVar(j) = Cap_MVar(pop_row(j));
end
pop(i,:) = pop_row_MVar;
end

%% Function of applying upper and lower bounds of


population
function p = ApplyingConstraint(p)
global No_Cap_Type
for i=1:size(p,1)
for j=1:size(p,2)
if p(i,j)>No_Cap_Type
p(i,j) = No_Cap_Type;
elseif p(i,j)<1
p(i,j) = 1;
end
end
Optimal Capacitor Placement and Sizing in Distribution Networks 99

end

%% Function of penalizing infeasible solutions


function PenaltyVoltage = PenV(Vbus)
global VLoadMax VLoadMin PF

for i=1:size(Vbus,1)
if (Vbus(i)>VLoadMax) || (Vbus(i)<VLoadMin)
Penalty(i) = PF;
else
Penalty(i) = 0;
end
end
PenaltyVoltage = sum(Penalty);

%% Function of initializing population


function p= Initialazation()
global No_pop VgMin VgMax No_generator NTrans
NTransStep TransTap NQComp QCompMin QCompMax

V = VgMin + rand(No_pop,No_generator)*(VgMax-VgMin);
TT = ceil(NTransStep*rand(No_pop,NTrans));
T = TransTap(TT);
tic
for ii = 1:No_pop
for jj=1:NQComp
QComp(ii,jj) = QCompMin(jj) + rand*
(QCompMax(jj) - QCompMin(jj));
end
end

QCompValue = ceil(1 + rand(No_pop,NQComp)*


(length(QComp) - 1));
p = [V TT QComp];

References

1. Bunch, J.B., Miller, R.D., Wheeler, J.E.: Distribution system integrated voltage and reactive
power control. IEEE Trans. Power Apparatus Syst. 101(2), 284–289 (1982)
2. Arcanjo, D.N., Pereira, J.L.R., Oliveira, E.J., Peres, W., de Oliveira, L.W., da Silva Junior, I.C.:
Cuckoo search optimization technique applied to capacitor placement on distribution system
problem. In: Proceedings of 10th IEEE/IAS International Conference on Industry Applications
(2012)
100 A. Najafi et al.

3. Fuchs, E., Masoum, M.: Power Quality in Power Systems and Electrical Machines, pp. 261–300.
Elsevier (2008)
4. Saric, A.T., Calovic, M.S., Djukanovic, M.B.: Fuzzy optimization of capacitors in distribution
systems. In: IEE Proceedings on Generation, Transmission and Distribution (1997)
5. Wu, D., Tang, F., Guerrero, J.M., Vasquez, J.C.: Autonomous control of distributed generation
and storage to coordinate P/Q sharing in islanded microgrids-an approach beyond droop control.
In: Proceeding of International Energy Conference (ENERGYCON) (2014)
6. Neagle, N.M., Samson, D.R.: Loss reduction from capacitors installed on primary feeders.
Trans. Am. Instit. Electr. Eng. Part III. IEEE Trans. Power Apparatus Syst. 75(3), 1 (1956)
7. Cook, R.F.: Optimizing the application of shunt capacitors for reactive-volt-ampere control
and loss reduction. Trans. Am. Instit. Electr. Eng. Part III. IEEE Trans. Power Apparatus Syst.
80(3), 430–441 (1961)
8. Grainger, J.J., Lee, S.H.: Optimum size and location of shunt capacitors for reduction of losses
on distribution feeders. IEEE Trans. Power Apparatus Syst. 100(3), 1105–1118 (1981)
9. Chang, N.E.: Locating shunt capacitors on primary feeder for voltage control and loss reduction.
IEEE Trans. Power Apparatus Syst. 88(10), 1574–1577 (1969)
10. Lee, S.H., Grainger, J.J.: Optimum placement of fixed and switched capacitors on primary
distribution feeders. IEEE Trans. Power Apparatus Syst. 100(1), 345–352 (1981)
11. Salama, M.M.A., Chikhani, A.Y., Hackam, R.: Control of reactive power in distribution systems
with an end-load and fixed load condition. IEEE Power Eng. Rev. 5(10), 39–46 (1985)
12. Civanlar, S., Grainger, J.J.: Volt/Var control on distribution systems with lateral branches
using shunt capacitors and voltage regulators part II: the solution method. IEEE Trans. Power
Apparatus Syst. 104(11), 3284–3290 (1985)
13. Civanlar, S., Grainger, J.J.: Volt/Var control on distribution systems with lateral branches using
shunt capacitors and voltage regulators part III: the numerical results. IEEE Trans. Power
Apparatus Syst. 104(11), 3291–3297 (1985)
14. Grainger, J.J., Civanlar, S.: Volt/Var control on distribution systems with lateral branches
using shunt capacitors and voltage regulators part I: the overall problem. IEEE Trans. Power
Apparatus Syst. 104(11), 3278–3283 (1985)
15. Dura, H.: Optimum number, location, and size of shunt capacitors in radial distribution feeders
a dynamic programming approach. IEEE Trans. Power Apparatus Syst. 87(9), 1769–1774
(1968)
16. Boone, G., Chiang, H.D.: Optimal capacitor placement in distribution systems by genetic
algorithm. Int. J. Electr. Power Energy Syst. 15(3), 155–161 (1993)
17. Sundhararajan, S., Pahwa, A.: Optimal selection of capacitors for radial distribution systems
using a genetic algorithm. IEEE Trans. Power Syst. 9(3), 1499–1507 (1994)
18. Miu, K.N., Chiang, H.D., Darling, G.: Capacitor placement, replacement and control in large-
scale distribution systems by a GA-based two-stage algorithm. IEEE Trans. Power Syst. 12(3),
1160–1166 (1997)
19. Ananthapadmanabha, T., Kulkarni, A.D., Gopala Rao, A.S., Raghavendra Rao, K.,
Parthasarathy, K.: Knowledge-based expert system for optimal reactive power control in
distribution system. Int. J. Electr. Power Energy Syst. 18(1), 27–31 (1996)
20. Huang, T.L., Hsiao, Y.T., Chang, C.H., Jiang, J.A.: Optimal placement of capacitors in distri-
bution systems using an immune multi-objective algorithm. Int. J. Electr. Power Energy Syst.
30(3), 184–192 (2008)
21. Chiou, J.P., Chang, C.F., Su, C.T.: Capacitor placement in large-scale distribution systems
using variable scaling hybrid differential evolution. Int. J. Electr. Power Energy Syst. 28(10),
739–745 (2006)
22. Kavousi, Fard A., Niknam, T.: Optimal stochastic capacitor placement problem from the
reliability and cost views using firefly algorithm. IET Sci. Meas. Technol. 8(5), 260–269 (2014)
23. Perez, Abril I.: Algorithm of inclusion and interchange of variables for capacitors placement.
Electr. Power Syst. Res. 148, 117–126 (2017)
24. Lee, C.-S., Ayala, H.V.H., Coelho, L.S.: Capacitor placement of distribution systems using
particle swarm optimization approaches. Int. J. Electr. Power Energy Syst. 64, 839–851 (2015)
Optimal Capacitor Placement and Sizing in Distribution Networks 101

25. Gnanasekaran, N., Chandramohan, S., Kumar, P.S., Mohamed Imran, A.: Optimal placement
of capacitors in radial distribution system using shark smell optimization algorithm. Ain Shams
Eng. J. 7(2), 907–916 (2016)
26. Othman, A.M.: Optimal capacitor placement by Enhanced Bacterial Foraging Optimization
(EBFO) with accurate thermal re-rating of critical cables. Electr. Power Syst. Res. 140, 671–680
(2016)
27. Gu, Z., Rizy, D.T.: Neural networks for combined control of capacitor banks and voltage
regulators in distribution systems. IEEE Trans. Power Deliv. 11(4), 1921–1928 (1996)
28. Chin, H.C.: Optimal shunt capacitor allocation by fuzzy dynamic programming. Electr. Power
Syst. Res. 35(2), 133–139 (1995)
29. Das, D.: Optimal placement of capacitors in radial distribution system using a Fuzzy-GA
method. Int. J. Electr. Power Energy Syst. 30(6), 361–367 (2008)
30. Gautam, G.D., Pandey, A.K.: Teaching learning algorithm based optimization of Kerf devia-
tions in pulsed Nd: YAG laser cutting of Kevlar-29 composite laminates. Infrared Phys. Technol.
89, 203–217 (2017)
31. Falaghi, H., Singh, C.: Optimal conductor size selection in distribution systems with wind power
generation. In: Wang, L., Singh, C., Kusiak, A. (eds.) Wind Power Systems: Applications of
Computational Intelligence, pp. 25–51. Springer, Heidelberg (2010)
32. Chung, T.S., Leung, H.C.: A genetic algorithm approach in optimal capacitor selection with
harmonic distortion considerations. Int. J. Electr. Power Energy Syst. 21, 561569 (1999)
33. Afzalan, E., Taghikhani, M.A., Sedighizadeh, M.: Optimal placement and sizing of DG in
radial distribution networks using SFLA. Int. J. Energy Eng. 2(3), 73–77 (2012)

You might also like