Moth flame optimization to solve optimal power flow with non-parametric statistical evaluation validation

This article demonstrates an appositeness of a novel metaheuristic optimization algorithm viz. the moth flame optimization (MFO) to solve various nonconvex, non-linear optimum power flow (OPF) objective functions. MFO is based on movement of moths with respect to the source of light. In this paper, five single objective functions are selected for solving the OPF problem: generator fuel cost minimization under various realistic conditions, real power loss reduction, and emission minimization. Simulations are performed on the IEEE 30-bus system to identify efficacy of the proposed method. Results obtained by MFO are collated with other stochastic methods reported in literature. Comparison reflects that MFO obtains optimum value with rapid and smooth convergence. Statistical tests like Wilcoxon test, Quade test, Friedman test and Friedman aligned test are also carried out to check the effectiveness of the MFO. Comparison of MFO with other stochastic algorithms demonstrates superiority of MFO in terms of solution excellency and solution feasibility, substantiating its effectiveness and competence. Subjects: Evolutionary Computing; Power & Energy; Energy & Fuels; Power Engineering; Engineering Economics


Introduction
Safe and pecuniary operating conditions of a power system can be determined using optimal power flow (OPF). The aim of the OPF is to identify the optimal settings of a given power system network that can enhance a definite objective function while meeting its power flow equation

PUBLIC INTEREST STATEMENT
Limited availability of fossil fuel keeps tab on power generation albeit increasing demand. Not only that, power systems are compelled to operate close to their stability limits with growing power demand. Increased use of fossil fuel also raises pollution level. Thus, it is imperative to set balance among such often contradictory objectives. Researchers have employed various methods for solving non-linear, discontinuous OPF objective function. This perspective article describes application of Moth Flame Optimization algorithm to optimize objectives of optimal power flow problem. Various objectives were optimized using MFO and compared with other contemporary methods, which was used to illustrate efficacy of the proposed method. Statistical analysis suggests that MFO optimizes various objective function significantly.
control variables like generators real output power and voltages, transformer tap setting, phase shifters, switched capacitors and reactors are manipulated to reach the finest network settings based on the problem design. The most frequently used objective functions are the minimization of active power loss, bus voltage deviation, emission of generating units, load shedding etc.
A newly introduced Moth Flame Algorithm (Mirjalili, 2015) to solve OPF problem for both smooth and non-smooth function is presented in this article. MFO is a novice to solve power system problem and hence, it is proposed to validate MFO to solve OPF problem. Till date, Trivedi, Jangir, Parmar, and

Designing the OPF problem
The OPF is considered as a general optimization problem. Conventionally it was aimed to minimize the total fuel cost function while satisfying various equality and inequality constraints. Nowadays, OPF problem also aims to minimize voltage deviation, voltage stability index, active and reactive power loss, minimizing emission etc. The OPF also provides optimal values of control variables for optimized objective function. Mathematically, it can be expressed as: where f represents the objective function. x and u represent equality and non-equality limits of the system. h and g represent the state and control variables respectively.
where h represents the state variables consisting of real power generation at the slack bus, voltage magnitude at load buses, reactive power generation, and transmission line loading.
where, g represents the control variables comprising of real power generation at all PV buses except slack bus, voltage magnitude at PV bus, output of shunt VAR compensator and transformer tap settings.

Constraints
The OPF problem comprises equality and inequality constraints. Both constraints are described in next subsections.

Equality constraints
The load flow equations are considered as equality constraints in the OPF problem. The mathematical formulation can be given as: (1) Subject to x(h, g) = 0 (3) and u(h, g) ≤ 0 (4) T min

Handling constraints
Independent variables are self-constrained. The inequality constraints of state variables are included in objective function using penalizing concepts. Infeasible solutions are also handled using penalty factors added to the original objective function.

Objective functions
Different objective functions optimized in this article is described as follows:

Quadratic fuel cost function
This is the most preliminary and widely used objective function wherein each generating unit has its own cost curve represented by a quadratic function. Therefore, the objective function representing total fuel cost is given by: where a i , b i and c i are the cost coefficients of ith generator. Quadratic fuel cost curve is shown in Figure 1.

Quadratic fuel cost function with valve-point loading effect
Valve point effect has to be considered for more realistic and precise modeling of fuel cost function. The generators having multi-valve steam turbines express a larger variation in the fuel-cost functions. The valve opening process of multi-valve steam turbines is represented by a ripple-like effect as illustrated in Figure 1 (Bouchekara et al., 2016;Hardiansyah, 2013). With the introduction of valve-point effect, real power cost function becomes non-linear and discontinuous.

Piecewise quadratic fuel cost function
Natural gas and oil may be used in thermal power plants in certain practical cases. Hence, depending on the number and nature of used fuels, fuel cost function curve may be divided as shown in Figure 2 (Bouchekara et al., 2016). Therefore, the total generating fuel cost considering multi-fuels represented by a piecewise function for all the generators can be given by: where, a ik , b ik and c ik indicate cost coefficient of the ith generator for the k type of fuel.

Emission minimization
With growing electricity demand, it is imperative to increase the corresponding generation albeit growing concern about increasing emission of pollutants. Thus, it is desirable to adjust the optimal power flow such that minimum environmental emission takes place. The total ton/h emission of the atmospheric pollutants caused by fossil-fuelled thermal units can be expressed as: where, α i , β i , γ i , ω i and μ i are the emission coefficient of ith generator.

Active power loss minimization
In this problem, the aim is to minimize active power losses. The active power losses can be represented as:

Moth flame optimization
In November 2015, Mirjalili developed a new population-based algorithm known as Moth Flame Optimization algorithm (Mirjalili, 2015). This algorithm is inspired by the transverse movement of moths found in nature.

Features of moths
Moths are insects; they have special movement mechanism in the night which is called transverse orientation. They y at night by keeping a fixed angle with respect to the moon, this method is very helpful for moving in a straight line especially when the light source is at distant. When the light source is near, moths fly spirally around it and eventually converge toward it after just a few improvements as presented in Figure 3 (Mirjalili, 2015).

MFO algorithm
The main ingredients in the MFO algorithm are moths and flames where both of them are conceived as results, however, they dissever in the way of their dealing and their updating during each iteration. The moths are veritable search agents that move around the search space, while flames are the best position of moths that obtained so far. Thus, flames can be considered as flags that are dropped by moths when searching the search space. Therefore, each moth searches around a flame and updates itself in case of finding a better solution. In this manner, a moth never loses its best position (Mirjalili, 2015). Being population-based algorithm, set of moths can be represented in a matrix as shown below: where n is the number of moths and d is the number of variables (dimension).
For all the moths, we also assume that there is an array for storing the corresponding fitness values as follows: where n is the number of moths.
Accordingly, the flames can be represented also in a matrix similar to the moths matrix as follows: Corresponding array to store fitness values is given by: The general texture of the MFO algorithm includes three-tuple estimation functions that are summarized as follows: Random population of moths is created by I. Corresponding fitness values of moths are given by: where ul and ll represents upper and lower limits of variables.
After the initialization, the P function is iteratively run until the T termination function is met. The moths move around the search space due to P function. As mentioned before, the intuition of this algorithm is the transverse orientation of moths. Thus, the logarithmic spiral function is chosen as the main arrangement for updating position of each moth with respect to the flame. The position of each moth with regard to a flame is updated as per Equation (26).
The logarithmic spiral is given by Equation Here, D i represents distance of the ith moth from jth flame, b is a constant for announcing the shape of the logarithmic spiral, and t is a random number in [−1; 1].
where M i indicates the ith moth, F j indicates the jth flame, and D i indicates distance of the ith moth for the jth flame. To speed up convergence around the flames, adaptive convergence constant r linearly decreases from −1 to −2 over the course of iterations. The lower the t, the lesser the distance to the flame.
The spiral equation motivates a moth to fly around a flame and not essentially in the space between them Figure 4 illustrates the updated moth positions around the flame. Arrows 1, 3 and 4 represents exploration as the next position is outside the space between the moth and the flame. Arrow labeled as 2 presents the exploitation as the next position lies inside the space between the moth and flame. To correct proposition between the exploration and exploitation, the number of flames is adaptively reduced over the iterations.
Consequently, the moths update their positions only with respect to the best flame in the final steps of iterations. Some important observations about MFO algorithm can be stated as: • Exploration of search space can be increased by assigning each moth a flame and updating the sequence of flames in each iteration. This also helps to avoid the chances of local optima stagnation.
• The most recent best solution obtained works as a guide for moths. Due to it, moths never get trapped in stagnation and convergence is guaranteed.
• Exploration and exploitation can be balanced using an adaptive number of flames.
• Adaptive convergence constant (r) causes accelerated convergence around the flames over the course of iterations.
In this study, a maximum number of iterations considered is 500. A number of search agents considered are 40 and algorithm is run for 20 times for each objective function.

Evaluation analysis
The MFO method has been applied on IEEE 30-bus test system for solving the Optimal Power Flow Problem. The main characteristics of IEEE 30-bus test system are tabulated in Table 2. Total active power demand is 283.4 MW and total reactive power demand is 126.2 MVAR. Single line diagram of the test system is shown in Figure 5. Cost and emission coefficients are tabulated in Table 3. Table 5 presents cost coefficients when the multi-fuel option is considered. Minimum and maximum voltages at all buses are considered between 0.95 and 1.05 p.u. The simulation studies are performed by using a 2.4 GHz Pentium IV personal computer having 16.0 GB RAM and MATLAB program package. In order to show the efficacy of proposed method, it has been tested on different cases having different complexities. Different objective functions used to test the efficacy of MFO is tabulated in Table 4.

The OPF problem with basic quadratic fuel cost function
For this test case, OPF problem is solved for basic quadratic fuel cost function. Minimum fuel cost obtained using this method is 799.2029 $/h. Results obtained by proposed method is compared with other methods reported are tabulated in Table 5. From Table 6, it is evident that MFO outperforms other algorithms reported in the literature. The convergence curve of the proposed method for the minimum fuel cost is shown in Figure 6. Variation of fuel cost per iteration for each run is shown in Figure 7. From Figure 7, it is apparent that MFO explores and exploits search efficiently.

Minimization of piecewise quadratic fuel cost function
Thermal power plants may have several fuel sources like oil, gas, and coal. The mathematical formulation for the fuel cost curve of these generators 1 and 2 can be considered as a set of constraints as given by Equation (17). Minimum fuel cost obtained by MFO is 645.4484 $/h. Again, it is evident that MFO performs better than all other methods reported in the article. Smooth convergence characteristics obtained by MFO is sketched in Figure 8. Figure 9 represents the variation of fuel cost per iteration during each run for case 2. Again it is evident that MFO adequately exploits and explores search space to determine global minimum.

Minimization of fuel cost function with valve-point loading effect
In this case, valve-point loading effect is modeled as an absolute sine function added to the cost function of unit 1 and 2 and mathematically it can be expressed by Equation (1). The logarithmic spiral path is used as updating mechanism in MFO. Objective function of Case 3 also resembles similarity being non-linear in nature and thus, expected to come up with the current problem more efficiently (Table 7). It is evident from Figure 10 that MFO is capable of handling such non-linearity and converges to optimum value smoothly. MFO is also able to provide better results as compared to methods reported in the literature as illustrated in Table 8. Figure 11 represents the variation of fuel cost per iteration for each run.

Emission minimization
Emission from conventional generating stations is reduced by optimizing Equation (18). It is observed that MFO performs comparable as compared to other methods reported in the article as tabulated in Table 9. Convergence characteristics and variation of emission over the iterations for each run is sketched in Figures 12 and 13 respectively.

Minimization of active power loss
The objective of this case is to minimize active power loss in the transmission network. The objective function is represented by Equation (19). Objective functions of case 1 and case 5 are almost similar and hence, convergence characteristics are also almost similar. It is also evident from Table 10 that MFO outperforms all other methods considered. Best value of active power losses obtained using MFO is 2.9308 MW. Figure 14 represents smooth convergence characteristics obtained by MFO. Figure 15 represents the variation of active power loss with iterations for each run.
Comparison of absolute values of MFO with other algorithms is tabulated in Table 11. Careful study of the table reveals that MFO provides better results than other similar methods in the majority of cases.

Statistical performance evaluation
In this article, five different case studies are studies. MFO outperforms other methods in 4 cases out of 5. The majority of authors have considered best value, average value, standard deviation to prove superiority and efficacy of one algorithm over another. Judging one algorithm using such criteria is not sufficient. Qualitative results in terms of convergence curve proved high exploration and exploitation of the MFO algorithm, but they cannot show how much good this algorithm is. This section employs performance indicators to quantify the performance of the MFO algorithm and compares it with other similar algorithms in the literature. The former performance metric in Section 5 shows how the MFO algorithm performs in best values indicate and how stable MFO is during all the runs. Although this indicator is able to measure the overall performance of MFO, they cannot measure and compare each of the runs individually. In order to compare each of the runs and signify the results,   using Wilcoxon test, Quade test, Friedman test, and Friedman aligned test (Derrac, García, Molina, & Herrera, 2011). Authors can refer to for further information on the non-parametric test applied to optimization algorithms.

Validation by Wilcoxon signed ranked test
Wilcoxon signed rank test method (Gibbons & Chakraborti, 2011) is used to validate comparative study amongst different optimization algorithms. In this test, the null Hypothesis H0 and the alternate Hypothesis H1 are stated. The level of significance associated with null hypothesis is fixed. Value required for rejecting the null hypothesis is determined and is compared with the critical value. Depending upon rejection or acceptance of null hypothesis, results are inferred. In this article, Wilcoxon signed rank test is used for performance evaluation of MFO vs. MPSO, MDE, MSA and FPA as shown in Table 12. The following procedure is used to perform Wilcoxon signed ranked test in this paper: Step 1: Best values of objective functions for all cases obtained by MFO and a given algorithm say A is collected.
Step 2: Sum of ranks for cases where MFO outperforms A and vice versa are used to compute R + and R − .
Step 3: To ascertain the significance of statistical test based on hypotheses, p-value is computed. A Smaller value of p represents stronger evidence against H0.
Step 4: Results are interpreted to validate the results.
From Table 12, conclusions can be drawn that MFO shows a significant improvement over MPSO, MDE, MSA and FPA.  Figure 15. Variation of active power loss during search process for case 5.

Validation by Quade test
Quade test (Quade, 1979) takes into account the fact that certain problems are comparatively more difficult or that the differences registered on the run of various algorithms over them are larger. The first step in calculating the test statistic is to convert original results into ranks. The following procedure is adopted to compute the ranks.
• Results for each algorithm/problem pair are collected.
• For each problem i, rank values from 1 to k. Denote these ranks as r j i . • Calculate the sample range. Sample range can be calculated by finding the difference between the largest and the smallest observations within that problem i.
• Assign rank to the problems according to the size of the sample range in each problem. The problem with the smallest range will be assigned rank 1, followed by second smallest and so on. Average ranking is used in case of ties.  Table 13 suggests that MFO achieves the smallest rank among all algorithms and hence, MFO is judged as the best performing algorithm among all considered.

Validation by Friedman test
Nonparametric analog of parametric two-way analysis of variance is the Friedman test (Friedman, 1937(Friedman, , 1940. The null hypothesis for Friedman's test assumes similitude of medians between the results obtained by different algorithms. The alternate hypothesis is the abnegation of the null hypothesis. The preliminary step of calculating the test statistic is to convert the original results into ranks. Ranks are computed by the following procedure.
• Collect observed results for each algorithm/problem pair.
• For each problem i, rank values from best i.e. 1 to worst i.e. k. Denote these ranks as r j i (1 ≤ j ≤ k).
• For each algorithm j, determine the average of ranks obtained in all problems to obtain the final rank.
• The algorithm with the smallest rank is judged as the best algorithm.
• Friedman test results are tabulated in Table 14. It is evident that MFO outperforms all other methods considered as again MFO secured the first rank among all considered.

Validation by Friedman aligned test
In this method, a value of location is computed as the mean outturn obtained by all algorithms in each problem (Derrac et al., 2011). Then, the variation between the outturn achieved by an algorithm and the value of locations is acquired. This step is repeated for each combination of algorithms and problems. The aligned observations are then ranked from 1 to k relative to each other. For given test case, results obtained by Friedman aligned test is tabulated in Table 15. Again it is apparent that, MFO ranks first outperforming MPSO, MSA, MDE and FPA.  In Section 5, optimal fuel cost obtained using MFO under different operating conditions, emission and active power loss are compared with results obtained using other well-known algorithms reported in the literature. It can be concluded that MFO provides better results on four of test functions. In this section, four different statistical tests are performed to validate the results. Statistical tests are important to validate run wise performance of the algorithm. According to this comprehensive comparative study, the following conclusion remarks can be made (Mirjalili, 2015): (1) MFO updates positions obtaining neighboring solutions around the flames thus promoting exploitation.
(2) Local optima avoidance is high due to the population of moths.
(3) Assigning each moth a flame and updating the sequence of flames in each iteration increase exploration of the search space and decreases the probability of local optima stagnation.
(4) Flames act as promising solutions as guides for moths.
(5) Best solutions are saved in a flame matrix so best solutions never get lost.
(6) An adaptive number of flames balances exploration and exploitation.
(7) Adaptive convergence constant causes accelerated convergence around the flames over the course of iterations.
Above points differentiate search mechanism of MFO than other methods. Spiral search technique of MFO makes MFO suitable for solving non-linear, non-convex and discontinuous objective functions and hence, MFO is capable of providing comparable or better results than other methods reported in the literature.

Conclusion
In this paper, a novel MFO paradigm has been presented and applied to solve several OPF objective functions in IEEE 30-bus test power systems. Results obtained are compared with other methods reported in the literature. Different statistical tests are performed to ascertain that results obtained are not by chance. From the obtained results, we can suggest that the MFO algorithm is appropriate for solving the non-smooth and complex problems. In addition, the comparative study of the proposed algorithms and published OPF solution methods concerns the primacy of the proposed paradigm and its potential to find legitimate and evolved solutions.
As a part of future work, the same concept can be extended to larger systems with increased complexity. Development of multiobjective MFO to solve multiobjective OPF can also be considered one the potential future research avenue.