Next Article in Journal
CNN–Patch–Transformer-Based Temperature Prediction Model for Battery Energy Storage Systems
Next Article in Special Issue
Hybrid Prediction Model of Burn-Through Point Temperature with Color Temperature Information from Cross-Sectional Frame at Discharge End
Previous Article in Journal
Data Flow Forecasting for Smart Grid Based on Multi-Verse Expansion Evolution Physical–Social Fusion Network
Previous Article in Special Issue
Identification of Abnormal Electricity Consumption Behavior of Low-Voltage Users in New Power Systems Based on a Combined Method
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Review

Advancing Smart Energy: A Review for Algorithms Enhancing Power Grid Reliability and Efficiency Through Advanced Quality of Energy Services

by
José M. Liceaga-Ortiz-De-La-Peña
1,
Jorge A. Ruiz-Vanoye
1,*,
Juan M. Xicoténcatl-Pérez
1,
Ocotlán Díaz-Parra
1,
Alejandro Fuentes-Penna
2,
Ricardo A. Barrera-Cámara
3,
Daniel Robles-Camarillo
1,
Marco A. Márquez-Vera
1,
Francisco R. Trejo-Macotela
1 and
Luis A. Ortiz-Suárez
1
1
Dirección de Investigación, Innovación y Posgrado, Universidad Politécnica de Pachuca, Carretera Pachuca—Cd. Sahagún km 20, Ex-Hacienda de Santa Bárbara, Zempoala 43830, Mexico
2
El Colegio de Morelos, Av. Morelos Sur 154, Esquina Con Amates, Colonia Las Palmas, Cuernavaca 62050, Mexico
3
Facultad de Ciencias de la Información, Universidad Autónoma del Carmen, Calle 56 No. 4, Esquina con Avenida Concordia, Colonia Benito Juárez, Ciudad del Carmen 24180, Mexico
*
Author to whom correspondence should be addressed.
Energies 2025, 18(12), 3094; https://doi.org/10.3390/en18123094
Submission received: 30 March 2025 / Revised: 2 May 2025 / Accepted: 23 May 2025 / Published: 12 June 2025

Abstract

The transformation of traditional energy systems into smart energy systems has ushered in an era of efficiency, sustainability and technological growth. In this paper, we propose a new definition for “Quality of Energy Service” that focuses on ensuring optimal power-supply quality, encompassing factors such as availability, speed (i.e., the time to restore or adjust supply following interruptions or load changes) and reliability of supply. We explore the integration of advanced algorithms specifically tailored to enhance the Quality of Energy Services. By concentrating on key aspects—reliability, availability and operational efficiency—the study reviews how various algorithmic approaches, from machine learning models to classical optimisation techniques, can significantly improve power grid management. These algorithms are evaluated for their potential to optimise load distribution, predict system failures and manage real-time adjustments in power supply, thereby ensuring higher service quality and grid stability. The findings aim to provide actionable insights for policymakers, engineers and industry stakeholders seeking to advance smart grid technologies and meet global energy standards. Furthermore, we present a case study to demonstrate how these models can be integrated to optimise grid management, forecast energy demand and enhance operational efficiency. We employ multiple machine learning models—including Random Forest, XGBoost version 1.6.1 and Long Short-Term Memory (LSTM) networks—to predict future energy demand. These models are then combined within an ensemble learning framework to improve both the accuracy and robustness of the forecasts. Our ensemble framework not only predicts energy consumption but also optimises battery storage utilisation, ensuring continuous energy availability and reducing reliance on external energy sources. The proposed stacking ensemble achieved a forecasting accuracy of 99.06%, with a Mean Absolute Percentage Error (MAPE) of 0.9364% and a Coefficient of Determination (R2) of 0.998345, highlighting its superior performance compared to each individual base model.

1. Introduction

To conceptualise the term “smart energy”, several researchers conducted analyses based on the energy concepts used prior to 2012, such as non-renewable and renewable energy. Lund et al. [1] propose three phases for the implementation of renewable energy: the introduction phase, the large-scale integration phase and the 100 percent renewable energy phase. In the first phase, the use of non-renewable energy exceeds that of renewable energy, so the inclusion of renewables does not affect existing distribution networks. In the second phase, the integration of renewable energy contributes to increased supply, so distribution networks must be stabilised. In the third phase, it is assumed that renewable sources alone generate energy; therefore, achieving power balance is essential. The challenges to consider include conversion changes between energy generators, infrastructure, storage and the stabilisation of frequency and voltage in current distribution networks.
Abella et al. [2] note that for the electricity sector, the term “smart energy” is conceptualised as a set of technologies, applications and services that enable the active participation of the prosumer. A prosumer is someone who both consumes and produces energy.
Sánchez [3] states, in his publication, that smart energy is regarded as a novel approach to the energy management process, from production through to consumption.
Aichele [4], in his book on intelligent energy systems, discusses the deployment of digital electricity meters that monitor consumption and performance in real time. These devices transmit data to energy companies for analysis and are used as a mechanism to enhance their services; they can also identify and engage customers who are both energy consumers and producers. In the author’s view, this process will constitute a step towards the design of self-regulating networks as part of the intelligent energy system.
Thellufsen et al. [5] describe, in their article on energy storage and smart energy systems, the importance of integrating renewable energy from diverse sources and its impact on intelligent storage solutions.
These diverse perspectives underline the complexity and the multidimensional need to move towards smart energy systems that not only optimise the use of renewable resources but also integrate advanced technologies to improve the efficiency, reliability and Quality of Energy Services, thus shaping the path towards a sustainable and highly interconnected energy future. Smart energy is the comprehensive integration of generation, transmission and consumption systems through real-time monitoring, bi-directional communication and adaptive control to optimise efficiency, reliability and sustainability; it draws on standards such as IEEE 2030 for smart grid interoperability, IEC 61850 for substation communication protocols and NIST SP 1108 for demand response and distributed resource architectures to ensure seamless data exchange and dynamic system response.
Figure 1 presents a conceptual framework diagram illustrating the overall structure and logical progression of this review, detailing its principal components and their interrelationships to guide the reader through the analysis.
Despite considerable advances in Smart Grid Algorithms, three key gaps persist: (1) the absence of a comprehensive taxonomy unifying traditional and ensemble machine learning approaches; (2) limited benchmarking of algorithmic performance in demand forecasting and battery storage management applications and (3) little discussion of policy and ethical considerations for large-scale deployment. This paper addresses these gaps by (i) proposing a twelve-category classification framework and (ii) outlining future research directions.
In our review, we explicitly address aspects overlooked by prior analyses: we incorporate algorithms beyond the traditional Random Forest—namely those applied to load-distribution challenges, system failure prediction and real-time power-supply adjustments—to ensure superior service quality and grid stability, and we introduce the mathematical formulation for general optimisation problems in smart energy, detailing objective functions, decision variables and system-specific constraints. Moreover, we introduce updated Quality of Energy Service concepts, such as harmonic distortion indices and voltage fluctuation response protocols, which are absent from earlier works. Finally, we present a practical case study integrating Random Forest, XGBoost and LSTM models to optimise grid management, forecast energy demand and enhance operational efficiency, thereby demonstrating how these methodologies can be synergistically combined to advance smart grid technologies.

2. Smart Energy

Smart energy is the efficient and sustainable utilisation of energy by integrating smart technologies into energy generation, distribution and consumption systems, reducing energy waste by optimising consumption in households, industry and transport. Smart energy manages energy by maximising efficiency alongside environmental sustainability and grid resilience, improving the user experience and leveraging smart technologies and practices.
Smart energy improves the grid’s ability to withstand and recover from failures and attacks, ensuring a constant and secure energy supply. Consumers have more control over their energy consumption, being able to monitor and adjust their usage through smart devices and mobile applications. By promoting efficiency and the use of clean energy, Smart energy contributes to reducing greenhouse gas emissions and the carbon footprint. Through demand response schemes and dynamic pricing, consumers can be incentivised to use energy during periods of low demand, helping balance the load on the grid.
The components of Smart energy are smart grids (including smart meters, sensors and controllers and energy management systems), distributed generation (including renewable energy sources and energy storage), energy efficiency (including home automation, smart buildings and demand management), electric vehicle integration (including smart-charging stations), information and communication technology (including data analytics platforms and cybersecurity), microgrid infrastructure, regulation and policy in the energy sector, consumer involvement and smart technologies, such as sensors, the Internet of Energy, smart meters and automated control systems to monitor and manage the flow of energy.
There is a related term called the Internet of Energy (IoE), which represents an emerging paradigm in the energy sector that seeks to deeply integrate information and communication technologies with traditional energy grids. This integration enables more efficient and sustainable energy management, encompassing distributed generation, smart grids, energy efficiency and active consumer participation. Through the IoE, the energy sector can fully harness the potential of digital technologies to enhance the resilience, efficiency and sustainability of the global energy system.
The solution to the optimisation problem lies in determining the set of decision variables x that minimise or maximise the objective function f(x) subject to the given constraints. The general optimisation framework for smart energy problems should include the following:
  • Objective: to minimise or maximise an objective function representing a key metric in the smart energy system, such as the total cost, energy consumption and efficiency;
  • Decision variables: variables that can be controlled and adjusted to optimise the objective, including power generation, distribution, storage and demand;
  • Constraints: the limitations and conditions that must be satisfied within the system, such as maximum and minimum capacities, energy conservation laws, regulations and others.
The mathematical formulation for general optimisation problems in smart energy comprises the following:
Objective function:
f x = min i = 1 n c i x i
This is subject to the following:
g i G i , i = 1 , , n generation capacity;
i = 1 n g i = j = 1 m d j energy balance;
s i S i , i = 1 , , k storage limitations;
l   L grid constraints;
r i R i , i = 1 , , p restrictions on renewable energy integration.
Here, ci is the cost or benefit coefficient, xi is the decision variable, gi is the current generation, Gi is the maximum generation capacity, dj is the demand at node j, si is the current storage, Si is the maximum storage capacity, l is line flow, L is the line capacity, ri is the current renewable generation, and Ri is the maximum renewable generation capacity. Additional restrictions related to CO2 emissions and government regulations may be added.
Optimisation in Smart Energy:
  • Smart grid optimisation: This focuses on the optimisation of smart meters to minimise errors and maximise communication efficiency, as well as the optimisation of sensors and controllers in relation to load balancing and power flow control. It also covers the optimisation of energy management systems for efficient planning of generation, distribution and consumption.
  • Optimisation of distributed generation: By optimising renewable energy sources, the aim is to maximise energy capture and minimise costs. Energy storage optimisation is also considered to maximise storage capacity and minimise losses.
  • Energy efficiency optimisation: This is achieved through the optimisation of smart buildings, automated systems to minimise consumption and demand management, using algorithms that adjust consumption according to the needs of the grid.
  • Electric vehicle integration: This is achieved through the optimisation of smart charging stations to maximise charging efficiency and grid integration.
  • Optimisation of information and communication technologies (ICT): This occurs through improving data analytics platforms for efficient analysis and optimising cybersecurity to minimise vulnerabilities and risks.
  • Microgrid infrastructure optimisation: This is achieved through the design and operation of microgrids, where the aim is to maximise resilience and minimise costs.
  • Optimisation of regulation and policy: This is achieved through the development of a regulatory framework, and policies are created that encourage the adoption of smart technologies.
  • Optimising consumer engagement: This occurs through the development of interfaces and systems for active consumer engagement.
  • Smart technology and renewable energy optimisation: This is achieved through the integration of sensors, IoT and smart meters to maximise efficiency in monitoring and managing energy flow, as well as the integration of renewable energy sources to maximise their use and minimise dependence on fossil fuels.
In this section, we introduce Smart Energy Algorithms as a broad class of computational methods for enhancing the efficiency, sustainability and reliability of energy systems, encompassing smart grid management and optimisation, energy efficiency in buildings, demand-side management, electric vehicle integration and the optimisation of energy production and consumption. Smart Grid Algorithms are a specialised subset of Smart Energy Algorithms, focusing exclusively on the control, monitoring and optimisation of the electricity grid to deliver greater resilience, service quality and real-time adaptability.
Some traditional algorithms that may be used for smart energy problems in Quality of Energy Service improvement are presented: (a) Linear Scheduling can be used to optimise energy distribution and load, seeking the best outcome (maximum or minimum) within a mathematical model that has requirements represented as linear relationships. This is crucial to ensure the availability and operational efficiency of smart energy systems. (b) Dijkstra’s algorithms are commonly used in power networks to find the shortest and most efficient route for power transmission between nodes, which is vital for the reliability and speed of power supply. (c) Convex optimisation is particularly useful when the solution space is convex, ensuring that any local minimum is also a global minimum. This is essential for frequency and voltage stabilisation in power distribution networks. (d) Simplex algorithms are applied to solve linear programming problems that arise in the planning and operation of power systems, ensuring efficient and optimised resource management. (e) The Newton–Raphson method is used to solve systems of non-linear equations, commonly in the state estimation of power systems, a key component in maintaining the quality and reliability of power supply. (f) Greedy algorithms are used to find sub-optimal but efficient solutions to complex problems by selecting the best local option at each step, which is useful in resource allocation and in responding to real-time demand fluctuations. (g) The Tabu Search algorithm is used to perform local searches in the solution space to find optimal or near-optimal solutions, which is important for adaptation and continuous improvement in energy grid management. (h) Monte Carlo methods are used to approximate solutions to complex problems by simulating random variables, which can be applied in the prediction and analysis of system failures, as well as in the evaluation of risk-mitigation strategies. (i) The finite element method is used in engineering to solve problems with partial differential equations, including those related to power transmission and distribution, essential for the design and maintenance of smart energy infrastructures.
Algorithms inspired by nature [6], especially when applied to smart energy systems, can be instrumental in improving the efficiency and effectiveness of grid management and resource optimisation. Below, we outline how each type of these algorithms can be used in the context of smart energy systems:
  • Swarm algorithms: These algorithms are useful for optimising power transmission routes and load allocation in real time. Key examples include Ant Colony Optimisation (ACO), which is used to find the most efficient routes in the power distribution network, minimising losses and improving demand response (see the Algorithm 1 (pseudocode)), and the Firefly algorithm, which is applied to solve multi-objective optimisation problems in grid management, such as minimising costs and maximising energy efficiency.
Algorithm 1. # Pseudocode of an Ant Colony Optimisation (ACO) method for Smart Grid Dispatch Optimisation
Input:
Number_of_ants, Number_of_iterations
Graph representing decision paths (e.g., energy dispatch options)
Pheromone_initial, Evaporation_rate, α (alpha), β (beta)
Energy demand profile, generation/storage capabilities and constraints
1. Initialise pheromone trails τ[i][j] on all graph edges with Pheromone initial
2. For iteration = 1 to Number_of_iterations do:
3. For each ant k = 1 to Number_of_ants do:
(a) Initialise empty path P[k]
(b) For each decision step t in the energy dispatch sequence:
i. For each possible move (i → j), calculate transition probability:
p r o b i j = τ i j α · η i j β u τ i u α · η i u β
where η[i][j] = 1/cost[i][j] (heuristic: inverse of local cost)

ii. Select next decision j using probabilistic rule
Append j to path P[k]
(c) Evaluate the fitness (objective function) of the complete path P[k]:
- Cost of energy dispatch;
- Renewable energy usage;
- Storage efficiency;
- Penalties for constraint violations.

4. End For (ants)
5. Update pheromone trails for all edges:
(a) Apply evaporation:
τ i j = 1 E v a p o r a t i o n _ r a t e · τ i i
(b) For each ant k that found a good solution:
For each edge (i → j) in path P[k]:
τ i j = τ i j + τ k i j
where
τ k i j = Q f i t n e s s P k
and Q is a constant (e.g., proportional to energy balance)
6. End For (iterations)
7. Output the best solution path (lowest cost, constraint-compliant dispatch)

x[i][j]: energy dispatched from each source/storage at time j for particle i;
v[i][j]: velocity or adjustment direction of the dispatch decision;
rand1(), rand2(): random values ∈ [0, 1];
c1, c2: learning coefficients (usually 1.5 to 2.0);
Fitness Function: a combination of cost, constraint penalties and renewable maximisation.
2.
School algorithms: These are ideal for modelling and optimising the dynamics of demand and distribution of energy resources. Key examples include Particle Swarm Optimisation (PSO), which is used for parameter tuning in power control systems, improving grid stability and efficiency (see the Algorithm 2 (pseudocode)).
Algorithm 2. ### Pseudocode: Particle Swarm Optimisation (PSO) for Smart Grid Energy Dispatch
Input:
Number_of_particles, Number_of_generations
Demand_profile(t), Generation_capacity (solar, wind, thermal)
Storage_capacity, Initial_storage_state
System_constraints (generation_limits, ramp_limits, storage_limits)

1. Initialise a population of particles (x[i][j]) with random dispatch schedules:
Each particle represents energy dispatch decisions for time periods t.
Initialise particle velocities v[i][j] randomly.
2. For generation = 1 to Number_of_generations do:
3. For each particle i do:
(a) Evaluate the fitness (cost function) of the current schedule x[i]:
Includes operational cost, renewable usage, storage usage
and penalties for unmet demand or constraint violations.
(b) If current fitness is better than personal best (pbest[i]):
Update pbest[i] = x[i]
(c) Identify the best solution among neighbours (lbest):
If pbest[g] is better than current best, set g = index of best neighbour
(d) Update particle velocity and position:
For each dimension j (dispatch decision for time t):
v i j = v i j + c 1 · r a n d 1 ( ) · p b e s t i j x i j + c 2 · r a n d 2 ( ) · l b e s t j x [ i ] [ j ]
x i j = x i j + v i j

(e) Apply constraint-handling mechanisms:
Enforce generation and storage limits
Ensure demand is met for each time period
4. End For (particles)
5. End For (generations)
6. Output the best solution found:
Optimal dispatch schedule;
Total operational cost;
Renewable penetration and storage utilisation.

τ[i][j]: Pheromone level on edge i → j (encouraging ants to follow this decision path);
η[i][j]: Heuristic desirability (e.g., cost efficiency of dispatching energy this way);
α, β: Importance factors for pheromone and heuristic;
Evaporation_rate: Controls forgetting of old paths;
fitness(P[k]): Cost + penalties of the solution found by ant k.
3.
Flock algorithms: These algorithms can be used for the automated coordination and management of multiple sources of power generation. Key examples include Clustering Algorithms, useful for synchronising operations between different distributed generation units, favouring the efficient integration of renewable energies (see the Algorithm 3 (pseudocode)).
Algorithm 3. ##Pseudocode: Clustering Algorithm for Coordinated Distributed Generation in Smart Grids
Input:
Set of Distributed Generation Units (DGUs) with attributes:
- Location;
- Type of energy source (solar, wind, thermal, etc.);
- Generation capacity;
- Forecasted generation profile.
Number_of_clusters (K)
1. Initialise K cluster centroids randomly from the DGUs.
2. Repeat until convergence (or maximum_iterations reached):
3. For each DGU i in the dataset:
(a) Compute the similarity or distance between DGU[i] and each cluster centroid:
Use a suitable distance metric (e.g., Euclidean, cosine, or weighted)
(b) Assign DGU[i] to the cluster with the closest centroid
4. For each cluster k = 1 to K:
(a) Update the centroid of cluster k:
Recalculate centroid as the average of all DGUs assigned to that cluster
(centroid_k = mean(DGU attributes in cluster_k))
5. End Repeat
6. Output:
- Clustered groups of DGUs;
- Updated centroids;
- Cluster profiles (e.g., total capacity per group, renewable mix)
7. Optional:
- Apply control strategies per cluster:
• Synchronise generation timings;
• Dispatch renewables efficiently;
• Balance load across clusters.

## Attributes per DGU:
Latitude, longitude;
Type: solar/wind/hydro/battery;
Capacity: kW or MW;
Forecast_profile: vector of predicted generation over next 24 h.
4.
Herd and Pack Algorithms: These are effective in predicting and adapting to changes in energy consumption and production. Key examples include the Wolf Pack Search Algorithm (WPS), which can be employed to optimise the energy storage and release strategy in intelligent storage networks, and the Dolphin Herd Algorithm (DHA), which is applied to grid configuration design to ensure both efficient and balanced load distribution across the network (see the Algorithm 4 (pseudocode)).
Algorithm 4. ### Pseudocode: Wolf Pack Search Algorithm (WPS) for Energy Storage Strategy Optimisation
Input:
Number_of_wolves
Number_of_iterations
Storage_constraints (max_capacity, charge/discharge limits)
Demand_profile(t), Renewable_generation(t), Energy_prices(t)
Initial positions x[i]: each wolf’s strategy for charging/discharging per time slot

1. Initialise positions x[i] for all wolves randomly within storage operation limits
2. Evaluate fitness of each wolf:
- Fitness = operational cost + penalty for unmet demand or overcharge;
- Lower fitness is better.
3. Identify the leader wolf (x_best) with the best fitness
4. For iteration = 1 to Number_of_iterations do:
5. For each wolf x[i] (excluding leader) do:
(a) **Scouting** (exploration phase):
Generate a new candidate solution x_new[i] by modifying x[i] slightly
If fitness(x_new[i]) < fitness(x[i]):
x[i] ← x_new[i]
(b) **Besieging** (exploitation phase):
Move towards the leader:
x i x i + α · r a n d ( ) x b e s t x x [ i ]
Ensure x[i] respects storage constraints
(c) Raid (local fine-tuning):
If no improvement in fitness for N steps:
Apply local mutation or greedy local search
6. Evaluate new fitness of all wolves
7. Update leader wolf x_best if a better solution is found
8. End For (iterations)
9. Output:
- Optimal storage schedule: when to charge and discharge;
- Total cost and energy balance.

x[i][t]: represents the action at time t (positive = charge, negative = discharge)
Fitness Function could include:
Cost of energy purchase from the grid;
Rewards for using stored energy during peak demand;
Penalties for violating storage or demand constraints.
Other nature-inspired algorithms that can be used in the field of smart energy are as follows: the swarm algorithms (Marriage in Honey Bees Optimisation Algorithm, Wasp Swarm Algorithm, Termite Algorithm, Mosquito Swarm Algorithm, Zooplankton Swarm Algorithm and Bumblebees Swarm Algorithm) and the Herd and Pack Algorithms (Bat Algorithm, Rat Herd Algorithm and Feral Dog Herd Algorithm).
Machine learning models applied to smart energy problems are essential to optimise and automate the management of energy grids. (a) Linear and Logistic Regression: Linear Regression is used to predict numerical values such as future energy demand based on historical variables, and Logistic Regression is applied during classification to predict binary events, such as the probability of failure of network components. (b) Support Vector Machines (SVMs) are used to classify and predict critical network states, such as identifying abnormal conditions that could lead to failures or outages. (c) Artificial Neural Networks, which model complex systems and make predictions about energy production and demand, continuously adapt to new data patterns. (d) Random Forests are very useful for classifying and predicting several outcomes simultaneously, such as anomaly detection and grid performance prediction. (e) Decision Trees are applied to make quick operational decisions based on current grid conditions, although they are less complex than other models. (f) K-Nearest Neighbours (K-NN) is used to predict variables such as energy demand based on similarity of historical characteristics. (g) Clustering Algorithms such as K-Means segment energy use into different clusters to more efficiently analyse and manage consumption patterns. (h) Naive Bayes is used in the classification of events in the network, especially in contexts of high data dimensionality. (i) The Gradient Boosting and AdaBoost assemblies combine multiple weak models to form a strong one, optimising prediction and classification in network management. (j) Convolutional Neural Networks (CNNs), although more common in image processing, are applied to predict problems in the energy domain, such as load pattern analysis. (k) Recurrent Neural Networks (RNNs) and LSTM are ideal for predicting temporal sequences, such as energy demand over time, facilitating real-time planning and response. (l) Poisson Regression Models are used to count events, which helps in forecasting and managing equipment failures or outages. (m) Generative Adversarial Models (GANs) generate new data that mimic training data, which is useful for simulations and testing in various energy scenarios.
These algorithms, when integrated into smart energy systems, play a key role in improving the Quality of Energy Service by increasing the efficiency, reliability and availability of energy supply in an environment increasingly dependent on renewable sources and technologically advanced solutions.
Table 1 presents a concise comparison of each traditional algorithm and machine learning model reviewed.
The Performance, Scalability and Real-World Applicability columns employ qualitative categories (High—H, Medium—M and Low—L) as follows: Performance: High: These include algorithms exhibiting rapid convergence and low computational overhead, yielding short runtimes on prototypical smart-energy problems. Medium: These are algorithms with moderate computational demands, suitable for medium-scale instances but with noticeable increases in the runtime as the problem size grows. Low: These are algorithms that require substantial processing resources and long execution times, being generally impractical for all but the smallest test cases.
Scalability: High: These are capable of handling very large problem instances (thousands to tens of thousands of decision variables) with only gradual performance degradation. Medium: These are effective up to intermediate problem sizes (hundreds to low thousands of variables), although the computational cost rises steeply beyond that. Low: These are restricted to small-scale problems (tens to low hundreds of variables), with complexity becoming prohibitive for larger instances.
Real-World Applicability: High: These are widely deployed in industrial or utility-scale smart grid systems, with numerous documented case studies demonstrating practical success. Medium: These are employed in pilot projects or limited field tests, with some industry adoption but not yet pervasive. Low: These are predominantly confined to academic research and simulations, with few or no real-world deployments.

3. Quality of Energy Service Algorithms for Smart Energy

Similar to telecommunications networks, power grids also face critical challenges associated with the efficient management of their resources to ensure optimal service. Quality of Service (QoS), a concept deeply rooted in the field of data networks, can be reinterpreted in the context of electricity grids as the ability to provide reliable and high-quality services while optimising energy resources and minimising environmental impact [7].
This adaptation involves not only maintaining network stability in the face of fluctuations in demand and supply but also ensuring that transmission and distribution systems can respond dynamically to changes without compromising the integrity and efficiency of the power system. In telecommunications networks, QoS focuses on parameters such as latency, jitter and packet loss. Applied to power networks, this concept could translate into minimising outages (equivalent to packet loss), reducing voltage fluctuations (similar to jitter) and ensuring that power delivery is constant and predictable (analogous to low latency). To achieve this, advanced technologies such as smart grids use sensors and smart meters to monitor and control the grid in real time, enabling proactive load management and rapid response to any incident. This dynamic adjustment capability is fundamental to improving QoS in power grids, thus ensuring more efficient and reliable power distribution.
In this paper, we propose using a new definition of “Quality of Energy Service” that focuses on ensuring optimal power-supply quality, which includes factors such as availability, speed and reliability of power [7]. Algorithms can be employed to improve the Quality of Energy Services, similar to how they are used in telecommunications networks. These algorithms allow various aspects of the power grid to be optimised, making energy delivery more efficient and reliable:
  • Load-balancing algorithms: These algorithms adjust power distribution in real time to prevent overloads and minimise outages. They work in a similar way to algorithms that manage data traffic in networks to avoid packet loss by distributing the power load evenly across different parts of the network. Examples include linear programming (could be used to optimise load balancing by minimising costs or maximising efficiency under linear constraints) and greedy algorithms (useful for finding fast and efficient solutions to complex load allocation problems).
  • Demand response algorithms: Using real-time data from sensors and meters, these algorithms automatically adjust energy production and consumption. For example, they can reduce consumption in low-priority areas during peak demand to ensure that critical areas continue to operate without interruption. Examples include convex optimisation (ideal for optimising demand response where the relationship between load and response is convex) and Monte Carlo methods (to simulate different demand scenarios and obtain an approximation of consumer behaviour).
  • Fault prediction algorithms: Using machine learning and artificial intelligence techniques, these algorithms can predict faults and anomalies in the power grid before they occur. This is similar to how intrusion prevention systems detect potential attacks on data networks. They can be used via Artificial Neural Networks (used to model complex systems and predict failures) and Random Forests (useful for classifying and predicting possible failure points based on a series of characteristics).
  • Power quality control: Specific algorithms can monitor and adjust power quality in terms of voltage and frequency, minimising electrical jitter and ensuring that the power delivered to consumers maintains the standards necessary for proper operation. They include Dijkstra’s algorithm (although commonly used to find the shortest path in networks, it could also be adapted to optimise quality control routes in the power grid) and the Tabu Search algorithm (for searching the solution space to find the optimal configuration of power quality devices).
And there are algorithms that can be used for hybrid purposes: Simplex algorithm (could be used in the optimisation of linear power systems such as load dispatch), Newton–Raphson Method (commonly used to solve systems of non-linear equations in power system state estimation), Particle Swarm Optimisation—PSO (could be used for both load balancing and demand response tuning because of its ability to optimise in complex search spaces), Ant Colony Optimisation—ACO (useful for optimising energy distribution routes and in distributed energy system planning), Support Vector Machines—SVMs (for classification and regression of problems related to power quality and fault prediction), Decision Trees and K-Nearest Neighbours—K-NNN (for classification and regression in demand prediction and fault analysis), Clustering Algorithms (for segmentation of users or energy consumption for better demand management) and Generative Adversarial Models—GANs (for the generation of data to simulate energy scenarios to train other models).

3.1. Load-Balancing Algorithms

Siano [8] provides a comprehensive analysis of how integrated demand response in smart grids can facilitate load balancing and improve the overall efficiency of the electricity system.
Khan and Mohammed [9] describe a real-time power management algorithm designed to mitigate voltage fluctuations in grid-connected microgrids, providing a detailed study on improving reliability and power quality.
Moghaddam, Abdollahi and Rashidinejad [10] mention how demand response, supported by energy storage, can act as a tool for load balancing in power systems, offering practical solutions for modern grids.
Zhang, Wang and Wang [11] examine load-balancing mechanisms in the smart grid, highlighting the algorithms and techniques employed to improve grid efficiency and stability.
Ibrahim et al. [12] propose the development of a dynamic task scheduling algorithm by proposing an Integer Linear Programming (ILP) model that minimises energy consumption in a cloud data centre. In addition, an adaptive Genetic Algorithm (GA) is proposed that reflects the dynamic nature of the cloud environment and provides a near-optimal scheduling solution that minimises energy consumption. The results demonstrate that the proposed solution offers performance gains with respect to response time and in reducing energy consumption.

3.2. Demand Response Algorithms

Fang, Misra, Xue and Yang [13] provide a comprehensive review of smart grid technologies, including algorithms for demand-side management and renewable energy integration.
Lorencin et al. [14] present, in their paper, a Genetic Algorithm (GA) approach for the design of a Multi-Layer Perceptron (MLP) for the estimation of the power output of a combined-cycle power plant. They employed the publicly available machine learning repository consisting of 9568 data points (power plant operating regimes), which are divided into 7500 training data points and 2068 test data points. The objective is to increase the MLP regression performances compared to those available in the literature by using heuristic algorithms. The Root Mean Squared Error (RMSE) value achieved with the MLP is 4.305, being significantly lower than those reported in the available literature but still higher than more sophisticated algorithms.
Dey et al. [15] identify a new hybrid approach that considers the Grey Wolf Optimiser (GWO), the Sine Cosine Algorithm (SCA) and the Crow Search Algorithm (CSA) to minimise the overall generation cost of the microgrid system. A statistical analysis is applied to the hybrid Modified Grey Wolf Optimisation–Sine Cosine Algorithm–Crow Search Algorithm (MGWOSCACSA) to validate it over other algorithms used. The results yield good accuracy, and due to its remarkable features of handling large objective functions, less computational time and high robustness, MGWOSCACSA can be implemented in the solution of many power system optimisation problems.
Abdul Latif, Shi, Salman and Tang [16] propose a binary search algorithm for optimising a home energy management system, significantly reducing energy consumption during peak demand.

3.3. Fault Prediction Algorithms

Sikorska, Hodkiewicz and Ma [17] present a discussion of prognostic modelling options for remaining-useful-life estimation, showing how different algorithms are tailored to specific needs in various industries.
Lei, Li, Guo, Li, Yan, T and Lin [18] provide a systematic review on machine health forecasting, covering data acquisition through to remaining-useful-life (RUL) prediction, highlighting the role of algorithms at each stage.
Sirviö, Valkkila, Laaksonen and Kauhaniemi [19] propose an inverter-based reactive power control scheme for distributed energy resources in the Sundom grid to improve voltage regulation and reduce losses.
Zhao, Yan, Chen, Mao, Wang and Gao [20] explore how deep learning is applied to machine health monitoring, including fault prediction through various algorithms and models.
Xu et al. [21] discuss medium-term electric power consumption forecasting for crude oil pipelines, which is useful for decision making such as energy consumption target setting, unit commitment, batch scheduling and monitoring equipment with degraded performance. As forecasting electric power consumption during operation is complex, they propose a hybrid prediction method combining a Genetic Algorithm (GA) and Support Vector Machine (SVM), which includes four parts: data preprocessing, optimisation, forecasting and evaluation. Comparing the evaluation metrics of the GA-SVM model with those of five state-of-the-art forecasting methods shows that the hybrid GA-SVM model delivers the most significant improvement in predictive accuracy, with forecasting results aligning most closely with observed data.

3.4. Power Quality Control

Tareen et al. [22] explore how APF/STATCOM technologies can be used to mitigate power quality problems caused by the high penetration of renewable energy sources in grid systems.
Reynolds et al. [23] demonstrate the development of a combination of a Genetic Algorithm and a Neural Network (Genetic Algorithm–Artificial Neural Network, GA–ANN) for heating setpoint optimisation at the zone level. The optimisation using GA for each zone was carried out in parallel, creating customised setpoint schedules for each zone and day. The results show that energy consumption is reduced by about 25 percent compared to a baseline heating strategy.
Rakhshani, Rouzbehi, Adolfo and Pouresmaeil [24] address the integration of large-scale PV-based generation in power systems, which is crucial for maintaining power quality in grids with high penetration of renewables.

3.5. Energy Consumption Prediction and Scheduling

Ullah and Hussain [25] propose two bio-inspired heuristic algorithms, Moth-Flame Optimisation (MFO) and Genetic Algorithm (GA), for an energy management system (EMS) in smart homes and buildings. Their performance in terms of energy cost reduction, minimisation of the peak-to-average power ratio (PAR) and minimisation of end-user annoyance is analysed and discussed. The Time-Constrained Genetic Moth and Flame Optimisation (TG-MFO) is designed to be virtually unobtrusive to the end user when programming the devices. MATLAB R2023a simulations show that TG-MFO reduces energy costs by up to 32.25% for a single user and 49.96% for thirty users in a residential sector compared with an unscheduled load.
Bourhnane et al. [26] selected machine learning and Artificial Neural Networks (ANNs) together with Genetic Algorithms for energy consumption prediction and scheduling. The proposed models were trained and validated using real-world data collected from a photovoltaic installation along with household appliances. Although the results showed modest prediction accuracy (due to the small size of the dataset), the authors strongly recommend their model to researchers willing to implement real-world testbeds and investigate machine learning as a promising avenue for energy consumption prediction and scheduling. The proposed models were trained and validated using real-world data collected from a photovoltaic installation along with household appliances. Although the results showed modest predictive accuracy (due to the small size of the dataset), the authors strongly recommend their model to researchers willing to implement real-world testbeds and investigate machine learning as a promising avenue for energy consumption prediction and scheduling.
Nguyen et al. [27] provide a comprehensive review of recent studies on bioinspiration for home energy management systems (HEMSs) and building energy management systems (BEMSs), as well as smart grids. Bio-inspired techniques are suitable for use in minimising energy consumption, stabilising energy loads, improving user comfort and reducing emissions. With the help of the Internet of Energy, bio-inspired approaches provide a more efficient control system for distributed and hybrid renewable energy sources.
The review article by Strielkowski et al. [28] explores the prospects and challenges of using machine learning and data-driven methods applied to power systems, providing an overview of ways in which predictive analytics can be applied to develop these systems to make them more efficient. Finally, the review concludes with a discussion of recommendations for future research on the application of machine learning and data-driven methods for predictive analytics in smart grid-driven energy systems powered by the Internet of Energy (IoE).
The implementation of these algorithms requires a smart grid infrastructure capable of collecting and analysing large volumes of data in real-time. Smart grids, with their ability to connect devices across the grid and communicate bidirectionally, provide the ideal platform to deploy these advanced algorithms and significantly improve the QoES in power distribution. Table 2 summarises some of the algorithms used to improve the QoES.

4. A Case Study

The methodology used to optimise the Quality of Energy Services in smart buildings is based on a holistic approach that includes the description of the dataset, the use of predictive modelling, and the ensemble learning approach.

4.1. Description of the Dataset

To train an algorithm to handle QoES, it is possible to use various sources of energy- consumption data:
  • Open energy information [85], which provides access to open energy data consumption.
  • UCI Machine Learning Repository [86]: The UCI Machine Learning Repository provides an individual household’s electricity consumption dataset over four years.
  • Global Energy Forecasting Competition [87]: The Global Energy Forecasting Competition (GEFCom2012) drew hundreds of participants worldwide, who contributed many novel ideas to the energy forecasting field.
  • Energy consumption and regional statistics team, Department for Business, Energy and Industrial Strategy [88]: Estimates of total final energy consumption from 2005 to 2017 at a regional (NUTS1) and a local (LAU1–formerly NUTS4) level. These statistics were created by adding together the four main datasets: gas, electricity, road transport and other. This dataset was granted National Statistics status in March 2008, and this status applies to all data from 2005 onwards.
  • U.S. government data catalogue [89]: The U.S. government data catalogue provides a wide range of energy consumption datasets. These datasets include detailed information on energy consumption in households, commercial buildings, manufacturing and transport. The data are published monthly or annually and are available in several formats, including CSV, HTML and API.
The dataset “Commercial and Residential Hourly Load Profiles for all TMY3 Locations in the United States”, last updated on 19 June 2024, was used. However, this set, entitled “End-Use Load Profiles for U.S. Building Inventory” (file 4520, linked in the archival resources), provides a complete and validated representation of hourly load profiles for the U.S. commercial and residential building inventory.
The End-Use Load Profiles website includes links to data viewers for this dataset. For the energy consumption prediction simulation, we selected the commercial load profile dataset, comprising the 16 ASHRAE 90.1-2004 DOE commercial prototype models simulated at all TMY3 locations, with building insulation levels varying according to ASHRAE 90.1-2004 requirements for each climate zone. As indicated by the file names, all models represent buildings compliant with the ASHRAE 90.1-2004 building energy code; no buildings outside this standard are included.
Originally, all load values in the CSV file were expressed in kWh; however, they were converted to MWh to prevent the metrics from being misinterpreted as excessively adjusted. This conversion may be regarded as data preprocessing.

4.2. Predictive Models Used

Multiple predictive models are employed to forecast energy consumption. These models include Random Forest, XGBoost and Long Short-Term Memory (LSTM) networks. Each model is trained and validated using the preprocessed dataset, chosen for its effectiveness in handling large volumes of data and its accuracy in time-series predictions.
The Random Forest algorithm [90] is an ensemble learning method that builds multiple Decision Trees during training and produces a class output that is the mode of the output classes of the individual trees (classification) or the mean of the predictions (regression). The pseudocode of the Algorithm 5 is shown below.
Algorithm 5. Random Forest for Energy Consumption Prediction
Input: Training data file (energy_data.csv), number of trees (n_trees)
Output: Trained Random Forest model

1. Load dataset from energy_data.csv
a. Read the CSV file into a dataframe (df);
b. Extract features (X) such as electricity usage, HVAC system performance and target variable (y) representing energy consumption.
2. Initialise an empty list of trees: forest = []
3. For i in range(n_trees):
a. Bootstrap sample (X_sample, y_sample) from (X, y);
b. Train a decision tree (tree) on (X_sample, y_sample);
c. Append tree to forest.
4. Return forest
# To make predictions:
5. For each tree in the forest, obtain the prediction
6. Aggregate the predictions from all trees (e.g., take the majority vote or average)
7. Return the final prediction
In the context of QoES, Random Forests can be used to predict energy consumption in smart buildings. By combining multiple trained Decision Trees with historical consumption data, the algorithm can provide accurate predictions that help to optimise energy distribution and manage loads efficiently, thus improving QoES.
Extreme Gradient Boosting or XGBoost [91] is an optimised implementation of the Gradient Boosting algorithm designed to be highly efficient, flexible and portable. The pseudocode of the Algorithm 6 is shown below.
Algorithm 6. XGBoost for Energy Consumption Prediction
Input: Training data file (energy_data.csv), number of boosting rounds (n_rounds)
Output: Trained XGBoost model

1. Load dataset from energy_data.csv
a. Read the CSV file into a dataframe (df);
b. Extract features (X) such as electricity usage, HVAC system performance and target variable (y) representing energy consumption.
2. Initialise model to zero: model = 0
3. For i in range(n_rounds):
a. Compute the gradient and hessian for the current model;
b. Train a base learner (tree) on the gradient and hessian;
c. Update the model: model + = learning_rate x tree.
4. Return model
# To make predictions:
5. Sum the predictions from all base learners
6. Return the final prediction
XGBoost can be applied to predict energy demand peaks and identify anomalous consumption patterns. Its ability to handle high-dimensional data and improve predictive accuracy makes it a valuable tool for optimising energy management and improving operational efficiency in smart energy systems.
Long Short-Term Memory (LSTM) [92] is a Recurrent Neural Network (RNN) architecture designed to address the vanishing gradient problem. LSTM can learn long-term dependencies in sequential data, which makes it useful for time-series prediction tasks. The pseudocode of the Algorithm 7 is shown below.
Algorithm 7. LSTM for Energy Consumption Prediction
Input: Input sequence file (energy_data.csv), LSTM parameters (weights and biases)
Output: Output sequence (Y)

1. Load dataset from energy_data.csv
a. Read the CSV file into a dataframe (df);
b. Normalise or standardise the data if necessary;
c. Reshape the data to the required format for LSTM input (X), such as sequences of past energy consumption.
2. Initialise cell state and hidden state to zero: cell_state = 0, hidden_state = 0
3. For each time step t:
a. Compute forget gate: forget_gate = sigmoid(W_f * X[t] + U_f * hidden_state + b_f);
b. Compute input gate: input_gate = sigmoid(W_i * X[t] + U_i * hidden_state + b_i);
c. Compute candidate memory: candidate_memory = tanh(W_c * X[t] + U_c * hidden_state + b_c);
d. Update cell state: cell_state = forget_gate * cell_state + input_gate * candidate_memory;
e. Compute output gate: output_gate = sigmoid(W_o * X[t] + U_o * hidden_state + b_o);
f. Update hidden state: hidden_state = output_gate * tanh(cell_state);
g. Store hidden state in output sequence Y[t].
4. Return Y
LSTM can be used to predict short- and long-term energy consumption in smart buildings, considering seasonal and temporal patterns. This helps to optimise energy demand management, ensuring an efficient and stable supply, which is crucial to maintain a high QoES.
In an ensemble, different forecasting methods work together. The predictions of several base estimators, which were built with a given learning algorithm, are combined in order to improve robustness, accuracy and generalisability over a single estimator. To combine the predictions, two approaches are used which are:
  • Majority Class Labels (Majority/Hard Voting): Each single estimator belonging to the ensemble casts a vote for a specific forecast. The forecast that receives the most votes is presented as the final prediction of the ensemble.
  • Weighted Average Probabilities (Soft Voting): In this approach, the probabilities or confidence values produced by each estimator are considered. To reach a final decision, these probabilities are averaged, and the resulting mean is compared against a threshold. Soft Voting is generally used for predicting energy consumption as it offers greater flexibility and adaptability to different consumption patterns and multiple data sources.

4.3. Ensemble Learning Approach

An ensemble approach combines multiple predictive models to improve the accuracy and robustness of predictions. This approach is especially effective in complex problems such as managing and predicting energy consumption in smart buildings. By integrating different models, it is possible to capture diverse data characteristics and mitigate the individual limitations of each model, resulting in a more accurate and reliable system.
There are several methods of ensemble:
  • Bagging (bootstrap aggregating) trains multiple models on bootstrapped subsets of data and averages the predictions.
  • Boosting builds models sequentially, with each model attempting to correct the errors of its predecessor.
  • Stacked generalisation combines multiple base learners by training them together and then uses a meta-learner to improve the final predictions.
  • Voting ensemble combines the predictions of several models by majority or averaged votes to obtain the final prediction.
Ensemble methods—bagging (bootstrap-aggregating), boosting, stacked generalisation and voting—combine multiple base learners (via resampling, sequential error correction or meta-learning) and then aggregate their outputs to produce more accurate and reliable predictions.
This approach combines the predictions from multiple models to generate a final, more accurate prediction. Techniques such as weighted voting are employed, where each model’s prediction is weighted based on its historical performance.
In this section, the details of the experiments carried out and the results obtained will be presented. Both the individual models and the ensemble approach will be evaluated; case studies and simulations will be presented; and technical and implementation aspects will be discussed.
In technical terms, the system is powered by a 13th-generation Intel Core i9-13900HX processor at 2.20 GHz, accompanied by 32.0 GB of RAM, ensuring robust performance for intensive tasks. The installed operating system is Windows 11 (64-bit), providing a modern platform optimised for high-performance applications.
On the implementation side, Python 3.12.1 has been used in its IDLE shell environment together with Tcl/Tk 8.6.13 for the graphical interface. The Python libraries used include Matplotlib version 3.7.1, NumPy, Pandas and various Scikit-learn modules (ensemble, metrics and model_selection), as well as XGBoost and TensorFlow.keras, with scikeras.wrappers for model integration, allowing advanced data analytics, predictive modelling and deep learning to be performed efficiently.
The dataset used represents the energy consumption of a hospital. It complies with the requirements of ASHRAE building energy code 90.1-2004, as mentioned above. The dataset has detailed information on energy consumption in commercial hospital buildings and includes 8760 records and 12 instances, which are listed below:
Date, Time, Electricity_Facility_MW_Hourly, Fans_Electricity_MW_Hourly, Cooling_Electricity_MW_Hourly, Heating_Electricity_MW_Hourly, InteriorLights_Electricity_MW_Hourly, InteriorEquipment_Electricity_MW_Hourly, as_Facility_MW_Hourly, Electricity_Facility_MW_Hourly, InteriorEquipment_Gas_MW_Hourly and WaterHeater_WaterSystems_Gas_MW_Hourly.
Figure 2 shows the energy consumption of the different loads per hour throughout the year 2004 on the MWh scale.
The experimental methodology is represented in Figure 2 (load in memory dataset). Most of the time, preprocessing is applied to the dataset, which can consist of scaling the units, cleaning the data, an adjustment of the time stamp, etc.
In the next stage, the data are divided into training and test sets, using 20% of the data for testing in addition to a random seed for reproducibility.
In the same way, at this stage, we set the parameters for each individual model—Random Forest Regressor, XGBRegressor and Artificial Neural Network—and train them independently on the prepared dataset.
Once the base learners are fully trained, we construct the ensemble VotingRegressor by combining their predictions and then fit this ensemble model to calibrate its aggregated decision rule.
Finally, the trained ensemble is used to generate predictions, and its performance is estimated by computing the appropriate evaluation metrics against the ground-truth values. In the final stage, the metrics are calculated, and the prediction results and the comparison between the base data and the prediction are displayed in graphs (Figure 3).
Energy consumption data were obtained from the U.S. government data catalogue [89]. This dataset includes detailed information on energy consumption in households, commercial buildings, manufacturing and transportation.
The following metrics were used to assess the performance of the models: Mean Squared Error (MSE), Mean Absolute Error (MAE), Root Mean Squared Error (RMSE) and Coefficient of Determination (R2).
Thirty predictions were made in all of them, and the MSE, MAE, RMSE and R2 metrics were obtained. The results of these metrics are concentrated in Table 3. Table 3 shows the metrics applied to the ensemble model, highlighting the key performance indicators used to assess the model’s predictive effectiveness.
To visualise the behaviour of each metric, they are plotted individually. Figure 4 shows the Mean Squared Error. The MSE is a risk metric corresponding to the expected value of the squared (quadratic) error or loss.
Figure 5 shows the Mean Absolute Error. The MAE is a risk metric corresponding to the expected value of the absolute error loss or l1-norm loss.
Figure 6 shows the Root Mean Squared Error. The RMSE is a risk metric corresponding to the expected value of the squared (quadratic) error or loss.
Figure 7 shows the Coefficient of Determination (R2_score, s/f; R2 or also regression score function). The best possible score is 1.0 (perfect predictions), and it can be negative (because the model can be arbitrarily worse). In the general case when the true y (ground truth (correct) target values) is non-constant, a constant model that always predicts the average y disregarding the input features would have a score of 0.0.
Once the results of the metrics of each prediction have been analysed, important findings are identified, as presented in Table 4. The proposed stacking ensemble achieved a forecasting accuracy of 99.06%, as indicated by the Mean Absolute Percentage Error (MAPE) of 0.9364%, and demonstrated a high degree of explanatory power with an R2 value of 0.998345, equivalent to 99.83% of variance explained.
The evaluation was performed separately for each model comprising the ensemble: Random Forest (RF), XGBoost (XGB) and Multi-Layer Neural Network (NN). For the training of the models, the dataset was divided into 70% for training and 30% for validation, performing 30 repetitions per combination.
The evaluation metrics calculated were the Root Mean Squared Error (RMSE), the Coefficient of Determination (R2) and the risk of overfitting. Table 5 summarises the results obtained.
Figure 8 shows the Root Mean Squared Error (RMSE) and overall accuracy. The results indicate that Random Forest and XGBoost exhibit superior accuracy.
Figure 9 shows the Coefficient of Determination (R2) and the overall accuracy of each model. The results indicate that RF and XGB approach unity more closely.
Figure 10 illustrates the risk of overfitting, with the NN exhibiting the highest risk, while the other models display lower values.

5. Conclusions

The main area of proposed research is to conduct a review of intelligent energy systems. The current study considers the main techniques found in the literature and related to the topic being treated. Therefore, the bioinspired and revised algorithms are the Dragonfly Algorithm, Multi-objective Genetic Algorithm, Random search algorithm based on natural selection, Backpropagation ANN, Genetic Algorithm based on chromosomes, Long Short-Term Memory Model, Hybrid Modified Grey Wolf Optimisation–Sine Cosine Algorithm–Crow Search Algorithm (MGWOSCACSA), Non-dominated Sorting Genetic Algorithm (NSGA-II), Hybrid Multi-Objective Genetic Algorithm (HMOGA), Elitist Non-dominated Sorting Genetic Algorithm II, Support Vector Regression Technique, K-Means Clustering Technique, Fuzzy Logic, Neural Network-based Genetic Algorithm (NNGA) and Neural Network-based Particle Swarm Optimisation (NNPSO). Based on the work already cited, the main points that have been found in this review are as follows:
  • The application of different techniques for the efficient use of energy, monitoring and processing of data generated by sensors has been presented in a systematic way to understand the development in the field; in addition to these, other contributions have also been highlighted.
  • The use of sensors and/or connection through wireless networks has raised standards in the processing of data and its inclusion in different control algorithms and decisions in the management of energy.
  • Data processing techniques allow us to visualise and propose techniques that seek to minimise or avoid human errors and improve decision-making capabilities. From a rigorous point, all techniques have a better performance than classical techniques.
  • Optimisation techniques are used in real environments, and due to their operation, they can work in real time given the time for change in the system variables, that is, given the time it takes the system to respond.
  • A single optimisation technique cannot be used. The use of hybrid techniques can improve finding a solution to energy savings.
  • The performance of the optimisation algorithms can be improved by using more sensors and longer monitoring times of the electrical variables involved in the system.
  • There is no use of IoT techniques because there is no mention of any improvement in the performance of algorithms due to their use, although the use of IoT monitoring devices involves the use of cloud computing.
Throughout this work, different techniques and algorithms for intelligent energy management have been presented. Although there is more work and algorithms, they are not significant, but they can find relevance if combined with others. The present work may help researchers find inspiration in the field of intelligent energy management.

6. Discussion and Future Trends

The future of smart energy systems will be characterised by ever more sophisticated machine learning and optimisation techniques working in concert with integrated ensemble frameworks. Predictive analytics will become increasingly accurate as models such as Random Forest, XGBoost and LSTM are trained on richer, more heterogeneous data feeds; ensemble learning will then harness the unique strengths of each model to reduce forecast error and bolster resilience under varied operating conditions. Simultaneously, classical optimisation methods will be woven into real-time management platforms, enabling automatic adjustment of supply and demand, dynamic load distribution and rapid failure mitigation, thereby enhancing grid stability and resistance to disruptions such as blackouts.
At the infrastructural level, scalability will be paramount: algorithms must efficiently process growing data volumes and complex network topologies, while advanced battery storage optimisation will smooth the intermittency of renewables and safeguard continuous supply. Widespread deployment will hinge on supportive regulatory frameworks and cost-effective investment strategies, ensuring sustainable expansion without prohibitive expense. Ultimately, consumers stand to benefit from more reliable service, flexible pricing and greater transparency, provided that policymakers and industry stakeholders collaborate to surmount the challenges of infrastructure modernisation and long-term planning.

Author Contributions

Conceptualisation, J.M.L.-O.-D.-L.-P. and J.A.R.-V.; methodology, J.M.L.-O.-D.-L.-P.; validation, J.M.L.-O.-D.-L.-P., J.A.R.-V. and O.D.-P.; formal analysis, J.M.X.-P. and L.A.O.-S.; investigation, F.R.T.-M. and D.R.-C.; resources, M.A.M.-V.; data curation, A.F.-P.; writing—review and editing, R.A.B.-C.; visualisation, J.A.R.-V.; supervision, J.M.L.-O.-D.-L.-P.; project administration, J.A.R.-V.; funding acquisition, J.A.R.-V. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

No new data were created or analysed in this study. Data sharing is not applicable to this article.

Acknowledgments

The authors are grateful to Laboratorio Nacional en Vehículos Autónomos y Exoesqueletos (LANAVEX).

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Lund, A.H.; Andersen, A.N.; Østergaard, P.A.; Mathiesen, B.V.; Connolly, D. From electricity smart grids to smart energy systems—A market operation based approach and understanding. Energy 2012, 42, 96–102. [Google Scholar] [CrossRef]
  2. Abella, A.; Álvarez, E.; Argüeso, J.; Bozon, A.; Castro, U.; López, D.; Martén, I. Smart Energy: Nuevas Aplicaciones y Modelos de Negocio; The Boston Consulting Group in Collaboration with Cátedra de Energía de Orkestra: Bilbao, Spain, 2015; Available online: https://www.orkestra.deusto.es/images/investigacion/publicaciones/informes/cuadernos-orkestra/smart_energy_es_15072015.pdf (accessed on 30 January 2025).
  3. Sánchez, E. Smart Energy: TIC y Energía: Un Futuro Eficiente; Fundación Telefónica: Madrid, Spain, 2013. [Google Scholar]
  4. Aichele, C. Smart Energy; Vieweg+Teubner Verlag: Wiesbaden, Germany, 2012; pp. 1–20. ISBN 978-3-8348-1570-5/978-3-8348-1981-9. [Google Scholar]
  5. Thellufsen, J.Z.; Lund, H.; Sorknæs, P.; Østergaard, P.A.; Chang, M.; Drysdale, D.; Nielsen, S.; Djørup, S.R.; Sperling, K. Smart energy cities in a 100% renewable energy context. Renew. Sustain. Energy Rev. 2020, 129, 109922. [Google Scholar] [CrossRef]
  6. Ruiz-Vanoye, J.A.; Díaz-Parra, O.; Cocón, F.; Soto, A.; Buenabad Arias, M.D.L.Á.; Verduzco-Reyes, G.; Alberto-Lira, R. Meta-heuristics algorithms based on the grouping of animals by social behavior for the traveling salesman problem. Int. J. Comb. Optim. Probl. Inform. 2012, 3, 104–123. [Google Scholar]
  7. Ruiz-Vanoye, J.A.; Díaz-Parra, O.; Marroquín-Gutiérrez, F.; Salgado-Ramírez, J.C.; Xicoténcatl-Pérez, J.M.; Liceaga-Ortiz-De-La-Peña, J.M.; Ortiz-Suarez, L.A.; Rodríguez-Flores, J.; Martínez-Mireles, J.R. Quality of Service in Sustainable Development: A QoS-based Analysis of the United Nations Sustainable Development Goals. Int. J. Comb. Optim. Probl. Inform. 2024, 15, 39–50. [Google Scholar] [CrossRef]
  8. Siano, P. Demand response and smart grids—A survey. Renew. Sustain. Energy Rev. 2014, 30, 461–478. [Google Scholar] [CrossRef]
  9. Khan, I.A.; Mohammed, O.A. Real-time energy management algorithm for mitigation of voltage fluctuations in grid-connected microgrids. IEEE Trans. Smart Grid 2016, 7, 958–965. [Google Scholar]
  10. Moghaddam, M.P.; Abdollahi, A.; Rashidinejad, M. Demand response as a load balancing tool in power system coupled with energy storages. IEEE Trans. Smart Grid 2017, 8, 83–92. [Google Scholar]
  11. Zhang, Y.; Wang, J.; Wang, X. A review of load balancing mechanisms in smart grid. Renew. Sustain. Energy Rev. 2018, 91, 24–38. [Google Scholar] [CrossRef]
  12. Ibrahim, H.; Aburukba, R.O.; El-Fakih, K. An Integer Linear Programming model and Adaptive Genetic Algorithm approach to minimize energy consumption of Cloud computing data centers. Comput. Electr. Eng. 2018, 67, 551–565. [Google Scholar] [CrossRef]
  13. Fang, X.; Misra, S.; Xue, G.; Yang, D. Smart grid—The new and improved power grid: A survey. IEEE Commun. Surv. Tutor. 2012, 14, 944–980. [Google Scholar] [CrossRef]
  14. Lorencin, I.; Anđelić, N.; Mrzljak, V.; Car, Z. Genetic Algorithm approach to design of multi-layer perceptron for combined cycle power plant electrical power output estimation. Energies 2019, 12, 4352. [Google Scholar] [CrossRef]
  15. Dey, B.; García Márquez, F.P.; Basak, S.K. Smart energy management of residential microgrid system by a novel hybrid MGWOSCACSA algorithm. Energies 2020, 13, 3500. [Google Scholar] [CrossRef]
  16. Abdul Latif, S.N.; Shi, J.; Salman, H.A.; Tang, Y. Optimization of demand-response-based intelligent home energy management system with binary backtracking search algorithm. Information 2020, 11, 395. [Google Scholar] [CrossRef]
  17. Sikorska, J.Z.; Hodkiewicz, M.; Ma, L. Prognostic modelling options for remaining useful life estimation by industry. Mech. Syst. Signal Process. 2011, 25, 1803–1836. [Google Scholar] [CrossRef]
  18. Lei, Y.; Li, N.; Guo, L.; Li, N.; Yan, T.; Lin, J. Machinery health prognostics: A systematic review from data acquisition to RUL prediction. Mech. Syst. Signal Process. 2016, 104, 799–834. [Google Scholar] [CrossRef]
  19. Sirviö, K.; Valkkila, L.; Laaksonen, H.; Kauhaniemi, K. Prospects and costs for reactive power control in Sundom smart grid. In Proceedings of the 2018 IEEE PES Innovative Smart Grid Technologies Europe (ISGT-Europe), Sarajevo, Bosnia and Herzegovina, 14–17 October 2018; pp. 1–6. [Google Scholar] [CrossRef]
  20. Zhao, R.; Yan, R.; Chen, Z.; Mao, K.; Wang, P.; Gao, R.X. Deep learning and its applications to machine health monitoring. Mech. Syst. Signal Process. 2019, 115, 213–237. [Google Scholar] [CrossRef]
  21. Xu, L.; Hou, L.; Zhu, Z.; Li, Y.; Liu, J.; Lei, T.; Wu, X. Mid-term prediction of electrical energy consumption for crude oil pipelines using a hybrid algorithm of support vector machine and genetic algorithm. Energy 2021, 222, 119955. [Google Scholar] [CrossRef]
  22. Tareen, W.U.K.; Aamir, M.; Mekhilef, S.; Nakaoka, M.; Seyedmahmoudian, M.; Horan, B.; Memon, M.A.M.; Baig, N.A. Mitigation of power quality issues due to high penetration of renewable energy sources in electric grid systems using three-phase APF/STATCOM technologies: A review. Energies 2018, 11, 1491. [Google Scholar] [CrossRef]
  23. Reynolds, J.; Rezgui, Y.; Kwan, A.; Piriou, S. A zone-level, building energy optimisation combining an artificial neural network, a genetic algorithm, and model predictive control. Energy 2018, 151, 729–739. [Google Scholar] [CrossRef]
  24. Rakhshani, E.; Rouzbehi, K.; Adolfo, J.; Pouresmaeil, E. Integration of large-scale PV-based generation into power systems. Energies 2019, 12, 1425. [Google Scholar] [CrossRef]
  25. Ullah, I.; Hussain, S. Time-constrained nature-inspired optimization algorithms for an efficient energy management system in smart homes and buildings. Appl. Sci. 2019, 9, 792. [Google Scholar] [CrossRef]
  26. Bourhnane, S.; Abid, M.R.; Lghoul, R.; Zine-Dine, K.; Elkamoun, N.; Benhaddou, D. Machine learning for energy consumption prediction and scheduling in smart buildings. SN Appl. Sci. 2020, 2, 297. [Google Scholar] [CrossRef]
  27. Nguyen, T.-H.; Nguyen, L.V.; Jung, J.J.; Agbehadji, I.E.; Frimpong, S.O.; Millham, R.C. Bio-inspired approaches for smart energy management: State of the art and challenges. Sustainability 2020, 12, 8495. [Google Scholar] [CrossRef]
  28. Strielkowski, W.; Vlasov, A.; Selivanov, K.; Muraviev, K.; Shakhnov, V. Prospects and challenges of the machine learning and data-driven methods for the predictive analysis of power systems: A review. Energies 2023, 16, 4025. [Google Scholar] [CrossRef]
  29. Jiang, X.; Xiao, C. Household energy demand management strategy based on operating power by genetic algorithm. IEEE Access 2019, 7, 96414–96423. [Google Scholar] [CrossRef]
  30. Kampelis, N.; Sifakis, N.; Kolokotsa, D.; Gobakis, K.; Kalaitzakis, K.; Isidori, D.; Cristalli, C. HVAC optimization genetic algorithm for industrial near-zero-energy building demand response. Energies 2019, 12, 2177. [Google Scholar] [CrossRef]
  31. Salata, F.; Ciancio, V.; Dell’Olmo, J.; Golasi, I.; Palusci, O.; Coppi, M. Effects of local conditions on the multi-variable and multi-objective energy optimization of residential buildings using genetic algorithms. Appl. Energy 2020, 260, 114289. [Google Scholar] [CrossRef]
  32. Foltyn, L.; Vysocký, J.; Prettico, G.; Běloch, M.; Praks, P.; Fulli, G. OPF solution for a real Czech urban meshed distribution network using a genetic algorithm. Sustain. Energy Grids Netw. 2021, 26, 100437. [Google Scholar] [CrossRef]
  33. Mellouk, L.; Boulmalf, M.; Aaroud, A.; Zine-Dine, K.; Benhaddou, D. Genetic algorithm to solve demand side management and economic dispatch problem. Procedia Comput. Sci. 2018, 130, 611–618. [Google Scholar] [CrossRef]
  34. Khatri, K.C.; Shah, K.; Logeshwaran, J.; Shrestha, A. Genetic algorithm-based techno-economic optimization of an isolated hybrid energy system. Int. J. Mech. Eng. 2023, 8, 1447–1450. [Google Scholar] [CrossRef]
  35. Yeh, W.-C.; He, M.-F.; Huang, C.-L.; Tan, S.-Y.; Zhang, X.; Huang, Y.; Li, L. New genetic algorithm for economic dispatch of stand-alone three-modular microgrid in DongAo Island. Appl. Energy 2020, 263, 114508. [Google Scholar] [CrossRef]
  36. Ansari, S.; Bansal, R.C.; Elsahar, Y. Optimization of renewable energy-based transmission system: An application of the genetic, ant colony optimization, Q-learning, and Dijkstra’s algorithms. Int. J. Model. Simul. 2024, 44, 386–405. [Google Scholar] [CrossRef]
  37. Sharifi, A.H.; Maghouli, P. Energy management of smart homes equipped with energy storage systems considering the PAR index based on real-time pricing. Sustain. Cities Soc. 2019, 45, 579–587. [Google Scholar] [CrossRef]
  38. Sin, I.H.; Chung, B.D. Bi-objective optimization approach for energy-aware scheduling considering electricity cost and preventive maintenance using genetic algorithm. J. Clean. Prod. 2020, 244, 118869. [Google Scholar] [CrossRef]
  39. Rocha, H.R.O.; Honorato, I.H.; Fiorotti, R.; Celeste, W.C.; Silvestre, L.J.; Silva, J.A.L. An artificial intelligence-based scheduling algorithm for demand-side energy management in smart homes. Appl. Energy. 2021, 282, 116145. [Google Scholar] [CrossRef]
  40. Abbasi, M.; Mohammadi Pasand, E.; Khosravi, M.R. Workload Allocation in IoT-Fog-Cloud Architecture Using a Multi-Objective Genetic Algorithm. J. Grid Comput. 2020, 18, 43–56. [Google Scholar] [CrossRef]
  41. Tehrani, K. A smart cyber physical multi-source energy system for an electric vehicle prototype. J. Syst. Archit. 2020, 111, 101804. [Google Scholar] [CrossRef]
  42. Ilbeigi, M.; Ghomeishi, M.; Dehghanbanadaki, A. Prediction and optimization of energy consumption in an office building using artificial neural network and a genetic algorithm. Sustain. Cities Soc. 2020, 61, 102325. [Google Scholar] [CrossRef]
  43. Garud, K.S.; Jayaraj, S.; Lee, M.-Y. A review on modeling of solar photovoltaic systems using artificial neural networks, fuzzy logic, genetic algorithm and hybrid models. Int. J. Energy Res. 2021, 45, 6–35. [Google Scholar] [CrossRef]
  44. Le, L.T.; Nguyen, H.; Dou, J.; Zhou, J. A Comparative Study of PSO-ANN, GA-ANN, ICA-ANN, and ABC-ANN in Estimating the Heating Load of Buildings’ Energy Efficiency for Smart City Planning. Appl. Sci. 2019, 9, 2630. [Google Scholar] [CrossRef]
  45. Luo, X.J.; Oyedele, L.O. Forecasting building energy consumption: Adaptive long-short term memory neural networks driven by genetic algorithm. Adv. Eng. Inform. 2021, 50, 101357. [Google Scholar] [CrossRef]
  46. Bouktif, S.; Fiaz, A.; Ouni, A.; Serhani, M.A. Optimal deep learning LSTM model for electric load forecasting using feature selection and genetic algorithm: Comparison with machine learning approaches. Energies 2018, 11, 1636. [Google Scholar] [CrossRef]
  47. Chen, X.; Zhang, J.; Lin, B.; Chen, Z.; Wolter, K.; Min, G. Energy-efficient offloading for DNN-based smart IoT systems in cloud-edge environments. IEEE Trans. Parallel Distrib. Syst. 2021, 33, 683–697. [Google Scholar] [CrossRef]
  48. Zhang, Z.; Zhang, D.; Qiu, R.C. Deep reinforcement learning for power system applications: An overview. CSEE J. Power Energy Syst. 2020, 6, 213–225. [Google Scholar] [CrossRef]
  49. Abdelkader, A.; Rabeh, A.; Mohamed Ali, D.; Mohamed, J. Multi-objective genetic algorithm–based sizing optimization of a stand-alone wind/PV power supply system with enhanced battery/supercapacitor hybrid energy storage. Energy 2018, 163, 351–363. [Google Scholar] [CrossRef]
  50. Karakatič, S. Optimizing nonlinear charging times of electric vehicle routing with genetic algorithm. Expert Syst. Appl. 2021, 164, 114039. [Google Scholar] [CrossRef]
  51. Singh, A.; Khamparia, A. A hybrid whale optimization–differential evolution and genetic algorithm based approach to solve unit commitment scheduling problem: WODEGA. Sustain. Comput. Inform. Syst. 2020, 28, 100442. [Google Scholar] [CrossRef]
  52. Nadeem, Z.; Javaid, N.; Malik, A.W.; Iqbal, S. Scheduling appliances with GA, TLBO, FA, OSR and their hybrids using chance constrained optimization for smart homes. Energies 2018, 11, 888. [Google Scholar] [CrossRef]
  53. Khatibi, A.; Razi Astaraei, F.; Jahangir, M.H. Using cluster analysis and genetic algorithm for multi-objective optimisation of hybrid electricity supply systems: The case of a photovoltaic/wind/battery grid-connected system in Yazd, Iran. Int. J. Ambient Energy 2022, 44, 474–482. [Google Scholar] [CrossRef]
  54. Yu, L.; Qin, S.; Zhang, M.; Shen, C.; Jiang, T.; Guan, X. A review of deep reinforcement learning for smart building energy management. IEEE Internet Things J. 2021, 8, 12046–12063. [Google Scholar] [CrossRef]
  55. Malla, D.B.; Tomoyuki, H.; Takahashi, K.; Sogabe, M.; Sakamoto, K.; Yamaguchi, K.; Sogabe, T. Attention-masking extended deep Q network (AME-DQN) reinforcement learning algorithm for combinatory optimization of smart-grid energy. Proc. Annu. Conf. Jpn. Soc. Artif. Intell. 2019, 33, 2A4E202. [Google Scholar]
  56. Shah, A.S.; Nasir, H.; Fayaz, M.; Lajis, A.; Shah, A. A review on energy consumption optimization techniques in IoT based smart building environments. Information 2019, 10, 108. [Google Scholar] [CrossRef]
  57. Cheng, L.; Yu, T. A new generation of AI: A review and perspective on machine learning technologies applied to smart energy and electric power systems. Int. J. Energy Res. 2019, 43, 1928–1973. [Google Scholar] [CrossRef]
  58. Ghazal, T.M.; Noreen, S.; Said, R.A.; Khan, M.A.; Siddiqui, S.Y.; Abbas, S.; Aftab, S.; Ahmad, M. Energy demand forecasting using fused machine learning approaches. Intell. Autom. Soft Comput. 2022, 31, 539–553. [Google Scholar] [CrossRef]
  59. Cao, D.; Hu, W.; Zhao, J.; Zhang, G.; Zhang, B.; Liu, Z.; Chen, Z.; Blaabjerg, F. Reinforcement learning and its applications in modern power and energy systems: A review. J. Mod. Power Syst. Clean Energy 2020, 8, 1029–1042. [Google Scholar] [CrossRef]
  60. Majumdar, A.; Albonesi, D.H.; Bose, P. Energy-aware meeting scheduling algorithms for smart buildings. In Proceedings of the Fourth ACM Workshop on Embedded Sensing Systems for Energy-Efficiency in Buildings, Toronto, ON, USA, 6 November 2012; pp. 161–168. [Google Scholar] [CrossRef]
  61. Agupugo, C.P.; Kehinde, H.M.; Nkula, H.N.M. Optimization of microgrid operations using renewable energy sources. Eng. Sci. Technol. J. 2024, 5, 2379–2401. [Google Scholar] [CrossRef]
  62. Mishra, P.; Singh, G. Energy management systems in sustainable smart cities based on the Internet of Energy: A technical review. Energies 2023, 16, 6903. [Google Scholar] [CrossRef]
  63. Mazhar, T.; Irfan, H.M.; Haq, I.; Ullah, I.; Ashraf, M.; Shloul, T.A.; Elkamchouchi, D.H. Analysis of challenges and solutions of IoT in smart grids using AI and machine learning techniques: A review. Electronics 2023, 12, 242. [Google Scholar] [CrossRef]
  64. Jagadeesan, S.; Ravi, C.N.; Sujatha, M.; Southry, S.S.; Reddy, C.V.K. Machine learning and IoT–based performance improvement of energy efficiency in smart buildings. In Proceedings of the 2nd International Conference on Sustainable Computing and Data Communication Systems (ICSCDS 2023), Erode, Tamil Nadu, India, 23–25 March 2023; 2023; pp. 375–380. [Google Scholar] [CrossRef]
  65. Altaf, M.; Yousif, M.; Ijaz, H.; Rashid, M.; Abbas, N.; Khan, M.A.; Waseem, M.; Saleh, A.M. PSO-based optimal placement of electric vehicle charging stations in a distribution network in a smart grid environment incorporating backward forward sweep method. IET Renew. Power Gener. 2024, 18, 3173–3187. [Google Scholar] [CrossRef]
  66. Panajotovic, B.; Jankovic, M.; Odadzic, B. ICT and smart grid. In Proceedings of the 10th Telecommunication in Modern Satellite Cable and Broadcasting Services (TELSIKS), Nis, Serbia, 5–8 October 2011; Volume 1, pp. 118–121. [Google Scholar] [CrossRef]
  67. Borghei, M.; Ghassemi, M. A multi-objective optimisation scheme for resilient, cost-effective planning of microgrids. IEEE Access 2020, 8, 206325–206341. [Google Scholar] [CrossRef]
  68. Crispim, J.; Braz, J.; Castro, R.; Esteves, J. Smart grids in the EU with smart regulation: Experiences from the UK, Italy and Portugal. Util. Policy 2014, 31, 85–93. [Google Scholar] [CrossRef]
  69. Ng, S.C.; Sweeney, J.C.; Plewa, C. Customer engagement: A systematic review and future research priorities. Australas. Mark. J. 2020, 28, 235–252. [Google Scholar] [CrossRef]
  70. Sarker, E.; Halder, P.; Seyedmahmoudian, M.; Jamei, E.; Horan, B.; Mekhilef, S.; Stojcevski, A. Progress on the demand side management in smart grid and optimisation approaches. Int. J. Energy Res. 2021, 45, 36–64. [Google Scholar] [CrossRef]
  71. Asgher, U.; Rasheed, M.B.; Al-Sumaiti, A.S.; Ur-Rahman, A.; Ali, I.; Alzaidi, A.; Alamri, A. Smart energy optimization using heuristic algorithm in smart grid with integration of solar energy sources. Energies 2018, 11, 3494. [Google Scholar] [CrossRef]
  72. Albogamy, F.R.; Paracha, M.Y.I.; Hafeez, G.; Khan, I.; Murawwat, S.; Rukh, G.; Khan, M.U.A. Real-time scheduling for optimal energy optimization in smart grid integrated with renewable energy sources. IEEE Access 2022, 10, 35498–35520. [Google Scholar] [CrossRef]
  73. Francis, K. Optimisation of Distributed Generation Using Simplex Algorithm. Ph.D. Thesis, Murdoch University, Murdoch, WA, Australia, 2014. [Google Scholar]
  74. Mbasso, W.F.; Molu, R.J.J.; Ambe, H.; Naoussi, S.R.D.; Alruwaili, M.; Mobarak, W.; Aboelmagd, Y. Reliability analysis of a grid-connected hybrid renewable energy system using hybrid Monte-Carlo and Newton–Raphson methods. Front. Energy Res. 2024, 12, 1435221. [Google Scholar] [CrossRef]
  75. Qin, J.; Chow, Y.; Yang, J.; Rajagopal, R. Online modified greedy algorithm for storage control under uncertainty. IEEE Trans. Power Syst. 2015, 31, 1729–1743. [Google Scholar] [CrossRef]
  76. Xu, Y.; Huang, S.; Wang, Z.; Ren, Y.; Xie, Z.; Guo, J.; Zhu, Z. Optimization based on tabu search algorithm for optimal sizing of hybrid PV/energy storage system: Effects of tabu search parameters. Sustain. Energy Technol. Assess. 2022, 53, 102662. [Google Scholar] [CrossRef]
  77. Abud, T.P.; Augusto, A.A.; Fortes, M.Z.; Maciel, R.S.; Borba, B.S. State of the art Monte Carlo method applied to power system analysis with distributed generation. Energies 2022, 16, 394. [Google Scholar] [CrossRef]
  78. Radisavljevic-Gajic, V.; Karagiannis, D.; Gajic, Z. The modeling and control of (renewable) energy systems by partial differential equations—An overview. Energies 2023, 16, 8042. [Google Scholar] [CrossRef]
  79. Sarwar, M.; Siddiqui, A.S.; Ghoneim, S.S.; Mahmoud, K.; Darwish, M.M. Effective transmission congestion management via optimal DG capacity using hybrid swarm optimisation for contemporary power system operations. IEEE Access 2022, 10, 71091–71106. [Google Scholar] [CrossRef]
  80. Sabounchi, M.; Wei, J.; Lee, D.; Kundur, D. Flocking-based adaptive granular control strategy for autonomous microgrids in emergency situations. IET Cyber-Phys. Syst. Theory Appl. 2019, 4, 108–119. [Google Scholar] [CrossRef]
  81. Raza, A.; Li, J.; Adnan, M.; Iqbal, M.S. Transforming smart homes via P2P energy trading using a robust forecasting and scheduling framework. Results Eng. 2024, 23, 102766. [Google Scholar] [CrossRef]
  82. Wang, R.; Lu, S.; Feng, W. A novel improved model for building energy consumption prediction based on model integration. Appl. Energy 2020, 262, 114561. [Google Scholar] [CrossRef]
  83. Sakib, M.; Siddiqui, T.; Mustajab, S.; Alotaibi, R.M.; Alshareef, N.M.; Khan, M.Z. An ensemble deep learning framework for energy demand forecasting using genetic algorithm-based feature selection. PLoS ONE 2025, 20, e0310465. [Google Scholar] [CrossRef]
  84. Liang, Z.; Chung, C.Y.; Zhang, W.; Wang, Q.; Lin, W.; Wang, C. Enabling high-efficiency economic dispatch of hybrid AC/DC networked microgrids: Steady-state convex bi-directional converter models. IEEE Trans. Smart Grid 2024, 16, 45–61. [Google Scholar] [CrossRef]
  85. Index of /datasets/files/961/pub/COMMERCIAL_LOAD_DATA_E_PLUS_OUTPUT/USA_AK_Anchorage.Intl.AP.702730_TMY3. Available online: https://openei.org/datasets/files/961/pub/COMMERCIAL_LOAD_DATA_E_PLUS_OUTPUT/USA_AK_Anchorage.Intl.AP.702730_TMY3/ (accessed on 1 May 2025).
  86. Lichman, M. UCI Machine Learning Repository: Individual Household Electric Power Consumption Dataset; University of California: Irvine, CA, USA, 2013; Available online: https://archive.ics.uci.edu/ml/datasets/Individual+household+electric+power+consumption (accessed on 1 May 2025).
  87. Hong, T.; Pinson, P.; Fan, S. Global Energy Forecasting Competition 2012. Int. J. Forecast. 2014, 30, 357–363. [Google Scholar] [CrossRef]
  88. Total Final Energy Consumption at Regional and Local Authority Level 2005 to 2017. GOV.UK, 26 September 2019. Available online: https://www.gov.uk/government/statistical-data-sets/total-final-energy-consumption-at-regional-and-local-authority-level (accessed on 1 May 2025).
  89. U.S. Department of Energy. U.S. Government Data Catalog. 2024. Available online: https://catalog.data.gov (accessed on 1 May 2025).
  90. Breiman, L. Random forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef]
  91. Chen, T.; Guestrin, C. XGBoost: A scalable tree boosting system. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, San Francisco, CA, USA, 13–17 August 2016; pp. 785–794. [Google Scholar]
  92. Hochreiter, S.; Schmidhuber, J. Long short-term memory. Neural. Comput. 1997, 9, 1735–1780. [Google Scholar] [CrossRef]
Figure 1. Conceptual framework diagram of the review.
Figure 1. Conceptual framework diagram of the review.
Energies 18 03094 g001
Figure 2. Hospital hourly load profile.
Figure 2. Hospital hourly load profile.
Energies 18 03094 g002
Figure 3. Methodology of experimentation.
Figure 3. Methodology of experimentation.
Energies 18 03094 g003
Figure 4. Mean Squared Error.
Figure 4. Mean Squared Error.
Energies 18 03094 g004
Figure 5. Mean Absolute Error.
Figure 5. Mean Absolute Error.
Energies 18 03094 g005
Figure 6. Root Mean Squared Error.
Figure 6. Root Mean Squared Error.
Energies 18 03094 g006
Figure 7. Coefficient of Determination.
Figure 7. Coefficient of Determination.
Energies 18 03094 g007
Figure 8. Box plot of RMSE.
Figure 8. Box plot of RMSE.
Energies 18 03094 g008
Figure 9. Box plot of R2.
Figure 9. Box plot of R2.
Energies 18 03094 g009
Figure 10. Box plot of risk of overfitting.
Figure 10. Box plot of risk of overfitting.
Energies 18 03094 g010
Table 1. Comparative summary of algorithms and models.
Table 1. Comparative summary of algorithms and models.
Algorithm/ModelCategoryAdvantagesDisadvantagesPerformanceScalabilityReal-World Applicability
Genetic Algorithm (GA)MetaheuristicFlexible encoding; handles non-linear, multi-modal problemsHigh computational cost; risk of premature convergenceMLM
NSGA-IIMulti-objective GAGenerates Pareto-optimal front; supports multiple objectivesComputationally intensive; requires careful parameter tuningLLM
Particle Swarm Optimisation (PSO)Swarm OptimisationFast convergence; few control parametersCan get trapped in local optima; sensitive to parameter selectionHLH
Tabu SearchLocal search metaheuristicEscapes local optima via memory structures; simple implementationNeeds tabu list management; parameter settings affect performanceMMM
Convex ProgrammingConvex optimisationGuarantees global optimum; efficient solvers availableApplicable only to convexified models; may require problem reformulationHHH
Random ForestMachine learningHigh accuracy; robust to overfitting; handles mixed data typesLarge model size; limited interpretabilityHHH
Support Vector Machine (SVM)Machine learningEffective in high-dimensional spaces; robust generalisationKernel choice complexity; scales poorly with very large datasetsMLM
XGBoostMachine learningExcellent predictive performance; built-in regularisation; handles missing dataComplex hyperparameter tuning; risk of overfitting if misconfiguredHHH
Long Short-Term Memory (LSTM)Deep learningCaptures long-term temporal dependencies; effective for sequence dataData intensive; long training times; harder to interpretMLM
Stacking ensembleEnsemble learningEnhances accuracy by combining multiple base learners; reduces individual model biasesIncreased complexity; risk of overfitting; challenging to interpretHMH
Table 2. Algorithms for smart energy.
Table 2. Algorithms for smart energy.
Algorithm(s) UsedContribution
Genetic Algorithm (GA)
[29,30,31,32,33,34,35,36]
Optimisation of energy consumption in various contexts (domestic demand, HVAC, urban planning and reduction of operational costs).
Multi-objective GA (NSGA-II, HMOGA, MOGA)
[37,38,39,40,41,42]
Multi-objective optimisation in load allocation and energy management in electric vehicles and microgrids, addressing uncertainties in renewable sources.
GA + Artificial Neural Network (ANN)
[23,26,43,44,45]
Optimisation and prediction of energy consumption, combining GA and ANN in buildings and solar systems (with validation on real data).
GA + Multi-Layer Perceptron (MLP)
[14]
Optimised MLP design for power plant power estimation.
GA + Support Vector Machine (SVM)
[21]
Hybrid method for predicting electricity consumption in industrial pipelines.
GA + Integer Linear Programming (ILP)
[12]
Dynamic scheduling of tasks in data centres to minimise energy consumption.
GA + Long Short-Term Memory (LSTM)
[46,47]
GA-optimised LSTM-based energy consumption prediction models.
GA + other hybrid/metaheuristics
[47,48,49,50,51]
Integration of GA with other algorithms (DE, AGA-Cauchy, SPSO-GA, WDO, BPSO, BFA, ACO, HGPSO, etc.) for hybrid system optimisation, device programming and optimal system configuration.
Deep learning/DRL/Bi-LSTM
[47,48,52,53]
Dynamic and predictive models for energy management in homes and buildings, integrating DL, DRL and Bi-Directional LSTM.
Machine learning and deep learning
[54,55,56,57]
Application of ML techniques (SVM, EDML, J48, OSSB-NN and BFGS-QNB) for demand forecasting and energy management in smart grids and smart homes.
Frameworks and integrated systems [58,59,60,61,62,63]Platforms and frameworks for energy management, HVAC control, co-simulation and optimisation of Energy Hubs.
GA + machine learning techniques [64]Optimisation of energy efficiency in intelligent buildings using machine learning techniques in combination with Genetic Algorithms.
Particle Swarm Optimisation (PSO) [65],Studies applying the Particle Swarm Algorithm to solve optimisation problems in smart energy systems.
Information and communication technology (ICT) optimisation [66]Studies focusing on the optimisation of data platforms, secure communications and network architecture for the bi-directional flow of energy and information in smart grids; includes aspects of cybersecurity, renewables integration, consumer empowerment and reliable and scalable communication requirements.
Mixed-Integer Linear Programming (MILP) Optimisation [67]Studies using Mixed-Integer and Multi-Objective Linear Programming for the planning and optimisation of energy infrastructures, especially microgrids.
Regulatory and policy optimisation [68]Studies focused on the design and optimisation of regulatory frameworks and public policies to foster the adoption of smart technologies in the energy sector.
Consumer engagement optimisation [69]Studies focusing on the design and improvement of interfaces, methodologies and systems to encourage active end-user participation in energy management.
Demand-side management (DSM) algorithms in smart grids [70]Specific algorithms for demand-side management in smart grids.
Multi-objective optimisation approaches [71]Studies formulating and solving optimisation problems with two or more competing objective functions.
Lyapunov-based real-time optimisation [72]Studies applying the Lyapunov optimisation technique for real-time control and planning of smart energy systems under uncertainty.
Linear programming (Simplex) approaches [73]Works using linear programming techniques—mainly the Simplex method—to solve optimisation problems in energy systems.
Newton–Raphson power flow analysis [74]Works applying the iterative Newton–Raphson method to solve systems of non-linear equations for power flow analysis and state estimation in power grids.
Greedy algorithms [75]Studies that implement greedy algorithms to solve optimisation problems quickly and at low computational cost, obtaining sub-optimal solutions with performance guarantees.
Tabu Search algorithm [76]Studies using the Tabu Search algorithm.
Monte Carlo simulation methods [77]Studies using stochastic simulation methods based on the sampling of random variables for the technical and operational analyses of smart energy systems.
Finite element method (FEM) approaches [78]Studies applying the finite element method to model and solve partial differential equations for the design, simulation and control of smart energy infrastructures.
Particle Swarm Optimisation (PSO) and hybrid swarm algorithms [79]Studies using optimisation techniques inspired by the collective behaviour of swarms to solve sizing and routing problems in smart grids.
Flock Algorithms [80]Approaches inspired by flocking behaviour—collective movement rules derived from natural swarms (e.g., birds and fish)—to coordinate multiple agents (e.g., generators and controllers) in a distributed energy system.
Herd and Pack Algorithms [81]Techniques inspired by the collective behaviour of herds/packs, where multiple agents cooperate under simple rules to explore and exploit the search space in optimisation and time-series prediction problems.
Ensemble learning approaches [82]Studies that combine several predictive models using ensemble techniques to improve the accuracy of predictions in energy systems.
GA-driven ensemble learning approaches [83]Studies that employ a Genetic Algorithm to optimise feature selection and then combine multiple deep learning models (e.g., LSTM, BiLSTM and GRU) using stacking techniques to improve the accuracy and robustness of energy predictions.
Convex Programming [84]A convex optimisation to solve the problem of economic dispatch in hybrid AC/DC microgrids.
Table 3. Metrics applied in the ensemble model.
Table 3. Metrics applied in the ensemble model.
Mean Squared Error (MSE)Mean Absolute Error (MAE)Root Mean Squared
Error (RMSE)
Coefficient of Determination (R2)
Round 014.5972 × 10−55.3348 × 10−36.7803 × 10−30.99911346
Round 024.2142 × 10−54.9326 × 10−36.4917 × 10−30.999187324
Round 034.6826 × 10−55.3918 × 10−36.8429 × 10−30.999096995
Round 045.1316 × 10−55.4577 × 10−37.1635 × 10−30.999010402
Round 054.0815 × 10−54.8742 × 10−36.3886 × 10−30.99921291
Round 065.0984 × 10−55.6486 × 10−37.1403 × 10−30.999016811
Round 075.0032 × 10−55.6250 × 10−37.0733 × 10−30.999035159
Round 084.3534 × 10−55.0448 × 10−36.5980 × 10−30.999160476
Round 095.2280 × 10−55.5724 × 10−37.2305 × 10−30.998991816
Round 104.9063 × 10−55.4431 × 10−37.0045 × 10−30.999053853
Round 115.3649 × 10−55.6048 × 10−37.3245 × 10−30.998965417
Round 124.8954 × 10−55.5365 × 10−36.9967 × 10−30.999055949
Round 134.9749 × 10−55.4065 × 10−37.0533 × 10−30.999040632
Round 145.1365 × 10−55.5610 × 10−37.1669 × 10−30.999009457
Round 154.4575 × 10−55.1956 × 10−36.6764 × 10−30.999140406
Round 167.2352 × 10−56.9375 × 10−38.5060 × 10−30.998604743
Round 173.9305 × 10−54.8150 × 10−36.2694 × 10−30.999242029
Round 184.3175 × 10−54.9905 × 10−36.5708 × 10−30.999167392
Round 194.8742 × 10−55.4976 × 10−36.9815 × 10−30.99906005
Round 205.8618 × 10−56.0467 × 10−37.6563 × 10−30.998869584
Round 215.3120 × 10−55.7891 × 10−37.2883 × 10−30.998975616
Round 223.9729 × 10−54.9368 × 10−36.3031 × 10−30.999233858
Round 233.8589 × 10−54.8332 × 10−36.2120 × 10−30.999255838
Round 244.5066 × 10−55.2077 × 10−36.7131 × 10−30.999130923
Round 254.5337 × 10−55.3742 × 10−36.7333 × 10−30.999125699
Round 265.0836 × 10−55.5952 × 10−37.1299 × 10−30.999019657
Round 274.3477 × 10−55.0552 × 10−36.5937 × 10−30.999161566
Round 286.4444 × 10−56.5132 × 10−38.0277 × 10−30.99875725
Round 295.0543 × 10−55.4150 × 10−37.1093 × 10−30.999025321
Round 304.4858 × 10−55.2080 × 10−36.6976 × 10−30.999134939
Table 4. Key findings and implications.
Table 4. Key findings and implications.
MetricsRange of ValuesKey FindingsImplications
Mean Squared Error3.8589 × 10−5
to
7.2352 × 10−5
Most of the values are located between 4.0 × 10−5 and 5.0 × 10−5. There are data that exceed 6.0 × 10−5 and 7.0 × 10−5.Despite the exceptions, most of the values are low, concluding that there are no big errors in the prediction.
Mean Absolute Error4.8150 × 10−3
to
6.9375 × 10−3
Most of the values are located between 4.9 × 10−3 and 5.6 × 10−3. There are data that exceed 6.0 × 10−3.Although there are exceptions, most of the data are low. It can be concluded that the model has a good performance in terms of average absolute errors.
Root Mean Squared Error6.2120 × 10−3
to
8.5060 × 10−3
Most of the values are located between 6.2 × 10−3 and 7.2 × 10−3. There are data that exceed 8.0 × 10−3.Despite the exceptions, most of the values are low, concluding that there are no big errors in the prediction.
Coefficient of Determination0.998604743
to
0.999255838
Most of the values are located between 0.999 and 0.9992. There are data that go down to 0.9986.A value close to 1 is indicative that the model almost entirely predicts variability in the dataset: 1.0 (perfect predictions)
Table 5. Comparison of trained models.
Table 5. Comparison of trained models.
ModelNNRFXGBEnsemble
RMSE by model 95%0.0206410.0001350.0013440.006913
Standard
deviation
(reliability index)
5.00 × 10−5006.00 × 10−6
RMSE distribution
per model
0.0206410.0001350.0013440.006913
Standard
deviation
(distribution)
0.000133001.60 × 10−5
R2 by model 95%0.99176210.9999650.999076
Standard
deviation
(reliability index)
5.00 × 10−5006.00 × 10−6
R2 ristribution
per model
0.99176210.9999650.999076
Standard
deviation
(distribution)
0.000133001.60 × 10−5
Overfitting risk
by model 95%
−0.00022401.10 × 10−5−2.10 × 10−5
Standard
deviation
(reliability index)
5.00 × 10−5006.00 × 10−6
Overfitting risk
distribution
per model
−0.00022401.10 × 10−5−2.10 × 10−5
Standard
deviation
(distribution)
0.000133001.60 × 10−5
Execution
time
17.84674.35390.0407Not applicable
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Liceaga-Ortiz-De-La-Peña, J.M.; Ruiz-Vanoye, J.A.; Xicoténcatl-Pérez, J.M.; Díaz-Parra, O.; Fuentes-Penna, A.; Barrera-Cámara, R.A.; Robles-Camarillo, D.; Márquez-Vera, M.A.; Trejo-Macotela, F.R.; Ortiz-Suárez, L.A. Advancing Smart Energy: A Review for Algorithms Enhancing Power Grid Reliability and Efficiency Through Advanced Quality of Energy Services. Energies 2025, 18, 3094. https://doi.org/10.3390/en18123094

AMA Style

Liceaga-Ortiz-De-La-Peña JM, Ruiz-Vanoye JA, Xicoténcatl-Pérez JM, Díaz-Parra O, Fuentes-Penna A, Barrera-Cámara RA, Robles-Camarillo D, Márquez-Vera MA, Trejo-Macotela FR, Ortiz-Suárez LA. Advancing Smart Energy: A Review for Algorithms Enhancing Power Grid Reliability and Efficiency Through Advanced Quality of Energy Services. Energies. 2025; 18(12):3094. https://doi.org/10.3390/en18123094

Chicago/Turabian Style

Liceaga-Ortiz-De-La-Peña, José M., Jorge A. Ruiz-Vanoye, Juan M. Xicoténcatl-Pérez, Ocotlán Díaz-Parra, Alejandro Fuentes-Penna, Ricardo A. Barrera-Cámara, Daniel Robles-Camarillo, Marco A. Márquez-Vera, Francisco R. Trejo-Macotela, and Luis A. Ortiz-Suárez. 2025. "Advancing Smart Energy: A Review for Algorithms Enhancing Power Grid Reliability and Efficiency Through Advanced Quality of Energy Services" Energies 18, no. 12: 3094. https://doi.org/10.3390/en18123094

APA Style

Liceaga-Ortiz-De-La-Peña, J. M., Ruiz-Vanoye, J. A., Xicoténcatl-Pérez, J. M., Díaz-Parra, O., Fuentes-Penna, A., Barrera-Cámara, R. A., Robles-Camarillo, D., Márquez-Vera, M. A., Trejo-Macotela, F. R., & Ortiz-Suárez, L. A. (2025). Advancing Smart Energy: A Review for Algorithms Enhancing Power Grid Reliability and Efficiency Through Advanced Quality of Energy Services. Energies, 18(12), 3094. https://doi.org/10.3390/en18123094

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop