Study on an Assembly Prediction Method of RV Reducer Based on IGWO Algorithm and SVR Model

This paper proposes a new method for predicting rotation error based on improved grey wolf–optimized support vector regression (IGWO-SVR), because the existing rotation error research methods cannot meet the production beat and product quality requirements of enterprises, because of the disadvantages of its being time-consuming and having poor calculation accuracy. First, the grey wolf algorithm is improved based on the optimal Latin hypercube sampling initialization, nonlinear convergence factor, and dynamic weights to improve its accuracy in optimizing the parameters of the support vector regression (SVR) model. Then, the IGWO-SVR prediction model between the manufacturing error of critical parts and the rotation error is established with the RV-40E reducer as a case. The results show that the improved grey wolf algorithm shows better parameter optimization performance, and the IGWO-SVR method shows better prediction performance than the existing back propagation (BP) neural network and BP neural network optimized by the sparrow search algorithm rotation error prediction methods, as well as the SVR models optimized by particle swarm algorithm and grey wolf algorithm. The mean squared error of IGWO-SVR model is 0.026, the running time is 7.843 s, and the maximum relative error is 13.5%, which can meet the requirements of production beat and product quality. Therefore, the IGWO-SVR method can be well applied to the rotate vector (RV) reducer parts-matching model to improve product quality and reduce rework rate and cost.


Introduction
With the continuous progress of digitalization, artificial intelligence, and smart production, rotate vector (RV) reducers, which are the critical constituents of industrial robots, have been mass-produced and widely used. However, limited to equipment precision and manufacturing capability, many RV reducer companies want to improve assembly precision and reduce scrap through parts matching. Thus, many scholars are devoted to researching various fast and accurate RV reducer assembly prediction methods and related contents to meet the enterprise production beat and product quality requirements. The key indicators to evaluate the quality of RV reducer are transmission power, torsional moment, transmission accuracy, service life, etc. [1], among which the indicator with a great impact on the transmission accuracy of RV-40E reducers is mainly the rotation error, the size of which is determined by the quality of each component in the RV-40E reducer drive chain and the quality of the assembly work [2].
Regarding the calculation of the rotation error, many studies have been conducted by domestic and foreign scholars; for example, Blanche [3] proposed a purely geometric method to determine the transmission error of the single cycloid of the planetary reducer. Takeshi Ishida [4] proposed a spring equivalence model to qualitatively analyze the RV rotation error by numerical analysis to establish accurate modeling for the RV reducer rotation error. Yinghui Zhang [5] carried out the simulation calculation of dynamic rotation error by establishing a virtual prototype model of RV reducers. Xiaotao Tong [6] proposed a back propagation (BP) neural network-based dynamic rotation error prediction method

Literature Review
The problem of rotation error prediction is characterized by multifactor coupling, high-dimensional nonlinearity, and a limited number of samples, which makes the support vector regression (SVR) in machine learning have certain application advantages relative to the already-existing BP and SSA-BP neural network rotation error prediction methods. The SVR method in machine learning is characterized by strong generalizability and simple structure in solving small-sample high-dimensional nonlinear problems [8], and it is used in many fields. For example, Balogun [9] solved the spatial prediction problem of landslide sensitivity by using the SVR model combined with grey wolf optimization (GWO) algorithm, bat algorithm, and cuckoo optimization algorithm. Zichen Zhang [10] solved the power load forecasting problem by using the SVR model combined with GWO algorithm. Peng [11] solved the pipeline corrosion rate prediction problem by combining the SVR model with principal component analysis and the chaotic particle swarm optimization algorithm. Therefore, to address the shortcomings of existing rotation error research methods and the performance of the SVR method in solving high-dimensional nonlinear, small-sample problems, this paper will use the SVR method to establish a prediction model for rotation errors.
Although the modeling process is simple, the values of the penalty factor and the kernel function parameter in the SVR model have a significant impact on the model's prediction performance [12,13]. Therefore, in order to use the SVR model to achieve better predictions for rotation errors, the problem of parameter optimization in the SVR model first needs to be solved. Currently, population intelligence algorithms and their improved versions are becoming increasingly popular in solving different optimization problems and are widely used in many fields [14]. For example, for the dynamic economic emission dispatch problems, Zhifeng Liu [15] proposed a novel solving approach based on the enhanced moth-flame optimization algorithm, which effectively reduced fuel costs as well as the pollutant emissions of power generation systems; Lingling Li [16] proposed an improved tunicate swarm algorithm for optimizing fuel costs and pollutant emissions, which optimized the optimal dynamic scheduling scheme. For feature-selection problems, Tubishat [17] proposed a dynamic salp swarm algorithm (DSSA), and the improvements significantly enhanced its performance in solving feature-selection problems; Hongliang Zhang [18] used chaotic initialization and differential evolution to improve the sparrow search algorithm (SSA) as a way to increase the convergence speed of the algorithm, which achieved good optimization results in the feature-selection problem. In the field of mechanical engineering optimization problems, population intelligence algorithms solve a wide variety of optimization problems [19]. Abderazek [20] proposed a queuing search algorithm to optimize the main parameters of the spur gear. Yaliang Wang [21] proposed a cellular differential evolutionary algorithm with double-stage external population leading to solve the optimal design of cycloid reducer parameters. Because of the powerful optimization capability of population intelligence algorithms, domestic and foreign scholars usually also use intelligent algorithms such as particle swarm optimization (PSO) and GWO algorithms to optimize the parameters in the SVR model [22,23].
The GWO algorithm is a novel heuristic algorithm proposed by Mirjalili et al. in 2014, which has the advantages of fast convergence speed and high solution accuracy compared with other intelligent algorithms [24]. However, the algorithm itself has the drawbacks of poor initial population diversity, slow convergence speed at the later stage, and easy-tofall-into local optimum. Additionally, for these drawbacks, various improvement methods have been proposed and successfully applied by domestic and foreign scholars [25,26]. Although the GWO algorithm has stronger convergence performance than other traditional intelligent algorithms, it does not have a great advantage in the parameter optimization problem, so in order to further improve the performance of the algorithm in optimizing parameters, this paper proposes an improved grey wolf optimization (IGWO) algorithm based on the initialization of the optimal Latin hypercube sampling (OLHS) method, the nonlinear convergence factor, and the dynamic weight. In this study, the optimization capability of the proposed IGWO algorithm is compared with the GWO algorithm, the PSO algorithm, and the advanced SSA algorithm on six test functions, and the performance of the IGWO algorithm in solving the SVR model parameters optimization problem is verified by an actual case.

Major Contributions
In order to solve the problem that the current research method of rotation error is difficult to apply to the actual assembly process of RV reducer owing to its shortcomings, such as its being time-consuming and having poor calculation accuracy, and given the high-dimensional, nonlinear, and small-sample-size characteristics of the rotation error prediction problem, this paper proposes a method of rotation error prediction based on improved grey wolf-optimized support vector regression (IGWO-SVR). In addition, in order to improve the prediction accuracy of the SVR model, this paper improves the initialization population, the convergence factor, and the head wolves' weights of the GWO algorithm to improve its accuracy for SVR model parameter optimization, and its optimization performance is verified by test functions. Finally, the parameter optimization ability of the IGWO algorithm and the prediction performance of the IGWO-SVR method are verified by using a practical case. The main contributions of this study are as follows: • An improved grey wolf optimization algorithm is proposed, with three improvements: 1. Improving their initialized populations through the optimal Latin hypercube sampling idea as a way to increase initial population diversity.

2.
Improving the convergence factor by the cosine nonlinear function, which improves the global search ability in the early stage and the convergence speed in the later stage of the algorithm.

3.
Improving the speed of convergence of this algorithm to the optimal solution through the improvement of the dynamic weighting strategy.
• Establish a new rotation error prediction method based on the IGWO algorithm and the SVR model to achieve fast and accurate predictions of rotation errors.

•
The IGWO-SVR method shows better prediction performance relative to other rotation error prediction methods, and the IGWO algorithm also shows good parameter optimization performance, as verified by the RV reducer example.

Structural Principle Analysis of RV Reducer
There are various models of RV reducers, and this article is mainly about the RV-40E reducer. The RV-40E reducer is constituted primarily of a planetary wheel, a crankshaft, a cycloid wheel, a flange, a needle gear, etc. Figure 1a shows a schematic diagram of its structure. Rotation error, which is the critical quality characteristic of the RV reducer, can be affected by the processing error of each component of the transmission chain, the modification amount of contact gear tooth profile, assembly clearance, elastic-plastic deformation, etc. [27]. Additionally, its size refers to the difference between the theoretical output angle and the actual output angle. a cycloid wheel, a flange, a needle gear, etc. Figure 1a shows a schematic diagram of its structure. Rotation error, which is the critical quality characteristic of the RV reducer, can be affected by the processing error of each component of the transmission chain, the modification amount of contact gear tooth profile, assembly clearance, elastic-plastic deformation, etc. [27]. Additionally, its size refers to the difference between the theoretical output angle and the actual output angle.
The transmission of the RV reducer is divided into two stages: the first-stage involute planetary gear transmission and the second-stage cycloid transmission. Figure 1b shows the principle of the RV reducer transmission. Because the first-stage transmission system is far from the output end and because the transmission ratio of the second-stage transmission is 3~25 times that of the first-stage transmission, the impact of the first-stage involute gear planetary transmission system on the overall rotation error of the assembly will be greatly reduced. Second, because the influence of the second-stage cycloid pinwheel transmission on the transmission error is directly reflected on the output shaft, the effect on the transmission accuracy of the RV reducer depends mainly on the second-stage rotation error [28]. In conclusion, this paper considers only the second-stage cycloid pinwheel transmission system to establish the rotation error prediction model and ignores the first-stage transmission.
(a) Schematic diagram of RV reducer structure.
(b) Principle of transmission.

Analysis of Influencing Factors of Rotation Error
There are many manufacturing errors that affect the rotation error in the second-stage transmission system, and it is difficult to study the manufacturing errors of the parts one by one. Therefore, this paper uses the Taylor series expansion principle to conduct a sensitivity analysis of manufacturing errors to identify the primary influencing elements from the manufacturing errors in the second-stage cycloidal pin-wheel transmission. The transmission of the RV reducer is divided into two stages: the first-stage involute planetary gear transmission and the second-stage cycloid transmission. Figure 1b shows the principle of the RV reducer transmission. Because the first-stage transmission system is far from the output end and because the transmission ratio of the second-stage transmission is 3~25 times that of the first-stage transmission, the impact of the first-stage involute gear planetary transmission system on the overall rotation error of the assembly will be greatly reduced. Second, because the influence of the second-stage cycloid pin-wheel transmission on the transmission error is directly reflected on the output shaft, the effect on the transmission accuracy of the RV reducer depends mainly on the second-stage rotation error [28]. In conclusion, this paper considers only the second-stage cycloid pin-wheel transmission system to establish the rotation error prediction model and ignores the firststage transmission.

Analysis of Influencing Factors of Rotation Error
There are many manufacturing errors that affect the rotation error in the second-stage transmission system, and it is difficult to study the manufacturing errors of the parts one by one. Therefore, this paper uses the Taylor series expansion principle to conduct a sensitivity analysis of manufacturing errors to identify the primary influencing elements from the manufacturing errors in the second-stage cycloidal pin-wheel transmission. Additionally, parameters for each influencing factor are noted as θ = [θ 1 , θ 2 , · · · , θ n ]. According to the principle of sensitivity analysis, the rotation error model is defined in Equation (1): Using the Taylor series expansion principle, the sensitivity index of each error can be defined in the Equation (2): where ∂ϕ/∂θ 0 is the reference factor and the crank-bearing clearance is chosen as the reference in this paper. Table 1 shows the sensitivity analysis results of eight key manufacturing errors in the second-stage cycloidal pin-wheel transmission. According to Table 1, this paper selects five factors, including the cycloid gear isometric modification error (θ 1 ), the radius error of needle tooth center circle (θ 2 ), the cycloid gear shift modification error (θ 3 ), the needle tooth radius error (θ 4 ), and the crankshaft eccentricity error (θ 5 ), to establish the rotation error prediction model. Although the sensitivity index of the crankshaft eccentricity error is very small, the crank-bearing clearance error that can be caused by the crankshaft eccentricity error has a great influence on rotation error; therefore, the crankshaft eccentricity error is also considered to establish the prediction model.

GWO Algorithm
The GWO was proposed in 2014 by Mirjalili [24] as a novel heuristic group intelligence method, which is based on the principle of simulating the hierarchical mechanism and hunting mode of the grey wolf pack. The grey wolf pack is generally divided into four classes, and the top-three wolves with the best adaptability in the pack are divided into wolfα, wolfβ, and wolfγ, and the rest are ω wolves. Its hunting process is mainly that wolfα, wolfβ, and wolfγ lead other ω wolves to continuously search, surround, and attack prey. Additionally, update the wolfα, wolfβ, and wolfγ of each iteration during the hunting process.
Step 1: surrounding the prey. The wolf pack ω is constantly updated according to the prey's position and its distance from the prey, thus gradually approaching the prey. The mathematical formula is as follows: where D denotes the distance between ω wolf and prey, t denotes the present iterations, X p (t) denotes the location of prey at tth iterations, X(t) denotes the location vector of grey wolf in tth iterations, and X(t + 1) denotes the updated position of the ω wolves in (t + 1)th iteration. Finally, C and A are the random coefficients, which can be formulated as follows: Sensors 2023, 23, 366 where r 1 , r 2 denote the random vectors of [0, 1] interval, t denotes the present iterations, t max denotes the maximum iterations, and α denotes a converging factor.
Step 2: hunting. The hunting behavior is completed under the leadership of the wolfα, wolfβ, and wolfγ. The leading of ω wolves by leaders depends mainly on the constant A and the distance D between ω wolf and prey. Figure 2 shows a schematic diagram of a ω wolf position update, which can be formulated as follows: where D α , D β and D γ indicate the distance between the grey wolf and the prey; X α , X β , and X γ indicate the position of the wolfα, wolfβ, and wolfγ, respectively; and X(t + 1) indicates the updated location of the wolf pack ω in the (t + 1)th iteration. The iterations are performed by the above method, and the optimal solution is obtained when the iteration times satisfy the termination condition.
where 1 , 2 denote the random vectors of [0, 1] interval, denotes the present iterations, denotes the maximum iterations, and denotes a converging factor.
Step 2: hunting. The hunting behavior is completed under the leadership of the wolfα, wolfβ, and wolfγ. The leading of ω wolves by leaders depends mainly on the constant and the distance between ω wolf and prey. Figure 2 shows a schematic diagram of a ω wolf position update, which can be formulated as follows: where , and indicate the distance between the grey wolf and the prey; 、 , and indicate the position of the wolfα, wolfβ, and wolfγ, respectively; and ( + 1) indicates the updated location of the wolf pack ω in the ( + 1)th iteration. The iterations are performed by the above method, and the optimal solution is obtained when the iteration times satisfy the termination condition.

Improved GWO Algorithm
The traditional GWO algorithm has some disadvantages: poor initial population diversity, slow convergence in the later stage, and easy-to-fall-into local optimization [25]. Additionally, the inaccuracy of the parameter optimization results of the GWO algorithm may result in poor forecast precision from the SVR model for the rotation error, thus failing to meet the requirements of the RV reducer assembly line. Hence, this article proposes an IGWO algorithm, based on the initialization of the OLHS method, the cosine nonlinear convergence factor, and dynamic weights to improve the accuracy of the algorithm's parameter search.

Wolf Pack Initialization by the OLHS Method
In intelligent optimization algorithms, the distribution of the initial population location influences the global search speed and the convergence accuracy of algorithms, and the uniform and diverse population distribution facilitates the optimization properties of the algorithm [29]. The traditional GWO algorithm uses a random method to generate the initial population, so it lacks diversity. In addition, the uneven distribution of the initial population may cause it to run into a topical optimization solution; that is, the initial range does not cover the location of the optimal solution, so the algorithm cannot find the global optimal solution.
The OLHS method is an improvement on the Latin hypercube sampling (LHS) method. The traditional LHS rule can ensure only that the projection is uniformly distributed on each coordinate axis, but the distribution in space is not uniform. Therefore, in the case of improving its space-filling property, in 1990 Johnson [30] proposed the minimax rule to improve the space-filling degree, which is one of the most widely used methods to evaluate sampling uniformity. However, the calculation scale of this method is very large, so Morris [31] proposed the OLHS method in 1995 on the basis of the scalar discriminant function, which not only guaranteed the characteristics of space-filling but also reduced the calculation scale. Its scalar discriminant function formula is as follows: where d i , i = 1, 2, 3 . . . . . . m indicates the distance between all possible combinations of two points in the sampling matrix, X, j i , i = 1, 2, 3 . . . . . . m indicates the number of pairs of points with distance d i in the sampling matrix X, and q indicates the mode norm of the space, which is a positive integer.
In this paper, the OLHS method with good space-filling property is used to initialize the distribution position of grey wolves. Figure 3 shows the different distributions of the initializations of the random method and the OLHS method when generating 100 grey wolf individuals between [0, 1] in two dimensions. According to Figure 3, it is obvious that the initialization of the OLHS method can result in a more uniform distribution of the initial population in the sample space, and the more uniform initial population can provide more information on the global optimal solution, which can improve the algorithm's global search capability and convergence speed.

Nonlinear Convergence Factor
The key problem of the traditional GWO algorithm is how to make a trade-off between the ability of global optimization and local optimization. Additionally, the global optimization capacity affects the stability and accuracy of the algorithm optimization, and the local optimization capacity affects the rate of the algorithm convergence. The traditional GWO algorithm balances the ability of global and local searches by the change in

Nonlinear Convergence Factor
The key problem of the traditional GWO algorithm is how to make a trade-off between the ability of global optimization and local optimization. Additionally, the global optimization capacity affects the stability and accuracy of the algorithm optimization, and the local optimization capacity affects the rate of the algorithm convergence. The traditional GWO algorithm balances the ability of global and local searches by the change in A, which is controlled by the linear variation of α. When |A| ≤ 1, the algorithm tends to develop the capacity of local searches; when |A | > 1, the algorithm tends to develop the capacity of global searches.
The convergence factor parameter α that is shown in Equation (5) is a linear, decreasing transformation that represents the convergence process from 2 to 0. However, the convergence of the algorithm is often a nonlinear process, so the linear decrement of α is difficult to use to control the convergence process of the algorithm, causing the algorithm to easily run into a local optimum [32]. The research of Yuxiang Hou [33] shows that the nonlinear transformation of parameter α can enhance the optimization capacity of the algorithm and avoid running into a local optimum. Therefore, this paper uses cosine nonlinear convergence parameter α to control the convergence process of the algorithm, and its formula is given by Equation (12): where t indicates the iterations, t max indicates the maximum iterations, and α indicates the convergence factor. The convergence processes of α for the IGWO algorithm and traditional GWO algorithm are shown in Figure 4.

Weight-Based Grey Wolf Position Update
In the GWO algorithm, the leading weights of wolfα, wolfβ, and wolfγ are the same, which leads to a slow convergence of the algorithm. In addition, many scholars have verified that a better new grey wolf pack can be generated by weighted fitness or weighted distance, thus accelerating the convergence speed of the algorithm. In this paper, the weight is dynamically adjusted according to the fitness and distance, and the position update formula in Equation (10) is transformed into Equation (14). The mathematical expressions of weight and position update formula are as follows: According to Figure 4, the α of the GWO algorithm linearly decreases, which does not apply to the nonlinear convergence process of the algorithm. The α of the IGWO algorithm is nonlinear and normally decreases, and during the first half of the iteration, the convergence factor decreases more slowly compared with the traditional GWO algorithm, thus improving the global search ability of the algorithm and avoiding the algorithm's falling into the local optimum in the early stage. During the second half of the iteration, the decreasing speed of the convergence factor is accelerated, thus improving the convergence speed and accuracy of the local search of the algorithm. In summary, the cosine nonlinear improvement of the convergence factor can better equilibrate the capabilities of the global optimization and the local optimization of the algorithm.

Weight-Based Grey Wolf Position Update
In the GWO algorithm, the leading weights of wolfα, wolfβ, and wolfγ are the same, which leads to a slow convergence of the algorithm. In addition, many scholars have verified that a better new grey wolf pack can be generated by weighted fitness or weighted distance, thus accelerating the convergence speed of the algorithm. In this paper, the weight is dynamically adjusted according to the fitness and distance, and the position update formula in Equation (10) is transformed into Equation (14). The mathematical expressions of weight and position update formula are as follows: where t indicates the current iteration number; f α , f β , and f γ are the current fitness values of wolfα, wolfβ, and wolfγ, respectively; and X(t + 1) represents the position of the (t + 1)th iteration ω wolf.

Validation of IGWO Algorithm
In the literature, an article [34] chose six functions to test the properties of the IGWO algorithm, among which f 1 and f 2 are single-peaked functionns, f 3 and f 4 are multipeaked functions, and f 5 and f 6 are fixed-dimension multipeaked functions, as shown in Table 2 and Figure 5. Additionally, it compared the IGWO algorithm with the PSO algorithm, the SSA algorithm, and the traditional GWO algorithm to better demonstrate the first's seeking performance. To ensure fairness and effectiveness, the maximum iteration number and the initial population size of algorithms were uniformly set to 500 and 30, c 1 = 2, c 2 = 2, ω = 0.75 for the PSO algorithm, q = 10 for the IGWO algorithm, and R 2 = 0.8, ST = 0.8, percent = 0.2 for the SSA algorithm.

Test Functions
Dimension Range Min   The average and the standard deviation of the 20 optimization results are used as the criteria to reflect the optimization performance of the algorithms. Table 3 and Figure 6 show the optimization results and convergence curves. The results show that for singlepeak functions 1 and 2 , the mean of the IGWO algorithm is more similar to the real optimal solution and that the algorithm converges faster compared with the PSO, GWO, and SSA algorithms. For multipeaked functions 3 and 4 , the IGWO algorithm shows good optimization performance, and there is no error between its optimization results and the real results, whereas all other algorithms have some errors. For the fixed-dimensional multipeaked functions 5 and 6 , the convergence results of all four algorithms are accurate. Therefore, the IGWO algorithm has better function optimization performance and better convergence speed and accuracy than the PSO, GWO, and SSA algorithms, which indicates that the enhancement of the algorithm in this article is efficient. The average and the standard deviation of the 20 optimization results are used as the criteria to reflect the optimization performance of the algorithms. Table 3 and Figure 6 show the optimization results and convergence curves. The results show that for singlepeak functions f 1 and f 2 , the mean of the IGWO algorithm is more similar to the real optimal solution and that the algorithm converges faster compared with the PSO, GWO, and SSA algorithms. For multipeaked functions f 3 and f 4 , the IGWO algorithm shows good optimization performance, and there is no error between its optimization results and the real results, whereas all other algorithms have some errors. For the fixed-dimensional multipeaked functions f 5 and f 6 , the convergence results of all four algorithms are accurate. Therefore, the IGWO algorithm has better function optimization performance and better convergence speed and accuracy than the PSO, GWO, and SSA algorithms, which indicates that the enhancement of the algorithm in this article is efficient.

SVR Model
Support vector regression is generalized from support vector machines and applied to solve regression prediction problems [35]. For the problem of predicting the rotation error of the RV reducer, cycloid gear isometric modification error (θ 1 ), needle tooth center circle radius error (θ 2 ), cycloid gear shift modification error (θ 3 ), needle tooth radius error (θ 4 ), and crankshaft eccentricity error (θ 5 ) are composed of input variables, and the rotation error is taken as the output variable. Thus, the sample can be formulated as follows: where n denotes the number of samples, x i represents the input variables, X represents an array of input factor variables, and Y denotes an actual value array of sample data rotation errors.
According to the sample data, if there is a functional relationship between the rotation error and the five key manufacturing errors above. The SVR model is shown in Equation (18): where x is the input vector, f (x) denotes the predicted value of rotation error, ϕ(x) is the mapping relationship function, and b and ω are the deviation term and the weight vector, respectively. By introducing an insensitive loss function and minimizing structural risk, Equation (18) can be transformed as follows: where ||ω|| 2 is the regular term, ε is the parameter of the insensitive penalty function, ξ − i and ξ + i are slack variables, x i is the input variable, Y i is the actual value of the rotation error, and C is a penalty factor.
By introducing Lagrange multipliers α + i , α − i and kernel functions, (19) and (20) can be transformed into their dual form problem, as shown in Equations (21) and (22): where α + i , α − i are Lagrange multipliers and K(x, x i ) is a Gauss radial basis kernel function. The formula is given by Equation (23): where σ denotes the width of the function and g represents the parameter of the kernel. Finally, through the Karush-Kuhn-Tucker condition, the mathematical expression of the final SVR model is shown in Equation (24):

Process of Building Rotation Error Prediction Model
The prediction of the rotation error is a typical high-dimensional nonlinear problem. By the SVR method, the kernel function throws the sample data from the low dimensional space to the relatively higher dimensional space to solve the problem.
The prediction accuracy of rotation errors based on SVR is significantly affected by C and g, as shown in Equations (23) and (24). First, the penalty factor C represents the penalty on the sample points and beyond the ±ε pipe, and the magnitude of this value has an impact on the stability as well as the complexity of the SVR prediction model. In addition, the kernel function g represents the correlation between the sample points and beyond the ±ε tube. The larger the g value is, the stronger the correlation between these points is, but the accuracy of the rotation error prediction model is difficult to guarantee. On the contrary, the smaller the g value is, the looser the correlation between these points is, resulting in a more complex SVR model and the poorer universalization capacity of the model. Therefore, taking the appropriate C and g can enhance the precision of the SVR model for predicting rotation errors. To enhance the prediction precision of the SVR model for RV reducer rotation errors, this article uses the abovementioned IGWO algorithm to find the suitable values of C and g. Figure 7 is the prediction process of rotation errors based on IGWO-SVR, and the specific steps are as follows: Step 1: Import five key manufacturing error factors X and rotation error Y into the prediction model as input and output data, perform normalization, and separate sample data into training and test sets.
Step 2: Set an optimization range of parameters about the SVR model, establish the rotation error prediction model based on SVR, and train the model using the training set data.
Step 3: Initialize the IGWO algorithm parameters, and generate the initial grey wolf population within the parameter range by following the OLHS method.
Step 4: Calculate the fitness (fitness value is mean square error) of each grey wolf by the SVR model, and save the top-three wolves of the best fitness as wolfα, wolfβ, and wolfγ.
Step 5: Update the IGWO algorithm parameters and ω wolves, and then calculate the fitness.
Step 6: Compare the fitness of each ω wolf with the corresponding fitness values of wolfα, wolfβ, and wolfγ in turn, and if it is better, replace the corresponding leading wolf's position with the ω wolf's position.
Step 7: Judge whether the current iteration count is equal to the maximum iteration count. If yes, output the bestC and bestg; otherwise, return to step 6.
Step 8: Replace C and g with bestC and bestg to establish an IGWO-SVR model of rotation errors.
Step 9: Test the rotation error prediction model with the test set data.
Step 10: Judge whether the rotation error prediction model's forecast accuracy meets the assembly line requirement. If it meets the accuracy requirement, output the prediction results and save the prediction model; otherwise, go back to Step 3.

Result and Discussion
The prediction model in this paper was implemented by using Python 3.8 programming in Windows 10 system. This paper selects mean square error (MSE), mean relative error (MRE), and mean absolute error (MAE) as the evaluation metrics to assess the prediction performance of the IGWO-SVR model.
where denotes a real value of rotation error, * denotes a predicted value of rotation error, and is the number of test samples.

Result and Discussion
The prediction model in this paper was implemented by using Python 3.8 programming in Windows 10 system. This paper selects mean square error (MSE), mean relative error (MRE), and mean absolute error (MAE) as the evaluation metrics to assess the prediction performance of the IGWO-SVR model.
where Y i denotes a real value of rotation error, Y * i denotes a predicted value of rotation error, and n is the number of test samples.

Preprocessing of Data
In this paper, 100 sets of data from the actual production process of an RV reducer manufacturing company are selected as samples. Because different factors have different magnitudes, the sample data are normalized to eliminate the influence of magnitudes among factors. Then the sample data are divided into test samples and training samples at a rate of 2:8. A normalized mathematical expression is shown in Equation (28): where x newi denotes the normalized value, x i denotes the raw value, and x max and x min denote the maximum value and the minimum value, respectively. Some of the normalized data are shown in Table 4.

Optimization Results of Parameters
In this paper, the parameters C and g in the SVR model need to be optimized. Therefore, the dimension of the optimized parameter in the IGWO algorithm is set to 2, and the value range of super parameters C and g is set as 0.01 to 100. Table 5 shows the values of the parameters of the algorithm. Table 5. Parameter values of the IGWO algorithm. The MSE is chosen as the fitness function, then the fitness of each individual is computed during the iterative process, and the results of the optimal parameters bestC and bestg are finally obtained. Finally, the bestC and bestg in SVR are 10.897 and 0.1918, respectively, by the IGWO algorithm, and the corresponding optimal fitness value at this point is 0.0258. The optimal fitness curve and average fitness curve in the iteration process are shown in Figure 8. As can be seen from Figure 8, the optimal fitness curve basically coincides with the average fitness curve after 20 iterations.

Analysis of Predictive Effect of the IGWO-SVR Model
In this paper, MSE, MAE, MRE, and calculation time are used as criteria to evaluate the prediction effectiveness of the IGWO-SVR model, and as they get closer to 0, the better the prediction effectiveness of the model is. Figure 9 shows the prediction result of the model compared with the actual value, and Figure 10 shows the relative error for each sample point.

Analysis of Predictive Effect of the IGWO-SVR Model
In this paper, MSE, MAE, MRE, and calculation time are used as criteria to evaluate the prediction effectiveness of the IGWO-SVR model, and as they get closer to 0, the better the prediction effectiveness of the model is. Figure 9 shows the prediction result of the model compared with the actual value, and Figure 10 shows the relative error for each sample point.

Analysis of Predictive Effect of the IGWO-SVR Model
In this paper, MSE, MAE, MRE, and calculation time are used as criteria to evaluate the prediction effectiveness of the IGWO-SVR model, and as they get closer to 0, the better the prediction effectiveness of the model is. Figure 9 shows the prediction result of the model compared with the actual value, and Figure 10 shows the relative error for each sample point.    Figure 9 shows that the MSE, MRE, MAE, and calculation time of the IGWO-SVR model are 0.026, 0.0784, 0.1195, and 7.873s after 20 test set samples, respectively, indicating that the trained IGWO-SVR model achieves a high prediction accuracy and can also meet the requirement of enterprise production line beat in calculation time. Figure 10 shows that the maximum relative error of the forecasting model is 13.5%, which meets the enterprise's requirement for the error to be within 20%. In summary, although the model has some errors, the overall prediction effect is good, it can more accurately express the nonlinear relationship between the rotation error and the dimensional errors of key parts, and its prediction accuracy and calculation time can meet the requirements of RV reducer enterprises.

Performance Evaluation of Model
In order to better evaluate the performance of the IGWO-SVR model, it is compared with the SVR models optimized by the PSO algorithm and the GWO algorithm, the existing BP neural network rotation error prediction method [6], and the SSA-BP neural network rotation error prediction method [7]. The parameters of different rotation error prediction models are shown in Table 6.  Figure 11 and Table 7 clearly show the prediction results of different rotation error  Figure 9 shows that the MSE, MRE, MAE, and calculation time of the IGWO-SVR model are 0.026, 0.0784, 0.1195, and 7.873s after 20 test set samples, respectively, indicating that the trained IGWO-SVR model achieves a high prediction accuracy and can also meet the requirement of enterprise production line beat in calculation time. Figure 10 shows that the maximum relative error of the forecasting model is 13.5%, which meets the enterprise's requirement for the error to be within 20%. In summary, although the model has some errors, the overall prediction effect is good, it can more accurately express the nonlinear relationship between the rotation error and the dimensional errors of key parts, and its prediction accuracy and calculation time can meet the requirements of RV reducer enterprises.

Performance Evaluation of Model
In order to better evaluate the performance of the IGWO-SVR model, it is compared with the SVR models optimized by the PSO algorithm and the GWO algorithm, the existing BP neural network rotation error prediction method [6], and the SSA-BP neural network rotation error prediction method [7]. The parameters of different rotation error prediction models are shown in Table 6.  Figure 11 and Table 7 clearly show the prediction results of different rotation error prediction methods. From Table 7, the MSE of IGWO is 0026, which is 27.37% lower than PSO-SVR method, 28.57% lower than GWO-SVR method, 78.53% lower than BP method, and 28.37% lower than SSA-BP method; the MRE of IGWO is 0.0784, which is 11.21% lower than PSO-SVR method, 13.94% lower than GWO-SVR method, 59.06% lower than BP method, and 37.68% lower than SSA-BP method; and the MAE of IGWO is 0.1195, which is 10.75% lower than PSO-SVR method, 12.65% lower than GWO-SVR method, 57.46% lower than BP method, and 32.52% lower than SSA-BP method. Therefore, the results of the data analysis show that the IGWO method is better than the other prediction methods at prediction accuracy. In addition, for calculations, the IGWO-SVR method outperforms the PSO-SVR model and significantly outperforms the BP and SSA-BP models. Although the computing efficiency of the IGWO-SVR method is a little slower compared with the GWO-SVR model, it can also meet the beat requirement of the RV reducer production line. Therefore, given the prediction accuracy and computational efficiency, the IGWO-SVR method has better prediction performance than the other methods.
Sensors 2023, 23, x FOR PEER REVIEW 19 PSO-SVR method, 28.57% lower than GWO-SVR method, 78.53% lower than BP meth and 28.37% lower than SSA-BP method; the MRE of IGWO is 0.0784, which is 11. lower than PSO-SVR method, 13.94% lower than GWO-SVR method, 59.06% lower t BP method, and 37.68% lower than SSA-BP method; and the MAE of IGWO is 0.1 which is 10.75% lower than PSO-SVR method, 12.65% lower than GWO-SVR meth 57.46% lower than BP method, and 32.52% lower than SSA-BP method. Therefore, the sults of the data analysis show that the IGWO method is better than the other predic methods at prediction accuracy. In addition, for calculations, the IGWO-SVR method performs the PSO-SVR model and significantly outperforms the BP and SSA-BP mod Although the computing efficiency of the IGWO-SVR method is a little slower compa with the GWO-SVR model, it can also meet the beat requirement of the RV reducer duction line. Therefore, given the prediction accuracy and computational efficiency, IGWO-SVR method has better prediction performance than the other methods.   13 show the relative error for each sample point and maximum r tive error of different prediction methods. According to Figure 12, the relative error cu of the IGWO-SVR method is less volatile and more stable than those of the other meth In addition, according to Figure 13, the maximum relative error of IGWO-SVR is 13 which is not only within the 20% range required by companies but also lower than o forecasting methods. The maximum relative errors of GWO-SVR and PSO-SVR are 19 and 19.5%, respectively, and they are only slightly below 20%, so they are not as relia Additionally, the maximum relative errors of the BP neural network and the SSA Figure 11. Prediction results of rotation error for different models.  Figures 12 and 13 show the relative error for each sample point and maximum relative error of different prediction methods. According to Figure 12, the relative error curve of the IGWO-SVR method is less volatile and more stable than those of the other methods. In addition, according to Figure 13, the maximum relative error of IGWO-SVR is 13.5%, which is not only within the 20% range required by companies but also lower than other forecasting methods. The maximum relative errors of GWO-SVR and PSO-SVR are 19.7% and 19.5%, respectively, and they are only slightly below 20%, so they are not as reliable. Additionally, the maximum relative errors of the BP neural network and the SSA-BP neural network are 28.1% and 24%, respectively, which can no longer meet the requirements of the forecasting accuracy of enterprises. Therefore, the prediction results of the IGWO-SVR method for rotation errors are more reliable than the other methods.
neural network are 28.1% and 24%, respectively, which can no longer meet the requirements of the forecasting accuracy of enterprises. Therefore, the prediction results of the IGWO-SVR method for rotation errors are more reliable than the other methods.
In summary, the IGWO-SVR method not only has good performance in prediction accuracy and prediction efficiency but also has low volatility and good stability. Thus, it can more accurately express the nonlinear relationship between rotation errors and the dimensional errors of key parts. Additionally, it provides a more accurate quality prediction input model for the part-matching model of the RV reducer, which will be more conducive to improving assembly quality.

Conclusions
This study solves the problem that the traditional rotation error research methods cannot be applied to the parts-matching process, because they are time-consuming and have poor calculation accuracy. Therefore, this paper proposes to use the SVR method, combined with the improvement of the grey wolf optimization algorithm, to predict the neural network are 28.1% and 24%, respectively, which can no longer meet the requirements of the forecasting accuracy of enterprises. Therefore, the prediction results of the IGWO-SVR method for rotation errors are more reliable than the other methods.
In summary, the IGWO-SVR method not only has good performance in prediction accuracy and prediction efficiency but also has low volatility and good stability. Thus, it can more accurately express the nonlinear relationship between rotation errors and the dimensional errors of key parts. Additionally, it provides a more accurate quality prediction input model for the part-matching model of the RV reducer, which will be more conducive to improving assembly quality.

Conclusions
This study solves the problem that the traditional rotation error research methods cannot be applied to the parts-matching process, because they are time-consuming and have poor calculation accuracy. Therefore, this paper proposes to use the SVR method, combined with the improvement of the grey wolf optimization algorithm, to predict the In summary, the IGWO-SVR method not only has good performance in prediction accuracy and prediction efficiency but also has low volatility and good stability. Thus, it can more accurately express the nonlinear relationship between rotation errors and the dimensional errors of key parts. Additionally, it provides a more accurate quality prediction input model for the part-matching model of the RV reducer, which will be more conducive to improving assembly quality.

Conclusions
This study solves the problem that the traditional rotation error research methods cannot be applied to the parts-matching process, because they are time-consuming and have poor calculation accuracy. Therefore, this paper proposes to use the SVR method, combined with the improvement of the grey wolf optimization algorithm, to predict the rotation error with high accuracy and speed. In addition, this paper takes the RV-40E reducer as a case to verify the performance of the method. The main contents include the following parts: (1) Traditional GWO algorithm is enhanced based on the OLHS method, the cosine nonlinear convergence factor, and the dynamic weight strategy. Through verification, the IGWO algorithm has good optimization performance. (2) The prediction model for the rotation error of the RV reducer based on IGWO-SVR is established by optimizing the C and g of SVR by using the IGWO algorithm. Additionally, its MSE is 0.026, running time is 7.843 s, and maximum relative error is 13.5%, which can meet the requirements of production beat and the product quality of enterprise. (3) A comparison of the IGWO-SVR method with other methods shows that the former provides better prediction performance and the IGWO algorithm shows better parameter optimization performance.
The innovative contributions of this paper are the following three: (1) Improve its optimization performance by improving the traditional grey wolf optimization algorithm.
(2) A new rotation error research method based on IGWO-SVR model is proposed for the disadvantages of existing rotation error research methods. (3) This research method can guide the assembly of RV reducers through the parts-matching process, thus improving its assembly quality and efficiency.
Although the IGWO-SVR method has good prediction performance for rotation errors, the method also has some drawbacks. First, the rotation error is affected by many factors, but the method considers only five key factors in the second-stage cycloidal pin-wheel transmission. Second, the method is only for the RV-40E model reducer, and the applicability to other models is not necessarily very high. Therefore, these issues will be considered in future work to obtain a more optimal prediction model for rotation errors.

Institutional Review Board Statement: Not applicable.
Informed Consent Statement: Not applicable.

Data Availability Statement:
The data presented in this study are available on request from the corresponding author. The data are not publicly available, because they involve corporate data privacy.