ups battery calculation formula