Analysis of the applicability of filtration methods for coordinate measurements

At present, surface metrology solves such important tasks as monitoring the production process and optimizing the exploitation of parts. A significant part of the measurements is performed by a contact method using Coordinate Measuring Machines. One of the important steps in the processing of measurement information is the filtration of the received signal. The existing standards regulate only the processes of measuring roundness and roughness. Therefore, researches on the applicability of filtration methods in the general case for coordinate measurements are relevant. Based on the review presented in the article, the filters that have received the greatest application in other fields of technology are defined by the strategy of their application for coordinate measurements. It is recommended to use the following sequence: elimination of gross errors based on the Grubbs' test, discrete Fourier transform for revealing systematic errors, elimination of systematic errors from the signal, minimization of the random error with the bilateral Gaussian filter, surface reconstruction after filtering based on inverse Fourier transform. The above example of signal filtering for flatness confirmed the effectiveness of the proposed approach.


Introduction
The measured signal on Coordinate Measuring Machines (CMM) is a set of coordinates of points in space.When processing a measured signal, it often becomes necessary to remove noise, which is the sum of the random error of the measuring instrument and the surface roughness.An obligatory step in signal processing is the elimination of gross errors.Also in some cases it is useful to identify systematic components of the error of the surface of the part to establish the causes of their occurrence during processing.
Currently, there are no generally accepted recommendations for filtering the signal when measuring CMM.Only a few papers [1][2][3][4][5] on this problem are known.Therefore, it is advisable to follow the ISO 16610-1:2015 standard and the analogy with the problems of measuring roundness and roughness, considered in [6][7][8][9].So to measure the roughness, Gaussian linear filter is used [10], and for roundness -harmonic analysis based on the Discrete Fourier Transform (DFT) [11].There are two types of filtration -spatial and temporal.In metrology of surfaces, spatial filtration is traditionally used.The Gaussian filter refers to linear methods of spatial filtration, while the Fourier transform is applied to frequency methods.
The problems associated with noise cancellation arise when processing images.There are extensive studies and developed a variety of filtering methods for image processing tasks.These methods can be used to filter the measured signal on the CMM.Among the known methods, the following directions can be distinguished: wavelet transforms [12][13][14], bilateral filter [15][16][17] and smoothing spline [18][19][20].

Strategy of applying filters
Filtering the signal when measuring on the CMM is designed to solve the following tasks: 1) elimination of gross measurement errors; 2) minimization of random errors of the touch sensor; 3) identification and exclusion of imperfections in the surface; 4) identification of systematic errors in the surface; 5) excluding the surface roughness from consideration.
The mutual relationship between surface and measurement errors and the filtration methods used is shown in Fig. 1.It shows that there is no single filtering method that can solve all the necessary tasks.Therefore, it is advisable to select two or three filters to obtain the most effective solution to the required problem.The definite difficulty lies in the separation of errors that have a different physical cause, but a similar manifestation and a math-thematic description.Such cases include: errors of the touch sensor and surface roughness; gross measurement errors and surface imperfections.In the first case, both errors are random.However, the surface roughness is a real geometric object, but the error of the touch sensor is due to the difference in the fixation of the moment of contact in different directions and the oscillations in the system.
In the second case, there are individual dimensions that drop out of the general series.On the one hand, it can be gross measurement errors caused by subjective reasons.On the other hand, imperfections can objectively be present on the surface.The concept of imperfections in the surface and their classification are given in the standard ISO 8785:1998.Cluster analysis can be used to separate gross errors and surface imperfections.A gross error is a single ejection from a common set of measurements.The surface imperfections have a certain length and are manifested in several measured points.Standard ISO 5725-2:1994 recommends the use of the Grubbs' test determine gross errors.
When measuring roughness, a linear Gaussian filter with a 75% bandwidth is used [10].Evaluation of the geometry of the surface assumes the account of irregularities with certain wavelengths and exclusion of other irregularities from consideration.When allocating the roughness profile is cut out of a total waviness and form deviations.In this case, the term filtering implies the separation of profile components into components with different wavelengths.At the same time, the use of linear filtering methods does not allow us to obtain an acceptable solution if the signal and noise spectra overlap.In these cases, the optimal solution is a nonlinear filter.
Known methods for nonlinear low-pass filtering are wavelet transforms [12][13][14], bilateral filter [15][16][17], and smoothing spline [20].The most promising one should be considered a bilateral spline, which is a further development of the linear Gaussian filter and having two optimization parameters.

Elimination of gross errors
The results of measurements containing gross errors can distort the geometric model and correctly determine the dimensions and form of the parts in a significant way.Therefore, as the first step of filtering, it is precisely the elimination of gross errors.
Most of the existing criteria for rejecting those who get out of the general series of data are based on the assumption that the measured random variables belong to the normal law.These criteria include simple Grubbs' tests, used to test the anomalousness of the outstanding measurement results.The use of these criteria recommends ISO 5725-2:1994.Grubbs statistics provide the possibility of checking for the presence in the sample of either an anomalous measurement result (the smallest or largest), or two (the two smallest in the sample or the two largest).
To check for one outlier, the original data is arranged in ascending order and the Grubbs statistics G are calculated from the formula: n is the number of measurements.
To test the significance of the smallest observation result, compute the test statistics G1: If the test statistic is less (or equal) than the 5% critical value, then the tested position is recognized as correct.

Gaussian filters
The Gaussian filter is currently the only standardized surface texture filter (ISO 16610-21:2011).This standard defines the long wave (low pass) Gaussian filter as a continuous weighted convolution for an open profile, with the weights taking the classic Gaussian bell shape and a cut-off wavelength value of 50% transmission.The short wave (high pass) Gaussian filter is defined as the difference between the surface profile and the long wave profile component resulting from the long wave Gaussian filter with the same 50% cut-off wavelength.ISO 16610-21:2011 does not give any information on implementation (algorithms, implementation problems, etc.) of the Gaussian filter.There are no tolerance values given within this standard.Instead of tolerances, a graphical representation of the deviations of the realized Gaussian filter from the defined Gaussian filter shall be given as a percentage value over the wavelength range 0.01 to 100 cut-offs.
The Gaussian linear filter is described by the dependence: The filter mask is such that the central element of the mask has the largest value and corresponds to the peak of the Gaussian distribution.The values of the remaining elements decrease with distance from the central element.The decrease occurs in accordance with the Gaussian distribution.
Bilateral filtration was first presented in [1, 14, and 16] in image processing problems and is applicable for noise suppression of measured deviations.The use of a bilateral filter assumes the calculation of the deviation value at a point (for a digital image, the pixel intensity) as the average weighted intensities of neighboring deviation values in a neighborhood of a given radius.The weight of adjacent deviations varies according to the distance between the points (the spatial weight) and the value of the deviation (the pixel intensity for the images) at the points -the rank filter.
Bilateral Gaussian filter is described by the dependence: where GR is the rank filter (weight similarity function), Wp is the normalizing coefficient.
Bilateral Gaussian filter start with standard Gaussian filtering with a spatial kernel GS.However, the weight of a pixel depends also on a function GR in the intensity domain, which decreases the weight of pixels with large intensity differences.In practice, use a Gaussian for GS in the spatial domain, and a Gaussian for GR in the intensity domain.The output of the bilateral filter for a pixel S is .

Discrete fourier transform
The harmonic deviation of the form is the sum of the harmonic functions.The set of harmonics can be estimated using Fourier analysis.For a parametric surface f(u,v) having U×V points, a two-dimensional discrete Fourier transform (DFT) is the expression: , ω1, ω2 is surface frequencies along the parameters u and v.The function Zf(ω1, ω2) is the mapping of the function f(u,v) in the frequency domain.Using the obtained Fourier series, it is possible to determine the amplitudes and wavelengths of the waves responsible for the systematic components of the errors that are periodic in nature.To determine the significant harmonics, the value of the surface spectral power density P is used: From the power spectral density significant harmonics n with the maximum value are selected.The calculated harmonics are used to decompose the error and then reproduce the harmonic component of the shape error by means of an inverse two-dimensional DFT: .) , ( ) , (

Measurement and filtering of the signal
On the basis of the review presented in the article, the filters that have received the greatest application are determined by the strategy of their application.It is recommended to use the following sequence: 1) elimination of gross errors based on the Grubbs test; 2) discrete Fourier transform to identify systematic errors; 3) elimination of systematic errors from the signal; 4) minimization of a random error with the help of a bilateral Gaussian filter; 5) surface restoration after filtration based on reverse DFT.
As an example, let us consider the measurement of a plane.Measurements were carried out for a plane of size 100×100 mm with a uniform grid splitting of control points after 10 mm.As a result, an array of 121 control points was obtained.In order to determine the law and distribution parameters, the measurement was performed 30 times at given points.An array of measured points of all the experiments is shown in Fig. 2. Verification by Pearson and Kolmogorov tests confirmed the normal distribution for most measured points of the plane.

Conclusion
An attempt is made to scientifically substantiate the application of filtration methods in the general case for coordinate measurements.The research is based on the recommendations of ISO 5725-2: 1994, 8785: 1998, 16610-1: 2015, 16610-21: 2011 and an analogy with the tasks of measuring roundness and roughness.It is proposed to use the Grubbs test to eliminate gross errors, the Gaussian bilateral filter for filtering random measurement errors, and the two-dimensional DFT to reveal the systematic error of the surface.The considered example of measurement and filtration for the plane confirmed the correct application of the selected filtration methods and determination of their parameters.The main result of filtering is minimization of the accidental error of the touch sensor of the device and detection of systematic errors in the surface for correcting the technology of manufacturing parts.
The study was performed by a grant from the Russian Science Foundation (project № 16-19-10204).

Fig. 1 .
Fig. 1.Functional relationships of errors and methods of filtration.

Fig. 2 .Fig. 3 .
Fig. 2.An array of measured points of the plane.According to the standard method ISO 12781-2:2011 the flatness value is calculated.Modeling and processing of results was carried out using the developed program in the