FUNCTIONS OF A BATTERY MANAGEMENT SYSTEM