OPTIMIZING ENERGY STORAGE WITH BMS