FUNCTIONAL AND SAFETY GUIDE FOR BATTERY MANAGEMENT SYSTEM BMS