# Physics-Informed Neural Networks for Cantilever Dynamics and Fluid-Induced Excitation
## 3 Experiments
### Vibration of a Cantilever
#### 3.1.4 Results  
The performance of the proposed STD-PINN was examined through a comparison to the regular PINN, used as a baseline. The global scaling layer is also adopted at the top, which adjusts the input variables to range from \(-1\) to \(+1\), identical to those of the present STD-PINN and the original PINN model [1]. However, the configuration based on the scaling law and the resulting global scaling layer at the bottom were not adopted for the baseline model. The loss function was constructed based on Equation (2). Therefore, the stepwise improvements from the regular PINN can be suggested from the strategies proposed in this study as (1) the configuration based on the scaling law with the regular PINN architecture and (2) STD-PINN in addition to the scaling law, which are termed model 1 and model 2, respectively, in the following. The predictions of the PINN models (baseline, model 1, and model 2) were evaluated compared to the truncated semi-analytic solution from beam bending theory, which accounts for up to the fifth bending modes. The semi-analytic solution was realized based on the Sympy library [40]. Table 1 shows the \(L1\) absolute and \(L2\) relative errors of the PINN models. The errors were calculated for five cycles of oscillation in terms of the period of the first bending mode. As mentioned earlier, the regular PINN was not able to find a reliable solution for the problem of the free vibration of the beam. The \(L1\) and \(L2\) errors of the regular PINN are \(7.56\times 10^{-3}\) and \(7.20\times 10^{0}\), respectively. As a remedy, the proposed strategies greatly improved the predictions of the PINN models, as shown in the errors of model 1 and model 2. The predictions of model 2 (STD-PINN) exhibited approximately 10-fold smaller errors compared to model 1 (the regular PINN with the scaling law). Furthermore, the corresponding R\({}^{2}\) scores for Model 1 and Model 2 are 0.96964 and 0.99917, respectively. Figure 1(a) illustrates the beam displacement profiles obtained from the STD-PINN (solid lines) compared to those of the truncated solution (dots), where 10 consecutive snapshots are shown from the initial end load condition for half a cycle of the first bending mode. The predictions of the STD-PINN method exhibit good agreement with the semi-analytic solution. Note that the figure was drawn by amplifying the y-scale to clearly show \begin{table}
\begin{tabular}{c c c} \hline \hline  & \(L1\) **Absolute Error** & \(L2\) **Relative Error** \\ \hline Regular PINN & \(7.56\times 10^{-3}\) & \(7.20\times 10^{0}\) \\ Model 1 & \(1.48\times 10^{-4}\) & \(1.78\times 10^{-1}\) \\ (Scaling law) & \(3.05\times 10^{-5}\) & \(2.93\times 10^{-2}\) \\ Model 2 & & \\ (STD with scaling law) & & \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Training errors of the regular PINN as a baseline, model 1 configured from the scaling law, and model 2 realized with STD-PINN and the scaling law. the beam oscillation. The training procedure and predicted solutions of model 1 and model 2 are further compared in Figure 2b,c. The trend in training loss was plotted according to the training epochs in Figure 2b, where the black and red lines indicate model 1 and model 2, respectively. As the L-BFGS-B optimization algorithm was employed, the iterative training epochs were prolonged as the loss function approached convergence. Consequently, the number of epochs varied by training case, in contrast to situations where the number of epochs was predetermined according to hyperparameters. The STD-PINN demonstrates more rapid convergence compared to the regular PINN. Model 1 (only with scaling law configuration) exhibited much slower convergence to an order-of-magnitude-greater training loss compared to model 2 (STD-PINN extension). The trajectories of the beam end are illustrated in Figure 2c. The predictions of models 1 and 2 were almost identical from the start of the oscillation to the first cycle.