⚡ Smart Grid Lab: Frequency, Inertia, Batteries and Demand Response

2D interactive simulation · educational model
The science

Frequency is the balance meter. In an AC grid all synchronous machines share one frequency. If generation falls short of demand, rotating kinetic energy is drawn down and the frequency drops. In per-unit on the system base the aggregate swing equation is 2H · dΔω/dt = Pgov + Pbat + PDR − ΔPdist − DΔω, where H is the inertia constant (seconds), D the load damping (loads draw less when frequency falls), and f = 50(1+Δω) Hz. Right after a loss ΔP the rate of change of frequency is RoCoF = −ΔP f0/(2H), so low inertia means a faster fall.

Who responds. Governors of conventional units act as droop control with lag Tg: Tg dPgov/dt = −(1−r)Δω/R − Pgov, where r is the share of inverter-based renewables (they add no inertia and no droop here) and R the droop. A battery inverter reacts in about 0.1 s with Pbat = −Δω/Rb, limited by its power rating; it can also add synthetic inertia Hv. Smart demand response sheds a fraction of load when frequency leaves a 0.1 Hz band. Renewable variability is modelled as a slow random disturbance (Ornstein-Uhlenbeck noise) proportional to r.

Steady state. After the transients the frequency settles where Δωss = −ΔP / (D + (1−r)/R), independent of inertia. Inertia only shapes the first seconds (nadir), which is why a smart grid with many inverters needs fast batteries or demand response.

Honest simplifications. Single-area, single-frequency model with no network, voltage or protection; governors have no deadband or rate limits; the reference system size, droop and damping are typical textbook values (D = 1 pu, Tg = 3 s), not a real grid; secondary (AGC) control is not modelled, so the frequency does not return to 50 Hz by itself.