Design and implementation of machine learning techniques for modeling and managing battery energy storage systems