Real-Time Simulation of small-scale power grids with software in-the-loop and hardware in-the-loop experiments