# Study on Surface Roughness of Sidewall When Micro-Milling LF21 Waveguide Slits
## 2 Materials and Methods
### Artificial Neural Networks  
The GMDH was applied for the mathematical modeling of multi-parametric datasets, which is characterized by an inductive procedure of extending and developing the network until the working efficiency of the network reaches the desired point during the learning process [18]. That is, the network structure was not fixed during the training. The structure sample of the GMDH method for the surface-roughness prediction for the micro-milling of brass is shown in Figure 3 [19]. \begin{table}
\begin{tabular}{c c c} \hline \hline  & **Lower Limit** & **Upper Limit** \\ \hline Spindle speed & 40,000 rpm & 65,000 rpm \\ Feed per tooth & 0.2 \(\upmu\)m/z & 0.6 \(\upmu\)m/z \\ Cutting depth in the axial direction & 20 \(\upmu\)m & \\ Extended length of the tool & 20 mm & \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Process window. Figure 3: Structure sample of GMDH for surface roughness prediction. Figure 2: Surface roughness measurement at 65,000 rpm and 0.2 \(\upmu\)m/z. (**a**) Three-dimensional topography of sidewall surface. (**b**) Two-dimensional surface. Where \(x_{1},x_{2},x_{3}\) and \(x_{4}\) represent the extended length of the micro-milling tool, spindle speed, feed per tooth and cutting depth in the axial direction. \(y_{1}\) is an explicit model equation, which represents the surface-roughness prediction model. Figure 3 depicts an example structure of the GMDH used in the prediction of surface roughness. The network has four inputs and one output above. The input layer of the GMDH network forwards the input signal to the middle layer (that is, the first hidden layer and the second hidden layer). Each neuron in the middle layer corresponds to two neurons in the previous layer. Therefore, there must be only two neurons in the previous layer (the middle layer) of the output layer. Generally, only select, adaptive and linear elements as neurons of the GMDH network, as shown in Figure 4, are considered. That is, only the functions of the two variables (neurons) in linear, polynomial and quadratic forms are considered. The following Equation (1) represents the quadratic form:  
\[Z_{k,l}=F(Z_{k-1,i},Z_{k-1,j})=a_{0}+a_{1}Z_{k-1,i}+a_{2}Z_{k-1,j}+a_{3}Z_{k-1, j}Z_{k-1,j}+a_{4}Z_{k-1,j}^{2}+a_{5}Z_{k-1,j}^{2} \tag{1}\]  
where \(Z_{k,l}\) represents the lth processing unit of the \(k\)th layer and the coefficients of \(a_{0}-a_{5}\) can be calculated by minimizing the root mean square error (\(RMSE\)), given in Equation (2) by multiple regression analysis. \[RMSE=\sqrt{\frac{\sum\limits_{i=1}^{n}(z_{k,l}-Z_{k,l})^{2}}{n}} \tag{2}\]  
where \(Z_{k,l}\) shows actual data. In this study, we developed an explicit equation that predicted surface roughness based on the GMDH method. The flow chart of surface roughness prediction by GMDH methodology is shown in Figure 5. The given steps were followed to create the model equations utilizing the GMDH algorithm. 1. Prepare the dataset. Arrange the dataset part of learning (Part A) \(\{x_{i},y_{i}\}\), testing (Part B) \(\{x_{j},y_{j}\}\) and predicting (Part C) \(\{x_{k},y_{k}\}\), obtained by the micro-milling experiments, where the sample data in Table 1 are dynamically divided into Part A and Part B. Part C comes from the new sample data and not those used to establish the model. Use Part A to generate the model to be selected, Part B to verify and filter the generated model and Part C to verify the surface roughness model. \(x\) is a multi-dimensional input variable that consists of the spindle speed and the feed per tooth. \(y\) is the output variable, which is the roughness measurement obtained by the test. 2. Preprocess the dataset above, that is, normalize the dataset and remove the static DC component. Generally, for the existing dataset, the following transformation is performed before the training of the neural network: \[\left\{ \begin{array}{l}x_{i}^{*}=\frac{x_{i}-\overline{x}}{\sigma_{x}}\\ y_{i}^{*}=\frac{y_{i}-\overline{y}}{\sigma_{y}}\end{array}