The largest machine
Flip a switch in Lisbon and a power station in Poland feels it. The Continental European grid is one machine, tens of thousands of kilometres of transmission lines and thousands of generators, all turning in lockstep at 50 Hz, from Portugal to Turkey and, since February 2025, the Baltic states. North America has its Eastern, Western, Texas and Québec interconnections; India runs a single national synchronous grid; China operates several very large regional grids tied together by direct-current links. Each is, in a precise sense, a single machine, because the rotors of every synchronous generator in it are coupled through the network and turn at the same electrical frequency.
That machine has a property no factory machine has: it has almost no storage of its own. At every instant, the power generated must equal the power consumed plus the losses, and nobody controls the consumption. This lesson is about how engineers keep that balance and keep the machine intact: why power travels at hundreds of kilovolts, what happens in the seconds after a power station suddenly trips, how faults are found and cleared in a tenth of a second, why some links are DC, how markets decide which plant runs, and what the great blackouts taught.
Note
Safety. Overhead lines, substations and distribution equipment carry voltages that can kill at a distance, without contact, by arcing. Never climb a pylon or a substation fence, never fly a kite or a drone near overhead lines, and keep well away from any fallen line: report it to the network operator or the emergency services. Grid equipment is operated only by trained, authorised staff under strict switching and isolation procedures.
Generation, transmission and distribution
A grid has three layers, each at its own range of voltages.
- Generation. Large synchronous generators make three-phase AC at 10 to 25 kV, and step-up transformers raise it at once to transmission voltage. Wind and solar farms and batteries connect through inverters, often at lower voltages, and rooftop solar connects directly to the distribution network.
- Transmission. A meshed network of overhead lines and cables at high voltage (typically 220 to 500 kV, up to 765 kV in several countries and 1000 kV in China) carries bulk power over hundreds of kilometres. Its mesh means that the loss of any one line or generator leaves another path, the N − 1 criterion every transmission operator plans to.
- Distribution. At substations, transformers step the voltage down to sub-transmission (66 to 132 kV) and then medium voltage (from about 4 to 35 kV, commonly 11 to 33 kV), carried along feeders to local transformers that supply the low-voltage network of streets and buildings: 230/400 V in most of the world, 120/240 V split-phase in North America. Distribution networks are mostly radial, a tree rather than a mesh.
Engineers draw all this as a one-line diagram: one line stands for the three phases of each circuit, by the per-phase method of AC power and three-phase systems, with symbols for generators, transformers, busbars and circuit breakers.
Why transmit at high voltage?
A balanced three-phase line delivering power at line voltage and power factor carries a current in each conductor, and loses in a resistance per phase: For given conductors, losses fall as the square of the voltage. Equivalently, for a given loss, the conductor needed falls as the square of the voltage. The program sends 1000 MW over 200 km both ways.
import numpy as np
P = 1000e6 # send 1000 MW ...
length = 200e3 # ... over 200 km, three-phase AC at unity power factor
rho_al = 2.8e-8 # resistivity of aluminium conductor, ohm m
r_per_km = 0.03 # one fixed set of conductors: 0.03 ohm per km per phase
R = r_per_km * length / 1e3 # 6 ohm per phase
print("Same conductors (6 ohm per phase) at different voltages:")
print(" line kV current A loss MW loss %")
for kV in [66, 132, 220, 400, 765]:
I = P / (np.sqrt(3) * kV * 1e3)
loss = 3 * I**2 * R
note = " (more than is sent: impossible in practice)" if loss > P else ""
print(f"{kV:7d} {I:9.0f} {loss / 1e6:7.1f} {100 * loss / P:6.1f}{note}")
print("\nAluminium needed to keep the loss at 2% (three conductors, 200 km):")
print(" line kV R allowed (ohm) cross-section (mm^2) aluminium (tonnes)")
for kV in [132, 220, 400, 765]:
V = kV * 1e3
R_allowed = 0.02 * V**2 / P # from loss = P^2 R / V^2 for a balanced three-phase line
area = rho_al * length / R_allowed
tonnes = 3 * area * length * 2700 / 1e3
print(f"{kV:7d} {R_allowed:15.2f} {area * 1e6:20.0f} {tonnes:18.0f}")On the same 6 Ω conductors, 1000 MW at 132 kV would lose a third of itself; at 400 kV, 3.8%; at 765 kV, 1.0%. Turned the other way, keeping the loss to 2% at 132 kV would take about 26,000 tonnes of aluminium, against 2,835 tonnes at 400 kV. The limits on raising the voltage are insulation (longer insulator strings, wider clearances, taller towers) and corona, the discharge into the air around a conductor whose surface field is too strong, which is why high-voltage lines use bundles of two to eight conductors per phase, spreading the field.
Losses are not the only limit. An AC line also has series inductance and capacitance to ground, so it absorbs or generates reactive power depending on its loading, and the voltage along it shifts with the load. A long AC line's capacity is often limited not by heating but by voltage and stability, which is one reason the longest links are DC.
Frequency, inertia and the swing equation
Every synchronous generator's rotor stores kinetic energy, . Engineers express it through the inertia constant , the stored energy at rated speed divided by the machine's rating: typically 2 to 9 seconds for large generators. When the electrical power a generator delivers, , differs from the mechanical power its turbine supplies, , the difference comes out of (or goes into) that store, and the rotor slows down (or speeds up). Linearised around rated frequency , and in per-unit on the machine's rating, this is the swing equation:
Because all the machines of a synchronous area are coupled, a sudden imbalance anywhere is shared by all of them in proportion to their inertia, and the whole area's frequency moves together (apart from fast local swings between regions, which settle in a second or two). So the same equation holds for a whole area, with now the inertia of everything spinning in synchronism, the total rating online, and two further terms: some demand, notably motors, falls when the frequency falls (load relief, about 1% to 2% of demand per 1% of frequency), and governors raise generation in response.
Right after a generator trips, nothing else has yet responded, so the initial rate of change of frequency (RoCoF) is set by the inertia alone: Then reserves respond, the fall slows, and the frequency reaches its lowest point, the nadir, before recovering. Operators must keep the nadir above the threshold where under-frequency load shedding starts automatically to disconnect blocks of customers (from 49.0 Hz in Continental Europe), and the RoCoF below what generators' protection tolerates.
The simulation lumps a 30 GW synchronous area into one machine, trips a 1320 MW generating unit at , and lets governors deploy 1500 MW of primary reserve with a time constant of 6 s. It compares a system with plenty of inertia ( s), one with half as much, as happens when many synchronous plants are replaced by inverter-connected wind, solar and batteries ( s), and the low-inertia system again with 800 MW of batteries providing fast frequency response (FFR), which they can deliver in a fraction of a second.
# One synchronous area lumped into a single machine. Powers in MW, frequency deviation df in Hz.
f0 = 50.0
S = 30_000.0 # MW of generation online
P_trip = 1320.0 # a large generating unit trips at t = 0
D = 1.0 # load relief: demand falls 1% for each 1% fall in frequency
FCR = 1500.0 # primary (frequency containment) reserve held on governors, MW
FCR_full = 0.2 # ... fully deployed at a deviation of 200 mHz
T_fcr = 6.0 # how quickly governors and turbines deliver it, s
TIMES = (0, 1, 2, 3, 4, 6, 8, 10, 15, 20, 30, 60)
def run(H, ffr_mw=0.0, t_end=60.0, dt=0.002):
"""The swing equation for the whole area: 2 H S / f0 * d(df)/dt = P_fcr + P_ffr - P_trip - D S / f0 * df."""
M = 2 * H * S / f0 # inertia, in MW per (Hz/s)
df = P_fcr = P_ffr = 0.0
nadir, t_nadir, t_trigger, record = 0.0, 0.0, None, {}
for n in range(int(round(t_end / dt)) + 1):
t = n * dt
if n % int(round(1 / dt)) == 0 and int(round(t)) in TIMES:
record[int(round(t))] = f0 + df
target = FCR * min(1.0, max(0.0, -df / FCR_full)) # droop response, capped at the reserve
P_fcr += dt * (target - P_fcr) / T_fcr
if ffr_mw > 0 and t_trigger is None and df < -0.2: # batteries trigger at 49.8 Hz ...
t_trigger = t
if t_trigger is not None: # ... and reach full power 0.5 s later
P_ffr = ffr_mw * min(1.0, (t - t_trigger) / 0.5)
df += dt * (P_fcr + P_ffr - P_trip - D * S / f0 * df) / M
if df < nadir:
nadir, t_nadir = df, t
return P_trip / M, f0 + nadir, t_nadir, record
cases = [("H = 5 s", 5.0, 0.0), ("H = 2.5 s", 2.5, 0.0), ("H = 2.5 s + 800 MW FFR", 2.5, 800.0)]
results = [run(H, ffr) for _, H, ffr in cases]
for (label, _, _), (rocof, f_min, t_min, _) in zip(cases, results):
print(f"{label:24} initial fall {rocof:.2f} Hz/s, lowest {f_min:.3f} Hz at t = {t_min:.1f} s")
print("\n t (s) " + "".join(f"{label:>25}" for label, _, _ in cases))
for t in TIMES:
print(f"{t:6d} " + "".join(f"{r[3][t]:25.3f}" for r in results))Halving the inertia doubles the initial RoCoF, from 0.22 to 0.44 Hz/s, and drags the nadir from 49.401 Hz down to 49.149 Hz, uncomfortably close to load shedding at 49.0 Hz, because the governors' slow response arrives when the frequency has already fallen further. The batteries change the picture: they detect the fall as it crosses 49.8 Hz, reach full output half a second later, and hold the nadir at 49.674 Hz, better than the high-inertia system without them. (In this simple model they hold full output, so the frequency even overshoots 50 Hz briefly; real fast-response services are proportional to the deviation or taper as it recovers.) This is the engineering behind a large change in grid operation: as inverter-based resources replace synchronous machines, operators buy fast response from batteries, contract synchronous condensers for inertia, and increasingly require grid-forming inverters, the subject of Renewables, storage and electric vehicles.
Balancing and reserves
The simulation's final frequency is not 50 Hz. Primary response stops the fall but does not undo it, by design.
Theorem— Steady-state frequency deviation
Suppose an area loses generation (MW), its demand falls by for a frequency deviation , and its governors raise output in proportion to the deviation, by MW per Hz (their droop), without reaching their limits. Then the frequency settles at where , in MW/Hz, is the area's frequency response characteristic.
Proof
In steady state , so the swing equation says total power balances: the extra generation plus the load relief must equal the lost . Solving for gives the result. Nothing in the steady state depends on : inertia shapes the path, not the destination.
∎
In the simulation, 1500 MW of reserve fully deployed at 0.2 Hz gives MW/Hz, load relief adds MW/Hz, so MW/Hz and Hz: the 49.837 Hz the program printed.
Restoring 50 Hz and handing the work back from primary reserve is the job of slower layers, which differ in name from region to region but share a logic:
| Layer (ENTSO-E name) | Acts within | How |
|---|---|---|
| Inertia | instantly | stored kinetic energy of synchronous machines (and synthetic inertia from grid-forming inverters) |
| Fast frequency response | under a second or two | batteries and fast loads, triggered by frequency |
| Primary: frequency containment reserve (FCR) | seconds; full in 30 s in Continental Europe | governor droop on many units, shared across the whole synchronous area |
| Secondary: automatic frequency restoration reserve (aFRR) | 30 s to several minutes | automatic generation control in each control area returns frequency to nominal and exchanges to schedule |
| Tertiary: manual reserve (mFRR) and replacement reserves | minutes to an hour | operators dispatch units to free up the faster reserves |
Behind the reserves sits scheduling: forecasts of demand, wind and solar a day ahead and hour by hour, generation committed to match them, and markets or central dispatch to decide which plant runs.
Protection and fault currents
A fault, a short circuit from a lightning strike, a fallen tree, failed insulation or a digger through a cable, draws a current many times larger than normal and must be removed before it damages equipment, endangers people or destabilises the system. Every part of a grid is guarded by protection: instrument transformers measure currents and voltages, relays decide within a few cycles whether a fault is inside their zone, and circuit breakers interrupt the current. An AC breaker separates its contacts, an arc forms, and the breaker extinguishes the arc at a natural current zero, using vacuum, gas or an air blast; transmission breakers interrupt within two or three cycles of being told to.
Relays use several principles. Overcurrent relays trip when the current exceeds a setting, with time delays graded so that the relay closest to the fault acts first. Distance relays on transmission lines compute the impedance seen from their end, which a fault makes small and proportional to the distance to the fault. Differential relays on transformers, busbars and generators compare the current going in with the current coming out, which differ only when there is a fault inside.
Example— A fault on an 11 kV busbar
A primary substation's 11 kV busbar is fed by a 20 MVA, 33/11 kV transformer with an impedance of 10%, and the 33 kV network behind it can supply a three-phase fault of 500 MVA (its fault level). On a 100 MVA base, the source impedance is pu and the transformer's is pu. A bolted three-phase fault on the busbar sees pu in total, so the fault current is pu: a fault level of MVA, or which the 11 kV breakers must be rated to interrupt. In per-unit, the whole calculation is one division.
Fault current is also how protection sees a fault, which raises a new problem. A synchronous generator can feed five to ten times its rated current into a nearby fault for a short time; an inverter, whose transistors would be destroyed by such currents, is usually limited to about 1.1 to 1.5 times its rating. A grid dominated by inverters therefore has lower and differently shaped fault currents, and protection schemes, settings and grid codes are being revised to match.
HVDC links
Most of the grid is AC because transformers make changing voltage easy. High-voltage direct current (HVDC) wins in three situations:
- Long distances. A DC line needs two conductors instead of three, has no reactive power flow and no stability limit on its length, and its towers are cheaper. Beyond several hundred kilometres for overhead lines, the savings outweigh the cost of the converter stations at each end.
- Cables under the sea or ground. An AC cable is a long capacitor: its charging current grows with length and, within some tens of kilometres, uses up much of its rating. DC has no charging current, so long submarine links, such as the 1.4 GW links between Norway and Germany (NordLink) and Norway and Great Britain (North Sea Link), both opened in 2021, are DC, as are the connections of many offshore wind farms.
- Linking grids that are not synchronous. A DC link, or a back-to-back converter station with no line at all, couples two AC systems without forcing them to share a frequency, as between Japan's 50 Hz east and 60 Hz west, and lets power flow be set precisely, which also helps stop a disturbance spreading from one grid to the other.
Older line-commutated converters (LCC) use thyristors and still carry the largest powers, such as China's ±1100 kV Changji–Guquan link, about 3300 km long and rated 12 GW, energised in 2019. Voltage-source converters (VSC), built from IGBT modules arranged as modular multilevel converters, are now the usual choice for new links and offshore wind: they can control reactive power, start up a dead network (black start) and connect weak grids. They are built from the switches and modulation of Power electronics, thousands of them in series.
How generators are dispatched
Which power stations run at any moment? In much of Europe, North America, Australia and parts of Latin America and Asia, a market decides, in auctions a day ahead and then closer to real time. In simplest form: each generator offers its output at its marginal cost, the cost of producing one more megawatt-hour (fuel and carbon for a gas or coal plant, almost nothing for wind and solar); the operator accepts offers in order of price, the merit order, until demand is met; and every accepted generator is paid the price of the last, most expensive one needed, the clearing price.
# A toy electricity market: every generator offers its capacity at its marginal cost,
# the cheapest offers are accepted until demand is met, and the last one accepted sets the price.
# Costs are illustrative, in currency units per MWh.
fleet = [
# name, capacity MW, marginal cost
("nuclear", 4000, 12),
("hydro (run-of-river)", 1500, 3),
("coal", 3000, 55),
("gas, combined cycle", 6000, 75),
("gas, open cycle", 2000, 140),
("oil", 600, 230),
]
def dispatch(demand, wind, solar):
offers = [("wind", wind, 0), ("solar", solar, 0)] + fleet
offers.sort(key=lambda o: o[2]) # the merit order: cheapest first
remaining, used, price = demand, [], None
for name, cap, cost in offers:
if remaining <= 0:
break
take = min(cap, remaining)
if take > 0:
used.append((name, take))
remaining -= take
price = cost
if remaining > 0:
return None, used # not enough capacity: shortage
return price, used
hours = [("03:00, windy night", 12000, 7000, 0),
("13:00, sunny", 16000, 1000, 7000),
("13:00, same demand, overcast", 16000, 1000, 1500),
("19:00, calm evening peak", 17000, 800, 0)]
for label, demand, wind, solar in hours:
price, used = dispatch(demand, wind, solar)
print(f"{label}: demand {demand} MW, wind {wind} MW, solar {solar} MW")
print(" " + "; ".join(f"{n} {mw:.0f}" for n, mw in used))
if price is None:
print(" not enough capacity: the operator must cut demand")
else:
print(f" clearing price {price} per MWh, set by {used[-1][0]}")The same 16 GW costs 55 per MWh on the sunny day and 75 under cloud: zero-cost solar pushed gas out of the merit order. On the windy night, wind and nuclear set a price of just 12. In the calm evening peak, expensive open-cycle gas turbines are needed and set a price of 140, paid to every generator running. This merit-order effect is why wholesale prices in grids with much wind and solar swing widely, are sometimes negative, and peak in still evenings, and why storage, which can buy cheap and sell dear, has become valuable.
Real markets add a great deal: the network's limits (which, in nodal markets such as several in the United States, give every location its own price, while European markets use larger price zones), generators' start-up costs and minimum outputs (making dispatch an optimisation problem, unit commitment, solved with mixed-integer programming), reserve markets, and capacity mechanisms that pay for being available at the peak. Many countries do not use markets for this at all: a single utility or system operator dispatches plants centrally by cost, under regulation. In every arrangement, the physics of the previous sections must be respected second by second.
Blackouts as lessons
Grids are planned so that no single failure causes a blackout, and almost always none does. The large blackouts come from combinations, and their investigations are among the best teaching documents the field has.
North America, 14 August 2003. A little after 4 pm Eastern time, a cascade of line trips spread from northern Ohio and blacked out parts of eight US states and the Canadian province of Ontario: about 50 million people and 61,800 MW of load. The joint US–Canadian task force's final report found that it was preventable. In the afternoon, several heavily loaded 345 kV lines in Ohio sagged into trees that had not been trimmed back and tripped; a failure of the alarm software in the local utility's control room meant its operators did not realise what was happening; and the regional reliability coordinator lacked the real-time tools to see it either. As load shifted onto the remaining lines, they overloaded and tripped in turn, and within minutes the cascade was unstoppable. The report's first recommendation was that reliability standards be made mandatory and enforceable; in the United States that followed in 2005, with NERC as the standards body under federal oversight.
The Iberian Peninsula, 28 April 2025. At 12:33 CEST, almost all of continental Spain and Portugal lost power. ENTSO-E's expert panel published a factual report in October 2025 and its final report on 20 March 2026. The panel found no single cause but "a combination of many interacting factors": oscillations in the system earlier that day, gaps in voltage and reactive-power control, and rapid output reductions and disconnections of generation, which together led to fast rises in voltage and a cascade of generators disconnecting in Spain; with the generation gone, the frequency collapsed and the interconnection with France opened. It was an unusual kind of blackout, driven by overvoltage rather than by an overload or a shortage of power, and the panel's recommendations concern voltage control, the capabilities and settings of generators of every technology, and monitoring. Supply was restored to most of both countries by the following morning. Some questions about responsibility remain disputed between the parties, so read the panel's report itself rather than summaries of it.
Great Britain, 9 August 2019 is a smaller event that illustrates this lesson's simulation. A lightning strike on a transmission line was followed, within seconds, by the near-simultaneous loss of an offshore wind farm and a gas-fired power station, plus smaller generators on the distribution network whose protection reacted to the disturbance. The total lost exceeded the reserve held, the frequency fell to about 48.8 Hz, and under-frequency load shedding disconnected around a million customers, exactly as designed, to save the rest of the system.
The common threads are the engineering of this lesson: situational awareness, protection settings, reactive power and voltage control, enough reserve and inertia for the largest credible event, and generators that ride through disturbances instead of disconnecting.
Common misconceptions
Misconception
"Electricity from a particular power station flows to particular customers." Power flows through a meshed network according to the impedances of its lines, not to contracts. Contracts and markets settle who pays whom; the physics of power flow decides which lines carry what, which is why one overloaded line can push flows onto lines hundreds of kilometres away.
Misconception
"A blackout happens because there isn't enough generation." Shortages are handled by controlled load shedding long before a system collapses. Large blackouts usually start with something else: lines tripping, protection acting unexpectedly, voltage problems or oscillations, and a cascade the operators cannot see or stop in time.
Misconception
"Frequency is a fixed number; only voltage varies." The frequency is a continuously changing measure of the balance between generation and demand, typically moving tens of millihertz around nominal through the day, and the main signal automatic balancing responds to.
Misconception
"Renewables make grids unstable." Inverter-based generation changes how stability is achieved: less natural inertia and fault current, but much faster and more controllable response. Systems running with very high instantaneous shares of wind and solar operate reliably when the needed services (fast response, voltage control, grid-forming capability, synchronous condensers where useful) are specified and procured. Investigations of individual events, including the Iberian one, point to the control and settings of all kinds of generation, not to the energy source as such.
Exercises
1. The power grid
Warm-upHumanA 220 kV three-phase line delivers 600 MW at unity power factor. Each phase conductor has a resistance of 4 Ω. How many megawatts are lost in the line, to the nearest MW?
2. The power grid
CoreHumanA 50 Hz synchronous area has 50 GW of generation online with an inertia constant s. A 1.8 GW interconnector importing power trips suddenly. What is the initial rate of change of frequency, in millihertz per second (as a positive number)?
3. The power grid
CoreHumanA 50 Hz area with 40 GW online has load relief (demand falls 1% per 1% fall in frequency) and holds 3000 MW of primary reserve, deployed in proportion to the frequency deviation and fully at 200 mHz. It loses 2000 MW. Where does the frequency settle, as a deviation in millihertz (a positive number), before secondary control acts?
4. The power grid
CoreHumanAn 11 kV busbar is fed by a 20 MVA, 33/11 kV transformer of impedance 10%, from a 33 kV network whose fault level is 500 MVA. Neglecting resistance and pre-fault load, what is the current of a three-phase fault on the busbar, in amperes, to the nearest 100 A?
5. The power grid
CoreHumanWhich of these are good reasons to build a link as HVDC rather than AC? Select all that apply.
6. The power grid
CoreHumanAccording to the US–Canada task force's final report, which of these contributed to the North American blackout of 14 August 2003? Select all that apply.
7. The power grid
StretchComputationalWrite frequency_nadir(H, S, P_trip, ...), which simulates the lesson's model of a synchronous area after it loses P_trip MW and returns (nadir_hz, t_nadir), the lowest frequency reached and when. Use the swing equation , with primary reserve whose target is proportional to (reaching FCR MW at FCR_full Hz and capped there) and which follows its target with a first-order lag of time constant T_fcr. The tests check the lesson's results (about 49.40 Hz for s and 49.15 Hz for s) and that more inertia raises the nadir.
8. The power grid
CoreComputationalWrite clear_market(offers, demand), where offers is a list of (name, capacity_mw, cost_per_mwh). Accept offers in order of cost until demand MW is met; return (price, dispatch), where dispatch is a dict from each accepted name to its MW and price is the cost of the last offer accepted. If all the offers together cannot meet demand, return (None, dispatch) with every offer running at full capacity.
Further reading and resources
- Final Report on the August 14, 2003 Blackout in the United States and Canada · U.S.–Canada Power System Outage Task Force · 2004The official investigation of the 2003 North American blackout, with its causes and recommendations.
- 28 April 2025 Blackout · ENTSO-EThe European transmission operators' page for the Iberian blackout, with the expert panel's factual report (October 2025) and final report (March 2026).
- ENTSO-EThe European Network of Transmission System Operators for Electricity, which sets the operating rules of Europe's synchronous areas.
- NERCThe North American Electric Reliability Corporation, which sets and enforces reliability standards in the United States, Canada and part of Mexico.
- Power System Stability and Control · Prabha Kundur · 1994The standard reference on generator dynamics, frequency control and stability.