A microgrid often can function in two ways; connected to the main grid or operating independently (islanded).Typically, microgrids use renewable energy sources like solar panels and wind turbines to meet energy requirements.