Abstract:In order to improve the accuracy and generalization of the thermal error model of CNC machine tools, a thermal error model of and long short term memory convolutional neural network based on attention mechanism (AM-CNN-LSTM) was proposed. A thermal error model with two branches was established by using the ability of convolutional neural networks to extract the space state features of high-dimensional data and the ability of long short term memory networks to extract long-term sequence state features, and the extracted features were input into the attention mechanism to reconstruct according to the importance, and then a feature map of original data and thermal error value was established. Finally, the thermal error prediction value was performed through the full connect layer. The G460L CNC lathe was used to collect experimental data, the temperature and thermal error collected in different seasons were used as the model input, and the model was trained using the cyclic learning rate and regularization optimization method. Compared with the thermal error model of LSTM, ConvLSTM and CNN-LSTM, the results showed that AM-CNN-LSTM model had the strongest ability to restore features and the smallest residual error range. It was decreased by 62.09%, and the prediction accuracy of the model was within 2.4μm.