## 4 Neural Network Model
The data collected are six input variables (wire feed speed, voltage, current, travel speed, energy, and pyrometer temperature) for the forty-six control points of the nine beads defined in Table 2, as discussed in the results Section 3.1. The data are split into training and testing sets. The training set is used to train the model (80% of the data), while the testing set (20% of the data) is used to evaluate the model's performance on unseen data. The model consists of an input layer, two hidden layers with 100 and 50 neurons, respectively, and an output layer with two neurons corresponding to the height and width of the weld beads. The model is compiled using the Adam optimizer, the mean squared error (MSE) loss function, and a precision metric. This model has a test loss of 0.144 and a perfect test accuracy of 1.0, demonstrating its remarkable ability to predict weld bead geometry from process parameters alone. The model's performance is evaluated on the test set, 0.2 (percentage of the total data set) \(\times\) 9 (beads with different welding conditions) \(\times\) 46 (control points), as shown in Figure 9b. The fact that the points on the validation graph are clustered around the line of perfect prediction indicates that the model is predicting real values with a fair degree of accuracy. However, it would be important to conduct further tests in order to confirm these results. This could be performed via increasing the size of the test dataset or using a different test dataset altogether. It would also be crucial to analyze the model's errors to identify any trends or patterns that may indicate an issue with the model. Figure 10 shows the fabricated welding bead from the ninth test, with the direct deposition arc welding (DED) process. The cross-section, considered to be the weld profile shown in the image, is typical of a DED weld. The weld has a parabolic shape, almost perfectly matching the raw data from the profilometer with its regression model, with a wide melt region at the bottom, and a narrow bead region at the top. The virtual sensor correctly defines the shape by fitting closely to both the regressed parabola and the raw points. For its conception, the error is associated with the fact that the center of the parabola is not the physical center, as it has a certain flattening to the right in positive values of the abscissa axis. Figure 10: Zero bead morphology comparison between raw data from the profilometer, the parabola modeled bead, and the virtual sensor estimated geometry from the neuronal network model in test nine arc-DED manufacturing conditions. The virtual sensor's ability to predict weld bead geometry in real-time opens up a plethora of applications: (i) Real-time monitoring and defect detection--the virtual sensor can continuously monitor weld bead geometry, alerting operators to potential defects such as undercut, a lack of fusion, or excessive bead height; (ii) Automated process control--the predicted weld bead geometry can guide the automation of the welding process, optimizing parameters like wire feed speed and travel speed in order to achieve the desired weld characteristics; and (iii) Quality assurance--the virtual sensor can evaluate the quality of weld beads by comparing the predicted geometry to the actual geometry measured using a physical sensor. This comparison can identify defects and ensure consistent weld quality. The virtual sensor, powered by a neural network model, represents a transformative advancement in weld bead monitoring and control, thus paving the way for enhanced weld quality, improved process efficiency, and reduced production costs.