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].
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.
NURBS Surface Improvement Process
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 (\begin{equation*} \bar {u}_{k} =\bar {u}_{k-1} +\raise 0.7ex\hbox {${\left |{ {p_{k} -p_{k-1}} }\right |}$} \!\mathord {\left/{ {\vphantom {{\left |{ {p_{k} -p_{k-1}} }\right |} d}}}\right. }\!\lower 0.7ex\hbox {$d$},\left ({{k=1,2,\cdots,s-1} }\right)\tag{1}\end{equation*}
When \begin{equation*} d=\sum \limits _{k=1}^{s} {\left |{ {p_{k} -p_{k-1}} }\right |}\tag{2}\end{equation*}
Node vectors of the NURBS surface are acquired by using the deBoor method [18], [19].\begin{align*} {{\begin{cases} {U=\left \{{{\underbrace {0,\cdots,0}_{p+1},u_{p+1},\cdots,u_{r-p+1},\underbrace {1,\cdots,1}_{p+1}} }\right \}} \\ {V=\left \{{{\underbrace {0,\cdots,0}_{q+1},u_{q+1},\cdots,u_{s-q+1},\underbrace {1,\cdots,1}_{q+1}} }\right \}} \\ \end{cases}}}\tag{3}\end{align*}
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
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:
Imported data are divided the raw data into training data and test date. Data are normalized treatment.
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.
According to the BP neural network, the parameters of particle swarm optimization are initialized, including population number
, particle velocityn , number of iterations and dimension D of each particle.v 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.
According to (4) and (5), the particle velocity and position are updated.
where\begin{align*} v_{id}^{a+1}=&\beta \times v_{id}^{a} +c_{1} r_{1} \left ({{p_{id}^{a} -x_{id}^{a}} }\right)+c_{2} r_{2} \left ({{p_{gd}^{a} -x_{id}^{a}} }\right) \\ \tag{4}\\ v_{id}^{a+1}=&x_{id}^{a} +v_{id}^{a+1}\tag{5}\end{align*} View Source\begin{align*} v_{id}^{a+1}=&\beta \times v_{id}^{a} +c_{1} r_{1} \left ({{p_{id}^{a} -x_{id}^{a}} }\right)+c_{2} r_{2} \left ({{p_{gd}^{a} -x_{id}^{a}} }\right) \\ \tag{4}\\ v_{id}^{a+1}=&x_{id}^{a} +v_{id}^{a+1}\tag{5}\end{align*}
andc_{1} are acceleration factor;c_{2} andr_{1} are random numbers within [0, 1];r_{2} is the number of iterations;a is the inertia factor, whose value is non-negative;\beta is particle velocity, and the range of variation is set as [−0.1,0.1];v_{id} is the optimal position experienced by thep_{id} th particle;i is the optimal position experienced by all particles in the particle swarm;p_{gd} is the position of thex_{id} th particle in the particle swarm.i 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).
The BP neural network is trained and the predicted node vectors are obtained.

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
126 sequence values corresponding to node vector U, such as 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 29, 30, 31, 32, 33, 35, were selected as training samples. The corresponding node vector U of sequences 16, 22, 28, 34, 40, 46, 52, 58, 64, 70, 76, 82, 88, 94, 100, 106, 112, 118, 124, 130, 136, 142 were selected as the test sample. The input data was a
By calculating the sum of the z coordinate values of each point along the y axis, the maximum of sum of the sequence values was selected and denoted as Ny
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 \begin{equation*} RE=\sqrt {\raise 0.7ex\hbox {${\sum {\left ({{AE_{i}} }\right)^{2}}}$} \!\mathord {\left/{ {\vphantom {{\sum {\left ({{AE_{i}} }\right)^{2}}} n}}}\right. }\!\lower 0.7ex\hbox {$n$}}\tag{7}\end{equation*}
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
When
Root-mean-square error values of BP prediction method, SVM prediction method and proposed method.
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.
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.