AP02_02.vp 1 Introduction Ultrasonic non-destructive testing is a versatile technique that can be used in a wide variety of materials analysis applications. There are several sources of noise that hide a fault. The difficulties of ultrasonic methods result from strong signal attenuation, caused mainly by scattering at the inhomogeneities in the structure of the material. The decreasing transmitted ultrasonic signal causes strong coherent noise. The optimum frequency of an acoustic wave provides the highest signal-to-noise ratio compatible with the detection of a specific discontinuity. Each combination of discontinuity type and material may have a different optimum frequency. Noise occurs on contact between the probe and the material, and finally noise is caused by the electronics that are used. This noise can totally mask even large backwall echoes. The basic characteristics of an ultra- sonic instrument and probe are their sensitivity and resolut- ion. Sensitivity is the characteristic of ultrasonic testing that determins the ability to detect small signals limited by the signal-to-noise ratio. Resolution is the ability of an ultrasonic flaw detection system to give separate indications of dis- continuities that have almost the same range and/or lateral position. 2 Theoretical Reduction of the S/N ratio using algorithms of wavelet thresholding is described in this paper. The method is based on replacing small wavelet coefficients by zero, and keeping or shrinking the coefficients with an absolute value above the threshold discrete wavelet transform (hard or soft thres- holding) [1]. The wavelet procedure consists of three steps: multiple-level decomposition on approximation and detail coefficients (DWT – Discrete Wavelet Transform), threshold- ing of detail coefficients, reconstruction (IDTW – Inverse Discrete Wavelet Transform). The choice of the threshold is relevant for noise reduction. The thresholding methods proposed in this research were the following: � rigsure – quadratic loss function for a soft threshold estimate of the risk for a particular threshold value, � sqtwolog – the threshold is set to a fixed value, which is computed as the square root of the logarithm of the discrete values of the signa,l � heursure – a mixture of the previous options, � minimaxi – the threshold value is calculated for the mini- mum of the mean square error against an ideal procedure. In the Matlab environment (Wavelet Toolbox) the following types of waves were used for the signal decomposi- tion to the approximation coefficient and detail coefficient: Daubechies, Symlet, Coiflet, Biorthogonal pairs. The model of the classical high frequency signal as an A-scan with a probe frequency of 20 MHz and an equivalent sampling frequency of 256 MHz was implemented from real recorded data by computer for testing of algorithms. Noise at different levels was added to this signal and the noise-signal ratio was expressed by the coefficient of the noise level NSR (1), which is, according to Equation (1): NSR ef ef � � � �� � � ��20 log N S (1) where Nef is RMS (root mean square) value of noise, Sef RMS value of signal. The NSR rate was chosen for better understanding of the following graphs. The coefficient of noise reduction �SN was defined for a comparison of the success of the used algorithms, according to Eq. (2): �SN dB ef1 ef1 ef2 ef2 � � � � � � � � � � � � � 20 log S N S N (2) where Nef1 is RMS value of noise included in signal, Nef2 RMS value of noise included in signal, after application of a given algorithm, Sef1 RMS value of signal corresponding to the fault echo, Sef2 RMS value of signal after application of a given algorithm. 60 © Czech Technical University Publishing House http://ctn.cvut.cz/ap/ Acta Polytechnica Vol. 42 No. 2/2002 Reducing Ultrasonic Signal Noise by Algorithms based on Wavelet Thresholding M. Kreidl, P. Houfek Traditional techniques for reducing ultrasonic signal noise are based on the optimum frequency of an acoustic wave, ultrasonic probe construction and low-noise electronic circuits. This paper describes signal processing methods for noise suppression using a wavelet transform. Computer simulations of the proposed testing algorithms are presented. Keywords: ultrasonic testing, wavelet transform, thresholding of wavelet coefficients, de-noising algorithms. The RMS values of the simulated signal were obtained from digital samples corresponding to fault echoes before and after application of a given algorithm. While analysing the signal it is convenient to set the extraction of approximations and details of the given signal to a certain level . Fig. 1 shows a graph of noise reduction in simulated signal as a function of the decomposition level l (e.g., the maximum order of used approximations and details). The noise-signal ratio expressed by coefficient NSR (1) was chosen as –20 dB. This picture shows that the influence of the decomposit- ion level is roughly indicated at a value of � 6 in all cases, and higher values are not proper. A value of � 6 was chosen for the maximum decomposition level (i.e., the maximum level of the used approximations and details) according the analysis of the ultrasonic signal. The four above thresholding methods were applied to the simulated signal with coefficient NSR � –20 dB after DWT analysis ( with � 6), with a steady threshold at particular levels of analysis. The wavelets in the table were chosen empirically. The resulting effect of the noise, expressed as a value of the coefficient �SN for different kinds of the waves and thresholding methods, is shown in Tab. 1. Results for waves that gave the change in the noise-signal ratio expressed by �SN smaller than 10 dB are not presented in this table. These waves probably have a different wave shape from the echoes contained in ultrasonic signal, and therefore they are not suitable for noise reduction. © Czech Technical University Publishing House http://ctn.cvut.cz/ap/ 61 Acta Polytechnica Vol. 42 No. 2/2002 0 2 4 6 8 10 0 1 2 3 4 5 6 decomposition level � � S N [d B ] 0 2 4 6 8 10 0 2 4 6 8 10 decomposition level � � S N [d B ] wavelets bior wavelets sym 0 2 4 6 8 10 0 2 4 6 8 decomposition level � � S N [d B ] 0 2 4 6 8 10 1 2 3 4 5 decomposition level � � S N [d B ] wavelets db wavelets coif Fig. 1: The average dependence of noise reduction on decompo- sition level for particular kinds of wavelets Thresholding method Type of wave rigrsure heursure sqtwolog minimaxi db4 21.59 23.73 27.07 26.91 db6 19.37 20.59 26.42 27.42 db7 18.52 22.64 25.05 23.39 db8 20.90 25.61 28.24 27.43 db9 18.14 19.55 26.93 25.70 db10 18.84 21.53 26.63 26.32 bior 1.3 11.55 11.48 28.28 28.76 bior3.9 18.98 22.55 29.81 27.26 bior 4.4 18.63 22.95 27.59 26.48 coif1 17.61 17.47 25.29 21.55 coif2 17.88 17.94 25.55 22.14 coif4 18.99 23.62 26.10 23.35 sym3 17.59 22.15 27.51 25.81 sym4 20.82 20.84 26.89 25.22 sym5 19.54 19.86 25.96 25.76 sym6 17.16 20.71 26.70 24.86 sym7 17.45 20.74 27.65 24.25 sym8 17.22 20.45 24.79 22.82 Tab. 1: Values of noise reduction coefficient �SN [dB] for dif- ferent types of waves and thresholding The results presented in Table 1 show that the values of the noise reduction coefficient vary from 17 to 30 dB. The different effects of different thresholding methods are also apparent. The “rigrsure” and “heursure” methods gave worse results than the other methods. The best results were obtained using the “sqtwolog” method. Only this method will therefore be considered from now on. The four waves “db8”, “bior3.9”, “bior 1.3”, “sym3” which produced the highest val- ues of coefficient �SN were chosen. In following section the ultrasonic signal occurred with additive noise, which was generated on the basis of the model of real noise for the noise reduction rates simulated by computer. The noise-signal ratio was consequently increased in the ranges of the NSR coefficient from – 45 dB to – 3 dB. A graph expressing the dependence of the noise reduction coefficient �SN on the coefficient of the noise level in the signal for the waves given above is shown in Fig. 2. The dependence in Fig. 2 shows that the maximum value of the NSR coefficient, for which the �SN value is positive, varies in the range from –7,5 dB to – 4 dB. Until now we have considered only the standard thres- holding methods for noise reduction. Now a new method [2] will be presented. This involves computing the optimum threshold value individually for wavelet decomposition of every detail coefficients. For verifi- cation purposes, an analysis was made of the simulated signal, primarily up to the level = 6. This analysis was made using the “bior3.9” wave, i.e., the wave that gave best results in the prior analysis. Fig. 3 shows the details and approximations obtained during wavelet analysis of the signal with noise given an NSR coefficient value of �7,15 dB. The time curve of the analysed signal is displayed in Fig. 3. Fig. 3 shows that the simulated echo is best displayed in detail No. 3 and particularly in detail No. 4, while other de- tails are representations of the noise. These results show that it is necessary to perform maximum suppression of the noise part of the signal contained in all details, except details No. 3 and No. 4. A simple algorithm was written in the Matlab environ- ment to determine the optimum thresholds. This algorithm goes gradually through the combinations of threshold values for every detail of the signal in the range from 0 to 1. After threshold processing for every combination of threshold reconstruction, the signal is made and the computation of the noise reduction coefficient �SN is processed. In the following table, the optimum values are written for wave “bior 3.9”, together with the value �SN, which character- ises the noise reduction. 62 © Czech Technical University Publishing House http://ctn.cvut.cz/ap/ Acta Polytechnica Vol. 42 No. 2/2002 -10 -10 -15 -15-20-25-30-35-40-45 -5 -5 0 0 -10-15-20-25-30-35-40-45 -5 0 -10-15-20-25-30-35-40-45 -5 0-10-15-20-25-30-35-40-45 -5 0 5 10 15 20 25 30 � S N [d B ] wavelet db8 -10 -15 -5 0 5 10 15 20 25 30 � S N [d B ] wavelet bior 1.3 -15 -10 -5 0 5 10 15 20 25 30 35 wavelet bior 3.9 � S N [d B ] -10 -15 -20 -5 0 5 10 15 20 25 30 � S N [d B ] wavelet sym7 NSR [dB] NSR [dB] NSR [dB] NSR [dB] Fig. 2: Dependence of the noise reduction coefficient on the noise level in the signal for the four waves, with maximum noise reduction effect An analysis was then made of the influence of changes in the particular thresholding levels. After this analysis had been performed in the Matlab environment, a program was written which gradually shifted the threshold values of the detail and computed the noise reduction effect. The levels of the other details were set to the optimum value according to Tab. 2. The © Czech Technical University Publishing House http://ctn.cvut.cz/ap/ 63 Acta Polytechnica Vol. 42 No. 2/2002 0 0.5 1 1.5 2 2.5 3 3.5 4 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 t [ s]� u U / m a x The time curve of the signal -1 -0.5 0 0.5 1 D1 detail No.1 0 0.5 1 1.5 2 2.5 3 3.5 4 t [ s]� -1 -0.5 0 0.5 1 D2 detail No.2 0 0.5 1 1.5 2 2.5 3 3.5 4 t [ s]� -1 -0.5 0 0.5 1 D3 detail No.3 0 0.5 1 1.5 2 2.5 3 3.5 4 t [ s]� -1 -0.5 0 0.5 1 D4 detail No.4 0 0.5 1 1.5 2 2.5 3 3.5 4 t [ s]� -1 -0.5 0 0.5 1 D5 detail No.5 0 0.5 1 1.5 2 2.5 3 3.5 4 t [ s]� -1 -0.5 0 0.5 1 D6 detail No.6 0 0.5 1 1.5 2 2.5 3 3.5 4 t [ s]� -1 -0.5 0 0.5 1 A2 aproximation No.2 0 0.5 1 1.5 2 2.5 3 3.5 4 t [ s]� Fig. 3: Decomposition of the simulated signal for � 6 (drawings of all details of the wavelet analysis and one selected approximation) Levels of signal details �SN [dB] detail No. 1 detail No. 2 detail No. 3 detail No. 4 detail No. 5 detail No. 6 0.5 0.3 0.2 0.1 0.1 0.3 26.5 Tab. 2: Optimum choice of thresholds for maximum noise reduction results of this analysis for wave “bior3.9” are drawn in Fig. 4. The dependence of the noise reduction coefficient on the threshold value increases before settling at a particular value, for all details except detail No. 3. Since details No. 1, No. 2, No. 4, No. 5 and No. 6 include mostly noise (see Fig. 3), it may be assumed that a maximum reduction will be achieved if we totally cut out the discrete values of these details. Fig. 3 also shows that the settling details of the higher levels are fast- er. This is because the discrete values of the particular details are decreasing and total removal is achieved immediately with lower threshold levels. If we focus on the dependence of �SN on the level of threshoding of detail No. 3, we will see that this dependence has a certain maximum representing the optimum noise reduction. The existence of this maximum can be explained as follows: Detail No. 3 contains information concerning the fault echo, but it also contains a certain noise value. If we cut down the noise value, then the noise from the signal will be reduced. The amplitude of the fault echo will also be reduced, but the main influence is from the noise reduction effect. If we increase the threshold value so that the noise is totally removed, then after the next reduction the fault echo will be reduced and the value of coefficient �SN will decrease. A comparison of the value of coefficient �SN received after applying the new proposed thresholding method with the value achieved using standard thresholding methods provides the following result: the value of coefficient �SN is about 20 dB higher when the new thresholding method is used. 3 Experimental The proposed algorithm based on applying wavelet trans- formation was then tested on real data [2]. The measurement was done on a special gauge, made of two metal sheets 9,2 mm in thickness, which were jump welded. A fault was created artificially on one part of the scale by a 0,5 mm hole, which was manufactured by spark technology. The results of the measurements are given in Fig. 5. 4 Conclusion Our analysis indicates that all waves from the sym family are suitable for noise reduction in an ultrasonic signal, follow- ed by coiflet and symlet – type waves and some chosen biorthogonal pairs (especially “bior3.9” or “bior 4.4”). Noise reduction for these waves is characterised by noise reduction coefficient �SN � 12 dB. On the other hand, it is not recom- mended to use “db1”, “db5”, “bior3.1” to “bior3.7” and “coif5” waves. These waves have a different shape [4] from the echoes in an ultrasonic signal. We then investigated the different thesholding methods with respect to noise reduction. The standard methods indicate that no optimum algorithm exists. Our proposed method produced the best results, consisting of the optimum 64 © Czech Technical University Publishing House http://ctn.cvut.cz/ap/ Acta Polytechnica Vol. 42 No. 2/2002 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 -10 0 10 20 30 detail No.1 threshold � S N [d B ] 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0 5 10 15 20 25 30 detail No.2 threshold � S N [d B ] 10 15 20 25 30 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 threshold detail No.3 � S N [d B ] 10 15 20 25 30 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 threshold detail No.4 � S N [d B ] 21 22 23 24 25 26 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 threshold � S N [d B ] detail No.5 20 21 22 23 24 25 26 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 threshold � S N [d B ] detail No.6 Fig. 4: Influence of threshold values on signal noise reduction threshold value individually for a wavelet analysis of each detail coefficient of the signal. By choosing a suitable thres- hold, the noise reduction coefficient can be increased by about 9 dB on the real signal, and by even 10 dB on a simulated signal. Acknowledgement This research work has received support from research program No J04/98:210000015 „Research of New Methods for Physical Quantities Measurement and Their Application in Instrumentation“ of the Czech Technical University in Prague (sponsored by the Ministry of Education, Youth and Sports of the Czech Republic). References [1] Donoho, D. L.: De-noising by Soft-Thresholding. IEEE Transactions on Information Theory, 1995, Vol. 41, No. 3, p. 613–627. [2] Houfek, P.: Metody zvyšování citlivosti a rozlišovací schop- nosti v ultrazvukové defektoskopii. [Methods for improving sensitivity and recognition in ultrasonic defectoscopy]. Dizertační práce, Fakulta elektrotechnická ČVUT, Praha, 2001. [3] Kreidl, M. et al: Diagnostické systémy. [Diagnostic Sys- tems]. Monografie, Praha: Vydavatelství ČVUT, 2001, p. 123–128. [4] Misiti, M., Misiti, Y., Oppenheim, G., Poggi, J. M.: Wavelet Toolbox User's Guide. Natick (USA): The Math Works, 1966. [5] Strang, G., Nguyen, T.: Wavelets and Filter banks. Wel- lesley (USA): Wellesley-Cambridge Press, 1966. Ing. Petr Houfek, Ph.D. e-mail: houfek@fel.cvut.cz Doc. Ing. Marcel Kreidl, CSc. e-mail: kreidl@fel.cvut.cz Department of Measurement Czech Technical University in Prague Faculty of Electrical Engineering Technická 2 166 27 Prague 6, Czech Republic © Czech Technical University Publishing House http://ctn.cvut.cz/ap/ 65 Acta Polytechnica Vol. 42 No. 2/2002 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 0.8 1 1.2 1.4 1.6 1.8 2 t [ s]� detail of the echo in the original signal -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 u U / m a x u U / m a x 0.8 1 1.2 1.4 1.6 2 t [ s]� 1.8 detail of the echo after noise reduction structure echo Fig. 5: Results of noise reduction, using the proposed new algorithm with wave “sym3”