A microgrid is a small electricity network — a campus, a port, a neighbourhood — with its own generation (solar, wind, batteries, sometimes a generator) inside clearly defined electrical boundaries, behaving as one controllable unit. Its defining trick, in the US Department of Energy's definition, is that it can run connected to the public grid or cut itself loose and keep operating as an island.
Cities and operators build them for resilience and clean power. Tianjin's zero-carbon container terminal runs its automated cranes and robots entirely on an on-site wind, solar and storage microgrid, while Amsterdam's Johan Cruijff ArenA pairs rooftop solar with a battery built partly from used EV packs to shave event peaks. A microgrid is a building block of the wider smart grid.
Getting the islanding logic right is hard at scale. Mumbai has been able to island its whole grid since 1981, but the scheme collapsed publicly in 2020 when the local generation left behind couldn't cover demand. Batteries are costly, and a microgrid that never actually islands is just an expensive backup.