A generator control system comprising: a generator adapted to generate electrical power; a variable displacement pump that drives a motor that drives the generator; an engine adapted to drive said variable displacement pump; a generator speed sensor that monitors the speed of the generator and generates a measurement output signal that corresponds to the speed of the generator; a generator speed controller that receives the measurement output signal from the generator speed sensor and generates a control signal that controls the displacement of the variable displacement pump, wherein: the generator speed controller applies default commanded event control gain values to the control signal when a commanded change in the load or speed of the engine or generator occurs, wherein the generator speed controller applies uncommanded event control gain values to the control signal in the absence of a commanded change in load or speed of the engine or generator, said uncommanded event control gain values being equal to or less than said commanded event control gain values; and the generator speed controller compares a magnitude of generator speed surging that results from applying the uncommanded event control gain values to a threshold value and reduces the uncommanded event control gain values as needed until the magnitude of generator speed surging is less than the threshold value or until a minimum uncommanded event control gain value threshold is reached, characterized in that the magnitude of generator speed surging is calculated as the average value of the absolute value of the difference between measured generator speed and a target generator speed over a time period. a generator adapted to generate electrical power; a variable displacement pump that drives a motor that drives the generator; an engine adapted to drive said variable displacement pump; a generator speed sensor that monitors the speed of the generator and generates a measurement output signal that corresponds to the speed of the generator; a generator speed controller that receives the measurement output signal from the generator speed sensor and generates a control signal that controls the displacement of the variable displacement pump, wherein: the generator speed controller applies default commanded event control gain values to the control signal when a commanded change in the load or speed of the engine or generator occurs, wherein the generator speed controller applies uncommanded event control gain values to the control signal in the absence of a commanded change in load or speed of the engine or generator, said uncommanded event control gain values being equal to or less than said commanded event control gain values; and the generator speed controller compares a magnitude of generator speed surging that results from applying the uncommanded event control gain values to a threshold value and reduces the uncommanded event control gain values as needed until the magnitude of generator speed surging is less than the threshold value or until a minimum uncommanded event control gain value threshold is reached, characterized in that the magnitude of generator speed surging is calculated as the average value of the absolute value of the difference between measured generator speed and a target generator speed over a time period. the generator speed controller applies default commanded event control gain values to the control signal when a commanded change in the load or speed of the engine or generator occurs, wherein the generator speed controller applies uncommanded event control gain values to the control signal in the absence of a commanded change in load or speed of the engine or generator, said uncommanded event control gain values being equal to or less than said commanded event control gain values; and the generator speed controller compares a magnitude of generator speed surging that results from applying the uncommanded event control gain values to a threshold value and reduces the uncommanded event control gain values as needed until the magnitude of generator speed surging is less than the threshold value or until a minimum uncommanded event control gain value threshold is reached, characterized in that the magnitude of generator speed surging is calculated as the average value of the absolute value of the difference between measured generator speed and a target generator speed over a time period.