In this paper, an algorithm is suggested to detect an offset angle of the absolute rotor position sensor after the initial assembly of a PMSG. Unlike previous studies in a stationary state, this one is not designed to detect an electrical angle but rather the absolute position of the rotor is detected while operating the generator. Also,a position sensor, current sensors and voltage sensor were used to ensure reliability. This technique completes the detection of the sensor offset in two steps. In the first step, a zero-crossing of the EMF is measured using a voltage sensor to detect the electrical angle offset when the alternator is actuated by the engine. In the second step, a high frequency current is injected along the d-axis on-line during the control of the generation, eventually to obtain the inductance using a DFT (Discrete Fourier Transform), and then to ultimately extract the final electrical angle offset through the comparison of the inductance magnitude. The suggested algorithm was validated with PSIM simulation and, furthermore, was tested with actual experiments on a dynamometer.