How to calculate the ground voltage of the battery