No. 41Dispatch
Four hundred milliseconds
On 14 August a generator and an interconnector dropped off the grid within a second of each other. This is what our batteries did in the first half-second, and why they did no more than the curve asked.
ICInes CarvalhoControls engineer
At 16:52:22 on Friday 14 August, a gas generator in the Midlands tripped, and 0.8 seconds later so did a cable to the continent. Together they took 1.3 GW off the grid. Frequency, which the whole system holds at 50 Hz, began to fall at about 0.024 Hz a second.1
Every one of our sites watches that number with its own meter, twenty times a second. Twenty megawatts of the fleet were contracted that afternoon to the grid operator’s fastest frequency service, which pays us to push power into the grid in proportion to how far the frequency has fallen — and to do nothing at all while it stays near 50.
The curve
The contract is a curve, not a threshold. Inside ±0.015 Hz we do nothing: that is noise. From there to ±0.2 Hz we deliver up to 5% of our contracted power, and from ±0.2 to ±0.5 Hz the rest, in a straight line. Each site runs the whole curve itself. Nothing waits for our servers.
- Deadband
- ±0.015 Hz · no response
- Knee
- ±0.2 Hz · 5% of contracted power
- Full response
- ±0.5 Hz · 100%, 20 MW
- Required within
- 1 s of leaving the deadband
- Our own target
- 400 ms
- Measured at
- 20 Hz, at each site’s meter
In code it is short on purpose. It runs every 50 ms on a controller the size of a paperback,2 and every branch in it is a thing the operator can ask us to justify.
/// The share of our contracted power to deliver at a grid frequency,
/// from -1.0 (take it all in) to +1.0 (send it all out).
pub fn response(hz: f64) -> f64 {
const NOMINAL: f64 = 50.0;
const DEADBAND: f64 = 0.015; // Hz: inside this, do nothing
const KNEE: f64 = 0.2; // Hz: 5% of power here
const FULL: f64 = 0.5; // Hz: all of it here
let off = hz - NOMINAL;
let d = off.abs();
let share = if d <= DEADBAND {
0.0
} else if d <= KNEE {
0.05 * (d - DEADBAND) / (KNEE - DEADBAND)
} else {
(0.05 + 0.95 * (d - KNEE) / (FULL - KNEE)).min(1.0)
};
-off.signum() * share // a low grid: export; a high one: import
}
The minute, replayed
Frequency left our deadband at 16:52:23.6 and reached its lowest, 49.73 Hz, ten seconds later. At the bottom the curve asked for 27% of our 20 MW: 5.4 MW. We sent 5.4 MW. Drag through the minute below and watch the two instruments: the needle is the grid, and the ring is what the curve asked of us at that moment.
- Sent to the grid
- —
- Since the trip
- —
- Held in reserve
- —
That is the point of a curve. An event this size needs the fleet’s help, not its heroics: had the frequency kept falling, the other 14.6 MW were there for it.3 A battery that sends everything at the first dip is a battery with nothing left for the second one.
Four hundred milliseconds
The number in the title is the one we hold ourselves to: from the moment a site’s meter sees the frequency leave the deadband to the moment that site is on the curve. The service allows a second. Across the fleet on 14 August our median was 341 ms, and here are the twelve Somerset sites nearest the meter in Fig. 1.
Minehead took 910. Nearly all of the difference is its inverter, a 2021 model that sleeps between jobs and takes 560 ms to wake.4 It still made the second, but 90 ms is closer than we like. This is the site’s own log of that half-second:
$ slack log minehead --from 16:52:23.6 --to 16:52:24.6
16:52:23.650 meter 49.9848 Hz outside the deadband
16:52:23.700 plan asking 0.1% (0.02 MW)
16:52:23.702 inverter waking from standby
16:52:24.262 inverter awake after 560 ms
16:52:24.560 on the curve, 910 ms after the meter
What we changed
Two things. During the hours we are contracted, the six sites with 2021 inverters now keep them awake, which costs about 30 W a site and took Minehead to 352 ms in the next weekly test. And we now raise an alarm on any site slower than 600 ms in a real event, not only in the weekly one, because the test’s synthetic fall is gentler than a real grid.5
The grid was back above 49.9 Hz 3 minutes 40 seconds after the trip. Nobody in the office noticed until the operator’s report arrived the next morning, which is how it should be.
- 1Frequency is the same everywhere on the grid at once, to within a few millihertz: it is the speed at which every large generator in Britain is turning. Take more power than is made and they all slow down together.
- 2A Cortex-A53 board running Linux with the real-time patches. The loop’s worst case last month was 11.2 ms of its 50; No. 34 is how it got there.
- 3At 49.5 Hz the curve asks for all 20 MW. The grid has fallen that far twice in the last ten years.
- 4An inverter turns the battery’s direct current into the grid’s alternating current. The ones we have fitted since 2023 idle warm and answer in 40 ms.
- 5The weekly test feeds each controller a fall of 0.1 Hz a second and times the answer. The fleet’s median in tests is 290 ms.