Abstract:The traditional fault diagnosis methods are easy to be affected by the installation position of vibration sensor and the accuracy of fault diagnosis is not high.To overcome the problem,an attention mechanism convolutional neural networks gated recurrent unit (AM-CNN-GRU) based on attention mechanism was proposed.The current,voltage and temperature of the feed axis of NC machine tool were used as the input data in the method.To extract the spatiotemporal information in the data and improve the accuracy of fault diagnosis,a spatiotemporal feature extraction structure composed of CNN and GRU in parallel was designed.In order to verify the accuracy of the proposed method,the real-time monitoring and data acquisition software for NC machine tool was compiled by using the FOCAS data development package provided by FANUC NC,the data were collected on G460L NC lathe,and the collected data were used to train the fault diagnosis model.Comparing the proposed fault diagnosis method with the relevant methods,the accuracy is 9875%,which shows that the proposed method is effective and practical.