Power system stability: rotor dynamics and the swing equation