The electricity savings alone do not justify the battery costs, he said, so it was important to find another source of revenue, which comes from selling energy services to the grid.

“If battery storage is going to work,” he said, “most of it needs to look like this.”

It has been so successful that officials at the Southeastern Pennsylvania Transportation Authority, or Septa, said on Thursday that they are expanding to seven more stations. Officials estimate the program has already saved about $40,000 in electricity costs for each substation and brought in revenue of $250,000 a year since it started running in 2012.

“We don’t have to front the money and we’re reaping both savings and actually money coming back our way,” said Jeffrey D. Knueppel, general manager of the transportation authority. The base technology of the system, known as regenerative braking, was one of the breakthroughs that allowed for the development of hybrid and electric cars like the Prius.

It has been used in locomotives for years, but operators have only recently been finding ways to recycle the energy into electricity to power their fleets. Amtrak, for instance, is replacing its electric locomotives with newer models that allow for recycling all of the regenerated energy as electricity for its system, rather than converting some of it to heat.

And a few places have begun to experiment with different ways to harvest brake power in public transit. In Portland, Ore., a supercapacitor helps collect and dispense the energy on its light rail system. In Los Angeles, transit officials are testing the use of flywheel-based storage on the expanding Metro, part of efforts to reduce costs and increase the options to meet ambitious environmental goals. London is exploring the use of regenerated energy for its Underground, as well.