TExcelTAD
Home › Power Systems: Three-Phase, Generation, Grids & Protection › Frequency Stability: Inertia, RoCoF, Primary and Secondary Control

Frequency Stability: Inertia, RoCoF, Primary and Secondary Control

The grid has no storage tank for electrical energy. Every second, generation must equal load plus losses; any mismatch is taken from, or stored in, the kinetic energy of the spinning generators and motors, and that changes their speed, which is the frequency. Frequency is therefore the grid's common measure of balance. This lesson follows a sudden loss of generation through its stages: the inertial response that sets the rate of change of frequency (RoCoF), primary control (governor droop) that arrests the fall at the nadir, and secondary control that brings the frequency back to 50 Hz50\ \text{Hz}.

Safety: grid frequency control is studied here by calculation and simulation only. The bench analogue is a control-loop simulation.

The stages after a loss of generation

50 Hztime RoCoF nadir quasi-steady (droop)restored (secondary) inertiaprimary (FCR)secondary (aFRR), minutes

Inertia. At the instant a generator trips, governors have not moved; the lost power ΔP\Delta P is supplied by all rotating masses slowing down together. With the system inertia constant HH (seconds, on the system base SS) the aggregated swing equation gives

dfdt∣t=0+=−ΔP2HS f0\frac{df}{dt}\bigg|_{t = 0^+} = -\frac{\Delta P}{2 H S}\,f_0

That is the RoCoF. Low inertia (many inverter-based wind and solar plants, which have no inherent rotating mass coupled to the grid) means a steeper fall, and RoCoF-based loss-of-mains relays may trip distributed generation, making things worse. Grid codes now require generators to ride through RoCoF of the order of 2 Hz/s2\ \text{Hz/s} (ENTSO-E RfG, Regulation (EU) 2016/631, leaves the exact value to national codes).

Load damping. Motor loads draw less power at lower frequency: about D=1D = 1 to 2 %2\ \% of load per 1 %1\ \% of frequency.

Primary control (frequency containment reserve, FCR). Each participating unit's governor follows a droop characteristic: a unit with droop RR (typically 44 to 5 %5\ \%) raises its output by its full rating for a frequency fall of R⋅f0R \cdot f_0 (2.5 Hz2.5\ \text{Hz} at 5 %5\ \%). Proportional control by all units shares the imbalance in proportion to rating, without communication, but leaves a steady deviation:

Δfss=−ΔPβ,β=∑1Ri+D(pu power per pu frequency)\Delta f_{ss} = -\frac{\Delta P}{\beta}, \qquad \beta = \sum \frac{1}{R_i} + D \quad (\text{pu power per pu frequency})

Secondary control (automatic frequency restoration reserve, aFRR; AGC). A central controller integrates the area control error ACE=ΔPtie+β Δf\text{ACE} = \Delta P_\text{tie} + \beta\,\Delta f and moves the setpoints of selected units until the frequency and the scheduled interchange with neighbours are restored, over minutes. Tertiary reserves (mFRR, RR) then replace the secondary reserve so that it is available again.

In the Continental European synchronous area the System Operation Guideline (Regulation (EU) 2017/1485, SOGL) and the ENTSO-E rules set the design: a reference incident of 3000 MW3000\ \text{MW}, FCR fully activated within 30 s30\ \text{s} at a deviation of ±200 mHz\pm 200\ \text{mHz}, a maximum instantaneous frequency deviation of 800 mHz800\ \text{mHz}, a maximum steady-state deviation of 200 mHz200\ \text{mHz}, and a standard frequency range of ±50 mHz\pm 50\ \text{mHz}. Under-frequency load shedding begins at 49.0 Hz49.0\ \text{Hz}.

Worked example: an island grid loses a unit

Given: an island system of S=10 GWS = 10\ \text{GW}, H=4 sH = 4\ \text{s} on that base, D=1D = 1; 60 %60\ \% of capacity provides FCR with droop R=5 %R = 5\ \%, so ∑1/Ri=0.6/0.05=12\sum 1/R_i = 0.6/0.05 = 12; a 500 MW500\ \text{MW} unit trips (ΔP=0.05 pu\Delta P = 0.05\ \text{pu}).

Find: the initial RoCoF and the quasi-steady frequency deviation after primary control.

Solve:

RoCoF=−0.052⋅4⋅50 Hz=−0.3125 Hz/sβ=12+1=13,Δfss=−0.0513⋅50 Hz=−192 mHz\begin{aligned} \text{RoCoF} &= -\frac{0.05}{2 \cdot 4} \cdot 50\ \text{Hz} = -0.3125\ \text{Hz/s} \\ \beta &= 12 + 1 = 13, \qquad \Delta f_{ss} = -\frac{0.05}{13} \cdot 50\ \text{Hz} = -192\ \text{mHz} \end{aligned}

Check: 192 mHz192\ \text{mHz} is close to the kind of limit a large interconnection designs for (200 mHz200\ \text{mHz} in Continental Europe), but in an island a single 500 MW500\ \text{MW} unit is 5 %5\ \% of the system, so the dynamics are far more violent than for 3000 MW3000\ \text{MW} in a 300 GW300\ \text{GW} area. The nadir, where the governors catch up with the falling frequency, is deeper than the steady deviation and needs a simulation.

In Python: a load-frequency model

The model (all per unit on 10 GW10\ \text{GW}): aggregated swing 2H Δf˙=ΔPm−ΔPL−D Δf2H\,\dot{\Delta f} = \Delta P_m - \Delta P_L - D\,\Delta f; governors and turbines as one lag of T=1.5 sT = 1.5\ \text{s}, T ΔPm˙=ΔPref−Δf/R−ΔPmT\,\dot{\Delta P_m} = \Delta P_\text{ref} - \Delta f/R - \Delta P_m; secondary control ΔPref˙=−Kiβ Δf\dot{\Delta P_\text{ref}} = -K_i \beta\,\Delta f (an isolated area, so ACE =β Δf= \beta\,\Delta f).

python · try it yourself
import numpy as np
from scipy.integrate import solve_ivp
import matplotlib.pyplot as plt

f0, D, invR, T, dPL = 50.0, 1.0, 12.0, 1.5, 0.05
beta = invR + D

def simulate(H, Ki, t_end=300.0):
    def rhs(t, x):
        df, pm, pref = x
        return [(pm - dPL - D * df) / (2 * H), (pref - invR * df - pm) / T, -Ki * beta * df]
    s = solve_ivp(rhs, [0, t_end], [0.0, 0.0, 0.0], max_step=0.01, rtol=1e-8, atol=1e-10, dense_output=True)
    t = np.linspace(0, t_end, 30001)
    return t, s.sol(t)[0] * f0 * 1e3                     # deviation in mHz

print(f"quasi-steady deviation with droop only: {-dPL / beta * f0 * 1e3:.0f} mHz")
fig, ax = plt.subplots(figsize=(6, 3.5))
for H in (4.0, 2.0):
    print(f"H = {H:.0f} s: RoCoF at t = 0+ = {-dPL / (2 * H) * f0:.4f} Hz/s")
    for Ki in (0.0, 0.02):
        t, df = simulate(H, Ki)
        k = df.argmin()
        print(f"  Ki = {Ki:.2f}: nadir {df[k]:6.0f} mHz at {t[k]:.2f} s, "
              f"at 30 s {np.interp(30, t, df):5.0f} mHz, at 300 s {df[-1]:5.1f} mHz")
        ax.plot(t, df, label=f"H = {H:.0f} s, Ki = {Ki}")
ax.set_xscale("symlog", linthresh=10); ax.set_xlabel("t (s)"); ax.set_ylabel("frequency deviation (mHz)")
ax.grid(alpha=0.3); ax.legend(fontsize=8); fig.tight_layout()
plt.show()
quasi-steady deviation with droop only: -192 mHz
H = 4 s: RoCoF at t = 0+ = -0.3125 Hz/s
  Ki = 0.00: nadir   -327 mHz at 1.92 s, at 30 s  -192 mHz, at 300 s -192.3 mHz
  Ki = 0.02: nadir   -325 mHz at 1.89 s, at 30 s  -104 mHz, at 300 s  -0.4 mHz
H = 2 s: RoCoF at t = 0+ = -0.6250 Hz/s
  Ki = 0.00: nadir   -425 mHz at 1.23 s, at 30 s  -192 mHz, at 300 s -192.3 mHz
  Ki = 0.02: nadir   -423 mHz at 1.22 s, at 30 s  -104 mHz, at 300 s  -0.4 mHz

Three lessons in four lines. Halving the inertia doubles the RoCoF and deepens the nadir by about 100 mHz100\ \text{mHz}, though the steady state is unchanged. Secondary control does nothing for the nadir (it is far too slow) but removes the offset over minutes. Faster primary response, from batteries in a few hundred milliseconds or from synthetic (virtual) inertia and grid-forming inverters, is how low-inertia grids keep the nadir up (Power Electronics).

Interactive: droop as proportional control, restoration as integral

The PID lab is an analogue, not a power-system model: its plant 1/((2s+1)(0.5s+1))1/((2s + 1)(0.5s + 1)) stands for the system's inertia-and-load lag and the turbine lag, and its step is a setpoint change rather than a load step. The controller structure is the point. With Kp=4K_p = 4 and Ki=0K_i = 0 (proportional only, like droop) the lab shows a final value of 0.80.8, a 20.00 %20.00\ \% steady-state error, 12.03 %12.03\ \% overshoot and 2.618 s2.618\ \text{s} settling: a permanent offset, just like Δfss\Delta f_{ss}. Raise KiK_i to 11 and the error goes to 0.00 %0.00\ \%, with 3.65 %3.65\ \% overshoot and settling in 8.136 s8.136\ \text{s}: the integral action is secondary control. Push KiK_i higher and the loop oscillates, which is why real AGC is deliberately slow (PID Structure, Steady-State Error).

r = 1+C(s): Kp 4, Ki 0, Kd 0P(s) = 1/((2s+1)(0.5s+1))y-T(s) = (4.000) / (1.000 s^2 + 2.500 s + 5.000)closed-loop poles: -1.25+j1.85, -1.25-j1.850.00.51.001 s2 s3 sty(t)t_s 2.62 s+12.0 %y(t)setpoint10-90 % rise

Guided lab: frequency recordings

Hand calculation. For your own synchronous area, look up the reference incident and the FCR volume and estimate β\beta in MW/Hz (3000 MW/0.2 Hz=15 GW/Hz3000\ \text{MW}/0.2\ \text{Hz} = 15\ \text{GW/Hz} is the Continental European design value), and the RoCoF for a 1000 MW1000\ \text{MW} trip at a system inertia of H=4 sH = 4\ \text{s} on 300 GW300\ \text{GW} (0.021 Hz/s0.021\ \text{Hz/s}).

Simulation. Change dPL, H and invR in the Python cell (all on your area's base) and compare the nadir with the 800 mHz800\ \text{mHz} limit.

What an engineer would measure. Grid frequency is the one power-system quantity you may observe at home safely: many transmission operators publish live frequency, and frequency recorders sample it through a low-voltage, isolated sensor (or derive it from a phasor measurement unit). After a large unit trip, expect a dip of 5050 to 150 mHz150\ \text{mHz} in a large interconnection, a nadir after 55 to 15 s15\ \text{s} and recovery over a few minutes. Frequency meters of this kind resolve about 1 mHz1\ \text{mHz}. Do not build a mains-connected frequency sensor yourself; use published data.

Hazards and safe setup. Desk study with published data only.

Pitfalls

  • Confusing nadir and steady state. Droop sets the steady deviation; inertia and governor speed set the nadir.
  • Per-unit bases for H. Aggregate inertia is ∑HiSi/Ssys\sum H_i S_i / S_\text{sys}; inverter-based plant contributes zero unless it provides synthetic inertia.
  • Secondary control too fast. Integrators acting on ACE must be much slower than primary control, or the two fight.
  • Ignoring load shedding. If the nadir would cross 49.0 Hz49.0\ \text{Hz}, automatic under-frequency load shedding disconnects blocks of load; that is a defence plan, not normal control.

Practice

  1. A unit with R=4 %R = 4\ \% and rating 400 MW400\ \text{MW}: by how much does its output rise for a 100 mHz100\ \text{mHz} fall at 50 Hz50\ \text{Hz}?
  2. A 300 GW300\ \text{GW} area with H=5 sH = 5\ \text{s} loses 3000 MW3000\ \text{MW}. What is the initial RoCoF?
  3. With β=15 GW/Hz\beta = 15\ \text{GW/Hz}, what quasi-steady deviation follows that incident?
Answer
  1. Δf/f0=0.002\Delta f/f_0 = 0.002, ΔP=0.002/0.04⋅400=20 MW\Delta P = 0.002/0.04 \cdot 400 = 20\ \text{MW}.
  2. 3/(2⋅5⋅300)⋅50=0.05 Hz/s3/(2 \cdot 5 \cdot 300) \cdot 50 = 0.05\ \text{Hz/s}.
  3. 3/15=0.2 Hz=200 mHz3/15 = 0.2\ \text{Hz} = 200\ \text{mHz}.

Test yourself

Immediately after a generator trips, the rate of change of frequency is set mainly by…

  1. governor droop
  2. system inertia
  3. secondary control
  4. tap changers

Why does primary (droop) control leave a steady frequency deviation?

  1. it is an integral controller
  2. it is a proportional controller: extra output needs a frequency error
  3. governors are too slow
  4. load damping is negative

Halving system inertia (same governors) mostly…

  1. doubles the steady-state deviation
  2. doubles the initial RoCoF and deepens the nadir
  3. removes the need for secondary control
  4. has no effect

The Continental European reference incident used to size FCR is…

  1. 300 MW
  2. 1000 MW
  3. 3000 MW
  4. 30 GW