Irreversible capacity loss of graphite electrode in lithium-ion batteries