• No results found

Dimensionality Reduction & Features Extraction

Within this thesis two different approaches were followed for the features extraction procedure of the image data obtained from the simulations. In the first one a self-developed image processing algorithm was created aiming to extract features from the images which would provide feedback on the differences of the temperature field.

However due to the high dimensionality problem described also above another algorithm was also created. This algorithm was based on PCA technique which is presented below. The two approaches showed good results with PCA one being more effective in the identification of the different defects and their size.

Image Processing algorithm:

The results of the thermal simulations in ANSYS as it was described above were exported in an excel file. The temperature values were inserted in a matrix of 20x20 and afterwards the excel file was loaded from the developed MATLAB code constructing the following image. Based on the images acquired for each of the defected specimens, an image processing algorithm was developed and implemented in the MATLAB software. The steps of the algorithm are cited below:

Steps of algorithm:

• Extracted images (20x20) from simulations

• Insert images matrix through excel in MATLAB

• Read the values and construct the images

• Apply a filter on the image derivatized the temperature in time

• Identify center of melt pool

• Extract moments of the Gaussian distribution of laser beam

Laboratory for Manufacturing Systems and Automation (LMS) Page 31

• Compare with ideal temperature field

• Identify position

• Repeat for bigger defects and different location within the field

Figure 13: MATLAB image data reproduction (20x20 matrix)

After the run of simulations and the “import” procedure of the temperature values in a matrix form in MATLAB, several techniques were tested for the filtering of the image at the beginning and afterwards for the calculation of the mean value of matrix’s temperature. The variation of the mean value between the different set-up of porosity cracking or lack of penetration and the ideal specimen (without porosity) would indicate the existence, the size and the position of the defect. As far as it concerns the filtering method followed for the purposes of this project, the following equations (1) & (2) were first implemented while a notch filter [80][80] was applied afterwards. This would allow in a first level to discretize in smaller pieces the image and in a second level to identify the variance of the temperature field leading to indications on the existence of the defect and the mean filtered temperature field which will provide information on the relevant size of the detected defects. Below, the governing equations of the developed algorithm are provided.

Pore1(n,k)=4*Pd1(n,k)-Pd1(n+1,k)-Pd1(n-1,k)-Pd1(n,k+1)-Pd1(n,k-1)-Pd2(n,k)*0 (1)

Dimensionality Reduction & Features Extraction

Laboratory for Manufacturing Systems and Automation (LMS) Page 32

Crack1(n,k)=4*Cvd1(n,k)-Cvd1(n+1,k)-Cvd1(n-1,k)-Cvd1(n,k+1)-Cvd1(n,k-1)-Cvd2(n,k)*0 (2)

It worth to be mentioned that in order to examine the sensitivity of the proposed image processing techniques, besides the placement of the defect inside the specimen different depths were tested and different pores diameters. The method worked satisfactory up to 2 mm depth which in the most of laser welding applications is more than adequate.

In addition, the method with some alterations worked for the smallest observed pores based on experiments found in literature but the filters applied would lead to more noise in the signal and thus more calculating time. The results are presented in the corresponding results section.

After the development of the algorithm and its implementation and coding in MATLAB, interesting results were obtained for the investigated defects. As it can be observed in the following figures, Figure 14 imprints that almost all the defects can be identified and show differences with the ideal thermal field. The method has some implications when it regards the vertical (coaxial to the potential camera) cracks appeared in the specimens. However, this is dependent from the size of the crack. The bigger one can be identified with the same success as the rest cracks. On the other hand, the Figure 15 demonstrates the fact that the technique can predict and visualize the difference in the size of the cracks while the numerical value can be a future threshold for accepting or rejecting the monitored weld.

Laboratory for Manufacturing Systems and Automation (LMS) Page 33 Figure 14: Cracks identification with variance feature

Figure 15: Cracks size identification

As far as it concerns the results on the porosity, the image processing technique can successfully identify the existence of pores in the images compared to the ideal temperature field Figure 16. Furthermore, it can be noticed that the position of the

Dimensionality Reduction & Features Extraction

Laboratory for Manufacturing Systems and Automation (LMS) Page 34 defects in relation to the center of laser beam can be also detected. Finally, in Figure 17 the size identification capability was also tested leading to satisfactory conclusions. The pores in center, left, right, pattern and far right positions had been modified and were designed with different diameters during the simulation phase. The alterations of the values in Figure 18 shows clearly which pore is bigger from the rest.

Figure 16: Identification of pores with variance feature

Laboratory for Manufacturing Systems and Automation (LMS) Page 35 Figure 17: Pores position detection

Figure 18: Porous defects size identification

Dimensionality Reduction & Features Extraction

Laboratory for Manufacturing Systems and Automation (LMS) Page 36 PCA algorithm:

In many problems, the measured data vectors are high-dimensional but there are reasons to believe that the data lie near a lower-dimensional manifold. In other words, it may be commonly accepted that high-dimensional data are multiple, indirect measurements of an underlying source, which typically cannot be directly measured. Learning a suitable low-dimensional manifold from high-dimensional data is essentially the same as learning this underlying source [81].

Dimensionality reduction can also be seen as the process of deriving a set of degrees of freedom which can be used to reproduce most of the variability of a data set. Consider a set of images produced by the rotation of a face through different angles. Clearly only one degree of freedom is being altered, and thus the images lie along a continuous one-dimensional curve through image space. The following figure shows an example of image data that exhibits one intrinsic dimension [81].

Manifold learning techniques can be used in different ways including:

• Data dimensionality reduction: Produce a compact low-dimensional encoding of a given high-dimensional data set.

• Data visualization: Provide an interpretation of a given data set in terms of intrinsic degree of freedom, usually as a by-product of data dimensionality reduction.

• Pre-processing for supervised learning: Simplify, reduce, and clean the data for subsequent supervised training.

Many algorithms for dimensionality reduction have been developed to accomplish these tasks. However, since the need for such analysis arises in many areas of study, contributions to the field have come from many disciplines. While all of these methods have a similar goal, approaches to the problem are different [81].

Laboratory for Manufacturing Systems and Automation (LMS) Page 37 Figure 19: A canonical dimensionality reduction problem from visual perception. The

input consists of a sequence of 4096-dimensional vectors, representing the brightness values of 64 pixel by 64 pixel images of a face. Applied to N = 698 raw images. The

first coordinate axis of the embedding correlates highly with one of the degrees of freedom underlying the original data: left-right pose

Principal components analysis (PCA) [81] is a classical method that provides a sequence of best linear approximations to a given high-dimensional observation. It is one of the most popular techniques for dimensionality reduction. However, its effectiveness is limited by its global linearity. Principal components analysis (PCA) is a very popular technique for dimensionality reduction. Given a set of data on n dimensions, PCA aims to find a linear subspace of dimension d lower than n such that the data points lie mainly on this linear subspace. Such a reduced subspace attempts to maintain most of the variability of the data. The linear subspace can be specified by d orthogonal vectors that form a new coordinate system, called the ‘principal components’. The principal components are orthogonal, linear transformations of the original data points, so there can be no more than n of them.

However, the hope is that only d < n principal components are needed to approximate the space spanned by the n original axes.

Steps of PCA algorithm for dimensionality reduction:

1) Insert 10 matrixes with temperatures of 10 different experiments

Dimensionality Reduction & Features Extraction

Laboratory for Manufacturing Systems and Automation (LMS) Page 38 2) Specify which data corresponds to which defect and ideal temperature field 3) Determine the size of the data sets

4) Calculate the sample mean vector and the sample standard deviation vector 5) Standardize the data (centering and scaling of the data)

6) Calculate the coefficients of the principal components and their respective variances

7) Extract the diagonal

8) Multiply each observation by the sample standard deviation vector and add the mean vector

9) Obtain information on the principal components 10) Plot of the results and defects identification 11) Feed classification and prediction algorithm

In the following pictures, the results from the implementation of a PCA algorithm for the laser welding case of this thesis are clearly provided. The outcome of the simulations as these are described above were inserted as 20x20 matrices in the algorithm and the above steps were then executed.

As it can be seen in the Figure 20, the algorithm was capable to distinguish the different defected specimens and also specify their position. It is worth mentioned the fact that the defects with double size are also placed far away in x-axis from the normal ones.

Furthermore, in the second figure the most important features identified through the PCA algorithm are depicted. It can be safely concluded that with just one feature the dimensionality reduction can be successfully performed.

Laboratory for Manufacturing Systems and Automation (LMS) Page 39 Figure 20:Identification of defects through PCA

Figure 21: Importance of each component

Related documents