Multi-Agent Control For Microgrids With Distributed Energy Storage Systems