There's been considerable debate among advocates of battery-electric and hydrogen fuel-cell cars over which technology is better for the environment.

While neither vehicle type produces any tailpipe emissions, their overall emissions vary depending on the fuels and processes used to generate electricity or produce hydrogen.

A new study indicates battery-electric cars have an advantage in this area.

DON'T MISS: Toyota to offer electric car in 2020 as fuel-cell sales struggle

Battery-electric cars are more cost-effective than fuel-cell cars, according to researchers from Stanford University and the Technical University of Munich (TUM).

Their study, published in the journal Energy and conducted with some support from BMW, looked at the potential effect of large-scale battery-electric and fuel-cell car adoption on overall energy use, focusing on California.

The Golden State already has more electric cars than any other, and is the only U.S. state where hydrogen fuel-cell cars are currently available.

2017 Toyota Mirai

2017 Toyota Mirai

Researchers used the town of Los Altos Hills—located just a few miles from the Stanford campus—as a test case for hypothetical future scenarios.

That included one scenario for the year 2035 that assumed battery-electric and fuel-cell cars would make up 38 percent of vehicles in the town.

It also assumed hydrogen would be produced locally in the cheapest way possible, be it with electricity generated from renewable sources or taken from the grid.

ALSO SEE: Hydrogen cost could equal 50-cent gasoline, with renewable energy: study

Researchers also considered the possibility of using excess solar power to produce hydrogen and, conversely, to use excess hydrogen for electricity generation, or as an alternative to natural gas for home heating.

In the end, battery-electric vehicles were found to be the better option.

In order to be cost-competitive, fuel-cell cars would have to be sold at much lower prices than battery-electrics, researchers concluded.

Photovoltaic solar power field at Volkswagen plant in Chattanooga, Tennessee

Photovoltaic solar power field at Volkswagen plant in Chattanooga, Tennessee

But it is more likely that fuel-cell cars will be sold at higher prices than comparable electric cars in the near and medium terms.

As for using excess hydrogen to generate electricity and home heat, researchers found that to be a non-starter.

Only a small amount of solar-generated hydrogen will be used for heating buildings in 2035, they concluded.

MORE: Price cut and monthly sales spike for Toyota Mirai fuel-cell sedan

For now, hydrogen fuel-cell adoption is also limited by lack of infrastructure.

California has the only substantial network of hydrogen fueling stations in the U.S., which is why sales of fuel-cell vehicles are limited to areas within its borders at the moment.

Hydrogen fueling stations are significantly more expensive to install than electric-car charging stations, which may slow growth of the network for the time being.

_______________________________________________

Follow GreenCarReports on Facebook and Twitter