=Paper= {{Paper |id=Vol-3742/paper5 |storemode=property |title=Computer system for energy distribution in conditions of electricity shortage using artificial intelligence |pdfUrl=https://ceur-ws.org/Vol-3742/paper5.pdf |volume=Vol-3742 |authors=Andrii Voloshchuk,Diana Velychko,Halyna Osukhivska,Andriy Palamar |dblpUrl=https://dblp.org/rec/conf/citi2/VoloshchukVOP24 }} ==Computer system for energy distribution in conditions of electricity shortage using artificial intelligence== https://ceur-ws.org/Vol-3742/paper5.pdf
                                Computer system for energy distribution in conditions of
                                electricity shortage using artificial intelligence
                                Andrii Voloshchuk1,*,†, Diana Velychko1,2,†, Halyna Osukhivska1,† and
                                Andriy Palamar1,†

                                1 Ternopil Ivan Puluj National Technical University, Ruska str., 56, 46001, Ternopil, Ukraine

                                2 Rochester Institute of Technology, 1 Lomb Memorial Dr, Rochester, 14623, New York, USA




                                                Abstract
                                                This paper proposes energy distribution in conditions of electricity shortage carried out by a
                                                computer system using artificial intelligence (AI). The architecture of the data collection
                                                computer system is described based on the Internet of Things.
                                                The proposed method employs Genetic Algorithms (GA) to optimize electricity distribution in
                                                deficit conditions, offering a rapid and efficient solution to energy shortages. The study evaluates
                                                AI's potential in managing electricity distribution during crises. It explores strategies for
                                                automated development and management of distribution algorithms, emphasizing the
                                                importance of AI in addressing critical challenges in the energy sector.

                                                Keywords
                                                computer system, artificial intelligence, genetic algorithm, electricity distribution, internet of
                                                things 1



                                1. Introduction
                                Nowadays, electricity shortages or blackouts can occur due to various situations. These
                                circumstances include weather conditions, accidents or any other unforeseen events, a
                                prime example of which is russia's missile attacks on Ukraine's civilian infrastructure. One
                                of the massive attacks in November 2022 caused a massive blackout in the Ukrainian power
                                grid. It resulted in electricity shortage for the Ukrainian civilian population and
                                infrastructure. To improve the situation through redistribution of resources and allow
                                access to electricity for all units, electricity availability schedules were introduced. Such
                                schedules were being developed over a long period of time. They did not always ensure an
                                even distribution of electricity among consumers and did not effectively take into account
                                changes in its volumes. To respond to such challenges more quickly, it is advisable to use all



                                CITI’2024: 2nd International Workshop on Computer Information Technologies in Industry 4.0, June 12–14, 2024,
                                Ternopil, Ukraine
                                ∗ Corresponding author.
                                † These authors contributed equally.

                                   andriy.voloschuk30@gmail.com (A. Voloshchuk); velychkodiana18@gmail.com (D. Velychko);
                                osukhivska@tntu.edu.ua (H. Osukhivska); palamar.andrij@gmail.com (A. Palamar)
                                    0009-0007-1478-1601 (A. Voloshchuk); 0000-0001-7635-1761 (D. Velychko); 0000-0003-0132-1378
                                (H. Osukhivska); 0000-0003-2162-9011 (A. Palamar)
                                           © 2024 Copyright for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0).




CEUR
                  ceur-ws.org
Workshop      ISSN 1613-0073
Proceedings
the capabilities of modern technologies, particularly artificial intelligence, and implement
intelligent energy accounting systems. AI-driven solutions play a pivotal role in automating
and optimizing data processing, offering benefits to the energy sector. This allows for stable
operation of the energy system, reduces energy supply costs, and assists in providing fast
and efficient energy distribution in times of power shortages.
    Overall, AI integration into energy accounting systems marks a significant leap forward
in addressing the challenges posed by inaccurate consumption forecasts and in particular
energy distribution in conditions of electricity shortage. These intelligent systems open
opportunities to not only improve energy efficiency, ensure energy security, and integrate
renewable energy sources but also contribute significantly to environmental sustainability.
Maximizing the benefits of these systems entails careful consideration of financial, privacy,
technological, and standardization aspects, ultimately ensuring their efficient and
sustainable operation in a dynamic energy sector.
    One of the most significant benefits of integrating AI is its ability to enhance data
accuracy and reduce manual errors, a critical aspect of effective energy management,
especially in times of energy shortages. These AI-powered systems not only eliminate the
potential for human error but also ensure precision in measurement, aligning perfectly with
the demands of modern energy ecosystems.
    Furthermore, AI empowers these systems to delve deep into detailed energy
consumption data, uncovering inefficiencies, and identifying opportunities for the
implementation of energy-efficient solutions, one of which is power distribution in times of
power shortages. Such insights lead to both substantial cost savings and improved overall
system performance, as well as rapid response to power shortages and efficient
redistribution of power, thus addressing one of the critical challenges faced by the energy
sector.
    The relevance of implementing intelligent energy accounting systems lies in their ability
to ensure accurate measurement of electricity, control its consumption and distribution,
and improve medium-term electricity consumption forecasting. This enhances the
efficiency of energy supply systems and reduces management costs. Furthermore, this can
contribute to the realization of the "smart city" concept, where energy supply systems and
networks interact with each other and the population to achieve more efficient and stable
energy supply in an energy-scarce environment.
    The aim of the research is to assess the potential of using artificial intelligence to
optimize the management of electricity distribution in deficit conditions. The study is aimed
at identifying effective strategies for utilizing artificial intelligence for automated
development of electricity management algorithms in situations of energy crises and
resource constraints. Additionally, the goal is to explore the possibilities of applying
artificial intelligence to improve energy consumption forecasting and ensure efficient
operation of energy systems in conditions of instability and resource constraints.

2. Related works
The state of the art in using artificial intelligence (AI) in sustainable energy, including
renewable energy and energy efficiency is described by the authors [1-3]. In [3-5]
researchers explore different scenarios of AI applications in sustainable energy and suggest
ways to develop and implement AI in this industry. The papers also highlight the main
challenges faced by this industry, as well as the opportunities offered by the use of AI. They
delve into the role of machine learning techniques in improving the efficiency, reliability,
and cost-effectiveness of renewable energy systems and highlight the practical applications
of machine learning algorithms in predicting renewable energy generation, optimizing
energy storage, and accurately forecasting energy demand.
   Papers [2-4] are devoted to intelligent methods of electricity supply forecasting, an
overview and prospects for the use of machine learning methods in the field of sustainable
energy, electricity demand forecasting, etc.
   Forecasting short-term electric load is presented in the papers [6, 7]. Research [6] offers
a method for short-term electrical demand forecasting that incorporates three approaches:
kernel principal component analysis (KPCA), Levy tree seed algorithm (LTSA), and extreme
learning machine (ELM). The results of this experiments showed that the suggested KPCA-
LTSA-ELM approach has various advantages over previous methods: LTSA assists in
determining the appropriate parameters for ELM, resulting in more accurate forecasts.
KPCA shortens training time by reducing data amount, allowing ELMs to learn faster. LTSA
avoids local optima, guaranteeing that the model converges to the optimal solution. In paper
[7] а method of calculating short-term electrical load that combines KPCA, LTSA, and ELM
is proposed. Forecasting of medium-long-term electricity consumption using ARIMA
methods and exponential smoothing is devoted to the article [8].
   The main areas of use of artificial intelligence technologies in the energy sector of
Ukraine, priority areas of application of modern technologies in energy supply systems, and
problems that hinder the introduction of artificial intelligence at the corporate and public
levels are described in [9]. The authors have prepared recommendations on the priorities
for stimulating the development and application of artificial intelligence technologies in the
energy sector of Ukraine and described the requirements for expanding the use of AI in the
energy sector of Ukraine. In particular, the technical requirements are specified, which
include hardware (smart meters for collecting a large amount of high-quality detailed data
and smart grids); software and dedicated human expertise (i.e. data scientists who can
develop machine learning algorithms and continuously improve models applicable to the
Ukrainian energy sector [9]. However, this work does not address the problem of energy
redistribution in the event of energy shortages, in particular for the automated generation
of power outage schedules.
   In [10-12] the use of a genetic algorithm is proposed for intelligent electricity
management and optimization of power systems. It is worth noting that this study focuses
on the method of fast and efficient energy distribution in case of energy shortages to provide
a predictable temporary solution to the problem for consumers.
   However, no effective solution has been proposed in the known works to distribute
electricity in conditions of long-term electricity shortages, in particular, those that would be
effective in the conditions that arose during the war in Ukraine. This paper is devoted to the
actual problem of introducing and using AI in the energy sector of Ukraine to distribute
electricity in conditions of shortage.
3. System architecture
To fulfill the data collection objective of the research, the proposal suggests utilizing the
framework of a computerized energy enterprise system. Adopting the framework of a
computerized energy enterprise system rooted in the Internet of Things (IoT) concept is
advocated in [13]. Generally, intelligent systems comprise [14]: smart meters, local
networks, Global networks, gateways.
   For secure and dependable communication, smart networks employ various additional
technologies, including wireless local networks, virtual private networks, and mobile
networks [15]. By integrating these technologies, "smart" networks can surmount
communication obstacles and establish a more efficient and secure energy management
system.
   Automation facilitated by AI streamlines the entire process of data collection and
analysis, making energy accounting a seamless and efficient operation for both operators
and consumers. However, it's essential to acknowledge that the implementation of AI-
driven energy accounting systems does come with its challenges, including initial high costs,
privacy and security concerns related to data collection, the dependence on modern
technologies like smart meters, and the need for standardization and compatibility among
systems from different manufacturers. The network architecture for data collection at an
energy company is shown in Figure 1.




Figure 1: Network architecture for data collection.
    The system receives real-time data streams from a variety of sources, including current
and voltage transformers, protection relays, and various sensors distributed throughout the
electrical network. This data is then processed and analyzed by sophisticated AI algorithms.
During the analysis, the AI system identifies patterns, trends, and anomalies, providing
valuable insights into the overall health and performance of the electrical system. Operators
gain a comprehensive understanding of system dynamics, including load fluctuations,
voltage stability, and equipment condition, enabling them to make informed decisions
regarding maintenance, optimization, and resource allocation.
    The network architecture for electrical systems presented here features two primary
servers deployed within the enterprise. One server acts as an application server, handling
client requests, executing calculations, managing logic, and fulfilling other essential tasks to
generate responses for clients. Additionally, it oversees data management, interacts with
the database server, and manages user authentication and authorization. The second
server, referred to as the database server, is responsible for storing and organizing data,
executing database operations such as creating, reading, updating, and deleting records, and
processing queries to deliver results to clients based on stored information. The
collaboration between these two servers ensures the smooth operation of applications and
the safeguarding of critical data, thereby contributing to the optimization of electrical
systems [16].
    All management processes are controlled by an Automated Workstation (AW) for
electrical systems which is an essential computer-based tool [17] that enables efficient
management, monitoring, and optimization of electrical power systems.
    One of the key functions of AW is monitoring and diagnostics, which involves collecting
and analyzing data related to equipment status, network operations, and electrical
parameters. This allows operators to detect anomalies, defects, or energy leaks promptly,
ensuring timely responses and preventive measures against potential accidents. AW also
helps in resource optimization by determining operating modes for equipment, load
schedules, energy management, and energy consumption reduction. The use of data storage
systems in AW allows for efficient record-keeping and analysis of system performance.
    To achieve secure communication, all channels in the network are implemented with
robust protection mechanisms, using various encryption methods through dedicated
channels. This approach ensures the confidentiality and integrity of transmitted data,
making interception and data manipulation significantly more challenging.
    The utilization of these secure channels and access points is of paramount importance in
ensuring the security, reliability, and confidentiality of electrical systems. By applying
network protection measures, access can be restricted solely to authorised users and
devices, preventing unauthorised access and protecting the system against potential threats
and attacks. The encryption provided by secure channels significantly enhances the
confidentiality and integrity of transmitted data, particularly critical when dealing with
sensitive information about the status and functionality of electrical systems. That helps to
be fault tolerant [18] and to ensure that a smart grid's network remains operational and
resilient even when certain components or elements experience failures or faults. This
could be important for maintaining a stable and reliable energy distribution system,
especially in situations where the grid relies on software-defined networking for control
and management.
   The data obtained using the described architecture is an important tool for analyzing,
forecasting and redistributing electricity. They provide valuable information about
consumption over a certain period, helping to understand trends, patterns, and
dependencies. Analyzing this data helps to identify seasonal changes in consumption, as
well as to develop consumption forecasts, which are important for planning and managing
energy resources, in case of energy shortages, they can be used for electricity distribution
and automated creation of outage schedules.

4. Proposed method
For the optimal and fast distribution of energy resources between consumers, it is advisable
to use the methods of Artificial Intelligence. To search for the most efficient combination of
electricity consumption zones at a given time within limited resources, it is proposed to use
the Genetic Algorithm (GA). In this context, GA can be used to build the schedule of
electricity availability in these zones, which helps distribute energy resources quickly, more
efficiently, and evenly.
    This way, the GA has the following presentation: each gene on the chromosome
represents a zone; each chromosome is a list of zones to be powered simultaneously. Each
gene has its own "value" and "weight". In our case, the value is the number of entities that
gain access to electricity in the zone. The weight is the electric power needed to electrify the
zone. As the amount of electric power is limited in cases of energy shortage and this limit
can change at any time, it is the most important resource to consider as a constraint for the
fitness function. The following formula is proposed as a Fitness function:


                                                                                          (1)
                                                                      ,
   where 𝑐𝑖 – is the value of the gene, whether the region is included, 𝑣𝑖 – is the number of
entities affected (people/factories/organizations/hospitals), 𝑤𝑖 – is the electricity needed
for the set of entities affected in the region, and W – is the amount of electric power
available.
   It is important to understand that the schedule is divided into certain time periods. GA
should be run for each time period separately. The GA is offered to be used in a sequence so
that the schedule is generated for each time period separately, taking into consideration
that certain zones are banned from selection if they are chosen in the previous step. During
the operation of the algorithm, the regions are encoded binary, which is shown in Figure 2.
   The GA algorithm is run for a few epochs while the importance values are changed in a
way presented in Figure 2 to provide all regions with electricity without giving preference
to just some of them. The best individuals from all epochs are saved as the schedule of
electricity availability.
Figure 2: The encoding of data for GA.

   To generate a simulation of the situation in which the algorithm should be used, we will
use a data set of hourly energy usage that can be found on the Internet (kaggle.com). The
dataset which contains hourly energy consumption levels provided by different US energy
regions [19] is used as an example instead of data from Ukraine which is concealed for safety
reasons.
   The dataset contains hourly energy consumption over several years, so for simplicity,
the dataset was trimmed to contain the hourly consumption during one full day. The
algorithm was run for 11 regions, although the number of regions is not important. The
algorithm can work for any number of regions in the dataset. The dataset containing
information on electricity consumption by 11 regions during one day is shown in Figure 3.




Figure 3: The dataset contains information on the electricity consumption of 11 regions
during the day.
5. Results and discussions
The GA should only be a part of the system software, it should be used in the cycle outlined.
Firstly, it is important to understand that the schedule is divided into certain time periods,
e.g. 2 hours. GA should be run for each time period separately. The regions are already
defined, as well as, the number of entities affected, the average amount of electricity power
needed for the region, and the power limit.
   For the first time period, the population is generated automatically. For the second time
period, the regions chosen in the previous iteration are banned, the rest can be chosen. For
the third iteration, the regions chosen are the ones that have not been chosen in the 1st and
the 2nd are allowed, etc. This process is repeated until the sum of powers needed for all
regions left is less than the maximum, and then the regions from iteration #1 are allowed to
participate in the "population" again. The same pattern is repeated. The generated schedule
of electricity availability using the proposed algorithm for 11 regions with a conditional
limit of 70000 MW is shown in Figure 4. The algorithm was implemented using Python.
   The main advantage of the algorithm is the fact that it provides results significantly faster
than any human operator and promotes equal distribution of energy sources based on
importance. In addition, the schedule can be changed dynamically when more energy is
available.




Figure 4: The schedule of electricity availability for 11 regions with a conditional limit of
70000 MW.

   Knowing how much electricity is needed to meet the needs of all regions has important
benefits. Having that data will allow you to plan some maintenance, and rebuild some
communication nodes without inconveniencing consumers. This can solve a lot of problems
increase performance and provide a lot of benefits.
   An improved understanding of regional electricity needs enables better supply planning,
enhancing the reliability of electricity supply, especially in critical scenarios such as
emergencies and crises.
   In conclusion, comprehending both current and future electricity demand is a
fundamental component of ensuring the efficient and reliable operation of the energy
system, ultimately promoting economic and environmental efficiency.

6. Conclusions
The proposed computer system was designed for energy distribution in conditions of
electricity shortage using artificial intelligence. The integration of AI into energy accounting
systems presents significant advantages in improving data accuracy, minimizing manual
errors, and boosting overall system performance. AI-powered solutions facilitate efficient
energy distribution, cost reduction, and swift response to power shortages. The proposed
GA method provides a streamlined approach to distributing energy resources, ensuring
equitable distribution and dependable energy supply. Understanding regional electricity
needs leads to better supply planning, and heightened system reliability, and fosters
economic and environmental efficiency in the energy industry. Ultimately, AI-driven
solutions play a pivotal role in tackling challenges and optimizing energy management
during crises and resource limitations.
   This computer system may be used not only in Ukraine but in any country/region where
a power outage or shortage may appear due to severe weather conditions or any other
unpredictable events.

References
[1] T. Ahmad, D. Zhang, C. Huang, H. Zhang, N. Dai, Y. Song, H. Chen, Artificial intelligence
    in sustainable energy industry: Status Quo, challenges and opportunities, Journal of
    Cleaner Production, 289 (2021) 125834. doi: 10.1016/j.jclepro.2021.125834.
[2] K.P. Amber, R. Ahmad, M.W. Aslam, A. Kousar, M. Usman, M.S. Khan, Intelligent
    techniques for forecasting electricity consumption of buildings, Energy, 157 (2018),
    pp.886-893. doi:10.1016/j.energy.2018.05.155.
[3] S. Williams, M. Short, Electricity demand forecasting for decentralised energy
    management, Energy and Built Environment, 1(2), 2020, pp.178-186.
    doi:10.1016/j.enbenv.2020.01.001.
[4] D. Rangel-Martinez, K.D.P. Nigam, L.A. Ricardez-Sandoval, Machine learning on
    sustainable energy: A review and outlook on renewable energy systems, catalysis,
    smart grid and energy storage, Chemical Engineering Research and Design, 174 (2021),
    pp. 414-441. doi:10.1016/j.cherd.2021.08.013.
[5] R. Teixeira, M. Antunes, D. Gomes, Using Deep Learning and Knowledge Transfer to
    Disaggregate Energy Consumption. Adelaide, In 2021 International Conference on
    Wavelet Analysis and Pattern Recognition (ICWAPR), 2021, pp. 1-7.
    doi:10.1109/ICWAPR54887.2021.9736149.
[6] X. Chen, K. Przystupa, Z. Ye, F. Chen, C. Wang, J. Liu, O. Kochan, Forecasting short-term
     electric load using extreme learning machine with improved tree seed algorithm based
     on Lévy flight. Eksploatacja i Niezawodność, 24(1), 2022, pp. 153-162.
[7] L. Sun, H. Qin, K. Przystupa, M. Majka, O. Kochan, Individualized short-term electric load
     forecasting using data-driven meta-heuristic method based on LSTM network. Sensors,
     22(20), 2022, 7900.
[8] E.M. de Oliveira, F.L.C. Oliveira, Forecasting mid-long term electric energy consumption
     through bagging ARIMA and exponential smoothing methods, Energy, 2018, 144,
     pp. 776–788.
[9] O.M. Sukhodolia, Artificial Intelligence in Energy: Analytical Report, Kyiv: NISD, 2022,
     49 p. (in Ukrainian). doi:10.53679/NISS-analytrep.2022.09.
[10] L. Lin, A. Abdallah, M.K. Ishak, Z.M. Ali, I. Khan, K. Rabie, I. Safak Bayram, X. Li, D. Madsen,
     K.I. Kim, Hierarchical optimization and grid scheduling model for energy internet: a
     genetic algorithm-based layered approach, Frontiers in Energy Research, 10 (2022)
     921411. doi:10.3389/fenrg.2022.921411.
[11] R. Torkan, A. Ilinca, M. Ghorbanzadeh, A genetic algorithm optimization approach for
     smart energy management of microgrids, Renewable Energy, 197, 2022, pp. 852-863.
     doi:10.1016/j.renene.2022.07.055.
[12] M. Dehghani, M. Mardaneh, O.P. Malik, J.M. Guerrero, C. Sotelo, D. Sotelo, M. Nazari-
     Heris, K. Al-Haddad, R.A. Ramirez-Mendoza, Genetic algorithm for energy commitment
     in a power system supplied by multiple energy carriers, Sustainability, 12(23), (2020)
     10053. doi:10.3390/su122310053.
[13] A. Palamar, M. Karpinski, M. Palamar, H. Osukhivska, M. Mytnyk, Remote Air Pollution
     Monitoring System Based on Internet of Things, In CEUR Workshop Proceedings,
     volume 3309, 2022, pp. 194–204.
[14] D.B. Avancini, J.J. Rodrigues, S.G. Martins, R.A. Rabêlo, J. Al-Muhtadi, P. Solic, Energy
     meters evolution in smart grids: A review,Journal of cleaner production, 217, 2019, pp.
     702-715. doi:10.1016/j.jclepro.2019.01.229.
[15] H. Osukhivska, I. Tysh, T. Lobur, I. Shylinska, S. Lupenko, Method for estimating the
     convergence parameters of dynamic routing protocols in computer networks, In IEEE
     16th International Conference on Computer Science and Information Technologies
     (CSIT), volume 2, 2021, pp. 228–231.
[16] K. Liu, C. Wang, X. Zhou, Decentralizing access control system for data sharing in smart
     grid,        High-Confidence          Computing,           3(2),         (2023)          100113.
     doi:10.1016/j.hcc.2023.100113.
[17] A. Palamar, M. Karpinskyy, V. Vodovozov, Design and implementation of a digital
     control and monitoring system for an AC/DC UPS, In 7th International Conference-
     Workshop “Compatibility and Power Electronics” (CPE), 2011, pp. 173–177.
     doi:10.1109/CPE.2011.5942227.
[18] C. Lee, S. Shin, Fault tolerance for software-defined networking in smart grid, In IEEE
     International Conference on Big Data and Smart Computing (BigComp), 2018, pp. 705-
     708. doi:10.1109/BigComp.2018.00131.
[19] Hourly             Energy             Consumption                  (kaggle.com).            URL:
     https://www.kaggle.com/datasets/robikscube/hourly-energy-consumption/data.