## 4 Digital Twins Derivation
### Numerical Simulation  
Before the experiment, this study first evaluates the modeling performance of digital twins by using simulation data. The simulation environment and data patterns of fan dynamics are the same as mentioned in Section 3. To evaluate the fitting performance, three criteria are used: root-mean-square error (RMSE), maximum error (Error max), and R-squared (\(\mathbb{R}^{2}\)), which are calculated as follows  
\[\text{RMSE}=\sqrt{\frac{1}{N}\overset{N}{\underset{i=1}{\sum}}(y_{i}-\hat{y}_{ i})^{2}} \tag{32}\]  
\[\text{Error max}=\underset{i}{\underset{i}{\max}}|y_{i}-\hat{y}_{i}| \tag{33}\]  
\[\mathbb{R}^{2}=1-\frac{\overset{N}{\underset{i=1}{\sum}}(y_{i}-\hat{y})^{2}}{ \overset{N}{\underset{i=1}{\sum}}(y_{i}-\overline{y})^{2}},\overline{y}=\frac{1 }{N}\overset{N}{\underset{i=1}{\sum}}y_{i} \tag{34}\]  
where \(\{y_{i}\}_{i=1}^{N}\) is a set of measurements and \(\{\hat{y}_{i}\}_{i=1}^{N}\) represents the model output. A model with a good fitting result tends to have less RMSE, less Error max, and higher R\({}^{2}\). The fitting result can be seen in Figures 9 and 10, and Table 2. Since the physical model has the same dynamic equation as the simulation, the fitting performance is good. Furthermore, the estimated parameters for the physical model are \(\hat{J}=0.1444\), \(\hat{a}=0.0167\), and \(\hat{C}_{D}=0.0025\), which is close to the reference parameters values. On the other hand, the pure data-driven models, NARX model, and neural ODE model also perform well on training and testing data, but the fitting results do not surpass those of the physical model. It is noted that both show similar fitting performance, while neural ODE uses much fewer parameters. It is proved that the continuous-time model structure has advantages in modeling the system dynamics. Finally, the hybrid neural ODE model uses the same physical parameters \(\hat{J}\), \(\hat{a}\), \(\hat{C}_{D}\) while training. The fitting result shows a slight improvement compared to the physical model, which means that the fitting performance on simulation data still accounts for physics-informed terms. Figure 9: Training fitting result for simulation data. (**a**) Fan speed output. (**b**) Modeling error. The fitting results are shown in Figures 14-16, and Table 3. From the results shown in Figure 14, it is more obvious that the prediction of the fan speed from the physical model has a low accuracy in training data. The complexity of the low-speed fan dynamics makes it challenging to describe accurately using just a physical model, especially in transient behavior. The estimated parameter values are \(\hat{J}=0.0148\), \(\hat{\alpha}=0.0074\), \(\hat{C}_{D}=5.4772\times 10^{-6}\). For the NARX model, although the fitting results on training data are good, the model has an overfitting problem on testing data, which is shown in Figure 16. It can be inferred that the discrete-time model has difficulty capturing the continuous dynamics of the system, making it susceptible to unforeseen data. In contrast, the neural ODE model can achieve a better fitting performance than the NARX model with fewer parameters. The outstanding capability of system identification for continuous-time neural networks is again proven. In addition, the fitting result of the neural ODE model in Figure 14 performs better than the physical model at a low speed. This indicates that the data-driven method is effective in addressing low-speed dynamics. The hybrid neural ODE model, which only sets 10 hidden states, has the best-fitting performance among all models. This shows that the inclusion of physics-informed terms can efficiently reduce the complexity of the NN required to fit the data. From another perspective, it can also be said that the physical model can enhance its fitting accuracy by incorporating a neural ODE structure, which makes it able to describe the nonlinearity of the real dynamics.