AI-based intelligent energy storage using Li-ion batteries