Surface roughness classification of drilling for CNC machine tools based on RepViT and dual-channel STFT-GAF feature fusion - Chen, Gang; Chen, Zhihao; Peng, Wang; Wang, Wenyu; Zhao, Haijun (Measurement science & technology, 2025)
Surface roughness serves as a critical indicator of part processing quality in modern manufacturing, directly impacting product performance and service life. Traditional prediction methods suffer from issues such as insufficient feature extraction, high computational costs, and an imbalance between prediction accuracy and efficiency under complex nonlinear machining conditions. To address these challenges, this study proposes a surface roughness classification and prediction method based on the innovative combination of short-time Fourier transform-Gram angle field (STFT-GAF) dual-channel fusion and lightweight RepViT, and designs a multi-source heterogeneous data acquisition system to obtain dynamic data during the machining process. This method utilizes the STFT to convert the vibration signals of the computer numerical control (CNC) machine tool spindle into a spectrum diagram, capturing the local time–frequency characteristics of the signal. Simultaneously, the GAF encodes one-dimensional time-series data into a two-dimensional image matrix, extracting time-series dependencies and periodic features to achieve complementary feature extraction across dual channels. Based on this, a lightweight RepViT model is introduced, which reconstructs the multi-head attention mechanism through reparameterization techniques, maintaining high accuracy while significantly reducing computational and parameter costs. The model performs convolution operations on both the spectral plot and Gram angle field plot through dual-channel processing, achieving deep feature fusion. It also employs an improved RepViT model and hierarchical attention mechanism to perform global-local feature extraction, significantly enhancing feature representation capabilities. Comparison experiments show that compared with network models such as DenseNet, ShuffleNet, and ResNet, this method achieves training accuracy, validation accuracy, and testing accuracy of 82.9%, 80.4%, and 80.0%, respectively, in surface roughness classification prediction. With improvements of 5.0%, 12.2%, and 12.5% over the next-best model, respectively, fully validating the effectiveness of the innovative combination of three-axis STFT-GAF dual-channel fusion and lightweight RepViT.