S10 · Lesson 49 · Stability lab
Integrating the swing equation through a fault and its clearing, finding the critical clearing time by bisection, checking it against the equal-area criterion, and computing a two-machine mode
The equal-area criterion of lesson 44 answers the critical clearing question in closed form, but only for one machine against an infinite bus with simple fault sequences. Real stability programs integrate the swing equations of every machine through the fault, the clearing and the aftermath, and find critical clearing times by repeated simulation. In this lab you'll integrate the swing equation with RK4, bisect for the critical clearing time, confirm it against the equal-area angle, and compute a two-machine oscillation frequency.
- The curve is the rotor angle of a machine with H = 5 s, = 1 pu and = 2 pu during a fault that drops its output to zero, up to the moment of clearing: .
- The dashed line is the critical clearing angle from equal areas, 79.6°. The curve crosses it at 0.214 s: the critical clearing time.
- Raise H and the curve flattens: more inertia buys more time to clear.
Predict
The machine's fault is on one of two parallel lines: during the fault it can still send , and after clearing . Compared with the 0.214 s for a terminal fault with no line lost, is its critical clearing time longer or shorter?
The equal-area angle for this sequence is 70.3°, smaller than 79.6°, because the post-fault network can decelerate the rotor less. But the 0.5 sin δ still transferred during the fault slows the rotor's run toward it, and simulation gives a critical clearing time of 0.230 s. Angles and times can move in opposite directions, which is why stability limits are found by simulation.
Name it
What the lab computes
- The swing equation , with switching from its fault value to its post-fault value at the clearing time, integrated by RK4 from at rest. A run is unstable if δ passes 180°.
- Critical clearing time by bisection on the clearing time between a stable and an unstable run.
- Equal-area angle, with fault and post-fault peaks and and :
- Two-machine mode: , and .
Check
Write swing(H, Pm, Mpre, Mf, Mpost, tc, T, dt): integrate the swing equation (60 Hz) by RK4 from equilibrium, with the fault's peak transfer Mf until tc and Mpost after; return (stable, largest δ in degrees), calling a run unstable as soon as δ exceeds π.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Write cct(H, Pm, Mpre, Mf, Mpost): the critical clearing time by bisection between 0.01 and 1.5 s, using swing with T = 2 s and dt = 5e-4 s and 25 bisection steps.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Write critical_angle(Pm, Mpre, r1, r2): the equal-area critical clearing angle in degrees.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Write two_machine_hz(H1, H2, E1, E2, X, d12_deg): the frequency in hertz of two machines swinging against each other (60 Hz system).
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Explain why
Why do stability studies find critical clearing times by repeated simulation instead of the equal-area criterion?
The equal-area criterion is exact only for one machine connected to an infinite bus, with the electrical power switching between a few fixed sinusoidal curves, and with the zero-output fault case being the only one where the critical angle converts directly into a time. Real systems have many machines swinging against each other, voltage regulators and governors acting during the swing, loads that depend on voltage, and fault sequences with reclosing. None of these fit the simple area picture, so programs integrate the full set of differential equations through the fault and its clearing, check whether the machines stay together, and bisect on the clearing time, which is exactly what the equal-area result can be used to verify in the simple case.