Frequency 50.000 Hz ROCOF 0.000 Hz/s Time 0.0 s Load shed 0 % normal FPS 0
Evening grid diorama. Left: two power plants (the turbine flywheels follow the grid frequency; a tripped unit stops). Back: wind farm and solar field (inverter-based, no inertia). Centre: substation and battery containers (green bar = state of charge). Right: city with four zones; windows go dark when under-frequency load shedding fires. Front: the frequency dial, 90 degrees per Hz. Drag to orbit, wheel or pinch to zoom.
Smart Grid Frequency Response
One aggregated area: a generator trips, and the swing equation, droop governors, a battery and load shedding fight to hold the frequency. Single-bus illustration, not a real grid.
Trip a generator now Reset and replay Pause Quality: High
Simulation speed 1x (real time) 4x 16x
Nominal frequency 50 Hz (Europe, UK) 60 Hz (Americas)
Overview Power plants City Battery and dial
The disturbance
Inertia and generation mix
Primary control
Battery fast reserve
Last line of defence
Under-frequency load shedding (UFLS): three stages at 2.0 %, 2.4 % and 2.8 % below nominal (49.0 / 48.8 / 48.6 Hz at 50 Hz), 10 % of the load each, 0.2 s relay delay
Secondary control (AGC): a slow integrator moves the governor set-points until the frequency is back at nominal
Below the first threshold for 0.2 s, relays disconnect city zones S1, S2, S3 one after another. Below 5 % under nominal for 0.3 s generators begin to trip on their own protection (+100 MW each time), and below 10 % the grid collapses: blackout.
Live readouts
Frequency
Power contributions, MW
Rate of change of frequency (ROCOF)
Battery state of charge
Missions
Mission 5: predict the initial ROCOF (Hz/s, absolute value) for the current settings and trip size Check
Hint: right after the trip only the stored kinetic energy of the synchronous machines resists, so just H, the trip size and the inverter share matter (see the science panel).
Experiments
Sweep: trips of 50 to 400 MW with your H, inverter share, droop and damping; no battery, no shedding. Columns: frequency nadir (lowest point) of the full model (with reheat turbine), of a one-lag model integrated with RK4, and the exact Laplace-domain solution of that same one-lag model. The second button searches the smallest battery power that keeps the nadir above 49.0 Hz (50 Hz base) for the current trip size.
Sweep trip size vs nadir Find battery MW for 98 % of nominal
Independent numerical checks
What each mechanic does
Inertia (H). Spinning machines store kinetic energy. When generation is lost, that energy supplies the missing power in the first seconds, so the frequency falls at a rate set by H: the bigger H, the slower the fall.
Inverter-based share. Wind, solar and batteries connect through power electronics; they add no inertia and (here) no governor response, so a higher share lowers the effective inertia H(1 - share).
Droop R. Each governor opens the steam or gas valve by 1/R per unit of frequency drop (R = 5 % means a 100 % power change for a 5 % frequency change). Small R means a stiff response. Valves are limited by headroom (spare capacity) and act with delays: governor, steam chest and reheater lags.
Load damping D. Motors and heaters draw less power at lower frequency; D = 1 means load falls 1 % per 1 % frequency drop. It is free help.
Battery. The inverter follows its own 2 % droop with a 0.1 s response, limited by its MW rating and by the energy in the store: an empty battery no longer helps.
UFLS and protection. Planned load disconnection stops a falling frequency; if even that is not enough, generators trip on their own protection and the system can collapse.
Controls Drag / one finger: orbit; wheel / pinch: zoom; four camera views. Presets reset the run and trip a generator after 1 s. Sliders act live, so you can change droop or battery size in the middle of an event. Speed 4x and 16x help to see the slow recovery (reheat turbine) and the battery energy running out.
The science
Swing equation (per unit, system base S = load). 2 Hsys dΔω/dt = ΔPm + Pbat + Pshed − Plost − D Δω, with Δω = Δf/f0 and Hsys = H (1 − sibr ); this is the same as (2H/f0 ) dΔf/dt = net power. Initial ROCOF: −ΔP f0 / (2 Hsys ).
Governor and turbine. Target valve y* = clamp(−(1 − sibr ) Δω / R + yAGC ) between −0.3 and +headroom (0.25 of S); governor lag Tg = 0.2 s, steam chest Tch = 0.3 s, reheater Trh = 7 s, high-pressure fraction F = 0.3: Pm = (1 − F) ych + F yrh . The reheater is why the recovery is slow. Steady state without battery and AGC: Δω = −ΔP / ((1 − sibr )/R + D).
Battery. P* = clamp(−Δω / Rb · Prated , ±Prated ) with Rb = 2 % and a 0.1 s first-order lag; the store obeys dE/dt = −Pbat (no losses); power is tapered to zero in the last 1 % of capacity.
UFLS and protection. Three relay stages at 98.0 %, 97.6 % and 97.2 % of nominal frequency (49.0 / 48.8 / 48.6 Hz at 50 Hz; the same percentages are used at 60 Hz), 10 % of the load each, 0.2 s delay. Generator protection at 95 % (47.5 Hz) removes a further 100 MW after 0.3 s, repeatedly; blackout is declared below 90 % or when 90 % of generation is lost.
Integrator. Fixed-step classical RK4 with h = 2.5 ms; discrete relay events are evaluated after each step.
Simplifications and honesty. One bus: no network, voltage, power flows or line limits. All parameters are illustrative. Typical real-world values (quoted from general knowledge, check a reference before relying on them): H of the synchronous fleet about 3 to 6 s, droop 4 to 5 %, load damping 1 to 2 %, reheat time constants of several seconds, first UFLS stages roughly 0.5 to 1 Hz below nominal; settings differ between grid operators. The tripped unit does not reduce governing capacity, the system size is fixed at 1000 MW, wind and solar give no primary response, AGC is a plain integrator, and there are no ramp limits, dead bands or measurement delays. The city, the turbines and the dial are a visual aid: the flywheel spin exaggerates the frequency deviation 20 times. Assets built with Blender; scene by Three.js.