# Physics-Guided Neural Network-Based Feedforward Control for Seamless Pipe Manufacturing Process
## 2 Materials and Methods
### Physics-Guided Neural Network-Based Feedforward Control
This transformation allows flexibility in defining the input features, such as normalizing the variables or incorporating additional physical insights. Such transformations often improve the numerical stability and training performance [16]. To address the challenge of overparameterization in the physics-guided neural network (PGNN) model and ensure physical interpretability during training, a regularized cost function is proposed [31]. The total cost function is defined as  
\[V(\theta,Z^{N})=V_{\text{MSE}}(\theta,Z^{N})+V_{\text{reg}}(\theta), \tag{43}\]  
where \(V_{\text{MSE}}(\theta,Z^{N})\) represents the mean squared error between the predicted and actual system outputs over the dataset \(Z^{N}=\{\phi[i],\mu[i]\}_{i=1}^{N}\), and \(V_{\text{reg}}(\theta)\) is a regularization term designed to prevent competition between the physics-based and neural network layers. The regularization term is formulated as  
\[V_{\text{reg}}(\theta):=\left\| \begin{bmatrix}\Lambda_{\text{NN}}&0\\ 0&\Lambda_{\text{phy}}\end{bmatrix} \!\left(\theta- \begin{bmatrix}0\\ \theta_{\text{phy}}^{*}\end{bmatrix} \right)\right\|_{2}^{2}, \tag{44}\]  
where the term \(\theta_{\text{phy}}^{*}\) denotes the initial parameters of the physics-based model, typically obtained through system identification methods. The weighting matrices \(\Lambda_{\text{NN}}\) and \(\Lambda_{\text{phy}}\) control the relative importance of regularization for the neural network and physics-based components, respectively. The purpose of the regularization term is twofold. First, it ensures that the neural network layer complements rather than overrides the physics-based model. Second, it prevents parameter drift in the physics-based layer, thereby preserving its interpretability and consistency with prior physical knowledge. Without regularization, the neural network may dominate the hybrid structure, leading to the loss of physical meaning and unstable behavior during training [16]. Figure 6: Physics-guided neural network architecture with physics and neural network layers. To determine the optimal parameter vector \(\theta\) that best represents both the physics-based model and the residual dynamics captured by the neural network, we solve the following identification problem:  
\[\hat{\theta}=\arg\min_{\theta}V(\theta,Z^{N}), \tag{45}\]  
which emphasizes that the goal of the identification procedure is to find the optimal \(\theta\) based on the available dataset \(Z^{N}\). The development of the PGNN-based feedforward controller begins with the reduced-order linearized actuator model derived in Section 2.1.3. This model approximates the inverse mapping from the desired output (e.g., the pushing force) and measurable states (e.g., load pressure) to the control input (valve opening). To implement the controller in a digital form, the continuous time model is discretized. Starting from a linearized second-order equation such as (35), backward difference approximation is applied with a sampling period \(T_{s}\). For the load pressure \(p_{L}(k)\) and control input \(u(k)\), this discretization leads to  
\[\frac{p_{L}(k)-2p_{L}(k-1)+p_{L}(k-2)}{T_{s}^{2}} + A_{1}\frac{p_{L}(k)-p_{L}(k-1)}{T_{s}}+A_{0}p_{L}(k) \tag{46}\] \[= B_{1}\frac{u(k)-u(k-1)}{T_{s}}+B_{0}u(k)+C,\]  
where \(A_{0}\), \(A_{1}\), \(B_{0}\), \(B_{1}\), and \(C\) are coefficients determined by linearization about the chosen operating point. In practical implementations, the zero-order hold (ZOH) in the digital-to-analog converter introduces a half-sample (\(T_{s}/2\)) delay in \(u(t)\). To compensate for this delay, all output dependencies are shifted forward by half a sample. Applying the shift operator \(\Delta=\frac{z+1}{2}\) to (46) modifies the relationship, leading to new coefficients \(A_{0}^{\prime},A_{1}^{\prime},A_{2}^{\prime},A_{3}^{\prime},B_{0}^{\prime},B_{ 1}^{\prime}\), and \(D^{\prime}\).