A method for operating a generator of a grid-forming
inverter-based resource. The generator has a rotor and a
stator. The method includes receiving, via a controller, an actual generator
signal associated with a reference
signal or a command
signal of the generator. The method also includes determining, via the controller, an expected generator signal associated with the actual generator signal based, at least in part, on a plurality of electrical feedback signals. Further, the method includes determining, via the controller, an
error signal based on a difference between the expected generator signal and the actual generator signal. The
error signal is representative of a rotor
position error with respect to a synchronous
reference frame. Moreover, the method includes correcting, via the controller, a rotor signal associated with a command signal or a feedback signal of the rotor based on the
error signal. In addition, the method includes controlling, via the controller, the generator based on the corrected rotor signal.