A compensation prediction method and system for CNC machine tool spindle status diagnosis
By reconstructing the spindle trajectory of CNC machine tools through non-contact laser displacement sensors and deep transfer learning networks, the problems of large data volume and low feature extraction efficiency in spindle status diagnosis in existing technologies are solved, and high-precision spindle status identification and compensation prediction are achieved.
Patent Information
- Application Number
- CN202510051917.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-14
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-01-14
AI Technical Summary
In the existing technology of spindle status diagnosis of CNC machine tools, the amount of data to be diagnosed is large, the feature extraction efficiency is low, and the signal processing algorithm is difficult to cope with various states, resulting in inaccurate identification of the spindle status type.
A non-contact laser displacement sensor is used to obtain the spindle error, and the axis trajectory is reconstructed through the variational mode decomposition method. Combined with the VGG-16 deep transfer learning network and the GRU prediction model, fault diagnosis and compensation amount prediction are performed.
The accurate recognition rate of CNC machine tool spindle status types is improved, and the efficiency of feature information extraction and diagnostic accuracy are improved.
Smart Images

Figure CN119937451B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of CNC machine tool control, and in particular to a compensation prediction method and system for CNC machine tool spindle state diagnosis. Background Art
[0002] The state of a machine tool's spindle system is intuitively represented on a centerline trajectory diagram. Therefore, obtaining a clear and smooth spindle rotation trajectory diagram is crucial for accurate axis trajectory identification. However, in actual CNC machine tool processing, the spindle's own vibration and measurement errors often cause the displacement signal collected by the displacement sensor to be interfered with by noise. This causes the directly calculated rotation trajectory diagram to appear disorganized, making it difficult to extract useful feature information from it, thus affecting the accurate identification of the state type. Traditional state diagnosis methods, however, expose many problems, such as the large amount of data to be diagnosed, low feature extraction efficiency and high state detection cost, and the difficulty of signal processing algorithms in coping with multiple states. Summary of the Invention
[0003] In order to solve the above technical problems, the purpose of the present invention is to provide a compensation prediction method and system for CNC machine tool spindle state diagnosis, which can extract useful feature information from the accurate rotary axis trajectory diagram, thereby improving the accurate recognition rate of CNC machine tool spindle state type.
[0004] The first technical solution adopted by the present invention is: a compensation prediction method for CNC machine tool spindle status diagnosis, comprising the following steps:
[0005] Based on the non-contact laser displacement sensor, the spindle radial rotation error, spindle axis tilt error and spindle axial movement error of the CNC machine tool are obtained;
[0006] According to the spindle radial rotation error, spindle axis tilt error and spindle axial movement error of the CNC machine tool, the tool feed compensation amount and the spindle rotation axis trajectory coordinates of the CNC machine tool are calculated;
[0007] The coordinates of the CNC machine tool spindle rotation axis trajectory are reconstructed by using the variational mode decomposition method to obtain the reconstructed coordinates of the CNC machine tool spindle rotation axis trajectory;
[0008] Construct a relationship model between the simulated spindle rotation axis coordinates and the reconstructed CNC machine tool spindle rotation axis trajectory coordinates;
[0009] Transfer learning is performed on the relationship model between the simulated spindle rotation axis coordinates and the reconstructed CNC machine tool spindle rotation axis trajectory coordinates to obtain the fault diagnosis results of the CNC machine tool;
[0010] The GRU prediction model is used to predict the compensation amount of the CNC machine tool's fault diagnosis results and the CNC machine tool's tool feed compensation amount, and the compensation prediction result of the CNC machine tool's spindle status diagnosis is obtained.
[0011] Furthermore, the step of obtaining the spindle radial rotation error, the spindle axis tilt error and the spindle axial movement error of the CNC machine tool based on the non-contact laser displacement sensor specifically includes:
[0012] Obtain the measured cross section of the spindle of the CNC machine tool;
[0013] The spindle radial rotation error and spindle axis tilt error of the CNC machine tool of the spindle measured section are obtained in the spindle axial direction by a non-contact laser displacement sensor;
[0014] The spindle axial movement error of the CNC machine tool is obtained along the spindle axis direction through a non-contact laser displacement sensor.
[0015] Furthermore, the step of calculating the tool feed compensation amount and the spindle rotation axis center trajectory coordinates of the CNC machine tool based on the spindle radial rotation error, the spindle axis tilt error and the spindle axial movement error of the CNC machine tool specifically includes:
[0016] Error separation is performed based on the spindle radial rotation error of the CNC machine tool to obtain the spindle radial error of the CNC machine tool;
[0017] The tool feed compensation amount of the CNC machine tool is calculated based on the spindle radial error and the spindle axis tilt error of the CNC machine tool to obtain the tool feed compensation amount of the CNC machine tool;
[0018] According to the relationship between the spindle radial rotation error and the spindle radial error of the CNC machine tool, the axis trajectory coordinate calculation model is constructed;
[0019] The axis trajectory coordinate calculation model is solved and calculated according to the axial movement error of the spindle of the CNC machine tool, and the axis trajectory coordinates of the spindle rotation of the CNC machine tool are obtained.
[0020] Furthermore, the step of reconstructing the coordinates of the CNC machine tool spindle rotation axis trajectory by using the variational modal decomposition method to obtain the reconstructed coordinates of the CNC machine tool spindle rotation axis trajectory specifically includes:
[0021] Obtain the sampling time of the non-contact laser displacement sensor and construct a two-dimensional array based on the coordinates of the CNC machine tool spindle rotation axis trajectory;
[0022] The two-dimensional array is decomposed by variational mode decomposition method to obtain several IMF sub-signals;
[0023] The correlation coefficient analysis method is used to obtain the correlation between several IMF sub-signals and the two-dimensional array and filter them to obtain the effective component signal of the CNC machine tool spindle rotation axis trajectory coordinates.
[0024] The coordinates of the spindle rotation axis center trajectory of the CNC machine tool are reconstructed according to the effective component signal of the spindle rotation axis center trajectory of the CNC machine tool to obtain the reconstructed coordinates of the spindle rotation axis center trajectory of the CNC machine tool.
[0025] Furthermore, the step of constructing a relationship model between the simulated spindle rotation axis coordinates and the reconstructed CNC machine tool spindle rotation axis trajectory coordinates specifically includes:
[0026] Simulating and generating the axis trajectory signal of the CNC machine tool to obtain the simulated axis trajectory signal;
[0027] Add random vibration signals to the axis trajectory signal generated by simulation and input it into the axis trajectory coordinate calculation model for solution calculation to obtain the simulated spindle rotation axis coordinates;
[0028] Combined with the spindle state type of the CNC machine tool, a relationship model between the simulated spindle rotation axis coordinates and the reconstructed CNC machine tool spindle rotation axis trajectory coordinates is constructed.
[0029] Furthermore, the step of performing transfer learning on the relationship model between the simulated spindle rotation axis coordinates and the reconstructed CNC machine tool spindle rotation axis trajectory coordinates to obtain the CNC machine tool fault diagnosis result specifically includes:
[0030] Performing continuous wavelet transform on the reconstructed CNC machine tool spindle rotation axis center trajectory coordinates to obtain the transformed CNC machine tool spindle rotation axis center trajectory coordinates;
[0031] Combining the convolutional layer, GN normalization layer, ReLU activation function, pooling layer and feature fusion layer, a group normalized parallel convolutional neural network model is constructed;
[0032] Based on the group normalized parallel convolutional neural network model, the transformed CNC machine tool spindle rotation axis coordinates and the simulated spindle rotation axis coordinates are extracted to obtain the fault type data of the CNC machine tool;
[0033] The VGG-16 convolutional neural network model is used to diagnose the fault type data of the CNC machine tool and obtain the fault diagnosis results of the CNC machine tool.
[0034] Furthermore, the step of performing compensation amount prediction on the fault diagnosis result of the CNC machine tool and the tool feed compensation amount of the CNC machine tool by using the GRU prediction model to obtain the compensation prediction result of the spindle state diagnosis of the CNC machine tool specifically includes:
[0035] Normalizing the CNC machine tool tool feed compensation amount to obtain the normalized CNC machine tool tool feed compensation amount;
[0036] The GRU prediction model is used to predict the normalized CNC machine tool tool feed compensation amount and the CNC machine tool fault diagnosis result, and the compensation prediction result of the CNC machine tool spindle state diagnosis is obtained.
[0037] The second technical solution adopted by the present invention is: a compensation prediction system for CNC machine tool spindle status diagnosis, comprising:
[0038] The first module is used to obtain the spindle radial rotation error, spindle axis tilt error and spindle axial movement error of the CNC machine tool based on the non-contact laser displacement sensor;
[0039] The second module is used to calculate the tool feed compensation amount and the coordinates of the spindle rotation axis center of the CNC machine tool based on the spindle radial rotation error, the spindle axis tilt error and the spindle axial movement error of the CNC machine tool;
[0040] The third module is used to reconstruct the coordinates of the CNC machine tool spindle rotation axis trajectory by using the variational mode decomposition method to obtain the reconstructed coordinates of the CNC machine tool spindle rotation axis trajectory;
[0041] The fourth module is used to construct a relationship model between the simulated spindle rotation axis coordinates and the reconstructed CNC machine tool spindle rotation axis trajectory coordinates;
[0042] The fifth module is used to transfer learning the relationship model between the simulated spindle rotation axis coordinates and the reconstructed CNC machine tool spindle rotation axis trajectory coordinates to obtain the fault diagnosis results of the CNC machine tool;
[0043] The sixth module is used to predict the compensation amount of the CNC machine tool fault diagnosis results and the CNC machine tool tool feed compensation amount through the GRU prediction model, and obtain the compensation prediction result of the CNC machine tool spindle status diagnosis.
[0044] The beneficial effects of the method and system of the present invention are as follows: the present invention obtains the spindle radial rotation error, the spindle axis tilt error and the spindle axial movement error of the CNC machine tool based on the non-contact laser displacement sensor, and then calculates to obtain the CNC machine tool tool feed compensation amount and the CNC machine tool spindle rotation axis trajectory coordinates. Based on the measurement principle of the laser displacement sensor, it is proposed to use two laser displacement sensors to measure the offset of the rotor relative to the initial position, and obtain an accurate axis trajectory instead of an approximate axis trajectory by solving the model. The CNC machine tool spindle rotation axis trajectory coordinates are further reconstructed by the variational mode decomposition method to obtain the reconstructed CNC machine tool spindle rotation axis trajectory coordinates. The variational mode decomposition (VMD) technology is used to purify and reconstruct the accurate rotation axis trajectory diagram to improve the clarity and recognizability of the axis trajectory diagram, and further construct the simulated spindle rotation axis coordinates and the reconstructed CNC machine tool spindle rotation axis coordinates. The relationship model of the axis trajectory coordinates is constructed, and then the relationship model of the simulated spindle rotation axis coordinates and the reconstructed CNC machine tool spindle rotation axis trajectory coordinates is transferred learning. In order to solve the problem of unclear state data labels in practical problems, a state diagnosis model combining signal decomposition driven by simulation data and VGG-16 deep transfer learning network is proposed. Transfer learning is used in the pre-trained network, and a pre-trained neural network with high-precision recognition ability is used to learn the features of the spindle state in the axis trajectory diagram, unfreeze the deep network to fine-tune the parameters, and then transfer the knowledge of the simulation data to the process of diagnosing the actual machine tool spindle system state. Finally, the GRU prediction model is used to predict the fault diagnosis results of the CNC machine tool and the tool feed compensation amount of the CNC machine tool, and the compensation prediction result of the CNC machine tool spindle state diagnosis is obtained. Useful feature information can be extracted from the accurate rotary axis trajectory diagram, thereby improving the accurate recognition rate of the CNC machine tool spindle state type. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 This is a flowchart of the steps of a compensation prediction method for CNC machine tool spindle status diagnosis according to the present invention;
[0046] Figure 2 This is a structural block diagram of a compensation prediction system for CNC machine tool spindle status diagnosis according to the present invention;
[0047] Figure 3 It is a schematic diagram of the process of CNC machine tool spindle error compensation provided by a specific embodiment of the present invention;
[0048] Figure 4 Schematic diagram of the principle of the spindle rotation trajectory test of a CNC machine tool provided by a specific embodiment of the present invention;
[0049] Figure 5Schematic diagram of a tool feed compensation calculation model provided by a specific embodiment of the present invention;
[0050] Figure 6 Schematic diagram of a rotation axis position calculation model provided by a specific embodiment of the present invention;
[0051] Figure 7 2 is a schematic diagram of a VGG-16-based deep transfer learning state diagnosis model provided by a specific embodiment of the present invention;
[0052] Figure 8 Schematic diagram of a CWT-GPCNN feature fusion network model provided by a specific embodiment of the present invention;
[0053] Figure 9 It is a schematic diagram of the GRU network gating structure provided by a specific embodiment of the present invention. DETAILED DESCRIPTION
[0054] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. The step numbers in the following embodiments are provided for ease of description only and do not limit the order of the steps. The order of execution of the steps in the embodiments can be adaptively adjusted based on the understanding of those skilled in the art.
[0055] Reference Figure 1 The present invention provides a compensation prediction method for CNC machine tool spindle status diagnosis, the method comprising the following steps:
[0056] S100, obtaining a spindle radial rotation error, a spindle axis tilt error, and a spindle axial movement error of a CNC machine tool based on a non-contact laser displacement sensor;
[0057] Specifically, the spindle measured section of the CNC machine tool is obtained; the spindle radial rotation error and the spindle axis tilt error of the CNC machine tool are obtained in the spindle axial direction through a non-contact laser displacement sensor; the spindle axial runout error of the CNC machine tool is obtained along the spindle axis direction through a non-contact laser displacement sensor.
[0058] In this embodiment, first of all, it should be explained that, in the analysis of the constituent elements of the spatial error of the machine tool spindle, under ideal conditions, the spatial position of the spindle's rotational axis relative to the tool holder is unchanged during the rotational motion. However, in the actual machining process, due to the influence of various external factors and the manufacturing and installation errors of the machine tool itself, there must be a deviation between the actual spindle's rotational axis and the ideal rotational axis, that is, the rotation errors caused by axial movement, radial runout and angular swing coexist. These three have a certain impact on the machining accuracy of the machine tool, among which axial movement affects the axial plane accuracy of the workpiece, radial runout affects the roundness of the workpiece, and angular swing affects both plane accuracy and roundness.
[0059] Furthermore, it is necessary to analyze that the state monitoring method of the CNC machine tool spindle system in the embodiment of the present invention adopts a measuring point method. The measuring point method uses two pairs of displacement sensors located at different cross-sectional positions in the axial direction of the spindle and perpendicular to each other to synchronously measure the radial rotation error and axis tilt error of the spindle, and uses a sensor arranged along the axis direction to obtain the axial movement error.
[0060] S200, calculating the tool feed compensation amount and the spindle rotation axis trajectory coordinates of the CNC machine tool based on the spindle radial rotation error, the spindle axis tilt error, and the spindle axial movement error of the CNC machine tool;
[0061] Specifically, error separation is performed based on the spindle radial rotation error of the CNC machine tool to obtain the spindle radial error of the CNC machine tool; the CNC machine tool tool feed compensation amount is calculated based on the spindle radial error of the CNC machine tool combined with the spindle axis inclination error of the CNC machine tool to obtain the CNC machine tool tool feed compensation amount; according to the relationship between the spindle radial rotation error of the CNC machine tool and the spindle radial error of the CNC machine tool, an axis trajectory coordinate calculation model is constructed; according to the spindle axial runout error of the CNC machine tool, the axis trajectory coordinate calculation model is solved and calculated to obtain the spindle rotation axis trajectory coordinates of the CNC machine tool.
[0062] In this embodiment, if Figure 4 As shown, first the spindle radial rotation error is separated. Taking a spindle section as an example, at section z, the load condition is L m When the spindle phase angle is θ, based on the geometric relationship during the spindle rotation process under the action of various errors, the raw data collected by the two mutually perpendicular displacement sensors are as follows:
[0063]
[0064]
[0065] In the above formula, R represents the radius of the measured section of the spindle, ρ r Indicates the radial rotation error of the spindle, |xX | is the component of the distance from the X-axis displacement sensor of the measured section to the theoretical axis in the X-axis direction, |y Y | represents the component of the distance from the Y-axis displacement sensor of the measured section to the theoretical axis center in the Y-axis direction, z represents the section z, θ represents the main axis phase angle, L m represents the load condition, ρ x represents the original data collected by the X-axis displacement sensor, ρ y Indicates the original data collected by the Y-axis displacement sensor, L x Indicates the component of the deviation between the actual installation position and the theoretical installation position of the X-axis displacement sensor in the X-axis direction, L y It represents the component of the deviation between the actual installation position and the theoretical installation position of the Y-axis displacement sensor in the Y-axis direction.
[0066] Furthermore, it should be noted that under ideal installation conditions, the sensor axis center at the intersection of the X-axis displacement sensor and the Y-axis displacement sensor should coincide with the theoretical axis center. However, due to installation deviation and deviation in the relative position of the sensors, the two will have a deviation L in the X direction. x , the Y direction produces a deviation L y .
[0067] Furthermore, Figure 5 As shown, the machine tool tool feed compensation amount is calculated, and the two spindle measured sections are marked as A and B respectively, where A represents the measured section at the right end and B represents the measured section at the left end. The error caused by the angular swing can be expressed as:
[0068]
[0069] In the above formula, l represents the axial distance between the measured sections A and B, ρ A , ρ B They represent the spindle radial errors of measuring points A and B when the spindle phase angle is θ, respectively. x Indicates the spindle tilt angle in the X-axis direction, φ y Indicates the spindle tilt angle in the Y-axis direction.
[0070] Furthermore, because the spindle's shaking in the Y-axis direction will also affect the relative position between the cutting tool and the axis, the compensation amount of the cutting tool not only needs to directly calculate the projection value of the rotation error in the X-axis direction, but also should consider the influence of the rotation error in the Y-axis direction. The expression is:
[0071]
[0072] In the above formula, x represents the relative position of the cutting tool relative to the measured section A, R represents the spindle radius when the cutting tool is at the x position, Δx and Δy represent the projection values of the rotation error in the X and Y axis directions when the tool is at the position, and Δr represents the feed compensation amount of the tool.
[0073] Finally, if Figure 6 As shown, the spindle rotation axis center is extracted. Taking the measured section A as an example, when the rotation error is known to be the spindle phase angle θ, it is assumed that the axis center at each moment relative to the axis center of the initial position in the X and Y coordinates is X A and Y A , the spindle radius is R A According to the geometric relationship between the parameters, the equivalent relationship is constructed, and the expression of the axis trajectory coordinate calculation model can be obtained as follows:
[0074]
[0075] In continuous time, two displacement sensors synchronously collect the displacement offset of the spindle in different directions relative to the initial state. The axis trajectory coordinate calculation model is used to solve the axis center coordinate (X A ,Y A ).
[0076] S300, reconstructing the coordinates of the CNC machine tool spindle rotation axis trajectory by using a variational modal decomposition method to obtain reconstructed coordinates of the CNC machine tool spindle rotation axis trajectory;
[0077] Specifically, the sampling time of the non-contact laser displacement sensor is obtained, and combined with the coordinates of the CNC machine tool spindle rotation axis trajectory, a two-dimensional array is constructed; the two-dimensional array is decomposed by the variational mode decomposition method to obtain a number of IMF sub-signals; the correlation coefficient analysis method is used to obtain the correlation between the several IMF sub-signals and the two-dimensional array and perform screening processing to obtain the effective component signals of the CNC machine tool spindle rotation axis trajectory coordinates; the CNC machine tool spindle rotation axis trajectory coordinates are reconstructed according to the effective component signals to obtain the reconstructed CNC machine tool spindle rotation axis trajectory coordinates.
[0078] In this embodiment, the composite signal collected by the displacement sensor is first decomposed into sub-signals (intrinsic mode functions IMF) of different frequencies according to the variational mode decomposition method (VMD), and high-frequency noise interference and obvious outliers are removed. The sub-signals that meet the conditions are selected and superimposed to reconstruct a new signal to obtain a clear and smooth axis trajectory. VMD decomposition requires setting four parameters: the number of IMF components k, the penalty factor α, the noise tolerance τ, and the convergence accuracy ε. Among them, τ and ε have little effect on the decomposition results, and the default values can be used; inappropriate values of k and α will lead to over-decomposition or under-decomposition. In order to accurately select these parameters to obtain the best decomposition results, the gray wolf algorithm (GWO) is used to globally optimize these two key parameters. In the parameter optimization process, the minimum envelope entropy is used as the fitness function. The lower the envelope entropy value, the less noise (the smaller the interference) in the IMF and the more characteristic information. The value range of k is an integer in [2,10], the value range of α is [100,2000], and the number of iterations is set to 200. The optimal parameters are determined by continuously updating the optimization parameter values.
[0079] Furthermore, the sampling times and values of the X-, Y-, and axial displacement sensors at the measured sections at both ends of a CNC machine tool during normal machining are used to construct a two-dimensional array of size n × 6, where n is the number of samples collected by each displacement sensor during machining and sampling time = sampling frequency × i (i = 1, 2, ..., n). Taking the one-dimensional data signal x(t) collected by the right-hand X-displacement sensor as an example, VMD decomposition is performed to obtain several decomposed IMFs arranged in order of frequency. The effective components are then selected and reconstructed to achieve noise reduction. The decomposed IMFs often contain spurious components unrelated to the original signal, which cannot represent the original signal. To identify and eliminate these redundant components and improve the sensitivity of detecting the machine tool spindle system status, this method uses correlation coefficient analysis to evaluate the correlation between each IMF and the original signal. This method effectively measures the linear relationship between each component and the original signal and quantitatively describes the degree of dependence between them.
[0080] The calculation formula of the correlation coefficient is as follows:
[0081]
[0082] In the above formula, ρ k represents the correlation coefficient, represents the i-th data in the l-th IMF component, S i (·) represents the i-th data directly collected by the sensor, i represents the data sequence collected by the sensor, N represents the total amount of data collected by the sensor, k represents the IMF component sequence, and n represents the number of data collected by each displacement sensor during the machining process.
[0083] S400, constructing a relationship model between the simulated spindle rotation axis coordinates and the reconstructed CNC machine tool spindle rotation axis trajectory coordinates;
[0084] Specifically, the axis trajectory signal of the CNC machine tool is simulated and generated to obtain the simulated axis trajectory signal; a random vibration signal is added to the simulated axis trajectory signal and input into the axis trajectory coordinate calculation model for solution calculation to obtain the simulated spindle rotation axis coordinates; combined with the spindle state type of the CNC machine tool, a relationship model between the simulated spindle rotation axis coordinates and the reconstructed CNC machine tool spindle rotation axis trajectory coordinates is constructed.
[0085] In this embodiment, first of all, it should be noted that when building a deep transfer learning state diagnosis model, the key requirement is to obtain a large and diverse data set. In actual engineering applications, the data collected by the displacement sensor often lacks the necessary state labels. Therefore, to ensure the effectiveness and accuracy of the model training, the axis trajectory signal is simulated and generated, and its expression is:
[0086]
[0087] In the above formula, x(t) and y(t) represent the displacement components of the axis in two orthogonal directions, s1(t) and s2(t) represent Gaussian white noise components, the noise values of Gaussian white noise at different times are independent of each other, ω represents the rotation frequency, α1, α2, β1, and β2 represent the corresponding initial phases, and A1, A2, B1, and B2 represent the 1st and 2nd frequency components of x(t) and y(t).
[0088] After the axis trajectory signal is generated by the formula simulation, the displacement signal and the machine tool spindle phase angle actually collected by the displacement sensor are simulated by adding a random vibration signal to make the axis trajectory fluctuate slightly. The spindle rotation axis coordinate (X A ,Y A ).
[0089] Furthermore, it should be noted that for different state types, different data sets are constructed by adjusting the above parameters to establish the corresponding relationship between different state types and axis trajectories as shown below:
[0090] 1) When the spindle rotor is unbalanced, the rotor amplitude will increase with the increase of speed, causing the axis trajectory to present a flat ellipse with a large difference between the major and minor axes;
[0091] 2) When the spindle rotor is misaligned, the axis trajectory usually presents a banana shape, and as the degree of the misalignment increases, it may turn into an outer 8 shape;
[0092] 3) When the machine tool is in a dynamic and static friction state, the rotor components will be subjected to a certain tangential force and normal force, causing the axis trajectory to present a certain petal shape;
[0093] Among them, it should be noted that when the machine tool has an oil film vortex state due to improper selection of lubricating oil, the vibration amplitude and vibration frequency of the rotor will change, causing the axis trajectory to present an inward 8 shape.
[0094] S500, performing transfer learning on the relationship model between the simulated spindle rotation axis coordinates and the reconstructed CNC machine tool spindle rotation axis trajectory coordinates to obtain a fault diagnosis result of the CNC machine tool;
[0095] Specifically, continuous wavelet transform is performed on the reconstructed CNC machine tool spindle rotation axis trajectory coordinates to obtain the transformed CNC machine tool spindle rotation axis trajectory coordinates; a group normalized parallel convolutional neural network model is constructed by combining the convolution layer, GN normalization layer, ReLU activation function, pooling layer and feature fusion layer; based on the group normalized parallel convolutional neural network model, feature extraction is performed on the transformed CNC machine tool spindle rotation axis trajectory coordinates and the simulated spindle rotation axis coordinates to obtain the fault type data of the CNC machine tool; the fault type data of the CNC machine tool is diagnosed by the VGG-16 convolutional neural network model to obtain the fault diagnosis result of the CNC machine tool.
[0096] In this embodiment, the data after decomposition and reconstruction is first converted based on CWT. Because the fault characteristics obtained by time-frequency domain analysis are more obvious, and the analysis based on time-frequency domain is more comprehensive and accurate, the time-frequency diagram obtained by CWT (continuous wavelet transform) generated by multiple sensor signals is used as input.
[0097] Among them, the function expression of CWT is:
[0098]
[0099] In the above formula, f(t) represents the input signal, ψ(t) represents the mother wavelet, a represents a non-zero scaling parameter used to control the expansion and contraction of the wavelet, and b represents the translation parameter that controls the position of the wavelet on the time axis.
[0100] A group normalized parallel convolutional neural network model (GPCNN) is further constructed: the model respectively transforms the main axis phase angle θmain axis and the rotation axis coordinate signal X after VMD decomposition and reconstruction. A (y), Y A(t), the three time-frequency graphs obtained by continuous wavelet transform are used as input, and different data are processed through parallel network branches. Each branch contains a convolution layer, a GN normalization layer, a ReLU activation function, and a pooling layer. The features of different branches are then fused together through a feature fusion layer. The complementary correlation between the three is then extracted through convolution and pooling layers. Finally, the high-dimensional features are compressed into feature vectors through two fully connected layers, and classified by the Softmax classifier to output the final fault type.
[0101] The model is then trained. After the network structure is completed, the simulated source domain is divided into a training set and a test set in an 8:2 ratio. The model is trained using the training set. First, the model calculates the output value of the current parameter through forward propagation. Second, a loss function is used to evaluate the error between the model's predicted value and the actual value. The error backpropagation algorithm is used to calculate the gradient of the loss function with respect to the model parameters. Finally, the Adam optimizer is used to update the network weights and biases based on these gradients to minimize the loss function. This process is repeated until the preset number of iterations is reached.
[0102] Further, if Figure 7 As shown in the figure, a modified VGG-16 transfer learning model is constructed. The VGG-16 convolutional neural network consists of 13 convolutional layers, 5 pooling layers, 3 fully connected layers, and a softmax output layer. The convolutional and pooling layers form the feature extractor, while the fully connected and softmax layers perform the classification task. During the VGG-16 transfer learning process, the network is modified. Before replacing the top layer, the first several layers are frozen to prevent loss of their feature representation capabilities. The parameters are fixed, and the subsequent convolutional layers are fine-tuned according to needs to ensure that their weights are updated with each cycle during model training.
[0103] Train the model again, such as Figure 8 As shown in Figure 1, the parameters of the CWT-GPCNN model trained in the source domain are transferred to the diagnostic model in the target domain, and then trained using a small training set from the target domain. The test samples from the target domain are input into the model to obtain diagnostic results for each state category.
[0104] S600 , performing compensation amount prediction on the fault diagnosis result of the CNC machine tool and the tool feed compensation amount of the CNC machine tool using the GRU prediction model to obtain a compensation prediction result of the spindle state diagnosis of the CNC machine tool.
[0105] Specifically, the tool feed compensation amount of the CNC machine tool is normalized to obtain the normalized tool feed compensation amount of the CNC machine tool; the normalized tool feed compensation amount of the CNC machine tool and the fault diagnosis result of the CNC machine tool are predicted by the GRU prediction model to obtain the compensation prediction result of the CNC machine tool spindle state diagnosis.
[0106] In this embodiment, data preprocessing is first performed. The tool feed compensation value Δr is used as input, and the training data set and the test data set are divided into a ratio of 8:2. The data set is composed of the collected values of five displacement sensors, the spindle phase angle, and the tool feed compensation value as a label. To improve the convergence speed and accuracy of the GRU network, the above data is normalized and all elements of each data are scaled to 0-1, so that the network can more efficiently extract features of data of different orders of magnitude.
[0107] Further Figure 9 As shown in the figure, a GRU prediction model is established. In the recurrent neural network RNN, the gated recurrent unit network GRU maintains almost the same performance as LSTM with a simpler optimized network structure. It only contains two gating units, the update gate and the reset gate. The update gate can control the information of the previous moment and decide how much past information to retain to the current time step; the reset gate decides how much past information to forget, and its value is limited to 0 to 1.
[0108] The calculation of the GRU network is mainly divided into the following four steps:
[0109] Update gate, its expression is:
[0110] z t =σ(W Z ·[x t ,h t-1 ]+b z )
[0111] Reset gate, its expression is:
[0112] r t =σ(W r ·[x t ,h t-1 ]+b r )
[0113] The value of the candidate hidden layer state at the current moment is expressed as:
[0114]
[0115] The hidden layer output h at time t t , whose expression is:
[0116] h t =(1-z t)×h t-1 +z t ×h t
[0117] In the above formula, x t Represents the information of the input vector at time t, W Z 、W r 、 Represent the weights of the update gate, reset gate and candidate hidden layer, respectively, b z 、b r 、b h Indicates the corresponding bias, h t-1 is the hidden layer information at time t-1, and σ represents the Sigmoid function.
[0118] Finally, the GRU prediction model is trained. The GRU network training combines the back propagation algorithm to continuously optimize the weights and biases of the network to minimize the cost function value and obtain the minimized mean square error (MSE) (loss function).
[0119] In summary, if Figure 3 As shown, this embodiment of the present invention addresses situations where actual state label information is unclear. Driven by simulation data, it proposes a state diagnosis method that combines signal decomposition with a deep transfer learning network. This method transfers diagnostic knowledge from the simulation model to actual conditions to solve the state classification problem. Furthermore, a GRU network is used to rapidly predict the tool feed compensation required to eliminate errors caused by spindle rotation during normal machining.
[0120] Reference Figure 2 , a compensation prediction system for CNC machine tool spindle status diagnosis, including:
[0121] The first module 201 is used to obtain the spindle radial rotation error, the spindle axis tilt error and the spindle axial movement error of the CNC machine tool based on the non-contact laser displacement sensor;
[0122] The second module 202 is used to calculate the tool feed compensation amount and the spindle rotation axis trajectory coordinates of the CNC machine tool based on the spindle radial rotation error, the spindle axis tilt error and the spindle axial movement error of the CNC machine tool;
[0123] The third module 203 is used to reconstruct the coordinates of the CNC machine tool spindle rotation axis trajectory by using the variational mode decomposition method to obtain the reconstructed coordinates of the CNC machine tool spindle rotation axis trajectory;
[0124] The fourth module 204 is used to construct a relationship model between the simulated spindle rotation axis coordinates and the reconstructed CNC machine tool spindle rotation axis trajectory coordinates;
[0125] The fifth module 205 is used to perform transfer learning on the relationship model between the simulated spindle rotation axis coordinates and the reconstructed CNC machine tool spindle rotation axis trajectory coordinates to obtain a fault diagnosis result of the CNC machine tool;
[0126] The sixth module 206 is used to predict the compensation amount of the CNC machine tool fault diagnosis result and the CNC machine tool tool feed compensation amount through the GRU prediction model to obtain the compensation prediction result of the CNC machine tool spindle state diagnosis.
[0127] The contents of the above method embodiments are all applicable to the present system embodiments. The functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0128] The above is a specific description of the preferred implementation of the present invention, but the invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.
Claims
1. A compensation prediction method for spindle status diagnosis of CNC machine tools, characterized in that: The following steps are involved: Based on the non-contact laser displacement sensor, the spindle radial rotation error, spindle axis tilt error and spindle axial movement error of the CNC machine tool are obtained; According to the spindle radial rotation error, spindle axis tilt error and spindle axial movement error of the CNC machine tool, the tool feed compensation amount and the spindle rotation axis trajectory coordinates of the CNC machine tool are calculated; The coordinates of the CNC machine tool spindle rotation axis trajectory are reconstructed by using the variational mode decomposition method to obtain the reconstructed coordinates of the CNC machine tool spindle rotation axis trajectory; Construct a relationship model between the simulated spindle rotation axis coordinates and the reconstructed CNC machine tool spindle rotation axis trajectory coordinates; Transfer learning is performed on the relationship model between the simulated spindle rotation axis coordinates and the reconstructed CNC machine tool spindle rotation axis trajectory coordinates to obtain the fault diagnosis results of the CNC machine tool; The GRU prediction model is used to predict the compensation amount of the CNC machine tool's fault diagnosis results and the CNC machine tool's tool feed compensation amount, and the compensation prediction result of the CNC machine tool's spindle status diagnosis is obtained.
2. The compensation prediction method for spindle status diagnosis of CNC machine tools according to claim 1, characterized in that: The step of obtaining the spindle radial rotation error, the spindle axis tilt error and the spindle axial movement error of the CNC machine tool based on the non-contact laser displacement sensor specifically includes: Obtain the measured cross section of the spindle of the CNC machine tool; The spindle radial rotation error and spindle axis tilt error of the CNC machine tool of the spindle measured section are obtained in the spindle axial direction by a non-contact laser displacement sensor; The spindle axial movement error of the CNC machine tool is obtained along the spindle axis direction through a non-contact laser displacement sensor.
3. The compensation prediction method for CNC machine tool spindle status diagnosis according to claim 2, characterized in that: The step of calculating the tool feed compensation amount and the spindle rotation axis center trajectory coordinates of the CNC machine tool based on the spindle radial rotation error, the spindle axis tilt error and the spindle axial movement error of the CNC machine tool specifically includes: Error separation is performed based on the spindle radial rotation error of the CNC machine tool to obtain the spindle radial error of the CNC machine tool; The tool feed compensation amount of the CNC machine tool is calculated based on the spindle radial error and the spindle axis tilt error of the CNC machine tool to obtain the tool feed compensation amount of the CNC machine tool; According to the relationship between the spindle radial rotation error and the spindle radial error of the CNC machine tool, the axis trajectory coordinate calculation model is constructed; The axis trajectory coordinate calculation model is solved and calculated according to the axial movement error of the spindle of the CNC machine tool, and the axis trajectory coordinates of the spindle rotation of the CNC machine tool are obtained.
4. The compensation prediction method for spindle status diagnosis of CNC machine tools according to claim 3, characterized in that: The step of reconstructing the coordinates of the CNC machine tool spindle rotation axis trajectory by the variational modal decomposition method to obtain the reconstructed coordinates of the CNC machine tool spindle rotation axis trajectory specifically includes: Obtain the sampling time of the non-contact laser displacement sensor and construct a two-dimensional array based on the coordinates of the CNC machine tool spindle rotation axis trajectory; The two-dimensional array is decomposed by variational mode decomposition method to obtain several IMF sub-signals; The correlation coefficient analysis method is used to obtain the correlation between several IMF sub-signals and the two-dimensional array and filter them to obtain the effective component signal of the CNC machine tool spindle rotation axis trajectory coordinates. The coordinates of the spindle rotation axis center trajectory of the CNC machine tool are reconstructed according to the effective component signal of the spindle rotation axis center trajectory of the CNC machine tool to obtain the reconstructed coordinates of the spindle rotation axis center trajectory of the CNC machine tool.
5. The compensation prediction method for spindle status diagnosis of CNC machine tools according to claim 4, characterized in that: The step of constructing a relationship model between the simulated spindle rotation axis coordinates and the reconstructed CNC machine tool spindle rotation axis trajectory coordinates specifically includes: Simulating and generating the axis trajectory signal of the CNC machine tool to obtain the simulated axis trajectory signal; Add random vibration signals to the axis trajectory signal generated by simulation and input it into the axis trajectory coordinate calculation model for solution calculation to obtain the simulated spindle rotation axis coordinates; Combined with the spindle state type of the CNC machine tool, a relationship model between the simulated spindle rotation axis coordinates and the reconstructed CNC machine tool spindle rotation axis trajectory coordinates is constructed.
6. The compensation prediction method for CNC machine tool spindle status diagnosis according to claim 5, characterized in that: The step of performing transfer learning on the relationship model between the simulated spindle rotation axis coordinates and the reconstructed CNC machine tool spindle rotation axis trajectory coordinates to obtain the CNC machine tool fault diagnosis result specifically includes: Performing continuous wavelet transform on the reconstructed CNC machine tool spindle rotation axis center trajectory coordinates to obtain the transformed CNC machine tool spindle rotation axis center trajectory coordinates; Combining the convolutional layer, GN normalization layer, ReLU activation function, pooling layer and feature fusion layer, a group normalized parallel convolutional neural network model is constructed; Based on the group normalized parallel convolutional neural network model, the transformed CNC machine tool spindle rotation axis coordinates and the simulated spindle rotation axis coordinates are extracted to obtain the fault type data of the CNC machine tool; The VGG-16 convolutional neural network model is used to diagnose the fault type data of the CNC machine tool and obtain the fault diagnosis results of the CNC machine tool.
7. The compensation prediction method for spindle status diagnosis of CNC machine tools according to claim 6, characterized in that: The step of performing compensation amount prediction on the fault diagnosis result of the CNC machine tool and the tool feed compensation amount of the CNC machine tool by using the GRU prediction model to obtain the compensation prediction result of the spindle state diagnosis of the CNC machine tool specifically includes: Normalizing the CNC machine tool tool feed compensation amount to obtain the normalized CNC machine tool tool feed compensation amount; The GRU prediction model is used to predict the normalized CNC machine tool tool feed compensation amount and the CNC machine tool fault diagnosis result, and the compensation prediction result of the CNC machine tool spindle state diagnosis is obtained.
8. A compensation prediction system for CNC machine tool spindle status diagnosis, characterized in that: Includes the following modules: The first module is used to obtain the spindle radial rotation error, spindle axis tilt error and spindle axial movement error of the CNC machine tool based on the non-contact laser displacement sensor; The second module is used to calculate the tool feed compensation amount and the coordinates of the spindle rotation axis center of the CNC machine tool based on the spindle radial rotation error, the spindle axis tilt error and the spindle axial movement error of the CNC machine tool; The third module is used to reconstruct the coordinates of the CNC machine tool spindle rotation axis trajectory by using the variational mode decomposition method to obtain the reconstructed coordinates of the CNC machine tool spindle rotation axis trajectory; The fourth module is used to construct a relationship model between the simulated spindle rotation axis coordinates and the reconstructed CNC machine tool spindle rotation axis trajectory coordinates; The fifth module is used to transfer learning the relationship model between the simulated spindle rotation axis coordinates and the reconstructed CNC machine tool spindle rotation axis trajectory coordinates to obtain the fault diagnosis results of the CNC machine tool; The sixth module is used to predict the compensation amount of the CNC machine tool fault diagnosis results and the CNC machine tool tool feed compensation amount through the GRU prediction model, and obtain the compensation prediction result of the CNC machine tool spindle status diagnosis.
Citation Information
Patent Citations
RTCP error calibration compensation method for five-axis laser machining equipment
CN111673292A
Evolutionary compensation method based on in-situ timing measurement and for spindle rotation errors of computer numerical control grinding machine
WO2024244413A1