A Thermal Error Prediction Method of High-Speed Motorized Spindle Based on Pelican Optimization Algorithm and CNN-LSTM
Abstract
:1. Introduction
2. Thermal Error Modeling
2.1. Selection of Temperature-Sensitive Points
2.1.1. Principle of Hierarchical Clustering Algorithm
- (1)
- The data of N temperature measurement points to be classified are regarded as N classes, each class contains exactly one sample, and the feature data set to be classified by X is constructed:
- (2)
- Calculate the similarity between the N classes, where the similarity is measured by the mutual distance between the temperature measurement points. The N-order similarity symmetry matrix is obtained:
- (3)
- Among the off-diagonal elements of the matrix, choose the one with the smallest value Assuming that this element is , merge the temperature measurement points and into a new class. The new class can be noted as . Eliminate the rows and columns where and are located in the original matrix and recalculate the interclass similarity of the N-1 classes consisting of the N-2 classes in the original matrix and the new class to obtain the new N-1 order similarity matrix :
- (4)
- Iterate step 2 from to obtain the matrix of order N-2: , then iterate the above steps from to obtain , and so forth, until eventually all the thermal measurement locations are consolidated into a single overarching category.
- (5)
- Based on the results of calculating similarity in each step mentioned above, create a dendrogram for hierarchical clustering.
2.1.2. Principle of K-Medoids Algorithm
- (1)
- Identify the optimal value for the number of cluster centers, K.
- (2)
- Randomly choose the data from k temperature measuring locations as the centers of K clusters, also called centroids:
- (3)
- Calculate the Euclidean distance from each object to each centroid :
- (4)
- Compare the Euclidean distance from each object to each centroid in turn, and allocate the objects to the cluster where the closest centroid is located to obtain K clusters:
- (5)
- For each cluster, compute the total distance between each sample point and all other sample points and select the point with the smallest total distance as the new cluster center:
- (6)
- Repeat steps 3 and 4 to obtain new K clusters:
- (7)
- Repeat steps 5 and 6 until the center of mass of each cluster does not change and consider that the algorithm has converged and the clustering is completed. The final K clusters are obtained as follows:
2.1.3. Principle of Pearson’s Correlation Coefficient
2.2. Introduction of CNN-LSTMNN
2.2.1. Convolutional Neural Network
2.2.2. Long Short-Term Memory Neural Network
2.3. Pelican Optimization Algorithm Principle
- (1)
- Initialize the population.
- (2)
- Determine the objective function.
- (3)
- Discover and lock in prey.
- (4)
- Carry out predation of the prey.
2.4. Pelican Optimization Algorithm Principle
- (1)
- Establish the architecture of the CNN-LSTMNN.
- (2)
- Prepare the training dataset and test dataset.
- (3)
- Randomly assign initial values to the parameters and thresholds of CNN-LSTMNN.
- (4)
- Initialize the pelican population and configure the parameters of the pelican optimization algorithm, including:
- (1)
- The total number of iterations: This parameter influences both the program’s runtime and the reliability of the model—here, the algorithm is configured to run for a total of 80 iterations;
- (2)
- The population size, represented by the total number of individuals N, specified as 50;
- (3)
- The dimensionality of the optimization problem space: To refine the parameters of the CNN-LSTMNN model, namely, the learning rate, the number of iterations, and the number of nodes in the hidden layer, the dimension of the algorithm is set to 3.
- (5)
- Compute the fitness score for each individual: Assess the fitness value of each specific individual based on the optimization objective of the problem. Subsequently, perform a sorting operation based on the fitness scores to identify the best position and the worst position found so far. The fitness value can be the objective function value of the problem or the index related to the objective function. Here, POA’s fitness function is determined by the root mean square error (RMSE) between actual values and the predictions.
- (6)
- Find the prey and move towards it: Each individual pelican adopts different search strategies to choose the next moving direction and distance according to its own position and fitness value. Update the member position according to Equation (21) to obtain the current optimal value.
- (7)
- Predation of prey: Update the pelican’s position further with Equation (23).
- (8)
- Evaluation of fitness: Recalculate the fitness value of the moved individual. If the existing best value outperforms the earlier one, the best overall solution is updated. If not, the program returns to step 4 and continues iterating until a termination criterion is met.
- (9)
- After the algorithm’s iterations are finished, the chosen optimal solution is used to determine the specific values for the parameters and thresholds in the CNN-LSTMNN model.
2.5. CSOA-CNN-LSTMNN Model
- (1)
- Establish the architecture of CNN-LSTMNN.
- (2)
- Prepare data sets, including test sets and training sets.
- (3)
- Carry out random initialization of the CNN-LSTMNN parameters and thresholds.
- (4)
- Randomly generate the initial flock and initialize the population parameters, including the size of the population, represented as N; the topmost iteration count Max_Iterations; the frequency of population updates G, and so on.
- (5)
- Compute the fitness score for each individual within the population. The RMSE between the forecasted and true values of the model’s thermal error is utilized as the fitness function of CSOA.
- (6)
- Rank the calculated N fitness function values of the chickens, with the best-fit chickens designated as the roosters, the worst-fit chickens as the chicks, and the rest as the hens, so as to establish a hierarchical order of chickens.
- (7)
- Group the chickens after establishing the hierarchical order, with each rooster in a group and as many groups as there are roosters; randomly assign the rest of the hens and chicks to groups with roosters; and after the assignment is completed, randomly identify certain hens in each group as the mother hen of the chicks, thereby determining the membership of the groups.
- (8)
- Adjust the sites of roosters, hens, and chicks.
- (9)
- Reevaluate the fitness value based on the updated position of each chicken.
- (10)
- Ascertain whether the updated solution is an improvement over the previous iteration’s solution. If yes, update the solution; if not, do not update it. Then continue to the next iteration, in which the hierarchical order and membership of the flock are re-determined every G iteration until the predefined stopping condition is fulfilled, the algorithm ends, and the best outcome is outputted.
3. Thermal Error Experiment
4. Prediction Performance Analysis
5. Conclusions
- Firstly, the H-K-P algorithm is employed to cluster the temperature-measuring locations near the spindle. The hierarchical clustering algorithm is applied to determine the clustering number K, and then all the pre-selected temperature sensor locations are clustered into K classes by using the K-medoids algorithm. After the clustering is completed, the Pearson correlation coefficient is utilized to evaluate the association degree between temperature data and thermal error in each category, and the point with the largest association degree is determined as the critical temperature point of this group. In the end, 12 temperature measuring points are successfully reduced to four crucial temperature points, thereby resolving the issue of collinearity among temperature measurement locations.
- Using temperature-sensitive point data in conjunction with thermal error data, a predictive model for thermal errors in CNC machine tool motorized spindles is trained and developed. Aiming at the special property of thermal error having both time-varying characteristics and spatial characteristics, the POA-CNN-LSTMNN model is suggested, which incorporates LSTMNN for capturing temporal characteristics, utilizes CNN for extracting spatial features, and employs POA to optimize the parameters of the CNN-LSTM hybrid neural network, thus improving its predictive performance.
- To verify the model’s generalization and validity, the experimental analysis is carried out under different rotating speeds of the motorized spindle. The CSOA-CNN-LSTMNN, CNN-LSTMNN, and LSTMNN models are used to compare with the model proposed in this study. The experimental findings reveal significant improvements achieved by the POA-CNN-LSTMNN model in comparison to the other three models. On average, the POA-CNN-LSTMNN model exhibited a reduction of 51% and 49.9% in the RMSE and MAE, respectively. Additionally, the was 2.6% higher on average compared to the other models, and MSE was reduced by 75.7% on average. These results strongly support the superiority and effectiveness of the POA-CNN-LSTMNN model in thermal error prediction for motorized spindles. The model demonstrates promising applicability and potential in the field of thermal error forecasting for motorized spindles in CNC machine tools. During the experimental process, we encountered various challenges. For instance, due to environmental conditions and equipment limitations, there were constraints in data acquisition. Extensive data collection efforts were required over a long period of time to ensure data quality and model accuracy. In future research, we will need to further explore efficient methods for data acquisition. Additionally, we aim to optimize the model to enhance its prediction accuracy and further expand the performance and application domains of thermal error prediction models.
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Soori, M.; Arezoo, B. Dimensional, geometrical, thermal and tool deflection errors compensation in 5-Axis CNC milling operations. Aust. J. Mech. Eng. 2007, 3, 154–196. [Google Scholar] [CrossRef]
- Horejš, O.; Mareš, M.; Havlík, L. Compensation of Thermally Induced Errors in Five-Axis Computer Numerical Control Machining Centers Equipped with Different Spindles. J. Manuf. Sci. Eng. 2022, 144, 101009. [Google Scholar] [CrossRef]
- Grama, S.N.; Mathur, A.; Badhe, A.N. A model-based cooling strategy for motorized spindle to reduce thermal errors. Int. J. Mach. Tools Manuf. 2018, 132, 3–16. [Google Scholar] [CrossRef]
- Mayr, J.; Müller, M.; Weikert, S. Automated thermal main spindle & B-axis error compensation of 5-axis machine tools. CIRP Ann. 2016, 65, 479–482. [Google Scholar] [CrossRef]
- Dai, Y.; Tao, X.; Xuan, L.; Qu, H.; Wang, G. Thermal error prediction model of a motorized spindle considering variable preload. Int. J. Adv. Manuf. Technol. 2022, 121, 4745–4756. [Google Scholar] [CrossRef]
- Shengli, T.; Xiaoan, C.; Pengfan, W.U. Research on Flexible Loading System of High-speed Motorized Spindles Based on High-pressure Water Jet. J. Mech. Eng. 2021, 57, 36–44. [Google Scholar] [CrossRef]
- Zhiyong, W.; Weitao, D.U. Dynamics Analysis of Spindle-bearing Systems on Spiral Bevel Gear Cutting Machines. China Mech. Eng. 2019, 30, 2211–2266. [Google Scholar]
- Dai, Y.; Tao, X.; Li, Z.; Zhan, S.; Li, Y.; Gao, Y. A Review of Key Technologies for High-Speed Motorized Spindles of CNC Machine Tools. Machines 2022, 10, 145. [Google Scholar] [CrossRef]
- Liu, Y.; Wang, X.; Zhu, X.; Zhai, Y. Thermal error prediction of motorized spindle for five-axis machining center based on analytical modeling and BP neural network. J. Mech. Sci. Technol. 2021, 35, 281–292. [Google Scholar] [CrossRef]
- Shi, H.; Jiang, C.; Yan, Z.; Tao, T.; Mei, X. Bayesian neural network–based thermal error modeling of feed drive system of CNC machine tool. Int. J. Adv. Manuf. Technol. 2020, 108, 3031–3044. [Google Scholar] [CrossRef]
- Xiang, S.; Deng, M.; Li, H.; Du, Z.; Yang, J. Cross-rail deformation modeling, measurement and compensation for a gantry slideway grinding machine considering thermal effects. Meas. Sci. Technol. 2019, 30, 065007. [Google Scholar] [CrossRef]
- Mareš, M.; Horejš, O.; Havlík, L. Thermal error compensation of a 5-axis machine tool using indigenous temperature sensors and CNC integrated Python code validated with a machined test piece. Precis. Eng. 2020, 66, 21–30. [Google Scholar] [CrossRef]
- Zimmermann, N.; Mayr, J.; Wegener, K. Statistical analysis of self-optimizing thermal error compensation models for machine tools. In Proceedings of the EUSPEN—Special Interest Group Meeting: Thermal Issues, Zurich, Switzerland, 22–23 March 2022. [Google Scholar]
- Xiao, Q.; Luo, Z.; Luo, M.; Liu, S.; Hsu, W.; Huang, C. Thermal Deformation Test and Modeling of Main Spindle of Numerical Control Vertical Machining Center. J. Phys. Conf. Ser. 2020, 1583, 012005. [Google Scholar] [CrossRef]
- Fu, G.; Zhou, L.; Zheng, Y.; Lu, C.; Wang, X.; Xie, L. Improved unscented Kalman filter algorithm-based rapid identification of thermal errors of machine tool spindle for shortening thermal equilibrium time. Measurement 2022, 195, 111121. [Google Scholar] [CrossRef]
- Gowda, C.R.; Dutta, R.; Pasha, A.T.; Ravi, L. Use of multiple linear regression to compensate for diametrical deviations in machined components due to thermal errors. Mater. Today Proc. 2022, 56, 2630–2639. [Google Scholar] [CrossRef]
- Song, L.; Liu, K.; Zhao, D.; Zhang, S.; Zhang, Z.; Wang, Y. The spindle axial time-varying thermal error compensation method for horizontal boring and milling machine tool based on edge computing. Int. J. Adv. Manuf. Technol. 2023, 128, 2631–2638. [Google Scholar] [CrossRef]
- de Farias, A.; dos Santos, M.O.; Bordinassi, E.C. Development of a thermal error compensation system for a CNC machine using a radial basis function neural network. J. Braz. Soc. Mech. Sci. Eng. 2022, 44, 494. [Google Scholar] [CrossRef]
- Luo, F.; Ma, C.; Liu, J.; Gui, H.; Li, M. Thermal error prediction and control method combining residual-based one-dimensional convolution-minimum gate unit model with physical-data-edge-cloud terminal architecture. Neural Comput. Appl. 2023, 35, 15477–15502. [Google Scholar] [CrossRef]
- Jia, G.; Zhang, X.; Wang, X.; Zhang, X.; Huang, N. A spindle thermal error modeling based on 1DCNN-GRU-Attention architecture under controlled ambient temperature and active cooling. Int. J. Adv. Manuf. Technol. 2023, 127, 1525–1539. [Google Scholar] [CrossRef]
- Du, H.; Jiang, G.; Tao, T.; Hou, R.; Yan, Z.; Mei, X. A thermal error modeling method for CNC lathes based on thermal distortion decoupling and nonlinear programming. Int. J. Adv. Manuf. Technol. 2023, 128, 2599–2612. [Google Scholar] [CrossRef]
- Huang, B.; Xie, J.; Liu, X.; Yan, J.; Liu, K.; Yang, M. Vertical Machining Center Feed Axis Thermal Error Compensation Strategy Research. Appl. Sci. 2023, 13, 2990. [Google Scholar] [CrossRef]
- Zhu, M.; Yang, Y.; Feng, X.; Du, Z.; Yang, J. Robust modeling method for thermal error of CNC machine tools based on random forest algorithm. J. Intell. Manuf. 2023, 34, 2013–2026. [Google Scholar] [CrossRef]
- Katageri, P.; Suresh, B.S.; Pasha Taj, A. An approach to identify and select optimal temperature-sensitive measuring points for thermal error compensation modeling in CNC machines: A case study using cantilever beam. Mater. Today Proc. 2021, 45, 264–269. [Google Scholar] [CrossRef]
- Li, B.; Tian, X.; Zhang, M. Thermal error modeling of machine tool spindle based on the improved algorithm optimized BP neural network. Int. J. Adv. Manuf. Technol. 2019, 105, 1497–1505. [Google Scholar] [CrossRef]
- Abdulshahed, A.M.; Longstaff, A.P.; Fletcher, S.; Myers, A. Thermal error modelling of machine tools based on ANFIS with fuzzy c-means clustering using a thermal imaging camera. Appl. Math. Model. 2015, 39, 1837–1852. [Google Scholar] [CrossRef]
- Liu, P.-L.; Du, Z.-C.; Li, H.-M.; Deng, M.; Feng, X.-B.; Yang, J.-G. Thermal error modeling based on BiLSTM deep learning for CNC machine tool. Adv. Manuf. 2021, 9, 235–249. [Google Scholar] [CrossRef]
- Kumar, S.; Srinivasu, D.S. Optimal number of thermal hotspots selection on motorized milling spindle to predict its thermal deformation. Mater. Today Proc. 2022, 62, 3376–3385. [Google Scholar] [CrossRef]
- Xiaopeng, Y.; Teng, H.; Xiaohu, W.; Liang, M.; Guofu, Y. Study on an approach for decoupling and separating the thermal positioning errors of machining center linear axes. Int. J. Adv. Manuf. Technol. 2023, 128, 1139–1153. [Google Scholar] [CrossRef]
- Abdulshahed, A.M.; Longstaff, A.P.; Fletcher, S. The application of ANFIS prediction models for thermal error compensation on CNC machine tools. Appl. Soft Comput. 2015, 27, 158–168. [Google Scholar] [CrossRef]
- Yang, S.; Luo, X.; Chen, X.U.; Luo, Z. Self-adaptive compensation method of thermal error for hobbing machine tool. Int. J. Innov. Comput. Inf. Control 2021, 17, 2045–2055. [Google Scholar]
- Dai, Y.; Pang, J.; Li, Z.; Li, W.; Wang, Q.; Li, S. Modeling of thermal error electric spindle based on KELM ameliorated by snake optimization. Case Stud. Therm. Eng. 2022, 40, 102504. [Google Scholar] [CrossRef]
- Huang, Y.; Chen, Y.; Hu, Z. Thermal error modeling and analysis of CNC machine tools based on wavelet neural network. In Proceedings of the 2021 IEEE International Conference on Consumer Electronics and Computer Engineering (ICCECE), Guangzhou, China, 15–17 January 2021; pp. 454–457. [Google Scholar]
- Fan, J.; Wang, P.; Tao, H.; Pan, R. A thermal deformation prediction method for grinding machine’ spindle. Int. J. Adv. Manuf. Technol. 2022, 118, 1125–1139. [Google Scholar] [CrossRef]
- Ning, F.; Shi, Y.; Cai, M.; Xu, W.; Zhang, X. Manufacturing cost estimation based on a deep-learning method. J. Manuf. Syst. 2020, 54, 186–195. [Google Scholar] [CrossRef]
- Chengyang, W.; Sitong, X.; Wansheng, X. Spindle thermal error prediction approach based on thermal infrared images: A deep learning method. J. Manuf. Syst. 2021, 59, 67–80. [Google Scholar] [CrossRef]
- Trojovský, P.; Dehghani, M. Pelican Optimization Algorithm: A Novel Nature-Inspired Algorithm for Engineering Applications. Sensors 2022, 22, 855. [Google Scholar] [CrossRef] [PubMed]
- Park, H.-S.; Jun, C.-H. A simple and fast algorithm for K-medoids clustering. Expert Syst. Appl. 2009, 36, 3336–3341. [Google Scholar] [CrossRef]
- Hafez, A.I.; Zawbaa, H.M.; Emary, E.; Mahmoud, H.A.; Hassanien, A.E. An innovative approach for feature selection based on chicken swarm optimization. In Proceedings of the 2015 7th International Conference of Soft Computing and Pattern Recognition (SoCPaR), Fukuoka, Japan, 13–15 November 2015; pp. 19–24. [Google Scholar]
- Al Shayokh, M.; Shin, S.Y. Bio Inspired Distributed WSN Localization Based on Chicken Swarm Optimization. Wirel. Pers. Commun. 2017, 97, 5691–5706. [Google Scholar] [CrossRef]
- Deb, S.; Gao, X.-Z.; Tammi, K.; Kalita, K.; Mahanta, P. Recent Studies on Chicken Swarm Optimization algorithm: A review (2014–2018). Artif. Intell. Rev. 2020, 53, 1737–1765. [Google Scholar] [CrossRef]
- Tan, F.; Yin, G.; Zheng, K.; Wang, X. Thermal error prediction of machine tool spindle using segment fusion LSSVM. Int. J. Adv. Manuf. Technol. 2021, 116, 99–114. [Google Scholar] [CrossRef]
- Yao, X.; Hu, T.; Yin, G.; Cheng, C. Thermal error modeling and prediction analysis based on OM algorithm for machine tool’s spindle. Int. J. Adv. Manuf. Technol. 2020, 106, 3345–3356. [Google Scholar] [CrossRef]
- Liu, Y.; Miao, E.; Liu, H.; Chen, Y. Robust machine tool thermal error compensation modelling based on temperature-sensitive interval segmentation modelling technology. Int. J. Adv. Manuf. Technol. 2020, 106, 655–669. [Google Scholar] [CrossRef]
Model | Structure | Layer | Parameter |
---|---|---|---|
CNN-LSTMNN | CNN | Convolution | Filters = 32, kernel_size = 3 × 3, stride = 1 |
MaxPooling | Pool_size = 2 × 2, stride = 2 | ||
Activation | Relu | ||
Convolution | Filters = 64, kernel_size = 3 × 3, stride = 1 | ||
MaxPooling | Pool_size = 2 × 2, stride = 2 | ||
Activation | Relu | ||
LSTMNN | LSTMNN-1 | Neurons = 50, dropout = 0.25 | |
LSTMNN-2 | Neurons = 50, dropout = 0.25 |
Temperature Measurement Point Number | Temperature Measurement Point Position |
---|---|
T1, T2, T3 | Outside of the front bearing |
T4, T6 | Outside of the rear bearing |
T5, T7, T8 | Built-in motor housing |
T9 | Inside of the front bearing |
T10 | Inside of the rear bearing |
T11 | Spindle box cavity |
T12 | Ambient temperature |
Clustering Category | 1 | 2 | 3 | 4 |
Temperature Measuring Point | T1, T2, T3, T4, T5, T6, T7, T8, T11 | T12 | T10 | T9 |
Temperature Measuring Point | Pearson Correlation Coefficient Value | Clustering Category |
---|---|---|
T1 | 0.805973 | 1 |
T2 | 0.864496 | 1 |
T3 | 0.845729 | 1 |
T4 | 0.854433 | 1 |
T5 | 0.838828 | 1 |
T6 | 0.842743 | 1 |
T7 | 0.881779 | 1 |
T8 | 0.829695 | 1 |
T9 | 0.952268 | 3 |
T10 | 0.996416 | 2 |
T11 | 0.801127 | 1 |
T12 | 0.817792 | 0 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Gao, Y.; Xia, X.; Guo, Y. A Thermal Error Prediction Method of High-Speed Motorized Spindle Based on Pelican Optimization Algorithm and CNN-LSTM. Appl. Sci. 2024, 14, 381. https://doi.org/10.3390/app14010381
Gao Y, Xia X, Guo Y. A Thermal Error Prediction Method of High-Speed Motorized Spindle Based on Pelican Optimization Algorithm and CNN-LSTM. Applied Sciences. 2024; 14(1):381. https://doi.org/10.3390/app14010381
Chicago/Turabian StyleGao, Ying, Xiaojun Xia, and Yinrui Guo. 2024. "A Thermal Error Prediction Method of High-Speed Motorized Spindle Based on Pelican Optimization Algorithm and CNN-LSTM" Applied Sciences 14, no. 1: 381. https://doi.org/10.3390/app14010381
APA StyleGao, Y., Xia, X., & Guo, Y. (2024). A Thermal Error Prediction Method of High-Speed Motorized Spindle Based on Pelican Optimization Algorithm and CNN-LSTM. Applied Sciences, 14(1), 381. https://doi.org/10.3390/app14010381