Abstract
The Moving Least Squares (MLS) and Moving Total Least Squares (MTLS) method are widely used for approximating discrete data in many areas such as surface reconstruction. One of the disadvantages of MLS is that it only considers the random errors in the dependent variables. The MTLS method achieves a better fitting accuracy by taking into account the errors of both dependent and independent variables. However, both MLS and MTLS suffer from a low fitting accuracy when applied to the measurement data with outliers. In this work, an improved method named as
Introduction
In the past decades, meshless method 1 has been developed into an effective numerical method because of its good characteristics. In the meshless methods, the formation of shape functions is the primary issue. Many kinds of construction methods have been researched, such as the MLS method and the Radial Basis Functions (RBF) method.2,3 In the above-mentioned methods, the MLS method is widely used and was imported by Lancaster and Salkauskas 4 for the surface construction with the corresponding error analysis being discussed.5,6 Different from the traditional Least Square (LS) method,7,8 the complete polynomial is not applied to establish the fitting function in the MLS method. It consists of a coefficient vector related to the independent variable and a complete polynomial basis function. At the same time, the influence domain is divided by the compact support weight function, and the weight of nodes is distributed in the whole parameter domain. Therefore, the curve and surface reconstruction of the MLS method have the property of local approximation. The MLS approximation has been extensively recorded in the document and applied to engineering fields by many scholars.9,10 It derived numbers of methods to solve practical engineering problems for which numerical calculation methods are not suitable,11–13 for example, interpolating element-free Galerkin (IEFG) method for three-dimensional potential problems proposed by Liu 14 and boundary-free element method proposed by Wang 15 .
The MLS method has the advantages of simple calculation, high accuracy and smoothness.16,17 However, the LS method is applied to determine the local approximation and it assumes that there are no errors in the independent variables, while the random errors always occur on all the variables. In the sense of the TLS method, it is more rational to determine the local approximations.18–20 The MTLS method provides a better choice for handling the random errors of all variables. 21 Due to the influence of external factors such as artificial or environmental disturbance, the outliers are inevitable in the measurement data in practical engineering problems, which deviates from measurement data in some way and results in the instability of the reconstruction accuracy.22–24 In this case, neither MLS nor MTLS method can achieve good fitting accuracy due to their sensitivity to the outliers.
Therefore, it is necessary to find a method to avoid the negative effect of these outliers on fitting results. At present, there are two main methods that are feasible and commonly used.25,26 One of the common methods is to eliminate the outliers by setting a threshold value, and then operate reconstruction using the remaining data samples.27–29 Nevertheless, the performance of this method greatly depends on the selection of threshold value, and it is difficult to select the appropriate threshold. Another method is to select an appropriate weight function and assign a smaller weight to the outlier to reduce its influence in the fitting process. 30 Nevertheless, how to accurately determine the small weight and reduce the negative impact of the outlier is a thorny problem, particularly when there are multiple outliers. In addition, it is also unknown whether assigning small weights will have other negative effects or not. 31
To avoid the influence of outliers on the fitting accuracy, this paper presents an improved MTLS approximation named
MLS method
MLS is a well-developed method and can approximate the measurement data with high accuracy. The MLS approximation of a given function
in which
The commonly used basis functions in the two-dimensional case are described as follows.
Linear basis function:
Quadratic basis function:
To evaluate the approximation of the function, the coefficient
where
This exponential weight function divides the influence domain with

Diagram of the exponential weight function.
The values of the coefficients at the estimate points are acquired as below
where
The approximate function can be further expressed as
α -MTLS method
The classical MTLS method
The TLS method can be regarded as an advanced model of the least square method, which takes into account the interference of the regression matrix, whereas the influence of this factor is not considered in the general LS method. The error equation is expressed by
where
The SVD of C is expressed as 35
where singular matrix
When
To determine the coefficients of local approximants, TLS method is applied to the influence domain of MTLS method. The matrix can be expressed as
where
MTLS method introduces TLS to determine local fitting parameters and takes the sum of squares of orthogonal residuals as the reference index, which is more rational in dealing with the errors of all variables, exactly as expressed in Figure 2.

The approximation principle of MTLS method.
α -MTLS method
It can be seen from the above, the local approximants of MTLS method are executed in the orthogonal direction, in which the TLS estimations of influence domain are more appropriate for handling the errors-in-variables (EIV) model compared with the MLS method. However, the fitting accuracies of both methods do not meet the requirements when the outliers exist. Therefore, the

The construction process of parameter
As shown in Figure 3, TLS method applying SVD is firstly used to fit the nodes
It can be seen from the introduction above that this method eliminates only one point in each influence domain and each eliminating process is independent of each other. To some extent, the parameter
The following flowchart in Figure 4 shows the procedure of the improved method.

The procedure of the
Numerical and experimental examples
Numerical simulations and experimental examples are given to validate the performance of the
Case 1
Within this example, the aspheric profile function is considered
where
The fitting accuracy can be evaluated by the sum of the differences between the theoretical values and the fitting values as well as the Root Mean Square (
where
Let

The aspheric curve fitting by three methods.
The results of fitting aspherical profile functions by three methods.
Case 2
The wave function is investigated
Under the conditions of
The results of three methods for the wave function.

The wave curve fitting by MLS, MTLS and
As shown in Figures 5 and 6, the existence of outliers greatly affects the fitting accuracy of MLS and MTLS methods, which makes the nearby data deviate from the normal nodes. Meanwhile, Tables 1 and 2 also show that even if there are only a few outliers in the global domain, the reconstruction result will be totally different. Obviously, the proposed
Case 3
Within this example, the three-dimensional discrete data of the function are considered
the domain
The result of three methods for the 3D surface.

The surface fitting by three methods. (a) The fitting and error surface of the MLS method. (b) The fitting and error surface of the MTLS method. (c) The fitting and error surface of
For the result of each method in Figure 7, the fitted surface and error surface are displayed on the left and right, respectively. It can be seen that although the MLS and MTLS method has good approximation character and can well reflect the geometric contour of the data, they are greatly sensitive to the outliers and only a few outliers in curves and surfaces will lead to the unstable reconstruction of a series of adjacent nodes. The proposed method can effectively eliminate outliers without affecting the reconstruction of nearby nodes and achieve a stable reconstruction accuracy.
Case 4
In this example, the experimental measurement data is used to validate the performance of the proposed method.
The measurement system is mainly composed of a mobile platform and a laser displacement sensor system. SILVERA 080 series guideway with precision positioning controlled by YASKAWA servo driver are used in the three-coordinate mobile platform system. The signal exchange between the mobile platform and PC is controlled by the control card Parker 1505. The feedback of motion position of each axis is provided by the RH 100 series grating displacement sensor produced by Renishaw. The other hardware includes digital display rotary table, electronic control cabinet, PC and so on.
As shown in Figures 8 and 9, a non-contact displacement sensor KEYENCE LK-G150 is used to measure the horizontally fixed cylinder and acquire the contour data of the standard cylinder. The radius of the standard cylinder is 40.1840 mm calibrated by Taylor Hobson PGI 1240 profilometer. The contour data are fitted by MLS, MTLS and α-MTLS respectively. The reconstructed data are processed by the circle regression algorithm and thus the regression radii of three methods are obtained in Table 4. Figure 10 shows the fitting curve of the

Experiment of measuring cylinder with CMM.

Schematic diagram of CMM.
The radius of handling the standard cylinder by three methods.

The profile fitting of standard cylinder by
As mentioned above, the errors in the measurement data are not seriously deviated, and the
Conclusion
In this paper, a novel
Footnotes
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported by the National Science Foundation of China (Grant No. 11572316 and 51605094), the Fundamental Research Funds for the Central Universities (Grant No. WK2090050042), the Thousand Young Talents Program of China, and the Center for Micro and Nanoscale Research and Fabrication at the University of Science and Technology of China.
