# Time Series Prediction for Energy Consumption of Computer Numerical Control Axes Using Hybrid Machine Learning Models

^{*}

## Abstract

**:**

## 1. Introduction

## 2. State of the Art

- How can one predict HF energy-related time series for machine tool axes for general paths, based on the NC code?
- What accuracies can be achieved?
- What are the requirements and limits of the model and how can they be addressed?

## 3. Approach

## 4. Datasets

## 5. Hybrid Model for HF Time Series Prediction

#### 5.1. Kinematic Simulation

#### 5.2. Process Simulation

#### 5.3. ML Input

#### 5.4. ML Model

#### 5.5. ML Output

## 6. Validation

#### 6.1. Experiment 1: Training on Part One and Two Aircut Data—Validation on Unseen Data of Part One

#### 6.2. Experiment 2: Training on Part One Aluminum/Steel Aircut Data—Validation on Part One Steel/Aluminum Data (Exp. a/b)

#### 6.3. Experiment 3: Training on Part One Aircut Data—Validation on Part Two Data

#### 6.4. Experiment 4: Training on Part One and Two Aircut Data—Validation on Unseen Data of Part Two

#### 6.5. Experiment 5: Training on Part One and Two Process Data—Validation on Unseen Data of Part One

#### 6.6. Experiment 6: Training on Part One and Two Process Data—Validation on Unseen Data of Part One

#### 6.7. Experiment 7: Training on Part One and Two Process and Aircut Data—Validation on Unseen Part One Data

#### 6.8. Experiment 8: Training on Part One and Two Process and Aircut Data without Part Two Steel/Aluminum Data—Validation on Part Two Aluminum/Steel Data (Exp. a/b)

## 7. Results

^{−3}and 861.21 × 10

^{−3}per datapoint compared to experiment 3, with 991.68 × 10

^{−3}and 975.21 × 10

^{−3}per datapoint. Nevertheless, the deviations were still higher than the deviations of experiments 1 and 2, with distances between 229.86 × 10

^{−3}and 294.91 × 10

^{−3}per datapoint.

## 8. Discussion

## 9. Conclusions and Further Work

## Author Contributions

## Funding

## Data Availability Statement

## Conflicts of Interest

## References

- Bhatia, P.; Ranganathan, J.; World Business Council for Sustainable Development (WBCSD). The Greenhouse Gas Protocol. 2004. Available online: https://www.wri.org/research/greenhouse-gas-protocol-0 (accessed on 7 September 2023).
- Schlagenhauf, T.; Netzer, M.; Fleischer, J. OEE+: Ein Vorschlag zur zeitgemäßen Erweiterung der OEE um Nachhaltigkeitsaspekte= A proposal for the contemporary extension of the OEE to include sustainability aspects. WT Werkstattstech.
**2022**, 112, 481. [Google Scholar] - BDEW. (15 February 2023). Industriestrompreise* (Inklusive Stromsteuer) in Deutschland in den Jahren 1998 bis 2023 (In Euro-Cent pro Kilowattstunde) [Graph]. Available online: https://de.statista.com/statistik/daten/studie/252029/umfrage/industriestrompreise-inkl-stromsteuer-in-deutschland/ (accessed on 7 September 2023).
- Denkena, B.; Abele, E.; Brecher, C.; Dittrich, M.A.; Kara, S.; Mori, M. Energy efficient machine tools. CIRP Ann.
**2020**, 69, 646–667. [Google Scholar] [CrossRef] - Borgia, S.; Pellegrinelli, S.; Bianchi, G.; Leonesio, M. A reduced model for energy consumption analysis in milling. Procedia CIRP
**2014**, 17, 529–534. [Google Scholar] [CrossRef] - Pavanaskar, S.; McMains, S. Machine specific energy consumption analysis for CNC-milling toolpaths. In Proceedings of the International Design Engineering Technical Conferences and Computers and Information in Engineering Conference, Boston, MA, USA, 2–5 August 2015; American Society of Mechanical Engineers: New York, NY, USA, 2015; Volume 57045, p. V01AT02A018. [Google Scholar]
- Edem, I.F.; Mativenga, P.T. Impact of feed axis on electrical energy demand in mechanical machining processes. J. Clean. Prod.
**2016**, 137, 230–240. [Google Scholar] [CrossRef] - Edem, I.F.; Mativenga, P.T. Energy demand reduction in milling based on component and toolpath orientations. Procedia Manuf.
**2017**, 7, 253–261. [Google Scholar] [CrossRef] - Edem, I.F.; Mativenga, P.T. Modelling of energy demand from computer numerical control (CNC) toolpaths. J. Clean. Prod.
**2017**, 157, 310–321. [Google Scholar] [CrossRef] - Edem, I.F. Energy Modelling for Machine Tool Axis and Toolpaths; The University of Manchester: Manchester, UK, 2017. [Google Scholar]
- Altıntaş, R.S.; Kahya, M.; Ünver, H.Ö. Modelling and optimization of energy consumption for feature based milling. Int. J. Adv. Manuf. Technol.
**2016**, 86, 3345–3363. [Google Scholar] [CrossRef] - Zhang, C.; Zhou, Z.; Tian, G.; Xie, Y.; Lin, W.; Huang, Z. Energy consumption modeling and prediction of the milling process: A multistage perspective. Proc. Inst. Mech. Eng. Part B J. Eng. Manuf.
**2018**, 232, 1973–1985. [Google Scholar] [CrossRef] - Ma, F.; Zhang, H.; Cao, H.; Hon, K.K.B. An energy consumption optimization strategy for CNC milling. Int. J. Adv. Manuf. Technol.
**2017**, 90, 1715–1726. [Google Scholar] [CrossRef] - Imani Asrai, R.; Newman, S.T.; Nassehi, A. A mechanistic model of energy consumption in milling. Int. J. Prod. Res.
**2018**, 56, 642–659. [Google Scholar] [CrossRef] - Lv, L.; Deng, Z.; Yan, C.; Liu, T.; Wan, L.; Gu, Q. Modelling and analysis for processing energy consumption of mechanism and data integrated machine tool. Int. J. Prod. Res.
**2020**, 58, 7078–7093. [Google Scholar] [CrossRef] - Pawar, S.S.; Bera, T.C.; Sangwan, K.S. Modelling of energy consumption for milling of circular geometry. Procedia CIRP
**2021**, 98, 470–475. [Google Scholar] [CrossRef] - Yu, S.; Zhao, G.; Li, C.; Xu, S.; Zheng, Z. Prediction models for energy consumption and surface quality in stainless steel milling. Int. J. Adv. Manuf. Technol.
**2021**, 117, 3777–3792. [Google Scholar] [CrossRef] - Brillinger, M.; Wuwer, M.; Hadi, M.A.; Haas, F. Energy prediction for CNC machining with machine learning. CIRP J. Manuf. Sci. Technol.
**2021**, 35, 715–723. [Google Scholar] [CrossRef] - Cao, J.; Xia, X.; Wang, L.; Zhang, Z.; Liu, X. A Novel CNC Milling Energy Consumption Prediction Method Based on Program Parsing and Parallel Neural Network. Sustainability
**2021**, 13, 13918. [Google Scholar] [CrossRef] - Pawar, S.S.; Bera, T.C.; Sangwan, K.S. Energy consumption modelling in milling of variable curved geometry. Int. J. Adv. Manuf. Technol.
**2022**, 120, 1967–1987. [Google Scholar] [CrossRef] - Duc, L.A.; Trinh, N.D. A new study for prediction and optimisation of energy consumption during high-speed milling. Int. J. Comput. Integr. Manuf.
**2022**, 35, 1352–1377. [Google Scholar] [CrossRef] - Ströbel, R.; Probst, Y.; Fleischer, J. Training and Validation Dataset of Milling Processes for Time Series Prediction; Institut für Produktionstechnik (WBK): Karlsruhe, Germany, 2023. [Google Scholar] [CrossRef]
- Ströbel, R.; Probst, Y.; Hutt, L.; Fleischer, J. Software-Defined Workpiece Positioning for Resource-Optimized Machine Tool Utilization. J. Mach. Eng.
**2023**, 23, 71–84. [Google Scholar] [CrossRef] - Diaz, N.; Redelsheimer, E.; Dornfeld, D. Energy Consumption Characterization and Reduction Strategies for Milling Machine Tool Use. In Glocalized Solutions for Sustainability in Manufacturing; Hesselbach, J., Herrmann, C., Eds.; Springer: Berlin/Heidelberg, Germany, 2011. [Google Scholar]
- Shannon, C.E. Communication in the presence of noise. Proc. IRE
**1949**, 37, 10–21. [Google Scholar] [CrossRef] - Paszke, A.; Gross, S.; Massa, F.; Lerer, A.; Bradbury, J.; Chanan, G.; Killeen, T.; Lin, Z.; Gimelshein, N.; Antiga, L.; et al. PyTorch: An Imperative Style, High-Performance Deep Learning Library. In Advances in Neural Information Processing Systems 32; Curran Associates, Inc.: Red Hook, NY, USA, 2019; pp. 8024–8035. Available online: http://papers.neurips.cc/paper/9015-pytorch-an-imperative-style-high-performance-deep-learning-library.pdf (accessed on 7 September 2023).
- Meert, W.; Hendrickx, K.; Van Craenendonck, T.; Robberechts, P.; Blockeel, H.; Davis, J. DTAIDistance (v2.3.10). Zenodo. 2020. Available online: https://zenodo.org/records/7158824 (accessed on 7 September 2023).
- Salvador, S.; Chan, P. FastDTW: Toward accurate dynamic time warping in linear time and space. Intell. Data Anal.
**2007**, 11, 561–580. [Google Scholar] [CrossRef]

**Figure 2.**Material removal simulation (

**left**to

**right**) for experimental part one (

**top**) and experimental part two (

**bottom**).

**Figure 9.**Results of experiment 1a for the Y-axis with a total deviation of −1.09% in time domain (

**a**) and a DTW-Distance per datapoint of 64.81 × 10

^{−3}(

**b**).

**Figure 10.**Results of experiment 2a for the spindle with a total deviation of −7.66% in time domain (

**a**) and a DTW-Distance per datapoint of 65.76 × 10

^{−3}(

**b**).

**Figure 11.**Results of experiment 4a for the X-axis with a total deviation of 16.64% in time domain (

**a**) and a DTW-Distance per datapoint of 130.86 × 10

^{−3}(

**b**).

**Figure 12.**Results of experiment 5a for the Z-axis with a total deviation of −2.21% in time domain (

**a**) and a DTW-Distance per datapoint of 223.54 × 10

^{−3}(

**b**).

**Figure 13.**Results of experiment 5b for the X-axis with a total deviation of 43.87% in time domain (

**a**) and experiment 7b for the X-axis with a total deviation of 11.48% (

**b**).

Experiment | Measure | X-Axis | Y-Axis | Z-Axis | Spindle | All Axes |
---|---|---|---|---|---|---|

1a | Total Deviation | 0.2% | −1.09% | 0.09% | −8.83% | −0.96% |

DTW-Distance | 69.9 × 10^{−3} | 64.81 × 10^{−3} | 66.96 × 10^{−3} | 93.14 × 10^{−3} | 294.91 × 10^{−3} | |

1b | Total Deviation | 2.06% | 3.74% | 0.99% | −9.51% | 0.19% |

DTW-Distance | 60.22 × 10^{−3} | 71.18 × 10^{−3} | 59.97 × 10^{−3} | 38.49 × 10^{−3} | 229.86 × 10^{−3} | |

2a | Total Deviation | −1.59% | −2.77% | 2.25% | −7.66% | 0.44% |

DTW-Distance | 61.79 × 10^{−3} | 76.17 × 10^{−3} | 86.26 × 10^{−3} | 65.76 × 10^{−3} | 289.98 × 10^{−3} | |

2b | Total Deviation | −1.01% | 1.64% | 1.32% | −10.46% | −0.09% |

DTW-Distance | 67.36 × 10^{−3} | 70.93 × 10^{−3} | 62.4 × 10^{−3} | 59.85 × 10^{−3} | 260.54 × 10^{−3} | |

3a | Total Deviation | 33.29% | 16.66% | 8.32% | −34.79% | 7.05% |

DTW-Distance | 238.97 × 10^{−3} | 197.62 × 10^{−3} | 384.75 × 10^{−3} | 170.34 × 10^{−3} | 991.68 × 10^{−3} | |

3b | Total Deviation | 32.46% | 33.89% | 3.63% | −14.9% | 7.38% |

DTW-Distance | 152.35 × 10^{−3} | 275.81 × 10^{−3} | 335.37 × 10^{−3} | 211.69 × 10^{−3} | 975.21 × 10^{−3} | |

4a | Total Deviation | 16.64% | 6.62% | −2.95% | −14.79% | −1.45% |

DTW-Distance | 130.86 × 10^{−3} | 157.92 × 10^{−3} | 341.87 × 10^{−3} | 233.78 × 10^{−3} | 864.43 × 10^{−3} | |

4b | Total Deviation | 15.31% | 6.05% | −4.57% | −7.86% | −2.02% |

DTW-Distance | 110.69 × 10^{−3} | 167.95 × 10^{−3} | 377.53 × 10^{−3} | 205.03 × 10^{−3} | 861.21 × 10^{−3} | |

5a | Total Deviation | 0.15% | −3.55% | −2.21% | −21.55% | −8.11% |

DTW-Distance | 324.85 × 10^{−3} | 259.92 × 10^{−3} | 223.54 × 10^{−3} | 558.08 × 10^{−3} | 1366.39 × 10^{−3} | |

5b | Total Deviation | 43.87% | 44.17% | 1.45% | 78.76% | 22.95% |

DTW-Distance | 323.84 × 10^{−3} | 321.22 × 10^{−3} | 226.71 × 10^{−3} | 1154.33 × 10^{−3} | 2026.10 × 10^{−3} | |

6a | Total Deviation | −1.6% | −5.05% | −3.33% | −24.67% | −9.95% |

DTW-Distance | 322.65 × 10^{−3} | 270.90 × 10^{−3} | 337.00 × 10^{−3} | 619.26 × 10^{−3} | 1549.81 × 10^{−3} | |

6b | Total Deviation | 43.45% | 43.83% | 1.81% | 69.35% | 21.45% |

DTW-Distance | 289.60 × 10^{−3} | 311.32 × 10^{−3} | 214.04 × 10^{−3} | 1119.97 × 10^{−3} | 1934.93 × 10^{−3} | |

7a | Total Deviation | −19.47% | −14.68% | −2.77% | −40.49% | −17.54% |

DTW-Distance | 395.03 × 10^{−3} | 388.46 × 10^{−3} | 293.08 × 10^{−3} | 1174.27 × 10^{−3} | 2250.84 × 10^{−3} | |

7b | Total Deviation | 11.48% | 36.73% | −0.11% | 40.26% | 11.45% |

DTW-Distance | 168.99 × 10^{−3} | 270.81 × 10^{−3} | 145.81 × 10^{−3} | 599.64 × 10^{−3} | 1185.25 × 10^{−3} | |

8a | Total Deviation | 35.37% | 78.32% | 0.08% | 35.26% | 18.49% |

DTW-Distance | 356.31 × 10^{−3} | 382.32 × 10^{−3} | 203.73 × 10^{−3} | 897.44 × 10^{−3} | 1839.8 × 10^{−3} | |

8b | Total Deviation | 68.44% | 106.61% | 2.34% | 169.98% | 41.45% |

DTW-Distance | 349.48 × 10^{−3} | 624.84 × 10^{−3} | 176.59 × 10^{−3} | 787.27 × 10^{−3} | 1938.19 × 10^{−3} |

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

**MDPI and ACS Style**

Ströbel, R.; Probst, Y.; Deucker, S.; Fleischer, J.
Time Series Prediction for Energy Consumption of Computer Numerical Control Axes Using Hybrid Machine Learning Models. *Machines* **2023**, *11*, 1015.
https://doi.org/10.3390/machines11111015

**AMA Style**

Ströbel R, Probst Y, Deucker S, Fleischer J.
Time Series Prediction for Energy Consumption of Computer Numerical Control Axes Using Hybrid Machine Learning Models. *Machines*. 2023; 11(11):1015.
https://doi.org/10.3390/machines11111015

**Chicago/Turabian Style**

Ströbel, Robin, Yannik Probst, Samuel Deucker, and Jürgen Fleischer.
2023. "Time Series Prediction for Energy Consumption of Computer Numerical Control Axes Using Hybrid Machine Learning Models" *Machines* 11, no. 11: 1015.
https://doi.org/10.3390/machines11111015