Now, battery power is coming to trains, in place of the diesel-fueled generators that have powered locomotives for more than a century. Last week, Union Pacific Railroad agreed to buy 20 battery electric freight locomotives from Wabtec and Progress Rail.