# Advanced Automatic Welding System for Offshore Pipeline System with Seam Tracking Function
## 5 Application of the Automatic Welding System  
### Welding Seam Tracking  
The seam tracking automatically welds the weld centerline via signal processing during the welding process. Various types of signal processing algorithms have been developed, such as curve fitting, the integral method, and the moving average [9; 10; 11; 12]. The requirement for a seam tracking algorithm is the measurement of welding signals (voltage or current) and determination of the geometry offset that deviates from the weld centerline. This study conducts a moving average method based on voltage values. The number of samplings was divided into the measurement of the voltage values in the left (forward) and right (backward) directions, as shown in Figure 13. In consideration of the geometry of the U-groove shape, the selection of the signal section (start location and end location) differently set for stable seam tracking. The signals measured near the arc center is flat because the groove shape at the center position is similar to a flat shape. It means that the seam tracking sensor cannot detect the signal difference between the left and right side during a weaving motion. Hence, the ratio of measuring interval plays an important role in the sensitivity and reliability of the seam tracking sensor. The average value was calculated and stored as a representative value. The signal section where the measured value suddenly changed according to the shape of the welding groove was excluded from the representative value calculation. The procedure of welding seam tracking is shown in Figure 14. Table 1 shows the procedure of welding seam tracking in each sequence with the control modules. Figure 13: Selection of the signal section for weld seam tracking: (**a**) Root pass welding, (**b**) fill pass welding. The moving average is calculated in Equation (1):  
\[Value_{a}(k)=\frac{\left\{(factor-1)\times Value_{a}(k-1)+Value_{m}(k)\right\}}{factor} \tag{1}\]  
The moving average method has the advantage of changing factors to easily determine the cut off frequency, and this paper used a digital low-pass filter in the voltage signal. The forward-moving average (FMA) method is calculated in Equation (2), and the sampling number is set to a number from 1 to 80. The backward moving average (BMA) method is calculated in Equation (3), and the sampling number is set from 80 to 1 in Equation (3). After calculating the FMA and BMA, the mean value of the moving average is calculated in Equation (4), and the welding signal is shown in Figure 15.  
\[Value_{forward}(k_{k=1-80})=\frac{\left\{(a-1)\times Value_{a}(k-1)+Value_{m}(k) \right\}}{factor} \tag{2}\]  
\[Value_{backward}(k_{k=80-1})=\frac{\left\{(a-1)\times Value_{a}(k)+Value_{m}(k-1 )\right\}}{factor} \tag{3}\] \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Index** & **Weaving** & **WCM** & **WMM** & **SMM** \\ \hline
1 & \(\medu\to\medu\) & \(\medu\) & Calculation of weaving time & – & Correction value for left and right \\ \hline
2 & \(\medu\to\medu\) & \(\medu\) & Transmit the measurement of the voltage value & Receive the measurement of voltage & – \\ \hline
3 & \(\medu\to\medu\) & \(\medu\) & – & Receive the voltage and number of samples & – \\ \hline
4 & \(\medu\to\medu\) & \(\medu\) & Receive the voltage value & Calculate the mean moving average & Receive the correction value \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Function of the control module in welding seam tracking. Figure 14: Procedures of welding seam tracking. \[Value_{mean}(k)=\frac{Value_{forward}(k)+Value_{backward}(k)}{2} \tag{4}\]  
where \(Value_{a}(k)\) is the averaged value at \(k\) step. \(Value_{m}(k-1)\) is the averaged value at \(k-1\) step. \(Value_{m}(k)\) is the measured signal value (voltage) at k step, and \(a\) is the moving average factor. To calculate the correction value, the weaving time is calculated during the weaving motion from left to right or right to left. The voltage signals are consecutively measured during a weaving motion.