Optimization of train energy consumption by using advanced battery