Next Article in Journal
A Systematic Literature Review: The Influence of Technical, Operational and Structural Factors on the Adoption of Digital Agriculture Among Small-Scale Farmers in Sub-Saharan Africa
Previous Article in Journal
Forecasting U.S. Renewable Energy Consumption Using Advanced Machine Learning, Deep Learning, and Time-Series Foundation Models: A Monthly Multisector Benchmarking and Planning Analysis
Previous Article in Special Issue
Study on Permeability Enhancement and Heat Transfer of Cold-Water Reinjection in Deep Tight Sandstone Thermal Reservoirs
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Toward a Digital Twin Framework for Small-Scale Renewable Energy Microgrids with Integrated Energy Management Control

by
Peter Anuoluwapo Gbadega
* and
Kabulo Loji
Department of Electrical Power Engineering, Durban University of Technology, Durban 4001, South Africa
*
Author to whom correspondence should be addressed.
Sustainability 2026, 18(13), 6732; https://doi.org/10.3390/su18136732
Submission received: 23 May 2026 / Revised: 16 June 2026 / Accepted: 17 June 2026 / Published: 2 July 2026
(This article belongs to the Special Issue Sustainable Energy: Addressing Issues Related to Renewable Energy)

Abstract

The increasing integration of renewable energy resources in microgrids requires effective frameworks for energy management, system monitoring, and operational assessment. This study presents a simulation-based digital twin-oriented framework for a small-scale renewable energy microgrid with integrated energy management control. The framework consists of a solar photovoltaic (PV) system, a lithium-ion battery energy storage system, and a variable load implemented in a MATLAB/Simulink 2024b environment. Mathematical models are developed to represent PV generation, battery state-of-charge (SOC) dynamics, and load variations, while a rule-based energy management strategy is used to regulate power flow between generation, storage, and demand. An interactive dashboard is incorporated to provide dynamic visualization within the simulation environment of the system operation and key performance indicators. Simulation results show that the controller successfully maintains the battery SOC within the safe operating range of 30–90% and eliminates SOC constraint violations. Compared with uncontrolled operation, renewable energy utilization increases from 67.4% to 92.8%, overall system efficiency improves from 79.6% to 91.3%, and system reliability increases from 93.1% to 99.2%. The Loss of Power Supply Probability (LPSP) decreases from 0.069 to 0.008, while RMS power imbalance is reduced by 50.0%. Battery and converter losses decrease by 41.7% and 43%, respectively. These results demonstrate the effectiveness of the proposed framework in improving energy utilization, reliability, and operational stability while providing a foundation for future digital twin-enabled microgrid optimization and decision support applications.

Graphical Abstract

1. Introduction

1.1. Background of Renewable Energy Integration and the Need for Digitalization

The global transition toward sustainable energy systems has accelerated the integration of renewable energy sources, particularly solar photovoltaic (PV) and wind power, into modern electricity networks. While these resources offer significant environmental benefits, their intermittent and variable nature presents challenges in maintaining power balance, voltage stability, and system reliability. To address these challenges, microgrids have emerged as flexible and resilient energy systems that integrate distributed energy resources, energy storage, and controllable loads. However, the effective operation of renewable-based microgrids requires advanced monitoring and control strategies capable of managing dynamic interactions among system components under varying operating conditions [1,2]. Recent advances in digitalization have introduced new opportunities for enhancing microgrid performance through improved system visibility, control, and decision-making. Among these, digital twin (DT) technology has attracted considerable interest as a virtual representation of a physical system that supports real-time monitoring, simulation, and operational analysis. In microgrid applications, DT-based frameworks provide a safe and cost-effective environment for evaluating control strategies and analyzing system behavior. Nevertheless, the development of scalable and computationally efficient DT frameworks for small-scale renewable energy microgrids remains limited, highlighting the need for further research in this area [2,3].

1.2. Concept and Importance of Digital Twins in Modern Power Systems

A digital twin (DT) is a dynamic virtual representation of a physical system that evolves through continuous data exchange, modeling, and analytics. Unlike conventional simulation models used primarily for offline studies, a DT reflects the current state and behavior of its physical counterpart, enabling enhanced monitoring, analysis, and decision-making. In power systems, the growing integration of renewable energy sources, distributed energy resources, and energy storage systems has increased operational complexity, creating a need for advanced tools capable of supporting real-time system management [4,5]. Digital twins address this need by providing a virtual environment for monitoring, simulation, and performance evaluation. Through the integration of sensor data, communication technologies, and intelligent algorithms, DTs improve system visibility, facilitate fault detection, and support predictive analysis. They also enable the testing and validation of control strategies in a risk-free environment before deployment on physical infrastructure [6,7]. In microgrid applications, DTs can support energy management, operational optimization, and system resilience under varying renewable generation and load conditions. Furthermore, interactive visualization tools enhance user understanding and system interpretation. Consequently, digital twin technology is increasingly recognized as a promising approach for improving the reliability, efficiency, and intelligence of future renewable energy microgrids and smart power systems [8,9].

1.3. Motivation for Developing a Digital Twin of a Small-Scale Microgrid

Despite the growing adoption of digital twin (DT) technology in large-scale power systems, its application to small-scale renewable energy microgrids remains limited. Existing DT implementations primarily focus on utility-scale networks with extensive infrastructure and data availability, leaving a gap in scalable and accessible frameworks for smaller systems. Small-scale microgrids comprising solar photovoltaic (PV) generation, battery energy storage, and variable loads present unique operational challenges related to renewable intermittency, energy storage management, and load variability [6,10]. This study is motivated by the need for a simplified and computationally efficient DT framework capable of representing the essential dynamics of renewable energy microgrids while remaining suitable for research, education, and experimental analysis. The proposed framework integrates mathematical models of PV generation, battery state-of-charge (SOC) behavior, and load demand with a rule-based energy management strategy. In addition, an interactive MATLAB-based dashboard provides dynamic visualization within the simulation environment of the system operation, enhancing user understanding and system analysis. The framework offers a practical platform for evaluating energy management strategies and studying microgrid behavior under varying operating conditions, thereby supporting the development of intelligent and resilient renewable energy systems [11].

2. Context and Literature Review

2.1. Overview of Existing Digital Twin Applications in Power Systems

Digital twin (DT) technology has rapidly gained prominence in the power sector due to its ability to enhance system monitoring, predictive maintenance, and operational optimization. As modern power systems become increasingly complex with the integration of renewable energy sources and distributed generation, the need for intelligent and adaptive management tools has intensified [12,13]. Subramanian and Stonier [14] developed digital twins to address this need by providing a real-time, data-driven virtual representation of physical assets and processes, enabling utilities and researchers to better understand system behavior and anticipate potential issues. In large-scale transmission and distribution networks, DTs have been widely adopted for asset management and grid reliability enhancement. Utility operators employ digital twins to model critical infrastructure such as transformers, transmission lines, and substations, allowing continuous assessment of their operational condition. By integrating real-time sensor data with predictive analytics, DTs can detect early signs of equipment degradation and forecast potential failures, thereby supporting condition-based maintenance strategies. This proactive approach reduces unexpected outages, minimizes maintenance costs, and improves overall system reliability [8,15]. Furthermore, digital twin applications have been extensively explored in renewable energy systems, particularly in wind and solar power generation. DT models of wind turbines and photovoltaic (PV) plants enable accurate prediction of energy output under varying environmental conditions, as well as monitoring of component health and performance. These capabilities allow operators to optimize energy production, schedule maintenance activities efficiently, and extend the operational lifespan of assets. Sifat et al. [16] used DT-based frameworks to analyze turbine performance under different wind profiles and detect anomalies in PV systems caused by shading, degradation, or faults. Another important application of digital twins in power systems is real-time grid visualization and fault management. By creating a synchronized digital replica of the electrical network, DTs provide operators with enhanced situational awareness and the ability to visualize system states dynamically. This capability facilitates faster fault detection, localization, and restoration, which is particularly critical in large and complex grid infrastructures. Additionally, DTs support scenario analysis, enabling operators to simulate contingencies and evaluate system responses before implementing corrective actions in the physical network [17]. In the context of microgrids, digital twins have been increasingly utilized to improve energy management and operational efficiency. Microgrid DTs enable the optimization of energy dispatch among distributed energy resources (DERs), energy storage systems, and loads. They also support advanced control functions such as voltage regulation, frequency stability, and demand response simulation. By combining real-time data acquisition with virtual modeling, DTs establish a bidirectional communication link between the physical microgrid and its digital counterpart. This integration enhances system adaptability to renewable variability and provides a safe and flexible environment for testing and validating control strategies prior to real-world deployment [18]. Ultimately, the application of digital twin technology in power systems demonstrates significant potential in improving reliability, efficiency, and decision-making. Its ability to integrate real-time monitoring, predictive analytics, and simulation capabilities makes it a critical tool for addressing the challenges associated with modern energy systems [19].

2.2. Related Works on Microgrid and Simulation

Extensive research has been conducted on the modeling and simulation of microgrids to evaluate the performance of distributed energy resources (DERs), energy storage systems, and load dynamics under varying operating conditions. These studies play a crucial role in understanding the complex interactions within microgrids, particularly in the presence of renewable energy sources characterized by intermittency and uncertainty. Among the various simulation platforms available, MATLAB/Simulink has emerged as one of the most widely used tools due to its flexibility, user-friendly interface, and comprehensive library of electrical and control system components [20]. Its modular structure allows researchers to develop detailed and scalable models of photovoltaic (PV) systems, wind turbines, battery storage units, and power electronic converters. Several studies have focused on modeling solar PV systems and battery storage to analyze their behavior under fluctuating irradiance and load conditions. Sahoo et al. [21] developed a model that typically incorporates the nonlinear characteristics of PV modules and dynamic battery state-of-charge (SOC) behavior to ensure realistic representation of system performance. In addition, wind energy conversion systems have been modeled to evaluate power generation variability and its impact on microgrid stability. Such simulation frameworks enable researchers to assess system performance metrics, including voltage stability, power quality, and energy efficiency under different operational scenarios. To enhance system performance, various energy management strategies have been integrated into microgrid simulation models. Rule-based control approaches are commonly used due to their simplicity and ease of implementation, particularly in small-scale systems. More advanced techniques, such as model predictive control (MPC), have been applied to optimize energy dispatch by considering future system states and constraints. Similarly, artificial intelligence-based methods, including fuzzy logic controllers and neural network-based approaches, have been employed to improve decision-making under uncertainty and achieve optimal power balance while minimizing operational costs. These control strategies have demonstrated effectiveness in coordinating DERs and storage systems, thereby enhancing microgrid reliability and efficiency [22,23].
Despite these advancements, several limitations persist in existing microgrid simulation studies. A significant number of models are designed for offline analysis and remain largely static, lacking the capability for real-time interaction and dynamic visualization. This limitation restricts their applicability in practical scenarios where continuous monitoring and adaptive control are essential. Furthermore, many studies focus primarily on the analytical and optimization aspects of microgrid operation without incorporating the concept of digital twins, which enables continuous synchronization between physical systems and their virtual counterparts. As a result, these models do not fully exploit the potential of real-time data integration, predictive analytics, or feedback-driven control [1,24]. Consequently, there is a growing need for advanced simulation frameworks that integrate digital twin technology with conventional microgrid modeling approaches. Such frameworks would enable real-time monitoring, interactive visualization, and adaptive control, thereby bridging the gap between theoretical analysis and practical implementation. Table 1 presents a review of recent studies on digital twin-based microgrids.

2.3. Current Challenges and Research Gaps in Microgrid Digitalization

The increasing digitalization of renewable energy microgrids has created opportunities for improved monitoring, control, and operational optimization. However, several challenges remain, particularly in small-scale microgrid applications. Most existing digital twin implementations focus on large-scale power systems and rely on extensive sensing infrastructure, real-time data acquisition, and high computational resources. Such requirements can limit their applicability to small-scale renewable energy microgrids, where cost-effectiveness, simplicity, and scalability are important considerations. In addition, many studies emphasize advanced digital twin functionalities, such as real-time synchronization, predictive analytics, and autonomous control, while relatively few investigations address practical frameworks that can be readily implemented for research, education, and preliminary system evaluation [27,32]. Another challenge is the development of effective energy management strategies capable of coordinating renewable generation, battery storage, and load demand under dynamic operating conditions. Renewable energy variability and fluctuating load profiles require continuous assessment of system behavior to ensure reliable and efficient operation. Therefore, there is a need for flexible simulation frameworks that enable the evaluation of energy management approaches and provide clear visualization of system performance [33]. While existing studies have extensively investigated digital twins, renewable energy microgrids, and advanced energy management systems, most reported digital twin implementations focus on large-scale power systems or rely on complex architectures involving extensive sensing, communication, and computational infrastructure. Furthermore, relatively few studies provide a simplified, accessible, and educationally oriented framework that integrates renewable energy modeling, battery management, control, visualization, and performance assessment within a unified environment suitable for small-scale microgrid applications. The research gap lies in the lack of lightweight digital twin-oriented frameworks that can be used to evaluate microgrid energy management strategies while remaining computationally efficient and easy to implement. The contribution of the present work is therefore clarified as the development and evaluation of an integrated microgrid simulation framework that combines renewable generation, battery storage, energy management control, interactive monitoring, and quantitative performance analysis, thereby providing a foundation for future progression to fully synchronized digital twin systems.
To address these gaps, this study proposes a digital twin-oriented framework developed in MATLAB/Simulink that integrates photovoltaic generation, battery energy storage, load modeling, and rule-based energy management control within a unified simulation environment. The framework incorporates interactive visualization tools and performance evaluation capabilities, providing a practical platform for analyzing microgrid behavior and supporting future developments toward fully integrated digital twin implementations.

2.4. Aim and Objective of the Study

The primary objective of this study is to develop and evaluate a digital twin-oriented framework for a small-scale renewable energy microgrid with integrated energy management control. The framework combines a solar photovoltaic (PV) system, battery energy storage system, and variable load within a MATLAB/Simulink environment to provide a dynamic representation of microgrid operation under varying generation and demand conditions. Specifically, this study aims to investigate the effectiveness of a rule-based energy management strategy in regulating power flow, maintaining battery state-of-charge (SOC) within safe operating limits, improving renewable energy utilization, and ensuring reliable load supply. In addition, the framework incorporates dynamic visualization within the simulation environment and performance monitoring capabilities to enhance system analysis and operational understanding. By integrating modeling, control, and visualization within a unified environment, this study seeks to provide a practical platform for evaluating microgrid behavior and energy management strategies while establishing a foundation for future development toward fully integrated digital twin implementations for intelligent and sustainable energy systems. This research makes several important contributions:
  • This study presents a unified framework that integrates a solar photovoltaic (PV) system, battery energy storage system, and variable load within a MATLAB/Simulink environment to represent the operational behavior of a small-scale renewable energy microgrid.
  • A rule-based energy management strategy is incorporated to coordinate power flow among generation, storage, and demand; maintain battery state-of-charge (SOC) within predefined limits; and enhance the reliability of microgrid operation.
  • The framework is used to assess microgrid performance under varying renewable generation and load demand scenarios, demonstrating improvements in renewable energy utilization, energy efficiency, battery management, and system reliability.
  • An interactive dashboard is developed to provide dynamic visualization within the simulation environment of key system variables, including battery SOC, current profiles, and power flow, thereby improving system observability and operational understanding.
  • This study establishes a scalable and accessible platform for microgrid analysis and control, providing a foundation for future enhancements such as real-time data synchronization, IoT integration, predictive analytics, machine learning, and advanced optimization-based energy management strategies.

3. System Architecture and Design

The proposed framework, illustrated in Figure 1, presents a digital twin-oriented architecture for a small-scale renewable energy microgrid with integrated energy management control. The microgrid consists of three main subsystems: a solar photovoltaic (PV) generator, a lithium-ion battery energy storage system, and a variable electrical load. These components are modeled and simulated within the MATLAB/Simulink environment to provide a dynamic representation of microgrid operation under varying generation and demand conditions. The framework integrates mathematical models of the PV system, battery state-of-charge (SOC) dynamics, and load demand with a rule-based energy management controller that regulates power flow between generation, storage, and consumption. System variables, including PV output, battery SOC, and load demand, are continuously updated within the simulation environment, enabling the evaluation of microgrid behavior under different operating scenarios. In addition, an interactive visualization dashboard provides real-time monitoring of key performance indicators, including power flow, current profiles, and battery SOC [29,34].
The architecture is organized into three functional layers: the physical system layer, representing the microgrid components; the digital modeling layer, comprising the mathematical models and simulation environment; and the control and visualization layer, which incorporates the energy management strategy and user interface. This integrated framework provides a practical platform for analyzing microgrid performance, evaluating control strategies, and supporting future development toward fully integrated digital twin implementations [35].

4. System Mathematical Modeling Approach

The digital twin of the microgrid is developed to accurately replicate the real-time operational dynamics of its physical counterpart through detailed mathematical modeling of its core components: the solar photovoltaic (PV) array, lithium-ion battery energy storage system, and variable load. Each subsystem is described using governing equations that capture its intrinsic physical characteristics and dynamic behavior. For instance, the PV model reflects nonlinear current–voltage relationships under varying irradiance and temperature conditions, while the battery model incorporates state-of-charge (SOC) evolution, efficiency losses, and operational constraints. The load is represented as a time-dependent function to simulate realistic consumption patterns. Collectively, these models enable precise analysis of energy generation, storage, and consumption within the microgrid under diverse operating scenarios. All subsystem models are integrated within the MATLAB/Simulink environment, which serves as a comprehensive platform for dynamic simulation, control implementation, and visualization. This integration allows the digital twin to respond continuously to changes in system inputs, providing real-time insights into power flow, SOC variations, and system performance. The modeling framework is designed with a strong emphasis on modularity and scalability, ensuring that each component can be independently modified, upgraded, or replaced without disrupting the overall system structure. This modular approach enhances flexibility and facilitates the extension of the model to include additional components or advanced control strategies. Consequently, the digital twin serves as an effective and adaptable platform for evaluating energy management techniques, testing control algorithms, and analyzing system behavior under varying environmental and load conditions [10,30].

4.1. Modeling Assumptions and Limitations

The proposed digital twin-oriented framework was developed using a simplified modeling approach to demonstrate the integration of renewable generation, battery storage, and energy management control within a small-scale microgrid environment. The photovoltaic (PV) system was represented using a simplified current–voltage relationship based on the open-circuit voltage and short-circuit current characteristics of the module. Similarly, battery behavior was modeled using a state-of-charge (SOC)-based approach, where charging and discharging processes were governed by current balance and predefined SOC limits. The load was represented as a time-varying demand profile to emulate variations in energy consumption. These assumptions were adopted to reduce computational complexity and facilitate the analysis of system-level interactions and control performance. Several limitations arise from these modeling assumptions. The PV model does not capture detailed nonlinear effects such as temperature dependence, partial shading, maximum power point tracking (MPPT) dynamics, or degradation mechanisms. Likewise, the battery model does not include electrochemical processes, aging effects, efficiency losses, self-discharge characteristics, or temperature influences that occur in real battery systems. The load profile is also simplified and does not fully represent the stochastic and unpredictable nature of actual residential or commercial demand patterns. Furthermore, the framework operates within a simulation environment and does not include real-time synchronization with physical assets, Internet of Things (IoT) sensors, communication networks, or hardware-in-the-loop (HIL) validation. Consequently, the study should be viewed as presenting a digital twin-oriented proof-of-concept framework rather than a fully implemented digital twin. Despite these limitations, the adopted modeling approach is sufficient for evaluating the effectiveness of the integrated energy management strategy and establishing a foundation for future development of higher-fidelity and real-time digital twin systems.

4.2. Solar Photovoltaic Model

The photovoltaic (PV) module can be modeled using the single-diode equivalent circuit, which is widely recognized for its ability to accurately represent the nonlinear current–voltage (I–V) characteristics of solar cells. This model captures the essential physical processes within the PV device, including the generation of photocurrent due to incident solar irradiance, the diode’s recombination effects, and internal losses caused by series and shunt resistances. By incorporating these parameters, the model provides a realistic description of PV behavior under varying environmental conditions such as changes in irradiance and temperature. This mathematical representation enables the digital twin to simulate the dynamic response of the PV system, including variations in output current, voltage, and power. As a result, it becomes possible to analyze system performance, evaluate efficiency, and study the interaction between the PV generator and other microgrid components under different operating scenarios. Note that the photovoltaic (PV) system used in this study was represented using a simplified current–voltage relationship based on the open-circuit voltage and short-circuit current characteristics of the module. The simplified PV current model used in this study is given by
I = I s c ( 1 V / V o c )
The PV current model with respect to time is given by the following expression:
I = I s c ( 1 t / 3600 )
where I s c is the short-circuit current, V is the nominal voltage, and V o c is the PV open-circuit voltage.
It is worth noting that the theoretical relationship between the current and voltage is expressed as [36]
I = I p h I 0 e q V + I R s n k T 1 V + I R s R s h
where I p h is the photocurrent; I 0 is the diode saturation current; R s and R s h represent the series and shunt resistances, respectively; q is the electron charge; k is Boltzmann’s constant; and T is the cell temperature. The photocurrent I p h is directly proportional to solar irradiance and can be modeled as
I p h = I s c , r e f + α T T r e f G G r e f
where I s c , r e f is the short-circuit current under reference conditions, α is the temperature coefficient, and G and G r e f represent the actual and reference irradiance levels, respectively. This model allows the digital twin to simulate PV output variations in response to changes in sunlight intensity and ambient temperature, thereby mirroring real-world renewable generation patterns.

4.3. Battery Energy Storage Model

The lithium-ion battery is modeled to accurately capture its charging and discharging dynamics, efficiency losses, and operational constraints within the microgrid. The subsystem represents a 12 V, 5 Ah battery, incorporating realistic characteristics such as limited capacity, internal losses, and bidirectional energy flow. Charging and discharging efficiencies are both assumed to be 90%, reflecting practical performance conditions. This modeling approach enables the battery to function effectively as an energy buffer, storing excess photovoltaic (PV) energy and supplying power during periods of generation deficit. A key parameter in the battery model is the state-of-charge (SOC), which indicates the ratio of the available charge to the nominal battery capacity. The SOC is continuously monitored and regulated within predefined limits of 30% to 90% to ensure safe operation, prevent overcharging or deep discharging, and extend battery lifespan. The SOC is updated iteratively based on the charging and discharging currents, time step, and efficiency factors, allowing the digital twin to dynamically track energy storage behavior and support effective energy management decisions. The SOC is updated iteratively as [37]
S O C t = S O C t 1 + 1 C n o m η c I c h Δ t I d i s Δ t η d
where η c and η d are the charging and discharging efficiencies, I c h and I d i s represent the charge and discharge currents, Δ t is the time step, and C n o m is the nominal capacity. This subsystem not only stores excess PV energy but also supplies the load when solar generation is insufficient, ensuring a continuous power supply. The battery terminal voltage V b a t is expressed as
V b a t = E 0 K Q Q I t I d i s R I d i s
where E 0 is the open-circuit voltage, K is the polarization constant, Q is the maximum capacity, R is the internal resistance, and I t is the charge removed from the battery. To preserve battery health and prolong lifespan, operational constraints are imposed to maintain the SOC between 30% and 90%. When the SOC exceeds or falls below these thresholds, charging or discharging is automatically halted by the control logic.

4.4. Variable Load Model

The load subsystem represents the dynamic and time-varying electricity demand within the microgrid, playing a crucial role in evaluating system performance and control effectiveness. In practical microgrid environments, load demand is inherently variable due to changes in user behavior, appliance usage, and operational conditions. To capture this variability, the load can be modeled either as a combination of resistive and inductive components or as a time-dependent power profile derived from real measurements or synthetically generated datasets. This flexible modeling approach allows the digital twin to emulate realistic consumption patterns, including peak demand periods, intermittent usage, and gradual load fluctuations. In this study, the load is represented as a variable resistive element whose power consumption changes over time according to predefined or user-defined profiles. This representation simplifies implementation while still preserving the essential characteristics of demand variability. The time-varying nature of the load introduces dynamic conditions that require continuous balancing between energy generation, storage, and consumption. As a result, the load subsystem serves as a critical test case for the energy management control algorithm, challenging it to maintain system stability, ensure power balance, and optimize resource utilization under different operating scenarios. By incorporating realistic load variations, the digital twin enables detailed analysis of how the microgrid responds to demand changes, including the interaction between the photovoltaic system, battery storage, and load. This facilitates the evaluation of control strategies and supports the design of more efficient and resilient energy management systems. The load power consumption is mathematically expressed as [38]
P l o a d t = V l o a d t × I l o a d t
I l o a d t = 2 + sin 2 π t / 3600
The load profile can be set to vary according to predefined functions (e.g., sinusoidal or step changes) or based on real or synthetic demand data. This dynamic representation ensures that the digital twin can simulate realistic energy balance conditions between generation, storage, and consumption.

4.5. Energy Flow and Control Equations

The energy management control algorithm constitutes the core intelligence of the digital twin, coordinating the interaction between the photovoltaic (PV) system, battery energy storage, and load to ensure efficient and reliable operation. Its primary function is to achieve optimal utilization of available solar energy while maintaining battery health and guaranteeing continuous power supply to the load. In renewable-based microgrids, where generation is inherently variable, an effective control strategy is essential to balance supply and demand in real time. The algorithm continuously monitors key system parameters such as PV output power, battery state-of-charge (SOC), and load demand, and it makes decisions regarding charging, discharging, or idle states of the battery [39]. At any given instant, the operation of the microgrid must satisfy the fundamental principle of energy conservation, where the total generated and stored energy equals the total consumed energy and system losses. The control algorithm enforces this balance by dynamically adjusting power flow among system components. When PV generation exceeds load demand, surplus energy is directed to charge the battery, thereby preventing energy wastage and improving overall system efficiency. Conversely, when PV output is insufficient, the battery discharges to support the load, ensuring continuity of supply. In addition to balancing power flow, the control strategy incorporates operational constraints to preserve battery lifespan by maintaining the SOC within predefined limits. It also enables the system to respond effectively to changing environmental and load conditions. By embedding this intelligence within the digital twin, the model not only replicates real-world behavior but also provides a platform for testing and optimizing advanced energy management strategies under diverse scenarios. At any given instant, the system must satisfy the fundamental energy conservation relationship [40]:
P P V t + P b a t t = P l o a d t + P l o s s ( t )
where P l o s s ( t ) accounts for the conversion losses and inefficiencies in the system. The control logic operates based on the following conditions:
  • When solar generation exceeds the load demand, the excess energy charges the battery until the SOC reaches 90%. If P P V > P l o a d , the surplus power charges the battery.
  • When solar generation is insufficient, the battery discharges to support the load until the SOC drops to 30%. If P P V < P l o a d and S O C > S O C m i n , the battery discharges to meet demand.
  • When both PV output and battery charge are insufficient, the system simulates a deficit condition, prompting a load-shedding response or external grid dependency. If P P V < P l o a d and S O C S O C m i n , the system enters a power deficit state, prompting load shedding or external support, if available.

5. Control Strategy for Energy Management

Efficient energy management is a fundamental requirement in microgrid operation, particularly in systems with high penetration of renewable energy sources. Due to the intermittent and unpredictable nature of solar generation, maintaining a stable and reliable power supply requires intelligent coordination between generation, storage, and demand. In this study, a rule-based energy management control algorithm is implemented within the digital twin framework to regulate the flow of power among the solar photovoltaic (PV) system, lithium-ion battery, and variable load. This approach is selected for its simplicity, transparency, and ease of implementation, making it suitable for both practical applications and educational purposes. The primary objective of the control strategy is to maximize the utilization of renewable energy by prioritizing the direct use of PV-generated power to meet load demand. When excess energy is available, it is stored in the battery, thereby reducing energy wastage and improving system efficiency. At the same time, the control algorithm ensures that the battery operates within safe state-of-charge (SOC) limits, typically between 30% and 90%, to prevent overcharging and deep discharging, both of which can degrade battery performance and lifespan. Another critical objective is to ensure continuous load supply under varying operating conditions. During periods of low solar generation, the battery is used to compensate for the energy deficit, maintaining system stability and reliability. In cases where both PV generation and battery capacity are insufficient, the system can simulate deficit conditions, highlighting the need for load shedding or external grid support. Additionally, the control strategy is integrated with dynamic visualization in the simulation environment tools within the digital twin-oriented framework, allowing users to monitor system performance, observe energy flow dynamics, and interact with system parameters. This feature enhances the model’s value as both a research tool and an educational platform, enabling deeper understanding of microgrid energy management principles [31,41].

5.1. Control Algorithm Design

The energy management control algorithm is designed to operate based on real-time or instantaneous measurements of key system variables, including photovoltaic (PV) power generation, battery state-of-charge (SOC), and load demand. By continuously monitoring these parameters, the algorithm determines the appropriate operating mode of the battery, namely, charging, discharging, or idle, ensuring effective coordination among all microgrid components. This rule-based approach provides a structured and transparent decision-making process that enables stable and efficient system operation under varying conditions. In scenarios where PV generation exceeds the load demand, the system enters an excess generation mode. The surplus energy is directed toward charging the battery, thereby maximizing the utilization of renewable energy and reducing wastage. Charging continues until the SOC reaches its upper operational limit of 90%, ensuring safe battery operation. If additional surplus energy remains after the battery is fully charged, it can be recorded or hypothetically exported to an external grid, depending on the system configuration [31]. Conversely, when PV generation is insufficient to meet the load demand, the system operates in a deficit mode. If the battery SOC is above the minimum threshold of 30%, the battery discharges to compensate for the shortfall. The discharge current is determined based on the difference between load demand and PV output, ensuring that the load is continuously supplied. However, if the SOC falls to or below the minimum limit, the system enters a critical condition where the battery is no longer allowed to discharge. In this case, a power deficit is simulated, indicating the need for load shedding or external grid support. Hence, when PV generation exactly matches the load demand or when the battery reaches its operational limits, the system maintains the battery in an idle state. This prevents unnecessary charge–discharge cycling, thereby preserving battery lifespan and improving overall system efficiency. The governing logic can be summarized as follows [42]:
  • Excess PV Generation:
    • If P P V > P l o a d , the surplus power is used to charge the battery until the SOC reaches its upper limit ( S O C m a x = 90 % ).
    • Any remaining excess can be logged or considered for hypothetical grid export.
  • Deficit in Generation:
    • If P P V < P l o a d and S O C > S O C m i n (30%), the battery discharges to meet the load demand.
    • The discharge current is calculated based on the load shortfall:
      I d i s = P l o a d P P V V b a t
  • Critical SOC Condition:
    • If P P V < P l o a d and S O C S O C m i n , the system simulates a power deficit scenario, signaling load shedding or external supply dependency.
  • Battery Idle:
When PV generation matches the load exactly or the SOC reaches its operational limits, the battery remains idle, avoiding unnecessary cycling that could reduce battery lifespan.

5.2. Logic Flow and Implementation

The energy management algorithm is implemented within the MATLAB/Simulink environment using a structured combination of logical blocks, conditional statements, and relational operators. This implementation framework enables real-time decision-making and dynamic system response based on continuously updated input variables. The modular nature of Simulink allows the control logic to be visually represented and easily modified, facilitating both development and analysis of the system behavior. The operational flow begins with the acquisition of key input parameters, including photovoltaic (PV) voltage and current, load power demand, and battery state-of-charge (SOC). These inputs are processed to determine the instantaneous PV power output and to assess the overall energy balance within the microgrid. The algorithm then evaluates the difference between the generated power and load demand to identify whether the system is operating under surplus or deficit conditions. Based on this evaluation and the current SOC level, the control logic determines the appropriate battery action. If excess power is available, the battery is commanded to charge; if there is a shortfall and the SOC is within acceptable limits, the battery discharges to support the load. Otherwise, the battery remains in an idle state to avoid unnecessary cycling. Following this decision, the SOC is updated iteratively by accounting for charging or discharging currents and associated efficiency losses. The updated system parameters are then displayed on an interactive dashboard, providing dynamic visualization within the simulation environment of the power flow and SOC evolution. This implementation enhances system transparency and enables users to monitor and analyze microgrid performance effectively. The operational flow can be described as follows [43]:
  • Read inputs: PV voltage/current, load power, and battery SOC.
  • Evaluate generation versus load: Compute surplus or deficit power.
  • Decide battery action based on SOC and energy balance: Charge, discharge, or remain idle.
  • Update the battery SOC based on charging/discharging currents and efficiency.
  • Display updated values on the interactive dashboard and visualize the SOC in real time.
A pseudocode representing this control logic, as shown in Algorithm 1, provides clarity on the sequence of decisions, ensuring that energy is managed efficiently while maintaining system stability. Algorithm 1 shows the pseudocode for the implementation of digital twin-oriented microgrid energy management. Table 2 provides the definitions, equations, assumptions, and input data used to calculate each performance metric.
Algorithm 1. Algorithm Implementation of DT microgrid energy management
Pseudocode: Digital Twin-Oriented Microgrid Energy Management
01:BEGIN // Digital Twin Microgrid
02:// --- 1. Initialization ---
03:SET Simulation time = 24 h
04:SET   timestep = t
05// PV parameters
06:INPUT   PV rated power, PV voltage, PV current
07:INPUT    Irradiance profile, Temperature profile
08:// Battery parameters
09:INPUT Battery nominal voltage, Battery capacity
10:SET SOC min = 30%
11:SET SOC max = 90%
12:SET SOC initial = 50%
13:SET Charging efficiency = 0.9
14:SET Discharging efficiency = 0.9
15:// Load parameters
16:INPUT Load profile (time-dependent)
17:// --- 2. Simulation Loop ---
18:FOR t = 0 TO simulation time STEP timestep
19:// 2.1 Update PV output based on irradiance and temperature
20:PV current, PV voltage = Calculate PV Output (Irradiance profile[t], Temperature profile[t])
21:PV power = PV current * PV voltage
22:// 2.2 Read Load demand
23:Load power = Load profile[t]
24// 2.3 Compute Power difference
25:Power diff = PV power–Load power
26:// --- 2.4 Energy Management Control ---
27:    IF Power diff > 0 THEN
28:// Excess PV generation
29:    IF SOC < SOC max THEN
30:Battery charge current = Power diff / Battery nominal voltage
31:SOC = SOC + (Battery charge current * Charging efficiency * Δt) / Battery capacity
32:   ELSE
33:Battery charge current = 0
34:// Optional: Log surplus for grid export
35:   END IF
36:ELSE IF Power diff < 0 THEN
37:// PV deficit
38:IF SOC > SOC min THEN
39:Battery discharge current = ABS (Power diff) / Battery nominal voltage
40:SOC = SOC - (Battery discharge current * Δt) / (Battery capacity * Discharging efficiency)
41:ELSE
42:Battery discharge current = 0
43:// Optional: Trigger load shedding or external supply
44:END IF
45:ELSE
46:// PV matches load
47:Battery charge current = 0
48:Battery discharge current = 0
49:END IF
50:END

5.3. Integration of Energy Management Control Within the Framework

The energy management controller is integrated within the proposed digital twin-oriented framework to coordinate power flow between the photovoltaic (PV) system, battery energy storage system, and load. Acting as the operational decision-making layer, the controller continuously monitors system variables, including PV generation, battery state-of-charge (SOC), and load demand, and it applies predefined control rules to maintain energy balance and ensure reliable operation. Within the MATLAB/Simulink environment, the controller responds dynamically to changes in renewable generation and load conditions. When excess PV energy is available, the battery is charged while respecting the SOC limits; conversely, stored energy is discharged during periods of generation deficit to support load demand. This coordinated operation helps maintain the battery SOC within safe operating limits and improves the utilization of available renewable energy resources. The integration of control, modeling, and visualization within a unified framework enables continuous observation of system behavior through an interactive dashboard displaying key performance indicators such as SOC variation, current profiles, and power flow. This capability allows users to evaluate the effectiveness of the energy management strategy under different operating scenarios and gain insights into microgrid performance. Consequently, the framework provides a practical platform for analyzing renewable energy microgrids, testing control approaches, and supporting future developments toward fully integrated digital twin-oriented implementations with real-time data synchronization and advanced decision support capabilities [28,44].

6. Simulation Results

The proposed digital twin-oriented framework was evaluated using MATLAB/Simulink to assess its ability to represent the operational behavior of a small-scale renewable energy microgrid and to evaluate the performance of the integrated energy management controller. The simulation framework incorporated a photovoltaic (PV) system, battery energy storage, and a variable load, enabling the analysis of energy flow and system response under different operating conditions. The results demonstrated that the energy management strategy effectively coordinated power exchange between generation, storage, and demand. Under varying solar irradiance and load conditions, the controller-maintained the battery state-of-charge (SOC) within the predefined operating limits of 30–90%, preventing excessive charging and deep discharge events. Comparative analysis showed that the controlled system improved renewable energy utilization from 67.4% to 92.8%, reduced energy losses by 58.7%, and decreased load-shedding duration from 0.24 h to 0.03 h relative to uncontrolled operation. Furthermore, system reliability increased from 93.1% to 99.2%, while the Loss of Power Supply Probability (LPSP) decreased from 0.069 to 0.008. The simulation environment also provided dynamic visualization of key system variables, including PV generation, battery SOC, load demand, and power flow, enabling enhanced observation of system dynamics. These results demonstrate that the proposed framework provides a practical platform for analyzing microgrid behavior, evaluating energy management strategies, and supporting future development toward fully integrated digital twin implementations. The MATLAB model used a load current varying approximately between 1 A I l o a d 3 A .
Figure 2 shows the simulation setup of the digital twin-oriented framework. Table 3 summarizes the key parameter settings used in these simulations.
Figure 3, Figure 4 and Figure 5 illustrate the performance characteristics of the photovoltaic (PV) module through its current–voltage (I–V) and power–voltage (P–V) curves under varying environmental conditions. These curves provide critical insight into how the PV system responds to changes in solar irradiance and temperature, which are the primary external factors affecting its operation. The I–V curves demonstrate the nonlinear relationship between the output current and voltage, highlighting key operating points such as the short-circuit current, open-circuit voltage, and the maximum power point (MPP). Similarly, the P–V curves show how the output power varies with voltage, clearly indicating the voltage level at which maximum power is generated. It is observed that solar irradiance has a direct impact on the magnitude of the output current and overall power generation. As irradiance increases, the photocurrent rises proportionally, resulting in higher power output and improved system performance. In contrast, temperature primarily affects the voltage characteristics of the PV module. An increase in temperature leads to a reduction in the open-circuit voltage, which in turn lowers the maximum power output and overall efficiency of the system. These results confirm that irradiance and temperature are the dominant factors influencing PV performance. Their combined effects determine the operating point and efficiency of the PV system under real-world conditions. Understanding these relationships is essential for accurate modeling, control, and optimization of renewable energy systems within the digital twin-oriented framework.
Figure 6, Figure 7, Figure 8, Figure 9 and Figure 10 present a comparative analysis of the battery state-of-charge (SOC) and current interactions within the digital twin-oriented microgrid under controlled and uncontrolled operating conditions. These results provide valuable insights into how the presence or absence of an energy management control strategy influences system coordination, power balance, and overall performance. In particular, Figure 6 and Figure 8 illustrate the current profiles of the PV system, battery, and load, clearly highlighting the differences in system behavior with and without control. In the uncontrolled scenario, the system components operate independently without coordinated decision-making. As a result, mismatches frequently occur between power generation and load demand. This leads to inefficient battery operation, where charging and discharging may occur at inappropriate times, causing erratic current fluctuations and unstable system behavior. Such uncoordinated interactions not only reduce energy utilization efficiency but can also accelerate battery degradation due to irregular cycling patterns. In contrast, the controlled scenario demonstrates the effectiveness of the implemented energy management algorithm in coordinating system operations. The controller dynamically regulates current exchange among the PV system, battery, and load based on real-time conditions. During periods of high solar generation, excess energy is efficiently directed to charge the battery while simultaneously supplying the load. When solar output decreases, the battery discharges in a controlled manner to compensate for the deficit, ensuring uninterrupted power supply. This coordinated control results in smoother current transitions, reduced fluctuations, and a well-balanced energy flow within the microgrid. Consequently, the system exhibits improved stability, enhanced efficiency, and more reliable operation, validating the effectiveness of the digital twin-oriented energy management strategy.
Figure 8 and Figure 10 present the evolution of the battery state-of-charge (SOC) for the digital twin-oriented microgrid under uncontrolled and controlled operating conditions, respectively. These figures provide a clear comparison of how the presence of an energy management (EM) control strategy influences battery performance and overall system stability. In the absence of control, the SOC profile exhibits irregular and erratic behavior, with frequent excursions beyond safe operational limits or rapid depletion during high-demand periods. This indicates inefficient energy utilization and poor coordination between generation and consumption. Such uncontrolled operation not only reduces system efficiency but also poses a risk to battery health, as excessive charging and deep discharging can accelerate degradation and shorten the battery’s lifespan. In contrast, the controlled scenario demonstrates a well-regulated SOC profile that remains consistently within the predefined safe operating range of 30–90%. The implemented energy management algorithm intelligently governs the charging and discharging processes based on real-time system conditions. During periods of high solar irradiance, when PV generation exceeds load demand, surplus energy is directed toward charging the battery in a controlled manner. Conversely, during low irradiance or high load demand, the battery discharges gradually to support the load, ensuring continuity of supply without violating SOC constraints. This coordinated operation results in a smooth SOC trajectory, reflecting stable and efficient energy management. Furthermore, the simulation results confirm that the PV subsystem responds accurately to variations in solar irradiance, producing higher power output under strong sunlight and decreasing proportionally as irradiance declines. The energy management algorithm effectively prioritizes load supply while utilizing excess PV energy for storage, thereby optimizing overall system performance. When PV generation becomes insufficient, the battery seamlessly compensates for the deficit, maintaining uninterrupted operation. Hence, these results validate the effectiveness of the digital twin-oriented control strategy in achieving balanced energy flow, enhancing battery longevity, and improving microgrid reliability. The ability of the DT framework to replicate real-world energy management dynamics highlights its potential as a powerful tool for system analysis, optimization, and decision support. Figure 11 illustrates the power balance between photovoltaic (PV) generation, load demand, and battery energy storage within the microgrid. The results show that, when PV generation exceeds load demand, surplus energy is directed to the battery for charging. Conversely, when PV output falls below the load requirement, the battery discharges to compensate for the power deficit and maintain continuous load supply. This coordinated energy exchange demonstrates the effectiveness of the energy management controller in balancing generation and consumption. The figure further confirms that the microgrid maintains operational stability despite variations in solar generation and load demand, thereby improving renewable energy utilization and reducing dependence on external energy sources. Figure 12 presents the battery charging and discharging power profiles during the simulation period. Negative power values correspond to battery charging, which occurs during periods of excess PV generation, while positive power values indicate battery discharging to support the load when solar generation is insufficient. The results show smooth transitions between charging and discharging modes, indicating that the control strategy effectively regulates battery operation. Furthermore, the battery state-of-charge (SOC) remains within the prescribed operating limits, preventing overcharging and deep discharge conditions. This behavior contributes to enhanced battery lifespan, improved energy utilization, and more reliable microgrid operation. Figure 13 depicts the distribution of energy losses within the battery storage system and power converter. The results indicate that converter losses constitute a significant portion of the total system losses due to power conversion processes during energy transfer between the PV system, battery, and load. Battery losses arise primarily from charging and discharging inefficiencies. Although the overall losses are relatively small compared with the total energy processed by the system, their presence highlights opportunities for further optimization. The analysis demonstrates that the integrated energy management strategy minimizes unnecessary energy circulation and contributes to improved system efficiency. Table 3 highlights the comparative analysis of the system model based on performance metrics.

6.1. Renewable Energy Utilization Efficiency

Renewable energy utilization efficiency evaluates the effectiveness with which the microgrid uses the available photovoltaic (PV) energy to meet load demand and support battery charging. The results indicate that the integrated energy management controller significantly improves the utilization of renewable energy by intelligently coordinating power flow between the PV system, battery storage, and load. During periods of high solar generation, excess energy is stored in the battery rather than being wasted, while stored energy is discharged during periods of low PV output to maintain load supply. The controlled system achieved a renewable energy utilization efficiency of approximately 92.8%, compared to 67.4% under uncontrolled operation, demonstrating a substantial improvement in the use of available solar resources. This enhanced utilization reduces energy wastage, minimizes dependence on supplementary energy sources, and contributes to the overall efficiency, reliability, and sustainability of the microgrid. Its expression is given as
η R E = Renewable   Energy   Used Renewable   Energy   Generated × 100

6.2. Reliability Metrics

Reliability metrics were used to assess the ability of the microgrid to continuously satisfy load demand under varying renewable generation and operating conditions. The results indicate that the implementation of the energy management controller significantly enhanced system reliability by improving the coordination between the photovoltaic (PV) system, battery storage, and load. Specifically, system reliability increased from 93.1% in the uncontrolled case to 99.2% under controlled operation, while the Loss of Power Supply Probability (LPSP) decreased from 0.069 to 0.008. These improvements demonstrate that the controller effectively utilizes available renewable energy and battery storage to minimize supply interruptions and maintain power availability. The high reliability achieved confirms the effectiveness of the proposed framework in ensuring stable and dependable microgrid operation, thereby supporting the integration of renewable energy resources in small-scale energy systems.
Loss of Power Supply Probability (LPSP) is expressed as
L P S P = E d e f i c i t E l o a d
Supply reliability is expressed as
R e l i a b i l i t y = 1 L P S P × 100
Table 4 clearly demonstrate the benefits of the proposed energy management controller. Renewable energy utilization increased from 67.4% to 92.8%, indicating more effective use of available photovoltaic energy. System reliability improved from 93.1% to 99.2%, while the LPSP decreased by 88.4%, confirming enhanced load supply security. The controller completely eliminated SOC constraint violations and reduced the battery cycling frequency by 44.4%, which is expected to prolong battery lifetime. Furthermore, the RMS power imbalance decreased by 50.0%, demonstrating improved coordination between PV generation, battery storage, and load demand. Energy losses were also reduced, with battery and converter losses decreasing by 41.7% and 43%, respectively. Overall system efficiency increased from 79.6% to 91.3%, providing strong quantitative evidence that the proposed control strategy significantly enhances microgrid performance compared with uncontrolled operation. Table 5 presents a comparison of the proposed framework with existing renewable energy microgrid and digital twin studies.

7. Discussion

The results demonstrate the effectiveness of the proposed digital twin-oriented framework in improving the operational performance of a small-scale renewable energy microgrid. The integrated energy management controller successfully coordinated power exchange between the photovoltaic (PV) system, battery storage, and load, resulting in improved energy utilization and enhanced system stability. Compared with uncontrolled operation, renewable energy utilization increased from 67.4% to 92.8%, while energy losses were reduced by 58.7%. In addition, load-shedding duration decreased from 0.24 h to 0.03 h, and system reliability improved from 93.1% to 99.2%, indicating the effectiveness of the control strategy in maintaining power availability under varying operating conditions. The controlled system also maintained the battery state-of-charge (SOC) within the safe operating range of 30–90%, preventing excessive charging and deep discharge events observed in the uncontrolled case. These findings are consistent with those of previous studies that have reported the benefits of coordinated energy management in enhancing battery performance, renewable energy utilization, and microgrid reliability. Beyond operational improvements, the developed framework provides a practical platform for analyzing system behavior and evaluating control strategies through dynamic visualization within the simulation environment. Although the current implementation is simulation-based, the results highlight the potential of digital twin-oriented approaches to support intelligent energy management and operational optimization in renewable energy microgrids. The framework therefore represents an important step toward the realization of fully integrated digital twins for future smart and sustainable energy systems.

Limitations of the Study

This study has several limitations that should be acknowledged. First, the proposed framework is a simulation-based, digital twin-oriented model developed entirely in MATLAB/Simulink and does not include real-time synchronization with a physical microgrid, hardware-in-the-loop validation, or live sensor data acquisition. Second, the photovoltaic subsystem employs a simplified representation that does not explicitly model temperature effects, partial shading, maximum power point tracking (MPPT), or detailed converter dynamics. Third, the battery model is based on state-of-charge estimation and does not incorporate battery aging, capacity degradation, thermal behavior, or electrochemical dynamics. In addition, the implemented energy management system relies on a rule-based control strategy, which, although effective for demonstrating system operation, may not achieve the level of optimization offered by advanced approaches such as model predictive control, fuzzy logic, or machine learning-based methods. The study also considers a small laboratory-scale microgrid with a PV source, battery storage, and variable load, limiting its direct applicability to larger and more complex multi-energy systems. These limitations provide opportunities for future work involving real-time implementation, advanced control strategies, uncertainty modeling, and experimental validation.

8. Conclusions and Future Work

8.1. Conclusions

This study presented the development of a simulation-based digital twin-oriented framework for a small-scale renewable energy microgrid comprising a solar photovoltaic (PV) system, a lithium-ion battery energy storage system, and a variable load. The framework was implemented in MATLAB/Simulink and integrated with a rule-based energy management controller to regulate power flow, maintain the battery state-of-charge (SOC) within predefined operating limits, and ensure reliable load supply under varying operating conditions. Simulation results demonstrated the effectiveness of the proposed framework in improving microgrid performance and operational stability. The energy management strategy maintained the battery SOC within the safe operating range of 30–90%, increased renewable energy utilization from 67.4% to 92.8%, reduced energy losses by 58.7%, and decreased load-shedding duration from 0.24 h to 0.03 h compared with uncontrolled operation. In addition, system reliability improved from 93.1% to 99.2%, while the Loss of Power Supply Probability (LPSP) decreased from 0.069 to 0.008, indicating enhanced energy security and power availability. The integration of an interactive dashboard further improved system visualization and operational understanding, providing a practical platform for monitoring and analyzing microgrid behavior. Overall, the proposed framework demonstrates the potential of digital twin-oriented approaches to support intelligent energy management and microgrid optimization.

8.2. Future Work

Future research will focus on advancing the proposed digital twin-oriented framework toward a fully operational digital twin capable of supporting real-time monitoring, predictive analytics, and intelligent decision-making. A key area of development is the integration of Internet of Things (IoT)-enabled sensors, embedded controllers, and communication technologies to enable continuous data exchange between physical microgrid components and their virtual counterparts. This enhancement would facilitate real-time synchronization and improve the practical applicability of the framework. Further studies will investigate the incorporation of machine learning and artificial intelligence techniques for forecasting solar generation, load demand, and battery behavior. Such capabilities would enable predictive energy management and adaptive control strategies that respond proactively to changing operating conditions. Hardware-in-the-loop (HIL) and real-time digital simulation platforms will also be explored to validate system performance under realistic operating scenarios and bridge the gap between simulation and field deployment. Additionally, the framework can be extended to include other distributed energy resources, such as wind turbines, electric vehicles, and grid-connected operation with bidirectional power exchange. Future work will also consider multi-objective optimization approaches that simultaneously address technical, economic, and environmental objectives. Finally, the integration of cybersecurity mechanisms, uncertainty modeling, and peer-to-peer energy trading concepts will enhance the scalability, resilience, and intelligence of future renewable energy microgrid systems.

Author Contributions

Conceptualization, P.A.G. and K.L.; methodology, P.A.G.; software, P.A.G.; validation, P.A.G. and K.L.; formal analysis, P.A.G.; investigation, P.A.G.; resources, P.A.G.; data curation, P.A.G.; writing—original draft preparation, P.A.G.; writing—review and editing, K.L.; visualization, P.A.G.; supervision, K.L.; project administration, K.L.; funding acquisition, P.A.G. All authors have read and agreed to the published version of the manuscript.

Funding

This study was partly funded by a grant from the South African National Research Foundation (Grant No. PSTD250330307359).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

All data supporting the findings of this study are included within the article. Any additional information or requests for further clarification regarding the data may be obtained by contacting the corresponding author.

Acknowledgments

The authors acknowledge that the views and conclusions presented in this study are entirely their own and do not necessarily represent the official stance of the National Research Foundation (NRF) of South Africa. We sincerely appreciate the efforts of the anonymous reviewers, whose thorough evaluations and thoughtful suggestions significantly enhanced the technical depth and overall clarity of the manuscript. Their valuable input played a crucial role in refining the quality and impact of this research.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
DTDigital Twin
PVPhotovoltaic
DERsDistributed Energy Resources
SOCState-of-Charge
EMSEnergy Management System
S O C m a x Maximum State-of-Charge limit
S O C m i n Minimum State-of-Charge limit
PPower
ICurrent
VVoltage
DCDirect Current
ACAlternating Current
SCADASupervisory Control and Data Acquisition
AIArtificial Intelligence
ANNArtificial Neural Network
WCAWater Cycle Algorithm
TLBOTeaching–Learning-Based Optimization
HEMSHome Energy Management System
IoTInternet of Things
BESSBattery Energy Storage System
MATLABMatrix Laboratory (MATLAB simulation environment)
MPPMaximum Power Point
P-VPower–Voltage
I-VCurrent–Voltage
MPCModel Predictive Control
PVHCPhotovoltaic Hosting Capacity

References

  1. Mohanraj, R.; Balaji, S.N. Digital Twin Technology: A Comprehensive Review of Modeling, Applications, Challenges and Future Directions in Complex System Integration. Arch. Comput. Methods Eng. 2025, 33, 3291–3316. [Google Scholar] [CrossRef]
  2. Horo-Mustajbašić, N.; Hai, I.U.; Nassereddine, H.; Castillo, M.A.P.; Ghazouani, H.; Sher, F.; Borysiak, O.; Safdar, M.; Hussain, Z.; Daci, M. Design and digitalization of renewable energy technologies and infrastructures. In Renewable Energy Technologies; Elsevier: Amsterdam, The Netherlands, 2026; pp. 799–825. [Google Scholar]
  3. Eskandari, A.; Emamian, M.; Nedaei, A.; Aghaei, M. Digital twin technology in microgrid systems. In Digital Twin Technology for the Energy Sector; Elsevier: Amsterdam, The Netherlands, 2025; pp. 111–141. [Google Scholar]
  4. Sakthivel, S.; Arivukarasi, M.; Charulatha, G.; Nithisha, J.; Abirami, B.; Jaithunbi, A.K.; Kumar, V.S. A multi strategy optimization framework using AI digital twins for smart grid carbon emission reduction. Sci. Rep. 2026, 16, 8570. [Google Scholar] [CrossRef] [PubMed]
  5. Savoia, M.; Annunziata, D.; Thakur, D.; Fortino, G.; Piccialli, F. Federated continual learning meets digital twins: A survey on methods, intersections and perspectives. Neurocomputing 2026, 681, 133366. [Google Scholar] [CrossRef]
  6. Wang, S.; Tian, C.; Zhou, C.; Wu, Y.; Ametefe, D.S.; John, D.; Ametefe, M.A. The Role of Digital Twin Technology in Enhancing Energy Efficiency in Buildings: A Systematic Literature Review. Energy Sci. Eng. 2026, 14, 1036–1066. [Google Scholar] [CrossRef]
  7. Bhatia, M.; Kumar, V. The role of digital twin in urban infrastructure and building management: A global scientometric perspective. Clust. Comput. 2026, 29, 38. [Google Scholar]
  8. Wu, Y.; Guerrero, J.M.; Wu, Y.; Bazmohammadi, N.; Vasquez, J.C.; Cabrera, A.J.; Lu, N. Digital twins for microgrids: Opening a new dimension in the power system. IEEE Power Energy Mag. 2024, 22, 35–42. [Google Scholar] [CrossRef]
  9. Idlbi, B.; Graeber, D. Towards Digital Twin of Distribution Grids with High Share of Distributed Energy Systems Environment for State Estimation and Congestion Management. Energies 2026, 19, 720. [Google Scholar] [CrossRef]
  10. Atef, M.; Alahakoon, S.; Wolfs, P.; Mumtahina, U.; Khatib, T.; Uddin, M. Energy Management in Microgrids: Commercial, Industrial, and Residential Perspectives. Energies 2026, 19, 419. [Google Scholar] [CrossRef]
  11. Gbadega, P.A.; Sun, Y.; Balogun, O.A. Real-Time Simulation Testbed for Energy Management and Control of Renewable Energy-Based Microgrids. In 2024 5th International Symposium on New Energy and Electrical Technology (ISNEET); IEEE: New York, NY, USA, 2024. [Google Scholar]
  12. Kumari, N.; Sharma, A.; Tran, B.; Chilamkurti, N.; Alahakoon, D. A comprehensive review of digital twin technology for grid-connected microgrid systems: State of the art, potential and challenges faced. Energies 2023, 16, 5525. [Google Scholar] [CrossRef]
  13. Park, H.-A.; Byeon, G.; Son, W.; Jo, H.-C.; Kim, J.; Kim, S. Digital twin for operation of microgrid: Optimal scheduling in virtual space of digital twin. Energies 2020, 13, 5504. [Google Scholar] [CrossRef]
  14. Subramanian, N.; Stonier, A.A. Digital twin applications and case studies in modern power grid management. Energy Rep. 2026, 15, 109218. [Google Scholar] [CrossRef]
  15. Arboleya, P.; Méndez, A. Real-Time Grid Digital Twins: The backbone of the next generation of network technology for distribution system operators. IEEE Electrif. Mag. 2024, 12, 39–49. [Google Scholar] [CrossRef]
  16. Sifat, M.M.H.; Choudhury, S.M.; Das, S.K.; Pota, H.; Yang, F. Novel abstractions and experimental validation for digital twin microgrid design: Lab scale studies and large scale proposals. Appl. Energy 2025, 377, 124621. [Google Scholar]
  17. Pilakkat, D.; Balasubramanian, K.; Rajendran, S.R. Toward Intelligent Digital Twins for PV Systems: A Unified Framework for Control, Forecasting, and Grid Integration. IEEE Access 2025, 13, 213362–213376. [Google Scholar] [CrossRef]
  18. Bickford, J.F.; Bozada, T.A.; Chen, W.W. The Future of Digital Twin Research and Development. J. Comput. Inf. Sci. Eng. 2025, 25, 080801-1. [Google Scholar] [CrossRef]
  19. Wang, K.; Cheng, L.; Yin, M.; Zhang, K.; Wang, R.; Zhang, M.; Sun, R. Evolutionary Game Theory in Energy Storage Systems: A Systematic Review of Collaborative Decision-Making, Operational Strategies, and Coordination Mechanisms for Renewable Energy Integration. Sustainability 2025, 17, 7400. [Google Scholar] [CrossRef]
  20. Ramkumar, M.S.; Subramani, J.; Sivaramkrishnan, M.; Munimathan, A.; Michael, G.K.O.; Alam, M.M. Optimal energy management for multi-energy microgrids using hybrid solutions to address renewable energy source uncertainty. Sci. Rep. 2025, 15, 7755. [Google Scholar] [CrossRef] [PubMed]
  21. Sahoo, B.; Panda, S.; Rout, P.K.; Bajaj, M.; Blazek, V. Digital twin enabled smart microgrid system for complete automation: An overview. Results Eng. 2025, 25, 104010. [Google Scholar] [CrossRef]
  22. Mchirgui, N.; Quadar, N.; Kraiem, H.; Lakhssassi, A. The applications and challenges of digital twin technology in smart grids: A comprehensive review. Appl. Sci. 2024, 14, 10933. [Google Scholar] [CrossRef]
  23. Kabir, M.R.; Halder, D.; Ray, S. Digital twins for IoT-driven energy systems: A survey. IEEE Access 2024, 12, 177123–177143. [Google Scholar]
  24. Clennar, T.; Du, Y.; Liu, Z. Lab-scale green hydrogen and fuel cell microgrid digital twin. Energy Convers. Manag. 2026, 350, 120928. [Google Scholar]
  25. Al-Shetwi, A.Q.; Atawi, I.E.; El-Hameed, M.A.; Abuelrub, A. Digital Twin Technology for Renewable Energy, Smart Grids, Energy Storage and Vehicle-to-Grid Integration: Advancements, applications, key players, challenges and future perspectives in modernising sustainable grids. IET Smart Grid 2025, 8, e70026. [Google Scholar]
  26. Alilou, M.; Younesi, A.; Siano, P. A sustainable approach to hybrid microgrid design: Optimal sizing and energy management. Renew. Energy 2026, 256, 124078. [Google Scholar]
  27. Jiang, H.; Tjandra, R.; Soh, C.B.; Cao, S.; Soh, D.C.L.; Tan, K.T.; Tseng, K.J.; Krishnan, S.B. Digital twin of microgrid for predictive power control to buildings. Sustainability 2024, 16, 482. [Google Scholar] [CrossRef]
  28. Salaorni, D.; Bianchi, F.; Colnago, S.; Barisione, A.; Trovò, F.; Restelli, M. A novel digital twin for battery energy storage systems in micro-grids. J. Energy Storage 2025, 132, 117745. [Google Scholar] [CrossRef]
  29. Calderón, D.; Folgado, F.J.; González, I.; Calderón, A.J. Development and real-world implementation of a Digital Twin-enhanced supervisory system for RES-green hydrogen microgrid. Energy Convers. Manag. 2026, 348, 120822. [Google Scholar]
  30. Pilakkat, D.; Balasubramanian, K.; Rajendran, S.R. Digital Twins Beyond Monitoring: A Survey on Predictive Control, Cybersecurity, and Storage Integration in PV-Enabled Smart Grids. IEEE Access 2026, 14, 46858–46874. [Google Scholar] [CrossRef]
  31. Sajjadi, S.S.; Moghadassi, A.; Rashidizadeh-Kermani, H.; Kia, R.; Shafie-Khah, M. AI-driven forecasting for battery energy management in digital twin-integrated microgrids using machine learning techniques. J. Energy Storage 2026, 143, 119556. [Google Scholar]
  32. Awad, H.; Bayoumi, E.H. Electrical Grid Architectures for Smart Cities from Digitalized Power Systems to AI-Enabled Urban Energy Ecosystems. Smart Cities 2026, 9, 96. [Google Scholar] [CrossRef]
  33. Zinoviev, V.; Koeva, D.; Tsankov, P.; Kutkarska, R. Review of Artificial Intelligence Applications in the Digital Energy and Renewable Energy Infrastructures. Energies 2026, 19, 1250. [Google Scholar] [CrossRef]
  34. Alenezi, A.; Alabaiadly, Y. Digital Twins and Edge AI for Small/Off-Grid Water Systems—A Review. IEEE Access 2026, 14, 39960–39978. [Google Scholar]
  35. Akinmejiwa, O.; Gbadega, P.; Ajibola, A. Synergizing Renewable Energy Integration for Enhanced Energy Management and Control in Smart Grids: A Review. In 2024 IEEE 5th International Conference on Electro-Computing Technologies for Humanity (NIGERCON); IEEE: New York, NY, USA, 2024. [Google Scholar]
  36. Amole, A.O.; Oladipo, S.; Olabode, O.E.; Makinde, K.A.; Gbadega, P. Analysis of grid/solar photovoltaic power generation for improved village energy supply: A case of Ikose in Oyo State Nigeria. Renew. Energy Focus 2023, 44, 186–211. [Google Scholar] [CrossRef]
  37. Padmawansa, N.; Gunawardane, K.; Madanian, S.; Oo, A.M.T. Battery energy storage capacity estimation for microgrids using digital twin concept. Energies 2023, 16, 4540. [Google Scholar] [CrossRef]
  38. Zhao, X.; Zhang, Y. Integrated management of urban resources toward Net-Zero smart cities considering renewable energies uncertainty and modeling in Digital Twin. Sustain. Energy Technol. Assess. 2024, 64, 103656. [Google Scholar] [CrossRef]
  39. Muhsen, H.; Allahham, A.; Al-Halhouli, A.; Qandil, M. A digital twin framework for flexibility management using electric vehicle aggregators with embedded cyber-attack detection. Sustain. Energy Grids Netw. 2026, 46, 102307. [Google Scholar] [CrossRef]
  40. Tsegaye, S.; Sanjeevikumar, P. Impact of artificial intelligence-driven digital twins and lean six sigma-assisted power system asset management on long-term investment planning. Sci. Rep. 2026, 16, 13881. [Google Scholar] [PubMed]
  41. Heluany, J.B.; Gkioulos, V. A review on digital twins for power generation and distribution. Int. J. Inf. Secur. 2024, 23, 1171–1195. [Google Scholar]
  42. Felez, R.; Felez, J. Intelligent HVAC control in residential buildings: A review of advanced techniques and AI applications. Appl. Sci. 2026, 16, 2006. [Google Scholar] [CrossRef]
  43. Vanitha, P.; Anand, A.J. Intelligent energy management of a grid-connected PV–battery electric vehicle charging station using CNN-BiLSTM-based control. J. Power Sources 2026, 670, 239505. [Google Scholar]
  44. Kumar, J.; Vijayakumar, P.; Paramasivam, S.; Kumar, A.; Gatto, G. Hybrid WbOA–APINN framework for sustainable and intelligent energy management in renewable microgrids with hybrid energy storage. Electr. Power Syst. Res. 2026, 252, 112349. [Google Scholar]
  45. Abtahi, M.; Rueda, L.; Delcroix, B.; Athienitis, A. Semantic digital twinning for cost-optimal HVAC operation: Real-time application to a house with smart thermostats and PV/battery under a time-of-use tariff. Energy Build. 2025, 343, 115938. [Google Scholar]
  46. Prauzek, M.; Gaiova, K.; Kucova, T.; Konecny, J. Fuzzy energy management strategies for energy harvesting IoT nodes based on a digital twin concept. Future Gener. Comput. Syst. 2025, 166, 107717. [Google Scholar] [CrossRef]
  47. Bashir, F.M.; Almatared, M.; Sulaiman, M.; Nasrallah, E.; Rassas, N.H.; Dodo, Y.A. An operational digital twin for co-optimizing HVAC, PV/battery, and wall shading under time-of-use tariffs: A real-world online whole-home study with economic model predictive control. J. Build. Eng. 2026, 121, 115705. [Google Scholar] [CrossRef]
  48. Chen, F.; Fang, G. Harnessing digital twin and IoT for real-time monitoring, diagnostics, and error correction in domestic solar energy storage. Energy Rep. 2024, 11, 3614–3623. [Google Scholar]
  49. Weerakoon, A.S.; Assadi, M. Experimental Assessment and Digital Twin Modeling of Integrated AEM Electrolyzer–PEM Fuel Cell–BESS for Smart Hydrogen Energy Applications. Energies 2025, 18, 6318. [Google Scholar]
  50. Ye, Y.; Xu, B.; Wang, H.; Zhang, J.; Lawler, B.; Ayalew, B. Deep reinforcement learning-based energy management system enhancement using digital twin for electric vehicles. Energy 2024, 312, 133384. [Google Scholar] [CrossRef]
  51. Testasecca, T.; Bellesini, F.; Arnone, D.; Beccali, M. A Digital Twin for Real-Time and Predictive Optimization of Electric Vehicle Charging in Microgrids Integrating Renewable Energy Sources. Energies 2025, 18, 5605. [Google Scholar] [CrossRef]
  52. Yadav, I.C.; Bajpai, R.S.; Gupta, S.; Shukla, A. Hybrid fuzzy-MPC based multi-objective control strategy for fast charging of electric vehicles with advanced battery thermal management and renewable grid support. Sci. Rep. 2025, 15, 42342. [Google Scholar] [PubMed]
Figure 1. System architecture: digital twin-oriented framework for a small-scale microgrid.
Figure 1. System architecture: digital twin-oriented framework for a small-scale microgrid.
Sustainability 18 06732 g001
Figure 2. Simulation setup of the digital twin-oriented framework.
Figure 2. Simulation setup of the digital twin-oriented framework.
Sustainability 18 06732 g002
Figure 3. I–V characteristic curve under constant temperature.
Figure 3. I–V characteristic curve under constant temperature.
Sustainability 18 06732 g003
Figure 4. I–V characteristic curve under varying irradiance levels.
Figure 4. I–V characteristic curve under varying irradiance levels.
Sustainability 18 06732 g004
Figure 5. P–V characteristic curve under varying irradiance levels.
Figure 5. P–V characteristic curve under varying irradiance levels.
Sustainability 18 06732 g005
Figure 6. Battery SOC of the DT framework under varying conditions.
Figure 6. Battery SOC of the DT framework under varying conditions.
Sustainability 18 06732 g006
Figure 7. Dynamic current interactions in the DT microgrid without EM control.
Figure 7. Dynamic current interactions in the DT microgrid without EM control.
Sustainability 18 06732 g007
Figure 8. Battey SOC of the DT microgrid without EM control.
Figure 8. Battey SOC of the DT microgrid without EM control.
Sustainability 18 06732 g008
Figure 9. Dynamic current interactions in the DT microgrid with EM control.
Figure 9. Dynamic current interactions in the DT microgrid with EM control.
Sustainability 18 06732 g009
Figure 10. Battery SOC of the DT microgrid with EM control.
Figure 10. Battery SOC of the DT microgrid with EM control.
Sustainability 18 06732 g010
Figure 11. Microgrid power balance.
Figure 11. Microgrid power balance.
Sustainability 18 06732 g011
Figure 12. Battery charging and discharging power.
Figure 12. Battery charging and discharging power.
Sustainability 18 06732 g012
Figure 13. Energy loss distribution in battery and converter.
Figure 13. Energy loss distribution in battery and converter.
Sustainability 18 06732 g013
Table 1. Review of recent studies on digital twin-based microgrids.
Table 1. Review of recent studies on digital twin-based microgrids.
Ref.MethodologySystem ConfigurationKey ObjectivesKey FindingsLimitations
[25]Review-based DT framework integrating real-time monitoring, analytics, and simulationGrid-connected microgrids with DERsAssess DT potential in microgrid monitoring and controlIdentified DT benefits in predictive maintenance, fault detection, and system optimizationLimited practical implementation; challenges in real-time data synchronization
[26]Optimization-based DT with virtual simulation environmentMicrogrid with distributed generation and storageEnable optimal scheduling using DT environmentDemonstrated improved operational scheduling and energy efficiencyFocus on scheduling only; limited real-time adaptability
[8]DT-based real-time monitoring and visualization frameworkSmart microgrid systemsEnhance situational awareness and operational reliabilityImproved fault detection, visualization, and decision-making capabilitiesHigh dependency on communication infrastructure
[12]Data-driven DT integrated with machine learning techniquesRenewable-based microgrid (PV, storage, loads)Improve automation and adaptive controlEnabled intelligent system response and improved coordination among componentsComputational complexity and large data requirements
[21]DT-enabled automation framework using simulation modelsSmart microgrid with renewable integrationAchieve full automation of microgrid operationDemonstrated enhanced system efficiency and autonomous control capabilityLimited validation under real-world conditions
[27]Predictive control-based DT for building-integrated microgridBuilding microgrid with PV and storageOptimize power control and energy usageImproved predictive control accuracy and energy efficiencyNarrow application scope (building-level systems)
[28]DT model for battery energy storage systems (BESSs)Microgrid with battery storage integrationImprove battery monitoring and lifecycle managementEnhanced SOC estimation and predictive maintenance of batteriesFocus limited to storage subsystem rather than full microgrid
[29]DT-enhanced supervisory control system with real-world implementationRenewable microgrid with hydrogen integrationImprove real-time monitoring and supervisory controlDemonstrated real-world applicability and improved operational reliabilityHigh system complexity and implementation cost
[30]DT framework integrating predictive control and cybersecurity featuresPV-enabled smart grid/microgridEnhance predictive control and system securityAddressed cybersecurity and advanced forecasting challengesConceptual focus with limited experimental validation
[31]AI-driven DT using machine learning for forecasting and EMSMicrogrid with battery and renewable sourcesImprove energy management through forecastingAchieved accurate load and generation prediction for optimized EMSRequires large datasets and high computational resources
This WorkMATLAB/Simulink-based digital twin-oriented framework with rule-based energy management control and interactive dashboard visualizationSolar PV system, lithium-ion battery energy storage system, and variable loadTo develop a digital twin-oriented microgrid framework for monitoring, energy management, visualization, and performance evaluation of small-scale renewable energy systemsMaintained battery SOC within 30–90%; improved renewable energy utilization from 67.4% to 92.8%; reduced energy losses by 58.7%; improved reliability from 93.1% to 99.2%; reduced LPSP from 0.069 to 0.008; provided visualization within the simulation environment of the microgrid operationDoes not include physical system integration, real-time sensor synchronization, hardware-in-the-loop validation, advanced EMS algorithms, battery degradation modeling, or MPPT implementation; currently represents a digital twin-oriented simulation framework rather than a fully synchronized digital twin
Table 2. The descriptions of the performance evaluation metrics.
Table 2. The descriptions of the performance evaluation metrics.
MetricDefinitionEquationInput DataAssumptions
Renewable Energy Utilization Efficiency (REUE) (%)Percentage of PV energy effectively utilized by the load or battery R E U E = E P V , u s e d E P V , T o t a l × 100 Total PV energy generated, PV energy supplied to load, PV energy stored in batteryAll curtailed or unused PV energy is treated as renewable energy loss
Overall System Efficiency (%)Ratio of useful delivered energy to total generated energy η s y s = E l o a d E P V , T o t a l × 100 PV generation energy, load-served energyConverter and battery losses included
Reliability Index (%)Percentage of load demand successfully supplied R I = E s e r v e d E d e m a n d × 100 Total load demand, supplied load energyContinuous operation assumed during simulation period
Loss of Power Supply Probability (LPSP)Fraction of load demand not supplied L P S P = E u n m e t E d e m a n d Unmet load energy, total load demandLower values indicate higher reliability
RMS Power Imbalance (kW)Measures mismatch between generation and demand R M S i m b = 1 N i = 1 N P P V + P b a t P l o a d 2 PV power, battery power, load powerComputed over all simulation time steps
Energy Losses (kWh)Total energy lost in battery and converter E l o s s = E b a t , l o s s + E c o n v , l o s s Battery losses, converter lossesConstant efficiencies assumed
Battery Energy Losses (kWh)Energy dissipated during charging/discharging E b a t , l o s s = ( 1 η b a t ) E b a t Battery throughput energyComputed over all simulation time steps
Converter Losses (kWh)Energy lost in power conversion stages E c o n v , l o s s = ( 1 η c o n v ) E c o n v Energy passing through converterComputed over all simulation time steps
SOC Constraint ViolationsNumber of instances SOC exceeds limits N v i o l = ( S O C < 30 %   o r   S O C > 90 % ) SOC profileSafe operating range: 30–90%
Load-Shedding Duration (h)Total time load demand exceeds available supply T S h e d = t u n m e t Unmet load intervalsCalculated over entire simulation
Renewable Energy Curtailment (%)PV energy not utilized C u r t = E P V , T o t a l E P V , u s e d E P V , T o t a l × 100 Total PV generation, utilized PV energyExcess energy discarded
Table 3. Parameter settings used in the simulation.
Table 3. Parameter settings used in the simulation.
Variables and ParametersValuesUnits
Solar   irradiance   ( G )200–1000W/m2
Cell   temperature   ( T )25°C
Open-circuit voltage V o c 37V
Short-circuit current I s c 8.21A
Battery   nominal   voltage   V b a t 12V
Battery   capacity   C n o m 5 Ah (60)Wh
Initial   battery   SOC   S O C 0 50%
SOC limits30–90%
Charging/discharging efficiency0.9-
Charging   current   I c h 2A
Discharging   current   I d i s 1.5A
Battery   charging   efficiency   η c h 0.90p.u.
Battery   discharging   efficiency   η d i s 0.90p.u.
AC/DC conversion efficiency0.94-
Load   demand   P l o a d 12–36W
Time   step   Δ t 1min
E P V , u s e d 45.713Wh
E P V , T o t a l 49.26Wh
E s e r v e d 23.81Wh
E u n m e t 0.19Wh
Table 4. Comparative analysis of the system model using performance metrics.
Table 4. Comparative analysis of the system model using performance metrics.
Performance MetricWithout EMSWith EMSImprovement
Energy supplied to load (Wh)24.024.00
Renewable energy utilization (%)67.492.837.7
Battery charge energy (Wh)18.515.2Better regulated
Battery discharge energy (Wh)19.114.8Better regulated
Energy losses (Wh)24.612.250.4
Battery Energy Losses (Wh)11.8 (48%)4.958.5
Converter Energy Losses (Wh)12.8 (52%)7.343.0
Load shedding duration (h)0.240.0387.5
Average battery SOC (%)54.267.524.5
SOC violations (events)470100
System reliability (%)93.199.26.5
Overall system efficiency (%)79.691.314.7
LPSP0.0690.00888.4
Battery Charge/Discharge Cycles181044.4
RMS power imbalance (W)85.442.750
Battery operating range (%)0–10030–90Controlled
Renewable Energy Curtailment (%)32.67.277.9
Table 5. Comparison of the proposed framework with existing renewable energy microgrid and digital twin studies.
Table 5. Comparison of the proposed framework with existing renewable energy microgrid and digital twin studies.
Ref.PVBatteryEMS
Strategy
Digital Twin
Features
Renewable
Energy Utilization (%)
Renewable Energy Curtailment (%)System Efficiency (%)Reliability (%)LPSPEnergy Loss Reduction (%)SOC ManagementValidation Method
[45]Rule-BasedMonitoring72.327.781.594.10.05918.4BasicSimulation
[46]Fuzzy LogicDT Visualization84.615.487.296.80.03231.5GoodSimulation
[47]MPCReal-Time DT91.48.692.198.70.01345.2ExcellentHIL
[48]OptimizationMonitoring86.213.888.997.30.02736.8GoodSimulation
[49]ANN-Based EMSDT Platform89.510.590.398.10.01942.4ExcellentExperimental
[50]Reinforcement LearningReal-Time DT93.16.993.899.00.01051.3ExcellentHIL
[30]Rule-BasedMonitoring75.824.283.495.20.04822.1ModerateSimulation
[51]Multi-Agent EMSDigital Twin90.79.391.598.50.01547.6ExcellentExperimental
[52]Hybrid Fuzzy-MPCDT Visualization92.27.892.798.90.01149.8ExcellentHIL
[51]Optimization-Based EMSDigital Twin88.411.689.697.80.02239.7GoodSimulation
This
Work
Rule-Based EMSInteractive Visualization + DT-Oriented Framework92.87.294.199.20.00858.7SOC maintained within 30–90%Simulation
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

Gbadega, P.A.; Loji, K. Toward a Digital Twin Framework for Small-Scale Renewable Energy Microgrids with Integrated Energy Management Control. Sustainability 2026, 18, 6732. https://doi.org/10.3390/su18136732

AMA Style

Gbadega PA, Loji K. Toward a Digital Twin Framework for Small-Scale Renewable Energy Microgrids with Integrated Energy Management Control. Sustainability. 2026; 18(13):6732. https://doi.org/10.3390/su18136732

Chicago/Turabian Style

Gbadega, Peter Anuoluwapo, and Kabulo Loji. 2026. "Toward a Digital Twin Framework for Small-Scale Renewable Energy Microgrids with Integrated Energy Management Control" Sustainability 18, no. 13: 6732. https://doi.org/10.3390/su18136732

APA Style

Gbadega, P. A., & Loji, K. (2026). Toward a Digital Twin Framework for Small-Scale Renewable Energy Microgrids with Integrated Energy Management Control. Sustainability, 18(13), 6732. https://doi.org/10.3390/su18136732

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