Methods, devices, equipment and storage media for predicting thermal errors in machine tools

By acquiring the current operating data of CNC machine tools and using classification models and index lists to predict the thermal error values ​​of CNC machine tools, the problem of the inability to effectively predict thermal errors in existing technologies is solved, thereby improving the machining accuracy of CNC machine tools.

CN115470842BActive Publication Date: 2026-04-03XY HUST ADVANCED MFG ENG RES INST +2
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-24
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing technologies cannot effectively predict thermal error values ​​based on the actual machining conditions of CNC machine tools, resulting in insufficient machining accuracy.

Method used

By acquiring the current working condition data of the CNC machine tool, the target working condition category is obtained using a preset classification model, and the corresponding target data full vector is obtained from the index list. The thermal error value at the current moment is then predicted by combining the preset thermal error prediction model.

Benefits of technology

It improves the machining accuracy of CNC machine tools and solves the problem in existing technologies that cannot predict thermal error values ​​based on actual machining conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115470842B_ABST
    Figure CN115470842B_ABST
Patent Text Reader

Abstract

This invention discloses a method, apparatus, device, and storage medium for predicting machine tool thermal errors. The method includes: acquiring current operating condition data of a CNC machine tool and obtaining a target operating condition expression vector based on previous operating condition data; obtaining a target operating condition category corresponding to the target operating condition expression vector through a preset classification model; obtaining the corresponding target data full vector from a preset index list according to the index value of the target operating condition expression vector contained in the target operating condition category; obtaining a preset thermal error prediction model corresponding to the target data full vector according to the target operating condition category; and obtaining the thermal error value of the CNC machine tool at the current moment based on the target data full vector and the preset thermal error prediction model. Because this invention obtains the operating condition expression vector from the current operating condition data of the CNC machine tool, and then obtains the thermal error value of the CNC machine tool based on the data full vector corresponding to the operating condition expression vector and the thermal error prediction model, it achieves the prediction of thermal error values ​​based on the actual machining state of the CNC machine tool.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of CNC machine tool technology, and in particular to a method, device, equipment and storage medium for predicting machine tool thermal errors. Background Technology

[0002] Thermal error is a major factor affecting the precision manufacturing of vertical CNC machining centers. Studies on the machining process of machine tool spindles have found that thermal errors caused by thermal deformation account for 40% to 70% of the total machining error of machine tools. Moreover, the more precise the machine tool, the greater the proportion of thermal error. Therefore, machine tool thermal error compensation technology remains a key focus and challenge in current research.

[0003] In existing technologies, to reduce the thermal error of CNC machine tools, the thermal error value during operation can be calculated using the thermal error compensation method, and then the error correction function of the CNC system software can be used. However, because the existing thermal error compensation method is a single-factor function relationship between thermal deformation and temperature, the collected temperature data is too singular and insufficient to comprehensively reflect the actual machining situation of the machine tool, thus failing to accurately predict the thermal error value. Therefore, how to predict the thermal error value based on the actual machining state of the CNC machine tool has become an urgent problem to be solved.

[0004] The above content is only used to help understand the technical solution of the present invention and does not represent an admission that the above content is prior art. Summary of the Invention

[0005] The main objective of this invention is to provide a method, apparatus, device, and storage medium for predicting thermal errors in machine tools, aiming to solve the technical problem in the prior art that thermal error values ​​cannot be predicted based on the actual machining state of CNC machine tools.

[0006] To achieve the above objectives, the present invention provides a method for predicting machine tool thermal errors, the method comprising the following steps:

[0007] Obtain the current working condition data of the CNC machine tool, and obtain the target working condition expression vector based on the previous working condition data;

[0008] The target working condition category corresponding to the target working condition expression vector is obtained by using a preset classification model;

[0009] The corresponding target data vector is obtained from a preset index list based on the index value of the target working condition expression vector;

[0010] Based on the target operating condition category, obtain the preset thermal error prediction model corresponding to the full vector of the target data;

[0011] The thermal error value of the CNC machine tool at the current moment is obtained based on the target data full vector and the preset thermal error prediction model.

[0012] Optionally, before the step of acquiring the current working condition data of the CNC machine tool and acquiring the target working condition expression vector based on the previous working condition data, the method further includes:

[0013] Acquire historical operating condition data of CNC machine tools, and establish a data full vector set based on the historical operating condition data;

[0014] Obtain the corresponding set of working condition expression vectors based on the full set of data vectors;

[0015] The working condition expression vector set is clustered according to a preset feature dimension, and the target working condition data of the CNC machine tool is determined based on the data clustering results.

[0016] A preset classification model is established based on the set of working condition expression vectors and the target working condition data.

[0017] Optionally, the step of performing data clustering on the set of working condition expression vectors according to preset feature dimensions, and determining the target working condition data of the CNC machine tool based on the data clustering results, includes:

[0018] The working condition expression vectors in the set of working condition expression vectors are traversed and sampled according to a preset feature dimension;

[0019] The sampling centroid is obtained for each sampling using the K-medoids algorithm, and the distance between the remaining working condition expression vectors and the sampling centroid is determined.

[0020] The magnitudes of the distances are compared to obtain the minimum target distance;

[0021] Obtain the optimal working condition expression vector corresponding to the minimum distance of the target, and assign the optimal working condition expression vector to the working condition category represented by the sampling centroid;

[0022] At the end of the sampling process, all working condition categories are obtained;

[0023] The target working condition data of the CNC machine tool is determined based on each working condition category, the index value corresponding to the working condition expression vector in each working condition category, and the number of working condition categories.

[0024] Optionally, before the step of establishing a preset classification model based on the set of working condition expression vectors and the target working condition data, the method further includes:

[0025] Obtain the index value corresponding to each working condition category and the working condition expression vector in each working condition category from the target working condition data;

[0026] A preset index list is established based on the index value and the data full vector corresponding to the working condition expression vector.

[0027] Optionally, the step of acquiring historical operating condition data of the CNC machine tool and establishing a data full vector set based on the historical operating condition data includes:

[0028] Acquire historical operating condition data of the CNC machine tool, and obtain a data box plot of the historical operating condition data;

[0029] Outliers are identified from the box plot and the number of outliers is counted.

[0030] When the number of outliers exceeds a preset value, the historical operating data corresponding to the outliers is smoothed using a preset processing method.

[0031] A complete data vector set is established based on the processed historical operating condition data.

[0032] Optionally, after the step of establishing a preset index list based on the index value and the data full vector corresponding to the working condition expression vector, the method further includes:

[0033] The current thermal error value of the CNC machine tool is obtained based on the initial length value of the CNC machine tool spindle and the spindle thermal elongation value contained in the data full vector;

[0034] A preset thermal error prediction model is established based on the full data vector and the current thermal error value of the CNC machine tool.

[0035] Optionally, after the step of obtaining the target working condition category corresponding to the target working condition expression vector through a preset classification model, the method further includes:

[0036] The target working condition expression vector is added to the working condition expression vector set, and the model accuracy of the classification model with the target working condition expression vector added is judged.

[0037] When the accuracy of the model is greater than the preset accuracy, the preset classification model is updated.

[0038] Furthermore, to achieve the above objectives, the present invention also proposes a machine tool thermal error prediction device, the device comprising:

[0039] The working condition data acquisition module is used to acquire the current working condition data of the CNC machine tool and acquire the target working condition expression vector based on the previous working condition data;

[0040] The working condition category determination module is used to obtain the target working condition category corresponding to the target working condition expression vector through a preset classification model;

[0041] The full vector acquisition module is used to obtain the corresponding target data full vector from a preset index list based on the index value of the target working condition expression vector;

[0042] The prediction model acquisition module is used to acquire a preset thermal error prediction model corresponding to the full vector of the target data according to the target working condition category.

[0043] The thermal error prediction module is used to obtain the thermal error value of the CNC machine tool at the current moment based on the target data full vector and the preset thermal error prediction model.

[0044] Furthermore, to achieve the above objectives, the present invention also proposes a machine tool thermal error prediction device, the device comprising: a memory, a processor, and a machine tool thermal error prediction program stored in the memory and executable on the processor, the machine tool thermal error prediction program being configured to implement the steps of the machine tool thermal error prediction method as described above.

[0045] In addition, to achieve the above objectives, the present invention also proposes a storage medium storing a machine tool thermal error prediction program, wherein when the machine tool thermal error prediction program is executed by a processor, it implements the steps of the machine tool thermal error prediction method as described above.

[0046] This invention discloses a method for acquiring current operating condition data of a CNC machine tool and obtaining a target operating condition expression vector based on previous operating condition data; obtaining the target operating condition category corresponding to the target operating condition expression vector through a preset classification model; obtaining the corresponding target data full vector from a preset index list based on the index value of the target operating condition expression vector contained in the target operating condition category; obtaining a preset thermal error prediction model corresponding to the target data full vector based on the target operating condition category; and obtaining the thermal error value of the CNC machine tool at the current moment based on the target data full vector and the preset thermal error prediction model. Compared with the prior art that predicts the thermal error value of a CNC machine tool through a single-factor function relationship between thermal deformation and temperature, this invention obtains the operating condition expression vector from the current operating condition data of the CNC machine tool, then obtains the category corresponding to the operating condition expression vector according to the classification model, then obtains the data full vector corresponding to the operating condition expression vector from the index list, and finally predicts the thermal error value of the CNC machine tool at the current moment based on the data full vector and the corresponding thermal error prediction model. This solves the technical problem in the prior art that thermal error values ​​cannot be predicted based on the actual machining state of the CNC machine tool, thereby improving the machining accuracy of the CNC machine tool. Attached Figure Description

[0047] Figure 1 This is a schematic diagram of the structure of a machine tool thermal error prediction device in the hardware operating environment involved in the embodiments of the present invention;

[0048] Figure 2 This is a flowchart illustrating the first embodiment of the machine tool thermal error prediction method of the present invention;

[0049] Figure 3 Here is a schematic diagram of the preset classification model in the first embodiment of the machine tool thermal error prediction method of the present invention;

[0050] Figure 4 This is a flowchart illustrating the second embodiment of the machine tool thermal error prediction method of the present invention;

[0051] Figure 5 This is a schematic diagram of the sampling process in the second embodiment of the machine tool thermal error prediction method of the present invention;

[0052] Figure 6 This is a flowchart illustrating the third embodiment of the machine tool thermal error prediction method of the present invention;

[0053] Figure 7 This is a structural block diagram of the first embodiment of the machine tool thermal error prediction device of the present invention.

[0054] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0055] It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.

[0056] Reference Figure 1 , Figure 1 This is a schematic diagram of the structure of a machine tool thermal error prediction device in the hardware operating environment involved in the embodiments of the present invention.

[0057] like Figure 1 As shown, the machine tool thermal error prediction device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wireless-Fidelity (Wi-Fi) interface). The memory 1005 may be high-speed random access memory (RAM) or stable non-volatile memory (NVM), such as a disk storage device. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0058] Those skilled in the art will understand that Figure 1The structure shown does not constitute a limitation on the machine tool thermal error prediction device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0059] like Figure 1 As shown, the memory 1005, which serves as a storage medium, may include an operating system, a network communication module, a user interface module, and a machine tool thermal error prediction program.

[0060] exist Figure 1 In the machine tool thermal error prediction device shown, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the machine tool thermal error prediction device of the present invention can be set in the machine tool thermal error prediction device, and the machine tool thermal error prediction device calls the machine tool thermal error prediction program stored in the memory 1005 through the processor 1001 and executes the machine tool thermal error prediction method provided in the embodiment of the present invention.

[0061] This invention provides a method for predicting machine tool thermal errors, referring to... Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the machine tool thermal error prediction method of the present invention.

[0062] In this embodiment, the machine tool thermal error prediction method includes the following steps:

[0063] Step S10: Obtain the current working condition data of the CNC machine tool, and obtain the target working condition expression vector based on the previous working condition data.

[0064] It should be noted that the execution subject of the method in this embodiment can be a machine tool thermal error prediction device for predicting the thermal error of CNC machine tools, or other machine tool thermal error prediction systems that can achieve the same or similar functions and include such a machine tool thermal error prediction device. Here, the machine tool thermal error prediction method provided in this embodiment and the following embodiments will be specifically described using a machine tool thermal error prediction system (hereinafter referred to as the system).

[0065] It should be understood that the above-mentioned current operating condition data can be the working status data of the CNC machine tool at the current moment, such as: spindle speed. Data includes spindle power p, spindle current e, multi-dimensional temperature data, and the current thermal elongation value l of the spindle. In practical applications, a data acquisition platform can be deployed in the CNC machine tool, and the same acquisition zero point and acquisition frequency can be used to collect the working status data of the CNC machine tool, thereby ensuring the accuracy and real-time performance of data acquisition.

[0066] It is understandable that the above target working condition expression vector can be a vector established based on the spindle speed, spindle power, and spindle current data in the current working status data of the CNC machine tool. It is a directional expression of the spindle speed, spindle power, and spindle current data, for example:

[0067] Step S20: Obtain the target working condition category corresponding to the target working condition expression vector through a preset classification model.

[0068] It should be noted that the aforementioned preset classification model can be used to classify newly collected data. The input to this model can be a working condition expression vector, and the output can be the category label corresponding to that vector. In practical applications, the classification model can be used to classify the working condition expression vector corresponding to the current working status data of the machine tool.

[0069] It should be understood that the aforementioned target working condition category can be the category to which the target working condition expression vector belongs. The working condition category can be input into a preset classification model, and the classification model will output the target working condition category label corresponding to the target classification model. For example, the target working condition expression vector... Inputting the data into the preset classification model will output the corresponding category label (0, N).

[0070] In the specific implementation, after the target working condition category is input into the preset classification model, the classification model can calculate the Euclidean distance from the target working condition expression vector to the centroids of each category. The calculated Euclidean distances are then sorted from largest to smallest, and the centroid with the smallest distance to the target working condition expression vector is determined as the category to which the target working condition expression vector belongs. Thus, the category label corresponding to the target working condition expression vector is output. For example: if the target working condition expression vector is... The center of mass is The Euclidean distance between the target working condition expression vector and the centroid is:

[0071] Step S30: Obtain the corresponding target data full vector from the preset index list according to the index value of the target working condition expression vector.

[0072] It should be noted that the above index value can be set according to the working status data of the CNC machine tool collected at different times. The index value can be used to quickly find the status data of the CNC machine tool collected at the current time. For example, if 1 is the starting time of data collection, then the index value corresponding to the data collected at the current time is 1. The data in the row with an index value of 1 can be the temperature data, spindle current and spindle power data collected at the starting time, etc.

[0073] It should be understood that the aforementioned preset index list can be a table built based on the collected working status data of the CNC machine tool. The first column of the table can be the index value. If n sets of data are collected, the index list will have n rows. The first data in each row can be the time value of the data collection, i.e., the index value; the second data can be the temperature data; and the third data can be the spindle current data, etc. In practical applications, the working status data of the row containing the index value in the index list can be found based on the index value, thereby improving work efficiency.

[0074] It is understandable that the aforementioned target data vector can be a vector composed of spindle speed, spindle power, spindle current, multidimensional temperature data, and the current thermal expansion value of the spindle. For example, the data vector at any time i can be... Let be the spindle speed measured at time i, p be the spindle power measured at time i, e be the spindle current measured at time i, t be the temperature, n be the number of temperature data points, and l be the measured value of spindle thermal elongation measured at time i.

[0075] Step S40: Obtain the preset thermal error prediction model corresponding to the full vector of the target data according to the target working condition category.

[0076] It should be noted that the above-mentioned preset thermal error prediction model can be a pre-established model for predicting the thermal error of the CNC machine tool at the current moment.

[0077] Step S50: Obtain the thermal error value of the CNC machine tool at the current moment based on the target data full vector and the preset thermal error prediction model.

[0078] It should be understood that when predicting the thermal error value of a CNC machine tool at the current moment, it is necessary to obtain the corresponding feature data from the target data full vector, and then input the extracted feature data into the preset thermal error model, so that the preset thermal error prediction model outputs the thermal error value of the CNC machine tool at the current moment based on the extracted feature data. For example: if the target data full vector is Feature data can then be extracted from the full vector of the target data.

[0079] In practical implementation, the data acquisition platform of the CNC machine tool can collect the current working status data of the CNC machine tool. The system obtains the corresponding working condition expression vector based on the collected current working status data, and inputs the obtained working condition expression vector into a preset classification model for classification to obtain the working condition category corresponding to the working condition expression vector. Simultaneously, such as... Figure 3As shown, the corresponding full data vector can be obtained according to the index value of the working condition expression vector. Finally, the feature data in the full data vector is input into the thermal error prediction model corresponding to the full data vector to obtain the thermal error value of the CNC machine tool at the current moment.

[0080] Furthermore, in order to establish a preset classification model, before step S10 above in this embodiment, the method further includes: acquiring historical working condition data of the CNC machine tool, and establishing a data full vector set based on the historical working condition data; acquiring a corresponding working condition expression vector set based on the data full vector set; performing data clustering on the working condition expression vector set according to preset feature dimensions, and determining the target working condition data of the CNC machine tool based on the data clustering results; and establishing a preset classification model based on the working condition expression vector set and the target working condition data.

[0081] It should be noted that the above historical working condition data can be working status data collected at different times through the data acquisition platform of the CNC machine tool. In order to reduce data errors, a large amount of working status data needs to be collected.

[0082] It should be understood that the target operating condition data mentioned above can be the number of operating condition categories, the set of each operating condition category, and the set of each index value. In practical applications, historical operating condition data can be clustered to determine the number of categories, specific operating condition categories, and set of index values ​​contained in the historical operating condition data based on the clustering results.

[0083] It is understandable that when predicting the thermal error value of a CNC machine tool at the current moment, after obtaining the target working condition expression vector at the current moment, the target working condition expression vector can be added to the above-mentioned working condition expression vector set, and the model accuracy of the classification model with the added target working condition expression vector can be judged; when the model accuracy is greater than the preset accuracy, the preset classification model is updated, thereby improving the accuracy of the preset classification model and making the classification of newly collected data more accurate.

[0084] Furthermore, to improve the efficiency of data processing, the collected data needs to be denoised and normalized before data clustering. The method described in this embodiment also includes: acquiring historical operating condition data of CNC machine tools and acquiring a data box plot of the historical operating condition data; identifying outliers based on the data box plot and counting the number of outliers; when the number of outliers is greater than a preset value, smoothing the historical operating condition data corresponding to the outliers using a preset processing method; and establishing a data full vector set based on the processed historical operating condition data.

[0085] Understandably, during data processing, outlier data can be collected. If the number of outliers is less than 10, the outlier can be deleted directly. If the number of outliers is greater than 10, the outlier can be smoothed using the median, mean, or mean of nearby points from the collected historical operating data.

[0086] This embodiment discloses a method for acquiring current operating condition data of a CNC machine tool and obtaining a target operating condition expression vector based on previous operating condition data; obtaining the target operating condition category corresponding to the target operating condition expression vector through a preset classification model; obtaining the corresponding target data full vector from a preset index list based on the index value of the target operating condition expression vector contained in the target operating condition category; obtaining a preset thermal error prediction model corresponding to the target data full vector based on the target operating condition category; and obtaining the thermal error value of the CNC machine tool at the current moment based on the target data full vector and the preset thermal error prediction model. Compared with the prior art that predicts the thermal error value of the CNC machine tool through a single-factor function relationship between thermal deformation and temperature, this embodiment obtains the operating condition expression vector from the current operating condition data of the CNC machine tool, then obtains the category corresponding to the operating condition expression vector according to the classification model, then obtains the data full vector corresponding to the operating condition expression vector from the index list, and finally predicts the thermal error value of the CNC machine tool at the current moment based on the data full vector and the corresponding thermal error prediction model. This solves the technical problem in the prior art that thermal error values ​​cannot be predicted based on the actual machining state of the CNC machine tool, thereby improving the machining accuracy of the CNC machine tool. Meanwhile, preprocessing the collected historical operating data before data clustering can improve the efficiency of subsequent data processing and reduce data processing errors.

[0087] refer to Figure 4 , Figure 4 This is a flowchart illustrating the second embodiment of the machine tool thermal error prediction method of the present invention.

[0088] Based on the first embodiment described above, in order to obtain operating condition data by clustering historical operating condition data, in this embodiment, step S20 includes:

[0089] Step S01: Traverse and sample several working condition expression vectors in the set of working condition expression vectors according to the preset feature dimensions.

[0090] It should be noted that the aforementioned preset feature dimensions can be feature vectors used for data clustering. For example, they can be feature vectors... Clustering is performed based on the feature dimensions.

[0091] It should be understood that the above-mentioned traversal sampling can be performed to access each data point in the current sample data once, thereby completing the traversal of the sample data. Once all sample data has been sampled, the data in the sample will no longer be sampled again.

[0092] Step S02: Obtain the sampling centroid for each sample using the K-medoids algorithm, and determine the distance between the remaining working condition expression vectors and the sampling centroid among the plurality of working condition expression vectors.

[0093] It should be understood that selecting the sampling centroid using the K-medoids algorithm can be done by randomly selecting the centroid from the sampled samples at each sampling time.

[0094] It is understandable that the above-mentioned remaining working condition expression vector can be the remaining unsampled working condition expression vector after each sampling.

[0095] It should be noted that the above distance can be the distance from a single feature vector to the centroid of the sampled data. In practical applications, this distance can be calculated using the Euclidean distance formula. For example, if the current feature vector is... The sampling centroid is The above distances can then be calculated using the Euclidean distance formula: Calculate the distance d i .

[0096] Step S03: Compare the magnitudes of the distances to obtain the minimum target distance.

[0097] It should be understood that the aforementioned minimum target distance can be the minimum value among the distances from a single feature vector to multiple sample centroids. In practical applications, the distances from the feature vector to num sample centroids can be calculated first using Euclidean formula, and then the distance values ​​can be sorted to obtain the minimum distance.

[0098] Step S04: Obtain the optimal working condition expression vector corresponding to the minimum distance of the target, and assign the optimal working condition expression vector to the working condition category represented by the sampling centroid.

[0099] It is understandable that the above-mentioned optimal working condition expression vector can be the feature vector that is closest to the sampling centroid. The smaller the distance, the closer the feature vector is to the sampling centroid. In this case, the above-mentioned optimal working condition expression vector can be assigned to the category represented by the sampling centroid that is closest to it, thereby realizing the classification of the working condition expression vector.

[0100] Step S05: At the end of the traversal sampling, obtain all working condition categories.

[0101] It should be understood that traversal sampling can sample all working condition expression vectors in the sample, thereby classifying all working condition expression vectors in the sample. At the end of the traversal sampling, the categories of all working condition expression vectors in the sample can be obtained, that is, all working condition categories can be obtained. In practical applications, after completing one random sampling, sampling is repeated multiple times until the total number of categories no longer changes. At this point, the total number of categories can be counted.

[0102] Step S06: Determine the target working condition data of the CNC machine tool based on each working condition category, the index value corresponding to the working condition expression vector in each working condition category, and the number of working condition categories.

[0103] It is understandable that by clustering all the data in the sample using a clustering algorithm, we can obtain all the working condition categories and the index value corresponding to the working condition expression vector in each working condition category. At the same time, we can also obtain the number of working condition categories based on all the working condition categories.

[0104] In specific implementations, such as Figure 5 As shown, several full data vectors can be established based on the machine tool's working status data collected at different times, and the corresponding working condition expression vectors can be obtained from the full data vectors. For example: and The process involves traversing and sampling all working condition expression vectors as a single sample. The K-medoids algorithm is used to obtain the centroid of each sample. The Euclidean distance formula is then used to calculate the distance between the working condition expression vector and the centroid. All the calculated distance values ​​are sorted, and the minimum distance value is obtained. The working condition expression feature with the smallest distance to the centroid is assigned to the category corresponding to the centroid. By traversing and sampling, the classification of all working condition expression vectors in the sample is achieved. Based on the obtained working condition category, index value, and number of categories, the target working condition data of the CNC machine tool is determined.

[0105] Furthermore, in order to establish a preset index list, the method described above in this embodiment also includes: obtaining the index values ​​corresponding to each working condition category and the working condition expression vector in each working condition category in the target working condition data; and establishing a preset index list based on the index values ​​and the full data vector corresponding to the working condition expression vector.

[0106] This embodiment iterates and samples the operating condition expression vectors in the set of operating condition expression vectors by pre-setting feature dimensions. It then compares the distance between the operating condition expression vectors and the sampled centroids to obtain the target minimum distance. The operating condition expression vector corresponding to the minimum distance is then added to the category represented by the sampled centroid, thereby classifying all operating condition expression vectors in the sample and obtaining the target operating condition data. Since the corresponding thermal error prediction model can be obtained based on the operating condition categories in the target operating condition data, the data processing is simplified, making the established thermal error prediction model practically applicable to actual processing.

[0107] refer to Figure 6 , Figure 6 This is a flowchart illustrating the third embodiment of the machine tool thermal error prediction method of the present invention.

[0108] Based on the above embodiments, in order to establish a preset thermal error prediction model, in this embodiment, before step S10, the method further includes:

[0109] Step S401: Obtain the current thermal error value of the CNC machine tool based on the initial length value of the CNC machine tool spindle and the spindle thermal elongation value contained in the data full vector.

[0110] It should be noted that the above initial length value can be the length of the spindle measured when the CNC machine tool is stopped.

[0111] It should be understood that the above-mentioned spindle thermal elongation value can be the length of the spindle measured when the CNC machine tool is working with the corresponding current, power and speed data in the full data vector.

[0112] In practical implementation, the principal axis thermal elongation value l in the full data vector at any given time can be obtained. i At this point, the thermal error value err of the spindle at any time can be obtained based on the initial length value l0 of the spindle, where err=|l1-l i |

[0113] Step S402: Establish a preset thermal error prediction model based on the data full vector and the current thermal error value of the CNC machine tool.

[0114] It is understandable that the input to the aforementioned preset thermal error prediction model is the feature data in the full data vector, and the output is the thermal error value at any given time. For example, if the acquired full data vector is... Then it can be done through l i The thermal error value err of the spindle at any given time is obtained by combining the initial length of the spindle with the feature data. Using the thermal error value err as the input to the preset thermal error prediction model, the thermal error prediction model is established by using the preset thermal error prediction model as the output.

[0115] This embodiment obtains the current thermal error value of the CNC machine tool based on the initial length and thermal elongation value of the spindle. Then, a preset thermal error prediction model is established based on the full data vector and the thermal error value. In subsequent use, the feature data of the CNC machine tool at the current moment can be directly input into the corresponding thermal error prediction model to obtain the thermal error value at the current moment. The thermal error is then compensated for based on the thermal error value, effectively improving the machining accuracy.

[0116] Furthermore, this embodiment of the invention also proposes a storage medium storing a machine tool thermal error prediction program, which, when executed by a processor, implements the steps of the machine tool thermal error prediction method described above.

[0117] Reference Figure 7 , Figure 7 This is a structural block diagram of the first embodiment of the machine tool thermal error prediction device of the present invention.

[0118] like Figure 7 As shown, the machine tool thermal error prediction device proposed in this embodiment of the invention includes:

[0119] The working condition data acquisition module 701 is used to acquire the current working condition data of the CNC machine tool and acquire the target working condition expression vector based on the previous working condition data;

[0120] The working condition category determination module 702 is used to obtain the target working condition category corresponding to the target working condition expression vector through a preset classification model;

[0121] The full vector acquisition module 703 is used to obtain the corresponding target data full vector from a preset index list based on the index value of the target working condition expression vector;

[0122] The prediction model acquisition module 704 is used to acquire a preset thermal error prediction model corresponding to the full vector of the target data according to the target working condition category.

[0123] The thermal error prediction module 705 is used to obtain the thermal error value of the CNC machine tool at the current moment based on the target data full vector and the preset thermal error prediction model.

[0124] This embodiment of the machine tool thermal error prediction device discloses the following steps: acquiring current working condition data of a CNC machine tool, and acquiring a target working condition expression vector based on previous working condition data; acquiring the target working condition category corresponding to the target working condition expression vector through a preset classification model; acquiring the corresponding target data full vector in a preset index list based on the index value of the target working condition expression vector contained in the target working condition category; acquiring a preset thermal error prediction model corresponding to the target data full vector based on the target working condition category; and acquiring the thermal error value of the CNC machine tool at the current moment based on the target data full vector and the preset thermal error prediction model. Compared with the prior art, which predicts the thermal error value of a CNC machine tool through a single-factor function relationship between thermal deformation and temperature, this embodiment acquires the working condition expression vector through the current working condition data of the CNC machine tool, then acquires the category corresponding to the working condition expression vector according to the classification model, then acquires the data full vector corresponding to the working condition expression vector in the index list, and finally predicts the thermal error value of the CNC machine tool at the current moment based on the data full vector and the corresponding thermal error prediction model. This solves the technical problem in the prior art that thermal error values ​​cannot be predicted based on the actual machining state of the CNC machine tool, thereby improving the machining accuracy of the CNC machine tool.

[0125] Other embodiments or specific implementations of the machine tool thermal error prediction device of the present invention can be referred to the above-described method embodiments, and will not be repeated here.

[0126] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0127] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0128] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as read-only memory / random access memory, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0129] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A method for predicting thermal errors in machine tools, characterized in that, The machine tool thermal error prediction method includes: Obtain the current working condition data of the CNC machine tool, and obtain the target working condition expression vector based on the previous working condition data; The target working condition category corresponding to the target working condition expression vector is obtained by using a preset classification model; The target data vector is obtained from the preset index list based on the index value of the target working condition expression vector. The target data vector is a vector composed of spindle speed, spindle power, spindle current, multi-dimensional temperature data and the thermal elongation value of the spindle at the current moment. Based on the target operating condition category, obtain the preset thermal error prediction model corresponding to the full vector of the target data; The thermal error value of the CNC machine tool at the current moment is obtained based on the target data full vector and the preset thermal error prediction model.

2. The machine tool thermal error prediction method as described in claim 1, characterized in that, Before the step of acquiring the current working condition data of the CNC machine tool and acquiring the target working condition expression vector based on the previous working condition data, the method further includes: Acquire historical operating condition data of CNC machine tools, and establish a data full vector set based on the historical operating condition data; Obtain the corresponding set of working condition expression vectors based on the full set of data vectors; The working condition expression vector set is clustered according to a preset feature dimension, and the target working condition data of the CNC machine tool is determined based on the data clustering results. A preset classification model is established based on the set of working condition expression vectors and the target working condition data.

3. The machine tool thermal error prediction method as described in claim 2, characterized in that, The step of clustering the set of working condition expression vectors according to preset feature dimensions and determining the target working condition data of the CNC machine tool based on the data clustering results includes: The working condition expression vectors in the set of working condition expression vectors are traversed and sampled according to a preset feature dimension; The sampling centroid is obtained for each sampling using the K-medoids algorithm, and the distance between the remaining working condition expression vectors and the sampling centroid is determined. The magnitudes of the distances are compared to obtain the minimum target distance; Obtain the optimal working condition expression vector corresponding to the minimum distance of the target, and assign the optimal working condition expression vector to the working condition category represented by the sampling centroid; At the end of the sampling process, all working condition categories are obtained; The target working condition data of the CNC machine tool is determined based on each working condition category, the index value corresponding to the working condition expression vector in each working condition category, and the number of working condition categories.

4. The machine tool thermal error prediction method as described in claim 3, characterized in that, Before the step of establishing a preset classification model based on the set of working condition expression vectors and the target working condition data, the method further includes: Obtain the index value corresponding to each working condition category and the working condition expression vector in each working condition category from the target working condition data; A preset index list is established based on the index value and the data full vector corresponding to the working condition expression vector.

5. The machine tool thermal error prediction method as described in claim 2, characterized in that, The step of acquiring historical operating condition data of CNC machine tools and establishing a data full vector set based on the historical operating condition data includes: Acquire historical operating condition data of the CNC machine tool, and obtain a data box plot of the historical operating condition data; Outliers are identified from the box plot and the number of outliers is counted. When the number of outliers exceeds a preset value, the historical operating data corresponding to the outliers is smoothed using a preset processing method. A complete data vector set is established based on the processed historical operating condition data.

6. The machine tool thermal error prediction method as described in claim 4, characterized in that, After the step of establishing a preset index list based on the index value and the data full vector corresponding to the working condition expression vector, the method further includes: The current thermal error value of the CNC machine tool is obtained based on the initial length value of the CNC machine tool spindle and the spindle thermal elongation value contained in the data full vector; A preset thermal error prediction model is established based on the full data vector and the current thermal error value of the CNC machine tool.

7. The machine tool thermal error prediction method as described in claim 2, characterized in that, After the step of obtaining the target working condition category corresponding to the target working condition expression vector through a preset classification model, the method further includes: The target working condition expression vector is added to the working condition expression vector set, and the model accuracy of the classification model with the target working condition expression vector added is judged. When the accuracy of the model is greater than the preset accuracy, the preset classification model is updated.

8. A machine tool thermal error prediction device, characterized in that, The device includes: The working condition data acquisition module is used to acquire the current working condition data of the CNC machine tool and acquire the target working condition expression vector based on the previous working condition data; The working condition category determination module is used to obtain the target working condition category corresponding to the target working condition expression vector through a preset classification model; The full vector acquisition module is used to obtain the corresponding target data full vector from a preset index list based on the index value of the target working condition expression vector. The target data full vector is a vector composed of spindle speed, spindle power, spindle current, multi-dimensional temperature data, and the thermal elongation value of the spindle at the current moment. The prediction model acquisition module is used to acquire a preset thermal error prediction model corresponding to the full vector of the target data according to the target working condition category. The thermal error prediction module is used to obtain the thermal error value of the CNC machine tool at the current moment based on the target data full vector and the preset thermal error prediction model.

9. A machine tool thermal error prediction device, characterized in that, The device includes: a memory, a processor, and a machine tool thermal error prediction program stored in the memory and running on the processor, the machine tool thermal error prediction being configured to implement the steps of the machine tool thermal error prediction method as described in any one of claims 1 to 7.

10. A storage medium, characterized in that, The storage medium stores a machine tool thermal error prediction program, which, when executed by a processor, implements the steps of the machine tool thermal error prediction method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Thermal error compensation method of precise machine tool

    CN108415372A

  • Metering missing data complementing method and device and terminal equipment

    CN114461618A