Real time balancing for modular passive battery management system