The heterodyne grating interferometer, based on the interference effect of gratings, has achieved widespread applications in the field of high-precision measurements. Its output optical signal, after phase measurement processing, allows for the acquisition of displacement data of the measured object. Among the phase measurement methods, the orthogonal lock-in method obtains two signals containing phase difference information through mixing and filtering. However, the orthogonal lock-in method faces various challenges in practical applications, such as significant sensitivity to filter performance and poor generalization capability. In particular, the need to adjust filter parameters according to changes in the measurement signal frequency limits its practicality and flexibility.To address these challenges, this study proposes an enhanced lock-in method that utilizes pulse counting techniques to roughly estimate the frequency of the measurement signal and generates orthogonal signals for mixing with the measurement signal. Implementation and experiments on the FPGA platform demonstrate that the improved orthogonal lock-in method can achieve a resolution error of tens of picometers, with a maximum measurement speed exceeding 1 m/s. This research outcome effectively enhances the robustness of the lock-in method, aligning more closely with engineering requirements for high-precision phase measurement.