Abstract
yy We present two energy management systems for microgrids. First, during normal operating conditions, it is assumed that the main grid provides a desired load profile for the microgrid to follow. The objective of the microgrid is to minimize its deviation from the desired load profile. Such objective is beneficial to the main grid to levelize the fluctuation of renewable energy output. Second, during emergency operating conditions when an outage occurs at the main grid, the objective of the microgrid is to maximize supplied microgrid internal loads including traditional loads and smart homes, as well as nearby external loads that lost power due to the outage, based on their priority. A mathematical formulation for both energy management systems is presented based on mixed integer linear programming. Simulation results show the capability of the proposed formulation in obtaining optimal values within acceptable computational times, which is necessary especially during emergency operating conditions.