Numerical control machine tool thermal error online compensation control method and system thereof

By combining graph neural networks and adaptive update modules, accurate prediction and real-time compensation of thermal errors in CNC machine tools are achieved, solving the problems of insufficient thermal error modeling and incomplete compensation in existing technologies, and improving machining accuracy and stability.

CN121704343BActive Publication Date: 2026-05-01JIANGSU UNIV OF SCI & TECH IND TECH RES INST OF ZHANGJIAGANG
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
JIANGSU UNIV OF SCI & TECH IND TECH RES INST OF ZHANGJIAGANG
Filing Date
2026-02-13
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In the existing technology, the thermal error control methods for CNC machine tools have problems such as insufficient spatial correlation modeling of temperature field, incomplete coverage of multi-axis thermal errors, and lack of adaptive update mechanism, resulting in limited compensation effect and lag.

Method used

A nonlinear mapping model between temperature field distribution and thermal deformation is established using a graph neural network. The spatial topological relationship between multiple temperature measurement points is captured through graph convolution operations, and a temperature field adjacency matrix is ​​constructed. Combined with an adaptive update module, online compensation is performed, covering thermal error prediction and compensation for key parts such as the spindle, lead screw, and guide rail.

Benefits of technology

It achieves accurate prediction and real-time compensation of multi-axis thermal errors, with thermal error prediction accuracy within 2μm, compensation rate of over 85%, and machining accuracy stability improved by more than 3 times. It also eliminates the lag in compensation control and adapts to the characteristic drift after long-term use of machine tools.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121704343B_ABST
    Figure CN121704343B_ABST
Patent Text Reader

Abstract

The application discloses a numerical control machine tool thermal error online compensation control method and system, and belongs to the technical field of numerical control machine tool precision machining. The method comprises the following steps: collecting temperature data and operation parameters of key positions of a machine tool, and generating a temperature characteristic vector; a temperature field adjacency matrix is constructed to predict future temperature field distribution; a graph neural network is used to establish a nonlinear mapping between the temperature field and thermal deformation, and a thermal displacement prediction value is output; a compensation instruction is superimposed on an original trajectory for execution; and model parameters are updated online according to calibration data. The application adopts graph convolution operation to capture the spatial correlation characteristics of the temperature field, so that the thermal error prediction accuracy is better than 2 mu m, and the compensation rate reaches more than 85%.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of precision machining technology for CNC machine tools, and in particular to a method and system for online thermal error compensation control of CNC machine tools. Background Technology

[0002] In existing technologies, methods for controlling thermal errors in CNC machine tools are mainly divided into two categories: hardware suppression methods and software compensation methods. Hardware suppression methods reduce thermal deformation by improving the machine tool's structural design, adopting a symmetrical layout, separating heat sources, and adding cooling systems. However, these methods are often costly and difficult to completely eliminate thermal errors. Software compensation methods, on the other hand, establish a mathematical model between temperature and thermal errors, predict thermal errors in real time, and compensate for them, offering advantages such as low cost and high flexibility.

[0003] Taking a CNC machine tool spindle error prediction and compensation method disclosed in CN114690706A as an example, this method collects voltage, current, ambient temperature, and target point temperature information of the spindle within a target time period, calculates the temperature difference information of each target temperature measurement point, and then uses a pre-trained recurrent neural network prediction model to predict and compensate for thermal errors. However, this scheme still has the following technical defects: First, the recurrent neural network model is difficult to effectively capture the spatial topological relationship between multiple temperature measurement points. When there are multiple distributed heat sources in the machine tool, it is impossible to accurately model the influence of heat conduction paths on the temperature field distribution. Second, it only predicts and compensates for spindle errors and fails to cover the thermal deformation of other key components such as lead screws, guide rails, and columns, resulting in limited compensation effects in complex machining scenarios. Third, the prediction model trained offline lacks an online adaptive update mechanism, making it difficult to adapt to the characteristic drift after long-term use of the machine tool. Fourth, it fails to achieve advanced prediction of the temperature field evolution trend, and the compensation control has a lag.

[0004] Therefore, there is an urgent need to propose an online thermal error compensation control method for CNC machine tools that can fully utilize the spatial topology information of the temperature field, cover multi-axis thermal errors, and possess temperature field prediction capabilities and an adaptive update mechanism. Summary of the Invention

[0005] The purpose of this invention is to provide a method and system for online thermal error compensation control of CNC machine tools, so as to solve the technical problems existing in the prior art, such as insufficient spatial correlation modeling of temperature field, incomplete coverage of multi-axis thermal error, and lack of adaptive update mechanism.

[0006] To achieve the above objectives, the first aspect of the present invention provides an online thermal error compensation control method for CNC machine tools, comprising: a multi-source temperature data acquisition step, acquiring temperature data, ambient temperature data, spindle speed data, feed rate data, and running time data of key parts of the CNC machine tool, wherein the key parts include spindle bearings, ball screws, linear guides, and columns; the temperature data is continuously acquired by temperature sensors deployed at each key part according to a preset temperature sampling period; the temperature data is preprocessed to generate a temperature feature vector; and the power estimate of each heat source is calculated based on the spindle speed data and feed rate data; a temperature field prediction step, constructing a temperature field adjacency matrix to characterize the spatial topological relationship between each temperature measurement point; inputting the temperature feature vector and power estimate into a temperature field prediction model; the temperature field prediction model extracts features from historical temperature rise curves based on a spatiotemporal attention mechanism and outputs a preset time-domain window. The process involves several steps: First, predicting the temperature field distribution within the model. Second, a thermal error prediction step inputs the current and predicted temperature field distributions into a graph neural network (GNN) thermal error prediction model. This model extracts spatial correlation features of the temperature field based on graph convolution operations, establishes a nonlinear mapping relationship between the temperature field distribution and thermal deformation, and outputs predicted thermal displacement values ​​for each motion axis. Third, a compensation control step converts the predicted thermal displacement values ​​into position compensation commands for each motion axis. These commands are then superimposed onto the original machining trajectory according to a preset compensation cycle, generating a compensated machining trajectory and sending it to the CNC system's servo drive for execution. Finally, an adaptive update step acquires laser interferometer calibration data according to a preset calibration update cycle, calculates the prediction error between the predicted thermal displacement value and the actual measured thermal displacement value, and updates the network parameters of the GNN thermal error prediction model online when the prediction error exceeds a preset error threshold.

[0007] Preferably, the method for constructing the temperature field adjacency matrix includes: calculating the Euclidean distance between any two temperature measuring points based on the three-dimensional coordinates of each temperature measuring point in the machine tool coordinate system; marking two temperature measuring points whose Euclidean distance is less than a preset distance threshold as adjacent nodes; and assigning weights to the edges between adjacent nodes based on the heat conduction path.

[0008] Preferably, the preset time window is 5 to 10 minutes long, and the prediction step size of the temperature field prediction model is 30 to 60 seconds.

[0009] Preferably, the prediction accuracy of the thermal displacement prediction value is not lower than the preset thermal error prediction accuracy threshold, which is 2μm.

[0010] Preferably, the preset compensation period is no more than 10ms, and the position compensation command includes X-axis compensation amount, Y-axis compensation amount and Z-axis compensation amount.

[0011] Preferably, the preset calibration update cycle is 24h to 168h, and the online update adopts an incremental learning method.

[0012] To achieve the above objectives, a second aspect of the present invention provides an online thermal error compensation control system for CNC machine tools, comprising: a multi-source temperature data acquisition module, used to acquire temperature data, ambient temperature data, spindle speed data, feed rate data, and running time data of key parts of the CNC machine tool; preprocessing the temperature data to generate a temperature feature vector; and calculating the power estimate of each heat source based on the spindle speed data and feed rate data; a temperature field prediction module, used to construct a temperature field adjacency matrix; inputting the temperature feature vector and power estimate into a temperature field prediction model; and outputting the predicted temperature field distribution within a preset time window; a thermal error prediction module, used to input the current temperature field distribution and the predicted temperature field distribution into a graph neural network thermal error prediction model; establishing a nonlinear mapping relationship between the temperature field distribution and thermal deformation based on graph convolution operations; and outputting the predicted thermal displacement value of each motion axis; a compensation control module, used to convert the predicted thermal displacement value into a position compensation command; superimposing the position compensation command onto the original machining trajectory to generate a compensated machining trajectory; and an adaptive update module, used to acquire laser interferometer calibration data; calculate the prediction error; and update the network parameters of the graph neural network thermal error prediction model online based on the prediction error.

[0013] The technical solution provided by this invention has the following beneficial effects:

[0014] First, this invention uses a graph neural network to establish a nonlinear mapping model between temperature field distribution and thermal deformation. Through graph convolution operations, it effectively captures the spatial topological relationship and heat conduction path characteristics between multiple temperature measurement points. Compared with the traditional recurrent neural network method, it can more accurately model the relationship between temperature field and thermal error under complex heat source distribution, and the thermal error prediction accuracy can reach within 2μm.

[0015] Secondly, this invention covers thermal error prediction and compensation for multiple key parts such as spindle, lead screw, guide rail, and column, and realizes comprehensive control of thermal error of the entire shaft system. The thermal error compensation rate can reach more than 85%, and the machining accuracy stability is improved by more than 3 times compared with that before compensation.

[0016] Third, the present invention introduces a temperature field prediction module, which can predict the temperature evolution trend in the next 5 to 10 minutes, realize the advance prediction of thermal error, and effectively eliminate the lag of compensation control.

[0017] Fourth, the present invention designs an adaptive update module, which corrects the model parameters online by periodically calibrating the data, effectively adapting to the characteristic drift after long-term use of the machine tool and ensuring the long-term stability of the compensation system. Attached Figure Description

[0018] Figure 1This is a flowchart of the online thermal error compensation control method for CNC machine tools according to the present invention.

[0019] Figure 2 This is an architecture diagram of the online thermal error compensation control system for CNC machine tools according to the present invention. Detailed Implementation

[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0021] like Figure 1 As shown, the online thermal error compensation control method for CNC machine tools provided by this invention includes a multi-source temperature data acquisition step, a temperature field prediction step, a thermal error prediction step, a compensation control step, and an adaptive update step. Each step is described in detail below.

[0022] Step S1: Multi-source temperature data acquisition step. The goal of this step is to acquire comprehensive characterization data of the thermal state of the CNC machine tool, providing input for subsequent temperature field prediction and thermal error prediction. In one embodiment of the present invention, this step is mainly performed by the multi-source temperature data acquisition module 1.

[0023] Firstly, regarding the deployment locations of the temperature sensors, this invention deploys temperature sensors at 12 key locations on the CNC machine tool: the front end of the spindle bearing, the rear end of the spindle bearing, the X-axis ball screw nut pair, the Y-axis ball screw nut pair, the Z-axis ball screw nut pair, the X-axis linear guide slider, the Y-axis linear guide slider, the Z-axis linear guide slider, the upper part of the column, the lower part of the column, the front end of the bed, and the rear end of the bed. Preferably, the temperature sensors are PT100 platinum resistance temperature sensors, with a temperature measurement accuracy of not less than 0.1℃ and a response time of not more than 1 second. An ambient temperature sensor is deployed 1 meter away from the machine tool outside the machine tool protective cover to collect ambient temperature data.

[0024] Temperature data is collected continuously according to a preset temperature sampling period. In a preferred embodiment of the invention, the temperature sampling period is set to 1 second, a value that balances the sensitivity of temperature change capture with the real-time requirements of data processing. At each sampling moment, the multi-source temperature data acquisition module 1 synchronously acquires the temperature values ​​of all temperature measurement points and records the corresponding timestamps.

[0025] In addition to temperature data, the multi-source temperature data acquisition module 1 also acquires spindle speed and feed rate data from the CNC system. Spindle speed data is obtained by reading the spindle encoder signal from the CNC system, with the data format being speed values ​​(unit: r / min), and the sampling period is the same as the temperature data. Feed rate data includes feed rate values ​​(unit: mm / min) in the X, Y, and Z axes, also acquired in real-time from the CNC system. Running time data is provided by the system clock, recording the cumulative running time since the machine tool was started.

[0026] After acquiring the raw data, the multi-source temperature data acquisition module 1 preprocesses the temperature data to generate temperature feature vectors. The preprocessing process includes the following steps.

[0027] The first step is data cleaning. Outlier detection is performed on the collected temperature data. When the temperature value of a certain measuring point deviates from its historical average by more than a preset outlier threshold (preferably 3 times the standard deviation), the data point is marked as an outlier, and linear interpolation between adjacent time points is used to fill the gap.

[0028] The second step is temperature difference calculation. This involves calculating the temperature difference between the temperature values ​​at key measurement points and the ambient temperature to eliminate the interference of ambient temperature fluctuations on thermal error analysis. Let the... Each temperature measurement point at time Temperature value The ambient temperature is The temperature difference is:

[0029] ,

[0030] in, For the first Each temperature measurement point at time Temperature difference, For the first Each temperature measurement point at time The actual temperature value, For a moment The ambient temperature value.

[0031] The third step is normalization. The temperature difference is normalized to the range of 0 to 1 to facilitate subsequent processing by the neural network. The normalization formula is:

[0032] ,

[0033] in, This is the normalized temperature difference value. To maximize the temperature difference in the training dataset, The minimum temperature difference value in the training dataset. In one embodiment of the present invention, The value is 50℃. The value is set to 0℃, which covers the temperature variation range under normal operating conditions of CNC machine tools.

[0034] The fourth step is the construction of the time sequence window. This involves setting the most recent... The normalized temperature difference at each sampling time point is organized into a time series matrix, forming a temperature feature vector. In a preferred embodiment of the present invention, the time series window length is... Set to 300, corresponding to 5 minutes of historical data (sampling period of 1 second). The dimension of the temperature feature vector is... ,in The number of temperature measurement points (in this embodiment) =12), This represents the timing window length.

[0035] Furthermore, the multi-source temperature data acquisition module 1 calculates the power estimates of each heat source based on spindle speed data and feed rate data. This invention categorizes the main heat sources of CNC machine tools into four types: spindle motor heat source, feed servo motor heat source, spindle bearing friction heat source, and leadscrew-nut pair friction heat source. The power estimation formulas for each heat source are as follows.

[0036] spindle motor heat source power The calculation formula is:

[0037] ,

[0038] in, Power of the spindle motor heat source (unit: W). The heat loss coefficient of the motor (preferably 0.1 to 0.15, representing approximately 10% to 15% of the motor power being converted into heat). Rated power of the spindle motor (unit: W). This represents the current spindle speed (unit: r / min). The rated speed of the spindle (unit: r / min).

[0039] Spindle bearing frictional heat source power The calculation formula is:

[0040] ,

[0041] in, Power of the main spindle bearing frictional heat source (unit: W). Bearing friction torque (unit: N·m). The bearing angular velocity (unit: rad / s) The bearing friction coefficient (preferably 0.001 to 0.002 for rolling bearings). Radial load of the bearing (unit: N). The bearing inner diameter (unit: m). Spindle speed (unit: r / min).

[0042] The power of frictional heat source of the lead screw and nut pair The calculation formula is:

[0043] ,

[0044] in, Power of the frictional heat source of the lead screw and nut pair (unit: W). The coefficient of friction of the ball screw and nut pair (preferably 0.003 to 0.005 for preloaded ball screws). The axial load of the lead screw (unit: N). Feed rate (unit: mm / min).

[0045] Based on the above calculations, the data output by the multi-source temperature data acquisition module 1 includes: a temperature feature vector (dimensions). The system collects data including ambient temperature time series, estimated power values ​​for each heat source time series, spindle speed time series, feed rate time series, and running time data. This data is then transmitted to the temperature field prediction module 2 for further processing.

[0046] Step S2: Temperature field prediction step. The goal of the temperature field prediction step is to predict the evolution trend of the temperature field over a future period based on the current temperature state and heat source power, thereby achieving advanced prediction of thermal errors. In one embodiment of the present invention, this step is mainly performed by the temperature field prediction module 2.

[0047] First, the temperature field prediction module 2 constructs a temperature field adjacency matrix to characterize the spatial topological relationships between each temperature measurement point. The construction of the temperature field adjacency matrix is ​​a crucial step in the graph neural network method, and its quality directly affects the subsequent feature extraction results. In this invention, the construction of the temperature field adjacency matrix comprehensively considers both the spatial location of the temperature measurement points and the heat conduction path.

[0048] Specifically, the CNC machine tools are deployed in total The first temperature measurement point, the... The three-dimensional coordinates of each temperature measuring point in the machine tool coordinate system are: Temperature field adjacency matrix elements Indicates the first The temperature measurement point and the first The correlation strength between temperature measurement points is calculated as follows.

[0049] The first step is to calculate the Euclidean distance between any two temperature measurement points:

[0050] ,

[0051] in, For the first The temperature measurement point and the first The Euclidean distance between the temperature measuring points (unit: mm). and These are the three-dimensional coordinates of the two temperature measurement points.

[0052] The second step is to determine the adjacency relationship based on a distance threshold. When the Euclidean distance between two temperature measuring points is less than a preset distance threshold... At that time, the two temperature measuring points are marked as adjacent nodes. In a preferred embodiment of the present invention, the distance threshold... The value range is from 100mm to 300mm, with 200mm being the preferred value. This range is determined based on the typical dimensions and thermal conductivity characteristics of CNC machine tool structural components. If the distance is too small, the diagram structure will be too sparse and lose associated information; if the distance is too large, too many irrelevant connections will be introduced, reducing the accuracy of the model.

[0053] The third step is to assign weights to the edges between adjacent nodes based on the heat conduction path. The formula for calculating the elements of the adjacency matrix is:

[0054] ,

[0055] in, The first in the adjacency matrix Line number Column elements, The bandwidth parameter of the Gaussian kernel (preferably a distance threshold value) (half of) This refers to the thermal conductivity path coefficient. This is used to enhance node association along the main heat conduction path when two temperature measuring points are located on the same structural component (like a guide rail). The value is 1.5; when the two temperature measuring points are located on different structural components but there is a direct heat conduction path, The value is 1.0; when heat transfer between the two temperature measuring points is only through air convection, The value is 0.5.

[0056] After completing the adjacency matrix construction, the temperature field prediction module 2 inputs the temperature feature vector and power estimate into the temperature field prediction model. The temperature field prediction model of this invention adopts a spatiotemporal attention architecture, consisting of four parts: a temporal attention encoder, a spatial attention encoder, a feature fusion layer, and a decoder.

[0057] A temporal attention encoder is used to extract features of temporal temperature variations. This encoder receives a temperature feature vector (dimensions...). Using this as input, a multi-head self-attention mechanism is employed to extract features from the historical temperature rise curve. The formula for calculating temporal attention is:

[0058] ,

[0059] in, , , These are the query matrix, key matrix, and value matrix, obtained by performing a linear transformation on the input features. Let be the dimension of the key vector. The scaling factor is used to prevent the dot product value from becoming too large. In a preferred embodiment of the invention, the temporal attention encoder employs an 8-head attention mechanism, with each attention head having a dimension of 64.

[0060] A spatial attention encoder is used to extract spatial temperature distribution features. This encoder uses an adjacency matrix... As a structural prior, the spatial relationships between temperature measurement points are learned through a graph attention mechanism. The formula for calculating spatial attention is:

[0061] ,

[0062] in, For the first The temperature measurement point is at the first Layer feature representation, For the first The set of neighbor nodes of each temperature measurement point (composed of the adjacency matrix) Sure), For the first The first in the layer The node is the first Attention coefficient of each node, For the first The learnable weight matrix of the layer, This is the activation function (the present invention uses the ReLU activation function).

[0063] Attention coefficient The calculation formula is:

[0064] ,

[0065] in, For attention vectors (learnable parameters) This represents a vector concatenation operation. LeakyReLU is a ReLU activation function with a negative slope (preferably 0.2).

[0066] The feature fusion layer fuses the outputs of the temporal attention encoder and the spatial attention encoder. The fusion method uses weighted concatenation:

[0067] ,

[0068] in, The fused feature vector The output of the time attention encoder, The output of the spatial attention encoder, and The fusion weights for temporal and spatial features are respectively (preferably both are 0.5). This indicates a vector concatenation operation.

[0069] The decoder generates a predicted temperature field distribution based on the fused features. The decoder employs a multilayer perceptron architecture, comprising two fully connected hidden layers and one output layer. The decoder outputs the predicted temperature field distribution for each sampling time within a preset time window. In a preferred embodiment of the invention, the preset time window is 5 to 10 minutes long, and the prediction step size of the temperature field prediction model is 30 to 60 seconds. Taking a 10-minute time window and a 30-second prediction step size as an example, the decoder needs to output predicted temperature field distribution values ​​for the next 20 time points.

[0070] The temperature field prediction model is trained using the mean squared error loss function:

[0071] ,

[0072] in, To predict the loss for the temperature field, For the first The temperature measurement point will be in the future. The predicted temperature value at each predicted time. This corresponds to the actual temperature value (label data is used during training). Number of temperature measurement points To predict the number of steps, To predict the step size.

[0073] The output of temperature field prediction module 2 includes: predicted temperature field distribution (dimensions). ) and current temperature field distribution (dimensions) These data are then passed to thermal error prediction module 3 for further processing.

[0074] Step S3: Thermal error prediction step. The goal of the thermal error prediction step is to predict the thermal displacement of each motion axis of the CNC machine tool based on the temperature field distribution. In one embodiment of the present invention, this step is mainly performed by the thermal error prediction module 3. Unlike the prior art that uses recurrent neural networks, the present invention innovatively uses a graph neural network to establish a nonlinear mapping model between the temperature field distribution and thermal deformation, which can effectively capture the spatial correlation characteristics of the temperature field.

[0075] The thermal error prediction module 3 receives the current temperature field distribution and the predicted temperature field distribution from the temperature field prediction module 2 as input. To utilize both the current temperature state and future temperature trend information simultaneously, the thermal error prediction module 3 concatenates these two types of data along a time dimension to form an extended temperature feature matrix with dimensions of [missing information]. .

[0076] The core of the graph neural network thermal error prediction model is graph convolution operation. The graph convolution layer used in this invention is based on the theory of spectral graph convolution, and its mathematical expression is:

[0077] ,

[0078] in, For the first The node feature matrix of the layer To add a self-loop adjacency matrix, It is the identity matrix. for degree matrix (diagonal elements) ), For the first The learnable weight matrix of the layer, This is the activation function.

[0079] In a preferred embodiment of the present invention, the graph neural network thermal error prediction model includes the following components:

[0080] The first part is the input layer, which receives the extended temperature feature matrix, with dimensions of [missing information]. .

[0081] The second part is the stacking of graph convolutional layers. This invention uses 2 to 4 graph convolutional layers (preferably 3 layers), with the output dimensions of each graph convolutional layer being 64, 128, and 64 respectively. Each graph convolutional layer is followed by a batch normalization layer and a ReLU activation function layer to accelerate training convergence and prevent gradient vanishing.

[0082] The third part is the graph pooling layer, which uses global average pooling to aggregate node-level features into graph-level features. The mathematical expression for the pooling operation is:

[0083] ,

[0084] in, For graph-level feature vectors, The output of the last graph convolutional layer The feature vector of each node For the number of nodes, The number of convolutional layers in the graph.

[0085] The fourth part is the fully connected output layer, which maps the graph-level feature vectors to thermal displacement predictions. The output layer contains two fully connected hidden layers (with 128 and 64 neurons respectively) and one output layer (with 6 neurons), outputting 6 thermal displacement components, corresponding to positive X-axis displacement, negative X-axis displacement, positive Y-axis displacement, negative Y-axis displacement, positive Z-axis displacement, and negative Z-axis displacement, respectively.

[0086] The calculation of the predicted thermal displacement value comprehensively considers both linear thermal expansion and nonlinear thermal deformation effects. The thermal displacement prediction formula proposed in this invention is as follows:

[0087] ,

[0088] in, For the first Predicted thermal displacement values ​​for each motion axis (unit: μm). For the first The temperature measurement point for the first The first-order thermal sensitivity coefficient of each motion axis It is a second-order thermal sensitivity coefficient (used to describe nonlinear effects). For the first Temperature difference at each temperature measurement point For the first Time drift coefficient of each motion axis Runtime (in hours) This is the nonlinear correction term learned by the graph neural network. For temperature field distribution, It is an adjacency matrix.

[0089] The training of the graph neural network thermal error prediction model uses a mean squared error loss function combined with L2 regularization:

[0090] ,

[0091] in, For thermal error prediction loss, For the first Predicted thermal displacement values ​​for each motion axis These are actual thermal displacement measurements (calibrated using a laser interferometer during training). Number of motion axes (in this embodiment) =3), , where L2 regularization coefficient (preferably 0.001). Let L2 be the norm of the network weights.

[0092] In a preferred embodiment of the present invention, the prediction accuracy of the thermal displacement prediction value is required to be no less than a preset thermal error prediction accuracy threshold, which is set to 2 μm. This accuracy requirement is determined based on the typical accuracy requirements in precision machining scenarios and can meet the machining requirements of parts with accuracy levels of IT6 to IT7.

[0093] The output of thermal error prediction module 3 is the predicted thermal displacement value for each motion axis, including the thermal displacement of the X-axis. Y-axis thermal displacement and Z-axis thermal displacement Furthermore, for each future moment in the predicted temperature field distribution, the thermal error prediction module 3 outputs a corresponding predicted thermal displacement value, thereby achieving advanced prediction of thermal errors. This data is then transmitted to the compensation control module 4 for further processing.

[0094] Step S4: Compensation control step. The goal of the compensation control step is to convert the thermal error prediction result into position compensation commands executable by the CNC system and superimpose them onto the original machining trajectory in real time. In one embodiment of the present invention, this step is mainly executed by the compensation control module 4.

[0095] The compensation control module 4 receives the predicted thermal displacement value from the thermal error prediction module 3 and the original machining trajectory from the CNC system. The original machining trajectory is represented in the form of G-code or CNC instruction sequence, containing the target position information of each motion axis.

[0096] The position compensation command is generated using the principle of error inverse superposition. Let the target position at a certain moment in the original machining trajectory be... The predicted thermal displacement value is The compensated target location is:

[0097] ,

[0098] in, The target location after compensation. For the original target location, These are the predicted thermal displacement values ​​for each axis. The compensation command uses subtraction because thermal displacement causes the tool to deviate relative to the workpiece; reverse compensation ensures that the actual tool position coincides with the ideal position.

[0099] The output format of the position compensation command needs to be compatible with the CNC system. In one embodiment of the present invention, the compensation control module 4 supports two compensation output methods:

[0100] The first method is External Machine Zero Offset, which achieves compensation by modifying the workpiece coordinate system offset parameters of the CNC system. It is suitable for CNC systems that support real-time parameter modification.

[0101] The second method is Superimposed Axis Compensation, which achieves compensation by sending incremental position commands to the servo drive. It is suitable for high-end CNC systems with superimposed axis functionality.

[0102] The compensation cycle is a key parameter that determines the compensation effect. In a preferred embodiment of the present invention, the preset compensation cycle is no more than 10ms. This value is determined by comprehensively considering the following factors: First, the interpolation cycle of the CNC system is usually 1ms to 4ms, and the compensation cycle should match the interpolation cycle or be an integer multiple thereof; second, the rate of change of thermal error is relatively slow, and an excessively short compensation cycle will increase the computational burden of the system without any significant benefit; finally, a 10ms compensation cycle can ensure that at a typical feed rate (e.g., 10m / min), the tool movement distance between two adjacent compensations does not exceed 1.67mm, which is sufficient to ensure the smoothness of the compensation.

[0103] To prevent abrupt changes in compensation commands from degrading the surface quality, compensation control module 4 also introduces a compensation smoothing mechanism. Specifically, linear interpolation or low-pass filtering is performed on the compensation values ​​of two adjacent compensation cycles to avoid jumps in the compensation values. The smoothing formula is as follows:

[0104] ,

[0105] in, For the first The smoothed compensation value for each compensation period. For the first The original compensation value for each compensation cycle. This is the smoothed compensation value from the previous compensation period. The smoothing factor (values ​​range from 0 to 1, preferably 0.3 to 0.5, the smaller the value, the stronger the smoothing effect).

[0106] The output of the compensation control module 4 is the compensated machining trajectory or position compensation command sequence, which is sent to the CNC system servo drive for execution. Simultaneously, the compensation control module 4 sends the compensation execution record to the adaptive update module 5 for subsequent model evaluation and updates.

[0107] Step S5: Adaptive update step. The goal of the adaptive update step is to correct the model parameters online based on periodic calibration data to adapt to the characteristic drift after long-term use of the machine tool. In one embodiment of the present invention, this step is mainly performed by the adaptive update module 5.

[0108] During long-term use, the thermal characteristics of CNC machine tools slowly drift due to factors such as bearing wear, changes in lubrication conditions, and creep of structural components, leading to a decrease in the accuracy of the initially trained thermal error prediction model. This invention addresses this problem through an adaptive update mechanism.

[0109] The adaptive update module 5 acquires laser interferometer calibration data according to a preset calibration update cycle. In a preferred embodiment of the present invention, the calibration update cycle is set to 24h to 168h (i.e., 1 day to 1 week), with the specific value determined based on the machine tool's usage intensity and accuracy requirements. The calibration process is performed while the machine tool is running idle, using a laser interferometer to measure the actual thermal displacement of each motion axis and simultaneously recording the temperature field data at the corresponding time.

[0110] After acquiring the calibration data, the adaptive update module 5 calculates the prediction error between the predicted thermal displacement value and the actual measured thermal displacement value:

[0111] ,

[0112] in, For the first The prediction error of each motion axis The thermal displacement value predicted by the model. This represents the actual thermal displacement value measured by the laser interferometer.

[0113] When the absolute value of the prediction error exceeds the preset error threshold When this occurs, the online update of the model parameters is triggered. In a preferred embodiment of the present invention, the error threshold... The value is set to 2μm, consistent with the threshold for thermal error prediction accuracy.

[0114] Online updates employ incremental learning, fine-tuning only the output layer parameters of the graph neural network thermal error prediction model while keeping the graph convolutional layer parameters unchanged. The advantages of this strategy are fast update speed, low required calibration data volume, and preservation of learned spatial correlation features of the temperature field. The output layer parameters are updated using gradient descent.

[0115] ,

[0116] in, The updated output layer weight matrix, This is the output layer weight matrix before the update. The learning rate (preferably between 0.001 and 0.01) To update the gradient of the loss function with respect to the output layer weights.

[0117] Update loss function Defined as:

[0118] ,

[0119] in, To determine the number of data points, Number of motion axes This is the parameter variation regularization coefficient (preferably 0.1), used to limit the magnitude of parameter updates to maintain model stability. The actual thermal displacement measurement value of the j-th motion axis at the k-th calibration data point is obtained by laser interferometer calibration, and the unit is μm; The predicted thermal displacement of the j-th motion axis at the k-th calibration data point is output by the graph neural network thermal error prediction model, and the unit is μm.

[0120] Furthermore, the adaptive update module 5 also performs statistical analysis on the prediction error of the temperature field prediction model. When the temperature field prediction error exhibits a systematic deviation trend, it also triggers parameter fine-tuning of the temperature field prediction model. The formula for calculating the statistical measure of the temperature field prediction error is:

[0121] ,

[0122] in, This represents the root mean square error of the temperature field prediction. This refers to the number of temperature sampling points during the calibration process. For the first The temperature measurement point is at the first The predicted temperature value at each sampling time. This corresponds to the measured temperature value.

[0123] The output of the adaptive update module 5 includes: updated model parameters and a model evaluation report (containing information such as prediction error statistics, number of model updates, and parameter change magnitude). The updated model parameters are sent to the thermal error prediction module 3 and the temperature field prediction module 2 for subsequent prediction calculations.

[0124] Through the coordinated execution of the above five steps, this invention achieves online prediction and real-time compensation of thermal errors in CNC machine tools. The technical effects of this invention are illustrated below through specific verification embodiments.

[0125] Verification Example 1: VMC850 Vertical Machining Center.

[0126] This verification embodiment uses a VMC850 vertical machining center as the test object. The maximum spindle speed of this machine tool is 8000 r / min, and the X / Y / Z axis travels are 800 mm, 500 mm, and 500 mm, respectively, with a positioning accuracy of 0.01 mm. PT100 temperature sensors are deployed at 12 locations: the front and rear ends of the spindle bearing, the X-axis, Y-axis, and Z-axis leadscrew nuts, the X-axis, Y-axis, and Z-axis guide rail sliders, the upper and lower parts of the column, the front and rear ends of the bed. An ambient temperature sensor is deployed 1 m away from the machine tool.

[0127] The test conditions were set as follows: the spindle speed varied between 2000 r / min and 6000 r / min, and the speed was switched every 30 minutes; the feed rate was set to 3000 mm / min; the total test duration was 8 hours. During the test, a laser interferometer was used to measure the actual thermal displacement of each axis every 15 minutes as a standard reference value.

[0128] Test results show that without compensation, the maximum thermal displacement along the X-axis reaches 28 μm, along the Y-axis 35 μm, and along the Z-axis 42 μm. After implementing the compensation method of this invention, the maximum residual thermal displacement along the X-axis is reduced to 3.8 μm, along the Y-axis to 4.2 μm, and along the Z-axis to 5.1 μm. Overall, the thermal error compensation rate reaches 87.3%, exceeding the preset target value of 85%.

[0129] Meanwhile, the stability of machining accuracy was evaluated. During the 8-hour test, a set of standard test workpieces (aluminum alloy 6061, dimensions 100mm×100mm×50mm) were machined every hour. The critical dimensional deviations of each workpiece were measured, and the standard deviation was calculated. The results showed that the standard deviation of the machining dimensions was 8.3μm without compensation, and decreased to 2.6μm after compensation, representing a 3.2-fold improvement in stability.

[0130] Verification Example 2: Five-axis gantry machining center.

[0131] To verify the applicability of this invention to large machine tools, this verification embodiment uses an XH2425 five-axis gantry machining center as the test object. This machine tool has an X-axis travel of 2400mm, a Y-axis travel of 2500mm, a Z-axis travel of 800mm, and a maximum spindle speed of 10000r / min. Due to the large size of the machine tool, the number of temperature measurement points has been expanded to 20, covering key parts such as the gantry beam, side columns, slide, and worktable.

[0132] The test conditions were set as follows: constant spindle speed of 4000 r / min, feed rate of 5000 mm / min, and test duration of 12 hours. The test focused on the impact of thermal deformation of the gantry beam on the accuracy of the Y and Z axes.

[0133] Test results show that without compensation, due to the thermal bending deformation of the gantry beam, the thermal displacement at the middle position of the Y-axis reaches 58μm and the thermal displacement of the Z-axis reaches 45μm. After implementing the compensation method of the present invention, the thermal displacement residual of the Y-axis is reduced to 7.2μm and the thermal displacement residual of the Z-axis is reduced to 5.8μm, and the thermal error compensation rate reaches 85.6%.

[0134] Verification of Example 3: Model Adaptive Update Effect.

[0135] To verify the effectiveness of the adaptive update module, a long-term operational test was conducted over a period of four weeks. During the test, the machine tool ran for eight hours per day and underwent calibration updates once a week.

[0136] Test results show that the average prediction error of the initial model was 1.8 μm in the first week; in the second week, due to a slight drift in the machine tool's thermal characteristics, the prediction error increased to 2.5 μm; after triggering adaptive updates, the prediction error decreased to 1.6 μm in the third week; and remained at 1.7 μm in the fourth week. This indicates that the adaptive update module can effectively track changes in the machine tool's thermal characteristics, ensuring the long-term stability of the compensation system.

[0137] The present invention was compared with the method disclosed in CN114690706A. Under the same test conditions: the method only compensates for the thermal error of the spindle, with a thermal displacement compensation rate of 82% in the Z-axis of the spindle, but fails to compensate for the thermal deformation of the lead screw and guide rail, resulting in limited improvement in overall machining accuracy; the method of the present invention comprehensively compensates for the thermal error of the entire axis system, with an overall thermal error compensation rate of 87%, and the improvement in machining accuracy stability is more significant.

[0138] Furthermore, the method employs a recurrent neural network, which struggles to capture the spatial relationships between multiple temperature measurement points. This invention, however, uses a graph neural network to explicitly model the spatial topological relationships of temperature measurement points through an adjacency matrix, resulting in superior performance under complex operating conditions with multiple distributed heat sources. Test data shows that when the machine tool simultaneously experiences both high-speed spindle rotation and rapid feed heat sources, the prediction accuracy of this invention is approximately 15% higher than that of the method.

[0139] The technical solution of this invention has broad industrial application prospects. Firstly, in the field of aerospace parts processing, since the materials of these parts are mostly difficult-to-machine materials such as titanium alloys and high-temperature alloys, the cutting heat is high, and the thermal deformation of machine tools is a prominent problem. The thermal error compensation method of this invention can significantly improve machining accuracy and meet the high precision requirements of aerospace parts. Secondly, in the field of precision mold processing, the dimensional accuracy and surface quality requirements of mold cavities are extremely high. The micron-level compensation accuracy of this invention can effectively ensure the quality of mold processing. Thirdly, in the field of automotive engine block machining, the positional accuracy of the cylinder block bore system directly affects engine performance. The full-axis thermal error compensation method of this invention can ensure the stability of the bore system's positional accuracy.

[0140] From an economic perspective, this invention employs a software compensation method, which reduces initial investment costs by over 60% compared to hardware suppression methods (such as constant temperature workshops and forced cooling systems), and also lowers operating and maintenance costs. Simultaneously, due to improved processing precision and reduced scrap rates, the product qualification rate can be increased by 5% to 10%, resulting in significant economic benefits.

[0141] like Figure 2 As shown, the online thermal error compensation control system for CNC machine tools provided by this invention includes a multi-source temperature data acquisition module 1, a temperature field prediction module 2, a thermal error prediction module 3, a compensation control module 4, and an adaptive update module 5. The specific implementation methods of each module are described in detail below.

[0142] The multi-source temperature data acquisition module 1 is used to acquire temperature data, ambient temperature data, spindle speed data, feed rate data, and running time data of key parts of the CNC machine tool. It preprocesses the temperature data to generate temperature feature vectors and calculates the power estimates of each heat source based on the spindle speed and feed rate data. In one embodiment of the invention, the multi-source temperature data acquisition module 1 includes a temperature sensor interface unit, a CNC system communication unit, a data preprocessing unit, and a heat source power estimation unit. The temperature sensor interface unit connects to temperature sensors deployed at key parts of the machine tool via RS485 or CAN bus to acquire temperature data in real time, using a multi-channel synchronous sampling method to ensure the time consistency of data from each channel. The CNC system communication unit communicates with the CNC system via OPC UA or MTConnect protocol to acquire operating parameters such as spindle speed and feed rate, with communication latency controlled within 10ms. The data preprocessing unit performs outlier detection, temperature difference calculation, and normalization processing, and constructs a time-series feature matrix using a sliding window algorithm. The heat source power estimation unit calculates the power estimates of each heat source based on the operating parameters, providing thermal input boundary conditions for temperature field prediction. The specific working principle and implementation method of the multi-source temperature data acquisition module 1 have been described in detail in step S1 of the method embodiment, and will not be repeated here.

[0143] The temperature field prediction module 2 is used to construct a temperature field adjacency matrix. It inputs temperature feature vectors and power estimates into the temperature field prediction model and outputs the predicted temperature field distribution within a preset time window. In one embodiment of the invention, the temperature field prediction module 2 includes an adjacency matrix construction unit, a temporal attention encoding unit, a spatial attention encoding unit, a feature fusion unit, and a decoding unit. The adjacency matrix construction unit generates a graph-structured adjacency matrix based on the spatial coordinates of the temperature measurement points and the heat conduction path information. This matrix is ​​constructed and stored during system initialization and directly invoked during runtime. The temporal attention encoding unit uses a multi-head self-attention mechanism to extract features from historical temperature time series, capturing the periodicity and trend characteristics of temperature changes. The spatial attention encoding unit uses a graph attention network to encode the spatial distribution features of the temperature field, learning the dynamic correlation weights between each temperature measurement point. The feature fusion unit performs weighted fusion of temporal and spatial features. The decoding unit uses a multilayer perceptron structure to generate the predicted temperature field distribution. These units work together to predict the evolution trend of the temperature field. The specific working principle and implementation method of the temperature field prediction module 2 have been described in detail in step S2 of the method embodiment and will not be repeated here.

[0144] The thermal error prediction module 3 is used to input the current temperature field distribution and the predicted temperature field distribution into the graph neural network thermal error prediction model. Based on graph convolution operations, it establishes a nonlinear mapping relationship between the temperature field distribution and thermal deformation, and outputs the predicted thermal displacement values ​​for each motion axis. In one embodiment of the present invention, the thermal error prediction module 3 includes a feature concatenation unit, a graph convolutional layer stacking unit, a graph pooling unit, and a fully connected output unit. The feature concatenation unit concatenates the current temperature field and the predicted temperature field in the time dimension to form an extended temperature feature matrix. The graph convolutional layer stacking unit is the core innovation of the present invention, containing multiple graph convolutional layers. Each graph convolutional layer is followed by a batch normalization layer and an activation function layer, effectively capturing the spatial correlation features of the temperature field through graph convolution operations and establishing a nonlinear mapping between temperature distribution and thermal deformation. The graph pooling unit uses global average pooling to aggregate node-level features into graph-level feature representations. The fully connected output unit maps the graph-level features to the predicted thermal displacement values ​​for each axis. The specific working principle and implementation method of the thermal error prediction module 3 have been described in detail in step S3 of the method embodiment, and will not be repeated here.

[0145] The compensation control module 4 is used to convert the predicted thermal displacement value into a position compensation command, and then superimpose the position compensation command onto the original machining trajectory to generate a compensated machining trajectory. In one embodiment of the present invention, the compensation control module 4 includes a compensation value calculation unit, a compensation smoothing processing unit, a command format conversion unit, and a servo drive interface unit. The compensation value calculation unit calculates the compensation amount for each axis based on the predicted thermal displacement value and the original trajectory position. The compensation smoothing processing unit performs low-pass filtering on the compensation values ​​of adjacent compensation cycles to prevent abrupt changes in compensation commands that could lead to a decrease in the quality of the machined surface. The command format conversion unit converts the compensation value into a command format recognizable by the CNC system or servo drive. The servo drive interface unit sends the compensation command to the servo drive for execution via a real-time Ethernet or analog interface. The specific working principle and implementation method of the compensation control module 4 have been described in detail in step S4 of the method embodiment, and will not be repeated here.

[0146] The adaptive update module 5 is used to acquire laser interferometer calibration data, calculate prediction errors, and update the network parameters of the graph neural network thermal error prediction model online based on the prediction errors. In one embodiment of the present invention, the adaptive update module 5 includes a calibration data acquisition unit, an error calculation unit, an update decision unit, and a parameter fine-tuning unit. The calibration data acquisition unit communicates with the laser interferometer through an interface to acquire the actual thermal displacement measurement values ​​during the calibration process. The error calculation unit calculates the deviation between the predicted value and the measured value and generates an error statistic. The update decision unit determines whether to trigger a model update based on the error statistic. The parameter fine-tuning unit uses an incremental learning method to adjust the parameters of the model output layer online. The specific working principle and implementation method of the adaptive update module 5 have been described in detail in step S5 of the method embodiment, and will not be repeated here.

[0147] The above modules can be implemented in software and deployed on an industrial computer or embedded controller; they can also be implemented in hardware and integrated into a dedicated thermal error compensation controller; or they can be implemented using a combination of software and hardware. In a preferred embodiment of the present invention, the system uses an industrial computer as the main control unit, with specific hardware configurations including: an Intel Core i7-11700 processor or equivalent performance or higher, at least 16GB of DDR4 memory, at least 256GB of solid-state drive storage, and a network interface card supporting real-time Ethernet. On the software side, the operating system uses real-time Linux (such as the PREEMPT_RT kernel), the deep learning framework uses PyTorch 1.9 or higher, and efficient model inference is achieved through ONNXRuntime, with a single inference time controlled within 5ms. The system interacts with the CNC system via real-time Ethernet (EtherCAT or PROFINET) to ensure the real-time and deterministic nature of data transmission.

[0148] The embodiments described above are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features, and such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for online thermal error compensation control of CNC machine tools, characterized in that, include: The multi-source temperature data acquisition step acquires temperature data, ambient temperature data, spindle speed data, feed rate data, and running time data of key parts of the CNC machine tool. The key parts include spindle bearings, ball screws, linear guides, and columns. The temperature data is continuously acquired by temperature sensors deployed at each key part according to a preset temperature sampling period. The temperature data is preprocessed to generate temperature feature vectors. Based on the spindle speed data and the feed rate data, the power estimate of each heat source is calculated. The temperature field prediction step involves constructing a temperature field adjacency matrix to characterize the spatial topological relationship between each temperature measurement point, inputting the temperature feature vector and the power estimate into the temperature field prediction model, and the temperature field prediction model extracting features from historical temperature rise curves based on a spatiotemporal attention mechanism to output the predicted temperature field distribution within a preset time window. The thermal error prediction step involves inputting the current temperature field distribution and the predicted temperature field distribution into a graph neural network thermal error prediction model. The graph neural network thermal error prediction model extracts the spatial correlation features of the temperature field based on graph convolution operations, establishes a nonlinear mapping relationship between the temperature field distribution and thermal deformation, and outputs the predicted thermal displacement values ​​of each motion axis. The compensation control step involves converting the predicted thermal displacement value into position compensation commands for each motion axis, superimposing the position compensation commands onto the original machining trajectory according to a preset compensation cycle, generating a compensated machining trajectory, and sending it to the CNC system servo drive for execution. The adaptive update step involves acquiring laser interferometer calibration data according to a preset calibration update cycle, calculating the prediction error between the predicted thermal displacement value and the actual measured thermal displacement value, and updating the network parameters of the graph neural network thermal error prediction model online based on the prediction error when the prediction error exceeds a preset error threshold.

2. The online thermal error compensation control method for CNC machine tools according to claim 1, characterized in that, The method for constructing the temperature field adjacency matrix includes: Calculate the Euclidean distance between any two temperature measuring points based on the three-dimensional coordinates of each temperature measuring point in the machine tool coordinate system; Two temperature measuring points whose Euclidean distance is less than a preset distance threshold are marked as adjacent nodes, and the value of the distance threshold ranges from 100mm to 300mm. The edges between adjacent nodes are weighted according to the heat conduction path, and the weights are positively correlated with the heat conduction coefficient between the two temperature measuring points.

3. The online thermal error compensation control method for CNC machine tools according to claim 1, characterized in that, The preset time window has a duration of 5 to 10 minutes, and the prediction step size of the temperature field prediction model is 30 to 60 seconds.

4. The online thermal error compensation control method for CNC machine tools according to claim 1, characterized in that, The prediction accuracy of the thermal displacement prediction value is not lower than the preset thermal error prediction accuracy threshold, which is 2μm.

5. The online thermal error compensation control method for CNC machine tools according to claim 1, characterized in that, The preset compensation period does not exceed 10ms, and the position compensation command includes X-axis compensation amount, Y-axis compensation amount and Z-axis compensation amount.

6. The online thermal error compensation control method for CNC machine tools according to claim 1, characterized in that, The preset calibration update cycle is 24h to 168h, and the online update adopts an incremental learning method, which only fine-tunes the output layer parameters of the graph neural network thermal error prediction model.

7. The online thermal error compensation control method for CNC machine tools according to claim 1, characterized in that, The graph neural network hot error prediction model includes multiple graph convolutional layers, graph pooling layers, and fully connected output layers. The number of graph convolutional layers is 2 to 4, and each graph convolutional layer is followed by a batch normalization layer and an activation function layer.

8. The online thermal error compensation control method for CNC machine tools according to claim 1, characterized in that, The temperature field prediction model includes a temporal attention encoder and a spatial attention encoder. The temporal attention encoder is used to extract the temporal variation features of temperature, and the spatial attention encoder is used to extract the spatial distribution features of temperature. The outputs of the temporal attention encoder and the spatial attention encoder are input into the decoder after passing through a feature fusion layer to generate the predicted temperature field distribution.

9. The online thermal error compensation control method for CNC machine tools according to claim 1, characterized in that, The heat sources include the spindle motor heat source, the feed servo motor heat source, the spindle bearing friction heat source, and the lead screw and nut pair friction heat source. The power estimate is calculated based on the spindle speed, feed rate, cutting load, and running time.

10. A CNC machine tool thermal error online compensation control system, used to implement the CNC machine tool thermal error online compensation control method according to any one of claims 1-9, characterized in that, include: The multi-source temperature data acquisition module is used to acquire temperature data, ambient temperature data, spindle speed data, feed speed data, and running time data of key parts of CNC machine tools. It preprocesses the temperature data to generate temperature feature vectors and calculates the power estimate of each heat source based on the spindle speed data and the feed speed data. The temperature field prediction module is used to construct a temperature field adjacency matrix, input the temperature feature vector and the power estimate into the temperature field prediction model, and output the predicted temperature field distribution within a preset time window. The thermal error prediction module is used to input the current temperature field distribution and the predicted temperature field distribution into the graph neural network thermal error prediction model, establish a nonlinear mapping relationship between the temperature field distribution and thermal deformation based on graph convolution operation, and output the predicted thermal displacement values ​​of each motion axis. The compensation control module is used to convert the predicted thermal displacement value into a position compensation command, and to superimpose the position compensation command onto the original machining trajectory to generate a compensated machining trajectory. An adaptive update module is used to acquire laser interferometer calibration data, calculate prediction error, and update the network parameters of the graph neural network thermal error prediction model online based on the prediction error.

Citation Information

Patent Citations

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

    CN114690706A

  • Machine tool thermal error prediction compensation method and device, equipment and storage medium

    CN121210866A

  • Machine tool thermal error compensation system based on digital twinning and cloud edge cooperation

    CN121386614A