2, do ≤ d 4, do > d
(3.5)
where do is the minimum Euclidean distance between any two sensor nodes.
3.3 Distributed Self Fault Diagnosis Algorithm Using Neighbor Coordination
The proposed distributed self diagnosis algorithm (DSFDNC) approach has two phases such as partial neighbor diagnosis and voting phase. In partial
self-neighbor diagnosis phase, every sensor node in the network exchanges their sensed data with the neighbors. The probable fault status of own as well as its neighbors is estimated in this phase. The estimated statuses are exchanged by all sensor nodes among themselves in voting phase. Each sensor node receives its probable fault status from the neighbors and diffuses the received status. Then each sensor node compares its computed status with diffused status to predict its own status. All the notations used for describing the steps of the DSFDNC algorithm are summarized in Table 3.1. Detail description of different phases is given below.
3.3.1 Partial Self-Neighbor Diagnosis Phase
Every sensor node si ∈ S exchanges their measured data xi with neighboring nodes N egi. Then, each sensor node si keeps the received data from the neighbors in N xi. After receiving the data, the partial self and neighboring node fault status are com-puted based on the following observations as given below.
Case 1 : The remaining battery power Rei of sensor node si is computed with a constant battery power ζ to identify the hard faulty sensor node and the value for ζ is constant for all sensor nodes.
Let M inSense and M axSense are the minimum and the maximum sensing value of the sensor nodes. The value of M inSense, and M axSense are constants and common to all the sensor nodes present in WSNs. The Case 2 and 3 are based on M inSense and M axSense value and for stuck at zero and stuck at one fault as given below.
Case 2 : If the sensed data xi of the sensor node si is M inSense, then the sensor node si is suffering with stuck at zero fault.
Case 3 : If the sensed data xi of the sensor node si is M axSense, then the sensor node si is suffering with stuck at one fault.
The Cases 2 and 3 are based on the fact that if the observed data of a sensor node si is either the value of M inSense or M axSense, the sensor node si does not de-pend on the neighbors to identify its own fault status. However, the Case 4 is based on the fact that if the observed data of the sensor node si is neither the value of M inSense nor M axSense, the sensor node si needs to find its own status as well
as the neighbor’s status as the observed data is random between M inSense and M axSense.
Case 4 : If the sensed data xi of the sensor node si is between M inSense, and M axSense, then it performs the operation defined in Equation (3.6) over the col-lected data from the neighboring nodes N egi and own sensed data xi to identify self and neighbors probable fault status.
ˆ µi =
xi− 1 Ni
X
sj∈Negi
xj
≤ λ1 (3.6)
where λ1 is the threshold value. When the condition given in Equation (3.6) is satisfied by sensor node si then include the sensor node si and all its neighbors sj ∈ Negi to SG. Otherwise, the sensor node si and its neighboring nodes are suspected as a faulty sensor node. To identify the exact status of its own and neighboring nodes, si re-investigate over the received data xj, xj ∈ Nxi to identify the probable faulty sensor nodes. If the data xj, xj ∈ Nxi matched with M inSense, or M axSense then assign the sensor node sj to S2, or S3 respectively. Otherwise, perform the following operations over the collected data N xito identify the probable fault status of neighboring nodes N egi. The Case 4 is further partitioned into four sub cases which are given below.
Case 4(i)|xi − xj| > λ1 and xj ≤ λ2
In this case, the sensor node sj is added to the set P F F Ni and the sensor node si
is detected as faulty sensor node.
Case 4(ii) |xi− xj| > λ1 and xj > λ2
In this case, both the sensor nodes si and sj are faulty and the sensor node sj is added to P F Ni.
Case 4(iii) |xi− xj| ≤ λ1 and xj ≤ λ2
In this case, both the sensor nodes si and sj have fault free status and the sensor node sj is added to P F F Ni.
Case 4(iv) |xi− xj| ≤ λ1 and xj > λ2
In this case, the sensor node si is fault free, the sensor node sj is faulty and added
The test outcome is 0, if a sensor node si is found to be fault free after performing self neighbor diagnosis phase, otherwise it is 1. After performing this, voting phase is performed as given below.
3.3.2 Voting Phase
A sensor node siis diagnosed as fault free if number of 0’s (k) is greater than number of 1’s (n), otherwise it is faulty. This leads to majority voting scheme to diagnose whether a sensor node is faulty or fault free [80]. In voting phase, each sensor node si exchanges its neighbor status (i.e. 0 or 1) and also receives status from its neighboring nodes N egi. Then predicts its own status by analyzing the status received from its neighboring nodes N egi i.e., each sensor node si counts number of 0’s and 1’s it has received. If number of 0’s at si is more than number of 1’s at si, then si is diagnosed as fault free and belongs to set SG otherwise it is faulty and included in S4 respectively. As the algorithm is self diagnosable, the Algorithm 3.1 given below is executed at each sensor node si to achieve distributed self fault diagnosis.
Algorithm 3.1 DSFDNC Algorithm Data:NI Nodes, N xi
Result: Calculate S1, S2, S3, S4, and SG
Initialize S1= φ, S2= φ, S3= φ, S4= φ, and SG= φ Partial self-identification Phase
if Rei<= ζ then S1= S1∪ {si} else
if xi= M inSense then S2= S2∪ {si} end
if xi= M axSense then S3= S3∪ {si} end
Move to Algorithm 3.2 end
Voting Phase
si∈ S send P F N to neighbors sj∈ Negiand receives P F N from sjwhich is computed by the neighbors sj. From received data the sensor node siprepares RSi.
if Nz(RSi) > No(RSi) then
Node siis diagnosed as fault free sensor node. SG= SG∪ {si} else
Node siis diagnosed as random faulty sensor node. S4= S4∪ {si} end
Algorithm 3.2 Random fault diagnosis algorithm Data: N xi
Result: Calculate SG, P F N and P F F N SG= φ, P F N = φ and P F F N = φ
CRDNi= 0 for j = 1· · · |Negi| and sj∈ Negido CRDNi= CRDNi+ xj
end
CRDNi= CRDNi/Ni if |xi− CRDNi| ≤ θ1 then
The node siand sj∈ Negiare identified as likely fault free nodes SG= SG∪ {si} else
for j = 1· · · |Negi| do
if xj= M inSense or xj= M axSense then P F F N = P F F N∪ {sj}
else
if|xi− xj| > θ1 andxj> θ2then P F F N =∪{sj}
end
if|xi− xj| ≤ θ1andxj≤ θ2 then P F N =∪{sj}
end
if|xi− xj| ≤ θ1 andxj> θ2then P F N =∪{sj}
end
if|xi− xj| > θ1 andxj≤ θ2then P F F N =∪{sj}
end end end end