Frequency response testing of synchronous machines