MATLAB Image Treatment of Copper-Steel Laser Welding

Continuous Yb:YAG laser keyhole welding of the pure copper plate to steel 316L sheet is performed for different laser parameters. The laser-generated welding keyhole and weld melted zone are observed by a high-speed camera. The image is treated by MATLAB and simple code is built to calculate the keyhole and melted zone area. This treatment is validated by the actual welding measurements, and the accuracy of the measurements is tested by the confidence interval law. The images obtained of keyhole and melt zone area in dissimilar laser welding are treated and analyzed to study the effect of changing the laser parameters.


Introduction
High-quality dissimilar welding has many applications in power generation, and in the chemical, petrochemical, nuclear, and electronics industries for the purposes of tailoring component properties or weight reduction. More recently, laser-welding technologies have been successfully used to manufacture hybrid microsystems consisting of different materials. e welding of dissimilar metals is determined by their crystal structure and compositional solubility in their liquid and solid states. Diffusion in the weld pool often results in the formation of intermetallic phases. When no filler materials are used, the formation of intermetallic compounds is dependent on the interaction of the joining materials and the welding parameters [1][2][3].
ere are many applications for the dissimilar copper/ stainless steel welding like the chemical industries, power generation, electric, electronic, and cryogenics. It is very useful in the case of resulting hybrid products which merge the excellent electric and thermal conductivity of copper with essential weight and cost saving [4]. e corrosion resistance of stainless steel and heat conductivity of copper are required for the heat exchangers fabrications. e welding of stainless steel and copper is essential to manufacturing these constructs. However, the dissimilar welding of stainless steel and copper still has many difficulties. e first difficulty is the large differences of physical properties between the stainless steel and copper like melting point, thermal conductivity, and thermal expansivity. ese physical differences make the conventional welding methods difficult in dissimilar welding. In this work, the laser beam welding method is used to avoid these problems [5].
Also, laser beam energy absorption and optimization of the laser welding method is the subject of many previous studies [6][7][8], particularly in the case of dissimilar welding [9,10]. Assuncao et al. studied the behavior of different metals under laser welding in the transition from conduction to keyhole modes [6]. eir experiments showed that the thermal properties (thermal conductivity, melting and vaporization temperatures, and specific heat) of the materials have the most important role in the transition between laser welding modes. Sibillano et al. developed a real-time monitoring technique based on the analysis of the plasma plume optical spectra generated during laser welding to determine the laser welding mode [11].
Stainless steels are commonly used in welded joint metals. Austenitic stainless steels (e.g., 316L and 304) represent more than 2/3 of total stainless-steel production.
ese stainless steels are preferred over other stainless-steel types owing to their good welding response. Copper and copper alloys are amongst the most versatile engineering materials. e properties of copper, such as its strength, conductivity, corrosion resistance, machinability, and ductility, make it suitable for a wide range of applications. Stainless steels have a low thermal conductivity in comparison to copper. Joining copper to stainless steels can increase the heat dissipation from these alloys during hightemperature applications and decrease the formation probability of intermetallic phases, but the high thermal conductivity of copper is one of the main limitations regarding its welding. In other words, the high thermal conductivity of copper tends to rapidly dissipate heat away from the weld zone, leading to difficulties in reaching the melting temperature [12].
When a high-intensity laser beam interacts with the welding material, part of the molten material is vaporized, which can lead to the production of high recoil pressure. en, a deep, narrow keyhole, which is filled with a partially ionized plume of vapor and ambient gas, is formed in the molten material. It is known that this keyhole plays a very important role in coupling laser energy to the material to be welded. With the help of a keyhole, laser energy can penetrate deeply into the workpiece [13]. In the process of automatic welding, sensing and controlling of welding information are the most important and difficult points [14]. e shapes of the keyhole and of the melt pool are the keys to getting a good weld. Melt pool image monitoring is one of the most important parts of welding sensing. e combination of the visual sensing technology and the image processing has been studied for the process of laser welding detection and quality evaluation. Still, there is a lack of temperature information for the physical phenomena that occur for the period of laser welding. Moreover, the precision of the keyhole parameters geometry captured by a visual sensor is greatly dependent on the applied image processing technique. Consequently, the abilities of such systems for enough quality assessment are limited [15]. e information obtained from the keyhole and the melt pool enables us to make a judgment of the quality of the welding, the shape of the welding line, and the defects in the welding appearance. Furthermore, the information enables us to track and identify the welding line in the process of welding. e size, shape, and dynamic changes of the keyhole and melt pool are the main things that affect the quality and appearance of the weld [16]. Several full penetration monitoring methods have been proposed. In 2011, Blug et al. [17][18][19] developed a robust feedback system to control penetration depth based on an image closing algorithm. In 2012, Matteï et al. [20] presented an observation of the keyhole shape drilled on a zinc/quartz interface. e observation of the keyhole shape was then realized through the quartz during the drilling with a high-speed CCD camera. In 2013, Zhang et al. [21] used a coaxial vision monitoring system to observe the weld surface width and identify the status of the laser welding as incompletely penetrated, moderately penetrated, or over-penetrated. So far, no article has proposed a camera monitoring of keyhole formation in steel/copper welding. Investigation on the keyhole of a copper/steel dissimilar joint by laser welding is insufficient. On the one hand, the liquid separation phenomenon is intense for the laser welding that has high cooling rates [5]. However, studies on this phenomenon are very limited. e mechanism of liquid separation needs to be clarified to control quality of the joint.
In this paper, a deep learning based on processing the monitoring system by a high-speed camera and MATLAB image processing was proposed for laser welding [22].
Experiments on high laser power continuous welding on copper/stainless steel plates were conducted in previous work [23]. Owing to the high heat, the keyhole phenomenon occurred in the melt pool. e keyhole and melt pool images were captured by a high-speed camera. In the present paper, these images are treated by MATLAB software to observe the behavior of the keyhole and the melt pool under the effect of changing such welding parameters as the laser power, the laser welding speed, and the laser shift from the centerline.

Material and Experimental Procedures
e laser welding of stainless steel 316L (iron compound, 0.02% C; 17% Cr; 12% Ni; 2.2% Mo) and copper sheets was carried out using Yb:YAG (6001 TruDisk Trumpf ) with a wavelength of 1030 nm. e beam diameter was 200 microns, in continuous mode, focused to the plate surface, under argon protective gas with flow rates of 25 L/min to the above, 15 L/min in reverse. e welded plate had dimensions of 3 × 14 cm 2 for copper and 5 × 9.5 cm 2 for stainless steel. eir thickness is 2 mm. Lines were scratched at a 2 mm distance from the interface line on the copper surface. High-power laser dissimilar weldings were conducted, varying the laser power, the speed, and the shift of the beam relative to the joint line, as shown in Table 1.
e positive shift indicates a shift towards the stainless steel, negative towards the copper. e welding table consisted of a Phantom V.9 high-speed camera. e camera was positioned laterally, at an angle of 33°to the surface. e high-power laser welding system is shown in Figure 1(a). e image of the monitored welding process is recorded as video (for detailed information, see the supplementary video supporting information) [23]. Images are extracted as in Figure 1(b) (laser power 2 kW, welding speed 1 m/min, and laser shift 0 μm); the image shows the melt pool surface, appearing dark around the keyhole, which emits light owing to its high temperature. e illumination causes specular reflections because of the humping of the melt pool surface, and there are spatter melted particles clearly observable in the media and illustrated on the image frame [23]. e experimental analyses were performed in several phases. e cross-sections of welds were polished and etched with Béchet-Beaujard solution. To know the impact of the parameters on the molten zone (MZ), the shape of the weld was observed using a Binocular microscope (Wild M420, Leica) and measured using the software controlling the camera (LC 120 HD Leica). First, this process allowed an approximation of the Cu dilution in the MZ: the parting was resituated with lines engraved on both sides. e ratio of the copper melt width and the width of the MZ gives an approximation of the composition by volume of the MZ. e widths at the top, middle, and bottom of the MZ and its surface were measured on the transverse cuts. Second, it allowed the measurement of the final MZ length (M.L), width (M.W), and area (M.A), which were used to validate the following image processing.

Image Treatment Methodology
From the original image of the copper/steel welding ( Figure 2(a)), the boundary of the keyhole and the weld pool may be clear to human vision. However, it is not clearly observable to computer vision. erefore, the first step is done by freehand to crop the background of the interesting part of the image, taking into account that in the case of treatment with the keyhole the background is cropped to include the weld pool area. e geometry of the keyhole is not symmetric around the interface line between the dissimilar metals. It is convenient to measure the keyhole parameters: keyhole area (K.A), keyhole width (K.W), and keyhole length (K.L). ese parameters may have an effect on the copper/steel welding process. e technique used for image processing is a semi-automatic MATLAB-based algorithm that calculates the keyhole and melt pool area. For many users, this should be an easy way to calculate the keyhole area. e calculation algorithms for this technique are described as follows (see Figure 3).
(1) Keyhole is extracted in grayscale Figure 2  (4) To compute the area of the objects in a 255-binary image (white parts) by pixels, the black parts are patterns with zero on pixels (area � 0) as shown in Figure 4.
(5) e reference image is used to calculate the transformation factor as will be described in the comment on Figure 5 To calculate the other keyhole parameters such as its length and width, it is preferred to return the binary image containing only the perimeter pixels of objects in the input image. A pixel is part of the perimeter if it is nonzero and it is connected to at least one zero-valued pixel as in Figure 4. After attaining the keyhole perimeter boundary points from the binary image the distance between the most left point and the most right point is calculated to give the K.W, and the distance between the uppermost point and the lowermost point is calculated to give the K.L in pixels as shown in Figure 2(d). is distance is divided by 58 pixels to transform to mm, where the number of pixels per mm is 58, as illustrated in Figure 5.

Advances in Materials Science and Engineering 3
A reference object is an object with a known area, needed to translate the pixel count area. In this study, a square with 58 × 58 pixels is chosen as reference whose area is 1 mm 2 as shown in Figure 5. e following two relations are used to calculate the keyhole area and the melt pool area in the same way.
1 pixel � reference object area by mm 2 reference object pixel count .

Validation Method
Simplified geometry of the dissimilar welding observation area is presented in Figure 7, which shows the start and endpoints of welding, and an angle of approximately 33°to the vertical line perpendicular to the welding direction. is inclination angle may cause a change in the dimensions of the image, so it is necessary to adopt a correction coefficient to have correct dimensions. To test the performance of the dissimilar laser welding image treatment system, the terminal melt pool image was selected for all different laser parameters; the M.A, M.L, and M.W were measured by Binocular microscope, and then they were compared with the corresponding values obtained by image treatment as shown in Figure 8.
To find a 95% confidence interval (CI), the following general form is used: where X is the sample mean, s is the standard deviation, n is the sample size, and t is to be replaced with the appropriate critical value of the t distribution with (n − 1) degrees of freedom. e required t value can be found from a t distribution table included in most statistical textbooks. In this work, the sample size is 18, and the critical value for the t distribution that corresponds to a 95% confidence level with 17 degrees of freedom is 2.11. To find a 95% confidence interval for the mean melted zone length based on the experimental measurements by CCD camera for M.W, M.L, and M.A, the melt pool width, melt pool length, and melt pool area, respectively, as illustrated in Figure 9, first the images for melt pool parameters obtained by camera are treated by using our MATLAB code for all the 18 samples. e same parameters are then calculated by Binocular microscope. e ratio R is obtained as (the calculated parameters measured by Camera/ the same calculated parameters measured by microscope) for all the 18 samples.
Let us now work out an example to find a 95% confidence interval for the melt pool length (M.L), the sample mean x � 1.06, and sample standard deviation 0.08, t � 2.11, as mentioned previously. e estimated standard deviation for the sample mean is s � (0.08/√18) � 0.020. e 95% confidence interval for the melt pool length (M.L) is approximately ((1.06 − 2.11 × 0.02), (1.06 + 2.11 × 0.02)) � (1.11, 1.02). e 95% confidence interval (CI) is calculated for all the parameters as shown in Table 2. Figure 10 shows the welding seam and the corresponding evolution of the keyhole and weld pool boundary results under the variation of the welding laser power. e images were collected as the welding process reached its stable state as the keyhole and weld pool geometries can closely reflect the welding situation in the welding process. In each case for every sample, ten processed images were chosen randomly and treated from all recorded frames. For each frame, the K.A, K.L, and K.W were calculated as shown in Figure 11. For every ten values of keyhole parameters extracted from the image frames, the mean value was calculated for every laser power, as illustrated in Figure 12. Figure 12 shows that the keyhole area, length, and width match parallel to each other and that all three increase from 1 to 4 kW within laser speed (V � 2 m/min) which leads to increase of all keyhole dimensions, with increasing laser power to reach a saturated region at 5 kW.

Effect of Laser Power.
is may be because of the increases of keyhole opening (M.A) which leads to more laser radiation loss. e image analysis of Figure 10 demonstrates the change of keyhole geometry and area with the increase of laser power from 2 kW to 5 kW. However, the keyhole borders extracted from Figure 10 present some chaotic fluctuations, which can be neglected to simplify the keyhole geometry. e simplified sketch of Figure 13 shows that keyhole is elongated in two different geometries: the first (on the left) for 2 kW laser power and the second (on the right) for other laser powers (3, 4, and 5 kW). In addition, it is interesting to note that the elongated keyhole shows two characteristic zones that are heated: the first one corresponds to the keyhole front wall (f s for steel and fc for copper) common to all regimes, and the second one is located at the rear end (r s for steel, and r c for copper). In most past works [23], the keyhole has been considered to be symmetrical and either coaxial with the laser beam or slightly displaced in the direction opposite to the laser beam translation direction. Moreover, it has been supposed that the keyhole walls are exposed to the part of the laser beam with significant intensity and that the keyhole is held open owing to the balance of recoil pressure (P r and surface tension pressure P s ). Based on the model of Akira Matsunawa et al. [24], the recoil pressure of vaporized material (steel P r.s and copper Advances in Materials Science and Engineering P r.c ) counteracts mainly against the pressure due to the surface tension of the melt around the keyhole (steel P s.s and copper P s.c ). e flux of evaporated material is linearly proportional to the part of the absorbed laser intensity left after subtraction of the heat conduction losses; the recoil pressure resulting from the laser-induced surface vaporization equals the product of the evaporated material flux and near-surface vapor velocity where f is the mass flux of the evaporated melt and V T is the mass flux and the near-surface vapor velocity. Numerical calculations show that the recoil pressure P r.s on the steel front wall f s is higher than the recoil pressure on copper P r.c front wall (f c ), which explains why the keyhole front wall elongated in steel more than in copper. Pressure owing to surface tension P s can be described according to the equation (5) [24], where c is the surface tension coefficient (20-30 N/m for steel and 1.25-1.35 N/m copper) and r L is the laser beam radius. ese calculations indicate that the surface tension pressure for copper (P s.c ) is less than that for steel (P s.s ), which may be the direct reason for the elongation of the rear keyhole surface towards the copper more than the steel as this force is responsible for the keyhole curvature closing.

Effect of Welding Speed.
e effect of the welding speed on the keyhole parameters was investigated. e speed was varied from (a) 0.5 m/min to (e) 3 m/min. Figure 14 shows the effect of the speed on three keyhole parameters: area, length, and width. e three keyhole parameters increase as the welding speed increases. e keyhole shape changes as the welding speed changes, and the dispersion in keyhole position reduces itself with increase of welding speed, reaching some stability from 0.5 m/min to 2.5 m/min. e change of keyhole shape parameters at 3 m/min increases again as the diffusion of keyhole position to joint line, and it   goes more slowly on the copper side, as shown in the treated images ( Figure 15). e welding of speed 3 m/min produced the most elongated keyhole. e shape of the elongated keyhole at the welding speed of 0.5 m/min is similar to the shape shown in Figure 13(b), and for the welding speed of 1 m/min, it is similar to the shape shown in Figure 13(a). For the speeds of 2 m/min and 2.5 m/min the simplified keyhole shapes are shown in Figure 16(a), and for 3 m/min in Figure 16(b). First in Figure 16(b) the keyhole is elongated in approximately symmetric geometry around the butt joint (neglecting the fluctuation characterized by small-amplitude border waves).
It is evident from Figure 16 that as the travel speed increases, the recoil pressure on the copper front wall   keyhole surface (P r.c ) becomes higher than the recoil pressure on the steel front wall surface (P r.s ). Because the interaction time between laser and front keyhole surface decreases with increasing laser travel speed, this, therefore, suggests that the recoil pressure has a dynamic magnitude depending on the rate of heat transfer of the metal. is is often expressed in terms of "thermal conductivity." e thermal conductivity of copper (401 W/m°C) is very high e copper front keyhole wall is f c and the copper rear keyhole wall is r c .

Effect of Laser Shift.
e effect of the distance shift between the beam axis and the steel/copper interface line was investigated. e shift distance towards the copper was considered as a negative value and towards the steel as a positive.
e keyhole length, width, and area for different shift distances from the butt joint are reported in Figure 17. is figure shows that the minimum keyhole area occurred at zero shift distance. e shift between the beam axis and the steel/copper interface line shows that the minimum keyhole shape parameters occurred at zero shift distance, the change of shift laser by 100 μm to 500 μm in steel and −100 μm and −200 μm in copper. It is clear that the shift of laser beam from copper to steel slightly increases keyhole shape parameters (length, width, and area). e simplified geometry   Advances in Materials Science and Engineering of this keyhole is shown in Figure 13(a). A small shift from the initial joint plane in the copper direction (−100 μm and −200 μm) leads to a circular keyhole ( Figure 18) with approximately the same length and width. e keyhole has the same circumference geometry for the shift towards the copper, as most of the front and rear keyhole walls lie in the copper side. In the same way, the keyhole has the same circumference geometry for the shift towards the steel, because most of the front and rear keyhole walls lie in the steel side. Whenever the keyhole area lies completely in the copper side (as shown in Figure 19(a)), there is a high copper weld pool area. However, when the keyhole area lies in the steel side, there is a high steel weld pool area.

Conclusion
To investigate Yb:YAG laser welding for dissimilar metals (steel 316L/copper), keyhole and weld pool information was monitored using a high-speed camera. e image was extracted and treated with a simple new MATLAB code, and the code was validated by experimental measurements of the weld pool area (M.A), length (M.L), and width (M.W). e keyhole area, length, and width were measured, and the    keyhole border was analyzed as a function of different laser parameters (laser power, welding speed, and laser butt joint shift). e results showed that the keyhole geometry elongated and that the recoil pressure acting on the front of the keyhole and the surface tension pressure have the main role in controlling the keyhole geometry. As the laser power from 1 to 4 kW within laser speed (V � 2 m/min) leads to increase of all keyhole dimensions, at 5 kW some stabilization regime is achieved. is may be because of the increases of keyhole opening (M.A) which leads to more laser radiation lose. e keyhole shape changes as the welding speed changes, and the dispersion in keyhole position reduces itself with increase of welding speed, reaching some stability from 0.5 m/min to 2.5 m/min. e change of keyhole shape parameters at 3 m/ min increases again as the diffusion of keyhole position to joint line, and it goes more slowly on the copper side. e effect of the distance shift between the beam axis and the steel/copper interface line was investigated. e minimum keyhole shape parameters occurred at zero shift distance, the change of shift laser by 100 μm to 500 μm in steel and −100 μm and −200 μm in copper. It is clear that the shift of laser beam from copper to steel slightly increases keyhole shape parameters (length, width, and area). It is recommended to use the parameters of laser which perform a Copper P r.s = P r.c P s.s = P s.c Figure 18: A simplified sketch of the keyhole geometry of steel/copper welding for different shift distances from the butt joint, where f s and r s are the fronts and rear keyhole walls for steel, respectively, and f c and r c are the front and rear keyhole walls for copper, respectively. stable copper/steel welding. It may be suitable to use power ≥ 5 kw and welding speed ≤ 2.5 m/min for the laser centered at the line joint.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.