1 Introduction
One of the leader causes of technical losses in electric power distribution networks can be assigned to resistance in distribution and transmission lines, subject to active and reactive currents. One possible strategy to reduce technical losses is by means of capacitor allocation (Bunch et al., 1982).
Capacitors are used in power distribution networks with the intention of reducing losses related to reactive power, powerfactor correction, powerflow control and improvement of network stability (Madeiro et al., 2011).
The optimal capacitor placement problem (CPP) is to define location, size and number of capacitors which should be installed in a network, aiming to minimize a function that takes into account the capacitors installation investment and the reduction in power loss.
CPP is a nonlinear and nondifferentiable mixed integer optimization problem with a set of operating constraints (Yu et al., 2004)
. So, traditional optimization methods are not capable of solving large instance of this hard combinatorial problem. Therefore, techniques conceived to reach highquality solutions in a reasonable execution time, such as heuristics and metaheuristics, emerge as promising approaches.
Some metaheuristics have been successfully applied to CPP, such as: genetic algorithms
(Delfanti et al., 2000; Mendes et al., 2005)(Yu et al., 2004), tabu search (Huang et al., 1996), hybrid evolutionary algorithms
(Mendes et al., 2005), and genetic fuzzy systems (Das, 2008).However, one of the main drawbacks of population metaheuristics, like genetic algorithms, particle swarm optimization, and ant colony optimization is their high computational cost. Since these algorithms handle a population of candidate solutions, a large number of fitness evaluations (performance of each candidate solution) must be done, which may be expensive, mainly in real world problems (Jin, 2005).
In the CPP, for each fitness evaluation an execution of a powerflow estimation method is needed. Only after having powerflow estimates we are allowed to figure out the effective contribution of a given set of allocated capacitors. In real world power distribution networks, with thousands of nodes, this procedure becomes computationally expensive.
Another relevant aspect that is commonly relaxed in CPP, or just taken into account in a postoptimization procedure, is the fact that the capacitor may enter into resonance with the power distribution network, depending on some factors, such as the distance between the capacitor location and the network feeder, and the capacitor size. A possible consequence of resonance is an interruption of the power network, that may bring several implications to the population and to the electricity concessionaire. So, before installing capacitors we need to ensure that the resonance will not show up.
Aiming at mitigating this problem, we propose a parsimonious extremal optimization method which takes into account the resonance constraints. Extremal optimization algorithms have reached good results with relatively small computational cost, when compared with alternative population metaheuristics (Lu, 2009) and (Lu, 2007).
The remainder of the text is structured as follows: in the next section we discuss about resonance in distribution network. The mathematical modeling of the resonance constrained CPP is described in Section 3. Extremal Optimization is depicted in Section 4. Our proposal is outlined in Section 5. Experiments carried out are described in Section 6, and the results are analyzed in Section 7. Finally, concluding remarks and future works are pointed out in Section 8.
2 Resonance in power distribution networks
The size and location of capacitors are critical factors in a distribution system’s response to the harmonic sources (Gönen, 1986). Combination of capacitors and the system reactance cause parallel resonance frequencies for the circuit. The possibility of resonance between a capacitors and the rest of the system, at a harmonic frequency, can be determined by calculating equal order of harmonic at which resonance may take place, given by (Gönen, 1986)
(1) 
where is the threephase shortcircuit power of system at the place of capacitor installation, in VA, and is the capacitor size, given in var.
Parallel resonance frequency, , can be expressed as
(2) 
(3) 
The characteristics of the most common harmonic loads in power distribution networks include the third, fifth and seventh harmonics. Thus, the purpose is to avoid these odd harmonics. In this work, we consider a range of 10 Hz above and below the frequency , that is, the th harmonic is characterized by the interval, [].
Problems resulting from harmonics include (among others) (Mahmoud et al., 1983):

Inductive interference with telecommunication systems;

Capacitor failure from dieletric breakdown or reactive power overload;

Excessive losses in  and heating of  induction and synchronous machines;

Dieletric instability of insulated cables resulting from harmonic overvoltages on the system.
Effects of harmonics in capacitors include: () capacitor overheating, () overvoltage in the capacitor, and () losses in the capacitor.
Among the harmonics control techniques we can cite (Gönen, 1986): (1) strategically identify the location of the capacitors for intallation, (2) select the capacitors size properly, and (3) remove capacitors that act as harmonic sources. Our proposal include the first two control techniques, avoiding the third one. As we shall see in Section 7, the third strategy is not always a good choice.
3 Mathematical modeling
Capacitor placement problem seeks to minimize the cost of power losses and the investment made in capacitors. We can note that both objectives are specified in monetary terms. In fact, the higher the investment in capacitors, the smaller the power loss and, consequently, the smaller the cost of power loss. So, the algorithm needs to find a balanced solution between these two criteria: cost of losses and investment made in capacitors. It is worth mentioning that although this problem could be seen from a multiobjective perspective, we performed an equalweighted criteria approach.
The entire network loss can be taken from Eq. 4.
(4) 
where is the number of graph nodes (since the distribution network is represented by a graph (Cavellucci and Lyra, 1997)), correspond to the arc set which emanates from node , is the resistance in the path , and are active and reactive power, respectively, flowing through arc , for a given period of time (1 hour). For the sake of simplicity, we will assume that voltage values () are approximately 1 pu, for all network nodes. Now, reformulating Eq. 4 to include capacitors, the network losses are defined as
(5) 
In this work, the cost of the entire network loss is calculated for a period of one year (8760 hours). From this, we are able to define the optimization problem to be solved, which can be described by Eq. 6.
(6)  
subject to  
where is the installed capacitor at the location , Cost is the energy price (in U$) per MWh, is the harmonic on the th network bar, that will be better discussed in Section 5, and is amortised capacitor cost. In the problem formulation, Eq. 6, the 8.76 value concerns the number of hours in a year (8760) divided by 1000, since losses are measured in kWh and the energy price in U$/MWh.
The amortised capacitor cost is given by:
(7) 
The capacitors cost described in Eq. 6 corresponds to the total cost subtracted by annual gain. So, it is necessary to define an amortization constant for the equipment and an interest annual rate (Eq. 7). The period of recovery generally corresponds to the useful life of the equipment. In our work we have adopted used an annual rate equal to 0.12 (12%) and a period equal to five years.
For the cost of the capacitors it was used the following table of capacitor available for installation ( set):
Type (u)  Size (kvar)  Cost (U$)  Cost/kvar 

1  150  1498  10,00 
2  300  1604  5,35 
3  450  1620  3,60 
4  600  1823  3,04 
5  900  2550  2,83 
6  1200  2955  2,46 
The resonance constraint is incorporated into the problem by means of a frequency scanning technique, looking for odd frequencies, given that they are commonly found in distribution networks. This procedure is better explained in Section 5.
4 Extremal Optimization
Extremal optimization (EO) (Boettcher and Percus, 1999, 2000) is a generalpurpose local search heuristic based upon recent progress in understanding farfromequilibrium phenomena in terms of selforganized criticality (SOC) (Boettcher and Percus, 2002). The dynamic of EO was inspired by selforganized criticality, a concept introduced to describe emergent complexity in physical systems, where an optimized structure emerges naturally by simple selection against the extremelly bad. EO method, as well as Simulated Annealing (SA) (Kirkpatrick et al., 1983) and Genetic Algorithm (GA) (Goldberg, 1989), are inspired by observations of natural systems.
Unlike GA, which is a population algorithm, EO handles only one solution at a time and seeks to improve the quality of this solution through local perturbations. Originally, this algorithm was proposed to deal with combinatorial optimization problems, particularly problems which can be represented by a graph. In these applications, EO has been shown competitive with more elaborate generalpurpose heuristics on testbeds of constrained optimization problems with up to variables, such as bipartitioning, coloring, and satisfiability (Boettcher and Percus, 2002).
In a graph representation of CPP, variables are nodes and the influence between variables are represented by the arcs. So, a node perturbation will affect directly its neighbors (parent and children in the case of a tree).
In evolutionary algorithms, a quality measure is assigned to each solution, called fitness. Differently from these approaches, EO assigns a fitness to each variable (although that is not essential (Boettcher and Percus, 2000)), , being the total cost of solution, , obtained as follows
(8) 
As aforementioned, perturbations are made in a selected variable, the one with the smallest fitness
value (maximization problem). Due to its influence on the neighboring variables (neighbor graph nodes),
this perturbation will also reflect in these variables. The pseudocode of the basic EO algorithm is
presented in Algorithm 1.
An EO variation was proposed by (Boettcher and Percus, 2001)
, such that the selection of the variable with the worst fitness is not done determiniscally, but follows a probability distribution, favoring the worst variables, but also providing a chance to the others. A power law probability distribution was employed to perform this task, given by
(9) 
where is a probability distribution parameter. This variation was called EO. For , the algorithm is a localrandom search algorithm. On the other hand, for , this is a deterministic local search algorithm, where the variable with the worst fitness is always selected to be updated. For the traveling salesman problem, values between 1.6 and 2 achieved good results (Boettcher and Percus, 2002).
Another variation of EO, proposed by (YuWang Chen and Chen, 2007), was adopted here. In this method, besides employing a probability distribution to select a variable to be updated, another power law distribution is applied to select, among a set of neighboring candidate solutions, which one will replace the current solution. This approach lead to a more informative EO version and, as a result, it is possible to find good solutions faster than the original version.
5 EO approach to resonance constrained CPP
In this section, we describe an extremal optimization algorithm to deal with resonance constrained CPP. The pseudocode of this proposal is shown in Algorithm 2.
The main reason to employ an extremal optimization algorithm, instead of any other metaheuristics, is due to the fact that EO was initially developed to large combinatorial optimization problems which can be represent by a graph, that is precisely the inherent nature of CPP. Another reason, which will become clear later, is the reduction in computational resource when handling resonance constraints.
Solutions are represented by an integervalued vectors belonging to the interval [0,6], being 0 if there is no capacitor in that network location and 1 to 6 if it has one of those six types of capacitor shown in Table 1.
For the initial solution we assume that there is no capacitor installed, that is, the initial solution is an dimensional vector consisting of all zeros, where is the number of nodes in the tree, representing the distribution network.
For each node of the tree, the cost function is evaluated. The losses of a given node are accumulated up to this network point, which is calculated by a powerflow estimation algorithm. Figure 1 shows how the losses of a node is calculated. The idea is to isolate the subnetwork rooted by the interested node and calculate the losses for this subnetwork.
In this work, a simplified version of the powerflow estimation algorithm proposed by Baran and Wu (Baran and Wu, 1989) was used.
After the cost function be evaluated for each node, they are sorted by increasing fitness and one node is chosen, following a power law probability distribution (Eq. 9), to be perturbated. Perturbation mechanism is viewed as a local exploration of the current solution, generating a set of neighboring candidate solutions , which are slightly different from .
At this point the resonance control procedure is applied. From the selected node, its neighborhood is generated by Algorithm 3.
It can be seen that there is a minimum and maximum quantity of solutions in its neighborhood. When there is no capacitor allocated in that position, just one neighbor is generated (lines 1417). Otherwise, we get the maximum number of neighbors, 4+, where is the number of descendant nodes (children).
A solution is only inserted in the neighbor set if, and only if, the parallel resonance constraint is satisfied. That is a penalty function constrainthandling method, which is known as deathpenalty approach (MezuraMontes and Coello, 2011). Even though there are many methods to handle constraints in natureinspired algorithms, deathpenalty is a very simple one and, as we will see in the results section, it has reached good performance. Algorithm 4 shows the routine developed to check the resonance constraint.
A key point of our extremal optimization approach is that only one network node has to be verified at each generation, unlike a genetic algorithm after the application of a uniform crossover operator, for example, in which a high number of nodes must be checked. Thus, the analysis over resonance constraint is made in only one network point whatever the network size. This may save a substantial computational resource, mainly in real power distribution networks, composed of thousands of nodes. That is a significant advantage of extremal optimization approches in relation to another metaheuristic.
Once the set of neighboring solutions has been determined, they are evaluated and sorted by decreasing total cost and, then, one of these neighbors is selected to replace the current solution , following another power law distribution, defined as (GuoQiang Zeng and Mao, 2010)
(10) 
where is a distribution parameter.
Update the best solution found so far, , if necessary, and check the stopping criterion.
6 Experiments
Our algorithm was applied to a power distribution network initially described in Baran and Wu (Baran and Wu, 1989). This network is composed of 33 nodes and 34 arcs. Although of small size, that network was widely used in the literature to compare performance of algorithms designed to cope with power distribution system problems, like CPP and network reconfiguration (Madeiro et al., 2011; Jeon et al., 2002; Jeon and Kim, 2004). Baran and Wu (BW) network is illustrated in Figure 2.
The performance of the considered algorithms was analyzed in relation to the number of function evaluations (FEs), instead of number of generations. This is due to the fact that populational algorithms, like GA, execute a large amount of function evaluations per generation, depending on the population size, whereas single individual algorithms, such as EO, perform a reduced amount of function evaluations. Function evaluation phase is very expensive in this type of problem, since it is necessary to run a powerflow estimation procedure for each candidate solution.
6.1 Comparative analysis
To comparativelly analyze the performance of our EO method, a memetic algorithm proposed by (Mendes et al., 2005), designed to deal with CPP, was implemented. Despite not taking the resonance constraint into account, the memetic algorithm has reached good results for real power distribution networks. To get a final feasible solution, some postoptimization strategies (described in what follows) are applied, if the final solution does not satisfies the resonance constraints.
This memetic algorithm is a genetic algorithm that uses a hierarchically treestructured population, composed of 13 individuals and a local search procedure, applied to the best individual in the population (placed at the tree root). Uniform crossover and punctual mutation operators are employed.
Some of the commonly used strategies (in practice) to repair a final unfeasible solution for CPP is described below. These strategies was named STRTG1, STRTG2 and STRTG3, respectively.

STRTG1: Removing capacitors that has entered into resonance with the distribution network;

STRTG2: Shifting capacitors that has entered into resonance with the network to their respective parents;

STRTG3: Shifting capacitors that has entered into resonance with the network to their respective children.
If the constraint is still not satisfied, these solutions are dropped from analysis. Otherwise, their gains will be compared with the one achieved by our algorithm.
It is worth mentioning that STRTG1 always will return a feasible solution, whereas in the remaining two it is not guaranteed.
Both algorithms and the powerflow estimation procedure were implemented in Python 2.7 using Numpy. Simulations were performed on a Intel Core tm 2 Quad Q6600 @ 2,40 Ghz and 2 GB RAM.
7 Results and Discussion
In our simulations the following parameter values were used for GA (the same values used by Mendes et al. (Mendes et al., 2005)): , and structured population with 13 individuals. In the case of EO, the values (defined by a grid search procedure) are and . For both algorithms, the number of fitness evaluations was limited in 50.000 and the results were analyzed over 30 independent runs.
Table 2
shows the results in terms of mean and standard deviation of the amount of saved money when using the best solution reached by each algorithm, varying linearly the energy price, from 50 to 150 dollars per MWh. The absence of results for MA+STRTG3 is because this approach was not able to produce feasible solutions.
Energy  EO  MA+STRTG1  MA+STRTG2  MA+STRTG3 

Price (U$)  
50  22,573.80 ( 229.01)  17,643.85 ( 9.87)  19,902.41 ( 9.87)  – 
60  27,591.14 ( 268.27)  21,424.15 ( 7.2e12)  24,217.54 ( 1.4e11)  – 
70  32,547.35 ( 305.18)  25,200.06 ( 13.82)  28,528.27 ( 13.82)  – 
80  37,419.25 ( 289.14)  28,967.14 ( 19.74)  32,830.17 ( 19.74)  – 
90  42,354.99 ( 345.82)  32,770.64 ( 4.74)  37,168.50 ( 4.74)  – 
100  47,536.34 ( 364.21)  36,597.07 ( 6.37)  41,529.75 ( 6.37)  – 
110  52,332.52 ( 425.12)  40,421.99 ( 5.90)  45,889.49 ( 5.90)  – 
120  57,468.45 ( 356.68)  44,248.70 ( 6.19)  50,251.03 ( 6.19)  – 
130  62,285.08 ( 413.51)  48,074.14 ( 6.85)  54,611.30 ( 6.85)  – 
140  67,365.68 ( 473.19)  51,899.50 ( 7.50)  58,971.48 ( 7.50)  – 
150  72,301.80 ( 554.78)  55,728.08 ( 6.94)  63,334.88 ( 6.94)  – 
It can be seen that our proposal has reached better feasible solutions than memetic algorithm with postoptimization repair procedure, for all problem configurations. The difference in performance between algorithms becomes higher when energy price increases.
A statistical comparison between these results was done by means of the ttest. For all energy prices, the proposed EObased algorithm statistically outperformed the other ones with pvalue around 1e50, i.e., the equality hypothesis is utterly rejected.
The obtained results gives us some evidences that STRTG3 is not a good postoptimization repair strategy, whereas STRTG1 and STRTG2 have succeeded in getting feasible solutions in all cases. Among the strategies 1 and 2, shifting capacitors to its parents (STRTG2) seems to be the more promising one, once it has reached better solutions for all situations.
Figures ((a)a), ((b)b), and ((c)c) depicts the mean and standard deviation of the quantity of each capacitor types allocated by each algorithm, varying the energy price. Due to the fact that both, STRTG1 and STRTG2, are slight modification of the same (unfeasible) solution, their curves have a quite similar behavior.
As we can see in these plots, the number of capacitors installed by EO is higher, in general, than the number proposed by the three other approaches. In addition, its solutions are composed of a larger variety of capacitor types in relation to the solutions of the other approaches. It can might be the result of a better exploration of the search space.
From now we will focus on the behavior of the algorithms when capacitor prices are changed. It is expected that the number of allocated capacitors will reduce as the capacitor price increases. Figures ((a)a), ((b)b), and ((c)c) shows the mean and standard deviation of the number of capacitors allocated by each type. We vary the capacitor prices from 20 to 20 percent, in other words, we construct scenarios of reduction and increase in the capacitor prices.
In contrast to what was expected, the number of allocated capacitors did not change significantly as the capacitor prices increase. It shows signs of robustness of the algorithms, although more simulations, mainly considering real largesized power distribution networks, are required.
The EO algorithm performs only one slight modification of the current solution per step. So, generally, more steps are necessary to reach highquality solutions, as might be expected. However, the final number of fitness evaluations is still smaller than the one required by the populationbased memetic algorithm, even adopting a structured population.
A solution returned by the EO algorithm is illustrated in Figure 5.
8 Conclusion
It is known that the proper installation of capacitors brings some benefits to power distribution networks, such as maintenance of network stability and reduction of loss due to reactive currents. However, this procedure could allocate capacitors which become harmonic sources in the network.
In this work an Extremal Optimization based algorithm was proposed to tackle the optimal capacitor placement problem, besides including, in a parsimonious way, parallel resonance constraints.
The results showed that this approach reaches better performance when compared with another one which does not take resonance constraint into account, and attempts to repair candidate solutions by means of some postoptimization procedure. Assuming that the optimal solution of the unconstrained problem was found, trying to make it feasible, using local information, does not guarantee its optimality in the constrained problem.
It should also be interesting in future works to study new ways to generate neighbors, maybe using some heuristics to create good solutions. Another investigation is the behavior of our methodology when dealing with real largesized power distribution networks, in order to account for its scalability. As mentioned earlier, it is possible to analyze the balance between cost of losses and investment made in capacitors from a multiobjective perspective, this will also be the focus of future works.
9 Acknowledgements
We would like to thank CNPq for the financial support for this research. The first author also like to thank Salomão S. Madeiro for providing very helpful comments.
References
 Baran and Wu (1989) Baran, M. E. and Wu, F. F. (1989). Network reconfiguration in distribution systems for loss reduction and load balancing. Power Delivery, IEEE Transactions on, 4(2), 1401–1407.

Boettcher and Percus (1999)
Boettcher, S. and Percus, A. (1999).
Extremal optimization: Methods derived from coevolution.
In
Proceedings of Genetic and Evolutionary Computation Conference
, pages 825–832.  Boettcher and Percus (2000) Boettcher, S. and Percus, A. (2000). Nature’s way of optimizing. Artif. Intell., 119, 275–286.
 Boettcher and Percus (2001) Boettcher, S. and Percus, A. (2001). Optimization with extremal dynamics. Phys. Rev. Lett., 86, 5211–5214.
 Boettcher and Percus (2002) Boettcher, S. and Percus, A. (2002). Extremal optimization: an evolutionary localsearch algorithm. Phys. Rev. Lett., 86, 5211–5214.
 Bunch et al. (1982) Bunch, J., Miller, R., and Wheeler, J. (1982). Distribution system integrated voltage and reactive power control. Power Apparatus and Systems, IEEE Transactions on, PAS101(2), 284 –289.
 Cavellucci and Lyra (1997) Cavellucci, C. and Lyra, C. (1997). Minimization of energy losses in electric power distribution systems by intelligent search strategies. International Transactions in Operational Research, 4(1), 23–33.
 Das (2008) Das, D. (2008). Optimal placement of capacitors in radial distribution system using a FuzzyGA method. International Journal of Electrical Power & Energy Systems, 30(67), 361–367.
 Delfanti et al. (2000) Delfanti, M., Granelli, G., Marannino, P., and Montagna, M. (2000). Optimal capacitor placement using deterministic and genetic algorithms. Power Systems, IEEE Transactions on, 15(3), 1041–1046.

Goldberg (1989)
Goldberg, D. (1989).
Genetic Algorithms in Search, Optimization, and Machine Learning
. AddisonWesley Professional.  Gönen (1986) Gönen, T. (1986). Eletric Power Distribution System Engineering. MacGrawHill International Editions.
 GuoQiang Zeng and Mao (2010) GuoQiang Zeng, Y.Z. L. and Mao, W.J. (2010). A Novel Stochastic Method with Modified Extremal Optimization and Nearest Neighbor Search for Hard Combinatorial Problems. In Proceedings of the 8th World Congress on Intelligent Control and Automation, pages 2903–2908.
 Huang et al. (1996) Huang, Y., Yang, H., and Huang, C. (1996). Solving the capacitor placement problem in a radial distribution system using tabu search approach. Power Systems, IEEE Transactions on, 11(4), 1868–1873.
 Jeon and Kim (2004) Jeon, Y.J. and Kim, J.C. (2004). Application of simulated annealing and tabu search for loss minimization in distribution systems. International Journal of Electrical Power & Energy Systems, 26(1), 9 – 18.
 Jeon et al. (2002) Jeon, Y.J., Kim, J.C., Kim, J.O., Shin, J.R., and Lee, K. (2002). An efficient simulated annealing algorithm for network reconfiguration in largescale distribution systems. Power Delivery, IEEE Transactions on, 17(4), 1070 – 1078.
 Jin (2005) Jin, Y. (2005). A comprehensive survey of fitness approximation in evolutionary computation. Soft Computing  A Fusion of Foundations, Methodologies and Applications, 9, 3–12.
 Kirkpatrick et al. (1983) Kirkpatrick, S., Gelatt, C. D., and Vecchi, M. P. (1983). Optimization by Simulated Annealing. Science, 220(4598), 671–680.
 Lu (2007) Lu, Y.Z., C.M.R. C. Y.W. (2007). Studies on extremal optimization and its applications in solving real world optimization problems. pages 162–168.
 Lu (2009) Lu, H., Y. G. (2009). Extremal optimization for protein folding simulations on the lattice. Computers and Mathematics with Applications, 57(1112), 1855–1861.
 Madeiro et al. (2011) Madeiro, S., Galvão, E., Cavellucci, C., Lyra, C., and Von Zuben, F. (2011). Simultaneous capacitor placement and reconfiguration for loss reduction in distribution networks by a hybrid genetic algorithm. In Evolutionary Computation, IEEE Congress on, pages 2178–2185.
 Mahmoud et al. (1983) Mahmoud, A., Owen, R., and Emanuel, A. (1983). Power Systems Harmonics: An Overview. IEEE Trans. Power Appar. Syst., PAS102(8), 2455–2460.
 Mendes et al. (2005) Mendes, A., Franca, P., Lyra, C., Pissarra, C., and Cavellucci, C. (2005). Capacitor placement in largesized radial distribution networks. In Generation, Transmission and Distribution, IEEE Proceedings on, pages 496–502.
 MezuraMontes and Coello (2011) MezuraMontes, E. and Coello, C. A. C. (2011). Constrainthandling in natureinspired numerical optimization: Past, present and future. Swarm and Evolutionary Computation, 1(4), 173 – 194.
 Yu et al. (2004) Yu, X., Xiong, X., and Wu, Y. (2004). A PSObased approach to optimal capacitor placement with harmonic distortion consideration. Electric Power Systems Research, 71(1), 27–33.
 YuWang Chen and Chen (2007) YuWang Chen, Y. L. and Chen, P. (2007). Optimization with extremal dynamics for the traveling salesman problem. Physica A, 385, 115–123.
Comments
There are no comments yet.