# 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
Thus, despite the 30% error in the physical model, this deviation is deemed acceptable because it is the task of the PGNN to minimize it by integrating the neural network component with the physical model. Figures 14 and 15 display the achieved valve opening values, concentrated around a nominal value of 14%, and the piston speed, respectively, again only for positive movement speeds. The dataset used to train the PGNN consists of measurements of the load pressure, \(p_{L}\), and the control signal, \(u\). As described in Equation (50), the regressor vector is constructed for each time index \(k\). This regressor vector (or, equivalently, the input vector) is used as input to the PGNN. To ensure proper numerical conditioning, the regressor vector is processed in two segments. The first four components (i.e., the load pressure measurements) are standardized via z-score normalization using scikit-learn's StandardScaler. In contrast, the fifth component, corresponding to the previous control signal \(u[k-1]\), and the target output \(u[k]\) are normalized using min-max scaling to the interval \([0,1]\) because \(u\) is naturally bounded between 0% and 100%. The constant term (the sixth component) remains unscaled. All scaling parameters (means, standard deviations, minimum, and range) are computed solely from the training set (70% of the data) and then applied to both the training and validation sets (the remaining 30%). Figure 12: Force profile during the generation of the training dataset for the PGNN (only the portion corresponding to positive piston velocities is shown). The proposed PGNN architecture is composed of two distinct parts. The first part is a fixed physical model layer, implemented as a custom, non-trainable layer in TensorFlow. Its role is to capture the dominant system dynamics by computing  
\[u_{\text{phy}}=\theta_{\text{phy}}^{*\top}\phi[k], \tag{51}\]  
where \(\theta_{\text{phy}}^{*}\) are the initial parameters from Equation (48). Because the data are scaled prior to training, the physical model parameters must be adjusted accordingly. Let \(S\) denote the vector of scaling factors (standard deviations for the first four components and the range for the fifth component) and \(m\) the vector of corresponding offsets (means for the first four components and the minimum for the fifth component). If the control signal is normalized via min-max scaling with minimum \(u_{\text{min}}\) and range \(u_{\text{range}}=u_{\text{max}}-u_{\text{min}}\), the adjusted parameters are computed as  
\[\theta_{\text{phy,adjusted}}=\frac{\theta_{\text{phy}}^{*}\odot S}{u_{\text{ range}}},\qquad b_{\text{phy}}=\frac{\theta_{\text{phy}}^{*\top}m-u_{\text{min}}}{u_{ \text{range}}}, \tag{52}\]  
Figure 14: Valve opening during the generation of the training dataset for the PGNN (only the portion corresponding to positive piston velocities is shown). Figure 13: Force calculation error using reduced-order actuator model (only the portion corresponding to positive piston velocities is shown). where \"\(\odot\)\" denotes element-wise multiplication. This layer is embedded in the PGNN and remains fixed during training, thereby preserving the physical interpretability. The second part of the PGNN is a trainable neural network correction branch. This branch comprises two hidden layers with 16 neurons each and hyperbolic tangent activation functions. Its output, denoted by \(u_{\text{NN}}\), provides a correction term that compensates for discrepancies between the physical model and the true inverse dynamics. The overall PGNN output is obtained as the sum  
\[\hat{u}[k]=u_{\text{phy}}+u_{\text{NN}}, \tag{53}\]  
which is then mapped back to the original units via the inverse min-max transformation. During training, the dataset is divided into 70% for training and 30% for validation. The PGNN is trained using the Adam optimizer (with a learning rate of 0.001) over 70 epochs with a batch size of 32.