A thermal error modeling method and device based on a thermal resistance network, a computer device and a method

By using a thermal resistance network-based method, CNC machine tool components are disassembled and a comprehensive thermal error model is constructed. Combined with a long short-term memory neural network, the generalization and computational efficiency problems of thermal error prediction for five-axis CNC machine tools are solved, achieving real-time and accurate thermal error prediction and simplified modeling.

CN122133270APending Publication Date: 2026-06-02INST OF ENGINEERING THERMOPHYSICS - CHINESE ACAD OF SCI

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
INST OF ENGINEERING THERMOPHYSICS - CHINESE ACAD OF SCI
Filing Date
2026-01-27
Publication Date
2026-06-02

Smart Images

  • Figure CN122133270A_ABST
    Figure CN122133270A_ABST
Patent Text Reader

Abstract

This invention provides a thermal error modeling method, apparatus, computer equipment, and method based on thermal resistance networks, comprising: disassembling a CNC machine tool into multiple components according to its structure, establishing a thermal resistance-thermal capacity network model for each component, and outputting real-time temperature values; determining the thermal and geometric error terms requiring thermoelastic analysis from key temperature measurement points using a comprehensive thermal error model; constructing a mapping from the temperature field to the deformation field based on the real-time temperature values ​​of all thermal and geometric error terms using a thermoelastic method, generating real-time deformation values ​​for the thermal and geometric error terms, and outputting thermal deformation differential equations; constructing a physical consistency loss function using the thermal deformation differential equations as physical constraints, and generating an optimized long short-term memory neural network; and generating a physical-data fusion thermal error prediction model after training. By capturing the time-delay characteristics of thermal errors and adding physical constraints to the neural network, the robustness and interpretability of the thermal error prediction model are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of technology, and specifically to a thermal error modeling method, apparatus, computer equipment, and method based on thermal resistance networks. Background Technology

[0002] Five-axis CNC machine tools generate a highly nonlinear, time-varying three-dimensional temperature field under the coupling of multiple heat sources: frictional heat from the servo motors of the rotary axes, direct-drive torque motors, high-speed electric spindles, linear guides and lead screw nut pairs, shear heat in the cutting zone, coolant temperature rise, and diurnal fluctuations in ambient temperature, all superimposed through conduction, convection, and radiation, resulting in a complex temperature distribution and gradient in the machine tool. The intensity of heat sources changes instantaneously with operating conditions, and the temperature rise response lags, leading to an extremely non-uniform spatiotemporal distribution of the temperature field. The thermal deformation induced by the complex temperature field manifests in various components as multimodal coupling such as angular displacement of rotary axis bearing seats, bending of the crossbeam, forward tilting of the column, and twisting of the bed; amplified step by step through the serial kinematic chains of the rotary axes, the parallel kinematic chains of the linear axes, and the tool-workpiece cantilever structure, it ultimately synthesizes a thermal error vector at the tool tip, accounting for 40%–70% of the overall machining error, becoming the primary bottleneck for maintaining the accuracy of precision five-axis machining.

[0003] Thermal errors exhibit strong nonlinearity, significant time delay, and time-varying characteristics. Traditional methods based on empirical models or purely data-driven models suffer from the following drawbacks: 1. Poor generalization ability: Traditional empirical models such as multinomial regression and least squares are difficult to adapt to different machine tools and working conditions, resulting in poor model transferability; 2. Insufficient capture of time delay: Pure data-driven models such as standard LSTM can capture time series features, but lack physical interpretability, rely on a large amount of data for training, and are prone to overfitting; 3. Low computational efficiency of temperature fields: Although traditional finite element methods (FEM) have high accuracy, they involve large computational loads and poor real-time performance, making them difficult to use for online compensation; 4. Complex modeling of overall machine deformation: Thermal-structural coupling simulation requires a large amount of computational resources, making it difficult to deploy in industrial settings.

[0004] Therefore, there is an urgent need for a new method for predicting and compensating thermal errors that combines physical interpretability, data adaptability, and computational efficiency. Summary of the Invention

[0005] In view of this, embodiments of the present invention provide a thermal error modeling method based on thermal resistance networks to solve the technical problems of traditional models in the prior art, such as poor generalization and weak robustness in predicting strongly nonlinear and large time-delay thermal errors, slow temperature field calculation and difficulty in real-time online application, and complex and computationally intensive modeling of whole-machine thermal deformation. The method includes: Based on the structure of the CNC machine tool, the CNC machine tool is disassembled into multiple components, and a thermal resistance-thermal capacity network model is established for each component. The thermal resistance-thermal capacity network model is solved in real time using the lumped circuit analysis method, and the real-time temperature values ​​of the CNC machine tool at multiple key temperature measurement points are output. A comprehensive thermal error model is constructed. Based on the comprehensive thermal error model, thermal and geometric error terms that need to be analyzed by thermoelasticity are determined from the key temperature measurement points. Using the thermoelastic method, a mapping from the temperature field to the deformation field is constructed based on the real-time temperature values ​​of all the thermal and geometric error terms. The real-time deformation values ​​of the thermal and geometric error terms are generated. Machine tool kinematic chain analysis and coordinate transformation are performed on the real-time deformation values. The system of differential equations for the deformation of the whole machine is constructed and solved. The thermal deformation differential equation characterizing the thermal deformation of the machine tool is output. Using the thermal deformation differential equation as a physical constraint, a physical consistency loss function is constructed, and a long short-term memory neural network is constructed. The long short-term memory neural network is then optimized by improving the error accuracy and time delay feature capture capabilities to generate an optimized long short-term memory neural network. A dataset is constructed using machine tool operation data and corresponding thermal error data. Based on the physical consistency loss function, the optimized long short-term memory neural network is trained using the dataset to generate a physical-data fusion thermal error prediction model.

[0006] This invention also provides a thermal error modeling device based on thermal resistance networks to address the technical problems of traditional models in the prior art, such as poor generalization and weak robustness in predicting strongly nonlinear and large-time-delay thermal errors, slow temperature field calculation, difficulty in real-time online application, and complex and computationally intensive modeling of overall thermal deformation. The device includes: The CNC machine tool temperature field calculation module is used to disassemble the CNC machine tool into multiple components according to the structure of the CNC machine tool, establish a thermal resistance-thermal capacity network model for each component, solve the thermal resistance-thermal capacity network model in real time using the lumped circuit analysis method, and output the real-time temperature values ​​of the CNC machine tool at multiple key temperature measurement points. The CNC machine tool deformation modeling module is used to construct a comprehensive thermal error model. Through the comprehensive thermal error model, thermal and geometric error terms that need to be analyzed by thermoelasticity are determined from the key temperature measurement points. Using the thermoelastic method, based on the real-time temperature values ​​of all the thermal and geometric error terms, a mapping from the temperature field to the deformation field is constructed, and the real-time deformation values ​​of the thermal and geometric error terms are generated. The machine tool kinematic chain analysis and coordinate transformation are performed on the real-time deformation values, and a set of differential equations for the deformation of the whole machine is constructed and solved. The thermal deformation differential equations characterizing the thermal deformation of the machine tool are output. A neural network module is constructed to use the thermal deformation differential equation as a physical constraint, construct a physical consistency loss function, and construct a long short-term memory neural network. The long short-term memory neural network is optimized by the ability to capture error accuracy and time delay features, and an optimized long short-term memory neural network is generated. The thermal error prediction model construction module is used to construct a dataset using machine tool operation data and corresponding thermal error data, and to train the optimized long short-term memory neural network using the dataset based on the physical consistency loss function, thereby generating a physical-data fusion thermal error prediction model.

[0007] This invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements any of the above-mentioned thermal error modeling methods based on thermal resistance networks, in order to solve the technical problems in the prior art where traditional models have poor generalization and robustness in predicting strong nonlinear and large time-delay thermal errors, slow temperature field calculation, difficulty in real-time online application, and complex and computationally intensive whole-machine thermal deformation modeling.

[0008] This invention also provides a computer-readable storage medium storing a computer program that executes any of the above-described thermal error modeling methods based on thermal resistance networks. This addresses the technical problems in the prior art where traditional models have poor generalization and robustness in predicting strong nonlinear and large time-delay thermal errors, slow temperature field calculations, difficulty in real-time online application, and complex and computationally intensive whole-machine thermal deformation modeling.

[0009] Compared with the prior art, the beneficial effects that at least one technical solution adopted in the embodiments of this specification can achieve include at least: A physical and data-driven LSTM-PDE thermal error prediction model is proposed. By capturing the time-delay characteristics of thermal errors through a long short-term neural network, physical constraints are added to the neural network, thereby improving the robustness and interpretability of the thermal error prediction model. Attached Figure Description

[0010] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 This is a flowchart of a thermal error modeling method based on thermal resistance networks provided in an embodiment of the present invention; Figure 2 This is an overall framework diagram of the thermal error prediction model based on thermal resistance network provided in the embodiments of the present invention; Figure 3 This is a diagram of the LSTM-PDE network structure provided in an embodiment of the present invention; Figure 4 This is a flowchart of thermal network modeling provided in an embodiment of the present invention; Figure 5 This is a structural block diagram of a computer device provided in an embodiment of the present invention; Figure 6 This is a structural block diagram of a thermal error modeling device based on a thermal resistance network provided in an embodiment of the present invention. Detailed Implementation

[0012] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0013] The following specific examples illustrate the implementation of this application. Those skilled in the art can easily understand other advantages and effects of this application from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. This application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this application. It should be noted that, in the absence of conflict, the following embodiments and features in the embodiments can be combined with each other. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0014] In this embodiment of the invention, a thermal error modeling method based on thermal resistance networks is provided, such as... Figure 1 As shown, the method includes: Step S101: Based on the structure of the CNC machine tool, the CNC machine tool is disassembled into multiple components, and a thermal resistance-thermal capacity network model is established for each component. The thermal resistance-thermal capacity network model is solved in real time using the lumped circuit analysis method, and the real-time temperature values ​​of the CNC machine tool at multiple key temperature measurement points are output. Step S102: Construct a comprehensive thermal error model. Using the comprehensive thermal error model, determine the thermal and geometric error terms that need to be analyzed by thermoelasticity from the key temperature measurement points. Using the thermoelastic method, based on the real-time temperature values ​​of all the thermal and geometric error terms, construct a mapping from the temperature field to the deformation field, generate the real-time deformation values ​​of the thermal and geometric error terms, perform machine tool kinematic chain analysis and coordinate transformation on the real-time deformation values, construct and solve the whole machine deformation differential equation system, and output the thermal deformation differential equation characterizing the thermal deformation of the machine tool. Step S103: Using the thermal deformation differential equation as a physical constraint, construct a physical consistency loss function and a long short-term memory neural network. Optimize the long short-term memory neural network by improving its error accuracy and time delay feature capture capabilities to generate an optimized long short-term memory neural network. Step S104: Construct a dataset using machine tool operation data and the corresponding thermal error data, and train the optimized long short-term memory neural network using the dataset based on the physical consistency loss function to generate a physical-data fusion thermal error prediction model.

[0015] In specific implementation, the following steps are taken to disassemble the CNC machine tool into multiple components based on its structure, and to establish a thermal resistance-thermal capacity network model for each component: The CNC machine tool is disassembled into a spindle, translational axis, rotary axis and bed; the key temperature measurement points of the spindle, translational axis and rotary axis are determined respectively; the thermal resistance and heat capacity of each key temperature measurement point are calculated respectively; and a thermal resistance-heat capacity network model of each component is constructed based on the thermal resistance and heat capacity of all key temperature measurement points.

[0016] In specific implementation, the following steps are used to construct a mapping from the temperature field to the deformation field based on the real-time temperature values ​​of all the aforementioned thermal and geometric error terms using a thermoelastic method, thereby generating the real-time deformation values ​​of the thermal and geometric error terms: For each of the thermal and geometric error terms, a linear differential operator is established based on thermoelasticity theory to convert the real-time temperature value to the deformation value corresponding to the thermal and geometric error term. The real-time temperature value corresponding to the thermal and geometric error term is input into the linear differential operator corresponding to the thermal and geometric error term for calculation, and the real-time deformation value of the thermal and geometric error term is output.

[0017] In specific implementation, the following steps are used to perform machine tool kinematic chain analysis and coordinate transformation on the real-time deformation values, construct and solve the whole machine deformation differential equation system, and output the thermal deformation differential equation characterizing the thermally induced deformation of the machine tool: Establish a local coordinate system for each motion axis of the CNC machine tool; The real-time deformation value of the thermal and geometric error term is converted into coordinate components in the local coordinate system to generate the real-time error state vector of each motion axis. Based on the ideal geometric relationships of each motion axis, a homogeneous coordinate transformation chain from the workpiece coordinate system to the tool coordinate system is constructed. An actual homogeneous transformation matrix is ​​constructed using each transformation matrix in the homogeneous coordinate transformation chain and the real-time error state vector. This actual homogeneous transformation matrix characterizes the geometric deviation caused by heat along the motion axis. The actual homogeneous transformation matrix is ​​then continuously multiplied along the machine tool motion chain to obtain a total transformation matrix describing the actual relative pose of the tool and workpiece. The position error component of the tool tip is extracted from the total transformation matrix, and a system of differential equations for the overall machine thermal error is established, with time as the independent variable and the real-time temperature value of the key temperature measurement point as the variable. Solving the system of differential equations for the overall machine thermal error outputs a thermal deformation differential equation characterizing the dynamic mapping relationship between the thermal error of the tool tip and the real-time temperature value.

[0018] In specific implementation, the following steps are used to use the thermal deformation differential equation as a physical constraint, construct a physical consistency loss function, and construct a long short-term memory neural network: A loss function for the long short-term memory neural network is constructed; the thermal deformation differential equation is used as a physical constraint, and the loss function is modified by the thermal deformation differential equation to generate a physical consistency loss function for the long short-term memory neural network; the input of the long short-term memory neural network is defined as a time series matrix composed of the real-time temperature values ​​of multiple key temperature measurement points at multiple consecutive historical sampling times; the output of the long short-term memory neural network is defined as the predicted value of the thermal error of the relative position of the tool and the workpiece at a specified time; the number of neurons in the input layer is determined by the dimension of the time series matrix, the number of neurons in the output layer is determined by the dimension of the predicted thermal error value, and a long short-term memory neural network containing at least one hidden layer is initialized.

[0019] In specific implementation, the loss function for constructing the long short-term memory neural network is achieved through the following steps: The mean square error (MSE) between the predicted and actual values ​​of the thermal error in the dataset by the Long Short-Term Memory (LSTM) neural network is calculated, and this MSE is used as the data loss term. The final predicted output of the LSTM during training is substituted into the thermal deformation differential equation to calculate the norm of the difference between the values ​​on the left and right sides of the equation. This norm is used as the PDE residual term, which characterizes the degree to which the network prediction violates physical laws. A boundary condition constraint function is constructed based on the physical boundary conditions corresponding to the thermal deformation differential equation. The degree of non-satisfaction of the network prediction result with respect to the boundary condition constraint function is calculated, and this degree of non-satisfaction is used as the boundary condition penalty term. A loss function is constructed using the data loss term, the PDE residual term, and the boundary condition penalty term, where L_total = λ1×L_data + λ2×L_pde +λ3×L_bc, where L_total is the total loss, L_data is the data loss term, L_pde is the PDE residual term, L_bc is the boundary condition penalty term, and λ1, λ2, and λ3 are the non-negative weight coefficients corresponding to the data loss term, the PDE residual term, and the boundary condition penalty term, respectively.

[0020] In specific implementation, the following steps are used to optimize the long short-term memory neural network by improving its error accuracy and time delay feature capture capabilities, thereby generating an optimized long short-term memory neural network: A first evaluation metric, including the root mean square error of prediction, is constructed to measure error accuracy. A second evaluation metric, including the peak offset of the cross-correlation function between the predicted sequence and the true sequence, is constructed to quantitatively assess the ability to capture time-lag features. Within a preset range, the number of hidden layers and the number of neurons in each layer of the long short-term memory neural network are adjusted to generate multiple candidate network structures. Each candidate network structure is trained and validated using the same training dataset, and the first and second evaluation metrics corresponding to each candidate network structure are calculated respectively. Using a weighted scoring method, based on the first and second evaluation metrics, the optimal candidate network structure among all candidate network structures is obtained and used as the optimized long short-term memory neural network.

[0021] like Figure 2 As shown, in one embodiment of the present invention, it is composed of the following units: 1. A rapid calculation method for temperature field of CNC machine tools based on thermal networks.

[0022] This unit consists of the following steps: a) Machine tool structure disassembly: The machine tool is divided into structural components (bed, column, saddle, etc.) and functional components (spindle, bearing, motor, etc.); b) Thermal network modeling: A "thermal resistance-thermal capacity" network model is established for each component. The "thermal resistance-thermal capacity" network model is similar to a circuit model, with nodes being key temperature measurement points. Nodes are connected through thermal resistance and thermal capacity, and parameters are determined through calibration experiments and material properties; c) Real-time temperature field solution: The model is solved using lumped circuit analysis to achieve online updating of the temperature field.

[0023] S1. Machine tool structure disassembly: like Figure 3 As shown, the main sources of thermal error in CNC machine tools (such as thermal deformation of the spindle and translation axis) are analyzed. Based on kinematic analysis, the machine tool is simplified into a simplified structure of components that are the main sources of thermal error, which are combined according to the kinematic chain (to obtain the structure that needs to be modeled for thermal network).

[0024] S2, Thermal Network Modeling: The "thermal resistance-heat capacity" network model is similar to a circuit model, with nodes being key temperature measurement points, and nodes connected by thermal resistance and heat capacity. For each component simplified in the above steps, heat conduction analysis is performed to analyze its main heat transfer process, identify key nodes, and connect nodes through thermal resistance, heat capacity, and heat sources. The thermal resistance and heat capacity values ​​are determined through calibration experiments, material property tables, and theoretical calculations. Through the above processing, the problem of solving the temperature field of CNC machine tools is simplified into a thermal network problem. This step outputs a thermal network model, or a matrix of relationships between nodes.

[0025] S3, Real-time solution of temperature field: Similar to the circuit, the lumped circuit analysis method is used to solve the model and realize the online update of the temperature field. This step outputs the real-time temperature value of each node.

[0026] Unit 2: Simplified Modeling Method for Overall Deformation of CNC Machine Tools Based on Thermoelastic Analysis The model consists of the following steps: a) Construction of a comprehensive thermal error model: Based on the machine tool structure and thermal error analysis, the thermal error components of the machine tool are decomposed, and terms with small impact on the comprehensive error are ignored to form a comprehensive thermal error model; b) Thermal-deformation mapping: Based on thermoelastic theory, a linear differential operator from the temperature field to the deformation field is established, ignoring higher-order nonlinear terms; c) Kinematic chain analysis: A tool-workpiece relative displacement model is established using the homogeneous coordinate transformation matrix (DH method); d) Solving deformation differential equations: The deformation of each component is transmitted along the kinematic chain to obtain a set of deformation differential equations for the whole machine, and higher-order modes with small impact are ignored.

[0027] S1. Construction of the comprehensive thermal error model: First, the error elements are analyzed according to the motion chain of the CNC machine tool to obtain the error elements. Based on the actual situation, the elements are classified into static error, dynamic error, and minimum error, ignoring the minimum error to simplify the modeling difficulty. A local coordinate system is established for each axis according to the motion chain. Forward kinematics and homogeneous matrix coordinate transformation are used to perform error matrix calculations on the actual situation containing errors, obtaining the thermal error matrix of the CNC machine tool. The main components of the thermal error matrix are then analyzed.

[0028] Taking a five-axis CNC machine tool as an example, its thermal and geometric error terms generally include 21 translational axis errors, 18 rotary axis errors, and 5 spindle error elements. These error elements accumulate to the tool tip point through the machine tool data link, forming a comprehensive error. The purpose of the comprehensive error model is to analyze how the 44 errors affect the comprehensive error and, based on the actual situation, which error terms can be ignored, thereby simplifying the modeling process. The specific simplification results are as follows:

[0029]

[0030]

[0031]

[0032]

[0033]

[0034]

[0035] In the formula, To account for the pitch error caused by the combined thermal error around the x-axis, This refers to the roll error around the Y-axis. The yaw error is the yaw rate around the Z-axis. To account for the positioning error in the x-axis direction due to the combined thermal error, To account for the positioning error in the y-axis direction due to the combined thermal error, To account for the positioning error in the z-axis direction due to the combined thermal error, δ zS ( t ), δ yS ( t ), δ xS (t) These represent the thermal drift errors of the machine tool spindle along the x, y, and z directions, respectively. ε yS ( t ), ε xS (t These represent the thermal runout errors of the machine tool spindle along the x and y directions, respectively. δ xx ( t The positional error formed along the x-axis is denoted as . δ yy ( t The positional error is the positional error formed along the y-axis. δ zz ( t The value represents the positioning error along the z-axis. As shown in the comprehensive thermal error model above, the main factors affecting the overall thermal error of the machine tool are... , , , , , and Seven terms. Therefore, only the seven relevant terms need to be analyzed as thermal error objects (thermal and geometric error terms) to perform thermo-elastic analysis.

[0036] S2, Thermal-Deformation Mapping: Based on the real-time temperature values ​​of all thermal and geometric error terms, a linear differential operator from the temperature field to the deformation field is established for the thermal and geometric error terms using the thermoelastic method, ignoring higher-order nonlinear terms.

[0037] S3, Kinetic Chain Analysis: A tool-workpiece relative displacement model is established using the homogeneous coordinate transformation matrix (DH method).

[0038] S4. Solving the deformed differential equation: The deformation of each component is transmitted along the kinematic chain to obtain a set of differential equations for the deformation of the whole machine, while ignoring higher-order modes with less influence.

[0039] Unit 3: Constructing a physical-data fusion-driven LSTM-PDE model for predicting thermal errors in CNC machine tools.

[0040] like Figure 4 As shown, this unit consists of the following steps: a) Constructing Physical Constraints (PDEs): Based on Unit 1 and Unit 2, a partial differential equation (PDE) for the temperature evolution of key parts of the machine tool is established as a physical constraint; b) Designing the LSTM-PDE network structure: Based on the multi-objective optimization method of accuracy and speed, an LSTM hidden layer structure is designed; c) Physical consistency loss function: PDE residual terms and boundary condition penalty terms are added to the loss function to improve the model's extrapolation ability and interpretability; d) Time delay feature capture: The thermal error lag time is automatically learned using the LSTM gating mechanism.

[0041] S1. Construct Physical Constraints (PDEs): The thermal deformation differential equations obtained from Unit 1 and Unit 2 are used as physical constraints.

[0042] S2. Design the LSTM-PDE network structure: Considering error accuracy and the ability to capture time delay features, the long short-term neural network structure is optimized.

[0043] S3, Physical Consistency Loss Function: Adding PDE residual terms and boundary condition penalty terms to the loss function improves the model's extrapolation ability and interpretability. Furthermore, the thermal deformation differential equation is used as a physical constraint to modify the loss function, generating a physically consistent loss function.

[0044] Specifically, the generated thermal deformation differential equations (sets) from the temperature field to the deformation field are used as additional terms in the loss function of the LSTM network for training the neural network, which is the physical constraint (or physical information). For example, the original neural network loss function is: The transformed differential equation is: ; Therefore, the loss function of the neural network with added physical constraints is modified as follows: ; In the formula, y is the deformation, N is the amount of training data, J is the loss function, L is the physical constraint term, μ is the shear modulus of the material, u is the displacement vector field, λ is the Lamé constant, α is the coefficient of thermal expansion, and T is the coefficient of thermal expansion. T0 represents the temperature change.

[0045] S4 Model Training and Output: The optimized network structure and physical consistency loss function are used to train and validate the model, resulting in a physical-data fusion-driven LSTM-PDE CNC machine tool thermal error prediction model.

[0046] In this embodiment, a computer device is provided, such as... Figure 5 As shown, it includes a memory 501, a processor 502, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements any of the above-mentioned thermal error modeling methods based on thermal resistance networks.

[0047] Specifically, the computer device can be a computer terminal, a server, or a similar computing device.

[0048] In this embodiment, a computer-readable storage medium is provided, which stores a computer program that executes any of the above-described thermal error modeling methods based on thermal resistance networks.

[0049] Specifically, computer-readable storage media include both permanent and non-permanent, removable and non-removable media, which can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer-readable storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable storage media do not include transient media, such as modulated data signals and carrier waves.

[0050] Based on the same inventive concept, this invention also provides a thermal error modeling device based on thermal resistance networks, as described in the following embodiments. Since the principle of the thermal error modeling device based on thermal resistance networks is similar to that of the thermal error modeling method based on thermal resistance networks, the implementation of the thermal error modeling device based on thermal resistance networks can refer to the implementation of the thermal error modeling method based on thermal resistance networks, and repeated details will not be elaborated further. As used below, the terms "unit" or "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0051] Figure 6 This is a structural block diagram of a thermal error modeling device based on a thermal resistance network according to an embodiment of the present invention, such as... Figure 6 As shown, it includes: a CNC machine tool temperature field calculation module 601, a CNC machine tool deformation modeling module 602, a neural network construction module 603, and a thermal error prediction model construction module 604. The structure is described below.

[0052] The CNC machine tool temperature field calculation module 601 is used to disassemble the CNC machine tool into multiple components according to the structure of the CNC machine tool, establish a thermal resistance-thermal capacity network model for each component, solve the thermal resistance-thermal capacity network model in real time through lumped circuit analysis, and output the real-time temperature values ​​of the CNC machine tool at multiple key temperature measurement points. The CNC machine tool deformation modeling module 602 is used to construct a comprehensive thermal error model. Through the comprehensive thermal error model, thermal and geometric error terms that need to be analyzed by thermoelasticity are determined from the key temperature measurement points. Using the thermoelastic method, based on the real-time temperature values ​​of all the thermal and geometric error terms, a mapping from the temperature field to the deformation field is constructed, and the real-time deformation values ​​of the thermal and geometric error terms are generated. The machine tool kinematic chain analysis and coordinate transformation are performed on the real-time deformation values, and a set of differential equations for the deformation of the whole machine is constructed and solved. The thermal deformation differential equations characterizing the thermal deformation of the machine tool are output. A neural network module 603 is constructed to use the thermal deformation differential equation as a physical constraint, construct a physical consistency loss function, and construct a long short-term memory neural network. The long short-term memory neural network is optimized by the error accuracy and time delay feature capture capability to generate an optimized long short-term memory neural network. The thermal error prediction model construction module 604 is used to construct a dataset through machine tool operation data and thermal error data corresponding to the machine tool operation data, and to train the optimized long short-term memory neural network through the dataset based on the physical consistency loss function to generate a physical-data fusion thermal error prediction model.

[0053] In one embodiment, the CNC machine tool temperature field calculation module includes: The machine tool disassembly unit is used to disassemble the CNC machine tool into a spindle, translation axis, rotary axis and bed; The temperature measurement point determination unit is used to determine the key temperature measurement points of the main shaft, the translational shaft, and the rotational shaft, respectively. A thermal resistance and heat capacity calculation unit is used to calculate the thermal resistance and heat capacity of each of the key temperature measurement points; A network model unit is constructed to build a thermal resistance-thermal capacity network model for each component based on the thermal resistance and thermal capacity of all the key temperature measurement points.

[0054] In one embodiment, the CNC machine tool deformation modeling module includes: A linear differential operator unit is constructed to establish a linear differential operator from the real-time temperature value to the deformation value corresponding to each of the thermal and geometric error terms, based on thermoelastic theory. The real-time deformation value calculation unit is used to input the real-time temperature value corresponding to the thermal and geometric error term into the linear differential operator corresponding to the thermal and geometric error term for calculation, and output the real-time deformation value of the thermal and geometric error term.

[0055] In one embodiment, the CNC machine tool deformation modeling module further includes: Establish a local coordinate system unit to establish a local coordinate system for each motion axis of the CNC machine tool; An error state vector generation unit is used to convert the real-time deformation value of the thermal and geometric error terms into coordinate components in the local coordinate system, and generate real-time error state vectors for each motion axis. Construct an actual homogeneous transformation matrix unit to build a homogeneous coordinate transformation chain from the workpiece coordinate system to the tool coordinate system based on the ideal geometric relationship of each motion axis. Construct an actual homogeneous transformation matrix through each transformation matrix in the homogeneous coordinate transformation chain and the real-time error state vector. The actual homogeneous transformation matrix is ​​used to characterize the geometric deviation caused by the heat of the motion axis. The total transformation matrix calculation unit for actual relative pose is used to perform continuous multiplication operations on the actual homogeneous transformation matrix along the machine tool kinematic chain to obtain the total transformation matrix describing the actual relative pose of the tool and the workpiece. The thermal error differential equation system construction unit is used to extract the position error component of the blade tip from the total transformation matrix and establish a whole-machine thermal error differential equation system with time as the independent variable and the real-time temperature value of the key temperature measurement point as the variable. The thermal deformation differential equation construction unit is used to solve the whole machine thermal error differential equation system and output the thermal deformation differential equation characterizing the dynamic mapping relationship between the thermal error of the blade tip and the real-time temperature value.

[0056] In one embodiment, constructing a neural network module includes: The loss function construction unit is used to construct the loss function of the long short-term memory neural network; A consistency loss function unit is constructed to use the thermal deformation differential equation as a physical constraint, and to modify the loss function through the thermal deformation differential equation to generate the physical consistency loss function of the long short-term memory neural network. Define the input unit of the neural network, which is used to define the input of the long short-term memory neural network as a time series matrix composed of the real-time temperature values ​​of the multiple key temperature measurement points at multiple consecutive historical sampling times; Define the output unit of the neural network to define the output of the long short-term memory neural network as the predicted value of the thermal error of the relative position of the tool and the workpiece at a specified time. A neural network unit is constructed to determine the number of input layer neurons by the dimension of the time series matrix, the number of output layer neurons by the dimension of the thermal error prediction value, and a long short-term memory neural network containing at least one hidden layer is initialized.

[0057] In one embodiment, the loss function construction unit is further configured to: calculate the mean square error between the predicted value and the true value of the thermal error in the dataset by the long short-term memory neural network, and use the mean square error as a data loss term; substitute the final prediction output of the long short-term memory neural network during the training process into the thermal deformation differential equation, calculate the norm of the difference between the values ​​on the left and right sides of the thermal deformation differential equation, and use the norm as a PDE residual term, wherein the PDE residual term is used to characterize the degree to which the network prediction violates physical laws; construct a boundary condition constraint function according to the physical boundary conditions corresponding to the thermal deformation differential equation; calculate the degree of non-satisfaction of the network prediction result on the boundary condition constraint function, and use the degree of non-satisfaction as a boundary condition penalty term; construct a loss function through the data loss term, the PDE residual term, and the boundary condition penalty term, wherein L_total = λ1×L_data + λ2×L_pde +λ3×L_bc, where L_total is the total loss, L_data is the data loss term, L_pde is the PDE residual term, L_bc is the boundary condition penalty term, and λ1, λ2, and λ3 are the non-negative weight coefficients corresponding to the data loss term, the PDE residual term, and the boundary condition penalty term, respectively.

[0058] In one embodiment, constructing the neural network module further includes: A first evaluation index unit is determined to construct a first evaluation index that includes the root mean square error of prediction, wherein the first evaluation index is used to measure the accuracy of the error. A second evaluation index unit is determined to construct a second evaluation index that includes the peak offset of the cross-correlation function between the predicted sequence and the true sequence. The second evaluation index is used to quantitatively evaluate the ability to capture time lag features. Construct candidate network structure units to adjust the number of hidden layers and the number of neuron units in each layer of the long short-term memory neural network within a preset range, thereby generating multiple candidate network structures; The training and validation unit is used to train and validate each candidate network structure using the same training dataset, and to calculate the first evaluation index and the second evaluation index corresponding to each candidate network structure respectively. The network optimization unit is used to obtain the optimal candidate network structure among all the candidate network structures using a weighted scoring method based on the first evaluation index and the second evaluation index, and use it as the optimized long short-term memory neural network.

[0059] The embodiments of the present invention achieve the following technical effects: To address the poor versatility of traditional models predicting the strong nonlinearity and time-delay nature of thermal errors in CNC machine tools, a LSTM-PDE thermal error prediction model driven by physics and data fusion is proposed. This model captures the time-delay characteristics of thermal errors through a long short-term neural network (LSTM), and adds physical constraints to the neural network to improve the model's robustness and interpretability. To address the difficulty and slowness of calculating time-varying nonlinear temperature fields, a thermal network-based method for calculating the temperature field of CNC machine tools is proposed. By disassembling the structural and functional components of the CNC machine tool and establishing thermal networks for each, rapid and accurate calculation of the temperature field is achieved. Furthermore, by establishing a comprehensive error model of the machine tool, the thermal error is simplified. Through thermoelastic analysis, the temperature field is transformed into a deformation field. Kinematic chain analysis and coordinate transformation are used to obtain the deformation differential equations of the entire machine, effectively simplifying the complexity of deformation field calculations.

[0060] Obviously, those skilled in the art should understand that the modules or steps of the above-described embodiments of the present invention can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those presented here, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the embodiments of the present invention are not limited to any particular hardware and software combination.

[0061] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, various modifications and variations can be made to the embodiments of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A thermal error modeling method based on thermal resistance networks, characterized in that, include: Based on the structure of the CNC machine tool, the CNC machine tool is disassembled into multiple components, and a thermal resistance-thermal capacity network model is established for each component. The thermal resistance-thermal capacity network model is solved in real time using the lumped circuit analysis method, and the real-time temperature values ​​of the CNC machine tool at multiple key temperature measurement points are output. A comprehensive thermal error model is constructed. Based on the comprehensive thermal error model, thermal and geometric error terms that need to be analyzed by thermoelasticity are determined from the key temperature measurement points. Using the thermoelastic method, a mapping from the temperature field to the deformation field is constructed based on the real-time temperature values ​​of all the thermal and geometric error terms. The real-time deformation values ​​of the thermal and geometric error terms are generated. Machine tool kinematic chain analysis and coordinate transformation are performed on the real-time deformation values. The system of differential equations for the deformation of the whole machine is constructed and solved. The thermal deformation differential equation characterizing the thermal deformation of the machine tool is output. Using the thermal deformation differential equation as a physical constraint, a physical consistency loss function is constructed, and a long short-term memory neural network is constructed. The long short-term memory neural network is then optimized by improving the error accuracy and time delay feature capture capabilities to generate an optimized long short-term memory neural network. A dataset is constructed using machine tool operation data and corresponding thermal error data. Based on the physical consistency loss function, the optimized long short-term memory neural network is trained using the dataset to generate a physical-data fusion thermal error prediction model.

2. The thermal error modeling method based on thermal resistance networks as described in claim 1, characterized in that, Based on the structure of the CNC machine tool, the CNC machine tool is disassembled into multiple components, and a thermal resistance-thermal capacity network model is established for each component, including: The CNC machine tool is disassembled into a spindle, translational axis, rotary axis and bed; The key temperature measurement points of the main shaft, the translational shaft, and the rotational shaft are determined respectively; Calculate the thermal resistance and heat capacity of each of the key temperature measurement points; A thermal resistance-thermal capacity network model for each component is constructed based on the thermal resistance and thermal capacity of all the key temperature measurement points.

3. The thermal error modeling method based on thermal resistance networks as described in claim 1, characterized in that, Using a thermoelastic method, based on the real-time temperature values ​​of all the aforementioned thermal and geometric error terms, a mapping from the temperature field to the deformation field is constructed to generate the real-time deformation values ​​of the aforementioned thermal and geometric error terms, including: For each of the thermal and geometric error terms, a linear differential operator from the real-time temperature value to the deformation value is established based on thermoelasticity theory. The real-time temperature value corresponding to the thermal and geometric error term is input into the linear differential operator corresponding to the thermal and geometric error term for calculation, and the real-time deformation value of the thermal and geometric error term is output.

4. The thermal error modeling method based on thermal resistance networks as described in claim 1, characterized in that, The real-time deformation values ​​are analyzed using machine tool kinematic chain analysis and coordinate transformation. A system of differential equations for overall machine deformation is constructed and solved, and the thermal deformation differential equations characterizing the thermally induced deformation of the machine tool are output, including: Establish a local coordinate system for each motion axis of the CNC machine tool; The real-time deformation value of the thermal and geometric error term is converted into coordinate components in the local coordinate system to generate the real-time error state vector of each motion axis. Based on the ideal geometric relationship of each motion axis, a homogeneous coordinate transformation chain from the workpiece coordinate system to the tool coordinate system is constructed. Through each transformation matrix in the homogeneous coordinate transformation chain and the real-time error state vector, an actual homogeneous transformation matrix is ​​constructed, wherein the actual homogeneous transformation matrix is ​​used to characterize the geometric deviation caused by the heat of the motion axis. The actual homogeneous transformation matrix is ​​continuously multiplied along the machine tool kinematic chain to obtain the total transformation matrix describing the actual relative pose of the tool and the workpiece. Extract the position error component of the blade tip from the total transformation matrix, and establish a set of differential equations for the overall thermal error of the machine with time as the independent variable and the real-time temperature value of the key temperature measurement point as the variable. Solve the set of differential equations for the overall thermal error and output the thermal deformation differential equation that characterizes the dynamic mapping relationship between the thermal error at the blade tip and the real-time temperature value.

5. The thermal error modeling method based on thermal resistance networks as described in any one of claims 1 to 4, characterized in that, Using the thermal deformation differential equation as a physical constraint, a physical consistency loss function is constructed, and a long short-term memory neural network is built, including: Construct the loss function for the long short-term memory neural network; Using the thermal deformation differential equation as a physical constraint, the loss function is modified through the thermal deformation differential equation to generate the physical consistency loss function of the long short-term memory neural network. The input to the long short-term memory neural network is defined as a time series matrix composed of the real-time temperature values ​​of the multiple key temperature measurement points at multiple consecutive historical sampling times. The output of the long short-term memory neural network is defined as the predicted value of the thermal error of the relative position of the tool and the workpiece at a specified time. The number of input layer neurons is determined by the dimension of the time series matrix, the number of output layer neurons is determined by the dimension of the thermal error prediction value, and a long short-term memory neural network containing at least one hidden layer is initialized.

6. The thermal error modeling method based on thermal resistance networks as described in any one of claims 5, characterized in that, The loss function for constructing the long short-term memory neural network includes: The mean square error between the predicted value and the true value of the central thermal error of the dataset by the long short-term memory neural network is calculated, and the mean square error is used as the data loss term. Substitute the final prediction output of the long short-term memory neural network during the training process into the thermal deformation differential equation to calculate the norm of the difference between the values ​​on the left and right sides of the thermal deformation differential equation. Use the norm as the PDE residual term, whereby the PDE residual term is used to characterize the degree to which the network prediction violates physical laws. Based on the physical boundary conditions corresponding to the thermal deformation differential equation, a boundary condition constraint function is constructed; the degree of non-satisfaction of the network prediction result on the boundary condition constraint function is calculated, and the degree of non-satisfaction is used as a boundary condition penalty term. A loss function is constructed using the data loss term, the PDE residual term, and the boundary condition penalty term, where L_total = λ1×L_data + λ2×L_pde + λ3×L_bc, L_total is the total loss, L_data is the data loss term, L_pde is the PDE residual term, L_bc is the boundary condition penalty term, and λ1, λ2, and λ3 are the non-negative weight coefficients corresponding to the data loss term, the PDE residual term, and the boundary condition penalty term, respectively.

7. The thermal error modeling method based on thermal resistance networks as described in any one of claims 1 to 4, characterized in that, The long short-term memory neural network is optimized by improving its error accuracy and time delay feature capture capabilities, resulting in an optimized long short-term memory neural network, including: Construct a first evaluation index that includes the root mean square error of prediction, wherein the first evaluation index is used to measure the accuracy of the error. A second evaluation index is constructed, which includes the peak offset of the cross-correlation function between the predicted sequence and the true sequence. The second evaluation index is used to quantitatively evaluate the ability to capture time lag features. Within a preset range, the number of hidden layers and the number of neuron units in each layer of the long short-term memory neural network are adjusted to generate multiple candidate network structures; Each candidate network structure is trained and validated using the same training dataset, and the first evaluation index and the second evaluation index corresponding to each candidate network structure are calculated respectively. Using a weighted scoring method, based on the first evaluation index and the second evaluation index, the optimal candidate network structure among all the candidate network structures is obtained and used as the optimized long short-term memory neural network.

8. A thermal error modeling device based on thermal resistance networks, characterized in that, include: The CNC machine tool temperature field calculation module is used to disassemble the CNC machine tool into multiple components according to the structure of the CNC machine tool, establish a thermal resistance-thermal capacity network model for each component, solve the thermal resistance-thermal capacity network model in real time using the lumped circuit analysis method, and output the real-time temperature values ​​of the CNC machine tool at multiple key temperature measurement points. The CNC machine tool deformation modeling module is used to construct a comprehensive thermal error model. Through the comprehensive thermal error model, thermal and geometric error terms that need to be analyzed by thermoelasticity are determined from the key temperature measurement points. Using the thermoelastic method, based on the real-time temperature values ​​of all the thermal and geometric error terms, a mapping from the temperature field to the deformation field is constructed, and the real-time deformation values ​​of the thermal and geometric error terms are generated. The machine tool kinematic chain analysis and coordinate transformation are performed on the real-time deformation values, and a set of differential equations for the deformation of the whole machine is constructed and solved. The thermal deformation differential equations characterizing the thermal deformation of the machine tool are output. A neural network module is constructed to use the thermal deformation differential equation as a physical constraint, construct a physical consistency loss function, and construct a long short-term memory neural network. The long short-term memory neural network is optimized by the ability to capture error accuracy and time delay features, and an optimized long short-term memory neural network is generated. The thermal error prediction model construction module is used to construct a dataset using machine tool operation data and corresponding thermal error data, and to train the optimized long short-term memory neural network using the dataset based on the physical consistency loss function, thereby generating a physical-data fusion thermal error prediction model.

9. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the thermal error modeling method based on thermal resistance networks as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that performs the thermal error modeling method based on thermal resistance networks according to any one of claims 1 to 7.