Utilizing distributed generations (DGs) near load points has introduced the concept of microgrid. However, stochastic nature of wind and solar power generation as well as electricity load makes it necessary to utilize an energy management system (EMS) to manage hourly power of microgrid and optimally supply the demand. As a result, this paper utilizes demand response program (DRP) and battery t...