## 4 Description of the Proposed Topology Construction
### Design Issues of the Proposed Logical Topology
#### 4.5.2 Chain Reconstruction  
It is important to reconstruct the chains whenever a significant number of sensor nodes in a chain expire. Otherwise, one chain may contain a higher number of sensor nodes, while others may contain a lower number of sensors. This affects the performance of the topology due to uneven energy dissipation by the chains. It is vital to maintain uniformity in the number of sensor nodes in all chains as only one sensor node (_i.e._, the higher-level chain leader) is responsible for sending the aggregated data to the BS, and it has to wait for aggregated data from different lower-level leaders. Thus, the uniformity of number of sensors in chains affects network lifetime. If a chain consists of a lower number of sensors, the probability of a sensor in that chain being selected as a local leader will be higher. Thus, a chain of short length is likely to lose sensors more often. It is obvious that if chains are reconstructed frequently, such as whenever only 4%-5% sensors of the chain die, it causes extra overhead. On the other hand, if the chain is reconstructed whenever 40%-50% sensors of the chain die, the uniformity among the chains is destroyed. To answer the question of when a chain should be reconstructed, simulation experiments were performed. To find the optimal value, chains were reconstructed varying the percentage of sensors' death in the chains, and its effects on total energy spent, lifetime of the network, and time required to complete 100 rounds were observed. Simulation results are presented in Figures 10-12. Figure 10 shows that although the energy consumption increases when chains are reconstructed less frequently, the amount of energy difference is not extreme. Figure 11 shows that the lifetime of 95% of the deployed sensor nodes remains almost steady regardless of the percentage of expired sensors when a chain is reconstructed, with a small peak when approximately 20% of the deployed sensors have expired. Figure 12 shows that time requirements decrease when chains are reconstructed less frequently. Time requirement falls sharply when 4%-20% sensors die and then decreases slowly afterwards. Thus, it is concluded that it is best to reconstruct chains when approximately 20% of the sensors within a chain expire.  
To track how many sensor nodes are expired in a chain, the following method can be used. When data are fused in every sensor of a chain, each sensor adds its tag to the data packet. For example, let node \(n_{1}\) send data to \(n_{2}\), and \(n_{2}\) fuse \(n_{1}\)'s data and send it to \(n_{3}\). However, if \(n_{2}\) is dead, \(n_{1}\) sends data directly to \(n_{3}\), and thus the node \(n_{3}\) knows that \(n_{2}\) is dead. In this way every lower-level leader can determine how many of its members are dead. In a similar fashion, when the higher-level leader collects data from all lower-level leaders, it can determine how many sensors in the network are dead. Subsequently, the higher-level leader sends instructions to all sensor nodes.  
Figure 11: Network lifetime _vs_. percent of expired sensor nodes in a chain when the chain is reconstructed.  
Figure 12: Time required _vs_. percent of expired sensor nodes in a chain when the chain is reconstructed.  
Figure 10: Total energy spent _vs_. percent of expired sensor nodes in a chain when the chain is reconstructed.