# The Calculation of Roughness Uncertainty by Fitting B-Spline Filter Assessment Middle Lines

Authors: Gaiyun He; Chenhui Liu; Yicun Sang; Xiaochen Sun
Journal: Mathematical Problems in Engineering
 (2019)

---

## 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 B-spline filter assessment middle lines. A B-spline smoothing filter is selected to determine the assessment middle line of roughness. The B-spline 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 B-spline filter middle lines as the quadratic curves. The S-shaped test part is used to verify the model of roughness uncertainty.


---

## Body

## 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 468-1982 in 1982 [1]. This standard stipulates some evaluation parameters of surface roughness, such as RaandRz, 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 first-order 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 B-spline smoothing filter is proposed to obtain the middle line for the roughness evaluation. In ISO/TS 16610-22, the B-spline filter middle line was also adopted as a standard to evaluate the roughness [8]. The middle line obtained by the B-spline smoothing filter is relatively smooth, which is convenient for fitting the middle line subsequently. Generalized B-spline signal processing was proposed to process the band limited signals. The principle of the B-spline filter was given in detail [9]. Considering the smoothness of the B-spline 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 A-type 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 15530-3 is also a method to calculate the uncertainty. In 2017, paper [13] compared the GUM method and the ISO/TC 15530-3 method of evaluating flatness error uncertainty about an optical flat side. The ISO/TC 15530-3 method needs the calibrated parts and long-term experiments and the result of the GUM method differs greatly with the ISO/TC 15530-3 method, which makes the ISO/TC 15530-3 method inappropriate to verify the GUM method. In addition to the GUM method and the ISO/TC 15530-3 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 B-spline smoothing filter, which can obtain the smooth middle line. In this situation, the effect of fitting the B-spline 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 B-spline 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 B-spline smoothing filter to obtain the smooth middle line.(2)
We propose a piecewise fitting method of the B-spline 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 S-shaped test part and employ the AMCM to verify the proposed GUM method.The structure of this paper is as follows: In Section2, the roughness middle line is extracted by B-spline 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 S-shaped 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 B-spline filter assessment middle lines is valid.


## 2. The Roughness ModelRz under the B-Spline Filter

### 2.1. The Principle of the B-Spline Filter

The roughness middle line obtained by the B-spline filter is smooth and the B-spline 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 B-spline filter [20] is the combination of the IIR digital filter and the B-spline 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 two-stage cascade smooth B-spline filter is less than 1%, so the smooth B-spline filter with the two-stage cascade is selected to calculate the middle lines of roughness [21]. The transfer function formula of Hμ23 is shown as follows [17]:(1)Hμ23z=pμ3zB13z2,where the subscript 2 of Hμ23(z) represents the two-stage cascade and pμ3(z) is actually the IIR digital filter function obtained based on C(z). C(z) is obtained by the z-transform of the smooth B-spline coefficient C(i). B13(z) is the indirect B-spline transformation. The calculations of these variables are shown in Figure 1.Figure 1
B-spline filter.Assuming the horizontal coordinates of the sampling points(xi,yi) are x1,x2,…,xn, the vertical coordinates are y1,y2,…,yn. n is the number of the sampling points. According to the variational principles, the smooth processing of the B-spline filter is to determine the middle lines s(xi) by calculating the minimum value of the following equation:(2)εs2=∑i=1nyi-sxi2+μ∫x1xn∂2sxi∂x22+τdsxidxdx=εa2+μεr2+μτεv2,where εa2=∑i=1n(yi-sxi)2, εr2=∫x1xn∂2sxi/∂x22dx, εv2=∫x1xn(ds(xi)/dx)dx, μ 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 B-spline smoothing filter and Gaussian filter is decreased. s(xi) is the interpolation function formed by the linear combination of B-spline basis functions. The interpolation function formula is defined as follows:(3)snxi=∑i=-∞+∞Ciβnx-i,where C(i) is the smoothing coefficient and βn(x) is the B-spline function, which is defined as(4)βnx=∑i=0n+1-1in!n+1ix+n+12-i+n,where (x+n+1/2-i)+n is defined as follows:(5)x+n+12-i+n=x+n+12-inx+n+12-i≥00x+n+12-i<0.The derivative formula of the interpolation functions(xi) is given as follows:(6)∂snxi∂xi=∑i=-∞∞Ci-Ci-1βn-1x-i+12=∑i=-∞∞d1∗Ciβn-1x-i+12,where d(1)(i)=δ0(i)-δ0(i-1) is the first-order difference operator.The second-order partial derivative formula can be obtained according to the same principle:(7)∂2snxi∂xi2=∑i=-∞∞Ci+1-2Ci+Ci-1βn-2x-i=∑i=-∞∞d2∗Ciβn-2x-i,where d(2)(i)=δ0(i+1)-2δ0(i)+δ0(i-1) is the second-order difference operator.Putting (6) and (7) into the right of (2), then we have(8)εr2=∑i=1nd2∗Cid2∗Ci∗b13i,(9)εv2=∑i=1nd1∗Cid1∗Ci∗b13i,and then substituting (8) and (9) into (2), there is(10)εs2=∑i=1nyi-b13i∗Ci2+μ∑i=1nd2∗Cid2∗Ci∗b13i+μτ∑i=1nd1∗Cid1∗Ci∗b13i.Then we can convert (10) into the form of an inner product. In order to minimize εs2, we should take the derivative of C(i) and let it be equal to 0. Next converting C(i) into a z-domain expression, there is(11)Cz=1B13z+μz-2+z-12+τ2-z-z-1Yz=pμ3zYz,and then the expression ofC(z) is obtained. The expression of pμ3(z) is shown as follows:(12)pμ3z=1B13z+μz-2+z-12+τ2-z-z-1,andHμ23 in (1) is transformed as follows:(13)Hμ23z=pμ3zB13z2=B13zB13z+μz-2+z-12+τ2-z-z-12.Because the formulaB13(z) is(14)B13z=z2·A3z3!,where A3(z) is the polynomial of z-1 and A3(z)=z-1+4z-2+z-3, the result of B13(z) is given as follows:(15)B13z=z2·A3z3!=z2·z-1+4z-2+z-36=z+4+z-16.Put (15) into (13) and as we all know(16)z+z-1=2cos⁡ωω=2πn,where ω is the angular velocity and n is the number of sampling points.The frequency responseHμ13(n) is shown as follows:(17)Hμ13n=pμ3zB13z=2+cos⁡2π/n2+cos⁡2π/n+3μ2cos⁡2π/n-22+τ2-2cos⁡2π/n.Johannes P. F. [22] demonstrated that when τ=1/μ, the result of the smooth B-spline filter is similar to the Gaussian filter. Therefore, let τ=1/μ 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:(18)2+cos⁡2π/n2+cos⁡2π/n+3μ2cos⁡2π/n-22+1/μ2-2cos⁡2π/n=12,and then the B-spline filter with the two-stage cascade is shown as follows:(19)Hμ23z=pμ3zB13z2=B13zB13z+μz-2+z-12+1/μ2-z-z-12B13z=z+4+z-16.


### 2.2. The Algorithm of the B-Spline Filter

p μ 3 ( z ) is equivalent to the transfer function of the IIR digital filter. According to the principle of the IIR digital filter, pμ3(z) is written as follows:(20)pμ3z=6z+4+z-1+6μz-2+z-12+1/μ2-z-z-1.According to reference literature [23], pμ3(z) can be decomposed into the product of two complementary factors:(21)pμ3z=1-2ρcos⁡ω+ρ21-2ρcos⁡ωz-1+ρ2z-2·1-2ρcos⁡ω+ρ21-2ρcos⁡ωz+ρ2z2=p′z′p1z,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).LetA,B1,B2 be as follows:(22)A=1-2ρcos⁡ω+ρ2B1=2ρcos⁡ωB2=-ρ2.Becausepμ3(z) is the IIR digital filter, the intermediate sequence of the IIR digital filter is set as wz(i). Equation (21) is transformed into the difference equation. Finally, the middle lines can be obtained through the indirect B-spline change. The process of obtaining the middle lines s(xi) is shown as follows:(23)ωzi=Ayi+B1ωzi-1+B2ωzi-2;i=3,4,…,NCN-i+1=AωzN-i+1+B1ωzN-i+2+B2ωzN-i+3;i=3,4,…,Nsxi=16Ci-1+23Ci+16Ci+1;i=4,5,…,N.Because the B-spline filter is the two-stage cascade calculation, we need to run (23) again. In this way, the smooth B-spline filter middle lines s(xi) can be obtained.


### 2.3. The Roughness Model

The calculation formula ofRz is shown as follows:(24)Rz=Rp+Rm,where Rz is the value of roughness, Rp is the value of the peak of wave, and Rm is the value of the trough of wave.Suppose(x′,y′) is the point of the peak of wave and (x′′,y′′) is the point of the trough of wave. The middle lines are fitted according to the results of the B-spline 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 B-spline 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 (x′,y′) and (x′′,y′′). Suppose xi<x′≤xi+m, xj<x′′≤xj+m is correct; then the fitted curves are(25)ri=aix2+bix+ci,xi<x′≤xi+mrj=ajx2+bjx+cj,xj<x′′≤xj+m.According to (25), the formula of roughness Rz can be obtained as follows:(26)Rz=Rp+Rm=y′-aix′2-bix′-ci+ajx′′2+bjx′′+cj-y′′=y′-y′′+ajx′′2-aix′2+bjx′′-bix′+cj-ci.


## 2.1. The Principle of the B-Spline Filter

The roughness middle line obtained by the B-spline filter is smooth and the B-spline 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 B-spline filter [20] is the combination of the IIR digital filter and the B-spline 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 two-stage cascade smooth B-spline filter is less than 1%, so the smooth B-spline filter with the two-stage cascade is selected to calculate the middle lines of roughness [21]. The transfer function formula of Hμ23 is shown as follows [17]:(1)Hμ23z=pμ3zB13z2,where the subscript 2 of Hμ23(z) represents the two-stage cascade and pμ3(z) is actually the IIR digital filter function obtained based on C(z). C(z) is obtained by the z-transform of the smooth B-spline coefficient C(i). B13(z) is the indirect B-spline transformation. The calculations of these variables are shown in Figure 1.Figure 1
B-spline filter.Assuming the horizontal coordinates of the sampling points(xi,yi) are x1,x2,…,xn, the vertical coordinates are y1,y2,…,yn. n is the number of the sampling points. According to the variational principles, the smooth processing of the B-spline filter is to determine the middle lines s(xi) by calculating the minimum value of the following equation:(2)εs2=∑i=1nyi-sxi2+μ∫x1xn∂2sxi∂x22+τdsxidxdx=εa2+μεr2+μτεv2,where εa2=∑i=1n(yi-sxi)2, εr2=∫x1xn∂2sxi/∂x22dx, εv2=∫x1xn(ds(xi)/dx)dx, μ 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 B-spline smoothing filter and Gaussian filter is decreased. s(xi) is the interpolation function formed by the linear combination of B-spline basis functions. The interpolation function formula is defined as follows:(3)snxi=∑i=-∞+∞Ciβnx-i,where C(i) is the smoothing coefficient and βn(x) is the B-spline function, which is defined as(4)βnx=∑i=0n+1-1in!n+1ix+n+12-i+n,where (x+n+1/2-i)+n is defined as follows:(5)x+n+12-i+n=x+n+12-inx+n+12-i≥00x+n+12-i<0.The derivative formula of the interpolation functions(xi) is given as follows:(6)∂snxi∂xi=∑i=-∞∞Ci-Ci-1βn-1x-i+12=∑i=-∞∞d1∗Ciβn-1x-i+12,where d(1)(i)=δ0(i)-δ0(i-1) is the first-order difference operator.The second-order partial derivative formula can be obtained according to the same principle:(7)∂2snxi∂xi2=∑i=-∞∞Ci+1-2Ci+Ci-1βn-2x-i=∑i=-∞∞d2∗Ciβn-2x-i,where d(2)(i)=δ0(i+1)-2δ0(i)+δ0(i-1) is the second-order difference operator.Putting (6) and (7) into the right of (2), then we have(8)εr2=∑i=1nd2∗Cid2∗Ci∗b13i,(9)εv2=∑i=1nd1∗Cid1∗Ci∗b13i,and then substituting (8) and (9) into (2), there is(10)εs2=∑i=1nyi-b13i∗Ci2+μ∑i=1nd2∗Cid2∗Ci∗b13i+μτ∑i=1nd1∗Cid1∗Ci∗b13i.Then we can convert (10) into the form of an inner product. In order to minimize εs2, we should take the derivative of C(i) and let it be equal to 0. Next converting C(i) into a z-domain expression, there is(11)Cz=1B13z+μz-2+z-12+τ2-z-z-1Yz=pμ3zYz,and then the expression ofC(z) is obtained. The expression of pμ3(z) is shown as follows:(12)pμ3z=1B13z+μz-2+z-12+τ2-z-z-1,andHμ23 in (1) is transformed as follows:(13)Hμ23z=pμ3zB13z2=B13zB13z+μz-2+z-12+τ2-z-z-12.Because the formulaB13(z) is(14)B13z=z2·A3z3!,where A3(z) is the polynomial of z-1 and A3(z)=z-1+4z-2+z-3, the result of B13(z) is given as follows:(15)B13z=z2·A3z3!=z2·z-1+4z-2+z-36=z+4+z-16.Put (15) into (13) and as we all know(16)z+z-1=2cos⁡ωω=2πn,where ω is the angular velocity and n is the number of sampling points.The frequency responseHμ13(n) is shown as follows:(17)Hμ13n=pμ3zB13z=2+cos⁡2π/n2+cos⁡2π/n+3μ2cos⁡2π/n-22+τ2-2cos⁡2π/n.Johannes P. F. [22] demonstrated that when τ=1/μ, the result of the smooth B-spline filter is similar to the Gaussian filter. Therefore, let τ=1/μ 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:(18)2+cos⁡2π/n2+cos⁡2π/n+3μ2cos⁡2π/n-22+1/μ2-2cos⁡2π/n=12,and then the B-spline filter with the two-stage cascade is shown as follows:(19)Hμ23z=pμ3zB13z2=B13zB13z+μz-2+z-12+1/μ2-z-z-12B13z=z+4+z-16.


## 2.2. The Algorithm of the B-Spline Filter

p μ 3 ( z ) is equivalent to the transfer function of the IIR digital filter. According to the principle of the IIR digital filter, pμ3(z) is written as follows:(20)pμ3z=6z+4+z-1+6μz-2+z-12+1/μ2-z-z-1.According to reference literature [23], pμ3(z) can be decomposed into the product of two complementary factors:(21)pμ3z=1-2ρcos⁡ω+ρ21-2ρcos⁡ωz-1+ρ2z-2·1-2ρcos⁡ω+ρ21-2ρcos⁡ωz+ρ2z2=p′z′p1z,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).LetA,B1,B2 be as follows:(22)A=1-2ρcos⁡ω+ρ2B1=2ρcos⁡ωB2=-ρ2.Becausepμ3(z) is the IIR digital filter, the intermediate sequence of the IIR digital filter is set as wz(i). Equation (21) is transformed into the difference equation. Finally, the middle lines can be obtained through the indirect B-spline change. The process of obtaining the middle lines s(xi) is shown as follows:(23)ωzi=Ayi+B1ωzi-1+B2ωzi-2;i=3,4,…,NCN-i+1=AωzN-i+1+B1ωzN-i+2+B2ωzN-i+3;i=3,4,…,Nsxi=16Ci-1+23Ci+16Ci+1;i=4,5,…,N.Because the B-spline filter is the two-stage cascade calculation, we need to run (23) again. In this way, the smooth B-spline filter middle lines s(xi) can be obtained.


## 2.3. The Roughness Model

The calculation formula ofRz is shown as follows:(24)Rz=Rp+Rm,where Rz is the value of roughness, Rp is the value of the peak of wave, and Rm is the value of the trough of wave.Suppose(x′,y′) is the point of the peak of wave and (x′′,y′′) is the point of the trough of wave. The middle lines are fitted according to the results of the B-spline 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 B-spline 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 (x′,y′) and (x′′,y′′). Suppose xi<x′≤xi+m, xj<x′′≤xj+m is correct; then the fitted curves are(25)ri=aix2+bix+ci,xi<x′≤xi+mrj=ajx2+bjx+cj,xj<x′′≤xj+m.According to (25), the formula of roughness Rz can be obtained as follows:(26)Rz=Rp+Rm=y′-aix′2-bix′-ci+ajx′′2+bjx′′+cj-y′′=y′-y′′+ajx′′2-aix′2+bjx′′-bix′+cj-ci.


## 3. Uncertain Calculation Formula

The formula of the GUM method is as follows [24]:(27)u2f≈∑i=1n∂f∂xi2u2xi+2∑i=1n-1∑j=i+1n∂f∂xi∂f∂xjcovxi,xj,where f=Rz.According to formula (26), there are 10 variables: (x′,y′,x′′,y′′,ai,bi,ci,aj,bj,cj), 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:(28)u12Rz=∂f∂x′2u2x′+∂f∂x′′2u2x′′+∂f∂y′2u2y′+∂f∂y′′2u2y′′+∂f∂ai2u2ai+∂f∂bi2u2bi+∂f∂ci2u2ci+∂f∂aj2u2aj+∂f∂bj2u2bj+∂f∂cj2u2cj(29)u22Rz=2∂f∂x′∂f∂x′′rx′,x′′ux′ux′′+2∂f∂x′∂f∂y′rx′,y′ux′uy′+2∂f∂x′∂f∂y′′rx′,y′′ux′uy′′+2∂f∂x′∂f∂airx′,aiux′uai+2∂f∂x′∂f∂birx′,biux′ubi+2∂f∂x′∂f∂cirx′,ciux′uci+2∂f∂x′∂f∂ajrx′,ajux′uaj+2∂f∂x′∂f∂bjrx′,bjux′ubj+2∂f∂x′∂f∂cjrx′,cjux′ucj(30)u32Rz=2∂f∂x′′∂f∂y′rx′′,y′ux′′uy′+2∂f∂x′′∂f∂y′′rx′′,y′′ux′′uy′′+2∂f∂x′′∂f∂airx′,aiux′uai+2∂f∂x′′∂f∂birx′′,biux′′ubi+2∂f∂x′′∂f∂cirx′′,ciux′′uci+2∂f∂x′′∂f∂ajrx′′,ajux′′uaj+2∂f∂x′′∂f∂bjrx′′,bjux′′ubj+2∂f∂x′′∂f∂cjrx′′,cjux′′ucj(31)u42Rz=2∂f∂y′∂f∂y′′ry′,y′′uy′uy′′+2∂f∂y′∂f∂airy′,aiuy′uai+2∂f∂y′∂f∂biry′,biuy′ubi+2∂f∂y′∂f∂ciry′,ciuy′uci+2∂f∂y′∂f∂ajry′,ajuy′uaj+2∂f∂y′∂f∂bjry′,bjuy′ubj+2∂f∂y′∂f∂cjry′,cjuy′ucj(32)u52Rz=2∂f∂y′′∂f∂airy′′,aiuy′′uai+2∂f∂y′′∂f∂biry′′,biuy′′ubi+2∂f∂y′′∂f∂ciry′′,ciuy′′uci+2∂f∂y′′∂f∂ajry′′,ajuy′′uaj+2∂f∂y′′∂f∂bjry′′,bjuy′′ubj+2∂f∂y′′∂f∂cjry′′,cjuy′′ucj(33)u62Rz=2∂f∂ai∂f∂birai,biuaiubi+2∂f∂ai∂f∂cirai,ciuaiuci+2∂f∂ai∂f∂ajrai,ajuaiuaj+2∂f∂ai∂f∂bjrai,bjuaiubj+2∂f∂ai∂f∂cjrai,cjuaiucj(34)u72Rz=2∂f∂bi∂f∂cirbi,ciubiuci+2∂f∂bi∂f∂ajrbi,ajubiuaj+2∂f∂bi∂f∂bjrbi,bjubiubj+2∂f∂bi∂f∂cjrbi,cjubiucj(35)u82Rz=2∂f∂ci∂f∂ajrci,ajuciuaj+2∂f∂ci∂f∂bjrci,bjuciubj+2∂f∂ci∂f∂cjrci,cjuciucj(36)u92Rz=2∂f∂aj∂f∂bjraj,bjuajubj+2∂f∂aj∂f∂cjraj,cjuajucj(37)u102Rz=2∂f∂bj∂f∂cjrbj,cjubjucj,(38)u2Rz=u12Rz+u22Rz+u32Rz+u42Rz+u52Rz+u62Rz+u72Rz+u82Rz+u92Rz+u102Rz.The uncertainty of roughness is as follows:(39)u=u2Rz.The calculation formulas of the above partial derivatives are(40)∂f∂x′=-2aix′;∂f∂y′=1;∂f∂x′′=2ajx′′;∂f∂y′′=-1;∂f∂ai=-x′2;∂f∂bi=-x′;∂f∂ci=-1;∂f∂aj=x′′2;∂f∂bj=x′′;∂f∂cj=1.The uncertainty of roughness can be obtained by putting partial derivative formulas (40) into the above equations ((28)-(39)).


## 4. Experiment of the S-Shaped Test Part

The S-shaped test part is the latest test part. The S-shaped test part can improve the defects of some samples with low processing precision. In recent years, the S-shaped test part [25, 26] has been studied by more and more researchers. The roughness data of the S-shaped test part is obtained by contact surface profiler 2300A-RC. The least resolution of the profiler is 0.6 nm in the vertical direction and 1 μm in the horizontal direction. The measuring range of the profiler is 2000 μm. The temperature is controlled at 20±0.5°C. The humidity is 65% RH. The B-spline filter was selected to process the original profile of the S-shaped 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 Rz is about 4 μm. The value is not accurate. It merely provides a basis for the choice of sample length and evaluating length. Because Rz is about 4μm, we choose the sample length to be lr=0.8mm and the evaluating length to be ln=5×0.8mm=4mm. We select 5 groups of original contour data from the same position in Figure 2 to calculate the uncertainty of roughness.Figure 2
The experiment of the S-shaped test part in the contact surface profiler.By B-spline filtering, we can get 5 groups of roughness and their corresponding peaks and troughs of wave, as shown in Table1.Table 1
The roughnessRz calculated by the B-spline filter and the peak and trough of wave.
Group R z   ( μ m ) The peak of wave(x′mm,y′μm) The trough of wave(x′′mm,y′′μm) The 1st group 3.729619877 (36.169,-351.446) (32.872,-407.965) The 2nd group 3.655747609 (36.17,-351.873) (32.891,-408.881) The 3rd group 3.919482219 (36.171,-351.934) (32.924,-409.857) The 4th group 3.882077733 (36.155,-352.789) (32.922,-409.857) The 5th group 3.998053294 (36.17,-351.995) (32.894,-409.369)The mean value of roughness calculated by B-spline filtering is3.836996μm. 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.Table 2
The coefficients of curve expressions.
Group a i b i c i a j b j c j The 1st group -0.3786 70.58061 -2410.25 15.76853 -1055.57 17254.2 The 2nd group -0.18266 56.42815 -2155.18 15.98427 -1069.8 17488.21 The 3rd group -0.18455 56.49746 -2155.4 16.40002 -1097.27 17941.64 The 4th group -0.21734 58.79811 -2195.78 16.49491 -1103.57 18046.22 The 5th group -0.90929 108.7225 -3096.28 16.09381 -1077.16 17611.49In Table2, ai is the quadratic term coefficient of the curve near the peaks of wave, bi is the first term coefficient of the curve near the peaks of wave, ci is the constant term coefficient of the curve near the peaks of wave, aj is the quadratic term coefficient of the curve near the troughs of wave, bj is the first term coefficient of the curve near the troughs of wave, and cj 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 B-spline filter, the results are shown in Table 3.Table 3
The comparison of roughness calculated by the B-spline filter and the fitted curve.
Group R z 1   ( μ m ) R z 2   ( μ m ) Difference(μm) The 1st group 3.729619905 3.729619877 2.8E-08 The 2nd group 3.65574764 3.655747609 3.1E-08 The 3rd group 3.919482247 3.919482219 2.82674E-08 The 4th group 3.882077773 3.882077733 4E-08 The 5th group 3.998053335 3.998053294 4.1E-08 Mean 3.83699618 3.836996146 3.36535E-08 R z 1 is the roughness calculated by the fitted curve; Rz2 is the roughness calculated by the B-spline filter.It can be seen from Table3 that the roughness calculated by the fitted curve is almost the same as the roughness calculated by the B-spline filter, indicating that the fitting curve effect is good. The roughness in Table 3 is approximately r=3.836996μm. It can be obtained by combining the values of 10 variables (x′,y′,x′′,y′′,ai,bi,ci,aj,bj,cj) in Tables 1 and 2, and then the covariance matrix of these 10 variables can be calculated as shown in Table 4.Table 4
The covariance matrix.
Variables x ′ y ′ x ′ ′ y ′ ′ a i b i c i a j b j c j x ′ 0.00005 0.0028 -0.0001 0.0020 -0.0005 0.0393 -0.7118 -0.0011 0.0754 -1.2451 y ′ 0.0028 0.2374 -0.0081 0.2998 -0.0230 1.6866 -30.788 -0.1221 8.0681 -133.17 x ′ ′ -0.0001 -0.0081 0.0005 -0.0167 0.0024 -0.1744 3.1581 0.0065 -0.4309 7.1076 y ′ ′ 0.0020 0.2998 -0.0167 0.6295 -0.0204 1.5149 -27.897 -0.2263 14.955 -246.78 a i -0.0005 -0.0230 0.0024 -0.0204 0.0959 -6.9100 124.48 0.0254 -1.6618 27.212 b i 0.0393 1.6866 -0.1744 1.5149 -6.9100 497.89 -8969.5 -1.8464 120.91 -1980.1 c i -0.7118 -30.788 3.1581 -27.897 124.48 -8969.5 161587 33.508 -2194.3 35938 a j -0.0011 -0.1221 0.0065 -0.2263 0.0254 -1.8464 33.508 0.0894 -5.9050 97.422 b j 0.0754 8.0681 -0.4309 14.955 -1.6618 120.91 -2194.3 -5.9050 390.04 -6435 c j -1.2451 -133.17 7.1076 -246.78 27.212 -1980.1 35938. 97.422 -6435 106167It can be seen from Table4 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 u=0.1408μm. 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.Table 5
The verification of GUM in the AMCM.
Methods R z ¯  ( μ m ) u  ( μ m ) 95% confidence interval(μm) d l o w  ( μ m ) d h i g h  ( μ m ) GUM 3.836996 0.1408 [ 3.5554,4.118 6 ] 0.01886 0.013489 AMCM 3.838437 0.1412 [ 3.5743 , 4.105 1 ]Figure 3
The uncertainty calculated by the AMCM.In Figure3, the two red dotted lines refer to the confidence lower limit of 2.5% and the confidence upper limit of 97.5%, respectively.In Table5, Rz¯ is the average roughness, u is the uncertainty of roughness, and dlow and dhigh are calculated according to the following formula:(41)dlow=fdown-flowdhigh=fup-fhigh,where fdown is the left endpoint of the 95% confidence interval calculated by GUM, flow is the left endpoint of the 95% confidence interval calculated by the AMCM, fup is the right endpoint of the 95% confidence interval calculated by GUM, and fhigh is the right endpoint of the 95% confidence interval calculated by the AMCM.Becausedlow and dhigh are less than the tolerance 0.05, it indicates that under the smooth B-spline 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 B-spline 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 B-spline 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 B-spline filter model could be used to calculate the uncertainty of roughness.By piecewise fitting quadratic curves of the B-spline 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.



---

*Source: 6913215-2019-02-11.xml*