HOW DOES A BATTERY BMS WORK