1 Introduction

In recent decades, metal matrix composite (MMC) materials have been widely used in engineering fields due to their superior mechanical and physical properties, such as specific strength, high stiffness, and wear resistance. Aluminum reinforced with SiC particulates is a typical MMC material and has replaced conventional materials in the automotive, aerospace, and other diverse industries [1,2,3,4]. This material can provide higher strength, stiffness, and fatigue resistance compared to the base alloy, with only a small increase in density [5, 6]. These superior properties contribute to the broader application of Al/SiC composite materials. However, low plasticity, non-uniformity, and uncontrollable distribution of SiC particulate increase the difficulty of achieving a high surface quality when machining Al/SiC composite materials. Despite the sophisticated manufacturing techniques for producing satisfactory Al/SiC MMC components, e.g., via near-net shaping and casting processes, a high-quality machining process is still essential to meet the requirements of high surface quality and dimensional accuracy [7].

Over the past two decades, the issues of machining MMC materials have been investigated by researchers from both academia and industry. It is accepted that the morphology, distribution, and volume fraction of the reinforcement particulate in MMC materials are significant factors in affecting the cutting process, compared with conventional materials [8]. The effects of spindle speed, feed rate, depth of cut, rake angle, coolant on the cutting forces, tool wear, and surface quality were studied by Hoecheng et al. [9]. Chan et al. [10] also investigated the influence of cutting parameters on surface quality in ultra-precision diamond machining of Al/SiC/15P. They concluded that a high spindle speed and low feed rate could improve the surface quality but the effect of cutting depth on surface quality was small, dependent on the spindle speed not being too low. Pramanik et al. [11] conducted experiments on machining Al6061/SiC/15P materials and found that surface quality was mainly affected by feed rate, while the influence of spindle speed was negligible. Manna and Bhattacharyya [12] researched the relationship between parametric combination and surface finish during turning of Al/SiC-MMC via analysis of variance (ANOVA) and Taguchi experiment design and proposed that cutting speed, feed rate, and depth of cut had approximately equal influence on the average surface roughness. Similarly, Palanikumar and Karthikeyan [13] used ANOVA to analyze the influence of cutting factors (cutting speed, feed rate, depth of cut, and volume fraction of SiC) on surface roughness when machining Al/Si composites and proved that the feed rate had the greatest influence on surface roughness, followed by cutting speed and volume fraction of SiC. Przestacki et al. [14] determined that selection of the effective depth of cut and the tool’s angular distance from the laser beam affected the machined surface quality during laser-assisted turning of A359/20SiCP MMCs. Wojciechowski et al. [15] proposed that surface roughness during the machining of direct laser deposited tungsten was influenced by kinematic-geometric factors and elastic-plastic phenomena that occurred when the uncut chip thickness was shallow. Kilickap [16] investigated the influences of cutting speed, feed rate, heat treatment, and cutting environment on surface roughness during drilling of Al/SiC MMC and found introducing the MQL technique improved surface quality. Kilickap et al. [17] also selected homogenized 5% SiC-p aluminum MMC material experimental investigation of tool wear and surface roughness. The authors found that tool wear was mainly affected by cutting speed and increased with increasing cutting speed during dry turning conditions.

The literature mentioned above predominantly studied the influence of different parameters on surface quality during machining Al/SiC composites; they provided a qualitative rather than quantitative relationship between parameters and surface roughness. Regarding the prediction and control of machining quality via machine learning methods, there has been some research on materials other than Si/Al composites and investigation of characteristics other than machining quality. Moreover, the performance and comparison of different machine learning methods used in machining fields was further investigated by various researchers. Benardros and Vosniakos [18] used an artificial neural network (ANN) method to predict surface roughness based on depth of cut, feed rate, cutting speed, engagement of tool, cutting tool type, and use of coolant when machining alloy using the Taguchi design of experiments method. The mean squared error of validating this ANN model was 1.86%. Mahesh et al. [19] used a genetic algorithm to predict surface roughness in terms of cutting speed, feed rate, axial depth of cut, radial depth of cut, and radial rake angle for end milling 6063Al. However, experimental data were limited, which might have influenced the reliability of the prediction model. Kilickap et al. [20] used genetic algorithms for optimizing machining conditions to minimize surface roughness when drilling AISI 1045. The minimum surface roughness (\(R_{\text{a}}\) = 1.89 µm) value was obtained at V = 7.62 m/min, f = 0.1 mm/r, and MQL. An ANN model was suggested by Khorasani et al. [21] to predict the tool life based on cutting speed, depth of cut, and feed rate when face milling machining of 7075 Al with a 4.6% mean relative error. Pimenov et al. [22] investigated the effects of the relative position of the face mill with respect to the workpiece and milling kinematics on the cutting forces, vibration acceleration, and surface roughness during face milling, with the help of an artificial intelligence model. Bustillo and Correa [23] applied Bayesian networks to predict surface roughness when deep drilling steel components. Rodríguez et al. [24] predicted the roughness for face milling 11SMnPb37 steel in terms of tool wear and type, using the decision tree method. A fuzzy logic model was employed by Çelik et al. [25] to estimate the surface roughness and thrust force based on different cutting parameters during end milling of GFRPC materials; they found low feed rate, high cutting speed, and a large number of flutes resulted in low surface roughness. Lin et al. [26] studied the relationship between feed force and tool wear when machining A359 Al/SiC composites and found that using the ANN method to define this relationship was more accurate compared with regression analysis. Mia et al. [27] compared the performance of the teaching-learning-based optimization method and bacterial foraging optimization method by using these two methods to obtain the optimum cutting speed, feed rate, and depth of cut for the lowest surface roughness and cutting temperature during hard-turning hardened high-carbon steel; they determined that the first optimization method was recommended. Ensemble learning, which could avoid neural network fine-tuning, compared to a single learning algorithm, was used to build the roughness prediction model for ball-end milling by Bustillo et al. [28]. Kilickap et al. [29] used ANN and RSM models to predict cutting force, surface roughness, and tool wear based on cutting speed, feed rate, and depth of cut when milling Ti-6242S; they found that the accuracy of the ANN model was higher than that of the RSM model.

From the aforementioned Refs. [18,19,20,21,22,23,24,25,26,27,28,29], it could be seen that artificial intelligence methods were valid and reliable means of investigating the quantitative relationship between surface quality and cutting parameters (or other parameters). However, research regarding roughness prediction and control for machining Al/SiC composites is too limited; this is the primary motivation for our work. The purpose of this study is to develop a roughness prediction and control model for milling Al/SiC composite materials. With the help of the control model, apart manufactured from Al/SiC composite materials could be produced with any specific surface roughness. The utilization of such potential materials would be promoted accordingly. Moreover, this study analyzes the influence of cutting parameters on roughness, based on the roughness prediction model. Various exciting and novel findings were obtained, which might be of value as a reference for future researchers.

2 Experiment

2.1 Identification of cutting parameters and their levels

With regard to the above Refs. [8,9,10,11,12,13,14,15,16,17], factors that have a significant influence on surface roughness during milling Al/SiC MMC include the following: (i) spindle speed, (ii) feed rate, (iii) depth of cut, (iv) volume fraction of SiC, (v) cutting forces, (vi) vibration of machine, (vii) temperature, and (viii) tool character. Clearly, investigating the influence of all of these factors on surface roughness would significantly increase the intricacy of the experiment and was determined to be unnecessary. Moreover, the uncontrollable factors (v)–(vii) depend on factors (i)–(iv) and (viii), which are controllable. In our experiment, cutting parameter (viii) was defined as a constant to reduce the complexity and cost of the experiment. Therefore, cutting parameters (i)–(iv) were selected for study of their effect on surface roughness when machining Al/SiC MMC. To ensure the feasibility and safety of the experiments, the level values of these selected parameters were appropriately identified, subsequent to detailed analysis. The ranges of level values and reasons are explained in the following.

  1. (i)

    Cutting speed. According to Ref. [30], excessively low speed results in poor surface roughness but excessively high speeds increases the temperature of the tool, accelerating tool wear. The max speed of the machine in our lab was 8 000 r/min and the diameter of the tool insert was just 6 mm; thus, the max cutting speed was approximately 150 m/min. Taking the surface quality, tool wear, and machine stability into consideration, the range of cutting speed was set as 40–100 m/min.

  2. (ii)

    Feed rate. According to Refs. [31, 32], a high feed rate increases cutting force and accelerates tool wear when milling MMC materials. However, an excessively low feed rate directly decreases machining efficiency. To balance efficiency and cost, the feed rate was set at 0.1–0.4 mm/r.

  3. (iii)

    Depth of cut. High depth also increases cutting force. A test experiment was conducted and found there was abnormal noise occurring in the machine when the depth value was 0.2 mm. Conversely, excessive low depth dramatically decreases machining efficiency in practical production. The range of depth of cut was thus set at 0.05–0.15 mm.

  4. (iv)

    Volume fraction of SiC. The existence of SiC particulates increased the difficulty of machining [31]. A large volume fraction of SiC would lead to extremely poor surface roughness; conversely, the influence of other parameters, such as cutting speed, feed rate, and depth of cut, on surface roughness would be weakened, which was undesirable for this study. The range of volume fraction of SiC was thus set at 0–30%.

2.2 Design of experiment matrix

The number of levels of each selected parameter was set as three and the values are shown in Table 1, based on the range of level values mentioned in the previous section. In this experiment, all possible combinations of levels were covered, i.e., there were 34 (3 was the number of levels and 4 was the number of parameters) trials in total. Other authors [18, 33,34,35,36] applied Taguchi experiment design to reduce the considerable number of trials. However, this method would damage the experimental data’s integrity and consequently influence the reliability of the neural network model and accuracy of the data analysis. A large number of trials could be completed in a shorter space of time than anticipated when aided by the CNC machine programming system.

Table 1 Settings of parameters’ level values

2.3 Selection of tool and materials and conduction of experiment

Al2009, Al2009/SiC/15P, and Al2009/SiC/25P MMCs, three materials with different volume fraction of SiC, were selected as workpiece materials in this experiment. The workpiece material was fabricated via the powder metallurgy method using Al2009 (Cu: 4.5% (mass fraction), Mg: 1.5% (mass fraction), Al: redundant) powder and SiC powder. The average grain size of the Al2009 and SiC powder was approximately 30 µm and 12 µm, respectively. The first fabrication step was to mix these two powders uniformly in a three-dimensional tubular mixer for 40 min. The second step was to cold compact the mixed powders at a pressure of 350 MPa. The sintering operation was then conducted at 550 °C for 1 h. Finally, the sample materials were extruded in a pre-heated mold at 500 °C. Al2009 is selected as the matrix as it is a comparatively new type of aluminum alloy with some unique characteristics; research on Al/SiC composites with Al2009 has been limited up until now. The workpiece of each material was a block with dimensions 50 mm × 50 mm × 20 mm. El-Gallab and Sklad [37] found that the PCD tool had a longer life than other tools. Therefore, a 2-tooth PCD tool was selected to machine the Al/SiC composites with high wear resistance in this experimentation. An emulsion was used as a coolant throughout this experiment. This experiment was conducted on a specific milling machine. The milling machine and PCD tool information can be seen in Fig. 1.

Fig. 1
figure 1

Information of machine and tool

The face milling operations were performed as per the condition given by the design matrix randomly. Table 2 shows the experiment design matrix and corresponding measured average surface roughness. Average surface roughness has received most attention from the industry field and was thus taken as the object of this study. To obtain average roughness measurement, the roughness tester probe was moved 2.5 mm in the feed direction along the milled surface, gathering values at five different locations; the average of these values was then used. The deviation of the tester was 0.001 µm. All experimental data used for building the ANN model was shown in Table 2. According to Grzenda et al. [38], an incomplete or partly wrong dataset will lead to an unreliable roughness prediction model. Therefore, the imputation of missing data before the training process was a necessary and essential procedure. We repeatedly checked the completeness and correctness of our experimental data. We found that our data were reliable (the mean relative error of the validation of Model 1 in Table 3 was just 3.50%); therefore, the imputation of missing data step was omitted from this study.

Table 2 Experiment design matrix and experiment data
Table 3 Configurations and performances of different models

3 Development of the roughness prediction and control model

3.1 Development of the roughness prediction model

With the further development of artificial intelligence and machine learning, their application has rapidly spread to the field of engineering. ANN has the powerful ability to learn complicated and non-linear relationships between multiple variables with high accuracy. Therefore, ANN was selected for studying the relationship between cutting parameters and surface roughness. In this section, a feed-forward multi-layered perceptron ANN roughness prediction model with a Levenberg-Marquardt backpropagation training algorithm was trained and validated using experimental data.

3.1.1 Structure of a multi-layered ANN model

The human brain is a classic biological neural network. The ANN has been developed to learn from pre-existing pure data to obtain deeper knowledge or determine patterns regarding this data, emulating the brain. Figure 2 shows the general structure of a multi-layered perceptron neural network, consisting of an input layer, one hidden layer, and an output layer. Each neuron from one layer was connected with all neurons from the neighboring layer so that the entire structure resembled a network. Functionally, the input layer input the data into the network without any processing. The complex data processing was conducted by the hidden layer and the output layer, as shown in Fig. 3. The training process of the neural network model involved iteratively adjusting the connection weight between neurons and the biases of the neurons until specific requirements were satisfied.

Fig. 2
figure 2

Structure of multi-layered perceptron ANN

Fig. 3
figure 3

Data processing of the mth neuron in hidden or output layer

3.1.2 Procedure of building the ANN model

The following statements give the detailed steps of training the ANN model.

Step 1 Set parameters of the network model. The following statements describe these parameters and the setting rules.

  1. (i)

    Number of hidden layers. There was no strict rule of selection regarding the number of hidden layers [39]. However, the original number of hidden layers was generally set as one and then increased until the accuracy of the network model lay within an expected range of values, with a practical iteration count and cost of computing power.

  2. (ii)

    Number of neurons in all layers. The number of neurons in the input and output layer was equal to the number of variables in the input vector and output layer, respectively. The number of neurons in the hidden layer was generally set as 2n + 1 (n is the number of neurons in the input layer), based on the Kolmogorov theorem.

  3. (iii)

    Activation function. For the regressor problems, to which the problem in this paper belonged, the sigmoid or SoftMax function was the most popular activation function set for hidden layers and the linear function was set as the activation function for the output layer.

  4. (iv)

    Training algorithm. There are several popular training algorithms. The gradient descent backpropagation algorithm [40], which is the most common and easiest to use but struggles to converge when the training dataset is small; Levenberg-Marquardt backpropagation [41], which performs well for the majority of problems; and Bayesian regulation backpropagation [42], which contains some modifications to Levenberg-Marquardt backpropagation and is suitable for datasets containing noise but the convergence rate is lower. The size of data used for training in this study was less than 81 groups and the data were complete and correct. Hence, the Levenberg-Marquardt backpropagation algorithm is the most appropriate choice of training algorithm in this study. Other training algorithms were also tested for the purpose of comparison.

  5. (v)

    Learning rate. For many training algorithms, the learning rate is adaptive. The learning rate was generally set in the range 0.1–0.9 for the training algorithms that required an explicit learning rate.

  6. (vi)

    Tolerable error. The tolerable error, which represents the goal mean square error (MSE) between the outputs from the model output layer and the corresponding target outputs, was often set as 10−6 or 0.

  7. (vii)

    Minimum MSE gradient. When the difference between the current MSE for all input vectors and the old MSE before a training epoch is less than the minimum MSE gradient, the training process ends.

  8. (viii)

    Maximum iterations. The aim of maximum iterations was to avoid the occurrence of an infinite weight updating loop if the model cannot converge. If the convergence rate of the training algorithm is empirically high, the maximum iteration is often set as a smaller value and vice versa. Example smaller and larger values are 1 000 and 10 000, respectively.

Step 2 Assign the initial weight values for all connections and bias values for all neurons in hidden and output layers randomly.

Step 3 Input an input vector to the neural network model. The input vector in this paper was [\(\varphi_{\text{SiC}}\), \(V_{\text{c}} , F_{\text{r}} , D_{\text{c}}\)].

Step 4 Based on the input vector in Step 3, the output values for all neurons in the hidden layer and output layer are calculated via Eq. (1). In particular, the output of any neuron in the input layer is equal to the input to this neuron.

$$o_{m}^{k} = f_{{\text{activation}}} \left(\left(\sum\limits_{n = 1}^{N} {w_{nm} \, o_{n}^{k - 1} } \right) + b_{m}^{k} \right) ,$$
(1)

where \(o_{m}^{k}\) is the output of the \(m{\text{th}}\) neuron in the layer under consideration; \(o_{n}^{k - 1}\) is the output of the \(n{\text{th}}\) neuron in the preceding layer and \(N\) is the number of neurons in the preceding layer; \(w_{mn}\) is the weight value of the connection between the \(m{\text{th }}\)neuron in the layer under consideration and the \(n{\text{th}}\) neuron in the preceding layer; \(b_{m}^{k}\) is the bias value for the \(m\, {\text{th }}\)neuron in the layer under consideration; \(f_{\text{activation}}\) is the activation function. In this paper, the SoftMax function and pure linear function were set as the activation functions for the hidden layer(s) and output layer, respectively. The explanation of the SoftMax function and pure linear function is as follows. SoftMax function: \(f\left( x \right) = \frac{{{\text{e}}^{x} }}{{\mathop \sum \nolimits_{m = 1}^{M} {\text{e}}^{{x_{m} }} }}\) (\(M\) and \({m}\) are the number of neurons and the \(m{\text{th}}\) neuron in the layer under consideration, respectively); pure linear function: \(f\left( x \right) = x\).

Step 5 Obtain the output value of one neuron in the output layer and calculate the error and square error between this output value (\(R_{{{\text{a}}\_{\text{predicted}}}}\)) and the corresponding target output value (\(R_{{{\text{a}}\_{\text{target}}}}\)) via Eqs. (2) and (3), respectively.

$$E_{i} = R_{{{\text{a}}\_{\text{predicted}}\_i}} - R_{{{\text{a}}\_{\text{target}}\_i}} ,$$
(2)
$$S_{i} = (R_{{{\text{a}}\_{\text{predicted}}\_i}} - R_{{{\text{a}}\_{{{\text{target}}\_{i} }} }} )^{2} ,$$
(3)

where \(E_{i}\) and \(S_{i}\) are the error and squared error between \(R_{{{\text{a}}\_{\text{predicted}}\_i}}\) and \(R_{{{\text{a}}\_{\text{target}}\_i}}\) for the \(i{\text{th}}\) input vector, respectively; \(R_{{{\text{a}}\_{\text{predicted}}\_i}}\) and \(R_{{{\text{a}}\_{\text{target}}\_i}}\) are the calculated output value and target output value of one neuron in the output layer for the \(i{\text{th}}\) input vector, respectively.

Step 6 Adjust weights and biases based on the various errors in Step 5 and the training algorithm. Levenberg-Marquardt backpropagation was selected as the training algorithm, which provided the rule (as shown in Eqs. (4)–(5)) below, for adjusting

$$\varvec{W}_{{\text{bnew}}} = \varvec{W}_{{\text{bold}}} + \left[ {\varvec{J}^{\text{T}} + \mu \varvec{I}} \right]^{ - 1} \varvec{J}^{\text{T}} E_{i} ,$$
(4)
$${\varvec{J}} = \left[ {\frac{{\partial E_{i} }}{{\partial {\varvec{W}}_{b\_1} }}, \, \cdots ,\, \frac{{\partial E_{i} }}{{\partial {\varvec{W}}_{b\_P} }}} \right],$$
(5)

where \(\varvec{W}_{\text{bnew}}\) is the new weights-bias matrix which consists of all weights and biases updated over \(\varvec{W}_{\text{bold}}\) after the \(i{\text{th}}\) input vector is used for training; \(\varvec{J}\) is the Jacobian matrix; \(P\) is the number of elements in the \(\varvec{W}_{\text{b}}\) matrix; \(\varvec{I}\) is a unit matrix; and \(\mu\) is an adaptive factor influenced by the \(S_{i}\).

Step 7 Execute Steps 3 to 6 for an intact epoch and observe whether the current \(E_{\text{ms}}\) (mean squared error) for all input vectors, calculated using Eq.(6), is less than the tolerable error or whether the difference between the current \(E_{\text{ms}}\) and the \(E_{\text{ms}}\) before this training epoch is less than the minimum MSE gradient; if so, proceed to Step 8 and if not, repeat Steps 3 to 7 until the maximum iteration count is reached.

$$E_{{\text{ms}}} = \frac{{\sum\nolimits_{i = 1}^{{N_{\text{train}} }} {\left( {R_{{{\text{a}}\_{\text{predicted}}\_i}} - R_{{{\text{a}}\_{\text{target}}\_{i}}} } \right)} }}{{N_{{\text{train}}} }}^{2} ,$$
(6)

where \(N_{\text{train}}\) is the number of input vectors in training dataset (or the size of the training dataset).

Step 8 Stop iteration and fix all model parameters, including weights and bias values.

Step 9 Validate the model using the validation dataset and calculate the \(E_{\text{msv}}\) via Eq. (7). If \(E_{\text{msv}}\) is not more than the tolerable error, then the neural network has been successfully built. Otherwise, the model is considered as overfitting; the model parameters should be changed and all the above steps repeated.

$$E_{{\text{msv}}} = \frac{{\sum\nolimits_{i = 1}^{{N_{{\text{val}}} }} {\left( {R_{{{{\text{a}}\_{\text{predicted}}}\_i}} - R_{{{{\text{a}}\_{\text{target}}}\_i}} } \right)} }}{{N_{{\text{val}}} }}^{2} ,$$
(7)

where \(E_{\text{msv}}\) is the mean squared error between the outputs and target outputs for all input vectors in the validation dataset; and \(N_{\text{val}}\) is the size of the validation dataset.

In this experiment, 8 out of 81 groups of data (see Table 2) were randomly selected as the validation dataset and the rest were used for training. After sufficient attempts with different model parameters, an ANN surface roughness prediction model, named Model 1 in Table 3, with better performance was successfully built and selected. Models 2 and 3 were representative of this model but with inferior performance. Using the successfully developed prediction model, the user could obtain surface roughness during the process of milling rather than after the milling process, based on the cutting parameters. Obtaining the roughness at this earlier stage may have limited significance in practical production. However, if the predicted roughness provides the user with some information on how to adjust cutting parameters to achieve a desired roughness, the significance of the roughness prediction model would greatly improve. Therefore, a roughness control model was also developed, based on the roughness prediction model.

3.2 Development of the roughness control model

Based on the selected roughness prediction model described in the above section, a roughness control model that could determine cutting parameters corresponding to a specific desired roughness value was developed. Using this control model, the roughness of the milled surface could be specified via control of the cutting parameters. The flow diagrams in Fig. 4 describe the roughness control model algorithms, which can achieve different functions with different inputs. The objective of the algorithms in Figs. 4a–c is to determine the cutting parameters for a specific roughness, minimum roughness, and roughness under a certain value, respectively, within a given cutting parameters’ range. The control model can be applied to improve the production efficiency when the requirements for the milled surface are special. For example, when a manufacturer requires a part with a specific friction factor, i.e., a particular roughness value, the control model with Algorithm (a) in Fig. 4 can assist in milling this manufacture part. The industry field typically requires a roughness below a certain value or the smallest roughness value possible. The control model with algorithms (b) and (c) in Fig. 4 contributes to satisfying such requirements.

Fig. 4
figure 4

Algorithms of surface roughness control model

4 Results and discussions

4.1 Evaluation of roughness prediction model results

To maintain the objectivity of the evaluation, further experiments were conducted after two months to obtain test data for evaluating the performance of the selected ANN surface roughness prediction model (Model 1 in Table 3). The test data and predicted surface roughness values can be seen in Table 4. Figure 5 shows the difference between target and predicted values of surface roughness and visually illustrates the insignificance of the difference. Here, mean relative error (MRE) was selected as the metric for measuring the difference. The expression and mathematical implications of MRE are easy to understand and MRE is often used by researchers to evaluate the roughness prediction model [19]. By calculating the mean relative error based on Eq. (8) (2.08%), it can be concluded that this ANN surface roughness prediction model is reliable and feasible.

$$E_{{\text{mr}}} = \frac{1}{{{N_{{\text{test}}} }}}{\sum\limits_{i = 1}^{{N_{{\text{test}}} }} {\left| {\frac{{R_{{{{\text{a}}\_{\text{predicted}}}\_i}} - R_{{{{\text{a}}\_{\text{measured}}}\_i}} }}{{R_{{{{\text{a}}\_{\text{measured}}}\_i}} }}} \right|} },$$
(8)

where \(E_{\text{mr}}\) is the mean relative error; \(R_{{{\text{a}}\_{\text{predicted}}\_i}}\) and \(R_{{{\text{a}}\_{\text{measured}}\_i}}\) are the predicted and measured \(R_{\text{a}}\) of the \(i{\text{th}}\) test data, respectively; and \(N_{\text{test}}\) is the size of the test data.

Table 4 Test data and evaluation results for roughness prediction model
Fig. 5
figure 5

Evaluation results of surface prediction model

4.2 Evaluation results of roughness control model

Further experiments were conducted to evaluate the efficiency and accuracy of this roughness control model. Initially, the ranges and adjustment rate of the cutting and other system parameters were set based on Table 5. We subsequently determined the cutting parameters corresponding to a specific or minimum roughness via this roughness control model and recorded the time cost. Finally, these parameters were input into the CNC machine and the average roughness of the machined workpiece was measured. The test data are listed in Table 6. Figure 6 shows the comparison of desired and measured roughness. Based on Table 6 and Fig. 6, the average time cost by the control system can be obtained (36.33 s). The mean squared error and mean relative error between desired roughness and measured roughness is 1.02 × 10−4 and 2.91%, respectively; this proves that the roughness control model has satisfactory efficiency and accuracy. It is of further note that the value of \(E_{\text{t}}\) in Table 5 should have been set to 0.001 µm as the resolution of the roughness tester is 0.001 µm. However, too many groups of the corresponding cutting parameters were output by the control model when \(E_{\text{t}}\) was equal to 0.001 µm, dramatically increasing the workload of the milling process. Therefore, \(E_{\text{t}}\) was set to 0.000 1 µm in this experiment. Moreover, other parameters’ values, apart from \(P_{\text{model}}\), can be set to different values dependent on the users’ requirements. For example, decreasing the range or enlarging the adjustment rate of cutting parameters can improve the efficiency of the control model.

Table 5 Parameter settings for the roughness control model
Table 6 Test data and evaluation results for roughness control model
Fig. 6
figure 6

Evaluation results of roughness control system

4.3 Results of assessing cutting parameters’ effects on surface roughness

4.3.1 Assessing results based on the ANN model

Various researchers [11,12,13, 43] have used experimental data to directly investigate the influence of cutting parameters on surface roughness via the ANOVA or regression tree method. Even though the ANOVA and regression tree method, based on mathematical analysis, could provide more detailed information compared to the 2D- or 3D-charts, the size of the data from the experiment was limited in general. The accuracy of the analysis result would be influenced based on such limited data. A reliable ANN surface roughness prediction model could describe the accurate mathematical relationship between the cutting parameters and surface roughness. However, the ANN model was a “black box” that was difficult to provide with the visualized influences of cutting parameters on roughness. In this paper, the ANN model was used to generate sufficient data for analyzing the cutting parameters’ influence on average roughness via 2D- and 3D-charts. For example, if the influence of cutting speed on surface roughness was expected to be studied, data could be generated, as in Table 7. An analysis curve, such as in Fig. 7a, could then be obtained. If the influence of the interaction of cutting speed and feed rate on roughness was intended for investigation, the data could be generated, as in Table 8. An analysis curve, such as in Fig. 8a, could then be obtained accordingly.

Table 7 Example data for analyzing a single parameter’s influence on roughness
Fig. 7
figure 7

Influences of a cutting speed, b feed rate, c depth of cut, and d volume fraction of SiC on average roughness

Table 8 Example data for analyzing multiple parameters’ influence on roughness
Fig. 8
figure 8

Influences of interaction of two cutting parameters on average roughness

Similarly, the curves showing the influence of feed rate, depth of cut, volume fraction of SiC, or the interaction of two different cutting parameters, on surface roughness were also generated, shown in Figs. 7 and 8.

From Fig. 7a, it can be seen that the average surface roughness value decreases with increasing cutting speed when the feed rate and depth of cut are 0.25 mm/r and 0.1 mm, respectively, regardless of the volume fraction of SiC. The decreasing speed of roughness value with increasing cutting speed increases with the increase of volume fraction of SiC when the cutting speed exceeds a certain value. Figure 7b shows that the roughness value increases with increasing feed rate when the cutting speed and depth of cut are 70 mm/min and 0.1 mm, respectively. The roughness value has an approximately exponential relationship to the feed rate when the feed rate is within the proper range. According to Fig. 7c, the roughness value increases with the depth of cut when the cutting speed and feed rate are 70 mm/min and 0.25 mm/r, respectively. There is a linear relationship between the roughness value and depth of cut and the slope of the line is approximately 0.515 µm/mm, 0.754 µm/mm, and 0.797 µm/mm when the volume fraction of SiC is 0, 15%, and 25%, respectively. Similarly, it can be seen from Fig. 7d that the roughness value also increases linearly with the increase of volume of fraction of SiC, and the line slope is approximately 0.004 µm/% when the cutting speed, feed rate, and depth of cut are 70 mm/min, 0.25 mm/r, and 0.1 mm, respectively.

Figure 8 describes the effect of the interaction between two different cutting parameters on the average surface roughness value. The relation between roughness value and the interaction of cutting speed and feed rate is shown in Fig. 8a. From this figure, it can be seen that the influence of feed rate on roughness value is more significant than that of cutting speed and the influence of cutting speed becomes more significant as the feed rate increases. Figure 8c shows that the significance of the influence of cutting speed on roughness value is greater than that of the volume of SiC. Figure 8f suggests that the importance of the influence of volume of SiC on roughness value is slightly higher than that of the depth of cut. Table 9 presents the measure of judging which parameter’s influence on roughness value is the most significant. To summarize, the feed rate has the most significant influence on roughness value, followed by cutting speed and volume of SiC. The depth of cut has the smallest influence on roughness value. Moreover, it can be seen from Fig. 8b that the influence of the depth of cut on the roughness value is always stable and small, regardless of the value of cutting speed. From Fig. 8d, we can see that the increasing speed of roughness value with the increasing depth of cut increases slightly with the increase in feed rate. Figure 8e illustrates that the increasing speed of roughness value with the increase in volume fraction of SiC increases with the increase in feed rate.

Table 9 Measure of the significance of the parameter’s influence on roughness

4.3.2 Assessing results based on ANOVA

ANOVA has often been used to determine which of the cutting parameters’ influence on roughness is the most significant [12, 13, 44]. ANOVA is a method of portioning variability in an experiment into identifiable sources of variation and the associated degrees of freedom. In statistics, an F test is used for analyzing the significant effect of the parameters on the quality characteristic. Table 10 gives the ANOVA results for average surface roughness based on the data in Table 11.

Table 10 ANOVA table
Table 11 Data for ANOVA

From Table 10, it can be concluded that feed rate is the dominant parameter influencing the average surface roughness, with a percentage contribution of 74.80%, followed by cutting speed, volume fraction of SiC, and depth of cut with percentage contributions of 9.74%, 3.11%, and 2.65% respectively. This result by the ANOVA is consistent with the visual analysis results based on the ANN roughness prediction model. Regarding the interaction of parameters, the interaction of cutting speed and feed rate has the most significant effects on roughness, with a percentage contribution of 5.99%, followed by the interaction of volume fraction of SiC and feed rate, with a 1.51% contribution.

4.4 Discussion

This section explains why a higher cutting speed, lower feed rate, smaller volume fraction of SiC, and lower depth of cut can lead to a lower roughness value during milling Al/SiC composites. According to Section 2.3, the main component of the Al/SiC composite materials used in this experiment is aluminum, implying that these materials are more similar to plastic materials. When milling plastic materials, the formation of built-up edge (BUE) is an important phenomenon that influences the roughness of the milled surface. At low cutting speeds, BUE and chip fracture form readily, resulting in a rough surface. With an increase in cutting speed, the BUE begins to vanish, chip fracture decreases, and hence the roughness decreases. Furthermore, the increasing depth of cut leads to a higher normal pressure and seizure on the rake face, which promotes formation of the BUE. When the feed rate increases, the BUE forms so quickly that the removal speed of chip fracture is much lower than its formation speed. Therefore, the roughness increases with increasing depth of cut or feed rate. During the process of milling Al/SiC composites, soft Al matrix and hard SiC particles are cut alternately, causing tool vibration. Hence, the formation of the milled surface is not only influenced by the common cutting parameters, such as cutting speed, feed rate, and depth of cut but is also greatly influenced by the hard SiC particles. The rotation, pressed-in, pulled out, and fracture of SiC particles after milling contributes to the formation of micro-cracks, pits, swellings, and cavities [7]. The increase of the volume fraction of SiC increases the formation probability of these defects and hence the roughness increases.

5 Conclusions

In conclusion, an accurate roughness prediction and control model was well developed based on the ANN method for milling Al/SiC composites. This suggests that machine learning methods are reliable and effective for solving problems in the field of machining. Introducing more machine learning methods to the industry field should be encouraged. High-precision milling of the Al/SiC composite is a difficult task. However, we can control the roughness to a specific value or range using the roughness control model, which contributes to widening the potential application of such materials. Furthermore, an in-depth analysis of the cutting parameters’ influences on roughness was conducted in this study. The following presents the various exciting and novel findings of this study.

  1. (i)

    The Levenberg-Marquardt backpropagation training algorithm is reliable and efficient for developing the roughness prediction model for machining.

  2. (ii)

    Among the factors investigated in this paper, the feed rate has the most significant influence on surface roughness, followed by cutting speed and volume fraction of SiC.

  3. (iii)

    The speed of roughness decreases with cutting speed and increases with an increase in volume fraction of SiC and feed rate.

  4. (iv)

    Surface roughness has an approximately exponential relation to the feed rate when the feed rate is within a certain range.

  5. (v)

    The relation between surface roughness and depth of cut is approximately linear, as is the relation between roughness and volume fraction of SiC.