# Optimizing Physics-Informed Neural Network in Dynamic System Simulation and Learning of Parameters
## 5 Computational Simulations of Dynamical Systems
### Lotka-Volterra Model  
The Lotka-Volterra model is a model of the evolution of a prey-predator system. A prey-predator system is a completion where one species, called the predator, has more impact (winning), and the other species, less impact (losing), called the prey. [PERSON] and [PERSON] proposed the Lotka-Volterra model in 1925 and 1926 [31; 32]. If \(P(t)\) is the prey population and \(Q(t)\) the predator population at time \(t\), then the ordinary differential equation of the Lotka-Volterra model is  
\[\frac{dP(t)}{dt}=P(t)(a(t)-b(t)Q(t)) \tag{23}\]  
\[\frac{dQ(t)}{dt}=Q(t)(c(t)P(t)-d(t)) \tag{24}\]  
where variable \(P(t),Q(t),a(t),b(t),c(t)\) and \(d(t)\) represents  
\[P(t) :\] the size of the prey population per time \[Q(t) :\] the size of the predator population \[a(t) :\] the prey per capital rate of increase per time \[b(t) :\] the capture efficiency per time \[c(t) :\] the conversion efficiency per time \[d(t) :\] the mortality rate per time \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Layers** & **Neurons** & \(a\) **(PINN)** & \(a\) **(DNN)** & \(b\) **(PINN)** & \(b\) **(DNN)** & \(c\) **(PINN)** & \(c\) **(DNN)** & **Epochs** \\ \hline
1 & 40 & 1.0000379 & 1.0044 & 3.0000386 & 2.9936 & 5.0002103 & 4.9451 & 20,000 \\
2 & 40, 40 & 1.0000603 & 1.0051 & 2.9999495 & 3.0125 & 4.9998903 & 5.0515 & 15,107 \\
3 & 40, 40, 40 & 0.99996376 & 1.0044 & 3.000064 & 2.9936 & 4.999971 & 4.9451 & 9800 \\ \hline \hline \end{tabular}
\end{table} 
Table 13: Comparison of PINN vs. reported in the literature using DNN [12] based on shallow vs. deep layers. \begin{table}
\begin{tabular}{c c c c} \hline \hline  & \(a\) & \(b\) & \(c\) \\ \hline True Values & 1.0 & 3.0 & 5.0 \\ Approach 1 & 0.9999785 & 2.999931 & 5.000046 \\ Error of Approach 1 & 0.0000215 & 0.000069 & 0.000046 \\ Approach 2 & 1.0000874 & 3.0001755 & 5.0010123 \\ Error of Approach 1 & 0.0000874 & 0.0001755 & 0.0010123 \\ \hline  & \(u_{1}\) & \(u_{2}\) & \(u_{3}\) \\ \hline MAE of Approach 1 & 2.3118 \(\times\)\(10^{-5}\) & 1.8068 \(\times\)\(10^{-5}\) & 1.5237 \(\times\)\(10^{-6}\) \\ MAE of Approach 2 & 2.1915 \(\times\)\(10^{-5}\) & 2.6433 \(\times\)\(10^{-5}\) & 3.4797 \(\times\)\(10^{-5}\) \\ MSE of Approach 1 & 6.4652 \(\times\)\(10^{-10}\) & 3.9821 \(\times\)\(10^{-10}\) & 3.5008 \(\times\)\(10^{-12}\) \\ MSE of Approach 2 & 6.9882 \(\times\)\(10^{-10}\) & 8.9255 \(\times\)\(10^{-10}\) & 1.8445 \(\times\)\(10^{-9}\) \\ RMSE of Approach 1 & 2.5427 \(\times\)\(10^{-5}\) & 1.9955 \(\times\)\(10^{-5}\) & 1.8709 \(\times\)\(10^{-6}\) \\ RMSE of Approach 2 & 2.6435 \(\times\)\(10^{-5}\) & 2.9876 \(\times\)\(10^{-5}\) & 4.2948 \(\times\)\(10^{-5}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 11: Comparison of the two approaches using PINN. The parameters \(a(t),b(t),c(t),d(t)\) are non-negative. The Lotka-Volterra model has an adequate system model up to some parameters that need to be determined. To solve the Lotka-Volterra model, you can use numerical methods or analytical techniques. A physics-informed neural network approach is proposed in this case. The PINN combines neural networks with physical laws or equations to learn the model's time-varying parameters from data. Following the same PINN architecture shown in Figure 3, we offer a PINN algorithm with five networks to do this. The first network outputs are \(P_{NN}(t_{n};\omega)\) and \(Q_{NN}(t_{n};\omega)\), which admits \(t\) as the input data. The second, third, fourth, and fifth networks learn the parameters \(a(t_{n};\Phi)\), \(b(t_{n};\Phi)\), \(c(t_{n};\Phi)\) and \(d(t_{n};\Phi)\) from the data. We define the residual loss \(\zeta_{r}(\omega;\kappa_{r})\) and training loss \(\zeta_{t}(\omega;\kappa_{t})\) as follows to quantify the discrepancy between the model predictions and the actual data. The PINN algorithm minimizes the combined loss function to learn the optimal parameters and obtain the solution of the Lotka-Volterra model. \[\zeta_{r}(\omega;\kappa_{r})=\frac{1}{\kappa_{r}}\sum_{i=1}^{2}\sum_{n=1}^{ \kappa_{r}}|r_{i}(t_{n})|^{2}. \tag{25}\]  
where  
\[