Microgrids are electricity distribution systems containing interconnected loads and distributed energy resources that can be operated in a controlled and coordinated way. They can be operated independently as an island or in connection with the main grid.