Method for selecting temperature sensitive points using a cluster-constrained genetic algorithm
Patent Information
- Application Number
- CN202311765271.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-21
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2043-12-21
Smart Images

Figure CN117973509B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine tool thermal errors, and more particularly to a method for selecting temperature-sensitive points using a cluster-constrained genetic algorithm. Background Technology
[0002] The uneven distribution of temperature field is an important cause of machine tool thermal error. Among the deployed sensors, the temperature change at a specific location has a particularly important impact on the machine tool thermal error. The corresponding measurement location is the thermal key point or thermal sensitive point. Selecting appropriate temperature sensitive points is the first prerequisite for machine tool thermal error modeling. Usually, enough sensors are placed near the heat source of the machine tool to accurately obtain information about the machine tool temperature field. However, too many measurement point variables may affect the generalization ability of the prediction model and the calculation speed of the model, while too few temperature variables may not be able to fully express the information of the machine tool temperature field.
[0003] Cluster analysis is frequently used for screening temperature-sensitive points. For example, fuzzy clustering, grey relational analysis, and stepwise regression are used to optimize temperature measurement points. Fuzzy C-means (FCM) clustering and cluster validity are employed to obtain the best classification accuracy. K-means clustering and grey model (GM) are used to select temperature-sensitive points. Fuzzy clustering and average influence values are combined to select typical temperature variables. In general, previous studies have mostly determined temperature-sensitive points by combining cluster analysis and correlation analysis. Cluster analysis is used to group temperature points, and then the temperature point with the highest correlation to the error within each cluster is selected as the temperature-sensitive point.
[0004] Traditional methods for screening temperature-sensitive points exhibit poor model robustness and prediction accuracy under different operating conditions. This is because clustering and correlation methods only select the local optimum within each category after clustering, which is not the optimal combination of measurement points. Summary of the Invention
[0005] The purpose of this invention is to provide a method for selecting temperature-sensitive points using a cluster-constrained genetic algorithm. By generating constraints through clustering, a point must be selected from each cluster. To ensure that the newly generated feature subset in the genetic algorithm satisfies the constraints, a new population initialization and crossover method is introduced. The feature subset is evaluated using prediction data and actual thermal error data obtained at the selected point. To balance the global search and local optimization performance of the genetic algorithm, elite crossover and diversity crossover strategies are proposed. This method for selecting temperature-sensitive points is superior.
[0006] To achieve the above objectives, the technical solution adopted in this invention is as follows: a method for selecting temperature-sensitive points using a cluster-constrained genetic algorithm, comprising the following steps:
[0007] Step 1: Initialize the parameters of the constrained genetic algorithm, using a binary number of length equal to the number of temperature sensors to represent the selected measurement points;
[0008] Step 2: Perform fuzzy clustering on the temperature data. Use the fuzzy C-means algorithm (FCM) to cluster the temperature data and output a list of sensor numbers included in each category.
[0009] Step 3: Enter the genetic algorithm process. First, generate m random solutions and convert them into corresponding binary numbers.
[0010] Step 4: Evaluate the quality of each solution.
[0011] Step 5: Sort all solutions according to the corresponding evaluation index, and select the top three optimal solutions as α, β, and δ;
[0012] Step 6: Update the solution set for the entire population: cross the better "elite individuals" in the first half with the three optimal solutions with equal probability; replace the worse individuals in the second half with a new solution obtained by crossing one of the three optimal solutions and a random solution.
[0013] Step 7: Repeat steps 4-6 until the iteration is complete, and obtain the final selected temperature sensitive point.
[0014] Preferably, the evaluation of the goodness of the solution is as follows: a thermal error model is built using the temperature data selected for each solution combined with actual thermal error data, and the root mean square error (RMSE) between the predicted and actual values of the model is calculated using a 5-fold cross-validation method on 5 test sets. avg As an evaluation metric, k represents the different test sets, and m k This represents the number of points in each test set. and These represent the true value and the model's predicted value at point i on the k-th test set, respectively.
[0015]
[0016] Preferably, the thermal error model adopts the multiple linear regression (MLR) model.
[0017] The technical advantages of this invention are as follows: By generating constraints through clustering, it is stipulated that a point must be selected from each cluster. In order to ensure that the newly generated feature subset in the genetic algorithm meets the constraints, a new population initialization and crossover method is introduced. Then, after constructing the MLR model, the feature subset is evaluated using a cross-validation method based on the predicted data and actual thermal error data obtained at the selected point. Subsequently, in order to balance the global search and local optimization performance of the genetic algorithm, elite crossover and diversity crossover strategies are proposed. This temperature-sensitive point selection method is more superior. Attached Figure Description
[0018] Figure 1 This is a schematic diagram illustrating a cluster-constrained genetic algorithm used to select temperature-sensitive points.
[0019] Figure 2 This is a diagram illustrating the representation of feature subsets.
[0020] Figure 3 A diagram illustrating the method for initializing a group.
[0021] Figure 4 This is a graph of the cross-operation of clustering constraints.
[0022] Figure 5 This is a diagram illustrating the population elimination mechanism.
[0023] Figure 6 This is a rotational speed graph.
[0024] Figure 7 This is a schematic diagram of the thermal elongation of the five groups of experiments.
[0025] Figure 8 This is a graph showing the temperature changes at the temperature measurement points in Experiment 1.
[0026] Figure 9 This is a graph showing the temperature changes at the temperature measurement points in Experiment 2.
[0027] Figure 10 A comparison chart of average RMSE
[0028] Figure 11 Maximum residual comparison chart Detailed Implementation
[0029] To enable those skilled in the art to better understand the technical solution of the present invention, the present invention will be described in detail below. The description in this part is only exemplary and explanatory, and should not be used to limit the scope of protection of the present invention in any way.
[0030] Constrained Genetic Algorithm (CGA)
[0031] Feature selection, also known as variable elimination, plays a significant role in machine learning and pattern recognition. Its key function is to reduce computational burden, eliminate unnecessary information, and enhance predictive performance. Its application is particularly prevalent in managing high-dimensional datasets with a large number of variables. More precisely, the feature selection process involves obtaining a subset of feature variables from the initial dataset. These subsets not only efficiently summarize the essence of the original data but also eliminate redundant and spurious attributes. A typical feature selection process includes four basic stages: subset generation, subset evaluation, determination of stopping criteria, and result validation. This paper utilizes feature selection to select temperature-sensitive points, aiming to obtain the optimal subset from the initial temperature dataset.
[0032] Genetic Algorithm (GA) is an optimization algorithm inspired by natural selection. It is a population-based search algorithm that utilizes the concept of survival of the fittest. A new population is generated by iteratively applying genetic operations to individuals within the population. When used for feature selection, individuals in a genetic algorithm are represented as vectors of dimension (number of features) in binary space, such as... Figure 2 As shown, 1 represents selection and 0 represents no selection. Unlike traditional genetic algorithms, since the temperature measurement points have already been classified through clustering, a constraint is generated that a measurement point must be selected from each category. In this case, a constrained genetic algorithm (CGA) is proposed.
[0033] Group initialization methods such as Figure 3 As shown, random individuals are generated by selecting combinations of data points from each cluster obtained after clustering, and this process is repeated for times the population size. The fitness value of each individual is evaluated using the evaluation method described later. Borrowing the leader-follower mechanism from the Grey Wolf Optimization algorithm, the top three best individuals are updated to α, β, and δ. A novel crossover operation is proposed, where data points from the same cluster are treated as a single entity, called a gene string. Gene strings are randomly generated from individuals and combined to create new individuals.
[0034] Under the constraints of clustering, traditional cross-validation is no longer applicable; the measurement points of each category must be treated as a whole for cross-validation. For example... Figure 4 As shown, the same color represents the same cluster. Parents generate genes by randomly selecting all genes from one cluster. To balance the algorithm's convergence and diversity, individuals are sorted by fitness, and two different update strategies are applied to better and worse individuals, such as... Figure 5 As shown, the elite crossover strategy is used for the better half of the individuals. The better half of the individuals crossover with the top three individuals with equal probability, which accelerates the search for the optimal solution. In addition, in order to enhance the diversity of the population, a diversity crossover strategy is implemented. The diversity crossover strategy randomly selects one of the top three individuals with half the probability to crossover with a random individual.
[0035] The evaluation of subsets is a crucial step in feature selection. The evaluation results, also known as the individual's fitness, directly affect the quality of the final result. In this paper, the prediction accuracy of the thermal error model constructed using selected temperature data points will be used as the evaluation metric. The thermal error model chosen for this purpose is a multiple linear regression model. It is chosen because it does not require hyperparameters, is efficient in construction, and provides better interpretability, enabling it to demonstrate the linear relationship between temperature and thermal deformation.
[0036] Since selecting temperature measurement points is essentially equivalent to selecting input data for training the thermal error prediction model, to evaluate each solution, the temperature data selected for each solution is combined with actual thermal error data to build a model (the model used here is a multiple linear regression model, MLR). A 5-fold cross-validation method is used to calculate the average root mean square error (RMSE) between the predicted and actual values on the five test sets. avg As an evaluation metric, k represents the different test sets, and m k This represents the number of points in each test set. and and represent the true value and the model's predicted value at point i on the k-th test set, respectively.
[0037]
[0038] Experimental verification was conducted to obtain the temperature field during spindle operation. Twenty-two PT100 platinum resistance temperature sensors were installed on the lathe to record the bed temperature. Simultaneously, a dial indicator was used to measure the spindle's thermal expansion. During each measurement, the spindle was stopped and rotated back to its previous angle. Three sets of variable-speed thermal error experiments were designed according to ISO 230-3 standard. The speed spectrum is shown below. Figure 6 As shown, these experiments were named Experiment #1, Experiment #3, and Experiment #5, respectively. In addition, two constant-speed experiments were designed with speeds of 1500 rpm and 1000 rpm, named Experiment #2 and Experiment #4, respectively. Details of these five experiments are shown in the table below. To enhance the robustness of the model, the data from Experiment #1 (with more complex rotational speeds) and Experiment #2 (with higher rotational speeds) were selected as the training sets for subsequent modeling. The remaining three sets of data were used as the test sets under different operating conditions to verify the model's predictive performance.
[0039]
[0040] The thermal expansion of the principal shaft in the five sets of experiments is as follows: Figure 7 As shown, the thermal expansion of the spindle increases rapidly during the first hour of the experiment. The thermal expansion in both constant-speed experiments reaches its maximum at approximately 2 hours. Subsequently, the thermal expansion gradually decreases due to the drop in temperature. Furthermore, the thermal expansion in both variable-speed experiments varies with the spindle speed.
[0041] The temperature changes of the 22 temperature sensors in Experiments #1 and #2 are as follows: Figure 8 and Figure 9 As shown, the temperature points are divided into two categories. In one category, the relationship between temperature change and spindle speed change is relatively small, such as... Figure 8 As shown in (a), in another type, the temperature varies with the spindle speed, such as Figure 8As shown in (b). It is worth noting that some temperature points exhibit almost identical patterns of change, showing a high degree of collinearity, such as T16, T17, and T18.
[0042] Test comparison
[0043] To test the applicability of the cluster-constrained genetic algorithm proposed in this application for selecting temperature-sensitive points, different thermal error models, MLR, SVR, and BPNN, were established based on selected temperature data and thermal error data, respectively. In order to reduce the influence of manually set hyperparameters on the objectivity of the results, the hyperparameters of SVR and BPNN were automatically optimized using the open-source Optuna (Akiba, Sano, Yanase, Ohta, and Koyama), with the same search range and search steps.
[0044] Experimental data #1 and #2 were used to establish thermal error models. To verify the superiority of FCM-CGA (clustering constraint), temperature-sensitive points selected by FCM-CGA and FCM-GRA (fuzzy clustering combined with grey relational analysis) were used as inputs to establish the above three thermal error models. The three models established by FCM-CGA were named CGA-MLR, CGA-SVR, and CGA-BPNN, respectively, and the models established by FCM-GRA were named GRA-MLR, GRA-SVR, and GRA-BPNN, respectively.
[0045] Experimental data #3, #4, and #5 were used to test the predictive performance of the models under different operating conditions. The table below shows the root mean square error (RMSE) of the six models previously built on these three experimental datasets, with the minimum RMSE for each experimental group highlighted in bold. It can be observed that the models built using the temperature points selected by CGA exhibit superior predictive accuracy, especially CGA-BPNN, which demonstrates excellent stability on all three test datasets.
[0046]
[0047] 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 apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0048] This article uses specific examples to illustrate the principles and implementation methods of the present invention. The above examples are only for the purpose of helping to understand the method and core ideas of the present invention. The above descriptions are only preferred embodiments of the present invention. It should be noted that due to the limitations of textual expression, and the objective existence of infinite specific structures, those skilled in the art can make several improvements, modifications, or changes without departing from the principles of the present invention, and can also combine the above technical features in an appropriate manner. These improvements, modifications, changes, or combinations, or the direct application of the inventive concept and technical solution to other situations without modification, should all be considered within the scope of protection of the present invention.
Claims
1. A method for selecting temperature-sensitive points using a cluster-constrained genetic algorithm, characterized in that, Includes the following steps: Step 1: Initialize the parameters of the constrained genetic algorithm, using a binary number of length equal to the number of temperature sensors to represent the selected measurement points; Step 2: Perform fuzzy clustering on the temperature data. Use the fuzzy C-means algorithm to cluster the temperature data and output a list of sensor numbers included in each category. Generate constraints through clustering, i.e., select a temperature sensor from each category. Step 3: Enter the genetic algorithm process. First, generate m random solutions and convert them into corresponding binary numbers. Step 4: Evaluate the quality of each solution. Specifically, this involves building a thermal error model using the temperature data selected for each solution combined with actual thermal error data. Then, using 5-fold cross-validation, calculate the average root mean square error between the predicted and actual values on five test sets. As an evaluation indicator; Step 5: Sort all solutions according to the corresponding evaluation index, and select the top three optimal solutions as follows: ; Step 6: Update the solution set corresponding to the entire population: Cross the first half of the better "elite individuals" - that is, the better solutions - with the three optimal solutions with equal probability conditions; replace the second half of the worse individuals with the new solution obtained by crossing one of the three optimal solutions and a random solution. Under the constraint of clustering, cross the temperature sensors of each category as a whole. Step 7: Repeat steps 4-6 until the iteration is complete, and obtain the final selected temperature sensitive point.
2. The method for selecting temperature-sensitive points using a cluster-constrained genetic algorithm according to claim 1, characterized in that, The calculation formula is as follows: , Represents different test sets. This represents the number of points in each test set. and Representing respectively in the On the test set, the first The actual value of the point and the predicted value of the model.
3. The method for selecting temperature-sensitive points using a cluster-constrained genetic algorithm according to claim 2, characterized in that, The thermal error model uses the multiple linear regression (MLR) model.
Citation Information
Patent Citations
Method, device and recording medium for predicting thermal errors in feed axes of machine tools
JP7272612B1
Method and system for batch scheduling uniform parallel machines with different capacities based on improved genetic algorithm
US20180356803A1