An AI-based fault prediction and diagnosis system and method for CNC machine tools
By monitoring multi-source sensor data and using an improved variational mode decomposition algorithm, wavelet packet energy entropy, and attention mechanism, combined with bidirectional gated recurrent units and improved convolutional neural networks, the problems of multi-physics coupling characteristics and temporal dependence in AI fault prediction and diagnosis of CNC machine tools are solved. This achieves efficient fault early warning and health management, and improves the accuracy of fault identification and the adaptability of the model.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-08
- Publication Date
- 2026-03-13
AI Technical Summary
Existing AI-based fault prediction and diagnosis solutions for CNC machine tools rely on data from a single sensor and ignore the coupling characteristics of multiple physical fields. This results in early fault signals being submerged in noise, and the decomposition of non-stationary vibration signals is prone to mode aliasing. The extraction accuracy of fault-sensitive features is insufficient, and traditional methods cannot dynamically adapt to the importance of features under different working conditions, resulting in poor discriminative power of fused features. A single deep learning model is difficult to take into account both temporal dependence and local impact features, leading to poor accuracy.
By employing multi-source sensor data monitoring, and calculating fault-sensitive features through an improved variational mode decomposition algorithm and wavelet packet energy entropy, combined with attention mechanism for dynamic weighted fusion of features, a hybrid diagnostic model based on bidirectional gated recurrent units and improved convolutional neural networks is constructed to capture temporal dependencies and extract local features, outputting fault prediction probabilities.
It achieves efficient fault early warning and health management for the entire life cycle of CNC machine tools, improves the generalization ability of the diagnostic model and the timeliness of fault identification, enhances the discriminative power of the fused feature vectors and the model's ability to fit complex fault modes, and improves the accuracy of preliminary prediction.
Smart Images

Figure CN120802840B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of fault diagnosis technology, and specifically to an AI-based fault prediction and diagnosis method for CNC machine tools. Background Technology
[0002] AI-based fault prediction and diagnosis for CNC machine tools refers to the process of using artificial intelligence (AI) technology to detect, diagnose, and predict faults in CNC machine tools. This process involves collecting and analyzing various data from the machine tool, such as vibration signals, temperature, and current waveforms, to identify the operating status of the equipment and predict potential faults.
[0003] Existing AI-based fault prediction and diagnosis solutions for CNC machine tools mostly rely on data collection from a single sensor, ignoring the coupling characteristics of multiple physics fields, resulting in early fault signals being submerged in noise. The decomposition of non-stationary vibration signals often uses empirical mode decomposition, which is prone to mode aliasing and insufficient accuracy in extracting fault-sensitive features. In addition, traditional methods use simple splicing or weighted averaging to fuse multi-source data, which cannot dynamically adapt to the importance of features under different working conditions, resulting in poor discriminative power of fused features. Existing single deep learning models are difficult to take into account both temporal dependence and local impact features, resulting in poor accuracy of the model under varying working conditions.
[0004] Therefore, there is an urgent need for a fault prediction and diagnosis method that integrates multimodal fusion, intelligent feature extraction, and multi-algorithm fusion to achieve efficient fault early warning and health management throughout the entire life cycle of CNC machine tools. Summary of the Invention
[0005] The purpose of this invention is to provide an AI-based fault prediction and diagnosis method for CNC machine tools, which solves the technical problem that existing solutions cannot implement efficient fault early warning and health management throughout the entire life cycle of CNC machine tools.
[0006] The objective of this invention can be achieved through the following technical solutions:
[0007] An AI-based fault prediction and diagnosis method for CNC machine tools includes:
[0008] S1: Monitor the operating status of CNC machine tools throughout their entire lifecycle under different working conditions, collect multi-source sensor data and fault record data of the machine tools, extract feature parameters of different time series in the sensor data and construct a high-dimensional feature matrix X(t), label the fault record data as fault type labels Y(t), and combine them to form a labeled diagnostic dataset;
[0009] S2: The non-stationary vibration signal in the high-dimensional feature matrix X(t) is decomposed by an improved variational mode decomposition algorithm to obtain multiple modal components IMF(i), and the fault sensitivity characteristics of each component are calculated by combining wavelet packet energy entropy.
[0010] S3: The current, temperature, spindle speed features and modal component features in the multi-source sensor data are spatiotemporally aligned and dynamically weighted and fused into a fused feature vector F(t) through an attention mechanism.
[0011] S4: Using the fused feature vector F(t) as input and the fault type label Y(t) as output, a hybrid diagnostic model based on bidirectional gated recurrent units and improved convolutional neural networks is constructed. The bidirectional gated recurrent units are used to capture temporal dependencies, and the improved convolutional neural network is used to extract local features and output the preliminary fault prediction probability.
[0012] S5: Real-time acquisition and preprocessing of multi-source sensor data during CNC machine tool operation, input of preprocessed data into the constructed fault diagnosis model, and output of fault diagnosis results.
[0013] Preferably, a high-dimensional feature matrix is constructed by using a sliding window to extract feature vectors from consecutive time steps:
[0014] Where t is the time sample; For a single time step; The feature vector; the window contains =100 time steps, each column corresponds to a feature dimension, a total of 18 dimensions, the number of rows in the matrix is the number of time steps in the window, and the number of columns is the feature dimension;
[0015] When performing matrix dimension calibration, if the total monitoring time is T, then the total number of samples in the feature matrix N = (TW) / S + 1, and the final high-dimensional feature matrix dimension is... S is the sliding window step size; W is the sliding window length.
[0016] Preferably, when configuring the improved variational mode decomposition (VMD) parameters, the number of decomposition layers is first determined adaptively, and the number of decomposition layers K is dynamically optimized based on the kurtosis maximization criterion; a penalty factor α is configured.
[0017] ; where Energy() represents the modal energy concentration, and the optimization objective is to maximize the energy separation of each IMF component.
[0018] Preferably, a time-varying scaling term γ(t) is introduced into the improved variational mode decomposition (VMD) objective function:
[0019] ;in, The set of modal components to be decomposed; Let i be the set of center frequencies of each modal component; i is the index of the modal component. For time partial derivative operators; It is the Dirac delta function; The imaginary unit is represented by *; the convolution operator is also represented by *. Let be the time-domain signal of the i-th modal component; For frequency modulation terms; This is a time-varying scaling factor; It is the square of the Frobenius norm.
[0020] Preferably, when performing modal component decomposition and filtering, the center frequency is initialized. Modal components ;
[0021] Iterative updates are performed using the alternating direction multiplier method:
[0022] ;in, This is the result of the (n+1)th iteration for the i-th modal component; about Minimum search operator; Let be the time-domain signal of the i-th modal component; is a Lagrange multiplier; x is the original input signal; It is the sum of all modal components.
[0023] Preferably, when constructing the energy entropy and sensitivity features, the energy of each sub-band is calculated. ;in, Index the wavelet packet; These are wavelet packet coefficients;
[0024] Normalized energy distribution ;
[0025] Calculate the wavelet packet energy entropy: ;
[0026] Construct a fault-sensitive feature vector: Fsen=[H1,H2,...,Hm], where m is the number of effective IMF components.
[0027] Preferably, the sensor feature matrix Modal feature matrix Concatenate by feature dimension: Where rows represent feature types and columns represent time samples;
[0028] The concatenated data is subjected to min-max normalization to output the joint feature matrix. .
[0029] Preferably, when constructing a hybrid diagnostic model, the training set... Validation set Input is fed into a pre-built hybrid model structure; during feature fusion and classification, bidirectional features are concatenated and compressed using global max pooling. ;
[0030] splicing and , obtain fusion features .
[0031] Preferably, the loss function is configured as follows: Where L is the average batch loss and B is the batch size; The one-hot encoding matrix for the real labels; The model predicts the probability, which represents the probability that the b-th sample is predicted to be of class m.
[0032] An AI-based fault prediction and diagnosis system for CNC machine tools includes:
[0033] Diagnostic data processing module: Monitors the operating status of CNC machine tools throughout their entire lifecycle under different working conditions, collects multi-source sensor data and fault record data of the machine tools, extracts feature parameters of different time series in the sensor data and constructs a high-dimensional feature matrix X(t), labels the fault record data as fault type labels Y(t), and combines them to form a labeled diagnostic dataset;
[0034] Fault-sensitive processing module: The non-stationary vibration signal in the high-dimensional feature matrix X(t) is decomposed by an improved variational mode decomposition algorithm to obtain multiple modal components IMF(i), and the fault-sensitive features of each component are calculated by combining wavelet packet energy entropy.
[0035] The feature vector fusion module aligns the current, temperature, and spindle speed features with the modal component features in the multi-source sensor data in time and space, and dynamically weights and fuses them into a fusion feature vector F(t) through an attention mechanism.
[0036] Hybrid diagnostic model construction module: Taking the fused feature vector F(t) as input and the fault type label Y(t) as output, a hybrid diagnostic model based on bidirectional gated recurrent units and improved convolutional neural networks is constructed. The bidirectional gated recurrent units are used to capture temporal dependencies, and the improved convolutional neural network is used to extract local features and output the preliminary fault prediction probability.
[0037] Fault prediction and diagnosis module: Real-time acquisition and preprocessing of multi-source sensor data during CNC machine tool operation, input of preprocessed data into the constructed fault diagnosis model, and output of fault diagnosis results.
[0038] Compared to existing solutions, the beneficial effects achieved by this invention are:
[0039] This invention ensures data diversity by covering the entire lifecycle and multiple operating conditions of CNC machine tools through data monitoring. By associating high-dimensional feature matrices with fault labels, it provides high-quality labeled data for subsequent model training, effectively improving the generalization ability of the diagnostic model. An improved variational mode decomposition algorithm solves the traditional VMD mode aliasing problem. Combining wavelet packet energy entropy quantification of fault information in each mode enhances the ability to extract sensitive features of early, subtle faults, effectively improving the timeliness of fault identification. Spatiotemporal alignment eliminates the time offset of multi-sensor data, and an attention mechanism adaptively allocates weights to different features, reducing redundant information interference and effectively enhancing the discriminative power of the fused feature vector. By capturing long-term dependencies in feature sequences based on bidirectional gated recurrent units and strengthening local detail features through improved convolutional neural networks, the synergy of these two approaches effectively improves the model's ability to fit complex fault modes and increases the accuracy of initial predictions. Attached Figure Description
[0040] The invention will now be further described with reference to the accompanying drawings.
[0041] Figure 1 This is a flowchart illustrating the steps of implementing an AI-based fault prediction and diagnosis method for CNC machine tools according to the present invention.
[0042] Figure 2 This is a block diagram of an AI fault prediction and diagnosis system based on CNC machine tools according to the present invention. Detailed Implementation
[0043] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0044] Example 1, as Figure 1 As shown, this invention is an AI-based fault prediction and diagnosis method for CNC machine tools, comprising:
[0045] S1: Monitor the operating status of CNC machine tools throughout their entire lifecycle under different working conditions, collect multi-source sensor data and fault record data of the machine tools, extract feature parameters of different time series from the sensor data and construct a high-dimensional feature matrix X(t), label the fault record data as fault type labels Y(t), and combine them to form a labeled diagnostic dataset; the specific steps include:
[0046] When designing operating conditions and formulating monitoring schemes, CNC machine tools are monitored throughout their entire life cycle under three machining loads, four tool wear stages, and three combinations of ambient temperatures.
[0047] Among them, there are three types of processing loads: no load, light load at 50% of rated power, and heavy load at 80% of rated power;
[0048] Four stages of tool wear: new tool, minor wear, moderate wear, and severe wear;
[0049] Three ambient temperatures: 20±2℃, 35±2℃, and 50±2℃;
[0050] Under each working condition combination, the machine tool continuously runs to process typical workpieces, such as thin-walled aerospace aluminum alloy parts. The duration of a single monitoring session is no less than 72 hours, and the cumulative monitoring cycle covers the complete life cycle of the tool from new tool to scrap, for example, no less than 500 hours.
[0051] During the monitoring process, the cutting parameters were set to an orthogonal experimental combination of feed rate 50-200 mm / min, spindle speed 3000-8000 r / min, and depth of cut 0.1-1 mm.
[0052] When collecting data using a distributed sensor array, triaxial vibration acceleration sensors are installed on the spindle box, feed guide rail, and servo motor to collect vibration signals in the X, Y, and Z directions; the sampling frequency is 10kHz and the measurement range is ±50g.
[0053] A Hall current sensor is installed at the power supply end of the servo motor to collect three-phase current signals; the sampling frequency is 5kHz and the accuracy is 0.1%FS.
[0054] Thermocouple temperature sensors are installed at the spindle bearing housing and guide rail slider; the sampling frequency is 1kHz and the measurement range is -40~150℃.
[0055] The machine tool PLC reads the internal parameters of the CNC system in real time. These internal parameters include, but are not limited to, spindle load rate, feed axis position deviation, and hydraulic system pressure.
[0056] All sensor data is synchronously transmitted to the edge computing terminal via industrial Ethernet, with a timestamp synchronization accuracy of ≤1ms.
[0057] When preprocessing the raw sensor data, a wavelet threshold denoising algorithm is used to eliminate cutting noise in the vibration signal, and a 50Hz notch filter is used to remove power frequency interference from the current signal.
[0058] When extracting feature parameters from the processed time-domain signal, 12 time-domain features are extracted: root mean square value, peak factor, kurtosis, waveform factor, impulse factor, margin factor, variance, maximum value, minimum value, temperature change rate, current RMS value, and energy value.
[0059] The spectral features of the 500-5000Hz frequency band are extracted by Fast Fourier Transform (FFT). This involves performing FFT on a 1024-point time-domain signal to obtain a frequency resolution Δf = fs / N = 10kHz / 1024 ≈ 9.766Hz spectrum X(k), where fs is the sampling frequency, k is the frequency point index, and k = 0, 1, ..., N / 2.
[0060] Extract the three maximum peak frequencies fp1, fp2, fp3 and their corresponding amplitudes Ap1, Ap2, and Ap3 within the 500-5000Hz frequency band;
[0061] The vibration signal was decomposed into 3 levels using db4 wavelet packets, resulting in 8 sub-bands. The energy proportion of each sub-band was then calculated. , For the energy of the j-th subband, calculate the energy entropy H:
[0062] ;
[0063] Single time step The 12 time-domain features and 6 frequency-domain features are combined to form a feature vector. The frequency domain characteristics include 3 peak frequencies, 3 amplitudes, and 1 energy entropy.
[0064] A sliding window is used to extract feature vectors for consecutive time steps, with a window size W = 10s and a step size S = 5s, to construct a high-dimensional feature matrix:
[0065] Where t is the time sample; the window contains =100 time steps, each column corresponds to a feature dimension, for a total of 18 dimensions. The number of rows in the matrix is the number of time steps within the window, and the number of columns is the feature dimension.
[0066] When performing matrix dimension calibration, if the total monitoring time is T (in seconds), then the total number of samples in the feature matrix N = (TW) / S + 1, and the final high-dimensional feature matrix dimension is... S is the sliding window step size; W is the sliding window length; where, the three-dimensional tensor has the following dimensions: first dimension is the number of samples, second dimension is the time step, and third dimension is the feature dimension.
[0067] When performing fault labeling and dataset partitioning, fault record data is obtained in three ways:
[0068] (1) Fault codes recorded by the machine tool's built-in alarm system, such as 3005 spindle overload;
[0069] (2) Hidden faults discovered by manual inspection, such as abnormal noise from the gearbox and crawling of the guide rail;
[0070] (3) Faults artificially introduced during accelerated aging tests, such as cracks in the inner ring of the bearing or excessive clearance in the lead screw nut;
[0071] The fault types are divided into 12 typical faults, such as bearing wear, motor demagnetization, and insufficient guide rail lubrication. Each fault sample is labeled with the fault occurrence time t0, fault level, and maintenance record. The fault level includes minor, moderate, and severe. The fault level classification rules can be customized according to the application requirements of the actual application scenario.
[0072] The fault label is defined as a 12-dimensional vector Y(t) = [y1, y2, ..., y12], where yk represents the k-th type of fault, and the fault occurrence time is accurately labeled through cross-correlation analysis;
[0073] The feature matrix X(t) and fault label Y(t) are aligned using a sliding window method to form a labeled time series dataset, which is then divided into training, validation, and test sets in a 7:2:1 ratio; the window size is 10s and the step size is 5s.
[0074] Outlier samples were removed using the Laida criterion (3σ rule), and missing data were filled using LSTM-based time series interpolation.
[0075] To address the imbalanced fault sample problem, the SMOTE-ENN algorithm is used to oversample the fault samples of the minor class, ensuring that the difference in the number of samples between the classes is ≤10%.
[0076] The final diagnostic dataset includes a feature matrix X(t), fault labels Y(t), and corresponding operating condition parameter metadata; among which, the operating condition parameter metadata includes, but is not limited to, load and temperature.
[0077] In this embodiment of the invention, by covering the entire life cycle and multiple working conditions of CNC machine tools, the diversity of data can be ensured. By associating high-dimensional feature matrices with fault labels, high-quality labeled data can be provided for subsequent model training, which can effectively improve the generalization ability of the diagnostic model.
[0078] S2: The non-stationary vibration signal in the high-dimensional feature matrix X(t) is decomposed using an improved variational mode decomposition algorithm to obtain multiple modal components IMF(i), and the fault sensitivity characteristics of each component are calculated by combining wavelet packet energy entropy; the specific steps include:
[0079] The vibration signal components in the high-dimensional feature matrix X(t) are preprocessed by adaptive wavelet threshold denoising and empirical mode decomposition (EMD) detrending; these are all existing conventional technical solutions, and the specific implementation steps are not described here.
[0080] The preprocessed vibration signal is divided into single time steps. The system is segmented, with each segment containing 1024 sampling points. The samples are then uniformly resampled to 10kHz using linear interpolation to ensure consistent time-domain resolution.
[0081] When configuring the improved variational mode decomposition (VMD) parameters, the number of decomposition layers is first determined adaptively, and then the number of decomposition layers K is dynamically optimized based on the kurtosis maximization criterion.
[0082] Initialize K=2, calculate the kurtosis values of each modal component. ;
[0083] when The iteration stops when K is less than 0.1, and the final value of K ranges from 3 to 8.
[0084] Configure penalty factor α:
[0085] Where Energy() represents the modal energy concentration, and the optimization objective is to maximize the energy separation of each IMF component;
[0086] Introduce a time-varying scaling term γ(t) into the objective function of the improved variational mode decomposition (VMD):
[0087] ;in, The set of modal components to be decomposed; Let i be the set of center frequencies of each modal component; i is the index of the modal component. For time partial derivative operators; It is the Dirac delta function; The imaginary unit is represented by *; the convolution operator is also represented by *. Let be the time-domain signal of the i-th modal component; For frequency modulation terms; This is a time-varying scaling factor; The square of the Frobenius norm;
[0088] When performing modal component decomposition and filtering, the center frequency is initialized. Modal components ;
[0089] Iterative updates are performed using the alternating direction multiplier method:
[0090] ;in, This is the result of the (n+1)th iteration for the i-th modal component; about Minimum search operator; Let be the time-domain signal of the i-th modal component; is a Lagrange multiplier; x is the original input signal; This is the superposition of all modal components;
[0091] Iteration termination condition:
[0092] ;
[0093] The decomposition yields K modal components IMF(i); i = 1, 2, ..., K; K is the total number of decomposition levels;
[0094] Screening fault-related IMFs based on correlation coefficient threshold:
[0095] ;in, Pearson correlation coefficient; For covariance; Let x(t) be the standard deviation of the original signal. Let be the standard deviation of the i-th IMF;
[0096] reserve For components >0.3, noise-dominated IMFs are removed; typically, high-frequency components i>K / 2.
[0097] When performing wavelet packet energy entropy calculation, a 3-level wavelet packet decomposition is performed on each filtered IMF component:
[0098] Wavelet basis function: db4; which supports transient feature extraction of non-stationary signals;
[0099] Number of decomposition layers: 3; resulting in 8 sub-bands with a frequency resolution of Δf = 625 Hz.
[0100] Reconfigured sub-frequency band range: 200-5000Hz, targeting typical fault frequencies of CNC machine tools;
[0101] When constructing energy entropy and sensitivity features, the energy of each sub-band is calculated. ;in, Index the wavelet packet; These are wavelet packet coefficients;
[0102] Normalized energy distribution ;
[0103] Calculate the wavelet packet energy entropy: ;
[0104] Construct a fault-sensitive feature vector: Fsen=[H1,H2,...,Hm], where m is the number of effective IMF components;
[0105] When performing feature saliency assessment and dimensionality reduction, the correlation between features and fault labels is evaluated using mutual information (MI). Where Y is the set of fault labels; y is a single label in Y; h is... The value of a single feature in; It is a joint probability distribution; for The marginal probability distribution; The marginal probability distribution of label Y; The log-likelihood ratio;
[0106] Retain the top 80% of features with MI values and remove redundant components, i.e., features with MI < 0.1;
[0107] Perform fractional differentiation on the filtered feature vectors:
[0108] ;in, Γ is the ν-th order fractional derivative; ν is the fractional order, with a default value of 0.5, and Γ() is the Gamma function, which enhances fault identification by increasing the dynamic rate of change of the feature. The first-order integer derivative operator with respect to time t; For integration variables; It is a fractional integral kernel function; For the i-th feature set at historical time The possible values of ; It is an integral infinitesimal element.
[0109] Empirical mode decomposition (VMD) is commonly used for decomposing non-stationary vibration signals, but it is prone to mode aliasing and insufficient accuracy in extracting fault-sensitive features. In this embodiment of the invention, an improved variational mode decomposition algorithm is used to solve the mode aliasing problem of traditional VMD. By combining wavelet packet energy entropy quantization of fault information of each mode, the ability to extract sensitive features of early weak faults can be enhanced, and the timeliness of fault identification can be effectively improved.
[0110] S3: Spatiotemporally align the current, temperature, and spindle speed features with the modal component features from multi-source sensor data, and dynamically weight and fuse them into a fused feature vector F(t) using an attention mechanism; the specific steps include:
[0111] Z-score normalization is performed on the current, temperature, and spindle speed characteristics in the multi-source sensor data: ;in, This is the sensor feature matrix, with 3 sensors and N sampling points; , The mean and standard deviation of the sensor data;
[0112] The modal component features are subjected to the same standardization process to obtain the modal feature matrix. K is the number of IMF components;
[0113] Get Original timestamp , Original timestamp Because VMD decomposition involves a time delay, ≠ ;
[0114] Using the spindle encoder pulse signal as the reference clock, and Convert to angular domain timestamp θ = 2πn(t)t; n(t) is the instantaneous spindle speed;
[0115] Using linear interpolation Resampling to The time grid makes = ;
[0116] Among them, resampling interval Synchronization error < 1ms; The sampling frequency;
[0117] Output time-aligned sensor feature matrix Modal feature matrix ;
[0118] sensor feature matrix Modal feature matrix Concatenate by feature dimension: Where rows represent feature types and columns represent time samples;
[0119] The concatenated data is subjected to min-max normalization to output the joint feature matrix. ;
[0120] Obtain the fault label set Y, and calculate feature priority based on mutual information. ;
[0121] For each time sample t, the local response is calculated using the softmax function. Where W is a learnable parameter and d is the feature dimension;
[0122] Through formula Fuse the weights and output a time-varying attention weight matrix. ;
[0123] When performing weighted fusion, ;
[0124] Summing along the feature dimension The data is compressed into single-channel fused features, and a fused feature vector is output. .
[0125] Traditional methods that use simple splicing or weighted averaging to fuse multi-source data cannot dynamically adapt to the importance of features under different operating conditions, resulting in poor discriminative power of the fused features. In this embodiment of the invention, the temporal offset of multi-sensor data is eliminated by spatiotemporal alignment, and the weights of different features are adaptively allocated using an attention mechanism. This reduces interference from redundant information and effectively enhances the discriminative power of the fused feature vector.
[0126] S4: Using the fused feature vector F(t) as input and the fault type label Y(t) as output, a hybrid diagnostic model based on bidirectional gated recurrent units and improved convolutional neural networks is constructed. The bidirectional gated recurrent units capture temporal dependencies, and the improved convolutional neural network extracts local features to output a preliminary fault prediction probability. Specific steps include:
[0127] When constructing a hybrid diagnostic model, the training set Validation set Input to a pre-built hybrid model structure;
[0128] The hybrid model structure is a cascaded structure of a bidirectional gated recurrent unit (Bi-GRU) and an improved convolutional neural network (CNN), including a Bi-GRU temporal feature extraction module.
[0129] Number of layers: 2 (forward GRU + backward GRU), number of hidden units H=64, dropout rate=0.3;
[0130] Output: Bidirectional feature concatenation 2H=128, due to bidirectional splicing;
[0131] Improved CNN local feature extraction module:
[0132] Convolutional layer 1: 3×3 convolutional kernels, number 32; stride 1; padding "same"; activation function ReLU;
[0133] Attention layer: Channel attention module (CAM), which generates weights for 32 channels. Weighted output ;
[0134] Convolutional layer 2: 3×3 convolutional kernels, 64 kernels; stride 1, padding "same"; activation function LeakyReLU;
[0135] Global pooling: for Perform global average pooling and output ;
[0136] When performing feature fusion and classification, the bidirectional features are concatenated and compressed using global max pooling. ;
[0137] splicing and , obtain fusion features ;
[0138] Fully connected layer: The output layer is activated using Softmax to obtain the predicted probability. ;
[0139] Configure the loss function: Where L is the average batch loss and B is the batch size; The one-hot encoding matrix for the real labels; The model predicts the probability, which represents the probability that the b-th sample is predicted to be of class m.
[0140] In addition, the optimizer is configured as AdamW, with weight decay λ=1e-4; initial learning rate η=1e-3; and cosine annealing scheduling, which decays to 0.5 times the current value every 5 epochs.
[0141] Early stop training was used, with 50 training rounds, a batch size of 32, and a regularization coefficient of 1e-4.
[0142] Output the trained hybrid diagnostic model;
[0143] test set Input the trained hybrid diagnostic model and output the preliminary fault prediction probability.
[0144] It should be noted that bidirectional gated recurrent units can capture the long-term temporal dependence of fused features, such as the fault development trend. Improved convolutional neural networks enhance key local features, such as the peak position of the impact pulse, through the attention mechanism. The two complement each other and can effectively improve the model's ability to identify complex fault modes.
[0145] The selection of loss function and optimizer is crucial for small sample fault data. In industrial scenarios, the proportion of fault samples is usually less than 5%, which can effectively mitigate the risk of overfitting.
[0146] Existing single deep learning models struggle to simultaneously capture temporal dependencies and local impact features, resulting in poor accuracy under varying operating conditions. In this embodiment of the invention, long-term dependencies in feature sequences are captured using bidirectional gated recurrent units, and local detail features are enhanced by improving convolutional neural networks. The synergy of these two approaches can effectively improve the model's ability to fit complex fault modes and increase the accuracy of initial predictions.
[0147] S5: Real-time acquisition and preprocessing of multi-source sensor data during CNC machine tool operation, input of preprocessed data into the constructed fault diagnosis model, and output of fault diagnosis results.
[0148] Among them, the preprocessing of multi-source sensor data collected in real time during the operation of CNC machine tools is carried out through steps S2-S3, and the target fusion feature vector is output.
[0149] The fault diagnosis model is constructed by inputting the target fusion feature vector and outputting a fault probability vector and a fault type label.
[0150] In this embodiment of the invention, the end-to-end real-time processing link meets the real-time requirements of industrial sites, automatically outputs fault probability vectors and fault type labels, and realizes the transformation from passive maintenance to proactive early warning, which can effectively reduce machine tool downtime losses.
[0151] Example 2, as Figure 2 As shown, an AI-based fault prediction and diagnosis system for CNC machine tools includes:
[0152] Diagnostic data processing module: Monitors the operating status of CNC machine tools throughout their entire lifecycle under different working conditions, collects multi-source sensor data and fault record data of the machine tools, extracts feature parameters of different time series in the sensor data and constructs a high-dimensional feature matrix X(t), labels the fault record data as fault type labels Y(t), and combines them to form a labeled diagnostic dataset;
[0153] Fault-sensitive processing module: The non-stationary vibration signal in the high-dimensional feature matrix X(t) is decomposed by an improved variational mode decomposition algorithm to obtain multiple modal components IMF(i), and the fault-sensitive features of each component are calculated by combining wavelet packet energy entropy.
[0154] The feature vector fusion module aligns the current, temperature, and spindle speed features with the modal component features in the multi-source sensor data in time and space, and dynamically weights and fuses them into a fusion feature vector F(t) through an attention mechanism.
[0155] Hybrid diagnostic model construction module: Taking the fused feature vector F(t) as input and the fault type label Y(t) as output, a hybrid diagnostic model based on bidirectional gated recurrent units and improved convolutional neural networks is constructed. The bidirectional gated recurrent units are used to capture temporal dependencies, and the improved convolutional neural network is used to extract local features and output the preliminary fault prediction probability.
[0156] Fault prediction and diagnosis module: Real-time acquisition and preprocessing of multi-source sensor data during CNC machine tool operation, input of preprocessed data into the constructed fault diagnosis model, and output of fault diagnosis results.
[0157] In the several embodiments provided by this invention, it should be understood that the disclosed system can be implemented in other ways. For example, the embodiments of the invention described above are merely illustrative; for example, the division of modules is only a logical functional division, and there may be other division methods in actual implementation.
[0158] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0159] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated module can be implemented in hardware or in the form of hardware plus software functional modules.
[0160] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the essential characteristics of the present invention.
[0161] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. An AI-based fault prediction and diagnosis method for CNC machine tools, characterized in that, include: S1: Monitor the operating status of CNC machine tools throughout their entire lifecycle under different working conditions, collect multi-source sensor data and fault record data of the machine tools, extract feature parameters of different time series in the sensor data and construct a high-dimensional feature matrix X(t), label the fault record data as fault type labels Y(t), and combine them to form a labeled diagnostic dataset; S2: The non-stationary vibration signal in the high-dimensional feature matrix X(t) is decomposed by an improved variational mode decomposition algorithm to obtain multiple modal components IMF(i), and the fault sensitivity characteristics of each component are calculated by combining wavelet packet energy entropy. S3: The current, temperature, spindle speed features and modal component features in the multi-source sensor data are spatiotemporally aligned and dynamically weighted and fused into a fused feature vector F(t) through an attention mechanism. S4: Using the fused feature vector F(t) as input and the fault type label Y(t) as output, a hybrid diagnostic model based on bidirectional gated recurrent units and improved convolutional neural networks is constructed. The bidirectional gated recurrent units are used to capture temporal dependencies, and the improved convolutional neural network is used to extract local features and output the preliminary fault prediction probability. S5: Real-time acquisition and preprocessing of multi-source sensor data during CNC machine tool operation, input of preprocessed data into the constructed fault diagnosis model, and output of fault diagnosis results.
2. The AI-based fault prediction and diagnosis method for CNC machine tools according to claim 1, characterized in that, By using a sliding window to extract feature vectors from consecutive time steps, a high-dimensional feature matrix is constructed: Where t is the time sample; For a single time step; The feature vector; the window contains =100 time steps, each column corresponds to a feature dimension, a total of 18 dimensions, the number of rows in the matrix is the number of time steps in the window, and the number of columns is the feature dimension; When performing matrix dimension calibration, if the total monitoring time is T, then the total number of samples in the feature matrix N = (TW) / S + 1, and the final high-dimensional feature matrix dimension is... S is the sliding window step size; W is the sliding window length.
3. The AI-based fault prediction and diagnosis method for CNC machine tools according to claim 2, characterized in that, When configuring the improved variational mode decomposition (VMD) parameters, the number of decomposition layers is first determined adaptively, and the number of decomposition layers K is dynamically optimized based on the kurtosis maximization criterion; the penalty factor α is then configured. ; where Energy() represents the modal energy concentration, and the optimization objective is to maximize the energy separation of each IMF component.
4. The AI-based fault prediction and diagnosis method for CNC machine tools according to claim 3, characterized in that, Introduce a time-varying scaling term γ(t) into the objective function of the improved variational mode decomposition (VMD): ;in, The set of modal components to be decomposed; Let i be the set of center frequencies of each modal component; i is the index of the modal component. For time partial derivative operators; It is the Dirac delta function; The imaginary unit is represented by *; the convolution operator is also represented by *. Let be the time-domain signal of the i-th modal component; For frequency modulation terms; This is a time-varying scaling factor; It is the square of the Frobenius norm.
5. The AI-based fault prediction and diagnosis method for CNC machine tools according to claim 4, characterized in that, When performing modal component decomposition and filtering, the center frequency is initialized. Modal components ; Iterative updates are performed using the alternating direction multiplier method: ;in, This is the result of the (n+1)th iteration for the i-th modal component; about Minimum search operator; Let be the time-domain signal of the i-th modal component; is a Lagrange multiplier; x is the original input signal; It is the sum of all modal components.
6. The AI-based fault prediction and diagnosis method for CNC machine tools according to claim 5, characterized in that, When constructing energy entropy and sensitivity features, the energy of each sub-band is calculated. ;in, Index the wavelet packet; These are wavelet packet coefficients; Normalized energy distribution ; Calculate the wavelet packet energy entropy: ; Construct a fault-sensitive feature vector: Fsen=[H1,H2,...,Hm], where m is the number of effective IMF components.
7. The AI-based fault prediction and diagnosis method for CNC machine tools according to claim 6, characterized in that, sensor feature matrix Modal feature matrix Concatenate by feature dimension: Where rows represent feature types and columns represent time samples; The concatenated data is subjected to min-max normalization to output the joint feature matrix. .
8. The AI-based fault prediction and diagnosis method for CNC machine tools according to claim 7, characterized in that, When constructing a hybrid diagnostic model, the training set Validation set Input to a pre-built hybrid model structure; When performing feature fusion and classification, the bidirectional features are concatenated and compressed using global max pooling. ; splicing and , obtain fusion features .
9. The AI-based fault prediction and diagnosis method for CNC machine tools according to claim 8, characterized in that, Configure the loss function: Where L is the average batch loss and B is the batch size; The one-hot encoding matrix for the real labels; The model predicts the probability, which represents the probability that the b-th sample is predicted to be of class m.
10. An AI-based fault prediction and diagnosis system for CNC machine tools, characterized in that, include: Diagnostic data processing module: Monitors the operating status of CNC machine tools throughout their entire lifecycle under different working conditions, collects multi-source sensor data and fault record data of the machine tools, extracts feature parameters of different time series in the sensor data and constructs a high-dimensional feature matrix X(t), labels the fault record data as fault type labels Y(t), and combines them to form a labeled diagnostic dataset; Fault-sensitive processing module: The non-stationary vibration signal in the high-dimensional feature matrix X(t) is decomposed by an improved variational mode decomposition algorithm to obtain multiple modal components IMF(i), and the fault-sensitive features of each component are calculated by combining wavelet packet energy entropy. The feature vector fusion module aligns the current, temperature, and spindle speed features with the modal component features in the multi-source sensor data in time and space, and dynamically weights and fuses them into a fusion feature vector F(t) through an attention mechanism. Hybrid diagnostic model construction module: Taking the fused feature vector F(t) as input and the fault type label Y(t) as output, a hybrid diagnostic model based on bidirectional gated recurrent units and improved convolutional neural networks is constructed. The bidirectional gated recurrent units are used to capture temporal dependencies, and the improved convolutional neural network is used to extract local features and output the preliminary fault prediction probability. Fault prediction and diagnosis module: Real-time acquisition and preprocessing of multi-source sensor data during CNC machine tool operation, input of preprocessed data into the constructed fault diagnosis model, and output of fault diagnosis results.
Citation Information
Patent Citations
Machine tool servo drive system health management method based on improved GRU and SOM neural network
CN117032074A
Hydraulic motor fault diagnosis method and system based on heterogeneous asynchronous data fusion
CN120256831A