# Physics-Guided Neural Network-Based Feedforward Control for Seamless Pipe Manufacturing Process
## 3 Results
### Neural Network Training
#### 3.1.2 Physics-Guided Neural Network Training  
For the creation of the training dataset for the PGNN, the setup was slightly modified compared to the training of the benchmark model. * Both grippers (Figure 3) are engaged, creating a rigid mechanical connection between the two pistons. * The first cylinder operates in force mode, following the desired force value ramps, using any type of controller. The term \"any\" is used here because the quality of tracking of the desired force value is not crucial in generating the training dataset; rather, the focus is on covering the entire operating range of interest. For our purposes, a simple PI controller without feedforward is used, with initially selected gains that are not thoroughly tuned. * The second cylinder operates in velocity mode, moving at a constant speed, which is selected as the expected insertion speed of the material into the mill during the process. * Since the cylinder stroke is limited, and to ensure that the training set is sufficiently rich, when the piston reaches its fully extended position, the second cylinder is commanded to move at a negative speed until it reaches the fully retracted position, after which it is again assigned a positive speed. This cycle is repeated as many times as necessary, depending on the desired dataset size, sampling frequency, and piston speed in the operating regime. During the return of the pistons to the starting position, there is no need to change the operating mode of the first cylinder. It is only necessary to ensure that the reference signal for the force ramps, which the first cylinder is supposed to follow, is sufficiently large and randomized to avoid repetition during the experiments. It is important to note that, in order for the training dataset to align with the physical part of the PGNN, as mathematically described in Section 2.1.3, specifically due to the assumption of continuous motion and the absence of static friction and signum issues, only the portions of the recorded data corresponding to positive piston speeds are adopted for the final training set. An example of such a dataset is shown in Figure 12, covering three consecutive positive movements. The portion of the recorded data corresponding to negative speeds is not displayed. The sampling frequency was set to 250 Hz, and, for a cylinder stroke of 340 mm and a speed of 40 mm/s, one positive movement corresponds to a set of approximately 8 s.  
Figure 11: Benchmark neural network training performance. In Figure 12, alongside the desired and actual force values, the value of \(p_{L}\bar{A}\) is also displayed, which corresponds to the force calculated using the linearized reduced-order model, represented by Equation (22). Similar behavior to that seen in Figure 5 or the simulation model is observed. Specifically, for lower force values, the error of the linearized reduced-order model is significant, while, with increasing force, the reduced model provides a closer approximation of the real system. This is shown in Figure 13, where the force calculation error of the linearized reduced-order model falls to nearly 30%. This error primarily results from the linearization process and the use of a reduced-order model, which estimates the force based on the load pressure and an average effective piston area. A more accurate force prediction would require piston surface areas that are more similar, with the extreme case being a double-rod cylinder where the area ratio is 1. However, in this study, the reduced-order model is not expected to provide an exact force calculation but rather to generate the dominant portion of the feedforward control signal. The remaining part is corrected by the neural network component of the PGNN, which is trained on these data to compensate for modeling errors. Additionally, the feedback loop further refines the control signal, ensuring overall robustness.