Research on the Tooth Surface Integrity of Non-Circular Gear WEDM Based on HPSO Optimization SVR

: Non-circular gears have the characteristics of gear ratio accuracy, good dynamic performance, and wide application prospects but are difﬁcult to manufacture. Wire electrical discharge machining (WEDM) can process almost all kinds of non-circular gear. In order to solve the problem that the process parameters are mainly adjusted using the operator’s experience and to improve the surface quality of non-circular gears machined using WEDM, this research took Pascal gears processed with a fast-walking WEDM machine as the object, conducted orthogonal tests, and used hybrid particle swarm optimization (HPSO) to optimize support vector regression (SVR) with different kernel functions, to predict various surface integrity indicators. The results showed that the rbf kernel function had a better performance in the prediction model of surface integrity indicators, which can provide a reference for the parameter selection of non-circular gear machining using WEDM. The ﬁnal predicted results were R 2 = 0.9978, MAPE = 0.4534 for surface roughness, R 2 = 0.9483, MAPE = 3.1673 for surface residual stress, and R 2 = 0.9786, MAPE = 0.4779 for surface microhardness.


Introduction
As a non-traditional machining process, WEDM has unique advantages in manufacturing non-circular gears, because it has no cutting stress [1][2][3], can machine conductive materials of any hardness [4][5][6][7], and can cut shaped parts that are difficult to cut using ordinary machining methods [4,8].The entire profile of a non-circular gear can be machined in a single setup, and the shape accuracy, dimensional accuracy, and surface quality required for actual production of the part can be achieved.Sałaci ński et al. [9] thought WEDM might prove to be the only technology available to manufacture proper non-circular gears.Moreover, research has shown that the isotropic surface structure formed by WEDM leads to beneficial tribological conditions in rolling contact, which allows WEDM machined gears to reach a 228% higher number of load cycles for a load level in the finite life region than common profile ground gears [10].Moreover, a large number of studies have shown that the structural damage of many parts starts and expands from the surface and dozens of microns below the surface [11].The traditional single surface roughness cannot describe the physical and mechanical metallurgical properties of parts under the surface, so it is necessary to use surface integrity to describe the surface of parts.Therefore, it is of great significance to study the relationship between process parameters and the surface integrity evaluation indicators, and to predict and optimize surface integrity during WEDM machining of non-circular gears.
Creating explicit mathematical models for surface integrity prediction based on fundamental knowledge of the physics of the machining process is associated with severe difficulties, because this process is a combination of many physical phenomena [12].Machine learning algorithms have been used in many fields to predict the outcomes of laborious and expensive experiments whose outcomes are difficult to determine analytically.These fields include, but are not limited to, physics, health, materials science, electrical, civil, and mechanical engineering [13][14][15][16][17][18].In the area of the intelligent prediction of surface integrity, Xiang et al. [19] studied the prediction and analysis of titanium alloy milling parameters based on a support vector machine, compared it with a BP neural network model, and concluded that the support vector machine model was more suitable for small sample data than the BP neural network model.Huang et al. [20] proposed an online estimation method for workpiece height in reciprocating wire EDM based on support vector regression and verified the method's effectiveness through experiments.Mathew et al. [21] developed artificial neural networks and adaptive neuro-fuzzy inference system models that could predict the through-thickness residual stress profiles in stainless steel pipe girth welds.Comparing the two models, the results showed that the neuro-fuzzy systems optimized using a hybrid technique performed slightly better than the neural network trained using the Levenberg-Marquardt algorithm.Kumar et al. [22] established a regression equation to predict the surface roughness, surface crack density, and overcutting of EDM copper.Verma et al. [18] used peak current, wire tension, wire feed rate, and pulse on and off time as process parameters to predict the slicing speed and surface roughness of monocrystalline silicon in WEDM based on support vector regression, compared different kernel functions used for modelling, and reached the conclusion that the radial basis function had the best effects.Currently, there are no references for predicting the various indicators of surface integrity of non-circular gears using WEDM.Most of the literature only studied specific materials, and only one or two surface integrity evaluation indicators were selected for research, which is less comprehensive than the three surface integrity evaluation indicators selected in this study.
This article took fast-walking WEDM machining of non-circular gears as its object.Based on the Taguchi method, the influence of peak current, pulse-on time, pulse-off time, and tracking on surface integrity indicators such as surface roughness, surface residual stress, and surface microhardness were studied using analysis of variance (ANOVA).In order to predict the surface integrity indicators of non-circular gears, SVR with a fast convergence speed and good generalization ability, even in the case of small samples [23], was selected to construct the surface integrity prediction model.Furthermore, the coefficient of determination (R 2 ) and the mean absolute percentage error (MAPE) were used to compare the performance of models using poly, rbf, and sigmoid kernel functions, respectively.Since the parameter selection of SVR will directly affect a model's learning ability and determine the model's performance, manual parameter selection is not only time-consuming and laborious, but also the parameter group found may not be optimal.Therefore this research designed a HPSO to optimize the parameters of SVR.

Hybrid Particle Swarm Optimization
In this research, HPSO was used to optimize the SVR to predict the surface integrity of non-circular gears.PSO can achieve a high prediction accuracy, but it is easy to fall into the local optimal solution [24].To address this issue, a HPSO was proposed by designing a dynamic inertia weight and introducing the tradeoff strategy of global search and local search into PSO.Applying this to the parameter optimization of SVR can improve the model's surface integrity prediction accuracy.

Standard Particle Swarm Optimization
As a new optimization algorithm based on swarm intelligence, PSO has been widely used in different fields, due to its few parameters to be adjusted, easy implementation, and fast convergence [25].
The mathematical description is as follows: in a D-dimensional space, the population X =(x 1 , • • • , x i , • • • , x m ) consists of m particles, where the i th particle is located at x i = (x i1 , x i2 , • • • , x iD ) T , and its speed is and the global extreme value of the population is p g = p g1 , p g2 , • • • , p gD T , according to following the current optimal particle, the particle X i will update its velocity and position according to Equations (1) and (2).
where i = 1, 2, • • • , m; j = 1, 2, • • • , D, m denotes the population size; t denotes the current evolutionary algebra; r 1 , r 2 denote the random numbers distributed between [0, 1]; c 1 , c 2 denote acceleration constants; and ω denotes inertia weight.It can be seen from Equation (1) that the velocity of each particle is divided into three parts.ωv ij (t) denotes the global searching ability of the particle at the current speed.
] express the local searching ability of the particles.

Inertia Weight of Decreasing Oscillation
The inertia weight ω denotes the ability of the particle to maintain the motion inertia.The larger the value of ω, the stronger the global search ability and the weaker the local search ability; on the contrary, the global search ability is weakened and the local search ability is enhanced [26].Therefore, the ω value can be adjusted with the number of iterations in the algorithm iteration process.In this research, a dynamic inertia weight with decreasing oscillation was designed, as follows: where t denotes the current iteration times, and T max and T min denote the maximum and minimum allowed evolution times.In most applications, ω max = 0.9, ω min = 0.4 [27].Figure 1 compares the inertia weight proposed in this research and the traditional concave function inertia weight.It can be seen that the figure shows a decreasing trend during the iteration, which can ensure that a larger value in the early stage is conducive to global search, and a small value in the later stage is conducive to accurate optimization.However, it does not decrease linearly, but in a wavy manner, which is more conducive to the particle jumping out of the local optimum and obtaining the global optimum.
where t denotes the current number of iterations, and T max denotes the maximum number of iterations.r denotes the random number in [0, 1].During the whole iterative process, a gradually decreases from 2 to 0, then A is a random number belonging to [−a, a].With the decrease of a, the probability of |A|< 1 gradually increases, and the probability of the algorithm performing a local search gradually increases.This trade-off strategy of global search and local search is introduced into the particle swarm algorithm as follows: 1.
When |A| < 1, the HPSO performs a local search: quickly approaching the optimal solution; When |A| ≥ 1, the HPSO performs a global search: it is beneficial to jump out of the local optimal solution.
where v rand denotes updated at a randomly selected rate in the population rather than the current optimal particle.At this stage, other particles will move away from the current optimal search particle, to perform a global search.The algorithm flow chart is shown in Figure 2.

Performance Test of HPSO
This research used ten-dimensional fitness evaluation functions: Sphere, Rosenbrock, Griewank, and Rastrigin functions to conduct optimization performance tests.Taking the inverse of the selected test function, the global maximum value of the four functions was 0. The four selected standard test functions are shown in Table 1.
Table 1.Fitness test function.

Test Function Expression Dimension (d) Search Range
Sphere The experiment was carried out 100 times, 30 particles were taken and iterated 200 times.The search range of each dimension was (−10, 10).The results are shown in Table 2.It can be seen from the Table 2 that for these four test functions, the HPSO falls into the suboptimal solution less frequently, which is more conducive to jumping out of the local optimal solution to find the global optimal solution.For the convergence accuracy and convergence speed, the results obtained using the HPSO are better than those of PSO.

Experimental Equipment and Materials
In the present research work, the experiment used a fast-walking WEDM machine tool (DK7745, Ruitian CNC Machine Tool Factory, China) as shown in Figure 3.A molybdenum wire with a diameter of 0.18 mm was used as the electrode wire, and the dielectric fluid was deionized water.The material selected was AISI 1045 steel with a thickness of 16 mm, and it was cut into the specified non-circular gear, as required.The chemical composition of the AISI 1045 steel is shown in Table 3.

Selection of Non-Circular Gears and Orthogonal Test Scheme
The experiment took a Pascal gear, a representative non-cylindrical gear, as the object.The polar coordinate equation of its nodal curve is shown in Equation (9).A set of qualified parameter combinations were selected: a modulus of 2 mm, number of teeth of 40, occurrence circle diameter of 18.521 mm, fixed length of 37.688 mm, and the tooth profile design of the selected non-circular gear used the commuted tooth profile method [29].The gear shape is shown in Figure 4.The reference line in Figure 4a indicates the axis of symmetry of the non-circular gear and the axis centre of the shaft hole.
where a denotes the diameter of the occurrence circle, and b denotes the fixed length.In this research, peak current, pulse-on time, pulse-off time, and tracking were taken as processing parameters, and four levels were selected for each parameter, as shown in Table 4.In order to obtain reasonable experimental results, specialized design of experiments is required.This was done through Taguchi's L16 Orthogonal Array, as shown in Table 5.

Measurement and Malculation of Evaluation Indicators
There are many evaluation indicators for surface integrity.In this research, three indicators that have the most significant impact on surface integrity: surface roughness (SR), surface residual stress (RS), and surface microhardness (MH) were selected as process indicators for the measurements.Considering the symmetry of non-circular gears, this research chose three teeth in the upper half of the gear, measured the selected teeth, in the order of surface roughness, surface residual stress, and surface microhardness, and took the average of the measured results.The instruments used in the experiment are shown in Figure 5.

Surface roughness
The surface roughness was measured using an automatic zoom three-dimensional surface measuring instrument (InfiniteFocus G4, Alicona, Austria).

Surface residual stress
The surface residual stress was measured using X-ray diffraction (XRD, D8 Advance, Bruker, Germany).In order to minimize the measurement error as much as possible, the surface of the sample was cleaned before the test, to remove surface stains.

Surface microhardness
The surface microhardness was measured using an automatic microhardness measuring instrument (W1102D37, Buehler, American).The loading load was 9.807 N, and the load holding time was 15 s.The formula of microhardness is shown in Equation ( 10): where d denotes the length of the indentation diagonal (µm); P denotes the load applied in the experiment (mN).

Support Vector Regression
SVR was defined by Drucker et al. in 1997 to solve regression problems [30].It adopts the structural risk minimization (SRM) principle and can be successfully applied in many research fields [31,32].The SVR function considering nonlinear problems [18] is as follows: where a i and a * i denote Lagrange multipliers and K(x i , x) denotes the kernel function; details of the three commonly used kernel functions are shown in Table 6.

Kernel Name
Kernel Equation Kernel Constant This paper used two error indicators, R 2 and MAPE, to evaluate the model's performance.R 2 and MAPE are currently widely used error indicators to evaluate model accuracy and robustness.Among them, R 2 represents the degree of fitting with the actual value, and its value ranges from 0 to 1.The closer the R 2 value is to 1, the better the model's performance.MAPE represents the average prediction accuracy of the model, and a model with a smaller MAPE value performs better [33].The formulas for the two error indicators are shown in Equations ( 12) and (13).
where n denotes the number of samples, y i denotes actual values, y * i denotes the predicted values, and y denotes the mean of the actual values.

Results and Discussion
According to the designed experimental sets through Taguchi's L16 Orthogonal Array, each experiment's surface roughness, surface residual stress, and surface microhardness values were calculated and tabulated in Table 7.

Analysis of Surface Roughness
In this study, ANOVA was performed to determine the influence of process parameters on the surface integrity indicators.The confidence level of 95% was used throughout the analyses of the experiment.The corresponding p-value evaluated the statistical significance of the process parameters.When the p-value was less than 0.05, the parameters were said to have statistically significant effects on the surface integrity indicators [34].
In the ANOVA analysis shown in Table 8, the p-values of peak current, pulse-on time, pulse-off time, and tracking are all less than 0.05.Therefore, at a 95% confidence level, the above parameters are all significant for surface roughness.Among them, the pulse-on time had the most significant effect on surface roughness, with a contribution rate of 56.98%, followed by the peak current, with a contribution rate of 18.64%.Figure 6 shows the effect of selected process parameters on the surface roughness.It can be seen from Figure 6 that the surface roughness increased with the increase of peak current and pulse-on time.The main reason for this was that the discharge energy had the greatest influence on the surface roughness, and the increase of the discharge energy of a single pulse makes the discharge pit larger and the surface roughness worse.The peak current and pulse-on time are proportional to the discharge energy and then affect the surface roughness [35]; with an increase of pulse-off time and tracking, the surface roughness gradually decreases.

Analysis of Surface Residual Stress
Table 9 shows the results of the ANOVA analysis performed for the surface residual stress.Table 9 shows that at a 95% confidence level, the peak current and pulse-on time were two main process parameters affecting the surface residual stress, their p-values were less than 0.05, and their contribution rates were 63.47% and 28.39%, respectively.The effect of the surface residual stress is shown in Figure 7, and the surface residual stress increased with the increase of peak current and pulse-on time.The main reason for this was that the increase in discharge energy led to an increase of the temperature gradient, and the surface layer shrunk during the cooling process, which was hindered by the matrix inside the workpiece, leading to tensile residual stress.As is well known, the higher the value of peak current and pulse-on time, the greater the discharge energy, resulting in a higher temperature gradient, and the greater the surface tensile residual stress [36].With the increase of pulse-off time and tracking, the surface residual stress changed little, and the overall trend fluctuated within a certain range.

Analysis of Surface Microhardness
According to Table 10, at a 95% confidence level, the peak current and pulse-on time were the two main process parameters affecting the surface residual stress, their p-values were less than 0.05, and their contribution rates were 57.18% and 40.46%, respectively.It can be seen from Figure 8 that the surface microhardness increased with the increase of peak current and pulse-on time.The main reason was this was that as the discharge energy increased, the heat-affected zone increased and the rapid cooling of molten Fe led to martensitic transformation, which increased the hardness [37].The pulse-off time and tracking increase had little effect on the surface microhardness.

Comparison of Model Performance
In order to describe the relationship between the process parameters and various indicators of surface integrity more accurately, this research used SVR to predict the surface integrity and used HPSO to optimize the parameters of SVR.
In the prediction process, the sample value used for training should be more than the predicted sample value, so that the prediction result can be more accurate [24].Therefore, 80% of the above data was randomly selected for training the model, and the remaining 20% was used for prediction testing.In this research, we used HPSO to optimize the SVR model using different kernel functions.The HPSO swarm number was set to 20, iterated 200 times, and the acceleration factor was c 1 = c 2 = 2.The comparison results are shown in Table 11.9 and 10 clearly show that the performance of the rbf kernel function was better than the poly kernel function and sigmoid kernel function for the surface roughness, surface residual stress, and surface microhardness models, which indicates that the model fitting using the rbf kernel function was better.Therefore the rbf kernel function was the best choice for modelling the surface roughness, surface residual stress, and surface microhardness in the WEDM machining of the non-circular gear.Therefore, this research used the above HPSO to optimize the SVR model using the rbf kernel function.Figure 11 shows a comparison between the predicted and actual values of surface roughness, surface residual stress, and surface microhardness, where R 2 = 0.9978, MAPE = 0.4534 for surface roughness, R 2 = 0.9483, MAPE = 3.1673 for surface residual stress, R 2 = 0.9786, MAPE = 0.4779 for surface microhardness.Therefore, using the HPSO-optimized SVR model allowed achieving the prediction of surface roughness, surface residual stress, and surface microhardness with high performance.

Conclusions
In this study, an experiment with a WEDM non-circular gear was carried out based on the Taguchi method.The surface roughness, surface residual stress, and surface microhardness were measured at different process parameter levels.Prediction modelling of surface roughness, surface residual stress, and surface microhardness was carried out using HPSO optimized SVR.Further analysis and comparison of various SVR kernel functions and prediction results was performed.The results of this study are summarized as follows: 1.
By comparison, the innovative HPSO in this paper was superior to the traditional particle swarm optimization algorithm with concave function inertia weight, in terms of the convergence accuracy and convergence speed.

2.
The results of the ANOVA analysis of surface roughness, surface residual stress, and surface microhardness showed that pulse-on time and peak current were the main process parameters affecting the surface roughness, surface residual stress, and surface microhardness.3.
To build the SVR model, three different kernel functions were utilized.The results demonstrated that the rbf kernel function had better performance in the prediction model of surface roughness, surface residual stress, and surface microhardness (surface roughness: R 2 = 0.996671, MAPE = 1.276123, surface residual stress: R 2 = 0.999188, MAPE = 0.415134, surface microhardness: R 2 = 0.99411, MAPE = 0.301652).4.
Comparing the actual value and the predicted value, R 2 was greater than 0.9, thus using the HPSO optimized SVR model could achieve high-performance prediction of surface roughness, surface residual stress, and surface microhardness.
In addition, in future research, the authors plan to explore the use of larger data sets to improve the accuracy of prediction.

2. 3 .
Trade-off Strategy of Particle Local Search and Global Search The execution of global search and local search in the whale optimization algorithm (WOA) is determined by the size of the parameter A [28].When |A| <1, WOA enters the local search stage; when |A| ≥1, WOA enters the global search stage.

Figure 2 .
Figure 2. Flow chart of hybrid particle swarm optimization.

Figure 9 .
Figure 9. Performance comparison of kernel function based on R 2 .

Figure 10 .
Figure 10.Performance comparison of kernel function based on MAPE.

Table 4 .
Factors and levels of the orthogonal test.

Table 5 .
Orthogonal array for the L16 Taguchi design.

Table 8 .
ANOVA table for surface roughness.
Figure 6.Main Effects Plot for Surface Roughness.

Table 9 .
ANOVA table for surface residual stress.Main Effects Plot for Surface Residual Stress.

Table 10 .
ANOVA table for the surface microhardness.Main Effects Plot for Surface Microhardness.