The modern power grid is a complex, large scale cyber-physical system comprising of generation, transmission and distribution elements.... Show moreThe modern power grid is a complex, large scale cyber-physical system comprising of generation, transmission and distribution elements. However, advancements in information technology have not yet caught up to the legacy operational technology used in the electric power system. Coupled with the proliferation of renewable energy sources, the electric power grid is in a transition to a smarter grid; operators are now being equipped with the tools to make real-time operational changes and the ability to monitor and provide situational awareness of the system. This shift in electric power grid priorities requires an expansive and reliable communication network to enhance efficiency and resilience of the Smart Grid. This trend calls for a simulation-based platform that provides sufficient flexibility and controllability for evaluating network application designs, and facilitating the transition from in-house research ideas into production systems. In this Thesis, I present techniques to efficiently combine simulation systems, emulation systems, and real hardware into testbed systems to evaluate security, resilience, and operations of the electric power grid. While simulating the dynamics of the physical components of the electric power grid, the cyber components including devices, applications, and networking functions are able to be emulated or even implemented using real hardware. In addition to novel synchronization algorithms between simulation and emulation systems, multiple test cases in applying software-defined networking, an emerging networking paradigm, to the power grid for security and resilience and phasor measurement unit analytics for grid operations are presented which motivate the need for a simulation-based testbed. The contributions of this work lay in the design of a virtual time system with tight controllability on the execution of the emulation systems, i.e., pausing and resuming any specified container processes in the perception of their own virtual clocks, and also lay in the distributed virtual time based synchronization across embedded Linux devices. Show less