Prediction of Weld Reinforcement Based on Vision Sensing in GMA Additive Manufacturing Process

: In the gas-metal-arc (GMA) additive manufacturing process, the shape of the molten pool, the temperature ﬁeld of the workpiece and the heat dissipation conditions change with the increase of cladding layers, which can a ﬀ ect the dimensional accuracy of the workpiece; hence, it is necessary to monitor the additive manufacturing process online. At present, there is little research about formation-dimension monitoring in the GMA additive manufacturing process; in this paper, weld reinforcement prediction in the GMA additive manufacturing process was conducted, the visual-sensing system for molten pool was established, and a laser locating system was designed to match every frame of the molten pool image with the actual weld location. Extracting the shape and location features of the molten pool as visual features, on the basis of a back-propagation (BP) neural network, we developed the prediction model for weld reinforcement in the GMA additive manufacturing process. Experiment results showed that the model could accurately predict weld reinforcement. By changing the cooling time between adjacent cladding layers, the generalization ability of the prediction model was further veriﬁed.


Introduction
Additive manufacturing technology is based on the idea of discreteness and accumulation, using material to stack layer by layer, forming a three-dimensional entity [1]. In recent years, using additive manufacturing technology to obtain a workpiece with high dimensional accuracy and good mechanical properties has become a research hotspot [2]. Gas-metal-arc (GMA) additive manufacturing is the processing technology that uses an electric arc as a heat source to melt metal wire and stacks, forming a metal workpiece [3,4], Yanhu Wang et al. [5,6] pointed out that additive manufacturing based on arc welding has the outstanding advantages of low cost and high efficiency, and can be widely used in many fields. They studied the additive manufacturing of copper-aluminum alloys by adding a small amount of silicon in the cold-metal-transfer (CMT) welding process. In recent years, the visual-sensing method has been widely used in the field of welding manufacturing, Zhuang Zhao et al. [7] proposed an optimal imaging-band selection mechanism for molten pool vision, which has important guiding significance for collecting high-quality molten pool images. Jun Lu et al. [8] obtained the temperature field of the molten pool on the basis of visual imaging in the GMA welding process, and realized the prediction of hump weld bead by monitoring the temperature field distribution of the molten pool.
In the GMA additive manufacturing process, with the increase of cladding layers, heat accumulation of the workpiece is serious, heat dissipation worsens and the shape of the molten pool changes, which ultimately affect the dimensional accuracy of the formed workpiece, so it is very important to monitor the GMA additive manufacturing process online [9]. Ouyang et al. [10,11] produced aluminum-alloy workpieces in a variable-polarity gas-tungsten-arc-welding (GTAW) additive manufacturing process.

Welding Experiment Platform
Conducting arc additive manufacturing experiment in the CMT welding procedure, which belongs to the GMA welding procedure, the welding experiment platform included a welding power supply (Fronius CMT advanced 4000R), a mobile robot (ABB IRB1400 M2004, ABB, Zurich, Switzerland), a molten pool visual sensor, and a laser locating system, which are shown in Figure 1. The base metal was 304 stainless steel plate, the size was 450 mm × 150 mm × 10 mm, and the welding wire was stainless steel, the diameter of which was 1.2 mm, the chemical composition of welding wire is shown in Table 1, the type of welding torch was Robacta Drive CMT (Pettenbach, Austria). The visual sensor for the molten pool consisted of a color camera (Basler acA640-750uc, Ahrensburg, Germany), computer, and trigger module; the color camera was installed on the welding torch. Furthermore, we developed a laser locating system that consisted of a laser, monochrome camera (Basler ace acA1920-155um, Ahrensburg, Germany), and computer; the laser was installed on the welding torch, and sent out light shining on the upper edge of welding wire. The monochrome camera was fixed on the experiment platform to record the moving trajectory of the laser point. In the GMA additive manufacturing process, the trigger module gave out a fixed frequency signal to control the color and monochrome cameras at the same time; by observing the location of the laser point in every frame of the monochrome image, precisely matching every frame of color molten pool images with the specific weld location.

Experiment Approach
In the GMA additive manufacturing experiment, the welding torch moved horizontally and in the same direction, setting the contact tip to work distance (CTWD) to 1.5 cm, welding current to 130 A, the welding velocity to 5 mm/s, the welding length of each cladding layer to 80 mm, and the number of cladding layers to 10; detailed parameters are shown in Table 2. In the GMA additive manufacturing process, the trigger module gave out fixed frequency signal to control the color and monochrome cameras at the same time, whose frequency was 1000 Hz. We extracted the shape and location features of the molten pool through color molten pool image. By observing the location of the laser point in every frame of the monochrome image, we determined the actual weld location corresponding to each frame collected color molten pool images. After each cladding layer was welded, using three-dimensional scanner to measure the height of the workpiece, we extracted the weld reinforcement. All extracted data constituted the data set of the prediction model.

Experiment Approach
In the GMA additive manufacturing experiment, the welding torch moved horizontally and in the same direction, setting the contact tip to work distance (CTWD) to 1.5 cm, welding current to 130 A, the welding velocity to 5 mm/s, the welding length of each cladding layer to 80 mm, and the number of cladding layers to 10; detailed parameters are shown in Table 2. In the GMA additive manufacturing process, the trigger module gave out fixed frequency signal to control the color and monochrome cameras at the same time, whose frequency was 1000 Hz. We extracted the shape and location features of the molten pool through color molten pool image. By observing the location of the laser point in every frame of the monochrome image, we determined the actual weld location corresponding to each frame collected color molten pool images. After each cladding layer was welded, using three-dimensional scanner to measure the height of the workpiece, we extracted the weld reinforcement. All extracted data constituted the data set of the prediction model.

Definition and Extraction of Visual Feature Parameters
In the GMA additive manufacturing process, after the color CCD had completed molten pool image acquisition, binary processing was carried out to extract the molten pool outline. Holes were filled up in the contour, and the shape features of the molten pool could be determined. We calculated the molten pool area, length, and width, which were selected as the shape features. Molten pool area was defined as whole pixels within the molten pool outline, molten pool length was defined as the maximal distance of the molten pool contour along the welding direction, and molten pool width was defined as the maximal distance of the molten pool contour perpendicular to the welding direction.
At the arc-striking stage, the cooling rate of the molten pool was relatively fast, the molten pool was difficult to spread out. With the increase of cladding layers, the workpiece tended to be bogged down, which is shown in Figure 2; in addition, the welding procedure is an important factor. The geometric dimensions of the workpiece are shown in Figure 3. The relative position of the molten pool in the image would change; therefore, the location feature of the molten pool is also an important feature. We extracted the wire extension as the location feature of the molten pool. Figure 4 is the schematic diagram of the visual features of the molten pool.

Definition and Extraction of Visual Feature Parameters
In the GMA additive manufacturing process, after the color CCD had completed molten pool image acquisition, binary processing was carried out to extract the molten pool outline. Holes were filled up in the contour, and the shape features of the molten pool could be determined. We calculated the molten pool area, length, and width, which were selected as the shape features. Molten pool area was defined as whole pixels within the molten pool outline, molten pool length was defined as the maximal distance of the molten pool contour along the welding direction, and molten pool width was defined as the maximal distance of the molten pool contour perpendicular to the welding direction.
At the arc-striking stage, the cooling rate of the molten pool was relatively fast, the molten pool was difficult to spread out. With the increase of cladding layers, the workpiece tended to be bogged down, which is shown in Figure 2; in addition, the welding procedure is an important factor. The geometric dimensions of the workpiece are shown in Figure 3. The relative position of the molten pool in the image would change; therefore, the location feature of the molten pool is also an important feature. We extracted the wire extension as the location feature of the molten pool. Figure 4 is the schematic diagram of the visual features of the molten pool.

Definition and Extraction of Visual Feature Parameters
In the GMA additive manufacturing process, after the color CCD had completed molten pool image acquisition, binary processing was carried out to extract the molten pool outline. Holes were filled up in the contour, and the shape features of the molten pool could be determined. We calculated the molten pool area, length, and width, which were selected as the shape features. Molten pool area was defined as whole pixels within the molten pool outline, molten pool length was defined as the maximal distance of the molten pool contour along the welding direction, and molten pool width was defined as the maximal distance of the molten pool contour perpendicular to the welding direction.
At the arc-striking stage, the cooling rate of the molten pool was relatively fast, the molten pool was difficult to spread out. With the increase of cladding layers, the workpiece tended to be bogged down, which is shown in Figure 2; in addition, the welding procedure is an important factor. The geometric dimensions of the workpiece are shown in Figure 3. The relative position of the molten pool in the image would change; therefore, the location feature of the molten pool is also an important feature. We extracted the wire extension as the location feature of the molten pool. Figure 4 is the schematic diagram of the visual features of the molten pool.    In this paper, the additive manufacturing experiment was conducted in the CMT procedure. The advantages of the CMT welding process are small splash, low heat input, and stable arc. After setting the welding parameters, the current waveform was collected in the actual welding process. Figure 5 [22] shows the welding current waveform of the CMT process under certain welding parameters, while, Figure 6 [22] shows all images collected by color CCD within a CMT cycle.   In this paper, the additive manufacturing experiment was conducted in the CMT procedure. The advantages of the CMT welding process are small splash, low heat input, and stable arc. After setting the welding parameters, the current waveform was collected in the actual welding process. Figure 5 [22] shows the welding current waveform of the CMT process under certain welding parameters, while, Figure 6 [22] shows all images collected by color CCD within a CMT cycle. In this paper, the additive manufacturing experiment was conducted in the CMT procedure. The advantages of the CMT welding process are small splash, low heat input, and stable arc. After setting the welding parameters, the current waveform was collected in the actual welding process. Figure 5 [22] shows the welding current waveform of the CMT process under certain welding parameters, while, Figure 6 [22] shows all images collected by color CCD within a CMT cycle.    In this paper, the additive manufacturing experiment was conducted in the CMT procedure. The advantages of the CMT welding process are small splash, low heat input, and stable arc. After setting the welding parameters, the current waveform was collected in the actual welding process. Figure 5 [22] shows the welding current waveform of the CMT process under certain welding parameters, while, Figure 6 [22] shows all images collected by color CCD within a CMT cycle.     6 show that the CMT cycle was approximately 14 ms, at the peak stage of CMT process. Because of the strong arc light, the collected molten pool image was seriously disturbed, and it was difficult to calculate the visual features of the molten pool. At the base stage of the CMT process, there was almost no arc interference, and the collected molten pool image had high signal-to-noise ratio (SNR), from which the shape and location features of the molten pool could be accurately extracted. In this paper, we chose the first frame image collected at the base stage within every CMT cycle, and extracted the shape and location features of the molten pool.

Extraction of Weld Reinforcement
In the GMA additive manufacturing process, after each cladding layer was welded, using a 3D scanner (Wiiboox REEYEE 3M) to measure the height of the workpiece (the 3D scanner is shown in Figure 7), getting the relationship between workpiece height and welding seam position, the height difference between adjacent cladding layers was defined as the weld reinforcement of the current cladding layer. Then, by means of the laser locating system, we could calculate the weld reinforcement corresponding to every frame of the molten pool image collected by color CCD.
Metals 2020, 10, x FOR PEER REVIEW 6 of 13 Figures 5 and 6 show that the CMT cycle was approximately 14 ms, at the peak stage of CMT process. Because of the strong arc light, the collected molten pool image was seriously disturbed, and it was difficult to calculate the visual features of the molten pool. At the base stage of the CMT process, there was almost no arc interference, and the collected molten pool image had high signal-to-noise ratio (SNR), from which the shape and location features of the molten pool could be accurately extracted. In this paper, we chose the first frame image collected at the base stage within every CMT cycle, and extracted the shape and location features of the molten pool.

Extraction of Weld Reinforcement
In the GMA additive manufacturing process, after each cladding layer was welded, using a 3D scanner (Wiiboox REEYEE 3M) to measure the height of the workpiece (the 3D scanner is shown in Figure 7), getting the relationship between workpiece height and welding seam position, the height difference between adjacent cladding layers was defined as the weld reinforcement of the current cladding layer. Then, by means of the laser locating system, we could calculate the weld reinforcement corresponding to every frame of the molten pool image collected by color CCD.

Prediction-Model Establishment for Weld Reinforcement
Artificial neural networks have excellent nonlinear mapping characteristics and strong learning ability. In recent years, they have developed rapidly and are widely used in automatic control, prediction, and other fields. Back-propagation (BP) neural networks are multilayer feedforward neural networks that are trained by error back-propagation algorithms.
Taking the shape and location features of the current frame molten pool as inputs, that is to say, the molten pool area, length, width, and the wire extension as inputs, the weld reinforcement corresponding to the current frame as the output; by means of the BP neural network, the prediction model for weld reinforcement was developed. There were two hidden layers in the neural network. On the basis of the test results, two hidden layers were set with 10 neurons, respectively; the structure of the prediction model is shown in Figure 8.

Prediction-Model Establishment for Weld Reinforcement
Artificial neural networks have excellent nonlinear mapping characteristics and strong learning ability. In recent years, they have developed rapidly and are widely used in automatic control, prediction, and other fields. Back-propagation (BP) neural networks are multilayer feedforward neural networks that are trained by error back-propagation algorithms.
Taking the shape and location features of the current frame molten pool as inputs, that is to say, the molten pool area, length, width, and the wire extension as inputs, the weld reinforcement corresponding to the current frame as the output; by means of the BP neural network, the prediction model for weld reinforcement was developed. There were two hidden layers in the neural network. On the basis of the test results, two hidden layers were set with 10 neurons, respectively; the structure of the prediction model is shown in Figure 8. In the GMA additive manufacturing process, accumulating one layer every 3 min, that is to say, the cooling time between adjacent cladding layers was 3 min, according to the acquired data, we randomly selected 800 groups of data to constitute the training set in each cladding layer, and the other data constituted the test set; detailed data groups are shown in Table 3. Partial data of the shape and location features of the molten pool, and the corresponding weld reinforcement are shown in Table 4.    In the GMA additive manufacturing process, accumulating one layer every 3 min, that is to say, the cooling time between adjacent cladding layers was 3 min, according to the acquired data, we randomly selected 800 groups of data to constitute the training set in each cladding layer, and the other data constituted the test set; detailed data groups are shown in Table 3. Partial data of the shape and location features of the molten pool, and the corresponding weld reinforcement are shown in Table 4. Table 3. Number of data groups within training and test sets.

Number of Cladding Layers
Training Set Test Set   3  800  129  4  800  142  5  800  169  6  800  129  7  800  145  8  800  165  9  800  139  10 800 54 Before training and testing the prediction model, all data needed to be mapped to [0,1], that is normalization, and the detailed calculation formula is: where x origin and x new are the numerical values before and after treatment, respectively; and x max and x min are the maximal and minimal numerical values within the original data set, respectively.

Predicted Results and Analysis
By testing the established prediction model, the predicted results of weld reinforcement in the third, fourth, and fifth cladding layers are shown in Figure 9.
Before training and testing the prediction model, all data needed to be mapped to [0,1], that is normalization, and the detailed calculation formula is: x are the maximal and minimal numerical values within the original data set, respectively.

Predicted Results and Analysis
By testing the established prediction model, the predicted results of weld reinforcement in the third, fourth, and fifth cladding layers are shown in Figure 9.  There are several reasons for the larger prediction error of individual samples, for example, the welding process is a non-linear and multivariable process, and there are some random uncertainties, There are several reasons for the larger prediction error of individual samples, for example, the welding process is a non-linear and multivariable process, and there are some random uncertainties, which leads to the deviation of individual experiment results from the predicted results of the prediction model. In addition, there were some errors in the extraction and calculation of visual features of the molten pool. The predicted precision of the developed model could be judged through mean absolute error (MAE); the calculation equation is as follows: where h denotes the predicted weld reinforcement, h denotes the actual weld reinforcement, and m is the whole number of data groups within the test set. The predicted precision of the established prediction model is shown in Table 5. In the GMA additive manufacturing process, if cooling time between adjacent cladding layers is kept constant, the weld reinforcement of each cladding layer greatly fluctuates; the established prediction model in this paper could accurately predict weld reinforcement. In the GMA additive manufacturing process, the heat-dissipation condition in each cladding layer, and the change rule of the molten pool shape are different; therefore, there is no necessary relationship between MAE and the ordinal number of cladding layers. By reducing the number of data groups in the training set, the test accuracy of the model did not decrease, which indicated that the selected number of data groups in the training set was enough.
When all the data acquired from different cladding layers were combined into one data group, randomly selecting 150 groups of data as the test set, and the other data constituted the training set, the predicted results of weld reinforcement are shown in Figure 10; predicted MAE was 0.1094 mm.
Metals 2020, 10, x FOR PEER REVIEW 9 of 13 which leads to the deviation of individual experiment results from the predicted results of the prediction model. In addition, there were some errors in the extraction and calculation of visual features of the molten pool. The predicted precision of the developed model could be judged through mean absolute error (MAE); the calculation equation is as follows: h denotes the predicted weld reinforcement, h denotes the actual weld reinforcement, and m is the whole number of data groups within the test set. The predicted precision of the established prediction model is shown in Table 5. Table 5. Predicted precision of established model. In the GMA additive manufacturing process, if cooling time between adjacent cladding layers is kept constant, the weld reinforcement of each cladding layer greatly fluctuates; the established prediction model in this paper could accurately predict weld reinforcement. In the GMA additive manufacturing process, the heat-dissipation condition in each cladding layer, and the change rule of the molten pool shape are different; therefore, there is no necessary relationship between MAE and the ordinal number of cladding layers. By reducing the number of data groups in the training set, the test accuracy of the model did not decrease, which indicated that the selected number of data groups in the training set was enough.

Number of Cladding Layers MAE (mm) Number of Cladding Layers MAE (mm)
When all the data acquired from different cladding layers were combined into one data group, randomly selecting 150 groups of data as the test set, and the other data constituted the training set, the predicted results of weld reinforcement are shown in Figure 10; predicted MAE was 0.1094 mm.

Verification of Generalization Ability of Prediction Model
In the GMA additive manufacturing process, cooling time between adjacent cladding layers has great influence on the shape of the molten pool and the precision of the final forming dimension. In order to further verify the generalization ability of the prediction model for weld reinforcement, we changed the cooling time between adjacent cladding layers, with other welding parameters remaining unchanged.
In the case of cooling time between adjacent cladding layers being 4 min, according to the acquired data, we randomly selected 800 groups of data to constitute the training set in each cladding

Verification of Generalization Ability of Prediction Model
In the GMA additive manufacturing process, cooling time between adjacent cladding layers has great influence on the shape of the molten pool and the precision of the final forming dimension. In order to further verify the generalization ability of the prediction model for weld reinforcement, we changed the cooling time between adjacent cladding layers, with other welding parameters remaining unchanged.
In the case of cooling time between adjacent cladding layers being 4 min, according to the acquired data, we randomly selected 800 groups of data to constitute the training set in each cladding layer, and the other data constituted the test set, as shown in Table 6. The predicted precision of the established prediction model is shown in Table 7.  When all data acquired from different cladding layers were combined into one data group, randomly selecting 150 groups of data as the test set, and the other data constituted the training set, the predicted results of weld reinforcement are shown in Figure 11; predicted MAE was 0.0777 mm.
Metals 2020, 10, x FOR PEER REVIEW 10 of 13 layer, and the other data constituted the test set, as shown in Table 6. The predicted precision of the established prediction model is shown in Table 7.  When all data acquired from different cladding layers were combined into one data group, randomly selecting 150 groups of data as the test set, and the other data constituted the training set, the predicted results of weld reinforcement are shown in Figure 11; predicted MAE was 0.0777 mm. In the case of cooling time between adjacent cladding layers being 2 min, according to the acquired data, we randomly selected 800 groups of data to constitute the training set in each cladding layer, and the other data constituted the test set, as shown in Table 8. The predicted precision of the established prediction model is shown in Table 9.
When all data acquired from different cladding layers were combined into one data group, randomly selecting 150 groups of data as the test set, and the other data constituted the training set, the predicted results of weld reinforcement are shown in Figure 12; predicted MAE was 0.0950 mm.
Similarly, due to different heat-dissipation conditions in each cladding layer, the change rule of the molten pool shape was also different; there was no necessary relationship between MAE value and the cooling time of adjacent cladding layers. To sum up, we can conclude that the prediction In the case of cooling time between adjacent cladding layers being 2 min, according to the acquired data, we randomly selected 800 groups of data to constitute the training set in each cladding layer, and the other data constituted the test set, as shown in Table 8. The predicted precision of the established prediction model is shown in Table 9.  Training Set  Test Set   3  800  112  4  800  188  5  800  145  6  800  129  7  800  113  8  800  144  9  800  111  10 800 108 When all data acquired from different cladding layers were combined into one data group, randomly selecting 150 groups of data as the test set, and the other data constituted the training set, the predicted results of weld reinforcement are shown in Figure 12; predicted MAE was 0.0950 mm.

Number of Cladding Layers
Metals 2020, 10, x FOR PEER REVIEW 11 of 13 model for weld reinforcement had high prediction precision and strong generalization ability, which could be applied to the GMA additive manufacturing process. 10 800 108 Table 9. Predicted precision of established model.

Conclusions
(1) A vision-sensing system for molten pool was established that can extract the shape feature of molten pool in real time. A laser positioning system was also developed to match every frame collected molten pool images with actual weld location.
(2) Taking the shape and location features of the current frame molten pool as input, the weld reinforcement corresponding to current frame as the output, by means of a BP neural network, the prediction model for weld reinforcement was developed; experiment results showed that the predicted MAE of the model was less than 0.11 mm. By changing cooling time between adjacent cladding layers, the generalization ability of prediction model was further verified.
(3) Future work will mainly focus on the study of the online control method for weld reinforcement in the GMA additive manufacturing process.  Similarly, due to different heat-dissipation conditions in each cladding layer, the change rule of the molten pool shape was also different; there was no necessary relationship between MAE value and the cooling time of adjacent cladding layers. To sum up, we can conclude that the prediction model for weld reinforcement had high prediction precision and strong generalization ability, which could be applied to the GMA additive manufacturing process.

Conclusions
(1) A vision-sensing system for molten pool was established that can extract the shape feature of molten pool in real time. A laser positioning system was also developed to match every frame collected molten pool images with actual weld location.
(2) Taking the shape and location features of the current frame molten pool as input, the weld reinforcement corresponding to current frame as the output, by means of a BP neural network, the prediction model for weld reinforcement was developed; experiment results showed that the predicted MAE of the model was less than 0.11 mm. By changing cooling time between adjacent cladding layers, the generalization ability of prediction model was further verified.
(3) Future work will mainly focus on the study of the online control method for weld reinforcement in the GMA additive manufacturing process.

Conflicts of Interest:
The authors declare no conflict of interest.