New energy management system prototype for trams