# Adaptive Firefly Algorithm based OPF for AC/DC Systems

• Babu, B. Suresh (Dept. of Electrical and Electronics Engineering, Odaiyappa College of Engg & Tech) ;
• Palaniswami, S. (Dept. of Electrical and Electronics Engineering, Government College of Engineering)
• Accepted : 2015.12.15
• Published : 2016.07.01
• 78 20

#### Abstract

Optimal Power Flow (OPF) is an important operational and planning problem in minimizing the chosen objective functions of the power systems. The recent developments in power electronics have enabled introduction of dc links in the AC power systems with a view of making the operation more flexible, secure and economical. This paper formulates a new OPF to embrace dc link equations and presents a heuristic optimization technique, inspired by the behavior of fireflies, for solving the problem. The solution process involves AC/DC power flow and uses a self adaptive technique so as to avoid landing at the suboptimal solutions. It presents simulation results of IEEE test systems with a view of demonstrating its effectiveness.

#### Keywords

Optimal power flow;AC/DC power flow;Firefly optimization

# 1. Introduction

The optimal power flow (OPF) has been widely used in power system operation and planning since its introduction by Carpenter in 1962 [1]. The OPF determines optimal settings for certain power system control variables by optimizing a few selected objective functions while satisfying a set of equality and inequality constraints for given settings of loads and system parameters. The control variables include generator active powers, generator bus voltages, transformer tap ratios and the reactive power generation of shunt compensators. In general, the total fuel cost (FC) is commonly used as the main objective for OPF problems. However, the other objectives, such as reduction of real power loss (RPL), improvement of the voltage profile (VP) and enhancement of the voltage stability (VS) can also be included, as it has progressively become easy to formulate and solve large-scaled complex problems with the advancement in computing technologies. The equality constraints are the power flow balance equations, while the inequality constraints are the limits on the control variables and the operating limits of the power system dependent variables.

The recent developments in power electronics have introduced DC transmission links in the existing AC transmission systems with a view of achieving the benefits of reduced network loss, lower number of power conductors, increased stability, enhanced security, etc. They are often considered for transmission of bulk power via long distances. The attributes of DC transmission links include low capacitance, low average transmission cost in long distances, ability to prevent cascaded outages in AC systems, rapid adjustments for direct power flow controls, ability to improve the stability of AC systems, mitigation of transmission congestion, enhancement of transmission capacity, rapid frequency control following a loss of generation, ability to damp out regional power oscillations following major contingencies and offering major economic incentives for supplying loads. Flexible and fast DC controls provide efficient and desirable performance for a wide range of AC systems. The existing OPF problem can be modified to handle AC/DC systems [2-3]. The resulting optimization problem, designated as OPF with DC links (OPFDC), is a large scale, non-linear non-convex and multimodal optimization problem with continuous and discrete control variables. The existence of nonlinear power flow constraints and the DC link equations make the problem non-convex even in the absence of discrete control variables [4].

In the recent decades, numerous mathematical programming techniques such as gradient method [1], linear programming [5], nonlinear programming [6], interior point method [7] and quadratic programming [8] with various degrees of near-optimality, efficiency, ability to handle difficult constraints and heuristics, have been widely applied in solving the OPF problems. Although many of these techniques have excellent convergence characteristics, they have severe limitations in handling non-linear and discontinuous objectives and constraints. The gradient method suffer from the difficulty in handling inequality constraints; and the linear programming requires the objective and constraint functions to be linearized during optimization, which may lead to the loss of accuracy. Besides they may converge to local solution instead of global ones, when the initial guess is in the neighborhood of a local solution. Thus there is always a need for simple and efficient solution methods for obtaining global optimal solution for the OPF problems.

Apart from the above methods, another class of numerical techniques called evolutionary search algorithms such as genetic algorithm (GA) [9], evolutionary programming [10], particle swarm optimization (PSO) [11], differential evolution [12], frog leaping [13], harmony search optimization (HSO) [14], gravitational search [15], clonal search [16], artificial bee colony [17] and teaching-learning [18] have been widely applied in solving the OPF problems. Having in common processes of natural evolution, these algorithms share many similarities; each maintains a population of solutions that are evolved through random alterations and selection. The differences between these procedures lie in the techniques they utilize to encode candidates, the type of alterations they use to create new solutions, and the mechanism they employ for selecting the new parents. These algorithms have yielded satisfactory results across a great variety of power system problems. The main difficulty is their sensitivity to the choice of the parameters, such as the crossover and mutation probabilities in GA and the inertia weight, acceleration coefficients and velocity limits in PSO.

Recently, firefly optimization (FO) has been suggested by Dr. Xin-She Yang for solving optimization problems [19]. It is inspired by the light attenuation over the distance and fireflies’ mutual attraction rather than the phenomenon of the fireflies’ light flashing. In this approach, each problem solution is represented by a firefly, which tries to move to a greater light source, than its own. It has been applied to a variety of engineering optimization problems and found to yield satisfactory results. However, the choice of FO parameters is important in obtaining good convergence and global optimal solution.

This paper formulates the problem of OPFDC, suggests a solution methodology involving a self adaptive FO (SFO) with a view of obtaining the global best solution and demonstrates its performance through simulation results on the modified IEEE 30, 57 and 118 bus systems.

# 2. Problem Formulation

The exercise is to identify the optimal control parameters such as generator active powers, generator bus voltages, transformer tap ratios and the reactive power generation of shunt compensators, besides determining the DC control parameters. The formation of the problem involves both the AC and DC sets of equations. The AC set of equations are the standard AC power balance equations whereas the DC set equations represent power, current and voltage balance equations at both DC and AC terminal buses of DC links. Moreover the DC link can be operated in different modes such as constant current, constant power, etc [8]. In this formulation, DC links with constant current control are considered. The OPFDC problem is formulated as a constrained nonlinear optimization problem through combining the standard OPF problem and the DC link equations as

Subject to

where

The objective function Φ(x, u) can take different forms. Seven different cases involving FC, RPL, VP and VS, which are calculated from the power flow solution, are considered in tailoring the objectives in this paper.

Case-1: Minimization of fuel cost

Case-2: Minimization of real power loss

Case-3: Enhancement of voltage stability

The VS can be enhanced by minimizing the Largest value of VS index (LVSI) of load buses [20] as

The multi-objective OPFDC problem is tailored by combining several objectives through weight factors so as to optimize all the objectives simultaneously.

The different cases comprising several objectives considered in this paper are:

Case-4 : FC and RPL

Case-5 : FC and VS

Case-6 : RPL and VS

Case-7 : FC, RPL and VS

# 3. Equations and Units

The FO is a metaheuristic, nature-inspired, optimization algorithm which is based on the social flashing behavior of fireflies. FO initially produces a swarm of fireflies located randomly in the search space. In each iterative step, the positions of the fireflies are updated based on the brightness and the relative attractiveness of each firefly. After a sufficient amount of iterations, all fireflies converge to the best possible position on the search space [19]. The self-adaptive control of the parameters αi , βo and γ during the search process effectively leads the algorithm to land at the global best solution with minimum computational effort. The proposed method (PM) involves representation of problem variables that include the control variables and self-adaptive parameters, αi , βoi and γi ; and the formation of a light intensity function, LI.

## 3.1 Representation of decision variables

The converters at both ends of the DC links draw lagging reactive power and pose a burden to the existing power system. If of shunt compensators are taken as decision variables, the optimization algorithm will adjust them to settle at their respective maximum limit in order to supply the reactive power requirements of the DC link converters. So of shunt compensators are not treated as variables in the PM and set to supply reactive power at their respective capacities. The decision variables in the PM thus comprises real power generation at PV buses, voltage magnitudes at generator buses, transformer tap settings, DC link currents, α , βo and γ . Each firefly in the PM is defined to denote these decision variables in vector form as

## 3.2 Intensity function

The SFO searches for optimal solution by maximizing a light intensity function, denoted by LI, which is formulated from the objective function of Eq. (1) and the penalty terms representing the limit violation of the dependant variables such as reactive power generation at generator buses, voltage magnitude at load buses and real power generation at slack bus. The LI can be built as

where

The power system is altered through setting the control parameters of for each firefly. The AC/DC power flow is then run with a view of computing the objective function Φ(x, u) and the light intensity function LI.

## 3.3 Solution Process

An initial swarm of fireflies is obtained by generating random values within their respective limits to every individual in the swarm. The LI is calculated by considering the values of each firefly and the movements of all fireflies are performed with a view of maximizing the LI till the number of iterations reaches a maximum specified number of iterations Itermax . The pseudo code of the PM is as follows.

Choose the parameters, nf and Iter max .

Generate the initial population of fireflies

Set the iteration counter t = 0

while (termination requirements are not met) do

for i = 1 : nf

•Set the control parameters according to i -th firefly values

•Obtain the values for αi , βo and γ from the firefly

•Run AC/DC power flow

•Evaluate the augmented objective function ΦA and light intensity function LIi using Eqs. 16 and 15 respectively

for j = 1 : nf

•Set the control parameters according to j -th firefly values

•Obtain the values for αi , βo and γ from the firefly

•Run AC/DC power flow

•Evaluate the augmented objective function ΦA and light intensity function LIi using Eqs. 16 and 15 respectively

if LIi < LIj

Compute

Evaluate βi,j = βo,i exp ()

Move i -th firefly towards j -th firefly through

fi (t) = fi (t－1) + βi,j (fj (t－1) － (fj (t－1) + α (rand－0.5)

end-(if)

end-( j )

end-(i )

Rank the fireflies and find the current best.

end-(while)

Choose the best firefly possessing the largest LIi in the population as the optimal solution

# 4. Simulations

The PM is tested on IEEE 30, 57 and 118 bus test systems. The fuel cost coefficients, lower and upper generation limits for these two test systems are taken from Ref. [21-23]. The DC link data are given in Table A.1 of the Appendix-A. The lower and upper voltage limits for both load and generator buses are taken as 0.95 and 1.1 per units for 30 bus system, while for 57 and 118 bus systems they are taken as 0.94 and 1.1 per units. In the analysis, two, three and five transmission lines, as listed in Table 1, are replaced by dc links for IEEE-30, -57 and -118 bus systems respectively. In addition, the initial generations at PV buses are modified with a view making all the generations to share the load demand besides setting them within their respective limits and given along with results. The sequential AC/DC power flow involving NR technique is used during the optimization process [4]. Programs are developed in Matlab 7.5 and executed on a 2.67 GHz Intel core-i5 personal computer. The OPFDC problem is also solved using the PSO and HSO with a view of demonstrating the efficacy of the PM.

Table 1Transmission lines replaced by DC links

The optimal solution obtained by the PM, PSO and HSO for all the test cases for 30 and 57 bus systems are given through Tables B.1 and B.2 respectively in Appendix-B. The performances in terms of FC, RPL, LVSI and lower and upper VM at load buses of PM and are compared with those of the PSO and HSO based algorithms for test cases 1-7 in Tables 2, 3 and 4 for 30, 57 and 118 bus system respectively. The tables 2, 3 and 4 also contain the base-case results, representing the performances before optimization.

Table 2Comparison of Performances for 30 bus system

Table 3Comparison of Performances for 57 bus system

Table 4.Comparison of Performances for 118 bus system

Case-1: The objective in this case is the minimization of the FC. It is observed from Table 2 that the PM reduce the FC from 813.6941 $/h to 800.9169$/h but the PSO and HSO are able to reduce the FC to 802.2393 and 801.0114 $/h respectively for 30 bus system. In case of 57 bus system from Table 3, the initial FC of 4556.5930$/h is reduced to 3812.6312, 3813.6148 and 3812.9687 $/h by the PM, PSO and HSO respectively. Similarly for 118 bus system, the initial FC of 145520.36$/h is reduced to 129660.92, 129915.47 and 129872.99 \$/h by the PM, PSO and HSO respectively as given in Table 4. It is very clear from the results that the PM offers best possible control settings with optimal dc link parameters, which minimize the FC to the lowest possible value, when compared with those of PSO and HSO. It is to be noted that PM offers better control settings with optimal dc link parameters, resulting in lower FC than those of PSO and HSO. The % FC savings of PM is graphically compared with those of PSO and HSO in Fig. 1 for all the test systems. It is seen from the figures that the %FC savings of PM is greater than those of PSO and HSO. As minimization of RPL and LVSI are not considered as objectives in this case, the RPL and LVSI are away from the respective best values for all the test systems, while reducing the FC.

Fig. 1Comparison of % FC Savings

Case-2: The minimization of the RPL is considered as the objective in this case. It is observed from Table 2 that the initial RPL of 7.0990 MW is reduced to 3.2066, 3.4543 and 3.2552 MW by the PM, PSO and HSO respectively. Similarly, PM, PSO and HSO reduce the initial RPL of 28.8037 MW to 13.6551, 14.3978 and 13.9190 MW respectively for 57 bus system, as given in Table 3. In case of 118 bus system, the initial RPL of of 197.28 MW is reduced to 93.73, 96.15 and 95.02 MW by the PM, PSO and HSO respectively, as indicated in Table 4. It is very clear from the results that the offers best possible control settings with optimal dc link parameters, which minimize the RPL to the lowest possible value, when compared with those of PSO and HSO. It is to be noted that PM offers better control settings with optimal dc link parameters, resulting in lower RPL than those of PSO and HSO. The % RPL savings of PM are graphically compared with those of PSO and HSO in Fig. 2 for all the test systems. It is seen from the figures that the %RPL savings of PM is greater than those of PSO and HSO. As minimization of FC and LVSI are not considered as objectives in this case, the FC and LVSI are away from the respective best values for all the test systems, while reducing the RPL.

Fig. 2Comparison of % RPL Savings

Case-3: The objective in this case is the enhancement of VS through minimizing of the LVSI. It is observed from Table 2 that the PM and reduce the LVSI from 0.1336 to 0.1210 but the PSO and HSO are able to reduce the LVSI to 0.1225 and 0.1212 respectively for 30 bus system. Similarly, PM, PSO and HSO reduce the initial LVSI of 0.2887 to 0.2405, 0.2406 and 0.2408 respectively for 57 bus system, as indicated in Table 3. In case of 118 bus system, it can be noticed from Table 4 that the initial LVSI of 0.3714 is reduced to 0.3153, 0.3169 and 0.3158 respectively for PM, PSO and HSO. It is very clear from the results that the PM offers best possible control settings with optimal dc link parameters, which minimize the LVSI to the lowest possible value, when compared with those of PSO and HSO. It is to be noted that PM offers better control settings with optimal dc link parameters, resulting in lower LVSI than those of PSO and HSO. The %VS enhancements of PM is graphically compared with those of PSO and HSO in Fig. 3 for all the test systems. It is seen from the figures that the %VS enhancements of PM are greater than those of PSO and HSO. As minimization of FC and LVSI are not considered as objectives in this case, the FC and RPL are away from the respective best values for all the test systems, while enhancing the VS.

Fig. 3Comparison of % VS enhancement

Cases-4-7: The performances in terms of FC, RPL and LVSI of PM are compared with those of the PSO and HSO based algorithms for test cases 4-7 in Tables 2, 3 and 4 for 30 57 and 118 bus systems. It is seen from the results of cases 4-7 that the PM and as well as the PSO and HSO offer a compromised solution, which lies in between the respective best and worst objective function values obtained in cases-1-3. While analyzing the performances, it can be observed that if one performance among the chosen objectives decreases, the other increases due to the conflicting nature of the objectives and vice-versa. The quality of the compromised solutions cannot be estimated as it depends on the weight values assigned to the individual objectives and the range of the each objective function values. It is known that another compromised solution can be obtained by simply changing the weight parameter of each objective.

The lower and upper load bus voltages of all the cases of the PM are graphically displayed in Fig. 4 for 30, 57 and 118 bus systems. It is seen from these figures that the PM adjust all the bus voltages to lie within the respective lower and upper limits for all the test cases, thereby ensuring acceptable voltage profile.

Fig. 4Lower and upper VMs

The HSO generates a new harmony, while SFO and PSO produce as many off-springs as the population size in each iteration. Therefore, 25 iterations of HSO is considered to be equivalent to one iteration of SFO and PSO while studying the convergence of the algorithms. The convergence characteristic that represents the variation of FC against the number of iterations of the PM, PSO and HSO based approaches for case-1 of 30 bus system are shown in Fig. 5. The figure indicates that the PM quickly converge to the final solution in less than 45 iterations, while PSO and HSO requires around 70 and 55 iterations respectively. It is very clear that the PM is able to converge to the global best solution at lower number of iterations than those of the existing PSO and HSO based approaches.

Fig. 5Convergence characteristics for case-1 of 30 bus system

# 5. Conclusion

The study of OPF is an important analysis in power system operational planning. A self adaptive FO strategy for multi-objective OPF problem for AC/DC systems is suggested with a with a view to prevent sub-optimal solutions. FO is a biology inspired and population-based stochastic optimization technique and a worthy competitor to its better known siblings. The FO is a meta heuristic, nature-inspired, optimization algorithm which is based on the social flashing behavior of fireflies. It is inspired by the light attenuation over the distance and fireflies’ mutual attraction rather than the phenomenon of the fireflies’ light flashing. The solutions are treated as fireflies and adjusted depending on the light intensities, light attenuation and mutual attraction between fireflies to find the best solution. The algorithm uses sequential AC/DC load flow involving NR technique for computing the objective function during search and is able to offer the global best solution. The results on OPF problem project the ability of the proposed strategy to produce the global best solution involving lower computational burden. It has been chartered that the new approach for solving OPF will go a long way in serving as a useful tool in load dispatch centre.

# Nomenclature

#### References

1. Carpentier, J, “Contribution a l’Etude du Dispatching Economique,” Bulletin de la Societe Francaise des Electriciens, vol. 3, pp.431-474, 1962.
2. Cong Ji, Zhi-nong Wei, Guo-qiang Sun, Yong-hui Sun, “AC-DC Decoupling Algorithm of Optimal Power Flow with HVDC System,” Applied Mechanics and Materials, vol.457, pp.1107-1112, 2014.
3. Wang Feng , Le Anh Tuan, Lina Bertling Tjernberg, Anders Mannikoff and Anders Bergman, “A New Approach for Benefit Evaluation of Multiterminal VSC–HVDC Using a Proposed Mixed AC/DC Optimal Power Flow,” IEEE Trans. on Power Delivery, vol.29, no.1, 432-443, 2014.
4. J.Arrillaga, C.RArnold and B.J.Harker, “Computer Modeling of Electrical power systems,” John Wiley & sons Ltd, pp.168-185, 1983.
5. K. Mangoli, and K.Y. Lee, “Optimal real and reactive power control using linear programming, Electrical Power System Research,” vol.26, no.1, pp.1-10, 1993. https://doi.org/10.1016/0378-7796(93)90063-K
6. O.Alsac,and B. Scott, “Optimal load flow with steady state security, IEEE Transactions on power Apparatus and systems,” vol.PAS, pp.745-751, 1974.
7. Momoh JA and Zhu JZ, “Improved interior point method for OPF problems,” IEEE Trans Power Syst., vol.14, no.3, pp.1114-20, 1999. https://doi.org/10.1109/59.780938
8. Burchett RC, Happ HH and Vierath DR, “Quadratically convergent optimal power flow,” IEEE Trans Power Apparatus Syst., vol. 103, pp. 3267-76, 1984.
9. Abdel-Fattah Attia, Yusuf A.Al-Turki and Abdullah M.Abusorrah, “Optimal power flow using adapted genetic algorithm with adjusting population size,” Electric Power Components and Systems, vol. 40, pp. 1285-99, 2012. https://doi.org/10.1080/15325008.2012.689417
10. Sood YR, “Evolutionary programming based optimal power flow and its validation for deregulated power system analysis,” Int J Electr Power Energy Syst, vol. 29, no. 1, pp. 65-75, 2007. https://doi.org/10.1016/j.ijepes.2006.03.024
11. Mahmood Joorabian and Ehsan Afzalan, “Optimal power flow under both normal and contingent operation conditions using the hybrid fuzzy particle swarm optimisation and Nelder–Mead algorithm (HFPSO-NM),” Applied Soft Computing, vol. 14, pp. 623-633, 2014. https://doi.org/10.1016/j.asoc.2013.09.015
12. A.V.Naresh babu, T. Ramana and S.Sivanagaraju, “Analysis of optimal power flow problem based on two stage initialization algorithm,” Int J Electr Power Energy Syst., vol. 55, pp. 91-99, 2014. https://doi.org/10.1016/j.ijepes.2013.08.011
13. Niknam T, Narimani MR, Jabbari M and Malekpour AR, “A modified shuffle frog leaping algorithm for multi-objective optimal power flow,” Energy, vol.36, pp.6420-32, 2011. https://doi.org/10.1016/j.energy.2011.09.027
14. Sivasubramani.S and Swarup.KS, “Multi-objective harmony search algorithm for optimal power flow problem,“ Int J Electr Power Energy Syst., vol.33, no. 3, pp. 745-52, 2011. https://doi.org/10.1016/j.ijepes.2010.12.031
15. Duman S, Güvenç U, Sönmez Y and Yörükeren N, “Optimal power flow using gravitational search algorithm,” Energy Convers Manage, vol. 59, pp. 86-95, 2012. https://doi.org/10.1016/j.enconman.2012.02.024
16. B. Srinivasa Rao and K. Vaisakh, “Multi-objective adaptive clonal selection algorithm for solving environmental / economic diaptch and OPF problems with load uncertainty,” Electrical Power and Energy Systems, vol. 53, pp. 390-408, 2013. https://doi.org/10.1016/j.ijepes.2013.04.024
17. M. Rezaei Adaryani and A. Karami, “Artificial bee colony algorithm for solving multi-objective optimal power flow problem, Electrical Power and Energy Systems,” vol. 53, pp. 219-230, 2013. https://doi.org/10.1016/j.ijepes.2013.04.021
18. Mojtaba Ghasemi, Sahand Ghavidel, Mohsen Gitizadeh and Ebrahim Akbari, “An improved teaching-learning-based optimization algorithm using Levy mutation strategy for non-smooth optimal power flow,” Electrical Power and Energy Systems, vol. 65, pp. 375-384, 2015. https://doi.org/10.1016/j.ijepes.2014.10.027
19. X. S. Yang, “Firefly algorithms for multimodal optimization,” in Proceedings of the Stochastic Algorithms: Foundations and Applications of Lecture Notes in Computing Sciences, Springer, Sapporo, Japan, vol. 5792, pp. 178-178, 2009.
20. P. Kessel and H. Glavitsch, “Estimating the voltage stability of a power system,” IEEE Trans. Power Deliver, vol. 1, no. 3, pp. 346-54, 2000.
21. Tahir Nadeem Malika, Azzam ul Asarb, Mudasser F. Wynec and Shakil Akhtar, “A new hybrid approach for the solution of nonconvex economic dispatch problem with valve-point effects,” Electric Power Systems Research, vol. 80, pp. 1128-1136, 2010. https://doi.org/10.1016/j.epsr.2010.03.004
22. Jason Yuryevich and Kit Po Wong, “Evolutionary programming based optimal power flow,” IEEE Trans. on Power Systems, vol. 14, no. 4, pp. 1245-1257, 1999. https://doi.org/10.1109/59.801880
23. S. Prabhakar Karthikeyan, K. Palanisamy, C. Rani, I. Jacob Raglend and DP. Kothari, “Security constrained unit commitment problem with operational, power flow and environmental constraints,” WSEAS Trans. on Power Systems, vol. 4, no. 2, pp. 53-56, 2009.