Spatiotemporal thermal error prediction model and spatiotemporal thermal error control system based on STFGCN

By introducing STFGCN into the thermal error prediction model, combining dynamic distance maps and semantic hypergraphs, the problem of failure to fully consider the spatial behavior of thermal errors in the prior art is solved, and higher prediction accuracy and robustness are achieved.

CN115903516BActive Publication Date: 2025-04-29CHONGQING UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211630051.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-19
Publication Date
2025-04-29
Estimated Expiration
2042-12-19

AI Technical Summary

Technical Problem

The prior art fails to fully consider the spatial behavior of thermal error in thermal error prediction, resulting in low prediction accuracy.

Method used

A spatiotemporal thermal error prediction model based on STFGCN is proposed. By dividing the graph into two parts: dynamic distance graph and semantic hypergraph, fusion of temporal information and spatial information, the gated graph convolution network, spatial gated recursive unit and spatial attention unit are used to capture the spatiotemporal behavior of thermal error.

Benefits of technology

It significantly improves the accuracy and robustness of thermal error prediction, and can more effectively capture the spatio-temporal characteristics of thermal error.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115903516B_ABST
    Figure CN115903516B_ABST
Patent Text Reader

Abstract

The present invention discloses a spatio-temporal thermal error prediction model based on STFGCN, which includes N STFGCN layers, where N≥1; and: when N≥2, the output Hi of the i-th STFGCN layer is the input of the (i + 1)-th STFGCN layer, 1≤i≤N - 1; the STFGCN unit includes: a gated graph convolutional network for extracting temporal information and spatial information in thermal error data; a spatial gated recurrent unit for fusing temporal information and spatial information in thermal error data; and a spatio-temporal attention unit for capturing the long-term spatio-temporal behavior of thermal errors. The present invention also discloses a spatio-temporal thermal error control system based on STFGCN. The spatio-temporal thermal error prediction model and the spatio-temporal thermal error control system based on STFGCN of the present invention divide the graph into two parts, namely a dynamic distance graph and a semantic hypergraph, and fuse temporal information and spatial information to improve the prediction accuracy and robustness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of mechanical error control, and specifically provides a spatiotemporal thermal error prediction model and a spatiotemporal thermal error control system based on STFGCN. Background Art

[0002] There are various errors in the machining process, which lead to reduced machining accuracy. Thermal error is one of the most important errors. In order to reduce the impact of thermal error on machining accuracy, two methods, data-based and simulation-based, are generally used in the prior art. The simulation-based method includes the finite element method and the finite difference method, and the thermal contact residence time and convection coefficient are introduced into the simulation-based model to improve the modeling accuracy, but the simulation-based method still has the disadvantages of being time-consuming and having a narrow application range. The data-based method is the current technical hotspot. Traditional data-driven methods include robust ridge regression, adaptive regression, principal component regression, and multivariate linear regression (MLR). The traditional data-based method analyzes the correlation between different sensor data, but does not analyze the generation mechanism of thermal errors, resulting in low prediction accuracy. LSTM can effectively capture the temporal behavior of thermal errors and has good prediction performance, but because the generation mechanism of thermal errors is not fully analyzed, the spatial behavior of thermal errors is ignored. The LSTM-based thermal error modeling method only mines the temporal behavior of the measurement data, but the thermal error has spatiotemporal characteristics. Therefore, the spatial behavior of thermal errors should also be considered. If the spatial behavior of error data is not considered, the error data is not restricted by the sensor network.

[0003] In the prior art, there is no difference between the semantic graph obtained from the collected data and the distance graph obtained from the distance between sensor points, but the semantic graph and the distance graph are part of the spatial behavior and should be considered comprehensively. The traditional semantic graph can only mine the pairwise spatial dependency between two nodes, but not the high-order spatial dependency between multiple nodes. In addition, the measurement points and objects in traditional spatiotemporal modeling are fixed, so the generated distance graph is static. However, the ball screw nut of the machine tool moves during the machining process, causing the measurement point to move with it, and the traditional static distance graph is not applicable. Summary of the invention

[0004] In view of this, the purpose of the present invention is to provide a spatiotemporal thermal error prediction model and a spatiotemporal thermal error control system based on STFGCN. By dividing the graph into two parts, a dynamic distance graph and a semantic hypergraph, the temporal information and the spatial information can be fused to improve the prediction accuracy and robustness.

[0005] In order to achieve the above object, the present invention provides the following technical solutions:

[0006] The present invention first proposes a spatiotemporal thermal error prediction model based on STFGCN, comprising N layers of STFGCN layers, wherein N ≥ 1; and: when N ≥ 2, the output H of the i-th STFGCN layer i is the input of the STFGCN layer described in the i+1th layer, 1≤i≤N-1;

[0007] The STFGCN unit includes:

[0008] A gated graph convolutional network to extract temporal and spatial information from thermal error data;

[0009] A spatially gated recursive unit to fuse temporal and spatial information in thermal error data;

[0010] Spatiotemporal attention unit to capture the long-term spatiotemporal behavior of thermal errors.

[0011] Furthermore, the principle of the gated graph convolutional network is:

[0012]

[0013] Among them, S t It represents the output after combining the time information and spatial information in the thermal error data at time t; Represents the semantic hypergraph adjacency matrix at time t; represents the dynamic distance graph adjacency matrix at time t; X t represents the input at time t; W Gi and W Hi Represent the weight parameters of the dynamic distance graph and semantic hypergraph of the i-th layer respectively; W G(i+1) and W H(i+1) are the weight parameters of the dynamic distance graph and semantic hypergraph of the i+1th layer respectively; g(·) is the activation function of the dynamic distance graph convolution; σ(·) represents the activation function of the semantic hypergraph convolution; Relu represents the ReLU function.

[0014] Furthermore, the semantic hypergraph adjacency matrix It is expressed as:

[0015]

[0016] Where H represents the incidence matrix; W represents the diagonal matrix, and W = R M×M , M represents the number of hyperedges; D v represents the vertex degree matrix, and:

[0017] D v =∑ e∈ε W(e)H(v,e)

[0018]

[0019] Where v represents a vertex; ε represents a hyperedge; W(e) represents a diagonal matrix; H(v,e) represents an incidence matrix;

[0020] Define the hypergraph as G H =(V,E), V represents the vertex set, E represents the hyperedge set, and each hyperedge ε∈E is assigned a weight W εε , all weights are stored in a diagonal matrix W.

[0021] Furthermore, the dynamic distance graph adjacency matrix and is related to the running time, then the equation of GCN can be expressed as:

[0022]

[0023] in, A t is a time-varying adjacency matrix; W0 represents the weight parameter; σ represents the activation function; f(·) represents the convolution operation function of the GCN neural network; f(·) represents the functional relationship of the GCN neural network.

[0024] Furthermore, the principle of the spatial gated recursive unit is:

[0025] S' t =σ(W s [S t ,X t ]+b s )⊙S t

[0026] r t =σ(W r [X t ,h t-1 ,S' t ]+b r )

[0027] z t =σ(W z [X t ,h t-1 ,S' t ]+b z )

[0028]

[0029]

[0030] Among them, S' t represents the spatial gate that integrates temporal information and spatial information; r t Represents the reset gate; z t represents the update gate; Indicates the candidate memory state; S t represents the output of the gated graph convolutional network; W r , W z , W h and W s They represent weight matrices, σ represents activation function, and b r 、b z 、b h and b s They represent the deviation matrix respectively; h t represents the final memory output at time t; ⊙ represents the element-by-element product of two vectors.

[0031] Furthermore, the principle of the spatiotemporal attention unit is:

[0032] e=concat(S t ,h t )

[0033]

[0034] output=H t =[α ij ]·h t

[0035] Among them, concat means concatenation; S t represents the output of the gated graph convolutional network; h t represents the output of the spatial gated recurrent unit; e represents the attention weight; e ij represents the elements of the matrix e; [α ij ] represents the result after normalization of attention weights; a ij Represents the matrix [α ij ]; output represents the output of the spatiotemporal attention unit, which is also the output H of the STFGCN unit t .

[0036] The present invention also proposes a spatiotemporal thermal error control system based on STFGCN, including a cloud computing layer and a terminal computing layer;

[0037] The terminal computing layer includes a device terminal, a data acquisition system and an edge computer; the cloud computing layer includes a data storage module, a data computing module and a data analysis module;

[0038] The data acquisition system acquires data generated by the device terminal during operation and divides the acquired data into historical data and current data; the historical data is transmitted and stored in the data storage module, the thermal error prediction model edited by the edge computer is transmitted to the data analysis module, the data calculation module trains the thermal error prediction model using the historical data stored in the data storage module, the trained thermal error prediction model is downloaded to the edge computer to update the thermal error prediction model stored in the edge computer, and the real-time data is transmitted to the edge computer to perform prediction using the thermal error prediction model stored in the edge computer;

[0039] The thermal error prediction model adopts the spatiotemporal thermal error prediction model based on STFGCN as described in the previous section.

[0040] Furthermore, the terminal computing layer also includes an error compensation system, which generates an error compensation value based on the thermal error predicted by the thermal error prediction model and transmits the error compensation value to the PLC controller of the device terminal. The PLC controller of the device terminal transmits the error compensation value to the numerical control system of the device terminal, and the thermal error is corrected by the numerical control system of the device terminal to realize automatic and real-time error compensation.

[0041] The beneficial effects of the present invention are:

[0042] Thermal error has three characteristics: spatial dependence, temporal dependence, and dynamic characteristics, which makes it extremely challenging to achieve accurate prediction of thermal error. Based on the spatiotemporal thermal error prediction model of STFGCN, this paper proposes a spatiotemporal fusion graph convolutional network (STFGCN) for spatiotemporal prediction of thermal error. Specifically, in order to fully capture the spatial behavior, the graph is divided into two parts: a dynamic distance graph and a semantic hypergraph. The temporal information and spatial information are extracted by a gated graph convolutional network (GGC), and these two components are fused into the STFGCN model; GGC inputs the extracted spatial information and temporal information into the designed spatial gated recurrent unit (S-GRU) to fuse the temporal information and spatial information. The output of the spatial gated recurrent unit (S-GRU) is transferred to the spatiotemporal attention unit (ST-attention) to capture the long-term spatiotemporal behavior of thermal error. The results show that in terms of thermal error prediction, the prediction accuracy and robustness of the model proposed in this paper are much more significant than existing methods. That is, the spatiotemporal thermal error prediction model and spatiotemporal thermal error control system based on STFGCN of the present invention can fuse temporal information and spatial information by dividing the graph into two parts: a dynamic distance graph and a semantic hypergraph, so as to improve the prediction accuracy and robustness. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to make the purpose, technical solution and beneficial effects of the present invention clearer, the present invention provides the following drawings for illustration:

[0044] Figure 1 It is a structural schematic diagram of a ball screw nut;

[0045] Figure 2 This is the structural diagram of the STFGCN model;

[0046] Figure 3 It is the structural diagram of the STFGCN unit;

[0047] Figure 4 This is the structural diagram of the gated graph convolutional network;

[0048] Figure 5 It is a structural diagram of the spatial gated recursive unit;

[0049] Figure 6 This is the structural diagram of the spatiotemporal attention unit;

[0050] Figure 7 It is the dynamic spatiotemporal prediction diagram of thermal error;

[0051] Figure 8 Figure 1 is the sensor network structure diagram; (a) machine tool thermal image; (b) sensor network;

[0052] Fig. 9 Physical diagram of sensor placement and measurement; (a) installation of laser interferometer; (b) installation of temperature sensor;

[0053] Fig.10 Temperature and TE measured at a feed rate of 1200 mm / min; (a) temperature; (b) TE;

[0054] Fig.11 Temperature and TE measured at a feed rate of 600 mm / min; (a) temperature; (b) TE;

[0055] Fig.12 is the distance between the displacement measurement point and the temperature measurement point;

[0056] Fig.13 is the dynamic distance adjacency matrix of the measurement points;

[0057] Fig.14 is the sensor dynamic adjacency matrix;

[0058] Fig.15 The predicted performance curve is as follows; (a) at a feed speed of 1200 mm / min; (b) at a feed speed of 600 mm / min;

[0059] Fig.16 It is the influence bar chart of the number of nodes in the hypergraph;

[0060] Fig.17 It is a framework diagram of the spatiotemporal thermal error control system based on STFGCN of the present invention;

[0061] Fig.18 Positioning error curves at different times; (a) T = 0h; (b) T = 1 / 6h; (c) T = 1 / 2h; (d) T = 1h; (e) T = 2h; (f) T = 3h; (g) T = 5h;

[0062] Fig.19 Specimen processing diagram; (a) specimen processing; (b) specimen. DETAILED DESCRIPTION

[0063] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it, but the embodiments are not intended to limit the present invention.

[0064] 1. Dynamic spatiotemporal behavior of ball screw nut

[0065] For the screw shaft, its length is much larger than its diameter, and its axial thermal expansion is inevitable. The screw shaft within the motion range is discretely divided into M segments, and the length of each segment is L, such as Figure 1 As shown. The temperature field of the screw shaft is affected by the friction heat of the screw nut and the bearing. Under the influence of the friction heat of the nut, the heat balance equation can be expressed as:

[0066] Q f (l i ,Δt)-Q d (l i ,Δt)-Q v (l i ,Δt)=ΔQ(l i ,Δt)

[0067] Among them, Q f (l i ,Δt)、Q d (l i ,Δt)、Q v (l i ,Δt) and ΔQ(l i ,Δt) are the heat generated by friction, the heat dissipated by heat conduction, the heat dissipated by convection, and the increase in internal energy. i is the length of the i-th segment, and Δt is the running time.

[0068] Q f (l i ,Δt)=Q·n

[0069] Among them, Q is the heat generated by the friction between the nut and the i-th segment; n is the number of frictions between the nut and the i-th segment within the Δt time.

[0070] The heat flux density of heat conduction is:

[0071]

[0072] Where λ is the thermal conductivity; T s is the temperature of the screw shaft. Therefore, the heat dissipated by heat conduction is:

[0073]

[0074] Among them, T s (l i-1 ,t) is the temperature of the i-1th segment at time t; T s (l i+1 ,t) is the temperature of the i+1th segment at time t; T s (l i ,t) is the temperature of the i-th segment at time t; d s is the equivalent diameter of the screw shaft.

[0075] The heat flux density for convective heat transfer is:

[0076] q v =h×(T s -T a )

[0077] Where h is the convective heat transfer coefficient; T a is the air temperature. Therefore, the heat dissipation by convection is:

[0078] Q v (l i ,t)=π·[T s (l i ,t)-T a (t)]·hd s L·Δt

[0079] Among them, T a (t) is the ambient temperature at time t.

[0080] The internal energy increase during the Δt time is:

[0081]

[0082] In the formula, c is the specific heat capacity; ρ is the density; and L is the length of the i-th segment. In this way, the temperature field is obtained as follows:

[0083]

[0084] The thermal error is then given by:

[0085]

[0086] where α is the coefficient of thermal expansion. The thermal error of the i-th segment is a function of time and spatial position, demonstrating the spatiotemporal behavior of the thermal error.

[0087] 2. Spatiotemporal thermal error prediction model based on STFGCN

[0088] like Figure 2 As shown, the spatiotemporal thermal error prediction model based on STFGCN in this embodiment includes N layers of STFGCN layers, where N ≥ 1; and: when N ≥ 2, the output H of the STFGCN layer of the i-th layer i is the input of the STFGCN layer in the i+1th layer, 1≤i≤N-1. Specifically, Figure 3 As shown, the STFGCN unit includes a gated graph convolutional network (GGC), a spatial gated recurrent unit (S-GRU), and a spatiotemporal attention unit (ST-attention).

[0089] Capturing the temporal behavior of thermal errors is not enough to achieve high prediction accuracy and strong robustness. It is also necessary to capture the spatial behavior of thermal errors. However, most of the current spatiotemporal prediction methods are based on distance modeling of sensor nodes and do not distinguish between distance and semantic graphs. Spatial information contains two types of dependencies: one is distance-based information; the other is semantic-based information. In addition, traditional semantic graphs only describe pairwise dependencies between sensor nodes, not dependencies between multiple sensor nodes. Hypergraphs can capture complex and high-order dependencies and are used to overcome the above limitations.

[0090] like Figure 4 As shown, the gated graph convolutional network is used to extract the temporal information and spatial information in the thermal error data. Specifically, the principle of the gated graph convolutional network of this embodiment is:

[0091]

[0092] Among them, S t It represents the output after combining the time information and spatial information in the thermal error data at time t; Represents the semantic hypergraph adjacency matrix at time t; represents the dynamic distance graph adjacency matrix at time t; X t represents the input at time t; W Gi and W Hi Represent the weight parameters of the dynamic distance graph and semantic hypergraph of the i-th layer respectively; W G(i+1) and W H(i+1)are the weight parameters of the dynamic distance graph and semantic hypergraph of the i+1th layer respectively; g(·) is the activation function of the dynamic distance graph convolution, which is set to tanh in this embodiment; σ(·) represents the activation function of the semantic hypergraph convolution, which is set to sigmoid in this embodiment; Relu represents the ReLU function.

[0093] The spatial information is captured by HCN. Specifically, in order to fully characterize the spatial behavior of thermal errors, the hypergraph is defined as G H =(V,E), where V represents the vertex set, E represents the hyperedge set, and each hyperedge ε∈E is assigned a weight W εε , all weights are stored in the diagonal matrix W. Then, the hypergraph is represented by the incidence matrix H:

[0094]

[0095] Vertex degree matrix D v It is expressed as:

[0096] D v =∑ e∈ε W(e)H(v,e)

[0097] Where v represents a vertex; ε represents a hyperedge; W(e) represents a diagonal matrix; H(v,e) represents an incidence matrix;

[0098] Semantic Hypergraph Adjacency Matrix It is expressed as:

[0099]

[0100] Where H represents the incidence matrix; W represents the diagonal matrix, and W = R M×M , M represents the number of hyperedges; D v Represents the vertex degree matrix.

[0101] The temporal information is captured by GCN. Specifically, the principle of GCN is:

[0102]

[0103] in, I is the identity matrix; A is the distance adjacency matrix; Represents...; X is the feature sequence; W0 is the weight parameter; σ is the activation function.

[0104] The positions of sensor nodes in the ball screw system sensor network change over time. Therefore, the dynamic distance graph adjacency matrix and is related to the running time, then the above formula is updated to:

[0105]

[0106] in, A t is a time-varying adjacency matrix; W0 represents the weight parameter; σ represents the activation function; and f(·) represents the functional relationship of the GCN neural network.

[0107] Thermal error has spatiotemporal characteristics, and the periodicity of thermal error cannot be ignored. Long-term information can reflect periodicity. GRU cannot capture spatial features, resulting in low accuracy. In previous studies, the temporal model and the spatial model were connected in series, resulting in the loss of spatiotemporal features and the inability to accurately predict thermal errors. In order to fully capture long-term spatiotemporal features, S-GRU is designed to capture spatiotemporal behaviors, such as Figure 5 As shown. The only spatial gate S' of S-GRU t The spatial and temporal information can be fused, and then the captured spatiotemporal information enters the reset gate r t , update gate z t , and candidate memory states To maintain long-term spatiotemporal information. Compared with the traditional GRU, the proposed S-GRU can fully capture spatiotemporal information and improve the prediction accuracy of the thermal error model. That is, the spatial gated recursive unit of this embodiment is used to fuse the temporal information and spatial information in the thermal error data. Specifically, Figure 5 As shown, the principle of the spatial gated recursive unit is:

[0108] S' t =σ(W s [S t ,X t ]+b s )⊙S t

[0109] r t =σ(W r [X t ,h t-1 ,S' t ]+b r )

[0110] z t =σ(W z [X t ,h t-1 ,S' t ]+b z )

[0111]

[0112]

[0113] Among them, S' t represents the spatial gate that integrates temporal information and spatial information; r t Represents the reset gate; zt represents the update gate; Indicates the candidate memory state; S t represents the output of the gated graph convolutional network; W r , W z , W h and W s They represent weight matrices, σ represents activation function, and b r 、b z 、b h and b s They represent the deviation matrix respectively; h t represents the final memory output at time t; ⊙ represents the element-by-element product of two vectors.

[0114] Long-term and short-term trends are very important for accurately predicting thermal errors. The periodicity of thermal errors can be reflected by long-term information. The transient state of thermal errors can be reflected by short-term information. For traditional recurrent neural networks, long-term and short-term information can be captured. However, as the network continues to expand, historical data information is continuously weakened. In order to enhance the ability to capture long-term spatiotemporal information, the embodiment uses a spatiotemporal attention unit to capture the long-term spatiotemporal behavior of thermal errors. Specifically, Figure 6 As shown, the principle of the spatiotemporal attention unit is:

[0115] e=concat(S t ,h t )

[0116]

[0117] output=H t =[α ij ]·h t

[0118] Among them, concat means concatenation; softmax means S t represents the output of the gated graph convolutional network; h t represents the output of the spatial gated recurrent unit; e represents the attention weight; e ij represents the elements of the matrix e; [α ij ] represents the result after normalization of attention weights; a ij Represents the matrix [α ij ]; output represents the output of the spatiotemporal attention unit, which is also the output H of the STFGCN unit t .

[0119] ST-attention aims to connect h t and S tTo fuse temporal and spatial information. Softmax aims to convert sequences into probability values. The higher the probability value, the more important the information. The designed ST attention can enhance long-term spatiotemporal information and improve prediction accuracy.

[0120] 3. Experimental study and thermal error modeling

[0121] Figure 7 The dynamic spatiotemporal prediction framework of thermal error is shown. The spatiotemporal prediction framework is divided into four steps, namely sensor network construction, dataset construction of dynamic distance graph and semantic hypergraph, parameter construction of STFGCN and thermal error prediction.

[0122] 3.1 Sensor Network Construction

[0123] Typically, temperature sensors are usually placed on the main heat source. However, the placement of temperature sensors depends on expert experience, resulting in incomplete thermal information collection. To overcome the shortcomings of expert experience, thermal imaging cameras are used to guide the placement of measurement points, such as Figure 8 (a) is shown. This is different from the past practice of arranging temperature sensors based on expert experience. The brighter the image, the higher the temperature of the machine parts, and these bright spots are used as temperature measurement points. That is, temperature sensors should be arranged at these measurement points. It should be noted that the brightest part in the lower left corner is the coolant motor, which is not connected to the machine tool. Therefore, there are eight temperature measurement points and one thermal error measurement point. The above sensors are then connected to form a sensor network, as shown in Figure 8 (b) S is the dynamic measurement point, which is used to represent the displacement measurement point and is placed on the sliding seat. The laser interferometer Renishaw XL80 is used to measure the thermal error of the ball screw. Fig. 9 (a) is shown. Table 1 lists the locations of the temperature measurement points. Each temperature sensor is placed on the upper motor, upper front bearing, upper nut, upper rear bearing, lower motor, lower front bearing, lower nut and lower rear bearing, with a total of eight temperature measurement points. The temperature sensor is a precision magnetic platinum resistor Pt100, as shown in Fig. 9 (b) as shown.

[0124] Table 1 Measurement points

[0125]

[0126] Then the measured temperature and thermal error are obtained. When the feed speed is 1200m / min, the measured temperature and thermal error are as follows Fig.10 When the feed rate is 600 mm / min, the measured temperature and temperature error are as follows: Fig.11As shown in Figure 2, the fluctuation amplitude of thermal error will increase with the increase of temperature, because friction and electric heat are the main causes of thermal error. In addition, as the ball screw system enters the thermal equilibrium state, the increase rate of temperature and thermal error gradually decreases.

[0127] 3.2 Dynamic distance graph and semantic hypergraph construction

[0128] The prior art does not distinguish between distance graphs and semantic graphs, resulting in a lack of spatial behavior. In order to comprehensively explore the spatial behavior of thermal errors, this embodiment establishes a dynamic distance graph and a semantic hypergraph respectively. The feed speed of the sliding seat is 1200mm / min, and the length of the screw shaft of the X-axis and Y-axis is 1.8m. Then, according to the feed speed of the screw shaft and the sliding seat, the relative position of each temperature measurement point and displacement measurement point is established, such as Fig.12 As shown. According to the position changes between the measurement points, the dynamic distance adjacency matrix is ​​obtained and expressed as:

[0129]

[0130] Among them, w i,j is the edge weight and is related to the position of the i-th node and the j-th node; δ is the control w i,j The threshold of the distribution; d i,j is the distance between the i-th node and the j-th node.

[0131] Then the dynamic distance adjacency matrix is ​​obtained by the above formula. In order to show its changing process, Fig.13 A portion of the dynamic adjacency matrix is ​​shown in . Fig.13 The horizontal axis is the sensor number, and the vertical axis is the dynamic distance adjacency matrix. The dimension of the dynamic distance adjacency matrix is ​​5×5. It can be seen that the dynamic distance adjacency matrix changes with the distance between sensor nodes. Therefore, it is necessary to construct a dynamic distance adjacency matrix.

[0132] The correlation between measurement points changes over time. Therefore, it is necessary to build a semantic hypergraph. The historical value of each measurement point is represented as a feature vector, the feature vector is sliced ​​into N segments, each segment of the feature vector is clustered by the fuzzy clustering method, and the distance is calculated using the Euclidean distance. The temperature measurement points that are closely related to the displacement measurement points are obtained. Fig.14 As shown, the association matrix H of the i-th cycle is obtained. The association matrix H consists of the association matrices that touch each cycle. Thus, the adjacency matrix of the semantic hypergraph is obtained, and then the dynamic distance adjacency matrix is ​​taken as input to fully capture the spatial behavior.

[0133] 3.3STFGCN model construction

[0134] The prediction performance of STFGCN was compared with that of MLR, LSTM, GRU, CNN-LSTM, temporal graph convolutional network (T-GCN), and hypergraph neural network (HGNN). Since the signal levels of different sensor nodes are different, the measurement data is normalized to train the above models, and finally the reverse normalization is performed to obtain the prediction results. The error data was obtained when the feed speed was 1200m / min and used as the training set. The error data obtained when the feed speed was 600mm / min was used as the test set. The Pytorch machine learning library was used for programming, the time step was set to 2, the learning rate was 0.001, the optimizer was Adam, the activation function was swish, and the batch size was 64.

[0135] MLR is a traditional method for predicting thermal errors. It selects temperature measurement points, i.e., T = (T1, T5, T6), as the input of MLR through a clustering algorithm. Then, the regression toolbox in MATLAB is called to identify the regression coefficients as b0 = 5.8387, b1 = -0.20167, b2 = 1.6444 and b3 = -0.48548. Therefore, the established MLR model is:

[0136] E=5.8387-0.20167T1+1.6444T5-0.48548T6

[0137] The LSTM network is a widely used recurrent network, whose unique input gate, forget gate, and output gate can well capture the temporal behavior of the collected data. GRU is a variant of LSTM, which has fewer gates than LSTM, and the prediction accuracy of GRU is similar to that of the LSTM network. The CNN-LSTM network is a series connection of CNN and LSTM networks; CNN consists of a fully connected layer, two pooling layers, and two convolutional layers; CNN is used to capture spatial behavior, and LSTM is used to capture temporal behavior. T-GCN is a combination of GCN and GRU, GCN is used to capture spatial correlation, and GRU is used to capture temporal correlation. HGNN uses a unique hypergraph to capture high-order correlation and is used for classification tasks, and GRU can be used to replace the classifier. The combination of HGNN and GRU is used to perform spatiotemporal prediction tasks, HGNN is used to capture high-order spatial correlation in the collected data, and GRU is used to capture temporal correlation.

[0138] 4. Thermal error prediction results and discussion

[0139] 4.1 Model comparison experiment

[0140] The prediction results of thermal error are as follows: Fig.15As shown in the figure, different models have different prediction performances. MLR only roughly captures the trend of thermal error and cannot effectively describe detailed information. The prediction accuracy of LSTM, GRU, CNN-LSTM, T-GCN, HGNN, and STFGCN is higher than that of MLR. It is revealed that the prediction accuracy of the thermal error model considering the error mechanism is higher than that of the thermal error model without considering the error mechanism.

[0141] The fitting and prediction performance are listed in Tables 2 and 3. For the fitting performance, the RMSEs of MLR, LSTM, GRU, CNN-LSTM, T-GCN, HGNN and STFGCN are 0.8539, 0.4096, 0.4215, 0.4560, 0.3956, 0.3829 and 0.2789, respectively. For the prediction performance, the RMSEs of MLR, LSTM, GRU, CNN-LSTM, T-GCN, HGNN and STFGCN are 1.1336, 0.5690, 0.6055, 0.6161, 0.5274, 0.5653 and 0.3492, respectively. The fitting performance and prediction performance of STFGCN are more prominent than those of other machine learning models. Thermal error is a spatiotemporal data, and the STFGCN proposed in this embodiment fully mines the spatiotemporal behavior of thermal error. T-GCN and HGNN mine incomplete spatial behaviors, and their fitting accuracy and prediction performance are worse than STFGCN. Since CNN is not suitable for processing non-Euclidean data, it cannot capture the spatial behavior of thermal errors. The prediction and fitting performance of LSTM, GRU, and CNN-LSTM are similar. It is worth mentioning that the prediction performance of CNN-LSTM is worse than that of LSTM because CNN is not suitable for capturing the dynamic spatial behavior of thermal errors. MLR is a traditional data-based method, and its prediction performance is the worst among the above models because it cannot capture the spatiotemporal behavior of thermal errors, that is, MLR cannot describe the generation mechanism of thermal errors.

[0142] Table 2 Fitting performance

[0143]

[0144] Table 3 Prediction performance

[0145]

[0146] 4.2 Cross-Validation

[0147] In order to demonstrate the robustness of the proposed model, the training set and the test set were exchanged for cross-validation experiments. In the cross-validation experiment, the measured data at a feed rate of 600 mm / min was used as the training set, and the measured data at a feed rate of 1200 m / min was used as the test set. According to Table 4, the T-GCN model has the best prediction performance among the MLR, LSTM, GRU, CNN-LSTM, T-GCN, and HGNN models, so this model is selected to compare with the STFGCN model shown in Table 4. When the training set and the test set are exchanged, the prediction accuracy of STFGCN is much higher than that of T-GCN, which further verifies the robustness of STFGCN.

[0148] Table 4 Cross-validation prediction performance

[0149]

[0150] 4.3 Effect of the number of nodes in the hypergraph

[0151] The number of nodes in the semantic hypergraph has a great impact on the prediction accuracy of the proposed STFGCN model, such as Fig.16 As shown in Figure 2, the MAE, MSE, RMSE, and R2 of STFGCN will change when the number of nodes changes. When the number of nodes in the hypergraph is 4, the STFGCN model has the highest prediction accuracy. When the number of nodes is 2, the HCN in GGC degenerates into GCN.

[0152] 5. Spatiotemporal thermal error control system based on STFGCN

[0153] like Fig.17 As shown, the spatiotemporal thermal error control system (MLP) based on STFGCN in this embodiment includes a cloud computing layer and a terminal computing layer. The terminal computing layer includes a device terminal, a data acquisition system and an edge computer. The cloud computing layer includes a data storage module, a data computing module and a data analysis module. The data acquisition system collects the data generated by the device terminal during operation and divides the collected data into historical data and current data; the historical data is transmitted and stored in the data storage module, the thermal error prediction model edited by the edge computer is transmitted to the data analysis module, the data computing module uses the historical data stored in the data storage module to train the thermal error prediction model, the trained thermal error prediction model is downloaded to the edge computer to update the thermal error prediction model stored in the edge computer, and the real-time data is transmitted to the edge computer to use the thermal error prediction model stored in the edge computer for prediction. Specifically, the thermal error prediction model adopts the spatiotemporal thermal error prediction model based on STFGCN in this embodiment.

[0154] The terminal computing layer of this embodiment also includes an error compensation system, which generates an error compensation value based on the thermal error predicted by the thermal error prediction model and transmits the error compensation value to the PLC controller of the device terminal. The PLC controller of the device terminal transmits the error compensation value to the numerical control system of the device terminal, and the thermal error is corrected by the numerical control system of the device terminal to achieve automatic and real-time error compensation.

[0155] 5.1 Terminal Computing Layer

[0156] Equipment terminals include many types of machine tools, gear hobbing machines, gear grinding machines, and worm gear processing machines. These machines are regarded as the terminals of the system and need to be monitored. Especially during the processing, various signals need to be measured to reflect the processing status of these machine tools. The processing process of machine tools is very complicated. There are too many signals to collect, such as temperature, speed, thermal imager pictures, current, cutting force, etc. These collected data are divided into structured data and unstructured data, which are the raw materials of machine learning models. Machine learning models are trained to capture the potential connections between processed data and extract key information to inform predictions and decisions.

[0157] In this embodiment, the terminal undertakes the task of making predictions from the machine learning model. Users can design their own machine learning model around the machine tool according to the actual working conditions, and then upload it to the cloud server. The cloud server with excellent computing power will complete the training of the machine learning model based on a large amount of historical data, which can then be downloaded locally by the user. Finally, the user inputs real-time data to the downloaded model for real-time prediction and control.

[0158] In order to achieve real-time control and compensation, MLP will calculate the compensation value at the equipment terminal. The error compensation value is sent to the PLC and further transmitted to the NC. Then, the compensation value is sent to the position regulator in each interpolation cycle and superimposed with the interpolated command position to generate the control command for the motor movement. Finally, the NC corrects the thermal error by triggering the movement of the relevant coordinate axis in the opposite direction to achieve automatic and real-time error compensation. PLC is the key to achieve communication between MLP and NC, and has become a key factor in ensuring the real-time performance of the entire system, such as Fig.17 As shown. The compensation value is continuously written to the NC. The compensation parameters are transmitted through the DB data block of the PLC. The FB3 function block program is provided in the basic PLC program of the 840D system. Write the corresponding PLC program and write the variables of the NC system into the NCK area. During the interpolation cycle, the compensation value is sent to the PLC by the compensation value output interface, and error compensation monitoring and compensation value smoothing are performed. The compensation value is then further transmitted to the NC through the embedded PLC program. The time consumption of the PLC is 1ms. The interpolation cycle of the CNC system is 2 to 4ms. That is, the time consumption of the PLC is shorter than the interpolation cycle. Thus, real-time error compensation is achieved.

[0159] 5.2 Cloud Computing Layer

[0160] The cloud computing layer consists of three modules, namely, data storage module, data computing module and data analysis module.

[0161] The data storage task belongs to the Hadoop Distributed File System (HDFS), which runs on a general hardware cluster and manages the storage of multiple computers in the Hadoop cluster. It has been widely used in the field of big data storage. HDFS divides data into multiple data blocks and stores multiple data on different data nodes in the cluster. The copy of the data block, if the copy is lost, its internal mechanism can automatically restore the copy data, in this reliable way to store a large amount of data, with high fault tolerance. HDFS works in a master-slave mode in the cluster, and the cluster mainly consists of a NameNode and multiple DataNodes. NameNode stores all metadata information of HDFS. DataNode is the actual working data node, mainly responsible for storing data and executing the tasks of NameNode on DataNode.

[0162] The data storage task belongs to Spark, which is similar to Hadoop. Spark's cluster architecture is also a master / slave architecture. According to its architectural characteristics, it is mainly divided into four parts, namely Client, Driver Program, Cluser Manager, and Worker. The driver node, as the master node of the entire operating architecture, mainly performs a series of coordination work for each calculation of the cluster. Cluser Manager is responsible for managing the computing resources of each node. As the computing unit in the entire cluster, Worker is responsible for receiving commands from Masser nodes and feeding back its status information at any time during command execution. In the Worker node, the executor executes the assigned task. In the cluster architecture, the client is mainly responsible for sending the user's request to the cluster, and after the calculation is completed, the result is fed back to the user. MLlib is an algorithm package for machine learning in Spark, which implements many classic algorithms, such as commonly used regression models, clustering models, and classification models. Users can use the proposed platform to load their own machine learning models for industrial applications. In this study, clustering models and designed regression models were loaded.

[0163] Data analysis tasks belong to the Web UI. Jupyter Notebook provides a web-based Python editor that allows edge computers to develop suitable machine learning models based on industrial scenarios. The parallel execution of machine learning models and the optimization of computing resources will be done by Spark. Through this work, a convenient, fast, and efficient environment can be automatically generated on the cloud server under the combined framework of Jupyter Notebook and PySpark. For machine learning users, Jupyter Notebook can be launched directly on Spark Master and accessed through a public IP address. The Jupyter user interface (UI) will be available in the browser. Jupyter UI and Spark UI are password protected, and users can also set the port number themselves.

[0164] 5.3 Control System MLP Verification

[0165] The virtual machine in this embodiment is a WMware workstation 16, the Linux operating system used is centoos7, the JAVA version used is 1.8.0_241, the Python version is 3.8.8, the HADOOP version is 3.3.0, the Spark version is 3.2.0, and Spark is written in the Scala programming language. The library required for MLM is based on the Python language and uses the PySpark tool, which allows Spark to support the Python language. In order to test the effectiveness of the designed MLP, the MLP acceleration ratio of the thermal error (TE) model training with different numbers of nodes is compared, and the results are listed in Table 5. The speed ratio of the MLP with a node number of 1 is regarded as 1. Then, the acceleration ratios of the MLP with 2, 3, 4, 5, 6 and 7 nodes are 1.72, 1.75, 1.81, 1.87, 1.96 and 1.91 respectively. The results show that the designed MLP can improve the training speed of MLM in industrial scenarios.

[0166] Table 5 Speedup of different number of nodes

[0167]

[0168] 5.4 Control Experiment

[0169] The feed speed is 2000m / min, the ambient temperature is 20.00.1℃, and the positioning error is measured from cold state to thermal equilibrium state. In addition, the positioning error is measured under three different compensation strategies to verify the effectiveness of the designed MLP and the proposed STFGCN model. The compensation strategies are as follows:

[0170] (1) Processing without TE control.

[0171] (2) Turn on the error control function and use the positioning error measured in the initial state (T=0) as the control component. That is, error compensation is performed without considering the influence of working conditions.

[0172] (3) Machining is performed by implementing MLP using the proposed STFGCN model as the error control model.

[0173] The positioning error is controlled under three different strategies and the positioning errors are compared, such as Fig.18 As shown in Figure 2, the positioning error fluctuation range of the ball screw system decreases in the cases of MLP, pitch error control, and TE control. Using the proposed STFGCN model, the positioning error is reduced by the designed MLP.

[0174] Table 6 lists the positioning error ranges with and without error control. At T = 0, the positioning error implemented by MLP is in the range of [-1.7μm, 1.2μm], while the positioning error of pitch error control is in the range of [-4.9μm, 4.8μm]. At T = 1 / 6h, the positioning error using MLP is in the range of [-1.0, 0.9], and the positioning error using pitch error control is in the range of [-3.1μm, 1.9μm]. At T = 1 / 2h, the positioning error using MLP is in the range of [-0.4, 1.6], and the positioning error using pitch error control is in the range of [-3.7μm, 1.7μm]. At T = 1h, the positioning error using MLP is in the range of [-0.3μm, 1.0μm], and the positioning error using pitch error control is in the range of [-2.7μm, 1.8μm]. When T=2h, the positioning error of MLP is in the range of [-0.5μm, 1.5μm], and the positioning error of pitch error control is in the range of [-2.2μm, 1.8μm]. When T=3h, the positioning error of MLP is in the range of [-0.1μm, 1.0μm], and the positioning error of pitch error control is [-3.5μm, 1.2μm]. When T=5h, the positioning error of MLP is in the range of [0.1μm, 2.3μm], and the positioning error of pitch error control is in the range of [-3.0μm, 3.2μm]. The effectiveness of MLP and STFGCN models is verified. Pitch error control ignores the dynamic effect of TE, resulting in a reduction in compensation effect.

[0175] Table 6 Positioning error range with and without compensation

[0176]

[0177] 5.5 Machining experiment

[0178] Standard specimens are processed to compare the compensation effect, e.g. Fig.19 As shown. The B-axis was fixed during machining and the specimen was fixed on the B-axis. The cutting depth was 10 μm. The distances between the four holes were measured, and as shown in Table 7, MLP reduced the machining error by more than 44% and 75% compared with pitch error control and no TE control, respectively. For pitch error control and MLP, the machining errors in cold and hot states were almost the same, and the machining errors on the square side had the same trend, which meant that TE was fully compensated.

[0179]

[0180] 6. Conclusion

[0181] Based on the generation mechanism of thermal errors, this embodiment proposes a new STFGCN model to comprehensively capture the spatiotemporal behavior of thermal errors. The distance graph and the semantic graph are distinguished, the dynamic relative positions between the measurement points are obtained, and a dynamic distance graph is established. A semantic hypergraph is established based on the measurement data and the fuzzy clustering algorithm. The dynamic distance graph and the semantic hypergraph are input into GGC to comprehensively extract spatial and temporal features. Then, the output and input sequence Xt of GGC is used as the input of S-GRU to comprehensively fuse spatiotemporal information. Finally, ST attention is introduced into the STFGCN model to enhance the ability to capture long-term spatiotemporal memory. The prediction results show that the proposed STFGCN model has the best prediction performance and robustness compared with other machine learning models. The conclusions are as follows:

[0182] (1) The energy conservation equation is used to reveal the generation mechanism of thermal error. The results show that thermal error has spatiotemporal characteristics, and it is crucial to characterize the spatiotemporal characteristics of thermal error using a data-based error model. For T-GCN and HGNN, the RMSE of the prediction results is lower than that of LSTM and GRU, which indicates that the spatiotemporal model has higher prediction accuracy than the temporal model.

[0183] (2) Compared with CNN, GCN is more suitable for capturing the spatial behavior of thermal errors. The RMSE of the prediction results of T-GCN and HGNN is lower than that of CNN-LSTM because CNN is not suitable for processing non-European data. GGC is proposed for the first time, which can effectively mine the spatial behavior of thermal errors. GGC is proposed by connecting the dynamic distance graph and the semantic hypergraph with a gating structure. Specifically, GGC has the unique ability to control the spatial information flow of thermal errors. The semantic hypergraph determines which heat source information is retained in the dynamic distance graph.

[0184] (3) This embodiment proposes a spatiotemporal thermal error prediction model based on STFGCN. For thermal error prediction, the distinction between dynamic distance graphs and semantic hypergraphs helps to improve the full mining of spatial information. In addition, the construction and fusion of dynamic distance graphs and semantic hypergraphs are of great significance for improving prediction accuracy. The proposed STFGCN model can fully mine the spatiotemporal behavior of thermal errors through the designed STFGCN unit.

[0185] (4) A spatiotemporal thermal error control system for machine tool thermal errors is proposed. The results show that the proposed MLP can effectively speed up the calculation process and achieve real-time control. Users can choose an appropriate number of virtual machine nodes according to their needs. More importantly, the efficiency of users in developing machine learning algorithms for industrial needs is improved.

[0186] The above-described embodiments are only preferred embodiments for fully illustrating the present invention, and the protection scope of the present invention is not limited thereto. Equivalent substitutions or changes made by those skilled in the art based on the present invention are within the protection scope of the present invention. The protection scope of the present invention shall be subject to the claims.

Claims

1. A spatiotemporal thermal error prediction model based on STFGCN, characterized by: It includes N layers of STFGCN layers, where N ≥ 1; and: when N ≥ 2, the output H of the STFGCN layer of the i-th layer i is the input of the STFGCN layer described in the i+1th layer, 1≤i≤N-1; The STFGCN unit includes: A gated graph convolutional network to extract temporal and spatial information from thermal error data; A spatially gated recursive unit to fuse temporal and spatial information in thermal error data; Spatiotemporal attention units to capture the long-term spatiotemporal behavior of thermal errors; The principle of the gated graph convolutional network is: Among them, S t It represents the output after combining the time information and spatial information in the thermal error data at time t; Represents the semantic hypergraph adjacency matrix at time t; represents the dynamic distance graph adjacency matrix at time t; X t represents the input at time t; W Gi and W Hi Represent the weight parameters of the dynamic distance graph and semantic hypergraph of the i-th layer respectively; W G(i+1) and W H(i+1) are the weight parameters of the dynamic distance graph and semantic hypergraph of the i+1th layer respectively; g(·) is the activation function of the dynamic distance graph convolution; σ(@) represents the activation function of the semantic hypergraph convolution; Relu represents the ReLU function.

2. The spatiotemporal thermal error prediction model based on STFGCN according to claim 1, characterized in that: Semantic Hypergraph Adjacency Matrix It is expressed as: Where H represents the incidence matrix; W represents the diagonal matrix, and W = R M×M , M represents the number of hyperedges; D v represents the vertex degree matrix, and: 0 v =∑ e∈ε W(e)H(v,e) Where v represents a vertex; ε represents a hyperedge; W(e) represents a diagonal matrix; H(v,e) represents an incidence matrix; Define the hypergraph as G H =(V,E), V represents the vertex set, E represents the hyperedge set, and each hyperedge ε∈E is assigned a weight W εε , all weights are stored in a diagonal matrix W.

3. The spatiotemporal thermal error prediction model based on STFGCN according to claim 1, characterized in that: Dynamic distance graph adjacency matrix and is related to the running time, then the equation of GCN can be expressed as: in, A t is a time-varying adjacency matrix; W0 represents the weight parameter; σ represents the activation function; f(@) represents the functional relationship of the GCN neural network.

4. The spatiotemporal thermal error prediction model based on STFGCN according to claim 1, characterized in that: The principle of the spatial gated recursive unit is: S' t =σ(W s [S t ,X t ]+b s )⊙S t r t =σ(W r [X t ,h t-1 ,S' t ]+b r ) z t =σ(W z [X t ,h t-1 ,S' t ]+b z ) Among them, S' t represents the spatial gate that integrates temporal information and spatial information; r t Represents the reset gate; z t represents the update gate; Indicates the candidate memory state; S t represents the output of the gated graph convolutional network; W r , W z , W h and W s They represent weight matrices, σ represents activation function, and b r 、b z 、b h and b s They represent the deviation matrix respectively; h t represents the final memory output at time t; ⊙ represents the element-by-element product of two vectors.

5. The spatiotemporal thermal error prediction model based on STFGCN according to claim 1, characterized in that: The principle of the spatiotemporal attention unit is: e=concat(S t ,h t ) output=H t =[α ij ]·h t Among them, concat means concatenation; S t represents the output of the gated graph convolutional network; h t represents the output of the spatial gated recurrent unit; e represents the attention weight; e ij represents the elements of the matrix e; [α ij ] represents the result after normalization of attention weights; a ij Represents the matrix [α ij ]; output represents the output of the spatiotemporal attention unit, which is also the output H of the STFGCN unit t .

6. A spatiotemporal thermal error control system based on STFGCN, characterized by: Includes cloud computing layer and terminal computing layer; The terminal computing layer includes a device terminal, a data acquisition system and an edge computer; the cloud computing layer includes a data storage module, a data computing module and a data analysis module; The data acquisition system acquires data generated by the device terminal during operation and divides the acquired data into historical data and current data; the historical data is transmitted and stored in the data storage module, the thermal error prediction model edited by the edge computer is transmitted to the data analysis module, the data calculation module trains the thermal error prediction model using the historical data stored in the data storage module, the trained thermal error prediction model is downloaded to the edge computer to update the thermal error prediction model stored in the edge computer, and the real-time data is transmitted to the edge computer to perform prediction using the thermal error prediction model stored in the edge computer; The thermal error prediction model adopts the spatiotemporal thermal error prediction model based on STFGCN as described in any one of claims 1-5.

7. The spatiotemporal thermal error control system based on STFGCN according to claim 6, characterized in that: The terminal computing layer also includes an error compensation system, which generates an error compensation value based on the thermal error predicted by the thermal error prediction model and transmits the error compensation value to the PLC controller of the device terminal. The PLC controller of the device terminal transmits the error compensation value to the numerical control system of the device terminal, and the thermal error is corrected by the numerical control system of the device terminal to achieve automatic and real-time error compensation.

Citation Information

Patent Citations

  • Thermal error prediction model based on ONT-GCN space-time model, modeling method and haze-edge-fog-cloud error compensation system

    CN114237154A