A control system for a generator configured to provide power to a power grid, the control system comprising: an automatic voltage regulator, AVR, configured to control a generator voltage of the power provided by the generator by controlling a generator excitation voltage of the generator; a memory storing instructions; and a processor configured to execute the instructions and configured to:; receive a first indication of a power grid voltage of power on the power grid receive a second indication of a power grid phase angle of the power on the power grid; receive a third indication of the generator voltage; receive a fourth indication of a generator phase angle of the power provided by the generator; determine a voltage gap between the generator voltage and the power grid voltage and determine a time difference between the generator phase angle and the power grid phase angle; adjust a proportional gain and an integral gain of the AVR based on the voltage gap during synchronization between the power grid and the generator; and generate a signal to cause the generator voltage and the generator phase angle to synchronize with the power grid voltage and the power grid phase angle, respectively, based at least in part on the voltage gap and the time difference; wherein the AVR is further configured to: receive the determined proportional and integral gains; and send generator excitation circuit signals, based on the determined proportional and integral gain, to the generator to control the generator excitation voltage. an automatic voltage regulator, AVR, configured to control a generator voltage of the power provided by the generator by controlling a generator excitation voltage of the generator; a memory storing instructions; and a processor configured to execute the instructions and configured to:; receive a first indication of a power grid voltage of power on the power grid receive a second indication of a power grid phase angle of the power on the power grid; receive a third indication of the generator voltage; receive a fourth indication of a generator phase angle of the power provided by the generator; determine a voltage gap between the generator voltage and the power grid voltage and determine a time difference between the generator phase angle and the power grid phase angle; adjust a proportional gain and an integral gain of the AVR based on the voltage gap during synchronization between the power grid and the generator; and generate a signal to cause the generator voltage and the generator phase angle to synchronize with the power grid voltage and the power grid phase angle, respectively, based at least in part on the voltage gap and the time difference;; receive a first indication of a power grid voltage of power on the power grid receive a second indication of a power grid phase angle of the power on the power grid; receive a third indication of the generator voltage; receive a fourth indication of a generator phase angle of the power provided by the generator; determine a voltage gap between the generator voltage and the power grid voltage and determine a time difference between the generator phase angle and the power grid phase angle; adjust a proportional gain and an integral gain of the AVR based on the voltage gap during synchronization between the power grid and the generator; and generate a signal to cause the generator voltage and the generator phase angle to synchronize with the power grid voltage and the power grid phase angle, respectively, based at least in part on the voltage gap and the time difference; wherein the AVR is further configured to: receive the determined proportional and integral gains; and send generator excitation circuit signals, based on the determined proportional and integral gain, to the generator to control the generator excitation voltage. receive the determined proportional and integral gains; and send generator excitation circuit signals, based on the determined proportional and integral gain, to the generator to control the generator excitation voltage.