A hybrid approach based on artificial neural network and cuckoo algorithm for optimization of the main cutting force during turning of Si brass alloys

As an innovative approach in this study, artificial neural network and cuckoo algorithm have been applied to estimate and optimize the main cutting forces of various Si brass alloys during turning operation due to economic reasons. Accordingly, the chemical composition (Cu, Zn and Si contents) and process parameters (cutting speed, feed rate and depth of cut) are simultaneously implemented as input variables and the main cutting force is adjusted as an output variable. Moreover, the genetic algorithm is used to determine the optimum condition of the input parameters to obtain the lowest amounts of the main cutting force. Coupling of the hybrid cuckoo algorithm with artificial neural network has resulted in decreasing the mean absolute percentage error of the optimum structure (6-10-7-1) from 9.025 to 1.59E–6%. The validation of the proposed model has been done by performing the new set of experimental tests. The measured and predicted main cutting forces are in good agreement. The Si brass alloys including Zn equivalent about 44.97 wt% has the lowest main cutting force due to the formation of the Widmanstäetten morphologies in the microstructure. The outcome of this study may be useful for machining industry of the free-cutting Si brasses.


Introduction
Brass alloys containing of around 2 wt% lead (Pb) have extensive applications in engineering usages due to their excellent machinability. From one hand, the presence of Pb encourages the formation of microscopic chip breaker as well as induces the internal lubricant properties to the alloys and from the other hand, due to toxic effect of Pb restricted the usage of such alloys, significantly. Consequently, proposing of Pb free brass alloys is hot issue for research and process development [1][2][3].
Silicon (Si) is one of the most common elements for substitution of Pb in brass named as Si brass alloys. Si is a cheap and abundant element [4] and has significant potential for recycling. The addition of Si to brass can promote the creation of discontinuous chips [5], aid fluidity [6] and improve the strength, wear resistance and dezincification resistance [7].These outstanding characteristics of Si caused to evolve the Si brass alloys as good candidates for substitution of Pb containing brasses.
Schultheiss et al. [3], by evaluating the machinability of the Pb containing brass compared to Si alloyed brass, concluded that the cutting forces for Si brass was higher due to the greater yield and tensile strengths and hardness of this alloy. The same result was reported by Nobel et al. [5] however; they found that in comparison to leadless brasses, the machinability based on cutting forces could be improved by addition of Si. Oishi [7] proposed that satisfactory machinability could be obtained by addition of 2-4 wt% Si. Formation of brittle phases was reported to be a major cause of the machinability improvement. Adineh et al. [8] represented that not only the presence of brittle phases but also the morphology and hardness of the phases involved had significant role on decreasing the main cutting force of Si brass alloys.
The role of Si on the main cutting force of the turning operation is very important since this parameter has a major role on the energy consumption during the machining process. Therefore, there is a need for formulating and predicting the main cutting force versus the chemical composition of Si brass alloys as well as the machining parameters (including cutting speed (CS), feed rate (FR), and depth of cut (DoC)).
This paper is organized as follows: In Sect. 2, the principle of ANN and COA has been explained. In Sect. 3, the methods of production of samples by casting method, the machining condition and the way of measuring and collecting data have been proposed. In Sect. 4, the results of the ANN simulation, employment of COA to improve the accuracy of the ANN, optimum condition introduced by genetic algorithm and validation of the model by experimental tests are studied. In Sect. 5, we discuss the results of the research as well as the influence of each input parameters on the main cutting force.

Artificial neural network (ANN)
ANN, i.e., a machine learning technique, uses from past practical data (input values and output values) like human neurons to determine the complex interaction between the practical parameters. ANN learns from inputs and target data in a nonlinear parallel algorithm named feed forward-back propagation [9]. Input layer, one or higher hidden layers, output layer and a lot of nodes are the main components of this algorithm (Fig. 1). Data processing in ANN are carried out in neurons or nodes which are connecting each other by weights (w i ) and bias (b). Every neuron multiplies the input data using its relevant connecting weights and at follows sums the threshold acting as bias. The weight of each parameter is adjusted by considering its significance. Activation function is responsible for summation of the results within each layer and transfer to the next layer neurons [10,11] as following (Eq. 1). (1) ji is defined as the weight of neuron i in (n − 1)th layer to j in the nth layer and b (n) j is considered as the bias of neuron j in the nth layer [12].
There are various activation functions for connecting of the ANN components including Tansig, Logsig and Pureline as shown in Eqs. 2-4.
Generally, a backward propagation (BP) strategy employs for training of proposed feed forward networks [13]. This strategy estimates the weights at the start of the process in a random way. Then, the estimated output compares to the datum and the error sends back to the initial layer. By consideration of the error as a criterion, the weights are adjusted to minimize the error [9].
ANNs have attracted extensive attention in various aspects of casting and machining sciences for optimization and predicting of materials properties as well as materials behavior by excellent precision. Manjunath Patel et al. [14] utilized BP algorithm tuned neural network for modeling of squeeze casting process. The input data were pressure duration, squeeze pressure and pouring and die temperatures. Surface roughness and tensile strength were adopted as the output data. The results showed the capability of the model to make precise prediction. The combined method of genetic algorithm (GA) and BP neural network was also used effectively in mold Typically representation of the ANN components [9] breakout prediction in slab continuous casting by He and Zhang [15]. Arafat et al. [16] could model the energy consumption and surface roughness of the bovine horns versus process parameters of the face milling with high accuracy prediction by using ANN. Considering the significance and complexity of the casting and machining of the brass, it is necessary to employ the advanced techniques for comprehensive analysis as well as determination of the optimum condition for minimization of the main cutting force during the turning of Si brass alloys.

Cuckoo optimization algorithm (COA)
COA, i.e., a powerful strategy for simulation of non-linear issues, is inspired from specific breeding and egg laying of typical cuckoo species. Female types of cuckoos put their eggs in the nest of some chosen host birds due to the similarity between the colours and patterns of those species. After hatching the egg, the cuckoo chicks throw out the eggs and chicks of the host bird. Usually, 10% of the host birds distinguish the presence of strange eggs and throw them out of the nest. The suitability of the area for survival of the cuckoos is determined by the rate of the raised eggs. The surviving chicks of the cuckoo instinctly repeat the same trend at future [17,18]. When the surviving chicks become a mature, they start to form communities which have their own habitat to live. It is necessary to note that the most appropriate region is determined as a distinction of cuckoos for migration. In this algorithm, each egg in the nest and a cuckoo egg are representatives for a not-so-good solution and a new potentially better solution, respectively [17,18]. The convergence takes place to a state that just one cuckoo society remains [19]. The employment of COA as hybrid approach by ANN is considered as advanced technique for simulation of lot of engineering process [19][20][21].
The COA has been implemented for estimating the crack depth and location in cantilever Euler-Bernoulli beams by Moezi et al. [20]. It is also used for simultaneous optimization of maximum material removal rate and minimum surface roughness during electro chemical machining process [21]. The results of confirmatory experiments verified the suitability of this method. COA was successfully implemented for optimization of the production time in the multi-pass milling process and hybridization of this approach was encouraged for further improvement [22]. The ANN-COA flowchart is represented schematically in Fig. 2.
To the best of our knowledge, optimization and determination of the influence of effective parameters on brass goods alloys preparation by casting, i.e., Cu (wt%), Zn (wt%) and Si (wt%), cutting speed (CS), feed rate (FR) and depth of cut (DoC) on the main cutting force of turning operation have not been investigated, yet. Accordingly, as an innovative approach in this study, a hybrid ANN-COA strategy is employed for modeling and optimization of the main cutting force during the turning of Si brass alloys by simultaneous implementation of chemical composition and process parameters as inputs variables. In this study, the COA algorithm was implemented in order to optimize the weight and bias of the optimum network structure obtained by ANN.
The main contribution of the proposed model are:

Experimental procedures
The methodology of this study is briefly shown in Fig. 3. Preparations of cast samples were done by adding different amounts of high purity Si to Cu 65 Zn 35 and Cu 70 Zn 30 base brasses. The melting process was performed in an electric furnace and then the melts were poured in the cylindrical sand moulds with the height and diameter of 200 and 30 mm. The chemical composition of the Si brass alloys were determined by mass spectroscopy analysis and shown in Table 1.
The main cutting force was measured by a piezoelectric dynamometer KISTLER 9257B. The tests were done using DNMG 150608-PM inserts with the grade of YBC351 (indexed based on ISO 1832) under the dry conditions and the rake angle of 0º. To enhance the accuracy of the analysis, the main cutting force of every cutting condition was measured three times and the average values were used as input during the training and testing networks.
In this study, the content of Cu, Zn and Si as well as the CS, FR and DoC were considered as the input variables while; the main cutting force was selected as output variable. The ranges of the input parameters were selected based on the results obtained in literatures [8,24]. From 92 repeatable experimental data sets, 69 tests were selected for training and 23 for testing the network in a random way. Table 2 abbreviates the statistical information of experimental data. All data must be normalized in the range of [0.1-1] using Eq. 5.
In which, X max and X min are maximum and minimum values of the variable X [12].
Levenberg-Marquardt (LM) strategy on the basis of multilayer feed forward back propagation was employed for the determination of weights and biases during the training of the network. The ANN simulation was carried out by Toolbox of Matlab V7.12. Evaluations of various networks were carried out by consideration of mean absolute percentage error (MAPE) as criteria (Eq. 6). The best ANN architecture was determined as the structure with the lower MAPE.  In which, L indicates the test data number, d(t) and p(t) are real and model prediction values, respectively [12].
Tansig, logsig and pureline were tested for activation functions of hidden layer in different ANN structures. For all ANN structures, the pureline was used as an activation function of the output layer. Table 3 abbreviates the preset parameters of the COA algorithm for optimization of the weight and bias of the optimum network structures.
The sensitivity tests were carried out for optimized network of ANN-COA to investigate the relative importance of each input parameters. In this method, constant rates of variation (+ 5, − 5, + 10 and − 10) were chosen for every input data one at a time to calculate the change in outputs by Eq. 7.
In this equation, S i (%) and N are the sensitivity level and the number of data which were employed for testing the network.
LEICA DMLM light optical microscope and X-ray diffraction (XRD, Xpert) was utilized for phase characterization. The Brinell hardness method was used under the load of 62.5 kN for 60 s to compare the hardness of samples. Figure 4 depicts the dataset box plot for the inputs data. As shown, the median of Cu content, Zn content, CS, FR and DoC are in the box center showing that the distributions of these input data are symmetric. While, the median of the Si content skews to the lower amounts indicating that the values of the lower Si contents are closer together than the higher values. Also, there are not any outliers data for all variables.

Results
Over than 100 ANN architectures were studied to determine the best structure including the higher regression as well as lower MAPE. Table 4, typically represents the  characteristics of some of these networks with acceptable performance. Figure 5 compares the MAPE and regression of these structures. The entire designed networks had six input neurons and one output neuron. The network number 33 with 6-10-7-1 structure and activation functions tansig between the hidden layers showed the best ability to predict the data. Accordingly, network 33 had relatively high MAPE about 9.025% during testing step. Moreover, the MAEP during the training step changed between 3.759% and 5.075.
To enhance the accuracy of ANN proposed network, a hybrid ANN-COA strategy was employed. This approach caused the MAPE of the ANN network to decrease from 9.025 to 1.59E−6%. The MAPE of the ANN-COA network changed between 1.52E−8 and 1.37E−10 during the training step. The results of a regression analysis between the experimental and ANN-COA predicted data are indicated in Fig. 6. Accordingly, ANN-COA could improve the regression from 0.9942 to 0.999 for training data and 0.9307 to 0.999 for testing data. These results indicated the outstanding prediction capability of the ANN-COA in present work. The ANN has shown a good capability for predicting the main cutting force versus process parameters in Ref. [16]. However; the results of this study indicated that for predicting the main cutting force versus both process parameters and chemical composition, the hybrid ANN-COA should be used.
The experimental and predicted results of the main cutting force as well as the calculated errors for training and testing data are presented in Tables 5 and 6, respectively.  The results of the sensitivity analysis for the main cutting force versus input variables are shown in Fig. 7. Negative values represent that the main cutting force decrease with increasing of the value of the input variable and vice verca. According to Fig. 7, by consideration of the operational parameters, FR and DoC with positive effect are the main effective parameters while, by consideration of the chemical composition, Si content of the alloy by negative effect is the most effective parameter on the main cutting force.
To explain the results of sensitivity analysis, optical microscope and XRD analysis were employed. Typically, Figs. 8 and 9 show the optical microscope images and XRD spectra of samples 6, 9 and 10, respectively. As shown in Figs. 8a and 9a, the base alloy was composed of large grains of α phase, i.e., a solid solution with FCC structure [25,26]. As shown in Figs. 8b and 9b, the addition of Si (1.96 wt%) to the base alloy (sample 9), encouraged the formation of brittle intermetallic phase including β′ (CuZn) [24,25]. The presence of higher Si content (3.48 wt%) facilitated the formation of another intermetallic compound (Cu 5 Zn 8 ) [24] beside the β' phase (Figs. 8c, 9c).
The effect of Si content on the average diameter of the grains (ADG) and brinell hardness of the Cu 70 Zn 30 base brass are shown in Figs. 10 and 11, respectively. Figure 10 confirmed that the presence of Si up to 3.48 wt% decreased the ADG of the base alloy from 300 to 11 µm. While, the same changes in Si content increased the hardness of the base brass from 35 to 218 HB (Fig. 11). In summary, higher Si content of the Cu 70 Zn 30 base brass from one hand encouraged the formation of finer grains and from the other hand facilitated the formation of brittle intermetallic compounds, i.e., β' and [8]. Accordingly, Si content had notable effect on the mechanical behavior and microstructure of the base brass.
Genetic algorithm (GA) was used to determine the optimum condition of the input parameters for obtaining the minimum amounts of the main cutting force by using the ANN-COA model. According to the results of GA, combination of input variable as Cu = 68.5 wt%, Zn = 28.78 wt%, Si = 2.72 wt%, CS = 86.78 m min −1 , FR = 0.18 mm rev −1 and DoC = 0.66 mm enable the main cutting force to decrease as minimum as possible. Validation of the proposed optimum condition was carried out by introducing of various practical parameters to optimum ANN-COA-GA model and estimating the related error as shown in Table 7.
The zinc equivalent (ZE) factor is defined as Eq. 8. According to this equation, each alloying element has the coefficient with the effect similar to the addition of Zn. This method offered the coefficient of 10 for Si [27].
It was observed that the optimum proposed alloy by ANN-COA-GA model had the ZE equal to 44.97 wt%. This value was between the ZE of sample 3 (44.3 wt%) and sample 4 (46.2 wt%). Figure 12 typically shows the optical micrograph of samples 3 and 4. As shown, the α phase is distributed in continuous matrix of β' phase. Moreover, Fig. 12c confirmed the presence of Widmanstäetten plates and needles geometry of the α phase.
The XRD patterns of the as cast and chip of the sample 3 at CS = 94.2 m min −1 , FR = 0.11 mm rev −1 and DoC = 1 mm is shown in Fig. 13. Compared to as cast sample, the XRD peaks of the chip became broad and shifted to the lower 2ϴ. This behavior was also observed in Ref. [28].

Discussions
According to the literature [26], Eq. 8 is able to predict the microstructure of Si brass cast alloy in non-equilibrium solidification condition. Since, the same casting procedure was employed in this study, ZE factor was used for investigation of the alloys microstructure. The practical data confirmed that sample 3 (ZE = 44.3 wt%) had the lowest main cutting force during 92 tests. By consideration of ZE as criterion, it was confirmed that the proposed alloy by ANN-COA-GA model had nearly the same ZE value (44.3 wt% < ZE < 46.2 wt%). It was necessary to note that the Si brass alloys with above-mentioned ZE encouraged the formation of Widmanstätten morphologies. The presence of this type of microstructure could result in the strength differences at interphase boundaries [29] enhancing the fracturing during the machining. This brittle fracture behavior was intensified by the presence of strong anisotropy at the interface of the Widmanstäetten and matrix phases [30].
Obviously, α and β' phases have various plastic deformation behavior and consequently during the applying of dynamic force by the tool tip, the interface of α and β' acts as appropriate sites for the nucleation and growth of the voids. Connection of these voids facilitates the formation of microcracks and brittle fracture during the dynamic loading. The observation of peak shifts for α and β' phases in chip of the sample 3 in Fig. 13 is the evidence for the presence of a large amounts of strains aiding the easy fracturing. Moreover, the formation of finer grain in the presence of higher Si content (Fig. 10), enhanced the interface of the phases and intensified the brittle fracture. By consideration of the effect of operational parameters on the main cutting force revealed that, at higher FR and DoC, more volume of the work piece material could be removed during the cutting operation causing more resistance against tool which led to the direct relation of these parameters with the main cutting force in sensitivity analysis.
The relatively high sensitivity observed in Fig. 7 for the main cutting force with cutting speed variations was due to the competition between the work hardening and thermal softening phenomena during machining. By increasing in cutting speeds, high strain rates create during the chip formation resulting in work hardening in work piece material. By passing the strain rate from a threshold, the high heat generation which is produced by severe plastic deformation leads to a localized increase in temperature. Consequently, drop in shear strength occurs which is known as thermal softening. It has been observed in austenitic stainless steels [31], Ti-6Cr-5Mo-5V-4Al [32] 7 The sensitivity analysis of the input variables on the main cutting force using ANN-COA model and Al-(1-2) Fe-1V-1Si [33] alloys that the critical strain hardening is the inherent characteristics for each material.
Most of the Si containing samples in this study showed work hardening with cutting speeds variation at the range of 33.4-94.2 m min −1 . Lack of the observation of work hardening for samples 3 and 4 was due to the ability of these samples to be fractured without the significant plastic deformation due to the presence of the Widmanstäetten morphologies [8].

Conclusions
In this study, the main cutting forces of different as-cast Si brass alloys were measured at various operating parameters including cutting speed, feed rate and depth of cut. It has been shown that the ANN-COA is an efficient approach for modeling and optimization of the main cutting force. The following main results were acquired.
1. The ANN network with 6-10-7-1 structure using tansig function for hidden layers and pureline for output layer had the best prediction ability. The regression and MAPE amounts for this network were 0.9307 and 9.025%, respectively. 2. The usage of COA for optimizing the weight and bias achieved by ANN model improved the accuracy of the proposed network by ANN. 3. The ZE factor was utilized for sorting Si brass alloys with the minimum amounts of main cutting force. The alloy with ZE value of 44.97 wt% was predicted by GA algorithm as candidate for the lowest main cutting force during the machining process. 4. By consideration of ZE as criterion, proposed that ZE between 44.3 and 46.2 wt% provided the possibility of the formation of α Widmanstätten phase and promotion of the machinability through a weakness at interface between Widmanstätten morphologies and matrix phase.
For future works, the hybrid ANN-COA technique may use for modeling and optimization of the main cutting force in other ternary brass systems alloyed with different alloying elements in order to evaluate the capability of this approach as well as the ZE criterion to predict the machining behavior of brasses.  8 Typically microstructure of the Si brass alloys a sample 6 with 0 wt% Si b sample 9 with 1.96 wt% Si (the lighter phase is α) c sample 10 with 3.48 wt% Si (the lighter phase is ) Fig. 9 The XRD patterns of the Si brass alloys a sample 6 with 0 wt% Si b sample 9 with 1.96 wt% Si c sample 10 with 3.48 wt% Si