  The goals of reducing energy costs, shifting electricity peaks, increasing
the use of renewable energy, and enhancing the stability of the electric grid
can be met in part by fully exploiting the energy flexibility potential of
buildings and building equipment. The development of strategies that exploit
these flexibilities could be facilitated by publicly available high-resolution
datasets illustrating how control of HVAC systems in commercial buildings can
be used in different climate zones to shape the energy use profile of a
building for grid needs. This article presents the development and integration
of a Hardware-In-the-Loop Flexible load Testbed (HILFT) that integrates
physical HVAC systems with a simulated building model and simulated occupants
with the goal of generating datasets to verify load flexibility of typical
commercial buildings. Compared to simulation-only experiments, the
hardware-in-the-loop approach captures the dynamics of the physical systems
while also allowing efficient testing of various boundary conditions. The HILFT
integration in this article is achieved through the co-simulation among various
software environments including LabVIEW, MATLAB, and EnergyPlus. Although
theoretically viable, such integration has encountered many real-world
challenges, such as: 1) how to design the overall data infrastructure to ensure
effective, robust, and efficient integration; 2) how to avoid closed-loop
hunting between simulated and emulated variables; 3) how to quantify system
response times and minimize system delays; and 4) how to assess the overall
integration quality. Lessons-learned using the examples of an AHU-VAV system,
an air-source heat pump system, and a water-source heat pump system are
presented.
