FPAES: A Hybrid Approach for the Optimal Placement and Sizing of Reactive Compensation in Distribution Grids

Reactive power compensation with Capacitor Banks (CBs) is one of the most successful approaches used in distribution systems, mainly due to their versatility, long-term acceptance in the power industry, and reduced costs. Most allocation methods, however, lack specific strategies to handle the limited discrete nature of CBs sizes seeking to improve the overall optimization and computational performance. We present an algorithm for the Optimal Placement of Capacitor Banks (OPCB) in distribution systems by means of a hybrid Flower Pollination Algorithm (FPA)–Exhaustive Search (ES) approach. The pollination process itself determines the sets of buses for placement, while CBs sizes and the final fitness values of each pollen are selected after a full-search is conducted in the sizing space. As the sizing phase works on the limited search space of predetermined discrete bank values, the computational effort to find the optimum CB capacity is greatly reduced. Tests were performed on distribution systems of 10, 34, and 85 buses with respect to the objective function, final losses, and voltage profile. The algorithm offers an excellent compromise between solution quality and computational effort, when compared to similar approaches.


Introduction
Technical losses can account for up to 13% of the power delivered in distribution systems [1], which, besides representing a challenging management problem, have profound social and economic impacts. Losses can be efficiently minimized with the adequate placement of compensation devices, such as shunt CBs. The CBs capacities in kVAr are normally chosen from commercially available discrete values.
The Optimal Placement of Capacitor Banks (OPCB) problem is a well-researched topic usually addressed through Mixed-integer Nonlinear Programming (MINLP). Solution approaches include analytical or "exact" methods [2], numerical programming (NP) [3,4], heuristics [5,6], or meta-heuristics [7,8]. In general, the computational complexity increases with the network size or the inclusion of discrete variables [9]. Analytical methods have been widely used in the past, when computing power was scarce [10]. In [11], an analytical procedure to define the optimal placement strategy and reactive compensation level with load variation is proposed. In [12], a method based on Dynamic Programming (DP) with different formulations for CBs costs is presented. In [13], the optimal placement of fixed and demonstrating the effectiveness of the methodology are shown in Section 4. The concluding remarks are presented in Section 5.

Problem Formulation
The OPCB problem consists in determining the the places and sizes of CBs with the purpose of reducing network losses and improve voltage profile and power factor, satisfying technical and operational constraints. The objective function is commonly designed to minimize the net energy cost and maximize the network cost-saving, also taking into account the CBs installation investment. In this paper, we adopt the following compound cost function [41]: where K p is the yearly cost per unit of power loss ($/kw-year); K c is the total CB investment cost ($/kVAr); P i represents the active losses in lines i; Nl is the total number of lines; Ncb number of CBs allocated; and Q cj is the net reactive power injected at bus j.
The objective function (1) is subjected to the following constraints.

Load Flow Constraints
Equations (2) and (3) represent the active and reactive power balance, respectively.
where P k and Q k are the active and reactive power injections, respectively, at bus k; V k and V m denotes the voltage magnitudes at buses k and m, respectively; G km and B km represent the real and imaginary parts of the network admittance matrix Y = G km + jB km ; and θ km is the angular difference between buses k and m.

Bus Voltage Constraints
Inequality (4) represents the minimum and maximum limits imposed on voltage V k .

Reactive Compensation Constraints
Inequality (5) represents the minimum and maximum limits of reactive power injected at location j.

Total Reactive Compensation Constraints
It is also required that the net reactive injection Q Total c be lower than the net load reactive power Q Total L , as (6):

Solution Approach
Usually, the optimization process for OPCB consists in simultaneously obtaining the node and size of CBs. The most methods, e.g. the Hybrid Local Search Algorithm [41], the Ant Colony Optimization Algorithm [42], or the Shark Smell Optimization [43], consider the optimization process as a unique phase to allocate and define the size of CBs. As a MINLP problem, however, the search space in OPCB can be very large even for medium-size radial distribution systems [9]. If there are N cb CBs ready to be allocated to a network of N bus nodes, the total CBs of placement possibilities (n P ) is given by: On the other hand, the number of sizing possibilities (n S ) for each allocation strategy is: where N d is the number of CBs' discrete sizes available. If both placement and sizing are required, the total search space size is therefore n T = n P · n S . Table 1 shows numerical values for n P , n S , and n T for networks of 9, 33, and 84 buses, considering N cb = 4 and N D = 12. Clearly, we observe that a huge computational gain can be achieved by splitting the OPCB problem into placement and sizing phases. Moreover, while n P grows with the network size, n S remains fixed for a given choice of N cb and N D , which favors the use of distinct solution approaches. The outline of the proposed hybrid algorithm to solve the OPCB problem is shown in Figure 1. Unlike in conventional methods, the solution vector is split into X p i (candidate buses for CB placement) and X s i (the optimal discrete sizes). The FPA phase is responsible for providing the locations (buses) for the placement of CBs. In the ES phase, a limited ES is performed considering all available sizing possibilities for each CB. The main concepts underlying the algorithm are discussed as follows.

The Flower Pollination Algorithm
Flower Pollination Algorithm (FPA) is a meta-heuristic method originally proposed in [44] that mimics the reproductive process in flowering plants. It is a powerful optimization tool applied with good results to non-linear, non-convex, and MINLP problems [29,39,40]. The distinguishing features of FPA are the reduced number of parameters and the strategy of alternating between local and global search. Pollen transfer can be connected to pollinators agents, such as insects, bats, birds, and other animals, and assume abiotic or biotic forms. About 90% of plants follow the biotic pollination form, carried out by active agents such as insects and animals. In the abiotic form, the pollination process is based on nonliving agents such as wind and water. The reproductive process can be achieved through cross-pollination, which occurs in the same flower or plant, or self-pollination, among flowers from distinct plants [45].
In the flower pollination process, the survival and reproduction of the most suitable plants are sought, which can be considered as a process for optimizing plant species. Biotic cross-pollination can be viewed as a kind of global pollination, where pollinators move long distances by performing Levy flight [45]. Abiotic and self-pollination are a form of local pollination. Pollination activities can occur at both global and local scales.
In FPA, the optimization is performed locally and globally, controlled by a switch probability parameter p ∈ [0; 1] updated after each generation. The global pollination process is describe by (9): where X t i is the ith pollen grain (or solution vector x i ) at iteration t; g * is the prevailing best solution among all grains at generation/iteration t; and L is the pollination strength, representing a step size related to the Lévy flight.
The Lévy flight parameter is represented by (10): where γ(λ) is the gamma function valid for large steps (S 0).
Local pollination and flower constancy (the tendency of pollination agents to visit certain types of flowers) can be represented as: where X t j and X t k are pollen grains from same plant species; and is a random number from a uniform distribution in [0,1].
Parameter p provides an efficient mechanism to alternate between intensive local pollination and common global pollination, resulting in enhanced search capabilities.

The Proposed FPAES Algorithm
FPA is applied in this work to find the best places for CBs placement, where each pollen is a candidate solution in the search space. To reach a compromise between the computational effort and solution quality, once candidate buses are found by FPA, a Limited ES remains in charge of determining the optimal CBs size for the selected set of nodes, thus improving the overall optimality performance.
An outline of the proposed hybrid algorithm proposed hybrid algorithm is presented in Figure 2. The inputs are the network data, the predetermined CBs' discrete values, and the configuration parameters of FPA (p, population size, and maximum iteration). An initial topology preprocessing for radial networks is recommended to improve Load Flow (LF) efficiency. The solution process consists in first optimizing vector X p i (the candidate buses for CBs placement) and then X s i (optimal discrete sizes). The former are handled by FPA and the latter by ES.
The iterative steps are as follows. For each iteration, a random number µ (0 ≤ µ ≤ 1) is initially created to decide whether FPA will follow global or local pollination to optimize X p in . If µ < p, global pollination via Levy flight is employed using (9); otherwise, local pollination is applied, using (11). Once the solution vectors X p i are computed, the actual evaluation of the cost function is delayed until a limited ES is carried out. At this point, a LF solution is obtained for all combinations of discrete CBs values to find the optimal in order to find the optimal X s i size for each grain. The fitness values are then computed, and FPA resumes its execution by updating the current best grain g p * . The best sizing strategy (g s * ) of the best grain is also stored. The iterative process ends when a a predefined number of iteration is achieved. The final solution g * is then presented.

Input
-CBs data: number, and pre-set size. -FPA data: population size, maximum iteration, and parameter p.
Initialization -Perform topology preprocessing for LF -Randomly initialize placement vector X P i FPA (optimization of X p i ) If rand < p use equation (9) for global pollination via Levy flight, otherwise use equation (11) for local pollination.
Limited ES (optimization of X s i ) For each grain X p i , determine the optimal X s i size through Exhaustive Search. Return the final fitness values to FPA.

Update
Update FPA's current best grain g p * , and the correponding sizing vector g s * ; i < i max ?
Retrieve the best solution g * No yes Figure 2. Flowchart of the proposed approach.

Test Results and Discussion
In this section, the performance of the method in solving the OPCB problem is tested on distribution systems of 10 [46], 34 [46], and 85 [47] buses. The systems are balanced three-phase networks, so they can be represented as single-line networks. The algorithm was implemented in MATLAB R Rand tested on a Windows 10 Home 64-Bits system with 16 GB of memory RAM and a workstation core I7-8700 3.20 GHz processor. The results are compared against a regular "full" FPA algorithm, ES, and other OPCB techniques. The best solutions of 50 trials are taken.
The following parameters were considered in the simulations: number of flowers = 35; maximum iterations = 100; p = 0.25; and λ = 1.5 [45]. The constants K p and K c were fixed at 168 kW/year and 5$/kVAr, respectively [42]. Maintenance and operation costs are not considered in the model. Only fixed-type CB units were considered, with discrete values varying in steps of 100 kVAr, as presented in Table 2. In all tests, the allocation of 4 CBs was considered, as in [9,23,24,46,48]. The voltage limits in all buses were set as 0.8 and 1.0 p.u. A Backward-Forward-Sweep (BFS) [49] method was used to obtain the LF solutions. A topological preprocessing of the tests systems was previously done to improve the algorithm efficiency.

Ten-Bus System
The 10-bus system is a one-feeder radial distribution system with rated voltage of 23 kV [46]. According to Table 1, assuming there are nine positions available for CBs placement, the search space encloses 2612.736 candidate solutions. If 35 particles and 100 iterations are used in FPA, there will be a maximum of 3500 agents exploring the search space, which is a low value comparing to the total number of combinatorial possibilities (less than 1% of the total evaluations).
An outline of the optimization process performed by FPAES is shown in Table 3. In each iteration, FPA initially identifies N cb = 4 buses for placement among the N bus = 9 nodes. Global or local pollination can be employed, depending on the current value of µ. In sequence, the Limited ES finds the optimal CB size from N d = 12 discrete values (as listed in Table 2), for all candidate nodes. The process ends after Iteration 50 is completed. In this case, it is found that the method provides an adequate level of losses and reactive compensation after the seventh iteration. Additional results for FPAES, as well as PSO [24], PGSA [9], FPA, and ES (optimal values), are reported in Table 4. The optimal CB sizes and buses determined by ES are 1200, 1100, 500, and 200 kVAr, at Buses 5, 6, 9 and 10 respectively. It can be observed that only the proposed method finds a similar CBs placement strategy. The total active power losses are lower than the other methods, with a total reactive power installed of 3000 kVAr. The annual costs are improved significantly. Table 3. Ten-bus system: outline of the optimization process.

Thirty-Four-Bus System
The 34-bus system [46] comprises a feeder and four laterals, according to the diagram in Figure 5. The voltage at the substation is 11 kV (1.0 p.u.), and the lowest voltage level is 0.94 p.u (Bus 27). The total size of the search space is 848,517.120, which is reduced to about 40,920 when only the placement possibilities are considered. Before CB placement, the total losses amounts to 222.2 kW, with an operation cost of $37,329 (year).
The best results of FPAES, FPA and three other methods based on Fuzzy Logic [46], Ant Colony (ACO) [42], and Bacterial Foraging Optimization (BFOA) [50] are listed in Table 5. FPA and FPAES data refer to the best outcome in 50 runs. It is shown that FPAES achieves a loss reduction of 27.8 %, a little lower than the "full" FPA. The CBs are positioned in the same buses, yet different sizes are chosen.
A statistical analysis of FPA and FPAES in terms of real losses is presented in Figure 6. The graph demonstrates the efficiency of FPAES in finding good solutions with less dispersion, when comparing to the regular FPA. The voltage profile in the network after reactive compensation is improved, as shown in Figure 7, with the voltage of Bus 27 increasing to 0.95 p.u.

Eighty-Five-Bus System
In this last experiment, FPAES was tested on an 85-bus feeder [47], represented in Figure 8. The system's original losses are 315.7 kW, with an annual cost of $53,037 (year). As previously shown in Table 1, the search space of the placement problem in this case constitutes only 0.05% of the total size, thus favoring the use of a split strategy, as proposed in this paper. Table 6 shows the results obtained by FPAES, PSO [23], PGSA [9], MINLP [48], MBA [26], and FPA. Although MBA reported losses of 149.7 MW for the allocation of five CBs, a more economical solution was obtained by the proposed method, allocating four units to Buses 26,48,67, and 80, with sizes 700, 300, 600, and 300 kVAr, respectively. The total losses decrease by 52.7% after reactive compensation. Although the results of FPA and FPAES are in many cases comparable, FPAES provides an excellent compromise between the former and ES (optimal solution), with the advantage of exploring only a negligible portion of the search space.  Figure 8. Eighty-five-bus radial distribution test system (Source: Authors, based on [47]). Figure 9 highlights the method's capability in providing solutions with low dispersion. It should be noted that both FPA and FPAES methods were tested with the same initial conditions. The placement strategy found by FPAES results in a significant improvement of the voltage profile, as shown in Figure 10, especially at critical load buses. Table 7 presents the optimal CBs locations and sizes for various load levels.
The convergence characteristics in terms of average iterations are presented in Table 8, for all tested systems. It is shown that FPAES converges more quickly than FPA in all cases.

Conclusions
In this work, a hybrid method for solving the OPCB problem is presented. The meta-heuristic FPA is employed in the first phase in order to find the candidate buses for CBs allocation, and a limited ES is then employed to determine the best CBs sizes based on predefined discrete values. The method was tested in several distribution systems, showing excellent performance in solving the OPCB problem when compared to other meta-heuristics. The optimal performance of the algorithm is mainly due to the division of the search space into placement and sizing phases, thus greatly reducing the computational effort required. The solutions obtained are a good compromise between stochastic search and the full combinatorial strategy. Finally, the method can be applied to allocate switchable CBs, under varying demand conditions, and also to other MINLP problems.

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript: