Machine tool thermal error prediction modeling method and system based on symbol regression and storage medium

CN120909224APending Publication Date: 2025-11-07XIANYANG VOCATIONAL TECHN COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410549422.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-06
Publication Date
2025-11-07

Smart Images

  • Figure CN120909224A_ABST
    Figure CN120909224A_ABST
Patent Text Reader

Abstract

The invention discloses a machine tool thermal error prediction modeling method and system based on symbol regression and a storage medium, and relates to the field of numerical control machine tool thermal error compensation control. The method comprises the following steps: acquiring a source data set of a machine tool; training a thermal error model by using the source data set, and determining a model fitness function; randomly generating an initial model population; evaluating the fitting degree of each individual in the initial model population by using a fitness function, and comparing a model predicted value with a thermal error measured value in the source data set; and determining a parent model according to a fitness function evaluation result, and performing variation and crossover genetic operations to obtain a machine tool thermal error prediction model. According to the machine tool thermal error modeling method based on symbol regression, the prediction precision, robustness and generalization ability of the machine tool thermal error are improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of numerical control machine tool thermal error compensation control, more particularly to a machine tool thermal error prediction modeling method and system based on symbolic regression and a storage medium. BACKGROUND

[0002] Thermal error is the main contributor to machine tool machining size error, accounting for 40% to 70%. At present, the thermal error control of machine tools is still mainly based on traditional structural thermal optimization design and workshop temperature regulation and other measures, which are low in efficiency, high in energy consumption and cost, and cannot fully eliminate the thermal displacement at the tool center point without high cost and a large amount of physical modeling work. At the same time, the influence of uncontrollable factors such as environment on the thermal mechanical behavior of the machine tool during the machining process will result in poor active control effect of the thermal error, so the reliability and quality of the workpiece are unstable.

[0003] With the progress of sensor technology and computer technology, the thermal error compensation method has been greatly improved in terms of calculation accuracy and speed. Due to its low cost and easy implementation, it has become one of the effective ways to improve the accuracy of machine tools. The key to thermal error compensation technology lies in accurately estimating the thermal error of the machine tool. The commonly used estimation method is the prediction strategy based on the data-driven thermal error model. The implementation of this method usually requires the establishment of a relationship model between the temperature of the key points of the machine tool and the thermal error, and then the measured temperature value is input into the model to predict the thermal error. Domestic and foreign scholars have carried out a lot of fruitful research work on the modeling method of thermal error. The main modeling methods developed at present include least squares, multiple linear regression, artificial neural network and support vector machine, etc.

[0004] However, the traditional data-driven regression model such as least squares and multiple linear regression has low prediction accuracy under random working conditions. In addition, the model input selection, model structure determination and parameter identification of the traditional data-driven modeling method are carried out in series. When input selection is performed, the model structure is unknown, and the influence of the model structure is not considered. Similarly, when the model structure is selected, the input selection is unknown. It is equivalent to separate action, and then the parameter identification is carried out according to the two selection results. This method does not select the input variables according to the model structure, and the separate selection of variables is only locally optimal, and cannot achieve overall optimization.

[0005] Therefore, how to solve the above problems is an urgent research for those skilled in the art. SUMMARY

[0006] Therefore, the present application provides a machine tool thermal error prediction modeling method and system based on symbolic regression and a storage medium. The genetic programming symbolic regression modeling method can realize model input selection, parameter identification, and model structure determination in parallel and comprehensive consideration.

[0007] In order to achieve the above object, the present application adopts the following technical solutions:

[0008] A machine tool thermal error prediction modeling method based on symbolic regression, comprising the following steps:

[0009] Obtaining a source data set of a machine tool;

[0010] Training a thermal error model using the source data set and determining a model fitness function;

[0011] Randomly generating an initial model population;

[0012] Using the fitness function to evaluate the fitting degree of each individual in the initial model population, comparing the model prediction value with the thermal error measured value in the source data set;

[0013] Determining the parent model according to the fitness function evaluation result and performing mutation and crossover genetic operation to obtain a machine tool thermal error prediction model.

[0014] Optionally, the data in the source data set includes input variable feature data and thermal error data.

[0015] Optionally, the initial model population construction method is: creating an initial random model population, wherein each model is a mathematical expression, the model includes input variables, random constants and operator symbols, and the operator symbols include +, -, *, / , sin, cos and exp.

[0016] Optionally, the mutation and crossover genetic operation is to randomly select nodes of the parent model for mutation or crossover operation to generate new offspring individuals; based on a preset termination condition, it is judged whether to terminate the algorithm.

[0017] A machine tool thermal error prediction modeling system based on symbolic regression, comprising:

[0018] A source data set acquisition module for acquiring a source data set of a machine tool;

[0019] A fitness function determination module for training a thermal error model using the source data set and determining a model fitness function;

[0020] A population generation module for randomly generating an initial model population;

[0021] An individual fitting module for using the fitness function to evaluate the fitting degree of each individual in the initial model population, comparing the model prediction value with the thermal error measured value in the source data set;

[0022] A machine tool thermal error prediction module establishment module for determining the parent model according to the fitness function evaluation result and performing mutation and crossover genetic operation to obtain a machine tool thermal error prediction model.

[0023] A computer storage medium, the computer storage medium has a computer program stored thereon, the computer program is executed by a processor to realize the steps of any one of the symbol regression based machine tool thermal error prediction modeling method.

[0024] Through the above technical solutions, compared with the prior art, the symbol regression based machine tool thermal error prediction modeling method, system and storage medium have the following beneficial effects:

[0025] 1. The symbol regression based machine tool thermal error modeling method is proposed, which improves the machine tool thermal error prediction accuracy, robustness and generalization ability.

[0026] 2. The symbol regression model is used to establish an explicit mathematical formula of the longitudinal cutting automatic lathe thermal error, and the formula has interpretability. BRIEF DESCRIPTION OF DRAWINGS

[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced as follows. Obviously, the drawings in the following description are only embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of the provided drawings.

[0028] Figure 1 It is a binary tree structure of the symbol regression model.

[0029] Figure 2 It is a basic process of the symbol regression modeling.

[0030] Figure 3 It is a variation and crossover genetic operation.

[0031] Figure 4 It is a flowchart of the symbol regression based thermal error modeling method.

[0032] Figure 5 It is a temperature sensor and displacement sensor layout diagram.

[0033] Figure 6 It is a thermal error prediction curve diagram of the model in the embodiment of the symbol regression modeling method under the condition of 3000 rpm constant speed.

[0034] Figure 7 It is a thermal error prediction curve diagram of the model in the embodiment of the symbol regression modeling method under the condition of 5000 rpm constant speed and stop.

[0035] Figure 8 It is a thermal error prediction curve diagram of the model in the embodiment of the symbol regression modeling method under the condition of random speed. DETAILED DESCRIPTION

[0036] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work belong to the scope of protection of the present application.

[0037] In order to improve the prediction accuracy of thermal error model and establish a clear mathematical formula, the present application proposes a thermal error model based on symbolic regression. Temperature sensors are arranged at key temperature points of the machine tool, and a contact probe is used to measure thermal error. The collected temperature data, thermal error data and spindle speed are combined as source data, and a symbolic regression thermal error model is trained by genetic programming method. Through comparison test with the multiple linear regression model, the feasibility and effect of the method of the present application are verified. The results show that the method of the present application can more accurately predict the thermal error under the conditions of constant speed, variable speed and the like, and improve the prediction accuracy of the thermal error of the machine tool.

[0038] The embodiment of the present application discloses a machine tool thermal error prediction modeling method based on symbolic regression, comprising the following steps:

[0039] Obtaining a source data set of the machine tool;

[0040] Training the thermal error model using the source data set and determining a model fitness function;

[0041] Randomly generating an initial model population;

[0042] Using the fitness function to evaluate the fitting degree of each individual in the initial model population, and comparing the model prediction value with the thermal error measured value in the source data set;

[0043] Determining the parent model according to the fitness function evaluation result, and performing mutation and crossover genetic operation as shown in the formula Figures 1-3 to obtain the machine tool thermal error prediction model.

[0044] Further, the present application also discloses a machine tool thermal error prediction modeling system based on symbolic regression, comprising:

[0045] A source data set acquisition module for acquiring a source data set of the machine tool;

[0046] A fitness function determination module for training the thermal error model using the source data set and determining a model fitness function;

[0047] A population generation module for randomly generating an initial model population;

[0048] Individual fitness module: for evaluating the fitness of each individual in the initial model population using the fitness function, comparing the model predicted value with the thermal error measured value in the source data set;

[0049] Machine tool thermal error prediction module establishment module: for determining the parent model according to the fitness function evaluation result, and performing mutation and crossover genetic operation to obtain the machine tool thermal error prediction model.

[0050] Embodiment 1

[0051] A machine tool thermal error prediction modeling method based on symbolic regression, which is applied to a machine tool, the machine tool thermal error prediction model construction method comprising the following steps:

[0052] Step S1, obtaining the thermal error experimental data of the machine tool, and generating the source domain data by combining the input variable characteristic data and the thermal error data in the experimental data; the proposed source domain data includes thermal key point temperature time series data, environment temperature data, spindle speed data, and thermal error value of the machine tool;

[0053] Step S2, determine the temperature sensor installation position. The installation position is shown in Table 1.

[0054] Table 1

[0055]

[0056]

[0057] Step S3, determine the model fitness function.

[0058] Step S4, generate an initial model population. Create an initial random model population, where each model is a mathematical expression, and the model is composed of input variables, random constants, and +, -, *, / , sin, cos, exp, etc. Operator symbols.

[0059] Step S5, evaluate fitness. Use the fitness function to evaluate the fitness of each individual, and compare the model predicted value with the thermal error measured value.

[0060] Step S6, select the parent model. According to the results of the fitness function, select the model with the best fitness value as the parent for subsequent genetic operation.

[0061] Step S7, mutation and crossover genetic operation. Randomly select nodes for mutation or crossover operation on the previously formed parent model to generate new offspring individuals. This step can stimulate the diversity within the population and expand and explore better fitting models.

[0062] Step S8, calculate fitness and update population. Add the newly generated individuals to the population, calculate the fitness value, remove some individuals with low fitness value, and update the population.

[0063] Step S9, judge termination condition. According to the preset termination condition (such as reaching the maximum number of iterations or reaching a certain fitness threshold), it is judged whether to terminate the algorithm. If the termination condition is reached, go to step 8 to output the result. If the termination condition is not reached, loop steps 5 to 7 again until the termination condition is reached.

[0064] Step S10, output the final model. Select the individual with the best fitness as the final mathematical expression for prediction or modeling.

[0065] Example 2

[0066] The machine tool thermal error prediction modeling method is applied to a longitudinal automatic lathe. Please refer to Figure 4 , which is a flowchart of the thermal error modeling method based on symbolic regression. Figure 4

[0067] The longitudinal automatic lathe thermal error prediction modeling method includes the following steps:

[0068] Step S1, arrange and install temperature measurement sensors and thermal error sensors on the longitudinal automatic lathe, collect key point temperature time series data, thermal error data and spindle speed time series data, and generate the above data as a source data set D.

[0069] The source data set D includes 11 variables. Among them, the input variables include 9 temperature variables ΔTi and spindle speed variable N, and 1 output variable is thermal error variable y. The data set contains 4046 groups of data under 35 different working conditions.

[0070] The 9 temperature variables correspond to the temperature sensor arrangement and the installation position of the 1 thermal error measurement displacement sensor as shown in Table 1. Figure 5 and Table 1.

[0071] Step S2, based on the open source free HeuristicLab experimental platform, perform thermal error model training. (Also can be based on Python\MATLAB etc. to compile the corresponding program to realize) Input model training hyperparameters in the platform. Parameter settings are shown in Table 2.

[0072] Table 2

[0073]

[0074]

[0075] Step S3, determine the model fitness function: ​

[0076]

[0077] where m r and m e are the number of training and testing data, respectively. R2, RMSE and MAE are the coefficient of determination, root mean square error and mean absolute error, respectively.

[0078] Step S4, input source data D to HeuristicLab platform. Split training set and data set. Start running.

[0079] Step S5, platform randomly generates initial model population.

[0080] Step S6, automatically evaluate fitness. Use fitness function to evaluate the fitting degree of each individual generated, compare model predicted value with thermal error measured value in source data D.

[0081] Step S7, automatically select parent model. According to the results of fitness function, select the model with the best fitness value as the parent for subsequent genetic operation.

[0082] Step S8, mutation and crossover genetic operation. Randomly select nodes for mutation or crossover operation on the previously formed parent model to generate new offspring individuals. This step can stimulate the diversity within the population and expand and explore better fitting models.

[0083] Step S9, calculate fitness and update population. Add the newly generated individuals to the population, calculate the fitness value, remove some individuals with low fitness value, and update the population.

[0084] Step S10, judge termination condition. According to the preset termination condition (such as reaching the maximum number of iterations or reaching a certain fitness threshold), judge whether to terminate the algorithm. If the termination condition is reached, go to step 8 to output the result. If the termination condition is not reached, repeat steps 5 to 7 until the termination condition is reached.

[0085] Step S11, model training stops, output final model. Select the individual with the best fitness as the final mathematical expression for prediction or modeling.

[0086] The model obtained through the above steps is as follows:

[0087]

[0088] In order to evaluate the model, the following evaluation indicators are determined:

[0089]

[0090]

[0091]

[0092] wherein m represents the number of sampling points; y j represents the measured value of thermal error; represents the predicted value of thermal error; represents the average value of thermal error measured value.

[0093] The thermal error prediction curve of the constructed symbolic regression model under the condition of constant rotation speed of 3000 rpm is shown in FIG. 3. Figure 6

[0094] The thermal error prediction curve of the constructed symbolic regression model under the condition of constant rotation speed of 5000 rpm and after shutdown is shown in FIG. 4. Figure 7

[0095] The thermal error prediction curve of the constructed symbolic regression model under the condition of random rotation speed is shown in FIG. 5. Figure 8

[0096] Finally, the embodiment discloses a computer storage medium, and a computer program is stored on the computer storage medium. The computer program is executed by a processor to implement the steps of any one of the machine tool thermal error prediction modeling methods based on symbolic regression.

[0097] The embodiments in the specification are described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same or similar parts of each embodiment can be referred to each other. For the device disclosed by the embodiments, since it corresponds to the method disclosed by the embodiments, the description is relatively simple, and the related parts can be referred to the method part.

[0098] The above description of the disclosed embodiments enables a person skilled in the art to implement or use the present application. Various modifications to the embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.​​​

Claims

1. A machine tool thermal error prediction modeling method based on symbolic regression, characterized by, The method comprises the following steps: Obtaining a source data set of a machine tool; Training a thermal error model using the source data set and determining a model fitness function; Randomly generating an initial model population; Evaluating the fitting degree of each individual in the initial model population using the fitness function, comparing the model predicted value with the thermal error measured value in the source data set; Determining a parent model according to the fitness function evaluation result and performing mutation and crossover genetic operations to obtain a machine tool thermal error prediction model.

2. The machine tool thermal error prediction modeling method based on symbolic regression according to claim 1, characterized in that, The data in the source data set includes input variable characteristic data and thermal error data.

3. The machine tool thermal error prediction modeling method based on symbolic regression according to claim 1, characterized in that, The initial model population construction method is to create an initial random model population, wherein each model is a mathematical expression, the model includes input variables, random constants and operator symbols, and the operator symbols include +, -, *, / , sin, cos and exp.

4. The machine tool thermal error prediction modeling method based on symbolic regression according to claim 1, characterized in that, The mutation and crossover genetic operations are to randomly select nodes of the parent model to perform mutation or crossover operations to generate new child individuals; based on a preset termination condition, it is determined whether to terminate the algorithm.

5. A symbol regression based machine tool thermal error prediction modeling system, characterized by, It comprises: A source data set acquisition module for acquiring a source data set of a machine tool; A fitness function determination module for training a thermal error model using the source data set and determining a model fitness function; A population generation module for randomly generating an initial model population; An individual fitting module for evaluating the fitting degree of each individual in the initial model population using the fitness function, comparing the model predicted value with the thermal error measured value in the source data set; A machine tool thermal error prediction model establishment module for determining a parent model according to the fitness function evaluation result and performing mutation and crossover genetic operations to obtain a machine tool thermal error prediction model.

6. A computer storage medium, characterized in that The computer storage medium stores a computer program, and the computer program is executed by the processor to realize the steps of the machine tool thermal error prediction modeling method based on symbolic regression according to any one of claims 1-4.