HOW TO DESIGN A BMS THE BRAIN OF A BATTERY STORAGE SYSTEM