A microgrid is a local energy system that can operate with the larger electric grid or independently when needed.