# Fog-Based Two-Phase Event Monitoring and Data Gathering in Vehicular Sensor Networks
## 5 Experimental Study
### Overall Performance  
Table 2 presents the overall performance of the algorithms. The proposed scheme could reduce more than 84 percent of the data transmissions compared with other existing algorithms, while at the same time it detects the events and gathers the event data.  
About 160 events are generated, and the number of true positive, true negative, false positive and false negative events is also presented. NAIVE has the lowest message transmissions, and the recall rate of NAIVE is 0.2648, which is the lowest. This is because for NAIVE, data are uploaded only when a node encounters an RSU. The number of data transmissions is about \(2.34\times 10^{4}\), and many data have to be stored locally and dropped when there is not enough storage space, which leads to some loss of event detections. Therefore, NAIVE has the lowest recall rate and precision of event detections.  
For PROPHET and ESSMD, data are forwarded to encountering nodes, and all chances are utilized to upload the data. They have a much higher recall rate, which is about 0.93, and also incur a larger cost of data transmissions. The numbers of message transmissions of PROPHET and ESSMD are about \(3421.98\times 10^{4}\) and \(2583.36\times 10^{4}\) respectively. In contrast with other algorithms, the proposed TPEG scheme has a much lower cost of data transmissions; the number of message transmissions is about \(403.26\times 10^{4}\), which is about eight percent of that of PROPHET and about 15.6 percent of that of ESSMD. This is because TPEG adopts LCS mode for event-monitoring, and detailed data are generated and uploaded only when a threshold at the RSU is broken. This generates far fewer data and incurs much lower transmission cost. The reduced transmission of messages, however, does not harm the precision and recall of the detection of events. The precision of the three algorithms is within the range of \([0.97,0.99]\), and the recall of TPEG is 0.9226, about 0.01 lower than those of PROPHET and ESSMD. Through the two-phase threshold suppression, TPEG reduces much data transmissions compared with other algorithms, while at the same time detecting all the events and gathering the event data.  
Table 2 also presents the time needed for detecting an event. If an event is generated at \(t_{1}\) and is confirmed at ITS at \(t_{2}\), then \(|t_{2}-t_{1}|\) is the time needed for the event detection. From the table, we could see that the average detection time of NAIVE is 36.29 min, which is the longest, and those of PROPHET, ESSMD and TPEG are about 28.83, 30.6 and 33.69 min, respectively. NAIVE has to wait for some time before uploading the data when a vehicular node is not covered by the RSU, yet other schemes could forward the data to encountered vehicles, who help to upload the data for event detection. The length of the detection time of TPEG is larger than PROPHET and ESSMD because not all the nodes broadcast and forward the sensed data. For TPEG, when an \"event-checking procedure\" is issued, the network would select a node for the data upload and forwarding, which leads to some delay of the event detection.