An Evaluation of Irregularities of Milled Surfaces by the Wavelet Analysis Włodzimierz Makieła Abstract This paper presents an introductory to wavelet analysis and its application in assessing the surface characteristics of machine parts attained through the milling process. In detail, it presents the criteria to choose the base wavelet used then in the decomposition as well as approximation process of roughness and waviness profiles of milled surfaces. The article shows computation examples carried out in MATLAB programming environment with the use of Wavelet Toolbox and a custom written program designed at the Department of Mechanical Technology and Metrology of the Kielce University of Technology. Keywords: Wavelet analysis, signal decomposition and approximation, surface roughness and waviness. Introduction Wavelet analysis is a measurement signal processing tool which has been fund particularly applicable in respect of nonstationary signals [, ]. Such signals may come from irregularities in measured surfaces, represented by profiles of roughness, waviness and straightness. Wavelets are particularly applicable in approximating signals which present a high degree of volatility in time due to their good placement and selectivity in the time domain. As a result of the wavelet transformation we acquire vectors of wavelet coefficients, most of which nearly equal zero and may be treated as random disturbances, and thus omitted during the signal reconstruction process. Proper selection of the basic wavelet, also known as mother-wavelet, allows us to compute the original signal and eliminate any disturbances from it. This issue is of a great concern since the basic function signifycantly influences the spectrum content. Hence, for example, real oscillations should be analyzed with the use of Fourier transform, whereas binary signals through Haar wavelets. In practice there is no one unanimous criterion to choose a mother-wavelet. In many cases researchers base their decisions on a visual assessment of the analyzed signal. The studies carried out so far have shown that the process of choosing an optimal wavelet is stochastic and for different irregularities profiles of the same surface we acquire different results. Therefore there is a need to design a computer program which would calculate multiple numeric indicators used then to properly choose the base wavelet for numerous similar profiles. This paper presents a program which analyses the method of choosing the proper basewavelet based on the following three criteria: statistical test for autocorrelation of the decomposition details [4]; normalized correlation function [4]; minimum entropy of the following types: Shannon entropy, the concentration in l p norm entropy, the "log energy" entropy and the threshold entropy [3, 4, 5]. The designed program was written in MATLAB programming environment and the calculation procedures are partly based on build-in functions of its Wavelets Toolbox package. The article summarizes computation results for a statistical sample of one hundred roughness and waviness profiles which measure samples obtained based on a variety of processing parameters specifications. Methodology of a Wavelet-Based Signal Decomposition. Pyramidal decomposition One of the easiest wavelet transformations is based on a recursive computation of sums and differences. Once the following two pairs of elements, x i- and x i, in vector x are replaced by their sum y i (which then constitute a new signal y) we in fact average the signal, or in other words make it smooth. In order not to change the signal s level the result is then divided by two. Equation () presents the simplest form of the low-pass filter [] y i = xi + x () i and similarly, high-pass filter, which is [] yi = xi xi. () The decomposition algorithm is show in Figure [4]. Fig. Wavelet pyramidal decomposition tree: f (0) - recorded signal, a (i) signal approximation in i-th iteration, d (i) detail in i-th iteration. Signal decomposition with wavelet packets Wavelet packets are signal transformation methods which originated from classical wavelet transforms and are based on a subtle change of the pyramidal decomposition system to a binary tree, which scheme can be viewed in Figure. Subject to the decomposition is then, not only the i-th approximation a (i) but the i-th detail d (i) as well. Singular decomposition iteration for every signal is carried out the same way as in previously described approximation process. [4]
Fig. Wavelet binary decomposition tree: f (0) - recorded signal, aax (i) i-th approximation of approximation, adx (i) i-th detail approximation, dax (i) i-th detail from approximation, ddx (i) detail of a detail in i-th iteration 3 Criteria for Choosing the Basic Wavelet 3. Procedure based on statistical test for autocorrelation white noise test The following test allows us to statistically check whether the details derived from the decomposition process carry any significant information about the analyzed signal or should be treated as white noise. The method is based on an assumption that the mother-wavelet is chosen best when the details provide no statistically significant information about the signal itself. Equations (3-5) form the core principle of this test allowing us to compute the variance V, covariance R(k) and χ test value. [3, 4] V = d i [ ( )] k R k) = d ( i) d( i + k) m = [ R( k)] V k= (3) ( (4) χ (5) where: - number of detail elements d,m natural value from (5,/4) interval [4] The calculated χ test value is then compared with the critical value from chi-square distribution under given α significance level. If the test value is greater than the critical value we can reject the hypothesis that the basic wavelet was chosen properly. If the test value is smaller then there is no reason to reject the tested hypothesis. 3. Procedure based on normalized correlation function The method is based on determining the correlation coefficients (6), which compare original signal f (0) to its ( denoised ) approximation a (). The better the basic wavelet, the higher the maximum correlation coefficient will be. k f ( i) a( i + k) r( k) = [ f ( i) + a ( i)] (6) where f(i) original signal s i-th element, a (i) approximation s i-th elements, k shift coefficient chosen based on the diagram of irregularities. 3.3 Procedure based on minimum entropy This signal decomposition procedure is usually applied in wavelet toolboxes. Its principle is to maximize the energy concentration function and to choose an optimal decomposition tree based on it. The role of energy concentration function here is assigned to entropy, which is its inverse function, so the optimization indicator will be the minimum entropy. Entropy must conform to the following rules: E ( 0) = 0 E( x) = E( x i ) (7) where: x i elements of the analyzed node MATLAB Wavelet Toolbox of allow us to calculate the following entropies: Shannon (non-normalized) entropy E( x) = x i ln( xi ) (8) The concentration in l p norm entropy p E( x) = x i p (9) The "log energy" entropy E ( x ) = ln( x i ) where ln(0) = 0 (0) The threshold entropy E( x) = E( x i ) () E ( xi ) =, gdy xi > ε E ( x = ε, i ) 0, gdy xi In order to compute the best tree we need to optimize the signal using wavelet packets, and then calculate the chosen entropy coefficient for each node. If the joint entropy of the two decomposed elements of the node is higher than entropy of the node itself than the tree growth should be stopped at this node. If the joint entropy is lower than the decomposition should create sub-nodes and proceed further. 4 Computer program for wavelet analysis 4. Block scheme of FALKAM program Fig. 3 FALKAM block scheme 4. Program description Obviously, before running the program it is necessary to first measure a given irregularity of interest (roughness, waviness, straightness, roundness). The recorded profile should then be imported to the MATLAB workspace. This section also contains all objects read and generated by the program in a given computation session. 3
After the profile is imported we may proceed to the analysis which is based on three blocks summarized in the program s interface. The first block contains decomposition analysis procedures for chosen types of wavelets and calculates multiple signal parameters acquired for different levels of decomposition. The analyzed wavelets are: db3, db4, db5, coif3, coif5, sym4, sym6, bior.4, bior4.4, bior.5. Though nine levels of decomposition are provided, this number can be modified dependently on the number of elements in the sampled profile. When an automatic option of denoising is selected the program allows us to choose between four methods of threshold computation and three types of noise structure to be considered. The computation process starts once Analizuj sygnał button is pressed. The results are saved to Excel file which needs to be defined prior to the analysis. The program will ask to specify the output file name just before the analysis. If the file name provided by the user does not exist, it will be automatically created by the program in the MATLAB current directory. The results can be viewed in two ways either through MATLAB current directory tab by choosing Open Outside MATLAB option on the output file or simply by literarily opening it outside MATLAB environment. The output worksheet which contains calculation results is laid out as follows: the first matrix (4x) shows results for assessing the proper wavelet based on the minimum entropy criteria. An optimal level of decomposition is provided for twelve different base wavelets for four different levels of entropy (8-); the second block provides exact values of entropy at every level of decomposition for each wavelet; the third block contains correlation scores, white noise test values and deviations of approximants from the original signal for twelve wavelets and the first four levels of decomposition; the fourth block contains sums of the details absolute values at every level of decomposition; the last block contains results for statistical characterristics of the original signal as well as its approximations summarized by the following parameters: average absolute deviation, standard deviation, range, skewness and kurtosis. Additionally, through Rysowanie option, the program allows us to plot the wavelet approximations of the signal as well as its denoised counterpart. This action can be performed at every level of decomposition after providing additional information on the type of basic wavelet, threshold and what type of noise structure should be assumed. Program option labeled Odszumianie implements an algorithm which seeks a combination of basic wavelet, threshold type and noise structure which minimize the test value of the white noise test (5). Program option labeled Entropia computes an optimum decomposition tree (best tree). For a given wavelet, type of entropy as well as decomposition level we get a graphical representation of the binary signal decomposition (Figure ) and the best tree plot (Figure ). 5 Measurements and Calculation Procedures In order to present the decomposition and approximation procedure we select a profile measured on the surface machined by the face milling process using CC milling machine with a new type of the milling head that allows us to obtain very low values of cutting forces. The milling head is presented in Figure 4. Milling parameters were as follows: sample material steal 45; parameters: feed fm=000 mm/min, Vc=5, m/min; n=000 RPM, ap=mm, d=80 mm, z=5, rε=,4 mm; length 65 mm; width 6 mm Fig. 4 The four-blades milling head with the primary clearance equal to 90 degrees dedicated to light cutting 5. Decomposition process of roughness profiles Using the milling process, discussed in the previous section, we produced an object which surface was later measured using profilometer TOPO. As a result roughness (Figure 5) and waviness (Figure 8) profiles were obtained, which were then analyzed using FALKAM program. Although the results are not conclusive in choosing one particular wavelet they allow us to select a group of basic wavelets which are optimal to decompose and approximate the original signal. For the roughness profile the basic wavelets are: db4, db5, ciof3, coif5, sym4, sym6, bior.4, bior.3. For the waviness profile the preferable basic wavelets are db3, db4, db5, ciof3, coif5, sym4, sym6, bior.4, bior4.4, bior.3. For comparison purposes we choose db5 wavelet, which represents the optimal group of basic wavelets, and Haar wavelet which had the worst results. Figures 5-7 present the measured profile (Figure 5) as well as its decomposition results for two types of basic wavelets, Haar (Figure 6) and db5 (Figure 7), the latter being an optimal choice according to the analysis results. The plots show that there are increased periodic fluctuations within specific areas at every level of decomposition regardless of the wavelet type. A more detail analysis showed that one of the blades was beating at the surface during the milling process, which caused those periodic spikes. The type of wavelet used has a primary influence on the quality of approximation. For an optimal wavelet the signal is well smoothed out, which in turn indicates a more efficient noise reduction. Fig. 5 Measured roughness profile 4
red: waviness (Table ) and roughness (Table ). In general the smaller the percentage deviation of the parameters the better a given approximation fits the original signal s characteristic. Fig. 8 Measured waviness profile Fig. 6 Roughness profile decomposition using Haar wavelet Fig. 9 Waviness profile decomposition using Haar wavelet Fig. 7 Roughness profile decomposition using db5 wavelet 5. Waviness profile decomposition process Figures 8-0 present measured waviness profile (Figure 8) and its decomposition for two types of basic wavelets Haar (Figure 9) and db5 (Figure 0). The plots provide a graphical overview pointing out, that for a badly chosen wavelet (Haar) the details do not accurately capture signal s characteristic points. The amplitude spectrum is blurred and the approximated signal does not seem to carry any smoothed out characteristics. In case of db5 wavelet only the first level details are blurred and resemble white noise characteristics. For the remaining levels of decomposition the irregularities vividly stand out and the approximated signal is smooth as expected. In order show the impact of the decomposition process on approximated signal we enlarged the profile and compare it with the original signal. Figure shows the result of wavelet approximation which effectively eliminates random irregularities. 5.3 Parameters variation assessment in the decomposition process As a result of the decomposition process we acquire signal approximations. Even though these approximants are well smoothed out there is a concern that approximating may cause changes to the original signal characteristics itself. The article presents measures of approximations deviations from their original characteristics summarized by changes in their statistical parameters in respect to the original signal for the previously selected pair of basic wavelets up to the sixth and seventh level of decomposition. Also as previously, two profile characteristics are conside- Fig. 0 Waviness profile decomposition using db5 wavelet Fig. Comparative plot: measured profile and wavelet approximation (on the right) in a given interval for db5 basic wavelet The results indicate that the signal approximated up to the fifth level maintains the original signal s roughness and waviness characteristics quite well. Hence, filtering the signal up to this level allows us to approximate it without any significant changes in its parameters. In order to asses each detail s contribution to the analyzed signal we calculate sums of amplitudes of those details and their relative contribution to the signal (Tables 3 and 4) for types of basic wavelets. 5
Tab. Roughness profile: relative decrease in selected approximations parameters concordance with the original signal as function of decomposition level for two base wavelets Tab. Waviness profile: relative decrease in selected approximations parameters concordance with the original signal as function of decomposition level for two base wavelets Tab. 3 Roughness profile: relative details contribution [%] to the analyzed signal at different levels of decomposition 6 Concluding Remarks Considering the theory outlined in the article as well as the computation result the following conclusions can be drawn:. Wavelet analysis is very well applicable for milled surfaces assessment and for their roughness and waviness approximations or filtrations in particular.. The article summarizes computation capabilities of FALKAM program, which implements the concepts of signal decomposition and approximation in MATLAB programming environment. 3. The calculation results, based on roughness and waviness profiles, allowed us to further test and validate the program showing that it is particularly applicable to the following research problems: - choosing the optimal basic wavelet, where the primary focus should be given to the entropy based criterion; - assessing the proper level of decomposition for which geometrical parameters of the profiles do not change significantly from the original. For the presented example that was level five for roughness and level six for waviness profile; - calculating details contribution to the overall signal at every level of the decomposition. Here, the analysis showed that for an optimal wavelet, details contribution remains below one percent up to the third level of the decomposition for roughness and fifth level for waviness profile. 4. The presented procedure is applicable for signal samples with the number of elements large enough to carrying out the previously described statistical calculation and for those which allow for a proper evaluation of the cutting parameters influence on wavelet decomposition and approximation. Makieła Włodzimierz, PhD., Kielce University of Technology, Poland, E-mail: wmakiela@tu.kielce.pl Having analyzed the results from Table 3 and Table 4 we conclude that low level decomposition details (of high frequency) contribute more to the original signal in roughness profile than in waviness profile for every type of basic wavelet. If a given wavelet belongs to the optimal group of basic wavelets the levels of relative contributions remain constant. Tab. 4 Waviness contour/profile: relative details contribution [%] to the analysed signal at different levels of decomposition References [] Augustyniak P.: Transformacje falkowe w zastosowaniach elektrodiagnostycznych, Uczelniane Wydawnictwo aukowo Dydaktyczne AGH, Kraków 003 [] Białasiewicz J. T.: Falki i aproksymacje. Wydanie drugie, Wydawnictwa aukowo Techniczne, Warszawa 004 [3] Zawada-Tomkiewicz A.: Dekompozycja falkowa profilu powierzchni po toczeniu. PAK vol. 55 nr 4/009, pp. 43-46 [4] Makieła W., Stępień K.: Ocena wpływu metodyki doboru falki bazowej na analizę falkową zarysów nierówności powierzchni. PAK vol. 56 nr /00 pp. 3-34 [5] Misiti M., Misiti Y., Oppenheim G., Poggi J.M.: Wavelet Toolbox 4 User s Guide The MathWorks, Inc. 007 6