The microgrid, as defined by the U.S. Department of Energy, is a group of interconnected loads and distributed energy resources (DERs) with clearly defined electrical boundaries that acts as a single controllable entity with respect to the electric utility grid. DERs consist of distributed generation (DG) and distributed energy storage (DES) installed at utility facilities, e.g., distribution substations, DG sites, or consumer premises. A microgrid must have three distinct characteristics: 1) the electrical boundaries must be clearly defined, 2) there must be control systems in place to dispatch DERs in a coordinated fashion and maintain voltage and frequency within acceptable limits, and 3) the aggregated installed capacity of DERs and controllable loads must be adequate to reliably supply the critical demand. The microgrids may be operated in two modes.