To monitor and extend battery lifetime