Based on the analysis of rotor fault and its corresponding axial trajectory, the simulation of axial trajectory is carried out by using MATLAB. According to the automatic identification of axis locus of rotating machinery, a characterization of axial trajectory based on Hu invariant moment is studied. The frequency characteristic of the vibration signal improves the search strategy of the matching algorithm, and proposes a fast matching method with variable step size. The method consists of two parts, rough matching and fine matching. The coarse matching ensures the fastness of the algorithm and quick classification of the running state. The fine matching ensures the accuracy of the matching result. The results show that the feature of the axis locus extracted by Hu invariant moments The recognition rate of rotating machinery can provide a reference for the automatic identification of rotor fault diagnosis.