Table of Contents Author Guidelines Submit a Manuscript
International Journal of Corrosion
Volume 2017, Article ID 7925404, 7 pages
Research Article

The Discrete Wavelet Transform and Its Application for Noise Removal in Localized Corrosion Measurements

1Engineering Institute, Autonomous University of Baja California, Boulevard Benito Juarez, Insurgentes Este, 21280 Mexicali, BC, Mexico
2National Center of Metallurgical Research (CENIM) Madrid, The Spanish State Council for Scientific Research (CSIC), Madrid, Spain

Correspondence should be addressed to Rogelio Ramos; xm.ude.cbau@isomarr

Received 30 January 2017; Accepted 24 April 2017; Published 4 June 2017

Academic Editor: Flavio Deflorian

Copyright © 2017 Rogelio Ramos et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.


The present work discusses the problem of induced external electrical noise as well as its removal from the electrical potential obtained from Scanning Vibrating Electrode Technique (SVET) in the pitting corrosion process of aluminum alloy A96061 in 3.5% NaCl. An accessible and efficient solution of this problem is presented with the use of virtual instrumentation (VI), embedded systems, and the discrete wavelet transform (DWT). The DWT is a computational algorithm for digital processing that allows obtaining electrical noise with Signal to Noise Ratio (SNR) superior to those obtained with Lock-In Amplifier equipment. The results show that DWT and the threshold method are efficient and powerful alternatives to carry out electrical measurements of potential signals from localized corrosion processes measured by SVET.

1. Introduction

Currently, VI offers novel and efficient alternatives in digital measurement and processing of electrical signals in corrosion studies, with significant benefits in the cost of VI systems, compared to the costs of traditional instrumentation, whose function is defined by the manufacturer and not by the end user, allowing the replacement of traditional measurement and control instruments with modern computerized instruments.

1.1. Electrode Scanning Techniques

The electrochemical electrode scanning techniques are represented by scanning reference and scanning vibrating reference electrode (SRET and SVET) [1], since SVET is the best SNR, if we compare the minimum measurement ranges for the SRET technique (that precedes the SVET), which are 200 μV and are limited by the noise level of the signal [2, 3].

In the SVET the displacement of the vibrating electrode is small, in the range of 1 to 100 μm; this displacement provides a small ion flux corresponding to the electric potential at the tip of the electrode, in the order of microvolts [4].

Having electrical signals in the range of microvolts implies that these are vulnerable to electrical noise, which interferes considerably in the electrical signal making it strongly dependent on the SNR, such as the potential curve of the SVET. Under these conditions, measuring the potential difference with the vibrating electrode causes an uncertainty in the potential values ​​of the electrical signal.

1.2. Sources of Electrical Noise

There are two main types of noise sources in SVET system: internal noise and external noise. Internal noise is generated by the components of the system as a consequence of its properties and nature (thermal noise, ripple noise, and fluctuating noise). The internal noise of the electrochemical system appears in the solid-liquid interface known as electrochemical noise (EN) whose sources are several types of fluctuations: fluctuation in the concentration of the species in the metal/electrolyte interface, fluctuation in surface morphology, fluctuation in electrode activity, and fluctuation of activity on the electrode surface [5].

External noise is the main identified source of electrical noise also known as white or Gaussian noise which is considered as a disturbing variable to our measurement system. This comes from external electrical or magnetic sources that affect all the components of the electrical system including the electrochemical part, electrodes, wiring, and instrumentation. The interferences that are presented can be stationary, nonstationary, or random, where the main sources of electrical noise are the current of the conventional electrical line, fluorescent lamps, computers, and electric motors.

1.3. Virtual Instrumentation

VI is an indispensable tool of great utility for the development of measurement and control instruments in the laboratory or field and its application of measurement and control of chemical and electrochemical systems applied to corrosion is not the exception [68]. When talking about VI, we are referring to an instrument found in the hardware of a computer and an interface that allows the physical and functional connection between the VI and the system to be measured and controlled. VIs are recyclable and easily scaled, can be connected to the outside world, and have simple configuration and low cost per acquisition (measurement) channel. Currently VIs are programmable in embedded systems, with the main advantage that their functionality is defined by the end user; that is, we design them according to our needs unlike a traditional rigid instrument whose functionality is defined by the manufacturer and is designed to meet general or very specific needs. The background for VI development dates back to 1986 when National Instruments introduced the LabVIEW® virtual instrumentation platform which was made to operate on MAC computers.

One of the main features of LabVIEW is the ease of use, valid for both professional programmers and people with little programming knowledge. LabVIEW is a graphical programming tool, meaning that programs are not written but drawn, facilitating their understanding. By having already predesigned a lot of programming blocks, it facilitates the programmer creating the project, allowing him to spend less time on programming.

1.4. Embedded Systems

Embedded systems are computers designed to have a specific function, unlike a general purpose computer which, as its name implies, is designed to perform general computing functions. The embedded systems have a great diversity of applications, some of daily use as the control of operation of a domestic appliance or being more complex as is the case of data acquisition and control in industry, aerospace, automotive, and so on. With an embedded system it is possible to carry out programmable measurement and control operations in real time. The main advantage of an embedded system is to do Digital Signal Processing (DSP) regardless of computer usage, making the embedded system a fully recyclable, portable, efficient, and economical VI with end-user defined functionality.

1.5. The Wavelet Transform

The wavelet transform (WT) has broad application in the analysis of stationary and nonstationary signals. These applications include the removal of electrical noise from the signals, detection of abrupt discontinuities, and compression of large amounts of data. The use of WT in corrosion studies is not the exception, as shown by the works published in the literature [912].

With the WT, it is possible to decompose a signal into a group of constituent signals, known as wavelets, each with a well defined, dominant frequency, similar to the Fourier transform (FT) in which the representation of a signal is by sine and cosine functions of unlimited duration. In WT, wavelets are transient functions of short duration, that is, limited duration centered around a specific time. The problem of the FT is that when passing from the time domain to the frequency domain the information of what happens in time is lost. Observing the frequency spectrum obtained using the FT is simple to distinguish the frequency content of the signal being analyzed but it is not possible to deduce in what time the components of the signal of the frequency spectrum appear or disappear. Unlike the FT, the WT allows an analysis in both time and frequency domains giving information on the evolution of the frequency content of a signal over time [13].

As in the case of FT, the WT has been discretized and is known as a discrete wavelet transform (DWT) and represents an important advantage over traditional FT methods. The WT decomposes a signal into several scales representing different frequency bands, and, at each scale, the position of the WT can be determined at the important time characteristic with which the electrical noise can be identified and effectively removed. Short-time wavelets allow information to be extracted from high-frequency components. This is important information to eliminate electrical noise since electrical noise is more likely to exhibit high-frequency fluctuations [14]. Long-term wavelets allow you to extract information from low frequencies. With the information of the high and low frequencies, we can define a threshold and zero the frequencies below the undesired threshold of the electric noise [15].

The pioneering work of removing electrical noise from signals using the WT has its origin in the works of Donoho and Johnstone [16, 17], which propose the use of a threshold for the removal of Gaussian white electrical noise in the signals. Similar works but with the use of the discrete wavelet transform undecimated (UWT) are given later allowing the removal of the electrical noise by a nonlinear method suggested by Coifman and Donoho [18].

The DWT is considered a suitable tool for the elimination of electric noise as a novel alternative that replaces procedures of attenuation of electrical noise with the use of low-pass filters of the systems Lock-In Amplifier or fast Fourier transform (FFT) that alone can be used in the circumstances in which the electrical noise has a very small overlap of bands or completely different and separated from the signal and the noise to be able to use the method of filtering, this being an important limitation in the moment of processing digitally signals not stationary whose content changes over time.

1.6. Noise Attenuation Procedure with the DWT Using the Threshold Method

The threshold method is the most used method by the wavelet transform for the attenuation of electrical noise [19], in which the main theoretical basis is to determine, in the time and frequency domain, the coefficients of the signals that throughout the space concentrate the energy of the SVET signal as well as the coefficients and energy of the noise that is generally distributed in the time domain and the whole frequency whose energy is less than the energy of the SVET signal.

By decomposing the SVET signal with noise by the DWT, we find that the resulting WT coefficients of the SVET potential signal are larger than the wavelet coefficients of the noise signal; this identification of coefficients allows defining a threshold and making the coefficients below the threshold equal to zero, resulting in noise removal from the potential SVET signal.

1.7. Stages in Noise Removal by the Threshold Method

Figure 1 shows a scheme for the general method of the threshold method for the removal of electrical noise. We show the three main stages, decomposition, threshold application, and reconstruction, as well as their respective substages. In LabVIEW the decomposition, threshold, and reconstruction are implicit in the Denoise function as follows:(i)Decomposition: it consists of determining the coefficients of the low and high frequencies and the level to which the threshold would be applied using the DWT of the SVET potential curve contaminated with white electric noise. In the Denoise function of LabVIEW, we can choose the mother wavelet and a level to decompose the potential signal.(ii)Application of the threshold: subsequently, once the SVET potential signal coefficients have been determined, a threshold is chosen to eliminate all threshold values below the threshold. In the Denoise function we can choose between soft thresholding or hard thresholding, type of rescaling, and threshold rule.(iii)Reconstruction: finally, after the threshold is applied and the noise is eliminated, the resulting coefficients, the level, and the wavelet used are part of the reconstruction. With the reconstruction, we finally obtain a signal of SVET potential free of electrical noise.The objective of the present investigation is to obtain a potential SVET signal with a high SNR for aluminum alloy A96061 in contact with an aqueous solution of 3.5% NaCl.

Figure 1: General thresholding procedure.

2. Materials and Methods

2.1. Metals and Specimens

In the experiment, samples of aluminum alloy A96061 protected with chromium conversion coating were used, applying chromium oxide as an anticorrosion pretreatment for aerospace applications. For the pitting corrosion formation process, the aluminum specimens were exposed in a saline mist chamber. The solution used in the fog chamber was 3.5% NaCl at 20°C; tests were carried out following the procedure recommended in standard ASTM B117.

2.2. System Employed

Here are four main devices that integrate the configuration of the system utilized to determine and measure the potential signal with the SVET.

The first one is a homemade SVET device that utilized a vibrating microelectrode with 10 to 20 μm spherical platinum black tip and vibrated with 20 μm amplitude at an average distance of 100 μm above the surface of the sample, with a vibration frequency of 60 Hz.

The second one is a mighty scope near infrared 10x–200x 5.0 MP video inspection system, Color CMOS, 6-LED light microscope operating at 850 nm, and USB 2.0 infrared digital microscope with a homemade lineal stage focus controlling mechanism in the range from 8.5 mm to 112 mm, with stepper motor NPM PF35-24CL.

The third one is homemade SVET device with stages, stepper motors VEXTA model PX245M-01, and a gain controlled instrumentation amplifier with high input impedance (1013 Ω/100 fA).

The fourth one is an embedded data acquisition FPGA (Field Programmable Gate Array) NI RIO NI myRIO with a dual-core Xilinx Z-7010 processor, 667 MHz processing speed 256 MB nonvolatile memory, and USB ports. This includes a 12-bit CAD and a sample rate of 500 kS/s connected to a computer whose main function is to display the results and store the information as well as to execute the virtual instrument that controls the SVET systems and computational vision of the optical preanalysis of the specimen under study. It is important to clarify that the data acquisition system employed has a dual-core processor and a FPAG array of components allowing the VI program to run on the NI myRIO making the background noise attenuation process in real time. Figure 2(a) shows the complete diagram of the system and Figure 2(b) shows the system employed.

Figure 2
2.3. Method

The pitting found in aluminum A96061 surface after being exposed to the saline fog is preanalyzed and identified optically using a virtual computer vision instrument developed in the laboratory and VI Localized Corrosion Image Analyzer (LCIA). The LCIA determines the location of pits in Cartesian coordinates. Subsequently, the coordinates are sent by electronic file to a workstation for electrochemical scanning that operates with the SVET. With the application of LCIA an effective sweep is made, only in the bites identified by computational vision, saving a considerable time of scanning.

The exploration of the pits that appear after the fog chamber test in 3.5% NaCl previously detected by the computer vision system was validated with the use of SVET.

VI employed in electrical noise attenuation includes the digitization of the potential signal obtained by SVET under background noise testing and the application of the Denoise and digital filter design functions of LabVIEW to the testing signal, to suppress the background noise.

3. Results

The localized corrosion pits were generated under saline fog conditions, the procedure recommended in the ASTM standard B117, the SVET technique, the application of the DWT, digital filtering implemented, in an embedded FPGA myRIO system, and the use of a VI for the optical preprocessing of specimens with localized corrosion.

Figure 3 shows images of the optical preprocessing. (a) corresponds to the digitized image of the observed specimen and (b) shows the preoptical processing. The red, green, blue, and yellow colors indicate possible stings.

Figure 3: Identification of potential pitting by computational vision: (a) digitized image; (b) preprocessing of colors red, green, blue, and yellow identifying potential stings.

The SVET potential curve with respect to the distance shown in Figure 4 corresponds to the bite identified with the green color in the optical preprocessing of Figure 2. The result of the measurement is an electrical signal immersed in noise. In the potential curve of Figure 3, a SNR of 9.03 dB was measured.

Figure 4: Signal of potential SVET immersed in a noise environment with a SNR of 9.03 dB.

By digitally processing the VI potential signal, the discrete wavelet transform, and the LabVIEW Denoise function implemented in an embedded FPGA myRIO system, a potential curve with a measured SNR of 178.56 dB was obtained. Figure 5 shows the potential amplitude SVET with respect to the distance of the potential curve digitally processed with the DWT. The parameters used were a Daubechies (db02), Level 15, threshold method, and soft thresholding wavelet.

Figure 5: Electrical noise attenuation with Wavelet Denoise with SNR of 178.56 dB.

By digitally processing the potential signal with the LabVIEW digital filter design (DFD) functions implemented in the embedded FPGA myRIO system, the resulting potential curve with the use of DFD is shown in Figure 6 presenting a SNR of 38.59 dB. For the SVET anode potential curve in Figure 3, the digital filter used to obtain these results is a Dolph-Chebyshev Window low-pass type FIR filter.

Figure 6: Electrical noise suppression with SNR digital filtering of 38.59 dB.

Table 1 summarizes the values obtained in the potential measurements on the SVET.

Table 1: Results of measurement and noise attenuation with wavelet transform and digital filtering.

4. Discussion

The results were obtained by comparing two VIs implemented in an embedded data acquisition system FPGA myRIO. The first one uses the Wavelet Denoise function of the advanced signal processing toolkit and the second with the tools and functions for LabVIEW digital filter design. In addition, information on optical preprocessing is presented as an alternative preanalysis method for A96061 aluminum specimens.

With the preoptical processing it is possible to detect in real time potential pitting and Cartesian coordinates of the pitting, in order to perform a sweep only in the incipient bites. The immediate benefit of this procedure is a reduction of scanning time with the SVET technique.

Figure 4 shows a SVET potential curve immersed in electrical noise making it impossible to measure the electrical potential due to corrosion without the application of noise suppression.

The graphs of Figures 5 and 6 and Table 1 demonstrate the electrical noise attenuation with the DWT and digital filtering as well as a summary of the electrical measurements made by SVET, respectively.

It is evident that DTW increases significantly the SNR to 178.56 dB corresponding to a noise removal of 169.53 dB compared to 9.03 dB of the SVET potential at the electrode tip, shown in Figure 4.

Using a digital filter, a SNR of 38.59 dB was achieved, representing an electrical noise attenuation of 31.3 dB, with a significant reduction in the amplitude of the potential and a displacement in the location distance of the potential peak of the bite of 100 μm regarding the time of the potential waveform, and it is due mainly to the transient response characteristics or filters instability zone.

The use of embedded systems presents an important advantage in the implementation of virtual instrumentation which makes it possible to develop portable instruments of specific function, recyclable and scalable for studies of localized corrosion.

If we compare the obtained results of the DTW, we find a noise removal 169.53 dB higher than that provided by the digital filtering of 31.31 dB. On the other hand, with the DWT the peak of the anodic potential waveform of the pit in its original position of 481 micrometers is maintained which does not happen if we use digital filtering.

5. Conclusions

VI implemented in an embedded system was developed with application in the electrical potential measurement and electric noise removal in SVET results. VI and embedded systems are recyclable, scalable, and end-user-defined for specific applications and are an alternative to traditional electrochemical measurements.

It was experimentally verified that the DWT and the threshold method are efficient and powerful alternatives to carry out electrical measurements of potential signals from localized corrosion processes measured by SVET. The application of the LabVIEW functions for the DWT can effectively remove electrical noise with a SNR of 169.53 dB or higher.

Conflicts of Interest

The authors declare that there are no conflicts of interest regarding the publication of this paper.


The authors acknowledge the Materials Corrosion Laboratory of the UABC Institute of Engineering for the economic support and facilities provided for the development of electronic instrumentation and testing of the experimental processes. They are grateful for the international collaboration with the National Center of Metallurgical Research (CENIM) Madrid, the Spanish State Council for Scientific Research (CSIC), for the support provided in the research and experimentation process in this work.


  1. R. Akid and M. Garma, “Scanning vibrating reference electrode technique: a calibration study to evaluate the optimum operating parameters for maximum signal detection of point source activity,” Electrochimica Acta, vol. 49, no. 17-18, pp. 2871–2879, 2004. View at Publisher · View at Google Scholar · View at Scopus
  2. H. S. Isaacs and Y. Ishikawa, “Current and Potential Transients during Localized Corrosion of Stainless Steel,” Journal of The Electrochemical Society, vol. 132, no. 6, pp. 1288–1293, 1985. View at Publisher · View at Google Scholar · View at Scopus
  3. S. Fujimoto and T. Shibata, Denki Kagaku, 64, 967 (1996).
  4. R. Ramos, R. K. Zlatev, M. S. Stoytcheva, B. Valdez, S. Flores, and A. M. Herrera, “Pitting corrosion characterization by SVET applying a synchronized noise suppression technique,” ECS Transactions, vol. 29, no. 1, pp. 33–42, 2010, The lectrochemical Society. View at Publisher · View at Google Scholar · View at Scopus
  5. P. Marcus and F. Mansfeld, Analytical Methods in Corrosion Science and Engineering, 2006.
  6. R. Ramos, R. Zlatev, B. Valdez, M. Stoytcheva, M. Carrillo, and J.-F. García, “LabVIEW 2010 computer vision platform based virtual instrument and its application for pitting corrosion study,” Journal of Analytical Methods in Chemistry, vol. 2013, Article ID 193230, 8 pages, 2013. View at Publisher · View at Google Scholar · View at Scopus
  7. H. Meng, J.-Y. Li, and Y.-H. Tang, “Virtual instrument for determining rate constant of second-order reaction by pX based on LabVIEW 8.0,” Journal of Automated Methods and Management in Chemistry, vol. 2009, Article ID 849704, 7 pages, 2009. View at Publisher · View at Google Scholar · View at Scopus
  8. W.-B. Wang, J.-Y. Li, and Q.-J. Wu, “The design of a chemical virtual instrument based on LabVIEW for determining temperatures and pressures,” Journal of Automated Methods and Management in Chemistry, vol. 2007, Article ID 68143, 7 pages, 2007. View at Publisher · View at Google Scholar · View at Scopus
  9. R. Moshrefi, M. G. Mahjani, and M. Jafarian, “Application of wavelet entropy in analysis of electrochemical noise for corrosion type identification,” Electrochemistry Communications, vol. 48, pp. 49–51, 2014. View at Publisher · View at Google Scholar · View at Scopus
  10. H. Men, C. Wang, Y. Peng, S. Yang, and Z. Xu, “Wavelet analysis and its application in the field of microbial corrosion,” in Proceedings of the 3rd International Symposium on Intelligent Information Technology Application, IITA 2009, IEEE Computer Society, NanChang, China, November 2009. View at Publisher · View at Google Scholar · View at Scopus
  11. J. A. Wharton, R. J. K. Wood, and B. G. Mellor, “Wavelet analysis of electrochemical noise measurements during corrosion of austenitic and superduplex stainless steels in chloride media,” Corrosion Science, vol. 45, no. 1, pp. 97–122, 2003. View at Publisher · View at Google Scholar · View at Scopus
  12. X. Wang, J. Wang, C. Fu, and Y. Gao, “Determination of corrosion type by wavelet-based fractal dimension from electrochemical noise,” International Journal of Electrochemical Science, vol. 8, pp. 7211–7222, 2013. View at Google Scholar
  13. L. A. Montejo and L. E. Suárez, “Aplicaciones de la Transformada Ondícula (“Wavelet”) en Ingeniería Estructural,” in Mecanica Computacional, vol. XXVI, pp. 2742–2753, Córdoba, Argentina, October 2007. View at Google Scholar
  14. M. Bitenc, D. S. Kieffer, and K. Khoshelham, “Evaluation of wavelet denoising methods for small-scale joint rougness estimation using terrestrial laser scanning,” in Proceedings of the ISPRS Annals of Photogrammetry, Remote Sensing and Spatial Information Sciences, vol. II-3/W5, ISPRS Geospatial Week 2015, La Grade Motte, France, 28 Sep–03 Oct 2015, 28 Sep-03 Oct 2015.
  15. S. G. Chang, B. Yu, and M. Vetterli, “Adaptive wavelet thresholding for image denoising and compression,” IEEE Transactions on Image Processing, vol. 9, no. 9, pp. 1532–1546, 2000. View at Publisher · View at Google Scholar · View at MathSciNet
  16. D. L. Donoho and J. M. Johnstone, “Ideal spatial adaptation by wavelet shrinkage,” Biometrika, vol. 81, no. 3, pp. 425–455, 1994. View at Google Scholar · View at MathSciNet
  17. D. L. Donoho, “De-noising by soft-thresholding,” IEEE Transactions on Information Theory, vol. 41, no. 3, 1995. View at Publisher · View at Google Scholar · View at MathSciNet
  18. R. R. Coifman and D. L. Donoho, Translation-Invariant De-Noising, Spriger, New York, USA, 1995.
  19. B. Wu and C. Cai, “Wavlet denoising and its implementation in LabVIEW,” in Proceedings of the 2009 2nd International Congress on Image and Signal Processing, CISP '09, IEEE, Tianjin, China, October 2009. View at Publisher · View at Google Scholar · View at Scopus