CHIL and PHIL Simulation for Active Distribution Networks