Research Article  Open Access
The Calculation of Roughness Uncertainty by Fitting BSpline Filter Assessment Middle Lines
Abstract
The roughness and uncertainty are important parameters of surface morphology. The least square middle line method is often used to estimate the roughness and its uncertainty. However, the roughness and its uncertainty obtained by the least square middle line method are inaccurate. This paper proposes a method to calculate exactly the roughness and its uncertainty by piecewise fitting the smooth Bspline filter assessment middle lines. A Bspline smoothing filter is selected to determine the assessment middle line of roughness. The Bspline filter can not only give the accurate roughness, but also obtain the smooth assessment middle line. The model of roughness uncertainty is proposed by piecewise fitting Bspline filter middle lines as the quadratic curves. The Sshaped test part is used to verify the model of roughness uncertainty.
1. Introduction
Surface topography affects measurement accuracy, wear resistance, fatigue strength, and stability of fit, etc. It is an important factor to evaluate surface quality. The surface morphology is composed of the shape profile, waviness profile, and roughness profile. The roughness and its uncertainty are studied in this paper. The International Organization for Standardization (ISO) issued the corresponding surface roughness standard ISO 4681982 in 1982 [1]. This standard stipulates some evaluation parameters of surface roughness, such as , and it also gives the selection criteria of evaluation length and sampling length. The roughness is often extracted from the surface morphology. More and more measuring instruments are used to get the surface morphology, such as the contact surface profiler [2], laser interferometric profiler [3], and noncontact digital optical profiler [4]. The contact surface profiler is the most commonly used instrument. It is used to measure the surface profile. Because it is connected with the computer, the surface profile information can display on the computer [2]. When the surface morphology is obtained, the method of extracting the roughness needs to be considered. However, the existing commercial software cannot accurately extract the roughness and calculate the uncertainty of roughness at the same time. The Gaussian filter which is included in the existing commercial software is the most common method to extract roughness at present. In ISO 11562, the Gaussian filter was adopted as a standard to calculate the roughness [5]. The development of the Gaussian filter is relatively mature. In order to decrease the amplitude deviation of the Gaussian filter, the cascaded firstorder Butterworth filters and the cascaded moving average filters were used to extract the roughness. The combination of the two filters can decrease the amplitude deviation greatly [6].
However, the Gaussian filter has the edge effect and large fluctuation, which is not suitable for fitting the roughness assessment middle line [7]. Due to the large fluctuation of the middle line obtained by the general filter, the Bspline smoothing filter is proposed to obtain the middle line for the roughness evaluation. In ISO/TS 1661022, the Bspline filter middle line was also adopted as a standard to evaluate the roughness [8]. The middle line obtained by the Bspline smoothing filter is relatively smooth, which is convenient for fitting the middle line subsequently. Generalized Bspline signal processing was proposed to process the band limited signals. The principle of the Bspline filter was given in detail [9]. Considering the smoothness of the Bspline filter middle line, it is convenient for us to fit the middle line.
When we know the expression of the fitted middle line, the uncertainty of roughness needs to be calculated. For the uncertainty of roughness, it usually refers to the indirect measurement of uncertainty, which is the Atype uncertainty [10]. Generally, the Guide to the Expression of Uncertainty in Measurement (GUM) method is used to calculate the uncertainty of indirect measurement. The GUM method is the standard to calculate the uncertainty [11].
Arencibia adopted the GUM method in combination with the coordinate measuring machine to calculate the uncertainty of roundness or cylindricity errors. Considering the correlation of variables, the uncertainty of the measurand was calculated by the GUM method [12]. The use of calibrated parts in ISO/TC 155303 is also a method to calculate the uncertainty. In 2017, paper [13] compared the GUM method and the ISO/TC 155303 method of evaluating flatness error uncertainty about an optical flat side. The ISO/TC 155303 method needs the calibrated parts and longterm experiments and the result of the GUM method differs greatly with the ISO/TC 155303 method, which makes the ISO/TC 155303 method inappropriate to verify the GUM method. In addition to the GUM method and the ISO/TC 155303 method, the Monte Carlo method (MCM) is also used to calculate the uncertainty [14]. Combining the Monte Carlo method with the theory of error ellipse, the Monte Carlo method is proposed to estimate the measurement uncertainty of circular characteristics [15]. The MCM and Bayesian estimation were combined to calculate the uncertainty, and the Bayesian principle was used to analyze the prior distribution information related to the MCM [16]. The Monte Carlo method relies on the choice of the number of experiments, while the adaptive Monte Carlo method (AMCM) can increase the number of experiments until the results are stable. Fang et al. evaluated the uncertainty in the linear model and nonlinear model by the AMCM [17]. However, both the MCM and AMCM have strict requirements on the distributions of measure parameters. When the distributions of measure parameters are uncertain, the uncertainty obtained by the MCM and AMCM will be inaccurate. However, the MCM and AMCM can still be used to verify the GUM method. Wen et al. chose the GUM method to calculate the uncertainty of cylinder error and used the adaptive Monte Carlo method to verify the results of the GUM method [18]. Cao et al. adopted two verification ways of the MCM to verify the GUM method: the interval comparison and the probability comparison, both of which are appropriate verification ways [19]. First, they calculated the uncertainty of roughness in the GUM method. Then the result of the GUM method was verified in the AMCM by the interval comparison.
From what have been discussed above, because the middle line obtained by the Gaussian filter is uneven, it is not convenient to fit the curves. This paper adopts the Bspline smoothing filter, which can obtain the smooth middle line. In this situation, the effect of fitting the Bspline middle line is better. All current articles fit the entire middle line, which makes the residual sum of squares of curves fitting rather big. This paper piecewise fits the Bspline smoothing filter middle lines to reduce the residual sum of squares of curves fitting. Furthermore, the middle line is often fitted as the straight line, which also increases the residual sum of squares. This paper adopts the quadratic curve to fit the middle line so that the fitted curves more clearly reflect the trend of the middle lines. The model of roughness is established based on the two quadratic fitting curves of the middle line. When we obtain the roughness model, the formulas of the uncertainty in GUM can be obtained considering the correlation between variables in the model. Then we can get the value of the uncertainty by calculating the formulas of the uncertainty. Finally, the AMCM verifies the proposed GUM method. The main works of this paper are given as follows:(1)We adopt the Bspline smoothing filter to obtain the smooth middle line.(2)We propose a piecewise fitting method of the Bspline smoothing filter middle line.(3)Substituting the straight line, we use the quadratic curve to fit the middle line.(4)We apply our method to the Sshaped test part and employ the AMCM to verify the proposed GUM method.
The structure of this paper is as follows: In Section 2, the roughness middle line is extracted by Bspline filtering, the roughness middle line is fitted, and the mathematical model of roughness is established. In Section 3, the formula of the GUM method is obtained. In Section 4, an experiment on Sshaped test part roughness is presented, and the results by the GUM method and the AMCM are analyzed and discussed. Section 5 draws a conclusion that the GUM method to calculate the uncertainty by fitting Bspline filter assessment middle lines is valid.
2. The Roughness Model under the BSpline Filter
2.1. The Principle of the BSpline Filter
The roughness middle line obtained by the Bspline filter is smooth and the Bspline filter can remove the influence of noise. Therefore, comparing with the Gaussian filter, it is more convenient to extract the roughness middle line. Then the middle lines are piecewise fitted. The principle of the Bspline filter [20] is the combination of the IIR digital filter and the Bspline function, namely, the series of IIR digital filter and weighted average filter, as shown in Figure 1. The amplitude deviation between the roughness middle lines extracted by the Gaussian filter and the twostage cascade smooth Bspline filter is less than 1%, so the smooth Bspline filter with the twostage cascade is selected to calculate the middle lines of roughness [21]. The transfer function formula of is shown as follows [17]:where the subscript 2 of represents the twostage cascade and is actually the IIR digital filter function obtained based on . is obtained by the ztransform of the smooth Bspline coefficient . is the indirect Bspline transformation. The calculations of these variables are shown in Figure 1.
Assuming the horizontal coordinates of the sampling points are , the vertical coordinates are . is the number of the sampling points. According to the variational principles, the smooth processing of the Bspline filter is to determine the middle lines by calculating the minimum value of the following equation:where , , , is a positive parameter which is chosen according to the compromise processing between the data approximation and the filtering middle lines smoothing processing, and is the correction coefficient. By introducing the correction coefficient, the amplitude difference between the Bspline smoothing filter and Gaussian filter is decreased. is the interpolation function formed by the linear combination of Bspline basis functions. The interpolation function formula is defined as follows:where is the smoothing coefficient and is the Bspline function, which is defined aswhere is defined as follows:
The derivative formula of the interpolation function is given as follows:where is the firstorder difference operator.
The secondorder partial derivative formula can be obtained according to the same principle:where is the secondorder difference operator.
Putting (6) and (7) into the right of (2), then we have
and then substituting (8) and (9) into (2), there is
Then we can convert (10) into the form of an inner product. In order to minimize , we should take the derivative of and let it be equal to 0. Next converting into a zdomain expression, there is
and then the expression of is obtained. The expression of is shown as follows:
and in (1) is transformed as follows:
Because the formula iswhere is the polynomial of and , the result of is given as follows:
Put (15) into (13) and as we all knowwhere is the angular velocity and is the number of sampling points.
The frequency response is shown as follows:
Johannes P. F. [22] demonstrated that when , the result of the smooth Bspline filter is similar to the Gaussian filter. Therefore, let and put it into (17). It is generally stipulated that the frequency response of the filter should be 50%. The calculation relation of is shown as follows:
and then the Bspline filter with the twostage cascade is shown as follows:
2.2. The Algorithm of the BSpline Filter
is equivalent to the transfer function of the IIR digital filter. According to the principle of the IIR digital filter, is written as follows:
According to reference literature [23], can be decomposed into the product of two complementary factors:where is the amplitude of the two least conjugate complex roots of the characteristic polynomial of (20) and is the phase angle of the two least conjugate complex roots of the characteristic polynomial of (20).
Let be as follows:
Because is the IIR digital filter, the intermediate sequence of the IIR digital filter is set as . Equation (21) is transformed into the difference equation. Finally, the middle lines can be obtained through the indirect Bspline change. The process of obtaining the middle lines is shown as follows:
Because the Bspline filter is the twostage cascade calculation, we need to run (23) again. In this way, the smooth Bspline filter middle lines can be obtained.
2.3. The Roughness Model
The calculation formula of is shown as follows:where is the value of roughness, is the value of the peak of wave, and is the value of the trough of wave.
Suppose is the point of the peak of wave and is the point of the trough of wave. The middle lines are fitted according to the results of the Bspline filter. Because the trend of surface morphology is arbitrary and the trend of the middle line is also arbitrary, the residual sum of squares about curves fitting is rather big if we fit the whole Bspline filter middle line. Only the middle line near the segments of the peak of wave and the trough of wave has a big significance in later calculations. So we can only fit the middle lines near the segments of the peak of wave and the trough of wave. The residual sum of squares is relatively small in this method, which makes the fitted middle lines more representative. In this paper, a polynomial fitting method is used to obtain the middle lines expression near the peak and trough of wave. The higher the number of polynomials is, the more time will be consumed. Some useful information will be lost. For a normal surface, it is sufficient to use a quadratic curve to fit the expressions near the parts of the peak and trough of wave. In fact, we only need to fit the expressions of the two curves near the points of and . Suppose , is correct; then the fitted curves are
According to (25), the formula of roughness can be obtained as follows:
3. Uncertain Calculation Formula
The formula of the GUM method is as follows [24]:where .
According to formula (26), there are 10 variables: , and these variables are related to each other. Therefore, putting formula (26) into formula (27), we can obtain the calculation formula of roughness uncertainty shown as follows:
The uncertainty of roughness is as follows:
The calculation formulas of the above partial derivatives are
The uncertainty of roughness can be obtained by putting partial derivative formulas (40) into the above equations ((28)(39)).
4. Experiment of the SShaped Test Part
The Sshaped test part is the latest test part. The Sshaped test part can improve the defects of some samples with low processing precision. In recent years, the Sshaped test part [25, 26] has been studied by more and more researchers. The roughness data of the Sshaped test part is obtained by contact surface profiler 2300ARC. The least resolution of the profiler is 0.6 nm in the vertical direction and 1 μ in the horizontal direction. The measuring range of the profiler is 2000 . The temperature is controlled at °. The humidity is 65% RH. The Bspline filter was selected to process the original profile of the Sshaped test part, and at the same time we can obtain the roughness assessment middle line. When the contact surface profiler measures the roughness, it can obtain that the approximate is about 4 μ. The value is not accurate. It merely provides a basis for the choice of sample length and evaluating length. Because is about , we choose the sample length to be and the evaluating length to be . We select 5 groups of original contour data from the same position in Figure 2 to calculate the uncertainty of roughness.
By Bspline filtering, we can get 5 groups of roughness and their corresponding peaks and troughs of wave, as shown in Table 1.

The mean value of roughness calculated by Bspline filtering is . Then, the quadratic curve fitting is carried out at the positions of the peaks and troughs of wave. The coefficients of curve expressions are shown in Table 2.

In Table 2, is the quadratic term coefficient of the curve near the peaks of wave, is the first term coefficient of the curve near the peaks of wave, is the constant term coefficient of the curve near the peaks of wave, is the quadratic term coefficient of the curve near the troughs of wave, is the first term coefficient of the curve near the troughs of wave, and is the constant term coefficient of the curve near the troughs of wave. The roughness calculated by the curve fitting is shown in Table 3. By comparing the roughness calculated by the curve fitting with the roughness calculated by the Bspline filter, the results are shown in Table 3.
 
is the roughness calculated by the fitted curve; is the roughness calculated by the Bspline filter. 
It can be seen from Table 3 that the roughness calculated by the fitted curve is almost the same as the roughness calculated by the Bspline filter, indicating that the fitting curve effect is good. The roughness in Table 3 is approximately . It can be obtained by combining the values of 10 variables in Tables 1 and 2, and then the covariance matrix of these 10 variables can be calculated as shown in Table 4.

It can be seen from Table 4 that the variables are correlated, the correlations of these variables should be taken into account when calculating the uncertainty. Then, the above data is put into the uncertain calculation formula, and the result of uncertainty is . Subsequently, the GUM calculation results are verified by the AMCM. The results are shown in Table 5. The figure of uncertainty in the AMCM is shown in Figure 3.

In Figure 3, the two red dotted lines refer to the confidence lower limit of 2.5% and the confidence upper limit of 97.5%, respectively.
In Table 5, is the average roughness, is the uncertainty of roughness, and and are calculated according to the following formula:where is the left endpoint of the 95% confidence interval calculated by GUM, is the left endpoint of the 95% confidence interval calculated by the AMCM, is the right endpoint of the 95% confidence interval calculated by GUM, and is the right endpoint of the 95% confidence interval calculated by the AMCM.
Because and are less than the tolerance 0.05, it indicates that under the smooth Bspline filter the uncertainty obtained by the GUM method is validated. The uncertainty calculated by the GUM method is accurate and can be used in the industrial field.
5. Conclusions
In this paper, the roughness evaluation middle line is obtained by the Bspline filter. The roughness evaluation middle line expression is obtained by fitting the positions of the peaks and troughs of wave, respectively. The roughness calculated by the fitted roughness middle line is roughly the same as that obtained by the Bspline filter, which indicates that the roughness middle line expression is accurate. According to the expression of the roughness evaluation middle line, the uncertainty calculation formula of the GUM method is proposed. Finally, by the verification of the AMCM, it can be concluded that the GUM method under the Bspline filter model could be used to calculate the uncertainty of roughness.
By piecewise fitting quadratic curves of the Bspline filter assessment middle lines, the uncertainty of roughness is obtained. The tertiary or higher curves can be considered to fit the assessment middle lines in the future. In addition, the uncertainty of surface waviness can be carried out by extending this method.
Data Availability
The data of the roughness is obtained by profile surface morphology measuring instrument 2300ARC. By measuring 5group surface morphology of the Sshaped test part, we can extract the roughness from the 5group surface morphology using the Bspline filter. Because we only need a 4 mm evaluating length according to ISO 4681982, we select 4000 points of the data to calculate the roughness. The 4000 is calculated by the 4 mm evaluating length and the time interval of selecting one point. The time interval of selecting one point is 0.001 s. When we have obtained the roughness mathematical model, the uncertainty of roughness in the GUM method can be calculated.
Conflicts of Interest
The authors declare that they have no conflicts of interest.
Acknowledgments
The authors gratefully acknowledge the support of the open fund of the Tianjin Key Laboratory of Equipment Design and Manufacturing Technology (Tianjin University). This work was supported by the National Natural Science Foundation of China (No. 51675378) and the National Science and Technology Major Project of China (No. 2015ZX04005001).
References
 J. Nara, “Revision of international standard surface roughness,” Journal of the Japan Society of Precision Engineering, vol. 48, no. 2, pp. 262–267, 1982. View at: Google Scholar
 S. Ozturk, E. Kayabasi, E. Celik, and H. Kurt, “Determination of lapping parameters for silicon wafer using an artificial neural network,” Journal of Materials Science: Materials in Electronics, vol. 29, no. 1, pp. 260–270, 2018. View at: Publisher Site  Google Scholar
 P. De Groot, X. C. De Lega, and D. Grigg, “Step height measurements using a combination of a laser displacement gage and a broadband interferometric surface profiler,” in Proceedings of the Interferometry XI: Applications, vol. 4778, pp. 127–130, USA, July 2002. View at: Google Scholar
 G. Pawar, P. Pawlus, I. Etsion, and B. Raeymaekers, “The effect of determining topography parameters on analyzing elastic contact between isotropic rough surfaces,” Journal of Tribology, vol. 135, no. 1, article no 011401, pp. 1–10, 2013. View at: Google Scholar
 ISO 11562, ““Geometrical Product Specifications (GPS)Surface Texture: Profile MethodMetrological Characteristics of Phase Correct Filters,” 1996”. View at: Google Scholar
 J. XU, “Decreasing the amplitude characteristic deviation of gaussian filter in surface roughness measurements,” Chinese Journal of Mechanical Engineering, vol. 42, no. 04, pp. 42–46, 2006. View at: Publisher Site  Google Scholar
 Y. Kondo, M. Numada, H. Koshimizu, K. Kamiya, and I. Yoshida, “Lowpass filter without the end effect for estimating transmission characteristics—Simultaneous attaining of the end effect problem and guarantee of the transmission characteristics,” Precision Engineering, vol. 48, pp. 243–253, 2017. View at: Publisher Site  Google Scholar
 ISO/TS 1661022, ““Geometrical Product Specifications (GPS)FiltrationPart 22: Linear Profile Filters: Spline Filters,” 2003”. View at: Google Scholar
 R. Panda, G. S. Rath, and B. N. Chatterji, “Generalized Bspline signal processing,” Signal Processing, vol. 55, no. 1, pp. 1–14, 1996. View at: Publisher Site  Google Scholar
 X. Chen, H. Wang, Y. Cheng et al., “Calculation of misjudgment probability in product tests based on measurement uncertainty,” Mathematical Problems in Engineering, vol. 26, no. 14, pp. 1847–1850, 2017. View at: Google Scholar
 G. Nam, C. S. Kang, H. Y. So et al., “An uncertainty evaluation for multiple measurements by GUM, III: using a correlation coefficient,” Accreditation & Quality Assurance, vol. 14, no. 1, pp. 43–47, 2009. View at: Publisher Site  Google Scholar
 R. V. Arencibia, C. C. Souza, H. L. Costa et al., “Simplified model to estimate uncertainty in CMM,” Journal of the Brazilian Society of Mechanical Sciences & Engineering, vol. 37, no. 1, pp. 411–421, 2015. View at: Google Scholar
 B. Štrbac, V. Radlovački, V. SpasićJokić, M. Delić, and M. Hadžistević, “The Difference Between GUM and ISO/TC 155303 Method to Evaluate the Measurement Uncertainty of Flatness by a CMM,” Mapan  Journal of Metrology Society of India, vol. 32, no. 4, pp. 251–257, 2017. View at: Google Scholar
 R. P. Harti, M. Strobl, M. Morgano, J. Valsecchi, and C. Grünzweig, “Statistical uncertainty in the darkfield and transmission signal of grating interferometry,” Review of Scientific Instruments, vol. 88, no. 10, article no 103704, 2017. View at: Google Scholar
 Z. Du, M. Zhu, Z. Wu et al., “Measurement uncertainty on the circular features in coordinate measurement system based on the error ellipse and Monte Carlo methods,” Measurement Science Technology, vol. 27, no. 12, Article ID 125016, 2016. View at: Google Scholar
 A. B. Forbes, “An MCMC algorithm based on GUM Supplement 1 for uncertainty evaluation,” Measurement, vol. 45, no. 5, pp. 1188–1199, 2012. View at: Publisher Site  Google Scholar
 L. Andolfatto, J. R. R. Mayer, and S. Lavernhe, “Adaptive Monte Carlo applied to uncertainty estimation in a five axis machine tool link errors identification,” The International Journal of Machine Tools and Manufacture, vol. 51, no. 78, pp. 618–627, 2011. View at: Publisher Site  Google Scholar
 X.L. Wen, Y.B. Zhao, D.X. Wang, and J. Pan, “Adaptive Monte Carlo and GUM methods for the evaluation of measurement uncertainty of cylindricity error,” Precision Engineering, vol. 37, no. 4, pp. 856–864, 2013. View at: Publisher Site  Google Scholar
 Y. Cao, H. Y. Chen, and J. Han, “The study on the verification method of measurement uncertainty evaluation of GUM by MCM,” Journal of Astronautic Metrology and Measurement, vol. 32, no. 2, pp. 75–78, 2012. View at: Google Scholar
 M. Ren, J. Liang, and B. Wei, “Accurate Bsplinebased 3D interpolation scheme for digital volume correlation,” Review of Scientific Instruments, vol. 87, no. 12, p. 125114, 2016. View at: Publisher Site  Google Scholar
 H. Zhang, Y. Yuan, and W. Piao, “The spline filter: A regularization approach for the Gaussian filter,” Precision Engineering, vol. 36, no. 4, pp. 586–592, 2012. View at: Publisher Site  Google Scholar
 J. P. F. D'Haeyer, “Gaussian filtering of images: A regularization approach,” Signal Processing, vol. 18, no. 2, pp. 169–181, 1989. View at: Publisher Site  Google Scholar
 J. B. Xu, Y. B. Yuan, and B. Liu, “Establishment of mean line in surface metrology by Bspline filter,” Optics & Precision Engineering, vol. 16, no. 8, pp. 1411–1415, 2008. View at: Google Scholar
 Yinbao Cheng, Xiaohuai Chen, Hongli Li et al., “Analysis and Comparison of Bayesian Methods for Measurement Uncertainty Evaluation,” Mathematical Problems in Engineering, vol. 2018, Article ID 7509046, 10 pages, 2018. View at: Publisher Site  Google Scholar  MathSciNet
 W. Wang, Z. Jiang, W. Tao, and W. Zhuang, “A new test part to identify performance of fiveaxis machine tool—part I: geometrical and kinematic characteristics of S part,” The International Journal of Advanced Manufacturing Technology, vol. 79, no. 58, pp. 729–738, 2015. View at: Publisher Site  Google Scholar
 W. Wang, Z. Jiang, Q. Li, and W. Tao, “A new test part to identify performance of fiveaxis machine toolPart II validation of S part,” The International Journal of Advanced Manufacturing Technology, vol. 79, no. 58, pp. 739–756, 2015. View at: Publisher Site  Google Scholar
Copyright
Copyright © 2019 Gaiyun He et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.