# Event Coverage Detection and Event Source Determination in Underwater Wireless Sensor Networks
## 3 Event Detection and Sensory Data Aggregation  
Leveraging the routing tree constructed, we present our strategy for potential event identification and sensory data routing to \(SN\). As presented in [34], due to the harsh environment that (underwater) WSNs monitor, faults or malicious attacks may occur, which may cause unreliability and inaccuracy of sensory readings. This indicates that an isolated and independent deviation of sensory data by a single sensor node from normal sensory data sensed by neighboring sensor nodes is highly possible in reflecting an outlier (or error). On the other hand, when several neighboring sensor nodes, whose sensory data show a deviation from normal sensory readings in a collective fashion, it is highly possible that an event has happened. Based on this observation, in this article, an event is defined as a particular phenomena where multiple neighboring sensor nodes exhibit a deviation in their sensory readings concurrently, while for a single sensor node, it is assumed as the occurrence of an outlier (or error). Consequently, sensor nodes, which may reflect the occurrence of events, should gather their sensory data and route to \(SN\) for event coverage detection. In this section, we propose a mechanism to gather and route sensory data to \(SN\). Generally, sensory data of multiple neighboring sensor nodes are gathered by a sensor node (called a relay node) and are aggregated into a data packet for routing to \(SN\). When several neighboring sensor nodes detect a deviation of their sensory readings from a normal sensing range, an event may occur, and their sensory data should be gathered and routed to \(SN\) for event coverage detection and event source determination. A naive strategy is that each sensor node routes its sensory data to \(SN\) independently, leveraging the routing tree, which requires the forwarding of a relatively large number of data packets and, thus, is not energy efficient. Therefore, an appropriate relay node is to be selected for gathering and routing sensory data to \(SN\). As mentioned before, the _HeartBt_ control packets are adopted for the maintenance of the routing tree. This control packet is extended for event detection and relay node selection in this technique as follows:  
\[HeartBt_{ext}=<id_{uv},id_{uv_{ptr}},pid,crd_{uv},HC(uv),lq(uv,uv_{pt}),tag> \tag{6}\]  
where a tag \(tag\in\{0,1\}\) is appended for specifying whether sensory data of a certain sensor node deviated from a normal sensing range or not. Without loss of generality, \(0\) indicates the fact that sensory data are within the normal sensing range, while \(1\) indicates not. When a sensor node \(uv_{rel}\) receives a set of \(HeartBt_{ext}\) control packets from its child sensor nodes \(UV_{cld}\) and sibling sensor nodes \(UV_{sib}\), \(uv_{rel}\) will examine whether it can be a candidate relay node for some sensor nodes contained in \(UV_{bb}=UV_{cld}\cup UV_{sib}\). As presented by Algorithm 1, \(uv_{rel}\) can be a candidate relay node for \(uv\), when the following conditions can be satisfied:  
* \(HC(uv_{rel})=HC(uv)\), for the case that \(uv\in UV_{sib}\), or \(HC(uv_{rel})=(HC(uv)-1)\), for the case that \(uv\in UV_{cld}\). This means that \(uv_{rel}\) is not farther from \(SN\) in hop count compared to \(uv\). Therefore, the strategy that \(uv_{rel}\) relays sensory data for \(uv\) may consume less, or no more in the worst case, energy than the strategy that \(uv\) relays sensory data for \(uv_{rel}\). * When _tag_ for \(uv_{rel}\) is 1 (Line 2), which means that sensory data for \(uv_{rel}\) deviates from a normal sensing range and should be routed to \(SN\). In this case, if there is another sensor node \(uv\), whose sensory data deviates from a normal sensing range, as well, and should be relayed to \(SN\) by \(uv_{rel}\), \(uv_{rel}\) can be a candidate relay node for \(uv\). * When _tag_ for \(uv_{rel}\) is 0 (line 2), which means that sensory data for \(uv_{rel}\) is within a normal sensing range.