Lab-in-a-Tab

The Power Grid: Balancing on a Knife Edge

Every second of every day, generation must exactly equal consumption across a whole continent. Nobody can store the difference. The frequency is how you tell whether it is working.

50 HzInertiaDuck curve
Try thisWatch a full day go by first - it takes about a minute. Then push How much solar is installed up to the top and look at what happens in the middle of the day: the pale red haze is energy being wasted. Now raise How big the batteries are and watch the haze shrink as the batteries mop it up and hand it back in the evening. Finally, press the button to break a big power station and keep your eyes on the number at the bottom left. Do it again with How big the batteries are at zero, then with How big the batteries are at maximum, and compare how far the heartbeat falls.
What you're seeingTop: a whole day of a country's electricity, from midnight to midnight, with the coloured bands stacked up to show where the power is coming from - grey for the plants that never switch off, amber for solar, teal for wind, pink for gas, violet for batteries handing back what they stored. The white line is what the country is actually using, and the pale red haze above the stack is clean energy nobody could use, thrown away. The dashed yellow line is what is left for gas after wind and sun have done their bit. The white vertical line is the moment you are watching. Bottom: the grid's heartbeat, second by second, with a green band showing where it is meant to stay and the little wheel spinning at whatever speed the grid is running.
What to notice
Nothing is stored in the wires, so the frequency is the truth-teller: it falls the instant the country takes more than it is being given. When a power station drops out, the missing energy comes straight out of the spinning machines, which slow down - and everyone can see it, everywhere, immediately. Batteries help twice over. They mop up the midday glut that would otherwise be wasted, and because they react in a fraction of a second they catch the frequency before it falls far. Notice also the shape you have made with lots of solar: a fat belly at noon and a terrifyingly steep climb at teatime. That climb, not the total amount of energy, is the hardest thing on the whole system.

A machine the size of a continent, balanced every second

Junior level — plain language, no maths

Here is the fact that runs everything else: the electricity you are using right now was generated a fraction of a second ago. There is no warehouse full of electricity, no tank behind the wall. Somewhere a turbine is spinning slightly harder because you switched a light on. Generation and consumption have to match at every instant, across an entire continent, for ever.

What makes that possible is a shared heartbeat. Nearly all big generators are spinning machines, and they all turn in lockstep, fifty times a second in Europe. That number - the frequency - is the scoreboard. If the country suddenly uses more than is being made, the extra energy has to come from somewhere, and it comes out of the spinning machines themselves: they slow down a fraction, and the frequency dips. Make too much and they speed up. Nobody has to measure demand; the frequency tells you, everywhere, at once.

That spinning steel is also the shock absorber. Thousands of tonnes of turbines and generators are turning at any moment, and their momentum is what keeps the frequency from collapsing in the first half-second after something goes wrong - long enough for other plants to push harder. Grid engineers call it inertia, and they worry about it, because wind and solar farms connect through electronics rather than big spinning masses, so a very green grid is a twitchier one unless something replaces that steadiness.

Then there is the shape of a day. Demand climbs when people wake, dips in the afternoon, and peaks in the evening when everyone comes home and cooks in the dark. Solar does the opposite: it floods the middle of the day and vanishes precisely as the peak arrives. Draw the difference and you get a curve with a fat belly and a steep neck - the duck curve - and that neck, a huge ramp in a couple of hours, is the hardest thing on the whole system to deliver. Batteries are so useful because they can swallow the midday surplus and hand it back three hours later, exactly when the duck's neck goes vertical.

Things worth knowing

  • Old mains-powered clocks count grid cycles, so operators deliberately keep the long-run average at exactly 50 Hz. In 2018 a political dispute in the Balkans left the European grid slightly under-supplied for weeks - and clocks across the continent ran six minutes slow.
  • On 9 August 2019 a lightning strike knocked out two generators in Britain within seconds. The frequency fell so fast that automatic protection cut power to a million customers to save the rest of the network. The whole event, from strike to blackout, took under 90 seconds.
  • From Portugal to Turkey, continental Europe runs as one synchronised machine. Every large generator in it turns in step with every other one - the biggest precisely coordinated object humans have ever built.

The swing equation, droop control and the shape of the net load

Student level — the core equations

Start with the balance. Because there is no meaningful storage in the network itself, the instantaneous power balance \(\sum P_{\text{gen}} = \sum P_{\text{load}} + P_{\text{losses}}\) must hold exactly. Any mismatch has only one place to go: the kinetic energy of the synchronous machines, \(E = \tfrac{1}{2}J\omega^2\). That gives the swing equation in its most useful form, \(\frac{df}{dt} = \frac{f_0\,\Delta P}{2HS}\), where \(S\) is the rated capacity spinning and \(H\) - the inertia constant, in seconds - is how long that stored energy could supply the system at full output. Typical values are 4 to 6 seconds for a thermal plant.

Put numbers to it. Lose 1 GW on a 70 GVA system with \(H = 5\ \text{s}\) and the initial rate of change of frequency is about \(0.07\ \text{Hz/s}\) - slow enough for reserves to arrive. Halve the inertia because half the fleet is now inverter-connected wind and solar, and the same event falls twice as fast. This is why RoCoF has become a planning constraint in its own right: protection relays and machine limits, not the energy balance, set how fast the frequency may move.

The response comes in layers. Primary control is proportional - each participating unit changes output in proportion to the frequency error according to its droop setting, typically 4-5%, arriving within seconds. Being proportional, it arrests the fall but leaves a standing offset. Secondary control, automatic generation control, integrates that error away over minutes and pulls the frequency back to exactly 50 Hz. Tertiary reserve, dispatched by hand or by market, restores the reserves themselves so the system is ready for the next event.

The daily problem is different from the second-by-second one. Subtract wind and solar from demand and you get the net load - what the dispatchable fleet actually has to produce. Add enough solar and its midday belly sinks while the evening peak stays put, so the ramp between them steepens: California routinely needs over 13 GW of ramp in three hours. If the belly sinks below what must-run plant can go down to, the surplus is curtailed - real energy thrown away because nothing can absorb it. Storage attacks both halves of that problem, and batteries have an extra trick: an inverter can respond in tens of milliseconds, faster than any turbine, which is why they now sell frequency response as their most valuable product.

Key Formulas

Balance constraint\(\sum P_{\text{gen}} = \sum P_{\text{load}}\)at every instant
Stored kinetic energy\(E = \tfrac{1}{2}J\omega^2\)
Swing equation\(\dfrac{df}{dt} = \dfrac{f_0\,\Delta P}{2HS}\)H in seconds
Droop\(\Delta P = -\dfrac{1}{R}\,\dfrac{\Delta f}{f_0}\)R ≈ 4–5 %
Net load\(P_{\text{net}} = P_{\text{load}}-P_{\text{wind}}-P_{\text{solar}}\)
Load damping\(P_{\text{load}}(f) \approx P_0\left[1+D\,\Delta f\right]\)D ≈ 1–2 %/Hz
Battery energy\(E = P\times t\)100 MW / 200 MWh = 2 h
RoCoF limit\(\left|\dfrac{df}{dt}\right| < 1\ \text{Hz/s}\)a protection constraint

Things worth knowing

  • A 4% droop setting means a 4% frequency change would move the unit across its full output range. At 50 Hz that is 2 Hz for full travel, so a 0.2 Hz dip calls up about 10% of a machine's capacity - automatically, with no signal sent.
  • Grid batteries are usually rated by power and energy separately: a 100 MW / 200 MWh unit can deliver full output for two hours. For frequency response the power rating is what matters; for shifting solar into the evening it is the energy.
  • Negative electricity prices are a curtailment signal in market form. When the sun is high, the wind is blowing and demand is low, generators pay to keep running rather than shut down - which tells you that the physical constraint is real.

Frequency as a state variable, the reserve hierarchy, and what an inverter-dominated grid changes

Scholar level — full mathematical depth

01Why frequency is the observable

In a synchronous AC system every generator's electrical frequency is rigidly tied to its shaft speed through the pole count, and all machines are locked to a common electrical angle by the network itself. That makes system frequency a single, globally observable state variable summarising the entire power balance - an astonishing piece of luck for control engineers, since it means the aggregate error is broadcast everywhere at the speed of the network with no telemetry at all. Local angle differences do exist, and they carry power flow: \(P_{ij} \approx \frac{V_iV_j}{X_{ij}}\sin(\delta_i-\delta_j)\), which is why a large disturbance shows up as inter-area oscillations before it settles into a common frequency.

02The swing equation and what it bounds

For an aggregated system, \(\frac{2H}{f_0}\frac{df}{dt} = P_m - P_e\) in per unit, so RoCoF immediately after a loss is set by inertia alone: no controller, however fast, changes the first instants. What follows is a competition between the falling frequency and the arriving reserve, and the quantity that matters operationally is the nadir - the lowest point reached - because under-frequency load shedding is armed at fixed thresholds, typically starting near 49.0 Hz. Nadir depends on inertia, on reserve volume, and critically on reserve speed; a slow reserve that eventually delivers twice as much may still let the nadir cross a relay setting. This is precisely the product that batteries sell.

03The control hierarchy

Primary response is decentralised proportional control with a deliberate droop, \(\Delta P = -\Delta f/(R f_0)\). Proportional control cannot restore the setpoint - it trades a standing error for stability and for automatic load sharing between units in proportion to their capacity, which is exactly the behaviour you want when nobody is coordinating. Secondary control adds integral action per control area, driving the area control error \(ACE = \Delta P_{\text{tie}} + B\Delta f\) to zero so that each area cleans up its own imbalance rather than leaning on its neighbours. Tertiary reserve then rebuilds the depleted capability. The timescale separation - seconds, minutes, tens of minutes - is what keeps the layers from fighting each other.

04Net load, and why the duck is the real problem

Variable renewables are best treated as negative load, so the dispatchable fleet sees \(P_{\text{net}}\). Solar in particular reshapes rather than reduces that curve: it hollows out the middle of the day while leaving the evening peak untouched, so the ramp rate demanded of everything else rises much faster than the energy displaced. The binding constraints become minimum stable generation of must-run plant, ramp capability in MW/min, and start-up times - none of which appear in an energy-only accounting of how much renewable electricity was produced. Curtailment and negative prices are the market's way of pricing a physical impossibility, and they arrive long before the annual renewable share looks impressive.

05What inverters change

Wind and solar connect through power electronics with negligible stored kinetic energy, and conventional grid-following inverters need a stable voltage waveform to synchronise to - they measure the grid's angle rather than setting it. As their share rises, two things degrade at once: system inertia, hence RoCoF, and the strength of the voltage source they are all leaning on. The countermeasures are now well understood - synthetic inertia and fast frequency response from batteries and wind, synchronous condensers for genuine inertia and short-circuit power, and above all grid-forming inverters that impose a voltage angle instead of following one. Ireland's grid caps instantaneous non-synchronous penetration for exactly this reason, raising the limit only as the mitigations are proven.

06Storage, flexibility and the cost of variability

Storage is not one product. Frequency response needs power and speed and almost no energy; solar shifting needs a few hours of energy; multi-day lulls in the wind need weeks of energy at a cost per kWh that batteries cannot approach, which is where hydrogen, pumped hydro and interconnection re-enter. The right way to see the whole system is that variable generation lowers the cost of energy while raising the value of flexibility - and that flexibility can be bought from storage, from transmission, from demand response, or from keeping some dispatchable plant idle for a few dozen hours a year. Which one wins is an economics question with a hard physical constraint underneath it: at every instant, the balance still has to be exact.

Key Formulas

Swing equation\(\dfrac{2H}{f_0}\dfrac{df}{dt} = P_m-P_e\)per unit
Initial RoCoF\(\left.\dfrac{df}{dt}\right|_{0} = \dfrac{f_0\Delta P}{2HS}\)
Stored energy\(E_{\text{kin}} = H\cdot S\)H = seconds at full output
Droop response\(\Delta P = -\dfrac{\Delta f}{R\,f_0}\)
Area control error\(ACE = \Delta P_{\text{tie}}+B\,\Delta f\)driven to zero by AGC
Power transfer\(P_{ij} = \dfrac{V_iV_j}{X_{ij}}\sin(\delta_i-\delta_j)\)
Net load\(P_{\text{net}} = P_L-P_{\text{VRE}}\)the duck curve
Ramp requirement\(\dfrac{dP_{\text{net}}}{dt}\)MW/min, the binding constraint

Things worth knowing

  • Some grids now install synchronous condensers - large generators with no prime mover at all, spinning free purely to supply inertia and short-circuit strength. Several retired coal plants have been converted to this role, keeping the machine and removing the boiler.
  • Ireland limits system non-synchronous penetration - the instantaneous share from wind, solar and imports - to a defined ceiling, raised step by step as grid-forming inverters and fast frequency response are proven. It is the clearest example anywhere of inertia being an explicit operational constraint.
  • A battery can deliver full frequency response in under 200 milliseconds; a gas turbine takes tens of seconds. Since the frequency nadir arrives within about ten seconds, that speed difference is worth more than a large amount of slow reserve.

Sources

Full article on Wikipedia ↗