## 5 Anomaly Detection Result  
In this section, the proposed digital twin hybrid neural ODE model is applied to monitor the condition and detect the anomalies of the cooling fan system. The study uses the fan tray system seen in Figure 11 and simulates two kinds of anomalies, an inlet covered by an object and a disturbance occurring on the rotor, which are shown in Figure 17. The proposed digital twin first evaluates the fan speed response in a healthy condition and assess the cooling fan when an anomaly happens.  
To inspect the status of a cooling fan system through a digital twin, it is essential to establish a reliable mechanism to determine its health status. Since the digital twin represents the response of a healthy cooling fan system, the status can be defined by the error between the digital twin. Figure 18 illustrates the error distribution between the hybrid neural ODE model and measurement under healthy conditions, which is the error seen in Figures 14b and 15b. The error distribution can be regarded as a normal distribution, in which over 95% of values fall within two standard deviations. Based on the characteristic, the \"safe range\" that determines the system under healthy conditions can be established by an upper bound (UB) and a lower bound (LB):  
\[\text{UB}=\hat{\omega}(t)+2\sigma \tag{35}\]  
\[\text{LB}=\hat{\omega}(t)-2\sigma \tag{36}\]  
where \(\hat{\omega}(t)\) represents the digital twins' output calculated by the hybrid neural ODE model and \(\sigma\) is the standard deviation. Calculation shows that the standard deviation of the error distribution is \(\sigma=15.8483\). According to the above definition, a cooling fan system is considered healthy when its fan speed remains within the upper and lower bound described in Equations (35) and (36). Conversely, if the fan speed exceeds the safe range, it indicates an anomaly in the fan system.  
Figure 17: The anomalies that occurred in the fan system. (**a**) Fan inlet covered by an object. (**b**) Disturbance of the rotor.  
After establishing the criterion for a healthy condition, the anomaly detection process can be initiated. Figure 19 presents the results by using anomaly detection based on the proposed digital-twin-based anomaly detection. The green area in the figures represents the safe range defined by digital twin outputs and the standard deviation of the error in healthy conditions, while the red area indicates the occurrence of the anomalies. Most of the time, the fan speed remains within the green area, representing that the fan system is under healthy conditions. However, when anomalies do occur, the fan speed experiences sudden changes and exceeds the safe range. The anomalies are detected using the defined safe range criteria. Once the objects are removed, which means the anomalies are addressed, the fan speed quickly returns to the safe range, representing that the system restores the normal condition. Figure 19a,b demonstrate the anomaly conditions when the inlet was covered and when there was a disturbance on the rotor. Figure 19c shows the monitoring result when the speed command was generated manually, reflecting the applicability in unpredictable commands. The experiments demonstrate accurate detection when faults occur and rapid response to anomalies. Moreover, the digital twin has significantly fewer parameters than a conventional NN, facilitating real-time implementation with limited memory storage. These results validate the practical application capabilities of the proposed digital twin.  
Figure 19: _Cont._  
Figure 18: Error distribution between the digital twin and measurement under healthy conditions.