Combined Control and Power Hardware in-the-Loop Simulation for Testing Smart Grid Control Algorithms