# Swing equation

A power system consists of a number of synchronous machines operating synchronously under all operating conditions. Under normal operating conditions, the relative position of the rotor axis and the resultant magnetic field axis is fixed. The angle between the two is known as the power angle, torque angle, or rotor angle. During any disturbance, the rotor decelerates or accelerates with respect to the synchronously rotating air gap magnetomotive force, creating relative motion. The equation describing the relative motion is known as the swing equation, which is a non-linear second order differential equation that describes the swing of the rotor of synchronous machine. The power exchange between the mechanical rotor and the electrical grid due to the rotor swing (acceleration and deceleration) is called Inertial response.

## Derivation

A synchronous generator is driven by a prime mover. The equation governing the rotor motion is given by: $J{\frac {d^{2}{\theta _{\text{m}}}}{dt^{2}}}=T_{a}=T_{\text{m}}-T_{\text{e}},$ where:
* $J$ is the total moment of inertia of the rotor mass in kg-m$^2$
* $\theta _{\text{m}}$ is the angular position of the rotor with respect to a stationary axis in radians (rad)
* $t$ is time in seconds (s)
* $T_{a}$ is the net accelerating torque, in N-m
* $T_{\text{m}}$ is the mechanical torque supplied by the prime mover in N-m
* $T_{\text{e}}$ is the electrical torque output of the alternator in N-m
Neglecting losses, the difference between the mechanical and electrical torque gives the net accelerating torque $T_{a}$. In the steady state, the electrical torque is equal to the mechanical torque and hence the accelerating power is zero. During this period the rotor moves at synchronous speed $\omega _{s}$ in rad/s. The electric torque $T_{\text{e}}$ corresponds to the net air-gap power in the machine and thus accounts for the total output power of the generator plus $|I|^{2}R$ losses in the armature winding.
The angular position $\theta$ is measured with a stationary reference frame. Representing it with respect to the synchronously rotating frame gives: $\theta _{\text{m}}=\omega _{\text{s}}t+\delta _{\text{m}},$ where $\delta _{m}$ is the angular position with respect to the synchronously rotating reference frame. The derivative of the above equation with respect to time is: ${\frac {d\theta _{\text{m}}}{dt}}=\omega _{\text{s}}+{\frac {d\delta _{\text{m}}}{dt}}.$ The above equations show that the rotor angular speed is equal to the synchronous speed only when $d\delta _{m}/dt$ is equal to zero. Therefore, the term $d\delta _{m}/dt$ represents the deviation of the rotor speed from synchronism in rad/s.
By taking the second order derivative of the above equation it becomes: ${\frac {d^{2}\theta _{\text{m}}}{dt^{2}}}={\frac {d^{2}\delta _{\text{m}}}{dt^{2}}}.$ Substituting the above equation in the equation of rotor motion gives: $J{\frac {d^{2}{\delta _{\text{m}}}}{dt^{2}}}=T_{a}=T_{\text{m}}-T_{\text{e}}.$ Multiplying both sides by the angular velocity of the rotor, given by $\omega _{\text{m}}={\frac {d\theta _{\text{m}}}{dt}},$ results in $J\omega _{\text{m}}{\frac {d^{2}{\delta _{\text{m}}}}{dt^{2}}}=P_{a}=P_{\text{m}}-P_{\text{e}},$ where $P_{a}$, $P_{\text{m}}$ and $P_{\text{e}}$ respectively are the accelerating, mechanical and electrical (active) power in Watt (W). Intuitivley, the equation can also be derived by taking the time derivative of the rotational energy.
The coefficient $J\omega _{\text{m}}$ is the angular momentum of the rotor at synchronous speed $\omega _{\text{s}}$. In machine data supplied for stability studies this coefficient is often denoted by $M$ and called the inertia constant of the machine. In practice, $\omega _{\text{m}}$ does not differ significantly from synchronous speed when the machine is in steady state; allowing for another constant of inertia: $H={\frac {{\frac {1}{2}}J\omega _{\text{s}}^{2}}{S_{\text{rated}}}}={\frac {{\frac {1}{2}}M\omega _{\text{s}}}{S_{\text{rated}}}}={\frac {\text{stored kinetic energy in mega joules at synchronous speed}}{\text{machine rating in MVA}}},$ where $S_{\text{rated}}$ is the three phase rating of the machine in MVA. Substituting in the above equation $2H{\frac {S_{\text{rated}}}{\omega _{\text{s}}^{2}}}\omega _{\text{m}}{\frac {d^{2}{\delta _{\text{m}}}}{dt^{2}}}=P_{\text{m}}-P_{\text{e}}=P_{a}.$ Since $P_{\text{m}}$, $P_{\text{e}}$ and $P_{a}$ in the machine data are given in MW, dividing them by the generator MVA rating gives these quantities in per unit. Dividing the above equation on both sides by $S_{\text{rated}}$ gives
${\frac {2H}{\omega _{\text{s}}}}{\frac {d^{2}{\delta }}{dt^{2}}}=P_{\text{m}}-P_{e}=P_{a}$ per unit
The above equation describes the behaviour of the rotor dynamics and hence is known as the swing equation. The angle $\delta$ is the angle of the internal EMF of the generator and it dictates the amount of power that can be transferred. This angle is therefore called the load angle.