Simulation and Closed-Loop Testing with IEC 61850