lithium-ion battery capacity calculation