Aggregate Modeling of Thermostatically Controlled Loads for Microgrid Energy Management Systems