Text this: Simulation of the dynamic response of a synchronous generator