Application of Neuro-Wavelet Algorithm in Ultrasonic-Phased Array Nondestructive Testing of Polyethylene Pipelines

Polyethylene (PE) pipelines with electrofusion (EF) joining is an essential method of transportation of gas energy. EF joints are weak points for leakage and therefore, Nondestructive testing (NDT) methods including ultrasonic array technology are necessary. This paper presents a practical NDT method of fusion joints of polyethylene piping using intelligent ultrasonic image processing techniques. In the proposed method, to detect the defects of electrofusion joints, the NDT is applied based on an ANN-Wavelet method as a digital image processing technique. The proposed approach includes four steps. First an ultrasonic-phased array technique is used to provide real time images of high resolution. In the second step, the images are preprocessed by digital image processing techniques for noise reduction and detection of ROI (Region of Interest). Furthermore, to make more improvement on the images, mathematical morphology techniques such as dilation and erosion are applied. In the 3rd step, a wavelet transform is used to develop a feature vector containing 3-dimensional information on various types of defects. In the final step, all the feature vectors are classified through a backpropagation-based ANN algorithm. The obtained results show that the proposed algorithms are highly reliable and also precise for NDT monitoring.


Introduction
The ultrasonic technique as a nondestructive testing (NDT) method has been widely used over decades to evaluate the quality of materials and equipments without causing damage in a large range of industries.In the evaluation of pressure vessels and piping, not only is UT utilized in manufacturing quality controlling, but also has been used in service monitoring and residual life prediction, such as the inspection of welded joints, monitoring of crack propagation, and evaluation of materials property deterioration.In the specific case of welded materials, the research for the development of an acceptable system for analyzing the extracted images from the welded joints has grown considerably in the last years [1][2][3][4].
One of its applications is in the gas pipelines where the usage of natural gas in residential, commercial, and industrial facilities is increased day by day.In this way, Polyethylene pipes rapidly substituted the metal pipes, because the polyethylene pipes have a high-corrosion resistance, easy to form, lighter, and cheaper than metal ones.In fact, the main reason for using PE pipes in gas distribution is that its material has a high-chemical resistance against corrosive materials in transported gas.In addition, PE pipes are easy to carry, lie down, and make connections.Because of these benefits, gas distribution companies and water and sewage organizations would change their existing systems and use the PE pipes.The demand of polyethylene (PE) pipeline is increased for gas energy transportation and electrofusion (EF) joining is an essential method to build PE pipeline [5].
It is important to note that, usually the EF joints are considered as weak points for leakage, and kind of nondestructive test is necessary.One of the main factors disturbing the reliability and accuracy of the test is the encountered noise during inspection.The most commonly used ultrasonic detector is the A-scan detector.This kind of traditional UT has several disadvantages such as the need for a skilled and experienced technician to judge the defect, also the lack of permanent record, which is extremely important in the condition monitoring and in-service inspection [5].
These problems may be easily solved by the introduction of a digital ultrasonic system, which combines the computer and digital signal processing (DSP) technology into UT instrument [6][7][8][9].Electrical, pulse, ringing, and structure noises are the most commonly encountered noises, which reduce the quality of extracted images for NDT evaluations.But in order to improve the process of image processing, wavelet transforms are used significantly [10][11][12].The wavelet transform, multiresolution analysis, and other space frequency or space scale approaches are now considered as standard tools by the researchers in signal processing, and many applications have been proposed.The theory of wavelet analysis has been well studied in [13], where images are represented by wavelet reconstructing toolbox.
Bhuiyan et al. have successfully used wavelet transforms to significantly improve identification and classification rates on fingerprints.They showed that wavelet contains features that are more pronounced for higher accuracy in recognizing fingerprints [10].
Also in [11,12] the output of wavelet transformation to obtain some features is used as an input to the artificial neural network (ANN) classifier for pattern recognition.
The aim of this paper is to present a new combined intelligent algorithm considering digital image processing, neural networks, and mathematical morphology techniques for improving the quality of extracted images from NDT evaluations.Features are extracted from Haar wavelet decomposition of the JPG images.The simulations are done using MATLAB platform.Obtained results show that the proposed algorithms to ultrasonic signals are highly reliable and precise for quality of NDT testing and monitoring.

Electrofusion Joining of PE Pipe
EF joining is one of the widespread PE pipe weld methods.An estimated annual use of EF joining was over 15 million in 1993 [1].This technique makes possible joining of preassembled pipes to be carried out with minimum equipment.Electrofusion method is a system that welds pipes together through fittings whose internal surfaces are covered with special resistance wires (as shown in Figure 1).Welding is performed through melting plastic material with heating coils that reach a high temperature as a result of the stress applied to the sockets on fittings by an electrofusion machine.The electrofusion welding process can be described in three stages: initial heating and fitting expansion, heat soaking to create the joint, and finally joint cooling.The application of the electrofusion process is shown in Figure 1.
Usually, wound-heating wires exist between the coupler and main pipes.The distance between adjacent wires is usually very close, for example, 1∼3 mm.The fundamental ideas of joining process are to heat the wires and to melt the inside and outside surface of coupler and main pipes respectively, and then to consolidate fusion area.Welding faults (bad preparation of the pipe, poor cleaning, pipe surface being not scraped, pipe and fitting being badly clamped, or not respecting of fusion time) can generate defects.Figure 2 shows a cross-section view of the coupling.The position of the heating wires and possible flaw locations are shown.

Proposed Algorithm
In order to improve the raw UT images for observation and accurate analysis, a combined algorithm is proposed considering various image preprocessing, mathematical morphology (such as dilation and erosion operations), wavelet feature extractor, and artificial neural network.Flowchart of proposed algorithm is shown in Figure 3.
The starting point of this algorithm is collecting and inserting the raw UT images.In this way, all electrofusion (EF) joints of polyethylene pipes must be tested by ultrasonic method.Then extracted images will be prepared and saved as JPEG pictures for computer evaluations.
Once the template and test images are resized, threshold values for the grayscale images are determined to convert the images into binary ones.Grayscale images with levels between 0 and 255 are converted into binary images.It is assumed that the initial threshold is equal to 0.55.This value will be updated during this algorithm if it cannot find an appropriate result.
Then binary images will be fed into the image processing step including preprocessing sections such as noise reduction and segmentation based on the image processing toolbox of MATLAB software [14].Preprocessing involves applying radiometric and geometric corrections to a raw image data.Several levels of corrections have been defined.For the preprocessing step, all noises and unwanted objects will be removed from the document's image.This leads to an easier and more effective process.Afterward, more improvement will be made bymorphological operations.Mathematical morphology [15] is a mathematical tool for analyzing image on morphological basis.Its basic idea is to use structuring elements of certain morphology to measure and extract corresponding morphology in the image for making analysis and recognition.The application of mathematical morphology helps to simplify image data, so the basic morphologies of image can be maintained and unrelated structure can be removed.Mathematical morphology consists of four basic steps including morphology corrosion, morphology expansion, opening operation, and closing operation.In this paper, we focus on the dilation and erosion operations of the mathematical morphology.Given f (x, y) is a grey-scale image on domain Z. g(x, y) is a structuring element on domain Z hence, the formula for grey-scale expansion operation of image f (x, y) based on g(x, y) is as follows: Accordingly, the erosion of f (x, y) by g(x, y), denoted by f Θg, is defined as ( Many other morphological operations are based on these two basic operations [15].
The operations of erosion, dilation, opening, closing, and others can extract many types of information about a binary image.Morphological reconstruction can be applied for restoring the lost image information and also for segmenting object image as shown simulations [16].Then the prepared ROI section from the images will be used by wavelet transform.Finally, all features like mean and standard deviation of data will be trained by a multilayer neural network.Details regarding this algorithm and its simulation are presented in the next section.

Simulation Results
The experimental results and performance evaluation of the proposed method are described in this section.Real time ultrasonic array technique was applied to obtain the ultrasonic images of the cross-section of electrofusion joints.

Journal of Control Science and Engineering
Ultrasonic array transducers in this simulation have 96 array elements and the center frequencies of the transducers were 7.5 MHz for the high-resolution application.To monitor the real time image, a PC monitor is connected to the system.Also 3D-FFT (Haar wavelet) was used in feature extraction processes of ROI images and simulations were performed on 2 GHz PC by using MATLAB.

Image Resizing.
Tests showed that the best performance will be achieved by increasing the dimension of input pictures to twice their initial size.Because the raw image are small and by increasing the dimension more details such as pixels and the edges of regions will appear significantly.The results of this part are presented in Figure 4.

Noise Reduction and Morphological Application.
Noise reduction is the process of removing noise, holes, and unwanted details from images.Noises in binary images mainly consist of isolated pixels of opposite value in image objects or background (also called salt-and-pepper noise); small holes on objects and small spots on the background; line merging and splitting.In the simulated case of this paper, a combined binary filter is used for erosion or dilation of objects, removal of noise in an image, detect edges, and smoothing the image.
This filter consists of two steps.In first step, a separate program is applied to indicate and remove all holes with areas less than 30 (This threshold is determined by text).Then, in the second step, morphological method is applied for more improvement.The result of noise reduction based on first step of binary filter is presented in Figure 5.It is clear that unwanted areas are removed from the images.
But in case of morphological application, designing a structural element is necessary.Mathematical morphology regards an image as a set and uses another smaller set which is called as structuring element to probe the image.
This apparent geometric description of set theory makes mathematical morphology more suitable for visual information processing.Mathematical morphology is originally proposed for binary images, and its basic theory is developed in this application.In this case, a 5 × 5 structuring element (Figure 6) is designed for morphological application.So in some cases, the results of this application are shown in Figure 7.
Based on the proposed algorithm in Figure 3, the important step of this algorithm is to extract a high-quality ROI for further examination by wavelet transform.So it is necessary to trace and indicate the exterior boundaries of objects, as well as boundaries of holes inside the objects, in the binary image.So nonzero pixels will belong to an object and 0 pixels constitute the background.These boundaries for each region in binary images are specified using MATLAB functions.In the next step, circular index of each obtained object from previous step should be indicated.Circular index is defined by where S and P are the area and perimeters for each object, respectively.
To imply this matter, an acceptable value for circular index (circular threshold) should be found for a sufficient comparison with current situation of each object.
Tests and simulations on database showed that the best value for this circular threshold is around 0.83, so acceptable circular objects will be selected and simultaneously the performance of this algorithm will be sufficient enough.In this way, all regions with a circular index higher than 0.83 will be shown as heating wires as a very important factor for final evaluation.The simulation result of this step, which is about boundaries and circular object indication, are shown in Figure 8.As shown in this figure, circular index for all objects is determined.
Based on presented information in Figure 8, there are various objects with circular index higher than 0.83 and ROI will be selected around these objects.
Extracted ROI is shown in Figure 9.This region will be included by the exact places of the EF joints in polyethylene pipelines.

Data Extraction by Wavelets
Transform.Wavelet transform exploits both the spatial and frequency correlation of data by dilations (or contractions) and translations of mother wavelet on the input data.It supports the multi resolution analysis of data that can be applied to different scales according to the details required, which allows progressive transmission and zooming of the image without the need of extra storage [17,18].
The implementation of wavelet compression scheme is very similar to the subband coding scheme: the signal is decomposed using filter banks (Figure 10).The output of the filter banks is downsampled, quantized, and encoded.The decoder decodes the coded representation, up-samples and recomposes the signal [17].
Wavelet transform divides the information of an image into approximation and detail subsignals.The approximation of sub-signal shows the general trend of pixel values, and other three detail sub-signals show the vertical, horizontal and diagonal details or changes in the images.
In this paper 3D wavelet is used, and by utilizing the ROI (from previous section), all information about images will be extracted by wavelet transform.The results of using wavelet are shown in Table 1, where Fi is a matrix for saving the extracted data and all data will indicate the entire extracted features from the images.In fact, in this simulation 5-level HAAR wavelet is used and it is clear that Fi matrix includes from 5 rows and each row will be about each level extraction for wavelet.Also in this matrix, it is clear that we have 6 columns and each column will include features such as: the mean and standard deviation of data for horizontal, vertical, and diagonal details, respectively.

Final Evaluation by ANN.
Using the extracted feature vector representations from previous section, neural classifier is trained and tested to recognize and classify the scenes.
Neural networks are based on models of biological neurons and form a parallel information processing array based on a network of interconnected elements [19,20].A Multilayer perceptron (MLP) networks is used in this paper.This type of network is trained using a process of supervised learning in which the network is presented with a series of matched input and output patterns and the connection strengths or weights of the connections are automatically adjusted to decrease the difference between the actual and desired outputs [19].The structure of this kind of network is shown is Figure 11.
The introduced ANN was trained by the main features of images for different joints.So part of the data will be used for training phase, and in the next step trained network will be tested.Figure 12 depicts the converging training graph of neural classifier for Haar wavelet features, respectively.This network is trained after 4000 epoch and the error is acceptable.After that, a testing set by other images will be used to check the classification performance and its accuracy.
In fact, the trained network is used for testing, and in this way 10 practical images are applied for this evaluation.Based on the simulation results, 9 images are recognized correctly.It is assumed that the image with correct joint is 1 and each image with incorrect joint is −1.Based on used testing images we have 7 images with correct joint and 3 incorrect joint.In this section, based on the previous information, the network is trained.Next, the results of testing network are presented in Figure 12 and Table 2.Note that the desired

Figure 2 :
Figure 2: General structure and location of joint flaws.

Figure 7 :Figure 8 :
Figure 7: The effect of morphology on two sample images.(a) Before morphology application, (b) after morphology.

Table 2 :
Simulation results in case study.