Coordinated Control and Energy Management of Distributed Generation Inverters in a Microgrid