The question of off-grid electricity worldwide is very acute. The large number of areas are remote and isolated from the grid. More than 1 billion people live in such territories, including a large number of islands. On the one hand, the traditional diesel electricity generation is possible, but this pollutes the environment and negatively affects the climate. Alternatively, renewable energy (RES) may be installed, but their generation depends on weather conditions, making the supply unreliable and unstable. And the question is, how do we make energy reliable and sustainable at the same time? Obviously, this can be achieved by combining two types of energy sources into one system, which is called Microgrid. More than 6,000 microgrids are currently being implemented around the world.