A theoretical and deep learning hybrid model for predicting surface roughness of diamond-turned polycrystalline materials

Polycrystalline materials are extensively employed in industry. Its surface roughness significantly affects the working performance. Material defects, particularly grain boundaries, have a great impact on the achieved surface roughness of polycrystalline materials. However, it is difficult to establish a purely theoretical model for surface roughness with consideration of the grain boundary effect using conventional analytical methods. In this work, a theoretical and deep learning hybrid model for predicting the surface roughness of diamond-turned polycrystalline materials is proposed. The kinematic–dynamic roughness component in relation to the tool profile duplication effect, work material plastic side flow, relative vibration between the diamond tool and workpiece, etc, is theoretically calculated. The material-defect roughness component is modeled with a cascade forward neural network. In the neural network, the ratio of maximum undeformed chip thickness to cutting edge radius R TS, work material properties (misorientation angle θ g and grain size d g), and spindle rotation speed n s are configured as input variables. The material-defect roughness component is set as the output variable. To validate the developed model, polycrystalline copper with a gradient distribution of grains prepared by friction stir processing is machined with various processing parameters and different diamond tools. Compared with the previously developed model, obvious improvement in the prediction accuracy is observed with this hybrid prediction model. Based on this model, the influences of different factors on the surface roughness of polycrystalline materials are discussed. The influencing mechanism of the misorientation angle and grain size is quantitatively analyzed. Two fracture modes, including transcrystalline and intercrystalline fractures at different R TS values, are observed. Meanwhile, optimal processing parameters are obtained with a simulated annealing algorithm. Cutting experiments are performed with the optimal parameters, and a flat surface finish with Sa 1.314 nm is finally achieved. The developed model and corresponding new findings in this work are beneficial for accurately predicting the surface roughness of polycrystalline materials and understanding the impacting mechanism of material defects in diamond turning.

Polycrystalline materials are extensively employed in industry. Its surface roughness significantly affects the working performance. Material defects, particularly grain boundaries, have a great impact on the achieved surface roughness of polycrystalline materials. However, it is difficult to establish a purely theoretical model for surface roughness with consideration of the grain boundary effect using conventional analytical methods. In this work, a theoretical and deep learning hybrid model for predicting the surface roughness of diamond-turned polycrystalline materials is proposed. The kinematic-dynamic roughness component in relation to the tool profile duplication effect, work material plastic side flow, relative vibration between the diamond tool and workpiece, etc, is theoretically calculated. The material-defect roughness component is modeled with a cascade forward neural network. In the neural network, the ratio of maximum undeformed chip thickness to cutting edge radius R TS , work material properties (misorientation angle θ g and grain size d g ), and spindle rotation speed n s are configured as input variables. The material-defect roughness component is set as the output variable. To validate the developed model, polycrystalline copper with a gradient distribution of grains prepared by friction stir processing is machined with various processing parameters and different diamond tools. Compared with the previously developed model, obvious improvement in the prediction accuracy is observed with this hybrid prediction model. Based on this model, the influences of different factors on the surface roughness of polycrystalline materials are discussed. The influencing mechanism of the misorientation angle and grain size is quantitatively analyzed. Two fracture modes, including transcrystalline and intercrystalline fractures at different R TS * Authors to whom any correspondence should be addressed.
Original content from this work may be used under the terms of the Creative Commons Attribution 4.0 licence. Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI. values, are observed. Meanwhile, optimal processing parameters are obtained with a simulated annealing algorithm. Cutting experiments are performed with the optimal parameters, and a flat surface finish with Sa 1.314 nm is finally achieved. The developed model and corresponding new findings in this work are beneficial for accurately predicting the surface roughness of polycrystalline materials and understanding the impacting mechanism of material defects in diamond turning.

Introduction
Single point diamond turning (SPDT) technology plays an important role in the field of advanced manufacturing, e.g. high-accuracy optics, renewable energy instruments, and aerospace technology [1]. Polycrystalline materials are extensively employed in SPDT, and their surface roughness has a great impact on the service performance [2]. For instance, the scattering effect is usually observed if the surface roughness of a diamond-turned component is larger than a critical value, which further affects the optical performance [3]. Hence, it is important to develop an accurate surface roughness prediction and optimization model to acquire the best surface finish. Researchers have performed many excellent studies on surface roughness modeling. For instance, Liu and Melkote presented a model for predicting the surface roughness in the microturning of Al5083-H116 alloy that considered the effects of the plastic side flow, tool geometry, and process parameters [4]. They discovered that the work material side flow in relation to the strain gradient-induced strengthening effect is responsible for the rise in roughness at a low feed rate. Wang et al proposed an improved surface roughness prediction model considering the minimum undeformed chip thickness, material plastic side flow and precipitation effect [5]. They claimed that by considering the precipitation effect of Al6061, the prediction accuracy was remarkably improved by 26%. Zong et al considered the tool nose radius, minimum undeformed chip thickness, material spring back, material plasticity, etc, and developed a roughness prediction model [6]. A conservation law of the surface roughness model in the diamond turning process was therefore discovered. Yang et al created a three-dimensional finite element model for diamond turning of spherical surfaces [7]. Surface roughness is obtained by calculating the coordinates of the nodes on the topmost machined surface. Furthermore, Zhang et al performed a systematic investigation of tool-tip vibration in diamond turning [8]. Its influence on surface roughness generation was analyzed in detail and verified by cutting experiments.
As outlined above, great efforts have been made in the development of roughness models. However, when applying these models to predict the surface roughness of the polycrystalline materials of a diamond-turned component, prediction errors were always observed [9,10]. Researchers examined the diamond-turned surface and discovered that the work material grain boundary (GB) had a substantial impact on the prediction error, which was closely related to the anisotropy of the work material properties in the polycrystalline material [11,12]. Regarding this issue, Eda et al performed diamond turning experiments on a polycrystalline copper [13]. Based on the experimental results, they reported that step structures were observed on the grain boundaries, which were determined by the elastic modulus and grain crystallographic orientation. Moriwaki et al experimentally studied the machinability of polycrystalline copper with a single crystal diamond tool [14]. They pointed out that with a large maximum undeformed chip thickness h Dmax , the phenomenon of a step structure at grain boundaries (SSGB) was rather obvious on the diamond-turned surface. Brinksmeier et al experimentally investigated the height of the SSGB in diamond turning of pure copper [15]. They reported that the height of SSGB machined at 2000 m min −1 was smaller than that machined at 100 m min −1 , which implied that the cutting speed may affect the height of SSGB. Wang et al established a finite element model of orthogonal cutting of polycrystalline copper. A strong anisotropic machining characteristic, in terms of the machined SSGB, was successfully captured in the simulation of grain-by-grain cutting across a high-angle GB [16]. Tauhiduzzaman et al systematically investigated the effects of grain size and GB on surface generation during diamond turning [17]. They claimed that the GB roughness component was effectively eliminated by a severe strain hardening process.
In addition to the step structure, a protrusion structure was observed on the GB when diamond turned the alloy materials. For instance, Ding and Rahman studied the cutting mechanism of the polycrystalline aluminum alloy Al 6061 T6 using a single crystalline diamond microtool [18]. They claimed that the surface finish of aluminum is significantly influenced by the protrusion structure on the GB. He et al proposed a theoretical model to explain the structure patterns on the GB [19]. For alloy materials such as aluminum alloy Al6061, some strengthening elements are added into the material matrix to improve its mechanical properties. Because these strengthening elements are easily concentrated on the grain boundaries, Young's modulus on the GB area is larger than that on the interior area of the material grain. The high value of Young's modulus of the GB ultimately leads to the protrusion structure at the grain boundaries (PSGB). In contrast, for pure metal materials such as pure copper, no additional strengthening elements are added and concentrated on the GB. On this occasion, the impact of Young's modulus on the adjacent material grains plays the leading role, which further results in the SSGB [20].
Based on the aforementioned findings, researchers have noted that SSGB and PSGB on a diamond-turned surface have emerged as the primary barrier preventing the accomplishment of a superior surface finish [21]. However, in the current roughness prediction model, the influence of the GB is not comprehensively considered. In fact, SSGB/PSGB on a diamond-turned surface is affected by various factors, e.g. the maximum undeformed chip thickness, tool nose radius, cutting speed, grain size, etc [22]. Furthermore, due to the natural random distribution of the grain size and the crystallographic orientation, the height and shape of SSGB/PSGB vary for different material grains [23]. For instance, He et al developed an analytical model for PSGB on an aluminum alloy surface [19]. However, this model can only be applied for grain boundaries that have a rectangular or elliptical shape, which fails to account for the arbitrary nature of the GB shape. Crystal plasticity finite element (CPFE) simulation is another popular solution for modeling the GB effect in diamond turning. Wang et al successfully utilized the CPFE simulation to examine the influence of the misorientation angle and diamond tool sharpness with a bicrystal copper model [24]. However, this method can only obtain the simulation results on a limited number of material grains and misorientation angles. Hence, it is difficult to integrate SSGB/PSGB into a surface roughness prediction model with the current methods.
Recently, deep learning methods have been successively applied in manufacturing processes and material analysis, which show great potential in solving difficult-to-model problems with conventional methods. For instance, the real temperature distribution in the forming zone during electrically assisted double-sided incremental forming cannot be immediately measured. To estimate the forming temperature, Jiang et al suggested an artificial neural network framework using the surrounding temperature and toolpath data, which supplied crucial support for selecting optimum processing parameters [25]. The most popular method for extracting spatially resolved microstructural data from polycrystalline materials is electron backscattered diffraction (EBSD). Shen et al developed two convolutional neural network methods for the purpose of reconstructing crystal orientations from electron backscatter diffraction patterns [26]. Dai et al suggested combining an artificial neural network model with a viscoplastic self-consistent model based on physics to properly anticipate the material response of polycrystalline copper under complicated loading situations [27]. This model can accurately depict the highly nonlinear deformation behavior of pure copper under various processing settings, which is in line with the findings of the experiments. Sizemore et al investigated the association between processing parameters and surface roughness for polycrystalline copper/monocrystalline germanium using an artificial neural network [28]. For these two materials, there was a noticeable increase in the forecast accuracy of surface roughness compared to the traditional analytical models, demonstrating the applicability of artificial neural networks in the prediction of surface roughness. The dynamics of machining operations are still not fully understood because of the complexity of the machine tool structure and the cutting process. To predict the surface roughness during turning operations, Jiao et al created a fuzzy adaptive network, which demonstrated a substantial capacity for learning under challenging turning circumstances [29].
Deep learning methods have achieved great success in solving problems that are usually difficult with conventional methods. Therefore, to accurately predict the surface roughness considering the impact of SSGB/PSGB, we propose a theoretical and deep learning hybrid model. In this model, the kinematic-dynamic roughness components in relation to diamond tool duplication, material plastic side flow/spring back, etc, are calculated with a conventional analytical method. In addition, the material-defect roughness component, including SSGB/PSGB, is modeled by a cascade forwards neural network. With this hybrid model, the surface roughness model of the diamond-turned polycrystalline material is developed. A case study using pure copper as the work material was performed to test the prediction accuracy. Based on this developed model, we studied the influencing factors on the materialdefect roughness component in detail. Moreover, optimal processing parameters are obtained with a simulated annealing algorithm (SAA). The findings in this study are useful for quantitatively understanding the influence of the SSGB on the surface roughness of diamond-turned components and obtaining a better surface finish.

Kinematic-dynamic roughness component
According to the findings of a prior research [9], the surface roughness of polycrystalline materials in diamond turning is influenced by four different types of components, including kinematic, dynamic, work material defect, and ambient conditions. The work material's plastic side flow, spring back, and tool profile duplication all have an impact on the kinematic roughness component. The relative vibration between the workpiece surface and the diamond tool has an impact on the dynamic roughness component. The roughness caused by imperfections in the work material matrix is referred to as the work material-defect roughness component. The work material's GB has the most impact on the material-defect roughness component. For instance, pure metal materials (e.g. pure copper) are free of hard inclusions due to the absence of strengthening elements. Therefore, SSGB/PSGB is the leading source of material-defect component. Meanwhile, for metal alloy materials, such as Al 6061, the hard inclusion inside the matrix of the material also affects the surface finish that is attained. The working temperature variation, outside vibration, etc, are included in the ambient condition roughness component. In this work, the ultraprecision machine tool is placed in a clean room with vibration isolation and a constant temperature environment. Thus, the influence of the ambient condition factor can be neglected in this surface roughness model. As depicted in figure 1(a), the pure blue profile represents the kinematic-dynamic roughness component, which is calculated with an analytical model in this work. In the circled area, a rise in the blue area on the GB on the machined surface occurs, which results in a work material defect roughness component. According to the previous investigation result [19], the achieved surface roughness is the summation of the kinematic-dynamic roughness component and material-defect roughness component. Therefore, the total average surface roughness Sa for a polycrystalline material is as follows: where Sa KD and Sa MD represent the kinematic-dynamic roughness component and material-defect roughness component, respectively. The microdefects on the cutting edge, i.e. tool edge waviness, have an impact on the achieved surface roughness [30]. In this work, to avoid the influence of tool edge waviness variation, waviness-controlled diamond tools are employed in diamond turning experiments. The quantitative evaluation for the waviness-controlled diamond tool will be introduced in section 3.2. To obtain the kinematic roughness component, the surface profile model S(x) at one feed rate should be established. The surface profile S(x) is divided into two parts, i.e. S 1 (x) and S 2 (x). S 1 (x) is related to the tool profile duplication effect, whereas S 2 (x) is related to the work material spring back and plastic side flow. The coordinate configuration is depicted in figure 1(b). The position of the diamond tool tip, i.e. the center position in one feed rate, is designated as the origin. The x-axis is in the feed direction, and the y-axis is in the height direction.
Under this condition, the duplication profile of the diamond tool on a work material surface at one feed rate is expressed as follows [31]: where r ε is the tool nose radius and f is the feed rate per revolution. The plastic side flow and spring back on a diamond-turned surface are closely associated with the mechanical properties of the work materials, e.g. Young's elastic modulus and hardness. Previous investigations have demonstrated that due to the coupled effect of these two factors in one feed rate, the surface profile component follows the parabolic form [19], as follows: where w and s are the values of the plastic side flow and material spring back at the border and center positions, respectively, in one feed rate.
Combining the theoretical results of equations (2) and (3), the kinematic surface profile at one feed rate is calculated as follows: To establish the model of the kinematic surface profile, the material plastic side flow and spring back should be obtained. The value of plastic side flow is obtained via the following formula [32,33]: where k d , k t and k f are the size coefficient, tool nose correction coefficient, and feed rate correction coefficient, respectively. Detailed calculation processes of the three parameters are depicted in [33]. h Dmin is the minimum undeformed chip thickness, which has a great impact on the formation of the cutting chip and surface roughness. The minimum undeformed chip thickness is calculated as follows [6]: where c is a coefficient in relation to the contact status between the diamond tool and work material. For instance, c is 0.35 for pure copper [6]. For other kinds of work materials, e.g. aluminum alloy and steel, the detailed calculation and measurement process for this coefficient has been depicted in [34]. r n is the cutting edge radius. In diamond turning, the nominal contact length between the diamond tool and work material b D , which only accounts for the geometrical relationship, can be obtained as follows [35]: where a p is the cutting depth in diamond turning. In addition to the minimum undeformed chip thickness, the maximum undeformed chip thickness is also calculated due to its impact on the GB roughness component. In this work, the maximum undeformed chip thickness is acquired by solving the following formula [35]: The material spring back is closely associated with the tool cutting edge radius, work material mechanical properties and contact stress between the diamond tool and work material. In this work, the spring back of the work material is divided into two categories: a uniform part and a nonuniform part. The uniform part of the material spring back is in the kinematic component of roughness, which is calculated according to the classic mechanics of materials. The nonuniform part is closely associated with the GB effect, which is further modeled by the deep learning method. The average contact stress between a diamond tool and work material was estimated as follows [36]: where k σ is a linear coefficient, which is equal to 4.1 for copper and aluminum alloy Al6061. For the other work material, a thorough explanation of how this coefficient was determined has been shown in [36]. H and E are the hardness and Young's elastic modulus of the work material without any treatment, respectively. The values of these two mechanical parameters are 0.98 GPa and 95.28 GPa, which were determined by a subsequent nanoindentation experiment. The work material under the extrusion effect of the diamond tool's flank face is in a plastic deformation state (ε ⩾ ε y , ε y is the yield strain). Hence, the power law of the true stress/true strain relationship is introduced, which is expressed as follows [37]: where K is the strength coefficient and is calculated as follows: ε is the total strain on the plastic deformation condition, which is the sum of the yield strain and plastic strain, as follows: n is the work hardening exponent and is set to 0.466 for copper. The hardening exponent value for the other work material may be determined using the nanoindentation experiment [38]. In general, the yield strength of the work material is estimated by the following equation [39]: Therefore, the yield strain of the work material under this condition is calculated as follows: The uniform part of the material spring back is calculated as follows: where ε p is the plastic strain. Summarizing the theoretical results in equations (9)-(15), the uniform part of the material spring back is calculated as follows: By substituting equations (5) and (16) into equation (4), the kinematic surface profile model is established. In addition to the kinematic component, the dynamic component should also be given adequate attention when the motion error of the spindle is larger than 20 nm [19]. As indicated in figure 2(a), the coordinate system is promoted to a cylindrical coordinate system (ρ, θ, z) considering the influence of relative vibration between the diamond tool and workpiece surface. The center of the workpiece surface is designated as the coordinate system's origin. The polar coordinate axis ρ is located in the feed direction, while the z-axis is located in the height direction. The trace of the diamond tool tip is an Archimedes spiral with blue color in figure 2.
For a given point B on the workpiece surface, its position is between B m and B M , where B m and B M are two points on the diamond tool tip trace, as indicated in figure 2(b). On line OB, the offset length of the diamond tool tip in one feed rate OA The number of feed rate per revolution f from point A to point B m is expressed as where ⌊a⌋ is the round down operation for the variable of a, i.e. finding the largest integer that is not greater than a. For instance, ⌊3.7⌋ obtains 3 with this operation. Correspondingly, the number of feed rate per revolution f from point A to point B M is Under this condition, the equivalent coordinate of point A in terms of point B m is determined as Similarly, the equivalent coordinate of point A in terms of point B M is determined as The z-axis relative vibration between the diamond tool and workpiece surface has a significant impact on the surface roughness [40]. Hence, the relative vibration is represented as where A k is the amplitude of the k th harmonic and f k and φ k are its vibration frequency and initial phase, respectively. Their values may be acquired by the accelerometer installed on the machine tool. Hence, the height coordinate induced by the diamond tool at point B m is Similarly, the height coordinate induced by the diamond tool at the point B M is where t m and t M are the times at which the diamond tool tip arrives at point B m and B M , respectively. Therefore, the height coordinate at point B is the minimum value between z m and z M, as shown in figure 2(c), which is calculated as [19]   The mean value of the surface profile with the feed rate f is obtained as [41] where Σ represents the diamond turning area with feed rate f.
The kinematic-dynamic roughness component is computed as Furthermore, if the motion error of the spindle is less than 20 nm, the impact of relative vibration can be neglected [19]. Under this condition, the kinematic-dynamic roughness component can be simplified as the kinematic roughness component. Hence, the mean value of the kinematic surface profile at one feed rate is obtained as follows: Correspondingly, the kinematic-dynamic roughness component is finally calculated as follows: where Ra K represents the linear surface roughness along the feed direction.

Material-defect roughness component
In this work, a deep cascade forward neural network is applied to model the material-defect roughness component, which is a classic deep learning method. A cascade forward neural network is a multilayer feed-forward network composed of an input layer, hidden layer and output layer, as depicted in figure 3. Furthermore, a connection from the input variable to the output layer is also established, which effectively improves the learning efficiency and prediction accuracy of the network compared with those of a conventional feed forward neural network [42].
The learning process is divided into two steps, i.e. the forward propagation of the input data and backpropagation of the output error. The backpropagation error is applied to obtain the values of the transfer matrix elements in the network. Previous investigations have demonstrated that a three-layer neural network is sufficient to approach any nonlinear function [43]. Hence, a three-layer cascade forward neural network is selected to model the GB roughness component Sa d . The activation functions of the hidden layer and output layer are configured as the sigmoid function and linear function, respectively. Based on previous academic achievements on the GB effect, the main influencing factors are divided into four categories [17][18][19][20], including the ratio of maximum undeformed chip thickness to cutting edge radius (R TS ), average grain size (d g ), spindle rotation speed (n s ), and misorientation angle (θ g ). The smallest rotation angle among the corresponding rotations connecting two given crystal orientations is the misorientation angle between two adjacent grains, which is commonly employed to describe the GB geometry. A small misorientation angle means a small difference in the mechanical properties of two adjacent grains. Earlier findings have shown that SSGB/PSGB is closely associated with the misorientation angle [3,15]. Hence, these four variables are selected as the input layer variables.
The ratio of the maximum undeformed chip thickness h Dmax to the cutting edge radius r n is calculated as follows: For a cascade forward neural network with four input layers, the input variable matrix is expressed as follows: where Q represents the group number of the input variables. According to equation (31), there are Q groups of input experiment results, and each group contains four values.
Similarly, corresponding to the input variable matrix, the output variable matrix is expressed as follows: Before entering the hidden layer, the input and output matrices first undergo a normalization process. For instance, for the 1st row in matrix R TS , the normalization value of the i th R TS is calculated as: where R TS-min and R TS-max are the minimum and maximum values of R TS in the input matrix, respectively. With this process, the elements in the input and output matrix are transformed into dimensionless quantities ranging from −1 to 1. After the normalization process, Sa do is transformed into Sa d .
The transfer process between the input layer matrix and hidden layer matrix is shown as follows: where W h1 and B h are the weight and threshold matrices in the hidden layer, respectively. U is the normalized matrix corresponding to input matrix U o . X h is the hidden layer matrix. The weight matrix is an S × 4 matrix, which is expressed as follows: where S is the layer number of the hidden layer. Meanwhile, the threshold matrix is an S × 1 matrix and is expressed as follows: In particular, the operation ⊕ is suitable for the addition of different sizes of matrices. For instance, in equation (34), W h1 U is an S × Q matrix. Therefore, the S × 1 threshold matrix is first expanded into an S × Q matrix by the column elements, and then the general matrix plus operation is performed.
With the activation function in the hidden layer, the output of the hidden layer is an S × Q matrix, as follows: where f h (x) is the sigmoid function in the hidden layer and is expressed as follows: Similarly, the data transfer from the hidden layer to the output layer, and the weight matrix and threshold matrix are also employed as follows: where W o and W h2 are 1 × S and 1 × 4 weight matrices, respectively, and B o is a 1 × Q threshold matrix. Subsequently, with the linear activation function, the output matrix is as follows: Sa o is the calculated value with this neural network, and f o (x) = x. After obtaining the output values, the mean error is calculated as follows: where ∥Sa o − Sa d ∥ is the norm of the difference between the two matrices Sa o and Sa d . The values of the weight matrices and threshold matrices are iteratively optimized with the Levenberg-Marquardt algorithm until the mean error is as small as possible. This iterative optimization is the training process for this cascade forward neural network. With the trained neural network, the output matrix Sa o also undergoes an inverse-normalization process relative to equation (33), and the actual values of the GB roughness component are finally obtained.
With this cascade forward neural network, the calculation model for the GB roughness component is established. Furthermore, the following empirical formula is usually recommended for the selection of the number of hidden layers [44]: where m (=4) and n (=1) are the numbers of input layers and output layers, respectively, and α is a constant varying from 5 to 10.
To clearly show the calculation process of this hybrid surface roughness model, a flowchart is depicted in figure 4. The essential input parameters in this model are classified into three categories, i.e. processing parameters, diamond tool parameters, and work material parameters. The processing parameters include feed rate per revolution (f ), cutting depth (a p ) and spindle rotation speed (n s ). The diamond tool parameters include cutting edge radius (r n ) and tool nose radius (r ε ). Additionally, the work material parameters include Young's modulus (E), hardness (H), average grain size (d g ), and average misorientation angle (θ g ).
To employ this theoretical and deep learning hybrid prediction model, a certain amount of diamond turning experiments should be first performed, and the surface roughness Sa is measured. In addition, the kinematic-dynamic roughness component Sa KD with identical conditions is calculated with the kinematic-dynamic module surrounded by red lines in figure 4. The material-defect roughness component is decoupled by subtracting the kinematic-dynamic To predict the surface roughness Sa with this kind of work material, the kinematic-dynamic roughness component is calculated by the kinematic-dynamic module, and the materialdefect roughness component is predicted by the trained deep learning model. The prediction result is ultimately acquired by summing the results from the two modules. However, when the work material is changed, there are two cases for application of this model. For the first case, the mechanical parameters of the new work material (including Young's modulus and hardness) are approximate to those of the former work material, and this hybrid model can be immediately applied. For the second case, the mechanical parameters of the new work material are far different from those of the former work material, and the same training process in figure 4 should be performed again.
With the above process, a new surface roughness prediction model for polycrystalline materials has been established. In particular, only when the impact of relative vibration and material defects are limited, the prediction model can be validated by the 2D line roughness measurement results. Otherwise, it is appropriate to select the 3D surface roughness result to validate this model because the impact of relative vibration and material defects cannot be comprehensively reflected on this condition.

SAA
In this work, a SAA is applied to obtain the optimal processing parameters based on the constraint conditions of the processing parameters. In this work, the average surface roughness value is configured as the objective function. The optimal flowchart for SA is shown in figure 5. As depicted, at the starting stage (i.e. the heating period in SAA), an initial solution P 0 is first generated in the range of the constrained conditions. The iteration number is set to zero, and the initial temperature is T 0 . T 0 is set to 100 in this work. Subsequently, during the annealing period, a new solution P 1 is generated and compared with the previous solution P 0 . In fact, the values of the average surface roughness Sa of the two parameters are calculated, i.e. Sa(P 0 ) and Sa(P 1 ). The difference in the surface roughness values of these two parameters is calculated as ∆Sa = Sa(P 1 )−Sa(P 0 ). If the value of ∆Sa is less than zero, the new solution P 1 is accepted. Otherwise, the new solution P 1 is conditionally accepted; i.e. it is accepted if the following condition is satisfied [45]: where δ is a randomly generated number that varies in [0, 1] at each iteration step and T is the current temperature. If not accepted, the solution remains at P 0 . Subsequently, a new solution satisfying the constraint conditions is generated and iterated with a similar process.
If the maximum number of iterations (configured as 1000 in this work) is reached, the SAA termination condition is checked. In this work, if the surface roughness values Sa obtained for two adjacent groups of processing parameters P k and P k+1 are less than 0.01 nm, the optimization process is terminated, and the optimal processing parameter is P k+1 . Otherwise, the temperature is reduced according to the following rule (i.e. cooling period in SAA): where θ T is the reduction coefficient in this work and equals 0.95. With the continuous annealing and cooling stage, the optimal processing parameters are finally acquired.

Preparation and analysis of the work material
In this work, to establish the model of the material-defect roughness component, a work material that has different grain sizes and misorientation angles is essential. To fulfill this requirement, pure copper materials are processed by friction stir treatment technology, which is able to achieve different material microstructures at different depths [46]. The friction stir tool is made of H13 die steel (4Cr5MoSiV1), which has a high toughness and hardness. A previous investigation [47] revealed that a very small percentage of the friction stir tool's elements (<0.1%) were observed on the top surface after processing, and the highest penetration depth was approximately 5 nm. Therefore, it is possible to ignore the influence of the friction stir tool's elements in this work. As depicted in figure 6, the radius of the copper working material is 50 mm. The friction stir processing area on the work material surface has a radius between 8 mm and 36 mm. In our friction stir processing, the machining depth and tilt angle for  the friction stir tool were 0.1 mm and 2 degrees, respectively. The friction stir tool revolves around the center of the copper surface at a speed of 300 mm min −1 . Meanwhile, the friction stir tool rotates around its own center with rotation rates of 400 rpm, 800 rpm, and 1600 rpm. In this work, the work material with no treatment is defined as material A. The materials processed with rotation speeds of 400 rpm, 800 rpm, and 1600 rpm are defined as materials B, C and D, respectively. After friction stir processing, the rough processed surfaces of materials B, C and D as well as material A are pre-flattened with a cutting depth of 0.1 mm. The cutting depth is equal to the machining depth of friction stir processing, which can retain the processed work material.
After preparation of the work materials, material analysis was performed. Mechanical characteristics analysis of material A was performed on a Hysitron TI-Premier nanoindentation instrument. To accurately evaluate the mechanical characteristics of the work material, four positions on the work material were randomly selected. The average values acquired at the four positions were the final measurement results. One of the nanoindentation curves is depicted in figure 7(a). The average values of hardness and Young's elastic modulus of pure copper without treatment were 0.98 GPa and 95.28 GPa, respectively. The microstructure of the work material is analyzed by EBSD technology integrated into a JSM-7800F scanning electron microscope. The SEM measurement process of work material B is depicted in figure 7(b). The scanning was performed from the topmost part of the copper and extended in the depth direction.
As depicted in figure 8(a), the work material grains were randomly distributed, and some of the grain sizes were rather large. Hence, under this condition, the measurement range of material A was configured as 300 µm × 300 µm. Furthermore, the grain size and misorientation angle distributions in this total area were counted and calculated, as depicted in figures 8(b) and (c), respectively. According to these measurement results, the average grain size and misorientation angle were determined to be 50.79 µm and 40.53 • , respectively.
For working materials B to D, the measurement range was 100 µm × 100 µm to obtain more detailed information on the microstructure. As demonstrated in figure 9(a), in material B, obvious gradient-distributed copper grains along the depth direction are observed. To clearly evaluate grain sizes and misorientation angles at different depths, their distributions are measured at each ten micrometer layer. The sampling length of 100 µm used in this procedure ensures that a sufficient number of work material grains are assessed in the sample region, as revealed by earlier investigations [48]. The average grain size and misorientation angle for each layer were acquired as the input layer values in the subsequent neural network model. Figures 9(b) and (c) depict the grain size and misorientation angle distributions for the first ten micrometered layer, which were obtained from the area surrounded by the black dashed lines in figure 9(a).

Preparation of diamond tools
In this work, five waviness-controlled diamond tools were employed in cutting experiments. The rake angle and flank angle of the diamond tools were 0 • and 9 • , respectively. The criterion of the waviness-controlled diamond tool is based on the standard deviations of the tool edge waviness within the opening angle of −4 to 4 degrees according to an earlier finding [25]. The measurement results of tool edge waviness for diamond tool 1 and 2 with opening angle of −4 to 4 degrees are shown in figures 10(a) and (b). In particular, the threshold values of the standard of a waviness-controlled diamond tool are configured as 60 nm at r ε ⩾ 0.1 mm and 30 nm at r ε < 0.1 mm. As shown in table 1, the waviness results of the five diamond tools all fulfill the requirement of a waviness-controlled diamond tool.
Furthermore, the tool cutting edge radius was measured by atomic force microscopy (AFM). Figures 10(c) and (d) depict the 3D surface topography and 2D sectional view measurement results for diamond tool 2. Five different positions on the 3D image were selected to obtain the 2D image. The radius of the least square circle, i.e. the green circle, in the 2D image was calculated in figure 10(d). In fact, the measured sectional profile of the cutting edge is the convolution of the probe tip geometry and the tool cutting edge, i.e. the radius of the green circle (r m ) in figure 10(d) is the sum of the cutting tool edge radius (r n ) and the AFM probe tip radius (r afm ) [49]. In this work, a new silicon tip with a sharp apex was employed in the measurement process, and its nominal radius of 8 nm was provided by the AFM tip manufacturer [50]. Therefore, the average value of 5 radii from the measured 2D sectional profile was first obtained, and the cutting edge radius of the diamond tool was further determined by subtracting the AFM probe tip radius (8 nm) from the calculated average value.

Configuration for cutting experiments
Face turning experiments were performed on a Precitech Nanoform-X Ultra machine tool, as depicted in figure 11. Materials A-D were selected as the work materials. To reduce the influence of diamond tool wear on surface roughness, two measures were taken in the experiments. The first measure was the division of the cutting area. In detail, seven areas with different radii were configured on the work material, i.e. 0-8 mm,  figure 6, were friction stir processed, and the remaining areas did not receive treatment. It should be noted that the variation of material microstructure on the boundary of the processed area (i.e. 8 mm and 36 mm) is complex. Therefore, an appropriate distance, i.e. 2 mm, was configured between the measurement area and the boundary to avoid this impact. In these seven division areas, the feed rate per revolution values varied, while the cutting depth and spindle speed values were the same. In addition, after diamond turning of one face, the diamond tool was rotated by a tiny angle, and the adjacent cutting edge was used on the next face turning. The built-up edge may increase with the cutting distance and cutting speed at low spindle speeds (<1000 rpm). However, it is beneficial to eliminate the formation of built-up edges with a short cutting distance. In this work, the maximum cutting distance for one feed rate value is only 1.3 km, which can effectively reduce the formation of the built-up edge. Figure 11(b) shows the measurement results of the cutting edge of diamond tool 2 after the cutting experiments, where the red circled area is the cutting edge engaged in the cutting experiments. There are only some small breakage parts and no obvious built-up edge adhered to the cutting edge. Therefore, the impact of built-up areas is not discussed in this work. In addition, the processing parameter configurations are listed in table 2, whose ranges cover the common ranges of these parameters in diamond turning. Rigorous dynamic balance operation was performed in each group of experiments to ensure that the motion error of the spindle was less than 10 nm. Under this condition, the influence of relative vibration between the diamond tool and workpiece surface was also neglected according to the above discussions.
The roughness of the diamond-turned surface was measured with a ZYGO 9000 Newview white light interferometer. The sampling area was 868 µm × 868 µm, which ensured sufficient surface roughness information over a large area. Three sampling positions for each group of processing parameters were selected, and the average value at these three positions was taken as the measurement result. The diamond tools, processing parameters, work material parameters, and

Training process of the neural network
The decoupling of the material-defect roughness component and the corresponding training process follows the guidelines in figure 4. Specifically, after obtaining the surface roughness value Sa, the kinematic roughness component was calculated based on the theoretical model established in section 2.1. According to equation (1), the measurement results of the material-defect roughness component were obtained by subtracting the kinematic roughness component from the measured roughness Sa, which was further configured as the output layer of the neural network model. As discussed above, four variables, i.e. ratio of the maximum undeformed chip thickness to cutting edge radius (R TS ), average grain size (d g ), misorientation angle (θ g ), and spindle rotation speed (n s ), were configured as the input layer. In this neural network, the total input-output data were divided into two sets, including a training set and a validation set. The training set was employed to obtain the parameters in the weight and threshold matrices. The validation set was employed to validate the accuracy and performance of the developed neural network. In our investigation, cutting experiments performed with diamond tools 1, 2 and 4 were configured as the training set. Cutting experiments performed with diamond tool 3 were used as the validation set. Moreover, diamond tool 5 was employed to perform the cutting experiment with optimal parameters.

Validation of the proposed model
According to equation (42), the number of hidden layers ranges from 8 to 12. To quantitatively evaluate the simulation performance of the cascade forward neural network, four indices were introduced, including the multiple determination coefficient (R 2 ), root mean square error (RMSE) [43], relative prediction error (ε r ), and total simulation time (T s ). The value of the multiple determination coefficient varies between 0 and 1. A value close to 1 means that the prediction accuracy of the neural network is high. Moreover, for the RMSE and relative prediction error, values close to 0 indicate high prediction accuracy of the developed model. The expression of the relative prediction error is depicted as follows: where Sa k-me and Sa k-pre are the k th measurement and prediction result of surface roughness, respectively. The effect of the number of hidden layers on the cascade forward neural network performance is shown in table 3. As depicted in table 3, the cascade forward neural network with ten hidden layers achieves the best prediction performance with a short simulation time. Hence, the number of hidden layers is set to 10. The values of the weight and threshold matrices employed in this work are depicted in appendix. The difference between the measurement values and prediction values, i.e. prediction error (prediction error = measurement value − prediction value), for the training set and validation set are shown in figure 12. As depicted in figure 12, the prediction errors of both the training set and validation set follow a Gaussian distribution. The mean value and standard deviation of the prediction error for the training set are 0.003 nm and 0.040 nm, respectively; while the corresponding values for validation set are −0.002 nm and 0.063 nm, respectively. The uncertainty of surface roughness measurement results is where t p is a correction coefficient and configured as 1.96; σ is the standard deviation of the measurement results; n is the number of measurements; u B is the uncertainty in relation to the measurement instrument, which is configured as 0.1 nm provided by the instrument manufacturer. According to equation (46), the uncertainty of surface roughness measurement result is 0.1 nm, indicating that the measurement instrument is the primary source of the uncertainty for the measurement result. Overall, the small values of the above calculation results clearly demonstrate that the prediction accuracy of the developed model is high.
To further show the accuracy of the prediction model and demonstrate the introduction of the material-defect roughness component, the kinematic-dynamic roughness component Sa KD , material-defect roughness component Sa MD , prediction roughness result (i.e. the summation of Sa KD and Sa MD ), and measurement roughness results are depicted in figure 13. In figure 13(a), the kinematic-dynamic roughness component is also the prediction result of the average surface roughness Sa with a previous roughness model proposed in [33]. As revealed in figure 13(a) and [33], the previous model fails to predict the accurate value of surface roughness with a large grain size. In contrast, after introduction of the material-defect roughness component, a high-accuracy prediction model is acquired and highly consistent with the measurement results, as demonstrated in figure 13(c). Furthermore, as depicted in figure 13(b), with the decrease in feed rate per revolution, the kinematic-dynamic roughness component and material-defect roughness component all show a downwards trend. However, the decreasing rate of the material-defect roughness component relative to the feed rate per revolution is obviously higher than that of the kinematic-dynamic roughness component, which implies that the small feed rate is the favorable condition for reducing the impact of the step structure on the GB. This finding is also consistent with earlier studies on coarsegrained polycrystalline ZnSe [3].
In summary, the developed theoretical and deep learning hybrid model accurately predicted the surface roughness of polycrystalline materials, which obtains a high prediction accuracy compared with previous pure theoretical model. In the following section, a comprehensive quantitative study on the SSGB impact of pure copper is performed with this developed model.

Influence of material characteristics
The aim of developing the model in this work is not only to accurately predict the surface roughness but also to analyze the factors that affect the material-defect roughness component. The material-defect roughness component is further configured as the GB roughness component for pure copper, as discussed above. Here, we first analyze the influence of material characteristics, including grain size and misorientation angle, on the GB roughness component. The simulation results of the GB roughness component varying with the misorientation angle and grain size are depicted in figure 14. In the simulation process, the processing parameters are configured as follows: cutting depth a p = 5 µm, feed rate f = 3 µm rev −1 , and spindle rotation speed n = 2400 rpm. The grain size and misorientation angle ranges are set to 4-52 µm and 19-42 • ., respectively, which cover the work material characteristic parameters employed in this work.
As depicted in figures 14(a) and (b), with increasing misorientation angle, the GB roughness component monotonously increases. However, with regard to grain size, a different variation trend is observed. For instance, when the misorientation angle is small, e.g. 20-25 • in figure 14(b), with increasing grain size (less than 20 µm), the GB roughness component first presents an increasing trend. Subsequently, upon further increasing the grain size (larger than 30 µm), a decreasing trend for the GB roughness component is demonstrated. Conversely, with a large misorientation angle, e.g. 36 • , a monotonously increasing trend is shown. The observation regarding the variation trend of the GB component with grain size is different from conventional viewpoints, i.e. the GB roughness component monotonously decreases with grain size.
To further understand the above complex variation phenomenon, the influencing mechanism of the misorientation angle and grain size should be analyzed. A small misorientation angle value results in a slight change in the mechanical characteristics of the two adjacent grains, as stated above. Hence, with the decrease in the misorientation angle, the GB roughness component correspondingly decreases. This conclusion can be validated from the turning experiment results for polycrystalline and single-crystal work materials. Because the misorientation angle of the single-crystal work material is nearly zero, the surface roughness of the single-crystal material is smaller than that of the polycrystalline material under the same cutting conditions [51].
In contrast, according to the Hall-Petch effect, the grain size of the work material has a great impact on its mechanical properties, e.g. hardness and elastic modulus. With increasing grain size, both the hardness and elastic modulus decrease. Correspondingly, the height of the SSGB enlarges and further increases the GB roughness component [22]. In fact, in finegrained work material, the plastic deformation is more uniform than that of coarse-grained material, which is favorable for reducing the effect of SSGB on surface roughness. Meanwhile, the increase in grain size means that the work material grain number decreases. Therefore, the number of SSGB decreases, which further decreases the average value of the GB roughness component in a given sampling area. With the joint influence of the above two effects, the GB roughness component presents a complex variation trend with a small misorientation  angle. This complex variation in the GB roughness component is also consistent with previous experimental investigation results [52]. However, with the increase in the misorientation angle (e.g. 34 • in figure 14(b)), the influence of the misorientation angle significantly promotes the first effect, i.e. increasing the height of the SSGB, which further leads to a monotonous increase in the GB roughness component.
To further validate the above analysis, the surface roughness measurement results under the same cutting conditions (r ε = 1.014 mm, a p = 5 µm, f = 4 µm rev −1 , and   figure 15. The corresponding results for the misorientation angle, grain size, and average surface roughness are depicted in table 4, where the kinematic-dynamic roughness component Sa KD is also the surface roughness prediction result calculated with a conventional model in [33], which is inconsistent with the measurement results. In contrast, the results acquired with the hybrid model accurately predict the surface roughness, which demonstrates the necessity of the introduction of a material-defect component. In figure 15(a), the surface roughness of work material A without treatment was 3.638 nm, which was the largest among the four groups of work materials. Obvious SSGBs were observed on the machined surface, e.g. the encircled area shown in figure 15(a). Figures 15(b)-(d) show the surface topography measurement results of work materials B, C and D, respectively. As shown, there was a noticeable reduction in SSGB on the machined surface. The grain sizes of materials B and D in figures 15(b) and (d) were similar, and the misorientation angle of material B in figure 15(b) was larger than that of material D in figure 15(d). Hence, the surface roughness in figure 15(b) was larger than that in figure 15(d), which definitely confirms the influence of the misorientation angle on the GB roughness component. Additionally, the grain size and misorientation angle of work material B are smallest among the four work materials, and its grain size is smaller than 20 µm. Hence, its surface roughness is smallest among the four work materials. In summary, to reduce the influence of SSGB in diamond turning of polycrystalline materials, it is appropriate to reduce the value of the misorientation angle and select a suitable range of grain sizes.

Influence of the ratio of maximum undeformed chip thickness to cutting edge radius R TS
Previous investigations have shown that R TS has a great impact on the material removal process, which further affects the achieved surface finish [53]. In this work, we simulate the influence of R TS on the GB roughness component in figure 16. The measurement results are obtained from the validation set. The misorientation angles and grain sizes for the four materials are the same as the results in table 3. The spindle speed is also set to 2400 rpm. As demonstrated, with the decrease in R TS , the GB roughness components all presented a linearly decreasing trend, which is consistent with previous investigation results [6]. However, the linear slope of work material A is obviously larger than that of the other three work materials, and the three linear slopes of work materials B to D are similar.
To reveal the underlying mechanism for the large linear slope of material A, the surface topographies of the diamondturned surface of work material A at different R TS values were measured. Figure 17 depicts the surface topography of work material A at an R TS of 26.034. Under this condition, obvious large holes are observed on the diamond-turned surface, which is consistent with Moriwaki's experimental results [14]. Figure 17(b) depicts the shape of one classic hole on the surface under 2D conditions. Figure 17(c) is the sectional view acquired from the area marked by the black line in figure 17(b). In figure 17(c), the depth of the hole is approximately 37 nm, and the horizontal length is approximately 200 µm. Furthermore, the shape of the hole is obviously different from the ordinary SSGB, as depicted in figure 15(a), i.e. two oblique boundaries gradually extend from the bottom to the valley area. Instead, the sectional view of the hole in figure 17(c) is consistent with the shape of the work material grain in figure 8(a). Figure 18 depicts the surface topography measurement results at a smaller R TS , i.e. 15.7782. As demonstrated, large holes are no longer observed on the machined surface. Instead, obvious SSGB is observed. A sectional view of SSGB is shown in figure 18(c). Different from the shape in figure 14(c), two straight boundaries extended from the bottom to the valley, which is the classic topography of an SSGB on a diamondturned surface. Furthermore, the depth of the step structure is approximately 10 nm, which is consistent with the previous measurement values achieved by Ding et al [20].
In contrast, for work materials B-D, no obvious large holes were observed on the diamond-turned surface with a large R TS value. For instance, the measurement results of the diamondturned surface with work material C at an R TS of 26.0340 are depicted in figure 19. As demonstrated, only a few small SSGBs are observed on this diamond-turned surface. In summary, the large holes and SSGBs that exist on the diamondturned surface further result in the large slope of material A in figure 17.
To further understand the different surface topography phenomena with the same R TS value, the fracture modes of the grain boundaries were analyzed. In diamond turning, work material fracture occurs during the work material removal process. In pure copper, the work material matrix is free of hard inclusions due to the absence of strengthening elements. Therefore, the large holes on the diamond-turned surface cannot be attributed to breaking off of the hard inclusions in the material matrix. In fact, hard inclusions are usually observed in metal alloy materials such as Al 6061 [19]. Under this condition, the work material fracture mode is classified into two categories, i.e. transcrystalline fractures and intercrystalline fractures. For instance, in figure 20, different colored areas represent material grains with different crystallographic orientations. In particular, the strength of the GB area has a great impact on the fracture mode. Material analysis has shown that for the polycrystalline work material without a strengthening treatment, the material strength at the GB is usually lower than that inside the grain [54].
As demonstrated in figure 20(a), under the large R TS (h Dmax /r n ) condition, the stripping effect induced by the cutting edge is stronger than the extrusion effect of the flank face. Hence, in diamond turning with a large R TS value (e.g. R TS = 26.034) and material A, intercrystalline fracture occurs at some low-strength GB and further results in large holes on the diamond-turned surface, as shown in figure 17. In contrast, with a small R TS value, as demonstrated in figure 20(b), the equivalent negative rake angle of the diamond tool gradually increases, which results in enhancement of the extrusion and burnishing effect induced by the flank surface of the diamond tool [55]. Under this condition, transcrystalline fractures dominate the material removal mode of material A, which further results in SSGB, as demonstrated in figure 18. In addition, for a work material with friction stir processing (strengthening effect), under the high pressure of the friction stir tool,   In summary, the strengthening effect on the GB and intercrystalline/transcrystalline fractures occurring with a large R TS value leads to a higher linear slope of the GB roughness component for work material A.

Influence of spindle rotation speed
To reveal the influence of spindle speed, we simulate variations in the GB roughness component at different spindle rotation speeds (500-3000 rpm) and feed rates (3-6 µm rev −1 ). As depicted in figure 21, with increasing spindle rotation speed, the GB roughness components present decreasing trends. The decreasing line is similar to an inversely proportional curve, which is consistent with the previous experimental results [23].
This inversely proportional trend can be roughly understood, as demonstrated in figure 22. For a work grain with diameter d, the contact time between a diamond tool and a material grain is calculated as: where r is the distance from the work material center to this grain and n is the spindle rotation speed.  As demonstrated, with increasing rotation speed n, the contact time t inversely decreases. Moreover, with a shorter contact time, the plastic deformation also correspondingly decreases, which further contributes to the decrease in the GB roughness component, as analyzed by Melkote et al [56]. Therefore, the inversely proportional decrease in the GB In summary, to effectively suppress the influence of the GB roughness component on the average surface roughness, a higher spindle speed is usually preferred.

Optimization of processing parameters
The above process was used to establish a theoretical and deep learning hybrid model for predicting the average surface roughness. Based on this model, we attempt to optimize the processing parameters to achieve the smallest surface roughness with the SAA. Diamond tool 5 was employed in this process. Furthermore, as analyzed above, a large spindle speed should be selected to control the influence of the GB. Hence, the spindle rotation speed was set to 3000 rpm. For the preparation of the work material, we employed material C as the work material, and its first layer (with a grain size of 4.43 µm and a misorientation angle of 19.73 • ) was diamond-turned. Therefore, the optimized parameters were the cutting depth and feed rate per revolution.
As analyzed in the above section, with the decrease in the feed rate and cutting depth, the GB roughness component will decrease due to the decrease in the R TS value. However, when the R TS value decreases to a certain degree, the kinematic roughness component will greatly increase due to the strong 'size effect' at a small R TS value [6]. Hence, in most cases, with decreasing cutting depth and feed rate, the surface roughness Sa will first decrease and then increase. Based on this analysis, this optimization issue is expressed as follows: f min ⩽ f ⩽ f max a p min ⩽ a p ⩽ a p max (48) where 's.t.' signifies 'subject to', which indicates the need to follow the constraint conditions. The ranges of the feed rate and cutting depth in equation (48) were set to 0.5-10 µm rev −1 and 0.5-10 µm, respectively.
The difficulty in equation (48) is the highly nonlinear property of Sa KD and Sa MD , which is difficult to overcome with conventional optimal algorithms. In contrast, intelligence algorithms, e.g. the SAA, are good at solving this type of problem. The optimal processing parameters indicated by SAA were a cutting depth a p = 1.31 µm and a feed rate per revolution f = 0.75 µm rev −1 . The optimized result of the average surface roughness Sa was 1.309 nm. Cutting experiments were performed with the above configurations, and the achieved surface finish is shown in figure 23. As depicted, the GB effect on the diamond-turned surface has been effectively suppressed; i.e. no obvious SSGB was observed on the diamond-turned surface. Furthermore, the average value of surface roughness Sa was set to 1.314 nm, which was also consistent with the optimization results.
In summary, the model developed in this work not only accurately predicts surface roughness, but also obtains the optimization parameters under certain constraint machining conditions.

Conclusions
This study develops a theoretical and deep learning hybrid model for forecasting the surface roughness of polycrystalline material, which is then applied to analyze the variables influencing the GB roughness component. The major conclusions are summarized as follows: 1. A polycrystalline material's surface roughness is made up of two parts: a kinematic-dynamic roughness component and a material-defect roughness component. Due to the random distribution of SSGB/PSGB, it is challenging to simulate the material-defect roughness component using traditional approaches. The prediction model for the material-defect roughness component is effectively established in this work using a deep cascade forward neural network. 2. SSGB is observed on the diamond-turned polycrystalline copper surface due to the absence of strengthening elements in the material matrix. The differences in the mechanical properties of the adjacent material grains decrease as the misorientation angle decreases, which lowers the SSGB and GB roughness components. 3. Under the minor misorientation angle condition (θ ⩽ 25 • ), the GB roughness component did not monotonically decrease with decreasing grain size due to the combined impact of the height and number of SSGBs. The GB roughness component rises with decreasing grain size under significant misorientation angle (θ > 25 • ) circumstances. 4. Two fracture modes are observed in diamond turning of pure copper. When the R TS is high (e.g. R TS = 26.034 for coarse-grained material), transcrystalline fracture occurs. The cutting edge and flank face extrusion and rubbing effects are improved with a decrease in the R TS value. In coarse-grained material under these circumstances, intercrystalline cracks take place, which is advantageous for lowering the GB effect in polycrystalline materials. 5. For fine-grained work materials, intercrystalline fractures can occur with both small and high R TS values, proving that grain refinement can help to limit the GB effect. 6. The GB roughness component's variation trend was shown to be inversely proportional to the spindle rotation speed, which is strongly related to the period of time that the diamond tool is in contact with the workpiece. To lessen the impact of the GB effect on the diamond-turned surface, a high rotation speed is advised. 7. The surface roughness prediction model and simulated annealing technique were designed to provide a smooth surface finish with a surface roughness Sa of 1.314 nm. The suggested strategy successfully eliminates the impact of SSGB on surface roughness.

Appendix. Values of the weight and threshold matrices
The calculation results for the weight and threshold matrices of W h1 and B h are as follows: