1 Introduction

Hard-turning is the process of turning components possessing hardness varying from 45 to 68 Rockwell hardness (HRC) [1], into complete products on the same lathe that ordinary turning is done [2]. The hard-turning process increases the quality of the products and reduces the time of operation, in addition to other advantages stated in the literature [3,4,5]. On the other hand, hard turning has some major difficulties during cutting operations, which affect the procedure of achieving high-quality products. One of these major difficulties is the high cutting temperature generated during hard turning. Generally, the main causes of surface changes generated by cutting processes are high temperatures or high temperature gradients taking place in the cutting process, chemical reactions and plastic deformation [6]. In hard turning operations, owing to the high hardness of workpiece materials and the corresponding high temperatures, problems become more complicated. When thermal aspects are coupled with mechanical aspects, this will result in rapid tool wear. Tool wear, not only reduces the tool life and increases the machining costs, but it also increases the forces and tensile residual stresses affecting the surface quality and causing white layer surface damages [7]. These generated white layers possess a negative effect on surface finish and fatigue strength of the final product. A white layer is a hard phase that leads to a more brittle surface, causing crack penetration and thus leading to product damage. This is a major problem regarding service performance, particularly in the aerospace and automotive industries [8]. Although dry cutting is desirable from the economic and environmental concerns [9], yet dry cutting without utilizing cooling and lubricants, especially in case of cutting hardened materials, may result in an extreme temperature rise, which in turn will cause a detrimental effect on the tool and work materials. Thus, it is quite important to model this phenomena, particularly in dry cutting, to try to predict it to take the advantages of dry turning and at the same instance to reduce its negative effects by taking all necessary precautions for dealing with it, to make sure that the performance of the produced part won’t be affected. A unidimensional model suggested by Chakraverti et al. [10] for temperature distribution prediction on the tool, through intermittent machining. It was found that the thermal stresses increase directly with the fluctuating amplitude of temperature. A finite-difference model was established by Islam et al. [11]. The model was able to calculate the steady and the transitory states of temperature in the tool, workpiece, and chip. A modified 3D model was established by Liang et al. [12] for determining the temperature at the chip-tool interface in turning of AISI 1045 steel, taking into consideration the inverse heat conduction technique. The cutting temperature in turning was experimentally discussed and optimized by Davoodi et al. [13], to eliminate the cooling fluid. The cutting temperature and temperature distribution over the surface of the tool were modeled by Karpat and Ozel [14]. They also found that the experimental and the predicted results agree with each other to a good extent. Turning parameters were optimized by researchers [15] for minimizing the tool wear and maximizing the material removal rate without disturbing the cutting temperature limit. An optimization model proposed by researchers [16] was established for optimizing the cutting temperature in turning AISI D2 steel utilizing Taguchi technique employing different fluids. Results disclosed that nanofluid consisting of carbon nanotubes reduced the cutting temperature effectively by increasing the heat transfer rate. The ability of a solid lubricant in reducing the chip-tool interface temperature through turning was discussed by Moura et al. [17] and it was deduced that utilizing a solid lubricant in turning yields better results in comparison with wet or dry turning. Cutting temperature was modeled by researchers [18], taking into consideration the effect of the air flowing around the insert, and the results helped in understanding the cutting temperature scheme. GA was utilized by researchers [19] for optimizing the cutting temperature and the material removal rate. Few modeling approaches [20, 21] of chip-tool interface-temperature were developed in considering the cutting parameters. In this study, RSM will be utilized for designing the experiments, establishing a mathematical model relating the inputs with the output response, and studying the effect of inputs on the output response. RSM and ANN will be employed for creating predictive models for cutting temperature at the tool-workpiece interface (will be denoted as cutting temperature for simplifying throughout the study) within the applied conditions. Finally, a new algorithm, which is the CFA, will be used for optimizing the cutting temperature using the developed mathematical model as the objective function, and to test its adequacy, the outcomes will be compared with the ones obtained from the GA.

2 Materials and methods

Round AISI H13 bars of 100 mm length and 35 mm diameter with an initial hardness of 207 Brinell Hardness (HB) were employed as test specimens. Table 1 reveals the chemical composition of the test specimens.

Table 1 Chemical composition of AISI H13 tool steel

Heat treatment was utilized for hardening the specimens to values 45 ± 1, 50 ± 1 and 55 ± 1 HRC as follows:

  1. 1.

    Removing stresses by heating to 600 °C in for 4 h, and then by slow cooling in furnace.

  2. 2.

    Hardening as follows:

    1. (a)

      Pre-heating to 500 °C for 2 h, then second pre-heating for 850 °C for half an hour.

    2. (b)

      Employing a salt furnace for heating specimens to 1050 °C for a quarter of an hour, followed by quenching in oil.

  3. 3.

    Then the hardness was measured for validating the hardening process by utilizing INNOVATEST Europe BV Model: NEXUS 610 hardness tester.

  4. 4.

    For achieving the required hardness, tempering was done in which the specimen of hardness 45 ± 1 was reviewed at a temperature of 600 °C; for 50 ± 1, the reviewing temperature was 580 °C; finally, for 55 ± 1, the temperature was 450 °C.

  5. 5.

    Specimens were then kept at a uniform temperature for 2 h. Thereafter, it was cooled by being left in ambient air, and then washed and measured to ensure that the desired was attained.

A mixed ceramic cutting insert of aluminum oxide (Al2O3) and titanium carbon nitride (TiCN), commonly used for finish cutting of hardened steel (CNGA 120408 E040), was mounted on a shank holder (PCLNR 2525M 12), having a 6o negative rake angle. Dry cutting operations were done. Machining tests were done on a conventional lathe of spindle speed 1400 rpm (Make: SJR Machinery, Model: L6241, Power: 4 kW). An infrared camera “Fluke infra-red thermal image camera” Model: T32i was employed for measuring the tool-workpiece interface temperature. The camera is accompanied by a full image analyzing and reporting software named SmartView®. The software possesses tools for optimizing images and it also generates customized and professional reports. Figure 1a shows the procedure followed for measuring the cutting temperature experimentally, while Fig. 1b reveals an image taken by the camera showing temperature measurement using the software. In this research, the emissivity coefficient was taken ε = 0.4; [22] the separation distance between the camera and the cutting process was fixed to 35 cm. The temperature was recorded for each experiment after a fixed time of 30 s from starting the cutting operation.

Fig. 1
figure 1

a Experimental setup and b shows temperature measurement in a sample Image

3 Experimental design

To discuss the influence of the various factor levels on the cutting temperature, response surface central composite design was employed for designing the experiments by utilizing design expert software. In the design, there are four numeric factors, which are cutting speed, feed rate, depth of cut and workpiece hardness. Factor levels were selected based on recommendation data by cutting tip manufacturer, literature, and the availability of cutting factors on the employed lathe. The three levels for cutting speed were 100, 125 and 150 m/min; feed rate 0.05, 0.1 and 0.15 mm/rev.; depth of cut 0.05, 0.09, 0.13 mm/rev; and finally, the workpiece hardness as mentioned before were 45, 50 and 55 HRC. The experimental design scheme and its corresponding values are shown in Table 2. A linear mathematical model was proposed for cutting temperature, based on the experimental data.

Table 2 Central composite design: different input parameters and results

The adequacy of the linear model was examined by Analysis of variance (ANOVA). The ratio between the maximum and minimum values of temperature data was 1.45526, indicating that no transformation functions are needed. Adequate Precision for cutting temperature model is 21.083; it is computed by dividing the signal by noise, and its value shall exceed 4. It is a measure of the adequacy of the generated model to search the design space. The linear model generated and selected by the design can be represented by the following equation:

$${\text{Yu}} =\upbeta{\text{o}} + \sum\limits_{{{\text{i}} = 1}}^{\text{N}} {\upbeta{\text{i xi}}} + {\text{e}}$$
(1)

where Yu is the cutting temperature response, βo is the main effect, β1…βi are the regression coefficients of the linear factors, ‘xi’ is the independent input terms such as cutting speed, depth of cut, feed rate and workpiece hardness (1, 2, 3…N), and ‘e’ is the residual error of model.

The latter equation can be rewritten simply for four independent variables as follows:

$${\text{Yu}} =\upbeta{\text{o}} +\upbeta1\;{\text{x}}1 +\upbeta2\;{\text{x}}2 +\upbeta3\;{\text{x}}3 +\upbeta4\;{\text{x}}4 + {\text{e}}$$
(2)

The next step is testing the lack of fit which has a P value of 0.6651, indicating its insignificance; this can be revealed in the ANOVA Table 3. Non-significant “lack of fit” is necessary, as it is required for the created model to fit. It is also revealed from the same table that the resulted model possesses an F value of 34.24, indicating its significance. Table 3 also distinguishes the significant factors based on the P value, where terms whose P value is < 0.05 are the significant ones. Moreover, the contribution of each parameter can be calculated by dividing its corresponding sum squares value by the total sum of squares value. The workpiece hardness “D” have a contribution of 63.77%, making it the most influential factor on the cutting speed; followed by the cutting speed “A” with contribution of about 16%; then the feed rate “B” with a contribution of 4.78%, and finally, the depth of cut “C” with the least contribution percent. Similar findings were obtained by [23, 24]. Equation 3 represents the cutting temperature linear-model, in terms of the above-mentioned factors in the coded form:

$${\text{Cutting temperature}} = 467.80 + 25.28*{\text{A}} + 13.83*{\text{B}} + 1.11*{\text{C}} + 50.5*{\text{D}}$$
(3)
Table 3 ANOVA results for the cutting temperature

The coded terms equation can be applied in predicting the cutting temperature for any specified level of each term. The level of the maximum value of terms is coded in the form of + 1 while minimum ones are coded as − 1. The benefit of a coded formula is for identifying the relative impact of the factors by factor coefficients mimicking. The latter equation can be rewritten in terms of actual terms as follows:

$$\begin{aligned} {\text{Cutting temperature}}\,\left( {\text{T}} \right) & = - 193.7555 + 1.01111*{\text{Speed}} + 276.66667*{\text{Feed}} \\ & \quad + 27.77778*{\text{Depth of cut}} + 10.1*{\text{Hardness}} \\ \end{aligned}$$
(4)

The normal plot of residuals is utilized for checking the adequacy of the created model. The plot must take a straight-line profile because residuals are the approximate difference among the experimental values and the predicted values of the response. Furthermore, residuals versus the predicted response plot are for checking the adequacy, in which the value points shall be distributed randomly. Figure 2a reveals the Normal plot of residuals for the cutting temperature while Fig. 2b reveals the residuals against the predicted for the cutting temperature. Similar findings were obtained by Noordin et al. [25]. As errors are normally distributed, which is described by the straight-line shape formed by the residuals, there is no probability for constant-variance. Furthermore, in the ‘residuals versus the predicted plot,’ the value points have no definite arrangement, which proves adequacy. Therefore, the obtained model is robust and can be applied in cutting temperature prediction as it resembles previous works. The perturbation plots revealed in Fig. 3 agrees with the later discussed “ANOVA” results for cutting temperature, in which hardness of workpiece comes in the first rank. Perturbation plots also compare the impacts of different input terms on the output response. Thus, it is clear that all four input parameters increase the cutting temperature by different percentages.

Fig. 2
figure 2

a Shows normal plot of residuals for cutting temperature. b Shows residuals against the predicted for cutting temperature

Fig. 3
figure 3

Shows the perturbation plot for cutting temperature

In dry cutting, the surrounding air does not offer sufficient cooling for the tool-workpiece interface, where the high friction generates a high increase in temperature at the contact point between the workpiece and the cutting tool [16]. This rise in cutting temperature is owing to the transformation of the mechanical energy into heat energy [26], which is due to the cutting tool presented in the form of cutting force for deforming the material plastically, [17] and form chips. Restricting force is generated by the material being cut, preceding breakage of the bonds of metals/alloy molecule against the cutting force brought by the tool insert. Increased hardness of the material contributes to the rise of the restraining force [27], and thus, increases the cutting temperature. The cutting speed follows the workpiece hardness in creating a significant influence on the cutting temperature. That is because increased cutting speed means an increased amount of material removal per unit time. Therefore, higher friction is afforded by the cutting tool that contributes to the generation of cutting temperature [28]. Furthermore, higher cutting speed results in a very short time for cutting and within this short time, cutting-tool has insufficient time for cooling and therefore the cutting temperature increases [29]. When the temperature of the cutting tool is increased and it gets hot, it gets softened and its sharpness is reduced; [17] the dull tool edge leads to a higher tool contact surface (increased nose radius) and is consequently faced with increased friction, and generates higher cutting temperature. Moreover, high cutting speed results in a higher strain rate in the shear zone; thus, more heat will be generated leading to temperature rise. Though the feed rate has a significant effect on the cutting temperature, yet it is a little effect, as high feed rate value means a larger distance per revolution of the workpiece, and this barely leads to any change in the machining mechanism, and thus produces a low impact on the cutting temperature [24]. Figure 4a, b reveals the 3D response surfaces curves for the cutting temperature since the formulated model was labeled as a satisfactory model; thus, the obtained 3D response plots can be employed in predicting the cutting temperature values at the various interaction values of process factors. Figure 4a reveals that the best cutting temperature value in considering productivity and maximizing the value of the depth of cut to 0.13 mm and feed rate to 0.15 mm/rev, was obtained at the combination of the lowest values of speed and workpiece hardness, as stated before and as found by other researches. Figure 4b reveals that the best value of cutting temperature was obtained at the lowest values of workpiece hardness and the lowest value of feed rate, though the effect of depth of cut value on cutting temperature is relatively small; yet increasing the depth of cut will increase the cutting temperature. Thus, the optimum cutting temperature values can be achieved at the least values of process parameters. This agrees with the results obtained by statistical analysis as well as the outcomes obtained from perturbation plots.

Fig. 4
figure 4

3D response surfaces curves for the cutting temperature

4 ANN model

ANNs are used for creating models similar to human brains processing information. ANN is essentially a statistical instrument and is considered as a kind of nonparametric regression model [30]. An ANN consists of an input layer, hidden layer/s, and finally an output layer; the layers have one or more neurons. The number of neurons, structure, functions, training algorithm, weights and biases impact the precision of the ANN model. In the current study, a feed-forward back-propagation network with four nodes in the input layer representing cutting speed (v), feed rate (f), depth of cut (d) and workpiece hardness (h) will be utilized. An output layer has one neuron representing the predicted response, which is the cutting temperature. An ANN model is based on trial and error for acquiring the optimal outcomes. The process of trial and error is done by regulating the number of layers and nodes of the hidden layer(s) of the network.

Therefore, researchers can select freely and test, employing any number of hidden layers and any number of nodes for each hidden layer. However, a great node number in the hidden layers lead to high usage of computer memory and consumes time, and may result in overtraining [31]; also, few nodes lead to poor control of data [32]. Zhang et al. [33] suggested that the numbers of nodes in the hidden layer for providing the best outcomes are “n/2”, “1n”, “2n”, and “2n + 1,” such that n is the number of input layer nodes. In case the number of input factors is four, then the number of nodes in the hidden layer can be 2, 4, 8 or 9. MATLAB R2015a ‘nntool’ toolbox was employed for training and testing the ANN. Figure 5 reveals the ANN architecture. Levenberg–Marquardt backpropagation (Trainlm) is a training algorithm for ANN, which updates weight and bias values based on Levenberg–Marquardt optimization [34]. Due to the symmetric nature, hyperbolic tangent sigmoid (Tansig) transfer function was employed in the hidden layer, while the pure linear function (Purelin) was employed in the output layer. Equation 5 was utilized for computing the mean relative error for comparing. Table 4 shows the ANN selected parameters.

$${\text{Mean relative error}} = \frac{1}{N}\sum\limits_{{{\text{i}} = 1}}^{\text{N}} {\frac{{\left| { {\text{Predicted outcome}} - {\text{Experimental outcome }}} \right|}}{{{\text{Experimental outcome}}}} \times 100}$$
(5)
Fig. 5
figure 5

The architecture of ANN

Table 4 Selected ANN parameters for surface roughness prediction

To test the adequacy of the created ANN model, an RSM predictive model based on the formulated linear model (Eq. 4) was used. Table 5 shows the experimental values along with the corresponding RSM, ANN predicted values, as well as the relative error for each. The regression plot between the cutting temperature experimental and ANN predicted values is revealed in Fig. 6a while Fig. 6b shows it for RSM. From the plot, the value of the regression coefficient is 98.145% for ANN, and 91.959% for RSM, which proves the adequacy of the ANN model compared with that of RSM. The mean relative error for the ANN model was 0.844% while that for RSM is 3.56%. Consequently, the created ANN model can effectively predict the response with a slight error. Also, the ANN model proved to be more efficient compared with that of RSM.

Table 5 Experimental ANN Predicted values and relative errors for cutting temperature error
Fig. 6
figure 6

Regression Plot for a. ANN and b. RSM

5 Optimization and description of CFA

CFA is a novel bio-inspired metaheuristic optimization algorithm [35]. CFA imitates the phenomena of changing the color of a cuttlefish to disguise in its environment, for solving the global optimization numerical problems. The CFA simulates the phenomena of light reflection on the combination of three layers of cells and matching pattern practice of visibility employed by the cuttlefish for matching its background. The CFA forms four groups of population (simulating cells in cuttlefish), and each of the four groups works independently by sharing only the best solution. Two groups of the population are utilized as local search, while the other two are for global search. CFA considers two key techniques; the reflection process of light, which simulates the mechanism of the reflection of the light ray, and visibility, which simulates visibility of coordinating patterns of cuttlefishes. The latter two processes are employed for searching for the global optimum solution. The CFA principle flowchart is revealed in Fig. 7.

Fig. 7
figure 7

CFA Flowchart

Following the prediction of cutting temperature at different input parameter values, the most logical step is obtaining the optimal combination of input parameters, which will lead to the least value of cutting temperature. In the current investigation, the equation for minimizing cutting temperature, which is (4), will be employed as the objective function where the target was to find the global minima employing the new proposed CFA in the search task, using the bounds of different input variables as boundaries. This is where the optimal value of cutting temperature will be found and its corresponding optimal values for inputs. The objective of employing Eq. (6) which can be expressed as follows:

$${\text{Cutting temperature ''T''}} = {\text{Minimize}}\;\left[ {{\text{Y}}\left( {{\text{v}},{\text{f}},{\text{d}},{\text{h}}} \right)} \right].$$
(6)
$$\begin{aligned} {\text{Subjected to:}} & \\ & \left\{ {\begin{array}{*{20}l} {100 \le {\text{v}} \le 150} \hfill \\ {0.05 \le {\text{f}} \le 0.15} \hfill \\ {0.05 \le {\text{d}} \le 0.13} \hfill \\ {45 \le {\text{h}} \le 55} \hfill \\ \end{array} } \right. \\ \end{aligned}$$

5.1 Optimization with CFA

In this optimization scheme, the number of cells will be set to n = 40, and the dimensional space of the problem d = 40, which shall be a number divisible by 4, and the total number of iterations shall be set to 10. After running the script using cutting temperature Eq. (4) through only one trial, the optimum value for cutting temperature was found to be T = 377.078 °C and the corresponding best cutting parameters were found to be v = 100 m/min, f = 0.05 mm/rev, d = 0.05 mm and h = 45 HRC. The best values were obtained after only two iterations.

5.2 Optimization with GA

To study the appropriateness of the cuttlefish in optimizing the cutting temperature, the outcomes were compared with those acquired from using GA, using the same above-mentioned Eq. (4) as the objective function along with the parameters’ boundaries and population size of 40. After several trials, the best cutting temperature obtained was found to be T = 377.078 °C and the corresponding best cutting parameters were found to be v = 100 m/min, f = 0.05 mm/rev, d = 0.05 mm and h = 45 HRC at a total no. of iterations of 184. Figure 8a, b summarize the outcomes in the form of convergence diagrams. Though equal values for the cutting temperature response as well as the same values for the corresponding input parameters for best value was suggested by both algorithm, yet CFA demonstrated its efficiency compared with the GA, especially in terms of the convergence rate for obtaining the best solution as well as no. of trials. The outcomes of input parameters for obtaining the least cutting temperature agrees with the statistical analysis stated before, in which the values of feed, depth of cut, speed and workpiece hardness were minimized to their least values. Finally, confirmation tests were done to test the performance of the algorithms experimentally. Where the optimal values of the input parameters obtained by the algorithms (v = 100 m/min, f = 0.05 mm/rev, d = 0.05 mm and h = 45 HRC) were employed in performing several experimental runs, and the corresponding values of cutting temperature was recorded. The average value for five tests value was 381 °C. The error percent was then computed between the predicted value (T = 377.078 °C) and the average value of the five experimental runs, thus the error was about 1.03%. This represents an error percent of below 5%, which indicates the accuracy of results. Table 6 shows the outcomes of the confirmation test.

Fig. 8
figure 8

a Convergence diagram for CFA and b convergence diagram for GA

Table 6 Outcomes of the confirmation test

6 Conclusions

This investigation aims at studying the effect of cutting parameters on the resulting cutting temperature at the tool-workpiece interface in “hard-turning,” using an infrared camera. The hardness of the workpiece was hardly included in literature as an input parameter for discussing the cutting temperature. RSM was employed in experimental design, and the resulting criteria were applied in performing the hard turning operations on differently hardened AISI-H13-steel specimens. A linear model was suggested, based on the experimental results, and it was checked for appropriateness. Following the proof of the adequacy of the suggested model, the influence of the various input terms on the cutting temperature was discussed. ANN was used for predictive modeling of the cutting temperature. Furthermore, a predictive model was created for the cutting temperature prediction using RSM for comparison with the ANN model. Finally, the current problem was optimized for obtaining an optimal combination of the input machining parameters for attaining the least possible value of cutting temperature in hard turning within the applied conditions, and the results were experimentally confirmed. Based on the above-mentioned investigation, the following can be concluded:

  1. 1.

    Workpiece hardness possesses the main influence on the cutting temperature. It contributes by 63.77%, according to the statistical analysis. This is due to the increase of the restricting forces upon raising the hardness of the workpiece against cutting, which increases the cutting temperature. Though the depth of cut is statistically insignificant, yet the observed trend contributes to an increase in the value of cutting temperature on increasing the depth of cut, which makes it predictable that there is a significant impact of depth of cut on cutting temperature upon raising the value of depth of cut.

  2. 2.

    Cutting speed and feed had had a significant effect on cutting temperature however, their combined contribution is less than one-third that of workpiece hardness, which reflects its large influence. This agrees with data from perturbation plot and ANOVA.

  3. 3.

    The ANN predictive model was found to be more robust in predicting the cutting temperature, compared with that created by RSM. ANN model has a value of 98.145% for the regression coefficient and a low mean relative error of 0.844%. Furthermore, the RSM regression coefficient was found to be 91.959%, with a mean relative error of 3.56%.

  4. 4.

    Both algorithms CFA and GA got the same results for the optimum value of cutting temperature of T = 377.078 °C at the same input parameters’ values of v = 100 m/min, f = 0.05 mm/rev, d = 0.05 mm and h = 45 HRC. Yet, the CFA showed much better convergence on comparing with GA, where the best solution was obtained after two iterations and after only one trial, while GA obtained best values after 184 iterations and after several trials. This demonstrates the high efficiency of CFA in optimizing machining problems.

  5. 5.

    Confirmation tests were done utilizing the optimal input parameters got by the two algorithms. An error below 5% was attained. The obtained error can be because of slight differences in conditions of measurement.