Signal processing for corrosion assessment in pipelines with ultrasound PIG using matched filter Ramon Vieira Canales Polit´ ecnica School of S˜ ao Paulo University Email: emaildoramon@gmail.com Celso Massatoshi Furukawa Polit´ ecnica School of S˜ ao Paulo University Email: cmfuruka@usp.br Abstract—This work describes the development of an algo- rithm that uses ultrasound to evaluate the degree of corrosion in pipeline walls. The developed algorithm was implemented in a dedicated digital circuit that can be embedded in ultrasonic pigs for pipeline corrosion inspection. The algorithm is based on the mathematic model known as matched filter. It also incorporates a peak detection method for the localization of ultrasound echoes, originated from the signal reflections in the pipeline walls. One of the problems is the determination of the signal (and filter) that should be used, but using a signal design approach, a large number of possibilities could be analyzed so that only a few had to be tested in experiments. Finally, the best signals were used to inspect a sample made of a corroded pipeline section, and the results were analyzed. The detection of the first wall showed promising results when compared to the results of a tridimensional inspection of the same walls. It was possible to reconstruct the profile of the internal wall with good likelihood, even in badly corroded areas. The detection of the second wall showed some satisfactory results on low corrosion levels, but showed some problems with high corrosion levels, compromising the direct measurement of the pipeline wall thickness. I. I NTRODUCTION Pipelines are the cheapest and safest way to transport oil, but are subject to corrode, which can lead to leakage of toxic fluids, causing serious environmental accidents. It is of great interest that these accidents can be prevented by inspecting this pipelines for damaged regions. However, these inspections can be complex and expensive. The narrow pipe diameters make it impossible for a person to do an internal inspection of it. Furthermore, it is desirable to minimally affect the pipeline operation. For these reasons it is necessary to use equipment that can be inserted in the pipeline. Such equipment carries several types of sensors (magnetic, tactile or ultrasonic) to assess the level of corrosion or metal loss of the pipes and are known as instrumented Pigs (Pipeline Inspection Gauge). In this work it was developed an algorithm for use in Ultrasonic Pigs, which detects the TOA - Time of Arrival of an ultrasound echo, and through this time, reconstructs the profile of the pipeline wall. The algorithm was implemented in a digital circuit through a programmable logic device (FPGA - Field Programmable Gate Array) and tested in controlled inspections, simulating real inspections. Fig. 1. Transmission and reception of ultrasound echoes, and their respective TOA II. THEORETICAL ASPECTS A. Ultrasonic Inspection In the case of pipeline wall inspection, acoustic pulses generated by ultrasound transducers reflects on the inner walls of the pipe and are received as echo signals. Knowing the propagation speed of the wave in the medium, and measuring the time between the transmission and reception of the echo (known as TOA) it is possible to determine the distance between the transducer and the wall. By determining these distances along a body, its profile can be reconstructed, and it is possible to estimate its level of corrosion. Furthermore, it is possible to measure the wall thickness, taking the time difference between the first and second echoes. The TOA is estimated by analyzing the received echo. Figure 1 shows an example of transmission and reception of echoes generated by the walls, and their respective TOA (adopting a criteria of greater amplitude as the TOA). The ultrasound wave propagation can be accurately predicted in homogeneous liquids, and when reflecting on flat and polished metallic surfaces. However, when trying to receive echo sig- nals generated by corroded and rough surfaces, in a medium with high attenuation, the SNR (Signal-to-noise-ratio) of the received echo is greatly impaired. III. MATHEMATICAL ALGORITHMS As seen in section II-A, the basic problem in ultrasonic inspection is to estimate the time of arrival of the ultrasound echoes. The simplified mathematical model of the received signal can be described as: