Solving Non-Smooth Optimal Power Flow Problems Using a Developed Grey Wolf Optimizer

The optimal power flow (OPF) problem is a non-linear and non-smooth optimization problem. OPF problem is a complicated optimization problem, especially when considering the system constraints. This paper proposes a new enhanced version for the grey wolf optimization technique called Developed Grey Wolf Optimizer (DGWO) to solve the optimal power flow (OPF) problem by an efficient way. Although the GWO is an efficient technique, it may be prone to stagnate at local optima for some cases due to the insufficient diversity of wolves, hence the DGWO algorithm is proposed for improving the search capabilities of this optimizer. The DGWO is based on enhancing the exploration process by applying a random mutation to increase the diversity of population, while an exploitation process is enhanced by updating the position of populations in spiral path around the best solution. An adaptive operator is employed in DGWO to find a balance between the exploration and exploitation phases during the iterative process. The considered objective functions are quadratic fuel cost minimization, piecewise quadratic cost minimization, and quadratic fuel cost minimization considering the valve point effect. The DGWO is validated using the standard IEEE 30-bus test system. The obtained results showed the effectiveness and superiority of DGWO for solving the OPF problem compared with the other well-known meta-heuristic techniques.


Introduction
Recently, OPF problems have become a strenuous task for optimal operation of the power systems. The main objective of OPF is finding the best operation, security and economic settings of electrical power systems. In this study, the operating variables of systems are determined optimally for different objective functions such as fuel cost minimization, power loss minimization, emission and voltage deviation minimization, etc., while in addition, enhancing system stability, loadability and voltage profiles. Practically, the solution of OPF problem must satisfy the equality and inequality system constraints [1,2].
OPF is a non-smooth and non-linear optimization problem that is considered a complicated problem. This problem becomes especially more difficult when the equality and inequality operating system constraints are considered. Thus, solving the OPF problem needs more efficient and developed meta-heuristic optimization algorithms. Many conventional methods have been developed in order to solve the OPF problem such as NLP [3], LP [4], QP [5], Newton's Method [6], IP [7]. However, these methods face some problems in solving nonlinear or non-convex objective functions. In addition, these methods may fall into local minima, hence new optimization algorithms have been proposed to avoid the shortcomings of these methods. From these methods; GA [8,9], MFO [10], DE [11,12], PSO [13], MSA [14], EP [15,16], ABC [17], GSA [18], BBO [19], SFLA [20], forced initialized differential evolution algorithm [21], TS [22], MDE [23], SOS [24], BSA [25] and TLBO [26], decentralized decision-making algorithm [27]. The thermal generation units have multiple valves to control the output generated power. As the valves of thermal generation units are opened in case of steam admission, a sudden increase in losses is observed which leads to ripples in the cost function curve (known as the valve-point loading effect). Several optimization techniques have been employed for solving the OPF considering the valve-point loading effect such as ABC [17], GSA [18], SFLA [20], SOS [24], BSA [25] and Hybrid Particle Swarm Optimization and Differential Evolution [28].
The conventional and some meta-heuristics methods could not efficiently solve the OPF problem, thus several new or modified versions of optimization techniques have been proposed. The GWO algorithm is considered a new optimization technique that proposed by Mirjalili [29]. GWO simulates the grey wolves' social hierarchy and hunting behavior. The main phases of gray wolf hunting are the approaching, encircling and attacking the prey by the grey wolves [29,30]. It should point out that the conventional GWO technique updates its hunters towards the prey based on the condition of leader wolves. However, the population of GWO is still inclined to stall in local optima in some cases. In addition, the GWO technique is not capable of performing a seamless transition from the exploration to exploitation phases. In this paper, a new developed version of GWO is proposed to effectively solve the OPF problem. The DGWO is based on enhancing the exploration phase by applying a random mutation in order to enhance the searching process and avoid the stagnation at local optima. The exploitation process is improved by updating the populations of GWO in spiral path around the best solution to focus on the most promising regions. DGWO is applied for minimizing the quadratic fuel cost, fuel cost considering the valve loading. The obtained simulation results by the DGWO are compared with those obtained by the classical GWO and other well-known techniques to demonstrate the effectiveness of the proposed algorithm.
The rest of paper is organized as follows: Section 2 presents the optimal power flow problem formulation. Section 3 presents the mathematical formulation of GWO and DGWO techniques. Section 4 presents the numerical results. Finally, the conclusions presented in Section 5.

Optimal Power Flow Formulation
Solution of OPF problem aims to achieve certain objective functions by adjustment some control variables with satisfying different operating constraints. Generally, the optimization problem can be mathematically represented as: Subject to: where, F is a certain objective function, x are the state variables, u is the control variables vector, g j and h j are equality and inequality operating constraints, respectively. m and p are the number of the equality and inequality operating constraints, respectively. The state variables vector (x) can be given as: where, P G1 is the generated power of slack bus, V L is the load bus voltage, Q G is the generated reactive power, S TL is the power flow in the line, NPQ is the load buses number, NPV is the generated buses number and NTL is the lines number. The independent variables u can be given as: where, P G is the generated active power, V G is the generated voltage, Q C is the shunt compensator injected reactive power, T is the transformer tap setting, NG is the generators number, NC is the shunt compensator units and NT is the transformers number.

Quadratic Fuel Cost
The first objective function is the quadratic equation of total generation fuel cost which formulated as follows: where, F i is the fuel cost. a i , b i and c i are the cost coefficients.

Quadratic Cost with Valve-Point Effect and Prohibited Zones
Practically, the effect of valve point loading for thermal power plants should be considered. This effect occurred as a result of the rippling influence on the unit's cost curve which produced from each steam admission in the turbine as shown in Figure 1. The valve point loading effect is considered by adding a sine term to the fuel cost as: where, d i and e i are the fuel cost coefficients considering the valve-point effects.

Piecewise Quadratic Cost Functions
Due to the different fuel sources (coal, natural gas and oil), their fuel cost functions can be considered as a non-convex problem which is given as: where, a ik , b ik and c ik are cost coefficients of the ith generator for fuel type k.

Equality Operating Constraints
The operating equality constrains can be represented as: where, P Gi and Q Gi are the generated power at bus i. P Di and Q Di are load demand at bus i. G ij and B ij are the real and imaginary parts of admittance between bus i and bus j, respectively.

Inequality Operating Constrains
The inequality operating constrains can be given as: where, P min Gi and P max Gi are the minimum and maximum generated active power limits of ith generator, respectively. V min Gi and V max Gi are the lower and upper output voltage limits of ith generator, respectively. The dependent state variables can be considered in OPF solution using the quadratic penalty formulation as: where, K G , K Q , K V , K S and K S are the penalty factors. x lim is the limit value that can be given as: where, x max and x min are the upper and lower limits of the dependent variables, respectively.

Grey Wolf Optimizer
GWO is a robust swarm-based optimizer inspired by the social hierarchy of grey wolves [27]. The pack of grey wolves has a special social hierarchy where the leadership in the pack can be divided into four levels; alpha, beta, omega and delta. Alpha wolf (α) is the first level in the social hierarchy hence it is the leader that guides the pack and the other wolves follow its orders. Beta wolf (β) is being in the second level of leadership that helps the alpha wolf directly for the activities of the pack. Delta (δ) wolves come in the third level of hierarchy where, they follow α and β wolves. The rest of wolves are the omegas (ω) that always have to submit to all the other dominant wolves. Figure 2 illustrates the social hierarchy ranking of wolves in GWO. In the mathematical model of GWO, the fittest solution is considered as the alpha (α), where, the second and third best solutions are called beta (β) and delta (δ), respectively. Finally, omega (ω) are considered the rest of the candidate solutions. However, the GWO based on three steps: Encircling prey. B.
Hunting the prey. C.
Attacking the prey.

Encircling Prey
The grey wolves encircle the prey in hunting process that can be mathematically modeled as: where, t is the current iteration, X p is the prey position vector, and X indicates the position vector of a grey wolf. A and C are coefficient vectors that can be calculated as: where, a is a value can be decreased linearly from 2 to 0 with iterations. r 1 and r 2 are random numbers in range [0, 1].

Hunting the Prey
In hunting process, the pack is affected by α, β and δ. Hence, the first three best solutions are saved as best agents (α, β, δ) and the other search agents are updated their positions according to the best agents as: where, i is number of populations (vectors) and j is number of variables (individuals). A 1 , A 2 and A 3 are random vectors. The step size of the ω wolves is expressed in Equations (25)-(27), respectively. The final location of the ω wolves is formulated in Equations (28)-(31).

Attacking the Prey
The last stage in hunting is attacking the prey when the prey stopped. This can be achieved mathematically by reducing the value of a gradually from 2 to 0, consequently, A is varied randomly in range [−1, 1].

Developed Grey Wolf Optimizer
DGWO technique is presented as a new version for the conventional GWO. In this technique, the exploration and exploitation processes of GWO is enhanced. The exploration process is enhanced by integration a random mutation to find new searching regions to avoid the local minimum problem. The random mutation is applied as follows: where, R is a random number over [0, 1]. X new (i,j) is a new generated vector. L and U are the lower and upper limits of control variables, respectively. In the exploitation of DGWO, the search process is focusing on the promising area by updating the search agents around the best solution (X α (i,j) ) in logarithmic spiral function as: where: X α (i,j) : the best position (alpha wolf position).
b: is a constant value for defining the logarithmic spiral shape. q: is a random number [−1, 1].
For balancing the exploration during the initial searching process and exploitation in the final stages of the search process, an adaptive operator is used which changed dynamically as: The procedures of DGWO algorithm for solving the OPF problem can be summarized as follows: (1) Initialize maximum number of iterations (T max ) and search agents (N).
(2) Read the input system data.
(3) Initialize grey wolf population X as: where, n = 1, 2, 3 . . . , j, x min n and x max n are the minimum and maximum limits of control variables which are predefined values. rand is a random number in range [0, 1]. (4) Calculate the objective function for all grey wolf population using Newton Raphson load flow method. (5) Determine X α (i,j) , X β (i,j) , X δ (i,j) (first, second, and third best search agent).
ELSE, END where, Fitness X (i,j) is the objective function of the position vector n while Fitness (X new (i,j) ) is the objective function of the updated position vector j. (10) Repeat steps from (4) to (9) until the iteration number equals to its maximum value.
(11) Find the best vector (X α (i,j) ) which include the system control variables and its related fitness function.
However, the OPF solution process using the DGWO is shown in Figure 3.

Simulation Results
The DGWO is validated using the IEEE 30-bus test system. More details about this system can be found in [31]. The developed code has been written using MATLAB 2015 and the simulation run on a PC equipped with a core i5 processor, 2.50 GHz and 4 GB RAM. The upper and lower operating ranges and coefficients of generators are given in Table 1. The upper and lower limits of the load bus voltage are 1.05 p.u. and 0.95 p.u., respectively. The upper and lower limits of VAR compensation units are 0.00 p.u. and 0.05 p.u., respectively. The working voltage ranges of PV buses is [0.95, 1.1] p.u while the allowable range of transformer taps is [0.9, 1.1].The limits of transmission line power flows are given in [24]. The parameters of DGWO technique are selected as; number of populations = 50, maximum iteration = 100, b = 1, K min = 0.00001 and K max = 0.1. In this study, 100 runs have been performed for all the test cases to calculate the best cost, the worst cost and the average cost.

Case1: OPF Solution without Considering the Valve Point Effects
In this case, the quadratic fuel cost effect is taken as an objective function to be minimized as given in Equation (6). The generator data for this case are listed in Table 1. The optimal control variables for this case obtained by GWO and DGWO techniques are listed in 4th and 5th columns of Table 2, respectively. The obtained fuel cost using GWO and DGWO are 801.259 $/h and 800.433 $/h, respectively. Table 3 gives the fuel costs obtained by GWO, DGWO and other optimization techniques. From Table 3, it can be observed that the obtained results using DGWO are better than those obtained by the others reported optimization techniques in terms of the best, the worst and the average fuel costs. The convergence characteristics of GWO and DGWO for this case are shown in Figure 4. It is clear that DGWO has stable and rapid convergence characteristic.    [14] 800.5099 NA NA SOS [24] 801.5733 801.7251 801.8821 ABC [17] 800.6600 800.8715 801.8674 TS [22] 802.290 NA NA MDE [23] 802.376 802.382 802.404 IEP [15] 802.465 802.521 802.581 TS [15] 802.502 802.632 802.746 EP [16] 802.62 803.51 805.61 TS/SA [15] 802.788 803.032 803.291 EP [15] 802.907 803.232 803.474 ITS [15] 804.556 805.812 806.856 GA [9] 805.937 NA NA

Case 2: OPF Solution Considering the Valve Point Effects
In this case, the OPF problem is solved considering the valve point effect as given in Equation (7). The optimal control variables obtained by the DGWO are given in 6th and 7th columns of Table 2, respectively. The minimum fuel costs obtained by GWO and DGWO are 830.028 $/h and 824.132 $/h, respectively. Table 4 gives the fuel costs obtained by DGWO, GWO, and other techniques under the same conditions (control variable boundaries, dependent variables limits and system constraints).
From Table 4, it can be observed that the obtained results from DGWO are better than those obtained by GWO and the other techniques. Figure 5 shows the convergence characteristics of the minimum fuel cost of the GWO and DGWO. From this figures, it can be observed that the DGWO is converged faster than GWO. Table 2 gives the active power losses, voltage stability index and summation of voltage deviations. From this table, it can be observed that some values are increased for DGWO compared with GWO, this due to these values are not considered as objective functions. As it is well known that the optimization of single objective function probably not lead to enhance the other functions.   [20] 825.6921 NA NA SFLA [20] 825.9906 NA NA PSO [20] 826.5897 NA NA SA [20] 827.8262 NA NA

Case 3: OPF Solution Considering Piecewise Quadratic Fuel Cost Function
In this case, piecewise fuel cost function is taken as an objective function as given in Equation (8). In this case, two generation units at buses 1 and 2 are represented by piecewise quadratic cost functions [16]. The generated active power and the generation unit coefficients for this case are given in Table 5. The optimal control variables obtained by GWO and DGWO are listed in 8th and 9th columns of Table 2, respectively. The minimum piecewise fuel costs obtained by GWO and DGWO are 646.426 $/h and 645.913 $/h, respectively. The piecewise fuel costs obtained by DGWO, GWO, and other techniques given in Table 6. From Table 6, it can be observed that the obtained results from DGWO are better than those obtained by GWO and the other techniques in terms of the best, the worst and the average piecewise fuel costs. Figure 6 shows the convergence characteristics of the minimum fuel cost of the GWO and DGWO for this case. It is clear that DGWO has fast and stable convergence characteristic compared with GWO.

Conclusions
In this paper, DGWO has been proposed to efficiently solve the OPF problem and avoid the stagnation problems of the traditional GWO. This technique is based on modifying the grey wolf optimizer by employing a random mutation for enhancing its exploration process. This modification provides a flexibility to search in new areas. Moreover, the new generated populations are updated around the best solution in a spiral path to enhance the exploitation process and focus on the most promising areas. In the proposed technique, two equations should be added to the traditional GWO, the first equation is related to the random mutation and the second one for the spiral path updating process. The results obtained by the proposed algorithm have been compared with those obtained by the conventional GWO and other well-known optimization techniques. From the results obtained, it can be concluded that:

-
The proposed technique has successfully performed to find the optimal settings of the control variables of test system. -Different objective functions (quadratic fuel cost minimization, piecewise quadratic cost minimization, and quadratic fuel cost minimization considering the valve point effect) have been achieved using the proposed algorithm. - The superiority of DGWO compared with the conventional GWO and other well-known optimization techniques has been proved. -DGWO has a fast and stable convergence characteristic compared with the conventional GWO.
In the future work, the proposed algorithm will be applied in other planning and expansion studies in power systems with thermal and renewable generation units considering the uncertainties of load.
Author Contributions: M.A., S.K. and M.E. proposed the idea, obtained the results, and wrote the paper. J.Y. and F.J. contributed by drafting and critical revisions. All authors together organized and refined the manuscript in the present form. Magnitude of node voltage R, X, Z Resistance, reactance, impedance P, Q, S Active, reactive, apparent powers X The location of the present solution q A random number X new New generated vector α, β, δ, ω Alpha, beta, delta, omega fittest solutions C, C 1 ,C 2 ,C 3 Random vectors