Development of a Hardware-in-the-loop Platform for Hybrid and Electric Vehicles