FUNCTIONAL SAFETY ANALYSIS AND DESIGN OF BMS FOR