How to calculate the charging voltage of lithium battery