Flexibility and grid codes

Microgrid basics: components, operating modes and control

How a microgrid islands and reconnects: grid-forming sources, battery reserve, load shedding, island protection, resynchronisation limits and what to measure.

The U.S. Department of Energy defines a microgrid as a group of interconnected loads and distributed energy resources within clearly defined electrical boundaries that acts as a single controllable entity with respect to the grid. It can connect to the grid and disconnect from it, so it runs either grid-connected or as an island.

Most of the engineering is in the island. Running solar and a battery in parallel with the grid is an ordinary behind-the-meter project. Forming an island needs a source that sets voltage and frequency, enough kVA for the load step, enough kWh for the outage, protection that still clears a fault, and a controlled return to the grid. A microgrid is worth that cost where an outage costs the site more than the controller, switchgear, storage and studies.

Components of a microgrid

Generation

The property that matters for islanding is whether a source is grid-forming or grid-following. A grid-following inverter measures the grid voltage and injects current in step with it. Almost all PV inverters work this way. When the grid is lost they have nothing to follow, and their loss-of-mains protection disconnects them. IEEE 1547-2018 requires a distributed energy resource to detect an unintentional island and cease to energise within 2 s. In Great Britain, G99 sets loss-of-mains protection as rate of change of frequency (RoCoF) at 1 Hz/s with a 0.5 s delay, and does not accept vector shift.

A grid-forming source sets voltage and frequency itself. A synchronous generator does this by nature. A battery inverter does it only if it has a grid-forming mode and the controller selects it. Once a grid-forming source holds the island, grid-following PV inverters see a stable voltage, reconnect after their restart delay and supply energy into it.

Diesel and gas generators are dispatchable but slow. A standby set to NFPA 110 Type 10 restores power within 10 s of the outage, and a set that runs lightly loaded for long periods wet-stacks. NFPA 110 uses 30 % of the nameplate kW rating as the minimum load for the monthly test, and the same figure is a reasonable lower limit for island operation. Combined heat and power runs to a heat demand, so its electrical output is available only while that demand exists.

Storage

In most modern microgrids the battery inverter is the grid-forming source for the first seconds to hours of an island. Size it twice. Its kVA rating must carry the retained load, including reactive power and motor starting current. Its usable kWh, above the state-of-charge floor the controller keeps, sets how long the island runs before a generator takes over or loads are dropped. The worked example below shows both.

Loads

Group loads by how long each can be without power, in seconds, minutes or hours. The answer differs from site to site, so agree the groups with the site's operations team. Safety systems, IT and process controls usually need no break at all and sit on a UPS as well. A cold store can be without power for an hour or more if its doors stay closed. Many production lines cannot accept even a short break, because a stopped batch is scrap and a restart takes hours. Those lines belong in the critical group or are stopped in an orderly way before the island forms. EV charging, space heating and air compressors can usually wait.

The controller sheds a group through the breaker or contactor that feeds it, through a command to the building management system, or through a power limit on an EV charger or a variable speed drive. Each path has its own delay, and each one must be tested with the island live.

Point of common coupling

The point of common coupling (PCC) is the breaker where the microgrid connects to the grid. It opens to form the island and closes after resynchronisation. The connection rules follow the local code. In North America, IEEE 1547-2018 clause 8 covers unintentional and intentional islands. In Great Britain, G99 clause 9.6.2 covers a customer's installation island and makes the generator owner responsible for safe synchronisation and disconnection. In the rest of Europe, EN 50549-1 and the national network code apply. The G99 guide covers interface protection in more detail.

Earthing changes when the PCC opens. Where the site takes its neutral-earth point from a network transformer on the grid side of the PCC, the island has no earth reference until a neutral-earth switch on the site side closes. G99 section 8 shows typical arrangements, with that switch open in parallel and closed in island operation.

Microgrid controller

IEEE 2030.7 specifies the core functions of a microgrid controller, including dispatch of the energy resources and the transition between grid-connected and island mode. In practice the controller detects a grid failure, opens the PCC, selects the grid-forming source, sheds and restores load groups, resynchronises and recloses the PCC, and switches protection setting groups where the design uses them.

Dispatch works in a set order. First the controller keeps enough spinning reserve and battery state of charge to survive the next outage. Then it keeps each generator above its minimum load. Only with those constraints met does it optimise for cost.

Operating modes

Grid-connected mode

The grid sets voltage and frequency and absorbs any mismatch. The controller runs PV, charges the battery at low tariffs, discharges at peak and can offer flexibility to demand response and frequency markets. All of this is limited by the connection agreement at the PCC, including any export limit, and by the reserve kept for islanding.

Transition to island

A planned island is smooth. The controller ramps the PCC flow to near zero, the battery inverter moves to grid-forming mode and the PCC opens with no break to the loads. IEEE 1547-2018 calls this a scheduled island, and lists an approaching storm as one reason to form one.

An unplanned island starts with a fault or an outage. The PCC protection detects it and opens the breaker, and the controller then forms the island. Unless a grid-forming inverter was already running in parallel with the grid, the loads see a break of detection time plus breaker time plus start time. The PV inverters trip on loss of mains and return some time after the island is stable. The first load step on the battery is therefore the whole retained load with no PV behind it.

Island mode

The island has no grid to absorb a surplus or cover a shortfall. With a generator as the grid former, overload shows as falling frequency, so staged under-frequency load shedding works in the usual way. With a battery inverter as the grid former, frequency is what its droop setting makes it. The controller then sheds load when measured power approaches the inverter's available kW, or when state of charge reaches the floor.

Surplus PV is the opposite problem. When the battery is full, the grid-forming inverter raises frequency. Under G99 clause 11.2.4, PV inverters reduce active power when frequency rises above 50.4 Hz, and EN 50549-1 has an equivalent over-frequency response. The controller can also curtail PV directly over Modbus. If neither works, the battery has nowhere to put the energy and the island trips on over-voltage or over-frequency.

Resynchronisation and reconnection

Before it closes the PCC, the controller brings the island's voltage, frequency and phase angle into line with the grid, and a sync-check relay (ANSI device 25) confirms it. IEEE 1547-2018 sets these limits by aggregate rating:

Aggregate ratingFrequency differenceVoltage differencePhase angle difference
Up to 500 kVA0.3 Hz10 %20°
Above 500 kVA to 1,500 kVA0.2 Hz5 %15°
Above 1,500 kVA0.1 Hz3 %10°

In Great Britain, G99 clause 9.6.2.4 refers to EREC P28 for the voltage disturbance a closure may cause. A closure outside the limits puts a torque shock on generator shafts and a current surge through the PCC.

Worked example: sizing the island

Take a food plant supplied from a 1,000 kVA, 11/0.4 kV transformer with 5 % impedance. Its peak import is 850 kW. It has 400 kWp of PV on grid-following inverters, a 500 kW / 1,000 kWh battery on a 500 kVA grid-forming inverter, and a 500 kVA (400 kW at 0.8 power factor) standby diesel set.

In an outage the plant keeps 350 kW. That is 60 kW of controls, IT and safety systems, 220 kW of cold-store refrigeration and 70 kW in the packing hall. Process heating, air compressors, office HVAC and EV chargers are shed.

Inverter rating and motor restarts

At a power factor of 0.85, 350 kW is 412 kVA, which leaves 88 kVA of the inverter's rating. Motor restarts use that margin. A 55 kW refrigeration compressor draws about 69 kVA running and about six times that, 410 kVA, for a second or two when it starts direct-on-line. Starting current has a low power factor, about 0.35, so it adds to the other 343 kVA as a vector. The total is about 710 kVA, 1.4 times the inverter rating and near the top of its current limit. Voltage sags and the other compressors' contactors can drop out. With variable speed drives or soft starters on the compressors, and the controller restarting one compressor at a time, the step stays inside the rating. The kW, kVA, kvar and power factor calculator converts between kW, kVA and power factor.

Energy reserve

The owner sets a 40 % state-of-charge floor, so 400 kWh is held for islanding. At 350 kW that is about 68 minutes before inverter losses, which is enough time to start the diesel set, or to start it by hand if the automatic start fails. The cost of that reserve is that only 600 kWh of the 1,000 kWh is available for tariff arbitrage and peak reduction. The controller can raise the floor ahead of a storm warning and lower it again afterwards.

Generator loading

During the day the island load of 350 kW is 88 % of the set's 400 kW rating. At night the retained load falls to about 110 kW, which is 28 %, below the 30 % limit. The controller can load the set to about 75 % by charging the battery, then stop it and run the island on the battery until the state of charge reaches the floor again. The generator fuel consumption calculator estimates the fuel used in each mode.

Protection in island mode

The same plant shows why protection changes. The transformer's full-load current at 400 V is 1,443 A. With 5 % impedance and a stiff 11 kV network, the fault current at its terminals is about 28.9 kA. The transformer current calculator gives both figures. The battery inverter's full-load current is 722 A. Sandia National Laboratories gives the steady fault current of both grid-forming and grid-following inverters as about 1.1 to 1.5 times rated, so 790 to 1,080 A.

The packing hall is fed through a 250 A moulded-case circuit breaker with its instantaneous trip at 10 times rated current, 2,500 A. On the grid, a fault at the packing hall board draws several kiloamps and the breaker clears it in tens of milliseconds. In a battery-only island, at most 1,080 A flows, which is 4.3 times rated current. The instantaneous element never picks up, and the thermal element takes many seconds. Voltage across the whole island collapses in the meantime, and the inverter may trip on its own protection before the breaker opens. The fault then blacks out the island instead of one feeder.

With the diesel set running, the picture changes again. A synchronous generator with 15 % sub-transient reactance gives about 1 / 0.15 = 6.7 times rated current at its terminals for the first cycles, about 4,800 A for this set, before it decays. So the fault level depends on which sources are online. The usual answers are:

  • setting groups in the protection relays, switched by the PCC breaker and generator breaker status;
  • voltage-restrained or voltage-controlled overcurrent (ANSI 51V), which trips at a lower current when voltage has collapsed;
  • undervoltage tripping (ANSI 27) with time grading between feeders;
  • current differential protection on the feeders where selectivity matters most;
  • inverters specified with a higher short-time fault current, where the manufacturer offers it.

The protection study must cover every combination of sources that can run the island, including the battery alone at night.

Failure modes

FailureCauseHow it shows in the data
Island collapses on formationBattery below its floor at the start of the outage, or retained load above the inverter ratingState of charge at the moment of islanding, load at the PCC just before the outage
Voltage dip and contactor dropout after transferSeveral motors restarting togetherA power spike on the load group, followed by a loss of that group's load
Island trips at middayBattery full with surplus PV and no curtailmentPV output that does not fall as state of charge reaches 100 %, then a trip
Generator will not start or will not take loadStarting battery, fuel or controller faultNo generator output within the expected start time
Generator wet stackingLong island periods below 30 % loadHours logged at low generator load
Failed or rough recloseSync-check bypassed or set outside the limitsA current surge at the PCC at reconnection
Load shedding does not happenContactor fault, lost BMS command, or a charger ignoring its limitLoad group power unchanged after the shed command
Controller acts on stale dataLoss of the link from its PCC transducerThe controller event log, cross-checked against independent PCC data

A planned island test finds most of these before a real outage does. Run one with the site at typical load each year, and again after any change to loads or settings.

What to measure

The microgrid uses measurements at two speeds. The controller needs PCC voltage, frequency, phase angle and power within cycles, for islanding, resynchronisation and export-limit control. That data comes from the controller's own transducers and the protection relays, hard-wired or on a dedicated network. The owner needs a record over seconds to minutes to review outages, check the reserve, allocate cost and plan changes.

LocationMeasurementsController (cycle to sub-second)Monitoring (seconds to minutes)
Point of common couplingImport and export kW and kWh, kvar, voltage, frequency, power factorIslanding, sync check, export limitGrid exchange, tariff, outage timeline
BatterykW, kvar, state of charge from the battery management systemDispatch, reserve floorState of charge at islanding, cycling
GeneratorkW, kvar, run hours, fuelStart, load sharingLoading profile, low-load hours
PV inverterskW, curtailment stateCurtailment in islandYield, curtailment lost
Each load groupkW, kWhShed and restore confirmationShed and restore times, cost allocation
Weather, from a pyranometer or the PV inverterIrradiance, module temperatureNonePV forecast and yield checks

In island mode, power factor matters more than it does on the grid. The island must supply all its own reactive power, so on a site with a poor power factor the kVA limits of the inverter and generator are reached before their kW limits.

Monitoring a microgrid with EpiSensor

EpiSensor electricity monitors measure the PCC, the generators and each load group, and report over the site's Zigbee wireless network to a Gateway. The CT and voltage connections are still installation work for an electrician. The monitors do not need data cabling back to the Gateway. The Gateway runs Edge, which stores the data locally, keeps logging when the internet connection fails and forwards it to the owner's platform. Battery management system, inverter and weather-station registers can be read over Modbus into the same record.

That record answers the review questions after an outage: when the grid was lost, the state of charge at the moment of islanding, which groups were shed and when they came back, and how the generator was loaded. The controller does not use this data to trip, synchronise or limit export. Those decisions stay with the controller's own measurements, the protection relays and any settlement meter, which remain separate, certified equipment.

Two design points keep the monitoring alive during the outage it is meant to record. Supply the Gateway and the monitors that record the outage from the critical supply. Supply the PCC monitor from the site side of the PCC. A monitor supplied from a shed circuit stops reporting when that circuit is shed, and it can take routes in the wireless mesh with it.

Common questions

What is the difference between a microgrid and backup generation?

A standby generator supplies selected loads when the grid fails, usually after a break of up to 10 s. A microgrid coordinates several sources, storage and loads as one system, both connected to the grid and as an island. It forms the island, sheds and restores loads, and resynchronises to the grid before it recloses the point of common coupling.

Why does protection change in island mode?

A grid transformer can supply tens of kiloamps into a fault. An inverter limits its output to about 1.1 to 1.5 times its rated current, and a synchronous generator gives roughly 5 to 7 times rated current for the first cycles. A breaker whose instantaneous trip is set for grid fault levels may not operate when only inverters supply the island. The protection study must cover every combination of sources that can run the island.

Will my solar PV keep the site running in a power cut?

Not on its own. Most PV inverters are grid-following. They need a grid voltage to follow, and loss-of-mains protection disconnects them when the grid fails. PV can supply an island only when a grid-forming battery inverter or a generator sets the voltage and frequency, and the island has somewhere to put surplus PV output.