1 Introduction

1.1 Importance of artificial intelligence in manufacturing

Artificial intelligence (AI) encompasses a broad range of technological advancements that facilitate the execution of activities that often need human capabilities [1]. In recent years, there has been significant advancement in the field of artificial intelligence technologies [2]. Artificial neural networks, which emulate the cognitive processes of the human brain, as well as decision-making systems that simulate human reasoning, has the capacity to address issues by acquiring knowledge from available information [3]. These advancements have moved humanity into closer proximity to achieving genuine artificial intelligence [4]. Artificial intelligence technologies, such as Machine Learning and Neural Networks, have the capability to enhance the intellect of machines beyond previous capabilities [5]. Machine Learning, a subfield within the domain of artificial intelligence, encompasses the utilization of computational algorithms to enable computer systems to acquire the capacity to learn and perform specified tasks [6]. This technological advancement enables computer systems to acquire knowledge through data, evaluate their outcomes, and therefore make informed judgments. Machine Learning enhances the development of intelligent and optimized systems through its integration with other technologies, such as Industry 4.0 [7]. The combination of many technologies, including Artificial Intelligence (AI), Big Data Analysis, Data Mining, Advanced Analytics, Machine Learning (ML), and Industrial Internet of Things (IoT), enables the creation of intelligent production environments in the context of Industry 4.0. According to Wu et al. [8], it is feasible to manufacture items that are both of superior quality and affordable by employing this approach. The advent of Industry 4.0 has facilitated the augmentation of machine intelligence through the integration of artificial intelligence technology. The advent of Industry 4.0 has facilitated the integration of artificial intelligence (AI) technology into several sectors, including manufacturing, production, logistics, and industry. This integration aims to enhance productivity and efficiency, optimize production costs, and automate the production process by mitigating manual mistakes. The current trend in manufacturing is seeing a significant shift from mass production to a more customized approach [9]. The emergence of the manufacturing industry and the fast evolution of technology have underscored the significance of countries competitiveness. The significance of artificial intelligence technologies is growing in the context of discovering innovations that attempt to enhance cost efficiency and production sustainability within the industrial sector, particularly in a climate characterized by heightened competition [10]. The utilization of artificial intelligence technologies has enabled the expeditious execution of engineering studies that traditionally required a significant amount of time in practice. In the manufacturing industry, time efficiency may be enhanced via the utilization of artificial intelligence. This includes the implementation of real-time equipment maintenance and the expedited generation of designs facilitated by virtual reality technology. Moreover, the integration of artificial intelligence algorithms into industrial technologies assumes a significant role across several domains, including but not limited to product quality, management, design, and efficiency [11]. Technological advancements within the sector have the potential to enhance production capacity through the alteration of conventional production methods. However, this progression also brings about a progressive escalation in energy consumption, use of raw materials, and environmental concerns as a result of automation [12]. The global community is increasingly confronted with challenges pertaining to energy, raw materials, and the environment as a result of the fast advancement of industrialization within a technical framework [13]. This phenomenon has led to a significant transformation in patterns of production and consumption, contributing to the aforementioned issues [14, 15]. The industry is seeing rapid technical advancements that are displacing conventional production systems with contemporary and efficient ways. This transition is resulting in increased production capacity and making substantial contributions to the sector’s growth. Nevertheless, the ongoing advancement in numerous domains gives rise to a multitude of significant concerns, including the exhaustion of energy supplies, scarcity of raw materials, and environmental challenges. For this reason, research and applications in the field of machining offer various methods to reduce the environmental impacts of the industry [16, 17]. In particular, energy efficiency is increased by controlling the energy consumed and reducing tool wear, thus ensuring more effective use of energy resources. At the same time, thanks to environmental lubrication/cooling, energy and material savings are achieved with the developments in material and cutting tool technologies, and solutions are produced for raw material shortages [18, 19]. In order to increase the efficiency of research in the field of machining, data-based analyzes are carried out to improve the machinability properties of different materials [20]. These analyzes make it possible to develop new data-driven approaches thanks to the acquisition of large amounts of data and the modern computing power of computer systems [21] as also mentioned in Fig. 1.

Fig. 1
figure 1

Power consumption based energy flow in a machining system [22]

1.2 Machine learning system in manufacturing

As Big Data analysis creates obstacles for traditional techniques, data-driven Artificial Intelligence (AI) and Machine Learning (ML) algorithms are developing new correlations [23]. As mentioned above, examining the machinability behavior of materials is of great importance both for improving the properties of existing materials and for the design of new materials [24]. However, it is of great importance to consider these investigations within the scope of Machine Learning [25]. In this way, the data obtained can be presented in a meaningful way and the machinability properties of the materials can be predicted by using these data with Artificial Intelligence algorithms/approaches. In this context, especially in recent years, studies have begun to be carried out examining the machinability properties of materials using Artificial Intelligence. There are not enough studies in the literature on parameters such as machinability properties and power consumption of PH13-8 Mo steel, which is an important member of maraging steels, and even on its support with machine learning algorithms. However, day by day, researchers have turned their attention to such materials that are frequently used in the space and aviation industry. On this subject, Manjunath et al. [26] conducted a study on transferring learning-based algorithms in the turning process of Ti6Al4V alloy. This research paved the way for continuous monitoring of diamond turning processes and provided valuable data for gauging surface quality. Ouerhani et al. [27] examined the comparative analysis of data-driven thermal deviation prediction-machine learning algorithms in the turning process. In other words, they addressed data-driven thermal behavior modeling and prediction of machine tools in the context of high-precision manufacturing. In the machine learning investigation of cutting force, surface roughness, and tool life in high-speed turning, Zhang and Xu [28] noted that their strategy is generalizable across a variety of machining processes for identifying statistical correlations between process parameters.

In another example of machine learning classification, a convolutional neural network (CNN), feed-forward neural networks (FNN), and deep CCNs (DCNN) models combined with a long short-term memory (LSTM) unit combine both traditional machine learning with table processing data. It has been shown to achieve superior performance compared to both learning (ML) models and combined table and image data. Hybrid CNN and hybrid FNN models showed significantly lower performance than tabular models. Soori et al. [29] reviewed a study involving the development of a machine learning strategy to acquire on-line machining skills during the CNC machining. It is stated that the system has the ability to take the experience of the machinists and the application of the standard manual. The system was trained on data sets from a standard processing manual and has been proven to predict significantly accurate results after training. It appears that the results obtained show a good correlation. Studies comparing machine learning algorithms with different cutting conditions during the manufacturing process also stand out by Kumar et al. [30]. In order to better forecast cutting force while utilising hybrid nanofluid-enriched cutting fluid, the scientists compared several machine learning algorithms.

1.3 Aim and scope of the work

A number of prior studies have focused only on the energy/power consumption of different stainless steels under dry conditions, whereas others have chosen to investigate the influence of lubrication/cooling environments. To the best of our knowledge, it has not been found any existing study that explores the contribution rates of lubricating/ cooling media using machine learning techniques. As a result of this circumstance, a notable deficiency is observed within the current body of scholarly work, necessitating the creation of approaches that integrate the outcomes obtained from physical experiments examining power consumptions across various lubrication/cooling conditions with machine learning models. Hence, in pursuit and the novelty of the study’s purpose, the milling process of Ph13-8Mo steel has been carried out with the response parameters of power consumption and its shares with respect to machining, standby, linear and spindle powers. Moreover, the power consumption during the milling process was predicted by different types of machine learning models.

2 Data acquisition and methodology

In this research, experiments were carried out on a Taksan TMC 500 V brand CNC vertical machining machine. PH13-8 Mo stainless steel samples with cylindrical geometry and dimensions of 113.11 × 50 mm were used in the experiments. In face milling operations, PVD coated carbide tools with code APMT11 T0308 PDSR-MM and clamping tool with code AEM90-AP11-D20-W20-L150-Z03-H were used as cutting tools and tool holders, respectively. The inserts and tool holder are manufactured by Korloy. Energy consumption data was measured with KAEL Multiser 02-PC TFT Network Analyzer (Istanbul, Turkey). Three 60/5A current transformers were used. The phase CNC machine tool saves energy consumption by drawing approximately 30 A current from the network. Measurements of power consumption were carried out instantaneously under dry, MQL and cryogenic processing conditions. In order to accurately determine the power consume during machining, the cutting tool used was waited to fully reach the workpiece. Thus, equal amount of chip removal is achieved on both cutting edges. For the Minimum Quantity Lubrication (MQL) system used in all experiments, the Werte-STN15 Dual Channel Micro lubrication system provided by SBH Company (Istanbul, Turkey) was used. Mineral cutting fluid called WerteMist is also provided by SBH company. In addition, the air compressor pressure (8 bar) was reduced by a control valve to 5 bar, which is the most efficient pressure for the MQL system. Experiments in cryogenic environments were carried out with a YDS-10 liquid nitrogen (LN2) tank (made by, Lowtemp brand). Liquid nitrogen was applied at 0.5 bar pressure with a 3 mm diameter nozzle. The input parameters included in the experiments are axial depth (ap), feed rate (f), and cutting speed (V). In the experiments, the axial depth was applied as constant. The output parameter is energy consumption data. Table 1 shows the factors and levels involved in the experiment. The experimental setup is given in Fig. 2.

Table 1 Parameters used in all experiments
Fig. 2
figure 2

Experimental setup used in the current work

2.1 Data collection

ML algorithms were used to estimate the power consumed when turning PH13-8 Mo stainless steel. When deciding on the use of machine learning algorithms, the structure of the data set, the type of problem and performance criteria were taken into account. The fact that the data is labeled, that is, the dependent variables are present in the dataset, is a prerequisite for using the Supervised Machine Learning approach. At the same time, in the problem type, the output consists of continuous numerical values and the predictions are evaluated quantitatively, which are typical features of regression problems. Therefore, since the data is labeled and the output is continuous, Supervised Machine Learning Regression Algorithms were used in data analysis. For regression estimation, Python 3.10 programming language was used in Jupyter Notebook 6.5.3 environment. Jupyter Notebook provides an interactive interface and allows running Python code in chunks, visually displaying the results, and documenting them with annotations. General flow used in estimating power consumption of supervised machine learning regression algorithms; It includes the steps of data collection, data pre-processing, algorithm selection, model training and model evaluation. These steps are explained in detail below (Fig. 3).

Fig. 3
figure 3

Flow chart of regression modelling

2.2 Data processing

In this study, the milling experiment data set of 11.3 × 5 cm³ PH13-8 Mo stainless steel samples obtained from the Taksan TMC 500 V brand CNC vertical machining device was used. There are 54 data points in the dataset used for power consumption estimates. The experimental data set consists of PH13-8 Mo stainless steel samples in six different environments (Dry, MQL, nano-Graphene, nano-hBN, Cryo, Cryo + MQL), three different cutting speeds (40, 60 and 80 m/min), and three different feeds (0.04, 0.08 and 0.12 mm/rev). Milling tests were carried out twice under the above-mentioned conditions and evaluations were made by averaging the obtained data. Among the data parameters, cutting speed (mm/min), feed (mm/rev), and cutting environments are input parameters. Among the input parameters, cutting environment is defined as categorical data for ML algorithms, while the rest are numerical and power consumption is the output parameter as also indicated in Fig. 4.

Fig. 4
figure 4

Power data processing in milling of PH13-8 Mo stainless steel

The quantification of power consumption during the milling process takes place at several stages. Figure 5 demonstrates the installation of KAEL’s power analyzer on the power input of the CNC machine to achieve the desired objective. The device-named KAEL combines the company’s broad industrial knowledge in terms of functionality. The electrical sector now has access to a state-of-the-art energy analyzer, made possible by the advanced and well-equipped software it has developed. This equipment aids in the measurement, reporting, and analysis of electrical values in a three-phase electrical network. The device features a color TFT screen and has a capacity of 32 gigabytes for data storage via a microSD card. The data is gathered in its unprocessed form. The device is employed while the system is not electrified to aid in the procedure of creating the connections. Moreover, the electricity and power requirements for cryogenic system and MQL/compressor system have also been measured just before the mains electricity as shown Fig. 5. The measured power is not from the sensors, it is from directly read value from the network analyzer.

Fig. 5
figure 5

Direct power measurement from network analyzer under main system electricity

2.3 Data preprocessing

Data preprocessing is important for the model to produce accurate and reliable results. Data preprocessing techniques are the step of making the collected data suitable for analysis and modeling. In this step, operations such as importing libraries and data loading, data cleaning, feature selection, categorical variable transformation, normalization of data (feature scaling) are performed. The data preprocessing steps are as follows:

  • Step 1 - Importing Libraries and Data.

The Python machine learning libraries and data loading step refers to incorporating the libraries used for machine learning and data analysis in the Python language and the collected data into the system. Importing libraries is the process of making the libraries to be used in Python available by importing them with the “import” command. Scikit-learn (sklearn), NumPy, Pandas and Matplotlib, popular and widely used machine learning libraries in Python, were used. Scikit-learn is a very useful library containing Machine learning algorithms and tools. It includes many machine learning algorithms such as classification, regression, clustering, and dimensionality reduction. NumPy is a basic library used for numerical calculations. It is used to perform operations on arrays and matrices and contains various mathematical functions. Pandas is the library used for data analysis and data manipulation. It is a powerful tool for working on data frames. Matplotlib is a library used to create visualizations. It is used to make graphs, drawings and visual presentations. Importing data loading is the process of loading the data set to be used in Python as a Data Frame object in CSV, Excel or other data formats, with the help of the Pandas library. The data set used in this study was imported in CSV format.

  • Step 2 - Data Cleaning.

After importing the data set, the data set was checked for any missing or abnormal values and necessary corrections were made. Missing value checking was done numerically and visually with the “df.isnull().sum()” command.

  • Step 3 - Feature Selection.

The relationships between the wear rate and CoF parameters are presented as graphs using the “Matplotlib” library ‘plt.subplots()’ function. Additionally, the relationship between the parameters is presented graphically using the ‘sns.pairplot()’ function.

  • Step 4 - Categorical Variable Conversion.

Categorical variables were converted to numerical form using the pd.get_dummies() function. The environment variable contains categorical variables such as “Dry”, “MQL”, “nano-Graphen”, “nano-hBN”, “Cryo”, “Cryo + MQL”. The “pd.get_dummies()” function will transform this variable into three separate columns and each row will contain the values 1 or 0 for “Dry”, “MQL”, “nano-Graphen”, “nano-hBN”, “Cryo”, “Cryo + MQL”, depending on their presence. For example, if the “Environment” value is “Dry” in one row, it will be 1 in the “Dry” column and 0 in the other columns. In this way, the categorical variable is converted into numerical form and it is possible for machine learning algorithms to process this data better.

  • Step 5 - Normalization of Data (Feature Scaling).

In order to ensure that the data set fits machine learning models better and to increase the performance of the algorithm, the “StandardScaler” tool of the “Scikit-learn” library is used, and the mean of each feature in the data set is 0 and the standard deviation is 1 as shown in Table 2.

Table 2 Normalization of Data for Power consumption in different cutting conditions

2.4 Algorithm selection

One of the most commonly used Supervised Machine Learning Regression Algorithms to create power consumption prediction models; four types of machine learning algorithms were used, including linear regression (Eq. 1), multilayer perceptron (Eq. 2), gradient boosting regression (Eq. 3) and adaboost regression (Eq. 4). Grid Search method was used in hyperparameter optimization of the selected algorithms. The Grid Search method trains the model using a specific combination of hyperparameters and selects the combination that gives the best performance by trying various combinations of hyperparameters. Parameters of ML Algorithms for Power Consumption Predictions are shown in Table 3.

$${y}_{i}=\widehat{\alpha }+\widehat{\beta }x$$
$$\widehat{\alpha }=\overline{y}-\widehat{\beta }\overline{x}$$
(1)
$$\widehat{\beta }=\frac{{\sum }_{i=1}^{n}\left({x}_{i}-\overline{x}\right)\left({y}_{i}-\overline{y}\right)}{{{\sum }_{i=1}^{n}\left({x}_{i}-\overline{x}\right)}^{2}}$$
$${y}_{i}=\left(\sum\nolimits_{i=1}^{n}{w}_{i} {x}_{i}\right)+b$$
(2)
$${y}_{i}={F}_{M}\left({x}_{i}\right)= \sum\nolimits_{m=1}^{M}{h}_{m}{(x}_{i})$$
$${h}_{m}={argmin}_{h}{L}_{m}={argmin}_{h}\sum\nolimits_{i=1}^{n}l({y}_{i},{F}_{m-1}\left({x}_{i}\right)+h\left({x}_{i}\right))$$
(3)
$$l({y}_{i},{F}_{m-1}\left({x}_{i}\right)+{h}_{m}\left({x}_{i}\right))\approx l({y}_{i},{F}_{m-1}\left({x}_{i}\right)+{h}_{m}\left({x}_{i}\right)){\left[\frac{\partial l({y}_{i},F({x}_{i}\left)\right)}{\partial F\left({x}_{i}\right)}\right]}_{F={F}_{m-1}}$$
$${y}_{i}=sign\left[{\sum }_{i=1}^{n}{\alpha }_{i}{y}_{i}\left({x}_{i}\right)\right]$$
(4)
Table 3 Parameters of ML algorithms for power consumption predictions

2.5 Model training

It is the step of training the selected algorithm on the dataset. In this step, the dataset is divided into training and test sets. The model is learned on the training set, and this learning enables it to produce outputs depending on the inputs given to the model. While the Machine Learning model was created and validated using training sets, the performance of the models was evaluated on the test set. In the data division process, 70% of the training set was used for training purposes, while the remaining 30% was used for the test set of the model. ML algorithms for power consumption prediction have 56, 25 (81 total) data points in the training and testing set, respectively.

2.6 Model evaluation

This is the step of evaluating the performance of the trained model. In this step, mean square error (MAE), mean square errors (MSE), RMSE square root of MSE, R-squared performance measures were used. The formulas for four different error metrics are given below. In addition, cross-validation (cv) technique was used to evaluate the performance of a model and measure the generalization ability of the model, and the cv value was selected as 5.

  • Mean Squared Error (MSE): MSE is an error metric that calculates the average value of the square of the difference between actual values and predicted values. A lower MSE value indicates a better model performance. Its mathematical formula is given in Eq. 5 [31].

$$MSE=\frac1n\sum\nolimits_{i=1}^n{(y_i-{\widehat y}_i)}^2$$
(5)

Here:

n:

Number of data points.

yi:

Actual values.

ŷi:

Predicted values.

  • R-squared (R2): R2 is a statistic that shows the proportion of the target variable explained by the independent variables of the model. It takes values between 0 and 1. A higher R-squared value indicates that the model fits the data better [32]. Its mathematical formula is given in Eq. 6.

$${R}^{2}=1-\frac{SSR}{SST}$$
(6)

Here:

SSR:

Sum of Squared Residuals of Regression Error.

SST:

Total Sum of Squares.

SSR and SST values are calculated as the sum of the square of the difference between the predicted values and the actual values.

  • Mean Absolute Error (MAE): MAE expresses the average value of the absolute differences between the actual values and the predicted values. A lower MAE value indicates a better model performance [33]. Its mathematical formula is given in Eq. 7.

$$MAE=\frac1n\sum\nolimits_{i=1}^n\left|y_i-{\widehat y}_i\right|$$
(7)

Here:

n:

Number of data points.

yi:

Actual values.

ŷi:

Predicted values.

  • Root Mean Squared Error (RMSE): RMSE is obtained by taking the square root of MSE. It is the square root of the average value of the square of the difference between the actual values and the predicted values. A lower RMSE value indicates a better model performance. Its mathematical formula is given in Eq. 8 [34].

$$RMSE=\sqrt{MSE}$$
(8)

Here:

MSE:

Mean Square Error

$$MAPE=\frac1n\sum\nolimits_{i=1}^n\left|\frac{y_i-{\widehat y}_i}{y_i}\right|$$
(9)

These error metrics are commonly used to evaluate model performance. Which error metric to use may vary depending on the characteristics of the data set and model. Cross-validation is a method used to evaluate model performance and measure generalization ability. K-Fold Cross-Validation is one of the most widely used cross validation methods. The K-Fold Cross-Validation formula cannot be expressed mathematically. However, this method divides the data set into random pieces and trains the model on the other pieces, using each piece as test data in turn. This process is repeated K times, with different parts used as test and training data in each iteration. The overall performance of the model is calculated by averaging the results obtained.

3 Results and discussion

3.1 Demonstration of power and its shares in machining

An intriguing topic of inquiry is the examination of the distribution of power consumption across a number of different phases of the machining process and the exploitation of resources. Figure 6 presents a visual representation of the distribution of instantaneous maximum power consumption utilization among the various cutting media for each individual unit manufactured. It is important to point out that the MRR requirements for purchasing any power share are met with more stringency. The breakdown of the power usage that goes into making a single component using the dry approach may be shown in Fig. 6. In the context of the dry machining, it is clear that the predominant power consumption, with an apparent 63%, is attributable to the machining processes. It is important to note that the power required for standby, spindle, and linear operations has a ratio of 12%, 11%, and 14%, respectively. This is something that should be taken into consideration and it is possible to draw the conclusion that a loss in tool life leads in an increase in the total quantity of embodied energy that is contained inside the cutting tool, which, in turn, becomes the major factor that contributes to overall power consumption. When compared to this, it is important to take into mind that when using the Cryo and CryoMQL approach, the embodied power of LN2 accounts for approximately 62% of the total. The cause for this phenomena can be ascribed to the significant amount of energy that is required for the synthesis of LN2 as also indicated by Gan et al. [35]. When compared to the MQL technique, the CryoMQL method demonstrated a significant increase in both the efficacy and efficiency of lubri-cooling phenomena, which resulted in a significant extension of the cutting tool’s lifespan [36]. This was achieved by the method’s use of liquid nitrogen. As a consequence, the embodied power of the machining is 62% of the cumulative power required for its manufacture per component. This is the case when the power required for the standby, spindle, and linear with a ratio of 12%, 12%, and 14%, respectively. Because of the significant amount of embodied energy that is related with the utilization of liquid nitrogen (LN2), the Cryo-MQL assisted machining process may be described as being an activity that is very power-intensive. As a result of this, there is a need to study techniques for increasing the energy efficiency of LN2 manufacturing in order to optimize the process’s total use of energy.

Fig. 6
figure 6

Power consumption shares based on machining, standby, spindle and linear powers

3.2 Parametric effect on power consumption

It is known that in machining operations, the feed rate and cutting speed have a significant effect on power consumption (Pc) values. However, evaluating the effects of these parameters in new generation or eco-friendly cutting fluids is important for sustainable machining. In milling with complex cutting mechanics, parameter-power consumption interactions become even more important. In this context, the changes of instantly measured maximum power consumption according to processing parameters are shown in Fig. 7. As can be seen from Fig. 7 (a), power consumption increases as the feed rate increases while the cutting speed is constant. For all cutting environments, when the feed rate increases from 0.04 to 0.08 mm/rev, the power consumption increased 3.14% on average. Moreover, this increase rate is 2.46% when the feed rate increases from 0.08 to 0.12 mm/rev. This result is due to the increase in the power required to remove the increased chip volume from the material with the increase in feed rate [37]. On the other hand, decreasing tool-chip interface friction forces with the effect of sustainable cutting environments applied outside of dry cutting positively affects the cutting power [38]. This trend is clearly visible in the power signals as represented in Fig. 7(b). As a matter of fact, despite the increase in feed rate, there is a tendency for the cutting power to decrease towards the Cryo environment. This decrease in Pc compared to dry cutting was calculated as an average of 2.2%, 3.17%, 2.57%, 4.88% and 5.45% for MQL, GRP + MQL, HBN + MQL, CRYO and CRYO + MQL environments, respectively. Power consumption decreased due to the decrease in the tool-chip contact area due to the lubrication effect provided by MQL, GRP + MQL and HBN + MQL environments [39, 40]. The lowest Pc was obtained in the Cryo + MQL environment, and this result can be attributed to the reduced friction and pressure in the second deformation zone, which occurs thanks to the lubrication + cooling combination provided by the mentioned environment [41]. Although cryogenic temperature prevents the softening of the work material and makes plastic deformation difficult [42], it contributes to the reduction of cutting power due to chip pressure by reducing the chip curvature radius, as mentioned in the literature [43]. On the other hand, the cutting temperature, which increases with the increase in cutting speed, softens the material being processed, resulting in a decrease in cutting power and thus in energy consumption as also indicated by Abukhshim et al. [44]. However, in the current study, it is seen that power consumption increases with increasing cutting speed (Fig. 7). This situation obtained in all cutting environments can be attributed to two reasons. The first is that the cutting temperature does not increase proportionally with the increase in cutting speed due to the intermittent metal removal process of the milling [43, 45]. In this case, the expected decrease in cutting power did not occur because the material softening effect of the cutting temperature would decrease. Secondly, as the cutting speed increases, the machine energy consumption increases due to the increasing number of revolutions, contributing to the increase in power consumption during machining. As a result, it is recommended to apply the feed and cutting speed at the most appropriate value in terms of power consumption in sustainable cutting environments.

Fig. 7
figure 7

(a) Stacked plots of power consumption values under different conditions and machining parameters (b) Comparison of power signals under different cooling conditions

3.3 Predictive modelling of power consumption values with machine learning algorithms

The performance of different ML algorithms is evaluated with the graphs plotted between predicted and actual values. The significance of this research is best illustrated by comparing the observed (actual) response values to the expected response values in a scatter plot. It aids in the identification of data points that are poorly predicted by the model. A 45-degree line ought to be drawn through all the data points to ensure equality. If they are not, a transformation or higher-order model may be used to achieve a better match. In the present work, the four different ML algorithms have been used to illustrate the efficiency of developed models in Fig. 8. Initially, the predicted vs. actual values plots were demonstrated and then different performance metrics such as R2, MSE, MAPE, RMSE, MAE etc. were used and the performance of each algorithm has been compared. Figure 9 compares the influence of the model to the null model by plotting predicted power values versus observed power values. In the current work, all models are statistically significant, and the values are within a small range of the fitted line, indicating a satisfactory match. Figure 9 shows the performance metrics of all algorithms and grad algorithm shows best R2 values of 0.996 among other applied machine learning models, namely, linear regression, multilayer perceptron and adaboost regression via R2 values of 0.944, 0.947 and 0.956, respectively. That means, the gradient boosting predictor have better accuracy in demonstrate the predicting results of power consumption values. Similarly, the other indicators of same algorithm show the best performance. On the other hand, the linear regression have close results but the accuracy of gradient boosting is 5.7% more than linear regression. The MLP and adaboost also follows the similar trend and provides the best fit curve and predicted values with less errors. IN MAPE, MAE, MSE and RMSE the highest values are observed with LR and smallest values are observed under gradient boosting algorithm. The validity of the Gradient boosting technique was evaluated by employing performance metrics such as mean absolute percentage error (MAPE), mean square error (MAE), mean square errors (MSE), and root mean square error (RMSE), which yielded values of 0.21%, 2.3 W, 15.7 W, and 3.96 W, respectively. The R2 score was calculated to be 0.996, indicating a good level of accuracy for the Gradient boosting approach. Ensemble methods provide a range of benefits compared to using individual models. They can enhance overall accuracy and performance, particularly when dealing with intricate and noisy datasets. Additionally, ensemble methods help mitigate the risk of overfitting and underfitting by effectively managing the trade-off between bias and variance, and by leveraging diverse subsets of data and features for more robust predictions. Therefore, it is thought that the gradient boosting method, which is an ensemble method, gives better results as also reviewed by Mohammed and Kora [46].

Fig. 8
figure 8

Predicted vs. actual values based on power consumption

Fig. 9
figure 9

Influence of the Machine learning models based on power consumption

4 Conclusions

This study investigated the machining of PH13-8Mo stainless steel employing coated carbide inserts under various cutting conditions, including Dry, Minimum Quantity Lubrication (MQL), GPR + MQL, hBN + MQL, Cryo, and Cryo + MQL. The power consumption (Pc) during the milling process was monitored, and a machine learning methodology was employed to predict and estimate the Pc values.

  • In various cutting conditions, it has been observed that there was an average increase of 3.14% in power usage as the feed speed was raised. The decrease in Pc, relative to dry cutting, was determined to be an average of 2.2%, 3.17%, 2.57%, 4.88%, and 5.45% for the MQL, nano-Graphen + MQL, nano-hBN + MQL, Cryo, and Cryo + MQL methods.

  • Within the framework of the overarching problem of machining, it is evident that the machining processes are responsible for the majority of the power consumption, which is estimated to be 63%. It is essential to keep in mind that the ratio of power needed for standby, spindle, and linear operations is 12%, 11%, and 14%.

  • The efficacy of the constructed prediction model in capturing the power consumption-parameter correlations is seen to be 0.996, 0.944, 0.947 and 0.956 with Gradient boosting algorithm, linear regression, multilayer perceptron and adaboost regression.

  • The performance measurements such as mean absolute percentage error (MAPE), mean square error (MAE), mean square errors (MSE), and root mean square error (RMSE) to evaluate the efficacy of the Gradient boosting approach via the results of 0.21%, 2.3 W, 15.7 W, and 3.96 W, respectively. The Gradient boosting strategy was found to have an R2 score of 0.996, which indicates a high level of accuracy when used in practice.