## 5 Hardware-In-The-Loop Results  
In order to validate the simulation results presented in the previous section, the example microgrid shown in Figure 8 was implemented using a hardware-in-the-loop (HIL) system, allowing the system to be emulated in software, and connected with real world hardware in real time [20]. Using an HIL approach allows the system to be built and tested virtually with new proposed control methods, while interfacing with real hardware [21]. The same component values were implemented in the simulation, and in a Typhoon HIL600 unit. The HIL experimental apparatus is shown in Figure 9. The Typhoon HIL600 has 32 channels of \(\pm 5\) V analog output (AO) that can be mapped to data points in the HIL circuit. The microgrid  
Figure 6: Power supplied by solar, conventional, and storage sources when optimal high dimension droop control is used. Figure 7: Bus voltage using traditional vs. optimal high dimension droop control. control board then offsets and scales these signals to 0 V to +3.3 V that are read by the 12-bit analog to digital converters on all three DSPs. For this example, only 5 channels of analog signals are needed to implement the proposed control. The analog signals and the scaling from the HIL are shown in Table 6.  
Figure 8: Example microgrid used in hardware-in-the-loop (HIL) for PB demonstration of droop control methods. Figure 9: Typhoon HIL600 with microgrid control board and three TI-F28335 DSP ControlCards (two cards were used for this paper). The microgrid control board has BNC connectors linked with the first four analog output channels that are convenient to connect to an oscilloscope. For this work, the first three channels were used to view the first three signals in Table 6, and capture the results in oscilloscope traces. The controller for each source was implemented on a separate Texas Instruments F28335 DSP ContoL CARD [22] programmed through the Embedded Coder toolbox in MATLAB/Simulink. The control card for Source 1 implements (4), while the card for Source 2 implements (3), each using a PID control loop. By using separate control cards for each of the two sources, decentralized control is ensured; each source uses only local information, and the proposed control method does not require a communication link between the sources and/or the other components in the microgrid. This microgrid has the same topology as the one implemented in the simulation. However, for the HIL experiment, power electronics were included, along with parasitic inductances and capacitances. To represent the variable load, a controllable current source was included. This type of load is comparable to an inductive or motor load in an actual system. The numeric values used for the circuit parameters are shown in Tables 7 and 8. The system was implemented on a Typhoon HIL600 unit using distributed control through Texas Instruments F28335 DSP ContolCARDs. Each of the three sources is controlled using a separate TI card, using only local sensors. The circuit schematic used in the Typhoon software is shown in Figure 10.  
The controllers implemented for each of the three sources are shown in Figures 11-13. Sources 2 and 3, representing a conventional and energy storage source, respectively, are controlled using traditional linear droop control. Source 1, representing a solar source, is controlled using optimal high dimension droop control as in (4). Figure 11: HIL controller for Source 1 (solar)–optimal high dimension droop. Figure 12: HIL controller for Source 2 (conventional)–traditional droop. Figure 10: Hardware-in-the-loop schematic for PB microgrid example. Due to the limitations of the HIL system, a short overall time period was used, and the per-minute solar and load information was scaled. The profiles for power available from the solar resource and required load current are shown in Figure 6:0 The solar irradiance data is taken from the NREL BMS measurements from 1 June 2012, starting at 11:00 a.m.