# A Heuristic Methods-Based Power Distribution System Optimization Toolbox

^{1}

^{2}

^{3}

^{4}

^{*}

## Abstract

**:**

## 1. Introduction

- -
- We develop an open source toolbox for power distribution systems by using the classical PSO and several recently developed heuristic algorithms: GWO, WOA, and ALO optimization methods, combined with the free power systems software Matpower.
- -

## 2. Optimization Models

_{i}stands for the voltage magnitude at bus i. P

_{DG}and Q

_{DG}refer to the active and reactive power output of DGs, respectively. S

_{DG}represents the apparent power of DG. T

_{i}, T

^{min}, and T

^{max}stand for the regulator’s actual tap position, its allowed minimum tap position, and allowed maximum tap position, respectively. The voltage regulation can be done with the help of tap changers. The tap changers can take different values to bring the voltage value closer to 1 p.u. Each step-change changes the voltage value 0.00625 p.u. The maximum and minimum tap changer values are assumed to be ±16.

_{ti}represents the position of the BESS at time t. SOC

^{min}and SOC

^{max}represent the BESS’s minimum and maximum state of charge limits.

## 3. Implementation of the Optimization Methods

## 4. Graphical User Interface

#### 4.1. Settings Panel

- The first field specifies the mode in which the program runs. DG and the tap changer mode operates hourly. BESS and the tap changer mode operates daily. When the mode is changed, the settings menu also changes. Settings that cannot be used in the selected mode are hidden or disabled in the menu;
- Daily power consumption data should be defined in the test system to perform optimization. Since the system uses a 1 h resolution, one has to upload 24 h load data to this field. The data for each hour should be separated by commas. This file can have an extension of TXT or CSV;
- In DG and tap changer mode, the system requires daily power output data of the DG type used. All definitions and restrictions that apply to the previous field also apply to this field. Note that this field is not used if DG mode is not selected;
- This section displays the available test systems, namely 33-bus, 69-bus, and 141-bus. The user selects the test system to be used;
- This field determines the number of search agents to be used during the optimization process. If the user selects many search agents, the probability of obtaining a near-optimal result increases; however, the computation time also increases;
- This field determines the number of iterations during the optimization;
- If DG and the tap changer mode are selected, this field allows specifying at what time in the 24 h period the optimization should be performed;
- This field determines the bus location of the DG added to the test system. Each selected bus appears in the next text box. Users can select multiple buses by holding down the CTRL key. They can clear all their selection by pressing the reset button. If BESS and the step mode are selected, BESS will be selected in this instead of DG;
- The tap changers are not connected to the buses but to the lines between the buses. This field identifies the lines in the selected test system that are to be added to the tap changer. Each selected line appears in the next text box;
- In the default settings, the output power of the BESSs is set to 30 kW and decreases or increases by 5 kW per hour depending on the demand of the system. The minimum charge level of the BESSs is 20 kW, and the maximum charge level of the BESSs is 80 kW. This section allows you to adjust the settings for the BESSs. This tab only works when the BESS and tap changer mode is active;
- The user can add more than one DG or BESS with the same characteristics to the system. The number of DGs or BESSs can be set in this area;
- This field is used to select the optimization algorithm (GWO, ALO, WOA, PSO) to be used when running the program;
- The optimization is performed by pressing the key. If there is an error in the selected values, an error message is displayed after pressing this button. If there is no error, the selected algorithm will be executed.

#### 4.2. Preview Panel

- Draw the test system schematic on draw.io or a similar website;
- Export the single line diagram using the SVG extension. When exporting, make sure that this file is transparent;
- Copy an HTML file from the CasePreview folder and rename the file name to “preview-{CASE_NAME}.html”;
- Add the source code of the SVG file into the HTML document.

#### 4.3. Result Panel

- When DG and tap changer mode is selected:
- A graph is displayed showing the voltage magnitude in pu for 24 h between the base case and the optimized case

- When BESS and tap changer mode is selected:
- Two different graphs are drawn for of the base case and the optimized case showing the voltage magnitude in pu;
- The graph of the power changes of the BESSs added to the system as a function of time of day is displayed;
- The graph of position changes of tap changers added to the system as a function of time of day is shown.

#### 4.4. Installation of the Program

- The user should visit the GitHub version page of the project and download the “*.mlappinstall” for the latest version [46];
- The user should double-click the downloaded file and install it;
- The user should run MATLAB; then, the user can access the program from the APPS tab in the top menu. He/she can open the application by double-clicking it.

## 5. Simulation and Test Results

## 6. Conclusions

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Conflicts of Interest

## References

- Kennedy, J.; Eberhart, R. Particle Swarm Optimization. In Proceedings of the IEEE International Conference on Neural Networks—Conference Proceedings, Perth, Australia, 27 November–1 December 1995. [Google Scholar]
- Mirjalili, S. Grey Wolf Optimizer. Adv. Eng. Softw.
**2014**, 69, 46–61. [Google Scholar] [CrossRef] [Green Version] - Mirjalili, S.; Lewis, A. The Whale Optimization Algorithm. Adv. Eng. Softw.
**2016**, 95, 51–67. [Google Scholar] [CrossRef] - Mirjalili, S. The Ant Lion Optimizer. Adv. Eng. Softw.
**2015**, 83, 80–98. [Google Scholar] [CrossRef] - Pradhan, M.; Roy, P.K.; Pal, T. Oppositional Based Grey Wolf Optimization Algorithm for Economic Dispatch Problem of Power System. Ain Shams Eng. J.
**2018**, 9, 2015–2025. [Google Scholar] [CrossRef] - Hameed, I.A.; Bye, R.T.; Osen, O.L. Grey Wolf Optimizer (GWO) for Automated Offshore Crane Design. In Proceedings of the 2016 IEEE Symposium Series on Computational Intelligence, SSCI 2016, Athens, Greece, 6–9 December 2017. [Google Scholar]
- Chow, J.H.; Cheung, K.W. A Toolbox for Power System Dynamics and Control Engineering Education and Research. IEEE Trans. Power Syst.
**1992**, 7, 1559–1564. [Google Scholar] [CrossRef] - Schoder, K.; Hasanović, A.; Feliachi, A.; Hasanović, A. PAT: A Power Analysis Toolbox MATLAB/Simulink. IEEE Trans. Power Syst.
**2003**, 18, 42–47. [Google Scholar] [CrossRef] - Vournas, C.D.; Potamianakis, E.G.; Moors, C.; Van Cutsem, T. An Educational Simulation Tool for Power System Control and Stability. IEEE Trans. Power Syst.
**2004**, 19, 48–55. [Google Scholar] [CrossRef] - Milano, F. An Open Source Power System Analysis Toolbox. IEEE Trans. Power Syst.
**2005**, 20, 1199–1206. [Google Scholar] [CrossRef] - Cole, S.; Belmans, R. MatDyn, a New Matlab-Based Toolbox for Power System Dynamic Simulation. IEEE Trans. Power Syst.
**2011**, 26, 1129–1136. [Google Scholar] [CrossRef] - Ekinci, S.; Demiroren, A.; Zeynelgil, H.L. PowSysGUI: A New Educational Software Package for Power System Stability Studies Using MATLAB/Simulink. Int. J. Electr. Eng. Educ.
**2017**, 54, 283–298. [Google Scholar] [CrossRef] - Rahman, M.A. Torrit: A GUI-Based Power System Simulation Platform. arXiv
**2020**, arXiv:abs/2008.13509. Available online: https://arxiv.org/abs/2008.13509 (accessed on 20 December 2020). - InterPSS Community. Available online: https://sites.google.com/a/interpss.org/interpss/Home?authuser=0 (accessed on 23 June 2021).
- Henry, R.; Ernst, D. Gym-ANM: Open-Source Software to Leverage Reinforcement Learning for Power System Management in Research and Education. Softw. Impacts
**2021**, 9, 100092. [Google Scholar] [CrossRef] - Eid, A.; Kamel, S.; Abualigah, L. Marine Predators Algorithm for Optimal Allocation of Active and Reactive Power Resources in Distribution Networks. Neural Comput. Appl.
**2021**, 33, 14327–14355. [Google Scholar] [CrossRef] - Singh, P.; Bishnoi, S.K. Modified Moth-Flame Optimization for Strategic Integration of Fuel Cell in Renewable Active Distribution Network. Electr. Power Syst. Res.
**2021**, 197, 107323. [Google Scholar] [CrossRef] - Saboori, H.; Hemmati, R. Maximizing DISCO Profit in Active Distribution Networks by Optimal Planning of Energy Storage Systems and Distributed Generators. Renew. Sustain. Energy Rev.
**2017**, 71, 365–372. [Google Scholar] [CrossRef] - Trivedi, I.N.; Parmar, S.A.; Bhesdadiya, R.H.; Jangir, P. Voltage Stability Enhancement and Voltage Deviation Minimization Using Ant-Lion Optimizer Algorithm. In Proceedings of the IEEE—2nd International Conference on Advances in Electrical, Electronics, Information, Communication and Bio-Informatics, IEEE—AEEICB 2016, Chennai, India, 27–28 February 2016. [Google Scholar]
- Mouassa, S.; Bouktir, T.; Salhi, A. Ant Lion Optimizer for Solving Optimal Reactive Power Dispatch Problem in Power Systems. Eng. Sci. Technol. Int. J.
**2017**, 20, 885–895. [Google Scholar] [CrossRef] - Ladumor, D.P.; Trivedi, I.N.; Bhesdadiya, R.H.; Jangir, P. A Grey Wolf Optimizer Algorithm for Voltage Stability Enhancement. In Proceedings of the 3rd IEEE International Conference on Advances in Electrical and Electronics, Information, Communication and Bio-Informatics, AEEICB 2017, Chennai, India, 27–28 February 2017. [Google Scholar]
- Ahmadi, B.; Ceylan, O.; Ozdemir, A. Grey Wolf Optimizer for Allocation and Sizing of Distributed Renewable Generation. In Proceedings of the 2019 54th International Universities Power Engineering Conference, UPEC 2019, Bucharest, Romania, 3–6 September 2019. [Google Scholar]
- Ceylan, O.; Liu, G.; Tomsovic, K. Coordinated Distribution Network Control of Tap Changer Transformers, Capacitors and PV Inverters. Electr. Eng.
**2018**, 100, 1133–1146. [Google Scholar] [CrossRef] - Bentouati, B.; Chaib, L.; Chettih, S. A Hybrid Whale Algorithm and Pattern Search Technique for Optimal Power Flow Problem. In Proceedings of the 2016 8th International Conference on Modelling, Identification and Control, ICMIC 2016, Algiers, Algeria, 15–17 November 2017. [Google Scholar]
- Qazi, S.H.; Mustafa, M.W.; Sultana, U.; Mirjat, N.H.; Soomro, S.A.; Rasheed, N. Regulation of Voltage and Frequency in Solid Oxide Fuel Cell-Based Autonomous Microgrids Using the Whales Optimisation Algorithm. Energies
**2018**, 11, 1318. [Google Scholar] [CrossRef] [Green Version] - Trivedi, I.N.; Jangir, P.; Parmar, S.A. Optimal Power Flow with Enhancement of Voltage Stability and Reduction of Power Loss Using Ant-Lion Optimizer. Cogent Eng.
**2016**, 3, 1208942. [Google Scholar] [CrossRef] - Waseem, M.; Lin, Z.; Liu, S.; Sajjad, I.A.; Aziz, T. Optimal GWCSO-Based Home Appliances Scheduling for Demand Response Considering End-Users Comfort. Electr. Power Syst. Res.
**2020**, 187, 106477. [Google Scholar] [CrossRef] - Suman, G.K.; Guerrero, J.M.; Roy, O.P. Optimisation of Solar/Wind/Bio-Generator/Diesel/Battery Based Microgrids for Rural Areas: A PSO-GWO Approach. Sustain. Cities Soc.
**2021**, 67, 102723. [Google Scholar] [CrossRef] - Liu, X.; Aichhorn, A.; Liu, L.; Li, H. Coordinated Control of Distributed Energy Storage System with Tap Changer Transformers for Voltage Rise Mitigation under High Photovoltaic Penetration. IEEE Trans. Smart Grid
**2012**, 3, 897–906. [Google Scholar] [CrossRef] - Gao, C.; Redfern, M.A. A Review of Voltage Control Techniques of Networks with Distributed Generations Using On-Load Tap Changer Transformers. In Proceedings of the Universities Power Engineering Conference, Cardiff, UK, 31 August–3 September 2010. [Google Scholar]
- Sarimuthu, C.R.; Ramachandaramurthy, V.K.; Agileswari, K.R.; Mokhlis, H. A Review on Voltage Control Methods Using On-Load Tap Changer Transformers for Networks with Renewable Energy Sources. Renew. Sustain. Energy Rev.
**2016**, 62, 1154–1161. [Google Scholar] [CrossRef] - Daylak, F. Elektrik Dağıtım Sistemlerinde Gerilim Profilinin, Güç Kayıpları ve Maliyet Minimizasyonunun Dağıtık Üretim Kaynakları ve Kademe Değiştiriciler Ile Iyileştirilmesi; Istanbul Technical University: İstanbul, Turkey, 2016. [Google Scholar]
- Zhang, Y.; Dong, Z.Y.; Luo, F.; Zheng, Y.; Meng, K.; Wong, K.P. Optimal Allocation of Battery Energy Storage Systems in Distribution Networks with High Wind Power Penetration. IET Renew. Power Gener.
**2016**, 10, 1105–1113. [Google Scholar] [CrossRef] - Awad, A.S.A.; El-Fouly, T.H.M.; Salama, M.M.A. Optimal ESS Allocation for Load Management Application. IEEE Trans. Power Syst.
**2015**, 30, 327–336. [Google Scholar] [CrossRef] - Ahmadi, B.; Ceylan, O.; Ozdemir, A. Voltage Profile Improving and Peak Shaving Using Multi-Type Distributed Generators and Battery Energy Storage Systems in Distribution Networks. In Proceedings of the UPEC 2020—2020 55th International Universities Power Engineering Conference, Turin, Italy, 1–4 September 2020. [Google Scholar]
- Bahramirad, S.; Reder, W.; Khodaei, A. Reliability-Constrained Optimal Sizing of Energy Storage System in a Microgrid. IEEE Trans. Smart Grid
**2012**, 3, 2056–2062. [Google Scholar] [CrossRef] - Baran, M.E.; Wu, F.F. Network Reconfiguration in Distribution Systems for Loss Reduction and Load Balancing. IEEE Trans. Power Deliv.
**1989**, 4, 1401–1407. [Google Scholar] [CrossRef] - Baran, M.E.; Wu, F.F. Optimal Capacitor Placement on Radial Distribution Systems. IEEE Trans. Power Deliv.
**1989**, 4, 725–734. [Google Scholar] [CrossRef] - Khodr, H.M.; Olsina, F.G.; Jesus, P.M.D.O.-D.; Yusta, J.M. Maximum Savings Approach for Location and Sizing of Capacitors in Distribution Systems. Electr. Power Syst. Res.
**2008**, 78, 1192–1203. [Google Scholar] [CrossRef] [Green Version] - Mirjalili, S. GWO. Available online: https://seyedalimirjalili.com/gwo (accessed on 5 February 2021).
- Mirjalili, S. WOA. Available online: https://seyedalimirjalili.com/woa (accessed on 7 February 2021).
- Mirjalili, S. ALO. Available online: https://seyedalimirjalili.com/alo (accessed on 10 February 2021).
- Zimmerman, R.D.; Murillo-Sánchez, C.E. MATPOWER. 2020. [Google Scholar] [CrossRef]
- Zimmerman, R.D.; Murillo-Sánchez, C.E.; Thomas, R.J. MATPOWER: Steady-State Operations, Planning, and Analysis Tools for Power Systems Research and Education. IEEE Trans. Power Syst.
**2011**, 26, 12–19. [Google Scholar] [CrossRef] [Green Version] - Draw.Io. Available online: App.diagrams.net (accessed on 1 June 2021).
- Ozlu, I.A. Electrical Distribution Systems Optimization GUI. Available online: https://github.com/alperenozlu/electrical-distribution-systems-optimization-gui (accessed on 26 April 2021).

**Figure 6.**Model I, voltage magnitudes for the base case and the near-optimal case for (

**a**) PSO, (

**b**) GWO, (

**c**) WOA, and (

**d**) ALO.

**Figure 7.**Daily, (

**a**) base case, and (

**b**) near-optimal voltage magnitudes when BESSs and tap changers are used.

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Özlü, İ.A.; Baimakhanov, O.; Saukhimov, A.; Ceylan, O.
A Heuristic Methods-Based Power Distribution System Optimization Toolbox. *Algorithms* **2022**, *15*, 14.
https://doi.org/10.3390/a15010014

**AMA Style**

Özlü İA, Baimakhanov O, Saukhimov A, Ceylan O.
A Heuristic Methods-Based Power Distribution System Optimization Toolbox. *Algorithms*. 2022; 15(1):14.
https://doi.org/10.3390/a15010014

**Chicago/Turabian Style**

Özlü, İsmail Alperen, Olzhas Baimakhanov, Almaz Saukhimov, and Oğuzhan Ceylan.
2022. "A Heuristic Methods-Based Power Distribution System Optimization Toolbox" *Algorithms* 15, no. 1: 14.
https://doi.org/10.3390/a15010014