Firefly Algorithm to Opmimal Distribution of Reactive Power Compensation Units

ABSTRACT


INTRODUCTION
Optimal distribution of reactive power of power supply systems and in electrical networks is a quite topical and innovative task. The main reason of high attention towards the problem is the possibility without providing effective additional capital investments into equipment and other power system performance to achieve economies through solving the problem set. Transmission of the reactive current from power generators to consumers is unprofitable and reactive current occupies part of conductor cross of electric power lines. In this paper, the deep compensation of the reactive power is considered.
The efficiency of the compensation depends on the distribution of reactive power compensation units at power supply system nodes. The optimization task of finding the optimal distribution is nonlinearity, no differentiability; it has multiple extremes and high computational complexity. It is required to apply effective multi-objective optimization methods taking into account high computation difficulty of the task and complicated topology of the solution search space. Presently, the issues of finding the solutions for similar problems are considered, based on artificial intelligence methods, such as Fuzzy logic, heuristic optimization methods, etc.
Research [1] proposes regulation of STATCOM using Fuzzy Logic concept. It allows tuning controllers to achievement high efficiency of power grid operation. Hovewev applying Fuzzy Logic requires expert knowledge of the system and its functioning. Therefore, developing fuzzy rules can be very timeconsuming. It is much easier to use heuristic optimization methods that do not require special labor-intensive modifications. For example, work [2] applies the Harmony search to power loss minimization [2], but using  [3] (with the Evolutionary programming) and [4], research [4] also consideres the Simulated Annealing algorithm. The most widely used optimization method is the Genetic algorithm (GA). It applied to the unit commitment problem [4], to reactive power optimization for voltage stability improvement [5], to minimize power losses and cable cross-section through reactive power units control [6], to to maintain voltage stability using reactive power of Static Var Compensator [7]. Swarm Intelligence class of other methods, close to the GA and showing high efficiency to optimizing the operation of power systems. As in the above-mentioned research [7], Static Var Compensator are used in [8], but for their optimization the Particle Swarm Optimization (PSO) algorithm is applied. The researches [6] shows slight superiority of the Particle Swarm Optimization algorithm over the GA in solving the problem of optimal allocation of reactive power sources distribution in network nodes. In the article [9] a modification of the PSO to optimize size of distributed generation. In the study [10] it is proved that for the reactive power units operational control the Artificial Bee Colony Optimization (ABCO) algorithm is more effective than the GA and the PSO, because in the ABCO procces never converges in the neighborhood of single solution. This article proposes to apply a much less commonly used Swarm Intelligence algorithm, namely the algorithm the Firefly Optimization algorithm (FFO) [11]. It was modification to solving a twocriterion optimization problem. Also, the FFO algorithm was modified by using a gradient descent.

Statement of the problem
The mathematical model of the optimization problem involves real power losses minimizing as well as costs for compensating units' (CU) installation. The simplest way of reducing the multicriteria problem to one-criterion one is a linear convolution. Active power losses and costs related to CU can be connected in one criterion of financial losses taking into account the cost per unit for power losses (1 kW) and the cost per unit for CU power (1 kVAr). The power losses cost is defined by the tariff being charged from the customers. Mathematical formulation of optimization can be stated as follows [6]: With restrictions: a. Q is a CU's power vector; b. i is CU's power in node (if it is 0, then node does not require CU's installation); c. n is a number of nodes where CUs can be installed; d. c cu is cost of the CUs ($ per volt-ampere); e. c p is cost of active power ($ per watt-hour); f. ΔP is total losses of real power in network; g. t is estimated period in hours.
As a general rule, this problem is considered as one-criterion by convolution into one or transferring of one of the criteria into restrictions. However, the model application with two criteria allows a decision maker to have more information about system improvement options. It is of particular importance to use multi-criteria optimization when among criteria the part of which influences the short-term indicators and the other part influences the long-term ones. Thus, the optimization problem Equation (1) may not be reduced to one-criterion but needs to be solved using two criteria separately with restriction the same as in Equation (1):

Firefly algorithm
The Firefly algorithm [11] as all Swarm Intelligence algorithms is based on the agents (fireflies) movement in the decision searching space. Let's consider the objective function minimum problem of the following type f(X), where X is a vector of varied parameters which can get the values from some D area. Each agent is specified by the value of X parameter and value of an optimized function f(X). Thus, the agent is a feasible solution of the considered optimization problem.
As the algorithm is based on watching for fly's behavior, each agent is considered to see the "light" from their neighbors, but the brightness of the "light" depends on the distance between agents. For the process of solution finding to be converged to the optimum, each agent in its movement takes into account only those neighbors having a better value of f(X) criterion. But for the algorithm not to degenerate into The FFO algorithm operation scheme can be described as follows: Step 1. To distribute the agents randomly in the solution searching space.
Step 2. To calculate values of the optimized function per each agent. If the agent has a better value, it will have more opportunity to serve it. Step 3. Each agent needs to have a new position based on the formulas given below.
Step 4. To carry out the movement of each agent into a new position.
Step 5. If the condition of completion is implemented, the algorithm needs to be finished or otherwise needs to be passed to the Step 2.
The result of algorithm performance is the best-saved solution. The study [10] provides a universal scheme of Swarm Intelligence algorithm description. According to it, the Firefly algorithm should be written as follows: Brightness is determined by the optimality criterion. This vector ensures the indirect experience exchange among agents. 3. The algorithm A describes Swarm functioning mechanisms. There are different modifications of this algorithm. This is followed by the description of basic algorithm. a) Generation of initial positions is: where random(G(X)) is a vector of equally distributed random variables meeting the restrictions of searching space. b) Criterion calculation per agent is being implemented by: The criterion calculation takes place in the mathematical model of the problem where X ij vectors are entered from algorithms and the results are returned to the algorithm through the interface {I, O}. c) Agents' movement: Where rand ∈ [0, 1], and G(X) is used in this case as the predicate showing if X belongs the area of admissible solutions. The function v(X ij , X kj ) defines the attractiveness of k agent for i agent with j algorithm iteration: where r(X ij , X kj ) is Cartesian distance between agents. d) If with j iteration the completion condition is implemented, the value has the output O. Otherwise, the transition to iteration b) is taken place. 4. Vector P = {α, β, γ} are coefficients of the algorithm. Coefficient α determines the influence degree of stochastic algorithm nature. Coefficient β sets the degree of attraction between agents with zero distance between them i.e. defines the agent's mutual influence. Coefficient γ controls the dependence of attraction on the distance between agents. 5. Identifiers I and O are algorithm' inputs and outputs (to be interconnected) for the interconnection with the problem solved.

RESEARCH METHOD 2.1. Applying the FFO algorithm for two-criteria optimization
Our preliminary experiments, as well as experiments [12] shows that if optimization problem has a single criterion, then most fireflies converges rapidly (about after 100 iterations) to a neighborhood of the one solution. However, each FFO agent is directly influenced by all other agents, which has a better fitness value. It fundamentally differentiates the FFO algorithm from other population-based algorithms. For example, in the GA, a new solution is obtained from the crossover of a small number (usually two) of parent solutions. In the PSO algorithm, the agent is influenced by the best solution among its neighbors or even among all agent of the swarm. In the ABCO algorithm, only a few of the best solutions are selected, which affect the next steps. This feature allows applying the FFO algorithm easily for problems to be solved with several conflicting criteria requiring finding the alternative itself. Each agent is influenced by all agents, which are much better by one criterion (minimum losses or minimum compensation power).
For example, in Figure 1, four agents will be influenced by all agents except 2 and 9. In this case, first, sixth, and eighth agents' influence will be less than third, fifth, and seventh agents influence as they are at the remote distance from the fourth one. The fifth agent will have more influence. The sixth agent will not be influenced by any of the agents mentioned as it is in the best position according to both criteria.

Interaction the FFO algorithm and optimization problem
The interaction of the FFO algorithm and the optimization problem is performed according to the following scheme: a. The algorithm generates new agent set (solutions). b. Each agent position X is mapped to problem solution (vector Q), as shown by Equation (6). c. Criterion Equation (1)  Agent position X is used as the coefficients vector, so the power of i th CU was determined as the product of the x i the calculated maximum allowable power of CU in the i th node

Local search
The FFO agents are moved to the criteria improvement side, but cannot change positions per step for a bigger distance since the remote agents' influence is not so much. The influence is decreased exponentially with distance increasing. Due to it, the probability of the agent will "pass over" some extreme point on its way. On the other hand, it will not allow all the agents to quickly appear in one extreme point even if it is a global one. Since the algorithm finds not an exact extreme point but finds some area upon completion of FFO algorithm operation, it is expedient to carry out local searching in the space of the best solution found such as the gradient descent.
To increase the the FFO algorithm effectiveness, it is possible to carry out its adjustment with the gradient descent. Initially, the FFO algorithm is launched out, and it performs searching within the space of acceptability. However, in this case, the algorithm can find the space of global extremum but not the extremum itself due to its diversification feature allowing not "to be stuck" in local areas. Gradient algorithms, on the contrary, frequently are not able to get out from local extremums. Such algorithms are computer-intensive, in particular, with a large quantity of optimized variables being available. However, gradient descent allows finding the extremum in that region where it has started its operation. Due to it, the more effective algorithm combination at which the FFO algorithm carries out space approximation (one or some) relatively fast within the whole space of solutions being used afterward as the initial position for the gradient descent.

Power supply system used
The experiments were performed by using the fragment of Tajikistan distribution electrical network of electric power system shown in Figure 2.
The selection of nodes for the CUs location is carried out by fuzzy logic. For this voltage deviation in the nodes and real power losses in branches have been considered as linguistic variables. The voltage deviation can be "low", "below average", "average" or "high". The real power losses in branches can be "below average" or "above average". The node is selected as potentially suitable for the CU if the voltage deviation is "low" or "below average" and real power losses are "above average". The numbers of the selected nodes for the considered circuit (scheme) are circled as it is shown in Figure 2.

One-criterion problem solution
The FFO algorithm used 50 agents, parameter values P = {α, β, γ} = {0.5, 0.01, 100.0}. Then it was applied with using the local search, as described in Section 2. Also, the optimization problem Equation (1) was solved by gradient descent with several arbitrary initial conditions. To compare the efficiency of the FFO algorithms, we also applied the PSO algorithm in equal conditions. The worst and the best results of the gradient descent, results of the FFO and the FFO with the gradient descent are listed in Table 1. Table 1 uses following notations: a. Init is results without any optimization; b. FFO is results of the Firefly algorithm; c. Gradient B is results of the gradient descent with bad initial conditions; d. Gradient G is results of the gradient descent with good initial conditions; e. FFO + GD is results of the Firefly algorithm with using the gradient descent; f. PSO is results of the Particle Swarm Optimization algorithm; g. W is criterion as shown by Equation (1)

Two-criterion Problem Solution
Using the FFO algorithm for the two-criterion problem as it was described in Section 3.2 the following set of optimal solutions according to Pareto could be obtained as it was shown in Table 3 and Figure 3.  Figure 3. Solution of two-criterion optimization problem

Discussion
For the One-criterion problem, the gradient descent under bad initial conditions has found the worse solution than it had with the original one (without compensation). Even the best solution is found by the gradient descent significantly concedes the FFO's solution and the PSO's solution. The two best solutions are obtained by the FFO algorithm with the gradient descent and the PSO algorithm. Experiments have shown that the gradient descent should be used to improve the efficiency of the FFO algorithm. In this case, the results are close to the results of the PSO algorithm, in which the idea of the gradient descent is already implicitly embedded since the agents tend to divide to the point of the best solution. While the FFO algorithm assumes a more complex process of selecting the next step direction of each agent.
All solutions of the one-criterion problem except the solution being found by the gradient descent based on bad initial approximation strategically provide the same outcome but the solution being found by the FFO combination and the gradient requires fewer capital investments into CUs.
For the two-criterion optimization problem, the presented results demonstrate that among any couple of solutions one solution is much better from losses (more profitable in the long-term perspective). The second one, on the other hand, with the required CUs power (requires fewer capital investments into CUs). The model application with two criteria allowed to detect that after the certain level the compensation effectiveness is decreased as it is seen in Figure 3. For instance, the solution №1 is much better than solution № 2 from losses' decrease but requires significantly more expenses for the start-up investments into CU. Thus, the second option applied will give more information to the decision maker and allows making a choice based on the relation of tactical and strategic priorities.
The FFO algorithm has a conceptual difference from suchlike more widespread Swarm algorithms as the Particle Swarm Optimization, the Artificial Bee Colony Optimization, and the Ant Colony Optimization. In the Particle Swarm Optimization algorithm, each particle takes the next step being oriented at its self-best solution as well as at one of the best solution among all particles. In the Artificial Bee Colony Optimization algorithm, each bee takes the step being oriented at single solution among some solutions. And in the Firefly algorithm, each agent performs the step oriented at all agents being in the best position than it itself. Thus, each agent has its own subset agents and is influenced by these subset agents at a certain step. Such peculiarity, on the one hand, slows down the process of algorithm convergence and on the other handallows the algorithm to take into account the region of space of solution searching (decision making) which can be called as an alternative between different variants of problem solution.
To increase the Firefly algorithm effectiveness, it is possible to carry out its adjustment with a local search, such as the gradient descent. The Firefly algorithm gets the space of extremum, and the gradient descent searches the extremum in that region where it has started its operation. In other words, the Firefly algorithm carries out approximations, then the gradient descent uses these solutions as the initial positions.

CONCLUSION
The multi-criterion problem of reactive power optimization in a power grid using heuristic algorithms was considered. Two criteria were considered: minimization of active power losses in the power transmission lines and minimal costs of installed reactive power compensation units.
The Fuzzy logic rule was designed and applied to decrease the dimension of the problem. The fuzzy logic allowed selecting the more appropriate nodes for the location of compensating units taking into account the voltage deviations in the node and active power losses in nearby branches.
Firefly optimization algorithm was modified to apply to multi-criterion optimization problem and to improve effectiveness by using the gradient descent as a local search after the completion of the Firefly algorithm. The population-based stochastic algorithms can be applied to optimization problems in the field of power supply systems and smart grid easily and quickly due to their flexibility and ability to explore the decision space automatically.
The experiment showed that the financial costs of the active power losses by four years and the CUs installed can be increased by 13.6% (126 000 $) by using Firefly optimization with the gradient descent. The result of Firefly with the gradient descent is 10.8%, and the best result of the gradient descent is 9.6%.
The solution quality of the FFO algorithm with the local search is close to the PSO algorithm. The advantage of the FFO algorithm over the PSO algorithm is a straightforward modification for solving multicriteria problems. This simplicity of modification is due to the fact that each firefly is influenced by everyone finding a better solution by one or more criteria.
Expenses related to the reactive power compensation are necessary to be made only one time, and savings using active power losses reduce financial costs per annum. The model application with two criteria (instead of criteria convolution into one or transferring of one of the criteria into the position of restrictions) give to the decision maker more information about system improvement options. It is of particular importance to use multi-criteria optimization when among criteria the part of which influences the short-term indicators and the other part affects the long-term ones. It allows the decision maker to follow the balance of tactical and strategic objective.