The increasing demand for energy, the tendency to use renewable energy sources and scattered products, the need to increase energy efficiency and stability, has created a concept called microgrids as an independent entity in the power system that can be both dense and Also appear power generator. An important feature of microgrids is the ability to balance production, storage and consumption by reducing the physical distance between them. From the point of view of microgrid energy management, economic planning of production units, storage facilities and loads is a vital issue. This book presents a hierarchical control optimization process to minimize the overall costs of operating the microgrid by considering all the technical and practical constraints of the various microgrid components. Also, energy management has been studied by the central microgrid controller in three levels of control: third party, secondary and primary.