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.
Glossary
Swing Equation

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 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.
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.
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.
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.
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.
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).
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.
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.
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.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Master the interconnected concepts surrounding the swing equation—from the physical phenomena it models to the analytical tools and control systems that depend on it.

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.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us