# Robust Simulation of Cyber-Physical Systems for Environmental Monitoring on Construction Sites
## 6 Results and Discussion  
### Anomaly Recognition  
In order to verify the feasibility and accuracy of the proposed anomaly identification algorithm, simulation experiments are performed using MATLAB. The monitoring point is sampled every 1 min, with a total of 1429 data. The abnormal data are then infused, including 11 \"data less than the detected value\", 27 \"constant value\", 9 \"abnormal data PM10 less than PM2.5\", 8 \"data far below the out-of-site monitoring value\", and 29 \"abnormal data on rainy and snowy days\". The fault injection rate is 5.8%, which is mainly consistent with the probability of abnormal data in practice. The objective of developing an abnormal-data-monitoring algorithm is to accurately identify the abnormal data and avoid false alarms. Therefore, the detection rate \(R\) and false alarm rate \(N\) are selected as evaluation indicators in order to measure the E-CPS robustness.  
\[R=\frac{TP}{TP+FN} \tag{13}\]  
In Equation (13), \(TP\) represents the number of samples that are abnormal data, and \(FN\) denotes the number of samples that are abnormal data but are incorrectly classified as normal data.  
\[N=\frac{TN}{TP+TN} \tag{14}\]In Equation (14), \(TN\) represents the number of samples that are normal data but identified as abnormal data, and \(TP\) denotes the number of samples that are abnormal data and identified as abnormal data. In this study, 8 \"far below the monitoring value outside the field\", 35 \"constant value\", 9 \"abnormal PM10 less than PM2.5\", 11 \"less than the detected value\", and 29 \"abnormal data on rainy and snowy days\" are detected by the simulation experiments. The simulation results are presented in Figure 8.  
The abnormal data are added at 16:36 on 24 November 2020 and 18:46 on 24 November 2020. The PM10 monitoring value at these two moments exceeds 100 ug/m\({}^{3}\). If E-CPS fails to perform abnormal data detection, the platform sends two early warning messages to inform the construction enterprises of the dust control. After abnormal data identification, the two moments are judged as abnormal points, and no early warning processing is performed. It is deduced that the identification of abnormal data can improve the anti-interference ability, which avoids affecting the decision-making due to the input of abnormal data and ensures the efficiency of the decision-making and the stable output. Therefore, the robust performance of the E-CPS is improved.  
In this study, the detection rate of abnormal data obtained using the detection algorithm is approximately 96%, slightly fluctuating with the changes of the sample size. This is due to the fact that the abnormal data discriminating rules are based on dust propagation laws and mathematical models, rather than relying on learning samples. Hence, the detection rate can remain stable, and the detection rate of \"PM10 is less than PM2.5\" and \"less than the detection value\" can reach 100%.  
The \"constant value\" is a reason of false alarms. In this experiment, the robust threshold of \"constant value\" is set to 10, which indicates that the data are judged as abnormal data when the value of PM10 remains unchanged within 10 min. However, it is deduced that, when the wind speed at night is slow, the PM10 value remains unchanged for 10 min, which results in a higher false alarm rate of 9.3%. If the robust threshold of \"constant value\" is set to 12, the false positives of the constant value can be highly reduced, as shown in Figure 9. In the constant-value detection, the detection rate and false alarm rate should be taken into consideration according to the actual situations on construction sites, and the abnormal probability threshold should meet the site conditions. In addition, the data \"far below the monitoring value outside the field\" may also result in false alarms during work stoppages.  
Figure 8: Identification of the PM10 monitoring value abnormal data.