Locating and Classifying Defects with Artificial Neural Networks

Locating defects and classifying them by their size was done with an Adaptive Neuro Fuzzy Procedure (ANFIS). Postulated void of three different sizes (1x1 mm, 2x2 mm and 2x1 mm) were introduced in a bar with and without a notch. The size of a defect and its localization in a bar change its natural frequencies. Accordingly, synthetic data was generated with the finite element method. A parametric analysis was carried out. Only one defect was taken into account and the first five natural frequencies were calculated. 495 cases were evaluated. All the input data was classified in three groups. Each one has 165 cases and corresponds to one of the three defects mentioned above. 395 cases were taken randomly and, with this information, the ANN was trained with the backpropagation algorithm. The accuracy of the results was tested with the 100 cases that were left. This procedure was followed in the cases of the plain bar and a bar with a notch. In the next stage of this work, the ANN output was optimized with ANFIS. The accuracy of the localization and classifications of the defects was improved.


Introduction
One of the main problems related with numerical methods is the convergence of the results to the solution.In the case of localization of defects, ANN is useful for this purpose.It has been used in conjunction with the Finite Element Method, following an Inverse Computation Analysis.Defects are commonly localized evaluating the mechanical response of a structure.It depends on its geometrical characteristics.Marwala and Hunt [1] established that the vibration characteristics of a body can be used for this purpose.Input data can be obtained with frequency response or modal analysis.Nonetheless, and in accordance with their conclusions, best results are obtained when this input data is based on the natural frequencies.
In the open literature, there are reported cases in which the vibration response is used in this indirect approach.Defects are identified with the Finite Element Method or experimental analysis in conjunction with ANN.As an example, the characterization of horizontal cracks in beams of isotropic materials can be mentioned.The results show that crack length can be estimated considering the dynamic response [2].Following this approach, horizontal cracks in beams are detected with the dynamic response after a transverse load is applied.The experimental results are used with ANN [3].Regarding the evaluation of delamination in composites made of carbon and epoxi, the Finite Strip Method with ANN are used [4].
Neuro fuzzy logic has been used in the classification of defects.An application in welds, can be found in [5].Through ultrasonic time-of-flight diffraction, a data set is created, then it is analyzed with three methods: ANN, fuzzy logic classifier and neuro fuzzy system.The last one seems to be the best.Also, this technique has been used in the improvement of the tracking for radar/infrared system [6].These results show that the algorithm can effectively adjust the system and has a capability in resisting uncertain information.Other application is the classification of buried pipe defects [7].In this case, the proposed neuro fuzzy model is tested versus other five different methods.The neuro fuzzy classifier performs classification accuracies around 90% on real concrete pipe images.
In preliminary work, a reduction of the accuracy of the results was observed, when a defect in a bar is localized and classified with a single ANN.For this purpose, an inverse computational analysis was followed.The first five natural frequencies were the input data.This synthetic data was obtained with the Finite Element Method.This analysis was complemented with ANN.Considering the ideas mentioned above, the purpose of this work is the improvement of such accuracy with a neuro fuzzy analysis.
As it was mentioned before, ANN gives a good localization of the defects when the natural frequencies are used to generate the input data.However, the accuracy of the evaluation is reduced when classification is involved.Neuro fuzzy analysis can be used for the optimization of the solution.For the purpose of this work, it is proposed to use both methods.A single ANN will be used in the localization of classification of defects.Its results will be optimized with a neuro-fuzzy system.The consistency of the procedure will be analyzed by introducing some changes in the geometry of the component analyzed.

Statement of the problem
The purpose of this neuro-fuzzy analysis is the localization and classification of defects in the bars shown in Fig. 1.In both cases, the thickness is 1 mm, therefore plane stress conditions may be assumed.It is considered that the dynamic response depends on the bar dimensions and the localization of the defect.Consequently, synthetic data, based on the analysis of natural frequencies, was generated when a defect was located in the shadowed area (20 mm x 8 mm).This area is located 51 mm away from the left end.Three types of defects were considered.Their dimensions are 1x1mm, 2x2 mm and 2x1mm.This arrangement was selected in such way that the voids may be considered as internal defects.In order to evaluate the robustness of the neuro fuzzy model, two cases were considered: (1) a plain bar and (2) a bar with a notch of 3x4 mm.In the last case, the effect of the geometrical discontinuities on the results was analyzed.

Numerical Analysis
Finite Element Analysis.A parametric analysis was done in order to create the synthetic data.In this way, the first five natural frequencies were calculated when only one defect is located in the shadowed area of Fig. 1.This was done with ANSYS 10.0 code.495 cases were run.This data was classified in three groups.Each one corresponds to the type of postulated defects (1x1mm, 2x2 mm and 2x1mm).165 cases are in each group.
The finite element mesh has 1507 SOLID45 elements.It was developed with the automatic mesh generation algorithm.The bar was clamped at its right end.Besides, the modulus of elasticity of the material, Poisson ratio and density are 200 GPa, 0.3 and 7800 kg/m 3 respectively.ANN Analysis.The ANN analysis was done with MATLAB 6.5.As it was mentioned before, the input data was developed with the first five natural frequencies.The output data are the coordinates X and Y of the defects and a number that classified the type of defect.The origin of the coordinate system is localized at the bottom left corner of the bar.In this way, all the points in the bar have positive coordinates.All the data was normalized.395 cases were taken randomly in order to train the proposed Neural Network and the accuracy of the localization and classification of the defects were assessed with the other 100, which were left.In the case of the plain bar, the ANN that gave best results has five layers (25-20-15-5-3).All the layers have log neurons.Training was done with backpropagation, following the TRAINSCG procedure.50000 epochs were required.
One has to keep in mind that this network gives continuous results.Consequently, the criteria of the defect classification are 0.5, 0 and 1 for 1x1, 2x2 and 2x1, respectively.The tolerance range that was considered for the first case is 0.45 to 0.55.For the second defect, it was 0-0.10 and for the third type of defect, it was 0.9-1.0. the analysis of the notched bar, an ANN of four layers (25-18-11-3) with log neurons was used.It was trained with 100000 epochs.TRAINSCG algorithm was used.The classification criterion is the following: 0, 0.5 and 1 for 2x2mm, 1x1mm and 2x1mm respectively.A similar tolerance range was used (0-0.1,0.45-0.55 and 0-9-1.0).Fuzzy Analysis.A neuro fuzzy system is proposed to improve the results previously obtained with the ANN analysis.The neuro fuzzy technique provides a method for the development of models which relate input and output data.In this procedure, a network with membership functions is proposed and the parameters of such functions are calculated with the training data.This learning method works similarly to that of neural networks.In this work, the fuzzy logic tool box of MATLAB 6.5 was used, following ANFIS procedure.The optimization of the results was done with a network, which has four linear membership functions.Their type is gbellmt.In all cases, trainning was done with 40 epochs.

Analysis of the results
Plain Bar Analysis with an ANN. the evaluation of the results related with the localization of defects, an accuracy range of ±5% was considered.Under this condition, 71 X coordinates were localized and all the Y coordinates were localized.Besides, 99 defects were classified.As an illustration purpose, ten points of the assessment data were taken randomly.Fig. 3 compares the estimated and the real coordinates.The classification of the defects is shown in Fig. 4.
Plain Bar Analysis with ANFIS.In order to improve the evaluation of the X coordinate, the ANN output was fed to the adaptive neuro fuzzy interference system (ANFIS).When a ±5% accuracy range was considered, 87 X coordinates and all Y coordinates were localized.All the defects were classified.The analysis of the absolute errors obtained in the estimation of X coordinate with ANN, shows that maximum value obtained is 10.98 mm.Two cases are around this figure.This situation is improved with the neuro fuzzy analysis, because this parameter is reduced (6.96mm).Only one case was found around this figure.In general terms, the localization error, using ANN, is less than 7 mm.In relation with neuro fuzzy analysis, the average error is lower than 4.2 mm.Regarding Y coordinate, the maximum absolute error is 0.047 mm.One has to keep in mind that the longest side of the zone, in which the defects are located, is parallel to the X axis.For this reason, a bigger absolute error in X direction is expected.The absolute error of ten defects taken randomly is shown in Fig. 5.

120
Advances in Experimental Mechanics VI Fig. 5. Absolute error for ten points taken randomly (plain bar) Notched Bar Analysis with an ANN.Initially, the obtained results were evaluated with an accuracy range of ±5%.Under this condition, 59 X coordinates were localized.In the case of Y coordinates, 32 of them were localized.Moreover, 82 were classified.When the range of accuracy is increased (±10%), 85 X coordinates and 52 Y coordinates were localized.Besides 82 defects were classified.
Notched Bar Analysis with ANFIS.Initially, the results obtained were evaluated within an accuracy range of ±5%.86 X coordinates were located.In the case of Y coordinates, 61 of them were localized.This situation is improved when accuracy range is increased (±10%).In this way, X coordinate and 83 Y coordinates were localized.All the defects were correctly classified.The analysis of the absolute errors shows that 8.8 mm is the maximum value in the estimation of X coordinate with ANN.Three coordinates are within this range.Alternatively, 6.26 mm was the maximum error in the neuro fuzzy analysis.Four points were around this value.

Mechanics and Materials Vols. 13-14
Regarding Y coordinates, the maximum error is 3.011 mm in the ANN analysis.This is the case of one point.This situation is enhanced in the neuro fuzzy analysis.0.52 mm was the maximum error.Eight points are around this value.Fig. 8 illustrates the absolute for ten points randomly.
Fig. 8. Absolute error for ten points taken randomly

Conclusions
In the development of this work, the results obtained in the localization and classification of defects with ANN, were compared with those obtained with ANFIS.In all cases, neuro fuzzy analysis gave better results.Besides, as geometry of the dominion of interest becomes more complex, the accuracy of the results is reduced.This situation was observed when a notch was Regarding the ANN analysis, diverse attempts were tried.For this purpose, the number of layers and neurons were varied.Nonetheless, the accuracy of the prediction of localization and classification was not improved substantially.This evaluation depends on different factors such as the input data, the architecture of the ANN and the training algorithm among others.In a previous work [8], ANN has been used for the localization of defects in a similar problem.The input data was the dynamic strains measured at the boundary of the bar.Although several attempts were tried, the improvement of the accuracy was similar as it was observed in this work.This process is heuristic and it is not possible to establish clear outlines at this respect.
Neuro fuzzy technique improves substantially the solution.The introduction of the notch in the bar causes a less perturbation in the numerical results.An advantage of this neuro fuzzy procedure is this improvement can be done without difficulty.
The input data required in this hybrid analysis can be obtained by experimental means or generated by a numerical method.In the first instance, frequency response has to be evaluated.With the computing infrastructure at hand, the input data is obtained and processed easily.Care should be taken in the identification of some noise in this data.Regarding the synthetic data, diverse numerical methods can be used.In this case, the validation of the data is important.
Finally this kind of analysis provides new guide lines in the analysis of complex geometries with some noise perturbing the numerical and experimental data.