2D Geometric Surface Structure ANN Modeling After Milling of the AZ91D Magnesium Alloy

The paper presents the results of modeling 2D surface roughness parameters in milling by means of an artifi cial neural network (ANN). The AZ91D magnesium alloy was used. A HSS milling cutter was employed in the research. The main aim of the study was to obtain the lowest possible surface roughness (good quality) using a commonly available HSS cutter. The results of the research work were presented in the form of bar charts, surface charts and graphs depicting the quality of artifi cial neural networks. The conducted research shows that it is possible to carry out the machining processes that enable obtaining an average surface quality (defi ned by roughness parameters Ra, Rz, RSm, Rsk). The Ra, Rz, RSm parameters increase along with the machining parameters (fz, ap), as expected. The Rsk parameter takes (in most cases) negative values, which may indicate a surface with more intense friction and indicative of fl at-topped distribution. On the other hand, the results of modeling the selected parameters – Ra, Rz, RSm – with the use of artifi cial neural networks allow concluding that the obtained network models show satisfactory predictive ability (R = 0.99), and thus are an appropriate tool for the prediction of surface roughness parameters.


INTRODUCTION
Surface roughness is an important manufacturing factor for the production of various types of elements from diverse materials in different industries (machinery, automotive and aerospace). These requirements are increasing especially when the mutual cooperation of two or more elements is crucial. It is also an interesting scientifi c aspect during the implementation of machining processes on workpieces. In the case of magnesium alloys, the roughness achieved and the manufacturing accuracy (with relatively small dispersion of dimensional values and high-performance accuracy classes) can be successfully comparable, or even better, than after various fi nishing processes (Ra ≤ 0.16 µm [1], accuracy class IT2 -IT5 [2]).
During dry machining of the Mg-Ca0.8 alloy with the use of a milling head with PCD blades [3], the greatest impact on the Ra parameter was the feed (mm/rev), where Ra was obtained in the range of approx. 0.2-0.8 µm. The results of Ra variability with the change of v c (up to 2800 m/min) and a p were within the range of approx. 0.4-0.6 µm. In a similar study by the authors [4], the roughness level of approx. 0.4 µm was obtained after dry milling and low plasticity burnishing. The research with the use of biodegradable MgCa0.8 magnesium alloys was also carried out in [5]. A milling head with uncoated carbide inserts was used for machining. Regardless of the change in technological parameters, the lower values of the roughness parameter Ra = approx. 0.09-0.8 μm, were obtained in inverse milling, while in milling the roughness was Ra = approx. 0.9-1.4 μm. The feed per tooth had the greatest impact on the obtained roughness.
Similar relationships were found during the machining of the Mg-Ca1.0 alloy. Milling was carried out using a milling head with plates of the so-called diamond-like coating (DLC) [6]. The used machining parameters: v c = 300-600 m/min, f z = 0.0125-0.125 mm/tooth and a p = 0.05-0.50 mm made it possible to obtain the lowest values of the roughness parameter Ra = approx. 0.08-0.16 μm. Increasing v c decreased the roughness, while increasing f z resulted in its increase. Despite this fact, the mean value of the surface roughness was kept at a very low level. The optimal combination of cutting parameters (the lowest surface roughness) was also sought in [7], who conducted research on the AM60 alloy. The parameters n = 2000 rev/min, f = 0.1 mm/rev and a p = 1.0 mm, where Ra = approx. 0.3 µm. According to the research conducted on surface roughness parameters, technological parameters, the kinematic relations between these parameters and the geometry of the tool tip influence the shape and form of the chips [8].
In scientific research, carbide cutters without coating [9], cutters with protective coatings such as TiN [7], TiAlN [10], TiB 2 [2] or TiAlCN as well as cutters with high-quality polycrystalline diamond blades [1] are often used. For example, it is possible to mill with the machining parameters defined as effective, rough (v c = 1200 m/ min, f z = 0.15 mm/tooth, a p = 6 mm) reaching the roughness parameter Ra (measured on the sample face) at the level of approx. 0.5 µm (for γ = 5°) and approx. 2 µm (for γ = 30°). The mean value of the Ra parameter (this time measured on the side wall of the sample) was lower and amounted to approx. 0.3 µm for the given conditions [9].
Experimental research in the field of machining process analysis is more and more often supported by the use of machine learning methods, including artificial neural networks. This is due to the fact that in connection with the development of new technologies and the emerging modern machines and devices, the efficiency of processes as well as the appropriate quality of the treated surfaces, are highly important. In the face of such challenges, numerical models representing given phenomena, based on experimental models, are used.
On the basis of literature analysis, it can be noticed that researchers in the field of milling machining primarily deal with modeling one surface roughness parameter, i.e. Ra, which can be seen in the works of, among others, Karkalos et al. [15], Wu et al. [19], Chen et al. [16] or Santhakumar et al. [20]. Taking into account the practical application of the modeling results, it seems insufficient to be able to perform a detailed analysis of the surface conditions. There are few works concerning a wider range of surface roughness parameters, e.g., the work of Zerti et al. [13] where the Ra, Rz, Rt parameters were analyzed or the studies by Kulisz et al. [26], where the Ra, Rz, RSm parameters were predicted. Zerti et al. [13] conducted the research related to dry turning simulations, while Kulisz et al. [26] analyzed the milling process using a PCD tool. Therefore, it is justified to expand the scope of research in the field of process modeling regarding the increase of the number of parameters as well as the change of machining conditions.
Taking into account the above-mentioned analysis, it can be concluded that the so-called basic parameters of surface roughness, while a much broader approach is required for a comprehensive assessment, taking into account, for example, a surface roughness parameter such as kurtosis. Additionally, it should be noted that for the machining of magnesium alloys, most researchers use carbide milling cutters with or without coatings. In addition, the use of, i.a. artificial neural networks may contribute to reducing the number of necessary research tests, for example, for the selection and optimization of technological processing parameters in order to obtain the appropriate surface roughness and maintain adequate process efficiency.
Therefore, the aim of the work was to conduct tests in order to obtain the possible surface roughness (defined by the roughness parameters, i.e. Ra, Rz, RSm, Rsk) using a commonly available HSS cutter. Another goal was to model 2D surface roughness parameters (Ra, Rz, RSm) in milling the AZ91D magnesium alloy with the use of the HSS tool in order to predict these parameters. This is due to the fact that Rz is the second, after Ra, most frequently used surface roughness parameter in many production companies. Due to the partial consideration of individual elevations and depressions, the parameter should be mainly analyzed for bearing or sliding surfaces and measuring surfaces. The Rsk parameter, on the other hand, can play an important role in monitoring the technological process, e.g. to detect surface defects, as well as in conductivity monitoring, and lubricant maintenance. A surface with negative skewness is characterized by a greater frequency of deep valleys; it is defined by the shape of a plateau and assumed to be optimal. On the other hand, the RSm parameter can be used to analyze contact deformations (or contact stiffness) and thermal conductivity.
The main research contribution is the extension of modeling with additional Rz and RSm parameters, and not focusing only on the Ra parameter, which will allow for a detailed analysis of the surface conditions of surface roughness. Modeling of the above-mentioned roughness parameters can constitute the basis for creating tools helpful in the work of the technologist when determining the conditions of the machining process in order to obtain the assumed surface roughness.

RESEARCH METHODOLOGY
The AZ91D magnesium alloy was used for the research. A schematic diagram of the research is shown in Figure 1. Machining was carried out on a DMU 65 MonoBlock vertical milling center, which can perform machining up to the maximum rotational speed of 12.000 rev/min. HSS Co steel by PRECITOOL 161701, mounted in the ER sleeve, was employed. It is a two-edge cutter with a diameter of d = 20 mm, made of steel. HSS cutters are widely available tools with lower unit costs, compared to expensive carbide tools and very expensive cutters with PCD blades. During the research, the cutting conditions were constant as: radial depth of cut a e = 15 [mm] and cutting speed v c = 750 m/min. The range of variable technological parameters included: feed per tooth f z = 0.01-0.05 mm/tooth and axial depth of cut a p = 0.1-0.4 mm.
Flat geometric and surface parameters were estimated using the Mahr's MarSurf system with the PS10 Drive measuring head. The high-class measurement systems used allowed for a wide and comprehensive analysis of both the AZ91D magnesium alloy milling process, as well as evaluating the machining eff ects (surface morphology and 2D roughness parameters). The research analyzed roughness parameters, i.e. Ra, Rz, RSm, Rsk. Figure 2 shows a graphical interpretation of the Rsk (kurtosis) parameter, helpful for the evaluation of the so-called exploitation characteristics of the treated surface (e.g., friction and wear).
The results of experimental studies were used to model surface roughness parameters -maximum height of profi le (Rz), the arithmetical mean roughness parameter (Ra) and mean width of profi le elements (RSm). Artifi cial neural networks were employed for modeling. The input neurons were the variable f z and a p technological parameters, and the output neuron was the analyzed roughness parameter. In connection with the modeling of three roughness parameters, three models were analyzed, an example of which is shown in Figure 3.
The Statistica Neural Networks software was used for modeling and prediction of roughness parameters. During the research, the MLP (multilayer Perceptron) neural network was used to test various neuron activation functions: linear, exponential, logistic, tanh and sinus activation functions, and various learning algorithms: BFGS gradient (Broyden-Fletcher-Goldfarb-Shanno), the steepest descent training algorithm and conjugate gradient. The second type of network used to model the roughness parameters was the RBF (Radial Basis Function) network, for which the learning algorithm is RBFT, with a Gaussian hidden neuron activation function and a linear function for the output layer. A network with one hidden layer was used. The networks were modeled by changing the number of neurons in the hidden layer from two to ten and the number of training epochs from 150 to 300. The experimental data set (20 items) was divided in the proportion of 75-25%, where the fi rst value indicates the share of training data, and the second corresponds to validation data. Due to the small set of data, the testing data was omitted [14]. The analysis of the obtained modeling results and the selection of the most appropriate network were carried out on the basis of such indicators as: quality of learning and validation as well as learning and validation errors. The quality of learning and validation is defi ned as the correlation coeffi cient for these sets, calculated in accordance with formula (1): where: σ y ′ -standard deviation of reference values, σ y * -standard deviation of predicted values, cov(y',y* ) -covariance.
The errors are defi ned as the sum of the squared diff erences between the set values and the values obtained at the outputs of each output neuron, according to the formula (2): where: n -number of cases in a given set; y′ I -actual value of the roughness parameter for the given set for the i-th observation; y * i -predicted value of the roughness parameter for the given set for the i-th observation.
For each roughness parameter, i.e. Ra, Rz, RSm, 200 networks were learned, from which one network was selected on the basis of the above-mentioned indicators.   Figure 4 shows an exemplary roughness 2D profi le curve obtained with the processing parameters a e = 15 mm, v c = 750 m/min, a p = 0.1 mm, f z = 0.01 mm/tooth. Figures 5 and 6 show the results obtained from 2D roughness measurements. The impact of changing the axial depth of cut ap and feed per tooth f z change on roughness parameters, i.e. Ra, Rz, RSm and Rsk. The Ra, Rz parameters belong to the group of vertical parameters of the roughness profi le, they are quite well-known to researchers and the machine industry, hence their choice. The RSm parameter belongs to the horizontal parameters of the roughness profi le, while the Rsk (skewness) parameter is helpful in the description of the operational features of the surface. This parameter may be useful in determining the following physical or functional properties of surfaces: friction and wear, lubrication, mechanical tightness (signifi cant infl uence). It can also be taken into account as an additional indicator in the case of fatigue corrosion analysis, contact deformation or contact stiff ness.

EXPERIMENTAL RESULTS
Changing the parameters (f z , a p ) increases the surface roughness parameters (Ra, Rz, RSm). Figure 5 shows the test results for the roughness parameters Ra (Fig. 5a) and Rz (Fig. 5b). In contrast, Figure 6 shows the infl uence of f z and a p on the RSm (Fig. 6a) and Rsk (skewness - Fig.  6b) roughness parameters. As it can be easily observed, the values of the surface roughness parameters increase: Ra from the value of approx.

MODELING RESULTS
As a result of the modeling, one network of each type (RBG, MLP) was selected for the analyzed roughness parameters, selected on the basis of network errors and the quality of learning and validation. The results of the obtained modeling with the parameters of the obtained networks are presented in Table 1. The best parameters for all surface roughness parameters were obtained for the RBF networks. In any case, the quality of learning and validation is higher for the RBF network, compared to MLP. Moreover, the errors for the RBF network are smaller than for the MLP network. For the Ra parameter, the best network has six neurons in the hidden layer, Rz -fi ve, and RSm -eight. The quality of both learning and validation for these networks exceeds 0.99. Additionally, Table 1 shows the correlation coefficients R (for the entire data set) between the data obtained as a result of the conducted tests and those obtained as a result of modeling for individual roughness parameters Ra, Rz, RSm. While analyzing R correlation, it can be concluded that the mutual correlation between the experimental data and the data predicted for the RBF network is at a very high level (above 0.99).
For a more detailed comparison of the surface roughness parameters of the RBF and MLP  networks, the fi gures below show the correlation graphs of the dependence of individual roughness parameters obtained experimentally and as a result of modeling with RBF and MPL networksfor Ra (Fig. 7), Rz (Fig. 8), RSm (Fig. 9).
The analysis of the graphs above confi rms that more suited results for each surface roughness parameters were obtained for the RBF network. Additionally, it can be concluded that artifi cial neural networks are a suitable tool to predict the surface roughness parameters obtained after milling the AZ91D magnesium alloy with the use of the HSS tool.
As a result of the modeling, it was possible to predict the analyzed roughness parameters, i.e. Ra, Rz, RSm. Trained RBF networks were used for this purpose. By introducing new data into the Statistica program (input data in the form of machining parameters: feed per tooth and axial depth of cut), the generated networks resulted in the predicted Ra, Rz and RSm parameters. The results of the network operation are presented for the RBF 2-6-1 network (Ra parameter) - Fig. 10a, for the RBF 2-5-1 network (Rz parameter) - Fig. 10b, and for the RBF 2-8-1 network (RSm parameter) -in Fig. 10c.
As a result of the modeling of the surface roughness parameters -Ra, Rz, RSm -and the prediction made, it can be concluded that the obtained RBF networks are characterized by a satisfactory ability to predict these parameters. This is confi rmed by, among others, R correlation value at 0.99, high quality of network learning and validation at 0.99, as well as learning and validation errors. Comparing the experimental and simulation data of the values of the individual surface roughness parameters, it can be concluded that the value of the relative error does not exceed 15%, which proves that the net is well-trained.

CONCLUSIONS
The main aim of the research -and a certain novelty -was to obtaining the lowest possible surface roughness (high quality of surface) using  a commonly available HSS cutter. The conducted research shows that it is possible to carry out the machining processes that enable obtaining an average surface quality (defi ned by roughness parameters, i.e. Ra, Rz, RSm, Rsk). This broadened the current understanding of roughness after milling of magnesium alloys. Another novelty is the high versatility of the created models and the possibility of extrapolating the results with an acceptable error rate for the input variables outside the tested area. However, the limitation of the models is the assumption that the tool and the material of the workpiece are stable, which, despite the advantages shown above, signifi cantly limits their use for predicting 2D surface roughness when machining other materials and using other tools.
In connection with the conducted experimental research and training of artifi cial neural networks, the following conclusions can be drawn. The change of machining parameters (f z , a p ) infl uences the increase of the surface roughness parameters defi ned by the parameters: Ra, Rz, RSm. In most cases, the Rsk parameter takes negative values; this is characteristic for the surfaces with more intense friction and indicative of fl at-topped distribution. For modeling surface roughness parameters obtained after milling the AZ91D magnesium alloy with the use of the HSS tool, the RBF neural network turned out to be superior to MLP. For the RBF network, compared to MLP, the quality of learning and validation is higher, and the errors are smaller. The network for the Ra parameter (RBF 2-6-1) reached the learning quality at the level of 0.9986, and the validation -0.9931, for the Rz parameter (RBF 2-5-1) the learning quality -0.9973, validation -0.9925, and for the RSm parameter (RBF 2-8-1) the learning quality -0.9984, and the validation -0.9932. In the case of errors,  concluded that artificial neural networks are an effective tool that can be used to predict surface roughness parameters. Trained networks show the relationships between the input data (f z and a p ) and the output data (Ra, Rz, RSm parameters), enabling the determination of the appropriate values of the analyzed surface roughness parameters after entering the set machining parameters into the network. Modeling of processes can be the basis for creating the tools helpful in the work of a technologist when determining the conditions of the machining process in order to obtain the assumed surface roughness. In addition, it can save time and effort as well as eliminate the costs that would have to be incurred in the case of further machining trials.
In the broadly understood workshop practice, it may be most useful to define such machining conditions for which milling can be machining as finishing, and constitute a very effective, efficient and safe process (risk of chip ignition). Industrial companies are not able (due to the production process relied on) to perform tests on workpieces. Therefore, the presented research papers may be valuable due to the possibility of their application in the industrial practice.