Methods for measuring battery internal resistance