## 5 Current Prediction Model
### Evaluation--Predictive Power  
In this first experiment, we demonstrate that the grey-box model is able to correctly model the welding current. Additionally, we introduce the average-based model, which we use as a baseline model throughout this work.  
We followed a common methodology for regression problems where we determine model parameters using training data and evaluate on the test data. We randomly split the available weld data into train and test data following a 80/20 ratio and keeping the ratio of weld programs in both sets similar. We trained our model as described in Section 5.2, with \(R_{mach}\) defined as a vector of length 3, one value per maintenance period.  
\begin{table}
\begin{tabular}{l l l l} \hline \hline
**Symbol** & **Type** & **\#Values** & **Description** \\ \hline \(V_{in}\) & input & 1 & Requested voltage setpoint, determines thyristor firing duration \\ \(T(head)\), \(T(tail)\) & input & 1 & Thickness of the head/tail coil \\ \(P_{valid}\) & input & 1 & Requested welding wheel pressure \\ \(V_{out}\) & trainable & 11 & Mapping of voltage setpoint \(V_{in}\) to outputted machine voltage \\ \(R_{mach}\) & trainable & 1 or 3 & Resistance of machine and welding wheels \\ \(\rho(head)\), \(\rho(tail)\) & trainable & \#steeltypes & Resistance factor for steel type in head/tail coil \\ \(S\) & trainable & 1 & Surface term \\ \(C\) & trainable & 1 & Pressure-based surface correction factor \\ \(I\) & output & 1 & Predicted median welding current \\ \hline \hline \end{tabular} The exact value is confidential.  
\end{table}
Table 1: Overview of the parameters of the welding current prediction model.  
Figure 2: Setup voltage \(V_{in}\) determines the period during which the circuit is completed by the thyristor, passing the voltage.  
The average-based model is our reference current prediction model based on the state-of-the-art literature. While no work focuses specifically on welding current prediction, most works similar to our use case use statistical methods to compare weld measurements (including current) to determine weld quality. Based on these, we define the average-based model as a model that stores a single prediction value per welding program, i.e., the average current of the training weld made using that welding program. Additionally, we enhanced this model with the maintenance period feature, as we did for the grey-box model. The resulting model has one trainable parameter per welding program per maintenance period, totaling 325 parameters (this is not a multiple of three since not all programs were used in each period). We use the same train/test datasets for evaluating the average-based model as we did for the grey-box model.  
Table 2 shows the evaluation results. We see that both models have similar performance, with the grey-box model having a slightly higher error on the training data. Overall, the predictions are very good, with an average prediction error of close to one percent. Of course, the MSE and MAP errors give no insight as to how many welds would be rejected using either model. To do this, we set a prediction error threshold of 3 percent, which was advised by a process engineer, meaning that any weld where the difference between predicted and measured welding current is greater than 3 percent would be re-welded. Table 2 confirms that both models reject a similar number of welds.  
At this point, we have shown that our grey-box model performs similarly to the average-based baseline model. Note, however, that the grey-box model uses fewer than a tenth of the parameters of the average-based model. Next, we validate the interpretability of our model.