# A Matrix-Based Proactive Data Relay Algorithm for Large Distributed Sensor Networks
## 5 Model Maintenance Algorithm
### Updating the Data Distribution Matrix D
```
1:while\(true\)do
2:\(dataG\gets sensedData()\);
3:\(dataR\gets receivedData()\);
4:\(dataO\leftarrow outdatedData()\)
5:\(updateC(\_dataR)\);
6:\(updateD(D,dataG,dataR,dataB,dataO)\);
7:\(updateI(U,dataG,dataR,utilityTable)\);
8:for all\(d_{h}\in dataG\cup dataR\)do
9:if\(d_{h}\
otin L_{i}\)then
10:\(L_{i}\gets L_{i}\cup\{d_{h}\}\);
11:if\(Quality(l_{i}|L_{i})\geq\tau_{j})\)then
12: fuse into information \(I_{i}\);
13:\(dataO\gets datareltedtol_{j}\);
14:else
15:\(pendingQue.add(d_{h})\);
16:\(F\gets C\cdot((\Gamma-D)\circ(D\times U))-\beta\cdot(Eb+Er(C\cdot \overrightarrow{\Lambda}))\);
17:for all\(d_{h}\in pendingQue\)do
18:if\(F(d_{h})>0\)then
19:\(d_{h}.path.add(v_{i})\);
20:\(broadcast(d_{h})\);
21:\(dataB.add(d_{h})\)
```

**Algorithm 4** Data relay process for a sensor \(v_{i}\). ## 6 Experimental Section

In this section, we evaluate the performance of our proactive data relay algorithm CDU through simulations. In most scenarios, we used a field size of 600 \(\times\) 600 m\({}^{2}\) where 500 mobile nodes were randomly scattered for target detection, and fused data detected into information. For each time step, 1% of sensors were made to move. Sensors communicated with each other in a broadcast medium, and the power of sensor radio transmitter was fixed so that any node within a 25 meter radius was within communication range. Sensor nodes within a communication range of another sensor are described as the neighbors. The power consumption (0.66 W in transmit mode, 0.395 W in receive mode) were chosen based on data from currently available radios [12]. The transmission time for a packet was fixed at 10 ms. In each run, 100 events about targets randomly occurred. Each target could be detected by 9 sensors, and each detection generated a piece of data with a confidence \(c,\ c\in\ [0,1]\) is related to the distance between detected sensor and target [25]. For each event, one piece of information can be fused only when more than 6 data related to this target is aggregated by one sensor and the combined confidence is higher than 0.75. We mainly compare the performance of our algorithm CDU with the Flooding [8], the Scalable Broadcast Algorithm (SBA) [14], and GRAdient Broadcast(GRAB) [12] algorithms. GRAB is on behalf of routing algorithms where only predefined sink nodes are able to fuse while the other three treat all sensors as potential sink nodes. Flooding is the most straightforward data relay algorithm, where each sensor broadcasts whatever new data it receives immediately without any reasoning. For SBA, only data that can reach new neighbors is broadcast. In SBA, neighbor knowledge in two hops is maintained by periodic \"hello\" packages. Also, in GRAB, each sensor maintains a cost field, and records the cost to the sink node in proportion to the distance to the sink node. Sensors only broadcast data received from the sensor where cost is higher and relay data to sink nodes to fuse. Typical of most simulations, the network has one random sink node. When the number of nodes is 1000, 2 sink nodes are randomly chosen. In CDU, Flooding, and SBA, any sensor can fuse data into information if enough data is aggregated, while in GRAB only sink node can fuse. The value of \(U\) matrix in CDU is generated based on the D-S fusion rule [30]. Other relevant parameters defined are \(\sigma=~{}0.97,\beta=~{}2.0,lengthOfPath=2\). To test if CDU works well, we measured the **Number of fused information** by all the sensors, the **Total energy cost** on communication of all sensors, and the **efficiency** = Number of fused information/Total energy cost, calculated as the energy consumed on communicating to fuse each piece of information. The efficiency indicates how the algorithms balance broadcasting to fusing more information and minimizing energy consumption. Results for each experiment are based on one hundred trials. In the simulations, we first evaluate the impact of control parameters of CDU, including \(\beta\) and the length of path.