FUNCTIONS OF THE BATTERY MANAGEMENT SYSTEM BMS