Machine tool thermal error compensation method and system based on data analysis

By collecting multi-source data and determining the operating state of the machine tool, adjusting the weight distribution of thermal error-related characteristics, the problem of poor compensation effect of traditional thermal error compensation methods in different working states is solved, and a higher accuracy thermal error analysis and compensation effect is achieved.

CN120143741AActive Publication Date: 2025-06-13JIANGXI LANGGAO CNC EQUIPMENT CO LTD

Patent Information

Application Number
CN202510330578.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-20
Publication Date
2025-06-13
Estimated Expiration
2045-03-20

AI Technical Summary

Technical Problem

The traditional machine tool thermal error compensation method assumes that the machine tool is in an ideal stable state and fails to effectively consider the difference in thermal errors under different working states, resulting in poor compensation effect and difficult to meet the needs of high-precision processing.

Method used

By collecting multi-source data, including axis temperature data, vibration signals, current data, ambient temperature data and infrared images, the operating status of the machine tool is determined, and the weight distribution of thermal error-related characteristics is adjusted based on the operating status, highlighting the characteristics that are strongly related to thermal error under different working conditions, and improving the accuracy of thermal error analysis.

Benefits of technology

It improves the accuracy and compensation effect of machine tool thermal error analysis, can more accurately reflect the thermal error conditions under different working conditions, and meets the needs of high-precision processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120143741A_ABST
    Figure CN120143741A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of machine tool control, in particular to a machine tool thermal error compensation method and system based on data analysis. A machine tool thermal error compensation system based on data analysis comprises a data acquisition module, a machine tool thermal error analysis data construction module, a machine tool thermal error analysis module and a machine tool thermal error compensation module. The method comprises the following steps: acquiring a shaft temperature data set and vibration signal data of each shaft of the machine tool, current data at a servo motor of the machine tool, ambient temperature data around the machine tool and infrared images at the machine tool, and determining the running state of the machine tool under the assistance of multi-source data; weight distribution adjustment is carried out on the features related to the thermal error based on the operation state of the machine tool, the features strongly related to the thermal error under different working conditions are highlighted, the accuracy of thermal error analysis is improved, and then the thermal error compensation effect of the machine tool is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of machine tool control, and particularly relates to a machine tool thermal error compensation method and system based on data analysis. Background Art

[0002] The thermal error of a machine tool is an important factor affecting machining accuracy. Traditional thermal error compensation methods usually establish a relationship model between temperature and thermal deformation based on temperature data collected by temperature sensors, and then predict and compensate for thermal errors. However, most of these methods assume that the machine tool is in an ideal stable state, only considering the influence of temperature changes on thermal errors, and not considering the differences in the machine tool under different working conditions (such as idle running, light load cutting, heavy load cutting, etc.). Under different working conditions, there are significant differences in the heat source distribution, heat transfer path, and thermal deformation law inside the machine tool, resulting in the difficulty of accurately reflecting the actual situation with a thermal error model established based on a single working state. Therefore, the traditional thermal error compensation method relying solely on temperature analysis often has poor compensation effects when the machine tool is in different working states and is difficult to meet the requirements of high-precision machining. Summary of the Invention

[0003] The present invention determines the operating state of the machine tool with the assistance of multi-source data by collecting the shaft temperature data set and vibration signal data of each axis of the machine tool, as well as the current data at the machine tool servo motor, the ambient temperature data around the machine tool, and obtaining the infrared image at the machine tool. Then, based on the operating state of the machine tool, the weight distribution of the features related to thermal errors is adjusted to highlight the features strongly related to thermal errors under different working conditions, improve the accuracy rate of thermal error analysis, and further improve the effect of machine tool thermal error compensation; and the temperature change gradient features of each axis are strengthened through the infrared image to further improve the accuracy rate of thermal error analysis.

[0004] The present invention provides a machine tool thermal error compensation method based on data analysis, including:

[0005] Obtaining the shaft temperature data set and vibration signal data of each axis of the machine tool at the monitoring time point. The shaft temperature data set includes a number of shaft temperature data; at the same time, obtaining the current data at the machine tool servo motor, as well as obtaining the ambient temperature data around the machine tool and obtaining the infrared image at the machine tool; constructing machine tool thermal error analysis data based on the obtained shaft temperature data set, vibration signal data, current data, and ambient temperature data, and storing the machine tool thermal error analysis data in matrix form. Each row in the machine tool thermal error analysis data is the machine tool thermal error analysis vector corresponding to each axis of the machine tool;

[0006] The machine tool thermal error analysis data corresponding to the current monitoring time point and the machine tool thermal error analysis data corresponding to the previous N-1 monitoring time points are combined to form a machine tool thermal error time series analysis data set. Then, the machine tool thermal error time series analysis data set and the infrared image are sent into the machine tool thermal error analysis model for processing, and a compensation amount set is output. Based on the compensation amount set, the control instructions of the machine tool are corrected to complete the thermal error compensation of the machine tool.

[0007] The machine tool thermal error analysis model includes a time series analysis layer, an infrared image analysis layer, a weight analysis layer, a feature adjustment layer, a feature enhancement layer, and a compensation amount output layer. Among them, the time series analysis layer is established based on the LSTM model and is used to perform time series analysis processing on the machine tool thermal error time series analysis data set to construct machine tool thermal error time series analysis features. The infrared image analysis layer is used to perform image processing on the infrared image to construct a global temperature vector. The weight analysis layer is used to perform an operating state analysis on the machine tool thermal error analysis data obtained at the current monitoring point to output the corresponding operating state vector. Then, based on the machine tool thermal error time series analysis features and the operating state vector, a weight distribution matrix is determined, and the machine tool thermal error time series analysis features are weighted and adjusted based on the weight distribution matrix to construct reconstructed machine tool thermal error time series analysis features. The feature enhancement layer is used to perform feature enhancement operations on the reconstructed machine tool thermal error time series analysis features based on the global temperature vector to construct enhanced machine tool thermal error time series analysis features. The compensation amount output layer is used to perform a fully connected operation on the enhanced machine tool thermal error time series analysis features to output the compensation amount for each axis.

[0008] Preferably, the machine tool thermal error analysis data is constructed based on the obtained axis temperature data set, vibration signal data, current data, and ambient temperature data, and the specific steps are as follows:

[0009] For the current data, time domain features and frequency domain features are respectively extracted, and the time domain features and frequency domain features corresponding to the current data are combined to form a current feature vector.

[0010] For each axis, the mean value of all axis temperature data in the axis temperature data set is calculated and denoted as the axis temperature data mean value; all axis temperature data in the axis temperature data set are subjected to moving average filtering, and then the axis temperature gradient value between adjacent axis temperature data is calculated; the vibration signal data is subjected to wavelet packet decomposition, several characteristic frequency bands are extracted, and then the energy ratio of each characteristic frequency band is calculated, and the energy ratios of each characteristic frequency band are combined to form a vibration energy vector; all axis temperature data mean values, all axis temperature gradient values, the vibration energy vector, the current feature vector, and the ambient temperature data are combined to form a machine tool thermal error analysis vector.

[0011] All machine tool thermal error analysis vectors are concatenated from top to bottom to form machine tool thermal error analysis data.

[0012] Preferably, the operation state analysis is performed on the machine tool thermal error analysis data obtained at the current monitoring point through the weight analysis layer to output the corresponding operation state vector. Then, based on the machine tool thermal error time series analysis features and the operation state vector, the weight distribution matrix is determined, and the machine tool thermal error time series analysis features are weighted and adjusted based on the weight distribution matrix to construct the reconstructed machine tool thermal error time series analysis features. The specific steps are as follows:

[0013] The machine tool thermal error analysis data obtained at the current monitoring point is flattened by rows to obtain the machine tool thermal error analysis feature set. Then, the machine tool thermal error analysis feature set is sent to the operation state analysis network for processing. The operation state analysis network is established based on the random forest model to output the corresponding operation state. Then, the corresponding operation state is processed by the word embedding method to obtain the corresponding operation state vector;

[0014] The operation state vector is added to the end of each row of the machine tool thermal error time series analysis features and then sent to the multi-layer perceptron for processing to output the weight distribution matrix;

[0015] Calculate the Hadamard product of the machine tool thermal error time series analysis features and the weight distribution matrix to obtain the reconstructed machine tool thermal error time series analysis features.

[0016] Preferably, the feature enhancement operation is performed on the reconstructed machine tool thermal error time series analysis features based on the global temperature vector through the feature enhancement layer to construct the enhanced machine tool thermal error time series analysis features. The specific steps are as follows:

[0017] The reconstructed machine tool thermal error time series analysis features are multiplied by the value weight matrix and the key weight matrix to construct the corresponding machine tool thermal error analysis value matrix V and machine tool thermal error analysis key matrix K. The global temperature vector is multiplied by the query weight matrix to construct the machine tool thermal error analysis query matrix Q. The feature enhancement is realized through the operation corresponding to the following formula: H = softmax(QK T / D 0.5 )V, where H is the enhanced machine tool thermal error time series analysis features, T is the matrix transpose operation, and D is the dimension size of the key matrix.

[0018] Preferably, the operation state analysis network is trained. The specific steps are as follows:

[0019] Obtain a number of operation status analysis training samples, where the operation status analysis training samples are the machine tool thermal error analysis feature set. Label the operation status analysis training samples according to the operation status, and form the operation status analysis training set with all the labeled operation status analysis training samples. Train the operation status analysis network with the operation status analysis training set, and determine whether the first training condition is met. If the first training condition is met, output the trained operation status analysis network; otherwise, continue to train the operation status analysis network with the operation status analysis training set.

[0020] Preferably, train the machine tool thermal error analysis model, which specifically includes the following steps:

[0021] Obtain a number of machine tool thermal error analysis training samples, where the machine tool thermal error analysis training samples include the machine tool thermal error time series analysis data set and the corresponding infrared images. Label the machine tool thermal error analysis training samples with the compensation amount set, and form the machine tool thermal error analysis training set with all the labeled machine tool thermal error analysis training samples. Train the machine tool thermal error analysis model with the machine tool thermal error analysis training set, and determine whether the second training condition is met. If the second training condition is met, output the trained machine tool thermal error analysis model; otherwise, continue to train the machine tool thermal error analysis model with the machine tool thermal error analysis training set.

[0022] The present invention also provides a machine tool thermal error compensation system based on data analysis, including:

[0023] A data acquisition module, used to obtain the shaft temperature data set and vibration signal data of each axis of the machine tool at the monitoring time point. The shaft temperature data set includes several shaft temperature data; at the same time, obtain the current data at the machine tool servo motor, as well as obtain the ambient temperature data around the machine tool and obtain the infrared image at the machine tool.

[0024] A machine tool thermal error analysis data construction module, used to construct machine tool thermal error analysis data based on the obtained shaft temperature data set, vibration signal data, current data and ambient temperature data, and the machine tool thermal error analysis data is stored in matrix form. Each row in the machine tool thermal error analysis data is the machine tool thermal error analysis vector corresponding to each axis of the machine tool.

[0025] A machine tool thermal error analysis module, used to form the machine tool thermal error time series analysis data set with the machine tool thermal error analysis data corresponding to the current monitoring time point and the machine tool thermal error analysis data corresponding to the previous N - 1 monitoring time points, and send the machine tool thermal error time series analysis data set and the infrared image into the machine tool thermal error analysis model for processing, and output the compensation amount set; correct the control instruction of the machine tool based on the compensation amount set to complete the thermal error compensation of the machine tool.

[0026] The machine tool thermal error compensation module is used to correct the control instructions of the machine tool based on the compensation amount set to complete the thermal error compensation of the machine tool;

[0027] The machine tool thermal error analysis model includes a time series analysis layer, an infrared image analysis layer, a weight analysis layer, a feature adjustment layer, a feature enhancement layer, and a compensation amount output layer. Among them, the time series analysis layer is established based on the LSTM model and is used to perform time series analysis processing on the machine tool thermal error time series analysis data set to construct machine tool thermal error time series analysis features; the infrared image analysis layer is used to perform image processing on the infrared image to construct a global temperature vector; the weight analysis layer is used to perform operating state analysis on the machine tool thermal error analysis data obtained at the current monitoring point to output the corresponding operating state vector, and then determine the weight distribution matrix based on the machine tool thermal error time series analysis features and the operating state vector, and perform weight adjustment on the machine tool thermal error time series analysis features based on the weight distribution matrix to construct the reconstructed machine tool thermal error time series analysis features; the feature enhancement layer is used to perform feature enhancement operations on the reconstructed machine tool thermal error time series analysis features based on the global temperature vector to construct enhanced machine tool thermal error time series analysis features; the compensation amount output layer is used to perform a fully connected operation on the enhanced machine tool thermal error time series analysis features to output the compensation amount for each axis.

[0028] The present invention has the following advantages:

[0029] The present invention determines the operating state of the machine tool with the assistance of multi-source data by collecting the axis temperature data set and vibration signal data of each axis of the machine tool, as well as the current data at the machine tool servo motor, the ambient temperature data around the machine tool, and obtaining the infrared image at the machine tool. Then, based on the operating state of the machine tool, the weight distribution of the features related to the thermal error is adjusted to highlight the features strongly related to the thermal error under different working conditions, improve the accuracy of thermal error analysis, and further improve the effect of machine tool thermal error compensation; and the temperature change gradient features of each axis are enhanced through the infrared image, further improving the accuracy of thermal error analysis. Description of the Drawings

[0030] Figure 1 It is a schematic structural diagram of the machine tool thermal error compensation system based on data analysis adopted in the embodiment of the present invention. Detailed Embodiments

[0031] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention.

[0032] Embodiment 1, a machine tool thermal error compensation method based on data analysis, includes:

[0033] Obtain the axis temperature dataset and vibration signal data of each axis of the machine tool at the monitoring time point. The axis temperature dataset includes several axis temperature data. It should be noted that generally, a machine tool has 2 - 3 axes for rotational and linear motion, and these axes are also the main components for thermal error compensation. The axis temperature dataset is collected by several fiber optic temperature sensors distributed on the axes, and the vibration signal data is collected by vibration accelerometers set on the axes; at the same time, obtain the current data at the servo motor of the machine tool, the acquisition method is through Hall elements, as well as obtain the ambient temperature data around the machine tool and obtain the infrared image at the machine tool. The ambient temperature data is obtained by temperature sensors set around the machine tool, and the infrared image is obtained by an infrared thermal imager; based on the obtained axis temperature dataset, vibration signal data, current data, and ambient temperature data, construct the machine tool thermal error analysis data, and the machine tool thermal error analysis data is stored in matrix form. Each row in the machine tool thermal error analysis data is the machine tool thermal error analysis vector corresponding to each axis of the machine tool;

[0034] Combine the machine tool thermal error analysis data corresponding to the current monitoring time point and the machine tool thermal error analysis data corresponding to the previous N - 1 monitoring time points to form a machine tool thermal error time series analysis dataset, and send the machine tool thermal error time series analysis dataset and the infrared image into the machine tool thermal error analysis model for processing, and output a compensation amount set. The compensation amount set includes the compensation amount for each axis. Here, the compensation amount refers to the correction instruction sent to the corresponding axis of the machine tool to eliminate the thermal error, specifically a spatial vector value, including the action direction, correction amount value, and action timing; based on the compensation amount set, correct the control instruction of the machine tool to complete the thermal error compensation of the machine tool;

[0035] The machine tool thermal error analysis model includes a time series analysis layer, an infrared image analysis layer, a weight analysis layer, a feature adjustment layer, a feature enhancement layer, and a compensation amount output layer. Among them, the time series analysis layer is established based on the LSTM model and is used to perform time series analysis processing on the machine tool thermal error time series analysis data set to construct machine tool thermal error time series analysis features. By performing time series analysis processing on the machine tool thermal error time series analysis data set, the temperature change situation, vibration change situation, and current change situation of each axis of the machine tool can be analyzed. The temperature change situation can be used to analyze the temperature accumulation effect of the machine tool, thereby providing a reference for thermal error analysis. The vibration change situation and current change situation can be used to analyze the operating state of the machine tool; the infrared image analysis layer is established based on a convolutional neural network. Here, the convolutional neural network uses the ResNet18 model and is used to perform image processing on the infrared image to construct a global temperature vector. The global temperature vector can reflect the global temperature change at the machine tool and is used to strengthen the spatial relationship of each axis subsequently; the weight analysis layer is used to perform operating state analysis on the machine tool thermal error analysis data obtained at the current monitoring point to output the corresponding operating state vector. Then, based on the machine tool thermal error time series analysis features and the operating state vector, a weight distribution matrix is determined, and based on the weight distribution matrix, the machine tool thermal error time series analysis features are adjusted in weight to construct reconstructed machine tool thermal error time series analysis features. It should be noted that the operating state here refers to different working states of the machine tool, such as heavy cutting state and continuous milling state, etc. In different operating states, the features related to thermal error will have different weight coefficients. For example, in the heavy cutting state, the temperature change feature weight corresponding to the lead screw axis will have higher reference value; the feature enhancement layer is used to perform feature enhancement operations on the reconstructed machine tool thermal error time series analysis features based on the global temperature vector to construct enhanced machine tool thermal error time series analysis features. During the process of performing feature enhancement operations on the reconstructed machine tool thermal error time series analysis features based on the global temperature vector, the temperature change gradient features of each axis can be enhanced with the assistance of the global temperature change; the compensation amount output layer is used to perform a fully connected operation on the enhanced machine tool thermal error time series analysis features to output the compensation amount of each axis;

[0036] In this application, by collecting the axis temperature data set and vibration signal data of each axis of the machine tool, as well as the current data at the machine tool servo motor, the ambient temperature data around the machine tool, and obtaining the infrared image at the machine tool, with the assistance of multi-source data, the operating state of the machine tool is determined. Then, based on the operating state of the machine tool, the weight distribution of the features related to thermal error is adjusted to highlight the features strongly related to thermal error under different working conditions, improve the accuracy of thermal error analysis, and thus improve the effect of machine tool thermal error compensation; and the temperature change gradient features of each axis are strengthened through the infrared image, further improving the accuracy of thermal error analysis.

[0037] Construct machine tool thermal error analysis data based on the acquired shaft temperature dataset, vibration signal data, current data, and ambient temperature data, which specifically includes the following steps:

[0038] Extract time-domain features and frequency-domain features for the current data respectively. Here, the time-domain features can be peak value, standard value, fluctuation amplitude, etc., and the frequency-domain features can be spectral amplitude, power spectral density, etc. Combine the time-domain features and frequency-domain features corresponding to the current data to form a current feature vector;

[0039] For each shaft, calculate the mean value of all shaft temperature data in the shaft temperature dataset, denoted as the shaft temperature data mean value; perform moving average filtering on all shaft temperature data in the shaft temperature dataset, and then calculate the shaft temperature gradient value between adjacent shaft temperature data. Here, the adjacent shaft temperature data refers to the adjacent positions of the corresponding fiber optic temperature sensors. The calculation method of the shaft temperature gradient value is the difference between adjacent shaft temperature data divided by the adjacent spacing, and the adjacent spacing refers to the distance between adjacent fiber optic temperature sensors; perform wavelet packet decomposition on the vibration signal data, extract several characteristic frequency bands, and then calculate the energy proportion of each characteristic frequency band, and form a vibration energy vector with the energy proportions of each characteristic frequency band; combine all shaft temperature data mean values, all shaft temperature gradient values, vibration energy vectors, current feature vectors, and ambient temperature data to form a machine tool thermal error analysis vector;

[0040] Stack all machine tool thermal error analysis vectors vertically to form machine tool thermal error analysis data;

[0041] Perform operating state analysis on the machine tool thermal error analysis data obtained at the current monitoring point through a weight analysis layer to output the corresponding operating state vector. Then, determine the weight distribution matrix based on the machine tool thermal error time series analysis features and the operating state vector, and adjust the weights of the machine tool thermal error time series analysis features based on the weight distribution matrix to construct reconstructed machine tool thermal error time series analysis features, which specifically includes the following steps:

[0042] Flatten the machine tool thermal error analysis data obtained at the current monitoring point by rows to obtain a machine tool thermal error analysis feature set, and then send the machine tool thermal error analysis feature set into an operating state analysis network for processing. The operating state analysis network is established based on a random forest model to output the corresponding operating state, and then process the corresponding operating state through word embedding to obtain the corresponding operating state vector;

[0043] After adding the operation status vector to the end of each row of the time series analysis features of the machine tool thermal error, it is sent to a multi-layer perceptron for processing, and a weight distribution matrix is output. Here, the multi-layer perceptron generally includes an input layer, a hidden layer, and an output layer. The number of neural nodes in the input layer and the output layer is the same as the total number of axes of the machine tool. The number of neural nodes in the hidden layer is usually generated by iterative optimization algorithms of swarm optimization algorithms, and the parameters of the multi-layer perceptron are determined through the training of the machine tool thermal error analysis model;

[0044] Calculate the Hadamard product of the time series analysis features of the machine tool thermal error and the weight distribution matrix to obtain the reconstructed time series analysis features of the machine tool thermal error;

[0045] Perform a feature enhancement operation on the reconstructed time series analysis features of the machine tool thermal error based on the global temperature vector through a feature enhancement layer to construct enhanced time series analysis features of the machine tool thermal error, which specifically includes the following steps:

[0046] Perform matrix multiplication operations on the reconstructed time series analysis features of the machine tool thermal error with the value weight matrix and the key weight matrix to construct the corresponding machine tool thermal error analysis value matrix V and the machine tool thermal error analysis key matrix K. Perform matrix multiplication operations on the global temperature vector with the query weight matrix to construct the machine tool thermal error analysis query matrix Q. The feature enhancement is achieved through the operations corresponding to the following formula, H = softmax(QK T / D 0.5 )V, where H is the enhanced time series analysis features of the machine tool thermal error, T is the matrix transpose operation, and D is the dimension size of the key matrix; the value weight matrix, the key weight matrix, and the query weight matrix are set based on the self-attention mechanism in the Transformer model, and the parameters of the value weight matrix, the key weight matrix, and the query weight matrix are determined through the training of the machine tool thermal error analysis model;

[0047] Train the operation status analysis network, which specifically includes the following steps:

[0048] Obtain several operation status analysis training samples. The operation status analysis training samples are the machine tool thermal error analysis feature sets. Here, the machine tool thermal error analysis feature sets are constructed by developers based on the actually obtained axis temperature data sets, vibration signal data, current data, and environmental temperature data. Label the operation status analysis training samples through the operation status. Here, the labeling process is determined by developers based on the experience of professional machine tool operators. Combine all the labeled operation status analysis training samples into an operation status analysis training set. Train the operation status analysis network through the operation status analysis training set, and determine whether the first training condition is met. Here, the first training condition generally means that the number of training times reaches a certain number or the accuracy of the operation status analysis network meets the expectations. If the first training condition is met, output the trained operation status analysis network; otherwise, continue to train the operation status analysis network through the operation status analysis training set.

[0049] Train the machine tool thermal error analysis model, which specifically includes the following steps:

[0050] Obtain a number of machine tool thermal error analysis training samples. The machine tool thermal error analysis training samples include a machine tool thermal error time series analysis data set and corresponding infrared images. Here, the machine tool thermal error analysis training samples including the machine tool thermal error time series analysis data set and corresponding infrared images are also obtained by developers based on the actually operating machine tools. Label the machine tool thermal error analysis training samples with a compensation amount set. Here, the compensation amount set is the optimal compensation method actually adopted by professional machine tool operators. Combine all the labeled machine tool thermal error analysis training samples to form a machine tool thermal error analysis training set. Train the machine tool thermal error analysis model with the machine tool thermal error analysis training set, and determine whether the second training condition is met. Here, the second training condition can also be that the number of training times reaches a certain number or the accuracy rate of the machine tool thermal error analysis model meets the expectation. If the second training condition is met, output the trained machine tool thermal error analysis model; otherwise, continue to train the machine tool thermal error analysis model with the machine tool thermal error analysis training set.

[0051] Example 2, a machine tool thermal error compensation system based on data analysis, see Figure 1 , including:

[0052] A data acquisition module for obtaining the shaft temperature data set and vibration signal data of each axis of the machine tool at the monitoring time point. The shaft temperature data set includes several shaft temperature data. It should be noted that generally, a machine tool has 2 - 3 axes for rotational and linear motion, and these axes are also the main components for thermal error compensation. Collect the shaft temperature data set through several fiber optic temperature sensors distributed on the axes, and collect the vibration signal data through vibration accelerometers set on the axes; at the same time, obtain the current data at the machine tool servo motor, and the acquisition method is through Hall elements, as well as obtain the ambient temperature data around the machine tool and obtain the infrared image at the machine tool. The ambient temperature data is obtained through temperature sensors set around the machine tool, and the infrared image is obtained through an infrared thermal imager;

[0053] A machine tool thermal error analysis data construction module for constructing machine tool thermal error analysis data based on the obtained shaft temperature data set, vibration signal data, current data, and ambient temperature data, and storing the machine tool thermal error analysis data in matrix form. Each row in the machine tool thermal error analysis data is a machine tool thermal error analysis vector corresponding to each axis of the machine tool;

[0054] The machine tool thermal error analysis module is used to form a machine tool thermal error time series analysis dataset from the machine tool thermal error analysis data corresponding to the current monitoring time point and the machine tool thermal error analysis data corresponding to the previous N - 1 monitoring time points, and send the machine tool thermal error time series analysis dataset and the infrared image into the machine tool thermal error analysis model for processing, and output a compensation amount set. The compensation amount set includes the compensation amount for each axis. Here, the compensation amount refers to the correction instruction sent to the corresponding axis of the machine tool to eliminate the thermal error, specifically a spatial vector value, including the action direction, the correction amount value, and the action timing;

[0055] The machine tool thermal error compensation module is used to correct the control instruction of the machine tool based on the compensation amount set to complete the thermal error compensation of the machine tool;

[0056] The machine tool thermal error analysis model includes a time series analysis layer, an infrared image analysis layer, a weight analysis layer, a feature adjustment layer, a feature enhancement layer, and a compensation amount output layer. Among them, the time series analysis layer is established based on the LSTM model and is used to perform time series analysis processing on the machine tool thermal error time series analysis dataset to construct machine tool thermal error time series analysis features. By performing time series analysis processing on the machine tool thermal error time series analysis dataset, the temperature change situation, vibration change situation, and current change situation of each axis of the machine tool can be analyzed. The temperature change situation can be used to analyze the temperature accumulation effect of the machine tool, and thus provide a reference for thermal error analysis. The vibration change situation and current change situation can be used to analyze the operating state of the machine tool; The infrared image analysis layer is established based on a convolutional neural network. Here, the convolutional neural network uses the ResNet18 model and is used to perform image processing on the infrared image to construct a global temperature vector. The global temperature vector can reflect the global temperature change at the machine tool and is used to strengthen the spatial relationship of each axis subsequently; The weight analysis layer is used to analyze the operating state of the machine tool thermal error analysis data obtained at the current monitoring point to output the corresponding operating state vector, then determine the weight distribution matrix based on the machine tool thermal error time series analysis features and the operating state vector, and adjust the weights of the machine tool thermal error time series analysis features based on the weight distribution matrix to construct the reconstructed machine tool thermal error time series analysis features. It should be noted that the operating state here refers to different working states of the machine tool, such as heavy cutting state and continuous milling state, etc. In different operating states, the features related to thermal error will have different weight coefficients. For example, in the heavy cutting state, the temperature change feature weight corresponding to the lead screw axis will have higher reference; The feature enhancement layer is used to perform feature enhancement operations on the reconstructed machine tool thermal error time series analysis features based on the global temperature vector to construct enhanced machine tool thermal error time series analysis features. During the process of performing feature enhancement operations on the reconstructed machine tool thermal error time series analysis features based on the global temperature vector, the temperature change gradient features of each axis can be enhanced with the assistance of the global temperature change; The compensation amount output layer is used to perform a fully connected operation on the enhanced machine tool thermal error time series analysis features to output the compensation amount for each axis.

[0057] It should be understood that those of ordinary skill in the art can make improvements or transformations based on the above description, and all such improvements and transformations shall fall within the protection scope of the appended claims of the present invention. The parts not described in detail in this specification belong to the prior art well known to those of ordinary skill in the art.

Claims

1. A machine tool thermal error compensation method based on data analysis, characterized in that: include: At the monitoring time point, the axis temperature data set and vibration signal data of each axis of the machine tool are obtained, and the axis temperature data set includes several axis temperature data; at the same time, the current data at the servo motor of the machine tool, the ambient temperature data around the machine tool, and the infrared image of the machine tool are obtained; based on the obtained axis temperature data set, vibration signal data, current data, and ambient temperature data, the machine tool thermal error analysis data is constructed, and the machine tool thermal error analysis data is stored in a matrix form, and each line in the machine tool thermal error analysis data is a machine tool thermal error analysis vector corresponding to each axis of the machine tool; The machine tool thermal error analysis data corresponding to the current monitoring time point and the machine tool thermal error analysis data corresponding to the previous N-1 monitoring time points are combined into a machine tool thermal error time series analysis data set, and the machine tool thermal error time series analysis data set and the infrared image are sent to the machine tool thermal error analysis model for processing, and a compensation amount set is output; The control instructions of the machine tool are modified based on the compensation amount set to complete the thermal error compensation of the machine tool; The machine tool thermal error analysis model includes a timing analysis layer, an infrared image analysis layer, a weight analysis layer, a feature adjustment layer, a feature enhancement layer, and a compensation output layer. The timing analysis layer is established based on the LSTM model and is used to perform timing analysis on the machine tool thermal error timing analysis data set to construct the machine tool thermal error timing analysis features. The infrared image analysis layer is used to process the infrared image to construct the global temperature vector; The weight analysis layer is used to perform operation state analysis on the machine tool thermal error analysis data obtained at the current monitoring point to output the corresponding operation state vector, and then determine the weight distribution matrix based on the machine tool thermal error timing analysis characteristics and the operation state vector, and adjust the weight of the machine tool thermal error timing analysis characteristics based on the weight distribution matrix to construct a reconstructed machine tool thermal error timing analysis characteristics; The feature enhancement layer is used to perform feature enhancement operation on the reconstructed machine tool thermal error timing analysis feature based on the global temperature vector to construct an enhanced machine tool thermal error timing analysis feature; The compensation output layer is used to perform full connection operations on the enhanced machine tool thermal error timing analysis features to output the compensation amount of each axis.

2. A machine tool thermal error compensation method based on data analysis according to claim 1, characterized in that: The machine tool thermal error analysis data is constructed based on the acquired axis temperature data set, vibration signal data, current data and ambient temperature data, which specifically includes the following steps: Extract time domain features and frequency domain features from the current data respectively, and combine the time domain features and frequency domain features corresponding to the current data into a current feature vector; For each axis, the mean of all axis temperature data in the axis temperature data set is calculated and recorded as the mean of axis temperature data; all axis temperature data in the axis temperature data set are subjected to sliding average filtering, and then the axis temperature gradient value between adjacent axis temperature data is calculated; wavelet packet decomposition is performed on the vibration signal data, several characteristic frequency bands are extracted, and then the energy proportion of each characteristic frequency band is calculated, and the energy proportion of each characteristic frequency band is composed into a vibration energy vector; the mean of all axis temperature data, all axis temperature gradient values, vibration energy vectors, current characteristic vectors and ambient temperature data are combined into a machine tool thermal error analysis vector; All machine tool thermal error analysis vectors are spliced ​​from top to bottom to form machine tool thermal error analysis data.

3. The method for compensating machine tool thermal errors based on data analysis according to claim 2, characterized in that: The weight analysis layer is used to perform an operation state analysis on the machine tool thermal error analysis data obtained at the current monitoring point to output the corresponding operation state vector, and then the weight distribution matrix is ​​determined based on the machine tool thermal error timing analysis characteristics and the operation state vector, and the weight of the machine tool thermal error timing analysis characteristics is adjusted based on the weight distribution matrix to construct a reconstructed machine tool thermal error timing analysis feature, which specifically includes the following steps: The machine tool thermal error analysis data obtained at the current monitoring point is flattened by rows to obtain a machine tool thermal error analysis feature set, and then the machine tool thermal error analysis feature set is sent to the operation state analysis network for processing. The operation state analysis network is established based on the random forest model to output the corresponding operation state, and then the corresponding operation state is processed by word embedding to obtain the corresponding operation state vector; Add the running state vector to the end of each row of the machine tool thermal error timing analysis feature and send it to the multi-layer perceptron for processing, and output the weight distribution matrix; The Hadamard product of the timing analysis characteristics of the thermal error of the machine tool and the weight distribution matrix is ​​calculated to obtain the timing analysis characteristics of the thermal error of the reconstructed machine tool.

4. The method for compensating machine tool thermal errors based on data analysis according to claim 3, characterized in that: The feature enhancement operation is performed on the reconstructed machine tool thermal error timing analysis feature based on the global temperature vector through the feature enhancement layer to construct the enhanced machine tool thermal error timing analysis feature, which specifically includes the following steps: The reconstructed machine tool thermal error timing analysis features are matrix multiplied with the value weight matrix and the key weight matrix to construct the corresponding machine tool thermal error analysis value matrix V and machine tool thermal error analysis key matrix K. The global temperature vector is matrix multiplied with the query weight matrix to construct the machine tool thermal error analysis query matrix Q. The feature enhancement is achieved through the operation corresponding to the following formula: H = softmax(QK T / D 0.5 )V, where H is the characteristic of enhanced machine tool thermal error timing analysis, T is the matrix transpose operation, and D is the dimension size of the key matrix.

5. The method for compensating machine tool thermal errors based on data analysis according to claim 4, characterized in that: Training the operation status analysis network includes the following steps: A plurality of running state analysis training samples are obtained, wherein the running state analysis training samples are a feature set for thermal error analysis of machine tools, the running state analysis training samples are labeled according to the running state, all labeled running state analysis training samples are formed into a running state analysis training set, the running state analysis network is trained according to the running state analysis training set, and it is judged whether a first training condition is met, and if so, the trained running state analysis network is output; otherwise, the running state analysis network is continuously trained according to the running state analysis training set.

6. The method for compensating machine tool thermal errors based on data analysis according to claim 5, characterized in that: Training the machine tool thermal error analysis model includes the following steps: Acquire a number of machine tool thermal error analysis training samples, which include a machine tool thermal error time series analysis data set and a corresponding infrared image, annotate the machine tool thermal error analysis training samples by a compensation amount set, form a machine tool thermal error analysis training set with all annotated machine tool thermal error analysis training samples, train a machine tool thermal error analysis model by using the machine tool thermal error analysis training set, and judge whether a second training condition is met. If the second training condition is met, output the trained machine tool thermal error analysis model; Otherwise, the machine tool thermal error analysis model continues to be trained using the machine tool thermal error analysis training set.

7. A machine tool thermal error compensation system based on data analysis, characterized in that: The system applies a machine tool thermal error compensation method based on data analysis as described in any one of claims 1 to 6, including: The data acquisition module is used to obtain the shaft temperature data set and vibration signal data of each shaft of the machine tool at the monitoring time point, and the shaft temperature data set includes several shaft temperature data; at the same time, the current data of the servo motor of the machine tool is obtained, as well as the ambient temperature data around the machine tool and the infrared image of the machine tool; A machine tool thermal error analysis data construction module is used to construct machine tool thermal error analysis data based on the acquired axis temperature data set, vibration signal data, current data and ambient temperature data, and the machine tool thermal error analysis data is stored in a matrix form, and each line in the machine tool thermal error analysis data is a machine tool thermal error analysis vector corresponding to each axis of the machine tool; The machine tool thermal error analysis module is used to form a machine tool thermal error timing analysis data set by combining the machine tool thermal error analysis data corresponding to the current monitoring time point and the machine tool thermal error analysis data corresponding to the previous N-1 monitoring time points, and send the machine tool thermal error timing analysis data set and the infrared image to the machine tool thermal error analysis model for processing, and output a compensation amount set; based on the compensation amount set, the control instructions of the machine tool are corrected to complete the thermal error compensation of the machine tool; A machine tool thermal error compensation module is used to correct the control instructions of the machine tool based on the compensation amount set to complete the thermal error compensation of the machine tool; The machine tool thermal error analysis model includes a timing analysis layer, an infrared image analysis layer, a weight analysis layer, a feature adjustment layer, a feature enhancement layer and a compensation output layer. The timing analysis layer is established based on the LSTM model and is used to perform timing analysis on the machine tool thermal error timing analysis data set to construct the machine tool thermal error timing analysis features; the infrared image analysis layer is used to perform image processing on the infrared image to construct a global temperature vector; the weight analysis layer is used to perform operating state analysis on the machine tool thermal error analysis data obtained at the current monitoring point to output the corresponding operating state vector, and then determine the weight distribution matrix based on the machine tool thermal error timing analysis features and the operating state vector, and adjust the weight of the machine tool thermal error timing analysis features based on the weight distribution matrix to construct a reconstructed machine tool thermal error timing analysis feature; the feature enhancement layer is used to perform feature enhancement operations on the reconstructed machine tool thermal error timing analysis features based on the global temperature vector to construct an enhanced machine tool thermal error timing analysis feature; the compensation output layer is used to perform full connection operations on the enhanced machine tool thermal error timing analysis features to output the compensation amount for each axis.

Citation Information

Patent Citations

  • Numerical control machine tool spindle error prediction compensation method and system

    CN114690706A

  • Machine tool spindle Z-direction thermal deformation prediction method based on multi-source heterogeneous information fusion

    CN115526424A

  • Machine tool thermal error compensation method and system

    CN117572820A

  • Numerical control vertical lathe servo system process parameter optimization and main shaft control method and system thereof

    CN118795840A

  • Numerical control machine tool spindle thermal error dynamic compensation model and system

    CN118963241A

Cited By

  • Thermal error compensation method and system for motorized spindle

    CN120891794A

  • Numerical control machine tool machining error modeling method and system

    CN121596823A

  • A method and system for modeling machining errors in CNC machine tools

    CN121596823B

  • Information processing device, industrial system, and machine tool control method

    JP7825793B1