Method for constructing thermal error prediction model, machine tool thermal error model and machine tool thermal error control system

By constructing a thermal error prediction model using a Bi-MGU neural network and a self-attention mechanism, and combining edge computing, fog computing, and cloud computing, the problem of low tooth surface geometric accuracy caused by thermal errors in gear hobbing machines is solved, achieving high-precision and fast error control.

CN116702886BActive Publication Date: 2026-03-17CHONGQING UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-20
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing technologies cannot effectively solve the problem of low tooth surface geometric accuracy caused by thermal errors in gear hobbing machines. In particular, the instability and nonlinear changes of thermal errors lead to insufficient robustness and convergence of the model. Furthermore, existing deep learning models such as LSTM have defects in execution time and convergence.

Method used

A Bi-MGU neural network is used to initialize the crystal position by combining a self-attention mechanism and a chaotic tent mapping. The crystal position is updated by using a Gaussian perturbation mechanism to construct a thermal error prediction model. The thermal error is converted into spatial pose error by using a machine tool thermal error model. Error control is achieved by combining edge, fog and cloud computing.

Benefits of technology

The robustness and convergence of the thermal error prediction model were improved, the computation time was reduced, the processing accuracy was improved, and the timeliness of error control was achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116702886B_ABST
    Figure CN116702886B_ABST
Patent Text Reader

Abstract

This invention discloses a method for constructing a thermal error prediction model, comprising the following steps: Step 1: Converting thermal error data into supervised learning; Step 2: Initializing the crystal position; Step 3: Encoding the crystal position into a batch size; Step 4: Training a Bi-MGU neural network, assigning weights using a self-attention mechanism, and calculating the loss function value; Step 5: Determining whether the loss function value is less than a set threshold: if yes, proceed to Step 9; if no, proceed to Step 6; Step 6: Updating the crystal position and calculating the crystal's fitness value; Step 7: Determining whether the crystal position needs to be updated: if yes, update the crystal position; if no, do not update the crystal position; Step 8: Determining whether the number of iterations equals the maximum number of iterations: if yes, proceed to Step 9; if no, proceed to Step 3; Step 9: Obtaining the optimal hyperparameters and constructing the thermal error prediction model. This invention also discloses a machine tool thermal error model and a machine tool thermal error control system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of mechanical error control technology, specifically a method for constructing a thermal error prediction model, a machine tool thermal error model, and a machine tool thermal error control system. Background Technology

[0002] Gear hobbing is a highly efficient roughing method for gears, widely used in gear machining for aerospace, large ships, and high-end automotive transmission systems. The tooth surface formation mechanism involves a highly complex thermomechanical coupling process. Existing technologies have investigated material removal mechanisms and the influence of process parameters on tooth surface quality; however, due to hobbing machine errors, it is impossible to guarantee the geometric accuracy of the tooth surface simply by selecting appropriate process parameters. Research has found that hobbing machine errors are the primary cause of low tooth surface geometric accuracy. Furthermore, thermal errors account for the largest share of hobbing machine errors. Modeling and controlling thermal errors has become a pressing need.

[0003] Controlling thermal errors is complex. On one hand, thermal errors affect the spatial orientation of the hob and workpiece, generating a spatial orientation error between them. This spatial orientation error is then mapped onto the tooth surface using multi-axis linkage, leading to significant geometric errors in the machined tooth surface. These two mapping relationships realize the propagation, accumulation, and inheritance of thermal errors to tooth surface errors. To achieve tooth surface error control, two inverse mappings are required. First, the tooth surface error is mapped to the spatial orientation error between the hob and workpiece. Then, the spatial orientation error is mapped to the multi-axis compensation component of the GHM (Gear Hobbing Machine). Thermal errors should be converted into spatial orientation errors, but so far, there is no research on using thermal errors as input to derive tooth surface errors. For hobbing machines, both the driving and driven axes exist simultaneously, but the error compensation component of the driven axis cannot be directly superimposed on the machining command; that is, the error compensation component of the driven axis should be converted into the error of the driving axis.

[0004] Thermal error is a dynamic error and also the largest error source for precision machine tools, accounting for 40%-70% of the total machining error. Therefore, thermal error control is crucial for improving the accuracy of gear hobbing machines. Gear hobbing machines with unique structures experience enormous heat loads and numerous heat sources. The correlation between the intensity, number, and location of heat sources, as well as ambient temperature and operating conditions, leads to the instability and variability of thermal errors. Empirical error models have been proposed based on these characteristics, but their stability decreases with continuous changes in ambient temperature. Under nonlinear conditions, the robustness and convergence of existing empirical error models are insufficient.

[0005] Deep learning-based prediction models can adapt to different working conditions and adaptively update their parameters under varying circumstances. In light of this, existing technologies have proposed a deep learning-based error control model: the Recurrent Neural Network (RNN). Historical heat information is computed to effectively learn the nonlinear relationship between thermal error and complex variables. The RNN model is suitable for time series feature extraction and then for thermal error modeling. However, RNNs cannot access historical information and cannot consider any future inputs from the current state. LSTM networks overcome the shortcomings of RNNs and improve the storage capacity of temporal information, remembering long-term states. However, the execution time and convergence of LSTM networks remain unsatisfactory. Summary of the Invention

[0006] In view of this, the purpose of this invention is to provide a method for constructing a thermal error prediction model, a machine tool thermal error model, and a machine tool thermal error control system. The constructed thermal error prediction model can effectively improve robustness and convergence, and has the advantages of high prediction accuracy and short computation time. The machine tool thermal error model converts thermal error into spatial pose error to achieve error control. The machine tool error control system achieves a reasonable division of functions based on edge computing, fog computing, and cloud computing, ensuring the timeliness of error control and ultimately improving machining accuracy.

[0007] To achieve the above objectives, the present invention provides the following technical solution:

[0008] This invention first proposes a method for constructing a thermal error prediction model, comprising the following steps:

[0009] Step 1: Input thermal error data and convert the time series data into supervised learning data;

[0010] Step 2: Initialize the crystal's position using the chaotic tent mapping, and determine whether the crystal's position satisfies <lb or >ub: if yes, maintain the crystal's current position; if not, set the boundary as the crystal's position.

[0011] Step 3: Encode the crystal position into the batch size of the Bi-MGU neural network;

[0012] Step 4: Train the Bi-MGU neural network using thermal error data, assign weights to the Bi-MGU neural network using a self-attention mechanism, and calculate the loss function value of the Bi-MGU neural network;

[0013] Step 5: Determine if the loss function value is less than the set threshold: if yes, proceed to step 9; if no, proceed to step 6.

[0014] Step 6: Update the crystal position using an optimization strategy combined with a Gaussian perturbation mechanism, and calculate the fitness value of the crystal;

[0015] Step 7: Determine if the current fitness value of the crystal is less than the current optimal fitness value: if yes, update the crystal position and use the current crystal fitness value as the optimal fitness value; if no, do not update the crystal position.

[0016] Step 8: Determine if the number of iterations equals the maximum number of iterations: if yes, proceed to step 9; if no, proceed to step 3.

[0017] Step 9: Obtain the optimal hyperparameters and construct the thermal error prediction model.

[0018] Furthermore, in step two, the method for initializing the crystal position is as follows:

[0019]

[0020] Where, x n+1 Indicates the initial position of the crystal; x n Both r' and r' are random numbers; N represents the population size; μ = 2.

[0021] Furthermore, in step four, the principle of the attention mechanism is as follows:

[0022]

[0023] Where Attention(g) represents the attention mechanism; Q, K, and V represent the query matrix, key matrix, and value matrix, respectively, and Q, K, and V are in vector form. T represents the matrix transpose operation; It acts as a regulator, ensuring that the inner product of Q and K is not too large; softmax(g) represents the softmax function; and:

[0024] Q = XW Q K = XW K V = XW V

[0025] Where X represents the input matrix; W Q W K and W V These represent the projection matrices for query, key, and value, respectively.

[0026] Furthermore, in step six, the optimization strategy is as follows:

[0027] Cr new =Cr old +r0Cr main

[0028] Cr new =Cr old +r1Cr main+r2Cr b

[0029] Among them, Cr new Indicates the position of the new crystal; Cr old Indicates the past position of the crystal; Cr main Indicates all crystals in the corner; Cr b This represents the crystal with the best structure currently available; r0, r1, and r2 all represent random numbers.

[0030] Furthermore, the position update principle based on the Gaussian perturbation mechanism is as follows:

[0031] Cr new '(t)=Cr new (t)×(1+τ×G(σ))

[0032]

[0033]

[0034] Among them, Cr new '(t) represents the new crystal position obtained by Gaussian perturbation in the t-th iteration; Cr new (t) represents the position of the new crystal at the t-th iteration; τ represents the perturbation factor; G(σ) represents the Gaussian standard normal distribution; Cr old (t+1) represents the past position of the crystal at the (t+1)th iteration; f(g) represents the MAE at the current crystal position.

[0035] Furthermore, the random numbers r0, r1, and r2 are converted into nonlinear parameters R, expressed as:

[0036] R = a(2r”-1)

[0037]

[0038]

[0039] Where r” represents a random number; T and t represent the maximum number of iterations and the current number of iterations, respectively; a, m, n and k all represent coefficients.

[0040] This invention also proposes a machine tool thermal error model, in which the comprehensive spatial error between the tool and the workpiece is expressed as:

[0041]

[0042] Where E represents the comprehensive spatial error matrix between the tool and the workpiece; M 28 M represents the ideal homogeneous coordinate transformation matrix between the tool and the workpiece; 28' represents the actual homogeneous coordinate transformation matrix between the tool and the workpiece; δx, δy, and δz represent the positional differences between the tool and the workpiece in the X, Y, and Z directions, respectively; εx, εy, and εz represent the angular differences between the tool and the workpiece in the X, Y, and Z directions, respectively.

[0043] and:

[0044] M 28 =M 21 M 10 M 03 M 34 M 45 M 56 M 67 M 78

[0045]

[0046] Among them, M ij M represents the ideal homogeneous coordinate transformation matrix between i and j; ij ' represents the actual homogeneous coordinate transformation matrix between i and j; subscript 0 represents the bed; subscript 1 represents the C-axis; subscript 2 represents the workpiece; subscript 3 represents the X-axis; subscript 4 represents the Z-axis; subscript 5 represents the A-axis; subscript 6 represents the Y-axis; subscript 7 represents the B-axis; subscript 8 represents the tool; Represents the thermal error matrix along the X-axis; Represents the thermal error matrix along the Z-axis; Represents the thermal error matrix of the B-axis; and:

[0047]

[0048] Where, ε t x(B) represents the angular error of the B-axis in the X-axis direction; ε represents the positional error of the B-axis in the Y-axis direction. t z(B) represents the angular error of the B-axis in the Z-axis direction; including ε t x(B), and ε t The thermal error of z(B) along the B axis is predicted using a thermal error prediction model constructed according to any one of claims 1-6.

[0049]

[0050] Among them, R y (εy(X)) represents the error propagation matrix caused by εy(X); T z (δz(X)) represents the error propagation matrix caused by δz(X); T z(δx(X)) represents the error propagation matrix caused by δx(X); εy(X) represents the angular error of the X-axis in the Y direction; δz(X) represents the angular error of the X-axis in the Z direction; δx(X) represents the positional error of the X-axis in the X direction; L represents the length of the upper surface of the bed under the column; ΔL represents the total thermal expansion of the upper surface of the bed in the X-axis direction; H represents the maximum thermal deformation of the upper surface of the bed.

[0051]

[0052] Among them, R y (ε t y(Z)) represents ε t The error propagation matrix caused by y(Z); T z (δ t z(Z) represents δ t The error propagation matrix caused by z(Z); T x (δ t x(Z)) represents δ t The error propagation matrix caused by x(Z); ε t y(Z) represents the angular error of the Z-axis in the Y direction; δ t z(Z) represents the position error of the Z-axis in the Z direction; δ t x(Z) represents the angular error of the Z-axis in the X direction; H' represents the sum of the initial length of the inner side of the column below the cutter holder and the initial length of the inner side of the column below the cutter support plate; ΔH' represents the sum of the thermal deformation of the inner side of the column below the cutter holder and the thermal deformation of the inner side of the column below the cutter support plate; W represents the maximum thermal deformation of the inner surface of the column.

[0053] This invention also proposes a machine tool thermal error control system, comprising a machine layer, an edge layer, a fog computing layer, and a cloud computing layer;

[0054] The machine layer includes a data acquisition system and an error compensation system. The data acquisition system includes a data acquisition card, a Raspberry Pi with an A / D converter, and a gateway. The data acquisition card is used to acquire analog voltage signals, and the A / D converter is used to convert the analog voltage signals into thermal error data. The Raspberry Pi is used to verify the validity of the thermal error data and transmit the valid thermal error data to the edge layer through the gateway. The error compensation system includes a computer numerical control system installed in the machine tool. The computer numerical control system has a PLC controller, which receives the error compensation component transmitted by the fog computing layer and implements error compensation through the computer numerical control system.

[0055] The edge layer includes a micro data center and a central processing unit. The micro data center embeds a thermal error prediction model and receives thermal error data transmitted from the machine layer and uses the thermal error prediction model to predict thermal errors. The predicted thermal errors are transmitted to the thermal error model of the fog computing layer. The central processing unit interacts with the cloud computing layer to trigger the update and retraining of the thermal error prediction model.

[0056] The fog computing layer includes fog nodes that are configured one-to-one with the machine tool. The fog nodes receive real thermal error data transmitted from the edge layer to perform error mapping. The error mapping results, the predicted B-axis thermal error, and the thermal errors of the X-axis and Z-axis obtained by the cloud computing layer are input into the thermal error model to perform error decoupling and obtain error compensation components. The error compensation components are then transmitted to the error compensation system of the machine layer.

[0057] The cloud computing layer includes a thermal behavior simulation module and a model training module. The thermal behavior simulation module is used to analyze the thermal behavior of the machine tool to obtain the thermal errors of the X-axis and Z-axis, and transmits the obtained thermal errors of the X-axis and Z-axis to the thermal error model. The model training module trains the thermal error prediction model based on historical thermal error data and updates the parameters of the thermal error prediction model of the edge layer by communicating with the central processing unit.

[0058] The thermal error model is the machine tool thermal error model as described in claim 7.

[0059] Furthermore, the model training module includes a database and a server. The database is used to store thermal error data transmitted by the edge layer, and the server is used for training and updating the thermal error prediction model. The thermal error prediction model adopts a combination of enhanced updates and global updates. After the thermal error prediction model is updated a set number of times, a full update is performed in a time window with a small amount of data.

[0060] Furthermore, the interaction method between the central processing unit and the cloud computing layer is as follows: determine whether the service time of the thermal error prediction model in the edge layer has exceeded a set threshold; if yes, update the parameters of the thermal error prediction model; if no, continue to perform thermal error prediction with the current thermal error prediction model.

[0061] The beneficial effects of this invention are as follows:

[0062] The thermal error prediction model construction method of this invention optimizes the hyperparameters of the Bi-MGU neural network using a crystal structure algorithm during the Bi-MGU neural network training process. Simultaneously, it initializes the crystal position using a chaotic tent mapping and updates the crystal position using a Gaussian perturbation mechanism to escape local optimization and expand the search range. The crystal structure algorithm's optimization strategy is optimized to improve optimization efficiency. An attention mechanism is used to allocate weights to the Bi-MGU neural network, assigning different weights to different inputs and considering the global information and correlation of the input sequence, thus giving the model strong memory capabilities. Furthermore, leveraging the characteristics of MGU—having the fewest gates and fewer learning parameters than LSTM and RNN—effectively reduces computation time without compromising prediction accuracy. In summary, the thermal error prediction model constructed by the method of this invention effectively improves robustness and convergence, and has the advantages of high prediction accuracy and short computation time.

[0063] The machine tool thermal error model of the present invention uses a thermal error prediction model to predict the thermal error of the spindle (B-axis), uses thermal behavior analysis to obtain the thermal errors of the X-axis and Z-axis, and combines the theoretical homogeneous coordinate transformation matrix and the actual homogeneous coordinate transformation matrix between the tool and the workpiece to obtain the comprehensive spatial error between the tool and the workpiece, thus constructing a machine tool thermal error model to achieve error control.

[0064] The machine tool error control system of this invention achieves a rational division of system functions and embeds a task error prediction model, a thermal analysis model, and a thermal error model into the control system. Specifically, the machine layer uses a Raspberry Pi with an A / D converter to convert analog voltage signals into thermal error data and verify the data's validity. The edge layer's micro data center embeds a thermal error preheating model to predict the B-axis thermal error, while the X-axis and Z-axis thermal errors are obtained based on thermal behavior analysis from the cloud computing layer. The fog layer performs error mapping based on real thermal error data, inputting the error mapping results, B-axis, X-axis, and Z-axis thermal errors into the thermal error model for error decoupling and obtaining error compensation components. The retraining and updating of the thermal error prediction model, as well as the thermal analysis of the X-axis and Z-axis, are performed within the cloud computing layer. This rational division of functions ensures the timeliness of error control and ultimately improves machining accuracy. Attached Figure Description

[0065] To make the objectives, technical solutions, and beneficial effects of this invention clearer, the following figures are provided for illustration:

[0066] Figure 1 This is a flowchart of an embodiment of the thermal error prediction model construction method of the present invention;

[0067] Figure 2 This is a schematic diagram of the attention mechanism.

[0068] Figure 3 This is a graph of nonlinear control parameters;

[0069] Figure 4 Here are the error transmission diagrams for the gear hobbing machine; (a) a structural diagram of the gear hobbing machine; (b) a transmission chain.

[0070] Figure 5 Thermal deformation of the bed and column; (a) X-axis thermal deformation; (b) X-axis thermal error principle;

[0071] Figure 6 This is a framework diagram of an embodiment of the machine tool error control system of the present invention;

[0072] Figure 7 Schematic diagram of B-axis thermal error measurement principle; (a) thermal yaw angle; (b) thermal pitch angle;

[0073] Figure 8 Curves for different loss functions;

[0074] Figure 9 The loss of the ICryStAl-SA-Bi-MGU model;

[0075] Figure 10 B-axis thermal error curves predicted by different models;

[0076] Figure 11 Thermal analysis diagrams; (a) temperature field; (b) critical point temperature;

[0077] Figure 12 This is a schematic diagram of the thermal error control principle.

[0078] Figure 13 This is a picture of a gear hobbing machined part. Detailed Implementation

[0079] The present invention will be further described below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand and implement the present invention. However, the embodiments described are not intended to limit the present invention.

[0080] 1. Method for constructing thermal error prediction models

[0081] like Figure 1 As shown, the thermal error prediction model construction method in this embodiment includes the following steps:

[0082] Step 1: Input thermal error data and convert the time series data into supervised learning data;

[0083] Step 2: Initialize the crystal's position using the chaotic tent mapping, and determine whether the crystal's position satisfies <lb or >ub: if yes, maintain the crystal's current position; if not, set the boundary as the crystal's position.

[0084] Step 3: Encode the crystal position into the batch size of the Bi-MGU neural network;

[0085] Step 4: Train the Bi-MGU neural network using thermal error data, assign weights to the Bi-MGU neural network using a self-attention mechanism, and calculate the loss function value of the Bi-MGU neural network; in this embodiment, the loss function is the mean absolute error (MAE).

[0086] Step 5: Determine if the loss function value is less than the set threshold F. set If yes, proceed to step nine; otherwise, proceed to step six.

[0087] Step 6: Update the crystal position using an optimization strategy combined with a Gaussian perturbation mechanism, and calculate the fitness value of the crystal;

[0088] Step 7: Determine if the current fitness value of the crystal is less than the current optimal fitness value: if yes, update the crystal position and use the current crystal fitness value as the optimal fitness value; if no, do not update the crystal position.

[0089] Step 8: Determine if the number of iterations equals the maximum number of iterations: if yes, proceed to step 9; if no, proceed to step 3.

[0090] Step 9: Obtain the optimal hyperparameters and construct the thermal error prediction model (ICryStAl-SA-Bi-MGU model).

[0091] 1.1 Crystal Structure Algorithm (CryStAl)

[0092] 1.1.1 Initialize crystal position

[0093] CryStAl is a novel intelligent optimization algorithm, primarily inspired by the fundamental principle of adding bases to lattice points to form crystal structures. The initialization process for existing crystal positions is as follows:

[0094]

[0095] in, and Let represent the upper and lower bounds of the i-th crystal in the j-th dimension, respectively; d and n represent the dimension of the optimization problem and the number of crystals, respectively; ω represents a random number.

[0096] This embodiment uses a chaotic tent mapping to improve CryStAl to initialize the crystal position. Specifically, the mapping points of the chaotic tent mapping are more uniform than those of the commonly used material flow mapping. However, the chaotic sequence of the chaotic tent mapping has the disadvantages of small period and uncertain period points. After comprehensive consideration, this embodiment combines the characteristics of complete randomization with CryStAl, adding a random variable of r' / N to the traditional chaotic tent mapping, thus obtaining an improved chaotic tent mapping. That is, in step two of this embodiment, the method for initializing the crystal position is as follows:

[0097]

[0098] Where, x n+1 Indicates the initial position of the crystal; x n Both r' and r' are random numbers; N represents the population size; μ = 2.

[0099] 1.1.2 Attention Mechanism

[0100] Features containing important information are prioritized to generate output labels at each step. With the introduction of the transformer model, the concept of the attention mechanism becomes prominent. Figure 2 The framework of the attention mechanism is shown. The attention model adopts a query key-value model, that is, in step four, the principle of the attention mechanism is:

[0101]

[0102] Where Attention(g) represents the attention mechanism; Q, K, and V represent the query matrix, key matrix, and value matrix, respectively, and Q, K, and V are in vector form. T represents the matrix transpose operation; It acts as a regulator, ensuring that the inner product of Q and K is not too large; softmax(g) represents the softmax function; and:

[0103] Q = XW Q K = XW K V = XW V

[0104] Where X represents the input matrix; W Q W K and W V These represent the projection matrices for query, key, and value, respectively.

[0105] Essentially, the attention mechanism considers global information through matrix operations, transforming n×d... K The matrix is ​​re-encoded as n×d V Matrix; n represents the dimension of the sample vector; d K d represents the dimension of the key matrix; VThis represents the dimension of the value matrix. The attention mechanism assigns different weights to different inputs and considers the global information and relevance of the input sequences, thus giving the model a strong memory capacity.

[0106] 1.1.3 Crystal position update

[0107] In the existing CryStAl algorithm, an optimization strategy is used to update the crystal position, specifically:

[0108] Equation 1: Cr new =Cr old +r0Cr main

[0109] Equation 2: Cr new =Cr old +r1Cr main +r2Cr b

[0110] Equation 3: Cr new =Cr old +r1Cr main +r2F c

[0111] Equation 4: Cr new =Cr old +r1Cr main +r2Cr b +r3F c

[0112] Among them, Cr new Indicates the position of the new crystal; Cr old Indicates the past position of the crystal; Cr main Indicates all crystals in the corner; Cr b This indicates a crystal with the currently optimal structure; F c The value represents the average of the current crystal position; r0, r1, r2, and r3 represent four random numbers. Update the optimal solution; if an optimal solution is found, evaluate and update the newly generated crystal.

[0113] Research has found that the traditional CryStAl algorithm has a large number of optimization equations, and the optimization time is long due to multiple evaluations. Furthermore, equations 1 and 2 have strong optimization capabilities, while equations 3 and 4 have weaker optimization capabilities. To improve optimization efficiency, this embodiment removes equations 3 and 4 from the CryStAl algorithm to simplify the optimization equations and shorten the optimization time. Then, a new crystal is generated using CryStAl. That is, in step six, the optimization strategy is:

[0114] Cr new =Cr old +r0Crmain

[0115] Cr new =Cr old +r1Cr main +r2Cr b

[0116] Among them, Cr new Indicates the position of the new crystal; Cr old Indicates the past position of the crystal; Cr main Indicates all crystals in the corner; Cr b This represents the crystal with the best structure currently available; r0, r1, and r2 all represent random numbers.

[0117] In traditional CryStAl, the parameter r0 is completely random. This can lead to low optimization efficiency. To improve optimization efficiency, the linear parameter r0 is replaced with a nonlinear parameter R. That is, random numbers r0, r1, and r2 are converted into nonlinear parameters R, expressed as:

[0118] R = a(2r”-1)

[0119]

[0120]

[0121] Where r” represents a random number; T and t represent the maximum number of iterations and the current number of iterations, respectively; a, m, n and k all represent coefficients.

[0122] Figure 3 As shown, strong local search capability is achieved with a small control parameter 'a'. Furthermore, strong convergence capability is achieved with a large control parameter 'a'. That is, introducing a nonlinear convergence factor control mechanism can accelerate the early convergence process and improve the convergence accuracy in the later stages.

[0123] A Gaussian perturbation mechanism is introduced in ICryStAl, and when a population is found, the Gaussian perturbation is used to update the position for selecting superior crystals. Finally, ICryStAl can escape local optimization and expand the search range. When a prominent crystal is found, the position update principle combined with the Gaussian perturbation mechanism is as follows:

[0124] Cr new '(t)=Cr new (t)×(1+τ×G(σ))

[0125]

[0126]

[0127] Among them, Crnew '(t) represents the new crystal position obtained by Gaussian perturbation in the t-th iteration; Cr new (t) represents the position of the new crystal at the t-th iteration; τ represents the perturbation factor; G(σ) represents the Gaussian standard normal distribution; Cr old (t+1) represents the past position of the crystal at the (t+1)th iteration; f(g) represents the MAE at the current crystal position.

[0128] 2. Machine tool thermal error model

[0129] like Figure 4 As shown, this embodiment uses a gear hobbing machine as an example. The machine bed is represented as 0, the C-axis as 1, the workpiece as 2, the X-axis as 3, the Z-axis as 4, the A-axis as 5, the Y-axis as 6, the B-axis as 7, and the hob as 8.

[0130] 2.1 B-axis thermal error model

[0131] The homogeneous coordinate transformation (HCT) matrix for the B-axis is:

[0132]

[0133] Where, ε t x(B) represents the angular error of the B-axis in the X-axis direction; ε represents the positional error of the B-axis in the Y-axis direction. t z(B) represents the angular error of the B-axis in the Z-axis direction; including ε t x(B), and ε t The thermal error of z(B) along the B axis was predicted using the constructed thermal error prediction model (ICryStAl-SA-Bi-MGU model).

[0134] 2.2 X-axis thermal error model

[0135] The X-axis is mounted on the bed, and the influence of internal heat sources is as follows: Figure 5 As shown. The thermal error ΔL in the X direction is:

[0136]

[0137] Where ΔL1, ΔL2, and ΔL3 represent thermal elongation; L1, L2, and L3 represent initial length; T1, T2, and T3 represent temperature; λ1 is related to material properties; and T0 represents ambient temperature.

[0138] according to Figure 5 The following geometric relations are obtained:

[0139]

[0140]

[0141] Where L represents the initial length of the upper surface of the bed under the column; ΔL represents the thermal expansion of the upper surface of the bed under the column; R represents the length at the deflection center and O. 1o The distance between Z directions; β represents the bending angle of the X-axis.

[0142] The thermal error along the X-axis is:

[0143]

[0144]

[0145]

[0146] Then the HCT matrix of the X-axis is obtained as follows:

[0147]

[0148] Among them, R y (εy(X)) represents the error propagation matrix caused by ωy(X); T z (δz(X)) represents the error propagation matrix caused by δz(X); T z (δx(X)) represents the error propagation matrix caused by δx(X); εy(X) represents the angular error of the X-axis in the Y direction; δz(X) represents the angular error of the X-axis in the Z direction; δx(X) represents the positional error of the X-axis in the X direction; L represents the length of the upper surface of the bed under the column; ΔL represents the total thermal expansion of the upper surface of the bed in the X-axis direction; H represents the maximum thermal deformation of the upper surface of the bed.

[0149] 2.3 Z-axis thermal error model

[0150] The thermal error ΔH in the Z-axis direction is:

[0151]

[0152] Where ΔH4 and ΔH5 represent thermal deformation; T4 and T5 represent temperature; and H4 and H5 represent initial height.

[0153] Based on geometric relationships, we obtain:

[0154]

[0155]

[0156] Where H' represents the sum of the initial length of the inner side of the column below the cutter holder and the initial length of the inner side of the column below the cutter support plate; ΔH' represents the sum of the initial length of the inner side of the column below the cutter holder and the thermal deformation of the inner side of the column below the cutter support plate; W represents O 1o The distance between O1 and O1 in the X direction; R' represents the deflection center and O. 1o The distance in the X direction; α represents the Z-axis deflection angle.

[0157] The thermal error along the Z-axis is:

[0158]

[0159]

[0160]

[0161] Then the HCT matrix of the Z-axis is obtained as follows:

[0162]

[0163] Among them, R y (ε t y(Z)) represents ε t The error propagation matrix caused by y(Z); T z (δ t z(Z) represents δ t The error propagation matrix caused by z(Z); T x (δ t x(Z)) represents the error propagation matrix caused by δtx(Z); ε t y(Z) represents the angular error of the Z-axis in the Y direction; δ t z(Z) represents the position error of the Z-axis in the Z direction; δ t x(Z) represents the angular error of the Z-axis in the X direction; H' represents the sum of the initial length of the inner side of the column below the cutter holder and the initial length of the inner side of the column below the cutter support plate; ΔH' represents the sum of the thermal deformation of the inner side of the column below the cutter holder and the thermal deformation of the inner side of the column below the cutter support plate; W represents the maximum thermal deformation of the inner surface of the column.

[0164] 2.4 Thermal Error Model

[0165] Obtaining tooth surface under ideal conditions i R g and normal vector i N g When thermal errors are introduced into the B-axis, X-axis, and Z-axis, the actual tooth surface condition is calculated. e R g and normal vector e N gTherefore, the mathematical relationship between the spatial orientation error of the cutting tool (hob) and the thermal error of the machine tool (gear hobbing machine) is as follows:

[0166]

[0167] The spatial attitude error of the hob is defined as:

[0168] E = [δ g ;ε g ]=[δ x ,δ y ,δ z ,ε x ,ε y ,ε z ] T

[0169] Where, δ g Indicates the tooth surface position error; δ xg δ yg and δ zg These represent the positional errors of the tooth surface in the X, Y, and Z directions, respectively; ε g Indicates the tooth surface angle error; ε xg ε yg and ε zg These represent the angular errors of the tooth surface in the X, Y, and Z directions, respectively; δ x δ y and δ z These represent the positional errors of the hob in the X, Y, and Z directions, respectively; ε x ε y and ε z These represent the angular errors of the hob in the X, Y, and Z directions, respectively.

[0170] for Figure 4 The gear hobbing machine shown is modeled under ideal conditions:

[0171] M 28 =M 21 M 10 M 03 M 34 M 45 M 56 M 67 M 78

[0172] Among them, M 78 M 67 M 56 M 45 M 34 M 03 M 10 and M 21 Both represent the ideal coordinate homogeneous transformation matrix, i.e., M.ij Let i represent the ideal homogeneous coordinate transformation matrix between i and j, where subscript 0 represents the bed; subscript 1 represents the C-axis; subscript 2 represents the workpiece; subscript 3 represents the X-axis; subscript 4 represents the Z-axis; subscript 5 represents the A-axis; subscript 6 represents the Y-axis; subscript 7 represents the B-axis; and subscript 8 represents the tool.

[0173] Taking into account the thermal errors of the B-axis, X-axis, and Z-axis, the actual relationship between the hob and the workpiece after machining is expressed as follows:

[0174]

[0175] Among them, M 78 '、M 67 '、M 56 '、M 45 '、M 34 '、M 03 '、M 10 'and M 21 ' ... 28 ' represents the actual homogeneous coordinate transformation matrix between the tool and the workpiece; Represents the thermal error matrix along the X-axis; Represents the thermal error matrix along the Z-axis; This represents the thermal error matrix along the B-axis.

[0176] The overall spatial error between the tool and the workpiece is expressed as:

[0177]

[0178] Where E represents the comprehensive spatial error matrix between the tool and the workpiece; M 28 M represents the ideal homogeneous coordinate transformation matrix between the tool and the workpiece; 28 ' represents the actual homogeneous coordinate transformation matrix between the tool and the workpiece; δx, δy, and δz represent the positional differences between the tool and the workpiece in the X, Y, and Z directions, respectively; εx, εy, and εz represent the angular differences between the tool and the workpiece in the X, Y, and Z directions, respectively.

[0179] The homogeneous coordinates of the hob's spatial position and orientation are [a,b,c,1] and [i,j,k,0], respectively. The spatial orientation and position of the hob are obtained as follows:

[0180]

[0181] Where, δ t Indicates the spatial orientation error of the hob; δ xt δ yt and δ zt ε represents the position error components in the X, Y, and Z directions, respectively;t Indicates the spatial position error of the hob; ε xt ε yt and ε zt These represent the angular error components in the X, Y, and Z directions, respectively.

[0182] 2.5 Error Decoupling

[0183] The difference matrix is ​​represented as:

[0184] E ij =D(T) ij )[δ xj ,δ yj ,δ zj ,ε xj ,ε yj ,ε zj ] T

[0185] Among them, T ij It is the HCT matrix from coordinate system i to j; D(T) ij ) represents the differential transformation relationship between the two coordinate systems i and j; δ xj δ yj and δ zj ε represents the three differential displacement vectors of the coordinate system in three directions; xj ε yj and ε zj These represent the three rotational differential vectors of the coordinate system in three directions.

[0186] Therefore, the combined differential motion error E of the hob in its own coordinate system total for:

[0187]

[0188] Where J is the Jacobian matrix; ε A ε B and ε C Indicates angular error, δ X δ Y and δ Z E represents the positioning error. 78 E represents the differential motion error between the B-axis and the hob coordinate system; 68 E represents the differential motion error between the Y-axis and the hob coordinate system. 58 E represents the differential motion error between the A-axis and the hob coordinate system; 48 E represents the differential motion error between the Z-axis and the hob coordinate system. 38 E represents the differential motion error between the X-axis and the hob coordinate system. 18 α represents the differential motion error between the C-axis and the hob coordinate system; α represents the rotation angle of the A-axis; β represents the rotation angle of the B-axis.

[0189] By calculating the inverse of the Jacobian matrix, the equivalent positioning error is:

[0190] [δ X ,δ Y ,δ Z ,ε A ,ε B ,ε C ] T =J -1 E

[0191] The mathematical relationship between the spatial pose error and thermal error of the hob is as follows:

[0192] E t =[δ xt ,δ yt ,δ zt ,ε xt ,ε yt ,ε zt ] T

[0193] Among them, E t This represents the mathematical relationship between the spatial pose error and thermal error of the hob; δ xt δ yt and δ zt These represent the position error components of the hob in the X, Y, and Z directions, respectively; ε xt ε yt and ε zt These represent the angular error components of the hob in the X, Y, and Z directions, respectively;

[0194] Based on the small error assumption, higher-order terms in the analytical hobbing pose error model are ignored, simplifying the error mapping model and obtaining the spatial pose error model:

[0195]

[0196] in, Indicates spatial pose error; and These represent the position error components of the hob in the X, Y, and Z directions, respectively, ignoring higher-order terms and minor errors. and These represent the angular error components of the hob in the X, Y, and Z directions, respectively, after neglecting higher-order terms and minor errors.

[0197] The equivalent error is:

[0198]

[0199] in, and These represent the position error components of the hob in the X, Y, and Z directions, respectively; and These represent the angular error components of the hob in the X, Y, and Z directions, respectively; x and y represent the X and Y coordinates of the hob in the machine tool coordinate system, respectively.

[0200] Thermal error is mapped to the equivalent error of the six motion axes. The Y, Z, and B axes are driven axes, while the X and C axes are driven axes. Thermal error compensation can only be achieved by controlling the motion of the driven axes. Therefore, the equivalent error of the driven axes should be the equivalent error mapped to the driven axes. During gear hobbing, for the generating motion γ1, the C and B axes have a fixed transmission ratio coefficient N. h / z g Connection; where N h It is the number of hobbing heads, z g This refers to the number of teeth. When machining helical gears, an additional differential motion γ2 is added to the C-axis to produce a helix in the tooth width direction. Therefore, the rotation angle γ of the C-axis is expressed as:

[0201] γ=γ1+γ2=±φ h N h / z g +2zsinβ g / mz g

[0202] Where, φ h It is the hobbing angle; z is the axial feed; β g The value represents the rotation angle of the B-axis; m represents the gear module.

[0203] The equivalent error of the C-axis is:

[0204]

[0205] Where, ε′ C This represents the equivalent error along the C-axis.

[0206] In the gear hobbing process, the meshing motion between the hob and the workpiece is abstracted as a transmission with a fixed transmission ratio between a rack and a gear. The distance L that the rack travels per revolution of the gear is:

[0207] L=πmz g

[0208] Therefore, the equivalent positioning error of the C-axis is as follows:

[0209] ε″ C =2δ Y / mz g

[0210] Where, ε″ CThis represents the equivalent positioning error along the C-axis.

[0211] Through the above mapping, the quadratic equivalent error is:

[0212]

[0213] Where, δ Xq ε Aq ε Cq These represent the quadratic equivalent errors of the X, A, and C axes, respectively.

[0214] 3. Machine tool thermal error control system (intelligent error control system)

[0215] like Figure 6 As shown, the machine tool thermal error control system of this embodiment includes a machine layer, an edge layer, a fog computing layer, and a cloud computing layer.

[0216] 3.1 Machine Layer

[0217] The machine layer includes a data acquisition system and an error compensation system. The data acquisition system includes a data acquisition card, a Raspberry Pi with an A / D converter, and a gateway. The data acquisition card is used to acquire analog voltage signals, and the A / D converter is used to convert the analog voltage signals into thermal error data. The Raspberry Pi is used to verify the validity of the thermal error data and transmit the valid thermal error data to the edge layer through the gateway. The error compensation system includes a computer numerical control system installed in the machine tool. The computer numerical control system has a PLC controller. The PLC controller receives the error compensation components transmitted by the fog computing layer and realizes error compensation through the computer numerical control system.

[0218] Specifically, the machine layer is placed near the machine tool, close to the IoT device. Thermal error data collected by displacement sensors and laser interferometers is transmitted and stored. Several Raspberry Pis with A / D converters are used to convert analog voltage signals into thermal error data. The collected data is then transmitted to the edge layer via a gateway. Unlike existing technologies, this embodiment adds a machine layer to achieve data collection and verification. The GPIO pins of the Raspberry Pi are directly connected to sensors or other hardware modules for data verification. That is, the Raspberry Pi is used to diagnose and determine the validity of the data, as data validity is crucial for accurate prediction. If outliers exist, the Raspberry Pi will not transmit them to the edge layer, improving the fault tolerance of the designed system and enabling analysis of the causes of outliers using the stored outlier data. The machine layer is considered an extreme edge layer for improving system reliability and fault tolerance. Traditional IoT architectures lack a machine layer, neglecting data verification checks, resulting in weak fault tolerance. Furthermore, in existing technologies, problematic data is used for thermal error prediction because it is not verified, reducing the prediction accuracy of traditional systems. Therefore, a significant improvement of this embodiment compared to existing technologies is the use of Raspberry Pi to implement data validity checks. The compensation components transmitted by the fog computing layer are used to determine the compensation axis based on the directions of these components. Furthermore, the PLC receives these compensation components, and then the computer numerical control (CNC) system reads the compensation components stored in the PLC.

[0219] 3.2 Edge Layer

[0220] The edge layer includes a micro data center and a central processing unit. The micro data center embeds a thermal error prediction model and receives thermal error data transmitted from the machine layer and uses the thermal error prediction model to predict thermal errors. The predicted thermal errors are transmitted to the thermal error model of the fog computing layer. The central processing unit interacts with the cloud computing layer to trigger the update and retraining of the thermal error prediction model.

[0221] On one hand, the goal of the edge layer is to control transmission congestion in the Industrial Internet. The edge layer uses micro data centers to filter and reduce noise; these micro data centers have some computing power and are close to IoT devices. A thermal error prediction model (ICryStAl-SA-Bi-MGU) is used to predict thermal errors and is embedded in these micro data centers. These micro data centers also act as gates, minimizing traffic and filtering noise, thereby improving the response speed of the machine tool thermal error control system (intelligent error control system). On the other hand, the error control process is executed at the edge layer because it can interact with the machine tool (in this embodiment, a gear hobbing machine) in real time. Thermal error prediction is placed in the edge layer. The edge layer then uses the ICryStAl-SA-Bi-MGU network model to perform thermal error prediction. An update time is set according to the machining cycle time: if the system service time is shorter than a threshold, a compensation value is obtained, and the machine layer receives the compensation value for execution; if the system service time is longer than the threshold, the ICryStAl-SA-Bi-MGU network error model is retrained through interaction between the central processing unit and the cloud computing layer. In this embodiment, the interaction method between the central processing unit and the cloud computing layer is as follows: determine whether the service time of the thermal error prediction model in the edge layer has exceeded the set threshold; if yes, update the parameters of the thermal error prediction model; if no, continue to perform thermal error prediction with the current thermal error prediction model.

[0222] 3.3 Fog Calculation Layer

[0223] The fog computing layer includes fog nodes that correspond one-to-one with the machine tool. The fog nodes receive real thermal error data transmitted from the edge layer for error mapping. The error mapping results, the predicted B-axis thermal error, and the X-axis and Z-axis thermal errors obtained from the cloud computing layer are input into the thermal error model for error decoupling and to obtain error compensation components. The error compensation components are then transmitted to the error compensation system of the machine layer.

[0224] On the one hand, in this embodiment, one machine tool corresponds to one fog node, which is used for error mapping and error decoupling. On the other hand, for manufacturing companies that do not use a fog computing layer, sending all collected data to the cloud computing layer via the Industrial Internet raises privacy and security concerns. However, for manufacturing companies using a fog computing layer, data is sent and returned from the local area network (LAN) through a gateway. The LAN isolates itself from the core network, thus restricting external users' access to the data and ensuring the data privacy and security of the manufacturing enterprise. Furthermore, the manufacturing enterprise has multiple machine tools and configures a corresponding number of fog nodes for error mapping and decoupling. When one or more fog nodes fail, the machine tool corresponding to the failed fog node can be used to connect to other fog nodes. This ensures connectivity from each machine tool to any fog node. In other words, connectivity between multiple machine tools is achieved, thereby guaranteeing the reliability of the proposed system.

[0225] 3.4 Cloud Computing Layer

[0226] The cloud computing layer includes a thermal behavior simulation module and a model training module. The thermal behavior simulation module is used to analyze the thermal behavior of the machine tool to obtain the thermal errors of the X-axis and Z-axis, and transmits the obtained thermal errors of the X-axis and Z-axis to the thermal error model. The model training module trains the thermal error prediction model based on historical thermal error data and updates the parameters of the thermal error prediction model of the edge layer through communication with the central processing unit.

[0227] The amount of historical data transmitted from the edge layer is substantial. Thermal analysis also requires powerful computing capabilities. The cloud computing layer possesses abundant computing resources, powerful storage capacity, and robust computing power. Retraining the ICryStAl-SA-Bi-MGU model is placed in the cloud computing layer, with updates to the ICryStAl-SA-MGU model in the edge layer achieved through interaction between the central processing unit and the cloud computing layer. In other words, the cloud computing layer is used for both model training and updates. Furthermore, thermal analysis along the X and Z axes is also performed in the cloud computing layer. Although cloud servers have the capability to perform thermal error prediction, error mapping, and error decoupling, they are typically located far from the machine tool, making it impossible to process thermal error data in real time, provide real-time services, and generally lack powerful parallel computing capabilities.

[0228] The model training module includes a database and a server. The database stores hot error data transmitted from the edge layer, while the server is used for training and updating the hot error prediction model. The hot error prediction model employs a combination of augmentation updates and global updates. After a set number of incremental updates to the hot error prediction model, a full update is performed within a time window with a small amount of data. The server uses either Spark or TensorFlow. To save costs, this embodiment uses a TensorFlow server. The TensorFlow server ensures that retrained and updated models can be quickly deployed. The hot error data that the model relies on is sent to the TensorFlow server in REST / GRPC format. The TensorFlow server returns the prediction results of the ICryStAl-SA-Bi-MGU model, completely decoupling the ICryStAl-SA-Bi-MGU model from the online service, making the maintenance of the proposed model more convenient. The TensorFlow server supports hot updates; when the model is updated, it is moved to a directory specified by the TensorFlow server, and then the TensorFlow server automatically updates without restarting, allowing the model to be updated in real time. In this embodiment, the ICryStAl-SA-Bi-MGU model is trained using Python TensorFlow, and then copied to a directory specified on the TensorFlow server. Finally, using hot error data as input, the retraining and updating of the hot error model are performed on the cloud computing layer.

[0229] To ensure prediction accuracy, a full update of the ICryStAl-SA-Bi-MGU model is used, which involves retraining and updating using all training samples within a specific time period. Outdated models are replaced by newly trained models. However, a full update requires a large number of training samples and is time-consuming. Therefore, full updates are typically performed on offline big data platforms such as Spark and TensorFlow, resulting in significant time latency and the worst real-time performance. Incremental updates are proposed to address this real-time performance challenge. In fact, for already trained models, learning only newly added incremental samples is sufficient; this is the so-called incremental update. Incremental updates feed newly added hot error data into the proposed ICryStAl-SA-Bi-MGU model for incremental learning. The ICryStAl-SA-Bi-MGU model uses stochastic gradient descent (SGD) and its variants for learning. Learning incremental samples is equivalent to continuously inputting incremental samples into SGD based on the original samples. Therefore, this embodiment combines incremental and global updates. After several rounds of incremental updates, a full update is performed within a time window with a small amount of data to correct the accumulated errors generated during the incremental update process. Then a trade-off is made between real-time performance and global optimization.

[0230] 4. Experimental Research and Verification

[0231] 4.1 B-axis thermal error measurement and modeling

[0232] 4.1.1 Measurement Principle

[0233] The axial preload applied to the bearing is F a =800N, thermal error was measured using five displacement sensors, such as Figure 7 As shown in Table 1, the capacitive displacement sensor is a C8-2.0 probe with a diameter of 8 mm, manufactured by Lion Precision Industries, Inc., USA. Its measurement range is 250 μm, and its linearity is ±0.15% FSO. Two different operating conditions were set to verify the theoretical thermal error modeling method.

[0234] Table 1 Working Conditions

[0235]

[0236] Displacement sensors S1 and S3 are used to measure and collect thermal yaw data, while displacement sensors S2 and S4 are used to measure and collect thermal pitch data. They are represented as follows:

[0237]

[0238]

[0239] Where, γy Indicates thermal yaw; γ x ΔX2, ΔX4, ΔY1, and ΔY3 represent thermal pitch; ΔH = 100 mm.

[0240] 4.1.2 Parameter Settings and Modeling Results

[0241] MAE is used as the loss function, and the Adam algorithm is chosen as the optimizer. Figure 8 As shown. Thermal error data is matched with different batch sizes. The best convergence performance and least loss are achieved when the batch size is 128, as shown below. Figure 9 As shown.

[0242] The thermal error prediction model is built based on the ICryStAl SA Bi-MGU network. Bi-MGU, RNN, and MGU network models were also trained, but the hyperparameters of these three models were randomly generated. For ICryStAl, the upper and lower bounds for batch size were [1*128, 4*128], the number of crystal populations was 3, the maximum number of iterations was 3, and the dimension of the optimized parameters was 1. The predictive performance of the ICryStAl-AttentionBi-MGU model was more important than its fitting performance. Even under different operating conditions, the implicit relationship of thermal errors remained roughly the same. Therefore, to test robustness and generalization ability, thermal error data under operating condition #2 was extracted at a ratio of 1:50 to simulate insufficient data collection in actual production, and then the extracted data was used to train the thermal error prediction model. Figure 10 The prediction results of the ICryStAl-SA-Bi-MGU model are shown. The prediction performance of BP, RNN, MGU, and Bi-MGU models decreased significantly. The prediction performance of the ICryStAl-Bi-MGU network model was slightly lower than its fitting performance, indicating that the attention mechanism enhanced memory capacity and improved the fitting effect. This further shows that memory capacity is an important factor affecting the prediction accuracy of thermal error prediction models. The severe bias of the MGU network indicates that MGU cannot use future information. The relatively simple BP network has the worst fitting performance, indicating that memory capacity is important in time series data prediction.

[0243] The prediction accuracies of the BP, RNN, MGU, Bi-MGU, CryStAl-Bi-MGU, ICryStAl-Bi-MGU, and ICryStAl-SA-Bi-MGU network models were 45.97%, 82.19%, 74.49%, 88.84%, 96.79%, 92.51%, and 97.95%, respectively. The results listed in Table 2 show that the ICryStAl-SA-Bi-MGU network model has the best prediction performance among the aforementioned models, followed by the ICryStAl-Bi-MGU network model. This indicates that the attention mechanism can enhance memory ability. The prediction accuracy of ICryStAl-Bi-MGU is almost the same as that of CryStAl-Bi-MGU, but the former has a significantly shorter training time. That is, ICryStAl's optimization efficiency is higher than that of CryStAl. Compared with ICryStAl-Bi-MGU, the Bi-MGU network model has a worse prediction performance. MGU cannot utilize future information, and the BP model exhibits the worst predictive performance, highlighting the importance of memory capabilities. Compared to the training time of the ICryStAl-SA-Bi-MGU model, the execution speed of BP, RNB, MGU, and Bi-MMU models is significantly slower than that of ICryStAl-Bi-MGU and ICryStAl-SA-Bi-MGU models because their hyperparameters are randomly generated. BP and RNN models take less time than MGU and Bi-MGU models because their structures are simpler than those of MGU models. The Bi-MGU model takes longer than the MGU model due to its two-layer MGU structure.

[0244] Table 2 Model Prediction Performance

[0245]

[0246] 4.2 Thermal Error Modeling of X-axis and Z-axis

[0247] The gear hobbing machine assembly was meshed using a hexagonal-dominant hexahedral method. The thermal analysis model has a total of 421,542 elements and 840,392 nodes. The ambient temperature was set to 20°C, and the heat generation rate and heat dissipation boundary conditions were calculated. The calculated heat generation rate and heat dissipation boundary conditions were applied to the thermal analysis model. Then, a numerical simulation of the temperature field of the machine assembly was performed. Figure 11 (a) shows the thermal field along the X-axis. The overall temperature distribution is uneven. The machine tool section has the lowest temperature, close to ambient temperature. Figure 11 (b) shows the temperatures of T1, T2, T3, T4 and T5 extracted from the thermal analysis model to calculate the thermal errors of ΔL1, ΔL2, ΔL3, ΔH4 and ΔH5.

[0248] 4.3 Verification of Machine Tool Thermal Error Control System

[0249] 4.3.1 Thermal Error Control

[0250] Based on the mapping relationship shown above in this embodiment, the thermal error (including δ) X δ Y δ Z ε B and ε C )according to Figure 12 Mapped to an equivalent virtual drive axis, and δ obtained through thermal error. X and ε″ C The equivalent error is then calculated. The compensation value is then sent to the programmable logic controller (PLC). The PLC receives the compensation value, and then the compensation values ​​of the equivalent virtual drive axes C' and X' are superimposed on the machining program, that is, the machining accuracy is corrected through error compensation.

[0251] like Figure 13 As shown, gear hobbing experiments were conducted with and without an intelligent error control system. Thermal error was then considered in the thermal error control model. The thermal error corresponding to the machining position was obtained by interpolating the thermal error curve. When the Z-axis feed reached the midpoint of the tooth width, the axial position was approximately 362 mm. Then, 36 equal position angles were taken, i.e., thermal error compensation was performed every 10 degrees.

[0252] After the gear hobbing process is completed, the machined gear is placed in a measuring chamber for more than 12 hours, and the geometric accuracy of the tooth surface is tested using a 3096 gear measuring center. As shown in Table 3, the average total deviation F of the machined gear can be obtained with and without the implementation of the intelligent error control system. α Average total spiral deviation F β Maximum cumulative total pitch deviation F p and maximum single pitch deviation f pt Without implementing an intelligent error control system, the total deviation F of the right tooth surface α The average value is 14.1 μm, with an accuracy class of 7. With the implementation of the intelligent error control system, the total deviation F of the right tooth surface... α The average value decreased to 13.9 μm. The results show that the tooth surface deviation decreased slightly while the accuracy level remained unchanged. Without the implementation of an intelligent error control system, the total helix deviation F... β The average value is 22.3 μm, with an accuracy class of 8. The maximum spiral deviation is 39.8 μm, with an accuracy class of 10. With the implementation of the intelligent error control system, the maximum spiral deviation is 13.4 μm, and the accuracy class improves from 10 to 7. Without the implementation of the intelligent error control system, the maximum cumulative total pitch deviation F pThe accuracy is 22.0 μm, with an accuracy class of 6. With the implementation of the intelligent error control system, the maximum cumulative total pitch deviation F... p The accuracy is 10.9 μm, and the precision level has been improved from 6 to 4.

[0253] Table 3 Geometric accuracy of machined gears

[0254]

[0255] 4.3.2 System Efficiency

[0256] To verify the effectiveness of the proposed intelligent error control system, four frameworks were defined: MEFC, Machine Edge Cloud (MEC), Machine Fog Cloud (MFC), and Machine Cloud (MC). The main idea was to reduce the overall execution time. The sampling frequency for hot error data was set to 0.01 Hz. The total amount of data collected over three months was 29.6 GB. The machine layer was designed for data collection and validation; anomalous data was not sent to the edge layer. Tasks for missing layers in the MEC, MFC, and MC frameworks were assigned to adjacent layers to ensure fairness in comparisons, as shown in Table 4. Specifically, for the MEC framework, prediction tasks, along with error mapping and decoupling, were assigned to the edge layer. For the MFC framework, prediction, error mapping, and decoupling tasks were assigned to the fog computing layer. For the MC framework, prediction, error mapping, and decoupling tasks were assigned to the cloud computing layer.

[0257] Table 4 Task Assignments for Different Frameworks

[0258]

[0259] When using ICryStAl-SA-Bi-MGU as the error prediction model, as shown in Table 5, the execution time and efficiency of the intelligent error control system under different system frameworks were calculated. For intelligent error control systems with MEFC, MEC, MFC, and MC frameworks, the execution times were 164s, 216.3s, 195.7s, and 389s, respectively. The proposed intelligent error control system with the MEFC framework consumed the least time, thus verifying its rationality. For the intelligent error control system with the MEFC framework, the time spent on the data transmission machine layer, edge layer, fog computing layer, and cloud computing layer were 41s, 26s, 23s, 31s, and 43s, respectively. The edge layer is close to the gear hobbing machine, and error prediction is then performed at the edge layer. The error mapping and decoupling algorithm proposed in Section 4 is embedded in the fog computing layer. Error prediction does not require powerful computing resources or computing power. The FPGA Cylone II EP2C5T144C8N on the fog computing layer has sufficient computing power to meet the computational requirements. Furthermore, due to its efficient parallel computing capabilities, the FPGA exhibits excellent execution efficiency when processing ICryStAl-SA-Bi-MGU. Since the propagation and computation of neural networks, as well as finite element simulation, require substantial computing resources and powerful computing capabilities, the retraining and updating of ICryStAl-SA-Bi-MGU, as well as the thermal analysis of the X and Z axes, are implemented on the cloud computing layer. The HP Z240 Tower workstation on the cloud computing layer possesses powerful computing capabilities to meet these requirements. For the intelligent error control system with the MEC framework, the time spent on data transmission at the machine layer, edge layer, fog computing layer, and cloud computing layer are 36.3s, 26s, 111s, 0, and 43s, respectively. Compared to the MEFC framework, the MEC framework eliminates the fog computing layer. Error mapping and decoupling that should be performed in the fog computing layer are distributed to the edge computing layer. The data transmission time is reduced from 41 seconds to 36.3 seconds, and the fog computing layer time is zero. However, the time spent at the edge layer increases from 23 seconds to 111 seconds. The significant increase in time spent at the edge layer is due to the integration of tasks such as error mapping and decoupling, thermal error prediction, and trigger judgment. The edge layer has limited parallel computing capabilities, while the FPGA Cylone II EP2C5T144C8N in the fog computing layer has strong parallel computing capabilities. For an intelligent error control system with an MFC framework, the data transmission times at the machine layer, edge layer, fog computing layer, and cloud computing layer are 31.7 seconds, 26 seconds, 0 seconds, 95 seconds, and 43 seconds, respectively. Compared to the MEFC framework, the edge layer is eliminated. To ensure control effectiveness and execution efficiency, tasks such as error prediction, which should be performed at the edge layer, are assigned to the fog computing layer. The data transmission time is reduced from 41 seconds to 31.7 seconds, and the edge layer time is zero.Furthermore, the increased workload of the fog computing layer led to an increase in runtime from 31 seconds to 95 seconds. For the MC framework, the times spent on data transmission at the machine layer, edge layer, fog computing layer, and cloud computing layer were 135 seconds, 26 seconds, 0 seconds, 0 seconds, and 228 seconds, respectively. Compared to the MEFC framework, the edge layer and fog computing layer were removed. To ensure control effectiveness and execution efficiency, tasks such as error mapping and decoupling, thermal error prediction, and trigger judgment were assigned to the cloud computing layer. This means that the collected thermal error data is transmitted to the cloud computing layer. Therefore, the time spent on data transmission increased from 41 seconds to 135 seconds. The limited bandwidth of the Industrial Internet led to a significant increase in data transmission time, even though the time spent at the edge layer and fog computing layer was zero. The time spent on data transmission and the cloud computing layer increased significantly. In addition, the increased workload of the cloud computing layer led to an increase in runtime from 43 seconds to 228 seconds. For the proposed intelligent error control system using the MEFC framework, the total execution time was 75.82%, 83.8%, and 42.16% of the execution time of intelligent error control systems using the MEC, MFC, and MC frameworks, respectively. Therefore, the intelligent error control system designed using the MEFC framework is reasonable. The functions and tasks of each layer of the intelligent error control system are rationally divided, ensuring its execution efficiency. Although the data transmission time of the intelligent error control system using the MEFC framework is longer than that using the MEC and MFC frameworks, the total execution time of the intelligent error control system designed with the MEFC architecture is shorter than that using the MEC or MFC architectures. That is, using the MEC and MFC frameworks to assign the tasks of missing layers to adjacent layers of the intelligent error control system leads to a significant increase in the computation time of adjacent layers. Therefore, the overall system execution time increases significantly. The compensation period is set to five minutes to meet the error compensation requirements. That is, the total execution time of the intelligent error control system should be less than five minutes. The total execution time of the intelligent error control system with MEFC, MEC, and MFC frameworks is less than five minutes. Furthermore, the total execution time of the intelligent error control system with the MEFC framework is shorter than that with the MEC and MFC frameworks. The total execution time of the intelligent error control system with the MC framework is longer than the compensation period. Therefore, the intelligent error control system designed using the MEFC framework is reasonable.

[0260] Table 5 Execution Time and Efficiency of Different System Frameworks

[0261]

[0262] The connection between the machine layer and the edge layer is implemented via Ethernet, with a transmission speed of 12.5 Mb / s. However, for the intelligent error control system with the MC framework, the transmission speed drops from 12.5 Mb / s to 2.5 Mb / s due to the longer distance between the machine layer and the cloud computing layer. The transmission speeds of the edge layer and the fog computing layer are 125 Mb / s and 250 Mb / s, respectively. Table 6 lists the amount of data transmitted at different layers. For the intelligent error control system with the MC framework, the total time spent on data transmission is 137 s, and the total amount of data transmitted is 337.5 Mb. For the intelligent error control system with the MEFC framework, the total time spent on data transmission is 41 s, and the amount of data transmitted is 2675 Mb. The transmission time from the machine layer to the edge layer is 27 s, from the edge layer to the fog computing layer is 9.3 s, and from the fog computing layer to the cloud computing layer is 4.7 s. For the intelligent error control system using the MEC framework, the total data transmission time is 36.3 seconds, and the total data volume transmitted is 1500Mb. The transmission time from the machine layer to the edge layer is 27 seconds, and the transmission time from the edge layer to the cloud computing layer is 9.3 seconds. For the intelligent error control system with the MFC framework, the total data transmission time is 31.7 seconds, and the total data volume transmitted is 1512.5Mb. The transmission time from the machine layer to the fog computing layer is 27 seconds, and the transmission time from the fog computing layer to the cloud computing layer is 4.7 seconds. Furthermore, the data transmission time of the intelligent error control system with both MEC and MFC frameworks is shorter than that of the intelligent error control system with the MEFC framework. The fewer computing layers, the shorter the data transmission time. More importantly, the total data volume transmitted by the intelligent error control system using both MEC and MFC frameworks is less than that of the intelligent error control system using the MEFC framework.

[0263] Table 6 Data transmitted at different layers

[0264]

[0265]

[0266] 5. Conclusion

[0267] To achieve thermal error control, an ICryStAl-SA-Bi-MGU model was proposed for the B-axis to predict thermal errors. A thermal analysis model was established to obtain the thermal errors of the X and Z axes. Then, the mathematical relationship between the hob spatial pose error and the thermal error was established, and the spatial configuration error was mapped to the tooth surface error. An intelligent error control system was designed and constructed using a machine layer, edge layer, fog computing layer, and cloud computing layer. The intelligent error control system was implemented using the MEFC framework to achieve thermal error control and reduce tooth surface error. The following conclusions were drawn:

[0268] (1) An intelligent error control system was constructed for thermal error compensation of the gear hobbing machine, and then the layer functions were rationally divided. The constructed intelligent error control system can reduce the tooth surface error of the machined gears. With the implementation of the intelligent error control system, the accuracy levels of gear helix deviation, maximum single pitch deviation, and cumulative total pitch deviation were improved by 1, 1, and 2, respectively. In addition, the intelligent error control system with the MEFC framework has strong real-time performance. Compared with the MEC, MFC, and MC frameworks, the intelligent error control system with the MEFC framework is more efficient.

[0269] (2) The ICryStAl-SA-Bi-MGU model exhibits strong robustness and excellent predictive performance. The application of ICryStAl in the hyperparameter optimization of the Bi-MGU model is effective. The fitting and predictive performance of the ICryStAl-SA-Bi-MGU model is significantly better than that of the Bi-MGU model. The proposed ICryStAl-SA-Bi-MGU model has a much higher running efficiency than CryStAlBi-MGU. The prediction accuracies of ICryStAl-SA-Bi-MGU, ICryStAl-Bi-MGU, CryStAl-Bi-MGU, Bi-MGU, MGU, RNN, and BP models are 97.97%, 92.15%, 92.64%, 88.84%, 74.46%, 82.19%, and 45.97%, respectively.

[0270] (3) A symmetrical thermal error compensation method for gear hobbing machines was proposed. The relationship between the spatial orientation of the hob and the thermal error of the gear hobbing machine was established. Homogeneous coordinate transformation models for position-independent and position-dependent errors were derived. Based on the transmission relationship of the kinematic chain, a thermal error model for the machine tool was established. First, the thermal error was mapped to the equivalent errors of the six motion axes; then, by mapping the equivalent errors of the six motion axes to the equivalent virtual axes C” and X”, a thermal error control model for the gear hobbing machine was established.

[0271] The embodiments described above are merely preferred embodiments for fully illustrating the present invention, and the scope of protection of the present invention is not limited thereto. Equivalent substitutions or modifications made by those skilled in the art based on the present invention are all within the scope of protection of the present invention. The scope of protection of the present invention is defined by the claims.

Claims

1. A method for constructing a thermal error prediction model, characterized in that: The method comprises the following steps: Step one: input thermal error data, and convert time series into supervised learning; Step two: initialize the position of the crystal by using a chaotic tent map, and determine whether the position of the crystal satisfies < lb or > ub: if yes, keep the current position of the crystal; if no, set the boundary as the position of the crystal; Step three: encode the position of the crystal into the batch size of the Bi-MGU neural network; Step four: train the Bi-MGU neural network with the thermal error data, combine the self-attention mechanism to allocate the Bi-MGU neural network weight, and calculate the loss function value of the Bi-MGU neural network; Step five: determine whether the loss function value is less than the set threshold: if yes, execute step nine; if no, execute step six; Step six: update the position of the crystal by using an optimization strategy combined with a Gaussian disturbance mechanism, and calculate the fitness value of the crystal; Step seven: determine whether the fitness value of the current crystal is less than the optimal fitness value: if yes, update the position of the crystal, and take the fitness value of the current crystal as the optimal fitness value; if no, do not update the position of the crystal; Step eight: determine whether the iteration number is equal to the maximum iteration number: if yes, execute step nine; if no, execute step three; Step nine: obtain the best hyperparameter, and build a thermal error prediction model. 2.The thermal error prediction model construction method of claim 1, wherein: In the step two, the method for initializing the position of the crystal is: wherein, represents the initial position of the crystal; and are random numbers; represents the population size; . 3.The thermal error prediction model construction method of claim 1, wherein: In the step four, the principle of the attention mechanism is: wherein, denotes an attention mechanism; Q, K and V denote query matrix, key matrix and value matrix, respectively, and Q, K and V are in vector form, , , ; denotes a matrix transposition operation; plays a regulating role so that the inner product of Q and K is not too large; denotes a softmax function; and: wherein, represents an input matrix; W Q , W K and W V represent projection matrices for queries, keys and values, respectively. 4.The thermal error prediction model construction method of claim 1, wherein: In the step six, the optimization strategy is: wherein, represents the position of a new crystal; represents the position of a crystal in the past; represents all crystals in a corner; represents a crystal that currently has the best structure; , and all represent random numbers.

5. The thermal error prediction model building method according to claim 4, characterized in that: The principle of the position update combined with the Gaussian disturbance mechanism is: wherein, represents the new crystal position obtained from the Gaussian perturbation at the iteration; represents the position of the new crystal at the iteration; represents the perturbation factor; represents the Gaussian standard normal distribution; represents the past position of the crystal at the iteration; represents the MAE at the current crystal position. 6.The thermal error prediction model construction method of claim 4, wherein: The random number , and is converted into the non-linear parameter R, expressed as: wherein, represents a random number; and respectively represent the maximum number of iterations and the current number of iterations; , , and all represent coefficients.

7. A method of representing a thermal error model of a machine tool, characterized by: The comprehensive spatial error between the tool and the workpiece is represented as: wherein, represents a combined spatial error matrix between the tool and the workpiece; represents an ideal homogeneous coordinate transformation matrix between the tool and the workpiece; represents an actual homogeneous coordinate transformation matrix between the tool and the workpiece; , and represent the positional error between the tool and the workpiece in the X, Y and Z directions, respectively; , and represent the angular error between the tool and the workpiece in the X, Y and Z directions, respectively. And: wherein, denotes the ideal homogeneous coordinate transformation matrix between and denotes the actual homogeneous coordinate transformation matrix between ; subscript 0 denotes the bed; subscript 1 denotes the C-axis; subscript 2 denotes the workpiece; subscript 3 denotes the X-axis; subscript 4 denotes the Z-axis; subscript 5 denotes the A-axis; subscript 6 denotes the Y-axis; subscript 7 denotes the B-axis; and subscript 8 denotes the tool; denotes the thermal error matrix for the X-axis; denotes the thermal error matrix for the Z-axis; denotes the thermal error matrix for the B-axis; and: wherein represents the angular error of the B-axis in the X-axis direction; represents the position error of the B-axis in the Y-axis direction; represents the angular error of the B-axis in the Z-axis direction; including , and the thermal error of the B-axis is predicted by a thermal error prediction model constructed by the method according to any one of claims 1-6. wherein represents the error propagation matrix resulting from represents the error propagation matrix resulting from represents the error propagation matrix resulting from represents the angular error of the X-axis in the Y-direction; represents the angular error of the X-axis in the Z-direction; represents the positional error of the X-axis in the X-direction; represents the length of the surface of the bed above the column below the bed in the X-direction; L ; represents the total thermal expansion of the surface of the bed above in the X-direction; represents the maximum thermal deformation of the surface of the bed above;​​​ wherein, denotes the error propagation matrix resulting from denotes the error propagation matrix resulting from denotes the error propagation matrix resulting from denotes the error propagation matrix resulting from denotes the error propagation matrix resulting from denotes the error propagation matrix resulting from denotes the angle error of the Z-axis in the Y-direction; denotes the position error of the Z-axis in the Z-direction; denotes the angle error of the Z-axis in the X-direction; denotes the sum of the initial length of the inside of the lower column of the holder and the initial length of the inside of the lower column of the support plate; denotes the sum of the thermal deformation of the inside of the lower column of the holder and the thermal deformation of the inside of the lower column of the support plate; denotes the maximum thermal deformation of the inside surface of the column.

8. A machine tool thermal error control system, characterized by: The system comprises a machine layer, an edge layer, a fog computing layer and a cloud computing layer. The machine layer comprises a data acquisition system and an error compensation system, the data acquisition system comprises a data acquisition card, a Raspberry Pi with an A / D converter and a gateway; the data acquisition card is used for acquiring voltage analog signals, the A / D converter is used for converting the voltage analog signals into thermal error data, the Raspberry Pi is used for verifying the validity of the thermal error data and transmitting the valid thermal error data to the edge layer through the gateway, and the error compensation system comprises a computer numerical control system arranged in a machine tool, wherein a PLC controller is arranged in the computer numerical control system, the PLC controller receives an error compensation component transmitted by the fog computing layer, and realizes error compensation through the computer numerical control system; The edge layer comprises a micro data center and a central processor, the micro data center is embedded with a post-thermal error prediction model, the micro data center receives the thermal error data transmitted by the machine layer and predicts the thermal error by using the post-thermal error prediction model, and the predicted thermal error is transmitted to a thermal error model of the fog computing layer; The central processor interacts with the cloud computing layer to trigger the update and retraining of the thermal error prediction model. The fog computing layer comprises fog nodes corresponding to machine tools one by one, the fog nodes receive the real thermal error data transmitted by the edge layer to perform error mapping, input the error mapping result, the predicted B-axis thermal error and the thermal errors of X-axis and Z-axis obtained by the cloud computing layer into a thermal error model to perform error decoupling and obtain an error compensation component, and transmit the error compensation component to an error compensation system of the machine layer; The cloud computing layer comprises a thermal behavior simulation module and a model training module, the thermal behavior simulation module is used to analyze the thermal behavior of the machine tool to obtain thermal errors of X-axis and Z-axis, and transmit the obtained thermal errors of X-axis and Z-axis to the thermal error model; The model training module trains the thermal error prediction model according to historical thermal error data and updates parameters of the thermal error prediction model of the edge layer through the central processor; The thermal error model adopts the machine tool thermal error model of claim 7.

9. A machine tool thermal error control system according to claim 8, characterised in that: The model training module comprises a database and a server, the database is used to store the thermal error data transmitted by the edge layer, and the server is used to train and update the thermal error prediction model; the thermal error prediction model adopts a combination of enhanced updating and global updating, after a set number of incremental updates of the thermal error prediction model, a complete update is performed in a time window with a small amount of data.

10. The machine tool thermal error control system of claim 8, wherein: The interaction method between the central processor and the cloud computing layer is: judging whether the service time of the thermal error prediction model in the edge layer exceeds a set threshold value: if yes, updating the parameters of the thermal error prediction model; if no, continuing to perform thermal error prediction with the current thermal error prediction model.

Citation Information

Patent Citations

  • Cascade protocol for iswap gate in a two-qubit system

    CA3095106A1

  • Image encryption method based on adjacent pixel Joseph transform and Mealy state machine

    CN112769545A