# Fog-Based Two-Phase Event Monitoring and Data Gathering in Vehicular Sensor Networks
## 5 Experimental Study  
### Environmental Setup  
To verify the performance of the proposed algorithm, we conduct experiments on the ONE platform [37] with a real-world road network. ONE is a simulation environment that is capable of generating node movement using different movement models routing messages between nodes with various DTN routing algorithms. There are six fog nodes/RSUs and 60 vehicular nodes in the network, which is part of the campus of Xiamen University centered at latitude: 24.4390262, longitude: 118.0977218 (Figure 3). The total simulation time is 43,200 s. To simulate the monitoring application, events and sensing data are injected through a data generator. The interval between two sequential events follows the Poisson distribution with parameter \(\lambda=200\) s. Each event is attached to a location along the road and would be handed over or nullified after within 1000-5000 s. For event \(e\), it has an impact area with a radius of \(R_{e}\). When a node enters the impact area, its sensed data would reflect the impact of that event. The weight of sensed data follows the normal distribution \(w_{x}(d,e)\sim N(\alpha_{x},\sigma_{x})\):  
\[\alpha_{x}=\left\{\begin{array}{l}\epsilon_{x},\;\;dis(s,e)>R_{e}\\ \epsilon_{x}+\xi_{x}*\frac{R_{e}-dis(s,e)}{R_{e}},\;\;dis(s,e)\leq R_{e}\\ \end{array}\right.,\;\;\;x\in\{LCS,HCS\} \tag{16}\]  
where the subscript \(x\) could be \(l\) or \(h\) representing the LCS and HCS modes, \(\epsilon_{x}\) represents the impact of sensing noise and \(dis(s,e)\) is the distance between source \(s\) and event \(e\). \(\xi_{x}\) represents the impact of the event on the sensing data, and \(\frac{R_{e}-dis(s,e)}{R_{e}}\) increases when node \(s\) gets closer to the event, which would increase the weight of data. The average duration of nodes passing by an RSU, \(\widetilde{t}\), is calculated by dividing the length of the road segment that the RSU covers by the average speed of vehicles. Furthermore, the sensing frequency and data size are also defined by the mode of sensing. When a node is in LCS mode, it generates a piece of data of 50 K; when a node works in HCS mode, it generates a piece of data with 500 K. The bandwidth of the link that uploads data from ordinary nodes to RSUs is 500 K/s. We assume ideal links when two nodes meet and establish a connection. Table 1 lists the default parameters of the simulation setting.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameter** & **Value** & **Description** \\ \hline \(n\) & 60 & number of vehicular nodes \\ n\_RSU & 6 & number of RSU nodes \\ n\_time & 43,200 s & simulation duration \\ L & 3000 m & length of road segment \\ d\_time & \(\sim\)[25–35] s & interval of sensing \\ \(R_{e}\) & 60 m & sensing radius of RSU nodes \\ speed & \(\sim\)[5, 10] m/s & speed of nodes \\ data & 50,500 KB & size of sensing data at LCS/HCS \\ cache\_size & 300 MB & cache size of nodes \\ e\_length & \(\sim\)[1000, 5000] s & life span of events \\ \(\lambda\) & 200 s & interval of events (Poisson distribution) \\ \(m\) & 3 & number of readings at RSU for event-checking \\ \(\Delta\) & 0.05 & predefined increment factor for \(\tau_{1}\) \\ \(TU\) & 10,000 s & unit of time for threshold adjustment \\ \(e_{l},e_{h}\) & \(\sim\)[0,0.5], \(\sim\)[0.0.1] & range of noise in LCS and HCS \\ \(\sigma_{l},\sigma_{h}\) & 0.1, 0.05 & standard deviation of weight in LCS and HCS \\ \hline \hline \end{tabular}
\end{table}
Table 1: Default parameters of the simulation. LCS, low cost sensing; HCS, high cost sensing.