Inferensys

Glossary

Swing Equation

The fundamental nonlinear differential equation governing the rotational dynamics of a synchronous generator rotor, balancing mechanical input power against electrical output power.
AI evaluator reviewing output quality on laptop, comparison metrics visible, casual evaluation session.
ROTOR DYNAMICS

What is the Swing Equation?

The swing equation is the fundamental nonlinear differential equation that governs the rotational dynamics of a synchronous generator rotor, balancing mechanical input power against electrical output power to determine rotor angle stability.

The swing equation models the electromechanical oscillations of a synchronous machine by equating the inertial torque to the difference between the mechanical input power from the prime mover and the electrical output power delivered to the grid. Expressed as M(d²δ/dt²) = Pm - Pe, where M is the inertia constant, δ is the rotor angle, and Pm and Pe represent mechanical and electrical power respectively, this second-order differential equation captures the core physics of transient stability. When a fault occurs, the electrical power Pe drops sharply, causing the rotor to accelerate under the excess mechanical input.

The nonlinearity arises from the power-angle relationship Pe = (EV/X)sin(δ), where E is the internal voltage, V is the infinite bus voltage, and X is the transfer reactance. This sinusoidal dependence means the restoring electrical force weakens as the rotor angle approaches 90 degrees, beyond which synchronism is lost. Machine learning models for transient stability assessment, such as Physics-Informed Neural Networks and Fourier Neural Operators, embed this governing equation directly into their loss functions or learn its solution operator to predict post-fault rotor angle trajectories without solving the differential equations numerically.

GENERATOR DYNAMICS

Key Characteristics of the Swing Equation

The swing equation is the fundamental nonlinear differential equation governing the rotational dynamics of a synchronous generator rotor. It balances mechanical input power against electrical output power to determine rotor angle stability.

01

Core Differential Form

The classical representation is 2H/ω_s * d²δ/dt² = P_m - P_e, where H is the inertia constant (MW-s/MVA), ω_s is synchronous speed, δ is the rotor angle, P_m is mechanical input power, and P_e is electrical output power. This second-order equation captures the acceleration or deceleration of the rotor mass when a mismatch exists between turbine input and generator output.

02

Inertia Constant (H)

The inertia constant H represents the kinetic energy stored in the rotating mass at synchronous speed divided by the generator's MVA rating, measured in seconds. Typical values range from 2-10 seconds for thermal units. A higher H means greater resistance to frequency changes. This parameter is critical for assessing Rate of Change of Frequency (RoCoF) and is diminishing in grids with high inverter-based resource penetration.

03

Damping Torque Component

A damping term K_D * dδ/dt is often added to account for friction, windage losses, and the amortisseur windings' induction effects. This term produces a torque proportional to speed deviation that opposes motion. Positive damping is essential for oscillations to decay; negative damping, often caused by high-gain fast-acting exciters, can lead to growing oscillations and eventual instability.

04

State-Space Representation

The swing equation can be decomposed into two first-order differential equations for state-space analysis: dδ/dt = ω - ω_s and dω/dt = (ω_s/2H)(P_m - P_e - K_D(ω - ω_s)). This formulation is the basis for Dynamic State Estimation using Kalman filters and for embedding physics constraints into Physics-Informed Neural Networks (PINNs).

05

Equal Area Criterion Foundation

The swing equation is the mathematical basis for the Equal Area Criterion, a direct graphical method for first-swing stability assessment. By integrating the equation, the accelerating area (A₁) during a fault must equal the decelerating area (A₂) after fault clearance for the system to remain stable. This yields the Critical Clearing Time—the maximum fault duration before irretrievable loss of synchronism.

06

Multi-Machine Extension

For an n-generator system, the swing equation becomes a set of coupled nonlinear differential equations where P_ei depends on all rotor angles through the network admittance matrix. This coupling gives rise to inter-area modes (0.1-0.8 Hz) and local modes (0.8-2.0 Hz). Generator coherency identification groups machines with identical angle swings, enabling model reduction for large-scale stability studies.

SWING EQUATION DEEP DIVE

Frequently Asked Questions

Explore the fundamental mechanics of the swing equation, the cornerstone of transient stability analysis that governs how synchronous generators respond to disturbances in the power grid.

The swing equation is a second-order nonlinear differential equation that describes the rotational dynamics of a synchronous generator rotor, balancing the mechanical input torque against the electrical output torque. It mathematically models the rotor's angular acceleration as proportional to the net imbalance between the mechanical power supplied by the prime mover (turbine) and the electrical power delivered to the grid. When a fault occurs, this balance is disrupted, causing the rotor angle δ to swing. The equation is typically expressed as (2H/ω_s) * (d²δ/dt²) = P_m - P_e, where H is the inertia constant (in seconds), ω_s is the synchronous speed, P_m is the mechanical power, and P_e is the electrical power output. The term P_m - P_e is the accelerating power; if positive, the rotor speeds up, and if negative, it decelerates. This dynamic is the foundation for all transient stability assessment studies, determining whether a generator will remain in synchronism or lose stability following a major disturbance like a short circuit or line tripping.

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.