Thermal error prediction method and device for ball screw feeding system, equipment and medium

Through the time series-based thermal error prediction model, the TCN convolutional neural network and Bayesian optimization combined with the multi-head attention mechanism are used to solve the problem of inaccurate thermal error prediction in the ball screw feed system, and achieve higher accuracy dynamic prediction.

CN120449715AActive Publication Date: 2025-08-08GENERAL TECH GRP MASCH TOOL ENG RES INST CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510942572.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-09
Publication Date
2025-08-08
Estimated Expiration
2045-07-09

AI Technical Summary

Technical Problem

In the prior art, the thermal error prediction model of the ball screw feed system is a static model, and the historical impact of temperature changes is not effectively considered, resulting in inaccurate prediction.

Method used

Using a time series-based thermal error prediction model, by obtaining the thermal error, temperature and position data of the ball screw feed system under different operating conditions, the thermal error prediction model combined with the multi-head attention mechanism is used to extract the characteristic relationship between the data and perform dynamic prediction.

Benefits of technology

The accuracy of thermal error prediction of ball screw feed system is improved, the defect of ignoring the historical impact of temperature changes in the static model is overcome, and the prediction accuracy is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120449715A_ABST
    Figure CN120449715A_ABST
Patent Text Reader

Abstract

The invention provides a thermal error prediction method and device for a ball screw feeding system, equipment and a medium, and relates to the technical field of thermal error prediction, and the method comprises the steps: obtaining thermal error data, temperature data and position data of the ball screw feeding system in a preset time period under different working conditions; and inputting the thermal error data, the temperature data and the position data into a thermal error prediction model to obtain a thermal error prediction result of the ball screw feeding system output by the thermal error prediction model. According to the technical scheme of the invention, the dynamic thermal error prediction model is obtained through training based on the thermal error sample data, the temperature sample data and the position sample data, and the time sequence information in the preset time period, such as the feature relationship among the thermal error data, the temperature data and the position data, is extracted based on the dynamic thermal error prediction model. The influence of the temperature data and the position data on the thermal error data of the ball screw feeding system within a period of time is considered according to the characteristic relation to obtain a thermal error prediction result, and the prediction accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of thermal error prediction, and in particular to a method, device, equipment and medium for predicting thermal errors of a ball screw feed system. Background Art

[0002] The ball screw is a core component of most CNC machine tool feed systems. Temperature fluctuations and friction between components such as the bearing and nut during operation can cause temperature fluctuations in the screw, resulting in thermal errors that ultimately affect the positioning accuracy of the feed system. Therefore, research on thermal errors in ball screw feed systems has become an important research area for improving machine tool positioning accuracy.

[0003] At present, in the existing technology, the error prediction usually adopts the multivariate linear regression theory to establish a ball screw prediction model. The model is a static model, which only considers the relationship between the current temperature and the current thermal deformation, and ignores the influence of the temperature at previous moments. Therefore, there is a problem of inaccurate thermal error prediction caused by temperature changes. Summary of the Invention

[0004] The present invention provides a thermal error prediction method, device, equipment and medium for a ball screw feed system, which is used to solve the problem that in the prior art, thermal errors are predicted through static models, which only considers the relationship between the current temperature and the current thermal deformation, and ignores the influence of the temperature at previous times. Therefore, there is a defect of inaccurate thermal error prediction caused by temperature changes. A dynamic thermal error prediction model is obtained by training based on thermal error sample data, temperature sample data and position sample data obtained based on time series. The characteristic relationship between thermal error data, temperature data and position data is extracted based on the thermal error prediction model. According to the characteristic relationship, the influence of temperature data and position data on the thermal error data of the ball screw feed system over a period of time is considered, thereby obtaining a thermal error prediction result and improving the prediction accuracy.

[0005] The present invention provides a thermal error prediction method for a ball screw feed system, comprising the following steps.

[0006] The thermal error data, temperature data and position data of the ball screw feed system are obtained within a preset time period under different working conditions; wherein the thermal error data represents the error between the screw, front bearing and rear bearing of the ball screw feed system during operation, the temperature data is used to represent the heating condition of the ball screw feed system during operation, and the position data is used to represent the position of the workbench of the ball screw feed system during operation.

[0007] Thermal error data, temperature data and position data are input into the thermal error prediction model to obtain the thermal error prediction result of the ball screw feed system output by the thermal error prediction model; wherein, the thermal error prediction model is trained based on the thermal error sample data, temperature sample data and position sample data, and the thermal error prediction model is a model used to extract the characteristic relationship between the thermal error data, temperature data and position data to determine the thermal error prediction result.

[0008] According to a thermal error prediction method for a ball screw feed system provided by the present invention, thermal error data, temperature data and position data of the ball screw feed system under different working conditions within a preset time period are obtained, including: obtaining candidate thermal error data of the ball screw feed system under different working conditions; obtaining candidate temperature data of the ball screw feed system under different working conditions; obtaining candidate position data of the ball screw feed system under different working conditions; and normalizing the candidate thermal error data, candidate temperature data and candidate position data respectively to obtain thermal error data, temperature data and position data.

[0009] According to a thermal error prediction method for a ball screw feed system provided by the present invention, candidate thermal error data of the ball screw feed system under different working conditions are obtained, including: obtaining geometric error results of the ball screw feed system under different working conditions; wherein the geometric error result is a result obtained by performing error measurement on the ball screw feed system according to standard provisions; obtaining a positioning error result of the ball screw feed system; wherein the positioning error result is a result of performing error measurement on measurement points at different times by segmenting the screw stroke in the ball screw feed system through a laser interferometer; and determining candidate thermal error data according to the difference between the positioning error result and the geometric error result.

[0010] According to a thermal error prediction method for a ball screw feed system provided by the present invention, candidate temperature data of the ball screw feed system under different working conditions are obtained, including: obtaining an initial temperature data set of the ball screw feed system under different working conditions; wherein the initial temperature data set includes initial temperature data of at least two measuring points in the ball screw feed system; clustering the initial temperature data to obtain a temperature clustering data set; wherein the temperature clustering data set includes at least two types of temperature clustering data; obtaining thermal deformation parameters; wherein the thermal deformation parameters are used to represent the thermal deformation of the front bearing, rear bearing and screw of the ball screw feed system; determining the correlation coefficient between the thermal deformation parameters and the initial temperature data of any measuring point; and selecting a temperature clustering data from each type of temperature clustering data in the temperature clustering data set according to the correlation coefficient to obtain candidate temperature data.

[0011] According to a thermal error prediction method for a ball screw feed system provided by the present invention, thermal error data, temperature data and position data are input into a thermal error prediction model to obtain a thermal error prediction result of the ball screw feed system output by the thermal error prediction model, including: inputting the thermal error data, temperature data and position data into a dimensionality increase module in the thermal error prediction model to obtain a three-dimensional tensor output by the dimensionality increase module; inputting the three-dimensional tensor into a hidden feature extraction module in the thermal error prediction model to obtain a special tensor output by the hidden feature extraction module; inputting the special tensor into a position encoding module in the thermal error prediction model to obtain an encoding result output by the position encoding module; inputting the encoding result into a feature relationship extraction module in the thermal error prediction model to obtain a thermal error prediction result of the ball screw feed system output by the feature relationship extraction module; wherein the feature relationship extraction module is used to extract the feature relationship between the thermal error data, temperature data and position data according to the encoding result.

[0012] According to a thermal error prediction method for a ball screw feed system provided by the present invention, the training steps of the thermal error prediction model include the following: obtaining thermal error sample data, temperature sample data and position sample data; inputting the thermal error sample data, temperature sample data and position sample data into a basic thermal error prediction model to obtain an initial thermal error prediction result output by the basic thermal error prediction model; and repeatedly iteratively optimizing the basic thermal error prediction model according to the initial thermal error prediction result to obtain a thermal error prediction model.

[0013] According to a thermal error prediction method for a ball screw feed system provided by the present invention, a thermal error basic prediction model is repeatedly iteratively optimized according to an initial thermal error prediction result to obtain a thermal error prediction model, including: after obtaining the initial thermal error prediction result, determining whether the number of model iterations is equal to a number threshold; when the number of model iterations is equal to the number threshold, obtaining optimized hyperparameters; obtaining a thermal error prediction model according to the optimized hyperparameters and the thermal error basic prediction model; when the number of model iterations is less than the number threshold, determining whether the initial thermal error prediction result is less than the result threshold; when the initial thermal error prediction result is less than the result threshold, updating the optimized hyperparameters, and optimizing the thermal error prediction model according to the updated optimized hyperparameters and the thermal error basic prediction model. The thermal error basic prediction model obtains the thermal error prediction model; when the initial thermal error prediction result is greater than or equal to the result threshold, the optimization hyperparameters are changed according to the Bayesian algorithm, and the thermal error basic prediction model is updated, and the thermal error sample data, temperature sample data and position sample data are continued to be iteratively optimized according to the updated thermal error basic prediction model to obtain the initial thermal error prediction result after iterative optimization, and the execution is continued to return to determine whether the number of model iterations is equal to the number threshold after obtaining the initial thermal error prediction result, until the number of model iterations is equal to the number threshold or the initial thermal error prediction result after iterative optimization is less than the result threshold, the optimization is stopped to obtain the thermal error prediction model.

[0014] The present invention also provides a thermal error prediction device for a ball screw feed system, comprising the following modules.

[0015] The data acquisition module is used to obtain the thermal error data, temperature data and position data of the ball screw feed system within a preset time period under different working conditions; among them, the thermal error data represents the error between the screw, front bearing and rear bearing of the ball screw feed system during operation, the temperature data is used to represent the heat generation of the ball screw feed system during operation, and the position data is used to represent the position of the workbench of the ball screw feed system during operation.

[0016] The error prediction module is used to input thermal error data, temperature data and position data into a thermal error prediction model to obtain a thermal error prediction result of the ball screw feed system output by the thermal error prediction model; wherein the thermal error prediction model is trained based on thermal error sample data, temperature sample data and position sample data, and the thermal error prediction model is a model used to extract the characteristic relationship between thermal error data, temperature data and position data to determine the thermal error prediction result.

[0017] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, a thermal error prediction method for a ball screw feed system as described above is implemented.

[0018] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the thermal error prediction method of any of the above-mentioned ball screw feed systems is implemented.

[0019] The present invention also provides a computer program product, comprising a computer program, which, when executed by a processor, implements any of the above-mentioned methods for predicting thermal errors of a ball screw feed system.

[0020] The present invention provides a thermal error prediction method, device, equipment and medium for a ball screw feed system, which obtains thermal error data, temperature data and position data of the ball screw feed system within a preset time period under different working conditions; wherein the thermal error data represents the error between the screw, front bearing and rear bearing of the ball screw feed system during operation, the temperature data is used to represent the heat generation of the ball screw feed system during operation, and the position data is used to represent the position of the workbench of the ball screw feed system during operation; the thermal error data, temperature data and position data are input into a thermal error prediction model to obtain a thermal error prediction result of the ball screw feed system output by the thermal error prediction model; wherein the thermal error prediction model is trained based on thermal error sample data, temperature sample data and position sample data, and the thermal error prediction model is a model used to extract the characteristic relationship between thermal error data, temperature data and position data to determine the thermal error prediction result. The technical solution of the present invention is used to solve the problem that in the prior art, thermal errors are predicted through static models, which only considers the relationship between the current temperature and the current thermal deformation, and ignores the influence of the temperature at previous times. Therefore, there is a defect of inaccurate thermal error prediction caused by temperature changes. A dynamic thermal error prediction model is obtained by training based on thermal error sample data, temperature sample data and position sample data obtained based on time series. The characteristic relationship between thermal error data, temperature data and position data is extracted based on the thermal error prediction model. According to the characteristic relationship, the influence of temperature data and position data on the thermal error data of the ball screw feed system over a period of time is considered, thereby obtaining a thermal error prediction result and improving the prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0022] Figure 1 It is a flow chart of the thermal error prediction method of the ball screw feed system provided by the present invention.

[0023] Figure 2 It is a flowchart of data processing provided by the present invention.

[0024] Figure 3 Schematic diagram of the ball screw feed system provided by the present invention.

[0025] Figure 4 It is a flowchart of the model training provided by the present invention.

[0026] Figure 5It is a schematic diagram of the flow of the model test provided by the present invention.

[0027] Figure 6 It is a flow chart of the model optimization provided by the present invention.

[0028] Figure 7 It is a structural schematic diagram of the thermal error prediction device of the ball screw feed system provided by the present invention.

[0029] Figure 8 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0030] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0031] The following combination Figure 1 The thermal error prediction method of the ball screw feed system provided by the present invention is described. The thermal error prediction method of the ball screw feed system provided by the present invention can be applied to the thermal error prediction of the ball screw feed system based on the thermal error prediction model. The executor of this method can be an electronic device, or it can be a thermal error prediction device of the ball screw feed system arranged in the electronic device. The configuration device of the control interface can be realized by software, hardware or a combination of the two. Figure 1 FIG. 1 is a flow chart of a thermal error prediction method for a ball screw feed system provided by the present invention, such as Figure 1 As shown, the method includes the following steps 101 and 102.

[0032] Step 101: Acquire thermal error data, temperature data, and position data of a ball screw feed system under different working conditions within a preset time period.

[0033] In this step, the thermal error data represents the error between the screw, front bearing and rear bearing of the ball screw feed system during operation, that is, the thermal error data is the result of the screw, front bearing and rear bearing; the temperature data is used to represent the heat generation of the ball screw feed system during operation, and the position data is used to represent the position of the workbench of the ball screw feed system during operation, and the workbench moves back and forth on the screw.

[0034] Among them, different working conditions are the states and performance parameters of the ball screw feed system under specific working conditions. These different working conditions may be, for example, factors such as workload and temperature. These factors affect the operating state and performance of the ball screw feed system, and this embodiment does not limit this.

[0035] Different working conditions may be, for example, working conditions with different feed speeds, such as 3 meters per minute, 6 meters per minute, etc., which is not limited in this embodiment.

[0036] Specifically, obtain thermal error data of the error between the screw, front bearing and rear bearing of the ball screw feed system during operation under different working conditions, obtain temperature data of the heat generation of the ball screw feed system during operation under different working conditions, and obtain the position of the worktable of the ball screw feed system during operation under different working conditions.

[0037] In a specific embodiment, thermal error data, temperature data and position data of a ball screw feed system under different working conditions within a preset time period are obtained, including: obtaining candidate thermal error data of the ball screw feed system under different working conditions; obtaining candidate temperature data of the ball screw feed system under different working conditions; obtaining candidate position data of the ball screw feed system under different working conditions; and normalizing the candidate thermal error data, candidate temperature data and candidate position data respectively to obtain thermal error data, temperature data and position data.

[0038] Specifically, Figure 2 It is a flow chart of data processing provided by the present invention, such as Figure 2 As shown, the steps of obtaining thermal error data, temperature data and position data of the ball screw feed system under different working conditions within a preset time period specifically include step 201, step 202, step 203 and step 204.

[0039] Step 201: Obtain candidate thermal error data of the ball screw feed system under different working conditions.

[0040] In a specific embodiment, candidate thermal error data of a ball screw feed system under different working conditions are obtained, including: obtaining geometric error results of the ball screw feed system under different working conditions; wherein the geometric error result is a result obtained by performing error measurement on the ball screw feed system according to standard provisions; obtaining positioning error results of the ball screw feed system; wherein the positioning error result is a result of performing error measurement on measurement points at different times by segmenting the screw stroke in the ball screw feed system using a laser interferometer; and determining candidate thermal error data based on the difference between the positioning error result and the geometric error result.

[0041] In this step, a laser interferometer is a high-precision measuring instrument based on the principle of laser interference. The laser interferometer segments the screw travel in the ball screw feed system into, for example, 10 segments, meaning that positioning error results are obtained for 11 measurement points during each round trip. This is not limited to this in this embodiment.

[0042] The standard stipulates that the geometric error result obtained by performing error measurement on the ball screw feed system can be, for example, the average of the first five results using the national standard GB / T 17421.2-2000 as the geometric error result, which is not limited in this embodiment.

[0043] The result of the geometric error may vary slightly according to different working conditions, or may not vary according to different working conditions, which is not limited in this embodiment.

[0044] Specifically, according to the standard provisions, the geometric error results are obtained by measuring the error of the ball screw feed system, and the screw stroke in the ball screw feed system is segmented by a laser interferometer to determine the positioning error results of the error measurement at the measurement points at different times. Finally, the candidate thermal error data is determined based on the difference between the positioning error result and the geometric error result.

[0045] For example, the average of the first five error measurements of the ball screw feed system according to the standard can be used as the geometric error result, and the screw stroke in the ball screw feed system is segmented by a laser interferometer to determine 11 measurement points at different times for error measurement to obtain the positioning error result. Finally, multiple candidate data are determined based on the difference between the determined positioning error result and the determined geometric error result, and the multiple candidate data are determined as candidate thermal error data. Specifically, the positioning error results, geometric error results and candidate thermal error results are obtained. For example, the first 5 measurement results of the 11 measurement points can be obtained. After the first 5 measurements, the workbench moves back and forth, and 11 forward measurement errors and 11 reverse measurement errors will be obtained for each movement. Usually, one direction is sufficient, so the forward measurement errors of the 11 measurement points are obtained. The workbench moves back and forth 200 times, and the forward measurement errors of the 11 measurement points in the first 5 times are used as the geometric error results, and the forward measurement errors of the 11 measurement points in the last 195 times are used as the positioning error results. The positioning error result is subtracted from the geometric error result to obtain the candidate thermal error data.

[0046] Step 202: Acquire candidate temperature data of the ball screw feed system under different working conditions.

[0047] In this step, candidate temperature data is obtained using temperature sensors of the ball screw feed system under different operating conditions. The temperature sensors can be, for example, located in the front bearing, nut holder, rear bearing, workbench, motor, motor holder, or working environment of the ball screw feed system, and this embodiment does not limit this.

[0048] During the process of collecting candidate temperature data under different working conditions, how to determine whether to stop collecting, specifically whether to stop measuring when a certain working condition reaches thermal equilibrium, and consider the measurement of this working condition to be completed (that is, it usually takes about 2 hours for a working condition to reach thermal equilibrium), is not limited in this embodiment.

[0049] Specifically, candidate temperature data of the ball screw feed system under different working conditions are obtained.

[0050] In a specific embodiment, candidate temperature data of the ball screw feed system under different working conditions are obtained, including: obtaining the initial temperature of the ball screw feed system under different working conditions, performing window sliding filtering on the initial temperature, and obtaining the current ambient temperature of the ball screw feed system under different working conditions, taking the current ambient temperature as the basis (because the ambient temperature changes, the ambient temperature will be measured, and the current temperature difference is obtained based on the current ambient temperature), and subtracting the current ambient temperature from the initial temperature after window sliding filtering to obtain candidate temperature data.

[0051] The initial temperature is fluctuating data, which will affect the accuracy of the subsequent model. Therefore, through window sliding filtering, the window size can be set to 20, for example. The advantage of this setting is that it improves the processing accuracy of the subsequent model.

[0052] In a specific embodiment, candidate temperature data of a ball screw feed system under different working conditions are obtained, including: obtaining an initial temperature data set of the ball screw feed system under different working conditions; wherein the initial temperature data set includes initial temperature data of at least two measurement points in the ball screw feed system; clustering the initial temperature data to obtain a temperature cluster data set; wherein the temperature cluster data set includes at least two types of temperature cluster data; obtaining thermal deformation parameters; wherein the thermal deformation parameters are used to represent the thermal deformation of the front bearing, rear bearing and screw of the ball screw feed system; determining the correlation coefficient between the thermal deformation parameters and the initial temperature data of any measurement point; and selecting a temperature cluster data from each type of temperature cluster data in the temperature cluster data set according to the correlation coefficient to obtain candidate temperature data.

[0053] In this step, the initial temperature data is clustered, and a Gaussian mixture model (GMM) is usually used. The GMM is a statistical model used for cluster analysis and probability density estimation, which is not limited in this embodiment.

[0054] Correlation coefficient The Pearson calculation may be, for example, a Pearson correlation coefficient, also known as the Pearson product-moment correlation coefficient (PPMCC or PCCs), which is used to measure the correlation (linear correlation) between the thermal deformation parameter X and the initial temperature data of the measurement point Y. The value thereof is between -1 and 1, and this embodiment does not limit this.

[0055] Correlation coefficient The calculation of is shown in formula (1).

[0056] (1) In formula (1), represents the thermal deformation coefficient, Represents the initial temperature data of any measurement point, Indicates the total number of measurement points. express and The covariance of express The standard deviation of express The standard deviation of .

[0057] Specifically, an initial temperature data set of a ball screw feed system under different working conditions is obtained; wherein, the initial temperature data set includes initial temperature data of at least two measuring points in the ball screw feed system; the initial temperature data is clustered to obtain a temperature cluster data set; wherein, the temperature cluster data set includes at least two types of temperature cluster data; thermal deformation parameters are obtained; wherein, the thermal deformation parameters are used to represent the thermal deformation of the front bearing, rear bearing and screw of the ball screw feed system; the correlation coefficient between the thermal deformation parameters and the initial temperature data of any measuring point is determined; and according to the correlation coefficient, one temperature cluster data is selected from each type of temperature cluster data in the temperature cluster data set to obtain candidate temperature data.

[0058] Exemplarily, an initial temperature data set of a ball screw feed system under different working conditions is obtained. It is assumed that the initial temperature data set includes 11 initial temperature data. The 11 initial temperature data are then clustered to obtain a temperature cluster data set. It is assumed that the temperature cluster data set includes 3 types of temperature aggregation data. The correlation coefficient between the initial temperature of any measurement point in the initial temperature data of the 11 measurement points and the thermal deformation parameter is determined. According to the correlation coefficient, one temperature cluster data is selected from each of the 3 types of temperature aggregation data, and the 3 selected temperature cluster data are determined as candidate temperature data.

[0059] The advantage of this setting is that some temperature cluster data are selected as candidate temperature data, which is beneficial to reducing redundancy and improving accuracy in subsequent model training and application.

[0060] Step 203: Acquire candidate position data of the ball screw feed system under different working conditions.

[0061] Specifically, the measurement points of the screw process in the ball screw feed system under different working conditions and the candidate position data corresponding to the measurement points are determined.

[0062] In one embodiment, Figure 3 Schematic diagram of the ball screw feed system provided by the present invention, as shown in FIG. Figure 3 As shown, the ball screw feed system includes a motor, a front bearing, a rear bearing, and a workbench. The component between the front bearing and the rear bearing is a screw, and the workbench moves on the screw. The black origin 11 represents the measurement points that divide the screw process into 10 segments. The corresponding 0, 50, 100, 150, 200, 250, 300, 350, 400, 450, and 500 under each measurement point represent candidate position data, which is not limited in this embodiment.

[0063] Further, in Figure 3 In this method, the lead screw is fixed at one end and hinged at the other. The front bearing is an angular contact bearing, which bears both axial and radial forces, forming the fixed end. The rear bearing is a deep groove ball bearing, which only bears radial forces, forming the hinged end. Therefore, when the lead screw deforms due to heat, it stretches from the fixed end to the free end. By dividing the lead screw travel into 10 segments, the laser interferometer can obtain positioning error results at 11 different points at different times.

[0064] The advantage of this setup is that thermal errors in ball screw feed systems primarily come from thermal deformation of the screw. However, different positions on the screw experience uneven heating, so it's not entirely reasonable to assume that the screw elongates linearly throughout its entire travel. This solution divides the screw into 10 segments, uses a model to predict the relationship between thermal deformation and temperature at 11 locations, and performs linear interpolation between adjacent locations to predict thermal deformation throughout the screw's entire travel. This effectively addresses the issue of uneven deformation caused by uneven heating.

[0065] Step 204 : Normalize the candidate thermal error data, the candidate temperature data, and the candidate position data respectively to obtain thermal error data, temperature data, and position data.

[0066] In this step, the candidate thermal error data, candidate temperature data, and candidate position data have different ranges and units, and the data may vary significantly. This will cause some relatively large variables to account for a large proportion in the subsequent prediction process of the thermal error prediction model, thereby affecting the prediction accuracy of the thermal error prediction model. Normalization is to standardize the candidate thermal error data, candidate temperature data, and candidate position data by normalizing them through maximum and minimum values to reduce the differences between the data.

[0067] The normalization formula is shown in the following formula (2).

[0068] (2) In formula (2), The value representing the original sequence that needs to be normalized, for example, can be candidate thermal error data, candidate temperature data, or candidate position data; Indicates the minimum value of the original sequence (candidate thermal error data, candidate temperature data or candidate position data) that needs to be normalized; Indicates the maximum value of the original sequence (candidate thermal error data, candidate temperature data or candidate position data) that needs to be normalized. Represents normalized thermal error data, temperature data, or position data.

[0069] Specifically, for the candidate thermal error data, the current candidate data in the candidate thermal error data, the minimum candidate data in the candidate thermal error data, and the maximum candidate data in the candidate thermal error data are input into formula (2) to obtain the thermal error data; for the candidate temperature data, the current temperature cluster data in the candidate temperature data, the minimum temperature cluster data in the candidate temperature data, and the maximum temperature cluster data in the candidate temperature data are input into formula (2) to obtain the normalized temperature data; the current position data, the minimum position data, and the maximum position data of the position data of each measurement point obtained are input into formula (2) to obtain the normalized position data.

[0070] The advantage of this setting is that, through normalization, each data is scaled into a dimensionless pure value.

[0071] In a specific embodiment, before normalizing the candidate thermal error data, candidate temperature data, and candidate position data to obtain the thermal error data, temperature data, and position data, the candidate thermal error data, candidate temperature data, and candidate position data may also be time-aligned. The time alignment is specifically used to eliminate redundant temperature data, which is not limited in this embodiment.

[0072] Step 102: Input the thermal error data, temperature data, and position data into a thermal error prediction model to obtain a thermal error prediction result of the ball screw feed system output by the thermal error prediction model.

[0073] In this step, the thermal error prediction model is trained based on thermal error sample data, temperature sample data, and position sample data (training set). The thermal error prediction model is used to extract the characteristic relationships between thermal error data, temperature data, and position data to determine the thermal error prediction results. The thermal error prediction model primarily considers the hysteresis of thermal error and establishes a dynamic thermal error prediction model based on time series. The thermal error prediction model primarily trains the training set by constructing a temporal convolutional network (TCN) convolutional neural network model. The TCN hyperparameters are optimized using Bayesian optimization (BO). The comprehensive features learned by the TCN are processed using a multi-head attention mechanism (MHA), ultimately establishing the BO-TCN-MHA model (thermal error prediction model).

[0074] Specifically, after obtaining the thermal error data, temperature data, position data and a trained thermal error prediction model, the thermal error data, temperature data and position data are input into the thermal error prediction model, and the characteristic relationship between the thermal error data, temperature data and position data is extracted based on the thermal error prediction model, so as to obtain the thermal error prediction result of the ball screw feed system output by the thermal error prediction model based on the characteristic relationship.

[0075] The advantage of this setting is that the hyperparameters in TCN are optimized through the BO algorithm to find the network parameters that make the model optimal, thereby obtaining a thermal error prediction model and improving the prediction accuracy of the thermal error prediction results predicted by the thermal error prediction model.

[0076] In a specific embodiment, thermal error data, temperature data and position data are input into a thermal error prediction model to obtain a thermal error prediction result of a ball screw feed system output by the thermal error prediction model, including: inputting the thermal error data, temperature data and position data into a dimensionality increase module in the thermal error prediction model to obtain a three-dimensional tensor output by the dimensionality increase module; inputting the three-dimensional tensor into a hidden feature extraction module in the thermal error prediction model to obtain a special tensor output by the hidden feature extraction module; inputting the special tensor into a position encoding module in the thermal error prediction model to obtain an encoding result output by the position encoding module; inputting the encoding result into a feature relationship extraction module in the thermal error prediction model to obtain a thermal error prediction result of the ball screw feed system output by the feature relationship extraction module; wherein the feature relationship extraction module is used to extract the feature relationship between the thermal error data, temperature data and position data according to the encoding result.

[0077] Specifically, after obtaining the thermal error data, temperature data and position data, the thermal error data, temperature data and position data are input into the dimensionality increase module in the thermal error prediction model to obtain a three-dimensional tensor output by the dimensionality increase module; the three-dimensional tensor is then input into the hidden feature extraction module in the thermal error prediction model to obtain a special tensor output by the hidden feature extraction module; the special tensor is then input into the position encoding module in the thermal error prediction model to obtain an encoding result output by the position encoding module; the encoding result is input into the feature relationship extraction module in the thermal error prediction model, and the feature relationship extraction module extracts the feature relationship between the thermal error data, temperature data and position data from the encoding result, and then further iteratively calculates the weighted attention according to the feature relationship, and obtains the thermal error prediction result of the ball screw feed system output by the feature relationship extraction module through a fully connected layer.

[0078] The position coding module performs position coding calculations as shown in formulas (3) and (4).

[0079] (3) (4) In formula (3) and formula (4), Represents the position in the input special tensor (that is, the position of thermal error data, temperature data, and position data in the special tensor), represents the dimension of the input special tensor, The dimensionality of the positional data in the special tensor representing the input. The dimension of the special tensor is Time position The encoding result of the data is The dimension of the special tensor is Time position The encoding result of the data.

[0080] In a specific embodiment, the training steps of the thermal error prediction model include the following: obtaining thermal error sample data, temperature sample data and position sample data; inputting the thermal error sample data, temperature sample data and position sample data into the thermal error basic prediction model to obtain an initial thermal error prediction result output by the thermal error basic prediction model; repeatedly iteratively optimizing the thermal error basic prediction model according to the initial thermal error prediction result to obtain a thermal error prediction model.

[0081] In this step, before training the thermal error model, initial data is obtained. The initial data includes a test set and a training set. The ratio of the test set to the training set is 1:1. The test set includes thermal error data, temperature data, and position data; the training set includes thermal error sample data, temperature sample data, and position sample data. The thermal error sample data, temperature sample data, and position sample data are obtained based on the same processing method as the above steps 201 to 204, and will not be repeated here.

[0082] Specifically, in the process of training the thermal error prediction model, the acquired thermal error sample data, temperature sample data and position sample data are input into the thermal error basic prediction model to obtain the initial thermal error prediction result output by the thermal error basic prediction model; the thermal error basic prediction model is repeatedly iteratively optimized according to the initial thermal error prediction result to obtain the thermal error prediction model.

[0083] In this step, the thermal error basic prediction model includes the TCN convolutional neural network basic model, the basic multi-head attention mechanism, and the basic position encoding.

[0084] In one embodiment, Figure 4 This is a flow chart of the model training process provided by the present invention, such as Figure 4 As shown, the training process of the thermal error prediction model specifically includes step 401, step 402, step 403, step 404, step 405, step 406 and step 407.

[0085] Step 401: Acquire thermal error sample data, temperature sample data, and position sample data.

[0086] Specifically, thermal error sample data, temperature sample data and position sample data are obtained, and the thermal error sample data, temperature sample data and position sample data are used as training sets, so as to obtain a thermal error prediction model based on subsequent training steps.

[0087] Step 402: Optimize the TCN convolutional neural network basic model.

[0088] Specifically, the training sets of thermal error sample data, temperature sample data and position sample data are input into the TCN convolutional neural network basic model, and the TCN convolutional neural network basic model is optimized based on BO to obtain the first result output by the TCN convolutional neural network basic model.

[0089] Step 403: Result encoding.

[0090] Specifically, after obtaining the first result output by the TCN convolutional neural network basic model, the first result is position-encoded through basic position coding to obtain the second result.

[0091] Step 404: Weight calculation.

[0092] Specifically, after obtaining the second result output by the basic position encoding, the attention weight of the second result is calculated through the basic multi-head attention mechanism to obtain the third result.

[0093] Step 405: Model training.

[0094] Specifically, after obtaining the third result output by the basic attention mechanism, the thermal error basic prediction model is optimized and trained according to the third result to obtain an initial thermal error prediction result.

[0095] Step 406: Determine whether the training is finished.

[0096] Specifically, after obtaining the initial thermal error prediction result, it is determined whether the training is completed. If it is determined that the initial thermal error prediction result does not meet the result threshold, it is determined that the training is not completed, and the process returns to step 405. Through repeated iterative optimization, the process continues until the initial thermal error prediction result meets the result threshold, and then the process continues to step 407.

[0097] Step 407: Obtain a thermal error prediction model.

[0098] Specifically, when it is determined that the initial thermal error prediction result meets the result threshold, it is determined that the model training is completed and the thermal error prediction model is obtained.

[0099] The result threshold is a pre-set threshold for model training judgment, which is not limited in this embodiment.

[0100] The benefits of this setup include high computational efficiency, good stability, and high model accuracy, as well as support for parallel feature processing. Optimizing hyperparameters through BO and integrating the attention mechanism with deep neural networks avoids gradient explosion and training redundancy, improving model training efficiency and accuracy.

[0101] In a specific embodiment, after obtaining a trained thermal error prediction model, a test set (thermal error test data, temperature test data, and position test data) is further obtained, and the thermal error prediction model is tested using the test set. The thermal error test data, temperature test data, and position test data (test set) are input into the thermal error prediction model to obtain a test result of the ball screw feed system output by the thermal error prediction model. After obtaining the test result, the prediction accuracy of the thermal error prediction model is evaluated using the test result and an evaluation index. Figure 5 It is a flow chart of the model test provided by the present invention, such as Figure 5 As shown, it specifically includes step 501, step 502 and step 503.

[0102] Step 501: Obtain a test set.

[0103] Step 502: Input the test set into the thermal error prediction model to obtain the test results.

[0104] Step 503: After obtaining the test results, the prediction accuracy of the thermal error prediction model is evaluated based on the test results and the evaluation index.

[0105] In this step, the evaluation indicators may include, for example, mean absolute error (MAE), root mean square error (RMSE), and coefficient of determination (R-Square, ), this embodiment does not limit this.

[0106] The calculation of is shown in formula (5), the calculation of RMSE is shown in formula (6), and the calculation of MAE is shown in formula (7).

[0107] (5) In formula (5), represents the residual sum of squares, Represents the total sum of variances of the test results.

[0108] (6) In formula (6), Indicates the total number of samples in the input test set, Representation sample The actual error result is Indicates the test result of the error.

[0109] (7) In formula (7), Indicates the total number of samples in the input test set, Representation sample The actual error result is Indicates the test result of the error.

[0110] In a specific embodiment, the thermal error basic prediction model is repeatedly iteratively optimized according to the initial thermal error prediction result to obtain the thermal error prediction model, including: after obtaining the initial thermal error prediction result, determining whether the number of model iterations is equal to a number threshold; when the number of model iterations is equal to the number threshold, obtaining the optimized hyperparameters; obtaining the thermal error prediction model according to the optimized hyperparameters and the thermal error basic prediction model; when the number of model iterations is less than the number threshold, determining whether the initial thermal error prediction result is less than the result threshold; when the initial thermal error prediction result is less than the result threshold, updating the optimized hyperparameters, and optimizing the thermal error prediction model according to the updated optimized hyperparameters and the thermal error basic prediction model. The thermal error prediction model is obtained by the model; when the initial thermal error prediction result is greater than or equal to the result threshold, the optimization hyperparameters are changed according to the Bayesian algorithm, and the thermal error basic prediction model is updated, and the thermal error sample data, temperature sample data and position sample data are iteratively optimized according to the updated thermal error basic prediction model to obtain the initial thermal error prediction result after iterative optimization, and the execution is continued to return to determine whether the number of model iterations is equal to the number threshold after obtaining the initial thermal error prediction result, until the number of model iterations is equal to the number threshold or the initial thermal error prediction result after iterative optimization is less than the result threshold, the optimization is stopped to obtain the thermal error prediction model.

[0111] Specifically, Figure 6 This is a flow chart of the model optimization provided by the present invention, such as Figure 6 , specifically including step 601, step 602, step 603, step 604, step 605, step 606 and step 607.

[0112] Step 601: Determine an initial thermal error prediction result, and determine an evaluation index based on the initial thermal error prediction result.

[0113] Step 602: Determine whether the number of model iterations is equal to a threshold number.

[0114] Specifically, after obtaining the initial thermal error prediction result, it is determined whether the number of model iterations is equal to the number threshold. If so, the process proceeds to step 603. It is further determined whether the number of model iterations is less than the number threshold. If so, the process proceeds to step 605.

[0115] Step 603: Obtain optimized hyperparameters.

[0116] Specifically, when the number of model iterations is equal to the number threshold, the optimized hyperparameters are obtained.

[0117] Step 604: Obtain a thermal error prediction model based on the optimized hyperparameters and the thermal error basic prediction model.

[0118] Step 605: Determine whether the evaluation index is less than the result threshold.

[0119] Specifically, when the number of model iterations is less than the number threshold, determine whether the evaluation index is less than the result threshold. If the evaluation index is less than the result threshold, continue to step 606; if the evaluation index is greater than or equal to the result threshold, continue to step 607.

[0120] Step 606: Update and optimize hyperparameters.

[0121] Specifically, when the evaluation index is less than the result threshold, the optimization hyperparameters and the evaluation index are updated, and the process returns to step 604 to obtain a thermal error prediction model based on the updated optimization hyperparameters and the thermal error basic prediction model.

[0122] Step 607: Change the optimization hyperparameters according to the Bayesian algorithm, iteratively optimize the thermal error basic prediction model according to the changed optimization hyperparameters, and continue to process the training set according to the iteratively optimized thermal error basic prediction model.

[0123] Specifically, when the evaluation index is greater than or equal to the result threshold, the optimization hyperparameters are changed according to the Bayesian algorithm, and the thermal error basic prediction model is iteratively optimized according to the changed optimization hyperparameters. The training set such as thermal error sample data, temperature sample data and position sample data is continued to be processed according to the iteratively optimized thermal error basic prediction model, and the initial thermal error prediction result is continued to be determined, and step 601 is continued to be executed until the number of model iterations is equal to the number threshold, or the evaluation index is determined according to the initial thermal error prediction result. When the evaluation index is less than the result threshold, the optimization hyperparameters and the evaluation index are updated, and the thermal error prediction model is continued to be obtained according to the updated optimization hyperparameters and the thermal error basic prediction model, thereby obtaining a trained thermal error prediction model.

[0124] In a specific embodiment, the thermal error prediction model BO-TCN-MHA is exemplarily compared and verified with the existing multilayer perceptron (MLP) model and support vector regression (SVR).

[0125] Table 1 shows the position data for the lead screw at 0 millimeters (mm), 210 mm, and 420 mm.

[0126] As shown in Table 1, the units of MAE and RMSE are micrometers (μm), and the unit of position data is millimeters (mm).

[0127] The test set data is imported into the thermal error prediction model BO-TCN-MHA to test the prediction accuracy of the thermal error prediction model BO-TCN-MHA, and compared with the prediction results of the MLP and SVR models. The results show that the thermal error prediction model BO-TCN-MHA has higher accuracy, as shown in Table 1. As can be seen from Table 1, the thermal error prediction model BO-TCN-MHA has higher accuracy.

[0128] Table 1

[0129] In summary, the thermal error prediction model BO-TCN-MHA of this scheme is different from the traditional static model that only considers the relationship between temperature and thermal deformation at the current moment. This thermal error prediction model BO-TCN-MHA is a dynamic model that effectively extracts the time series information characteristics of the thermal error of the feed system through TCN and considers the influence of temperature on thermal deformation over a period of time.

[0130] The present invention provides a thermal error prediction method for a ball screw feed system, which obtains thermal error data, temperature data and position data of the ball screw feed system within a preset time period under different working conditions; wherein the thermal error data represents the error between the screw, front bearing and rear bearing of the ball screw feed system during operation, the temperature data is used to represent the heat generation of the ball screw feed system during operation, and the position data is used to represent the position of the workbench of the ball screw feed system during operation; the thermal error data, temperature data and position data are input into a thermal error prediction model to obtain a thermal error prediction result of the ball screw feed system output by the thermal error prediction model; wherein the thermal error prediction model is trained based on thermal error sample data, temperature sample data and position sample data, and the thermal error prediction model is a model used to extract the characteristic relationship between thermal error data, temperature data and position data to determine the thermal error prediction result. The technical solution of the present invention is used to solve the problem that in the prior art, thermal errors are predicted through static models, which only considers the relationship between the current temperature and the current thermal deformation, and ignores the influence of the temperature at previous times. Therefore, there is a defect of inaccurate thermal error prediction caused by temperature changes. A dynamic thermal error prediction model is obtained by training based on thermal error sample data, temperature sample data and position sample data obtained based on time series. The characteristic relationship between thermal error data, temperature data and position data is extracted based on the thermal error prediction model. According to the characteristic relationship, the influence of temperature data and position data on the thermal error data of the ball screw feed system over a period of time is considered, thereby obtaining a thermal error prediction result and improving the prediction accuracy.

[0131] The thermal error prediction device of the ball screw feed system provided by the present invention is described below. The thermal error prediction device of the ball screw feed system described below and the thermal error prediction method of the ball screw feed system described above can be referred to each other.

[0132] Figure 7 This is a schematic diagram of the structure of the thermal error prediction device of the ball screw feed system provided by the present invention, referring to Figure 7 As shown, the thermal error prediction device 700 of the ball screw feed system includes: a data acquisition module 701 and an error prediction module 702.

[0133] The data acquisition module 701 is used to obtain the thermal error data, temperature data and position data of the ball screw feed system within a preset time period under different working conditions; wherein the thermal error data represents the error between the screw, front bearing and rear bearing of the ball screw feed system during operation, the temperature data is used to represent the heating condition of the ball screw feed system during operation, and the position data is used to represent the position of the workbench of the ball screw feed system during operation.

[0134] The error prediction module 702 is used to input thermal error data, temperature data and position data into the thermal error prediction model to obtain the thermal error prediction result of the ball screw feed system output by the thermal error prediction model; wherein, the thermal error prediction model is trained based on the thermal error sample data, temperature sample data and position sample data, and the thermal error prediction model is a model used to extract the characteristic relationship between the thermal error data, temperature data and position data to determine the thermal error prediction result.

[0135] In an exemplary embodiment, the data acquisition module 701 is specifically used to: obtain candidate thermal error data of the ball screw feed system under different working conditions; obtain candidate temperature data of the ball screw feed system under different working conditions; obtain candidate position data of the ball screw feed system under different working conditions; and normalize the candidate thermal error data, candidate temperature data and candidate position data respectively to obtain thermal error data, temperature data and position data.

[0136] In an exemplary embodiment, the data acquisition module 701 acquires candidate thermal error data of the ball screw feed system under different working conditions, and is specifically used to: acquire geometric error results of the ball screw feed system under different working conditions; wherein the geometric error result is a result obtained by performing error measurement on the ball screw feed system according to standard provisions; acquire positioning error results of the ball screw feed system; wherein the positioning error result is a result of performing error measurement on measurement points at different times by segmenting the screw stroke in the ball screw feed system using a laser interferometer; and determine candidate thermal error data based on the difference between the positioning error result and the geometric error result.

[0137] In an exemplary embodiment, the data acquisition module 701 acquires candidate temperature data of the ball screw feed system under different working conditions, and is specifically used to: acquire an initial temperature data set of the ball screw feed system under different working conditions; wherein the initial temperature data set includes initial temperature data of at least two measurement points in the ball screw feed system; cluster the initial temperature data to obtain a temperature cluster data set; wherein the temperature cluster data set includes at least two types of temperature cluster data; acquire thermal deformation parameters; wherein the thermal deformation parameters are used to represent the thermal deformation of the front bearing, rear bearing and screw of the ball screw feed system; determine the correlation coefficient between the thermal deformation parameters and the initial temperature data of any measurement point; select a temperature cluster data from each type of temperature cluster data in the temperature cluster data set according to the correlation coefficient to obtain candidate temperature data.

[0138] In an exemplary embodiment, the error prediction module 702 is specifically used to: input thermal error data, temperature data and position data into a dimension upgrading module in a thermal error prediction model to obtain a three-dimensional tensor output by the dimension upgrading module; input the three-dimensional tensor into a hidden feature extraction module in the thermal error prediction model to obtain a special tensor output by the hidden feature extraction module; input the special tensor into a position encoding module in the thermal error prediction model to obtain an encoding result output by the position encoding module; input the encoding result into a feature relationship extraction module in the thermal error prediction model to obtain a thermal error prediction result of the ball screw feed system output by the feature relationship extraction module; wherein the feature relationship extraction module is used to extract the feature relationship between the thermal error data, temperature data and position data according to the encoding result.

[0139] In an exemplary embodiment, the apparatus further includes a model training module. The model training module is configured to: obtain thermal error sample data, temperature sample data, and position sample data; input the thermal error sample data, temperature sample data, and position sample data into a basic thermal error prediction model to obtain an initial thermal error prediction result output by the basic thermal error prediction model; and iteratively optimize the basic thermal error prediction model based on the initial thermal error prediction result to obtain a thermal error prediction model.

[0140] In an exemplary embodiment, the model training module repeatedly iteratively optimizes the thermal error basic prediction model according to the initial thermal error prediction result to obtain the thermal error prediction model, and is specifically used to: after obtaining the initial thermal error prediction result, determine whether the number of model iterations is equal to the number threshold; when the number of model iterations is equal to the number threshold, obtain the optimized hyperparameters; obtain the thermal error prediction model according to the optimized hyperparameters and the thermal error basic prediction model; when the number of model iterations is less than the number threshold, determine whether the initial thermal error prediction result is less than the result threshold; when the initial thermal error prediction result is less than the result threshold, update the optimized hyperparameters, and according to the updated optimized hyperparameters and the thermal error basic prediction model, obtain the thermal error prediction model. The thermal error prediction model is obtained by using the basic prediction model; when the initial thermal error prediction result is greater than or equal to the result threshold, the optimization hyperparameters are changed according to the Bayesian algorithm, and the thermal error basic prediction model is updated, and the thermal error sample data, temperature sample data and position sample data are iteratively optimized according to the updated thermal error basic prediction model to obtain the initial thermal error prediction result after iterative optimization, and the execution is continued to return to determine whether the number of model iterations is equal to the number threshold after obtaining the initial thermal error prediction result, until the number of model iterations is equal to the number threshold or the initial thermal error prediction result after iterative optimization is less than the result threshold, the optimization is stopped to obtain the thermal error prediction model.

[0141] The device of this embodiment can be used to execute the method of any embodiment in the embodiment of the thermal error prediction method side of the ball screw feed system. Its specific implementation process and technical effects are similar to those in the embodiment of the thermal error prediction method side of the ball screw feed system. For details, please refer to the detailed introduction in the embodiment of the thermal error prediction method side of the ball screw feed system, which will not be repeated here.

[0142] Figure 8 Schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 8 As shown, the electronic device may include: a processor 810 , a communication interface 820 , a memory 830 and a communication bus 840 , wherein the processor 810 , the communication interface 820 and the memory 830 communicate with each other via the communication bus 840 . The processor 810 can call the logic instructions in the memory 830 to execute the thermal error prediction method of the ball screw feed system, which includes: obtaining thermal error data, temperature data and position data of the ball screw feed system within a preset time period under different working conditions; wherein the thermal error data represents the error between the screw, front bearing and rear bearing of the ball screw feed system during operation, the temperature data is used to represent the heat generation of the ball screw feed system during operation, and the position data is used to represent the position of the workbench of the ball screw feed system during operation; the thermal error data, temperature data and position data are input into the thermal error prediction model to obtain the thermal error prediction result of the ball screw feed system output by the thermal error prediction model; wherein the thermal error prediction model is trained based on thermal error sample data, temperature sample data and position sample data, and the thermal error prediction model is a model used to extract the characteristic relationship between thermal error data, temperature data and position data to determine the thermal error prediction result.

[0143] Furthermore, the logic instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product, stored in a storage medium, includes instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0144] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the thermal error prediction method of the ball screw feed system provided by the above methods, the method including: obtaining thermal error data, temperature data and position data of the ball screw feed system within a preset time period under different working conditions; wherein the thermal error data represents the error between the screw, front bearing and rear bearing of the ball screw feed system during operation, the temperature data is used to represent the heat generation of the ball screw feed system during operation, and the position data is used to represent the position of the worktable of the ball screw feed system during operation; the thermal error data, temperature data and position data are input into a thermal error prediction model to obtain a thermal error prediction result of the ball screw feed system output by the thermal error prediction model; wherein the thermal error prediction model is trained based on thermal error sample data, temperature sample data and position sample data, and the thermal error prediction model is a model used to extract the characteristic relationship between thermal error data, temperature data and position data to determine the thermal error prediction result.

[0145] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the thermal error prediction method of the ball screw feed system provided by the above-mentioned methods, the method comprising: obtaining thermal error data, temperature data and position data of the ball screw feed system within a preset time period under different working conditions; wherein the thermal error data represents the error between the screw, front bearing and rear bearing of the ball screw feed system during operation, the temperature data is used to represent the heat generation of the ball screw feed system during operation, and the position data is used to represent the position of the workbench of the ball screw feed system during operation; the thermal error data, temperature data and position data are input into a thermal error prediction model to obtain a thermal error prediction result of the ball screw feed system output by the thermal error prediction model; wherein the thermal error prediction model is trained based on thermal error sample data, temperature sample data and position sample data, and the thermal error prediction model is a model for extracting the characteristic relationship between thermal error data, temperature data and position data to determine the thermal error prediction result.

[0146] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0147] Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a necessary general-purpose hardware platform, or of course, hardware. Based on this understanding, the essence of the above technical solution, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for causing a computer device (such as a personal computer, server, or network device) to execute the methods described in each embodiment or certain portions of the embodiments.

[0148] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A method for predicting thermal errors of a ball screw feed system, characterized in that: include: Acquiring thermal error data, temperature data, and position data of the ball screw feed system within a preset time period under different operating conditions; wherein the thermal error data indicates the error between the ball screw, the front bearing, and the rear bearing of the ball screw feed system during operation; the temperature data indicates the heating of the ball screw feed system during operation; and the position data indicates the position of the worktable of the ball screw feed system during operation; The thermal error data, the temperature data and the position data are input into a thermal error prediction model to obtain a thermal error prediction result of the ball screw feed system output by the thermal error prediction model; wherein, the thermal error prediction model is trained based on the thermal error sample data, the temperature sample data and the position sample data, and the thermal error prediction model is a model for extracting the characteristic relationship between the thermal error data, the temperature data and the position data to determine the thermal error prediction result.

2. The thermal error prediction method of the ball screw feed system according to claim 1, characterized in that: The obtaining of thermal error data, temperature data, and position data of the ball screw feed system within a preset time period under different working conditions includes: obtaining candidate thermal error data of the ball screw feed system under different working conditions; obtaining candidate temperature data of the ball screw feed system under different working conditions; Acquiring candidate position data of the ball screw feed system under different working conditions; Normalization processing is performed on the candidate thermal error data, the candidate temperature data, and the candidate position data respectively to obtain the thermal error data, the temperature data, and the position data.

3. The thermal error prediction method of the ball screw feed system according to claim 2, characterized in that: The obtaining of candidate thermal error data of the ball screw feed system under different working conditions includes: Obtaining geometric error results of the ball screw feed system under different working conditions; wherein the geometric error results are obtained by measuring the error of the ball screw feed system according to standard regulations; Obtaining a positioning error result of the ball screw feed system; wherein the positioning error result is a result of measuring the error at different measurement points at different times by segmenting the screw stroke in the ball screw feed system using a laser interferometer; The candidate thermal error data is determined according to a difference between the positioning error result and the geometric error result.

4. The thermal error prediction method of the ball screw feed system according to claim 2, characterized in that: The obtaining of candidate temperature data of the ball screw feed system under different working conditions includes: Acquire an initial temperature data set of the ball screw feed system under different working conditions; wherein the initial temperature data set includes initial temperature data of at least two measurement points in the ball screw feed system; Clustering the initial temperature data to obtain a temperature cluster data set; wherein the temperature cluster data set includes at least two types of temperature cluster data; Obtaining thermal deformation parameters; wherein the thermal deformation parameters are used to represent the thermal deformation of the front bearing, the rear bearing and the screw of the ball screw feed system; determining a correlation coefficient between the thermal deformation parameter and the initial temperature data of any of the measurement points; One temperature cluster data is selected from each type of the temperature cluster data in the temperature cluster data set according to the correlation coefficient to obtain the candidate temperature data.

5. The thermal error prediction method of a ball screw feed system according to any one of claims 1 to 4, characterized in that: Inputting the thermal error data, the temperature data, and the position data into a thermal error prediction model to obtain a thermal error prediction result of the ball screw feed system output by the thermal error prediction model includes: Inputting the thermal error data, the temperature data and the position data into a dimension-increasing module in the thermal error prediction model to obtain a three-dimensional tensor output by the dimension-increasing module; Inputting the three-dimensional tensor into a hidden feature extraction module in the thermal error prediction model to obtain a special tensor output by the hidden feature extraction module; Inputting the special tensor into a position encoding module in the thermal error prediction model to obtain an encoding result output by the position encoding module; The encoding result is input into the feature relationship extraction module in the thermal error prediction model to obtain the thermal error prediction result of the ball screw feed system output by the feature relationship extraction module; wherein the feature relationship extraction module is used to extract the feature relationship between the thermal error data, the temperature data and the position data according to the encoding result.

6. The thermal error prediction method of the ball screw feed system according to claim 1, characterized in that: The training steps of the thermal error prediction model include the following: acquiring the thermal error sample data, the temperature sample data, and the position sample data; Inputting the thermal error sample data, the temperature sample data, and the position sample data into a thermal error basic prediction model to obtain an initial thermal error prediction result output by the thermal error basic prediction model; The thermal error basic prediction model is repeatedly iteratively optimized according to the initial thermal error prediction result to obtain the thermal error prediction model.

7. The thermal error prediction method of the ball screw feed system according to claim 6, characterized in that: The step of repeatedly iteratively optimizing the thermal error basic prediction model according to the initial thermal error prediction result to obtain the thermal error prediction model includes: After obtaining the initial thermal error prediction result, determining whether the number of model iterations is equal to a number threshold; When the number of model iterations is equal to the number threshold, obtaining optimized hyperparameters; Obtaining the thermal error prediction model according to the optimized hyperparameters and the thermal error basic prediction model; When the number of model iterations is less than the number threshold, determining whether the initial thermal error prediction result is less than a result threshold; When the initial thermal error prediction result is less than the result threshold, updating the optimization hyperparameters, and obtaining the thermal error prediction model according to the updated optimization hyperparameters and the thermal error basic prediction model; When the initial thermal error prediction result is greater than or equal to the result threshold, the optimization hyperparameter is changed according to the Bayesian algorithm, and the thermal error basic prediction model is updated. The thermal error sample data, the temperature sample data and the position sample data are continuously iteratively optimized according to the updated thermal error basic prediction model to obtain the initial thermal error prediction result after iterative optimization, and the step of determining whether the number of model iterations is equal to the number threshold after obtaining the initial thermal error prediction result is continued to be returned to execute until the number of model iterations is equal to the number threshold or the initial thermal error prediction result after iterative optimization is less than the result threshold, then the optimization is stopped to obtain the thermal error prediction model.

8. A thermal error prediction device for a ball screw feed system, characterized in that: include: a data acquisition module, configured to acquire thermal error data, temperature data, and position data of the ball screw feed system within a preset time period under different operating conditions; wherein the thermal error data indicates the error between the ball screw, the front bearing, and the rear bearing of the ball screw feed system during operation; the temperature data indicates the heating of the ball screw feed system during operation; and the position data indicates the position of the worktable of the ball screw feed system during operation; An error prediction module is used to input the thermal error data, the temperature data and the position data into a thermal error prediction model to obtain a thermal error prediction result of the ball screw feed system output by the thermal error prediction model; wherein, the thermal error prediction model is trained based on the thermal error sample data, the temperature sample data and the position sample data, and the thermal error prediction model is a model used to extract the characteristic relationship between the thermal error data, the temperature data and the position data to determine the thermal error prediction result.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the thermal error prediction method of the ball screw feed system according to any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the thermal error prediction method of the ball screw feed system according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Modeling method capable of predicting temperature rise and thermal error of ball screw

    CN113591339A

  • Numerical control machine tool feed shaft lead screw thermal error modeling method based on HPO-SVR

    CN116820025A

  • Die bonder thermal error prediction method and device, equipment and storage medium

    CN119272628A

  • Die bonder thermal error prediction method, device, storage medium and system

    CN120256810A

  • Method, device and recording medium for predicting thermal errors in feed axes of machine tools

    JP7272612B1