A TWO LAYER STRATEGY FOR SUSTAINABLE ENERGY MANAGEMENT OF MICROGRID