THE CRITERIA TO SELECT THE WAVELET TYPE FOR THE ASSESSMENT OF SURFACE QUALITY

Preliminary notes The paper deals with one of the most important problems in the wavelet analysis – the methodology for mother wavelet selection. In this study, the surface texture of machine parts was assessed applying a wavelet transform. The calculations involved in roughness profile evaluation were based on three selection criteria: an autocorrelation test, a cross-correlation function and an entropy-based test. All the calculations and diagrams were produced using the Wavelet toolbox of the MATLAB package.


Introduction
The real surface of a machine part is never the same as the ideal theoretical surface, and this may be due to such factors as relative vibrations between the tool and the workpiece or tool wear [1 ÷ 3].Measuring surface texture of machine parts is essential [4 ÷ 6], because if there is damage to the surface, there is likelihood of device failure.Different approaches can be adopted to analyse surface texture [7,8].Some studies focus on determining the influence of the stylus tip [9,10].In Ref. [11], the author investigates how the wear of a ceramic tool affects surface roughness in turning.Reference [12] describes an image processing method applied to evaluate surface roughness parameters.In Ref. [13], the authors propose a new approach to surface topography analysis, which is based on empirical surface decomposition.The study presented in [14] considers in-situ roughness measurement using a non-contact profilometer.References [15 ÷ 17] deal with the latest methods of filtering of surface texture components.
A qualitative analysis, on the other hand, is based on graphical representation of surface irregularities [22 ÷ 24].Sometimes, additional analysis of the surface texture is required.The most common technique is the Fourier transform, which allows us to detect the predominant harmonic components.The Fourier transform, however, cannot be used to detect local irregularities of a surface profile.In such a case, wavelets and the wavelet transform are applied [25].Wavelets are small oscillatory wave functions finite in duration.As wavelets are local in time, they are suitable for analysing non-stationary signals.They can also be used to detect local irregularities of a surface profile.The wavelet transform is based upon scaling and translation of initial functions called mother wavelets.In practice, there is no criterion to be applied prior to the selection of the mother wavelet.In most cases, the decision is made after visual evaluation of an analysed signal.In this paper, the methodology for mother wavelet selection uses three criteria: -the autocorrelation of the coefficients of details of the decomposition, -the cross-correlation function, -the minimization of the Shannon entropy.
This analysis was performed using the Wavelet Toolbox of the MATLAB package.The signal investigated was a roughness profile of a machine part.

Methods of wavelet 2.1 Pyramid wavelet decomposition
This method of decomposition involves recursive estimation of sums and differences.Replacing the successive component pairs x i−1 and x i of the vector x with their sums y i , which are components of the new signal y, is equivalent to signal averaging or smoothing.To avoid changing the signal level in this operation, the result is divided by 2. Eq. ( 1) describes the simplest low-pass filter: . 2 Similarly, the equation of a high-pass filter can be written as: The algorithm of the pyramid decomposition is shown in Fig. 1.Technical Gazette 22, 3(2015), 781-784 Figure 1 Pyramid wavelet decomposition tree: f (0) -original signal, a (i)  -approximation at level i, d (i) -detail at level i

Wavelet packet decomposition
Wavelet packet decomposition, which originates from classical wavelet transformation, requires organizing data in a binary tree.A binary tree of decomposition is presented in Fig. 2. At each subsequent level of decomposition, the approximations and details are divided into approximations and details one order higher.

Criteria for selection of mother wavelets 3.1 Autocorrelation
This test allows us to determine whether the details contain any significant information on the analysed signal or whether the details can be regarded as the white noise.The method assumes that a suitable mother wavelet is selected when there is no significant information about the signal in the detail wavelet coefficients.The fundamentals of the test are Eqs.(3) ÷ ( 5), which are used for the calculation of the variance V, the covariance R(k) and the test indicator where N is the number of the coefficients of the detail d 1 , and m is the natural number from the interval (5, N/4).
The calculated value of the test indicator χ 2 is compared with the predefined critical value using the chisquared distribution for a given confidence level.If the calculated value is higher than the critical value, the hypothesis on good selection of the mother wavelet should be rejected.If the calculated value is lower, the mother wavelet selection is assumed to be correct.

Normalized cross-correlation function method
The normalized cross-correlation function uses the cross-correlation function given by Eq. ( 6): where: f(i) -the coefficients of the original signal, a 1 (i)the coefficients of the approximated signals, k -the phase shift between the compared signals.
The higher the maximum of function ( 6), the better the coincidence between the mother wavelet and the profile irregularities.

Entropy-based method
The entropy-based method is used when wavelet packet decomposition is performed.The method requires determining the maximum of the energy concentration function and an optimal decomposition tree.Since entropy is considered to be the opposite of the energy concentration function, the optimization indicator will be the minimum level of the entropy.The entropy should satisfy the following conditions: where x i is the series of the coefficients of the analysed node.
The calculations performed in the MATLAB environment using the Wavelet Toolbox allow us to determine the following types of entropy: -the Shannon entropy -the logarithm of the "energy" entropy , ) ( ln ) ( An optimal tree is generated by first performing wavelet packet decomposition and then determining the entropy indicator for each node.If the sum of the entropies of two decomposed nodes is higher than the entropy of the input node, then the growth of the decomposition tree should be stopped in this node.If the sum of the entropies is lower, then the decomposition can be continued.In this study, we applied the most common entropy indicator − the Shannon entropy.

Experimental results
After solving the problems theoretically, we tested the methodology described in the previous sections experimentally.The methods developed for mother wavelet selection were tested while analysing the 2D surface roughness profile shown in Fig. 3.When the result of the white noise testing is positive, i.e. marked with a plus symbol (+), the examined detail is regarded as white noise.A minus sign (−), on the other hand, indicates that the examined wavelet was not selected correctly.The results of the calculations based on the cross-correlation function should be interpreted as follows: the higher the correlation coefficient, the better the selection of the mother wavelet.The results of Method 3 (the Shannon entropy) provide an optimal decomposition tree.It can be assumed that such decomposition has been found (+) if the optimal tree is different from the full binary tree.Fig. 4 illustrates the optimal tree of decomposition of the analysed signal (at the third level).

Conclusion
The experimental results show that the entropy-based method is the most suitable approach.It is not limited to one level of decomposition and it allows us to find an optimal decomposition tree.The other methods discussed in the paper cannot be used to compute an optimal tree because the decomposition is performed only at one level.Further research is required to carry out an autocorrelation test for a large number of profiles and evaluate the data statistically.It would also be essential to compare results for different segments of the same profile.Further analysis of the cross-correlation function should involve determining the correlation between the original signal and the signal approximated at successive levels of decomposition.While studying the entropy-based methods we should estimate the influence of the mother wavelet on the position of the minimum entropy in a decomposition tree.

Figure 2
Figure 2 Binary tree of wavelet packet decomposition: s -original signal, A i -approximations at level i, D i -details at level i [26]

Figure 4
Figure 4 Optimal decomposition tree of the analysed roughness profile (third level of decomposition)