Corrosion Research Group

University of Cádiz. Department of Material Science,  Metallurgical Engineering and Inorganic Chemistry

Automatic detection of EN transients

EN TRANSIENT ANALYSIS THROUGH WAVELETS

Introduction

Statistical and spectral analyses are often used to study EN. However, those methods are not suitable to study experimental signals that show characteristic transients. Frequently, spikes are analyzed manually, which complicates the study for monitoring purposes. Recently, the discrete wavelet transform (DWT) has been proposed (1) to improve the analysis of EN, especially when the time records are non-stationary. The aim of this work is to find an automatic method based on wavelet transform to study EN transients. Specifically, we propose an algorithm that localizes the position of the transients and classifies them in regard to their constant time and size (2).
 

Wavelet transform:

The DWT consists in expressing a signal, xn n=1,2,...N, as a linear combination of a series of basis functions fj,n and yj,n (3). These basis functions are generated by scaling and translating a pair of oscillating functions with a limited span of time denominated the father wavelets f and the mother wavelets y. So, the result of a wavelet transform is a series of vector termed crystals which comprise the so-called wavelet coefficients: d1=(d1,1,d1,2,...,d1,N), d2=(d2,1,d2,2,...,d2,N), ..., dj=(dj,1,dj,2,...,dj,N), ...., dJ=(dJ,1,dJ,2,...,dJ,N), sJ=(sJ,1,sJ,2,...,sJ,N).

Each crystal describes the original signal at different scale. The scale of the crystals is referred through the subscript j, while J is the maximum scale analyzed. So, d1 reflects the finest features of the signal while sJ the slowest contributions. The wavelet coefficients measure the correlation between the basis functions and the signal. Hence, by compressing and expanding the basis functions the signal can be studied at different scales (4).
 
 

Transient-detecting algorithm:

1 Step: Applying non-decimated DWT to the voltage and current signals 

basis functions: Haar wavelets to emphasize the sudden change that a transient entails. 
the first and the last 64 wavelets coefficients are not considered to avoid  boundary effects. 
 
2 Step: Voltage sign condition 
Localized corrosion often causes voltage transients developing just in one sense (usually sudden voltage decrease followed for a lower voltage recovery). In this step, time positions that, whereby the previous condition, cannot correspond to the beginning of a transient are discarded. This is made by shrinking to zero the voltage wavelet coefficients which indicate a voltage increase. 

 
Example of DWT decomposition
Step 3: Interscalar analysis

Strong features of EN signals must appear in the wavelet coefficients across several crystals. An interscalar analysis consists in studying the correlation among wavelet coefficients of different crystals for each instant, n. It can be done by multiplying the corresponding crystals so that if every crystal has a high coefficient at a given position, an extraordinary high value at such position will be obtained. So, the following matrix have been defined, whose rows are correlation functions for different scales, S:

 
where dI and d'V refer to the current and voltage wavelet coefficients; S=1, 2,..., J-1; n=1, 2,..., N-2J+1 and N is the number of signal points.

The non-zero elements of c4 accumulate mainly around the transient position of the original electrochemical time records. However, some of the non-zero elements of c4 correspond to the same transient in the original signals. Besides, others elements are not equal to zero, but they are very close to this value, and consequently they do not match any transient. Therefore, further a step is needed.

 
Partial results (S=4) of step 4 and 5 (c4 & b4) for the analysis of the ENM signals plotted at the top of the figure.

Step 4: Peak detection

A matrix, M=(mS,n), is built from C by reducing to 0 the elements of C that are not maximums when considering rows. Most of the elements in the histogram of m4 are close to 0 and they are separated from the others by a gap; the outstanding peaks are considered to correspond to transients. The gap is considered to appear when the subtraction of two consecutive elements in the histogram is higher than a threshold, d provided by the user's experience. However, the value of d is not decisive because the gap is usually broad enough and thereby a large range of d values is suitable.
 

 
Histogram of m4
The positions of the transients for each S value are reflected by creating a matrix termed B=(bS,n) so that:

where S=1, 2,..., J-1; n=1,2,..., N-2J+1 and ls is a threshold determined by the gap in the histogram of each row of matrix M. Thus, a transient is considered to exit for every time, n, so that  bS,n is not equat to 0 for at least a value of S.

Step 5: Transient characterization
The transients are classified through the vectors Ln and Tn, so that higher values means higher size or scale respectively:

 
 
Final Result 
 
The final result of the algorithm is plotted so that the x-positions of the dots correspond to the beginning of the transients, while the scale characterization Tn can be read in an additional y-axis and the relative size of the transients is reflected in the dot size.
 

Conclusions:

An algorithm is suggested to study automatically transients occurring in EN time records. This algorithm is based on the fact that transients has characteristic shape, although their size and time scale can change.

Although, further works might improve the algorithm shown here, the preliminary studies indicate that an algorithm based on wavelet transform and interscalar analysis can be very useful to detect and characterize EN transients.
 

References

1.- A. Aballe, M. Bethencourt, F. J. Botana and M. Marcos, Electrochim. Acta, 44, 4805 (1999).
2.- A. Aballe, M. Bethencourt, F. J. Botana, M. Marcos and R. Osuna, The 198th Meeting of The Electrochemical Society, Phoenix (EE.UU.) (2000)
3.- A. Bruce and H-Y. Gao, Applied Wavelet Analysis with S-PLUS, Springer, New York (1996).
4.- B. B. Hubbard, The World According to Wavelets, A K Peters, Wellesley (1996).

Acknowledgements

This work has received financial support from Junta de Andalucía, Comisión Interministerial de Ciencia y Tecnología (CICYT), projects MAT99-0625-C02-01 and 1FD97-0333-C03-02