# Ultrasonic Data Compression and Analysis During Material Inspection

Thouraya Merazi-Meksen, Malika Boudraa, Bachir Boudraa

► To cite this version:

Thouraya Merazi-Meksen, Malika Boudraa, Bachir Boudraa. Ultrasonic Data Compression and Analysis During Material Inspection. 11th IFIP International Conference on Artificial Intelligence Applications and Innovations (AIAI 2015), Sep 2015, Bayonne, France. pp.168-176, 10.1007/978-3-319-23868-5_12. hal-01385353

HAL Id: hal-01385353

https://inria.hal.science/hal-01385353

Submitted on 21 Oct 2016

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Ultrasonic Data Compression and Analysis
during Material Inspection

Thouraya Merazi-Meksen, Malika Boudraa and Bachir Boudraa

University of Science and Technology Houari Boumediene
USTHB, BP32, El Alia, 16111, Bab Ezzouar, Algiers, Algeria

tmeksen@usthb.dz

**Abstract.** Ultrasonic inspection is nowadays widely used in material inspection to detect and locate internal defects. However, in case of large structures inspection, such as pipelines, vessel reactors etc., the amount of signals to acquire and interpret may be very important, especially in modern techniques that use image representations.

In this article, a proposed algorithm to ultrasonic data selection and processing is described. Images will be replaced by 2 arrays that contain only the data regarding a detected defect. This allows avoiding the storage of useless received ultrasonic data, and simple pattern recognition techniques may be exploited to defect characterization.

**Keywords:** Ultrasounds; Data compression; Signal processing algorithm; Shape recognition.

## 1 Introduction

In ultrasonic examination of materials, Time Of Flight Diffraction (TOFD) technique has demonstrated high accuracy in detection of internal defects presented in materials [1]. Based on data digitalization and processing, it improves inspection performances in terms of reliability and sensitivity (better defect detection and identification), especially for crack detection.

The Time of Flight of the diffracted ultrasonic echo produced by the extremities of the crack is measured and stored to determine the position of a pair of probes and be displayed as image known as D-SCAN or TOFD image. Since Bolland demonstrated that internal cracks presented in a structure under control involve a set of parabolic shapes in TOFD images [2], detecting parabolic forms has become a solution to automatically analyze TOFD images for crack detection. Lew Lei et al used a gradient based Hough Transform [3], Maalmi exploited genetic algorithms [4], and Petcher et al. used a matched filtering [5].

When large structures are inspected (reactors, pipelines...) the amount of data to interpret will be considerable, and recording all images, especially when there is no defect, is useless. The inconvenient of these methods is the processing of all pixels of
images, as the most of them are zeros, especially when no defect is presented. This is
why recent works aimed to develop automated data interpretation [6, 7], and interest
of developing low dimension representations is increasing [8,9].

In this context, we proposed in a precedent work, a method based on neural
networks that selects ultrasonic data regarding a detected defect. This allows avoiding
the storage and the processing of useless signals [10]. The work presented in this
paper is another approach to build the sparse matrix structure for ultrasonic data
storage in order to record the only ones concerning the defects in one hand, and in
another hand, to show that pattern recognition tools such as RANdom Sample
Consensus (RANSAC) filter can be applied on the sparse matrix elements to crack
recognition, automating thus the detection.

Next section consists in a brief remind of ultrasonic TOFD technique inspection as
well as the modeling of the parabolic forms characterizing the crack defect on images.
In section 3 the proposed approach for data storage in sparse matrix structure is
described as well as the application of the RANSAC filter on its elements. Results and
conclusion are given in section 4.

## 2 TOFD Inspection

### 2.1 Principle

When ultrasound is incident at linear discontinuity such a crack, diffracted waves
take places at its extremities in addition to the normal reflected and refracted waves.
This diffracted energy is emitted over a wide angular range and is assumed to
originate at the extremities of the flaw (Figure 1).

<figure><img src="image_2.png" /><figcaption>Fig. 1. Ultrasonics waves.</figcaption></figure>

1: Incident wave.

2: Reflected wave.

3: Refracted wave.

4: Diffracted wave at upper tip.

5: Diffracted wave at lower tip.

In TOFD inspection, two transducers, are moved step by step according to a straight
line, one as emitter and one as receiver (Figure 2).
<figure><img src="image_3.png" /><figcaption>**Fig. 2.** Structure under control for defect detection.</figcaption></figure>

At each position, the received signal is converted in electrical one, digitized, then displayed in grey scale as a row of an image. Each sample of the signal represents a pixel. Usually, zero amplitude light in grey, negative maximum amplitude in black and positive maximum amplitude in white. The figure 3 shows an example.

<figure><img src="image_4.png" /><figcaption>**Fig. 3.** (a) Ultrasonic signal, (b) TOFD image.</figcaption></figure>

When the defect presented in the materials is a crack, it appears on the image a set of parabolas with a main axis. This zone, called region of interest is relatively small in comparison with the TOFD image. In this work, it is proposed to exploit the sparse matrix structure to register only the pertinent data regarding the detected defect to avoid the record of a huge number of zeros (or noise signals) during the control.

## 2.2 Parabola modeling

During a TOFD inspection, the probes are displaced step by step, according to a straight line. When they are at equal distance of the defect ($d_x= 0$), the time of flight
$t(dx)$ is minimal. As $dx$ increases, the calculations formulated by Bolland in [2] conclude that $t(dx)$ is given by Formula (1):

$$t(d_x) = \frac{z^2}{c(z^2+d^2)^{3/2}} (d_x)^2 + \frac{2\sqrt{z^2+d^2}}{c} \quad (1)$$

where $c$ is the ultrasound velocity, $z$ is the depth of the defect and $d$ is half of the distance between the two transducers. Because these three parameters are constants, Formula (1) can be expressed as follows:

$$t(d_x) = A(d_x)^2 + B \quad (2)$$

This form is characteristic of a parabola. Figure 5 shows the representation of the time of flight (TOF) according to the displacement $d_x$.

<figure><img src="image_5.png" /><figcaption>Fig. 4. Theoretical representation of the relationship between the time of flight $t$ and the displacement $dx$ of the transducers.</figcaption></figure>

# 3 Sparse Matrix Construction

## 3.1 Sparse Matrix Structure

The sparse matrix is a compressed manner to store matrix when the major elements are zeros. The principle consists in expressing it by three or two arrays. One array contains the non zeros values, and the two others contain their respective co-ordinates. For example, the following 5 x 7 matrix M will be represented by the three arrays A, XA, YA

$$M = \begin{bmatrix} [0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0] \\ [0 \ 1 \ 3 \ 0 \ 0 \ 0 \ 0] \\ [0 \ 9 \ 0 \ 0 \ 0 \ 0 \ 0] \\ [0 \ 0 \ 2 \ 4 \ 0 \ 0 \ 0] \\ [0 \ 0 \ 0 \ 0 \ 0 \ 0 \ 0] \end{bmatrix} \quad \begin{array}{l} A = [1 \ 3 \ 9 \ 2 \ 4] \ (\text{non zero values}) \\ \text{XA} = [2 \ 2 \ 3 \ 4 \ 4] \ (\text{corresponding rows}) \\ \text{YA} = [2 \ 3 \ 2 \ 3 \ 4] \ (\text{corresponding columns}) \end{array}$$

There are two types of sparse matrix: Many zeros elements or many zeros lines. When the only non zeros positions values are needed (as in this studied case), the only
two arrays XA and YA are stored. There are two types of sparse matrix: structured and unstructured. In the structured matrix, the nonzero elements form a regular pattern or lie in blocks and a graph may be used for representing it by connecting the elements.

## 3.2 Data Selection

When a matrix contains few non zeros elements, it is termed sparse and may be recorded as a 2D array containing the coordinates on the non zero elements [11]. On ultrasonic images, the zone of interest (defect zone) is very small in comparison of the dimension of the structure under control. It is then suitable to process in the decision phase, only the data regarding the detected defect. The idea consists in avoiding the storage of the signal when it is only constituted by noise, and in another hand to select a unique sample of the reached signal in the defect zone. This sample corresponds to the amplitude determined by a threshold calculated after comparison with the mean and the variance of a signal reached in a zone without defect. Figure 5 shows an example.

<figure><img src="image_6.png" /><figcaption>Fig. 5. (a) Ultrasonic reached signal, (b) Selected sample corresponding to the Time of Flight.</figcaption></figure>

Figure 6 (b) shows the resulted sparse matrix that replaces the image of figure 6(a).

<figure><img src="image_7.png" /><figcaption>Fig. 6. (a) One defect on classical TOFD Image. (b) Sparse matrix obtained by selecting relevant samples.</figcaption></figure>
Thus, calculations will be done on the 120 resulting points, instead of the 150x120 pixels of the TOFD image.

## 3.3 Parabola Detection

The three well known used methods to parameterized form detection are: Least square, the Hough Transform and the RANSAC filter. Least square is the easier algorithm to use if the points belonging to the curve are known. RANSAC is used where many points, (called outliers) do not fit the researched form [12]. The points that are nearest the curve are called inliers. The Hough transform is a voting method used when many forms are presented in the image.

In TOFD images, shapes corresponding to defect have parabolic forms. The aim of this work is to detect those parabolas in an automated manner. RANSAC filter is the most suitable algorithm to exploit, as it can detect imperfect parameterized forms (presence of noise, incomplete forms...). This algorithm is simple and need less computational time than the Hough transform. The principle consists in estimating parameters of the shape which can be expressed by a mathematical model with a certain probability. It can thus be applied to detect lines, circles, parabolas on images. The benefit is that imperfect forms can be detected when some data, called outlier, do not fit the model. Outliers can be generated by extreme values of the noise or from incorrect measurements. The points that are the nearest the researched form are called inliers. The figure 7 illustrates an example of a set of data, where the inliers can be fitted to a line.

<figure><img src="image_8.png" /><figcaption>Fig. 7. Example of points fitting a line.</figcaption></figure>

The algorithm to apply can be summarized as follows:

Define a threshold $T$

Repeat (Maximum N times)

- Select randomly a subset of 2 points.

- Calculate a model that uses those 2 points

- Determine how many points from the set of all points fit with a predefined tolerance $\epsilon$.

- Determine the number of inliers $N_i$ over the total number points in the set.

Until $N_i > T$
The number of iterations N is calculated by equation 3:

$$N = \frac{\log(1-p)}{\log(1-u)} \qquad (3)$$

Where m is the minimum number of points required, u, the probability that any selected data point is an inlier, and p the probability that at least one of the sets of random samples does not include an outlier (usually set to 0.99).

## 4 Results and conclusions

When applying the RANSAC filter on the sparse matrix represented in figure 6(b), the calculated parabola is drawn to illustrate the result (figure 8.). The three prominent points are examples of randomly selected samples to parabola calculation.

<figure><img src="image_9.png" /><figcaption>Fig. 8. The optimal calculated parabola is drawn in continuous line. The three prominent points are an example of a set of 3 points randomly selected from the selected samples of data constituting the sparse matrix, built instead of TOFD image on figure 6(a).</figcaption></figure>

Figure 9 (a) represents another example of a TOFD image presenting three detected cracks. In (b), stars represent sparse matrix elements resulting and the parabolas calculated using the RANSAC algorithm.
<figure><img src="image_10.png" /><figcaption>**Fig. 9.** (a) Three defects on TOFD image. (b) Resulting sparse matrix elements (stars) and calculated parabolas (continuous lines).</figcaption></figure>

In precedent works [2-5] parabolas were respectively detected by calculating the gradient, matched filters and genetic algorithms. All pixels have to be considered in the processing what involves time consuming and useless data storage.

This work shows the feasibility of avoiding TOFD image formation, replacing it by a sparse matrix on which RANSAC filter may be applied. First, a pre-processing selects on every row of the region of interest, a single pixel, sufficient to determine the time of flight of the signal echo at corresponding probes position. Recording only those two coordinates (Time of Flight and probe position) during the probe displacement led to a matrix formation. TOFD image is thus reduced to a sparse matrix and the points to consider considerably reduced. In the decision phase, RANSAC filter had been exploited in order to recognize the parabolic form and determining its summits coordinates to crack location.

References

1. M. G Silk., Lidington B. H. The Potential of Scattered or Diffracted Ultrasounds in the Determination of Crack Depth. Non-Destructive Testing, vol.8, issue 3, June (1975) pp 146-151.

2. P. Bolland, Imagerie Ultrasonore pour la Detection Automatique de Défauts en Contrôle non Destructif. Thesis of institut national des sciences appliquées de Lyon France, (1992).

3. F.C. Lew Yan Von Gradient Based Hough Transform for the Detection and Characterisation of Defect during Non Destructive Inspection. Proceeding of symposium on electronic imaging science and technology, California, vol 3029, (1997), pp 140-141.

4. J. K. Maalmi et al. detecting parabolas in ultrasound b-scan images with genetic-based inverse voting hough transform. IEEE International Conference on Acoustics, Speech, and Signal Processing, 2002. (ICASSP '02), Vol.4, pp 3337-3340

5. P. A. Petcher, and S. Dixon, Parabola detection using matched filtering for ultrasound B-scans. Ultrasonics, Vol.52 (No.1). (2012) pp. 138-144.
6. S. Sambath, P. Nagaraj, N. Selvakumar: Automatic Defect Classification in Ultrasonic NDT Using Artificial Intelligence. Artificial Intelligence. Journal of Nondestructive Evaluation (2011) 30, 20–28

7. J E P De Moura, et al. Welding defect pattern recognition in TOFD signal Part 1: Linear classifier. Insight, vol 47, n° 12, (2005).

8. G.M Zhang, C.Z Zhang, D. M. Harvey. Sparse signal representation and its applications in ultrasonic NDE. Ultrasonics vol. 52 (2012), pp 351–363.

9. F. Boßmann, G. Plonka, T. Peter, O. Nemitz, T. Schmitte, Sparse deconvolution methods for ultrasonic NDT, Journal of Nondestructive Evaluation vol. 31, (2012) 225-244.

10. T. Merazi-Meksen, M. Boudraa, B. Boudraa. Neural Networks to Select Ultrasonic Data in Non Destructive Testing. Contemporary Challenges & Solution in Applied Intelligence, SCI 489, (2013) 205-210.

11. I.S Duff and A.M. Erisman, Direct Method for Sparse Matrix, Clarendon Press, New York, USA, (1987).

12. A. M. Fischler and R. C. Bolles, Random Sample Consensus: A Paradigm for Model Fitting with Applications to Image Analysis and Automated Cartography, Comm. Of the ACM, vol. 24, June (1981) 381–395