Lithium battery charging and discharging strategy