Microgrid is one of the promising solutions to achieving sustainable and efficiently operating power systems. With increasing number of distributed generators, dispersed storage systems and advancing load control capabilities, microgrids are going to play an important role in the future smart grid structure. The recent focus in this area of study is on using the field data gathered from pilot applications to develop virtual test beds to be used during replication, testing of various cases and estimating long term outcomes of microgrids with different specifications. This paper describes development of a virtual test bed focused on analyzing microgrid and utility power flow relations using the field data and energy management logic of a microgrid laboratory. In addition to modeling a flexible structure that can be scaled and modified according to research interests, a KNX controlled dimmer is also simulated for analyzing the integration of an existing home automation technology into microgrid control actions.