A pilot facility for analysis and simulation of smart microgrids feeding smart buildings