Multi-Agent Coordination Algorithms For Control of Distributed Energy Resources In Smart Grids