An Improved Method for NURBS Surface Based on Particle Swarm Optimization BP Neural Network

In order to further improve the accuracy and speed of the present commonly used NURBS surface method, an improved method for NURBS surface based on particle swarm optimization BP neural network is proposed. Firstly, node vectors of the data points are calculated by using the parametrization method of accumulating chord length. Then, prediction model of node vectors is constructed by using the particle swarm optimization BP neural network, and the experiment is presented to justify the feasibility and veracity of constructed prediction model. Finally, using the predicted node vectors, a fast and high-precision NURBS surface is realized. The results showed that the root mean squared error of fitting result of surface was deduced 84.05% and the run time was deduced 92.42% compared with the traditional NURBS method. Therefore, the proposed method is a fast and high-precise NURBS surface fitting method.


I. INTRODUCTION
With the development of mechanical processing industry, construction of complex surface model has been used in the field of reverse engineering machining [1], [2]. High precision fitting of surface is a significant technology in the reverse engineering and processing, and the fitting accuracy determines the quality of the product. So the technology is becoming increasingly important in product manufacturing. At present, the external shape of most surface models cannot be described by the accurate expression of analytic function. The popular two-layer implicit function interpolation algorithm based on central reduction is mostly used in the production and processing of these products. However, when the number of point clouds reaches a certain level, this method requires repeated interpolation and approximation, which takes a long time [3], [4].
The associate editor coordinating the review of this manuscript and approving it for publication was Hamid Mohammad-Sedighi .
To solve the above-mentioned problems, a fitting method based on Non-Uniform Rational B-Spline(NURBS) is proposed by Piegl L [5]. NURBS method constructs rational B-spline function by non-uniform node vector expression, which can provide uniform mathematical representation for standard analytic structure and free-form surface [6], [7]. The method is suitable for the construction of various free-form surface and composite surface models. Since NURBS method is the only representation method of free-form curves and surfaces in STEP standard for geometric definition of industrial products, it has been widely used in reverse engineering [8], [9].
In recent years, neural network has been applied in various fields, and it's growing very rapidly [10], [11]. Six metaheuristic algorithms were applied to parametric optimization of multi-path milling process [12], [13]. However, In the application of the NURBS surface of the reverse engineering, no researcher has studied before. BP neural network can learn, train and organize the solution of some nonlinear dynamic problems by simulating human brain neural thinking. Duo to the randomness of initial weight and threshold values, low convergence speed and accuracy may occur in the neural network training process [14], [15]. Hence, in this paper the particle swarm optimization BP neural network is applied to train node vectors for the NURBS surface, and the nonlinear mapping relationship is constructed. According to the mapping relationship, predicted node vectors can be acquired. Then, by calculating the data points, the control points for the NURBS surface are obtained. Finally, Fast and high precision NURBS surface is realized by using the predicted node vectors and control points.
The novelty of this paper are as follows: particle swarm optimization BP neural network is first introduced into NURBS surface fitting. A fast and precise NURBS surface fitting method is realized by establishing prediction model of node vectors based on the particle swarm optimization BP neural network. Compared with the traditional NURBS method, the root mean squared error of fitting result of surface was deduced 84.05% and the run time was deduced 92.42%. In order to further verify the fast and high-precision NURBS surface in this paper, compared to the BP prediction method and support vector model prediction method, the average root mean squared error were reduced by 67.11% and 34.76%, respectively. The run time were reduced by 77.93% and 77.61%, respectively. And hence, the proposed method can realize the fast and high precision NURBS surface.

A. NODE VECTORS OF NURBS SURFACE ACQUISITION
Data points of surface model are obtained by using a high precision 3D scanner. The data points are distributed as a (r + 1) ×(s+1) matrix and denoted by P i,j (i = 0,1,. . . , r, j = 0, 1,. . . , s). There are r + 1 rows in the data points, so there are r + 1 cross-sections. The lateral parameter direction is set as u. Similarly, there are s + 1 rows in the data points, so there are s + 1 cross-sections. The longitudinal parameter direction is set as v. Data point parameters of each section can be expressed as: Whenū 0 = 0,ū s = 1, chord length can be calculated by using the cumulative chord length parameterization [16], [17].
Node vectors of the NURBS surface are acquired by using the deBoor method [18], [19]. where U and V are node vectors, r = p + m+1, s = q + n+1. The total number of contained nodes in the node vector U and V are (r + 1) and (s + 1), respectively.

B. OPTIMIZATION OF NODE VECTORS BY PARTICLE SWARM OPTIMIZATION BP NEURAL NETWORK
Because BP neural network has good learning ability and generalization ability, it is used to optimize the solutions of node vectors U and V, thereby improving the operation efficiency and save time of node vectors. Since any continuous function can be approximated by a three-layer BP neural network on the closed interval, this paper adopts the BP neural network structure in the form of single hidden layer to optimize the calculation and generation of node vectors U and V. The specific structure of BP neural network is shown in Fig 1. The typical framework of BP neural network can be represented as a 3-layer perception model. From Fig 1 shows that input node vectors enter the whole network from the input layer during sample training. Then the input node vectors can be processed by the function in the hidden layer. Finally, the results are output in the output node. The input node vectors are set to u i and v i , then the output node vectors are set to u i+1 and v i+1 . The weight between the input layer and the hidden layer is set to W (2) ij . The weight between the hidden layer and the output layer is set to W (3) ij . Although the BP neural network can deal with nonlinear parameters, it has some shortcomings and limitations [20], [21]. For example, in the selection of node vector samples, it is required that node vectors must be representative. If the parameters of node vector samples are few, BP neural network cannot optimize to the expected value during training parameters. The initial weight of BP neural network is random, so the training process cannot converge at high speed and the result precision is low [22], [23]. Therefore, considering the advantages of particle swarm optimization, such as global optimization and dynamic search, the node vectors of NURBS surface are predicted by using the particle swarm optimization BP neural network. The flow chart of predicted node vectors is shown in Fig 2. The steps of the particle swarm optimization BP neural network are as follows: 1) Imported data are divided the raw data into training data and test date. Data are normalized treatment.
2) The topology of BP neural network with single hidden layer is constructed. The input and output nodes of the network structure are determined based on the original data. The number of hidden layer nodes is determined according to the Kolmogorov theorem. 3) According to the BP neural network, the parameters of particle swarm optimization are initialized, including population number n, particle velocity v, number of iterations and dimension D of each particle. 4) The fitness value of the current particle is compared to the fitness value of the particle's historical optimal position, if a better fitness value, it is regarded as the current optimal position. Compared with the global optimal position fitness value of each particle, a better fitness value is regarded as the current global optimal position. 5) According to (4) and (5), the particle velocity and position are updated.
v a+1 where c 1 and c 2 are acceleration factor; r 1 and r 2 are random numbers within [0,1]; a is the number of iterations; β is the inertia factor, whose value is non-negative; v id is particle velocity, and the range of variation is set as [−0.1,0.1]; p id is the optimal position experienced by the ith particle; p gd is the optimal position experienced by all particles in the particle swarm; x id is the position of the ith particle in the particle swarm. 6) Determine if the termination condition is met. If the termination condition is satisfied, the optimal weight and threshold are output and assigned to BP neural network. Otherwise, go back to Step 4). 7) The BP neural network is trained and the predicted node vectors are obtained. In reverse engineering, control points on the (p, q) order surface are often used to approximate a given data point P ij . Because the surface fitting is similar to curve fitting, surface can be fitted by using the least square surface approximation [24], [25]. Firstly, NURBS curves are approximated along a vector direction. Then, the control vertices of the curve are approximated in a direction perpendicular to the vector in the above step. Finally, generated control points are the control points of the NURBS surface. Fast and high precision NURBS surface fitting is realized by using control points and predicted node vectors [26]- [28]. The NURBS surface is expressed as follows [29], [30]: where w ij is weight factors; CP ij is control points; N i,p (u) and N j,q (v) are B-spline basis function.

III. EXPERIMENTAL AND SIMULATION STUDY A. SIMULATION STUDY OF AEROENGINE BUFFER SURFACE
A structural diagram of an aeroengine was shown in Fig 3 [31], [32]. The aeroengine buffer was made up of surface and was located at the engine exhaust. Since the 3D scanner can go deep into the inner part of the mechanical parts to scan the buffer part of the surface, the proposed method can be used to study NURBS surface. The specific measurement system was shown in Fig 3. In order to verify the feasibility of the proposed method, a similar model was selected as the simulation study object of the aeroengine buffer surface in this paper. According to the designed description in Fig 3, point cloud of the surface was shown in Fig. 4.

B. RESEARCH ON OPTIMIZATION OF NODE VECTORS OF NURBS SURFACE
By calculating the sum of the z coordinate values of each point along the x-axis, the maximum of sum of the sequence values was selected and denoted as Nxα. The Nxα distribution is shown in Fig 5. 126 sequence values corresponding to node vector U, such as 10, 11     161 sequence values corresponding to node vector V, such as 10,11,12,13,14,15,16,17,18,19,20,21,23,24,25,26, were selected as training samples. The corresponding node vector V of sequences 22,32,43,54,65,76,87,98,109,120,132,143,154,176,187,197, were selected as test sample. The optimal weight and threshold were obtained by using the particle swarm optimization. The optimal weight and threshold were assigned to BP neural network. Learning rate of the network was set as 0.01, and the target precision was 10 −4 .
After repeated calculation and iteration of the prediction model, the convergence process of node vector U and V training were shown in Fig 7 and Fig 8, respectively.   The prediction results of node vectors U and V were shown in Fig 9 and Fig 10, respectively.

C. FITTING RESULTS OF NURBS METHOD
Using the equal spacing sampling method, date points were selected. Coordinate values of the points were listed in the Table 1.
The control points were obtained by calculating the data points. NURBS surface was realized based on the control points and the predicted node vectors U and V. The fitting results of the proposed method were shown in Fig 11. The results of the conventional NURBS surface were shown in Fig 12. In order to understand the fitting effect more intuitively, the root mean square error was used to compare the fitting results of the two methods. When y = 109, the z coordinate values corresponding to different y coordinate values were shown in Fig. 13. The standard value curve was the distribution curve of point cloud when y = 109. Using the (7), the root-mean-square error values were calculated, as shown where AE i is the error value.   According to the above calculation method of root mean square error, the average root mean square errors and running times of the two methods were shown in Table 2. All the experiment results were acquired by using a computer with 3.20GHz Intel Core i7 processor and 8GB of 2133MHz DDR4 RAM.
On the basis of the Table 2 above, it can be obtained that the average root-mean-square error of the surface by using the proposed method was 84.05% lower than the conventional NURBS method, and the running time was reduced by 92.42%. And hence, the proposed method can realize the fast and high precision NURBS surface.  In order to further verify the fast and high-precision NURBS surface in this paper, the node vectors U and V were predicted by using the BP prediction method and support vector model (SVM) prediction method. On the basis of the control points and the above predicted node vectors U and V, fitting results of the BP prediction method and SVM prediction method were shown in Fig 15  and Fig 16, respectively. The z coordinate values corresponding to different y coordinate values were shown in Fig. 17.
When y = 109, the root mean square error values were calculated by using the (7), as shown in Fig 18. The average root mean square errors and running times of the BP prediction method, SVM prediction method and proposed method were shown in Table 3.
By comparing the results of two prediction method, it can be obtained that the root mean square errors of the proposed method were 67.11% and 34.69% lower than that of the BP prediction method and SVM prediction method, respectively, and the running time were reduced by 77.93% and 77.61%, respectively.

IV. CONCLUSION
In this paper, an improved method for NURBS surface based on particle swarm optimization BP neural network is proposed. The prediction model of BP neural network based on particle swarm optimization is used to predict the node vector. The efficiency and precision of NURBS surface are improved by using the predicted node vector. Compared with the conventional NURBS surface method and the SVM predictive fitting method, the proposed method is superior to many existing methods in terms of running time and accuracy. The proposed method lays a good foundation for the subsequent object processing and reconstruction. DEHAN KONG received the Ph.D. degree in computer science and technology from Yanshan University, China, in 2017. His current research interests include spatial database, points cloud, and pattern recognition. VOLUME 8, 2020