Surface roughness prediction for turning based on the corrected subsection theoretical model

To obtain an accurate prediction model of surface roughness on the premise of low experimental cost in precision machining processes, this paper proposes two error correction models of the subsection theoretical model of arithmetic mean height roughness (Ra) in turning. The prediction performance of the two error correction models was evaluated by 25 groups of turning data of AISI1045 steel. The determination coefficient (R2) of the 10 random runs of the two correction models are both above 0.9, the mean squared error (MSE) is lower than 0.05, and the standard deviations (StdDev) of R2 and MSE are 0.01. The experimental results show that the two error correction models significantly improve the prediction accuracy and stability of the subsection theoretical model. Moreover, the influence of turning parameters and tool geometry on Ra based on the two correction models and the subsection theoretical model as well as the advantages and disadvantages of the three models is analysed, which provide an effective guidance for the selection of parameters and the prediction model in actual machining.


Introduction
Turning is widely used in manufacturing, such as machine tools, vehicles, aircraft and other key parts processing [1][2][3]. In the turning process, especially in the batch turning process, maintaining stable and good product quality is the goal of the enterprise. Surface roughness is one of the significant surface qualities and is directly related to product quality, production cost and service life. Therefore, exploring the influence mechanism of surface roughness in the turning process and building an accurate surface roughness model that mines the influence of parameters on surface roughness can provide powerful guidance for parameter selection and adjustment in batch turning. It is an effective means to ensure good and stable machining quality.
Theoretical modelling is a common method to obtain a surface roughness model for turning [4]. Theoretical modelling builds a numerical model between factors and surface roughness by exploring the formation of surface roughness, which is derived from the in-depth analysis of the mechanism of the machining process using the basic machining theory. The theoretical model has advantages that can explain the machining process, analyse the cutting mechanism and obtain universal rules to guide parameter selection. In addition, the theoretical model can be constructed with a small amount of or no experiments, which can effectively reduce the experimental cost.
In turning, periodical tool feed marks are formed on the machined surface, and the turning surface roughness is related to many factors, such as cutting parameters and tool geometry [5][6][7][8], minimum undeformed chip thickness [9], vibration [10][11][12] and material [13][14][15]. However, due to the complexity of the turning process, the theoretical models of turning surface roughness constructed in the literature consider some main factors. Vajpayee [5] analysed all possible situations when a single-point tool moves during turning and proposed a prediction model of maximum contour height considering the influence of feed rate and tool geometry. Qu and Shih [6] analysed the feed mark of turning to develop mathematical models for Rt, Ra and root-mean-square roughness (Rq) for ideal tool nose profiles consisting of elliptical and circular arcs. Our research group studied the relationship between the residual condition of the workpiece contour surface in the cross section and the influence factors, including feed rate, tool minor cutting edge angle and the tool nose radius and found that the change in feed rate and tool nose radius will change the feed mark and developed a subsection theoretical model of surface roughness according to different feed and tool geometries [7]. Grzesik [9] built a revised surface roughness model for turning based on the assumption that the minimum undeformed chip thickness corresponds to the transition from ploughing to microcutting, and the surface finish can be assessed in terms of feed rate, corner radius and the minimum undeformed chip thickness, which represents the contribution of the secondary cutting edge. Considering the motion characteristics of the turning process, Skelton [10] used an electrohydraulic vibrator to generate horizontal and vertical vibrations for a carbide lathe tool and built a theoretical expression for the centreline average (CLA) value of the surface finish under dynamic conditions. Miao et al. [12] proposed an indirect method to simulate the formation of surface topography considering the effect of tool tip vibration. At the same time, surface roughness is also related to the material properties of the workpiece, such as plastic side flow and material spring back. Zong et al. [13] achieved a surface roughness model for single-point diamond turning, the kinematics, minimum undeformed chip thickness, plastic side flow and elastic recovery of materials as machined as influencing factors of surface roughness were considered, and the 'size effect' was also successfully integrated into the model. Based on the factors considered in Reference [13], He et al. [14] considered the waviness of the tool tip contour and the random factors for surface roughness during turning and developed a new theoretical model of surface roughness.
However, due to the multiple factors, complexity and uncertainty of the turning process, it is difficult to establish an accurate theoretical model of surface roughness. In practical modelling, some influencing factors are often ignored, and some assumptions are set, so there is a certain gap between the predicted results of theoretical models and actual machining. The data-driven model is another common modelling method of surface roughness that mines the influence of factors on surface roughness based on data [4], emphasizing process data mining and the ability to excavate potential information. The prediction accuracy of the datadriven model is generally better than the prediction accuracy of the theoretical model. The data-driven modelling method for surface roughness prediction includes mainly multiple regression modelling methods [16][17][18], response surface methodology (RSM) [19][20][21], neural networks [22][23][24][25] and support vector machines (SVMs) [26][27][28]. However, since the data-driven model is based on data, and the more data there are, the higher the accuracy of the model is, the higher the experimental cost. In addition, the data-driven model is weak in explaining the machining process, and its generalization is lower than the generalization of the theoretical model. The model will no longer be applicable when the tool or workpiece material or machining environment changes [15]. To maintain the interpretability of the model and improve the prediction accuracy, an error correction term was added to the theoretical model. The method generally corrects the theoretical model using a data-driven model. For example, He et al. [29] combined the theoretical modelling method with a radial basis function (RBF) neural network and achieved satisfactory prediction results in single-point diamond turning. However, the theoretical model used did not consider segmentation.
Before turning, the turning parameters, tool geometry and workpiece materials can be selected according to the surface roughness model based on the machining quality requirements. With the progress of machining, turning parameters are the most convenient factors to adjust, and other influencing factors of surface roughness are difficult to control and adjust. Therefore, to improve the prediction accuracy of the subsection theoretical model of surface roughness proposed by our research group and provide guidance for the selection and adjustment of parameters with stable quality in the batch turning process, this paper analyses the prediction accuracy of the subsection theoretical model of Ra based on turning parameters and tool geometry, tries to add the correction term based on actual machining data to correct the subsection theoretical model and develops two error correction models of the subsection theoretical model. The effectiveness of two error correction models is verified by 25 sets of turning data, and the effect of turning parameters and tool geometry on Ra based on the subsection theoretical model and two error correction models is obtained.

Subsection theoretical model
The surface roughness is the main evaluation index for the surface finish of machining quality. Different manufacturing processes produce different roughness properties, and different applications require different surface properties. Therefore, the surface parameters are different and extensive. Surface roughness parameters are usually divided into amplitude parameters, spacing parameters and mixed parameters according to their functionality. Gadelmawla et al. [30] described the definitions and mathematical formulas of 59 roughness parameters according to these classifications. Arithmetic mean height roughness (Ra), root mean square roughness (Rq) and ten-point height (Rz) are commonly used roughness evaluation parameters. Rq is more sensitive than Ra to large deviations from the mean line, and Rz is more sensitive to occasional high peaks or deep valleys than Ra. Rq and Rz are more affected by the measurement position than Ra [30], so this paper focuses on the theoretical model of Ra. Ra refers to the average absolute value of the distance from each point on the profile line to the profile midline within a sampling length [30]. The expression is shown in Eq. (1): where y 1 (x) is the profile line, L denotes the sampling length, and y 2 (x) represents the profile midline, all of which are represented in Fig. 1.
The profile midline is the baseline for assessing the magnitude of the surface roughness value, which is defined as: The subsection theoretical model of Ra in turning proposed by Ref. 7 analyses the feed marks on the workpiece surface under some assumption conditions, as follows: 1. Surface roughness is caused by the cutting tool geometry and feed rate only 2. Turning is vibration free 3. The cutting tool does not wear during turning, and any error in the guideways as the tool moves has no effect on the shape and size of the feed marks Based on the above assumptions, as the tool feeding, the microgeometry of feed marks is generated and is shown in Fig. 2. The forward direction of the x-axis is the feed direction of the turning tool, and Fig. 2 shows that the feed marks of the machined surface will exhibit periodic changes.
In Fig. 2, point O denotes the centre point of the tool nose arc, point P is considered the tangent point between the tool edge arc and the straight cutting edge, r expresses the tool nose radius, k ′ is defined as the tool minor cutting edge angle, and f is the feed rate. R max is the peak-to-valley maximum distance, Q represents the pedal from P to the bottom of the valley, M and J are the two lowest points in the feeding process, and N is the highest point. The distance between P and Q can easily be obtained according to the geometric relationship (Eq. (3)) and is marked as PQ: The research group analysed feed marks in Fig. 2 and found that the change of f and r will change the position of point N, which leads to the change of the profile midline and the profile line of Ra. With the change in f, r and secondary deflection angle, the size of PQ, R max and y 2 (x) will also change. According to the size relationship of PQ, R max and y 2 (x), the feed marks are divided into three cases (PQ ≥ R max , b ≤ PQ ≤ R max and PQ ≤ b ≤ R max ), and the theoretical model of each case is constructed. Finally, the subsection theoretical model of Ra is formed. In addition, combining Eq. (3) and geometric relationship (Eq. (4)) of R max , f and r, when point N is perpendicular to the midpoint of straight line MJ, L PQ ≥ R max and L PQ < R max can be converted to f ≤ 2rsink � and f ≤ 2rsink � . The feed marks in the three cases are shown in Table 1. In Table 1, the feed rate is equal to one cycle, and S 1 , S 2 and S 3 represent the areas of the three shaded parts. In addition, based on the definition of the profile midline, S 1 + S 2 = S 3 . According to the definition of the profile midline, the relationship between y 1 (x) and y 2 (x) is known. y 1 (x) is expressed as Eq. (5) by introducing the expression into Eq. (2). Theoretical Ra, which is denoted as Ra t , can be obtained by combining Eqs. (3), (4) and (1): Case 2: the profile line consists of arcs MN and PJ with r and straight line NP, which is at an angle of k′ with the x-axis. According to the feed mark, the functions y 1 (x) and y 1 (x) can be expressed as: Finally, Ra t in this case is solved based on Eqs. (8), (9) and (1): where Eqs. (10) and (7) seem to be identical, but b in the expression is different (see Eqs. (9) and (6)).
Case 3: The consistency of the profile line is same as case 2, so the expressions of y 1 (x) , y 2 (x) and R max are same as in case 2. However, the value of b is greater than L PQ , and S 1 , S 2 and s 3 in case 3 will change. According to the definition of Eq. (1), Ra is equal to the average of the sum of the three shaded areas in the sampling length, namely, a = S 1 + S 2 + S 3 ∕f ; therefore, the change in S 1 , S 2 and S 3 will lead to the change in Ra. The roughness expression Eq. (9) can be obtained by derivation with a similar process. By using Eqs. (8), (9) and (1), Ra t in the current range is given as:

Two error correction models of the subsection theoretical model
The subsection theoretical model of Ra studies the effect of parameters (f, r and the tool minor cutting edge angle) on Ra in an ideal situation. However, there is a certain gap between the ideal situation and the actual machining situation. To make the accuracy of the subsection theoretical model of Ra closer to the surface roughness of actual machining, this study designs two error correction models by combining with the actual machining data to correct the subsection theoretical model of Ra.
1. The first error correction model is implemented by adding an adjustment function to the subsection theoretical model, as shown in Eq. (12) and is defined as a regression correction model and recorded as Ra r : where 0 ( ) and 0 ( ) are the adjustment functions for X, and = x 1 , x 2 , x 3 ⋯ , x n ,x i (i = 1, 2, 3 ⋯ , n) , represents the ith parameter affecting Ra. The adjustment functions 0 ( ) (12) Ra r = 0 ( ) + 1 ( )Ra t and 1 ( ) can be solved by experimental data or theoretical analysis in the turning process. 2. The second error correction model uses machine learning to fit residuals between the subsection theoretical values and the actual measured values and takes the fitted residuals as the correction term. The error correction model is recorded as a residual coupled correction model and is represented by Ra c . The model is shown in Eq. (13): where ml is the residual fitting model by machine learning. Machine learning can realize nonlinear fitting. The subsection theoretical model catches mainly the general and obvious variation law, which provides a theoretical basis for the prediction of the error correction model. Machining learning obtains insignificant and small residuals to achieve local adjustment. Therefore, the residual coupled correction mode can achieve higher prediction performance.
General regression neural network (GRNN) has strong data mining and nonlinear modelling ability. The essence of GRNN is to assign the attributes of the training samples to the test samples according to the distance between the test samples and the training samples to realize the prediction. GRNN does not need to solve weight in the whole process, and the model retains all the information of the training set, so the learning speed is very fast and the prediction result is accurate [31,32]. Therefore, this study uses GRNN to build the residual model.
In the residual coupled correction model, the input of GRNN is machining parameters, and the output is the difference between the actual measured value and Rat (subsection theoretical value). The structure of GRNN is similar to a radial basis function (RBF) network consisting of four layers: the input layer, the pattern layer, the summation layer, xn and the output layer, and the structure is shown in Fig. 3, where X = x 1 , x 2 , ⋯ , x n denotes the network input vector, and Y = Y 1 , Y 2 , ⋯ , Y k is the network output vector.
In the input layer, the number of neurons is the same as the dimension of the input vector in the learning sample. In addition, each neuron is a simple distribution unit, which transfers the input variables to the pattern layer directly.
In the pattern layer, the number of neurons is equal to the number of learning samples, and the Gaussian basis function (Eq. (14)) is the transfer function of the ith neuron in the pattern layer: where P i is the output of the ith neuron in the pattern layer, is the set of input variables in the network, x i is the learning sample corresponding to the ith neuron, and is the width coefficient of the Gaussian basis function. Because the coefficient determines the smoothness of the function, it is also called the smoothing factor.
In the summation layer, two types of neurons are used. One type is to sum the output of all the neurons in the pattern layer. The connection weight of the neurons between the pattern layer and the summation layer is 1, and the transfer function is where S D is the output of the neuron, and m is the number of neurons in the pattern layer, which is also equal to the number of training samples. The number of such neurons is only 1 in the summation layer, which is why the summation layer has one more neuron than the output layer.
The other type is the weighted summation of all the neurons in the pattern layer, which is different from the first kind of neuron. This kind of neuron is a weighted summation, and the weight is equal to the label corresponding to the training sample and does not need to be solved. The transfer function is as follows: where y ij is the connection weight between the ith neuron in the pattern layer and the jth neuron in the summation layer, and the number of neurons is equal to the number of labelled elements in training samples, that is, the number of prediction targets.
In the output layer, the number of neurons is the dimension k of the output vector in the learning sample. The output layer y j is equal to the ratio of the two types of neurons (14) set in the summation layer, as shown in Eq. (17). Equations (14)(15)(16) are substituted into Eq. (17), and the expression of output Y is shown in Eq. (18): From the above prediction process of the GRNN, the internal parameters of the GRNN have only a smoothing factor, . When the value is very large, the output approximates the mean of all sample-dependent variables. When is too small, it will lead to overfitting and poor generalization ability of the model. Therefore, the appropriate value of is important to ensure the prediction accuracy of the GRNN.

Experiment
To analyse the influence of parameters on Ra and verify the effectiveness of the two error correction models, turning experimental data obtained by our research group are utilized [7]. In the experiment, the turning lathe of the turning experiment is a machining centre of model CKD6150A. The workpiece material is AISI1045 steel, and the shape is a cylinder with a diameter of 40 mm. Under dry cutting conditions, the physical vapour deposition (PVD)-coated carbide tool is used for turning. The cutting length of each group is 30 mm, which can reduce the change in the initial conditions of some factors caused by the processing time.
The cutting speed, feed rate, depth of cut and noise radius are selected as the influence parameters of the surface roughness in the turning experiment. The parameter ranges and levels are obtained according to the recommendation of the tool manufacturer and are shown in Table 2. These tools have a tool cutting edge angle k = 90° and a tool minor cutting edge angle k′ = 6°.
Ra is measured by a Mitutoyo SJ-310 surface roughness meter. Three measurement traces perpendicular to the cutting direction are measured, and the average of the three measured Ra values is used to represent the roughness of the actual machined surface. The length and speed of measurement as determined experimentally are 16 mm and 0.5 mm/s, respectively.
In this paper, the Box-Behnken experimental design (BBD) [25] of RMS is employed to design parameter combinations of four factors and three levels. In BBD, the number of centres is set to 5, and 29 groups of turning (17) � experimental data are obtained. In this paper, the repeated parameter combinations in 29 groups of experimental data are removed. Therefore, 25 groups of parameter combinations are obtained and are shown in Table 3. For 25 groups of experimental data, the influence of each parameter on Ra is analysed. The mean Ra ( Ra m ) of the same level of each parameter is taken as the mean roughness of the corresponding level of the parameter. For example, Ra m of the cutting speed in Level 1 can be calculated by averaging the measured Ra when v = 120 m/min. The fluctuation range of Ra for each parameter at three levels is the difference between the maximum Ra m and the minimum Ra m of the three levels (see Table 4). In Table 4, the total Ra m = 2.1585 μm.    Table 4 shows that the fluctuation ranges produced by r and f are much larger than the fluctuation ranges produced by a p and v, indicating that r and f have a great influence on the surface roughness, and a p and v have no significant effect on the surface roughness. The degree of influence of the four parameters on the surface roughness is sorted as follows: r > f > a p > v. This result is consistent with the factor selection of the subsection theoretical model. Thus, even if a p and v, which are contained in 25 groups of data, are not included in the subsection theoretical model, they can also be used to verify the effect of the theoretical model.

Prediction results and parameter influence analysis of the subsection theoretical model
Based on the analysis of the formation of surface roughness in turning, the subsection theoretical model is compared with the theoretical model Ra w (Eq. (19)), which considers the feed rate and ideal tool nose profiles consisting of a circular arc and does not consider the segmentation problem in Ref. 6 through 25 groups of data in Table 3, the comparative curve of surface roughness is shown in Fig. 4: where feed f is the distance between two adjacent peaks of the surface profile, and parameter x c is the x coordinate. Based on the description in Ref. 6, the contour line y is equal to its mean value, that is, y = y , and r is the radius of the arc. Figure 4 shows that the trends of the curves obtained by the two theoretical models (Ra t and Ra w ) are the same as the trends of the actual measured curve, and the curve of Ra t is closer to the actual curve than the theoretical model Ra w , indicating that the accuracy of the subsection theoretical model (Ra t ) proposed by our research group is higher than the accuracy of the theoretical model (Ra w ) in Ref. 6 and proves that the subsection theoretical model is reasonable and effective. However, due to the limited influence parameters and assumptions of the subsection theoretical model, there is still a certain gap between its predicted values and the actual measured values. In addition, further analysis of the curves in Fig. 4 shows that if a calculated intercept is added to the values of Ra w , a curve fitted closer to the curve of the actual values can be performed.
To determine the influence of the turning parameters and tool geometry on Ra in the subsection theoretical model, a three-dimensional surface diagram of f, r and Ra t is shown in Fig. 5. As shown in Fig. 5, Ra t is positively correlated with f and negatively correlated with r. In other words, good Rat can be obtained under large r and small f in turning under the assumptions shown in Section 2.1 and the parameter range shown in Table 2. This result can provide an effective guide for the selection of turning parameters and tool geometry in turning.

Regression correction model (Ra r )
In this study, 0 ( ) and 1 ( ) of the regression correction model (Eq. 12) are solved by experimental data, and the where 0 and 1 are constants.
According to Eq. (20), the variables 0 and 1 can be solved by the least squares method with three sets of experimental data. Three sets of suitable data are selected from Table 3 and are shown in Table 5. The selection process is as follows: based on the analysis of Table 4, r is the most important factor for Ra, followed by f and a p ; therefore, r, f and a p should be chosen at different levels to reduce their effect on Ra. In addition, because the effect of v is almost negligible, the same level of v is chosen.
According to Table 5, the regression correction model is obtained and is shown as Eq. (21).
To evaluate the accuracy of the regression correction model from qualitative and quantitative aspects, the curves of Ra of the actual measurement, the regression correction model, and the subsection theoretical model are shown in Fig. 6. The mean squared error (MSE) and the coefficient of determination (R 2 ) are selected as the evaluation indices of model accuracy. MSE evaluates the deviation of the predicted and measured values: the smaller MSE is, the higher the prediction accuracy is. R 2 represents the ratio of the explained variation to the total variation: the closer R 2 is to 1, the better the fitting effect of the model is. The expressions of the two indices are Eqs. (22) and (23), respectively. The values of indices for the regression correction model and subsection theoretical model are summarized in Table 6.
where n is the number of samples, y j and ŷ j are the measured and predicted values, respectively, and y is the average of the measured value, i.e., y = � n ∑ j=1 y j � ∕n. Figure 7 clearly shows that the curve of Ra r keeps the trend of Ra t within the parameter ranges shown in Table 2, but it is closer to the actual curve than that of Ra t . Table 6 shows that the two index values of Ra r are much better than the index values of Ra t . The relationship between parameters (r and f) and Ra for Ra r is the same as the relationship for Ra t , as shown in Fig. 7. Therefore, the regression correction model greatly improves the accuracy of the subsection theoretical model only by three groups of experimental samples  . 6 Prediction curves of the regression correction model and subsection theoretical model and retains the law of the subsection theoretical model. This result indicates the effectiveness of this correction model and idea. Although the use of experimental samples limits the applicability of the model, the idea of its correction can be used in other machining situations and even other fields, which provides effective guidance for improving the prediction accuracy of the model with a small number of experimental samples.

Residual coupled correction model (Ra c )
According to Eq. (13), the inputs of GRNN in the residual coupled correction model include v, f, a p and r. The output is the difference between Ra m and Ra t , i.e. the "Error" item in Table 3. To reduce the influence of the magnitude difference between different input parameters on the prediction accuracy, before GRNN, the mapminmax function, which is a MATLAB2018a toolkit function, was used to normalize the input parameters into [− 1, 1].
From the description of GRNN in Section 2.2 (2), the smoothing factor ( ) can be seen to affect the modelling accuracy of GRNN. In addition, adjusting the internal parameters of the GRNN model is one of the means to avoid underfitting or overfitting of the GRNN model. Some researchers have proposed utilizing metaheuristic algorithms to obtain the appropriate value of GRNN, such as particle swarm optimization (PSO) [33,34]. The main advantage of PSO is its parallel and random optimization process, which contributes to a high degree of stability and generalization.
PSO does not depend on the derivative property of the objective function, and the optimal solution can be obtained by comparing the value of the objective function in every iteration [35]. Therefore, this paper uses PSO to optimize the value. The setting of internal parameters in PSO is shown in Table 7. Cognitive factors and social factors represent the weights of personal and population experience, respectively, and their values are usually selected in the interval [0, 2]. The inertia weight controls how the previous velocity of the particle affects the velocity in the next iteration. MSE is selected as the fitness function.
In this study, to test the predicted stability and accuracy of Ra c , the model is run randomly 10 times. In each prediction, 15 groups of experimental data are randomly selected from Table 3 as the training set, 5 groups are selected as the verification set, and the remaining 5 groups are selected as the test set. The prediction effect of Ra c is compared with PSO-GRNN, Ra t and Ra r . The inputs of a single PSO-GRNN are four parameters, and the output is Ra m .
The evaluation indices (R 2 and MSE) and prediction values obtained from each prediction are recorded, and the mean values, best values, worst values, and standard deviations (StdDevs) of evaluation indices are obtained by running 10 times for four prediction models and are reported in Fig. 8. StdDev reflects the degree of dispersion among individuals in the group: a large standard deviation represents a large difference between most of the values and their average values, and a small standard deviation represents that these values are closer to the average value. StdDev can represent the volatility of the data: the closer the value of StdDev is to 0, the more stable the prediction model is.
In Fig. 8, for the residual coupled correction model, the best value, worst value, mean value and StdDev of its R 2 are better than those parameters in the other three models. The best value and mean value of its MSE are also superior to the value of MSE of the other three models, and the worst value and StdDev of MSE are equal to the worst value and StdDev of the regression correction model and better than the worst value and StdDev of the other two models. These results indicate that the residual coupled correction has the best prediction accuracy and stability among the four prediction models. In addition, Fig. 8 also shows that the regression correction model also exhibits high prediction accuracy and stability; its prediction performance is second only to the prediction performance of the residual coupled  correction model, and the prediction performances of the subsection theoretical model and single PSO-GRNN are much lower than the prediction performances of the residual coupled correction model and the regression correction model. Therefore, after correcting the subsection theoretical model, the predicted stability and accuracy of the models are significantly improved, which verifies the effectiveness of the two correction models and ideas. The prediction results of the first run in 10 runs are selected for display and are shown in Fig. 9 and Tables 8 and 9. In the PSO-GRNN of the residual coupled correction model, the optimal obtained by PSO is 0.6697, as shown in Fig. 10.
In Fig. 9, the four models can all predict the trend of roughness well, and the predicted values of the residual coupled correction and regression correction model are the closest to the actual values. In Table 9, the prediction accuracy of the residual coupled correction model and the regression correction model are the best. The training effects are very good for the residual coupled correction model and single PSO-GRNN, their fitting curves of training samples coincide with the actual measured curve, and the values of R 2 and MSE of the training sets of the two prediction models are excellent. In the prediction of the validation and test sets, the prediction accuracy of residual coupled correction is high, but the  Fig. 8 Prediction indices of the three models for 10 runs Fig. 9 The prediction curves of four prediction models

Validation set
Test set prediction effect of the single PSO-GRNN model is not ideal, and its generalization ability is far inferior to the generalization ability of the residual coupled correction model. Thus, the residual coupled correction model reduces the overfitting of the PSO-GRNN model and increases its generalization ability. The overfitting of the PSO-GRNN may be due to the small number of training samples. The reason why the residual coupled correction model can avoid the overfitting of PSO-GRNN to obtain high prediction accuracy is that PSO-GRNN learns the law of the subsection theoretical model, which is consistent with the actual machining process. Similar to the regression correction model, the residual coupled correction model uses experimental data, which limits the scope of application of the model, but its correction idea can be applied to the machining field or other fields and provides guidance for the high-precision prediction model with small samples.
To further analyse the relationship between the parameters and the roughness based on the residual coupled correction model, the influence diagrams of the parameters on Ra c are shown in Fig. 11. In Fig. 11, when analyzing the influence of two parameters on Rac, the other two parameters are set as fixed values, and their values are the intermediate level values shown in Table 5. Figure 11 shows that r and f have a great impact on Rac, and a p and v have a small impact on Rac, among which v has the smallest impact on Rac and can be ignored. This result is consistent with the result in Table 4, which is completely obtained from the experimental data, and the effectiveness of the residual coupled correction model is verified. In addition, Fig. 11 shows that roughness increases with increasing f and a p and decreases with increasing r, indicating that the influence of f and r obtained by the residual coupled correction model on the roughness is consistent with the influence of f and r obtained by the subsection theoretical model, and in practical machining, excellent surface roughness can be obtained by selecting a low feed rate, depth of cut and high tool noise radius.
By comprehensively analysing the prediction performance of the subsection theoretical model and proposing two error correction models, in the turning process under cutting tools, workpiece materials and the range of machining parameters selected in this study, the orders of prediction performance from high to low are both residual coupled correction model > regression correction model > subsection theoretical model. The relationship between the parameters and roughness based on the three models is the same, and the residual coupled correction model contains four parameters. The influence relationship obtained is more comprehensive.
Through comprehensive analysis of Sections 4.1 and 4.2, the subsection theoretical model can be seen to greatly improve the closeness to the actual measured value compared with the theoretical model without subsection. At the same time, the subsection theoretical model can obtain results consistent with the actual machining trend by directly calculating the tool structure and machining parameters, which is helpful to analyse the cutting mechanism and parameter selection and has bright guiding significance. Based on the actual machining experiment, a small amount of machining data is obtained to correct the subsection theoretical model, which is conducive to further improving the accuracy of the model in the actual machining analysis and reducing the experimental cost. The two correction models proposed in this paper can effectively improve the accuracy of the theoretical model, and the prediction accuracy of the residual coupled correction model is higher than the prediction accuracy of the regression correction model, but the experimental cost is also higher. Therefore, the research in this paper provides an optional solution for the prediction model of Ra and the selection of machining parameters in actual machining.

Conclusions
This paper proposes two error correction models (regression correction model and residual coupled correction model) of the subsection theoretical model during turning developed by our research group to further improve the prediction accuracy. Based on the turning experimental data of AISI1045 steel, the high accuracy and stability of the two error correction models with small samples are proven, and the influence of machining parameters and tool structure on Ra is analysed. The research results provide effective guidance for the selection of prediction models and parameters in practical engineering.
The following specific conclusions can be drawn from this work.
1. Based on the subsection theoretical model, the regression correction model is developed by 3 groups of experimental data, and the residual coupled correction model employs PSO-GRNN to build the residual model by 25 groups of data. 2. The prediction accuracy, stability and experimental cost of the residual coupled correction model are higher than the prediction accuracy, stability and experimental cost of the regression correction model, and the determination coefficient (R 2 ) of the test set of the two error correction models is more than 0.9, which is much better than the prediction accuracy, stability and experiment cost of the subsection theoretical model. 3. The relationship between the parameters and Ra obtained by the two error correction models and the subsection theoretical model is consistent within the parameter ranges of this paper: excellent Ra can be obtained under a low feed rate, depth of cut and large tool nose radius.
The accuracy of the subsection theoretical model used in this paper is not high because few influence factors are considered. Based on the strong adaptability of the theoretical model, in the future, the formation of the cutting surface quality and deep understanding of the influence mechanism of more factors on surface roughness will be further studied to establish an accurate roughness model with more parameters and improve the machining quality.
Author contribution Juan Lu summarized the study and wrote the manuscript. Juan Lu, Xin Wang and Shaoxin Chen designed and carried out the experiment. Xiaoping Liao and Kai Chen guided the concept, direction and experiment. Juan Lu tested the results and analysed the data.

Data availability
The datasets and codes used or analysed during the current study are available from the corresponding author on reasonable request.

Declarations
Ethics approval and consent to participate The research of this paper does not involve human participants and/or animals.

Consent for publication
All the authors agreed to the publication of the paper.

Competing interests
The authors declare no competing interests.