Development of an RTDS Platform for HIL Testing of Energy Management Systems