lithium battery optimization