Prediction model of needle valve body extrusion grinding process based on PSO-SVR

The needle valve body is one of the core components of the diesel engine injection system, there is a complicated non-linear relationship between process parameters and process effects in its extrusion and grinding process, and it is difficult to establish specific mathematical expressions to describe the process rules. Therefore, this paper adopts support vector regression (SVR) establish a needle valve body extrusion grinding process model, and uses flow coefficient and grinding efficiency as dual output prediction targets. The particle swarm optimization algorithm (PSO) with better global search ability is introduced to optimize and improve the model. The results show that the optimized model has a smaller error between the predicted value and the actual value of the data, and the prediction accuracy is significantly improved. The model can reflect the process law of the needle valve body extrusion and grinding process to a certain extent, and it can provide certain guidance for selecting process parameters in the extrusion and grinding process.


Introduction
The needle valve body is a key component of the diesel fuel injector and is responsible for the fuel injection action of the fuel system, the processing quality of the needle valve body directly affect the performance of the entire injection system [1] . Research and practice in recent years have shown that the use of extrusion grinding process can effectively remove the needle valve body nozzle burrs to obtain a good fuel atomization effect. However, due to the many process parameters involved in the extrusion and grinding process of the needle valve body and a high degree of non-linearity between each other, it is difficult to choose appropriate process parameters for processing [2] .
In actual production, the extrusion and grinding process parameters of the needle valve is selected by the operator's previous processing experience [2,3] . With the development of artificial intelligence technology, machine learning methods have been widely used in the fields of science and engineering [4] . Zhou Miao [2] etc. used BP neural network to establish a process parameter prediction model. The prediction effect is good but there are certain errors. Zeng Yong [3] etc. used the PSO-BP algorithm to optimize the model; Sun Chenzhe [5] etc. used the GA-ELM optimization algorithm to establish a prediction model. The accuracy was improved to a certain extent, but the error value was unstable.
In view of the strong nonlinear expression ability of support vector regression models, support vector regression algorithms are often applied to some models with complex nonlinear relationships [6] . Liu Wei [7] combined particle swarm and support vector machine to predict the flow error rate, but the prediction target is single and the amount of data is small, and there is a lack of research on ability to compare various kernel function mapping through experimental data. In order to better guide the selection of process parameters, this paper takes the flow coefficient and grinding efficiency as the dual output prediction target. The flow coefficient is an important measure of the processing quality of the needle valve body, and the grinding efficiency reflects the processing efficiency of extrusion grinding. The entire modeling process is mainly divided into two parts: one is to determine the kernel function of the SVR model with better prediction effect based on historical processing data; the other is to introduce PSO to optimize the hyper parameters in the SVR model to improve the prediction accuracy.

SVR algorithm model
The core idea of the support vector regression algorithm (SVR) is based on the principle of minimizing the structural risk of errors. The training data in the input space is mapped to the high-dimensional linear space through nonlinear mapping, so that the nonlinear function in the input space is transformed into a high-dimensional linear space. The linear regression problem in the dimensional space has more advantages than traditional approximate models in small sample data, non-linearity, high dimension and other problems [8] .
If the training data {(x i , y i )|x i ∈Rn , y i ∈R n , i=1,2,……m} are considered, where m is the number of samples, the prediction equation of support vector regression can be expressed as follows: (1) Where: w is the weight vector; b is the scalar deviation; φ(x) is the kernel function.
The objective function of the support vector regression algorithm can be expressed as: Where is ε-insensitive loss function and C is the penalty factor; y is the output value of the sample data.
In order to facilitate the calculation, the Lagrange function is introduced to transform the above formula into a dual problem. The support vector regression equation under the Karush-Kuhn-Tucker (KKT) condition is: The selection of kernel function is one of the core problems of support vector regression, the regression performance of SVR depends on the selection of sum function. There is no method to derive suitable kernel function for specific problems [9,10] . The commonly used kernel functions include Gaussian radial basis kernel function, linear sum function and polynomial kernel function.

PSO-SVR model
Particle Swarm Optimization (PSO) belongs to the swarm intelligent biological heuristic evolutionary algorithm, compared with other evolutionary algorithms such as genetic algorithm, PSO has the advantages of high accuracy, and strong global search ability. It is very suitable for optimizing parameters in the SVR [10][11][12] . The solution in the PSO algorithm is called particle, and each particle has a position vector, a velocity vector and a fitness value. Particles are randomly generated first, and the speed and position of the particles are updated by calculating the value of the fitness function. The particle velocity and position are updated as follows: * * * * * ( 4 ) ( 5 ) Where: v is the speed of particle update; X is the position of particle update; W is the weight of inertia; j is the number of iterations; i is the number of particles; r 1 and r 2 are random numbers between 0 and 1; a 1 and a 2 are learning factor.

Data collection of SVR algorithm model
As shown in Table 1, the data comes from the laboratory's experimental records, a total of 125 sets of data. Since the processing parameters of the sample data have different dimensions, there are large differences in the order of magnitude between each data. In order to eliminate the dimensional influence between the indicators, the data will be standardized in advance, which can not only greatly improve the prediction accuracy of the regression model, but also increase the convergence speed.

Kernel function selection and optimization of SVR model
During model training, the collected data set is randomly divided into two parts: 80% of the data is divided into training set, and the remaining 20% is divided into test set. The prediction performance of the model proposed in this paper is measured by RMSE and R 2 .In order to better express the generalization ability of the model, this paper compares the prediction effects of Gaussian radial basis kernel function, linear kernel function and polynomial kernel function. The comparisons of prediction result are shown in Fig.1, and the error values of different kernel function are shown in Table 2.   Fig.1 that the change trend of the predicted value of the flow coefficient and grinding efficiency based on the SVR algorithm is basically the same as the real value. From Table 2, it can be seen that the prediction error of the SVR model with Gaussian radial basis kernel function is the smallest, and the prediction effect is better than the other two kernel functions. Fitness curve When the kernel function of SVR model is selected, there are three parameters need to be selected, at present, the parameters of the support vector machine are mainly selected by grid search or through experience. However, the empirical determination method requires a solid support vector machine theoretical basis, and the grid search method has a large amount of calculation and slow convergence speed, this paper introduced the particle swarm algorithm with better global search ability to optimize the three hyper parameters, in this paper, through multiple experiments, the learning factors default to 2, the particle population was 30, the maximum number of iterations was 100. And the average absolute percentage error (MAPE) between the true value and the predicted value was used as the fitness function. The parameter optimization design process is shown in Fig.2 Figure 3:

and the fitness curve is shown in
It can be seen from Fig 3 that the fitness value tends to stabilize after a certain number of iterations, which indicates that the prediction accuracy of the needle valve body extrusion grinding process effect prediction model based on PSO-SVR has stabilized.

Performance verification of prediction model based on PSO-SVR
After obtaining the best values of the three hyper parameters of the SVR model, the three parameters are substituted into the SVR model to predict the flow coefficient and grinding efficiency of the needle valve body extrusion grinding. In order to further verify the versatility and generalization ability of the Gaussian radial basis function PSO-SVR model, this paper will use the remaining 25 data in the sample data as the test data set, and use the established prediction model to predict the test data set, the results are shown in Figure 4, and the error comparison analysis is shown in Table 3.   It can be seen from Figure 4 that whether it is the flow coefficient or the grinding efficiency, the prediction result of the PSO-SVR model is closer to the true value of the data. In addition, it can be seen from Tables 3 that after the introduction of PSO to optimize the three hyper parameters of the SVR model, both the flow coefficient and the grinding efficiency, the RMSE decreases and R 2 increases. This shows that, compared with the SVR model, the PSO-SVR model can better express the complex nonlinear relationship in the extrusion and grinding process of the needle valve body, the prediction model has stronger generalization ability, and the prediction result is closer to the actual situation.

Conclusion
Aiming at the characteristics of the needle valve body extrusion and grinding process, this paper established a needle valve body extrusion grinding process effect prediction model based on PSO-SVR, the flow coefficient and grinding efficiency in the extrusion and grinding of the needle valve body were predicted and analyzed, and the regression ability of the SVR model under the influence of different kernel functions was compared. The results show that compared with the other two kernel functions, the SVR model using the RBF kernel function has better predictive ability; the accuracy of the model optimized by PSO has been further improved, which can basically meet the accuracy requirements of prediction, and can more truly reflect the process law of needle valve body extrusion and grinding. If the sample data can be further improved, the prediction accuracy can be further improved, thereby guiding the selection of process parameters.