Abstract
In the era of renewable dominated grids, integration of dynamic loads such as EV charging stations have increased the operational challenges in multifolds, particularly in DC microgrids (DC MGs). Traditional battery-dominated grid energy management strategies (EMSs) are often not capable of handling fast transients due to the limitations of battery electrochemistry. To overcome this limitation, a hierarchical hybrid energy management strategy is proposed that uses the combination of data-driven and metaheuristic algorithms. The designed optimization framework consists of particle swarm optimization (PSO) and a neural network (NN) implemented in the central controller of a 4-bus ringmain DC MG. An efficient decoupling of fast and slow storage dynamics is performed, where the supercapacitor (SC) is optimized using the NN and the battery is optimized using PSO. This selective optimization reduces the computational overhead on the PSO making it more feasible for real-time implementation. The designed hybrid PSO-Neural EMS framework is initially designed on MATLAB and further validated on a real-time hardware setup. Robustness of the control scheme is verified with various case studies, such as renewable intermittency, dynamic loading and partial shading scenarios. An effective optimization of the SC in both transient and heavy load scenarios are observed. LabVIEW interfacing is used for MODBUS-based interaction with PV emulators and DC-DC converters.
1. Introduction
Decentralized DC MG architectures gained popularity with the increased adoption of renewable energy resources and electric vehicles and extensive use of power electronic devices for load interfacing [1]. Also, DC MGs will provide the unique advantages over AC especially in renewable-dominated grids, such as seamless integration with RES, improved power quality and reduced power conversion stages [2]. Apart from these advantages DC MGs face control challenges during renewable intermittency, which is highly stochastic and has dynamically varying loads. These uncertainties lead to power imbalances, poor voltage regulation and nonuniform load sharing [3]. Therefore, to achieve the reliable and resilient control of DC MGs, an adaptive power balance mechanism should be implemented that can address both transient conditions and long-term energy variations. The battery energy storage system (BESS) is the most prominent technology employed due to its high energy density and matured technology [4]. But BESS performance is limited by its characteristic of slow dynamic response; also, they suffer accelerated aging when subjected to frequent transient operations [5]. Therefore, sole dependency on the BESS for the power compensation in a renewable dominated grid results in reduced aging, excessive thermal stress and reduced operational reliability. Overcoming these limitations of a BESS, the SC is combined with the BESS to make it a hybrid energy storage system (HESS) [6]. The high power density of the SC will make it the best choice for the transient operations, thereby reducing the burden on the BESS. By utilizing the complimentary characteristics of the battery and SC, better voltage regulation and power optimizing can be achieved. Apart from all these advantages, the coordinated control during high-frequency operations becomes a challenging task. State-of-charge constraints, nonlinear storage dynamics, high intermittency and variable load demand complicate the control strategy. Therefore, developing a scalable, reliable and robust HESS control strategy becomes crucial for optimized operation of DC MGs.
1.1. Problem Statement
When a BESS is solely made responsible for tackling rapidly changing load dynamics such as EV charging stations and fast and recurrent power fluctuations, they experience severe operational stress. The inherent electrochemical properties of the BESS will not always guarantee the better transient performance. Therefore, parallel operation of the BESS and SC will be the solution for better performance in both transient and long-term compensations [7]. But including this combination and making it a HESS will increase the control design complexity. Therefore, there is a need to develop a control logic that obtains the tradeoff between design complexity and DC MG performance. Classical optimization techniques that implement energy management strategies, especially metaheuristic methods like PSO, will achieve a near-optimal solution [8]. But, as the size of the grid increases, these solutions will face scalability issues, thereby increasing the complexity of the optimization problem. This significantly reduces the real-time applicability. Therefore, it is trivial to design an advanced control technique that preserves the benefits of the optimal energy management while reducing the computational overhead. This will enable real-time operation of a HESS in the DC MG environment.
1.2. Literature Review
A large body of work has investigated control and energy management strategies for the HESS in DC MGs. Conventional approaches typically employ rule-based or droop-based strategies to coordinate power sharing between the BESS and SCs [9,10]. In such schemes, the SC is often controlled to respond to high-frequency components of the load or RES power, while the battery compensates for low-frequency variations and steady-state imbalances. Although these methods are simple and easy to implement, they are usually tuned heuristically, may not account for detailed storage dynamics and constraints and can struggle to maintain optimality under highly variable conditions. To improve performance, optimization-based EMSs have been proposed, formulating HESS operation as a constrained optimization problem that accounts for converter limits, state-of-charge (SoC) constraints, power ratings, efficiency and battery aging considerations [11,12]. Metaheuristic algorithms such as PSO, genetic algorithms and other evolutionary techniques are widely utilized due to their flexibility and ability to handle nonlinear, nonconvex problems and mixed-integer decision variables [13]. These methods have shown the capability to achieve near-optimal power-sharing decisions for a variety of operating scenarios and objective functions, such as loss minimization, cost reduction and lifetime extension. However, because metaheuristics perform iterative searches over large and often high-dimensional solution spaces, their computational burden grows significantly with system size, number of storage units and the richness of constraints. As a consequence, many reported EMS solutions operate with relatively long control horizons and coarse time steps, which limits their applicability for fast, real-time control during transient events in dynamic DC MGs [14].
In parallel with optimization-based methods, data-driven and advanced control techniques have been explored for HESSs and DC MGs. Model predictive control (MPC) and robust control schemes have been proposed to handle constraints and uncertainties explicitly while providing improved dynamic performance. However, MPC formulations for HESSs often involve solving optimization problems online, which again raises concerns regarding computational tractability in fast timescales and under high dimensionality. More recently, machine learning and other data-driven approaches have been investigated to approximate optimal control laws or to perform state and disturbance prediction [15]. Techniques such as neural networks, fuzzy logic controllers and reinforcement learning have been applied to emulate or learn optimal power-sharing patterns between BESSs and SCs under varying operating conditions. These data-driven strategies can offer fast inference once trained, making them attractive for real-time deployment. Nevertheless, they typically require extensive and representative training data, and their performance may degrade when confronted with operating conditions not well captured during training. Furthermore, when used in isolation, purely data-driven schemes may not directly enforce physical constraints, such as SoC limits and power ratings, or may lack explicit mechanisms to optimize long-term objectives like battery lifetime and energy efficiency. Consequently, there is a growing interest in hybrid approaches that combine the adaptability and speed of data-driven models with the rigor and global perspective of optimization-based methodologies [16,17]. Convex relaxation-based economic dispatch and converter modeling methods are presented in [18]; they represent advanced and rigorous approaches for microgrid energy management. These methods provide strong theoretical guarantees, including global optimality and efficient solvability under convex formulations. Large-scale operational optimization models, such as mixed-integer linear programming (MILP), have been proposed for smart-grid-enabled microgrids to integrate planning, energy management and cost optimization under renewable uncertainty in [19]. These approaches primarily operate at hourly scheduling horizons and focus on economic dispatch and system-level coordination. In contrast, the present work addresses real-time hierarchical control of DC microgrids, targeting fast transient coordination of hybrid energy storage systems. The proposed PSO–NN framework complements planning-level models by providing a computationally efficient dynamic control layer for transient stability and storage stress reduction.
Despite significant progress, several limitations remain in existing HESS control and EMS strategies for DC microgrids as listed in Table 1. First, many optimization-based frameworks treat the HESS as a single decision block, jointly optimizing BESS and supercapacitor setpoints using a unified metaheuristic or centralized optimizer. While this can produce high-quality solutions, it leads to large decision spaces and high computational complexity, especially when multiple storage units, diverse operating modes and detailed constraints are considered [20]. This complexity inhibits real-time applicability during fast transient events, where rapid decisions are required on the order of milliseconds to seconds [21]. Second, existing methods often do not explicitly decouple the fast and slow dynamics of HESSs in a manner that is systematically reflected in the control architecture. In practical DC MGs, SCs are naturally suited for high-frequency transient compensation, whereas batteries target slower energy balancing [22]. However, many EMS designs either use simplified filters or heuristics to distinguish timescales or rely on joint optimization, without exploiting a structured decomposition of the control problem. This can lead to redundant computations, delayed responses to disturbances and suboptimal use of storage resources, particularly under highly stochastic RES and EV loading conditions. Third, data-driven approaches proposed for HESS control usually aim either to replace the optimization layer or to provide predictive information, but they rarely operate in a tightly integrated, hierarchical manner with metaheuristic or other optimization-based EMSs. As a result, they may not fully leverage their capacity for fast real-time decisions while still benefiting from systematic long-term optimization. There is a lack of frameworks that strategically allocate fast control actions to a data-driven layer and reserve slower, more computationally intensive optimization for long-term scheduling in order to balance responsiveness and optimality. These limitations highlight a clear research gap: the need for control frameworks that explicitly separate fast and slow HESS dynamics, reduce the effective dimensionality of the optimization problem and retain both real-time responsiveness and near-optimal energy management.
Table 1.
Comparative analysis of existing HESS control strategies in DC microgrids.
1.3. Novelty
The central contribution of the work is to utilize the combination of data-driven and metaheuristic methods for the design of a hybrid energy management framework. Unlike the classical optimization techniques that jointly combine the BESS and SC in a single framework, making it a computationally intensive metaheuristic algorithm, the proposed framework adopts a selective and hierarchical control philosophy. SC power allocation is optimized by the data-driven technique, ensuring the effective suppression of power transients. In contrast, the BESS uses PSO-based optimization to address long-term compensation. This decoupling allows for effective SC compensation, as it uses advanced and nonlinear data-driven techniques. Also, the complexity of the control reduces as the lightweight PSO algorithm is used for BESS optimization. This significantly reduces the dimensionality of the optimization problem and the computational burden. This design is well suited for real-time implementation in dynamically varying load conditions and renewable dominated DC MGs.
1.4. Key Contributions
- Design and development of a hierarchical control-based ringmain DC microgrid system.
- Development of hybrid data-driven PSO-based control for enabling rapid SC control and optimized long-term battery energy management.
- Validation of the proposed model through real-time case studies showing improved transient response and better voltage regulation.
- Real-time implementation of the proposed scheme with a PV emulator, battery and SC combination.
1.5. Organization
Organization of the paper is as follows: Section 2 details the methodology, which discusses the system description, hybrid PSO-neural EMS architecture and NN training procedure. Results for the proposed framework are implemented in Section 3, which analyses the simulation and real-time implementation. The article concludes with Section 4, the conclusion, which summarizes the contributions of the work and discusses the future scope.
2. Methodology
2.1. System Description
The work considers the 4-bus ringmain distributed DC microgrid system designed with hierarchical control methodology. The term ringmain DC microgrid refers to a closed-loop bus topology in which all nodes are interconnected in a circular configuration, forming multiple power flow paths between sources and loads. Unlike radial microgrids that have a single-directional power flow, the ringmain configuration allows for bidirectional power exchange among nodes. This topology enhances reliability, improves voltage support at remote nodes and enables power redistribution during source intermittency or load disturbances. In the proposed 4-bus ringmain structure, each node is connected to two adjacent nodes through R–L transmission lines, allowing for flexible power transfer and improved resilience. The detailed architecture of the microgrid is presented in Figure 1. Four nodes are considered in the design, where node 1 and node 2 have the combination of PV and battery storage systems. However, node 3 and node 4 have a hybrid energy storage system (HESS) comprising a battery and supercapacitor. Therefore, the combination of Distributed Energy Resources (DERs) and the HESS will emulate the practical microgrid conditions. and are the PV arrays considered at node 1 and node 2, respectively. and are the local battery storage near node 1 and node 2, respectively. These DERs and batteries are connected to the DC bus with the power electronic converter. The DC-DC converter (MPPT) for PV is denoted with and ; the charging and discharging of the battery is carried out with a bidirectional DC-DC converter indicated with and . The SC and battery storage in node 3 and node 4 are represented as , , and , respectively. Similarly, the converters used here are labeled as and for the SC and and for the battery storage. , , and are the loads connected at each node. The transmission line impedance for each bus connection is represented with an R-L combination. The impedance parameters between nodes 1-2, 2-3, 3-4 and 4-1 are indicated as , , and , respectively. There are 2 levels of communication (local communication and central communication) above the power circuit, as indicated in Figure 1. In the hierarchical control strategy, the local controller (LC) is responsible for controlling the individual nodes, whereas the central controller is tasked with the EMS and optimization responsibilities. , , and will control the PEC of nodes 1, 2, 3 and 4, respectively. The central controller receives the information from the LCs and optimizes the operation of the battery and SC in the system.
Figure 1.
4-bus ringmain DC MG architecture.
2.2. Hybrid PSO–Neural EMS Architecture
In the design of the hybrid EMS strategy, the objectives that are considered are as follows: (1) maintaining the voltage regulation at each bus, (2) satisfying the instantaneous power balance between the DER, HESS and loads, (3) reducing the battery stress by optimizing its operation and (4) optimal utilization of the supercapacitor for high-frequency compensation.
Power balance constraint of the DC microgrid is expressed as (1). indicates the overall power generated from PV sources, . () is the instantaneous battery contribution. Similarly, () is the instantaneous supercapacitor contribution.
At each control instant, the hybrid EMS receives the input u(t) as shown in (2). The input vector contains the consolidated information of different powers and the SoCs of the battery and SC. These also represent the electrical operating state of the DC bus and the energy availability of the storage systems. The Hybrid EMS outputs the reference current commands for the battery and supercapacitor and the state of operation for the HESS as shown in (3) and (4).
Here, the dimensionality of the output vectors, and , depends on the number of storage elements involved. As there are 4 batteries and 2 supercapacitors in the system, the dimensions of and will be and , respectively.
In traditional PSO-based EMS formulations, both battery and supercapacitor power references are optimized simultaneously. This increases the dimensionality of the search space, resulting in slower convergence, higher computational burden and reduced real-time feasibility. To overcome these limitations, the proposed EMS adopts a hybrid PSO-Neural (PSO-NN) structure. Here, battery power references are optimized using PSO, and SC power references are predicted using a neural mapping. This decoupling exploits the natural roles of the storage devices: the battery handles low-frequency energy balancing, while the SC compensates for fast power transients. The proposed hierarchical EMS operates across multiple timescales to explicitly decouple fast and slow storage dynamics. The time constant of supercapacitor dynamics () is typically in the order of milliseconds, whereas battery electrochemical dynamics evolve over seconds. Therefore, updating battery dispatch at millisecond resolution is unnecessary and computationally inefficient. The neural network responsible for supercapacitor reference generation is executed at a faster supervisory interval (e.g., 5–10 ms), enabling rapid response to voltage deviations and transient disturbances. In contrast, the PSO-based battery optimization operates at a slower interval (e.g., 200–500 ms), reflecting the inherently slower electrochemical dynamics of battery systems and long-term energy balancing requirements. This temporal separation ensures that transient compensation and energy scheduling are handled independently while maintaining overall system stability.
2.3. Design of PSO-NN EMS
Particles in the PSO are defined with the battery power dispatch variables as shown in (5), where and is the total number of particles. The velocity update equation and the particle position update equation are given in (6) and (7).
Here, , and represent inertia weights and cognitive and social acceleration coefficients, respectively. , are considered as uniformly distributed random numbers. and are personal and global best solutions. Operational constraints are enforced for the battery power and SoC to ensure the bounded optimization of PSO as shown in (8) and (9).
Supercapacitor optimization is performed through the NN. SC reference is predicted using a neural mapping as given in (10).
Although the instantaneous power imbalance can be expressed in (11), direct algebraic compensation does not account for nonlinear system dynamics, state-of-charge constraints or multi-bus power interactions. Therefore, instead of applying a simple high-pass filter or algebraic rule, a neural network is trained to approximate the optimal supercapacitor dispatch obtained from joint PSO optimization. The NN implicitly captures nonlinear relationships between bus voltage deviations, storage states and dynamic operating conditions, enabling adaptive transient compensation while respecting operational constraints. It is important to note that the NN does not aim to outperform the PSO in terms of solution optimality. Instead, it acts as a function approximator of the optimal supercapacitor dispatch policy derived from the full PSO-based joint optimization. By learning the mapping between system-state variables and the optimal SC reference, the NN eliminates the need for iterative optimization during real-time operation. Consequently, transient compensation is achieved through a single forward inference step, significantly reducing computational delay while preserving near-optimal behavior.
This enables instantaneous transient compensation without increasing PSO computational complexity. The fitness function is calculated as given in (12) and the variance of the SoC is calculated as shown in (13). The fitness function weights were selected as = 0.4, = 0.3, = 0.2 and = 0.1. These weights were selected following normalization of individual cost components to comparable magnitudes and prioritizing system stability. Voltage deviation is assigned the highest weight due to its direct impact on bus stability. Power mismatch follows, ensuring real-time balance. To evaluate robustness, a sensitivity study was conducted by varying each weight by ±20% while keeping others proportionally adjusted. It is observed that voltage regulation remained between ±20% and settling time varied around ±8%. SoC variance is assigned moderate weight to maintain storage longevity, while the SC magnitude penalty ensures transient use without dominating the objective
From PSO and NN optimization, the reference currents are calculated and sent to the local controllers as shown in (13), where n indicates the storage elements in nodes.
2.4. Neural Networking Training
The NN used for the SC optimization is trained offline. Previous work in [23] performed PSO-based optimization in MATLAB/Simulink and the dataset was collected. The collected dataset consists of 50,000 samples with 12 input features. Here, there are 4-bus voltages , 2 PV powers , 4 load powers and 2 SC SoCs . The output of the NN is the reference power for supercapacitors . The neural network was trained offline using MATLAB 2023b Deep Learning Designer with a feedforward backpropagation architecture. The dataset was divided into training, validation and testing sets (70%–15%–15%). Hyperparameter tuning was performed to determine the optimal network structure (12–64–32–2). The final model was selected based on minimum validation error and stable convergence characteristics. The detailed parameter selection is tabulated in Table 2. Table 3 gives the information about the obtained metrics for training, testing and validation. The low MAE and RMSE values indicate that the neural network accurately approximates the optimal SC dispatch derived from PSO. The close alignment between training and testing metrics confirms strong generalization performance. The achieved values greater than 0.98 demonstrate that the NN captures the nonlinear mapping between system states and optimal SC reference with high fidelity.
Table 2.
NN parameter selection.
Table 3.
NN performance metrics.
3. Results
The proposed methodology is implemented in MATLAB Simulink and the practical feasibility is validated with real-time hardware implementation. The simulation includes the same architecture as represented in Figure 1. Various real-time scenarios such as intermittent power generation and the dynamic load conditions are implemented to emulate the practical conditions. Simulation parameters chosen for the design are given in Table 4. The total PV power generation and power demand is represented in Figure 2a and Figure 2b, respectively. In Figure 2a an immediate dip in the PV power generation is observed from 0.5 s to 3.5 s; this dip also encounters a situation where generation is less than the demand. A sudden rise in load (approximately 25%) is observed from 3 s to 4 s as observed in Figure 2b. It becomes the responsibility of the controller and EMS to maintain the stability and voltage regulation by optimizing the power consumption of storage systems.
Table 4.
Parameter selection for 4-bus ringmain DC MG system.
Figure 2.
Power profile of PV generation and load demand (a) Power generated by PV sources (b) Power demand.
By employing the dynamic loading conditions at each node, the resiliency of the control algorithm is examined. Figure 3 shows the dynamic loading at each node.
Figure 3.
Loading pattern at respective nodes of DC MG.
Depending on the voltage instabilities and loading patterns, power flow will take place between the different nodes. During the dynamic loading conditions, there is a sudden rise in demand, which will effect the node 3 and node 4 voltages, especially as there is no dedicated generation near those nodes. In this scenario, the SC at nodes 3 and 4 will step in to satisfy the load immediately and maintain the voltage regulation; the natural tendency of the battery to respond or compensate slowly will eventually compensate by reducing the discharge of the SC. Figure 4 shows the discharge of the SC at nodes 3 and 4; it can be observed that the SC will contribute during both intermittency (1 s to 2 s) and during dynamic loading (3 s to 4 s). Also, a reduction in the SC contribution is observed over the time; this is due to the increase in battery contribution. Therefore, depending upon the load change, source variations and battery response time, the SC compensation is optimized successfully using the PSO + NN methodology.
Figure 4.
SC compensation pattern during grid disturbances.
As seen in the practical DC microgrids, proximity of the loads varies towards the generation. Similarly, the designed DC MG also implements this method with node 1 and node 2 having generation and relatively less loading, whereas nodes 3 and 4 have zero generation and are completely dependent on neighboring node compensation and compensation from the HESS nearby. Figure 5 shows the node-wise analysis of the power from sources, loads and storage systems. The load power profile is maintained similarly at all the nodes for ease of analysis. From Figure 5 and Figure 6 it can be observed that node 1 and node 2 powers ( and ) are very high during the time period 0 s to 1 s. During this period it can be observed from Figure 7 and Figure 8 that node 3 and node 4 powers ( and ) are almost zero, contributing nothing. In this scenario, as there is excessive power available at the neighboring nodes, the EMS will transfer the power from nodes 1 and 2 to nodes 3 and 4 and maintain the voltage regulation at nodes 3 and 4. When there is a considerable reduction in the PV generation, the neighboring node dependency will be reduced at nodes 3 and 4. The HESS near nodes 3 and 4 starts contributing as observed from 1 s in Figure 7 and Figure 8. Figure 9 and Figure 10 represent the power profile analysis between nodes 1 and 2 and nodes 3 and 4, respectively. The performance evaluation of the DC MG control and EMS optimization is observed from the effective voltage regulation and load sharing during disturbance conditions. Figure 11 shows the cumulative representation of the bus currents and bus voltages at all the nodes. It can be observed from Figure 6 that the voltage is regulated around 48 V without any deviations during source and load variations. The oscillations in the bus currents indicate the dynamic switching of the HESS performed to optimize the power consumption. Further, Figure 12 visualizes the comparison of the bus voltages; it can be observed that the bus voltages at nodes 1 and 2 are slightly above the reference voltage of 48 V, while the bus voltages of nodes 3 and 4 are around 47 V. This potential difference across the buses facilitates the power transfer between generating nodes and storage nodes. It can be observed that buses 3 and 4 stabilize around 47 V, while buses 1 and 2 remain close to the nominal 48 V. This corresponds to a steady-state deviation of approximately 2.08%, which lies well within the ±5% tolerance typically accepted in low-voltage DC microgrid standards. The small voltage gradient between generation-dominant nodes and storage-dominant nodes is intentional and facilitates controlled power transfer across the ring network. Therefore, the observed steady-state difference does not represent a regulation error but a permissible voltage distribution supporting power flow.
Figure 5.
Analysis of node power and load power at bus 1.
Figure 6.
Analysis of node power and load power at bus 2.
Figure 7.
Analysis of node power and load power at bus 3.
Figure 8.
Analysis of node power and load power at bus 4.
Figure 9.
Analysis of node powers for node 1 and node 2.
Figure 10.
Analysis of node power for node 3 and node 4.
Figure 11.
Representation of bus voltages and bus currents.
Figure 12.
Voltage profile of bus voltages.
3.1. Comparative Performance Analysis
To validate the performance improvement of the proposed hierarchical PSO–NN framework, a comparison is performed against the PSO-only EMS presented in our previous work [23]. In the PSO-only approach, battery and supercapacitor power references were jointly optimized using a unified PSO search space of six decision variables. In contrast, the proposed method decouples the optimization problem, reducing the PSO decision dimension and assigning supercapacitor dispatch to a trained neural network for fast inference.
As shown in Table 5, the proposed PSO–NN method achieves improved voltage regulation, reduced settling time and a lower battery peak current during transient events. The reduced battery peak current indicates lower electrochemical stress, which contributes to improved battery lifetime. Furthermore, the computational burden is significantly reduced due to elimination of iterative SC optimization.
Table 5.
Performance comparison between PSO-only EMS and proposed PSO–NN EMS.
To quantitatively evaluate battery stress reduction, RMS current, peak current, current ripple and equivalent full cycles were computed for both the PSO-only EMS and the proposed PSO–NN framework. The proposed method reduces the peak battery current from 20 A to 16 A (20% reduction) and the RMS current from 12.5 A to 9.8 A (21.6% reduction). The current ripple is reduced by 37.5%, indicating improved transient smoothing. Additionally, the equivalent full cycle index over the test duration decreased by approximately 21%, suggesting reduced cumulative electrochemical stress.
These results confirm that the supercapacitor absorbs high-frequency power fluctuations more effectively in the proposed hierarchical structure.
3.2. Hardware Implementation
The designed hybrid EMS is validated in a real-time experimental setup at the laboratory level. Although the proposed hierarchical EMS is developed and validated in simulation using a 4-bus ringmain DC microgrid architecture (Figure 1), the real-time experimental validation was conducted using a reduced 3-bus configuration due to laboratory hardware constraints. The reduced configuration preserves the essential operational characteristics required to validate the hybrid PSO–NN energy management strategy, including distributed generation nodes and localized HESS support. In the experimental setup, three PV emulators are connected to three buses, and the hybrid energy storage system (battery + supercapacitor) is placed near the load node to emulate transient support and voltage stabilization. In this setup, the reference voltage is set as 36 V. Figure 13 shows the hardware setup which consists of the PV emulators, battery and SC. The details of the setup are given in Table 6. The central EMS controller, including both the PSO-based battery optimization and the neural network–based supercapacitor dispatch, was implemented using LabVIEW on a standard industrial PC. Communication with PV emulators and DC–DC converters was established via the MODBUS protocol. The neural network, trained offline in MATLAB, was deployed within LabVIEW for real-time inference. Since the NN performs only a forward-pass computation, the execution time per sampling instant is minimal and suitable for real-time implementation. The PSO algorithm operates at a slower supervisory timescale, ensuring that computational requirements remain within the processing capability of the controller platform. Loading is provided using electronic load and the results are visualized in the mixed signal oscilloscope.
Figure 13.
Real-time experimental testbed of 3 kW ringmain DC MG system.
Table 6.
Ratings of real-time experimental setup.
During the light loading conditions, the voltage regulation is achieved with all the buses regulated at the ref voltage of 36 V as shown in Figure 14. Figure 14a, Figure 14b and Figure 14c denote the bus 1, 2 and 3 voltages, respectively.
Figure 14.
Voltage regulation of DC MG (a) Bus 1 voltage (b) Bus 2 voltage (c) Bus 3 voltage.
As the primary objective is to utilize the SC under the transient conditions and heavy loading conditions, voltage drop at the bus is considered as the parameter for the SC operation. If the bus voltage varies between ±0.5 V, the SC is operated. Figure 15 denotes the dynamic loading conditions, where the load on the DC MG is varied from 0 A to 5 A and finally to 8 A. It can be observed that the SC will not operate in light and moderate load conditions; when the load increases to 8 A, the SC starts discharging. During loading of 5 A, DERs contribute 3 A and the battery contributes 2 A. When the load increases from 5 A to 8 A, contribution from the DERs increases to 5.8 A and the battery contributes around 1.8 A; here, the SC starts contributing 400 mA.
Figure 15.
Dynamic loading on DC MG (a) Grid current (b) Supercapacitor current (c) Battery current.
SC operation is also verified during the transient conditions; from Figure 15, it can be observed that around 12 s when the load increases from 0 A to 5 A, there will be a slight voltage drop at the DC bus which initiates the supercapacitor operation for an instance. The zoomed version of that instance can be observed in Figure 16.
Figure 16.
Supercapacitor operation during transient condition (a) Grid current (b) Supercapacitor current (c) Battery current.
A practical scenario of partial shading is implemented where the capacity of one of the PV emulator is restricted. Here, the CC limit of 1 A is placed on the emulator. Here, the current contributions of each emulator are observed as 2 A, 2 A and 1 A, respectively. During the loading of 5 A, 3 A, 0 A and 2 A are the contributions of the DERs, battery and SC, respectively, as shown in Figure 17. When the loading increases to 8 A, the DER contribution increases to 5 A and the SC contributes 1 A and the battery remains at 2 A.
Figure 17.
Bus currents during intermittent PV generation (a) Grid current (b) SC current (c) Battery current.
Figure 18 demonstrates the overall bus voltages and bus currents. Figure 18a–c are the bus voltages and Figure 18d–f are bus currents. It can be observed that, even during the load change scenarios, bus voltages are constant.
Figure 18.
Bus voltage and bus currents during dynamic loading conditions (a) Bus 1 voltage (b) Bus 2 voltage (c) Bus 3 voltage (d) Grid current (e) SC current (f) Battery current.
3.3. Real-Time Execution and Computational Analysis
To validate the real-time feasibility of the proposed hierarchical PSO–NN framework, execution timing and computational characteristics were evaluated on the controller platform. The EMS supervisory layer operates at a sampling interval of 10 ms. The neural network responsible for supercapacitor dispatch executes a single forward-pass inference within approximately 1–3 ms per sampling cycle, ensuring deterministic real-time operation.
The PSO-based battery optimization operates at a slower interval of 250 ms, reflecting the slower electrochemical time constant of battery systems. The PSO configuration uses 20 particles with 12 iterations per execution cycle. The measured computation time for each PSO update is approximately 60 ms on the controller hardware. Since the PSO algorithm runs intermittently rather than continuously at every sampling instant, the overall computational burden remains within the processing capability of the controller platform. This timescale separation ensures that fast transient dynamics are handled by the NN layer, while slower energy balancing is managed by the PSO layer without violating real-time constraints.
4. Conclusions
The proposed methodology designs a hybrid data-driven framework for HESS optimization. The proposed scheme is resilient and robust during renewable intermittency and the highly dynamic loading conditions. By explicitly calculating the dynamic characteristics of the battery and SCs, an effective power balance with reduced stress on the storage elements is achieved.
An efficient decoupling of the fast and slow dynamics of storage elements allows for effective handling of high-frequency fluctuations by SCs. Building on this, a hybrid EMS combining data-driven decision-making with PSO was introduced. In the proposed framework, the SC is operated by a trained data-driven model, enabling rapid transient response, whereas battery power allocation is optimized using PSO to ensure optimal energy usage and SoC regulation over longer time horizons. The proposed methodology is validated through both simulation and real-time case studies under variable source and load conditions. The performance of the SC is examined under heavy loading and transient conditions. The results demonstrated improved transient response, enhanced DC bus voltage stability and a noticeable reduction in battery stress compared to conventional HESS control strategies, confirming the robustness and practicality of the proposed approach.
Author Contributions
Conceptualization, S.B. and D.V.A.K.; methodology, S.B. and D.V.A.K.; software, S.B.; validation, S.B. and D.V.A.K.; formal analysis, S.B. and D.V.A.K.; resources, S.B.; writing—original draft preparation, S.B.; writing—review and editing, D.V.A.K.; visualization, D.V.A.K.; supervision, D.V.A.K. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Data Availability Statement
Dataset available on request from the authors.
Conflicts of Interest
The authors declare no conflicts of interest.
Abbreviations
The following abbreviations are used in this manuscript:
| DCMG | DC Microgrid |
| EMS | Energy Management System |
| PSO | Particle Swarm Optimization |
| NN | Neural Network |
| SC | Supercapacitor |
| BESS | Battery Energy Storage System |
| HESS | Hybrid Energy Storage System |
| SoC | State of Charge |
| MPC | Model Predictive Control |
| DER | Distributed Energy Resources |
| PEC | Power Electronic Converters |
| CC | Constant Current |
References
- Khushoo, M.; Sharma, A.; Kaur, G. DC microgrid-A short review on control strategies. Mater. Today Proc. 2022, 71, 362–369. [Google Scholar] [CrossRef]
- Shabbir, G.; Hasan, A.; Yaqoob Javed, M.; Shahid, K.; Mussenbrock, T. Review of DC Microgrid Design, Optimization, and Control for the Resilient and Efficient Renewable Energy Integration. Energies 2025, 18, 6364. [Google Scholar] [CrossRef]
- Dhar, R.K.; Merabet, A.; Al-Durra, A.; Ghias, A.M. Power balance modes and dynamic grid power flow in solar PV and battery storage experimental DC-link microgrid. IEEE Access 2020, 8, 219847–219858. [Google Scholar] [CrossRef]
- Vivas, F.; Segura, F.; Andújar, J.; Calderón, A.; Isorna, F. Battery-based storage systems in high voltage-DC bus microgrids. A real-time charging algorithm to improve the microgrid performance. J. Energy Storage 2022, 48, 103935. [Google Scholar] [CrossRef]
- Khan, K.A.; Khalid, M. Improving the transient response of hybrid energy storage system for voltage stability in DC microgrids using an autonomous control strategy. IEEE Access 2021, 9, 10460–10472. [Google Scholar] [CrossRef]
- Aghmadi, A.; Ali, O.; Mohammed, O.A. Stability Enhancement of DC Microgrid Operation Involving Hybrid Energy Storage and Pulsed Loads. IEEE Trans. Consum. Electron. 2025, 71, 3204–3217. [Google Scholar] [CrossRef]
- Adhikari, S.; Lei, Z.; Peng, W.; Tang, Y. A battery/supercapacitor hybrid energy storage system for DC microgrids. In Proceedings of the 2016 IEEE 8th International Power Electronics and Motion Control Conference (IPEMC-ECCE Asia), Hefei, China, 22–26 May 2016; pp. 1747–1753. [Google Scholar]
- Grisales-Noreña, L.F.; Montoya, O.D.; Ramos-Paja, C.A. An energy management system for optimal operation of BSS in DC distributed generation environments based on a parallel PSO algorithm. J. Energy Storage 2020, 29, 101488. [Google Scholar] [CrossRef]
- Wu, T.; Ye, F.; Su, Y.; Wang, Y.; Riffat, S. Coordinated control strategy of DC microgrid with hybrid energy storage system to smooth power output fluctuation. Int. J. Low-Carbon Technol. 2020, 15, 46–54. [Google Scholar] [CrossRef]
- Ferahtia, S.; Djerioui, A.; Rezk, H.; Chouder, A.; Houari, A.; Machmoum, M. Adaptive droop based control strategy for DC microgrid including multiple batteries energy storage systems. J. Energy Storage 2022, 48, 103983. [Google Scholar] [CrossRef]
- Zhang, W.; Chen, J.; Riaz, S.; Zheng, N.; Li, L. Research on Distributed Cooperative Control Strategy of Microgrid Hybrid Energy Storage Based on Adaptive Event Triggering. CMES-Comput. Model. Eng. Sci. 2022, 132, 585–604. [Google Scholar] [CrossRef]
- Gbadega, P.A.; Sun, Y. A hybrid constrained Particle Swarm Optimization-Model Predictive Control (CPSO-MPC) algorithm for storage energy management optimization problem in micro-grid. Energy Rep. 2022, 8, 692–708. [Google Scholar] [CrossRef]
- Vedulla, L.K.; Mishra, M.K. PSO based power sharing scheme for an islanded DC microgrid system. In Proceedings of the IECON 2017-43rd Annual Conference of the IEEE Industrial Electronics Society, Beijing, China, 29 October–1 November 2017; pp. 392–397. [Google Scholar]
- Tianqi, L.; Guochen, Y.; Jing, G.; Fang, L.; Xueyan, P. Research on control strategy of storage and DC hybrid energy storage based on new energy microgrid. In Proceedings of the 2022 IEEE 2nd International Conference on Data Science and Computer Application (ICDSCA), Dalian, China, 28–30 October 2022; pp. 328–333. [Google Scholar]
- Hu, Q.; Xie, S.; Zhang, J. Data-based power management control for battery supercapacitor hybrid energy storage system in solar DC-microgrid. Sci. Rep. 2024, 14, 26164. [Google Scholar] [CrossRef] [PubMed]
- Ali, N.; Shen, X.; Armghan, H. A hybrid approach involving data driven forecasting and super twisting control action for low-carbon microgrids. Appl. Energy 2025, 398, 126429. [Google Scholar] [CrossRef]
- Anu, A.; Arunkumar, C.; Hari Kumar, R.; Annie, B.; Shihabudheen, K.; Dileep, G.; Kumar, D.S.; Ushakumari, S. Adaptive particle swarm optimization based controller design for stability enhancement of standalone DC microgrid. J. Energy Storage 2024, 98, 113012. [Google Scholar] [CrossRef]
- Liang, Z.; Chung, C.Y.; Zhang, W.; Wang, Q.; Lin, W.; Wang, C. Enabling high-efficiency economic dispatch of hybrid AC/DC networked microgrids: Steady-state convex bi-directional converter models. IEEE Trans. Smart Grid 2024, 16, 45–61. [Google Scholar] [CrossRef]
- Iris, Ç.; Lam, J.S.L. Optimal energy management and operations planning in seaports with smart grid while harnessing renewable energy under uncertainty. Omega 2021, 103, 102445. [Google Scholar] [CrossRef]
- Lukic, S.M.; Cao, J.; Bansal, R.C.; Rodriguez, F.; Emadi, A. Energy storage systems for automotive applications. IEEE Trans. Ind. Electron. 2008, 55, 2258–2267. [Google Scholar] [CrossRef]
- Bahloul, M.; Khadem, S.K. Impact of power sharing method on battery life extension in HESS for grid ancillary services. IEEE Trans. Energy Convers. 2018, 34, 1317–1327. [Google Scholar] [CrossRef]
- Khaligh, A.; Li, Z. Battery, ultracapacitor, fuel cell, and hybrid energy storage systems for electric, hybrid electric, fuel cell, and plug-in hybrid electric vehicles: State of the art. IEEE Trans. Veh. Technol. 2010, 59, 2806–2814. [Google Scholar] [CrossRef]
- Banka, S.; Kumar, D.V.A. Energy Optimization of HESS Integrated DCMG: PSO Based Approach. In Proceedings of the 2025 Third International Conference on Cyber Physical Systems, Power Electronics and Electric Vehicles (ICPEEV), Hyderabad, India, 25–27 September 2025; pp. 1–6. [Google Scholar] [CrossRef]
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. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.

















