Real-Time Simulation for Testing of Microgrid Systems