Calculate voltage and current of lithium battery