1. Introduction
The digital transformation of the energy sector is a fact. Progressive technological changes mean that existing architectures of energy systems and current business models in the energy sector are heading towards digital transformation, e.g., [
1,
2]. However, the goal of the ongoing changes cannot be digitization per se. Modern computer science offers a rich array of technologies that represent an opportunity to improve efficiency in key domains of the energy sector related to energy generation, distribution, storage, consumption, and trade, e.g., [
3,
4,
5,
6,
7,
8,
9,
10,
11]. Implementing the Internet of Things, Cyber-Physical Systems (CPSs), and embedded systems in the energy sector has contributed to developing the new Smart Grid paradigm.
Smart Grid represents next-generation power systems that combine existing energy infrastructure with information and telecommunications technologies [
12]. The primary added value of a Smart Grid compared to classic power grids is the possibility of two-way energy flow and data exchange in the form of communication signals [
13]. Smart Grid is closely related to intelligent energy management and, thus, to the need to automate control, monitoring, and decision-making processes. The literature indicates that intelligent management systems in the energy sector require solving many problems regarding, among others, optimizing energy efficiency, preventing energy losses, analyzing customer demand profiles, and forecasting production costs and energy prices [
13].
From a computer science perspective, the Smart Grid paradigm provides an environment for implementing artificial intelligence (AI) to support energy systems management, e.g., [
14,
15,
16,
17,
18,
19]. However, since the energy sector is an element of critical infrastructure, the presented Smart Grid assumptions pose special requirements within computer science. The implementation of IT solutions must support energy security, infrastructure stability, and continuity of energy systems, often under real-time regime conditions. Meeting the objectives mentioned above requires the implementation of a multi-layered and multi-agent architecture that integrates distributed sensor networks, transmission media, data processing services, a business layer, and energy infrastructure. In addition, the ongoing transformation toward a data-driven energy industry means that energy systems generate data sets with complex, heterogeneous structures. Moreover, the unique nature of the data generated by energy systems, which, on the one hand, require a real-time response and, on the other hand, meet the attributes of Big Data, makes classic data analysis methods insufficient. As a result, data generated by energy systems require innovative processing methods to automate decision-making processes. For example, Shahzad et al. [
20] demonstrated that it is possible to develop an effective method for optimizing a hybrid renewable energy system based on data. In particular, the research showed that effective planning of the location, type, and size of distributed generation (DG) units is possible using real data [
20]. Due to the importance and complexity of the presented issues, there is an urgent need for research on the use of AI methods to support the energy sector.
AI methods and techniques are becoming crucial in optimizing and automating Smart Grid management using data generated in energy systems. The latest research proves the effectiveness of AI in engineering applications, particularly in the energy sector. In this regard, Elsheikh [
21] published key research results on using AI to optimize the design of bistable structures in the context of energy harvesting. In another paper, Moustafa et al. [
22] presented an artificial neural network model for efficiently predicting thermal performance of a tubular solar still. An exemplary application of specific AI algorithms in solving engineering problems was presented by Khoshaim et al. [
23]. The research concerned the application of a gray wolf optimizer and the multilayer perceptron model to predict selected mechanical and microstructural properties of a friction-treated aluminum alloy [
23]. Another important study by Alsaiari et al. [
24] integrated an artificial neural network with an optimizer of artificial rabbits to predict water productivity for selected photovoltaic structures. A detailed analysis of the use of artificial neural networks to model solar energy systems can be found in a comprehensive review by Elsheikh et al. [
25]. The review indicated that different types of artificial neural networks are effective techniques for optimizing and predicting the performance of solar devices [
25].
The presented brief overview of the latest research results indicates the significant potential of AI algorithms in solving engineering problems in the power industry.
The contribution of this article concerns IT systems supporting Smart Grid management using AI algorithms. The paper aims to analyze the applications of selected AI algorithms for supporting the energy sector in cybersecurity, automation of power grid management, multidimensional analysis of data generated in Smart Grids, and optimization of decision-making processes. In particular, machine learning methods, metaheuristic algorithms, and intelligent fuzzy inference systems were analyzed. Examples of the analyzed AI algorithms were confronted with critical domains of the energy sector. The research covered, among others, cybersecurity, Smart Grid management, energy saving, minimizing power losses, fault diagnosis, and renewable energy sources.
It should be noted that AI algorithms and areas of the energy sector were selected so that this article will be interesting to as many readers as possible. Considering this, machine learning, metaheuristics, and fuzzy reasoning represent the key AI areas covered in the paper. Similarly, the domains of the energy sector represent the leading research areas undertaken in the latest publications. Based on the conducted analyses, open research challenges for the effective use of AI algorithms in the energy sector were defined.
The next sections of this article are organized as follows.
Section 2 discusses the methodology adopted in the article.
Section 3 covers an overview of AI algorithms, particularly machine learning, metaheuristics, and fuzzy inference systems.
Section 4 examines how AI algorithms can support key domains of the energy sector.
Section 4 defines the open research challenges. The paper ends with conclusions that include a summary of the research.
2. Materials and Methods
The article analyzes engineering and technical research in computer science and security sciences. Selected AI algorithms used in the energy sector are the subject of the study. The research aims to analyze the applications of AI algorithms to support the energy sector in cybersecurity, management automation, multidimensional data analysis, and optimization of decision-making processes.
This article’s contribution to the theory and practice of computer science and security science is to address the five research questions (RQs) defined below:
RQ1: What AI algorithms are used in the energy sector?
RQ2: In which areas of the energy sector are AI algorithms applied?
RQ3: How can the cybersecurity of the energy sector be supported using AI algorithms?
RQ4: How can AI algorithms support energy saving, Smart Grid management, fault detection, load prediction, and renewable energy?
RQ5: What are the open research challenges related to using AI algorithms in the energy sector?
Scopus, MDPI, IEEE, and ACM databases were used to select the literature necessary for the study. During the literature search, various combinations of keywords related to specific AI algorithms and functional domains of the energy sector were used. It should be noted that energy sectors and AI constitute an extensive research area. It was not possible to cover all possible fields related to the energy sector and AI in one study. Therefore, we analyzed selected domains of both the energy sector and AI that are crucial to the research questions. Regarding AI algorithms, the study considered the following:
The above-mentioned types of algorithms were examined with respect to the following areas:
cybersecurity of intelligent energy management systems,
energy saving,
Smart Grid management,
fault diagnosis in energy systems,
electricity load forecasting,
renewable energy.
Section 4 defines four to seven specific engineering problems for each of the areas listed above. We analyzed the application of selected AI algorithms for defined problems.
Section 3 and
Section 4 address the defined RQs.
3. Overview of AI Algorithms
In order to identify the applications of AI algorithms in the energy sector, it is essential to define their basic typology. AI can be studied in an interdisciplinary manner, but this article focuses primarily on the perspective of computer science. AI algorithms are an essential part of computer science and contain a wide range of technologies and scientific concepts. Essentially, AI presupposes the ability of computer systems to make inferences modeled on human logic and intelligence. Latah and Tokre [
26] emphasize that AI covers many subfields, particularly knowledge representation, reasoning, planning, decision-making, optimization, metaheuristics, and machine learning.
The general concept of AI requires computer science to develop specific algorithms in selected programming languages to implement the assumptions presented above. Thus, different algorithms that perform AI tasks can be distinguished. This study includes machine learning, metaheuristics, and fuzzy inference algorithms.
3.1. Machine Learning
Machine learning (ML) algorithms are a crucial part of AI. ML is defined differently in the literature depending on the scientific field. From a computer science perspective, Alpaydin [
27] (p. 3) defines ML as “programming computers to optimize a performance criterion using example data or past experience”. ML can also be considered from the perspective of data science, a related discipline. In this view, ML can be defined as “a method that draws implications from existing data by using mathematical and statistical methods, and makes predictions about the unknown with these implications” [
28] (p. 5).
The effectiveness of ML algorithms depends on the type and quality of input data. ML is not a single set of techniques, algorithms, or predictive models. There are many classifications of ML algorithms, techniques, and models in the literature. Synthesizing the literature in terms of input data and type of algorithm used, the following ML techniques can be distinguished [
26,
29,
30]:
Supervised learning techniques are based on provided patterns and examples. As a general rule, supervised learning algorithms require labeled data to be available during training [
31]. Supervised learning requires more processed data than other algorithms because the input data needs additional information to represent the data output classes [
32]. Relying on labeled data makes supervised learning more accurate than unsupervised learning. An additional advantage is the ability to estimate or map the results to a new sample [
33]. The disadvantages relate to the need to label the data, which requires time and expert knowledge.
Unsupervised learning assumes that the computer system has no learning examples and independently searches for relationships, dependencies, and patterns in the input data. It should be noted that, although unsupervised learning reduces the need for labeled samples, it still faces problems with low detection accuracy [
34]. Clustering algorithms are fundamental solutions in unsupervised learning techniques. The advantage of unsupervised learning is that there is no need to label the data, which simplifies input preparation. The disadvantages relate to the inability to estimate or map the results of a new sample [
33]. Another limitation of unsupervised learning is that it performs only classification tasks [
33].
Semi-supervised learning techniques are a hybrid combination of the two concepts presented above. The computer system handles both labeled and unlabeled data. The concept aims to develop better learning models than techniques separately based on labeled and unlabeled data. However, the hybrid use of the two types of data does not guarantee higher algorithm performance. Unlabeled data is useful if it contains information for predicting labels that is not contained in the labeled data or cannot be easily extracted from the labeled data [
35].
In addition to the ML techniques mentioned above, there is reinforcement learning (RL). RL involves learning to map situations to actions to maximize a numerical reward signal [
36]. This assumption means that the computer system receives a defined set of rules and, based on them, observes the occurring effects. The learning process is based on a set of reinforcements from the environment [
26]. RL issues can be formalized based on the theory of dynamical systems, particularly optimal control of Markov decision processes [
36].
At the programming level, the presented ML techniques use various algorithms. The key types of ML algorithms for use in the power industry are analyzed below.
3.1.1. Decision Trees
Decision trees (DTs) are widely used in statistics and can be designed for ML [
37]. DT algorithms are widely used to solve various classification problems. DTs are decision algorithms that use a model similar to a tree structure to generate output data [
38]. The training process generates a decision tree based on a dataset with labeled examples to predict new unlabeled data instances [
39]. The advantage of DTs is their ability to handle different types of input. In particular, input data can be both discrete and continuous [
26]. DTs have some limitations. For example, specific algorithms such as ID3, C4.5, and CART can, in some cases, generate very large, complex, and difficult-to-understand trees [
40].
3.1.2. Artificial Neural Networks
In general, Artificial Neural Networks (ANNs) assume the mapping of a biological neural network system to a mathematical model. An ANN consists of interconnected basic units based on the concept of artificial neurons. The use of ANNs to perform a specific task consists of the parallel activation of many artificial neurons that can be organized into any topological architecture [
41]. ANNs are used in the energy sector to forecast electricity consumption as well as to predict load in buildings [
30]. There are many different types of ANNs that allow for programmatic implementation. Among others, the following can be distinguished: multi-layer perceptron neural network, wavelet neural network, radial basis function, and Elman neural network [
25].
3.1.3. Deep Learning
Deep learning (DL) uses the previously presented concept of ANNs. DL algorithms implement a multi-layered learning model. In engineering terms, DL uses a layered cascade of nonlinear computing modules in which the input of each subsequent layer is based on the output from the previous layer to identify and convert attributes [
42]. DL algorithms cover a wide range of solutions. Synthesizing the literature on the subject, the following types of algorithms can be distinguished: convolutional neural network (CNN), long short-term memory network (LSTM), deep neural network (DNN), recurrent neural network (RNN), deep belief network (DBN), generative adversarial network (GAN), deep reinforcement learning (DRL), and Q-learning Reinforcement [
43,
44].
3.1.4. Support Vector Machines
A support vector machine (SVM) is commonly used to implement models that enable the separation and grouping of objects based on identified specific characteristics. SVMs are a group of algorithms used for learning two-class discriminant functions based on provided training examples [
45]. SVM algorithms use structural risk minimization, which means minimizing the upper limit of the generalization error instead of minimizing the learning error, as in other ML algorithms [
46].
3.1.5. K-Means Clustering Algorithms
K-Means clustering algorithms are popular methods used in unsupervised ML and data mining for clustering and pattern recognition. In the basic premise, the algorithm uses Euclidean distance as the metric and considers the
K classes in the dataset, averaging the distances by returning the initial centroid, with each class also described by a centroid [
47]. Various extensions of this method are available in the literature, e.g., [
48,
49,
50]. The essential advantage of the algorithm is its low computational complexity, which helps to minimize the use of computer system resources.
3.1.6. Regression Algorithms
Conceptually, regression is the process of learning relationships between inputs and continuous outputs from sample data, thus making predictions for new values [
51]. The algorithms of this class are part of supervised ML. Typically, for regression algorithms, the decision attribute is a real number. The algorithm’s input is a training dataset and a set of metaparameters, while the output is a vector of model parameters determined by minimizing the measurement error on the training data [
51]. Many variants of regression algorithms are used in ML, which can be classified in terms of predictive model and algorithmic procedure. The discussed algorithms include, among others, linear regression, logistic regression, generalized regression model, etc. [
52].
3.1.7. Self-Organizing Maps
In general, self-organizing maps (SOMs) are unsupervised learning methods and conceptually refer to ANNs. The algorithm classifies or detects a new input vector based on learning and mapping as the two main modes [
53]. Iteratively, the algorithm changes the feature weights to provide a basis for classification [
54]. The learning process involves tuning neurons to different input patterns until a winning neuron is determined that best matches the input vector [
55]. The algorithm processes the input data into discrete low-dimensional data [
54]. It is worth noting that the SOM algorithm is resistant to data disturbances and can map high-dimensional data to low-dimensional ones [
56]. The aforementioned features enable the effective use of SOMs in the energy sector. Research results presented by McLoughlin et al. [
57] indicate that SOMs are adequate for characterizing the load profile of domestic electricity using data from smart metering. In another study, Motlagh et al. [
58] demonstrated the effectiveness of SOMs in analyzing household electricity users’ behavior.
3.1.8. Hidden Markov Model
The hidden Markov model (HMM) concept is based on a statistical model for a Markov process where the states are unknown. The Markov process is a random process that satisfies the Markov assumption, i.e., the probability of one state depends only on the previous state in the random process [
59]. The HMM consists of a set of unobserved states where one state can transition to another, and each state is associated with an observed set [
59]. It should be noted that the HMM uses statistical learning algorithms where the costs increase exponentially as the amount of data increases [
60]. In ML, an algorithm for expectation maximization can be used to train the HMM as the first instance of the Baum–Welch algorithm [
61].
3.2. Metaheuristics
There is a specific class of computational problems for which it is impossible to find an optimal solution satisfying all boundary criteria in a reasonable time. Many methods have been developed to solve such issues, including metaheuristic algorithms. In general, metaheuristics are used to solve optimization problems where there is no satisfactory solution using any deterministic method in an acceptable time [
62]. Thus, metaheuristic algorithms can support the optimization of NP-hard problems. On the other hand, the specificity of metaheuristic algorithms means that they do not guarantee an optimal solution or finding a solution at all. Other limitations of metaheuristics include the difficult-to-estimate algorithm execution time and, in some cases, the high demand for computing resources.
Specific heuristic algorithms are often inspired by nature and are based on certain principles of physics, biology, or ethology [
62]. Among others, there are algorithms inspired by the theory of evolution, particle swarm optimization, ant colony, gray wolf, bee swarm, etc. The specificity of metaheuristic algorithms allows for their practical application in the energy sector. For example, Shahzad et al. [
63] published a solid study on planning modern power systems to deploy DGs in distribution networks using the strawberry plant propagation algorithm. Another paper by Shahzad et al. [
64] presented an effective method of supporting reactive power using a metaheuristic mine blast algorithm. Moreover, Bilal et al. [
65] demonstrated the particle swarm optimization algorithm’s effectiveness in minimizing losses in power systems. Metaheuristics include various classes of algorithms. This study was limited to evolutionary algorithms and swarm intelligence.
3.2.1. Evolutionary Algorithms
Evolutionary algorithms (EAs) are inspired by selected models of biological evolution occurring in nature. To elaborate on the general concept, it should be noted that evolutionary algorithms include various solutions in computer science. In particular, evolutionary algorithms are related to the following categories [
66]:
evolutionary programming (EP),
genetic algorithms (GA),
evolutionary strategies (ES),
genetic programming (GP).
The methods mentioned above are based on simulating the evolution of individual structures through selection, recombination, and mutation reproduction, thus creating better solutions across individual iterations of the algorithm [
62]. Although EP, GA, and ES were easy to distinguish in the initial phase of their development, they are now significantly more similar [
67]. As Beyer [
67] points out, only one distinction is possible: recombination is not used in EP algorithms, and mutation is the decisive search operator.
One of the leading solutions in EAs is population genetic algorithms (GAs), which are crucial for this paper. The assumptions of GAs are based on the biological DNA alphabet and originally represented binary sequences [
66]. The essential elements of a genetic algorithm are chromosome representation, match selection, and a set of operators inspired by biological processes [
68]. GA procedure consists of an initial calculation of the fitness of each chromosome in a randomly initiated population, after which a single-point crossover operator is applied to two selected chromosomes to produce offspring (
O) [
68]. In the next step, the mutation operator is applied to the produced offspring to generate (
O’), which is placed in the population [
68]. The algorithm repeats the procedure iteratively.
3.2.2. Swarm Intelligence
Swarm intelligence consists of algorithms inspired by the collective behavior of insects and herd animals. Animal herding behavior can be successfully adapted to mathematical optimization models and computer science in algorithm programming. Swarm intelligence-based algorithms include many different solutions. The following can be distinguished as supporting the energy sector:
particle swarm optimization (PSO),
bee colony optimization (BCO),
ant colony optimization (ACO),
bat algorithm (BA).
PSO is inspired by the flocking behavior of birds trying to find food [
69]. PSO solves continuous nonlinear optimization problems defined in an
n-dimensional search space [
70]. The algorithm assumes that the swarm consists of stochastically generated particles represented by velocity and location, and has a memory that stores the best position [
26]. The operation of the algorithm starts with the initialization of the population set. Then, interactively, the connection and velocity of each particle are influenced by individual and collective knowledge, which controls the movement of particles over the space of possible solutions in search of the optimal solution until the algorithm’s stopping criterion is reached [
71]. It should be noted that many improvements to the original PSO algorithm are available in the literature. A comprehensive analysis of PSO algorithms for solar power systems can be found in a review published by Elsheikh and Abd Elaziz [
72].
BCO is inspired by the naturally occurring behavior of bees, which work together to solve a combinatorial optimization problem [
73]. Artificial bees generate partial solutions during the step forward and return to the hive during the step back to participate in the decision-making process [
73]. Many algorithms have been developed following optimization paradigms inspired by honeybee behavior. Boussaïd et al. [
62] published a comprehensive review of various metaheuristic algorithms.
ACO algorithms are inspired by the natural ability of ants to find paths between different food sources and an anthill. In the natural environment, ants leave so-called pheromone trails and then choose paths with a high concentration of pheromones. Therefore, the most optimal paths are reinforced by successive passages of ants. There are many different variations on ACO algorithms available in the literature. High-performance algorithms include the rank-based ant system, max-min ant system (MMAS), and ant colony system (ACS) [
74].
BA is a metaheuristic algorithm based on swarm intelligence and is inspired by bats’ ability to echolocate [
75,
76]. The algorithm iteratively defines and updates each bat’s position and velocity in the multidimensional search space [
77]. Since the presentation of the original bat algorithm, many changes have been made to adapt it to specific optimization problems, including the binary bat algorithm (BBA) [
78], chaotic bat algorithm (CBA) [
77], island bat algorithm (iBA) [
79], and directional bat algorithm (dBA) [
76].
It should be noted that Olivas et al. [
80] conducted a comparative study of swarm intelligence algorithms and proposed modifying the algorithms’ main parameters using an interval type 2 fuzzy logic system. To sum up, the presented features of swarm intelligence allow for its effective use in various domains of the energy sector, as presented in
Section 4.
3.2.3. Gray Wolf Optimization
Gray wolf optimization (GWO) is inspired by a model of selected social relations and hunting methods in gray wolf packs [
81]. The algorithm is based on three primary phases in the mathematical hunting model: tracking, encircling, and attacking [
82]. The mathematical hunting model assumes that the alpha, beta, and delta optimization solutions have the best knowledge of the potential location of the victim, so the remaining search agents must update their positions in the search space [
81]. It is worth noting that the applications of GWO algorithms for controlling and optimizing power flows [
83], designing transmission lines [
82], and searching in wireless sensor networks [
84] were investigated.
3.2.4. Simulated Annealing Algorithm
The simulated annealing (SA) algorithm is inspired by the material recrystallization process through heating and cooling [
85]. SA finds a solution using a random variation of the current solution [
86]. The worse variant being accepted as the new solution, following a certain probability that decreases in subsequent steps of the algorithm [
86]. The target function, which is analogous to the energy of the material, is successively minimized by a fictitious temperature, a controllable parameter of the algorithm [
62]. The advantage of SA algorithms is their compactness, reliability, and reduction of calculation time for single- and multi-objective optimization problems [
87]. On the other hand, it should be noted that there may be problems for which SA algorithms could not provide optimal or valuable solutions in a reasonable amount of time [
86].
3.3. Fuzzy Inference Systems
Computer science extensively uses classical binary logic, which applies basic logic operations to manipulate binary variables that can take the values 0 or 1. However, there are many classes of problems, such as engineering and technical problems, in which two-valued logic cannot handle situations characterized by heterogeneity and ambiguity. Zadeh [
88] proposed the concept of fuzzy sets and fuzzy logic, which was groundbreaking for mathematics and computer science. The fuzzy theory assumes that a fuzzy set is associated with a membership function that determines the degree of membership of an element in the set [
88]. Therefore, a given element may partially belong to the set. In contrast to classical two-valued logic, fuzzy logic is multi-valued. The concept of fuzzy logic is used in computer science to implement expert systems. It should be noted that expert systems are a long-known and well-established concept. Therefore, expert systems cover many technologies, methods, and algorithms. The key solutions include systems based on Boolean logic, framework systems, ANNs, fuzzy expert systems, and hybrid systems combining many different AI algorithms.
Liao [
89] characterized the general procedure for fuzzy inference in the following steps:
fuzzification—based on the membership function, the degree of truth for each premise of the rule is determined;
aggregation—using the appropriate operators, the degrees of all the premises of the rule are combined if there is more than one premise of the rule “anded” together;
inference—based on the assignment of one fuzzy subset to the output variables for the defined rules, the inference process is carried out using appropriate operators;
composition—a single fuzzy subset is created for each output variable by combining all fuzzy subsets assigned to that variable;
defuzzification—optional step if it is reasonable to convert the fuzzy output to a crisp number.
The advantage of expert systems is their transformation of expert knowledge into a set of rules and an inference system. Expert systems work well in solving typical problems in a given domain. On the other hand, in the case of unusual problems for which there is no standard solution, expert systems may be useless.
4. AI Algorithms for Engineering Problems in the Energy Sector
Based on the review in
Section 3, the effects of applying AI algorithms to selected domains of the energy sector were analyzed. In particular, the study concerned the following issues: cybersecurity in energy systems, energy saving, Smart Grid management, fault diagnosis, electricity load forecasting, and renewable energy.
4.1. Cybersecurity
Cybersecurity is a critical factor in the efficiency of the energy sector. It should be emphasized that cybersecurity concerns interdisciplinary issues and requires the coordination of technological, legal, social, procedural, and organizational activities [
90]. Cybersecurity is closely related to information security. In the literature, information security is often defined in the context of key information security attributes [
91]. In addition, the application of the Internet of Things in the energy sector expands the range of possible vulnerabilities and threats. The latest research shows that ensuring cybersecurity for the IoT requires a systemic approach involving the management of all system elements [
92]. Significant progress has been made recently in using AI, including ML, to support the security of IT systems. Research shows that various AI techniques can be successfully used in cybersecurity for the energy sector and related systems. Wang and Govindarasu [
93] pointed out that cybersecurity is a popular topic in computer science but has not received enough attention in the field of critical infrastructure.
Electrical power systems have essential cybersecurity requirements. Modern power systems consist of a physical layer and an information (cyber) layer [
93]. Based on this assumption, power systems can be studied from the perspective of CPSs. Wang and Govindarasu [
93] published research on detecting cyber-physical anomalies in power grids using various ML techniques. The studies mentioned above indicate the effectiveness of the
k-means clustering algorithm in detecting anomalies in power systems. The research also showed the main challenges for detecting anomalies in CPSs: time efficiency, Big Data issues, and updating the detection model [
93]. Because many factors can disrupt the generation and consumption of energy in power systems, the analyzed research is a significant contribution to the cybersecurity of the energy sector.
In another publication, Wang et al. [
94] designed a machine learning model that, based on historical data and log data collected by phasor measurement units, enables the detection of attacks on the energy system. This study uses a novel model with a random forest (RF) as the AdaBoost classifier and then a weighted voting method on the prediction results [
94]. The results of the experiment were compared with many other ML algorithms. The research shows that the proposed method effectively detects cyberattacks in energy systems.
The assumptions of the Energy Internet of Things (eIoT) [
95] concept concern the improvement of management processes for new energy systems. On the other hand, the complex eIoT architecture generates new vulnerabilities and challenges for cybersecurity in the energy sector. eIoT systems can be considered within a layered approach; they consist of many network devices, sensor networks, embedded systems, transmission media, and data analysis software. Li et al. [
96] published an article on the application of ML to selected aspects of eIoT cybersecurity. The article refers to a solar heating control system based on eIoT. The research used ML based on the RF method, which assumes the construction of multiple decision trees. During the experiment stage using XGBoost, a successful attack was carried out on the established ML model on the IoT platform [
96]. The presented research proves the existence of a new vulnerability for eIoT systems that allows the theft of AI models generated based on the learning process.
Available research also points to the possibility of using ML to detect energy theft. In particular, Gunturi and Sarkar [
97] published a study using machine learning models to detect energy theft in smart grids based on customer consumption patterns. The aim of the study was, among other things, to test the latest ML techniques for identifying energy theft. The article tested ML classifiers such as adaptive boosting, categorical boosting, extreme boosting, light boosting, RF, and extra trees [
97]. The analyzed studies indicate the effectiveness of ML classifiers in predicting customers’ real and malicious energy consumption patterns.
Due to global security in the energy sector, it is crucial to ensure cybersecurity in monitoring and control systems. Alghassab [
98] published significant research findings in this regard. The referenced publication used the analytic hierarchy process (AHP) method based on uncertain fuzzy sets and the TOPSIS technique to estimate cybersecurity assessments for industrial control systems [
98]. The research indicates that attacks on control systems and threats such as zero-day rootkits can be difficult to avoid and detect [
98]. The discussed article indicates the need to develop new intrusion detection algorithms for industrial control systems. The authors also pointed out the potential of ML in this regard.
Said et al. [
99] researched the use of the SVM algorithm to counter false data injection attacks. The research focused on the cybersecurity of peer-to-peer energy transactions for a Connected Electric Vehicle (CEV) [
99]. The research results indicate that the presented SVM algorithm can increase cybersecurity in the decentralized electricity trading provided by CEV sellers and buyers [
99]. An important conclusion from the discussed research is that the injection of false data into ML algorithms can significantly decrease performance or even damage the entire system [
99].
Table 1 summarizes the use of AI algorithms to support cybersecurity in the energy sector.
4.2. Energy Saving and Power Loss Reduction
Optimizing energy saving and reducing power loss are crucial challenges in modern energy systems and translate into both economic and ecological benefits. Extensive research is currently being conducted on using AI to support energy saving.
Deng et al. [
100] presented a model of energy-saving planning using a differential EA. The proposed model concerns energy saving in industrial robotics via the example of a palletizing robot. The article analyzes characteristics related to the robot’s work, then adopts a differential EA to optimize the motion trajectory parameters [
100]. The research results indicate that using the optimization methods presented in the article can reduce the robot’s energy consumption by 16% [
100]. Research findings measurably prove the effectiveness of AI methods to save energy in industrial robotics.
Zheng et al. [
101] investigated applications of the hybrid ant colony algorithm for energy planning in the manufacturing industry. The issue of permutation flow planning with batch processing machines is classified in the literature as an NP-hard problem [
101]. To solve the posed problem, a mixed integer programming model was defined, as well as a new multi-criteria algorithm for optimizing a hybrid ant colony [
101]. The discussed research results indicate that the presented algorithm significantly supports finding a better consensus between production efficiency and energy costs, which is crucial in the manufacturing industry.
Yuvaraj et al. [
102] published research results on various methods of minimizing losses and regulating voltage in power distribution systems. The bat algorithm and blockchain technology were used in the discussed studies. The research aimed to reduce power losses and voltage regulation in radial power distribution systems. The article investigated the problem of allocation of reactive power compensators in a distribution system to minimize power losses [
102]. The bat algorithm showed a high degree of loss reduction in the test scenarios [
102]. Research findings indicate that the presented method could significantly support distribution network operators, e.g., in selecting compensation devices and real-time applications [
102].
Wu et al. [
103] published a paper on the use of a simulated expression algorithm to optimize energy consumption path planning. In the article, an energy consumption model for a UAV transmission tower was constructed, and the model parameters were optimized [
103]. The research findings allowed applying the simulated expression algorithm to plan an energy consumption path for transmission towers that respected energy consumption constraints [
103]. The research shows that an energy-optimal path should be used during UAV operation with load changes to reduce energy consumption [
103].
Machorro-Cano et al. [
104] published research results on ML, Big Data, and the Internet of Things in saving energy in smart homes. The publication presents a comprehensive energy management system for smart homes that supports energy saving. The system model was presented in a layered approach. Particularly noteworthy is the legitimate distinction of the security layer, which is responsible, among other things, for data confidentiality. The system uses DTs based on an open implementation of the C4.5 algorithm in the Java programming language [
104]. The experiment shows that the presented system significantly reduces energy consumption, which is particularly important from the point of view of individual consumers.
Memon et al. [
105] published a paper on the use of AI to save energy in 5G networks. The study used the recurrent LSTM artificial neural network to extract the packet arrival time pattern based on network traffic analysis [
105]. The research results in the discussed article indicate that, compared to the LTE-DRX method, the proposed algorithm shows 69% higher energy efficiency on trace 1 and 55% for trace 2 [
105]. The presented research results are crucial for the entire mobile industry in the context of the future development of next-generation networks.
Zhang et al. [
106] published a paper presenting a machine learning algorithm for responding to energy demand. The paper proposes a model of an HVAC controller integrated with an ML engine for activity recognition. RFs were used in machine learning. The purpose of the ML engine is to map sensor events to the activities performed by the residents of the controlled house [
106]. According to the authors, the research results indicate that using the proposed HVAC controller reduces energy consumption by 5.14% compared to the classic on/off controller [
106]. The research results show the potential of RF algorithms to support energy saving in HVAC controllers.
Table 2 summarizes the use of AI algorithms to support energy saving and reduction in power losses in energy infrastructure.
4.3. Smart Grid Management
Smart Grid integrates many areas of the energy sector and uses various IT technologies. The following engineering problems were selected for the study: implementing intelligent agents controlling the power grid, ensuring grid stability, controlling transformers, real-time energy management, and supporting local energy communities.
Damjanović et al. [
107] published a paper on the use of deep reinforcement ML to manage the power grid for autonomous power flow control. The paper aimed to implement an intelligent agent that manages the power grid by changing the topology considering different system conditions. In particular, the research analyzed network topology reconfiguration actions, i.e., line connection/disconnection and substation configuration changes [
107]. The RL method and the deep Q networks (DQN) algorithm were used to train the implemented agent [
107]. Various scenarios were used in the tests, and the implemented agent controlled the network for up to a month [
107]. The research results indicate that an autonomous agent can successfully automate power grid management.
Bashir et al. [
108] studied applying various ML algorithms to predict the stability of a Smart Grid. The research focused on comparative analysis of selected algorithms, including DTs, naive Bayes (NB), SVM, logistic regression,
k-nearest neighbor (
k-NN), and ANNs. The comparative experiment was implemented in the Python programming language and was based on data from a publicly available repository [
108]. The dataset used in the study contained many attributes, including the system’s stability, nominal power consumed and power produced, price elasticity factor, and the maximum value of the equation root [
108]. The experiment results indicate that DTs were the best algorithm for the adopted data set [
108]. The study is crucial to ensuring the reliability of the infrastructure and power flow in Smart Grids.
Laayati et al. [
109] published a vital publication on applying AI to manage transformers. It is worth noting that power transformers are a critical element of the power grid. The referenced publication presents a comprehensive hybrid solution that supports the management of intelligent power transformers. The solution integrates transformer monitoring strategies, ML, and software agents [
109]. In particular, the discussed article presents a multi-layer, multi-agent architecture for diagnosing various health parameters of a transformer. An important stage of the paper was a comparative experiment among selected ML algorithms in terms of predictive model evaluation. The experiment analyzed, among others, the following algorithms: DTs, RFs, SVM,
k-NN, and decision stump [
109]. Research findings are crucial for implementing intelligent energy management systems that automate decision-making in power grids.
Qiu et al. [
110] published an article presenting the application of a novel ML method to manage a multi-energy system in real time. The method aimed to minimize energy costs and carbon dioxide emissions while meeting operational assumptions [
110]. The real-time automatic energy management problem was described based on the Markov decision process [
110]. Among ML methods, DL with reinforcement, deep deterministic policy gradient (DDPG), and safety-guided networks were used in the study. The experiment used a dataset that included real demand scenarios and renewable energies. The research findings indicate that the presented method enables the recognition of future trends in the time series for demand and renewable energies [
110]. The study is an essential contribution to the field of Smart Grid management.
Zhou et al. [
111] published a paper on intelligent energy community management. The study specifically addresses the management of home energy storage systems and peer-to-peer trading [
111]. The discussed article uses the Markov decision process to formalize energy trading. A reinforcement learning algorithm was used to determine the optimal decision in the Markov decision process (MDP) [
111]. The discussed article proposes using a fuzzy Q-learning algorithm to support decision-making by energy community participants. The study results indicate that the proposed method is an opportunity to minimize energy bills in the tested community.
Table 3 summarizes the applications of AI algorithms for selected engineering problems in Smart Grid management.
4.4. Forecasting Electricity Loads
Forecasting electricity loads is essential to supporting the stability of energy systems and thus strengthening energy security. The following engineering problems concerning energy load forecasting were selected for the study: regional energy load planning, short-term planning, load estimation for microgrids, the issue of power generation resource optimization, and building load forecasting.
Llanos et al. [
112] published a paper on microgrid load estimation using SOM. The research focused on estimating electricity load profiles in isolated communities, assuming power may not always be available [
112]. Research findings indicate that SOM can successfully support the generation of load profiles in microgrids that do not have a continuous power supply [
112]. Knowledge of energy demand profiles in microgrids supports the development of optimal energy supply strategies and the prediction of generating units’ capacity.
Ying and Pan [
113] presented a fuzzy reasoning system for forecasting regional electricity loads. The study used a hybrid learning algorithm based on an adaptive neuro-fuzzy inference system (ANFIS) [
113]. In engineering terms, the algorithm integrates the gradient method and the least-squares method to update the parameters of the adaptive network [
113]. The research results indicate that the presented algorithm allows for accurate predictions in terms of regional energy load. The conducted experiments indicate that the proposed method gives more accurate forecasts than other comparative models [
113].
Ibrahim et al. [
114] published a paper on applying ML for short-term load forecasting in Smart Grids. The paper assumes that the main predictors for short-term forecasts are previous week’s energy load, previous day’s load, and temperature [
114]. The article conducted a case study examining various ML and SL algorithms, including SVR, XGBoost, AdaBoost, RF, LightGBM, deep-learning regression (DLR), Bi-LSTM, and GRU [
114]. The research shows that the DLR model best predicted the demands for an hour ahead [
114]. The research results presented in the discussed article can significantly support energy planners.
Xu et al. [
115] published a study on forecasting energy load in buildings. The study used a method based on the MV-LSTM multivariate neural network and the Mixture Attention Mechanism [
115]. It should be noted that the purpose of the research in question was both to develop an effective load forecasting model for residential buildings and to provide internal interpretations for the model [
115]. Therefore, the results generated by the forecasting model are clear and easy to interpret. The case study results based on real data indicate that the presented method achieves high prediction accuracy, and the results are highly interpretable.
Table 4 summarizes the applications of AI algorithms for forecasting energy load.
4.5. Fault Diagnosis in Energy Systems
Fault diagnostics are essential for energy systems’ reliability, efficiency, and stability. Energy systems have complex cyber-physical architecture that generates the potential for faults. The following engineering problems concerning fault diagnosis in energy systems were selected for the study: diagnostics of power transformer and power line faults, and faults in thermal, hydro, photovoltaic, and wind power plants.
Fei and Zhang [
116] studied power transformer fault diagnosis and focused on using SVM and GA. In the discussed study, the GA was used to fit SVM parameters, which translates into a better classification. The study also included an experimental part in which data from several energy companies were used. Research findings show, among other things, that using a GA improves classification accuracy compared to an SVM with randomly selected parameters [
116].
Illias et al. [
117] published a paper on the use of AI algorithms to detect power transformer failures. The paper uses a hybrid method based on a modified evolutionary PSO algorithm with a time-varying acceleration coefficient (MEPSO-TVAC) and ANNs [
117]. The study used dissolved gas analysis data from a real power transformer. The test results indicate that for the adopted comparative parameters, the hybrid combination of the methods mentioned above gives a higher percentage of power transformer fault detection than other methods used for comparison [
117]. Due to promising research results, the proposed algorithm can significantly support diagnostic work in the energy sector.
Jamil et al. [
118] published a study on applying ANNs for classification and fault detection in a three-phase power line system. The study used a feed forward neural network and back propagation algorithm. The input of the neural network receives a set of data on three-phase voltages and three-phase currents [
118]. The research results indicate that neural networks are an effective method for both the problem of detection and the classification of power line faults. The method can be generalized to other types of faults.
Khalid et al. [
119] researched the use of ML to detect faults in thermal power plants. In the case of thermal power plants, a significant problem is the proper estimation of optimal sensors for effective damage detection [
119]. Combinations of various AI methods were used in the research, including extra-tree classifier (ETC), SVM,
k-NN, and naive Bayes algorithm [
119]. The study also included an experiment to evaluate the effectiveness of the presented method. The experiment was based on a real power plant scenario. The results indicate that the proposed method reduced the number of sensors by 44% for water wall pipe leakage and by 55% for turbine engine failure [
119]. The research findings are crucial because reducing redundant sensors contributes to increasing the efficiency of the fault detection system in thermal power plants.
Michalski et al. [
120] published an article on ML methods for diagnostics and fault-finding in hydropower plants. The article concerns diagnosis of the Kaplan propeller turbine, which is a crucial component in a hydroelectric generator system. The fault detection and diagnosis procedure are based on a framework including a Bayesian network and the moving window principal component analysis method (MWPCA) [
120]. The presented method allowed for observation of the evolution of turbine failure modes and the obtaining of information about potential failures [
120].
Kouadri et al. [
121] published a paper on applying HMM for intelligent fault diagnosis in wind energy systems. The paper focuses on a conversion system with a variable-speed wind turbine. HMM and principal component analysis (PCA) techniques were used in the study [
121]. The PCA technique was used to precisely extract observations for HMM algorithms. Three types of faults were considered in the test: short-circuit, open-circuit, and wear-out [
121]. The results show high performance by the PCA-based hidden Markov models, which were better than the PCA-based SVM method [
121].
Livera et al. [
122] presented a fault diagnosis system architecture for photovoltaic systems. The system uses a combination of regression and classification models based on a tree-oriented extreme gradient boosting algorithm. The aim of the research was, among others, to develop classification and prognostic models for diagnosing failures in photovoltaic systems [
122]. It is worth noting that the presented method supports several key areas, including predicting output power, detecting data problems, and detecting power faults [
122]. The results confirm the high efficiency of the presented method, which enables its application in the production of integrated monitoring systems for photovoltaic power plants.
Table 5 summarizes the applications of AI algorithms for selected engineering problems in detecting faults in energy systems.
4.6. Renewable Energy
Renewable energy is crucial for current and future intelligent energy systems. Solar, wind, hydro, geothermal, and biomass energy were selected for the study.
Cabezón et al. [
123] published a paper on the application of ML to forecast energy production in a solar farm. In the paper, various ML methods were used to achieve the research goals, including linear regression,
k-NN, DTs, extreme gradient boosting, and light gradient boosting algorithms, as well as various types of neural networks (MLP, ENN, LSTM) [
123]. The aim of the study was a short-term forecast, allowing for the estimation of the coming hour [
123]. The results showed that tree-based extreme gradient boosting was the most accurate predictive model [
123]. It is worth noting that the effectiveness assessment was carried out using real data from a selected solar farm.
Tu et al. [
124] also conducted a study on short-term solar energy forecasting. The study used a general regression neural network (GRNN) with GWO. In addition, a self-organizing map algorithm was used in the research, among other things, to define weather clusters [
124]. The results, based on real solar data, showed that the presented method increased the accuracy of insolation forecasting.
Wan et al. [
125] published a study on the application of neural networks in forecasting wind energy. The study used a multi-view ensemble width-depth neural network (MVEW-DNN) [
125]. The model includes a division into subnets that learn the local view and subnets dedicated to learning the global view [
125]. The proposed method focuses on improving model performance and reducing computational costs [
125]. The results indicate that the proposed method has high predictive efficiency and can significantly support the scheduling of wind energy production.
Condemi et al. [
126] took up the issue of using selected ML techniques to forecast production capacity in hydropower plants. The discussed study used machine learning regression techniques, including multi-layer perceptron (MLP) networks, extreme learning machines (ELM), and support vector regression algorithms (SVR). Multiple input variables were included in the research model, including precipitation, snow cover, temperature, and radiation [
126]. It is worth noting that the experiment estimating the monthly capacity of the hydropower plant was based on real input data [
126]. Research findings indicate that using meteorological parameters provides a basis for implementing efficient predictive models.
Duplyakin et al. [
127] published a paper on the use of ML to model the subsurface performance of geothermal reservoirs. The presented method enabled the translation of flow rates for active wells into estimated reservoir energy [
127]. The ML models in the study were used, among others, to predict temperature and pressure time series for individual wells [
127]. The discussed article presents a technique that involves processing simulation data and mapping to coefficients defining curves for modeled time series [
127]. In addition, the results are an essential contribution to the application of ML algorithms in geothermal reservoir modeling.
The last analyzed renewable energy source is biomass. Wongchai et al. [
128] published research on ML models for biomass estimation. The research concerns the above-ground biomass of fast-growing trees. The article uses various ML algorithms to verify the fit of the predictive model to the dataset. In particular, random DT, RF, gradient tree boosting (GTB), adaptive boosting (AdB), kernel ridge regression (KRR), SVM, and
k-NN were used [
128]. The following variables characterizing the examined trees were considered in the study: breast height (DBH), height, age, and biomass [
128]. Research findings indicate that the RF algorithm has the highest prediction accuracy for the comparison scenarios performed [
128]. The results indicate the high efficiency of selected ML techniques for estimating above-ground tree biomass.
Table 6 summarizes the applications of AI algorithms for selected engineering problems in renewable energy.
5. Open Research Challenges
The conducted analyses allowed for the identification of several open research challenges regarding cybersecurity and the effectiveness of AI algorithms in the energy sector. It should be noted that all implemented IT solutions must support the security of energy systems, which are vital components of critical infrastructure. In the face of digital transformation, energy security is closely related to ensuring cybersecurity for energy systems. In this respect, open research challenges are related to the protection and privacy of digital data generated by end users of energy systems. In particular, when terminal sensors collect sensitive data on energy consumption profiles, device operation, etc., there is vulnerability to uncontrolled data leakage. In cybersecurity, a systemic approach to protecting energy systems is crucial. The undertaken research initiatives should be characterized by interdisciplinarity, combining the methodologies of security sciences and computer science. Thanks to this, it will be possible to holistically prevent, detect and handle cybersecurity threats in the energy sector, taking into account control and monitoring processes. An additional open research challenge is a new type of vulnerability, the theft of AI predictive models developed for specific decision-making problems. Research on new concepts of light data encryption is therefore crucial due to limitations on the computing power of IoT and end devices used in energy systems. It is worth noting that many studies indicate that the human factor is a critical element of cybersecurity. In this regard, safety education has been widely recognized as an effective method of preventing danger [
129]. Recent research also points to the need to take initiatives to standardize the Internet of Things in terms of architecture, cybersecurity, programming paradigms, communication standards, and cybersecurity [
130].
Another area for open research challenges is the effectiveness of AI algorithms in the energy sector. Two key issues are the computational complexity of algorithms and the preprocessing of data for predictive models. The review showed that some AI methods used in the energy sector significantly increase computational and memory complexity when handling large data sets. Therefore, an open research challenge is to develop optimization methods that will reduce the time and memory complexity of predictive models for the energy sector. The issue of computational complexity is also crucial for metaheuristic algorithms and hybrid solutions, where it is essential to define the criteria for completing calculations. The key is ensuring a compromise between computational complexity and algorithm accuracy.
The last point is the preliminary preparation of data for predictive models. Data orientation in intelligent energy systems means relying on distributed sensor networks that can record data about different structures and value types. Moreover, in energy systems, there is a need to process data with a variable, heterogeneous structure. Therefore, the energy sector needs to solve Big Data issues. Recent research findings indicate that data models are critical to the efficiency of Big Data processing [
131]. On the other hand, some AI algorithms require data with specific structures and characteristics, e.g., discrete or continuous data. Therefore, an open research challenge concerns preprocessing energy sector data for various AI algorithms.
6. Conclusions
The analysis showed that ML, metaheuristics, and fuzzy inference systems can significantly improve processes’ efficiency in key energy sector domains. AI supports cybersecurity in detecting cyberattacks and anomalies in power systems. The review showed the benefits of energy saving in robotics, manufacturing, planning of power consumption paths for UAV transmission towers, and optimizing energy demand responses, among others. Critical AI applications in a Smart Grid relate to intelligent agents controlling the power grid, ensuring power grid stability, controlling smart transformers, and real-time energy management. AI algorithms effectively support energy load prediction and power generation resource optimization. In particular, AI algorithms can detect faults in power transformers, power lines, hydroelectric generators, photovoltaic systems, and wind turbines. Moreover, various AI techniques and methods can significantly improve solar, wind, hydro, geothermal, and biomass energy.
Research should be continued on the open research challenges identified in
Section 5. In particular, ensuring the protection of energy system users’ data requires urgent research. It is also essential to prevent the theft of AI models implemented for specific optimization issues based on real data. The heterogeneous and variable structure of data generated in Smart Grid requires future research on pre-processing for AI algorithms. It is reasonable to develop a systematic literature review on a specific algorithm or one selected area of the energy sector, for example, minimizing power losses.