Study on the Performances of an Approximating Spline Filter Based on the ADRF Function in Surface Roughness Evaluation

: Isotropy is an important feature of an area ﬁlter in the three-dimensional surface roughness evaluation. First, the transmission characteristic deviation between the approximating spline ﬁlter and the Gaussian ﬁlter is reduced by cascading approximating. Second, the approximating spline ﬁlter is superimposed on the orthogonal direction to obtain an isotropic areal ﬁlter. Then, four direct methods for the solving approximating spline matrix are applied. Based on the proﬁle ﬁltering and areal ﬁltering, the computational efﬁciency and accuracy are compared. The experimental results show that the improved square root method (LDLT decomposition) combines both computational efﬁciency and ﬁltering precision, and is a good choice for solving the approximating spline matrix. Finally, six kinds of robust approximating spline ﬁlters are constructed. Taking the output value of robust Gaussian regression ﬁlter (RGRF) as reference, and the honing proﬁle and step surface with deep valley characteristics were used as test surfaces to compare their robustness and iteration time. The experimental results show that the approximating spline ﬁlter based on the ADRF function has the shortest iteration times, while its roughness is close to the robust Gaussian regression ﬁlter.


Introduction
Surface roughness is an important predictor of crack, corrosion, and fatigue damage of mechanical parts, and it represents a tradeoff between the manufacturing cost and performance of mechanical parts [1]. For example, Laura et al. studied the relationship between surface roughness and friction resistance of fluids enhanced with halloysite nanotubes [2]. Therefore, it is very important to accurately evaluate the surface roughness. In precision engineering and production measurement, filters have often been used to suppress unwanted components in measurement data [3]. The surface texture includes three main components: form deviation, waviness, and roughness. Thus, before evaluating the surface roughness, it is necessary to separate the information on roughness from the surface topography signal [4]. The existing filtering technologies can effectively separate different wavelength components. The filter decomposes the measured surface topography signal in the frequency domain and separates different wavelength components into welldefined bandwidths. Besides, there is no need to express the surface morphology as a specific function [5]. At present, the most commonly used filtering technology in the surface roughness evaluation is the Gaussian filter because it has the transmission characteristics of isotropy and phase correction [6]. However, the Gaussian filter produces severe end effect, which results in a large distortion of the filter reference at the boundary [7]. In order to overcome this shortcoming, Krystek constructed a cubic spline filter by combining cubic spline function with the variational method [8]. This spline filter can suppress the end effect by selecting natural boundary conditions. In 2006, ISO/TC213 formally brought the cubic spline filter into the international standard [9]. Although the cubic spline filter has has not only better robustness, but also higher computational efficiency. The robust Gaussian regression filter and robust spline filter have also been included in international standards [24,25]. However, the computational cost of the robust Gaussian regression filter is high. Moreover, the precision of robust spline filter is low and there is no corresponding international standard of three-dimensional. More importantly, the filtering benchmark given by the international standard for robust splines is not satisfactory in all the cases. Therefore, it is necessary to design a robust filter that can not only maintain the precision of the filter but also improve the computational efficiency to replace the standard robust spline filter. At the same time, the difference between the robust Gaussian filter and the robust Gaussian filter should be reduced to obtain a better comparison of measurement results.
In this work, the transmission characteristic deviation between the approximating spline and the Gaussian filter is reduced by cascade approximating, and the transmission characteristic deviation value corresponding to a different approximation order is determined, thus providing reference data for approximation order selection. Also, the cascade approximating method also realizes the isotropic areal spline filter. Besides, direct methods for solving an approximate spline matrix are derived and compared in terms of computational efficiency and accuracy, and relevant suggestions are provided. In addition, six robust approximating spline filters are constructed and used in the experiments, which take honing profile and step surface with deep valley characteristics as experimental objects. The robust Gaussian regression filter is used as a reference filter to compare the robustness and computational efficiency of the constructed filters. The robust approximating spline filter based on ADRF function not only has higher computational efficiency, but also has robustness close to that of the robust Gaussian regression filter. The weight function of ADRF is a descending and cut-tailed weight function. The median absolute deviation which is a more robust scale parameter is used instead of median or standard deviation. The smoothness of Tukey and Andrews weight functions is considered in ADRF weight function. With an increase of deviation, the descending amplitude of weight values is gradually accelerated by stages until it is truncated and abandoned. To sum up, the LDLT decomposition approximating spline filter was realized in this work, which gives consideration to both computational efficiency and accuracy. Based on ADRF robust function, a robust approximating spline filter is designed. This work studies and improves the performance of approximating spline filter, which is helpful to promote the further application of approximating spline filter.

Transmission Characteristics
In order to reduce the difference of transmission characteristics between spline filter and Gaussian filter, the international standard ISO 16610-22 also recommends the approximating spline filter with a tension parameter β = 0.62524. As shown in Figure 1, the approximating spline filter in the standard is closer to the transmission characteristics of Gaussian filter compared with the cubic spline filter. The maximum deviation is 4.35%, however, the deviation of 4.35% cannot meet all the engineering requirements. According to [26], the spline function consists of two parts. One of them is the residual norm, which ensures that the result is close to the evaluation of profile. The other part is bending energy, which controls the smoothness of the spline curve. Lagrange parameters control the tradeoff between the curve fitting and bending. According to the principle of the variational method [27], adding the first derivative term to the bending energy can improve the transmission characteristics of a spatial frequency function. This method can be used to approximate the transmission characteristics to those of the Gaussian filter. The approximating spline function is based on the cubic spline function and adds the first derivative term to the bending energy. The approximating coefficient is introduced to provide better control of the approximating degree of the transmission characteristics. The filtering characteristic of the approximating spline can be expressed as follows.
where τ denotes the approximating coefficient, and µ denotes the Lagrangian parameter, and ∆x denotes the sampling interval, and λ c denotes the cut-off wavelength. As shown in Figure 2a, the transmission characteristics of the approximating spline and Gaussian functions is enumerated when Figure 2b, it can be seen that the transmission characteristics of the approximating spline filter are the closest to those of the Gaussian filter when τ = 1/ √ µ [13]. The maximum transmission characteristic deviation is 4.263%. This value is in line with the deviation range (−5.0%, 5.0%) of the simplified Gaussian filtering algorithm specified in the ISO 11562 [28]. Compared with the approximating spline recommended by international standard, the improved approximating spline is closer to the transmission characteristics of Gaussian filter as shown in Figure 3.
where τ denotes the approximating coefficient, and μ denotes the Lagrangian parameter, and Δx denotes the sampling interval, and λc denotes the cut-off wavelength. As shown in Figure 2a, the transmission characteristics of the approximating spline and Gaussian functions is enumerated when = 1 √ ⁄ , = 2 √ ⁄ , or = 3 √ ⁄ . From Figure 2b, it can be seen that the transmission characteristics of the approximating spline filter are the closest to those of the Gaussian filter when = 1 √ ⁄ [13]. The maximum transmission characteristic deviation is 4.263%. This value is in line with the deviation range (−5.0%, 5.0%) of the simplified Gaussian filtering algorithm specified in the ISO 11562 [28]. Compared with the approximating spline recommended by international standard, the improved approximating spline is closer to the transmission characteristics of Gaussian filter as shown in Figure 3.    In order to obtain higher approximation accuracy, many approximating spline filter are connected in series. The transmission characteristic of the cascade approximating spline filter can be expressed as 1 1 2 1 cos 4 1 cos where n denotes the cascade order. The transmission characteristic deviation for different cascade orders is presented in Figure 4, where it can be seen that with the increase in the cascade order, the approximation degree also increases. However, the improvement in the approximation accuracy results in higher calculation cost. Therefore, considering the effectiveness, the cascade order should be controlled in a reasonable range. The deviation is less than 1.0% when n = 2, so it is enough to use the second-order joint approximating spline filter in practice. In order to obtain higher approximation accuracy, many approximating spline filter are connected in series. The transmission characteristic of the cascade approximating spline filter can be expressed as where n denotes the cascade order. The transmission characteristic deviation for different cascade orders is presented in Figure 4, where it can be seen that with the increase in the cascade order, the approximation degree also increases. However, the improvement in the approximation accuracy results in higher calculation cost. Therefore, considering the effectiveness, the cascade order should be controlled in a reasonable range. The deviation is less than 1.0% when n = 2, so it is enough to use the second-order joint approximating spline filter in practice.  In the three-dimensional surface measurement, a method similar to the separability of the Gaussian filter is used to realize a two-dimensional approximating spline filter. Two groups of one-dimensional approximating spline filters process the original data along the x-axis and y-axis. First, the filter is applied m times in the x-direction (the same as the original data row number), and then n times in the y-direction (the same as the original data column number) [29]. Two-dimensional approximating spline filtering characteristics are defined as follows: 1 1 2 1 cos 4 1 cos 1 2 1 cos 4 1 cos In the three-dimensional surface measurement, a method similar to the separability of the Gaussian filter is used to realize a two-dimensional approximating spline filter. Two groups of one-dimensional approximating spline filters process the original data along the x-axis and y-axis. First, the filter is applied m times in the x-direction (the same as the original data row number), and then n times in the y-direction (the same as the original Appl. Sci. 2021, 11, 761 6 of 22 data column number) [29]. Two-dimensional approximating spline filtering characteristics are defined as follows: The anisotropy of the normal spline filter in orthogonal direction limits its application in 3D surface roughness evaluation. A two-dimensional isotropic spline filter can be built by superimposing a one-dimensional cascade approximating spline filter in the x and y directions, and its amplitude-frequency characteristics are close to those of the Gaussian filter. In the one-dimensional cascade approximating filter, when n = 2, the maximum deviation is less than 1.0%, which represents an ideal balance between the approximation accuracy and the computational efficiency. Similarly, as shown in Figure 5, when n = 2, the maximum deviation between the amplitude-frequency characteristics of the two-dimensional cascaded approximating spline filter and the two-dimensional Gaussian filter is less than 1.5%, which can meet most of the application requirements.
In the three-dimensional surface measurement, a method similar to the separability of the Gaussian filter is used to realize a two-dimensional approximating spline filter. Two groups of one-dimensional approximating spline filters process the original data along the x-axis and y-axis. First, the filter is applied m times in the x-direction (the same as the original data row number), and then n times in the y-direction (the same as the original data column number) [29]. Two-dimensional approximating spline filtering characteristics are defined as follows: 1 1 2 1 cos 4 1 cos 1 2 1 cos 4 1 cos The anisotropy of the normal spline filter in orthogonal direction limits its application in 3D surface roughness evaluation. A two-dimensional isotropic spline filter can be built by superimposing a one-dimensional cascade approximating spline filter in the x and y directions, and its amplitude-frequency characteristics are close to those of the Gaussian filter. In the one-dimensional cascade approximating filter, when n = 2, the maximum deviation is less than 1.0%, which represents an ideal balance between the approximation accuracy and the computational efficiency. Similarly, as shown in Figure 5, when n = 2, the maximum deviation between the amplitude-frequency characteristics of the two-dimensional cascaded approximating spline filter and the two-dimensional Gaussian filter is less than 1.5%, which can meet most of the application requirements.

Gauss Elimination
An accurate and efficient solution to the approximating spline equation plays an important role in surface topography filtering. However, the solution to the spline function in engineering technology is often obtained by solving linear algebraic equations. As shown in Equation (4), the approximate spline partial differential equation is transformed into a system of linear algebraic equations by means of the difference method and derivation. As shown in Equation (5), A represents the coefficient matrix of the approximating spline. It can be found that the coefficient matrix of approximating spline filter is a kind of sparse matrix (that is, the number of non-zero elements in the matrix is far less than the total number of matrix elements). A is consistent with the order of the original data. The principle of the Gauss elimination method is to eliminate the unknown number stepby-step and transform the linear equation system Aw = z into an equivalent triangular linear equation system. In order to save the computer storage capacity, three one-dimensional arrays that are denoted as a, b, and c were used in this work to store five diagonal elements of matrix A in MATLAB as shown in Equation (6). A is transformed into an upper triangular matrix by row transformation; namely, the second row represents a product of the difference between the second and first rows and b 1 /a 1 and the first-column element in the second row becomes zero. The third row represents a product of the difference between the third and first rows and c 1 /a 1 , and the first-column element of the third row becomes zero. The same operation is performed on all matrix rows, and the same operation is performed on all rows: A 1,1 w 1 + A 1,2 w 2 + · · · · · · + A 1,n w n = z A 2,1 w 1 + A 2,2 w 2 + · · · · · · + A 2,n w n = z . . .
A n,1 w 1 + A n,2 w 2 + · · · · · · + A n,n w n = z In short, the Gauss order elimination method is used to transform the pentadiagonal matrix A into an upper triangular matrix as shown in Equation (7). The last waviness w n is solved, and then the remaining waviness is obtained by back substitution. As shown in Figure 6, Gaussian elimination method includes two steps which are elimination and back substitution. This work estimates the calculation times of the two steps. The elimination of lower triangle elements b i requires one division, two multiplications, and two subtractions for each element. For b n−1 , there are only two elements in the (n − 1)th row, so computer repeats it three times to eliminate b n−1 . However, when c i is eliminated, it needs one division, one multiplication, and one subtraction. At the same time, the original data z participates in the elimination process, but the first element of these data is not included in the elimination process, while the second element is eliminated only once, and each following element starting from the third element is eliminated twice. Each time the original data are eliminated, the process includes one division, one multiplication, and one subtraction. In fact, in a computer implementation, the elimination process of the original data and the elimination process of matrix A share the division operation at the same time. Therefore, the elimination of original data considers only the latter two operations. In general, the calculation time of the Gaussian elimination is mainly the time of the elimination process. When a structure (Aw = z (1), Aw = z (2), . . . , Aw = z (n)) exists in a system, the elimination process needs to be repeatedly calculated for the change in z. This means that the Gaussian elimination method for 3D surface filtering includes complicated computational steps. When a small diagonal element is divisor, it will lead to the order of magnitude growth of other elements and the diffusion of rounding error, the order of magnitude of other elements increases, and the diffusion of rounding error is caused, making the filter unstable.
process. When a structure (Aw = z (1), Aw = z (2), … , Aw = z (n)) exists in a system, the elimination process needs to be repeatedly calculated for the change in z. This means that the Gaussian elimination method for 3D surface filtering includes complicated computational steps. When a small diagonal element is divisor, it will lead to the order of magnitude growth of other elements and the diffusion of rounding error, the order of magnitude of other elements increases, and the diffusion of rounding error is caused, making the filter unstable.

LU Decomposition
The coefficient matrix of the approximating spline equation has symmetric positive definite property. As shown in Equation (8), a positive definite matrix A can be decomposed into unit lower triangular matrix L and unit upper triangular matrix U by rewriting the Gauss elimination method into a compact form. Thus, the problem of solving Aw = z is transformed into the problem of solving Ly = z, Uw = y. The advantage of transforming the system of equations into the matrix form is that the matrix algorithm can be used to decompose the spline equations into simple parts, thus improving the computational efficiency. The flow chart of LU decomposition method is realized on the computer as shown in Figure 7. The elimination process of LU decomposition method uses the Gaussian elimination method, and generates the upper triangular matrix U. At the same time, when the multipliers are eliminated, they are placed in a lower triangular matrix, and the main diagonal elements are set to one to generate the corresponding lower triangular matrix L: n n n n n n n : When the computer realizes matrix U, the corresponding matrix L is also formed. Moreover, the original data z do not participate in the elimination process, and the algorithm performs elimination only once. Thus, the whole elimination process becomes mainly the formation of matrix U. The elimination includes approximately 11 operations. Then, computer need to do two back substitution processes for z. Compared to the Gaussian elimination, although there is an additional back-substitution, this additional calculation replaces the part of the calculation that is saved by the absence of z in the elimination process. For a set of raw data z, the LU decomposition method and the Gaussian elimination method have the same calculation cost. If A = LU decomposition is adopted, it is quite convenient to use LU decomposition method to solve some equations such as Aw = z (1), When the computer realizes matrix U, the corresponding matrix L is also formed. Moreover, the original data z do not participate in the elimination process, and the algorithm performs elimination only once. Thus, the whole elimination process becomes mainly the formation of matrix U. The elimination includes approximately 11 operations. Then, computer need to do two back substitution processes for z. Compared to the Gaussian elimination, although there is an additional back-substitution, this additional calculation replaces the part of the calculation that is saved by the absence of z in the elimination process. For a set of raw data z, the LU decomposition method and the Gaussian elimination method have the same calculation cost. If A = LU decomposition is adopted, it is quite convenient to use LU decomposition method to solve some equations such as Aw = z (1), z (1), . . . , z(1). There is no need for a double elimination process, and each solution Aw = z requires only two back substitution. However, the LU decomposition still adopts the Gaussian elimination process, which can cause numerical instability.

LDLT Decomposition
At present, the square root method L T L that is the LU decomposition method is commonly used in computers. In this method, symmetric positive definite equations are solved by trigonometric decomposition of symmetric positive definite matrices. This method splits the coefficient matrix A into two symmetric trigonometric matrices A = L T L. When elements of L are determined, the elements of L T can be obtained. In the process of computer processing, only non-zero elements of L can be stored. Additionally, the order of magnitude of L does not increase during the decomposition, and the diagonal elements are always positive. Therefore, the square root method is a numerically stable decomposition method. However, through the analysis of the calculation process, it is found that the back-generation process of the algorithm takes almost half of the whole solving-process time, and the symmetry and sparsity of the decomposed matrix are not fully utilized. In addition, the decomposition process requires the square root calculation, which can cause precision loss. In order to avoid calculating the square root, the improved square root method (LDLT) can be used to decompose the sparse matrix A. The decomposition formula is shown in Equation (9).
The LDLT decomposition method decomposes matrix A into two symmetric triangular matrices and one diagonal matrix. Therefore, the interference caused by rooting operation is avoided and improves the stability of the filtering result. In addition, the sparse matrix A is a symmetric matrix. Compared with the square root method, the LDLT decomposition method simplifies the program design. As shown in Figure 8, it is the program design flow chart of LDLT decomposition method.
of magnitude of L does not increase during the decomposition, and the diagonal elements are always positive. Therefore, the square root method is a numerically stable decomposition method. However, through the analysis of the calculation process, it is found that the back-generation process of the algorithm takes almost half of the whole solving-process time, and the symmetry and sparsity of the decomposed matrix are not fully utilized. In addition, the decomposition process requires the square root calculation, which can cause precision loss. In order to avoid calculating the square root, the improved square root method (LDLT) can be used to decompose the sparse matrix A. The decomposition formula is shown in Equation (9).
The LDLT decomposition method decomposes matrix A into two symmetric triangular matrices and one diagonal matrix. Therefore, the interference caused by rooting operation is avoided and improves the stability of the filtering result. In addition, the sparse matrix A is a symmetric matrix. Compared with the square root method, the LDLT decomposition method simplifies the program design. As shown in Figure 8, it is the program design flow chart of LDLT decomposition method.   Figure 8. Flow chart of LDLT decomposition method. Figure 8. Flow chart of LDLT decomposition method.

Thomas Method
In engineering practice, Thomas method has been often used to solve ordinary differential equation, heat conduction equation, and many other equations [21]. These problems tend to be tridiagonal matrices, and the spline matrix is a pentadiagonal matrix. In this work, the spline matrix equations are derived by the direct triangulation of matrices. The decomposition is as follows: Similar to LU decomposition method, pursuit method decomposes sparse matrix A into upper triangular matrix and lower triangular matrix. The program design flow chart of Thomas method is shown in Figure 9. Similar to LU decomposition method, pursuit method decomposes sparse matrix A into upper triangular matrix and lower triangular matrix. The program design flow chart of Thomas method is shown in Figure 9. The computational efficiency of the above matrix algorithm was evaluated. The test surfaces with different data lengths (Gaussian random distribution surfaces) were generated by MATLAB software, and their consumption times of profile and areal filtering were compared. The two-level approximating spline filter was used as an experimental object. The cut-off wavelength of the long wave was 0.8 mm, and the sampling length was 0.01 mm. In order to reduce the error, under the condition of keeping the same data length, the surface profiles of five groups of different data were generated, and the average of the five filtering times was taken for comparison value. As previously mentioned, different matrix algorithms are written into functions and are called by MATLAB for filtering, and the time consumption is calculated by the running time of each function by the profiler of MATLAB. The uncertainty of a computer itself is not taken into account. The filtering times of 1000, 10,000, 100,000, 1,000,000, and 5,000,000 data point by the matrix algorithm are given in Table 1. The results in Table 1 show that the Gaussian elimination method has the shortest time and the highest computational efficiency at the same data length among all the methods. However, when the amount of data is small, the time difference between the methods is small. With the increase in the data amount, the advantages of the Gaussian elimination and improved square root method become more apparent. Especially when facing millions and more data points, the Gaussian elimination method shows higher computational efficiency than LU method. In areal filtering, The computational efficiency of the above matrix algorithm was evaluated. The test surfaces with different data lengths (Gaussian random distribution surfaces) were generated by MATLAB software, and their consumption times of profile and areal filtering were compared. The two-level approximating spline filter was used as an experimental object. The cut-off wavelength of the long wave was 0.8 mm, and the sampling length was 0.01 mm. In order to reduce the error, under the condition of keeping the same data length, the surface profiles of five groups of different data were generated, and the average of the five filtering times was taken for comparison value. As previously mentioned, different matrix algorithms are written into functions and are called by MATLAB for filtering, and the time consumption is calculated by the running time of each function by the profiler of MATLAB. The uncertainty of a computer itself is not taken into account. The filtering times of 1000, 10,000, 100,000, 1,000,000, and 5,000,000 data point by the matrix algorithm are given in Table 1. The results in Table 1 show that the Gaussian elimination method has the shortest time and the highest computational efficiency at the same data length among all the methods. However, when the amount of data is small, the time difference between the methods is small. With the increase in the data amount, the advantages of the Gaussian elimination and improved square root method become more apparent. Especially when facing millions and more data points, the Gaussian elimination method shows higher computational efficiency than LU method. In areal filtering, 0.8 mm wavelength was used in the orthogonal direction, and the sampling interval was 0.01 mm. The obtained filtering times are given in Table 2, where it can be seen that the Gaussian elimination method, which performed well in profile filtering, takes too long time in areal filtering. This is because the Gaussian elimination method needs to recalculate the elimination process in the face of a new column of data, which leads to complex and time-consuming calculations. The LDLT method still achieves high computational efficiency. In terms of computational efficiency, the matrix algorithm achieves a satisfactory result. Thus, the Gauss elimination is time-consuming and increases the calculation cost in areal filtering, while the LDLT and Thomas methods achieve high computational efficiency.
Another important factor that should be considered is the computational accuracy. In the matrix decomposition process, rounding errors accumulate. Therefore, the decomposition method of the approximate spline matrix directly affects the error of roughness parameters. As shown in Figure 10a, the turning surface was selected for the experiment. The Form Talysurf PGI ® 1500S from Taylor Hobson was used to obtain the turning surface profile. The type of Form Talysurf stylus is P57340, and tip radius of the stylus is 2 µm. The sampling interval of Form Talysurf is 0.125 µm and the measuring speed is 0.25 mm/s. LS-line fitting was conducted to remove the form deviation, as shown in Figure 10b. The roughness parameter Ra and Rq were chosen for characterization and calculated according to the ISO 4288 [30]. The sampling length was set as 2.5 mm in this experiment, the evaluation length was 12.5 mm, and the cut-off wavelength was 2.5 mm which was numerically equivalent to the sampling length. In order to better compare the differences brought by different algorithms, four algorithms were applied to the standard cubic spline. Gaussian filter and spline filter in commercial software Mountains ® were taken as the reference in this experiment. The roughness parameter Ra, Rq were obtained as shown in Table 3. It can be calculated that the errors of parameter values Ra and parameter values Rq obtained by Gaussian filter and spline filter in the evaluation software were 0.06178% and 0.06413% respectively. This was due to the difference of filtering algorithm and transmission characteristics between the two filters. As shown in Table 4, the roughness parameter value obtained by the cubic spline filter in the software was different from the results of the cubic spline filter realized by the four algorithms. In fact, the difference was caused by the implementation algorithm of spline filter. In 2011, Mathia et al. pointed out that the calculation errors of roughness parameters after using a spline filter was bigger than using a Gaussian regression filter [31], which further proved the evaluation difference between the Gaussian filter and spline filter in the software Mountains ® . Therefore, this study takes the output value of the Gaussian filter as the final reference. Compared with the spline filter in the software, the implementation algorithm reduces the evaluation difference between the spline filter and the Gaussian filter as shown in Table 5. The roughness value obtained by the LDLT algorithm is the closest to the Gaussian filter, and the error were only 0.002667% and 0.03484%. The roughness values obtained by Gauss elimination method and LU decomposition method are the same. In fact, the LU decomposition is based on the idea of the Gaussian elimination, which is highly affected by the rounding error. Therefore, with the increase in the matrix order, the error accumulates significantly. The LDLT avoids the square root operation and further reduces the error accumulation. The result shows that the roughness value obtained by the LDLT is the closest to the reference value. In essence, Thomas method is the Gaussian elimination method without selecting the principal elements. When the main diagonal elements are dominant, the calculation process of the Thomas method will not introduce a large increase in the order of magnitude of the intermediate results and will not cause a severe accumulation of rounding errors. The approximate spline matrix is not a strictly diagonally dominant matrix. Therefore, the catch-up method will cause serious error accumulation in the face of massive data. difference between the spline filter and the Gaussian filter as shown in Table 5. The roughness value obtained by the LDLT algorithm is the closest to the Gaussian filter, and the error were only 0.002667% and 0.03484%.

The Errors of Ra
The Errors of Rq Gauss elimination 0.05872% 0.02925% LU decomposition 0.05872% 0.02925% LDLT 0.05911% 0.02929% Thomas 0.05876% 0.02928% The roughness values obtained by Gauss elimination method and LU decomposition method are the same. In fact, the LU decomposition is based on the idea of the Gaussian elimination, which is highly affected by the rounding error. Therefore, with the increase in the matrix order, the error accumulates significantly. The LDLT avoids the square root operation and further reduces the error accumulation. The result shows that the roughness value obtained by the LDLT is the closest to the reference value. In essence, Thomas method is the Gaussian elimination method without selecting the principal elements.  With the development of machining technology, the precision of surface roughness measurement has been becoming more and more demanding. Therefore, the detection accuracy and filtering accuracy of an instrument are highly important. Considering the computational efficiency and accuracy, the Gaussian elimination is a good choice for profile filtering when processing a small amount of data. However, LU decomposition and Gaussian elimination cannot meet the precision requirement in the face of massive data. In that case, the LDLT method should be preferred. In the areal filtering, the LDLT method represents a good choice for solving an approximating spline matrix because it has high computational efficiency and filtering precision.

Robust Treatment
The reliability of reference data is an important index to characterize surface roughness. When the surface contains outliers, such as scratches, grooves, and missing surface data, filter reference is distorted. The robustness estimation weight function is introduced into the filter to enhance the robustness against the abnormal signals. Also, different weight functions may produce completely different results when processing the same measured signal, thus increasing the difference in surface evaluation between different filters. In 2010, the robust Gaussian regression filter was included in the ISO 16610-31. Also, it has been shown that the combination of the Tukey estimation function and the Gaussian regression filter can improve the robustness of the Gaussian regression filter [18]. However, it increases the time and calculation costs. In the same year, the ISO 16610-32 stipulated a robust spline filter with p = 1(the L1-norm based Robust Spline Filter). Based on the idea of a variational robust spline filter, a compromise function between the sum of the absolute values of the resists and the approximate bending energy of the data has been constructed. However, this function requires many cyclic iterative operations to be solved. It has been proved that the standard robust spline filter cannot achieve satisfactory results in the surface evaluation [23]. Therefore, it is necessary to design a robust filter, which not only has high filtering accuracy and computational efficiency, but also can reduce the evaluation difference between robust spline filter and robust Gaussian regression filter, so as to realize the unification of the two evaluation standards.
In this study, the approximating spline is used as a base filter, and several typical weight functions are selected for comparison. The matrix definition of the robust approximating spline is as follows: where ρ denotes a robust weight function, and τ denotes the approximating coefficient, and µ denotes the Lagrangian parameter. P and Q are matrices related to boundary conditions. First, the filter results are obtained by using the approximating spline filter, and then the results are substituted into the weight function to obtain the weights of each point. Then, the calculated weights are assigned to the points with small residual errors, and small weights are assigned to the points with large residual errors. Finally, the weights of each point are substituted into the robust approximating spline, and the robust filter values are iteratively calculated. According to M-estimation, different robust weight functions may lead to diametrically different results when one and the same signal observed is processed. An impertinent choice of weight functions can sometimes make the estimating method invalid. In practice, it is rather difficult to grasp the exact distribution of the measured signal. To make approximating spline filter adaptable to widely practical application, several typical weight functions are selected and compared with each other [32].
(2) Tukey where v = r/cMAD, and c denotes the modulation constant used to balance robustness and efficiency; c = 4.44 is adopted as an international standard.
(3) ADRF where v = r/s, s denotes a scale parameter, and a, b, and c denote the fine-tuning parameters.
(4) Andrews Hampel Huber where c is the threshold value, and its value is 1.345.

Experimental Results
A honing surface with an obvious deformity was used in the experiments as shown in Figure 11a. The data were sampled at 4-µm interval, and 3854 data points were obtained. In order to evaluate the surface roughness accurately, the polynomial fitting method was used to remove the large shape components of the surface. The same cut-off wavelength (0.8 mm) was used in all filtering processes. The results of the robust Gaussian regression filter were used as a reference. As shown in Figure 11b, the waviness curve after using approximating spline was distorted at a large deep valley, resulting in a large distortion of the roughness. After different robust processing, the waviness profile of the filter output was smooth and natural, and the influence of abnormal features was suppressed. It can be seen that robust processing can obtain more realistic and reliable filtering values even in the case of surface profiles with large outliers, such as deep valleys or high peaks. The profile processed by the robust Gaussian regression filter was used as the reference data. A robust second-order Gaussian regression filter with a cut-off wavelength of 0.8 mm was used to perform the filtering operation. The evaluation length was set to be the same as the total length of the profile. Figure 12 shows the similarity between the waviness profile processed by different robust approximating spline filters and robust Gaussian regression filter. It can be seen that for most of the profiles, the profiles processed by the Tukey, ADRF, and Andrews are in good agreement with the reference curve, while those of the WLAV, Hampel, and Huber show significant differences.
The typical roughness parameters values of using different filtering methods are presented in Table 6. First, the amplitude parameters were investigated. Ra (the arithmetical mean deviation of the profile) is the most commonly used 2D roughness parameter. After robust treatment, Rp (the maximum peak height of the profile) and Rv (the maximum valley depth of the profile) increased. Rt is the total height of the profile and equal to the sum of Rp and Rv. Meanwhile, Rq (the root mean square deviation of the profile) and Rku (the kurtosis of the profile) also increased accordingly. Rsk (the skewness of the profile) showed a negative decreased trend. The results show that compared to the unrobust approximating spline filter, the robust processing can effectively suppress the influence and propagation of the malformed characteristic signal and reduce the distortion of the median line of the filter. The roughness profile retains the characteristics of the deep valley and high peak well. Therefore, robust filtering can more truly reflect the low-frequency waviness and high-frequency roughness components and is more conducive to the evaluation of surface morphology. The roughness parameters processed by Huber and Hampel methods differed greatly from the robust Gaussian processing values. Furthermore, the spacing parameter Rsm (mean width of the profile elements) increased after robust treatment as well. The results show that the robust processing can more truly reflect the density of the peak and valley of the surface profile compared to the unrobust approximating spline filter. The results were further verified, and the roughness parameters of Tukey, ADRF, and Andrews were further analyzed as shown in Figure 12. The relative errors between the roughness parameters obtained by Tukey, ADRF, and Andrews and the reference data are given in Table 7. The relative errors of Rp parameters between Tukey, ADRF, and Andrews methods and the robust Gaussian regression filter were 11.3%,3.85%, and 19.6%, respectively; the relative errors of Rv parameters were 0.63%, 0.21%, and 0.58%, respectively; lastly, the relative errors of Rt parameters were 2.58%, 1.17%, and 4.74%, respectively. Generally speaking, the filtering effect of the ADRF method on the deep valley and high peak was more similar to that of the robust Gaussian regression filter. The relative errors of Rq parameters were 0.80%, 0.57%, and 0.34%, while the relative errors of profile kurtosis Rku parameters were 12.9%, 0.76%, and 1.40%. Thus, the results of the Tukey, ADRF, and Andrews methods in reflecting peak-valley symmetry are close to that of the robust Gaussian regression filter. The relative errors of Rsm parameters were 2.64%, 0.28%, and 6.10%. ADRF was closer to the robust Gaussian regression filter in reflecting peak-valley symmetry. Another important factor for filter is the iteration time. The numbers of iterations of the Tukey and Andrews methods were k = 3 (0.027 s) and k = 4 (0.024 s) respectively, and the calculation efficiencies of these methods were relatively low. The number of iterations of the ADRF method was k = 2 (0.017 s), but it achieved high computational efficiency. The experimental results show that the ADRF method has good filtering performance for honing profile. The evaluation result of the surface roughness is also close to that of using the robust Gaussian regression filter. Through a large number of experiments, it is found that the ADRF method is neutral when it is applied to the profile with regular form and Gaussian distribution. It shows good robustness when ADRF method is applied to the surface profile with outliers such as scratches and grooves, which further verifies the applicability of ADRF method in surface roughness extraction. wavelength (0.8 mm) was used in all filtering processes. The results of the robust Gaussian regression filter were used as a reference. As shown in Figure 11b, the waviness curve after using approximating spline was distorted at a large deep valley, resulting in a large distortion of the roughness. After different robust processing, the waviness profile of the filter output was smooth and natural, and the influence of abnormal features was suppressed. It can be seen that robust processing can obtain more realistic and reliable filtering values even in the case of surface profiles with large outliers, such as deep valleys or high peaks. The profile processed by the robust Gaussian regression filter was used as the reference data. A robust second-order Gaussian regression filter with a cut-off wavelength of 0.8 mm was used to perform the filtering operation. The evaluation length was set to be the same as the total length of the profile. Figure 12 shows the similarity between the waviness profile processed by different robust approximating spline filters and robust Gaussian regression filter. It can be seen that for most of the profiles, the profiles processed by the Tukey, ADRF, and Andrews are in good agreement with the reference curve, while those of the WLAV, Hampel, and Huber show significant differences.
(a) (b) Figure 11. (a) Honing profile and (b) waviness profile after using the robust filter.  The typical roughness parameters values of using different filtering methods are presented in Table 6. First, the amplitude parameters were investigated. Ra (the arithmetical mean deviation of the profile) is the most commonly used 2D roughness parameter. After robust treatment, Rp (the maximum peak height of the profile) and Rv (the maximum valley depth of the profile) increased. Rt is the total height of the profile and equal to the sum of Rp and Rv. Meanwhile, Rq (the root mean square deviation of the profile) and Rku (the kurtosis of the profile) also increased accordingly. Rsk (the skewness of the profile) showed a negative decreased trend. The results show that compared to the unrobust approximating spline filter, the robust processing can effectively suppress the influence and propagation of the malformed characteristic signal and reduce the distortion of the median line of the filter. The roughness profile retains the characteristics of the deep valley and high peak well. Therefore, robust filtering can more truly reflect the low-frequency waviness and high-frequency roughness components and is more conducive to the evaluation of surface morphology. The roughness parameters processed by Huber and Hampel methods differed greatly from the robust Gaussian processing values. Furthermore, the spacing parameter Rsm (mean width of the profile elements) increased after robust treatment as well. The results show that the robust processing can more truly reflect the density of the peak and valley of the surface profile compared to the unrobust approximating spline filter. The results were further verified, and the roughness parameters of Tukey, ADRF, and Andrews were further analyzed as shown in Figure 12. The relative errors between the roughness parameters obtained by Tukey, ADRF, and Andrews and the reference data are given in Table 7. The relative errors of Rp parameters between   The constructed ADRF robust approximating spline filter was then applied to areal filtering. The step surface obtained by the Talysurf CCI measurement system is presented in Figure 13. The existing surface shape was deleted, and the surface details were retained. The waviness surface and rough surface obtained by the approximating spline filtering without robust treatment is presented in Figure 14. According to the output results, there was an obvious distortion in the step area, and a false peak phenomenon occurred in the vicinity of the deep valley. Therefore, the presence of steps will seriously affect the accurate evaluation of roughness. The waviness profiles of the RGRF and ADRF outputs are almost the same, and both suppress the influence of the step as shown in Figures 15a and 16a. It can be seen that the robust filtering not only produced small distortion in the step region and around it but also had small deformation at the boundary. The robust processing effectively extracted the low-frequency waviness component and eliminated the influence of deep valleys features, and the obtained roughness surface was more real and reliable. The corresponding height parameter values are given in Table 8. The parameters of Sa and Sq have little difference, therefore the overall height deviation of the surface was almost the same. The error of Sv was 9%. Both of them had the same treatment effect at the maximum deep valley and could eliminate the influence of the step. The Ssk parameters were all negative, The waviness profiles of the RGRF and ADRF outputs are almost the same, and both suppress the influence of the step as shown in Figures 15a and 16a. It can be seen that the robust filtering not only produced small distortion in the step region and around it but also had small deformation at the boundary. The robust processing effectively extracted the low-frequency waviness component and eliminated the influence of deep valleys features, and the obtained roughness surface was more real and reliable. The corresponding height parameter values are given in Table 8. The parameters of Sa and Sq have little difference, therefore the overall height deviation of the surface was almost the same. The error of Sv was 9%. Both of them had the same treatment effect at the maximum deep valley and could eliminate the influence of the step. The Ssk parameters were all negative, The waviness profiles of the RGRF and ADRF outputs are almost the same, and both suppress the influence of the step as shown in Figures 15a and 16a. It can be seen that the robust filtering not only produced small distortion in the step region and around it but also had small deformation at the boundary. The robust processing effectively extracted the low-frequency waviness component and eliminated the influence of deep valleys features, and the obtained roughness surface was more real and reliable. The corresponding height parameter values are given in Table 8. The parameters of Sa and Sq have little difference, therefore the overall height deviation of the surface was almost the same. The error of Sv was 9%. Both of them had the same treatment effect at the maximum deep valley and could eliminate the influence of the step. The Ssk parameters were all negative, indicating that there were corresponding deep valley area, and the relative error between them was small. From Figure 17, it can be seen that the material ratio curve was almost the same, but there was a small difference between the profile peak and the profile valley. In addition, the computational time of ADRF is only 0.316 s, and the computational efficiency is much higher than that of the robust Gaussian regression filter. The experimental results show that the ADRF robust approximating spline has good performance in areal filtering with deep valleys.       Figure 17. Material ratio curves after using the ADRF and RGRF filter. Figure 17. Material ratio curves after using the ADRF and RGRF filter.

Conclusions
In this work, the performance of approximating spline filtering were compared and improved. The transmission characteristic deviation between the approximating spline and Gaussian filters is further reduced by the cascade approximating method. It is found that the deviation of the second-order approximating spline can meet the general measurement requirement of 5%. Further research shows that the two-dimensional approximating spline can produce approximately isotropic amplitude characteristics, which ensures that the attenuation degree of the signal is consistent in all directions when the signal is passing through the filter. This is beneficial to the application of approximating spline in areal filtering. In fact, the filtering equation of approximating spline can be transformed into the form of a matrix equation. Matrix factorization involves computational efficiency and numerical accuracy. The error caused by matrix factorization can directly affect the roughness parameter values. In order to find a suitable matrix algorithm, four direct methods of matrix decomposition were realized by the numerical analysis theory. Through profile and areal filtering, it is found that LDLT algorithm has the highest computational efficiency. The Gaussian filter in the commercial Mountains ® software was used as a reference in the accuracy comparison experiment. Compared with Gauss elimination method, LU decomposition method, and Thomas method, it is found that the roughness obtained by LDLT method is the closest to that of using Gaussian filter. At the same time, the algorithm can further reduce the evaluation difference between the spline filter and the Gaussian filter in the Mountains ® software. Finally, in order to improve the robustness of the approximating spline filter and reduce the evaluation difference with the robust Gaussian regression filter, six types of robust approximating spline filters were constructed and analyzed. The results of the experiment of honing profile and step surface show that the robustness of the ADRF filter is closer to that of the robust Gaussian filter when dealing with the outliers. At the same time, the number of iterations of the ADRF filter is also less than those of the other function filters. The ADRF robust approximating spline filter and the robust Gaussian regression filter have similar robust performance, and the evaluation results for the same surface have a little difference, which is helpful for realizing the unification of the two sets of international standards. In particular, the robust filter is neutral when facing a uniform surface, such as that of obeying the Gaussian distribution. Therefore, in practical application, the appropriate filter should be selected according to the surface characteristics.