This article presents a DC microgrid with hierarchical control implemented in a simulator, OPAL RT-Lab. It details the circuit modeling, primary and secondary control strategies, and experimental validation. The results demonstrate effective control performance, highlighting the importance of a robust experimental platform for microgrid research and development.
The rise of renewable energy sources has underscored the significance of microgrids, particularly DC variants, which are well-suited for integrating photovoltaic panels, battery storage systems, and other DC load solutions. This paper presents the development and experimentation of a DC microgrid with hierarchical control implemented in OPAL RT-Lab, a simulator. The microgrid includes distributed energy resources (DERs) interconnected via power converters, a DC bus, and DC loads. The primary control employs a droop control mechanism and double-loop Proportional-Integral (PI) control to regulate voltage and current, ensuring stable operation and proportional power sharing. The secondary control utilizes a consensus-based strategy to coordinate DERs to restore the bus voltage and ensure accurate power sharing, enhancing system reliability and efficiency. The experimental setup detailed in this paper includes circuit modeling, hardware implementation, and control strategies. The hardware platform's circuitry and controller parameters are specified, and the results can be observed through oscilloscope measurements. Two sets of experiments demonstrating the secondary control response with and without delay are conducted to validate the effectiveness of the control strategy. The outcomes confirm the successful implementation of hierarchical control in the microgrid. This study underscores the significance of a comprehensive experimental platform for advancing microgrid technology, providing valuable insights for future research and development.
With the rapid development of renewable energy sources, microgrids have gained significant attention globally1. They enable the integration of distributed energy resources (DERs), such as solar photovoltaics (PV), along with energy storage systems (ESSs), into the grid, thereby supporting the transition to sustainable and renewable energy. As a critical component in the integration of renewable energy, DC microgrids have garnered considerable attention due to their compatibility with the inherent DC nature of PV systems, batteries, and other DERs. The DC operation reduces the need for multiple energy conversions, which can improve overall system efficiency and reliability. Consequently, DC microgrids present a promising avenue for optimizing renewable energy integration2.
It is widely recognized that simulation and experimental studies are crucial for advancing microgrid technology. Simulations allow researchers or engineers to model and analyze various scenarios and control strategies in a virtual environment, which is cost-effective and risk-free. However, real-world experimentation is equally important as it validates these models and theories, revealing practical challenges and dynamic behaviors that simulations might not fully capture3. Despite the insights gained from simulations, practical experiments on microgrids are necessary to address issues that arise from physical implementations. These experiments help in understanding the operational characteristics, control dynamics, and interactions between different components in a real-world setting4. Given their smaller scale and modular nature, microgrids offer a more manageable and scalable solution for conducting these vital experimental studies compared to traditional large-scale power grids, which are too extensive and complex for practical experimentation. Therefore, conducting physical experiments on microgrids is essential for advancing our understanding and capabilities in this field.
In a typical DC microgrid, various DERs are connected to a DC bus through power converters. This setup facilitates the direct exchange of power without the need for multiple DC-DC or AC-DC conversions5. These power converters regulate the voltage and current, ensuring efficient power transfer and stability. The DC bus serves as the central node, distributing power to various loads connected to the system. The transmission lines provide the necessary pathways for power flow between the DERs, converters, and loads, maintaining a stable and reliable power supply within the microgrid. To effectively manage the operation of a DC microgrid, a hierarchical control structure is often employed6. This structure is generally divided into three levels: primary, secondary, and tertiary control, each with distinct functions and responsibilities.
Primary control focuses on the immediate regulation of voltage and current within the DC microgrid, ensuring stability and proper current/power sharing among DERs. The most common primary control is the droop control. Compared to other primary controls, it is communication-free and has a fast response. However, due to its droop characteristic, droop control may cause voltage deviation and is unable to maintain the voltage at the nominal value. At the same time, as the load and the number of DERs increase, the accuracy of current sharing decreases. Therefore, additional secondary control is needed for voltage restoration and current regulation. Secondary control restores system operating points after disturbances and coordinates primary controllers for voltage and current regulation. Tertiary control optimizes the economic and strategic operation of the microgrid, managing energy scheduling and interactions with the main power grid7.
Recent literature highlights significant advancements in the application of hierarchical control for DC microgrids, progressing from simulation studies to hardware-in-the-loop (HIL) setups, and ultimately to real-world physical experiments. Initial research studies often employed simulation tools to develop and test hierarchical control algorithms for DC microgrids. These studies focus on modeling the dynamic behavior of microgrids, optimizing control strategies, and evaluating system performance under various conditions. Simulation environments such as MATLAB/Simulink and PSCAD are commonly used due to their flexibility and comprehensive toolsets for power system analysis8. Moving beyond pure simulations, HIL experiments provide a more realistic testing environment by integrating real-time control hardware with simulated microgrid models. This approach allows researchers to validate control algorithms and assess their performance under near-real conditions. HIL setups bridge the gap between theoretical studies and practical implementations, offering valuable insights into the interaction between control systems and microgrid components9. The ultimate validation of hierarchical control strategies is achieved through physical experiments on actual microgrid setups. These experiments involve deploying control algorithms on real microgrid hardware, including DERs, power electronic converters, and control units. Physical experiments provide the most accurate assessment of system performance, revealing practical challenges and operational issues that may not be apparent in simulations or HIL setups.
To summarize the progression of hierarchical control research in DC microgrids, Table 1 presents an overview of key studies categorized by their experimental approach. From the aforementioned literature, it is evident that while some studies have successfully utilized physical microgrid platforms for experimentation, there is a notable lack of systematic documentation and comprehensive descriptions of these experimental platforms and their usage, particularly in the context of hierarchical control. This gap is significant because detailed information on experimental setups, methodologies, and results is crucial for replicating studies, advancing research, and facilitating the practical implementation of hierarchical control strategies in microgrid technologies. In light of this need, this paper aims to provide a detailed and systematic introduction to the development and utilization of a physical experimental platform for DC microgrids, focusing on hierarchical control, to contribute valuable insights and practical guidelines to the ongoing research in this field.
In summary, the main contributions of this paper are as follows. First, under the framework of hierarchical control strategy, the paper elaborates in detail the necessary control algorithms and implementations for microgrid control, while previous works have mostly treated experiments as validation without further elaboration. Second, in line with the deployment of control algorithms, this paper also provides the hardware setup and topology of the microgrid components, enhancing the reproducibility of microgrid control experiments. Third, by constructing a scalable experimental platform, this paper lays the foundation for future research on microgrids, allowing further exploration of control performance under real-world conditions such as communication delays and load variations, thereby supporting the development of more robust and efficient control strategies.
In this section, we outline the methods used for developing and experimenting with a DC microgrid that incorporates hierarchical control shown in Figure 1, implemented in OPAL RT-Lab (hereafter referred to as "simulator"). The protocol is divided into three main sections: Physical Setup and Circuit Modeling, Control Strategy Implementation, and Simulator Experimental Setup. It is noted that this protocol does not cover the tertiary control strategy, which involves higher-level optimization and interaction with the main power grid, is beyond the scope of our current experimental setup, and is left for future work.
1. Physical setup and circuit modeling
2. Control strategy implementation
3. Real-time simulator experimental setup
NOTE: The specific configuration of the simulator experiment comprises four steps, as illustrated in Figure 8.
Figure 4 shows the droop control module in the control module constructed within the simulator. The detailed design is based on the following droop mechanism:
The droop control mechanism is a fundamental strategy for decentralized primary control in DC microgrids. It emulates the behavior of synchronous generators in AC systems to share loads proportionally among different DERs. The droop control adjusts the output voltage of each DER based on its output current, following a predefined droop characteristic:
(3)
Where Viref represents the reference voltage for the ith DER; Vin represents the voltage setpoint given by the secondary control, which defaults to the nominal value Vnom; ki is the droop coefficient; and Ii is the ith DER's output current. From Equation (3), it can be seen that droop control adjusts the reference voltage of each DER according to different droop coefficients ki to achieve current sharing. From Equation (3), it is evident that droop control does not rely on information from other DERs and is an algebraic equation, which allows for a fast response. However, it inevitably causes the voltage to deviate from the nominal value Vin.
Figure 5 shows the control block diagram constructed by dragging and dropping components in the simulator. The specific inputs and outputs are given by the following equations.
The outer voltage control loop regulates the output voltage to follow the droop control reference voltage. It sets the reference current Iiref for the inner loop as follows.
(4)
Where kip,v and kii,vare the proportional and integral gains for the voltage loop, respectively.
The inner current control loop ensures that the current follows the reference value set by the outer voltage loop. The current control loop has a faster response time to quickly counteract disturbances. The specific control law is given as follows.
(5)
Where di[0,1] is the duty cycle for PWM generation, and kip,iand kii,i are the proportional and integral gains, respectively, for the current loop.
The secondary control block diagram was constructed in the simulator based on the consensus-based secondary control, as illustrated in Figure 6. The distributed secondary control strategy aims to achieve voltage regulation and power sharing among DERs in a decentralized manner. This is accomplished through a consensus algorithm, where agents iteratively adjust their voltage setpoints based on local measurements and information received from neighboring agents.
A typical consensus-based secondary control protocol is shown below, as well as in Figure 7B.
(6)
Where ci is the coupling gain for current sharing control; Iirated is the rated current for the ith DER. It has been proven that control law (6) can guarantee voltage restoration and accurate current sharing. Obviously, the secondary controller (4) is fully distributed, which means that its performance will not be affected by the scale of the microgrid and the number of DERs. This scalability provides a foundation for its application in larger-scale microgrids. Moreover, the hierarchical structure allows for flexible expansion, as the primary and secondary controls can adjust locally and globally, ensuring stable operation even with increased system complexity. Overall, the hierarchical control framework for DC microgrids is shown in Figure 7.
To verify the effectiveness of the hierarchical control on the designed microgrid hardware platform, experiments are conducted on the hardware setup shown in Figure 9. The hardware circuitry and controller parameters used in the experiments are detailed in Table 2. The experimental results were observed using an oscilloscope.
Three sets of experiments were performed: one with a secondary control response without communication delay (Figure 10), one with delay (Figure 11), and one under load variation conditions (Figure 12). Here, we chose the transport delay module in the simulator to introduce a fixed delay, which is a simplification of the delay in real-world power communication networks. A discussion of the control performance is provided in the discussion section.
Figure 1: Electrical and control structure of a typical DC microgrid. Description: The tertiary control provides the nominal voltage Vnom to each DER, while at the secondary control level, the DERs collaborate with each other through a distributed communication network, thereby providing a voltage set point for the droop-based primary control. In the control of the lower-level converters, the power sources, typically distributed generation or ESS, are connected to the grid via converters, which regulate the output through a double-loop PI control. Abbreviations: DER = distributed energy resource; ESS = energy storage system; PWM = pulse width modulation. Please click here to view a larger version of this figure.
Figure 2: Hardware in the DC microgrid experiment. (A) DC-DC buck converter. (B) DC power supply. (C) Plug-in connectors. (D) Connection lines and a load. Please click here to view a larger version of this figure.
Figure 3: A typical buck converter structure. Symbols: Vin = input voltage; d = duty cycle; IL = inductor current; VC = output voltage; L = the inductor; C = the capacitor; R = the load resistance. Please click here to view a larger version of this figure.
Figure 4: Simulator model for droop control. Please click here to view a larger version of this figure.
Figure 5: Simulink model for dual-loop PI control. Please click here to view a larger version of this figure.
Figure 6: Distributed secondary control model in the simulator. Please click here to view a larger version of this figure.
Figure 7: Hierarchical control framework for DC microgrids. (A) Primary control. (B) Secondary control. (C) Communication topology used in this paper. Please click here to view a larger version of this figure.
Figure 8: The specific configuration of the simulator. Please click here to view a larger version of this figure.
Figure 9: The DC microgrid experimental platform. Please click here to view a larger version of this figure.
Figure 10: Control performance of hierarchical control scheme in the DC microgrid. (A) Output voltages, (B) Output currents. Please click here to view a larger version of this figure.
Figure 11: Current responses under delays. (A) Delay τ = 30 ms, (B) Delay τ = 40 ms. Please click here to view a larger version of this figure.
Figure 12: Control performance under load variations. (A) Output voltages, (B) Output currents. Please click here to view a larger version of this figure.
Study (Year) | Experimental Approach | Key Contributions |
Lai et al. (2019)10 | Simulation | Stochastic control against communication delays |
Li et al. (2022)11 | Simulation | Event-triggered control method for economic operation |
Wang et al. (2018)12 | HIL | A uniform control scheme for converters in hybrid microgrids |
Zeng et al. (2022)13 | HIL | Hierarchical cooperative control for battery storage systems |
Li et al. (2020)14 | Physical experiment | Communication-free control for DC microgrids |
Dai et al. (2024)2 | Physical experiment | Networked predictive control for microgrids |
Table 1: Overview of hierarchical control research in microgrids.
Parameters (Symbols) | DER 1 | DER 2 | DER 3 | DER 4 |
DC source voltage (Viin) | 80 V | 80 V | 100 V | 100 V |
Converter inductor (Li) | 2 mH | |||
Converter capacitor (Ci) | 3.3 mF | 8.4 mF | 1.5 mF | 5.9 mF |
Global load | 4 Ω | |||
Droop coefficient (ki) | 0.33 | 1 | 0.33 | 1 |
Current allocation ratio | 3:1:3:1 | |||
Voltage loop PI gains (kip,v, kii,v) | 0.14+20/s | |||
Current loop PI gains (kip,i, kii,i) | 0.008+0.05/s | |||
Primary control frequency | 10 kHz | |||
Secondary control frequency | 100 Hz |
Table 2: Parameters of the test DC microgrid.
Figure 10 shows the current and voltage responses of the microgrid system under secondary control without communication delays. Before time t1, the system is regulated solely by droop-based primary control, where it is evident that the voltage cannot stabilize at the nominal value of 48 V, and the current distribution is relatively imprecise. Upon activating the secondary control at time t1, the voltage quickly recovers to around 48 V at t2, and the current achieves precise distribution in a 3:1:3:1 ratio. This demonstrates that the secondary control effectively meets its control objectives.
In practical complex power communication networks, secondary control, which relies on communication, often faces the challenge of network delays. Such delays can degrade system performance, leading to slower response times, reduced stability, and even potential power-sharing inaccuracies. To simulate this scenario, we introduce communication delays into the signals of the distributed control system to observe the system response. Figure 11 presents the current waveforms of the system under communication delays of 30 ms and 40 ms. It can be observed that, after activating the secondary control affected by the delays, the system exhibits significant oscillations. Such oscillatory behavior is unacceptable in real-world power grids, highlighting the importance of further research using this experimental platform to address the adverse effects of communication delays on secondary control.
In actual microgrids, load variations are very common and frequent. To fully verify the effectiveness of the proposed method on the constructed microgrid platform, we conducted a load variation experiment. As shown in Figure 12, we added a load Radd=16 Ω at time t1 and removed it at time t2. In Figure 12A, one can see that the voltage experiences a brief fluctuation when the load changes but quickly recovers to the nominal value. Meanwhile, in Figure 12B, the currents of the four DERs maintain accurate allocation during the load connection and disconnection.
From the experimental results, the key points of this protocol can be divided into hardware and software components. For the hardware part, it is crucial to ensure the correct wiring of all circuit elements, especially the positive and negative terminals. For the software part, the deployment of the control system should follow the hierarchical control strategy outlined in the protocol section.
Common faults in the system are typically no output or output exceeding limits. The standard approach is to ensure that the system hardware connections are correct (i.e., no short circuits or open circuits) and then check if the controller outputs behave abnormally. Additionally, due to the limitations of the simulator in this experiment, true distributed control could not be implemented, as control commands are issued centrally by the simulator rather than by separate controllers. This differs from real-world microgrid systems.
In conclusion, this paper presents the development and implementation of a hierarchical control strategy for a DC microgrid, demonstrating the effectiveness of both droop control for primary regulation and a consensus-based secondary control to achieve voltage restoration and precise power sharing among DERs. Through detailed circuit modeling, hardware implementation, and the integration of control strategies using the simulator, OPAL-RT Lab, the system's performance is validated under various scenarios, including experiments with communication delays and load variations. The results confirm that the proposed control system is capable of maintaining stable voltage and ensuring proportional power sharing even under dynamic conditions. Furthermore, the experimental platform's detailed description, including hardware setup and control parameters, enhances the replicability of the study and provides valuable insights for future research and practical deployment of microgrids. Future work will focus on exploring advanced control strategies and enhancing system robustness to better accommodate real-world contingencies.
The authors have no conflicts of interest to disclose.
This work was supported in part by the National Natural Science Foundation of China under Grant 62103308 and Grant 62073247, in part by the Fundamental Research Funds for the Central Universities under Grant 2042023kf0095, in part by the Natural Science Foundation of Hubei Province of China under Grant 2024AFB719 and JCZRQN202500524, in part by the Wuhan University Experiment Technology Project Funding under Grant WHU-2022-SYJS-10, and in part by the Postdoctoral Fellowship Program of CPSF under Grant Number GZC20241269.
Name | Company | Catalog Number | Comments |
Programmable DC power supply | ITECH | IT-M7700 | DC Power Supply |
Real-time simulator | OPAL RT-Lab | OP5707XG-16 | Real-time controller |
Oscilloscope | Tektronix | MSO58 5-BW-500 | Oscilloscope |
Electrical components such as cables and resistors |
Request permission to reuse the text or figures of this JoVE article
Request PermissionThis article has been published
Video Coming Soon
Copyright © 2025 MyJoVE Corporation. All rights reserved