# Power Sharing Control in a Grid-Tied DC Microgrid: Controller Hardware in the Loop Validation
###### Abstract
The proposed platform consists of two elements: a real-time emulator that reproduces the behavior of the main grid interconnection system (MGISE) and a controller under test (CUT) to validate the platform. The emulator includes a PA with a maximum power of 1000 W, a bidirectional AC/DC converter based on the H full bridge converter (HFBC) topology, and a load on the DC side; also this emulates the MG. The emulator operates with a 6 us IT. It has three analog outputs that represent the DC side voltage, the AC side current and the voltage signal of the MG; it also has an analog input that represents the control signal of the HFBC. The CUT, on the other hand, has two main parts: a phase-locked loop (PLL) type Park-PLL and a main control structure that includes two loops nested with PI controllers. The proposed HILP allows for cascaded PI controller validation. This controller is simple and is effective for energy transfer management while having low computational costs during implementation. The results obtained with the proposed implemented C-HIL technique platform demonstrate its usefulness and that this platform could be an option for researchers, such as [7; 8; 9; 10; 11; 12; 13], to validate their controllers before an experimental prototype implementation. The HILP offers advantages during the validation process, in comparison with a software simulation, because of a test feature that allows the real time behavior of real hardware implemented controllers to be observed, obtaining the same results that would have been obtained with a real system and permitting observation of environmental variable changes as well, such as the behavior of the MG. In order to guarantee real time execution of the HILP, the hardware device's IT is the most important variable to take into account. The proposed HILP has an IT of 10 us; this time is enough to emulate real time continuous signals. In comparison with dedicated HIL platforms, the proposed HIL features low-cost hardware. It has a self-owned, high-level description environment, which facilitates and expedites platform development, and, in comparison with solutions such as those presented in [22], a tripartite software to embed the developed systems in the hardware is not required. All of these advantages together offer a useful and versatile HILP, built for power sharing controller analysis in uGs applications, with features such as low cost and benefits comparable to those of the commercial platforms. The article is divided into five sections. Section 1 comprises the introduction. Section 2 presents a description, modeling and design of the elements that make up the main grid interconnection system (MGIS); the elements included in this section are HFBC, a PA and the controller proposed to validate the C-HIL platform. Section 3 describes the implementation of the systems in the NI myRIO-1900 (myRIO) DB and the conformation of the C-HIL platform interconnecting the emulator in real time that reproduces the behavior of the HFBC and the controller. Section 4 shows the results obtained with the C-HIL platform for a series of open loop and closed loop experiments, with the HFBC operating as a rectifier and inverter. The results obtained in this section are compared with resultsobtained through software simulations in MATLAB and PSIM. Finally, Section 5 presents the discussion and conclusions related to the advantages that our proposal presents over some similar proposals reported in the literature.