some embodiments of the present invention provide a system that charges a battery . during operation , the system obtains a set of charging currents and a set of charging voltages . next , the system repeats constant - current and constant - voltage charging operations , starting with i = 1 and incrementing i with every repetition , until a termination condition is reached . these constant - current and constant - voltage charging operations involve charging the battery using a constant current i i until a cell voltage of the battery reaches v i , and then charging the battery using a constant voltage v i until a charging current is less than or equal to i i + 1 .