# An Enhanced Mechanism for Fault Tolerance in Agricultural Wireless Sensor Networks
## 5 Fault-Tolerant Scheme for WSN in Precision Agriculture
### Fault-Tolerant Clusters
#### 5.1.2 Fault-Tolerant CH
Again, if the monetary cost associated with redundant devices is considered, we would argue that the protection offered by such a WSN from the potential loss or damage of crops (due to perhaps, random weather events, lack of proper irrigation, and so on) is much greater than the monetary cost for deploying those extra devices. The functions are also pretty simple and easy to maintain. The fault-tolerant scheme makes sure the WSN does not fail even in the case of failure of key primary components. If the faulty or failed device is physically taken away after a failure event takes place, it is possible to repair it so that it can be used again in such a setting. Hence, this is feasible and cost-effective solution for precision agriculture scenarios. ## 8 Conclusions and Future Work

In this paper, we considered a precision agriculture setting where a WSN is used with a specific deployment pattern. We proposed a fault-tolerant scheme for energy efficiency based on hardware redundancy. The key idea is based on using hardware redundancy at the level of the Cluster Heads and Base Station, by using a primary and one or more backup devices. At each level, the primary device and its backup will exchange roles in the event of a failure. In this way, the continuity of the WSN (deployed for the crop field) in providing essential services (despite the occurrence of faults) can be ensured. To ensure the effectiveness of this approach, it is essential to provide the backup device (i.e., CH and Base Station) with all the necessary checkpoints about the WSN so that it is fully ready to take over the tasks. It is worth noting that the fault detection is achieved using Heartbeat strategies, where the primary CH plays the role of the sensor nodes' fault detector when it monitors the set of CHs. Meanwhile, the backup device monitors the primary one. Sleep mode technology is used at the sensor node level to conserve energy and extend the battery life. In order to validate the effectiveness of the proposed scheme, a system simulation was provided using the UPPAAL model checker tool for real-time systems. The fault tolerance properties (i.e., _safety_ and _liveness_) of the model were rigorously tested, and the results demonstrate the efficacy of the proposed scheme in fault detection and continuous service delivery. A comparative chart with some previous works was provided in order to show the effectiveness of the proposed model. \begin{table}
\begin{tabular}{p{42.7 pt} p{56.9 pt} p{56.9 pt} p{56.9 pt} p{56.9 pt} p{56.9 pt}} \hline \hline
**Reference** &
\begin{tabular}{c} **Fault detection** \\ **Mechanism** \\ \end{tabular} & **Fault Tolerance Mechanism** & **Fault type** & **Advantage** & **Limitations** \\ \hline \multirow{4}{*}{[49]} & \multirow{4}{*}{None} & CH selection by using the battle royal optimization algorithm; data communication enhancement by selecting a backup CH; and the aggregator node is selected using the Particle Swarm Optimization method. & Battery drain, network failure, node breakdown & Reliable network, increased energy efficiency & Extended delays and protocol heaviness; congestion \\ \hline \multirow{4}{*}{Our Proposal} & CH and BS fault detection using the Heartbeat strategy & CH and BS hardware redundancy and forward recovery. & Energy depletion and hardware faults of sensor nodes, CH, and BS & Quick fault detection and recovery, prolonged WSN lifetime, offers continuous service & Cost due to hardware redundancy; only convenient for small-scale WSNs \\ \hline \hline \end{tabular}
\end{table} 
Table 3: _Cont._As a future work based on this work, we aim to implement this scheme in real-life settings of WSNs in order to highlight its strengths and limitations and to compare it with the other existing strategies. Moreover, we aim to enhance the scheme to address the issues of scalability and applicability with diverse types of network architectures. Conceptualization, M.S. and A.-S.K.P. ; investigation, M.S. ; resources, M.S. and A.-S.K.P. ; writing--original draft preparation, M.S.