Porosity Characterization of Aluminium Castings by Using Particular Non-destructive Techniques

In this paper is presented an analysis of a comparison of particular non-destructive techniques: radiographic, ultrasonic, eddy current and pulsed infrared thermography to detect flaws in pressure die casting. Furthermore, a new way of the image segmentation method for porosity detection in aluminium pressure die casting using results from X-ray analysis and public domain software is proposed. The results of the research allowed verifying the possibility of using the aforesaid methods in controlled technological parameters of the casting process, and thus permitted confirming the quality of the manufactured castings. It was found that the radiographic method was the most preferred means for evaluating the quality of products and for optimizing the technological process for aluminium pressure casting. It permits a fast analysis of casting defects in the finished products, and when combined with the computer image analysis (the porosity segmentation algorithm as described in the article) it allows drawing conclusions regarding their causes (e.g. based on the size and shape analysis of the pores detected). The ultrasonic testing method can also be used to evaluate the quality of the casting (to detect it but without the possibility of interpreting the size or source of origin). The results obtained via this method allow for proper control of die casting parameters.


Introduction
Pressure die casting is an efficient technological process that is used on a large scale. The basic problem of this method is that the porosity in castings occurs mainly due to gas entrapment in the melt at a very turbulent flow of liquid metal in the mold cavity. The so-called air occlusion also occurs during stacking of the liquid metal prior to introducing it into the mold cavity pressure, i.e. at the time of pressing. The presence of the gas phase in the mold cavity is thus the main problem of pressure casting technology. The occurrence of porosity is also determined by the purity of the alloy (e.g. inclusions or hydrogen dissolved in the melt). Inclusions deteriorate the liquidity of the molten metal and thus impede mold filling in places that are difficult to reach. Inclusions also work as nucleation sites for dissolved hydrogen, which increases gas porosity. Oxides are pore nucleation sites where hydrides are decomposed during cooling emission in the form of dissolved hydrogen gas. Dissolved hydrogen also tends to precipitate out of the solution in the form of hydrogen bubbles in the clotting time due to the much lower solubility of hydrogen in the solid state. Hydrogen is particularly problematic in aluminium alloys because it dissolves well in the liquid melt while in the solid state it dissolves with extreme difficulty. Thus, during solidification of the alloy it precipitates to form porosity. Usually, hydrogen porosity is characterized by dimensions in the range of 0.05-0.5 mm. These pores are evenly distributed throughout the volume of the casting [1,2].
Determining the type and location of defects in the material is essential not only for quality control but also because it allows to establishing the source of their presence.
Hidden defects inside the casting that occur during manufacturing need to be diagnosed correctly, otherwise new defects may be introduced. Unfortunately, this is no easy task, because the defects are notoriously difficult to detect. In the last decades, industrial interest in the development of advanced non-destructive testing (NDT) techniques for qualification of materials and products has been increased noticeably [3].
NDT is becoming more commonplace and labelled as a tool to ensure product reliability. NDT methods allow obtaining information about the state (possible defects) of the tested material (sometimes even its characteristics) without physical interference in its structure.
There is no universal method for NDT, as each method has its limitations and applicability for specific cases [4]. The effectiveness of the tests depends on the type of element being tested, the sensitivity of the method as well as the type and location of the defects. In the case of castings, geometry is often a large obstacle in carrying out NDT. Since different types and sizes of defects have different effects on the performance of the casting, it is important that the NDT method is able to identify the type and size of the defects. Defect type classification technology has developed in the recent years and remains a research subject. There are varieties of difficulties in defect classification in casting [3]. The International Committee of Foundry Technical Association has a classification of nearly 100 common casting defects [5]. However, typical casting defects are: blow holes, shrinkage porosity, gas, inclusions, shrinkage cavities and cracking.
Radioscopy has rapidly become the accepted method for controlling the quality of die cast pieces through visual or computer-aided analysis of X-ray images. The automatic pattern recognition process used in fault detection in aluminium castings always includes the stages of image formation, image processing, image segmentation, future extraction and classification. The segmentation process is crucial for the correct classification of defects.
We present in this paper a new way of the image segmentation method for flaw detection in aluminium casting using an X-ray analysis. Our method can be applied using public domain software which can been widely applied. Moreover, this research is the first to characterize a comparison of particular four methods used in non-destructive testing: radiographic, ultrasonic, eddy current and pulsed infrared thermography to detect flaws in pressure die casting. Furthermore, these methods were used to control the technological parameters of the casting process in high volume production of aluminium pressure castings and thus control the quality of castings performed. As up to now no such results have been presented.

Materials and Methods
The tests were performed on a casting of instrument housing (Fig. 1). Samples were prepared using three different rates of casting: 2.4, 2.6 and 2.8 m/s (ten pieces for each rate of casting). Other technological parameters of the process were constant for each sample. Compaction pressure was 320 bar, mold temperature was 200 • C and the temperature of the liquid was 686 • C. All samples were made of aluminium alloy (grade EN AC-4420), which examined chemical composition as determined by spark spectrometry is presented in Table 1.
The industrial Yxlon MU2000 X-ray was used in the radiographic research for internal analysis of casting defects. The test apparatus was equipped with an X-ray tube with  an accelerating voltage of 160 kV, a panel digital detector with a working surface area of 200 × 200 mm and a sixaxis manipulator system. Data acquisition was performed by the YXLON Image 2500/350 system, which was also used to improve the quality of imaging and archiving. A computer analysis of each image was conducted in ImageJ public domain software. All of the analyzed images had a resolution of 1000 × 1000 pixels. Pattern image quality in "duplex" (in accordance with EN 462-5) was used to calculate the size of the volume of porosity, from pixels to millimetres. Ultrasonic testing (on cuboidal samples with dimensions of approximately 25 × 35 × 5 mm (width × height × thickness) cut out from the castings- Fig. 4) was carried out on an Olympus EPOCH 600 ultrasonic flaw detector. A normal frequency of 10 MHz was used for the studies.
NDT using the eddy current method was performed on an Olympus NORTEC 600. A pencil-type coil with a frequency of 1 kHz was used in the study.
Studies using pulsed infrared thermography were carried out using a FLIR X6580SC thermal imaging camera and a Hensel EH PRO flash lamp was used as the source of the heat flux propagating through the direction perpendicular to the sample. Prior to measurement, the samples were covered with talcum powder to allow the greatest absorption of heat flux (reducing the light reflection effect) produced by the lamp during the measurement. Castings examined during the study were placed between the lamp and the infrared camera coupled with computer software. Figure 2 shows an example of the X-ray analysis for one of the tested specimens that was done on different sides of the sample. It was found that it was impossible to conduct a precise analysis of porosity in the samples without using computer image analysis. A trained operator can only detect the largest defects in the photos taken. In addition, the operatory will not be able to conduct a quantitative comparison of the porosity occurring in the material between the examined samples and thus cannot draw any correct conclusions regarding the technological process (to optimize its parameters).

X-ray Method
Therefore, in these studies computer image analysis was applied in order to segment the porosity in the registered radiograms of the samples. The segmentation was based on dividing the image into areas with specified properties (shades of gray). One computer image analysis tool that allows segmentation is binarization. Binarization divides the image into objects and a background, which then enables their counting and a morphology study of these objects. Based on the histograms showing information decomposition of the gray levels, stages of pre-processing the input image were planned (Fig. 3a). A contrast stretch and then equalization were performed to improve the imaging. The histogram's stretch conversion did not cause information loss of the image; histogram equalization resulted in a more even spread (flattening), so that the image became sharper and clearer. Figure 3b shows the results for the image with stretched histogram equalization after previous alignment.
The next processing step was to obtain a binary image. Complex transformations, measurement and most of the quantitative analyses can be performed on these images. The technique of adaptive binarization was used to obtain a binary image (adaptive thresholding). It involves the use of different levels of the grayscale image. This process comprises successive transformations: 1. image smoothing on an averaging filter 2. subtracting the filtered image from the original 3. conducting binarization on the obtained image.   In ImageJ, binarization is carried out by using a Threshold window. The binarization threshold is automatically set in the middle between the largest and smallest pixel value of the image (default). The threshold binarization algorithm, "Mean" (available in the Threshold window), was used to conduct the binarization. Figure 3c shows the casting image after adaptive binarization. The next step in image processing was morphological transformations that led to segmentation of the porosity without changing the size and position of the pores. These transformations were erosion and dilation (made on the binary images). Erosion involves the removal of all image points with a value of 1 (black pixels) which have at least one neighbour with a value of 0 (white pixels). This procedure allows removing fine details (e.g. noise) and smoothing the edges of the segmented object (pores), as is shown in Fig. 3d. Dilation is the imposition of pixels along the edges of objects with a value of 1. It causes enlargement and removal of slight concavity on the segmented objects ( Fig. 3e). The edges were removed manually with white colour (Fig. 3f). In this way, the white points of the monochrome image (places with pores) were separated from the gray shades of the aluminium alloy. The final step was the imposition of separated porosity on the base image of the casting (Fig. 3g). Table 2 presents the summarized results of the research regarding the amount of porosity detected in all of the analyzed samples depending on the rate of casting. On the basis of the obtained results, it was found that with an increasing rate of casting the total number of pores in the performed samples decreased. Furthermore, it was observed that the maximum pore size for any of the tested samples did not exceed 1 mm.
The porosity detected in the castings was analyzed according to size and circularity. The parameter range of the circularity was from 0 to 1. If the obtained result of the analysis is closer to 1, that means it is more circular. Table 3  presents the results of measurements of the pores' quantities (divided into 4 ranges of circularity) depending on the rate of casting. On this basis it was found that with an increasing rate of casting the amount of pores with a circularity in the range of 0.81-1.0 (from 85.5 % for the 2.4 m/s rate of casting to 87.8 % for the 2.8 m/s rate of casting) increased. Pores with a circularity of less than 0.5 practically did not occur in the analyzed samples. The most frequently occurring pores in the analyzed samples had a range up to 0.2 mm (Table 4). Their volume fraction increased with the rate of casting (from 57 % for the 2.4 m/s rate of casting to 69 % for the 2.8 m/s rate of casting). Furthermore, it was observed that the increased rate of casting allowed to reduce the total volume fraction of porosity present in the samples.
The results of pore shape (depending on the quantities, size and location) allow to concluding that a large fraction of the small spherical pores comprises hydrogen type porosity. Pores resulting from the presence of hydrogen in the liquid melt are in the size range of 0.05-0.5 mm and have a spherical shape, whereas the remaining pores correspond to gas porosity (0.5-5 mm) with their shape and size. The obtained results are consistent with the results of research carried out by Mix [4].

Ultrasonic Method
Due to the complicated shape of the casting and the quality of its surface (no cleaning treatment such as sandblasting or shot blasting was carried out on the samples), no signal derived from the porosity present in the samples could be obtained. This effect was the same regardless of the type of test sam-ples performed at different rates of casting. Furthermore, the small sizes and homogeneous distribution of porosity were an additional reason for the failure of the ultrasonic measurements.
However, the ultrasonic examination allowed us to use the dependence of the variable speed of ultrasonic wave propagation in different media (an ultrasonic wave propagates more than 10 times faster in metal than in air). On this basis it can be concluded that the increased volume fraction of porosity will cause a reduction in the speed of ultrasonic wave propagation. In order to verify this assumption, cuboidal samples with dimensions of approximately 25 × 35 × 5 mm (width × height × thickness) were cut out from the castings (Fig. 4).   Table 5 presents the results of ultrasonic wave propagation speed depending on the rate of casting. It was observed that with an increase in rate casting, the propagation speed of the ultrasonic waves also increased. Such a result proves a decreasing volume fraction of porosity in the samples. The results are fully consistent with the results obtained for the X-ray studies that were presented earlier.
On the basis of these results it was found that ultrasonic measurements can be used to check the quality of the castings and thus can help control and optimize the technological process of aluminium die casting production. However, it should be remembered that these measurements may require the preparation of appropriate samples for research. In addition, the results obtained here do not provide detailed information about the shape, size and amount of porosity in the investigated samples, as was the case for the X-ray measurements.

Eddy Current Method
Research using the eddy current method allows to detecting defects located directly under the surface of the casting. Despite the conducted measurements, the applied hardware configuration did not show that the eddy current method can be used effectively to analyze raw castings. The performed analysis revealed only damages occurring on the casting surface (which were already visible during visual observation of the samples). Furthermore, the fact that fine porosity occurred was mostly not connected with the surface of the samples (which was confirmed by a metallographic investigation) and also contributed to a failure in applying the eddy current method to an analysis of raw castings.

Pulsed Infrared Thermography Method
The technique of pulsed infrared thermography was used to detect porosity in the investigated castings. Triggered by the flash of the lamp, the heat flow from one side of the examined casting caused a directional flow of heat to the non-illuminated side, as was observed by the infrared camera (which captured the distribution of the heat flow). Data registered in this manner were displayed on the computer screen in the form of image sequences. Next they were subjected to mathematical analysis. If the heat flux spreading through the casting encountered a defect (e.g. porosity or crack), the casting would be weakened in the place where the defect occurred because it reduced the thermal diffusion rate. The thermal imaging camera then registered a less intense signal (visible in the image as darker points) than that observed for the remaining area. Measurements of aluminium castings using pulsed infrared thermography did not produce the expected results of the research. Regardless of the rate of casting, the samples did not reveal any kind of internal defects of the material. As was in the case of eddy current testing, they demonstrated only surface defects (Fig. 5). Thus we can conclude that the fine porosity that occurs in the casting does not allow registering any differences between the speed of thermal diffusion in the metal and the defect (e.g. air) by using the infrared thermography method.

Conclusions
A new way of the image segmentation method for porosity detection in aluminium pressure die casting using X-ray analysis has been proposed. The proposed method can be widely applied through using public domain software. The great advantage of our research is the use of the radiographic method combined with computer image analysis (with the algorithm of porosity segmentation as described and presented in this paper) which allows detecting even the smallest casting defects. Moreover, the obtained results allow determining the causes of their formation. An analysis of the shape and size of the detected porosity allows carrying out a quality evaluation of the products and optimization of the technological process of production in an aluminium pressure foundry. Furthermore, the radiographic method is the only method that allows to analyzing raw castings without special surface preparation or sampling. The ultrasonic method can also be used to assess the casting quality (to detect defects or porosity but without the possibility of interpreting their size or source). However, such measurements require proper preparation of the samples/surface. The results of the analyses obtained by using the ultrasonic method allow to correctly control the die casting parameters. The methods of eddy currents and pulsed infrared thermography are not suitable for the detection of fine porosity which is present in aluminium castings.
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecomm ons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.