A temperature compensation method based on thermal imaging of a machine tool ram
By combining machine tool ram thermal imaging and LSTM network, the problem that traditional temperature sensors cannot fully reflect the temperature distribution of machine tool ram and spindle is solved, realizing high-precision temperature compensation and dynamic adjustment, and improving machine tool machining accuracy and system stability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 安徽卓朴智能装备股份有限公司
- Filing Date
- 2025-05-27
- Publication Date
- 2026-04-24
AI Technical Summary
Traditional temperature sensors cannot fully reflect the real-time temperature distribution of machine tool slides and spindles, resulting in insufficient fitting accuracy and a lack of dynamic compensation mechanism, which can easily lead to compensation lag or over-intervention.
Real-time temperature distribution data is obtained by using machine tool slide thermal imaging technology. Thermal deformation is calculated by combining a three-dimensional geometric model and an integral method. An LSTM network is constructed to predict the error and a multi-condition triggering mechanism is set up for dynamic compensation.
It achieves high-precision reconstruction of temperature distribution field and multi-dimensional analysis of thermal deformation, dynamically adjusts compensation strategy to avoid over-compensation or under-compensation, and improves machine tool machining accuracy and system robustness.
Smart Images

Figure CN120595717B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine tool thermal error compensation technology, specifically a temperature compensation method based on thermal imaging of a machine tool slide block. Background Technology
[0002] As the precision of CNC machine tools continues to improve, thermal error has become a key factor affecting the machining accuracy of CNC machine tools. Therefore, effective compensation for the thermal error of machine tools is an urgent problem to be solved in current development.
[0003] Because the heat generation of various components in a machine tool differs, and their structures also vary in thermal conductivity and deformation, traditional machine tool temperature compensation methods typically utilize temperature sensors integrated into the main heat-generating components or installed in components with significant deformation to collect temperature data at sampling locations. However, these temperature sensors only collect the temperature at the sampling point, limiting their ability to represent the surrounding environment. Furthermore, due to considerations such as software computing power and equipment cost, the limited number of sensors collected results in a poor fit between the temperature sensor-based machine tool thermal distribution model and the real-time temperature rise changes of the ambient temperature and various heat-conducting components. To ensure accurate fitting, the compensation algorithm becomes increasingly complex. Additionally, the thermal expansion coefficient of heat-conducting components is not always linear, leading to a significant discrepancy between the fitted error correction and the true value, resulting in insufficient final accuracy. Therefore, we propose a temperature compensation method based on thermal imaging of the machine tool ram. Summary of the Invention
[0004] The purpose of this invention is to provide a temperature compensation method based on thermal imaging of machine tool slides.
[0005] The technical problem solved by this invention is:
[0006] (1) Traditional temperature sensors can only acquire discrete point temperature data, which cannot fully reflect the real-time temperature distribution of the machine tool slide and spindle, resulting in insufficient fitting accuracy;
[0007] (2) Traditional methods lack dynamic compensation mechanisms and cannot adaptively trigger compensation according to processing conditions, which can easily lead to compensation lag or excessive intervention.
[0008] This invention can be achieved through the following technical solution: a temperature compensation method based on thermal imaging of a machine tool slide block, specifically including the following steps:
[0009] Step 1: Install a thermal imager on the machine tool protective cover to scan the machine tool spindle and slide to obtain real-time temperature distribution data, and map the scanned two-dimensional temperature data into three-dimensional temperature data, and associate it with the three-dimensional geometric model of the machine tool spindle and slide;
[0010] Step 2: Based on the three-dimensional temperature data, calculate the theoretical deformation ΔZ of the slide in the Z direction of the machine tool coordinate system, as well as the theoretical deformation ΔX and ΔY in the X and Y directions, using the integration method.
[0011] Step 3: Collect the actual deformation of the slide block using an ultrasonic thickness gauge, and calculate the difference between the actual deformation and the theoretical deformation to obtain the deformation correction error, forming a time-series correction error sequence.
[0012] Step 4: Select feature parameters {ambient temperature, spindle speed, historical deformation correction error sequence, theoretical deformation}, and construct a prediction model based on the LSTM network with the above feature parameters as input and the three-directional error correction amount as output;
[0013] Step 5: Input the current ambient temperature, spindle speed, theoretical deformation, and correction error into the prediction model in real time to obtain the current error correction amount; set various trigger conditions for error compensation and define priorities;
[0014] Step 6: Set the maximum compensation amount per instance based on the priority of the triggering conditions, and calculate the number of compensations based on the error correction amount and the maximum compensation amount. The first compensation uses the maximum compensation amount, and subsequent compensations are dynamically adjusted based on the remaining error until the number of compensations is met or the error is below the threshold.
[0015] A further technical improvement of this invention is that the formula for calculating the triaxial theoretical deformation in step two is:
[0016]
[0017]
[0018] Where α is the coefficient of thermal expansion of the ram material, T represents the uniform thermal change temperature per unit length in the Z direction, Z0 is the position of the fixed end of the ram in the Z direction, and Z... ram For the bottom position of the thermal deformation end of the slide block, ΔT X D represents the temperature difference along the X direction of the slide block. X Let ΔT be the width distance of the ram along the X direction. Y D represents the temperature difference along the Y-direction of the slide block. Y This is the width of the ram along the Y direction.
[0019] A further technical improvement of the present invention is that the triggering conditions in step five include threshold triggering, temperature rise triggering, periodic triggering, and event triggering.
[0020] Threshold triggering means that compensation is triggered when the error correction amount is not less than a set threshold.
[0021] Temperature rise trigger indicates that compensation is triggered when the temperature rise in a local area of the slide exceeds the set temperature rise threshold within a unit of time.
[0022] Periodic triggering means performing compensation operations at fixed time intervals during processing;
[0023] Event triggering indicates that a compensation operation is performed at a specific processing stage.
[0024] A further technical improvement of the present invention is that the specific machining stages include spindle tool change, spindle acceleration, and machining idle gap periods.
[0025] A further technical improvement of the present invention is that the priority order of the four triggering conditions is event triggering > threshold triggering > temperature rise triggering > periodic triggering.
[0026] A further technical improvement of the present invention is that the magnitude of the maximum compensation amount per instance under different triggering conditions is also related to the priority of the triggering conditions.
[0027] A further technical improvement of this invention is that: during the initial compensation, the maximum single compensation amount under the corresponding triggering condition is used for compensation; after compensation, step five is repeated to obtain a new error correction amount, and calculation is performed. If the result is not less than 1, compensation will continue to be made according to the maximum single compensation amount under the trigger condition; if the result is less than 1, compensation will be made according to the product of the proportional result and the previous compensation amount as the new compensation amount.
[0028] Compared with the prior art, the present invention has the following beneficial effects:
[0029] 1. This invention acquires two-dimensional temperature distribution data of the slide and spindle using a thermal imager, and generates a high-precision temperature distribution field by combining it with three-dimensional mapping technology. This allows for the fusion of the material's thermal expansion coefficient and temperature gradient based on an integral method, quantifying elongation deformation in the Z direction and bending deformation in the X / Y directions, and achieving dynamic analysis of multi-dimensional thermal deformation. Simultaneously, based on a time-series prediction model using an LSTM network, combined with operating parameters such as ambient temperature and spindle speed, the error correction amount is predicted in advance, achieving proactive compensation.
[0030] 2. This invention sets up a multi-condition triggering mechanism (event, threshold, temperature rise, periodic trigger) and priority to ensure that the compensation timing matches the processing requirements; in addition, the progressive compensation strategy avoids over-compensation or under-compensation by dynamically adjusting the amount of compensation per instance, and improves the robustness of the system by combining it with a threshold alarm mechanism. Attached Figure Description
[0031] To facilitate understanding by those skilled in the art, the present invention will be further described below with reference to the accompanying drawings.
[0032] Figure 1 This is a schematic diagram of the method execution flow of the present invention;
[0033] Figure 2This is a schematic diagram showing the installation position of the temperature measuring thermal imager of the present invention;
[0034] Figure 3 This is a schematic diagram of the heat distribution state of the slide block according to the present invention. Detailed Implementation
[0035] To further illustrate the technical means and effects of the present invention in achieving its intended purpose, the following detailed description of the specific implementation methods, structures, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided.
[0036] Please see Figure 1-3 As shown, a temperature compensation method based on thermal imaging of machine tool slide is proposed. This method calibrates the machine tool spindle as the main heat-generating device, the machine tool slide as the main heat conduction component, and builds an overall heat distribution model.
[0037] Step 1: Install the thermal imager, build a heat distribution model, and establish correlations.
[0038] The thermal imager is installed at a high point inside the machine tool protective cover, and the viewing angle is adjusted by a universal bracket to ensure that the temperature detection and scanning of the machine tool spindle and machine tool slide can be carried out in all directions to obtain real-time temperature distribution data of the scanned target. The real-time temperature distribution data is presented in the form of timestamp-pixel coordinates-corresponding temperature value.
[0039] Import the three-dimensional geometric models of the machine tool spindle and ram and define the material properties (including the coefficient of thermal expansion and the modulus of elasticity). Since the two-dimensional temperature data obtained by the thermal imager is mapped into three-dimensional temperature data, namely three-dimensional coordinates and temperature values, according to the distance and focal length parameters between the thermal imager and the scanned target, the coordinate system transformation is uniformly implemented using ANSYS APDL. Finally, the three-dimensional temperature data is mapped onto the three-dimensional geometric model for temperature loading association.
[0040] Step 2: Calculate the deformation in different directions in real time after applying the temperature.
[0041] Since the temperature collected by the thermal imager is a continuous temperature distribution, the thermal deformation caused by different temperature changes per unit length can be continuously calculated using the integration method. This allows for the calculation of the thermal deformation of the spindle tool mounted on the slide along the Z-axis of the machine tool coordinate system. The calculation formula is as follows:
[0042]
[0043] Where α is the coefficient of thermal expansion of the ram material, T represents the uniform thermal change temperature per unit length in the Z direction, Z0 is the position of the fixed end of the ram in the Z direction, and Z... ram For the bottom position of the thermal deformation end of the slide block, ΔT XD represents the temperature difference along the X direction of the slide block. X Let ΔT be the width distance of the ram along the X direction. Y D represents the temperature difference along the Y-direction of the slide block. Y The width of the ram along the Y direction;
[0044] The formula for calculating the bending change of the slide along the X and Y directions of the machine tool coordinate system caused by local deformation in the Z direction is as follows:
[0045]
[0046] Thus, the deformation of the slide block under the current temperature distribution is obtained, such as elongation (thermal expansion of the material) and bending, and these are marked as theoretical linear deformations ΔX, ΔY, and ΔZ in three directions.
[0047] Step 3: Accumulate and acquire deformation correction error sequences from historical processing data.
[0048] Ultrasonic thickness gauges are installed at the three corresponding positions of the slide in the equipment system to collect the local thickness changes of the slide at different temperatures, thereby obtaining the actual deformation at the corresponding position. The deformation correction error is obtained by subtracting the actual deformation from the theoretical deformation, and then a series of deformation correction error sequences with time sequence are obtained.
[0049] Step 4: Construct a compensation error prediction model
[0050] Feature parameters are selected from numerous parameters in historical machining data. The feature selection method is the Pearson correlation coefficient method, retaining features with an absolute value of correlation coefficient with machining accuracy error greater than 0.3. Finally, the following parameters with time series are selected as the feature parameter group, namely {ambient temperature, spindle speed, historical deformation correction error sequence, theoretical deformation}.
[0051] Based on the LSTM long-short-time prediction network, a compensation error prediction model is constructed with {ambient temperature, spindle speed, historical deformation correction error sequence, and theoretical deformation} as model input and the error correction amount in three directions as model output.
[0052] Align the parameters in the model input according to timestamps and arrange them in chronological order. Divide the training set, validation set, and test set into a 7:1.5:1.5 ratio to train the error compensation prediction model until the loss function converges.
[0053] Step 5: Obtain the error correction amount and select the timing for error compensation.
[0054] In the actual machining process, the current ambient temperature, spindle speed, theoretical deformation, and current deformation correction error are input into the above-mentioned compensation error prediction model to obtain the current error correction amount;
[0055] Error compensation triggering conditions are set based on multiple processing scenarios, and the triggering priority of these conditions is involved, specifically:
[0056] Triggering conditions include threshold triggering, temperature rise triggering, periodic triggering, and event triggering;
[0057] For threshold triggering, compensation is triggered when the compensation error is not less than the set threshold, which is generally set to 3-5µm.
[0058] For temperature rise triggering, compensation is triggered when the temperature rise in a certain part of the slide exceeds the set temperature rise threshold within a unit time.
[0059] For periodic triggering, i.e., performing compensation operations at fixed time intervals during processing;
[0060] Compensation operations are performed for events that trigger specific machining stages, such as tool changes, spindle acceleration, or the idle gap between two machining actions, in order to avoid impact on the machined parts.
[0061] The above triggering conditions can be set in parallel, with their priority set as event trigger > threshold trigger > temperature rise trigger > periodic trigger.
[0062] Step Six: After the compensation condition is triggered, perform multiple adaptive compensations using a gradual compensation strategy.
[0063] First, set the corresponding maximum compensation amount for a single instance based on the different triggering conditions, and their size arrangement is the same as the priority arrangement order;
[0064] The number of compensations is calculated by rounding down the error correction amount and the corresponding maximum compensation amount for a single instance. If the number of compensations is less than 1, no compensation is performed.
[0065] When performing the first compensation under this trigger condition, the maximum compensation amount for a single instance under the corresponding trigger condition is used directly for compensation;
[0066] After compensation, repeat step five to calculate. If the result is not less than 1, continue to compensate according to the maximum single compensation amount under the trigger condition; if the result is less than 1, compensate according to the product of the proportional result and the previous compensation amount as the new compensation amount; continue to repeat the above operation until the above-calculated number of compensations is reached; after the number of compensations is reached, if the error correction amount is still greater than the threshold trigger, issue a warning and stop the machine for inspection; otherwise, continue to wait for subsequent conditions to trigger for compensation.
[0067] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.
Claims
1. A temperature compensation method based on thermal imaging of a machine tool slide block, characterized in that, Specifically, the steps include the following: Step 1: Install a thermal imager on the machine tool protective cover to scan the machine tool spindle and slide to obtain real-time temperature distribution data, and map the scanned two-dimensional temperature data into three-dimensional temperature data, and associate it with the three-dimensional geometric model of the machine tool spindle and slide; Step 2: Based on the three-dimensional temperature data, calculate the theoretical deformation ΔZ of the slide in the Z direction of the machine tool coordinate system, as well as the theoretical deformation ΔX and ΔY in the X and Y directions, using the integration method. The theoretical deformation calculation formulas in the three directions are as follows: ; ; in, Let T be the coefficient of thermal expansion of the ram material, and let T represent the temperature of uniform thermal change per unit length in the Z direction. The position of the fixed end of the ram in the Z direction. This refers to the bottom position of the ram's thermal deformation end. The temperature difference along the X direction of the slide block. The width of the ram along the X direction. The temperature difference along the Y direction of the slide block. The width of the ram along the Y direction; Step 3: Collect the actual deformation of the slide block using an ultrasonic thickness gauge, and calculate the difference between the actual deformation and the theoretical deformation to obtain the deformation correction error, forming a time-series correction error sequence. Step 4: Select feature parameters including: ambient temperature, spindle speed, historical deformation correction error sequence, and theoretical deformation; construct a prediction model based on the LSTM network with the above feature parameters as input and the three-directional error correction amount as output; Step 5: Input the current ambient temperature, spindle speed, theoretical deformation, and correction error into the prediction model in real time to obtain the current error correction amount; set various trigger conditions for error compensation and define priorities; Triggering conditions include threshold triggering, temperature rise triggering, periodic triggering, and event triggering: Threshold triggering means that compensation is triggered when the error correction amount is not less than a set threshold. Temperature rise trigger indicates that compensation is triggered when the temperature rise in a local area of the slide exceeds the set temperature rise threshold within a unit of time. Periodic triggering means performing compensation operations at fixed time intervals during processing; Event triggering indicates that a compensation operation will be performed at a specific processing stage; Step 6: Set the maximum compensation amount per instance based on the priority of the triggering conditions, and calculate the number of compensations based on the error correction amount and the maximum compensation amount. The first compensation uses the maximum compensation amount, and subsequent compensations are dynamically adjusted based on the remaining error until the number of compensations is met or the error is below the threshold trigger condition.
2. The temperature compensation method based on machine tool slide thermal imaging according to claim 1, characterized in that, The specific machining stages include spindle tool change, spindle acceleration, and machining idle intervals.
3. The temperature compensation method based on machine tool slide thermal imaging according to claim 1, characterized in that, The priority order of the four triggering conditions is event triggering > threshold triggering > temperature rise triggering > periodic triggering.
4. The temperature compensation method based on machine tool slide thermal imaging according to claim 3, characterized in that, The magnitude of the maximum compensation amount per instance under different triggering conditions is also related to the priority of the triggering conditions.
5. A temperature compensation method based on machine tool slide thermal imaging according to claim 1, characterized in that, The initial compensation uses the maximum single compensation amount under the corresponding trigger condition. After compensation, step five is repeated to obtain a new error correction amount, and the calculation is performed. If the result is not less than 1, then continue to compensate according to the maximum compensation amount per time under the trigger condition; if the result is less than 1, then use the product of the proportional result and the previous compensation amount as the new compensation amount.
Citation Information
Patent Citations
Numerical control machine tool thermal error compensation method and device based on thermal image
CN117055474A
Machine tool dynamic error compensation method and system based on instruction sequence analysis
CN117170308A