# Power Sharing Control in a Grid-Tied DC Microgrid: Controller Hardware in the Loop Validation
###### Abstract  
This article presents the development of a low-cost control hardware in the loop platform for the validation and analysis of controllers used for the management of power sharing between the main grid and a DC microgrid. The platform is made up of two parts: a main grid interconnection system emulator (MGISE) and a controller under test (CUT). The MGISE operates on a 260 V DC bus and includes a 1000 W photovoltaic array, a DC variable load and a single H full bridge converter (HFBC). The CUT includes a phase locked loop and a main cascade control structure composed of two PI controllers. Both the MGISE and the CUT were embedded on an NI myRIO-1900 development board and programmed using LabVIEW virtual instrumentation software. These devices communicate with each other using analog signals representing the AC side current, the DC side voltage, and the HFBC control signal. The MGISE operates with an integration time of 6 \(\upmu\)s and its performance is validated by comparing it with a simulation in PSIM. The integration time of the MGISE, the development boards used, as well as its programming environment, and the results obtained from the comparison with PSIM simulation, show that the proposed platform is useful for the validation of controllers for power sharing, with a simple implementation process compared to other hardware description methods and with a low-cost platform. controller hardware in the loop; grid-tied microgrid; h full bridge converter; microgrid 2021  
1  
[PERSON], [PERSON], [PERSON], [PERSON], E.  
power supply through the MG is not feasible, while gt-uGs operate both in islands and interconnected with the main grid (MG) [3]. The interconnection between the DC uGs and the MG is achieved using power electronic converters (PECs), so correct operation of the DC uG depends largely on the adequate control of these converters [4]. Typically, the uG control is made through a hierarchical scheme, including three levels: for locally measured power exchange, for voltage or frequency regulation and for optimal and economical global uG operation [5]. This hierarchical structure allows multiple controllers' interoperability as well as several coupled elements through PECs such as those used in the uG and MG power exchange [6]. The main function of this type of converter is the power sharing between the AC side and the DC side [7]. Therefore, this active and reactive power sharing plays an essential role in control algorithms of the interconnection converters [8]. Various studies have been published on power sharing control algorithms, and some of these are described below. In [9], a Linear Quadratic Regulator-Based Current Control is proposed for the management of power sharing between the AC and DC buses of a hybrid uG. Study [10] proposes a predictive voltage model and a power control method to manage power sharing between a uG and the MG. In [11], a nonlinear coordinated control strategy for parallel bidirectional power converters for a hybrid AC/DC uG is proposed. In this topology, two bidirectional converters are used; one of them oversees transferring power between the AC side and the DC side. In [12], a droop control strategy is proposed for the control of a bidirectional AC/DC converter used for an electric airplane. Finally, study [13] discusses control techniques for current-controlled and voltage-controlled bidirectional converters in a hybrid AC/DC uG. In contrast, increasing advances in computer systems and the need to create different types of prototypes that simulate the behavior of physical systems in real time have led to the use of complex, sophisticated and expensive simulation tools. However, traditional simulation systems have the disadvantage of not recreating the actual operating conditions of physical systems. One option to solve this problem is to use the Hardware in the Loop (HIL) real-time simulation (RTS) technique, which reduces the gap between simulation and real conditions [14].