# A Metaheuristic Algorithm for Flexible Energy Storage Management in Residential Electricity Distribution Grids

^{*}

## Abstract

**:**

## 1. Introduction

- The conceptualization of the mathematical model for three storage management approaches;
- The adaptation of the general GA structure using common encoding for the three proposed scenarios;
- The validation of the proposed algorithm in a case study that uses a real LV EDN from Romania; and
- Discussions regarding the possible advantages and disadvantages of each storage solution.

## 2. Related Literature

- In the standard approach, where the individual prosumers acquire storage batteries together with the PV system, and employ them mainly to defer the use of surplus generated during the daytime for the peak load hours, in order to lower their daily costs of electricity.
- In a novel approach, when the storage system is installed in the network at the initiative of the DNO, with the main aim of improving the operation conditions of the EDN. In this case, storage can be seen as
- ○
- individual batteries placed in different locations in the network; and
- ○
- a single community storage system [7].

## 3. Materials and Methods

#### 3.1. The Genetic Algorithm

#### 3.2. The Energy Storage Management Problem

- the LV network is operated in a three-phase, four-wire configuration and supplies one-phase residential consumers;
- the demand pattern is unbalanced in space due to the uneven distribution of the consumers (as number and power demand, as connection on the phases), and unbalanced in time because of the normal demand variation of each consumer;
- the prosumers connected in the network use PV panels for generating electricity, primarily for their own consumption;
- to avoid injecting the prosumer surplus back into the grid, a number of equal capacity storage batteries will be placed in the network; and
- the optimal placement of the batteries is performed so that the energy loses computed in the network for a time interval of 24 h, with the bus loads affected by the charge and discharge of the stored energy, will be minimized.

_{tot}represents the total energy losses, and ΔP

_{h}

^{b}are the hourly active power losses for each branch b = 1, …, NB, computed as:

^{b}is the branch resistance; I

_{h}

^{b}is the branch current flow on branch b at hour h; and K

_{h}

^{b}is the loss increase factor accounting for the supplementary current flow on the neutral wire due to the phase load unbalance on branch b at hour h [45].

- The voltage magnitude U
_{h}^{n}must not exceed the allowable upper and lower limits in each bus n = 1, …, NN and in each hour h in the interval of analysis h = 1, …, H:$${U}_{\mathrm{min}}^{n}\le {U}_{h}^{n}\le {U}_{\mathrm{max}}^{n}$$ - The current flow I
_{h}^{b}must be lower than the allowable ampacity (I_{max}) on all branches from the EDN, b = 1, …, NB and in each hour h in the interval of analysis h = 1, …, H:$${I}_{h}^{b}\le {I}_{\mathrm{max}}^{b}$$ - The state of charge (SOC) limits for the storage batteries should not exceed the technical limits for all the batteries s = 1, …, NSS, in each hour h in the interval of analysis h = 1, …, H:$$SO{C}_{\mathrm{min}}^{}\le SO{C}_{h}^{s}\le SO{C}_{\mathrm{max}}^{}$$

#### 3.3. The Adaptation of the Genetic Algorithm for the Storage Management Problem

- For DNO priority:
- ○
- Scenario 1 (all the batteries should be installed at the same bus): All the values from b
_{1}to b_{NSS}must be positive integers and equal, in the range (1, NN) (the total number of buses in the EDN); the values from ph_{1}to ph_{NSS}can have the value 1, 2, or 3, denoting the phases a, b, or c:$$SC1:\{\begin{array}{l}{b}_{i}\in \mathbb{Z},\text{\hspace{1em}}b\in [1,NN],\text{\hspace{1em}}{b}_{1}=\dots ={b}_{NSS}\\ p{h}_{i}\in \mathbb{Z},\text{\hspace{1em}}p{h}_{i}\in [1,3]\end{array}$$ - ○
- Scenario 2 (the batteries can be installed at different buses and phases): All the values from b
_{1}to b_{NSS}must be positive integers, in the range (1, NN); the values from ph_{1}to ph_{NSS}can have the value 1, 2, or 3, denoting the phases a, b, or c.$$SC2:\{\begin{array}{l}{b}_{i}\in \mathbb{Z},\text{\hspace{1em}}b\in [1,NN]\\ p{h}_{i}\in \mathbb{Z},\text{\hspace{1em}}p{h}_{i}\in [1,3]\end{array}$$

- For prosumer priority:
- ○
- Scenario 3: (batteries installed at prosumer residences): All the values from b
_{1}to b_{NSS}must be positive integers, denoting prosumer codes (because more than one prosumer can be located at a given bus), for prosumers that have surplus, a small subset of the entire bus range; the values from ph_{1}to ph_{NSS}can be 1, 2 or 3, depending on the phase of connection used by the prosumer PS chosen for storage installation.$$SC3:\{\begin{array}{l}{b}_{i}\in \mathbb{Z},\text{\hspace{1em}}b\in [P{S}_{1},\dots ,P{S}_{NPS}],\\ p{h}_{i}\in \mathbb{Z},\text{\hspace{1em}}p{h}_{i}\in [1,3],\text{\hspace{1em}}p{h}_{i}\text{\hspace{0.17em}}taken\text{\hspace{0.17em}}from\text{\hspace{0.17em}}PS({b}_{i})\end{array}$$

- For Scenario 1: the connection buses for the offspring chromosomes, which must be the same for all the batteries, were chosen with random probability from the buses used by the parent chromosomes (as in Figure 3a); and
- For Scenarios 2 and 3, the crossover for buses was applied using the same random mask as for the phases (as in Figure 3b).

- For Scenario 1: a phase gene can be mutated to any value 1, 2, or 3; but if a bus gene is selected from the mutation, then the entire first half of the chromosome is also mutated;
- For Scenario 2: any phase gene can be randomly mutated to any value 1, 2, or 3, and any bus gene can be mutated to any value describing a valid bus number; and
- For Scenario 3: the mutation is first performed on the buses by randomly replacing a prosumer with another from the available pool; then, its corresponding phase is replaced accordingly in the second half of the chromosome.

## 4. Results

#### 4.1. The Reference Case

#### 4.2. Scenario 1—Batteries Installed at the Same Bus

#### 4.3. Scenario 2—Batteries Can Be Installed at Different Buses and Phases

#### 4.4. Scenario 3—Batteries Can Be Installed Only in Prosumer Buses

## 5. Discussion

## 6. Conclusions

## Supplementary Materials

## Author Contributions

## Funding

## Conflicts of Interest

## References

- OPCOM—the Romanian Gas and Electricity Market Operator. Available online: https://www.opcom.ro/pp/grafice_ip/raportPIPsiVolumTranzactionat.php?lang=en (accessed on 10 August 2021).
- Kahouli, B. The causality link between energy electricity consumption, CO
_{2}emissions, R&D stocks and economic growth in Mediterranean countries (MCs). Energy**2018**, 145, 388–399. [Google Scholar] - Communication from the Commission to the European Parliament, the Council, the European Economic and Social Committee and the Committee of the Regions ‘Fit for 55’: Delivering the EU’s 2030 Climate Target on the Way to Climate Neutrality COM/2021/550 Final. Available online: https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX%3A52021DC0550 (accessed on 2 August 2021).
- Parag, Y.; Sovacool, B.K. Electricity market design for the prosumer era. Nat. Energy
**2016**, 1, 1–6. [Google Scholar] [CrossRef] - Bellekom, S.; Arentsen, M.; van Gorkum, K. Prosumption and the distribution and supply of electricity. Energy Sustain. Soc.
**2016**, 6, 22. [Google Scholar] [CrossRef][Green Version] - Romanian Energy Regulatory Authority. The 228 Order for the Approval of the Technical Norm Technical Conditions for Connection to the Public Electrical Networks of the Prosumers. Available online: https://www.anre.ro/ro/legislatie/prosumatori (accessed on 2 August 2021).
- Van der Stelt, S.; AlSkaif, T.; van Sark, W. Techno-economic analysis of household and community energy storage for residential prosumers with smart appliances. Appl. Energy
**2018**, 209, 266–276. [Google Scholar] [CrossRef] - Gram-Hanssen, K.; Hansen, A.R.; Mechlenborg, M. Danish PV prosumers’ time-shifting of energy-consuming everyday practices. Sustainability
**2020**, 12, 4121. [Google Scholar] [CrossRef] - Li, X.; Lim, M.K.; Ni, D.; Zhong, B.; Xiao, Z.; Hao, H. Sustainability or continuous damage: A behavior study of prosumers’ electricity consumption after installing household distributed energy resources. J. Clean. Prod.
**2020**, 264, 121471. [Google Scholar] [CrossRef] - Ruiz-Abellón, M.C.; Fernández-Jiménez, L.A.; Guillamón, A.; Falces, A.; García-Garre, A.; Gabaldón, A. Integration of demand response and short-term forecasting for the management of prosumers’ demand and generation. Energies
**2020**, 13, 11. [Google Scholar] [CrossRef][Green Version] - Liu, N.; Yu, X.; Wang, C.; Wang, J. Energy sharing management for microgrids with PV prosumers: A Stackelberg game approach. IEEE Trans. Ind. Inform.
**2017**, 13, 1088–1098. [Google Scholar] [CrossRef] - Zafar, R.; Mahmood, A.; Razzaq, S.; Ali, W.; Naeem, U.; Shehzad, K. Prosumer based energy management and sharing in smart grid. Renew. Sustain. Energy Rev.
**2018**, 82, 1675–1684. [Google Scholar] [CrossRef] - Venizelou, V.; Makrides, G.; Efthymiou, V.; Georghiou, G.E. Methodology for deploying cost-optimum price-based demand side management for residential prosumers. Renew. Energy
**2020**, 153, 228–240. [Google Scholar] [CrossRef] - Ghosh, A.; Aggarwal, V. Penalty based control mechanism for strategic prosumers in a distribution network. Energies
**2020**, 13, 452. [Google Scholar] [CrossRef][Green Version] - Ma, L.; Liu, N.; Zhang, J.; Wang, L. Real-time rolling horizon energy management for the energy-hub-coordinated prosumer community from a cooperative perspective. IEEE Trans. Power Syst.
**2018**, 34, 1227–1242. [Google Scholar] [CrossRef] - Lim, S.Y.; Lee, T.W. Implementation of prosumer management system for small microGrid. J. Korea Inst. Inf. Electron. Commun. Technol.
**2020**, 13, 590–596. [Google Scholar] - Barbosa, M.A.; Gül, K.; Bratcu, A.I.; Munteanu, I. Management of a photovoltaic-battery-based microgrid in a prosumer context. In Proceedings of the 6th International Symposium on Electrical and Electronics Engineering (ISEEE), Galati, Romania, 18–20 October 2019; IEEE: New York, NY, USA, 2019. [Google Scholar]
- Yang, Q.; Wang, H. Distributed energy trading management for renewable prosumers with HVAC and energy storage. Energy Rep.
**2021**, 7, 2512–2525. [Google Scholar] [CrossRef] - Pilz, M.; Al-Fagih, L. Selfish energy sharing in prosumer communities: A demand-side management concept. In Proceedings of the IEEE International Conference on Communications, Control, and Computing Technologies for Smart Grids (SmartGridComm), Beijing, China, 21–23 October 2019; IEEE: New York, NY, USA, 2019. [Google Scholar]
- Han, L.; Morstyn, T.; McCulloch, M. Incentivizing prosumer coalitions with energy management using cooperative game theory. IEEE Trans. Power Syst.
**2018**, 34, 303–313. [Google Scholar] [CrossRef] - Dolatabadi, M.; Siano, P. A scalable privacy preserving distributed parallel optimization for a large-scale aggregation of prosumers with residential PV-battery systems. IEEE Access
**2020**, 8, 210950–210960. [Google Scholar] [CrossRef] - Achiluzzi, E.; Kobikrishna, K.; Sivabalan, A.; Sabillon, C.; Venkatesh, B. Optimal Asset planning for prosumers considering energy storage and photovoltaic (PV) units: A stochastic approach. Energies
**2020**, 13, 1813. [Google Scholar] [CrossRef][Green Version] - Korjani, S.; Serpi, A.; Damiano, A. A genetic algorithm approach for sizing integrated PV-BESS systems for prosumers. In Proceedings of the 2nd IEEE International Conference on Industrial Electronics for Sustainable Energy Systems (IESES), Cagliari, Italy, 1–3 September 2020; IEEE: New York, NY, USA, 2020. [Google Scholar]
- Guo, Z.; Wei, W.; Chen, L.; Wang, Z.; Catalão, J.P.; Mei, S. Optimal energy management of a residential prosumer: A robust data-driven dynamic programming approach. IEEE Syst. J.
**2020**, 1–10. [Google Scholar] [CrossRef] - Azim, M.I.; Tushar, W.; Saha, T.K. Investigating the impact of P2P trading on power losses in grid-connected networks with prosumers. Appl. Energy
**2020**, 263, 114687. [Google Scholar] [CrossRef] - Petrou, K.; Procopiou, A.T.; Gutierrez-Lagos, L.; Liu, M.Z.; Ochoa, L.F.; Langstaff, T.; Theunissen, J. Ensuring distribution network integrity using dynamic operating limits for prosumers. IEEE Trans. Smart Grid.
**2021**, 12, 3877–3888. [Google Scholar] [CrossRef] - Nousdilis, A.I.; Christoforidis, G.C.; Papagiannis, G.K. Active power management in low voltage networks with high photovoltaics penetration based on prosumers’ self-consumption. Appl. Energy
**2018**, 229, 614–624. [Google Scholar] [CrossRef] - Qi, M.; Yang, H.; Wang, D.; Luo, Y.; Zhang, S.; Liao, S. Prosumers peer-to-peer transaction decision considering network constraints. In Proceedings of the IEEE 3rd Conference on Energy Internet and Energy System Integration (EI2), Changsha, China, 8–12 November 2019; IEEE: New York, NY, USA, 2019. [Google Scholar]
- Yang, J.; Paudel, A.; Gooi, H.B. Compensation for power loss by a Proof-of-Stake consortium blockchain microgrid. IEEE Trans. Ind. Inform.
**2020**, 17, 3253–3262. [Google Scholar] [CrossRef] - Wu, C.; Zhou, D.; Lin, X.; Wei, F.; Chen, C.; Ma, Y.; Dawoud, S.M. A novel energy cooperation framework for community energy storage systems and prosumers. Int. J. Electr. Power Energy Syst.
**2022**, 134, 107428. [Google Scholar] [CrossRef] - El-Batawy, S.A.; Morsi, W.G. Optimal design of community battery energy storage systems with prosumers owning electric vehicles. IEEE Trans. Ind. Inform.
**2017**, 14, 1920–1931. [Google Scholar] [CrossRef] - Shin, I. Approximation algorithm-based prosumer scheduling for microgrids. Energies
**2020**, 13, 5853. [Google Scholar] [CrossRef] - Ali, Z.M.; Diaaeldin, I.M.; Aleem, S.H.E.A.; El-Rafei, A.; Abdelaziz, A.Y.; Jurado, F. Scenario-Based network reconfiguration and renewable energy resources integration in large-scale distribution systems considering parameters uncertainty. Mathematics
**2021**, 9, 26. [Google Scholar] [CrossRef] - Pirouzi, S.; Aghaei, J.; Niknam, T.; Shafie-Khah, M.; Vahidinasab, V.; Catalão, J.P.S. Two alternative robust optimization models for flexible power management of electric vehicles in distribution networks. Energy
**2017**, 141, 635–652. [Google Scholar] [CrossRef] - Lin, M.H.; Tsai, J.F.; Yu, C.S. A review of deterministic optimization methods in engineering and management. Math. Probl. Eng.
**2012**, 2012, 756023. [Google Scholar] [CrossRef][Green Version] - Adetunji, K.E.; Hofsajer, I.W.; Abu-Mahfouz, A.M.; Cheng, L. A Review of metaheuristic techniques for optimal integration of electrical units in distribution networks. IEEE Access
**2021**, 9, 5046–5068. [Google Scholar] [CrossRef] - Djebedjian, B.; Abdel-Gawad, H.A.; Ezzeldin, R.M. Global performance of metaheuristic optimization tools for water distribution networks. Ain Shams Eng. J.
**2021**, 12, 223–239. [Google Scholar] [CrossRef] - Grisales-Noreña, L.F.; González-Rivera, O.D.; Ocampo-Toro, J.A.; Ramos-Paja, C.A.; Rodríguez-Cabal, M.A. Metaheuristic optimization methods for optimal power flow analysis in DC distribution networks. Trans. Energy Syst. Eng. Appl.
**2020**, 1, 13–31. [Google Scholar] [CrossRef] - Kahouli, O.; Alsaif, H.; Bouteraa, Y.; Ali, N.B.; Chaabene, M. Power System reconfiguration in distribution network for improving reliability using genetic algorithm and particle swarm optimization. Appl. Sci.
**2021**, 11, 3092. [Google Scholar] [CrossRef] - Ionescu, L.-M.; Bizon, N.; Mazare, A.-G.; Belu, N. Reducing the cost of electricity by optimizing real-time consumer planning using a new genetic algorithm-based strategy. Mathematics
**2020**, 8, 1144. [Google Scholar] [CrossRef] - Katoch, S.; Chauhan, S.S.; Kumar, V. A review on genetic algorithm: Past, present, and future. Multimed. Tools Appl.
**2021**, 80, 8091–8126. [Google Scholar] [CrossRef] [PubMed] - Lambora, A.; Gupta, K.; Chopra, K. Genetic algorithm—A literature review. In Proceedings of the 2019 International Conference on Machine Learning, Big Data, Cloud and Parallel Computing (COMITCon), Faridabad, India, 14–16 February 2019; IEEE: Piscataway, NJ, USA, 2019. [Google Scholar]
- Alam, T.; Qamar, S.; Dixit, A.; Benaida, M. Genetic algorithm: Reviews, implementations, and applications. Int. J. Eng. Pedag.
**2020**, 10, 57–77. [Google Scholar] [CrossRef] - Mirjalili, S. Genetic algorithm. In Evolutionary Algorithms and Neural Networks; Springer: Berlin/Heidelberg, Germany, 2019; pp. 43–55. [Google Scholar]
- The National Regulatory Authority for Energy (ANRE) Order no. 26/2016 Approving the Technical Energy Rule on Deter-Mining Own Technological Consumption in Public Electricity Networks—NTE 013/16/00. Available online: http://www.anre.ro (accessed on 10 August 2021).

**Figure 3.**The uniform crossover procedure modified for the ESMRG algorithm: (

**a**) Scenario 1; (

**b**) Scenarios 2 and 3.

Number of buses | 121 |

Number of consumers | 113 |

Total load (24 h/06:00—18:00) | 219.85/76.01 kW |

Total prosumer generation | 122.00 kW |

Total prosumer surplus | 75.38 kW |

Network type | Overhead, classic |

Total/main feeder length | 4840/2240 m |

Scenario | Solution | ΔW, kWh | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|

Scenario 1 | 85 | 85 | 85 | 85 | 85 | 1 | 1 | 3 | 1 | 2 | 6.63 |

Scenario 2 | 85 | 119 | 119 | 85 | 56 | 1 | 2 | 2 | 1 | 1 | 5.62 |

Scenario 3 | 107 (85) | 83 (63) | 107 (85) | 94 (119) | 44 (37) | 1 | 2 | 1 | 2 | 3 | 7.61 |

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**

Ivanov, O.; Neagu, B.-C.; Grigoras, G.; Scarlatache, F.; Gavrilas, M. A Metaheuristic Algorithm for Flexible Energy Storage Management in Residential Electricity Distribution Grids. *Mathematics* **2021**, *9*, 2375.
https://doi.org/10.3390/math9192375

**AMA Style**

Ivanov O, Neagu B-C, Grigoras G, Scarlatache F, Gavrilas M. A Metaheuristic Algorithm for Flexible Energy Storage Management in Residential Electricity Distribution Grids. *Mathematics*. 2021; 9(19):2375.
https://doi.org/10.3390/math9192375

**Chicago/Turabian Style**

Ivanov, Ovidiu, Bogdan-Constantin Neagu, Gheorghe Grigoras, Florina Scarlatache, and Mihai Gavrilas. 2021. "A Metaheuristic Algorithm for Flexible Energy Storage Management in Residential Electricity Distribution Grids" *Mathematics* 9, no. 19: 2375.
https://doi.org/10.3390/math9192375